]>
Commit | Line | Data |
---|---|---|
005537df | 1 | #! /bin/sh |
63cf211a | 2 | |
861bb6c1 | 3 | # Guess values for system-dependent variables and create Makefiles. |
63cf211a NN |
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 | ||
63cf211a NN |
10 | # Defaults: |
11 | ac_help= | |
861bb6c1 | 12 | ac_default_prefix=/usr/local |
63cf211a NN |
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" | |
23 | ac_help="$ac_help | |
24 | --enable-generated-files-in-srcdir Put generated files in source dir" | |
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. | |
39 | Categories are: misc,tree,rtl,rtlflag,gc,gcac,fold; | |
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" | |
439a7e54 DN |
48 | ac_help="$ac_help |
49 | --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering" | |
63cf211a NN |
50 | ac_help="$ac_help |
51 | --with-stabs arrange to use stabs instead of host debug format" | |
52 | ac_help="$ac_help | |
53 | --enable-multilib enable library support for multiple ABIs" | |
54 | ac_help="$ac_help | |
55 | --enable-__cxa_atexit enable __cxa_atexit for C++" | |
56 | ac_help="$ac_help | |
57 | --enable-threads enable thread usage for target GCC | |
58 | --enable-threads=LIB use LIB thread package for target GCC" | |
59 | ac_help="$ac_help | |
60 | --enable-objc-gc enable the use of Boehm's garbage collector with | |
61 | the GNU Objective-C runtime" | |
62 | ac_help="$ac_help | |
63 | --with-dwarf2 force the default debug format to be DWARF 2" | |
64 | ac_help="$ac_help | |
65 | --disable-shared don't provide a shared libgcc" | |
66 | ac_help="$ac_help | |
67 | --with-sysroot[=DIR] Search for usr/lib, usr/include, et al, within DIR." | |
68 | ac_help="$ac_help | |
69 | --enable-intermodule build the compiler in one step" | |
70 | ac_help="$ac_help | |
71 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" | |
72 | ac_help="$ac_help | |
73 | --enable-initfini-array use .init_array/.fini_array sections" | |
74 | ac_help="$ac_help | |
75 | --enable-sjlj-exceptions | |
76 | arrange to use setjmp/longjmp exception handling" | |
77 | ac_help="$ac_help | |
78 | --enable-libunwind-exceptions force use libunwind for exceptions" | |
79 | ac_help="$ac_help | |
80 | --disable-win32-registry | |
81 | disable lookup of installation paths in the | |
82 | Registry on Windows hosts | |
83 | --enable-win32-registry enable registry lookup (default) | |
84 | --enable-win32-registry=KEY | |
85 | use KEY instead of GCC version as the last portion | |
86 | of the registry key" | |
87 | ac_help="$ac_help | |
88 | --with-gc={simple,page,zone} choose the garbage collection mechanism to use | |
89 | with the compiler" | |
90 | ac_help="$ac_help | |
91 | --with-system-zlib use installed libz" | |
92 | ac_help="$ac_help | |
93 | --enable-maintainer-mode | |
94 | enable make rules and dependencies not useful | |
95 | (and sometimes confusing) to the casual installer" | |
96 | ac_help="$ac_help | |
97 | --enable-version-specific-runtime-libs | |
98 | specify that runtime libraries should be | |
99 | installed in a compiler-specific directory" | |
100 | ac_help="$ac_help | |
101 | --with-slibdir=DIR shared libraries in DIR [LIBDIR]" | |
861bb6c1 JL |
102 | |
103 | # Initialize some variables set by options. | |
104 | # The variables have the same names as the options, with | |
105 | # dashes changed to underlines. | |
63cf211a NN |
106 | build=NONE |
107 | cache_file=./config.cache | |
861bb6c1 | 108 | exec_prefix=NONE |
63cf211a | 109 | host=NONE |
861bb6c1 | 110 | no_create= |
63cf211a | 111 | nonopt=NONE |
861bb6c1 JL |
112 | no_recursion= |
113 | prefix=NONE | |
114 | program_prefix=NONE | |
115 | program_suffix=NONE | |
116 | program_transform_name=s,x,x, | |
117 | silent= | |
118 | site= | |
119 | srcdir= | |
63cf211a | 120 | target=NONE |
861bb6c1 JL |
121 | verbose= |
122 | x_includes=NONE | |
123 | x_libraries=NONE | |
124 | bindir='${exec_prefix}/bin' | |
125 | sbindir='${exec_prefix}/sbin' | |
126 | libexecdir='${exec_prefix}/libexec' | |
127 | datadir='${prefix}/share' | |
128 | sysconfdir='${prefix}/etc' | |
129 | sharedstatedir='${prefix}/com' | |
130 | localstatedir='${prefix}/var' | |
131 | libdir='${exec_prefix}/lib' | |
132 | includedir='${prefix}/include' | |
133 | oldincludedir='/usr/include' | |
134 | infodir='${prefix}/info' | |
135 | mandir='${prefix}/man' | |
136 | ||
63cf211a NN |
137 | # Initialize some other variables. |
138 | subdirs= | |
139 | MFLAGS= MAKEFLAGS= | |
140 | SHELL=${CONFIG_SHELL-/bin/sh} | |
141 | # Maximum number of lines to put in a shell here document. | |
142 | ac_max_here_lines=12 | |
143 | ||
861bb6c1 JL |
144 | ac_prev= |
145 | for ac_option | |
146 | do | |
63cf211a | 147 | |
861bb6c1 JL |
148 | # If the previous option needs an argument, assign it. |
149 | if test -n "$ac_prev"; then | |
150 | eval "$ac_prev=\$ac_option" | |
151 | ac_prev= | |
152 | continue | |
153 | fi | |
154 | ||
63cf211a NN |
155 | case "$ac_option" in |
156 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
157 | *) ac_optarg= ;; | |
158 | esac | |
861bb6c1 JL |
159 | |
160 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
161 | ||
63cf211a | 162 | case "$ac_option" in |
861bb6c1 JL |
163 | |
164 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
165 | ac_prev=bindir ;; | |
166 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
63cf211a | 167 | bindir="$ac_optarg" ;; |
861bb6c1 JL |
168 | |
169 | -build | --build | --buil | --bui | --bu) | |
63cf211a | 170 | ac_prev=build ;; |
861bb6c1 | 171 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
63cf211a | 172 | build="$ac_optarg" ;; |
861bb6c1 JL |
173 | |
174 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
175 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
176 | ac_prev=cache_file ;; | |
177 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
178 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
63cf211a | 179 | cache_file="$ac_optarg" ;; |
861bb6c1 JL |
180 | |
181 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
182 | ac_prev=datadir ;; | |
183 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
184 | | --da=*) | |
63cf211a | 185 | datadir="$ac_optarg" ;; |
861bb6c1 JL |
186 | |
187 | -disable-* | --disable-*) | |
63cf211a | 188 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` |
861bb6c1 | 189 | # Reject names that are not valid shell variable names. |
63cf211a NN |
190 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then |
191 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
192 | fi | |
193 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
194 | eval "enable_${ac_feature}=no" ;; | |
861bb6c1 JL |
195 | |
196 | -enable-* | --enable-*) | |
63cf211a | 197 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` |
861bb6c1 | 198 | # Reject names that are not valid shell variable names. |
63cf211a NN |
199 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then |
200 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
201 | fi | |
202 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
203 | case "$ac_option" in | |
204 | *=*) ;; | |
861bb6c1 JL |
205 | *) ac_optarg=yes ;; |
206 | esac | |
63cf211a | 207 | eval "enable_${ac_feature}='$ac_optarg'" ;; |
861bb6c1 JL |
208 | |
209 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
210 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
211 | | --exec | --exe | --ex) | |
212 | ac_prev=exec_prefix ;; | |
213 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
214 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
215 | | --exec=* | --exe=* | --ex=*) | |
63cf211a | 216 | exec_prefix="$ac_optarg" ;; |
861bb6c1 JL |
217 | |
218 | -gas | --gas | --ga | --g) | |
219 | # Obsolete; use --with-gas. | |
220 | with_gas=yes ;; | |
221 | ||
63cf211a NN |
222 | -help | --help | --hel | --he) |
223 | # Omit some internal or obsolete options to make the list less imposing. | |
224 | # This message is too long to be a string in the A/UX 3.1 sh. | |
225 | cat << EOF | |
226 | Usage: configure [options] [host] | |
227 | Options: [defaults in brackets after descriptions] | |
228 | Configuration: | |
229 | --cache-file=FILE cache test results in FILE | |
230 | --help print this message | |
231 | --no-create do not create output files | |
232 | --quiet, --silent do not print \`checking...' messages | |
233 | --version print the version of autoconf that created configure | |
234 | Directory and file names: | |
235 | --prefix=PREFIX install architecture-independent files in PREFIX | |
236 | [$ac_default_prefix] | |
237 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
238 | [same as prefix] | |
239 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
240 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
241 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
242 | --datadir=DIR read-only architecture-independent data in DIR | |
243 | [PREFIX/share] | |
244 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
245 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
246 | [PREFIX/com] | |
247 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
248 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
249 | --includedir=DIR C header files in DIR [PREFIX/include] | |
250 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
251 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
252 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
253 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
254 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
255 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
256 | --program-transform-name=PROGRAM | |
257 | run sed PROGRAM on installed program names | |
258 | EOF | |
259 | cat << EOF | |
260 | Host type: | |
261 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
262 | --host=HOST configure for HOST [guessed] | |
263 | --target=TARGET configure for TARGET [TARGET=HOST] | |
264 | Features and packages: | |
265 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
266 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
267 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
268 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
269 | --x-includes=DIR X include files are in DIR | |
270 | --x-libraries=DIR X library files are in DIR | |
271 | EOF | |
272 | if test -n "$ac_help"; then | |
273 | echo "--enable and --with options recognized:$ac_help" | |
274 | fi | |
275 | exit 0 ;; | |
861bb6c1 JL |
276 | |
277 | -host | --host | --hos | --ho) | |
63cf211a | 278 | ac_prev=host ;; |
861bb6c1 | 279 | -host=* | --host=* | --hos=* | --ho=*) |
63cf211a | 280 | host="$ac_optarg" ;; |
861bb6c1 JL |
281 | |
282 | -includedir | --includedir | --includedi | --included | --include \ | |
283 | | --includ | --inclu | --incl | --inc) | |
284 | ac_prev=includedir ;; | |
285 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
286 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
63cf211a | 287 | includedir="$ac_optarg" ;; |
861bb6c1 JL |
288 | |
289 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
290 | ac_prev=infodir ;; | |
291 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
63cf211a | 292 | infodir="$ac_optarg" ;; |
861bb6c1 JL |
293 | |
294 | -libdir | --libdir | --libdi | --libd) | |
295 | ac_prev=libdir ;; | |
296 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
63cf211a | 297 | libdir="$ac_optarg" ;; |
861bb6c1 JL |
298 | |
299 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
300 | | --libexe | --libex | --libe) | |
301 | ac_prev=libexecdir ;; | |
302 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
303 | | --libexe=* | --libex=* | --libe=*) | |
63cf211a | 304 | libexecdir="$ac_optarg" ;; |
861bb6c1 JL |
305 | |
306 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
307 | | --localstate | --localstat | --localsta | --localst \ | |
308 | | --locals | --local | --loca | --loc | --lo) | |
309 | ac_prev=localstatedir ;; | |
310 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
311 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
312 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
63cf211a | 313 | localstatedir="$ac_optarg" ;; |
861bb6c1 JL |
314 | |
315 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
316 | ac_prev=mandir ;; | |
317 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
63cf211a | 318 | mandir="$ac_optarg" ;; |
861bb6c1 JL |
319 | |
320 | -nfp | --nfp | --nf) | |
321 | # Obsolete; use --without-fp. | |
322 | with_fp=no ;; | |
323 | ||
324 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
63cf211a | 325 | | --no-cr | --no-c) |
861bb6c1 JL |
326 | no_create=yes ;; |
327 | ||
328 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
329 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
330 | no_recursion=yes ;; | |
331 | ||
332 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
333 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
334 | | --oldin | --oldi | --old | --ol | --o) | |
335 | ac_prev=oldincludedir ;; | |
336 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
337 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
338 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
63cf211a | 339 | oldincludedir="$ac_optarg" ;; |
861bb6c1 JL |
340 | |
341 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
342 | ac_prev=prefix ;; | |
343 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
63cf211a | 344 | prefix="$ac_optarg" ;; |
861bb6c1 JL |
345 | |
346 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
347 | | --program-pre | --program-pr | --program-p) | |
348 | ac_prev=program_prefix ;; | |
349 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
350 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
63cf211a | 351 | program_prefix="$ac_optarg" ;; |
861bb6c1 JL |
352 | |
353 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
354 | | --program-suf | --program-su | --program-s) | |
355 | ac_prev=program_suffix ;; | |
356 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
357 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
63cf211a | 358 | program_suffix="$ac_optarg" ;; |
861bb6c1 JL |
359 | |
360 | -program-transform-name | --program-transform-name \ | |
361 | | --program-transform-nam | --program-transform-na \ | |
362 | | --program-transform-n | --program-transform- \ | |
363 | | --program-transform | --program-transfor \ | |
364 | | --program-transfo | --program-transf \ | |
365 | | --program-trans | --program-tran \ | |
366 | | --progr-tra | --program-tr | --program-t) | |
367 | ac_prev=program_transform_name ;; | |
368 | -program-transform-name=* | --program-transform-name=* \ | |
369 | | --program-transform-nam=* | --program-transform-na=* \ | |
370 | | --program-transform-n=* | --program-transform-=* \ | |
371 | | --program-transform=* | --program-transfor=* \ | |
372 | | --program-transfo=* | --program-transf=* \ | |
373 | | --program-trans=* | --program-tran=* \ | |
374 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
63cf211a | 375 | program_transform_name="$ac_optarg" ;; |
861bb6c1 JL |
376 | |
377 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
378 | | -silent | --silent | --silen | --sile | --sil) | |
379 | silent=yes ;; | |
380 | ||
381 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
382 | ac_prev=sbindir ;; | |
383 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
384 | | --sbi=* | --sb=*) | |
63cf211a | 385 | sbindir="$ac_optarg" ;; |
861bb6c1 JL |
386 | |
387 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
388 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
389 | | --sharedst | --shareds | --shared | --share | --shar \ | |
390 | | --sha | --sh) | |
391 | ac_prev=sharedstatedir ;; | |
392 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
393 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
394 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
395 | | --sha=* | --sh=*) | |
63cf211a | 396 | sharedstatedir="$ac_optarg" ;; |
861bb6c1 JL |
397 | |
398 | -site | --site | --sit) | |
399 | ac_prev=site ;; | |
400 | -site=* | --site=* | --sit=*) | |
63cf211a | 401 | site="$ac_optarg" ;; |
861bb6c1 JL |
402 | |
403 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
404 | ac_prev=srcdir ;; | |
405 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
63cf211a | 406 | srcdir="$ac_optarg" ;; |
861bb6c1 JL |
407 | |
408 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
409 | | --syscon | --sysco | --sysc | --sys | --sy) | |
410 | ac_prev=sysconfdir ;; | |
411 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
412 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
63cf211a | 413 | sysconfdir="$ac_optarg" ;; |
861bb6c1 JL |
414 | |
415 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
63cf211a | 416 | ac_prev=target ;; |
861bb6c1 | 417 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
63cf211a | 418 | target="$ac_optarg" ;; |
861bb6c1 JL |
419 | |
420 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
421 | verbose=yes ;; | |
422 | ||
63cf211a NN |
423 | -version | --version | --versio | --versi | --vers) |
424 | echo "configure generated by autoconf version 2.13" | |
425 | exit 0 ;; | |
861bb6c1 JL |
426 | |
427 | -with-* | --with-*) | |
63cf211a | 428 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` |
861bb6c1 | 429 | # Reject names that are not valid shell variable names. |
63cf211a NN |
430 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then |
431 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
432 | fi | |
861bb6c1 | 433 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
63cf211a NN |
434 | case "$ac_option" in |
435 | *=*) ;; | |
861bb6c1 JL |
436 | *) ac_optarg=yes ;; |
437 | esac | |
63cf211a | 438 | eval "with_${ac_package}='$ac_optarg'" ;; |
861bb6c1 JL |
439 | |
440 | -without-* | --without-*) | |
63cf211a | 441 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` |
861bb6c1 | 442 | # Reject names that are not valid shell variable names. |
63cf211a NN |
443 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then |
444 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
445 | fi | |
446 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
447 | eval "with_${ac_package}=no" ;; | |
861bb6c1 JL |
448 | |
449 | --x) | |
450 | # Obsolete; use --with-x. | |
451 | with_x=yes ;; | |
452 | ||
453 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
454 | | --x-incl | --x-inc | --x-in | --x-i) | |
455 | ac_prev=x_includes ;; | |
456 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
457 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
63cf211a | 458 | x_includes="$ac_optarg" ;; |
861bb6c1 JL |
459 | |
460 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
461 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
462 | ac_prev=x_libraries ;; | |
463 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
464 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
63cf211a | 465 | x_libraries="$ac_optarg" ;; |
861bb6c1 | 466 | |
63cf211a | 467 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } |
861bb6c1 JL |
468 | ;; |
469 | ||
470 | *) | |
63cf211a NN |
471 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
472 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
473 | fi | |
474 | if test "x$nonopt" != xNONE; then | |
475 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
476 | fi | |
477 | nonopt="$ac_option" | |
861bb6c1 JL |
478 | ;; |
479 | ||
480 | esac | |
481 | done | |
482 | ||
483 | if test -n "$ac_prev"; then | |
63cf211a | 484 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } |
093e61a6 | 485 | fi |
093e61a6 | 486 | |
63cf211a NN |
487 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
488 | ||
489 | # File descriptor usage: | |
490 | # 0 standard input | |
491 | # 1 file creation | |
492 | # 2 errors and warnings | |
493 | # 3 some systems may open it to /dev/tty | |
494 | # 4 used on the Kubota Titan | |
495 | # 6 checking for... messages and results | |
496 | # 5 compiler messages saved in config.log | |
497 | if test "$silent" = yes; then | |
498 | exec 6>/dev/null | |
499 | else | |
500 | exec 6>&1 | |
501 | fi | |
502 | exec 5>./config.log | |
503 | ||
504 | echo "\ | |
505 | This file contains any messages produced by compilers while | |
506 | running configure, to aid debugging if configure makes a mistake. | |
507 | " 1>&5 | |
093e61a6 | 508 | |
63cf211a NN |
509 | # Strip out --no-create and --no-recursion so they do not pile up. |
510 | # Also quote any args containing shell metacharacters. | |
511 | ac_configure_args= | |
512 | for ac_arg | |
861bb6c1 | 513 | do |
63cf211a NN |
514 | case "$ac_arg" in |
515 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
516 | | --no-cr | --no-c) ;; | |
517 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
518 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
519 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
520 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
521 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
861bb6c1 JL |
522 | esac |
523 | done | |
524 | ||
63cf211a NN |
525 | # NLS nuisances. |
526 | # Only set these to C if already set. These must not be set unconditionally | |
527 | # because not all systems understand e.g. LANG=C (notably SCO). | |
528 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
529 | # Non-C LC_CTYPE values break the ctype check. | |
530 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
531 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
532 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
533 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
6e3f3080 | 534 | |
63cf211a NN |
535 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
536 | rm -rf conftest* confdefs.h | |
537 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
538 | echo > confdefs.h | |
861bb6c1 | 539 | |
63cf211a NN |
540 | # A filename unique to this package, relative to the directory that |
541 | # configure is in, which we can look for to find out if srcdir is correct. | |
542 | ac_unique_file=tree.c | |
861bb6c1 JL |
543 | |
544 | # Find the source files, if location was not specified. | |
545 | if test -z "$srcdir"; then | |
546 | ac_srcdir_defaulted=yes | |
547 | # Try the directory containing this script, then its parent. | |
63cf211a NN |
548 | ac_prog=$0 |
549 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
550 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
861bb6c1 JL |
551 | srcdir=$ac_confdir |
552 | if test ! -r $srcdir/$ac_unique_file; then | |
553 | srcdir=.. | |
554 | fi | |
555 | else | |
556 | ac_srcdir_defaulted=no | |
557 | fi | |
558 | if test ! -r $srcdir/$ac_unique_file; then | |
559 | if test "$ac_srcdir_defaulted" = yes; then | |
63cf211a | 560 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } |
6eb95e99 | 561 | else |
63cf211a | 562 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } |
093e61a6 RS |
563 | fi |
564 | fi | |
63cf211a | 565 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` |
093e61a6 | 566 | |
63cf211a NN |
567 | # Prefer explicitly selected file to automatically selected ones. |
568 | if test -z "$CONFIG_SITE"; then | |
569 | if test "x$prefix" != xNONE; then | |
570 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
571 | else | |
572 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
573 | fi | |
574 | fi | |
575 | for ac_site_file in $CONFIG_SITE; do | |
576 | if test -r "$ac_site_file"; then | |
577 | echo "loading site script $ac_site_file" | |
578 | . "$ac_site_file" | |
579 | fi | |
580 | done | |
581 | ||
582 | if test -r "$cache_file"; then | |
583 | echo "loading cache $cache_file" | |
584 | . $cache_file | |
585 | else | |
586 | echo "creating cache $cache_file" | |
587 | > $cache_file | |
588 | fi | |
861bb6c1 | 589 | |
63cf211a NN |
590 | ac_ext=c |
591 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
592 | ac_cpp='$CPP $CPPFLAGS' | |
593 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
594 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
595 | cross_compiling=$ac_cv_prog_cc_cross | |
596 | ||
597 | ac_exeext= | |
598 | ac_objext=o | |
599 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
600 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
601 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
602 | ac_n= ac_c=' | |
603 | ' ac_t=' ' | |
604 | else | |
605 | ac_n=-n ac_c= ac_t= | |
606 | fi | |
607 | else | |
608 | ac_n= ac_c='\c' ac_t= | |
609 | fi | |
861bb6c1 JL |
610 | |
611 | ||
612 | ||
613 | ||
63cf211a NN |
614 | # Determine the host, build, and target systems |
615 | ac_aux_dir= | |
616 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do | |
617 | if test -f $ac_dir/install-sh; then | |
618 | ac_aux_dir=$ac_dir | |
619 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
620 | break | |
621 | elif test -f $ac_dir/install.sh; then | |
622 | ac_aux_dir=$ac_dir | |
623 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
624 | break | |
625 | fi | |
626 | done | |
627 | if test -z "$ac_aux_dir"; then | |
628 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } | |
629 | fi | |
630 | ac_config_guess=$ac_aux_dir/config.guess | |
631 | ac_config_sub=$ac_aux_dir/config.sub | |
632 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
13c22933 JJ |
633 | |
634 | ||
63cf211a NN |
635 | # Do some error checking and defaulting for the host and target type. |
636 | # The inputs are: | |
637 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
638 | # | |
639 | # The rules are: | |
640 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
641 | # same time. | |
642 | # 2. Host defaults to nonopt. | |
643 | # 3. If nonopt is not specified, then host defaults to the current host, | |
644 | # as determined by config.guess. | |
645 | # 4. Target and build default to nonopt. | |
646 | # 5. If nonopt is not specified, then target and build default to host. | |
13c22933 | 647 | |
63cf211a NN |
648 | # The aliases save the names the user supplied, while $host etc. |
649 | # will get canonicalized. | |
650 | case $host---$target---$nonopt in | |
651 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
652 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
653 | esac | |
13c22933 JJ |
654 | |
655 | ||
63cf211a NN |
656 | # Make sure we can run config.sub. |
657 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
658 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
13c22933 JJ |
659 | fi |
660 | ||
63cf211a | 661 | echo $ac_n "checking host system type""... $ac_c" 1>&6 |
439a7e54 | 662 | echo "configure:663: checking host system type" >&5 |
13c22933 | 663 | |
63cf211a NN |
664 | host_alias=$host |
665 | case "$host_alias" in | |
666 | NONE) | |
667 | case $nonopt in | |
668 | NONE) | |
669 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
670 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
671 | fi ;; | |
672 | *) host_alias=$nonopt ;; | |
673 | esac ;; | |
674 | esac | |
13c22933 | 675 | |
63cf211a NN |
676 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` |
677 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
678 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
679 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
680 | echo "$ac_t""$host" 1>&6 | |
681 | ||
682 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
439a7e54 | 683 | echo "configure:684: checking target system type" >&5 |
63cf211a NN |
684 | |
685 | target_alias=$target | |
686 | case "$target_alias" in | |
687 | NONE) | |
688 | case $nonopt in | |
689 | NONE) target_alias=$host_alias ;; | |
690 | *) target_alias=$nonopt ;; | |
691 | esac ;; | |
692 | esac | |
093e61a6 | 693 | |
63cf211a NN |
694 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` |
695 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
696 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
697 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
698 | echo "$ac_t""$target" 1>&6 | |
699 | ||
700 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
439a7e54 | 701 | echo "configure:702: checking build system type" >&5 |
63cf211a NN |
702 | |
703 | build_alias=$build | |
704 | case "$build_alias" in | |
705 | NONE) | |
706 | case $nonopt in | |
707 | NONE) build_alias=$host_alias ;; | |
708 | *) build_alias=$nonopt ;; | |
709 | esac ;; | |
710 | esac | |
13c22933 | 711 | |
63cf211a NN |
712 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` |
713 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
714 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
715 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
716 | echo "$ac_t""$build" 1>&6 | |
13c22933 | 717 | |
63cf211a NN |
718 | test "$host_alias" != "$target_alias" && |
719 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
720 | NONENONEs,x,x, && | |
721 | program_prefix=${target_alias}- | |
73458fb7 | 722 | |
6e3f3080 NN |
723 | |
724 | # Determine the noncanonical target name, for directory use. | |
725 | case ${build_alias} in | |
726 | "") build_noncanonical=${build} ;; | |
727 | *) build_noncanonical=${build_alias} ;; | |
728 | esac | |
73458fb7 | 729 | |
4665e56c NN |
730 | case ${host_alias} in |
731 | "") host_noncanonical=${build_noncanonical} ;; | |
732 | *) host_noncanonical=${host_alias} ;; | |
733 | esac | |
73458fb7 | 734 | |
4665e56c NN |
735 | case ${target_alias} in |
736 | "") target_noncanonical=${host_noncanonical} ;; | |
737 | *) target_noncanonical=${target_alias} ;; | |
738 | esac | |
093e61a6 | 739 | |
caa55b1e NN |
740 | |
741 | # Determine the target- and build-specific subdirectories | |
4665e56c NN |
742 | # Prefix 'build-' so this never conflicts with target_subdir. |
743 | build_subdir="build-${build_noncanonical}" | |
744 | # Not really a subdirectory, but here for completeness. | |
745 | host_subdir=. | |
746 | # No prefix. | |
747 | target_subdir=${target_noncanonical} | |
63cf211a | 748 | |
73458fb7 | 749 | |
093e61a6 | 750 | # Set program_transform_name |
63cf211a NN |
751 | if test "$program_transform_name" = s,x,x,; then |
752 | program_transform_name= | |
753 | else | |
754 | # Double any \ or $. echo might interpret backslashes. | |
755 | cat <<\EOF_SED > conftestsed | |
756 | s,\\,\\\\,g; s,\$,$$,g | |
757 | EOF_SED | |
758 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
759 | rm -f conftestsed | |
760 | fi | |
13c22933 | 761 | test "$program_prefix" != NONE && |
63cf211a | 762 | program_transform_name="s,^,${program_prefix},; $program_transform_name" |
13c22933 JJ |
763 | # Use a double $ so make ignores it. |
764 | test "$program_suffix" != NONE && | |
63cf211a NN |
765 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" |
766 | ||
767 | # sed with no file args requires a program. | |
768 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
13c22933 JJ |
769 | |
770 | ||
34a86c2b NN |
771 | # Check for bogus environment variables. |
772 | # Test if LIBRARY_PATH contains the notation for the current directory | |
773 | # since this would lead to problems installing/building glibc. | |
774 | # LIBRARY_PATH contains the current directory if one of the following | |
775 | # is true: | |
776 | # - one of the terminals (":" and ";") is the first or last sign | |
777 | # - two terminals occur directly after each other | |
778 | # - the path contains an element with a dot in it | |
63cf211a | 779 | echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6 |
439a7e54 | 780 | echo "configure:781: checking LIBRARY_PATH variable" >&5 |
34a86c2b NN |
781 | case ${LIBRARY_PATH} in |
782 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
783 | library_path_setting="contains current directory" | |
784 | ;; | |
785 | *) | |
786 | library_path_setting="ok" | |
787 | ;; | |
788 | esac | |
63cf211a | 789 | echo "$ac_t""$library_path_setting" 1>&6 |
34a86c2b | 790 | if test "$library_path_setting" != "ok"; then |
63cf211a | 791 | { echo "configure: error: |
34a86c2b NN |
792 | *** LIBRARY_PATH shouldn't contain the current directory when |
793 | *** building gcc. Please change the environment variable | |
63cf211a | 794 | *** and run configure again." 1>&2; exit 1; } |
e9a25f70 JL |
795 | fi |
796 | ||
34a86c2b NN |
797 | # Test if GCC_EXEC_PREFIX contains the notation for the current directory |
798 | # since this would lead to problems installing/building glibc. | |
799 | # GCC_EXEC_PREFIX contains the current directory if one of the following | |
800 | # is true: | |
801 | # - one of the terminals (":" and ";") is the first or last sign | |
802 | # - two terminals occur directly after each other | |
803 | # - the path contains an element with a dot in it | |
63cf211a | 804 | echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6 |
439a7e54 | 805 | echo "configure:806: checking GCC_EXEC_PREFIX variable" >&5 |
34a86c2b NN |
806 | case ${GCC_EXEC_PREFIX} in |
807 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
808 | gcc_exec_prefix_setting="contains current directory" | |
809 | ;; | |
810 | *) | |
811 | gcc_exec_prefix_setting="ok" | |
812 | ;; | |
813 | esac | |
63cf211a | 814 | echo "$ac_t""$gcc_exec_prefix_setting" 1>&6 |
34a86c2b | 815 | if test "$gcc_exec_prefix_setting" != "ok"; then |
63cf211a | 816 | { echo "configure: error: |
cafe096b EC |
817 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when |
818 | *** building gcc. Please change the environment variable | |
63cf211a | 819 | *** and run configure again." 1>&2; exit 1; } |
34a86c2b NN |
820 | fi |
821 | ||
822 | # ----------- | |
823 | # Directories | |
824 | # ----------- | |
825 | ||
826 | # Specify the local prefix | |
827 | local_prefix= | |
828 | # Check whether --with-local-prefix or --without-local-prefix was given. | |
829 | if test "${with_local_prefix+set}" = set; then | |
830 | withval="$with_local_prefix" | |
831 | case "${withval}" in | |
63cf211a | 832 | yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;; |
34a86c2b NN |
833 | no) ;; |
834 | *) local_prefix=$with_local_prefix ;; | |
835 | esac | |
63cf211a NN |
836 | fi |
837 | ||
34a86c2b NN |
838 | |
839 | # Default local prefix if it is empty | |
840 | if test x$local_prefix = x; then | |
841 | local_prefix=/usr/local | |
842 | fi | |
843 | ||
844 | # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only | |
845 | # passed in by the toplevel make and thus we'd get different behavior | |
846 | # depending on where we built the sources. | |
847 | gcc_gxx_include_dir= | |
848 | # Specify the g++ header file directory | |
849 | # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. | |
850 | if test "${with_gxx_include_dir+set}" = set; then | |
851 | withval="$with_gxx_include_dir" | |
852 | case "${withval}" in | |
63cf211a | 853 | yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;; |
34a86c2b NN |
854 | no) ;; |
855 | *) gcc_gxx_include_dir=$with_gxx_include_dir ;; | |
856 | esac | |
63cf211a NN |
857 | fi |
858 | ||
34a86c2b NN |
859 | |
860 | if test x${gcc_gxx_include_dir} = x; then | |
861 | if test x${enable_version_specific_runtime_libs} = xyes; then | |
862 | gcc_gxx_include_dir='${libsubdir}/include/c++' | |
863 | else | |
864 | topsrcdir=${srcdir}/.. . ${srcdir}/../config.if | |
865 | gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir} | |
866 | fi | |
867 | fi | |
868 | ||
869 | # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. | |
870 | if test "${with_cpp_install_dir+set}" = set; then | |
871 | withval="$with_cpp_install_dir" | |
872 | if test x$withval = xyes; then | |
63cf211a | 873 | { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; } |
34a86c2b NN |
874 | elif test x$withval != xno; then |
875 | cpp_install_dir=$withval | |
876 | fi | |
63cf211a NN |
877 | fi |
878 | ||
34a86c2b | 879 | |
51b9ff45 | 880 | # We would like to our source tree to be readonly. However when releases or |
63cf211a | 881 | # pre-releases are generated, the flex/bison generated files as well as the |
51b9ff45 | 882 | # various formats of manuals need to be included along with the rest of the |
63cf211a | 883 | # sources. Therefore we have --enable-generated-files-in-srcdir to do |
51b9ff45 KC |
884 | # just that. |
885 | ||
886 | # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given. | |
887 | if test "${enable_generated_files_in_srcdir+set}" = set; then | |
888 | enableval="$enable_generated_files_in_srcdir" | |
889 | case ${enableval} in | |
890 | no) parsedir='$(objdir)'; docobjdir='$(objdir)/doc';; | |
941ba69d | 891 | *) parsedir='$(srcdir)'; docobjdir='$(srcdir)/doc';; |
51b9ff45 KC |
892 | esac |
893 | else | |
894 | parsedir='$(objdir)'; docobjdir='$(objdir)/doc'; | |
63cf211a NN |
895 | fi |
896 | ||
51b9ff45 | 897 | |
34a86c2b NN |
898 | # ------------------- |
899 | # Find default linker | |
900 | # ------------------- | |
901 | ||
902 | # With GNU ld | |
903 | # Check whether --with-gnu-ld or --without-gnu-ld was given. | |
904 | if test "${with_gnu_ld+set}" = set; then | |
905 | withval="$with_gnu_ld" | |
906 | gnu_ld_flag="$with_gnu_ld" | |
907 | else | |
908 | gnu_ld_flag=no | |
63cf211a | 909 | fi |
cafe096b | 910 | |
6e3f3080 | 911 | |
63cf211a | 912 | # With pre-defined ld |
34a86c2b NN |
913 | # Check whether --with-ld or --without-ld was given. |
914 | if test "${with_ld+set}" = set; then | |
915 | withval="$with_ld" | |
916 | DEFAULT_LINKER="$with_ld" | |
63cf211a NN |
917 | fi |
918 | ||
34a86c2b NN |
919 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
920 | if test ! -x "$DEFAULT_LINKER"; then | |
63cf211a | 921 | echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2 |
34a86c2b NN |
922 | elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
923 | gnu_ld_flag=yes | |
924 | fi | |
63cf211a | 925 | cat >> confdefs.h <<EOF |
34a86c2b | 926 | #define DEFAULT_LINKER "$DEFAULT_LINKER" |
63cf211a | 927 | EOF |
34a86c2b NN |
928 | |
929 | fi | |
930 | ||
63cf211a | 931 | echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6 |
439a7e54 | 932 | echo "configure:933: checking whether a default linker was specified" >&5 |
34a86c2b NN |
933 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
934 | if test x"$gnu_ld_flag" = x"no"; then | |
63cf211a | 935 | echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6 |
34a86c2b | 936 | else |
63cf211a | 937 | echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6 |
34a86c2b NN |
938 | fi |
939 | else | |
63cf211a | 940 | echo "$ac_t""no" 1>&6 |
34a86c2b NN |
941 | fi |
942 | ||
943 | # ---------------------- | |
944 | # Find default assembler | |
945 | # ---------------------- | |
946 | ||
947 | # With GNU as | |
948 | # Check whether --with-gnu-as or --without-gnu-as was given. | |
949 | if test "${with_gnu_as+set}" = set; then | |
950 | withval="$with_gnu_as" | |
951 | gas_flag="$with_gnu_as" | |
952 | else | |
953 | gas_flag=no | |
63cf211a | 954 | fi |
34a86c2b NN |
955 | |
956 | ||
957 | # Check whether --with-as or --without-as was given. | |
958 | if test "${with_as+set}" = set; then | |
959 | withval="$with_as" | |
960 | DEFAULT_ASSEMBLER="$with_as" | |
63cf211a NN |
961 | fi |
962 | ||
34a86c2b NN |
963 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
964 | if test ! -x "$DEFAULT_ASSEMBLER"; then | |
63cf211a | 965 | echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2 |
34a86c2b NN |
966 | elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
967 | gas_flag=yes | |
968 | fi | |
63cf211a | 969 | cat >> confdefs.h <<EOF |
34a86c2b | 970 | #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER" |
63cf211a | 971 | EOF |
34a86c2b NN |
972 | |
973 | fi | |
974 | ||
63cf211a | 975 | echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6 |
439a7e54 | 976 | echo "configure:977: checking whether a default assembler was specified" >&5 |
34a86c2b NN |
977 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
978 | if test x"$gas_flag" = x"no"; then | |
63cf211a | 979 | echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6 |
34a86c2b | 980 | else |
63cf211a | 981 | echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6 |
34a86c2b NN |
982 | fi |
983 | else | |
63cf211a | 984 | echo "$ac_t""no" 1>&6 |
34a86c2b NN |
985 | fi |
986 | ||
987 | # --------------- | |
988 | # Find C compiler | |
989 | # --------------- | |
990 | ||
991 | # Find the native compiler | |
63cf211a | 992 | # Extract the first word of "gcc", so it can be a program name with args. |
6e3f3080 | 993 | set dummy gcc; ac_word=$2 |
63cf211a | 994 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
439a7e54 | 995 | echo "configure:996: checking for $ac_word" >&5 |
63cf211a NN |
996 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
997 | echo $ac_n "(cached) $ac_c" 1>&6 | |
cd9e5e7c MK |
998 | else |
999 | if test -n "$CC"; then | |
1000 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1001 | else | |
63cf211a NN |
1002 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1003 | ac_dummy="$PATH" | |
1004 | for ac_dir in $ac_dummy; do | |
1005 | test -z "$ac_dir" && ac_dir=. | |
1006 | if test -f $ac_dir/$ac_word; then | |
1007 | ac_cv_prog_CC="gcc" | |
1008 | break | |
1009 | fi | |
1010 | done | |
1011 | IFS="$ac_save_ifs" | |
cd9e5e7c MK |
1012 | fi |
1013 | fi | |
63cf211a | 1014 | CC="$ac_cv_prog_CC" |
cd9e5e7c | 1015 | if test -n "$CC"; then |
63cf211a | 1016 | echo "$ac_t""$CC" 1>&6 |
cd9e5e7c | 1017 | else |
63cf211a | 1018 | echo "$ac_t""no" 1>&6 |
e9a25f70 | 1019 | fi |
6e3f3080 | 1020 | |
6e3f3080 NN |
1021 | if test -z "$CC"; then |
1022 | # Extract the first word of "cc", so it can be a program name with args. | |
1023 | set dummy cc; ac_word=$2 | |
63cf211a | 1024 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
439a7e54 | 1025 | echo "configure:1026: checking for $ac_word" >&5 |
63cf211a NN |
1026 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1027 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6e3f3080 NN |
1028 | else |
1029 | if test -n "$CC"; then | |
1030 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1031 | else | |
63cf211a | 1032 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
6e3f3080 | 1033 | ac_prog_rejected=no |
63cf211a NN |
1034 | ac_dummy="$PATH" |
1035 | for ac_dir in $ac_dummy; do | |
1036 | test -z "$ac_dir" && ac_dir=. | |
1037 | if test -f $ac_dir/$ac_word; then | |
1038 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
1039 | ac_prog_rejected=yes | |
1040 | continue | |
1041 | fi | |
1042 | ac_cv_prog_CC="cc" | |
1043 | break | |
1044 | fi | |
1045 | done | |
1046 | IFS="$ac_save_ifs" | |
6e3f3080 NN |
1047 | if test $ac_prog_rejected = yes; then |
1048 | # We found a bogon in the path, so make sure we never use it. | |
1049 | set dummy $ac_cv_prog_CC | |
1050 | shift | |
63cf211a | 1051 | if test $# -gt 0; then |
6e3f3080 NN |
1052 | # We chose a different compiler from the bogus one. |
1053 | # However, it has the same basename, so the bogon will be chosen | |
1054 | # first if we set CC to just the basename; use the full file name. | |
1055 | shift | |
63cf211a NN |
1056 | set dummy "$ac_dir/$ac_word" "$@" |
1057 | shift | |
1058 | ac_cv_prog_CC="$@" | |
e9a25f70 | 1059 | fi |
6e3f3080 NN |
1060 | fi |
1061 | fi | |
1062 | fi | |
63cf211a | 1063 | CC="$ac_cv_prog_CC" |
6e3f3080 | 1064 | if test -n "$CC"; then |
63cf211a | 1065 | echo "$ac_t""$CC" 1>&6 |
e9a25f70 | 1066 | else |
63cf211a | 1067 | echo "$ac_t""no" 1>&6 |
e9a25f70 | 1068 | fi |
6e3f3080 | 1069 | |
63cf211a NN |
1070 | if test -z "$CC"; then |
1071 | case "`uname -s`" in | |
1072 | *win32* | *WIN32*) | |
1073 | # Extract the first word of "cl", so it can be a program name with args. | |
1074 | set dummy cl; ac_word=$2 | |
1075 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
439a7e54 | 1076 | echo "configure:1077: checking for $ac_word" >&5 |
63cf211a NN |
1077 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1078 | echo $ac_n "(cached) $ac_c" 1>&6 | |
093e61a6 | 1079 | else |
6e3f3080 NN |
1080 | if test -n "$CC"; then |
1081 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1082 | else | |
63cf211a NN |
1083 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1084 | ac_dummy="$PATH" | |
1085 | for ac_dir in $ac_dummy; do | |
1086 | test -z "$ac_dir" && ac_dir=. | |
1087 | if test -f $ac_dir/$ac_word; then | |
1088 | ac_cv_prog_CC="cl" | |
1089 | break | |
1090 | fi | |
1091 | done | |
1092 | IFS="$ac_save_ifs" | |
093e61a6 | 1093 | fi |
6e3f3080 | 1094 | fi |
63cf211a | 1095 | CC="$ac_cv_prog_CC" |
6e3f3080 | 1096 | if test -n "$CC"; then |
63cf211a | 1097 | echo "$ac_t""$CC" 1>&6 |
6e3f3080 | 1098 | else |
63cf211a | 1099 | echo "$ac_t""no" 1>&6 |
093e61a6 | 1100 | fi |
63cf211a NN |
1101 | ;; |
1102 | esac | |
6e3f3080 | 1103 | fi |
63cf211a | 1104 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
093e61a6 | 1105 | fi |
cafe096b | 1106 | |
63cf211a | 1107 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
439a7e54 | 1108 | echo "configure:1109: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
6e3f3080 | 1109 | |
63cf211a NN |
1110 | ac_ext=c |
1111 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1112 | ac_cpp='$CPP $CPPFLAGS' | |
1113 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1114 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1115 | cross_compiling=$ac_cv_prog_cc_cross | |
6e3f3080 | 1116 | |
63cf211a NN |
1117 | cat > conftest.$ac_ext << EOF |
1118 | ||
439a7e54 | 1119 | #line 1120 "configure" |
63cf211a NN |
1120 | #include "confdefs.h" |
1121 | ||
1122 | main(){return(0);} | |
1123 | EOF | |
439a7e54 | 1124 | if { (eval echo configure:1125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
63cf211a NN |
1125 | ac_cv_prog_cc_works=yes |
1126 | # If we can't run a trivial program, we are probably using a cross compiler. | |
1127 | if (./conftest; exit) 2>/dev/null; then | |
1128 | ac_cv_prog_cc_cross=no | |
6e3f3080 | 1129 | else |
63cf211a | 1130 | ac_cv_prog_cc_cross=yes |
6e3f3080 | 1131 | fi |
63cf211a NN |
1132 | else |
1133 | echo "configure: failed program was:" >&5 | |
1134 | cat conftest.$ac_ext >&5 | |
1135 | ac_cv_prog_cc_works=no | |
6e3f3080 | 1136 | fi |
63cf211a NN |
1137 | rm -fr conftest* |
1138 | ac_ext=c | |
1139 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1140 | ac_cpp='$CPP $CPPFLAGS' | |
1141 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1142 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1143 | cross_compiling=$ac_cv_prog_cc_cross | |
1144 | ||
1145 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
1146 | if test $ac_cv_prog_cc_works = no; then | |
1147 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
1148 | fi | |
1149 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
439a7e54 | 1150 | echo "configure:1151: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
63cf211a NN |
1151 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
1152 | cross_compiling=$ac_cv_prog_cc_cross | |
1153 | ||
1154 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
439a7e54 | 1155 | echo "configure:1156: checking whether we are using GNU C" >&5 |
63cf211a NN |
1156 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
1157 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1158 | else | |
1159 | cat > conftest.c <<EOF | |
1160 | #ifdef __GNUC__ | |
1161 | yes; | |
1162 | #endif | |
1163 | EOF | |
439a7e54 | 1164 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
63cf211a | 1165 | ac_cv_prog_gcc=yes |
e9a25f70 | 1166 | else |
63cf211a NN |
1167 | ac_cv_prog_gcc=no |
1168 | fi | |
1169 | fi | |
6e3f3080 | 1170 | |
63cf211a | 1171 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
6e3f3080 | 1172 | |
63cf211a NN |
1173 | if test $ac_cv_prog_gcc = yes; then |
1174 | GCC=yes | |
1175 | else | |
1176 | GCC= | |
1177 | fi | |
6e3f3080 | 1178 | |
63cf211a NN |
1179 | ac_test_CFLAGS="${CFLAGS+set}" |
1180 | ac_save_CFLAGS="$CFLAGS" | |
1181 | CFLAGS= | |
1182 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
439a7e54 | 1183 | echo "configure:1184: checking whether ${CC-cc} accepts -g" >&5 |
63cf211a NN |
1184 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
1185 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1186 | else | |
1187 | echo 'void f(){}' > conftest.c | |
1188 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
6e3f3080 NN |
1189 | ac_cv_prog_cc_g=yes |
1190 | else | |
63cf211a | 1191 | ac_cv_prog_cc_g=no |
6e3f3080 | 1192 | fi |
63cf211a NN |
1193 | rm -f conftest* |
1194 | ||
6e3f3080 | 1195 | fi |
63cf211a NN |
1196 | |
1197 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
cd9e5e7c | 1198 | if test "$ac_test_CFLAGS" = set; then |
63cf211a | 1199 | CFLAGS="$ac_save_CFLAGS" |
cd9e5e7c MK |
1200 | elif test $ac_cv_prog_cc_g = yes; then |
1201 | if test "$GCC" = yes; then | |
e9a25f70 JL |
1202 | CFLAGS="-g -O2" |
1203 | else | |
cd9e5e7c | 1204 | CFLAGS="-g" |
81814e35 | 1205 | fi |
3723cad9 | 1206 | else |
cd9e5e7c MK |
1207 | if test "$GCC" = yes; then |
1208 | CFLAGS="-O2" | |
1209 | else | |
1210 | CFLAGS= | |
1211 | fi | |
e9a25f70 | 1212 | fi |
6e3f3080 | 1213 | |
63cf211a NN |
1214 | if test "x$CC" != xcc; then |
1215 | echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 | |
439a7e54 | 1216 | echo "configure:1217: checking whether $CC and cc understand -c and -o together" >&5 |
3ec83fc2 | 1217 | else |
63cf211a | 1218 | echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 |
439a7e54 | 1219 | echo "configure:1220: checking whether cc understands -c and -o together" >&5 |
6e3f3080 | 1220 | fi |
63cf211a NN |
1221 | set dummy $CC; ac_cc="`echo $2 | |
1222 | sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" | |
1223 | if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then | |
1224 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3ec83fc2 | 1225 | else |
63cf211a | 1226 | echo 'foo(){}' > conftest.c |
3ec83fc2 RH |
1227 | # Make sure it works both with $CC and with simple cc. |
1228 | # We do the test twice because some compilers refuse to overwrite an | |
1229 | # existing .o file with -o, though they will create one. | |
63cf211a | 1230 | ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' |
439a7e54 DN |
1231 | if { (eval echo configure:1232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && |
1232 | test -f conftest.o && { (eval echo configure:1233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; | |
3ec83fc2 RH |
1233 | then |
1234 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
1235 | if test "x$CC" != xcc; then | |
1236 | # Test first that cc exists at all. | |
439a7e54 | 1237 | if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then |
63cf211a | 1238 | ac_try='cc -c conftest.c -o conftest.o 1>&5' |
439a7e54 DN |
1239 | if { (eval echo configure:1240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && |
1240 | test -f conftest.o && { (eval echo configure:1241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; | |
3ec83fc2 | 1241 | then |
e1366e0c NN |
1242 | # cc works too. |
1243 | : | |
3ec83fc2 | 1244 | else |
e1366e0c NN |
1245 | # cc exists but doesn't like -o. |
1246 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
3ec83fc2 RH |
1247 | fi |
1248 | fi | |
1249 | fi | |
1250 | else | |
1251 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
1252 | fi | |
1253 | rm -f conftest* | |
1254 | ||
1255 | fi | |
1256 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then | |
63cf211a | 1257 | echo "$ac_t""yes" 1>&6 |
3ec83fc2 | 1258 | else |
63cf211a NN |
1259 | echo "$ac_t""no" 1>&6 |
1260 | cat >> confdefs.h <<\EOF | |
3ec83fc2 | 1261 | #define NO_MINUS_C_MINUS_O 1 |
63cf211a | 1262 | EOF |
3ec83fc2 RH |
1263 | |
1264 | fi | |
1265 | ||
414d23ae HPN |
1266 | # autoconf is lame and doesn't give us any substitution variable for this. |
1267 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
1268 | NO_MINUS_C_MINUS_O=yes | |
1269 | else | |
1270 | OUTPUT_OPTION='-o $@' | |
1271 | fi | |
1272 | ||
1273 | ||
1274 | ||
73458fb7 NN |
1275 | # ------------------------- |
1276 | # Check C compiler features | |
1277 | # ------------------------- | |
1278 | ||
63cf211a | 1279 | echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6 |
439a7e54 | 1280 | echo "configure:1281: checking whether ${CC-cc} accepts -Wno-long-long" >&5 |
63cf211a NN |
1281 | if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then |
1282 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa ZW |
1283 | else |
1284 | save_CFLAGS="$CFLAGS" | |
1285 | CFLAGS="-Wno-long-long" | |
63cf211a | 1286 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 1287 | #line 1288 "configure" |
63cf211a | 1288 | #include "confdefs.h" |
75e93faa | 1289 | |
63cf211a NN |
1290 | int main() { |
1291 | ||
1292 | ; return 0; } | |
1293 | EOF | |
439a7e54 | 1294 | if { (eval echo configure:1295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 1295 | rm -rf conftest* |
34a86c2b | 1296 | ac_cv_prog_cc_no_long_long=yes |
200ef634 | 1297 | else |
63cf211a NN |
1298 | echo "configure: failed program was:" >&5 |
1299 | cat conftest.$ac_ext >&5 | |
1300 | rm -rf conftest* | |
1301 | ac_cv_prog_cc_no_long_long=no | |
200ef634 | 1302 | fi |
63cf211a | 1303 | rm -f conftest* |
34a86c2b | 1304 | CFLAGS="$save_CFLAGS" |
75e93faa ZW |
1305 | fi |
1306 | ||
63cf211a NN |
1307 | echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6 |
1308 | ||
1309 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
439a7e54 | 1310 | echo "configure:1311: checking how to run the C preprocessor" >&5 |
84c041a1 ZW |
1311 | # On Suns, sometimes $CPP names a directory. |
1312 | if test -n "$CPP" && test -d "$CPP"; then | |
1313 | CPP= | |
1314 | fi | |
1315 | if test -z "$CPP"; then | |
63cf211a NN |
1316 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then |
1317 | echo $ac_n "(cached) $ac_c" 1>&6 | |
84c041a1 | 1318 | else |
63cf211a NN |
1319 | # This must be in double quotes, not single quotes, because CPP may get |
1320 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
1321 | CPP="${CC-cc} -E" | |
84c041a1 | 1322 | # On the NeXT, cc -E runs the code through the compiler's parser, |
63cf211a NN |
1323 | # not just through cpp. |
1324 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 1325 | #line 1326 "configure" |
63cf211a NN |
1326 | #include "confdefs.h" |
1327 | #include <assert.h> | |
1328 | Syntax Error | |
1329 | EOF | |
1330 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
439a7e54 | 1331 | { (eval echo configure:1332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
63cf211a NN |
1332 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1333 | if test -z "$ac_err"; then | |
093e61a6 | 1334 | : |
cafe096b | 1335 | else |
63cf211a NN |
1336 | echo "$ac_err" >&5 |
1337 | echo "configure: failed program was:" >&5 | |
1338 | cat conftest.$ac_ext >&5 | |
1339 | rm -rf conftest* | |
1340 | CPP="${CC-cc} -E -traditional-cpp" | |
1341 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 1342 | #line 1343 "configure" |
63cf211a NN |
1343 | #include "confdefs.h" |
1344 | #include <assert.h> | |
1345 | Syntax Error | |
1346 | EOF | |
1347 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
439a7e54 | 1348 | { (eval echo configure:1349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
63cf211a NN |
1349 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1350 | if test -z "$ac_err"; then | |
6e3f3080 | 1351 | : |
414d23ae | 1352 | else |
63cf211a NN |
1353 | echo "$ac_err" >&5 |
1354 | echo "configure: failed program was:" >&5 | |
1355 | cat conftest.$ac_ext >&5 | |
1356 | rm -rf conftest* | |
1357 | CPP="${CC-cc} -nologo -E" | |
1358 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 1359 | #line 1360 "configure" |
63cf211a NN |
1360 | #include "confdefs.h" |
1361 | #include <assert.h> | |
1362 | Syntax Error | |
1363 | EOF | |
1364 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
439a7e54 | 1365 | { (eval echo configure:1366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
63cf211a NN |
1366 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1367 | if test -z "$ac_err"; then | |
1368 | : | |
6e3f3080 | 1369 | else |
63cf211a NN |
1370 | echo "$ac_err" >&5 |
1371 | echo "configure: failed program was:" >&5 | |
1372 | cat conftest.$ac_ext >&5 | |
1373 | rm -rf conftest* | |
1374 | CPP=/lib/cpp | |
414d23ae | 1375 | fi |
63cf211a | 1376 | rm -f conftest* |
6e3f3080 | 1377 | fi |
63cf211a NN |
1378 | rm -f conftest* |
1379 | fi | |
1380 | rm -f conftest* | |
1381 | ac_cv_prog_CPP="$CPP" | |
1382 | fi | |
1383 | CPP="$ac_cv_prog_CPP" | |
6e3f3080 | 1384 | else |
63cf211a | 1385 | ac_cv_prog_CPP="$CPP" |
6e3f3080 | 1386 | fi |
63cf211a | 1387 | echo "$ac_t""$CPP" 1>&6 |
6e3f3080 | 1388 | |
63cf211a | 1389 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
439a7e54 | 1390 | echo "configure:1391: checking for inline" >&5 |
63cf211a NN |
1391 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1392 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae HPN |
1393 | else |
1394 | ac_cv_c_inline=no | |
1395 | for ac_kw in inline __inline__ __inline; do | |
63cf211a | 1396 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 1397 | #line 1398 "configure" |
63cf211a | 1398 | #include "confdefs.h" |
414d23ae | 1399 | |
63cf211a NN |
1400 | int main() { |
1401 | } $ac_kw foo() { | |
1402 | ; return 0; } | |
1403 | EOF | |
439a7e54 | 1404 | if { (eval echo configure:1405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 1405 | rm -rf conftest* |
414d23ae HPN |
1406 | ac_cv_c_inline=$ac_kw; break |
1407 | else | |
63cf211a NN |
1408 | echo "configure: failed program was:" >&5 |
1409 | cat conftest.$ac_ext >&5 | |
414d23ae | 1410 | fi |
63cf211a | 1411 | rm -f conftest* |
414d23ae HPN |
1412 | done |
1413 | ||
1414 | fi | |
63cf211a NN |
1415 | |
1416 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1417 | case "$ac_cv_c_inline" in | |
414d23ae | 1418 | inline | yes) ;; |
63cf211a NN |
1419 | no) cat >> confdefs.h <<\EOF |
1420 | #define inline | |
1421 | EOF | |
e1366e0c | 1422 | ;; |
63cf211a | 1423 | *) cat >> confdefs.h <<EOF |
e1366e0c | 1424 | #define inline $ac_cv_c_inline |
63cf211a | 1425 | EOF |
e1366e0c | 1426 | ;; |
414d23ae HPN |
1427 | esac |
1428 | ||
414d23ae | 1429 | |
63cf211a | 1430 | echo $ac_n "checking for long long int""... $ac_c" 1>&6 |
439a7e54 | 1431 | echo "configure:1432: checking for long long int" >&5 |
63cf211a NN |
1432 | if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then |
1433 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae | 1434 | else |
63cf211a | 1435 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 1436 | #line 1437 "configure" |
63cf211a | 1437 | #include "confdefs.h" |
414d23ae | 1438 | |
63cf211a | 1439 | int main() { |
414d23ae | 1440 | long long int i; |
63cf211a NN |
1441 | ; return 0; } |
1442 | EOF | |
439a7e54 | 1443 | if { (eval echo configure:1444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 1444 | rm -rf conftest* |
414d23ae HPN |
1445 | ac_cv_c_long_long=yes |
1446 | else | |
63cf211a NN |
1447 | echo "configure: failed program was:" >&5 |
1448 | cat conftest.$ac_ext >&5 | |
1449 | rm -rf conftest* | |
1450 | ac_cv_c_long_long=no | |
414d23ae | 1451 | fi |
63cf211a | 1452 | rm -f conftest* |
414d23ae | 1453 | fi |
6e3f3080 | 1454 | |
63cf211a NN |
1455 | echo "$ac_t""$ac_cv_c_long_long" 1>&6 |
1456 | if test $ac_cv_c_long_long = yes; then | |
1457 | cat >> confdefs.h <<\EOF | |
414d23ae | 1458 | #define HAVE_LONG_LONG 1 |
63cf211a | 1459 | EOF |
414d23ae HPN |
1460 | |
1461 | fi | |
63cf211a | 1462 | echo $ac_n "checking for __int64""... $ac_c" 1>&6 |
439a7e54 | 1463 | echo "configure:1464: checking for __int64" >&5 |
63cf211a NN |
1464 | if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then |
1465 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1466 | else | |
1467 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 1468 | #line 1469 "configure" |
63cf211a NN |
1469 | #include "confdefs.h" |
1470 | ||
1471 | int main() { | |
414d23ae | 1472 | __int64 i; |
63cf211a NN |
1473 | ; return 0; } |
1474 | EOF | |
439a7e54 | 1475 | if { (eval echo configure:1476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 1476 | rm -rf conftest* |
414d23ae HPN |
1477 | ac_cv_c___int64=yes |
1478 | else | |
63cf211a NN |
1479 | echo "configure: failed program was:" >&5 |
1480 | cat conftest.$ac_ext >&5 | |
1481 | rm -rf conftest* | |
1482 | ac_cv_c___int64=no | |
414d23ae | 1483 | fi |
63cf211a | 1484 | rm -f conftest* |
414d23ae | 1485 | fi |
6e3f3080 | 1486 | |
63cf211a NN |
1487 | echo "$ac_t""$ac_cv_c___int64" 1>&6 |
1488 | if test $ac_cv_c___int64 = yes; then | |
1489 | cat >> confdefs.h <<\EOF | |
414d23ae | 1490 | #define HAVE___INT64 1 |
63cf211a | 1491 | EOF |
414d23ae HPN |
1492 | |
1493 | fi | |
1494 | ||
63cf211a | 1495 | echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6 |
439a7e54 | 1496 | echo "configure:1497: checking for built-in _Bool" >&5 |
63cf211a NN |
1497 | if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then |
1498 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1499 | else | |
1500 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 1501 | #line 1502 "configure" |
63cf211a NN |
1502 | #include "confdefs.h" |
1503 | ||
1504 | int main() { | |
414d23ae | 1505 | _Bool foo; |
63cf211a NN |
1506 | ; return 0; } |
1507 | EOF | |
439a7e54 | 1508 | if { (eval echo configure:1509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 1509 | rm -rf conftest* |
414d23ae HPN |
1510 | gcc_cv_c__bool=yes |
1511 | else | |
63cf211a NN |
1512 | echo "configure: failed program was:" >&5 |
1513 | cat conftest.$ac_ext >&5 | |
1514 | rm -rf conftest* | |
1515 | gcc_cv_c__bool=no | |
cafe096b | 1516 | fi |
63cf211a | 1517 | rm -f conftest* |
cafe096b | 1518 | |
6e3f3080 | 1519 | fi |
6e3f3080 | 1520 | |
63cf211a NN |
1521 | echo "$ac_t""$gcc_cv_c__bool" 1>&6 |
1522 | if test $gcc_cv_c__bool = yes; then | |
1523 | cat >> confdefs.h <<\EOF | |
414d23ae | 1524 | #define HAVE__BOOL 1 |
63cf211a | 1525 | EOF |
414d23ae HPN |
1526 | |
1527 | fi | |
1528 | ||
1529 | ||
1530 | # sizeof(char) is 1 by definition. | |
63cf211a | 1531 | echo $ac_n "checking size of void *""... $ac_c" 1>&6 |
439a7e54 | 1532 | echo "configure:1533: checking size of void *" >&5 |
63cf211a NN |
1533 | if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then |
1534 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75b6f3fd KG |
1535 | else |
1536 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. | |
63cf211a | 1537 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 1538 | #line 1539 "configure" |
63cf211a | 1539 | #include "confdefs.h" |
75b6f3fd KG |
1540 | #include "confdefs.h" |
1541 | #include <sys/types.h> | |
1542 | ||
1543 | ||
63cf211a | 1544 | int main() { |
75b6f3fd | 1545 | switch (0) case 0: case (sizeof (void *) == $ac_size):; |
63cf211a NN |
1546 | ; return 0; } |
1547 | EOF | |
439a7e54 | 1548 | if { (eval echo configure:1549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 1549 | rm -rf conftest* |
75b6f3fd KG |
1550 | ac_cv_sizeof_void_p=$ac_size |
1551 | else | |
63cf211a NN |
1552 | echo "configure: failed program was:" >&5 |
1553 | cat conftest.$ac_ext >&5 | |
75b6f3fd | 1554 | fi |
63cf211a | 1555 | rm -f conftest* |
75b6f3fd KG |
1556 | if test x$ac_cv_sizeof_void_p != x ; then break; fi |
1557 | done | |
1558 | ||
1559 | fi | |
1560 | ||
1561 | if test x$ac_cv_sizeof_void_p = x ; then | |
63cf211a | 1562 | { echo "configure: error: cannot determine a size for void *" 1>&2; exit 1; } |
75b6f3fd | 1563 | fi |
63cf211a NN |
1564 | echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6 |
1565 | cat >> confdefs.h <<EOF | |
75b6f3fd | 1566 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p |
63cf211a | 1567 | EOF |
75b6f3fd KG |
1568 | |
1569 | ||
63cf211a | 1570 | echo $ac_n "checking size of short""... $ac_c" 1>&6 |
439a7e54 | 1571 | echo "configure:1572: checking size of short" >&5 |
63cf211a NN |
1572 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
1573 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae | 1574 | else |
4977bab6 | 1575 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
63cf211a | 1576 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 1577 | #line 1578 "configure" |
63cf211a | 1578 | #include "confdefs.h" |
414d23ae HPN |
1579 | #include "confdefs.h" |
1580 | #include <sys/types.h> | |
1581 | ||
1582 | ||
63cf211a | 1583 | int main() { |
414d23ae | 1584 | switch (0) case 0: case (sizeof (short) == $ac_size):; |
63cf211a NN |
1585 | ; return 0; } |
1586 | EOF | |
439a7e54 | 1587 | if { (eval echo configure:1588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 1588 | rm -rf conftest* |
414d23ae HPN |
1589 | ac_cv_sizeof_short=$ac_size |
1590 | else | |
63cf211a NN |
1591 | echo "configure: failed program was:" >&5 |
1592 | cat conftest.$ac_ext >&5 | |
84c041a1 | 1593 | fi |
63cf211a | 1594 | rm -f conftest* |
414d23ae HPN |
1595 | if test x$ac_cv_sizeof_short != x ; then break; fi |
1596 | done | |
1597 | ||
84c041a1 | 1598 | fi |
414d23ae HPN |
1599 | |
1600 | if test x$ac_cv_sizeof_short = x ; then | |
63cf211a | 1601 | { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } |
84c041a1 | 1602 | fi |
63cf211a NN |
1603 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
1604 | cat >> confdefs.h <<EOF | |
414d23ae | 1605 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
63cf211a | 1606 | EOF |
84c041a1 | 1607 | |
414d23ae | 1608 | |
63cf211a | 1609 | echo $ac_n "checking size of int""... $ac_c" 1>&6 |
439a7e54 | 1610 | echo "configure:1611: checking size of int" >&5 |
63cf211a NN |
1611 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
1612 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa | 1613 | else |
4977bab6 | 1614 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
63cf211a | 1615 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 1616 | #line 1617 "configure" |
63cf211a | 1617 | #include "confdefs.h" |
414d23ae HPN |
1618 | #include "confdefs.h" |
1619 | #include <sys/types.h> | |
1620 | ||
75e93faa | 1621 | |
63cf211a | 1622 | int main() { |
414d23ae | 1623 | switch (0) case 0: case (sizeof (int) == $ac_size):; |
63cf211a NN |
1624 | ; return 0; } |
1625 | EOF | |
439a7e54 | 1626 | if { (eval echo configure:1627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 1627 | rm -rf conftest* |
414d23ae | 1628 | ac_cv_sizeof_int=$ac_size |
75e93faa | 1629 | else |
63cf211a NN |
1630 | echo "configure: failed program was:" >&5 |
1631 | cat conftest.$ac_ext >&5 | |
75e93faa | 1632 | fi |
63cf211a | 1633 | rm -f conftest* |
414d23ae | 1634 | if test x$ac_cv_sizeof_int != x ; then break; fi |
75e93faa ZW |
1635 | done |
1636 | ||
1637 | fi | |
1638 | ||
414d23ae | 1639 | if test x$ac_cv_sizeof_int = x ; then |
63cf211a | 1640 | { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } |
414d23ae | 1641 | fi |
63cf211a NN |
1642 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 |
1643 | cat >> confdefs.h <<EOF | |
414d23ae | 1644 | #define SIZEOF_INT $ac_cv_sizeof_int |
63cf211a | 1645 | EOF |
75e93faa | 1646 | |
414d23ae | 1647 | |
63cf211a | 1648 | echo $ac_n "checking size of long""... $ac_c" 1>&6 |
439a7e54 | 1649 | echo "configure:1650: checking size of long" >&5 |
63cf211a NN |
1650 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
1651 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa | 1652 | else |
4977bab6 | 1653 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
63cf211a | 1654 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 1655 | #line 1656 "configure" |
63cf211a | 1656 | #include "confdefs.h" |
75e93faa | 1657 | #include "confdefs.h" |
414d23ae HPN |
1658 | #include <sys/types.h> |
1659 | ||
75e93faa | 1660 | |
63cf211a | 1661 | int main() { |
414d23ae | 1662 | switch (0) case 0: case (sizeof (long) == $ac_size):; |
63cf211a NN |
1663 | ; return 0; } |
1664 | EOF | |
439a7e54 | 1665 | if { (eval echo configure:1666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 1666 | rm -rf conftest* |
414d23ae | 1667 | ac_cv_sizeof_long=$ac_size |
75e93faa | 1668 | else |
63cf211a NN |
1669 | echo "configure: failed program was:" >&5 |
1670 | cat conftest.$ac_ext >&5 | |
75e93faa | 1671 | fi |
63cf211a | 1672 | rm -f conftest* |
414d23ae HPN |
1673 | if test x$ac_cv_sizeof_long != x ; then break; fi |
1674 | done | |
75e93faa | 1675 | |
414d23ae | 1676 | fi |
75e93faa | 1677 | |
414d23ae | 1678 | if test x$ac_cv_sizeof_long = x ; then |
63cf211a | 1679 | { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } |
75e93faa | 1680 | fi |
63cf211a NN |
1681 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
1682 | cat >> confdefs.h <<EOF | |
414d23ae | 1683 | #define SIZEOF_LONG $ac_cv_sizeof_long |
63cf211a | 1684 | EOF |
75e93faa ZW |
1685 | |
1686 | ||
414d23ae | 1687 | if test $ac_cv_c_long_long = yes; then |
63cf211a | 1688 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 |
439a7e54 | 1689 | echo "configure:1690: checking size of long long" >&5 |
63cf211a NN |
1690 | if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then |
1691 | echo $ac_n "(cached) $ac_c" 1>&6 | |
04cabffc | 1692 | else |
4977bab6 | 1693 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
63cf211a | 1694 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 1695 | #line 1696 "configure" |
63cf211a | 1696 | #include "confdefs.h" |
414d23ae HPN |
1697 | #include "confdefs.h" |
1698 | #include <sys/types.h> | |
1699 | ||
04cabffc | 1700 | |
63cf211a | 1701 | int main() { |
414d23ae | 1702 | switch (0) case 0: case (sizeof (long long) == $ac_size):; |
63cf211a NN |
1703 | ; return 0; } |
1704 | EOF | |
439a7e54 | 1705 | if { (eval echo configure:1706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 1706 | rm -rf conftest* |
414d23ae | 1707 | ac_cv_sizeof_long_long=$ac_size |
04cabffc | 1708 | else |
63cf211a NN |
1709 | echo "configure: failed program was:" >&5 |
1710 | cat conftest.$ac_ext >&5 | |
04cabffc | 1711 | fi |
63cf211a | 1712 | rm -f conftest* |
414d23ae HPN |
1713 | if test x$ac_cv_sizeof_long_long != x ; then break; fi |
1714 | done | |
1715 | ||
04cabffc KG |
1716 | fi |
1717 | ||
414d23ae | 1718 | if test x$ac_cv_sizeof_long_long = x ; then |
63cf211a | 1719 | { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; } |
414d23ae | 1720 | fi |
63cf211a NN |
1721 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 |
1722 | cat >> confdefs.h <<EOF | |
414d23ae | 1723 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
63cf211a | 1724 | EOF |
04cabffc | 1725 | |
04cabffc | 1726 | |
414d23ae HPN |
1727 | fi |
1728 | if test $ac_cv_c___int64 = yes; then | |
63cf211a | 1729 | echo $ac_n "checking size of __int64""... $ac_c" 1>&6 |
439a7e54 | 1730 | echo "configure:1731: checking size of __int64" >&5 |
63cf211a NN |
1731 | if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then |
1732 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa | 1733 | else |
4977bab6 | 1734 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
63cf211a | 1735 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 1736 | #line 1737 "configure" |
63cf211a | 1737 | #include "confdefs.h" |
414d23ae HPN |
1738 | #include "confdefs.h" |
1739 | #include <sys/types.h> | |
1740 | ||
61842080 | 1741 | |
63cf211a | 1742 | int main() { |
414d23ae | 1743 | switch (0) case 0: case (sizeof (__int64) == $ac_size):; |
63cf211a NN |
1744 | ; return 0; } |
1745 | EOF | |
439a7e54 | 1746 | if { (eval echo configure:1747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 1747 | rm -rf conftest* |
414d23ae | 1748 | ac_cv_sizeof___int64=$ac_size |
75e93faa | 1749 | else |
63cf211a NN |
1750 | echo "configure: failed program was:" >&5 |
1751 | cat conftest.$ac_ext >&5 | |
75e93faa | 1752 | fi |
63cf211a | 1753 | rm -f conftest* |
414d23ae HPN |
1754 | if test x$ac_cv_sizeof___int64 != x ; then break; fi |
1755 | done | |
1756 | ||
75e93faa ZW |
1757 | fi |
1758 | ||
414d23ae | 1759 | if test x$ac_cv_sizeof___int64 = x ; then |
63cf211a | 1760 | { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; } |
414d23ae | 1761 | fi |
63cf211a NN |
1762 | echo "$ac_t""$ac_cv_sizeof___int64" 1>&6 |
1763 | cat >> confdefs.h <<EOF | |
414d23ae | 1764 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 |
63cf211a | 1765 | EOF |
414d23ae | 1766 | |
cafe096b | 1767 | |
414d23ae HPN |
1768 | fi |
1769 | ||
34a86c2b NN |
1770 | # ----------------- |
1771 | # Find Ada compiler | |
1772 | # ----------------- | |
1773 | ||
1774 | # See if GNAT has been installed | |
63cf211a NN |
1775 | if test $host != $build; then |
1776 | ac_tool_prefix=${host_alias}- | |
1777 | else | |
1778 | ac_tool_prefix= | |
1779 | fi | |
34a86c2b NN |
1780 | |
1781 | ||
e0520fa7 | 1782 | |
63cf211a | 1783 | # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args. |
34a86c2b | 1784 | set dummy ${ac_tool_prefix}gnatbind; ac_word=$2 |
63cf211a | 1785 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
439a7e54 | 1786 | echo "configure:1787: checking for $ac_word" >&5 |
63cf211a NN |
1787 | if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then |
1788 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b NN |
1789 | else |
1790 | if test -n "$GNATBIND"; then | |
1791 | ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test. | |
1792 | else | |
63cf211a NN |
1793 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1794 | ac_dummy="$PATH" | |
1795 | for ac_dir in $ac_dummy; do | |
1796 | test -z "$ac_dir" && ac_dir=. | |
1797 | if test -f $ac_dir/$ac_word; then | |
1798 | ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind" | |
1799 | break | |
1800 | fi | |
1801 | done | |
1802 | IFS="$ac_save_ifs" | |
34a86c2b NN |
1803 | fi |
1804 | fi | |
63cf211a | 1805 | GNATBIND="$ac_cv_prog_GNATBIND" |
34a86c2b | 1806 | if test -n "$GNATBIND"; then |
63cf211a | 1807 | echo "$ac_t""$GNATBIND" 1>&6 |
34a86c2b | 1808 | else |
63cf211a | 1809 | echo "$ac_t""no" 1>&6 |
34a86c2b NN |
1810 | fi |
1811 | ||
63cf211a | 1812 | |
34a86c2b | 1813 | if test -z "$ac_cv_prog_GNATBIND"; then |
63cf211a | 1814 | if test -n "$ac_tool_prefix"; then |
34a86c2b NN |
1815 | # Extract the first word of "gnatbind", so it can be a program name with args. |
1816 | set dummy gnatbind; ac_word=$2 | |
63cf211a | 1817 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
439a7e54 | 1818 | echo "configure:1819: checking for $ac_word" >&5 |
63cf211a NN |
1819 | if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then |
1820 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b | 1821 | else |
63cf211a NN |
1822 | if test -n "$GNATBIND"; then |
1823 | ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test. | |
34a86c2b | 1824 | else |
63cf211a NN |
1825 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1826 | ac_dummy="$PATH" | |
1827 | for ac_dir in $ac_dummy; do | |
1828 | test -z "$ac_dir" && ac_dir=. | |
1829 | if test -f $ac_dir/$ac_word; then | |
1830 | ac_cv_prog_GNATBIND="gnatbind" | |
1831 | break | |
1832 | fi | |
1833 | done | |
1834 | IFS="$ac_save_ifs" | |
1835 | test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no" | |
34a86c2b NN |
1836 | fi |
1837 | fi | |
63cf211a NN |
1838 | GNATBIND="$ac_cv_prog_GNATBIND" |
1839 | if test -n "$GNATBIND"; then | |
1840 | echo "$ac_t""$GNATBIND" 1>&6 | |
34a86c2b | 1841 | else |
63cf211a | 1842 | echo "$ac_t""no" 1>&6 |
34a86c2b NN |
1843 | fi |
1844 | ||
1845 | else | |
63cf211a NN |
1846 | GNATBIND="no" |
1847 | fi | |
34a86c2b NN |
1848 | fi |
1849 | ||
63cf211a | 1850 | echo $ac_n "checking whether compiler driver understands Ada""... $ac_c" 1>&6 |
439a7e54 | 1851 | echo "configure:1852: checking whether compiler driver understands Ada" >&5 |
63cf211a NN |
1852 | if eval "test \"`echo '$''{'gcc_cv_cc_supports_ada'+set}'`\" = set"; then |
1853 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b NN |
1854 | else |
1855 | cat >conftest.adb <<EOF | |
1856 | procedure conftest is begin null; end conftest; | |
1857 | EOF | |
e0520fa7 NN |
1858 | gcc_cv_cc_supports_ada=no |
1859 | # There is a bug in old released versions of GCC which causes the | |
1860 | # driver to exit successfully when the appropriate language module | |
1861 | # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1. | |
1862 | # Therefore we must check for the error message as well as an | |
1863 | # unsuccessful exit. | |
1864 | errors=`(${CC} -c conftest.adb) 2>&1 || echo failure` | |
1865 | if test x"$errors" = x; then | |
1866 | gcc_cv_cc_supports_ada=yes | |
1867 | break | |
1868 | fi | |
34a86c2b NN |
1869 | rm -f conftest.* |
1870 | fi | |
63cf211a NN |
1871 | |
1872 | echo "$ac_t""$gcc_cv_cc_supports_ada" 1>&6 | |
34a86c2b | 1873 | |
e0520fa7 | 1874 | if test x$GNATBIND != xno && test x$gcc_cv_supports_ada != xno; then |
34a86c2b NN |
1875 | have_gnat=yes |
1876 | else | |
1877 | have_gnat=no | |
1878 | fi | |
1879 | ||
1880 | ||
34a86c2b NN |
1881 | # --------------------- |
1882 | # Warnings and checking | |
1883 | # --------------------- | |
1884 | ||
1885 | strict1_warn= | |
f73ccc50 | 1886 | if test $ac_cv_prog_cc_no_long_long = yes ; then |
34a86c2b NN |
1887 | strict1_warn="-pedantic -Wno-long-long" |
1888 | fi | |
1889 | ||
1890 | ||
63cf211a | 1891 | # If the native compiler is GCC, we can enable warnings even in stage1. |
414d23ae HPN |
1892 | # That's useful for people building cross-compilers, or just running a |
1893 | # quick `make'. | |
1894 | warn_cflags= | |
1895 | if test "x$GCC" = "xyes"; then | |
1896 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
1897 | fi | |
1898 | ||
1899 | ||
dd859b8a KG |
1900 | # Enable -Werror in bootstrap stage2 and later. |
1901 | # Change the default to "no" on release branches. | |
1902 | # Check whether --enable-werror or --disable-werror was given. | |
1903 | if test "${enable_werror+set}" = set; then | |
1904 | enableval="$enable_werror" | |
63cf211a | 1905 | : |
dd859b8a KG |
1906 | else |
1907 | enable_werror=yes | |
63cf211a NN |
1908 | fi |
1909 | ||
dd859b8a KG |
1910 | if test x$enable_werror = xyes ; then |
1911 | WERROR=-Werror | |
1912 | fi | |
1913 | ||
1914 | ||
414d23ae HPN |
1915 | # Enable expensive internal checks |
1916 | # Check whether --enable-checking or --disable-checking was given. | |
1917 | if test "${enable_checking+set}" = set; then | |
1918 | enableval="$enable_checking" | |
1919 | ac_checking= | |
1920 | ac_tree_checking= | |
1921 | ac_rtl_checking= | |
1922 | ac_rtlflag_checking= | |
1923 | ac_gc_checking= | |
1924 | ac_gc_always_collect= | |
5dfa45d0 | 1925 | ac_fold_checking= |
414d23ae HPN |
1926 | case "${enableval}" in |
1927 | yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ; | |
1928 | ac_rtlflag_checking=1 ;; | |
1929 | no) ;; | |
1930 | *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," | |
1931 | set fnord $enableval; shift | |
1932 | IFS="$ac_save_IFS" | |
1933 | for check | |
1934 | do | |
1935 | case $check in | |
1936 | misc) ac_checking=1 ;; | |
1937 | tree) ac_tree_checking=1 ;; | |
1938 | rtlflag) ac_rtlflag_checking=1 ;; | |
1939 | rtl) ac_rtl_checking=1 ;; | |
1940 | gc) ac_gc_checking=1 ;; | |
1941 | gcac) ac_gc_always_collect=1 ;; | |
5dfa45d0 | 1942 | fold) ac_fold_checking=1 ;; |
414d23ae | 1943 | valgrind) ac_checking_valgrind=1 ;; |
63cf211a | 1944 | *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;; |
414d23ae HPN |
1945 | esac |
1946 | done | |
1947 | ;; | |
1948 | esac | |
1949 | ||
75e93faa | 1950 | else |
414d23ae HPN |
1951 | # Enable some checks by default for development versions of GCC |
1952 | ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1; | |
63cf211a NN |
1953 | fi |
1954 | ||
414d23ae HPN |
1955 | nocommon_flag="" |
1956 | if test x$ac_checking != x ; then | |
63cf211a | 1957 | cat >> confdefs.h <<\EOF |
414d23ae | 1958 | #define ENABLE_CHECKING 1 |
63cf211a | 1959 | EOF |
75e93faa | 1960 | |
414d23ae HPN |
1961 | nocommon_flag=-fno-common |
1962 | fi | |
827ae6cf | 1963 | |
414d23ae | 1964 | if test x$ac_tree_checking != x ; then |
63cf211a | 1965 | cat >> confdefs.h <<\EOF |
414d23ae | 1966 | #define ENABLE_TREE_CHECKING 1 |
63cf211a | 1967 | EOF |
827ae6cf RO |
1968 | |
1969 | fi | |
414d23ae | 1970 | if test x$ac_rtl_checking != x ; then |
63cf211a | 1971 | cat >> confdefs.h <<\EOF |
414d23ae | 1972 | #define ENABLE_RTL_CHECKING 1 |
63cf211a | 1973 | EOF |
6e3f3080 | 1974 | |
63cf211a NN |
1975 | fi |
1976 | if test x$ac_rtlflag_checking != x ; then | |
1977 | cat >> confdefs.h <<\EOF | |
1978 | #define ENABLE_RTL_FLAG_CHECKING 1 | |
1979 | EOF | |
6e3f3080 | 1980 | |
63cf211a NN |
1981 | fi |
1982 | if test x$ac_gc_checking != x ; then | |
1983 | cat >> confdefs.h <<\EOF | |
1984 | #define ENABLE_GC_CHECKING 1 | |
1985 | EOF | |
6e3f3080 NN |
1986 | |
1987 | fi | |
63cf211a NN |
1988 | if test x$ac_gc_always_collect != x ; then |
1989 | cat >> confdefs.h <<\EOF | |
1990 | #define ENABLE_GC_ALWAYS_COLLECT 1 | |
1991 | EOF | |
6e3f3080 | 1992 | |
63cf211a NN |
1993 | fi |
1994 | if test x$ac_fold_checking != x ; then | |
1995 | cat >> confdefs.h <<\EOF | |
1996 | #define ENABLE_FOLD_CHECKING 1 | |
1997 | EOF | |
6e3f3080 | 1998 | |
63cf211a NN |
1999 | fi |
2000 | valgrind_path_defines= | |
2001 | valgrind_command= | |
6e3f3080 | 2002 | |
63cf211a NN |
2003 | ac_safe=`echo "valgrind.h" | sed 'y%./+-%__p_%'` |
2004 | echo $ac_n "checking for valgrind.h""... $ac_c" 1>&6 | |
439a7e54 | 2005 | echo "configure:2006: checking for valgrind.h" >&5 |
63cf211a NN |
2006 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2007 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6e3f3080 | 2008 | else |
63cf211a | 2009 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 2010 | #line 2011 "configure" |
63cf211a NN |
2011 | #include "confdefs.h" |
2012 | #include <valgrind.h> | |
2013 | EOF | |
2014 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
439a7e54 | 2015 | { (eval echo configure:2016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
63cf211a NN |
2016 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2017 | if test -z "$ac_err"; then | |
2018 | rm -rf conftest* | |
2019 | eval "ac_cv_header_$ac_safe=yes" | |
2020 | else | |
2021 | echo "$ac_err" >&5 | |
2022 | echo "configure: failed program was:" >&5 | |
2023 | cat conftest.$ac_ext >&5 | |
2024 | rm -rf conftest* | |
2025 | eval "ac_cv_header_$ac_safe=no" | |
6938ec6c | 2026 | fi |
63cf211a | 2027 | rm -f conftest* |
6e3f3080 | 2028 | fi |
63cf211a NN |
2029 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
2030 | echo "$ac_t""yes" 1>&6 | |
6938ec6c NN |
2031 | have_valgrind_h=yes |
2032 | else | |
63cf211a NN |
2033 | echo "$ac_t""no" 1>&6 |
2034 | have_valgrind_h=no | |
6938ec6c NN |
2035 | fi |
2036 | ||
2037 | ||
414d23ae HPN |
2038 | if test x$ac_checking_valgrind != x ; then |
2039 | # It is certainly possible that there's valgrind but no valgrind.h. | |
2040 | # GCC relies on making annotations so we must have both. | |
63cf211a | 2041 | echo $ac_n "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>""... $ac_c" 1>&6 |
439a7e54 | 2042 | echo "configure:2043: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5 |
63cf211a | 2043 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 2044 | #line 2045 "configure" |
63cf211a | 2045 | #include "confdefs.h" |
a207b594 | 2046 | #include <valgrind/memcheck.h> |
14011ca4 AJ |
2047 | #ifndef VALGRIND_DISCARD |
2048 | #error VALGRIND_DISCARD not defined | |
2049 | #endif | |
63cf211a NN |
2050 | EOF |
2051 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
439a7e54 | 2052 | { (eval echo configure:2053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
63cf211a NN |
2053 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2054 | if test -z "$ac_err"; then | |
2055 | rm -rf conftest* | |
a207b594 HPN |
2056 | gcc_cv_header_valgrind_memcheck_h=yes |
2057 | else | |
63cf211a NN |
2058 | echo "$ac_err" >&5 |
2059 | echo "configure: failed program was:" >&5 | |
2060 | cat conftest.$ac_ext >&5 | |
2061 | rm -rf conftest* | |
a207b594 HPN |
2062 | gcc_cv_header_valgrind_memcheck_h=no |
2063 | fi | |
63cf211a NN |
2064 | rm -f conftest* |
2065 | echo "$ac_t""$gcc_cv_header_valgrind_memcheck_h" 1>&6 | |
2066 | echo $ac_n "checking for VALGRIND_DISCARD in <memcheck.h>""... $ac_c" 1>&6 | |
439a7e54 | 2067 | echo "configure:2068: checking for VALGRIND_DISCARD in <memcheck.h>" >&5 |
63cf211a | 2068 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 2069 | #line 2070 "configure" |
63cf211a | 2070 | #include "confdefs.h" |
a207b594 HPN |
2071 | #include <memcheck.h> |
2072 | #ifndef VALGRIND_DISCARD | |
2073 | #error VALGRIND_DISCARD not defined | |
2074 | #endif | |
63cf211a NN |
2075 | EOF |
2076 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
439a7e54 | 2077 | { (eval echo configure:2078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
63cf211a NN |
2078 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2079 | if test -z "$ac_err"; then | |
2080 | rm -rf conftest* | |
14011ca4 AJ |
2081 | gcc_cv_header_memcheck_h=yes |
2082 | else | |
63cf211a NN |
2083 | echo "$ac_err" >&5 |
2084 | echo "configure: failed program was:" >&5 | |
2085 | cat conftest.$ac_ext >&5 | |
2086 | rm -rf conftest* | |
cafe096b EC |
2087 | gcc_cv_header_memcheck_h=no |
2088 | fi | |
63cf211a NN |
2089 | rm -f conftest* |
2090 | echo "$ac_t""$gcc_cv_header_memcheck_h" 1>&6 | |
2091 | ||
56694dd9 ZW |
2092 | # Prepare PATH_SEPARATOR. |
2093 | # The user is always right. | |
2094 | if test "${PATH_SEPARATOR+set}" != set; then | |
2095 | echo "#! /bin/sh" >conf$$.sh | |
2096 | echo "exit 0" >>conf$$.sh | |
2097 | chmod +x conf$$.sh | |
2098 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
2099 | PATH_SEPARATOR=';' | |
2100 | else | |
2101 | PATH_SEPARATOR=: | |
2102 | fi | |
2103 | rm -f conf$$.sh | |
2104 | fi | |
2105 | ||
2106 | # Find out how to test for executable files. Don't use a zero-byte file, | |
2107 | # as systems may use methods other than mode bits to determine executability. | |
2108 | cat >conf$$.file <<_ASEOF | |
2109 | #! /bin/sh | |
2110 | exit 0 | |
2111 | _ASEOF | |
2112 | chmod +x conf$$.file | |
2113 | if test -x conf$$.file >/dev/null 2>&1; then | |
2114 | ac_executable_p="test -x" | |
2115 | else | |
2116 | ac_executable_p="test -f" | |
2117 | fi | |
2118 | rm -f conf$$.file | |
2119 | ||
2120 | # Extract the first word of "valgrind", so it can be a program name with args. | |
414d23ae | 2121 | set dummy valgrind; ac_word=$2 |
63cf211a | 2122 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
439a7e54 | 2123 | echo "configure:2124: checking for $ac_word" >&5 |
63cf211a NN |
2124 | if eval "test \"`echo '$''{'ac_cv_path_valgrind_path'+set}'`\" = set"; then |
2125 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae HPN |
2126 | else |
2127 | case "$valgrind_path" in | |
56694dd9 ZW |
2128 | [\\/]* | ?:[\\/]*) |
2129 | ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path. | |
2130 | ;; | |
414d23ae | 2131 | *) |
56694dd9 ZW |
2132 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR |
2133 | for ac_dir in $PATH; do | |
2134 | IFS="$ac_save_IFS" | |
2135 | test -z "$ac_dir" && ac_dir=. | |
2136 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2137 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | |
2138 | if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then | |
2139 | ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext" | |
2140 | break 2 | |
2141 | fi | |
2142 | fi | |
2143 | done | |
2144 | done | |
2145 | IFS="$ac_save_IFS" | |
2146 | ;; | |
414d23ae | 2147 | esac |
75e93faa | 2148 | fi |
414d23ae HPN |
2149 | valgrind_path="$ac_cv_path_valgrind_path" |
2150 | if test -n "$valgrind_path"; then | |
63cf211a | 2151 | echo "$ac_t""$valgrind_path" 1>&6 |
414d23ae | 2152 | else |
63cf211a | 2153 | echo "$ac_t""no" 1>&6 |
414d23ae HPN |
2154 | fi |
2155 | ||
a207b594 HPN |
2156 | if test "x$valgrind_path" = "x" \ |
2157 | || (test $have_valgrind_h = no \ | |
2158 | && test $gcc_cv_header_memcheck_h = no \ | |
2159 | && test $gcc_cv_header_valgrind_memcheck_h = no); then | |
63cf211a | 2160 | { echo "configure: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" 1>&2; exit 1; } |
414d23ae HPN |
2161 | fi |
2162 | valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"' | |
2163 | valgrind_command="$valgrind_path -q" | |
63cf211a | 2164 | cat >> confdefs.h <<\EOF |
414d23ae | 2165 | #define ENABLE_VALGRIND_CHECKING 1 |
63cf211a | 2166 | EOF |
75e93faa | 2167 | |
a207b594 | 2168 | if test $gcc_cv_header_valgrind_memcheck_h = yes; then |
63cf211a | 2169 | cat >> confdefs.h <<\EOF |
a207b594 | 2170 | #define HAVE_VALGRIND_MEMCHECK_H 1 |
63cf211a | 2171 | EOF |
a207b594 HPN |
2172 | |
2173 | fi | |
14011ca4 | 2174 | if test $gcc_cv_header_memcheck_h = yes; then |
63cf211a | 2175 | cat >> confdefs.h <<\EOF |
14011ca4 | 2176 | #define HAVE_MEMCHECK_H 1 |
63cf211a | 2177 | EOF |
14011ca4 AJ |
2178 | |
2179 | fi | |
414d23ae | 2180 | fi |
75e93faa | 2181 | |
75e93faa ZW |
2182 | |
2183 | ||
414d23ae HPN |
2184 | # Enable code coverage collection |
2185 | # Check whether --enable-coverage or --disable-coverage was given. | |
2186 | if test "${enable_coverage+set}" = set; then | |
2187 | enableval="$enable_coverage" | |
2188 | case "${enableval}" in | |
2189 | yes|noopt) | |
e61a2eb7 | 2190 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0" |
414d23ae HPN |
2191 | ;; |
2192 | opt) | |
e61a2eb7 | 2193 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2" |
414d23ae HPN |
2194 | ;; |
2195 | *) | |
63cf211a | 2196 | { echo "configure: error: unknown coverage setting $enableval" 1>&2; exit 1; } |
414d23ae HPN |
2197 | ;; |
2198 | esac | |
75e93faa | 2199 | else |
414d23ae | 2200 | coverage_flags="" |
63cf211a NN |
2201 | fi |
2202 | ||
5c3bc9fb | 2203 | |
414d23ae | 2204 | |
439a7e54 DN |
2205 | # Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given. |
2206 | if test "${enable_gather_detailed_mem_stats+set}" = set; then | |
2207 | enableval="$enable_gather_detailed_mem_stats" | |
2208 | : | |
2209 | else | |
2210 | enable_gather_detailed_mem_stats=no | |
2211 | fi | |
2212 | ||
2213 | if test x$enable_gather_detailed_mem_stats = xyes ; then | |
2214 | cat >> confdefs.h <<\EOF | |
2215 | #define GATHER_STATISTICS 1 | |
2216 | EOF | |
2217 | ||
2218 | fi | |
2219 | ||
73458fb7 NN |
2220 | # ------------------------------- |
2221 | # Miscenalleous configure options | |
2222 | # ------------------------------- | |
34a86c2b NN |
2223 | |
2224 | # With stabs | |
2225 | # Check whether --with-stabs or --without-stabs was given. | |
2226 | if test "${with_stabs+set}" = set; then | |
2227 | withval="$with_stabs" | |
2228 | stabs="$with_stabs" | |
2229 | else | |
2230 | stabs=no | |
63cf211a NN |
2231 | fi |
2232 | ||
cafe096b | 2233 | |
34a86c2b NN |
2234 | # Determine whether or not multilibs are enabled. |
2235 | # Check whether --enable-multilib or --disable-multilib was given. | |
2236 | if test "${enable_multilib+set}" = set; then | |
2237 | enableval="$enable_multilib" | |
63cf211a | 2238 | : |
34a86c2b NN |
2239 | else |
2240 | enable_multilib=yes | |
63cf211a NN |
2241 | fi |
2242 | ||
75e93faa | 2243 | |
34a86c2b | 2244 | |
414d23ae HPN |
2245 | # Enable __cxa_atexit for C++. |
2246 | # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given. | |
2247 | if test "${enable___cxa_atexit+set}" = set; then | |
2248 | enableval="$enable___cxa_atexit" | |
63cf211a NN |
2249 | : |
2250 | fi | |
75e93faa ZW |
2251 | |
2252 | ||
414d23ae HPN |
2253 | # Enable threads |
2254 | # Pass with no value to take the default | |
2255 | # Pass with a value to specify a thread package | |
2256 | # Check whether --enable-threads or --disable-threads was given. | |
2257 | if test "${enable_threads+set}" = set; then | |
2258 | enableval="$enable_threads" | |
63cf211a | 2259 | : |
414d23ae HPN |
2260 | else |
2261 | enable_threads='' | |
63cf211a NN |
2262 | fi |
2263 | ||
c2e494a8 | 2264 | # Save in case it gets overwritten in config.gcc |
414d23ae | 2265 | enable_threads_flag=$enable_threads |
414d23ae HPN |
2266 | |
2267 | # Check whether --enable-objc-gc or --disable-objc-gc was given. | |
2268 | if test "${enable_objc_gc+set}" = set; then | |
2269 | enableval="$enable_objc_gc" | |
2270 | if test x$enable_objc_gc = xno; then | |
2271 | objc_boehm_gc='' | |
2272 | else | |
2273 | objc_boehm_gc=1 | |
2274 | fi | |
2275 | else | |
2276 | objc_boehm_gc='' | |
63cf211a | 2277 | fi |
75e93faa ZW |
2278 | |
2279 | ||
414d23ae HPN |
2280 | # Check whether --with-dwarf2 or --without-dwarf2 was given. |
2281 | if test "${with_dwarf2+set}" = set; then | |
2282 | withval="$with_dwarf2" | |
2283 | dwarf2="$with_dwarf2" | |
75e93faa | 2284 | else |
414d23ae | 2285 | dwarf2=no |
63cf211a NN |
2286 | fi |
2287 | ||
75e93faa | 2288 | |
414d23ae HPN |
2289 | # Check whether --enable-shared or --disable-shared was given. |
2290 | if test "${enable_shared+set}" = set; then | |
2291 | enableval="$enable_shared" | |
63cf211a | 2292 | |
414d23ae HPN |
2293 | case $enable_shared in |
2294 | yes | no) ;; | |
2295 | *) | |
2296 | enable_shared=no | |
2297 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
2298 | for pkg in $enableval; do | |
2299 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
2300 | enable_shared=yes | |
2301 | fi | |
2302 | done | |
2303 | IFS="$ac_save_ifs" | |
2304 | ;; | |
2305 | esac | |
2306 | ||
75e93faa | 2307 | else |
414d23ae | 2308 | enable_shared=yes |
63cf211a | 2309 | fi |
75e93faa | 2310 | |
75e93faa | 2311 | |
75e93faa | 2312 | |
4977bab6 ZW |
2313 | # Check whether --with-sysroot or --without-sysroot was given. |
2314 | if test "${with_sysroot+set}" = set; then | |
2315 | withval="$with_sysroot" | |
63cf211a | 2316 | |
4977bab6 | 2317 | case ${with_sysroot} in |
caa55b1e | 2318 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;; |
4977bab6 ZW |
2319 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
2320 | esac | |
63cf211a | 2321 | |
4977bab6 ZW |
2322 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' |
2323 | CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)' | |
2324 | ||
047d636f DJ |
2325 | if test "x$exec_prefix" = xNONE; then |
2326 | if test "x$prefix" = xNONE; then | |
2327 | test_prefix=/usr/local | |
2328 | else | |
2329 | test_prefix=$prefix | |
2330 | fi | |
2331 | else | |
2332 | test_prefix=$exec_prefix | |
2333 | fi | |
2334 | case ${TARGET_SYSTEM_ROOT} in | |
91710e62 AO |
2335 | "${test_prefix}"|"${test_prefix}/"*|\ |
2336 | '${exec_prefix}'|'${exec_prefix}/'*) | |
047d636f DJ |
2337 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
2338 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
2339 | ;; | |
2340 | esac | |
2341 | ||
4977bab6 | 2342 | else |
63cf211a | 2343 | |
4977bab6 | 2344 | TARGET_SYSTEM_ROOT= |
db720d9a | 2345 | TARGET_SYSTEM_ROOT_DEFINE= |
4977bab6 ZW |
2346 | CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include' |
2347 | ||
63cf211a NN |
2348 | fi |
2349 | ||
4977bab6 ZW |
2350 | |
2351 | ||
2352 | ||
2353 | ||
d1bd0ded | 2354 | # Build with intermodule optimisations |
d1bd0ded GK |
2355 | # Check whether --enable-intermodule or --disable-intermodule was given. |
2356 | if test "${enable_intermodule+set}" = set; then | |
2357 | enableval="$enable_intermodule" | |
0c46c5c7 KC |
2358 | case ${enable_intermodule} in |
2359 | yes) onestep="-onestep";; | |
2360 | *) onestep="";; | |
d1bd0ded | 2361 | esac |
0c46c5c7 KC |
2362 | else |
2363 | onestep="" | |
63cf211a NN |
2364 | fi |
2365 | ||
d1bd0ded GK |
2366 | |
2367 | ||
73458fb7 NN |
2368 | # ------------------------- |
2369 | # Checks for other programs | |
2370 | # ------------------------- | |
5b67ad6f | 2371 | |
63cf211a | 2372 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 |
439a7e54 | 2373 | echo "configure:2374: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
63cf211a NN |
2374 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
2375 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
2376 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e9a25f70 | 2377 | else |
63cf211a | 2378 | cat > conftestmake <<\EOF |
e9a25f70 | 2379 | all: |
63cf211a NN |
2380 | @echo 'ac_maketemp="${MAKE}"' |
2381 | EOF | |
e9a25f70 | 2382 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
63cf211a | 2383 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` |
e9a25f70 JL |
2384 | if test -n "$ac_maketemp"; then |
2385 | eval ac_cv_prog_make_${ac_make}_set=yes | |
2386 | else | |
2387 | eval ac_cv_prog_make_${ac_make}_set=no | |
2388 | fi | |
63cf211a | 2389 | rm -f conftestmake |
e9a25f70 JL |
2390 | fi |
2391 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
63cf211a | 2392 | echo "$ac_t""yes" 1>&6 |
e9a25f70 JL |
2393 | SET_MAKE= |
2394 | else | |
63cf211a | 2395 | echo "$ac_t""no" 1>&6 |
e9a25f70 JL |
2396 | SET_MAKE="MAKE=${MAKE-make}" |
2397 | fi | |
2398 | ||
2399 | ||
861bb6c1 | 2400 | # Find some useful tools |
63cf211a | 2401 | for ac_prog in mawk gawk nawk awk |
861bb6c1 | 2402 | do |
63cf211a | 2403 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
861bb6c1 | 2404 | set dummy $ac_prog; ac_word=$2 |
63cf211a | 2405 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
439a7e54 | 2406 | echo "configure:2407: checking for $ac_word" >&5 |
63cf211a NN |
2407 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
2408 | echo $ac_n "(cached) $ac_c" 1>&6 | |
861bb6c1 JL |
2409 | else |
2410 | if test -n "$AWK"; then | |
2411 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
2412 | else | |
63cf211a NN |
2413 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2414 | ac_dummy="$PATH" | |
2415 | for ac_dir in $ac_dummy; do | |
2416 | test -z "$ac_dir" && ac_dir=. | |
2417 | if test -f $ac_dir/$ac_word; then | |
2418 | ac_cv_prog_AWK="$ac_prog" | |
2419 | break | |
2420 | fi | |
2421 | done | |
2422 | IFS="$ac_save_ifs" | |
861bb6c1 JL |
2423 | fi |
2424 | fi | |
63cf211a | 2425 | AWK="$ac_cv_prog_AWK" |
861bb6c1 | 2426 | if test -n "$AWK"; then |
63cf211a | 2427 | echo "$ac_t""$AWK" 1>&6 |
861bb6c1 | 2428 | else |
63cf211a | 2429 | echo "$ac_t""no" 1>&6 |
861bb6c1 JL |
2430 | fi |
2431 | ||
63cf211a | 2432 | test -n "$AWK" && break |
861bb6c1 JL |
2433 | done |
2434 | ||
2c4902b9 NN |
2435 | # We need awk to run opts.sh (to create options.c and options.h). |
2436 | # Bail out if it's missing. | |
2437 | case ${AWK} in | |
63cf211a | 2438 | "") { echo "configure: error: can't build without awk, bailing out" 1>&2; exit 1; } ;; |
2c4902b9 NN |
2439 | esac |
2440 | ||
63cf211a | 2441 | echo $ac_n "checking whether ln works""... $ac_c" 1>&6 |
439a7e54 | 2442 | echo "configure:2443: checking whether ln works" >&5 |
63cf211a NN |
2443 | if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then |
2444 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 RL |
2445 | else |
2446 | rm -f conftestdata_t | |
2447 | echo >conftestdata_f | |
2448 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
2449 | then | |
2450 | gcc_cv_prog_LN="ln" | |
2451 | else | |
2452 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
2453 | then | |
2454 | gcc_cv_prog_LN="ln -s" | |
2455 | else | |
2456 | gcc_cv_prog_LN=cp | |
2457 | fi | |
2458 | fi | |
2459 | rm -f conftestdata_f conftestdata_t | |
2460 | ||
2461 | fi | |
2462 | LN="$gcc_cv_prog_LN" | |
2463 | if test "$gcc_cv_prog_LN" = "ln"; then | |
63cf211a | 2464 | echo "$ac_t""yes" 1>&6 |
0a4b6309 RL |
2465 | else |
2466 | if test "$gcc_cv_prog_LN" = "ln -s"; then | |
63cf211a | 2467 | echo "$ac_t""no, using ln -s" 1>&6 |
0a4b6309 | 2468 | else |
63cf211a | 2469 | echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6 |
0a4b6309 RL |
2470 | fi |
2471 | fi | |
2472 | ||
63cf211a | 2473 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
439a7e54 | 2474 | echo "configure:2475: checking whether ln -s works" >&5 |
63cf211a NN |
2475 | if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then |
2476 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 RL |
2477 | else |
2478 | rm -f conftestdata_t | |
2479 | echo >conftestdata_f | |
2480 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
2481 | then | |
2482 | gcc_cv_prog_LN_S="ln -s" | |
2483 | else | |
2484 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
2485 | then | |
2486 | gcc_cv_prog_LN_S=ln | |
2487 | else | |
2488 | gcc_cv_prog_LN_S=cp | |
2489 | fi | |
2490 | fi | |
2491 | rm -f conftestdata_f conftestdata_t | |
2492 | ||
2493 | fi | |
2494 | LN_S="$gcc_cv_prog_LN_S" | |
2495 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
63cf211a | 2496 | echo "$ac_t""yes" 1>&6 |
0a4b6309 RL |
2497 | else |
2498 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
63cf211a | 2499 | echo "$ac_t""no, using ln" 1>&6 |
0a4b6309 | 2500 | else |
63cf211a | 2501 | echo "$ac_t""no, and neither does ln, so using cp" 1>&6 |
0a4b6309 RL |
2502 | fi |
2503 | fi | |
2504 | ||
63cf211a NN |
2505 | # Extract the first word of "ranlib", so it can be a program name with args. |
2506 | set dummy ranlib; ac_word=$2 | |
2507 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
439a7e54 | 2508 | echo "configure:2509: checking for $ac_word" >&5 |
63cf211a NN |
2509 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
2510 | echo $ac_n "(cached) $ac_c" 1>&6 | |
861bb6c1 JL |
2511 | else |
2512 | if test -n "$RANLIB"; then | |
2513 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2514 | else | |
63cf211a NN |
2515 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2516 | ac_dummy="$PATH" | |
2517 | for ac_dir in $ac_dummy; do | |
2518 | test -z "$ac_dir" && ac_dir=. | |
2519 | if test -f $ac_dir/$ac_word; then | |
2520 | ac_cv_prog_RANLIB="ranlib" | |
2521 | break | |
2522 | fi | |
2523 | done | |
2524 | IFS="$ac_save_ifs" | |
2525 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
6e3f3080 NN |
2526 | fi |
2527 | fi | |
63cf211a | 2528 | RANLIB="$ac_cv_prog_RANLIB" |
6e3f3080 | 2529 | if test -n "$RANLIB"; then |
63cf211a | 2530 | echo "$ac_t""$RANLIB" 1>&6 |
6e3f3080 | 2531 | else |
63cf211a | 2532 | echo "$ac_t""no" 1>&6 |
861bb6c1 JL |
2533 | fi |
2534 | ||
0a4b6309 RL |
2535 | # Find a good install program. We prefer a C program (faster), |
2536 | # so one script is as good as another. But avoid the broken or | |
2537 | # incompatible versions: | |
2538 | # SysV /etc/install, /usr/sbin/install | |
2539 | # SunOS /usr/etc/install | |
2540 | # IRIX /sbin/install | |
2541 | # AIX /bin/install | |
2542 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2543 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2544 | # ./install, which can be erroneously created by make from ./install.sh. | |
63cf211a | 2545 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
439a7e54 | 2546 | echo "configure:2547: checking for a BSD compatible install" >&5 |
0a4b6309 | 2547 | if test -z "$INSTALL"; then |
63cf211a NN |
2548 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
2549 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 RL |
2550 | else |
2551 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
2552 | for ac_dir in $PATH; do | |
2553 | # Account for people who put trailing slashes in PATH elements. | |
2554 | case "$ac_dir/" in | |
2555 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
2556 | *) | |
2557 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2558 | for ac_prog in ginstall scoinst install; do | |
2559 | if test -f $ac_dir/$ac_prog; then | |
2560 | if test $ac_prog = install && | |
2561 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
2562 | # AIX install. It has an incompatible calling convention. | |
2563 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
2564 | : | |
2565 | else | |
2566 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
2567 | break 2 | |
2568 | fi | |
2569 | fi | |
2570 | done | |
2571 | ;; | |
2572 | esac | |
2573 | done | |
2574 | IFS="$ac_save_IFS" | |
2575 | ||
2576 | fi | |
2577 | if test "${ac_cv_path_install+set}" = set; then | |
2578 | INSTALL="$ac_cv_path_install" | |
2579 | else | |
2580 | # As a last resort, use the slow shell script. We don't cache a | |
2581 | # path for INSTALL within a source directory, because that will | |
2582 | # break other packages using the cache if that directory is | |
2583 | # removed, or if the path is relative. | |
2584 | INSTALL="$ac_install_sh" | |
2585 | fi | |
2586 | fi | |
63cf211a | 2587 | echo "$ac_t""$INSTALL" 1>&6 |
0a4b6309 RL |
2588 | |
2589 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
2590 | # It thinks the first close brace ends the variable substitution. | |
2591 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
2592 | ||
2593 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
2594 | ||
861bb6c1 | 2595 | |
3a000df0 | 2596 | # See if cmp has --ignore-initial. |
63cf211a | 2597 | echo $ac_n "checking for cmp's capabilities""... $ac_c" 1>&6 |
439a7e54 | 2598 | echo "configure:2599: checking for cmp's capabilities" >&5 |
63cf211a NN |
2599 | if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then |
2600 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3a000df0 KC |
2601 | else |
2602 | echo abfoo >t1 | |
2603 | echo cdfoo >t2 | |
269a7343 | 2604 | gcc_cv_prog_cmp_skip=slowcompare |
3a000df0 KC |
2605 | if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then |
2606 | if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then | |
269a7343 | 2607 | : |
3a000df0 KC |
2608 | else |
2609 | gcc_cv_prog_cmp_skip=gnucompare | |
2610 | fi | |
269a7343 KG |
2611 | fi |
2612 | if test $gcc_cv_prog_cmp_skip = slowcompare ; then | |
2613 | if cmp t1 t2 2 2 > /dev/null 2>&1; then | |
2614 | if cmp t1 t2 1 1 > /dev/null 2>&1; then | |
2615 | : | |
2616 | else | |
2617 | gcc_cv_prog_cmp_skip=fastcompare | |
2618 | fi | |
2619 | fi | |
3a000df0 KC |
2620 | fi |
2621 | rm t1 t2 | |
2622 | ||
2623 | fi | |
63cf211a NN |
2624 | |
2625 | echo "$ac_t""$gcc_cv_prog_cmp_skip" 1>&6 | |
3a000df0 KC |
2626 | make_compare_target=$gcc_cv_prog_cmp_skip |
2627 | ||
2628 | ||
2629 | ||
73458fb7 NN |
2630 | # See if we have the mktemp command. |
2631 | # Extract the first word of "mktemp", so it can be a program name with args. | |
2632 | set dummy mktemp; ac_word=$2 | |
63cf211a | 2633 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
439a7e54 | 2634 | echo "configure:2635: checking for $ac_word" >&5 |
63cf211a NN |
2635 | if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then |
2636 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2637 | else |
2638 | if test -n "$have_mktemp_command"; then | |
2639 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
2640 | else | |
63cf211a NN |
2641 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2642 | ac_dummy="$PATH" | |
2643 | for ac_dir in $ac_dummy; do | |
2644 | test -z "$ac_dir" && ac_dir=. | |
2645 | if test -f $ac_dir/$ac_word; then | |
2646 | ac_cv_prog_have_mktemp_command="yes" | |
2647 | break | |
2648 | fi | |
2649 | done | |
2650 | IFS="$ac_save_ifs" | |
73458fb7 NN |
2651 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" |
2652 | fi | |
2653 | fi | |
63cf211a | 2654 | have_mktemp_command="$ac_cv_prog_have_mktemp_command" |
73458fb7 | 2655 | if test -n "$have_mktemp_command"; then |
63cf211a | 2656 | echo "$ac_t""$have_mktemp_command" 1>&6 |
73458fb7 | 2657 | else |
63cf211a | 2658 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2659 | fi |
2660 | ||
2661 | ||
2662 | # Do we have a single-tree copy of texinfo? | |
2663 | if test -f $srcdir/../texinfo/Makefile.in; then | |
2664 | MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo' | |
2665 | gcc_cv_prog_makeinfo_modern=yes | |
63cf211a | 2666 | echo "$ac_t""Using makeinfo from the unified source tree." 1>&6 |
73458fb7 NN |
2667 | else |
2668 | # See if makeinfo has been installed and is modern enough | |
2669 | # that we can use it. | |
2670 | # Extract the first word of "makeinfo", so it can be a program name with args. | |
2671 | set dummy makeinfo; ac_word=$2 | |
63cf211a | 2672 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
439a7e54 | 2673 | echo "configure:2674: checking for $ac_word" >&5 |
63cf211a NN |
2674 | if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then |
2675 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2676 | else |
2677 | if test -n "$MAKEINFO"; then | |
2678 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
2679 | else | |
63cf211a NN |
2680 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2681 | ac_dummy="$PATH" | |
2682 | for ac_dir in $ac_dummy; do | |
2683 | test -z "$ac_dir" && ac_dir=. | |
2684 | if test -f $ac_dir/$ac_word; then | |
2685 | ac_cv_prog_MAKEINFO="makeinfo" | |
2686 | break | |
2687 | fi | |
2688 | done | |
2689 | IFS="$ac_save_ifs" | |
73458fb7 NN |
2690 | fi |
2691 | fi | |
63cf211a | 2692 | MAKEINFO="$ac_cv_prog_MAKEINFO" |
73458fb7 | 2693 | if test -n "$MAKEINFO"; then |
63cf211a | 2694 | echo "$ac_t""$MAKEINFO" 1>&6 |
73458fb7 | 2695 | else |
63cf211a | 2696 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2697 | fi |
2698 | ||
2699 | if test -n "$MAKEINFO"; then | |
2700 | # Found it, now check the version. | |
63cf211a | 2701 | echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6 |
439a7e54 | 2702 | echo "configure:2703: checking for modern makeinfo" >&5 |
63cf211a NN |
2703 | if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then |
2704 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2705 | else |
2706 | ac_prog_version=`$MAKEINFO --version 2>&1 | | |
2707 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
439a7e54 | 2708 | echo "configure:2709: version of makeinfo is $ac_prog_version" >&5 |
73458fb7 NN |
2709 | case $ac_prog_version in |
2710 | '') gcc_cv_prog_makeinfo_modern=no;; | |
2711 | 4.[2-9]*) | |
2712 | gcc_cv_prog_makeinfo_modern=yes;; | |
2713 | *) gcc_cv_prog_makeinfo_modern=no;; | |
2714 | esac | |
2715 | ||
2716 | fi | |
63cf211a NN |
2717 | |
2718 | echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6 | |
73458fb7 NN |
2719 | else |
2720 | gcc_cv_prog_makeinfo_modern=no | |
2721 | fi | |
2722 | ||
2723 | fi | |
2724 | ||
2725 | if test $gcc_cv_prog_makeinfo_modern = no; then | |
63cf211a | 2726 | echo "configure: warning: |
cafe096b | 2727 | *** Makeinfo is missing or too old. |
63cf211a | 2728 | *** Info documentation will not be built." 1>&2 |
73458fb7 NN |
2729 | BUILD_INFO= |
2730 | else | |
63cf211a | 2731 | BUILD_INFO=info |
73458fb7 NN |
2732 | fi |
2733 | ||
2734 | # Is pod2man recent enough to regenerate manpages? | |
63cf211a | 2735 | echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6 |
439a7e54 | 2736 | echo "configure:2737: checking for recent Pod::Man" >&5 |
73458fb7 | 2737 | if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then |
63cf211a NN |
2738 | echo "$ac_t""yes" 1>&6 |
2739 | GENERATED_MANPAGES=generated-manpages | |
73458fb7 | 2740 | else |
63cf211a | 2741 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2742 | GENERATED_MANPAGES= |
2743 | fi | |
2744 | ||
2745 | # How about lex? | |
2746 | if test -f $srcdir/../flex/skel.c; then | |
2747 | FLEX='$(objdir)/../flex/flex' | |
2748 | else | |
2749 | # Extract the first word of "flex", so it can be a program name with args. | |
2750 | set dummy flex; ac_word=$2 | |
63cf211a | 2751 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
439a7e54 | 2752 | echo "configure:2753: checking for $ac_word" >&5 |
63cf211a NN |
2753 | if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then |
2754 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2755 | else |
2756 | if test -n "$FLEX"; then | |
2757 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
2758 | else | |
63cf211a NN |
2759 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2760 | ac_dummy="$PATH" | |
2761 | for ac_dir in $ac_dummy; do | |
2762 | test -z "$ac_dir" && ac_dir=. | |
2763 | if test -f $ac_dir/$ac_word; then | |
2764 | ac_cv_prog_FLEX="flex" | |
2765 | break | |
2766 | fi | |
2767 | done | |
2768 | IFS="$ac_save_ifs" | |
73458fb7 NN |
2769 | test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex" |
2770 | fi | |
2771 | fi | |
63cf211a | 2772 | FLEX="$ac_cv_prog_FLEX" |
73458fb7 | 2773 | if test -n "$FLEX"; then |
63cf211a | 2774 | echo "$ac_t""$FLEX" 1>&6 |
73458fb7 | 2775 | else |
63cf211a | 2776 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2777 | fi |
2778 | ||
2779 | fi | |
2780 | ||
2781 | # Bison? | |
2782 | # The -L switch is so bison can find its skeleton file. | |
2783 | if test -f $srcdir/../bison/bison.simple; then | |
2784 | BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/' | |
2785 | else | |
2786 | # Extract the first word of "bison", so it can be a program name with args. | |
2787 | set dummy bison; ac_word=$2 | |
63cf211a | 2788 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
439a7e54 | 2789 | echo "configure:2790: checking for $ac_word" >&5 |
63cf211a NN |
2790 | if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then |
2791 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2792 | else |
2793 | if test -n "$BISON"; then | |
2794 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
2795 | else | |
63cf211a NN |
2796 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2797 | ac_dummy="$PATH" | |
2798 | for ac_dir in $ac_dummy; do | |
2799 | test -z "$ac_dir" && ac_dir=. | |
2800 | if test -f $ac_dir/$ac_word; then | |
2801 | ac_cv_prog_BISON="bison" | |
2802 | break | |
2803 | fi | |
2804 | done | |
2805 | IFS="$ac_save_ifs" | |
73458fb7 NN |
2806 | test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison" |
2807 | fi | |
2808 | fi | |
63cf211a | 2809 | BISON="$ac_cv_prog_BISON" |
73458fb7 | 2810 | if test -n "$BISON"; then |
63cf211a | 2811 | echo "$ac_t""$BISON" 1>&6 |
73458fb7 | 2812 | else |
63cf211a | 2813 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2814 | fi |
2815 | ||
2816 | fi | |
2817 | ||
2818 | # -------------------- | |
2819 | # Checks for C headers | |
2820 | # -------------------- | |
2821 | ||
63cf211a | 2822 | echo $ac_n "checking for GNU C library""... $ac_c" 1>&6 |
439a7e54 | 2823 | echo "configure:2824: checking for GNU C library" >&5 |
63cf211a NN |
2824 | if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then |
2825 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2826 | else | |
2827 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 2828 | #line 2829 "configure" |
63cf211a | 2829 | #include "confdefs.h" |
73458fb7 | 2830 | #include <features.h> |
63cf211a | 2831 | int main() { |
73458fb7 NN |
2832 | |
2833 | #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
2834 | #error Not a GNU C library system | |
2835 | #endif | |
63cf211a NN |
2836 | ; return 0; } |
2837 | EOF | |
439a7e54 | 2838 | if { (eval echo configure:2839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 2839 | rm -rf conftest* |
73458fb7 NN |
2840 | gcc_cv_glibc=yes |
2841 | else | |
63cf211a NN |
2842 | echo "configure: failed program was:" >&5 |
2843 | cat conftest.$ac_ext >&5 | |
2844 | rm -rf conftest* | |
2845 | gcc_cv_glibc=no | |
73458fb7 | 2846 | fi |
63cf211a | 2847 | rm -f conftest* |
73458fb7 NN |
2848 | fi |
2849 | ||
63cf211a | 2850 | echo "$ac_t""$gcc_cv_glibc" 1>&6 |
73458fb7 | 2851 | if test $gcc_cv_glibc = yes; then |
63cf211a | 2852 | cat >> confdefs.h <<\EOF |
73458fb7 | 2853 | #define _GNU_SOURCE 1 |
63cf211a | 2854 | EOF |
73458fb7 NN |
2855 | |
2856 | fi | |
2857 | ||
63cf211a | 2858 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
439a7e54 | 2859 | echo "configure:2860: checking for ANSI C header files" >&5 |
63cf211a NN |
2860 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
2861 | echo $ac_n "(cached) $ac_c" 1>&6 | |
956d6950 | 2862 | else |
63cf211a | 2863 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 2864 | #line 2865 "configure" |
63cf211a | 2865 | #include "confdefs.h" |
956d6950 JL |
2866 | #include <stdlib.h> |
2867 | #include <stdarg.h> | |
2868 | #include <string.h> | |
2869 | #include <float.h> | |
63cf211a NN |
2870 | EOF |
2871 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
439a7e54 | 2872 | { (eval echo configure:2873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
63cf211a NN |
2873 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2874 | if test -z "$ac_err"; then | |
2875 | rm -rf conftest* | |
956d6950 JL |
2876 | ac_cv_header_stdc=yes |
2877 | else | |
63cf211a NN |
2878 | echo "$ac_err" >&5 |
2879 | echo "configure: failed program was:" >&5 | |
2880 | cat conftest.$ac_ext >&5 | |
2881 | rm -rf conftest* | |
2882 | ac_cv_header_stdc=no | |
956d6950 | 2883 | fi |
63cf211a | 2884 | rm -f conftest* |
956d6950 JL |
2885 | |
2886 | if test $ac_cv_header_stdc = yes; then | |
2887 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
63cf211a | 2888 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 2889 | #line 2890 "configure" |
63cf211a | 2890 | #include "confdefs.h" |
956d6950 | 2891 | #include <string.h> |
63cf211a | 2892 | EOF |
956d6950 | 2893 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
63cf211a | 2894 | egrep "memchr" >/dev/null 2>&1; then |
956d6950 JL |
2895 | : |
2896 | else | |
63cf211a | 2897 | rm -rf conftest* |
956d6950 JL |
2898 | ac_cv_header_stdc=no |
2899 | fi | |
2900 | rm -f conftest* | |
2901 | ||
2902 | fi | |
2903 | ||
2904 | if test $ac_cv_header_stdc = yes; then | |
2905 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
63cf211a | 2906 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 2907 | #line 2908 "configure" |
63cf211a | 2908 | #include "confdefs.h" |
956d6950 | 2909 | #include <stdlib.h> |
63cf211a | 2910 | EOF |
956d6950 | 2911 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
63cf211a | 2912 | egrep "free" >/dev/null 2>&1; then |
956d6950 JL |
2913 | : |
2914 | else | |
63cf211a | 2915 | rm -rf conftest* |
956d6950 JL |
2916 | ac_cv_header_stdc=no |
2917 | fi | |
2918 | rm -f conftest* | |
2919 | ||
2920 | fi | |
2921 | ||
2922 | if test $ac_cv_header_stdc = yes; then | |
2923 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
63cf211a | 2924 | if test "$cross_compiling" = yes; then |
956d6950 JL |
2925 | : |
2926 | else | |
63cf211a | 2927 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 2928 | #line 2929 "configure" |
63cf211a | 2929 | #include "confdefs.h" |
956d6950 | 2930 | #include <ctype.h> |
63cf211a NN |
2931 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
2932 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
6e3f3080 | 2933 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
63cf211a NN |
2934 | int main () { int i; for (i = 0; i < 256; i++) |
2935 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
2936 | exit (0); } | |
2937 | ||
2938 | EOF | |
439a7e54 | 2939 | if { (eval echo configure:2940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
63cf211a | 2940 | then |
956d6950 JL |
2941 | : |
2942 | else | |
63cf211a NN |
2943 | echo "configure: failed program was:" >&5 |
2944 | cat conftest.$ac_ext >&5 | |
2945 | rm -fr conftest* | |
2946 | ac_cv_header_stdc=no | |
956d6950 | 2947 | fi |
63cf211a | 2948 | rm -fr conftest* |
956d6950 | 2949 | fi |
63cf211a | 2950 | |
956d6950 JL |
2951 | fi |
2952 | fi | |
6e3f3080 | 2953 | |
63cf211a NN |
2954 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
2955 | if test $ac_cv_header_stdc = yes; then | |
2956 | cat >> confdefs.h <<\EOF | |
956d6950 | 2957 | #define STDC_HEADERS 1 |
63cf211a | 2958 | EOF |
956d6950 JL |
2959 | |
2960 | fi | |
2961 | ||
63cf211a | 2962 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
439a7e54 | 2963 | echo "configure:2964: checking whether time.h and sys/time.h may both be included" >&5 |
63cf211a NN |
2964 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
2965 | echo $ac_n "(cached) $ac_c" 1>&6 | |
956d6950 | 2966 | else |
63cf211a | 2967 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 2968 | #line 2969 "configure" |
63cf211a | 2969 | #include "confdefs.h" |
956d6950 JL |
2970 | #include <sys/types.h> |
2971 | #include <sys/time.h> | |
2972 | #include <time.h> | |
63cf211a NN |
2973 | int main() { |
2974 | struct tm *tp; | |
2975 | ; return 0; } | |
2976 | EOF | |
439a7e54 | 2977 | if { (eval echo configure:2978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 2978 | rm -rf conftest* |
956d6950 JL |
2979 | ac_cv_header_time=yes |
2980 | else | |
63cf211a NN |
2981 | echo "configure: failed program was:" >&5 |
2982 | cat conftest.$ac_ext >&5 | |
2983 | rm -rf conftest* | |
2984 | ac_cv_header_time=no | |
956d6950 | 2985 | fi |
63cf211a | 2986 | rm -f conftest* |
956d6950 | 2987 | fi |
6e3f3080 | 2988 | |
63cf211a NN |
2989 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
2990 | if test $ac_cv_header_time = yes; then | |
2991 | cat >> confdefs.h <<\EOF | |
956d6950 | 2992 | #define TIME_WITH_SYS_TIME 1 |
63cf211a | 2993 | EOF |
956d6950 JL |
2994 | |
2995 | fi | |
2996 | ||
63cf211a | 2997 | echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6 |
439a7e54 | 2998 | echo "configure:2999: checking for working stdbool.h" >&5 |
63cf211a NN |
2999 | if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then |
3000 | echo $ac_n "(cached) $ac_c" 1>&6 | |
827ae6cf | 3001 | else |
63cf211a | 3002 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 3003 | #line 3004 "configure" |
63cf211a | 3004 | #include "confdefs.h" |
827ae6cf | 3005 | #include <stdbool.h> |
63cf211a | 3006 | int main() { |
827ae6cf | 3007 | bool foo = false; |
63cf211a NN |
3008 | ; return 0; } |
3009 | EOF | |
439a7e54 | 3010 | if { (eval echo configure:3011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 3011 | rm -rf conftest* |
827ae6cf RO |
3012 | ac_cv_header_stdbool_h=yes |
3013 | else | |
63cf211a NN |
3014 | echo "configure: failed program was:" >&5 |
3015 | cat conftest.$ac_ext >&5 | |
3016 | rm -rf conftest* | |
3017 | ac_cv_header_stdbool_h=no | |
827ae6cf | 3018 | fi |
63cf211a | 3019 | rm -f conftest* |
827ae6cf | 3020 | fi |
6e3f3080 | 3021 | |
63cf211a NN |
3022 | echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6 |
3023 | if test $ac_cv_header_stdbool_h = yes; then | |
3024 | cat >> confdefs.h <<\EOF | |
827ae6cf | 3025 | #define HAVE_STDBOOL_H 1 |
63cf211a | 3026 | EOF |
827ae6cf RO |
3027 | |
3028 | fi | |
3029 | ||
63cf211a | 3030 | echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6 |
439a7e54 | 3031 | echo "configure:3032: checking whether string.h and strings.h may both be included" >&5 |
63cf211a NN |
3032 | if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then |
3033 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 | 3034 | else |
63cf211a | 3035 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 3036 | #line 3037 "configure" |
63cf211a | 3037 | #include "confdefs.h" |
0a4b6309 RL |
3038 | #include <string.h> |
3039 | #include <strings.h> | |
63cf211a | 3040 | int main() { |
0a4b6309 | 3041 | |
63cf211a NN |
3042 | ; return 0; } |
3043 | EOF | |
439a7e54 | 3044 | if { (eval echo configure:3045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 3045 | rm -rf conftest* |
0a4b6309 RL |
3046 | gcc_cv_header_string=yes |
3047 | else | |
63cf211a NN |
3048 | echo "configure: failed program was:" >&5 |
3049 | cat conftest.$ac_ext >&5 | |
3050 | rm -rf conftest* | |
3051 | gcc_cv_header_string=no | |
0a4b6309 | 3052 | fi |
63cf211a | 3053 | rm -f conftest* |
0a4b6309 | 3054 | fi |
6e3f3080 | 3055 | |
63cf211a NN |
3056 | echo "$ac_t""$gcc_cv_header_string" 1>&6 |
3057 | if test $gcc_cv_header_string = yes; then | |
3058 | cat >> confdefs.h <<\EOF | |
0a4b6309 | 3059 | #define STRING_WITH_STRINGS 1 |
63cf211a | 3060 | EOF |
0a4b6309 RL |
3061 | |
3062 | fi | |
3063 | ||
63cf211a | 3064 | echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 |
439a7e54 | 3065 | echo "configure:3066: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
63cf211a NN |
3066 | if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then |
3067 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e9831ca0 | 3068 | else |
63cf211a | 3069 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 3070 | #line 3071 "configure" |
63cf211a | 3071 | #include "confdefs.h" |
e9831ca0 KG |
3072 | #include <sys/types.h> |
3073 | #include <sys/wait.h> | |
3074 | #ifndef WEXITSTATUS | |
63cf211a | 3075 | #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) |
e9831ca0 KG |
3076 | #endif |
3077 | #ifndef WIFEXITED | |
63cf211a | 3078 | #define WIFEXITED(stat_val) (((stat_val) & 255) == 0) |
e9831ca0 | 3079 | #endif |
63cf211a NN |
3080 | int main() { |
3081 | int s; | |
3082 | wait (&s); | |
3083 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
3084 | ; return 0; } | |
3085 | EOF | |
439a7e54 | 3086 | if { (eval echo configure:3087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 3087 | rm -rf conftest* |
e9831ca0 KG |
3088 | ac_cv_header_sys_wait_h=yes |
3089 | else | |
63cf211a NN |
3090 | echo "configure: failed program was:" >&5 |
3091 | cat conftest.$ac_ext >&5 | |
3092 | rm -rf conftest* | |
3093 | ac_cv_header_sys_wait_h=no | |
e9831ca0 | 3094 | fi |
63cf211a | 3095 | rm -f conftest* |
e9831ca0 | 3096 | fi |
6e3f3080 | 3097 | |
63cf211a NN |
3098 | echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 |
3099 | if test $ac_cv_header_sys_wait_h = yes; then | |
3100 | cat >> confdefs.h <<\EOF | |
e9831ca0 | 3101 | #define HAVE_SYS_WAIT_H 1 |
63cf211a | 3102 | EOF |
6e3f3080 | 3103 | |
63cf211a | 3104 | fi |
6e3f3080 | 3105 | |
63cf211a | 3106 | for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \ |
1072ec3f | 3107 | fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \ |
03c41c05 | 3108 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
56694dd9 | 3109 | direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h |
861bb6c1 | 3110 | do |
63cf211a NN |
3111 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
3112 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
439a7e54 | 3113 | echo "configure:3114: checking for $ac_hdr" >&5 |
63cf211a NN |
3114 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3115 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3116 | else | |
3117 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 3118 | #line 3119 "configure" |
63cf211a NN |
3119 | #include "confdefs.h" |
3120 | #include <$ac_hdr> | |
3121 | EOF | |
3122 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
439a7e54 | 3123 | { (eval echo configure:3124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
63cf211a NN |
3124 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3125 | if test -z "$ac_err"; then | |
3126 | rm -rf conftest* | |
3127 | eval "ac_cv_header_$ac_safe=yes" | |
3128 | else | |
3129 | echo "$ac_err" >&5 | |
3130 | echo "configure: failed program was:" >&5 | |
3131 | cat conftest.$ac_ext >&5 | |
3132 | rm -rf conftest* | |
3133 | eval "ac_cv_header_$ac_safe=no" | |
6e3f3080 | 3134 | fi |
63cf211a | 3135 | rm -f conftest* |
6e3f3080 | 3136 | fi |
63cf211a NN |
3137 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
3138 | echo "$ac_t""yes" 1>&6 | |
3139 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3140 | cat >> confdefs.h <<EOF | |
3141 | #define $ac_tr_hdr 1 | |
3142 | EOF | |
3143 | ||
3144 | else | |
3145 | echo "$ac_t""no" 1>&6 | |
956d6950 JL |
3146 | fi |
3147 | done | |
3148 | ||
3149 | ||
f24af81b | 3150 | # Check for thread headers. |
63cf211a NN |
3151 | ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'` |
3152 | echo $ac_n "checking for thread.h""... $ac_c" 1>&6 | |
439a7e54 | 3153 | echo "configure:3154: checking for thread.h" >&5 |
63cf211a NN |
3154 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3155 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3156 | else | |
3157 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 3158 | #line 3159 "configure" |
63cf211a | 3159 | #include "confdefs.h" |
6e3f3080 | 3160 | #include <thread.h> |
63cf211a NN |
3161 | EOF |
3162 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
439a7e54 | 3163 | { (eval echo configure:3164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
63cf211a NN |
3164 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3165 | if test -z "$ac_err"; then | |
3166 | rm -rf conftest* | |
3167 | eval "ac_cv_header_$ac_safe=yes" | |
3168 | else | |
3169 | echo "$ac_err" >&5 | |
3170 | echo "configure: failed program was:" >&5 | |
3171 | cat conftest.$ac_ext >&5 | |
3172 | rm -rf conftest* | |
3173 | eval "ac_cv_header_$ac_safe=no" | |
6e3f3080 | 3174 | fi |
63cf211a | 3175 | rm -f conftest* |
f24af81b | 3176 | fi |
63cf211a NN |
3177 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
3178 | echo "$ac_t""yes" 1>&6 | |
f24af81b TT |
3179 | have_thread_h=yes |
3180 | else | |
63cf211a NN |
3181 | echo "$ac_t""no" 1>&6 |
3182 | have_thread_h= | |
f24af81b TT |
3183 | fi |
3184 | ||
63cf211a NN |
3185 | ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'` |
3186 | echo $ac_n "checking for pthread.h""... $ac_c" 1>&6 | |
439a7e54 | 3187 | echo "configure:3188: checking for pthread.h" >&5 |
63cf211a NN |
3188 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3189 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f24af81b | 3190 | else |
63cf211a | 3191 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 3192 | #line 3193 "configure" |
63cf211a | 3193 | #include "confdefs.h" |
6e3f3080 | 3194 | #include <pthread.h> |
63cf211a NN |
3195 | EOF |
3196 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
439a7e54 | 3197 | { (eval echo configure:3198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
63cf211a NN |
3198 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3199 | if test -z "$ac_err"; then | |
3200 | rm -rf conftest* | |
3201 | eval "ac_cv_header_$ac_safe=yes" | |
3202 | else | |
3203 | echo "$ac_err" >&5 | |
3204 | echo "configure: failed program was:" >&5 | |
3205 | cat conftest.$ac_ext >&5 | |
3206 | rm -rf conftest* | |
3207 | eval "ac_cv_header_$ac_safe=no" | |
6e3f3080 | 3208 | fi |
63cf211a | 3209 | rm -f conftest* |
f24af81b | 3210 | fi |
63cf211a NN |
3211 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
3212 | echo "$ac_t""yes" 1>&6 | |
f24af81b TT |
3213 | have_pthread_h=yes |
3214 | else | |
63cf211a NN |
3215 | echo "$ac_t""no" 1>&6 |
3216 | have_pthread_h= | |
f24af81b TT |
3217 | fi |
3218 | ||
3219 | ||
84c041a1 | 3220 | # These tests can't be done till we know if we have limits.h. |
63cf211a | 3221 | echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6 |
439a7e54 | 3222 | echo "configure:3223: checking for CHAR_BIT" >&5 |
63cf211a NN |
3223 | if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then |
3224 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3225 | else | |
3226 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 3227 | #line 3228 "configure" |
63cf211a | 3228 | #include "confdefs.h" |
75e93faa ZW |
3229 | #ifdef HAVE_LIMITS_H |
3230 | #include <limits.h> | |
3231 | #endif | |
3232 | #ifdef CHAR_BIT | |
3233 | found | |
3234 | #endif | |
63cf211a | 3235 | EOF |
75e93faa | 3236 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
63cf211a NN |
3237 | egrep "found" >/dev/null 2>&1; then |
3238 | rm -rf conftest* | |
75e93faa ZW |
3239 | gcc_cv_decl_char_bit=yes |
3240 | else | |
63cf211a | 3241 | rm -rf conftest* |
75e93faa ZW |
3242 | gcc_cv_decl_char_bit=no |
3243 | fi | |
3244 | rm -f conftest* | |
3245 | ||
3246 | ||
3247 | fi | |
63cf211a NN |
3248 | |
3249 | echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6 | |
75e93faa | 3250 | if test $gcc_cv_decl_char_bit = no; then |
63cf211a | 3251 | echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6 |
439a7e54 | 3252 | echo "configure:3253: checking number of bits in a byte" >&5 |
63cf211a NN |
3253 | if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then |
3254 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa ZW |
3255 | else |
3256 | i=8 | |
3257 | gcc_cv_c_nbby= | |
3258 | while test $i -lt 65; do | |
63cf211a | 3259 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 3260 | #line 3261 "configure" |
63cf211a NN |
3261 | #include "confdefs.h" |
3262 | ||
3263 | int main() { | |
4e70264f ZW |
3264 | switch(0) { |
3265 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
3266 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
3267 | ; } | |
63cf211a NN |
3268 | ; return 0; } |
3269 | EOF | |
439a7e54 | 3270 | if { (eval echo configure:3271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 3271 | rm -rf conftest* |
4e70264f | 3272 | gcc_cv_c_nbby=$i; break |
75e93faa | 3273 | else |
63cf211a NN |
3274 | echo "configure: failed program was:" >&5 |
3275 | cat conftest.$ac_ext >&5 | |
75e93faa | 3276 | fi |
63cf211a | 3277 | rm -f conftest* |
75e93faa ZW |
3278 | i=`expr $i + 1` |
3279 | done | |
3280 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
3281 | ||
3282 | fi | |
63cf211a NN |
3283 | |
3284 | echo "$ac_t""$gcc_cv_c_nbby" 1>&6 | |
75e93faa | 3285 | if test $gcc_cv_c_nbby = failed; then |
63cf211a | 3286 | { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; } |
75e93faa | 3287 | else |
63cf211a | 3288 | cat >> confdefs.h <<EOF |
75e93faa | 3289 | #define CHAR_BIT $gcc_cv_c_nbby |
63cf211a | 3290 | EOF |
75e93faa ZW |
3291 | |
3292 | fi | |
3293 | fi | |
63cf211a | 3294 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
439a7e54 | 3295 | echo "configure:3296: checking whether byte ordering is bigendian" >&5 |
63cf211a NN |
3296 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
3297 | echo $ac_n "(cached) $ac_c" 1>&6 | |
84c041a1 | 3298 | else |
4977bab6 ZW |
3299 | ac_cv_c_bigendian=unknown |
3300 | # See if sys/param.h defines the BYTE_ORDER macro. | |
63cf211a | 3301 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 3302 | #line 3303 "configure" |
63cf211a | 3303 | #include "confdefs.h" |
4977bab6 ZW |
3304 | #include <sys/types.h> |
3305 | #include <sys/param.h> | |
63cf211a | 3306 | int main() { |
2d6eb5bf | 3307 | |
4977bab6 ZW |
3308 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
3309 | bogus endian macros | |
84c041a1 | 3310 | #endif |
63cf211a NN |
3311 | ; return 0; } |
3312 | EOF | |
439a7e54 | 3313 | if { (eval echo configure:3314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 3314 | rm -rf conftest* |
4977bab6 | 3315 | # It does; now see whether it defined to BIG_ENDIAN or not. |
63cf211a | 3316 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 3317 | #line 3318 "configure" |
63cf211a | 3318 | #include "confdefs.h" |
4977bab6 ZW |
3319 | #include <sys/types.h> |
3320 | #include <sys/param.h> | |
63cf211a | 3321 | int main() { |
4977bab6 ZW |
3322 | |
3323 | #if BYTE_ORDER != BIG_ENDIAN | |
3324 | not big endian | |
84c041a1 | 3325 | #endif |
63cf211a NN |
3326 | ; return 0; } |
3327 | EOF | |
439a7e54 | 3328 | if { (eval echo configure:3329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 3329 | rm -rf conftest* |
4977bab6 ZW |
3330 | ac_cv_c_bigendian=yes |
3331 | else | |
63cf211a NN |
3332 | echo "configure: failed program was:" >&5 |
3333 | cat conftest.$ac_ext >&5 | |
3334 | rm -rf conftest* | |
3335 | ac_cv_c_bigendian=no | |
4977bab6 | 3336 | fi |
63cf211a | 3337 | rm -f conftest* |
4977bab6 | 3338 | else |
63cf211a NN |
3339 | echo "configure: failed program was:" >&5 |
3340 | cat conftest.$ac_ext >&5 | |
4977bab6 | 3341 | fi |
63cf211a | 3342 | rm -f conftest* |
4977bab6 ZW |
3343 | if test $ac_cv_c_bigendian = unknown; then |
3344 | if test "$cross_compiling" = yes; then | |
63cf211a NN |
3345 | echo $ac_n "cross-compiling... " 2>&6 |
3346 | else | |
3347 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 3348 | #line 3349 "configure" |
63cf211a | 3349 | #include "confdefs.h" |
4977bab6 ZW |
3350 | main () { |
3351 | /* Are we little or big endian? From Harbison&Steele. */ | |
3352 | union | |
3353 | { | |
3354 | long l; | |
3355 | char c[sizeof (long)]; | |
3356 | } u; | |
3357 | u.l = 1; | |
3358 | exit (u.c[sizeof (long) - 1] == 1); | |
3359 | } | |
63cf211a | 3360 | EOF |
439a7e54 | 3361 | if { (eval echo configure:3362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
63cf211a | 3362 | then |
4977bab6 ZW |
3363 | ac_cv_c_bigendian=no |
3364 | else | |
63cf211a NN |
3365 | echo "configure: failed program was:" >&5 |
3366 | cat conftest.$ac_ext >&5 | |
3367 | rm -fr conftest* | |
3368 | ac_cv_c_bigendian=yes | |
4977bab6 | 3369 | fi |
63cf211a | 3370 | rm -fr conftest* |
84c041a1 | 3371 | fi |
63cf211a | 3372 | |
4977bab6 ZW |
3373 | fi |
3374 | fi | |
63cf211a NN |
3375 | |
3376 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 | |
4977bab6 | 3377 | if test $ac_cv_c_bigendian = unknown; then |
63cf211a | 3378 | echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6 |
439a7e54 | 3379 | echo "configure:3380: checking to probe for byte ordering" >&5 |
2d6eb5bf | 3380 | |
4977bab6 ZW |
3381 | cat >conftest.c <<EOF |
3382 | short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
3383 | short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
3384 | void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; } | |
3385 | short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
3386 | short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
3387 | void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; } | |
3388 | int main() { _ascii (); _ebcdic (); return 0; } | |
3389 | EOF | |
3390 | if test -f conftest.c ; then | |
3391 | if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then | |
3392 | if test `grep -l BIGenDianSyS conftest.o` ; then | |
3393 | echo $ac_n ' big endian probe OK, ' 1>&6 | |
3394 | ac_cv_c_bigendian=yes | |
3395 | fi | |
3396 | if test `grep -l LiTTleEnDian conftest.o` ; then | |
3397 | echo $ac_n ' little endian probe OK, ' 1>&6 | |
3398 | if test $ac_cv_c_bigendian = yes ; then | |
3399 | ac_cv_c_bigendian=unknown; | |
3400 | else | |
3401 | ac_cv_c_bigendian=no | |
3402 | fi | |
3403 | fi | |
3404 | echo $ac_n 'guessing bigendian ... ' >&6 | |
3405 | fi | |
3406 | fi | |
63cf211a | 3407 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
84c041a1 | 3408 | fi |
4977bab6 | 3409 | if test $ac_cv_c_bigendian = yes; then |
63cf211a | 3410 | cat >> confdefs.h <<\EOF |
4977bab6 | 3411 | #define WORDS_BIGENDIAN 1 |
63cf211a | 3412 | EOF |
cafe096b | 3413 | |
63cf211a | 3414 | cat >> confdefs.h <<\EOF |
84c041a1 | 3415 | #define HOST_WORDS_BIG_ENDIAN 1 |
63cf211a | 3416 | EOF |
84c041a1 | 3417 | |
4977bab6 ZW |
3418 | BYTEORDER=4321 |
3419 | else | |
3420 | BYTEORDER=1234 | |
3421 | fi | |
63cf211a | 3422 | cat >> confdefs.h <<EOF |
4977bab6 | 3423 | #define BYTEORDER $BYTEORDER |
63cf211a | 3424 | EOF |
4977bab6 ZW |
3425 | |
3426 | if test $ac_cv_c_bigendian = unknown; then | |
63cf211a | 3427 | { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; } |
84c041a1 ZW |
3428 | fi |
3429 | ||
75e93faa | 3430 | |
73458fb7 NN |
3431 | # -------- |
3432 | # UNSORTED | |
3433 | # -------- | |
1e608388 | 3434 | |
73458fb7 NN |
3435 | # Stage specific cflags for build. |
3436 | stage1_cflags= | |
3437 | case $build in | |
3438 | vax-*-*) | |
3439 | if test x$GCC = xyes | |
3440 | then | |
3441 | stage1_cflags="-Wa,-J" | |
3442 | else | |
3443 | stage1_cflags="-J" | |
3444 | fi | |
3445 | ;; | |
3446 | powerpc-*-darwin*) | |
3447 | # The spiffy cpp-precomp chokes on some legitimate constructs in GCC | |
3448 | # sources; use -no-cpp-precomp to get to GNU cpp. | |
3449 | # Apple's GCC has bugs in designated initializer handling, so disable | |
3450 | # that too. | |
3451 | stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0" | |
3452 | ;; | |
3453 | esac | |
1e608388 | 3454 | |
1e608388 | 3455 | |
4e70264f ZW |
3456 | # These libraries may be used by collect2. |
3457 | # We may need a special search path to get them linked. | |
63cf211a | 3458 | echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6 |
439a7e54 | 3459 | echo "configure:3460: checking for collect2 libraries" >&5 |
63cf211a NN |
3460 | if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then |
3461 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4e70264f ZW |
3462 | else |
3463 | save_LIBS="$LIBS" | |
7f2749d4 | 3464 | for libs in '' -lld -lmld \ |
4e70264f ZW |
3465 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
3466 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
3467 | do | |
3468 | LIBS="$libs" | |
63cf211a | 3469 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 3470 | #line 3471 "configure" |
63cf211a | 3471 | #include "confdefs.h" |
4e70264f ZW |
3472 | /* Override any gcc2 internal prototype to avoid an error. */ |
3473 | /* We use char because int might match the return type of a gcc2 | |
63cf211a NN |
3474 | builtin and then its argument prototype would still apply. */ |
3475 | char ldopen(); | |
3476 | ||
3477 | int main() { | |
3478 | ldopen() | |
3479 | ; return 0; } | |
3480 | EOF | |
439a7e54 | 3481 | if { (eval echo configure:3482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
63cf211a | 3482 | rm -rf conftest* |
4e70264f ZW |
3483 | gcc_cv_collect2_libs="$libs"; break |
3484 | else | |
63cf211a NN |
3485 | echo "configure: failed program was:" >&5 |
3486 | cat conftest.$ac_ext >&5 | |
4e70264f | 3487 | fi |
63cf211a | 3488 | rm -f conftest* |
4e70264f ZW |
3489 | done |
3490 | LIBS="$save_LIBS" | |
3491 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
3492 | fi | |
63cf211a NN |
3493 | |
3494 | echo "$ac_t""$gcc_cv_collect2_libs" 1>&6 | |
4e70264f ZW |
3495 | case $gcc_cv_collect2_libs in |
3496 | "none required") ;; | |
3497 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
3498 | esac | |
3499 | ||
3500 | ||
7f2749d4 RK |
3501 | # When building Ada code on Alpha, we need exc_resume which is usually in |
3502 | # -lexc. So test for it. | |
3503 | save_LIBS="$LIBS" | |
3504 | LIBS= | |
3505 | ||
63cf211a | 3506 | echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6 |
439a7e54 | 3507 | echo "configure:3508: checking for library containing exc_resume" >&5 |
63cf211a NN |
3508 | if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then |
3509 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3510 | else | |
3511 | ac_func_search_save_LIBS="$LIBS" | |
3512 | ac_cv_search_exc_resume="no" | |
3513 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 3514 | #line 3515 "configure" |
63cf211a | 3515 | #include "confdefs.h" |
7f2749d4 RK |
3516 | /* Override any gcc2 internal prototype to avoid an error. */ |
3517 | /* We use char because int might match the return type of a gcc2 | |
63cf211a NN |
3518 | builtin and then its argument prototype would still apply. */ |
3519 | char exc_resume(); | |
3520 | ||
3521 | int main() { | |
3522 | exc_resume() | |
3523 | ; return 0; } | |
3524 | EOF | |
439a7e54 | 3525 | if { (eval echo configure:3526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
63cf211a | 3526 | rm -rf conftest* |
7f2749d4 RK |
3527 | ac_cv_search_exc_resume="none required" |
3528 | else | |
63cf211a NN |
3529 | echo "configure: failed program was:" >&5 |
3530 | cat conftest.$ac_ext >&5 | |
7f2749d4 | 3531 | fi |
63cf211a NN |
3532 | rm -f conftest* |
3533 | test "$ac_cv_search_exc_resume" = "no" && for i in exc; do | |
3534 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3535 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 3536 | #line 3537 "configure" |
63cf211a | 3537 | #include "confdefs.h" |
7f2749d4 RK |
3538 | /* Override any gcc2 internal prototype to avoid an error. */ |
3539 | /* We use char because int might match the return type of a gcc2 | |
63cf211a NN |
3540 | builtin and then its argument prototype would still apply. */ |
3541 | char exc_resume(); | |
3542 | ||
3543 | int main() { | |
3544 | exc_resume() | |
3545 | ; return 0; } | |
3546 | EOF | |
439a7e54 | 3547 | if { (eval echo configure:3548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
63cf211a NN |
3548 | rm -rf conftest* |
3549 | ac_cv_search_exc_resume="-l$i" | |
7f2749d4 RK |
3550 | break |
3551 | else | |
63cf211a NN |
3552 | echo "configure: failed program was:" >&5 |
3553 | cat conftest.$ac_ext >&5 | |
cafe096b | 3554 | fi |
63cf211a NN |
3555 | rm -f conftest* |
3556 | done | |
3557 | LIBS="$ac_func_search_save_LIBS" | |
6e3f3080 | 3558 | fi |
6e3f3080 | 3559 | |
63cf211a NN |
3560 | echo "$ac_t""$ac_cv_search_exc_resume" 1>&6 |
3561 | if test "$ac_cv_search_exc_resume" != "no"; then | |
3562 | test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS" | |
3563 | ||
3564 | else : | |
3565 | ||
7f2749d4 RK |
3566 | fi |
3567 | GNAT_LIBEXC="$LIBS" | |
3568 | LIBS="$save_LIBS" | |
3569 | ||
3570 | ||
62c9aa5f ZW |
3571 | # Some systems put ldexp and frexp in libm instead of libc; assume |
3572 | # they're both in the same place. jcf-dump needs them. | |
3573 | save_LIBS="$LIBS" | |
3574 | LIBS= | |
3575 | ||
63cf211a | 3576 | echo $ac_n "checking for library containing ldexp""... $ac_c" 1>&6 |
439a7e54 | 3577 | echo "configure:3578: checking for library containing ldexp" >&5 |
63cf211a NN |
3578 | if eval "test \"`echo '$''{'ac_cv_search_ldexp'+set}'`\" = set"; then |
3579 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3580 | else | |
3581 | ac_func_search_save_LIBS="$LIBS" | |
3582 | ac_cv_search_ldexp="no" | |
3583 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 3584 | #line 3585 "configure" |
63cf211a | 3585 | #include "confdefs.h" |
62c9aa5f ZW |
3586 | /* Override any gcc2 internal prototype to avoid an error. */ |
3587 | /* We use char because int might match the return type of a gcc2 | |
63cf211a NN |
3588 | builtin and then its argument prototype would still apply. */ |
3589 | char ldexp(); | |
3590 | ||
3591 | int main() { | |
3592 | ldexp() | |
3593 | ; return 0; } | |
3594 | EOF | |
439a7e54 | 3595 | if { (eval echo configure:3596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
63cf211a | 3596 | rm -rf conftest* |
62c9aa5f ZW |
3597 | ac_cv_search_ldexp="none required" |
3598 | else | |
63cf211a NN |
3599 | echo "configure: failed program was:" >&5 |
3600 | cat conftest.$ac_ext >&5 | |
62c9aa5f | 3601 | fi |
63cf211a NN |
3602 | rm -f conftest* |
3603 | test "$ac_cv_search_ldexp" = "no" && for i in m; do | |
3604 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3605 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 3606 | #line 3607 "configure" |
63cf211a | 3607 | #include "confdefs.h" |
62c9aa5f ZW |
3608 | /* Override any gcc2 internal prototype to avoid an error. */ |
3609 | /* We use char because int might match the return type of a gcc2 | |
63cf211a NN |
3610 | builtin and then its argument prototype would still apply. */ |
3611 | char ldexp(); | |
3612 | ||
3613 | int main() { | |
3614 | ldexp() | |
3615 | ; return 0; } | |
3616 | EOF | |
439a7e54 | 3617 | if { (eval echo configure:3618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
63cf211a NN |
3618 | rm -rf conftest* |
3619 | ac_cv_search_ldexp="-l$i" | |
62c9aa5f ZW |
3620 | break |
3621 | else | |
63cf211a NN |
3622 | echo "configure: failed program was:" >&5 |
3623 | cat conftest.$ac_ext >&5 | |
cafe096b | 3624 | fi |
63cf211a NN |
3625 | rm -f conftest* |
3626 | done | |
3627 | LIBS="$ac_func_search_save_LIBS" | |
6e3f3080 | 3628 | fi |
6e3f3080 | 3629 | |
63cf211a NN |
3630 | echo "$ac_t""$ac_cv_search_ldexp" 1>&6 |
3631 | if test "$ac_cv_search_ldexp" != "no"; then | |
3632 | test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS" | |
3633 | ||
3634 | else : | |
3635 | ||
62c9aa5f ZW |
3636 | fi |
3637 | LDEXP_LIB="$LIBS" | |
3638 | LIBS="$save_LIBS" | |
3639 | ||
3640 | ||
956d6950 JL |
3641 | # Use <inttypes.h> only if it exists, |
3642 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
63cf211a | 3643 | echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6 |
439a7e54 | 3644 | echo "configure:3645: checking for inttypes.h" >&5 |
63cf211a NN |
3645 | if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then |
3646 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3647 | else | |
3648 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 3649 | #line 3650 "configure" |
63cf211a | 3650 | #include "confdefs.h" |
956d6950 JL |
3651 | #include <sys/types.h> |
3652 | #include <inttypes.h> | |
63cf211a | 3653 | int main() { |
956d6950 | 3654 | intmax_t i = -1; |
63cf211a NN |
3655 | ; return 0; } |
3656 | EOF | |
439a7e54 | 3657 | if { (eval echo configure:3658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 3658 | rm -rf conftest* |
0056a9b5 | 3659 | gcc_cv_header_inttypes_h=yes |
956d6950 | 3660 | else |
63cf211a NN |
3661 | echo "configure: failed program was:" >&5 |
3662 | cat conftest.$ac_ext >&5 | |
3663 | rm -rf conftest* | |
3664 | gcc_cv_header_inttypes_h=no | |
956d6950 | 3665 | fi |
63cf211a | 3666 | rm -f conftest* |
956d6950 JL |
3667 | fi |
3668 | ||
63cf211a | 3669 | echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6 |
0056a9b5 | 3670 | if test $gcc_cv_header_inttypes_h = yes; then |
63cf211a | 3671 | cat >> confdefs.h <<\EOF |
0056a9b5 | 3672 | #define HAVE_INTTYPES_H 1 |
63cf211a | 3673 | EOF |
0056a9b5 KG |
3674 | |
3675 | fi | |
956d6950 | 3676 | |
c149cc37 | 3677 | |
6af8c740 KG |
3678 | for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \ |
3679 | sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \ | |
4e87a651 | 3680 | fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \ |
56694dd9 ZW |
3681 | scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore \ |
3682 | setlocale | |
956d6950 | 3683 | do |
63cf211a | 3684 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
439a7e54 | 3685 | echo "configure:3686: checking for $ac_func" >&5 |
63cf211a NN |
3686 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3687 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3688 | else | |
3689 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 3690 | #line 3691 "configure" |
63cf211a | 3691 | #include "confdefs.h" |
956d6950 | 3692 | /* System header to define __stub macros and hopefully few prototypes, |
63cf211a NN |
3693 | which can conflict with char $ac_func(); below. */ |
3694 | #include <assert.h> | |
6e3f3080 | 3695 | /* Override any gcc2 internal prototype to avoid an error. */ |
6e3f3080 | 3696 | /* We use char because int might match the return type of a gcc2 |
63cf211a NN |
3697 | builtin and then its argument prototype would still apply. */ |
3698 | char $ac_func(); | |
3699 | ||
3700 | int main() { | |
3701 | ||
956d6950 JL |
3702 | /* The GNU C library defines this for functions which it implements |
3703 | to always fail with ENOSYS. Some functions are actually named | |
3704 | something starting with __ and the normal name is an alias. */ | |
3705 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3706 | choke me | |
3707 | #else | |
63cf211a | 3708 | $ac_func(); |
956d6950 JL |
3709 | #endif |
3710 | ||
63cf211a NN |
3711 | ; return 0; } |
3712 | EOF | |
439a7e54 | 3713 | if { (eval echo configure:3714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
63cf211a NN |
3714 | rm -rf conftest* |
3715 | eval "ac_cv_func_$ac_func=yes" | |
3716 | else | |
3717 | echo "configure: failed program was:" >&5 | |
3718 | cat conftest.$ac_ext >&5 | |
3719 | rm -rf conftest* | |
3720 | eval "ac_cv_func_$ac_func=no" | |
3721 | fi | |
3722 | rm -f conftest* | |
3723 | fi | |
956d6950 | 3724 | |
63cf211a NN |
3725 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
3726 | echo "$ac_t""yes" 1>&6 | |
3727 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3728 | cat >> confdefs.h <<EOF | |
3729 | #define $ac_tr_func 1 | |
3730 | EOF | |
3731 | ||
3732 | else | |
3733 | echo "$ac_t""no" 1>&6 | |
956d6950 JL |
3734 | fi |
3735 | done | |
3736 | ||
6885fc87 | 3737 | |
39f6c4c8 | 3738 | if test x$ac_cv_func_mbstowcs = xyes; then |
63cf211a | 3739 | echo $ac_n "checking whether mbstowcs works""... $ac_c" 1>&6 |
439a7e54 | 3740 | echo "configure:3741: checking whether mbstowcs works" >&5 |
63cf211a NN |
3741 | if eval "test \"`echo '$''{'gcc_cv_func_mbstowcs_works'+set}'`\" = set"; then |
3742 | echo $ac_n "(cached) $ac_c" 1>&6 | |
39f6c4c8 KW |
3743 | else |
3744 | if test "$cross_compiling" = yes; then | |
3745 | gcc_cv_func_mbstowcs_works=yes | |
3746 | else | |
63cf211a | 3747 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 3748 | #line 3749 "configure" |
63cf211a | 3749 | #include "confdefs.h" |
39f6c4c8 KW |
3750 | #include <stdlib.h> |
3751 | int main() | |
3752 | { | |
3753 | mbstowcs(0, "", 0); | |
3754 | return 0; | |
3755 | } | |
63cf211a | 3756 | EOF |
439a7e54 | 3757 | if { (eval echo configure:3758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
63cf211a | 3758 | then |
39f6c4c8 KW |
3759 | gcc_cv_func_mbstowcs_works=yes |
3760 | else | |
63cf211a NN |
3761 | echo "configure: failed program was:" >&5 |
3762 | cat conftest.$ac_ext >&5 | |
3763 | rm -fr conftest* | |
3764 | gcc_cv_func_mbstowcs_works=no | |
39f6c4c8 | 3765 | fi |
63cf211a | 3766 | rm -fr conftest* |
39f6c4c8 | 3767 | fi |
63cf211a | 3768 | |
39f6c4c8 | 3769 | fi |
6e3f3080 | 3770 | |
63cf211a NN |
3771 | echo "$ac_t""$gcc_cv_func_mbstowcs_works" 1>&6 |
3772 | if test x$gcc_cv_func_mbstowcs_works = xyes; then | |
3773 | cat >> confdefs.h <<\EOF | |
39f6c4c8 | 3774 | #define HAVE_WORKING_MBSTOWCS 1 |
63cf211a | 3775 | EOF |
39f6c4c8 KW |
3776 | |
3777 | fi | |
3778 | fi | |
3779 | ||
63cf211a | 3780 | echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 |
439a7e54 | 3781 | echo "configure:3782: checking for ssize_t" >&5 |
63cf211a NN |
3782 | if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then |
3783 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3784 | else | |
3785 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 3786 | #line 3787 "configure" |
63cf211a NN |
3787 | #include "confdefs.h" |
3788 | #include <sys/types.h> | |
3789 | #if STDC_HEADERS | |
3790 | #include <stdlib.h> | |
3791 | #include <stddef.h> | |
3792 | #endif | |
3793 | EOF | |
3794 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3795 | egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
3796 | rm -rf conftest* | |
cb65112a | 3797 | ac_cv_type_ssize_t=yes |
f12bc141 | 3798 | else |
63cf211a NN |
3799 | rm -rf conftest* |
3800 | ac_cv_type_ssize_t=no | |
093e61a6 | 3801 | fi |
63cf211a | 3802 | rm -f conftest* |
6e3f3080 | 3803 | |
63cf211a NN |
3804 | fi |
3805 | echo "$ac_t""$ac_cv_type_ssize_t" 1>&6 | |
3806 | if test $ac_cv_type_ssize_t = no; then | |
3807 | cat >> confdefs.h <<\EOF | |
f12bc141 | 3808 | #define ssize_t int |
63cf211a | 3809 | EOF |
f12bc141 ZW |
3810 | |
3811 | fi | |
3812 | ||
0b9d02c6 | 3813 | |
e256b8b6 DA |
3814 | # Try to determine the array type of the second argument of getgroups |
3815 | # for the target system (int or gid_t). | |
63cf211a | 3816 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
439a7e54 | 3817 | echo "configure:3818: checking for uid_t in sys/types.h" >&5 |
63cf211a NN |
3818 | if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then |
3819 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3820 | else | |
3821 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 3822 | #line 3823 "configure" |
63cf211a | 3823 | #include "confdefs.h" |
e256b8b6 | 3824 | #include <sys/types.h> |
63cf211a | 3825 | EOF |
e256b8b6 | 3826 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
63cf211a NN |
3827 | egrep "uid_t" >/dev/null 2>&1; then |
3828 | rm -rf conftest* | |
e256b8b6 DA |
3829 | ac_cv_type_uid_t=yes |
3830 | else | |
63cf211a | 3831 | rm -rf conftest* |
e256b8b6 DA |
3832 | ac_cv_type_uid_t=no |
3833 | fi | |
3834 | rm -f conftest* | |
3835 | ||
3836 | fi | |
6e3f3080 | 3837 | |
63cf211a NN |
3838 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 |
3839 | if test $ac_cv_type_uid_t = no; then | |
3840 | cat >> confdefs.h <<\EOF | |
e256b8b6 | 3841 | #define uid_t int |
63cf211a | 3842 | EOF |
cafe096b | 3843 | |
63cf211a | 3844 | cat >> confdefs.h <<\EOF |
e256b8b6 | 3845 | #define gid_t int |
63cf211a | 3846 | EOF |
e256b8b6 DA |
3847 | |
3848 | fi | |
3849 | ||
63cf211a | 3850 | echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 |
439a7e54 | 3851 | echo "configure:3852: checking type of array argument to getgroups" >&5 |
63cf211a NN |
3852 | if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then |
3853 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e256b8b6 DA |
3854 | else |
3855 | if test "$cross_compiling" = yes; then | |
3856 | ac_cv_type_getgroups=cross | |
3857 | else | |
63cf211a | 3858 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 3859 | #line 3860 "configure" |
63cf211a NN |
3860 | #include "confdefs.h" |
3861 | ||
e256b8b6 DA |
3862 | /* Thanks to Mike Rendell for this test. */ |
3863 | #include <sys/types.h> | |
3864 | #define NGID 256 | |
3865 | #undef MAX | |
3866 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
63cf211a | 3867 | main() |
e256b8b6 DA |
3868 | { |
3869 | gid_t gidset[NGID]; | |
3870 | int i, n; | |
3871 | union { gid_t gval; long lval; } val; | |
3872 | ||
3873 | val.lval = -1; | |
3874 | for (i = 0; i < NGID; i++) | |
3875 | gidset[i] = val.gval; | |
3876 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
e1366e0c | 3877 | gidset); |
e256b8b6 DA |
3878 | /* Exit non-zero if getgroups seems to require an array of ints. This |
3879 | happens when gid_t is short but getgroups modifies an array of ints. */ | |
3880 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
63cf211a | 3881 | } |
6e3f3080 | 3882 | |
63cf211a | 3883 | EOF |
439a7e54 | 3884 | if { (eval echo configure:3885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
63cf211a NN |
3885 | then |
3886 | ac_cv_type_getgroups=gid_t | |
3887 | else | |
3888 | echo "configure: failed program was:" >&5 | |
3889 | cat conftest.$ac_ext >&5 | |
3890 | rm -fr conftest* | |
3891 | ac_cv_type_getgroups=int | |
e256b8b6 | 3892 | fi |
63cf211a | 3893 | rm -fr conftest* |
e256b8b6 | 3894 | fi |
63cf211a | 3895 | |
e256b8b6 | 3896 | if test $ac_cv_type_getgroups = cross; then |
63cf211a | 3897 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 3898 | #line 3899 "configure" |
63cf211a | 3899 | #include "confdefs.h" |
e256b8b6 | 3900 | #include <unistd.h> |
63cf211a | 3901 | EOF |
e256b8b6 | 3902 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
63cf211a NN |
3903 | egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then |
3904 | rm -rf conftest* | |
e256b8b6 DA |
3905 | ac_cv_type_getgroups=gid_t |
3906 | else | |
63cf211a | 3907 | rm -rf conftest* |
e256b8b6 DA |
3908 | ac_cv_type_getgroups=int |
3909 | fi | |
3910 | rm -f conftest* | |
3911 | ||
3912 | fi | |
3913 | fi | |
3914 | ||
63cf211a NN |
3915 | echo "$ac_t""$ac_cv_type_getgroups" 1>&6 |
3916 | cat >> confdefs.h <<EOF | |
e256b8b6 | 3917 | #define GETGROUPS_T $ac_cv_type_getgroups |
63cf211a | 3918 | EOF |
e256b8b6 DA |
3919 | |
3920 | ||
3921 | if test "${target}" = "${build}"; then | |
3922 | TARGET_GETGROUPS_T=$ac_cv_type_getgroups | |
3923 | else | |
3924 | case "${target}" in | |
3925 | # This condition may need some tweaking. It should include all | |
3926 | # targets where the array type of the second argument of getgroups | |
3927 | # is int and the type of gid_t is not equivalent to int. | |
3928 | *-*-sunos* | *-*-ultrix*) | |
3929 | TARGET_GETGROUPS_T=int | |
3930 | ;; | |
3931 | *) | |
3932 | TARGET_GETGROUPS_T=gid_t | |
3933 | ;; | |
3934 | esac | |
3935 | fi | |
3936 | ||
3937 | ||
63cf211a | 3938 | echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6 |
439a7e54 | 3939 | echo "configure:3940: checking whether the printf functions support %p" >&5 |
63cf211a NN |
3940 | if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then |
3941 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 RL |
3942 | else |
3943 | if test "$cross_compiling" = yes; then | |
3944 | gcc_cv_func_printf_ptr=no | |
3945 | else | |
63cf211a | 3946 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 3947 | #line 3948 "configure" |
63cf211a | 3948 | #include "confdefs.h" |
0a4b6309 RL |
3949 | #include <stdio.h> |
3950 | ||
86cf1cbd | 3951 | int main() |
0a4b6309 RL |
3952 | { |
3953 | char buf[64]; | |
3954 | char *p = buf, *q = NULL; | |
3955 | sprintf(buf, "%p", p); | |
3956 | sscanf(buf, "%p", &q); | |
86cf1cbd | 3957 | return (p != q); |
0a4b6309 | 3958 | } |
63cf211a | 3959 | EOF |
439a7e54 | 3960 | if { (eval echo configure:3961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
63cf211a | 3961 | then |
0a4b6309 RL |
3962 | gcc_cv_func_printf_ptr=yes |
3963 | else | |
63cf211a NN |
3964 | echo "configure: failed program was:" >&5 |
3965 | cat conftest.$ac_ext >&5 | |
3966 | rm -fr conftest* | |
3967 | gcc_cv_func_printf_ptr=no | |
0a4b6309 | 3968 | fi |
63cf211a | 3969 | rm -fr conftest* |
0a4b6309 | 3970 | fi |
63cf211a | 3971 | |
0a4b6309 RL |
3972 | rm -f core core.* *.core |
3973 | fi | |
6e3f3080 | 3974 | |
63cf211a NN |
3975 | echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6 |
3976 | if test $gcc_cv_func_printf_ptr = yes ; then | |
3977 | cat >> confdefs.h <<\EOF | |
0a4b6309 | 3978 | #define HAVE_PRINTF_PTR 1 |
63cf211a | 3979 | EOF |
0a4b6309 RL |
3980 | |
3981 | fi | |
3982 | ||
1072ec3f ZW |
3983 | if test $ac_cv_header_sys_mman_h != yes \ |
3984 | || test $ac_cv_func_mmap != yes; then | |
3985 | gcc_cv_func_mmap_file=no | |
3986 | gcc_cv_func_mmap_dev_zero=no | |
3987 | gcc_cv_func_mmap_anon=no | |
3988 | else | |
63cf211a | 3989 | echo $ac_n "checking whether read-only mmap of a plain file works""... $ac_c" 1>&6 |
439a7e54 | 3990 | echo "configure:3991: checking whether read-only mmap of a plain file works" >&5 |
63cf211a NN |
3991 | if eval "test \"`echo '$''{'gcc_cv_func_mmap_file'+set}'`\" = set"; then |
3992 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1072ec3f | 3993 | else |
63cf211a | 3994 | # Add a system to this blacklist if |
1072ec3f ZW |
3995 | # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a |
3996 | # memory area containing the same data that you'd get if you applied | |
3997 | # read() to the same fd. The only system known to have a problem here | |
3998 | # is VMS, where text files have record structure. | |
3999 | case "$host_os" in | |
63cf211a | 4000 | vms* | ultrix*) |
1072ec3f ZW |
4001 | gcc_cv_func_mmap_file=no ;; |
4002 | *) | |
4003 | gcc_cv_func_mmap_file=yes;; | |
4004 | esac | |
4005 | fi | |
63cf211a NN |
4006 | |
4007 | echo "$ac_t""$gcc_cv_func_mmap_file" 1>&6 | |
4008 | echo $ac_n "checking whether mmap from /dev/zero works""... $ac_c" 1>&6 | |
439a7e54 | 4009 | echo "configure:4010: checking whether mmap from /dev/zero works" >&5 |
63cf211a NN |
4010 | if eval "test \"`echo '$''{'gcc_cv_func_mmap_dev_zero'+set}'`\" = set"; then |
4011 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1072ec3f ZW |
4012 | else |
4013 | # Add a system to this blacklist if it has mmap() but /dev/zero | |
4014 | # does not exist, or if mmapping /dev/zero does not give anonymous | |
4015 | # zeroed pages with both the following properties: | |
4016 | # 1. If you map N consecutive pages in with one call, and then | |
4017 | # unmap any subset of those pages, the pages that were not | |
4018 | # explicitly unmapped remain accessible. | |
4019 | # 2. If you map two adjacent blocks of memory and then unmap them | |
4020 | # both at once, they must both go away. | |
4021 | # Systems known to be in this category are Windows (all variants), | |
4022 | # VMS, and Darwin. | |
4023 | case "$host_os" in | |
2ce240d3 | 4024 | vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) |
1072ec3f ZW |
4025 | gcc_cv_func_mmap_dev_zero=no ;; |
4026 | *) | |
4027 | gcc_cv_func_mmap_dev_zero=yes;; | |
4028 | esac | |
4029 | fi | |
63cf211a NN |
4030 | |
4031 | echo "$ac_t""$gcc_cv_func_mmap_dev_zero" 1>&6 | |
1072ec3f ZW |
4032 | |
4033 | # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. | |
63cf211a | 4034 | echo $ac_n "checking for MAP_ANON(YMOUS)""... $ac_c" 1>&6 |
439a7e54 | 4035 | echo "configure:4036: checking for MAP_ANON(YMOUS)" >&5 |
63cf211a NN |
4036 | if eval "test \"`echo '$''{'gcc_cv_decl_map_anon'+set}'`\" = set"; then |
4037 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4038 | else | |
4039 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 4040 | #line 4041 "configure" |
63cf211a | 4041 | #include "confdefs.h" |
1072ec3f ZW |
4042 | #include <sys/types.h> |
4043 | #include <sys/mman.h> | |
4044 | #include <unistd.h> | |
4045 | ||
4046 | #ifndef MAP_ANONYMOUS | |
4047 | #define MAP_ANONYMOUS MAP_ANON | |
4048 | #endif | |
4049 | ||
63cf211a | 4050 | int main() { |
1072ec3f | 4051 | int n = MAP_ANONYMOUS; |
63cf211a NN |
4052 | ; return 0; } |
4053 | EOF | |
439a7e54 | 4054 | if { (eval echo configure:4055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 4055 | rm -rf conftest* |
1072ec3f ZW |
4056 | gcc_cv_decl_map_anon=yes |
4057 | else | |
63cf211a NN |
4058 | echo "configure: failed program was:" >&5 |
4059 | cat conftest.$ac_ext >&5 | |
4060 | rm -rf conftest* | |
4061 | gcc_cv_decl_map_anon=no | |
1072ec3f | 4062 | fi |
63cf211a | 4063 | rm -f conftest* |
1072ec3f | 4064 | fi |
63cf211a NN |
4065 | |
4066 | echo "$ac_t""$gcc_cv_decl_map_anon" 1>&6 | |
1072ec3f ZW |
4067 | |
4068 | if test $gcc_cv_decl_map_anon = no; then | |
4069 | gcc_cv_func_mmap_anon=no | |
4070 | else | |
63cf211a | 4071 | echo $ac_n "checking whether mmap with MAP_ANON(YMOUS) works""... $ac_c" 1>&6 |
439a7e54 | 4072 | echo "configure:4073: checking whether mmap with MAP_ANON(YMOUS) works" >&5 |
63cf211a NN |
4073 | if eval "test \"`echo '$''{'gcc_cv_func_mmap_anon'+set}'`\" = set"; then |
4074 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1072ec3f ZW |
4075 | else |
4076 | # Add a system to this blacklist if it has mmap() and MAP_ANON or | |
4077 | # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) | |
4078 | # doesn't give anonymous zeroed pages with the same properties listed | |
4079 | # above for use of /dev/zero. | |
4080 | # Systems known to be in this category are Windows, VMS, and SCO Unix. | |
4081 | case "$host_os" in | |
4082 | vms* | cygwin* | pe | mingw* | sco* | udk* ) | |
4083 | gcc_cv_func_mmap_anon=no ;; | |
4084 | *) | |
4085 | gcc_cv_func_mmap_anon=yes;; | |
4086 | esac | |
4087 | fi | |
63cf211a NN |
4088 | |
4089 | echo "$ac_t""$gcc_cv_func_mmap_anon" 1>&6 | |
1072ec3f ZW |
4090 | fi |
4091 | fi | |
4092 | ||
4093 | if test $gcc_cv_func_mmap_file = yes; then | |
63cf211a | 4094 | cat >> confdefs.h <<\EOF |
1072ec3f | 4095 | #define HAVE_MMAP_FILE 1 |
63cf211a | 4096 | EOF |
1072ec3f ZW |
4097 | |
4098 | fi | |
4099 | if test $gcc_cv_func_mmap_dev_zero = yes; then | |
63cf211a | 4100 | cat >> confdefs.h <<\EOF |
1072ec3f | 4101 | #define HAVE_MMAP_DEV_ZERO 1 |
63cf211a | 4102 | EOF |
1072ec3f ZW |
4103 | |
4104 | fi | |
4105 | if test $gcc_cv_func_mmap_anon = yes; then | |
63cf211a | 4106 | cat >> confdefs.h <<\EOF |
1072ec3f | 4107 | #define HAVE_MMAP_ANON 1 |
63cf211a | 4108 | EOF |
1072ec3f ZW |
4109 | |
4110 | fi | |
4111 | ||
b27d2bd5 MK |
4112 | |
4113 | case "${host}" in | |
ee262b6f | 4114 | *-*-*vms*) |
63cf211a | 4115 | # Under VMS, vfork works very differently than on Unix. The standard test |
ee262b6f DR |
4116 | # won't work, and it isn't easily adaptable. It makes more sense to |
4117 | # just force it. | |
4118 | ac_cv_func_vfork_works=yes | |
4119 | ;; | |
b27d2bd5 | 4120 | esac |
63cf211a | 4121 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
439a7e54 | 4122 | echo "configure:4123: checking for pid_t" >&5 |
63cf211a NN |
4123 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
4124 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4125 | else | |
4126 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 4127 | #line 4128 "configure" |
63cf211a NN |
4128 | #include "confdefs.h" |
4129 | #include <sys/types.h> | |
4130 | #if STDC_HEADERS | |
4131 | #include <stdlib.h> | |
4132 | #include <stddef.h> | |
4133 | #endif | |
4134 | EOF | |
4135 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4136 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
4137 | rm -rf conftest* | |
cb65112a | 4138 | ac_cv_type_pid_t=yes |
c375c43b | 4139 | else |
63cf211a NN |
4140 | rm -rf conftest* |
4141 | ac_cv_type_pid_t=no | |
6e3f3080 | 4142 | fi |
63cf211a | 4143 | rm -f conftest* |
6e3f3080 | 4144 | |
63cf211a NN |
4145 | fi |
4146 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 | |
4147 | if test $ac_cv_type_pid_t = no; then | |
4148 | cat >> confdefs.h <<\EOF | |
c375c43b | 4149 | #define pid_t int |
63cf211a | 4150 | EOF |
c375c43b KG |
4151 | |
4152 | fi | |
4153 | ||
63cf211a NN |
4154 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` |
4155 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
439a7e54 | 4156 | echo "configure:4157: checking for vfork.h" >&5 |
63cf211a NN |
4157 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4158 | echo $ac_n "(cached) $ac_c" 1>&6 | |
093e61a6 | 4159 | else |
63cf211a | 4160 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 4161 | #line 4162 "configure" |
63cf211a NN |
4162 | #include "confdefs.h" |
4163 | #include <vfork.h> | |
4164 | EOF | |
4165 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
439a7e54 | 4166 | { (eval echo configure:4167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
63cf211a NN |
4167 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4168 | if test -z "$ac_err"; then | |
4169 | rm -rf conftest* | |
4170 | eval "ac_cv_header_$ac_safe=yes" | |
4171 | else | |
4172 | echo "$ac_err" >&5 | |
4173 | echo "configure: failed program was:" >&5 | |
4174 | cat conftest.$ac_ext >&5 | |
4175 | rm -rf conftest* | |
4176 | eval "ac_cv_header_$ac_safe=no" | |
c375c43b | 4177 | fi |
63cf211a | 4178 | rm -f conftest* |
6e3f3080 | 4179 | fi |
63cf211a NN |
4180 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
4181 | echo "$ac_t""yes" 1>&6 | |
4182 | cat >> confdefs.h <<\EOF | |
4183 | #define HAVE_VFORK_H 1 | |
4184 | EOF | |
6e3f3080 | 4185 | |
63cf211a NN |
4186 | else |
4187 | echo "$ac_t""no" 1>&6 | |
6e3f3080 NN |
4188 | fi |
4189 | ||
63cf211a | 4190 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 |
439a7e54 | 4191 | echo "configure:4192: checking for working vfork" >&5 |
63cf211a NN |
4192 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
4193 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4194 | else | |
4195 | if test "$cross_compiling" = yes; then | |
4196 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
439a7e54 | 4197 | echo "configure:4198: checking for vfork" >&5 |
63cf211a NN |
4198 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
4199 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4200 | else | |
4201 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 4202 | #line 4203 "configure" |
63cf211a | 4203 | #include "confdefs.h" |
c375c43b | 4204 | /* System header to define __stub macros and hopefully few prototypes, |
63cf211a NN |
4205 | which can conflict with char vfork(); below. */ |
4206 | #include <assert.h> | |
6e3f3080 | 4207 | /* Override any gcc2 internal prototype to avoid an error. */ |
6e3f3080 | 4208 | /* We use char because int might match the return type of a gcc2 |
63cf211a NN |
4209 | builtin and then its argument prototype would still apply. */ |
4210 | char vfork(); | |
4211 | ||
4212 | int main() { | |
4213 | ||
c375c43b KG |
4214 | /* The GNU C library defines this for functions which it implements |
4215 | to always fail with ENOSYS. Some functions are actually named | |
4216 | something starting with __ and the normal name is an alias. */ | |
63cf211a | 4217 | #if defined (__stub_vfork) || defined (__stub___vfork) |
c375c43b KG |
4218 | choke me |
4219 | #else | |
63cf211a | 4220 | vfork(); |
c375c43b KG |
4221 | #endif |
4222 | ||
63cf211a NN |
4223 | ; return 0; } |
4224 | EOF | |
439a7e54 | 4225 | if { (eval echo configure:4226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
63cf211a NN |
4226 | rm -rf conftest* |
4227 | eval "ac_cv_func_vfork=yes" | |
4228 | else | |
4229 | echo "configure: failed program was:" >&5 | |
4230 | cat conftest.$ac_ext >&5 | |
4231 | rm -rf conftest* | |
4232 | eval "ac_cv_func_vfork=no" | |
4233 | fi | |
4234 | rm -f conftest* | |
c375c43b KG |
4235 | fi |
4236 | ||
63cf211a NN |
4237 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then |
4238 | echo "$ac_t""yes" 1>&6 | |
4239 | : | |
c375c43b | 4240 | else |
63cf211a | 4241 | echo "$ac_t""no" 1>&6 |
c375c43b | 4242 | fi |
63cf211a | 4243 | |
c375c43b KG |
4244 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
4245 | else | |
63cf211a | 4246 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 4247 | #line 4248 "configure" |
63cf211a | 4248 | #include "confdefs.h" |
c375c43b KG |
4249 | /* Thanks to Paul Eggert for this test. */ |
4250 | #include <stdio.h> | |
4251 | #include <sys/types.h> | |
4252 | #include <sys/stat.h> | |
63cf211a NN |
4253 | #ifdef HAVE_UNISTD_H |
4254 | #include <unistd.h> | |
c375c43b | 4255 | #endif |
63cf211a NN |
4256 | #ifdef HAVE_VFORK_H |
4257 | #include <vfork.h> | |
c375c43b KG |
4258 | #endif |
4259 | /* On some sparc systems, changes by the child to local and incoming | |
63cf211a NN |
4260 | argument registers are propagated back to the parent. |
4261 | The compiler is told about this with #include <vfork.h>, | |
4262 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
4263 | Test for this by using a static variable whose address | |
4264 | is put into a register that is clobbered by the vfork. */ | |
4265 | static | |
c375c43b KG |
4266 | #ifdef __cplusplus |
4267 | sparc_address_test (int arg) | |
63cf211a | 4268 | #else |
c375c43b KG |
4269 | sparc_address_test (arg) int arg; |
4270 | #endif | |
4271 | { | |
4272 | static pid_t child; | |
4273 | if (!child) { | |
4274 | child = vfork (); | |
4275 | if (child < 0) { | |
4276 | perror ("vfork"); | |
4277 | _exit(2); | |
4278 | } | |
4279 | if (!child) { | |
4280 | arg = getpid(); | |
4281 | write(-1, "", 0); | |
4282 | _exit (arg); | |
4283 | } | |
4284 | } | |
4285 | } | |
63cf211a | 4286 | main() { |
c375c43b KG |
4287 | pid_t parent = getpid (); |
4288 | pid_t child; | |
4289 | ||
63cf211a | 4290 | sparc_address_test (); |
c375c43b KG |
4291 | |
4292 | child = vfork (); | |
4293 | ||
4294 | if (child == 0) { | |
63cf211a NN |
4295 | /* Here is another test for sparc vfork register problems. |
4296 | This test uses lots of local variables, at least | |
4297 | as many local variables as main has allocated so far | |
4298 | including compiler temporaries. 4 locals are enough for | |
4299 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
4300 | A buggy compiler should reuse the register of parent | |
4301 | for one of the local variables, since it will think that | |
4302 | parent can't possibly be used any more in this routine. | |
4303 | Assigning to the local variable will thus munge parent | |
4304 | in the parent process. */ | |
c375c43b KG |
4305 | pid_t |
4306 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
4307 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
4308 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
4309 | use the same hardware register for all 8 local variables. */ | |
4310 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
4311 | || p != p5 || p != p6 || p != p7) | |
4312 | _exit(1); | |
4313 | ||
63cf211a NN |
4314 | /* On some systems (e.g. IRIX 3.3), |
4315 | vfork doesn't separate parent from child file descriptors. | |
4316 | If the child closes a descriptor before it execs or exits, | |
4317 | this munges the parent's descriptor as well. | |
4318 | Test for this by closing stdout in the child. */ | |
c375c43b KG |
4319 | _exit(close(fileno(stdout)) != 0); |
4320 | } else { | |
4321 | int status; | |
4322 | struct stat st; | |
4323 | ||
4324 | while (wait(&status) != child) | |
4325 | ; | |
4326 | exit( | |
4327 | /* Was there some problem with vforking? */ | |
4328 | child < 0 | |
4329 | ||
4330 | /* Did the child fail? (This shouldn't happen.) */ | |
4331 | || status | |
4332 | ||
4333 | /* Did the vfork/compiler bug occur? */ | |
4334 | || parent != getpid() | |
4335 | ||
4336 | /* Did the file descriptor bug occur? */ | |
4337 | || fstat(fileno(stdout), &st) != 0 | |
4338 | ); | |
4339 | } | |
4340 | } | |
63cf211a | 4341 | EOF |
439a7e54 | 4342 | if { (eval echo configure:4343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
63cf211a | 4343 | then |
c375c43b KG |
4344 | ac_cv_func_vfork_works=yes |
4345 | else | |
63cf211a NN |
4346 | echo "configure: failed program was:" >&5 |
4347 | cat conftest.$ac_ext >&5 | |
4348 | rm -fr conftest* | |
4349 | ac_cv_func_vfork_works=no | |
cafe096b | 4350 | fi |
63cf211a | 4351 | rm -fr conftest* |
6e3f3080 | 4352 | fi |
c375c43b KG |
4353 | |
4354 | fi | |
4355 | ||
63cf211a NN |
4356 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 |
4357 | if test $ac_cv_func_vfork_works = no; then | |
4358 | cat >> confdefs.h <<\EOF | |
c375c43b | 4359 | #define vfork fork |
63cf211a | 4360 | EOF |
c375c43b KG |
4361 | |
4362 | fi | |
4363 | ||
81bf3d9e | 4364 | |
f91abfce | 4365 | |
63cf211a | 4366 | |
b7f2fb96 | 4367 | am_cv_lib_iconv_ldpath= |
63cf211a | 4368 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. |
f91abfce TT |
4369 | if test "${with_libiconv_prefix+set}" = set; then |
4370 | withval="$with_libiconv_prefix" | |
63cf211a | 4371 | |
f91abfce TT |
4372 | for dir in `echo "$withval" | tr : ' '`; do |
4373 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
b7f2fb96 | 4374 | if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi |
f91abfce | 4375 | done |
63cf211a NN |
4376 | |
4377 | fi | |
f91abfce TT |
4378 | |
4379 | ||
63cf211a | 4380 | for ac_hdr in iconv.h |
eb158727 | 4381 | do |
63cf211a NN |
4382 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
4383 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
439a7e54 | 4384 | echo "configure:4385: checking for $ac_hdr" >&5 |
63cf211a NN |
4385 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4386 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4387 | else | |
4388 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 4389 | #line 4390 "configure" |
63cf211a NN |
4390 | #include "confdefs.h" |
4391 | #include <$ac_hdr> | |
4392 | EOF | |
4393 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
439a7e54 | 4394 | { (eval echo configure:4395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
63cf211a NN |
4395 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4396 | if test -z "$ac_err"; then | |
4397 | rm -rf conftest* | |
4398 | eval "ac_cv_header_$ac_safe=yes" | |
4399 | else | |
4400 | echo "$ac_err" >&5 | |
4401 | echo "configure: failed program was:" >&5 | |
4402 | cat conftest.$ac_ext >&5 | |
4403 | rm -rf conftest* | |
4404 | eval "ac_cv_header_$ac_safe=no" | |
6e3f3080 | 4405 | fi |
63cf211a | 4406 | rm -f conftest* |
6e3f3080 | 4407 | fi |
63cf211a NN |
4408 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
4409 | echo "$ac_t""yes" 1>&6 | |
4410 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4411 | cat >> confdefs.h <<EOF | |
4412 | #define $ac_tr_hdr 1 | |
4413 | EOF | |
4414 | ||
4415 | else | |
4416 | echo "$ac_t""no" 1>&6 | |
eb158727 ZW |
4417 | fi |
4418 | done | |
4419 | ||
4420 | ||
63cf211a | 4421 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 |
439a7e54 | 4422 | echo "configure:4423: checking for iconv" >&5 |
63cf211a NN |
4423 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
4424 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f91abfce | 4425 | else |
63cf211a | 4426 | |
f91abfce TT |
4427 | am_cv_func_iconv="no, consider installing GNU libiconv" |
4428 | am_cv_lib_iconv=no | |
63cf211a | 4429 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 4430 | #line 4431 "configure" |
63cf211a | 4431 | #include "confdefs.h" |
f91abfce TT |
4432 | #include <stdlib.h> |
4433 | #include <iconv.h> | |
63cf211a | 4434 | int main() { |
f91abfce TT |
4435 | iconv_t cd = iconv_open("",""); |
4436 | iconv(cd,NULL,NULL,NULL,NULL); | |
4437 | iconv_close(cd); | |
63cf211a NN |
4438 | ; return 0; } |
4439 | EOF | |
439a7e54 | 4440 | if { (eval echo configure:4441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
63cf211a | 4441 | rm -rf conftest* |
f91abfce TT |
4442 | am_cv_func_iconv=yes |
4443 | else | |
63cf211a NN |
4444 | echo "configure: failed program was:" >&5 |
4445 | cat conftest.$ac_ext >&5 | |
f91abfce | 4446 | fi |
63cf211a | 4447 | rm -f conftest* |
f91abfce TT |
4448 | if test "$am_cv_func_iconv" != yes; then |
4449 | am_save_LIBS="$LIBS" | |
b7f2fb96 | 4450 | LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" |
63cf211a | 4451 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 4452 | #line 4453 "configure" |
63cf211a | 4453 | #include "confdefs.h" |
f91abfce TT |
4454 | #include <stdlib.h> |
4455 | #include <iconv.h> | |
63cf211a | 4456 | int main() { |
f91abfce TT |
4457 | iconv_t cd = iconv_open("",""); |
4458 | iconv(cd,NULL,NULL,NULL,NULL); | |
4459 | iconv_close(cd); | |
63cf211a NN |
4460 | ; return 0; } |
4461 | EOF | |
439a7e54 | 4462 | if { (eval echo configure:4463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
63cf211a | 4463 | rm -rf conftest* |
f91abfce TT |
4464 | am_cv_lib_iconv=yes |
4465 | am_cv_func_iconv=yes | |
4466 | else | |
63cf211a NN |
4467 | echo "configure: failed program was:" >&5 |
4468 | cat conftest.$ac_ext >&5 | |
f91abfce | 4469 | fi |
63cf211a | 4470 | rm -f conftest* |
f91abfce TT |
4471 | LIBS="$am_save_LIBS" |
4472 | fi | |
63cf211a | 4473 | |
6e3f3080 | 4474 | fi |
6e3f3080 | 4475 | |
63cf211a NN |
4476 | echo "$ac_t""$am_cv_func_iconv" 1>&6 |
4477 | if test "$am_cv_func_iconv" = yes; then | |
4478 | cat >> confdefs.h <<\EOF | |
f91abfce | 4479 | #define HAVE_ICONV 1 |
63cf211a | 4480 | EOF |
f91abfce | 4481 | |
63cf211a | 4482 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 |
439a7e54 | 4483 | echo "configure:4484: checking for iconv declaration" >&5 |
63cf211a NN |
4484 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
4485 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f91abfce | 4486 | else |
63cf211a NN |
4487 | |
4488 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 4489 | #line 4490 "configure" |
63cf211a | 4490 | #include "confdefs.h" |
f91abfce TT |
4491 | |
4492 | #include <stdlib.h> | |
4493 | #include <iconv.h> | |
4494 | extern | |
4495 | #ifdef __cplusplus | |
4496 | "C" | |
4497 | #endif | |
4498 | #if defined(__STDC__) || defined(__cplusplus) | |
4499 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
4500 | #else | |
4501 | size_t iconv(); | |
4502 | #endif | |
4503 | ||
63cf211a | 4504 | int main() { |
f91abfce | 4505 | |
63cf211a NN |
4506 | ; return 0; } |
4507 | EOF | |
439a7e54 | 4508 | if { (eval echo configure:4509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 4509 | rm -rf conftest* |
f91abfce TT |
4510 | am_cv_proto_iconv_arg1="" |
4511 | else | |
63cf211a NN |
4512 | echo "configure: failed program was:" >&5 |
4513 | cat conftest.$ac_ext >&5 | |
4514 | rm -rf conftest* | |
4515 | am_cv_proto_iconv_arg1="const" | |
f91abfce | 4516 | fi |
63cf211a | 4517 | rm -f conftest* |
f91abfce TT |
4518 | 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);" |
4519 | fi | |
4520 | ||
4521 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
63cf211a NN |
4522 | echo "$ac_t""${ac_t:- |
4523 | }$am_cv_proto_iconv" 1>&6 | |
4524 | cat >> confdefs.h <<EOF | |
f91abfce | 4525 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
63cf211a | 4526 | EOF |
f91abfce TT |
4527 | |
4528 | fi | |
4529 | LIBICONV= | |
4530 | if test "$am_cv_lib_iconv" = yes; then | |
b7f2fb96 | 4531 | LIBICONV="$am_cv_lib_iconv_ldpath -liconv" |
f91abfce | 4532 | fi |
63cf211a | 4533 | |
f91abfce | 4534 | |
56694dd9 ZW |
4535 | # Until we have in-tree GNU iconv: |
4536 | LIBICONV_DEP= | |
4537 | ||
4538 | ||
4539 | ||
63cf211a | 4540 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 |
439a7e54 | 4541 | echo "configure:4542: checking for LC_MESSAGES" >&5 |
63cf211a NN |
4542 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
4543 | echo $ac_n "(cached) $ac_c" 1>&6 | |
56694dd9 | 4544 | else |
63cf211a | 4545 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 4546 | #line 4547 "configure" |
63cf211a | 4547 | #include "confdefs.h" |
56694dd9 | 4548 | #include <locale.h> |
63cf211a | 4549 | int main() { |
56694dd9 | 4550 | return LC_MESSAGES |
63cf211a NN |
4551 | ; return 0; } |
4552 | EOF | |
439a7e54 | 4553 | if { (eval echo configure:4554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
63cf211a | 4554 | rm -rf conftest* |
56694dd9 ZW |
4555 | am_cv_val_LC_MESSAGES=yes |
4556 | else | |
63cf211a NN |
4557 | echo "configure: failed program was:" >&5 |
4558 | cat conftest.$ac_ext >&5 | |
4559 | rm -rf conftest* | |
4560 | am_cv_val_LC_MESSAGES=no | |
56694dd9 | 4561 | fi |
63cf211a | 4562 | rm -f conftest* |
56694dd9 | 4563 | fi |
6e3f3080 | 4564 | |
63cf211a NN |
4565 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 |
4566 | if test $am_cv_val_LC_MESSAGES = yes; then | |
4567 | cat >> confdefs.h <<\EOF | |
56694dd9 | 4568 | #define HAVE_LC_MESSAGES 1 |
63cf211a | 4569 | EOF |
56694dd9 ZW |
4570 | |
4571 | fi | |
4572 | ||
f91abfce | 4573 | |
86cf1cbd KG |
4574 | # We will need to find libiberty.h and ansidecl.h |
4575 | saved_CFLAGS="$CFLAGS" | |
4576 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
8e944909 | 4577 | for ac_func in getenv atol sbrk abort atof getcwd getwd \ |
3b681e9d | 4578 | strsignal putc_unlocked fputs_unlocked fwrite_unlocked \ |
236ce4b2 | 4579 | fprintf_unlocked strstr errno snprintf vasprintf \ |
c1800ec8 | 4580 | malloc realloc calloc free basename getopt clock |
81bf3d9e | 4581 | do |
f31e826b | 4582 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
63cf211a | 4583 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 |
439a7e54 | 4584 | echo "configure:4585: checking whether $ac_func is declared" >&5 |
63cf211a NN |
4585 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4586 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4587 | else | |
4588 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 4589 | #line 4590 "configure" |
63cf211a | 4590 | #include "confdefs.h" |
7afe8c41 KG |
4591 | #undef $ac_tr_decl |
4592 | #define $ac_tr_decl 1 | |
63cf211a | 4593 | |
d02af173 | 4594 | #include "ansidecl.h" |
86cf1cbd | 4595 | #include "system.h" |
f31e826b | 4596 | |
63cf211a | 4597 | int main() { |
86cf1cbd KG |
4598 | #ifndef $ac_func |
4599 | char *(*pfn) = (char *(*)) $ac_func ; | |
4600 | #endif | |
63cf211a NN |
4601 | ; return 0; } |
4602 | EOF | |
439a7e54 | 4603 | if { (eval echo configure:4604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 4604 | rm -rf conftest* |
f31e826b | 4605 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 4606 | else |
63cf211a NN |
4607 | echo "configure: failed program was:" >&5 |
4608 | cat conftest.$ac_ext >&5 | |
4609 | rm -rf conftest* | |
4610 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 4611 | fi |
63cf211a | 4612 | rm -f conftest* |
81bf3d9e RH |
4613 | fi |
4614 | ||
f31e826b | 4615 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
63cf211a | 4616 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF |
86cf1cbd | 4617 | #define $ac_tr_decl 1 |
63cf211a NN |
4618 | EOF |
4619 | ||
81bf3d9e | 4620 | else |
63cf211a | 4621 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
f31e826b | 4622 | #define $ac_tr_decl 0 |
63cf211a NN |
4623 | EOF |
4624 | ||
81bf3d9e RH |
4625 | fi |
4626 | ||
4627 | done | |
86cf1cbd | 4628 | if test x = y ; then |
63cf211a | 4629 | cat >> confdefs.h <<\EOF |
f31e826b | 4630 | #define HAVE_DECL_GETENV 1 |
63cf211a NN |
4631 | EOF |
4632 | cat >> confdefs.h <<\EOF | |
f31e826b | 4633 | #define HAVE_DECL_ATOL 1 |
63cf211a NN |
4634 | EOF |
4635 | cat >> confdefs.h <<\EOF | |
f31e826b | 4636 | #define HAVE_DECL_SBRK 1 |
63cf211a NN |
4637 | EOF |
4638 | cat >> confdefs.h <<\EOF | |
f31e826b | 4639 | #define HAVE_DECL_ABORT 1 |
63cf211a NN |
4640 | EOF |
4641 | cat >> confdefs.h <<\EOF | |
f31e826b | 4642 | #define HAVE_DECL_ATOF 1 |
63cf211a NN |
4643 | EOF |
4644 | cat >> confdefs.h <<\EOF | |
f31e826b | 4645 | #define HAVE_DECL_GETCWD 1 |
63cf211a NN |
4646 | EOF |
4647 | cat >> confdefs.h <<\EOF | |
f31e826b | 4648 | #define HAVE_DECL_GETWD 1 |
63cf211a | 4649 | EOF |
86cf1cbd | 4650 | \ |
63cf211a | 4651 | cat >> confdefs.h <<\EOF |
f31e826b | 4652 | #define HAVE_DECL_STRSIGNAL 1 |
63cf211a NN |
4653 | EOF |
4654 | cat >> confdefs.h <<\EOF | |
f31e826b | 4655 | #define HAVE_DECL_PUTC_UNLOCKED 1 |
63cf211a NN |
4656 | EOF |
4657 | cat >> confdefs.h <<\EOF | |
f31e826b | 4658 | #define HAVE_DECL_FPUTS_UNLOCKED 1 |
63cf211a NN |
4659 | EOF |
4660 | cat >> confdefs.h <<\EOF | |
3b681e9d | 4661 | #define HAVE_DECL_FWRITE_UNLOCKED 1 |
63cf211a | 4662 | EOF |
3b681e9d | 4663 | \ |
63cf211a | 4664 | cat >> confdefs.h <<\EOF |
3b681e9d | 4665 | #define HAVE_DECL_FPRINTF_UNLOCKED 1 |
63cf211a NN |
4666 | EOF |
4667 | cat >> confdefs.h <<\EOF | |
f31e826b | 4668 | #define HAVE_DECL_STRSTR 1 |
63cf211a NN |
4669 | EOF |
4670 | cat >> confdefs.h <<\EOF | |
6c889b67 | 4671 | #define HAVE_DECL_ERRNO 1 |
63cf211a NN |
4672 | EOF |
4673 | cat >> confdefs.h <<\EOF | |
236ce4b2 | 4674 | #define HAVE_DECL_SNPRINTF 1 |
63cf211a NN |
4675 | EOF |
4676 | cat >> confdefs.h <<\EOF | |
a7475ab1 | 4677 | #define HAVE_DECL_VASPRINTF 1 |
63cf211a | 4678 | EOF |
86cf1cbd | 4679 | \ |
63cf211a | 4680 | cat >> confdefs.h <<\EOF |
f31e826b | 4681 | #define HAVE_DECL_MALLOC 1 |
63cf211a NN |
4682 | EOF |
4683 | cat >> confdefs.h <<\EOF | |
f31e826b | 4684 | #define HAVE_DECL_REALLOC 1 |
63cf211a NN |
4685 | EOF |
4686 | cat >> confdefs.h <<\EOF | |
f31e826b | 4687 | #define HAVE_DECL_CALLOC 1 |
63cf211a NN |
4688 | EOF |
4689 | cat >> confdefs.h <<\EOF | |
f31e826b | 4690 | #define HAVE_DECL_FREE 1 |
63cf211a NN |
4691 | EOF |
4692 | cat >> confdefs.h <<\EOF | |
f31e826b | 4693 | #define HAVE_DECL_BASENAME 1 |
63cf211a NN |
4694 | EOF |
4695 | cat >> confdefs.h <<\EOF | |
f31e826b | 4696 | #define HAVE_DECL_GETOPT 1 |
63cf211a NN |
4697 | EOF |
4698 | cat >> confdefs.h <<\EOF | |
c1800ec8 | 4699 | #define HAVE_DECL_CLOCK 1 |
63cf211a | 4700 | EOF |
81bf3d9e RH |
4701 | fi |
4702 | ||
81bf3d9e RH |
4703 | |
4704 | for ac_func in getrlimit setrlimit getrusage | |
4705 | do | |
f31e826b | 4706 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
63cf211a | 4707 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 |
439a7e54 | 4708 | echo "configure:4709: checking whether $ac_func is declared" >&5 |
63cf211a NN |
4709 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4710 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4711 | else | |
4712 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 4713 | #line 4714 "configure" |
63cf211a | 4714 | #include "confdefs.h" |
7afe8c41 KG |
4715 | #undef $ac_tr_decl |
4716 | #define $ac_tr_decl 1 | |
63cf211a | 4717 | |
d02af173 | 4718 | #include "ansidecl.h" |
86cf1cbd | 4719 | #include "system.h" |
81bf3d9e RH |
4720 | #ifdef HAVE_SYS_RESOURCE_H |
4721 | #include <sys/resource.h> | |
4722 | #endif | |
4723 | ||
f31e826b | 4724 | |
63cf211a | 4725 | int main() { |
86cf1cbd KG |
4726 | #ifndef $ac_func |
4727 | char *(*pfn) = (char *(*)) $ac_func ; | |
4728 | #endif | |
63cf211a NN |
4729 | ; return 0; } |
4730 | EOF | |
439a7e54 | 4731 | if { (eval echo configure:4732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 4732 | rm -rf conftest* |
f31e826b | 4733 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 4734 | else |
63cf211a NN |
4735 | echo "configure: failed program was:" >&5 |
4736 | cat conftest.$ac_ext >&5 | |
4737 | rm -rf conftest* | |
4738 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 4739 | fi |
63cf211a | 4740 | rm -f conftest* |
81bf3d9e RH |
4741 | fi |
4742 | ||
f31e826b | 4743 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
63cf211a | 4744 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF |
86cf1cbd | 4745 | #define $ac_tr_decl 1 |
63cf211a NN |
4746 | EOF |
4747 | ||
81bf3d9e | 4748 | else |
63cf211a | 4749 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
f31e826b | 4750 | #define $ac_tr_decl 0 |
63cf211a NN |
4751 | EOF |
4752 | ||
81bf3d9e RH |
4753 | fi |
4754 | ||
4755 | done | |
86cf1cbd | 4756 | if test x = y ; then |
63cf211a | 4757 | cat >> confdefs.h <<\EOF |
f31e826b | 4758 | #define HAVE_DECL_GETRLIMIT 1 |
63cf211a NN |
4759 | EOF |
4760 | cat >> confdefs.h <<\EOF | |
f31e826b | 4761 | #define HAVE_DECL_SETRLIMIT 1 |
63cf211a NN |
4762 | EOF |
4763 | cat >> confdefs.h <<\EOF | |
f31e826b | 4764 | #define HAVE_DECL_GETRUSAGE 1 |
63cf211a | 4765 | EOF |
86cf1cbd KG |
4766 | fi |
4767 | ||
81bf3d9e | 4768 | |
63cf211a | 4769 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 4770 | #line 4771 "configure" |
63cf211a | 4771 | #include "confdefs.h" |
b2522d2b HPN |
4772 | |
4773 | #include "ansidecl.h" | |
4774 | #include "system.h" | |
4775 | #ifdef HAVE_SYS_RESOURCE_H | |
4776 | #include <sys/resource.h> | |
4777 | #endif | |
4778 | ||
63cf211a | 4779 | int main() { |
b2522d2b | 4780 | rlim_t l = 0; |
63cf211a NN |
4781 | ; return 0; } |
4782 | EOF | |
439a7e54 | 4783 | if { (eval echo configure:4784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b2522d2b HPN |
4784 | : |
4785 | else | |
63cf211a NN |
4786 | echo "configure: failed program was:" >&5 |
4787 | cat conftest.$ac_ext >&5 | |
4788 | rm -rf conftest* | |
4789 | cat >> confdefs.h <<\EOF | |
b2522d2b | 4790 | #define rlim_t long |
63cf211a | 4791 | EOF |
b2522d2b HPN |
4792 | |
4793 | fi | |
63cf211a | 4794 | rm -f conftest* |
b2522d2b | 4795 | |
351df804 | 4796 | for ac_func in ldgetname |
c1800ec8 ZW |
4797 | do |
4798 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
63cf211a | 4799 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 |
439a7e54 | 4800 | echo "configure:4801: checking whether $ac_func is declared" >&5 |
63cf211a NN |
4801 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4802 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4803 | else | |
4804 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 4805 | #line 4806 "configure" |
63cf211a | 4806 | #include "confdefs.h" |
c1800ec8 ZW |
4807 | #undef $ac_tr_decl |
4808 | #define $ac_tr_decl 1 | |
63cf211a | 4809 | |
351df804 KG |
4810 | #include "ansidecl.h" |
4811 | #include "system.h" | |
4812 | #ifdef HAVE_LDFCN_H | |
4813 | #include <ldfcn.h> | |
4814 | #endif | |
4815 | ||
4816 | ||
63cf211a | 4817 | int main() { |
351df804 KG |
4818 | #ifndef $ac_func |
4819 | char *(*pfn) = (char *(*)) $ac_func ; | |
4820 | #endif | |
63cf211a NN |
4821 | ; return 0; } |
4822 | EOF | |
439a7e54 | 4823 | if { (eval echo configure:4824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 4824 | rm -rf conftest* |
351df804 KG |
4825 | eval "gcc_cv_have_decl_$ac_func=yes" |
4826 | else | |
63cf211a NN |
4827 | echo "configure: failed program was:" >&5 |
4828 | cat conftest.$ac_ext >&5 | |
4829 | rm -rf conftest* | |
4830 | eval "gcc_cv_have_decl_$ac_func=no" | |
351df804 | 4831 | fi |
63cf211a | 4832 | rm -f conftest* |
351df804 KG |
4833 | fi |
4834 | ||
4835 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
63cf211a | 4836 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF |
351df804 | 4837 | #define $ac_tr_decl 1 |
63cf211a NN |
4838 | EOF |
4839 | ||
351df804 | 4840 | else |
63cf211a | 4841 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
351df804 | 4842 | #define $ac_tr_decl 0 |
63cf211a NN |
4843 | EOF |
4844 | ||
351df804 KG |
4845 | fi |
4846 | ||
4847 | done | |
4848 | if test x = y ; then | |
63cf211a | 4849 | cat >> confdefs.h <<\EOF |
351df804 | 4850 | #define HAVE_DECL_LDGETNAME 1 |
63cf211a | 4851 | EOF |
351df804 KG |
4852 | fi |
4853 | ||
4854 | ||
4855 | for ac_func in times | |
4856 | do | |
4857 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
63cf211a | 4858 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 |
439a7e54 | 4859 | echo "configure:4860: checking whether $ac_func is declared" >&5 |
63cf211a NN |
4860 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4861 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4862 | else | |
4863 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 4864 | #line 4865 "configure" |
63cf211a | 4865 | #include "confdefs.h" |
351df804 KG |
4866 | #undef $ac_tr_decl |
4867 | #define $ac_tr_decl 1 | |
63cf211a | 4868 | |
c1800ec8 ZW |
4869 | #include "ansidecl.h" |
4870 | #include "system.h" | |
4871 | #ifdef HAVE_SYS_TIMES_H | |
4872 | #include <sys/times.h> | |
4873 | #endif | |
4874 | ||
4875 | ||
63cf211a | 4876 | int main() { |
c1800ec8 ZW |
4877 | #ifndef $ac_func |
4878 | char *(*pfn) = (char *(*)) $ac_func ; | |
4879 | #endif | |
63cf211a NN |
4880 | ; return 0; } |
4881 | EOF | |
439a7e54 | 4882 | if { (eval echo configure:4883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 4883 | rm -rf conftest* |
c1800ec8 ZW |
4884 | eval "gcc_cv_have_decl_$ac_func=yes" |
4885 | else | |
63cf211a NN |
4886 | echo "configure: failed program was:" >&5 |
4887 | cat conftest.$ac_ext >&5 | |
4888 | rm -rf conftest* | |
4889 | eval "gcc_cv_have_decl_$ac_func=no" | |
c1800ec8 | 4890 | fi |
63cf211a | 4891 | rm -f conftest* |
c1800ec8 ZW |
4892 | fi |
4893 | ||
4894 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
63cf211a | 4895 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF |
c1800ec8 | 4896 | #define $ac_tr_decl 1 |
63cf211a NN |
4897 | EOF |
4898 | ||
c1800ec8 | 4899 | else |
63cf211a | 4900 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
c1800ec8 | 4901 | #define $ac_tr_decl 0 |
63cf211a NN |
4902 | EOF |
4903 | ||
c1800ec8 ZW |
4904 | fi |
4905 | ||
4906 | done | |
4907 | if test x = y ; then | |
63cf211a | 4908 | cat >> confdefs.h <<\EOF |
c1800ec8 | 4909 | #define HAVE_DECL_TIMES 1 |
63cf211a | 4910 | EOF |
c1800ec8 ZW |
4911 | fi |
4912 | ||
4913 | ||
4914 | # More time-related stuff. | |
63cf211a | 4915 | echo $ac_n "checking for struct tms""... $ac_c" 1>&6 |
439a7e54 | 4916 | echo "configure:4917: checking for struct tms" >&5 |
63cf211a NN |
4917 | if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then |
4918 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4919 | else | |
4920 | ||
4921 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 4922 | #line 4923 "configure" |
63cf211a | 4923 | #include "confdefs.h" |
c1800ec8 ZW |
4924 | |
4925 | #include "ansidecl.h" | |
4926 | #include "system.h" | |
4927 | #ifdef HAVE_SYS_TIMES_H | |
4928 | #include <sys/times.h> | |
4929 | #endif | |
4930 | ||
63cf211a | 4931 | int main() { |
c1800ec8 | 4932 | struct tms tms; |
63cf211a NN |
4933 | ; return 0; } |
4934 | EOF | |
439a7e54 | 4935 | if { (eval echo configure:4936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 4936 | rm -rf conftest* |
c1800ec8 ZW |
4937 | ac_cv_struct_tms=yes |
4938 | else | |
63cf211a NN |
4939 | echo "configure: failed program was:" >&5 |
4940 | cat conftest.$ac_ext >&5 | |
4941 | rm -rf conftest* | |
4942 | ac_cv_struct_tms=no | |
c1800ec8 | 4943 | fi |
63cf211a | 4944 | rm -f conftest* |
c1800ec8 | 4945 | fi |
6e3f3080 | 4946 | |
63cf211a NN |
4947 | echo "$ac_t""$ac_cv_struct_tms" 1>&6 |
4948 | if test $ac_cv_struct_tms = yes; then | |
4949 | cat >> confdefs.h <<\EOF | |
c1800ec8 | 4950 | #define HAVE_STRUCT_TMS 1 |
63cf211a | 4951 | EOF |
c1800ec8 ZW |
4952 | |
4953 | fi | |
4954 | ||
4955 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
4956 | # revisit after autoconf 2.50. | |
63cf211a | 4957 | echo $ac_n "checking for clock_t""... $ac_c" 1>&6 |
439a7e54 | 4958 | echo "configure:4959: checking for clock_t" >&5 |
63cf211a NN |
4959 | if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then |
4960 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4961 | else | |
4962 | ||
4963 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 4964 | #line 4965 "configure" |
63cf211a | 4965 | #include "confdefs.h" |
c1800ec8 ZW |
4966 | |
4967 | #include "ansidecl.h" | |
4968 | #include "system.h" | |
4969 | ||
63cf211a | 4970 | int main() { |
c1800ec8 | 4971 | clock_t x; |
63cf211a NN |
4972 | ; return 0; } |
4973 | EOF | |
439a7e54 | 4974 | if { (eval echo configure:4975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 4975 | rm -rf conftest* |
c1800ec8 ZW |
4976 | gcc_cv_type_clock_t=yes |
4977 | else | |
63cf211a NN |
4978 | echo "configure: failed program was:" >&5 |
4979 | cat conftest.$ac_ext >&5 | |
4980 | rm -rf conftest* | |
4981 | gcc_cv_type_clock_t=no | |
c1800ec8 | 4982 | fi |
63cf211a | 4983 | rm -f conftest* |
c1800ec8 | 4984 | fi |
6e3f3080 | 4985 | |
63cf211a NN |
4986 | echo "$ac_t""$gcc_cv_type_clock_t" 1>&6 |
4987 | if test $gcc_cv_type_clock_t = yes; then | |
4988 | cat >> confdefs.h <<\EOF | |
c1800ec8 | 4989 | #define HAVE_CLOCK_T 1 |
63cf211a | 4990 | EOF |
c1800ec8 ZW |
4991 | |
4992 | fi | |
4993 | ||
63cf211a | 4994 | echo $ac_n "checking for uchar""... $ac_c" 1>&6 |
439a7e54 | 4995 | echo "configure:4996: checking for uchar" >&5 |
63cf211a NN |
4996 | if eval "test \"`echo '$''{'gcc_cv_type_uchar'+set}'`\" = set"; then |
4997 | echo $ac_n "(cached) $ac_c" 1>&6 | |
a12b5bd9 | 4998 | else |
63cf211a | 4999 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 5000 | #line 5001 "configure" |
63cf211a | 5001 | #include "confdefs.h" |
a12b5bd9 ZW |
5002 | |
5003 | #include "ansidecl.h" | |
5004 | #include "system.h" | |
5005 | ||
63cf211a | 5006 | int main() { |
a12b5bd9 ZW |
5007 | if ((uchar *)0) return 0; |
5008 | if (sizeof(uchar)) return 0; | |
63cf211a NN |
5009 | ; return 0; } |
5010 | EOF | |
439a7e54 | 5011 | if { (eval echo configure:5012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 5012 | rm -rf conftest* |
a12b5bd9 ZW |
5013 | ac_cv_type_uchar=yes |
5014 | else | |
63cf211a NN |
5015 | echo "configure: failed program was:" >&5 |
5016 | cat conftest.$ac_ext >&5 | |
5017 | rm -rf conftest* | |
5018 | ac_cv_type_uchar=no | |
a12b5bd9 | 5019 | fi |
63cf211a | 5020 | rm -f conftest* |
a12b5bd9 | 5021 | fi |
6e3f3080 | 5022 | |
63cf211a NN |
5023 | echo "$ac_t""$gcc_cv_type_uchar" 1>&6 |
5024 | if test $ac_cv_type_uchar = yes; then | |
5025 | cat >> confdefs.h <<\EOF | |
a12b5bd9 | 5026 | #define HAVE_UCHAR 1 |
63cf211a | 5027 | EOF |
a12b5bd9 ZW |
5028 | |
5029 | fi | |
5030 | ||
eb70d86d AS |
5031 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
5032 | CFLAGS="$saved_CFLAGS" | |
5033 | ||
07cf4226 DM |
5034 | # Check whether --enable-initfini-array or --disable-initfini-array was given. |
5035 | if test "${enable_initfini_array+set}" = set; then | |
5036 | enableval="$enable_initfini_array" | |
63cf211a | 5037 | : |
07cf4226 | 5038 | else |
63cf211a NN |
5039 | |
5040 | echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6 | |
439a7e54 | 5041 | echo "configure:5042: checking for .preinit_array/.init_array/.fini_array support" >&5 |
63cf211a NN |
5042 | if eval "test \"`echo '$''{'gcc_cv_initfini_array'+set}'`\" = set"; then |
5043 | echo $ac_n "(cached) $ac_c" 1>&6 | |
07cf4226 | 5044 | else |
eb70d86d | 5045 | if test "$cross_compiling" = yes; then |
918c4fe4 | 5046 | gcc_cv_initfini_array=no |
eb70d86d | 5047 | else |
63cf211a | 5048 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 5049 | #line 5050 "configure" |
63cf211a | 5050 | #include "confdefs.h" |
eb70d86d | 5051 | |
07cf4226 DM |
5052 | static int x = -1; |
5053 | int main (void) { return x; } | |
5054 | int foo (void) { x = 0; } | |
5055 | int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; | |
63cf211a | 5056 | EOF |
439a7e54 | 5057 | if { (eval echo configure:5058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
63cf211a | 5058 | then |
918c4fe4 | 5059 | gcc_cv_initfini_array=yes |
eb70d86d | 5060 | else |
63cf211a NN |
5061 | echo "configure: failed program was:" >&5 |
5062 | cat conftest.$ac_ext >&5 | |
5063 | rm -fr conftest* | |
5064 | gcc_cv_initfini_array=no | |
eb70d86d | 5065 | fi |
63cf211a | 5066 | rm -fr conftest* |
eb70d86d | 5067 | fi |
63cf211a | 5068 | |
07cf4226 | 5069 | fi |
63cf211a NN |
5070 | |
5071 | echo "$ac_t""$gcc_cv_initfini_array" 1>&6 | |
eb70d86d | 5072 | enable_initfini_array=$gcc_cv_initfini_array |
07cf4226 | 5073 | |
63cf211a | 5074 | fi |
6e3f3080 | 5075 | |
63cf211a NN |
5076 | if test $enable_initfini_array = yes; then |
5077 | cat >> confdefs.h <<\EOF | |
eb70d86d | 5078 | #define HAVE_INITFINI_ARRAY 1 |
63cf211a | 5079 | EOF |
07cf4226 | 5080 | |
eb70d86d | 5081 | fi |
81bf3d9e | 5082 | |
63cf211a NN |
5083 | # mkdir takes a single argument on some systems. |
5084 | echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6 | |
439a7e54 | 5085 | echo "configure:5086: checking if mkdir takes one argument" >&5 |
63cf211a NN |
5086 | if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then |
5087 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75923b2f | 5088 | else |
63cf211a | 5089 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 5090 | #line 5091 "configure" |
63cf211a | 5091 | #include "confdefs.h" |
75923b2f MK |
5092 | |
5093 | #include <sys/types.h> | |
5094 | #ifdef HAVE_SYS_STAT_H | |
5095 | # include <sys/stat.h> | |
5096 | #endif | |
5097 | #ifdef HAVE_UNISTD_H | |
5098 | # include <unistd.h> | |
5099 | #endif | |
5100 | #ifdef HAVE_DIRECT_H | |
5101 | # include <direct.h> | |
5102 | #endif | |
63cf211a | 5103 | int main() { |
75923b2f | 5104 | mkdir ("foo", 0); |
63cf211a NN |
5105 | ; return 0; } |
5106 | EOF | |
439a7e54 | 5107 | if { (eval echo configure:5108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
63cf211a | 5108 | rm -rf conftest* |
75923b2f MK |
5109 | gcc_cv_mkdir_takes_one_arg=no |
5110 | else | |
63cf211a NN |
5111 | echo "configure: failed program was:" >&5 |
5112 | cat conftest.$ac_ext >&5 | |
5113 | rm -rf conftest* | |
5114 | gcc_cv_mkdir_takes_one_arg=yes | |
75923b2f | 5115 | fi |
63cf211a | 5116 | rm -f conftest* |
75923b2f | 5117 | fi |
6e3f3080 | 5118 | |
63cf211a NN |
5119 | echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6 |
5120 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then | |
5121 | cat >> confdefs.h <<\EOF | |
75923b2f | 5122 | #define MKDIR_TAKES_ONE_ARG 1 |
63cf211a | 5123 | EOF |
75923b2f MK |
5124 | |
5125 | fi | |
5126 | ||
5127 | ||
861bb6c1 JL |
5128 | # File extensions |
5129 | manext='.1' | |
5130 | objext='.o' | |
5131 | ||
5132 | ||
5133 | ||
4977bab6 ZW |
5134 | # With Setjmp/Longjmp based exception handling. |
5135 | # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. | |
5136 | if test "${enable_sjlj_exceptions+set}" = set; then | |
5137 | enableval="$enable_sjlj_exceptions" | |
5138 | sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` | |
63cf211a | 5139 | cat >> confdefs.h <<EOF |
6e3f3080 | 5140 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj |
63cf211a NN |
5141 | EOF |
5142 | ||
5143 | fi | |
4977bab6 ZW |
5144 | |
5145 | ||
c6c51600 | 5146 | if test x$host = x$target; then |
63cf211a | 5147 | echo $ac_n "checking for main in -lunwind""... $ac_c" 1>&6 |
439a7e54 | 5148 | echo "configure:5149: checking for main in -lunwind" >&5 |
63cf211a NN |
5149 | ac_lib_var=`echo unwind'_'main | sed 'y%./+-%__p_%'` |
5150 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5151 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4977bab6 | 5152 | else |
63cf211a | 5153 | ac_save_LIBS="$LIBS" |
4977bab6 | 5154 | LIBS="-lunwind $LIBS" |
63cf211a | 5155 | cat > conftest.$ac_ext <<EOF |
439a7e54 | 5156 | #line 5157 "configure" |
63cf211a | 5157 | #include "confdefs.h" |
4977bab6 | 5158 | |
63cf211a NN |
5159 | int main() { |
5160 | main() | |
5161 | ; return 0; } | |
5162 | EOF | |
439a7e54 | 5163 | if { (eval echo configure:5164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
63cf211a NN |
5164 | rm -rf conftest* |
5165 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5166 | else | |
5167 | echo "configure: failed program was:" >&5 | |
5168 | cat conftest.$ac_ext >&5 | |
5169 | rm -rf conftest* | |
5170 | eval "ac_cv_lib_$ac_lib_var=no" | |
5171 | fi | |
5172 | rm -f conftest* | |
5173 | LIBS="$ac_save_LIBS" | |
4977bab6 | 5174 | |
63cf211a NN |
5175 | fi |
5176 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5177 | echo "$ac_t""yes" 1>&6 | |
4977bab6 ZW |
5178 | use_libunwind_default=yes |
5179 | else | |
63cf211a NN |
5180 | echo "$ac_t""no" 1>&6 |
5181 | use_libunwind_default=no | |
4977bab6 ZW |
5182 | fi |
5183 | ||
c6c51600 AS |
5184 | else |
5185 | use_libunwind_default=no | |
5186 | fi | |
4977bab6 ZW |
5187 | # Use libunwind based exception handling. |
5188 | # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given. | |
5189 | if test "${enable_libunwind_exceptions+set}" = set; then | |
5190 | enableval="$enable_libunwind_exceptions" | |
5191 | use_libunwind_exceptions=$enableval | |
5192 | else | |
5193 | use_libunwind_exceptions=$use_libunwind_default | |
63cf211a | 5194 | fi |
6e3f3080 | 5195 | |
63cf211a NN |
5196 | if test x"$use_libunwind_exceptions" = xyes; then |
5197 | cat >> confdefs.h <<\EOF | |
4977bab6 | 5198 | #define USE_LIBUNWIND_EXCEPTIONS 1 |
63cf211a | 5199 | EOF |
4977bab6 ZW |
5200 | |
5201 | fi | |
5202 | ||
34a86c2b NN |
5203 | # -------------------------------------------------------- |
5204 | # Build, host, and target specific configuration fragments | |
5205 | # -------------------------------------------------------- | |
5206 | ||
5b28c537 NN |
5207 | # Collect build-machine-specific information. |
5208 | . ${srcdir}/config.build | |
5209 | ||
a89ea0df NN |
5210 | # Collect host-machine-specific information. |
5211 | . ${srcdir}/config.host | |
5212 | ||
ef69da62 | 5213 | target_gtfiles= |
a89ea0df NN |
5214 | |
5215 | # Collect target-machine-specific information. | |
8ad9fb33 | 5216 | . ${srcdir}/config.gcc |
861bb6c1 JL |
5217 | |
5218 | extra_objs="${host_extra_objs} ${extra_objs}" | |
5219 | ||
5220 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 5221 | if test x"$tm_file" = x |
861bb6c1 JL |
5222 | then tm_file=$cpu_type/$cpu_type.h; fi |
5223 | ||
6b2adea9 | 5224 | if test x"$extra_headers" = x |
861bb6c1 JL |
5225 | then extra_headers=; fi |
5226 | ||
75bffa71 | 5227 | if test x$md_file = x |
e98e406f | 5228 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 5229 | |
75bffa71 | 5230 | if test x$out_file = x |
861bb6c1 JL |
5231 | then out_file=$cpu_type/$cpu_type.c; fi |
5232 | ||
75bffa71 | 5233 | if test x"$tmake_file" = x |
861bb6c1 JL |
5234 | then tmake_file=$cpu_type/t-$cpu_type |
5235 | fi | |
5236 | ||
90e6a802 | 5237 | if test x"$dwarf2" = xyes |
756ee602 | 5238 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
5239 | fi |
5240 | ||
861bb6c1 | 5241 | # Say what files are being used for the output code and MD file. |
11642c3a | 5242 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
5243 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
5244 | ||
11642c3a | 5245 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
5246 | # about them and drop them. |
5247 | ||
11642c3a ZW |
5248 | bx= |
5249 | for x in $build_xm_file; do | |
5250 | if test -f $srcdir/config/$x | |
5251 | then bx="$bx $x" | |
63cf211a | 5252 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
11642c3a ZW |
5253 | fi |
5254 | done | |
5255 | build_xm_file="$bx" | |
5256 | ||
5257 | hx= | |
5258 | for x in $host_xm_file; do | |
5259 | if test -f $srcdir/config/$x | |
5260 | then hx="$hx $x" | |
63cf211a | 5261 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
11642c3a ZW |
5262 | fi |
5263 | done | |
5264 | host_xm_file="$hx" | |
5265 | ||
5266 | tx= | |
5267 | for x in $xm_file; do | |
5268 | if test -f $srcdir/config/$x | |
5269 | then tx="$tx $x" | |
63cf211a | 5270 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
11642c3a ZW |
5271 | fi |
5272 | done | |
5273 | xm_file="$tx" | |
5274 | ||
861bb6c1 JL |
5275 | count=a |
5276 | for f in $tm_file; do | |
5277 | count=${count}x | |
5278 | done | |
75bffa71 | 5279 | if test $count = ax; then |
861bb6c1 JL |
5280 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
5281 | else | |
5282 | echo "Using the following target machine macro files:" | |
5283 | for f in $tm_file; do | |
5284 | echo " $srcdir/config/$f" | |
5285 | done | |
5286 | fi | |
5287 | ||
4977bab6 | 5288 | if test x$need_64bit_hwint = xyes; then |
63cf211a | 5289 | cat >> confdefs.h <<\EOF |
4977bab6 | 5290 | #define NEED_64BIT_HOST_WIDE_INT 1 |
63cf211a | 5291 | EOF |
4977bab6 ZW |
5292 | |
5293 | fi | |
5294 | ||
861bb6c1 JL |
5295 | count=a |
5296 | for f in $host_xm_file; do | |
5297 | count=${count}x | |
5298 | done | |
11642c3a ZW |
5299 | if test $count = a; then |
5300 | : | |
5301 | elif test $count = ax; then | |
861bb6c1 JL |
5302 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
5303 | else | |
5304 | echo "Using the following host machine macro files:" | |
5305 | for f in $host_xm_file; do | |
5306 | echo " $srcdir/config/$f" | |
5307 | done | |
5308 | fi | |
476d9098 | 5309 | echo "Using ${out_host_hook_obj} for host machine hooks." |
861bb6c1 | 5310 | |
75bffa71 | 5311 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
5312 | count=a |
5313 | for f in $build_xm_file; do | |
5314 | count=${count}x | |
5315 | done | |
11642c3a ZW |
5316 | if test $count = a; then |
5317 | : | |
5318 | elif test $count = ax; then | |
861bb6c1 JL |
5319 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
5320 | else | |
5321 | echo "Using the following build machine macro files:" | |
5322 | for f in $build_xm_file; do | |
5323 | echo " $srcdir/config/$f" | |
5324 | done | |
5325 | fi | |
5326 | fi | |
5327 | ||
c2e494a8 NN |
5328 | # Check if a valid thread package |
5329 | case ${enable_threads_flag} in | |
5330 | "" | no) | |
5331 | # No threads | |
5332 | target_thread_file='single' | |
5333 | ;; | |
5334 | yes) | |
5335 | # default | |
5336 | target_thread_file='single' | |
5337 | ;; | |
769e49eb NN |
5338 | aix | dce | gnat | irix | posix | rtems | \ |
5339 | single | solaris | vxworks | win32 ) | |
c2e494a8 NN |
5340 | target_thread_file=${enable_threads_flag} |
5341 | ;; | |
5342 | *) | |
5343 | echo "${enable_threads_flag} is an unknown thread package" 1>&2 | |
5344 | exit 1 | |
5345 | ;; | |
5346 | esac | |
5347 | ||
5348 | if test x${thread_file} = x; then | |
5349 | # No thread file set by target-specific clauses in config.gcc, | |
5350 | # so use file chosen by default logic above | |
5351 | thread_file=${target_thread_file} | |
861bb6c1 JL |
5352 | fi |
5353 | ||
2121a768 JT |
5354 | if test x$enable___cxa_atexit = xyes || \ |
5355 | test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then | |
63cf211a | 5356 | cat >> confdefs.h <<\EOF |
2121a768 | 5357 | #define DEFAULT_USE_CXA_ATEXIT 1 |
63cf211a | 5358 | EOF |
2121a768 JT |
5359 | |
5360 | fi | |
5361 | ||
a5381466 | 5362 | # Look for a file containing extra machine modes. |
1c0ca89d ZW |
5363 | if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then |
5364 | extra_modes_file='$(srcdir)'/config/${extra_modes} | |
63cf211a NN |
5365 | |
5366 | cat >> confdefs.h <<EOF | |
e22340b0 | 5367 | #define EXTRA_MODES_FILE "config/$extra_modes" |
63cf211a | 5368 | EOF |
a5381466 ZW |
5369 | |
5370 | fi | |
5371 | ||
b7cb92ad | 5372 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 5373 | # the first file included by config.h. |
4977bab6 | 5374 | # If host=build, it is correct to have bconfig include auto-host.h |
63cf211a | 5375 | # as well. If host!=build, we are in error and need to do more |
db81d74a | 5376 | # work to find out the build config parameters. |
75bffa71 | 5377 | if test x$host = x$build |
db81d74a | 5378 | then |
eaf4e618 | 5379 | build_auto=auto-host.h |
06f0b04c | 5380 | FORBUILD=.. |
b7cb92ad JL |
5381 | else |
5382 | # We create a subdir, then run autoconf in the subdir. | |
5383 | # To prevent recursion we set host and build for the new | |
5384 | # invocation of configure to the build for this invocation | |
63cf211a | 5385 | # of configure. |
b7cb92ad JL |
5386 | tempdir=build.$$ |
5387 | rm -rf $tempdir | |
5388 | mkdir $tempdir | |
5389 | cd $tempdir | |
5390 | case ${srcdir} in | |
255b8a49 | 5391 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
5392 | *) realsrcdir=../${srcdir};; |
5393 | esac | |
d920e825 L |
5394 | saved_CFLAGS="${CFLAGS}" |
5395 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
5396 | ${realsrcdir}/configure \ | |
534d0cc0 | 5397 | --target=$target_alias --host=$build_alias --build=$build_alias |
d920e825 | 5398 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
5399 | |
5400 | # We just finished tests for the build machine, so rename | |
5401 | # the file auto-build.h in the gcc directory. | |
5402 | mv auto-host.h ../auto-build.h | |
5403 | cd .. | |
5404 | rm -rf $tempdir | |
eaf4e618 | 5405 | build_auto=auto-build.h |
3b1b059c | 5406 | FORBUILD=../${build_subdir} |
db81d74a RH |
5407 | fi |
5408 | ||
06f0b04c | 5409 | |
eaf4e618 | 5410 | tm_file="${tm_file} defaults.h" |
4977bab6 ZW |
5411 | tm_p_file="${tm_p_file} tm-preds.h" |
5412 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file}" | |
5413 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file}" | |
49691411 | 5414 | # We don't want ansidecl.h in target files, write code there in ISO/GNU C. |
b4862477 KG |
5415 | # put this back in temporarily. |
5416 | xm_file="ansidecl.h ${xm_file}" | |
0056a9b5 | 5417 | |
34a86c2b NN |
5418 | # -------- |
5419 | # UNSORTED | |
5420 | # -------- | |
5421 | ||
f1943b77 | 5422 | # Get the version trigger filename from the toplevel |
75bffa71 | 5423 | if test "${with_gcc_version_trigger+set}" = set; then |
f1943b77 MH |
5424 | gcc_version_trigger=$with_gcc_version_trigger |
5425 | else | |
5426 | gcc_version_trigger=${srcdir}/version.c | |
5427 | fi | |
022dae81 | 5428 | gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'` |
8763704d | 5429 | gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` |
861bb6c1 | 5430 | |
cc1e60ea | 5431 | # Compile in configure arguments. |
8105825d | 5432 | if test -f configargs.h ; then |
cc1e60ea | 5433 | # Being re-configured. |
022dae81 | 5434 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
5435 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
5436 | else | |
5437 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
5438 | fi | |
eeae7b41 DJ |
5439 | |
5440 | # Double all backslashes and backslash all quotes to turn | |
5441 | # gcc_config_arguments into a C string. | |
5442 | sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out | |
5443 | $gcc_config_arguments | |
5444 | EOF | |
5445 | gcc_config_arguments_str=`cat conftest.out` | |
5446 | rm -f conftest.out | |
5447 | ||
cc1e60ea JM |
5448 | cat > configargs.h <<EOF |
5449 | /* Generated automatically. */ | |
eeae7b41 | 5450 | static const char configuration_arguments[] = "$gcc_config_arguments_str"; |
a6687d2b | 5451 | static const char thread_model[] = "$thread_file"; |
7816bea0 DJ |
5452 | |
5453 | static const struct { | |
5454 | const char *name, *value; | |
5455 | } configure_default_options[] = $configure_default_options; | |
cc1e60ea JM |
5456 | EOF |
5457 | ||
ab87f8c8 JL |
5458 | # Internationalization |
5459 | PACKAGE=gcc | |
5460 | VERSION="$gcc_version" | |
861bb6c1 | 5461 | |
ab87f8c8 JL |
5462 | |
5463 | ||
56694dd9 ZW |
5464 | # If we haven't got the data from the intl directory, |
5465 | # assume NLS is disabled. | |
63cf211a NN |
5466 | USE_NLS=no |
5467 | LIBINTL= | |
5468 | LIBINTL_DEP= | |
5469 | INCINTL= | |
5470 | XGETTEXT= | |
5471 | GMSGFMT= | |
5472 | POSUB= | |
56694dd9 ZW |
5473 | if test -f ../intl/config.intl; then |
5474 | . ../intl/config.intl | |
093e61a6 | 5475 | fi |
63cf211a | 5476 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 |
439a7e54 | 5477 | echo "configure:5478: checking whether NLS is requested" >&5 |
56694dd9 | 5478 | if test x"$USE_NLS" != xyes; then |
63cf211a | 5479 | echo "$ac_t""no" 1>&6 |
56694dd9 | 5480 | else |
63cf211a NN |
5481 | echo "$ac_t""yes" 1>&6 |
5482 | cat >> confdefs.h <<\EOF | |
56694dd9 | 5483 | #define ENABLE_NLS 1 |
63cf211a | 5484 | EOF |
56694dd9 | 5485 | |
093e61a6 | 5486 | |
63cf211a | 5487 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 |
439a7e54 | 5488 | echo "configure:5489: checking for catalogs to be installed" >&5 |
56694dd9 | 5489 | # Look for .po and .gmo files in the source directory. |
63cf211a | 5490 | CATALOGS= |
56694dd9 ZW |
5491 | XLINGUAS= |
5492 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
5493 | # If there aren't any .gmo files the shell will give us the | |
5494 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
5495 | # weeded out. | |
5496 | case "$cat" in *\**) | |
5497 | continue;; | |
5498 | esac | |
5499 | # The quadruple backslash is collapsed to a double backslash | |
5500 | # by the backticks, then collapsed again by the double quotes, | |
5501 | # leaving us with one backslash in the sed expression (right | |
5502 | # before the dot that mustn't act as a wildcard). | |
5503 | cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"` | |
5504 | lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"` | |
5505 | # The user is allowed to set LINGUAS to a list of languages to | |
5506 | # install catalogs for. If it's empty that means "all of them." | |
5507 | if test "x$LINGUAS" = x; then | |
5508 | CATALOGS="$CATALOGS $cat" | |
5509 | XLINGUAS="$XLINGUAS $lang" | |
5510 | else | |
5511 | case "$LINGUAS" in *$lang*) | |
5512 | CATALOGS="$CATALOGS $cat" | |
5513 | XLINGUAS="$XLINGUAS $lang" | |
5514 | ;; | |
5515 | esac | |
5516 | fi | |
5517 | done | |
5518 | LINGUAS="$XLINGUAS" | |
63cf211a | 5519 | echo "$ac_t""$LINGUAS" 1>&6 |
56694dd9 | 5520 | fi |
861bb6c1 | 5521 | |
56694dd9 ZW |
5522 | # If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get |
5523 | # -liconv on the link line twice. | |
5524 | case "$LIBINTL" in *$LIBICONV*) | |
5525 | LIBICONV= ;; | |
5526 | esac | |
dc6746e7 | 5527 | |
56694dd9 ZW |
5528 | # Windows32 Registry support for specifying GCC installation paths. |
5529 | # Check whether --enable-win32-registry or --disable-win32-registry was given. | |
5530 | if test "${enable_win32_registry+set}" = set; then | |
5531 | enableval="$enable_win32_registry" | |
63cf211a NN |
5532 | : |
5533 | fi | |
dc6746e7 | 5534 | |
56694dd9 ZW |
5535 | case $host_os in |
5536 | win32 | pe | cygwin* | mingw32* | uwin*) | |
63cf211a | 5537 | echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6 |
439a7e54 | 5538 | echo "configure:5539: checking whether windows registry support is requested" >&5 |
56694dd9 | 5539 | if test "x$enable_win32_registry" != xno; then |
63cf211a | 5540 | cat >> confdefs.h <<\EOF |
56694dd9 | 5541 | #define ENABLE_WIN32_REGISTRY 1 |
63cf211a | 5542 | EOF |
861bb6c1 | 5543 | |
63cf211a NN |
5544 | echo "$ac_t""yes" 1>&6 |
5545 | ||
5546 | echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6 | |
439a7e54 | 5547 | echo "configure:5548: checking for library containing RegOpenKeyExA" >&5 |
63cf211a NN |
5548 | if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then |
5549 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5550 | else | |
5551 | ac_func_search_save_LIBS="$LIBS" | |
5552 | ac_cv_search_RegOpenKeyExA="no" | |
5553 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 5554 | #line 5555 "configure" |
63cf211a | 5555 | #include "confdefs.h" |
ab87f8c8 JL |
5556 | /* Override any gcc2 internal prototype to avoid an error. */ |
5557 | /* We use char because int might match the return type of a gcc2 | |
63cf211a NN |
5558 | builtin and then its argument prototype would still apply. */ |
5559 | char RegOpenKeyExA(); | |
5560 | ||
5561 | int main() { | |
5562 | RegOpenKeyExA() | |
5563 | ; return 0; } | |
5564 | EOF | |
439a7e54 | 5565 | if { (eval echo configure:5566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
63cf211a | 5566 | rm -rf conftest* |
56694dd9 | 5567 | ac_cv_search_RegOpenKeyExA="none required" |
ab87f8c8 | 5568 | else |
63cf211a NN |
5569 | echo "configure: failed program was:" >&5 |
5570 | cat conftest.$ac_ext >&5 | |
861bb6c1 | 5571 | fi |
63cf211a NN |
5572 | rm -f conftest* |
5573 | test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do | |
5574 | LIBS="-l$i $ac_func_search_save_LIBS" | |
5575 | cat > conftest.$ac_ext <<EOF | |
439a7e54 | 5576 | #line 5577 "configure" |
63cf211a | 5577 | #include "confdefs.h" |
56694dd9 ZW |
5578 | /* Override any gcc2 internal prototype to avoid an error. */ |
5579 | /* We use char because int might match the return type of a gcc2 | |
63cf211a NN |
5580 | builtin and then its argument prototype would still apply. */ |
5581 | char RegOpenKeyExA(); | |
5582 | ||
5583 | int main() { | |
5584 | RegOpenKeyExA() | |
5585 | ; return 0; } | |
5586 | EOF | |
439a7e54 | 5587 | if { (eval echo configure:5588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
63cf211a NN |
5588 | rm -rf conftest* |
5589 | ac_cv_search_RegOpenKeyExA="-l$i" | |
56694dd9 | 5590 | break |
861bb6c1 | 5591 | else |
63cf211a NN |
5592 | echo "configure: failed program was:" >&5 |
5593 | cat conftest.$ac_ext >&5 | |
861bb6c1 | 5594 | fi |
63cf211a NN |
5595 | rm -f conftest* |
5596 | done | |
5597 | LIBS="$ac_func_search_save_LIBS" | |
6e3f3080 | 5598 | fi |
6e3f3080 | 5599 | |
63cf211a NN |
5600 | echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6 |
5601 | if test "$ac_cv_search_RegOpenKeyExA" != "no"; then | |
5602 | test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS" | |
5603 | ||
5604 | else : | |
5605 | ||
ab87f8c8 | 5606 | fi |
cafe096b | 5607 | else |
63cf211a | 5608 | echo "$ac_t""no" 1>&6 |
093e61a6 | 5609 | fi |
ab87f8c8 | 5610 | |
56694dd9 ZW |
5611 | # Check if user specified a different registry key. |
5612 | case "x${enable_win32_registry}" in | |
5613 | x | xyes) | |
5614 | # default. | |
5615 | gcc_cv_win32_registry_key="$VERSION" | |
5616 | ;; | |
5617 | xno) | |
5618 | # no registry lookup. | |
5619 | gcc_cv_win32_registry_key='' | |
5620 | ;; | |
5621 | *) | |
5622 | # user-specified key. | |
5623 | gcc_cv_win32_registry_key="$enable_win32_registry" | |
5624 | ;; | |
5625 | esac | |
ab87f8c8 | 5626 | |
56694dd9 | 5627 | if test "x$enable_win32_registry" != xno; then |
63cf211a | 5628 | echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6 |
439a7e54 | 5629 | echo "configure:5630: checking registry key on windows hosts" >&5 |
63cf211a | 5630 | cat >> confdefs.h <<EOF |
56694dd9 | 5631 | #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key" |
63cf211a | 5632 | EOF |
cafe096b | 5633 | |
63cf211a | 5634 | echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6 |
093e61a6 | 5635 | fi |
56694dd9 ZW |
5636 | ;; |
5637 | esac | |
ab87f8c8 | 5638 | |
56694dd9 ZW |
5639 | # Get an absolute path to the GCC top-level source directory |
5640 | holddir=`${PWDCMD-pwd}` | |
5641 | cd $srcdir | |
5642 | topdir=`${PWDCMD-pwd}` | |
5643 | cd $holddir | |
ab87f8c8 | 5644 | |
56694dd9 | 5645 | # Conditionalize the makefile for this host machine. |
2ed26f6b | 5646 | xmake_file= |
c406e779 | 5647 | for f in ${host_xmake_file} |
56694dd9 ZW |
5648 | do |
5649 | if test -f ${srcdir}/config/$f | |
5650 | then | |
2ed26f6b | 5651 | xmake_file="${xmake_file} \$(srcdir)/config/$f" |
56694dd9 ZW |
5652 | fi |
5653 | done | |
093e61a6 | 5654 | |
56694dd9 | 5655 | # Conditionalize the makefile for this target machine. |
2ed26f6b | 5656 | tmake_file_= |
c406e779 | 5657 | for f in ${tmake_file} |
56694dd9 ZW |
5658 | do |
5659 | if test -f ${srcdir}/config/$f | |
5660 | then | |
2ed26f6b | 5661 | tmake_file_="${tmake_file_} \$(srcdir)/config/$f" |
56694dd9 ZW |
5662 | fi |
5663 | done | |
2ed26f6b | 5664 | tmake_file="${tmake_file_}" |
71a94577 | 5665 | |
56694dd9 | 5666 | symbolic_link='ln -s' |
34a86c2b | 5667 | |
ab87f8c8 JL |
5668 | # If the host doesn't support symlinks, modify CC in |
5669 | # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. | |
5670 | # Otherwise, we can use "CC=$(CC)". | |
5671 | rm -f symtest.tem | |
5672 | if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null | |
5673 | then | |
5674 | cc_set_by_configure="\$(CC)" | |
5aa82ace | 5675 | quoted_cc_set_by_configure="\$(CC)" |
ab87f8c8 | 5676 | stage_prefix_set_by_configure="\$(STAGE_PREFIX)" |
596151e1 | 5677 | quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)" |
ab87f8c8 JL |
5678 | else |
5679 | rm -f symtest.tem | |
5680 | if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null | |
5681 | then | |
5682 | symbolic_link="cp -p" | |
5683 | else | |
5684 | symbolic_link="cp" | |
5685 | fi | |
5686 | cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" | |
5aa82ace | 5687 | quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`" |
ab87f8c8 | 5688 | stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" |
596151e1 | 5689 | 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 |
5690 | fi |
5691 | rm -f symtest.tem | |
5692 | ||
5693 | out_object_file=`basename $out_file .c`.o | |
5694 | ||
5695 | tm_file_list= | |
e22340b0 | 5696 | tm_include_list= |
ab87f8c8 | 5697 | for f in $tm_file; do |
64ccbc99 | 5698 | case $f in |
d02af173 | 5699 | defaults.h ) |
e22340b0 ZW |
5700 | tm_file_list="${tm_file_list} \$(srcdir)/$f" |
5701 | tm_include_list="${tm_include_list} $f" | |
5702 | ;; | |
5703 | * ) | |
5704 | tm_file_list="${tm_file_list} \$(srcdir)/config/$f" | |
5705 | tm_include_list="${tm_include_list} config/$f" | |
5706 | ;; | |
64ccbc99 | 5707 | esac |
ab87f8c8 JL |
5708 | done |
5709 | ||
11642c3a | 5710 | tm_p_file_list= |
e22340b0 | 5711 | tm_p_include_list= |
11642c3a | 5712 | for f in $tm_p_file; do |
4977bab6 ZW |
5713 | case $f in |
5714 | tm-preds.h ) | |
e22340b0 ZW |
5715 | tm_p_file_list="${tm_p_file_list} $f" |
5716 | tm_p_include_list="${tm_p_include_list} $f" | |
5717 | ;; | |
5718 | * ) | |
5719 | tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" | |
5720 | tm_p_include_list="${tm_p_include_list} config/$f" | |
5721 | esac | |
5722 | done | |
5723 | ||
5724 | xm_file_list= | |
5725 | xm_include_list= | |
5726 | for f in $xm_file; do | |
5727 | case $f in | |
5728 | ansidecl.h ) | |
5729 | xm_file_list="${xm_file_list} \$(srcdir)/../include/$f" | |
5730 | xm_include_list="${xm_include_list} $f" | |
5731 | ;; | |
5732 | auto-host.h ) | |
5733 | xm_file_list="${xm_file_list} $f" | |
5734 | xm_include_list="${xm_include_list} $f" | |
5735 | ;; | |
5736 | * ) | |
5737 | xm_file_list="${xm_file_list} \$(srcdir)/config/$f" | |
5738 | xm_include_list="${xm_include_list} config/$f" | |
5739 | ;; | |
4977bab6 | 5740 | esac |
11642c3a ZW |
5741 | done |
5742 | ||
ab87f8c8 | 5743 | host_xm_file_list= |
e22340b0 | 5744 | host_xm_include_list= |
ab87f8c8 | 5745 | for f in $host_xm_file; do |
64ccbc99 | 5746 | case $f in |
d02af173 | 5747 | ansidecl.h ) |
e22340b0 ZW |
5748 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f" |
5749 | host_xm_include_list="${host_xm_include_list} $f" | |
5750 | ;; | |
e2500fed | 5751 | auto-host.h ) |
e22340b0 ZW |
5752 | host_xm_file_list="${host_xm_file_list} $f" |
5753 | host_xm_include_list="${host_xm_include_list} $f" | |
5754 | ;; | |
5755 | * ) | |
5756 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" | |
5757 | host_xm_include_list="${host_xm_include_list} config/$f" | |
5758 | ;; | |
64ccbc99 | 5759 | esac |
ab87f8c8 JL |
5760 | done |
5761 | ||
5762 | build_xm_file_list= | |
5763 | for f in $build_xm_file; do | |
64ccbc99 | 5764 | case $f in |
d02af173 | 5765 | ansidecl.h ) |
e22340b0 ZW |
5766 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f" |
5767 | build_xm_include_list="${build_xm_include_list} $f" | |
5768 | ;; | |
e2500fed | 5769 | auto-build.h | auto-host.h ) |
e22340b0 ZW |
5770 | build_xm_file_list="${build_xm_file_list} $f" |
5771 | build_xm_include_list="${build_xm_include_list} $f" | |
5772 | ;; | |
5773 | * ) | |
5774 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" | |
5775 | build_xm_include_list="${build_xm_include_list} config/$f" | |
5776 | ;; | |
64ccbc99 | 5777 | esac |
ab87f8c8 JL |
5778 | done |
5779 | ||
a078a589 ZW |
5780 | # Define macro CROSS_COMPILE in compilation if this is a cross-compiler. |
5781 | # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR. | |
63cf211a NN |
5782 | CROSS= |
5783 | ALL=all.internal | |
5784 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
5785 | if test x$host != x$target |
5786 | then | |
a078a589 ZW |
5787 | CROSS="-DCROSS_COMPILE" |
5788 | ALL=all.cross | |
5789 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
343f59d9 | 5790 | case "$host","$target" in |
3a7e8b87 GK |
5791 | # Darwin crosses can use the host system's libraries and headers, |
5792 | # because of the fat library support. Of course, it must be the | |
5793 | # same version of Darwin on both sides. Allow the user to | |
5794 | # just say --target=foo-darwin without a version number to mean | |
5795 | # "the version on this system". | |
5796 | *-*-darwin*,*-*-darwin*) | |
5797 | hostos=`echo $host | sed 's/.*-darwin/darwin/'` | |
5798 | targetos=`echo $target | sed 's/.*-darwin/darwin/'` | |
5799 | if test $hostos = $targetos -o $targetos = darwin ; then | |
5800 | CROSS= | |
5801 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
5802 | with_headers=yes | |
5803 | fi | |
5804 | ;; | |
5805 | ||
343f59d9 AM |
5806 | i?86-*-*,x86_64-*-* \ |
5807 | | powerpc*-*-*,powerpc64*-*-*) | |
5808 | CROSS="$CROSS -DNATIVE_CROSS" ;; | |
5809 | esac | |
7a615b25 AO |
5810 | elif test "x$TARGET_SYSTEM_ROOT" != x; then |
5811 | # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR) | |
5812 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
5813 | fi |
5814 | ||
b39d221a EC |
5815 | # If this is a cross-compiler that does not |
5816 | # have its own set of headers then define | |
5817 | # inhibit_libc | |
5818 | ||
dc06db20 R |
5819 | # If this is using newlib, without having the headers available now, |
5820 | # then define inhibit_libc in LIBGCC2_CFLAGS. | |
fecd6201 ZW |
5821 | # This prevents libgcc2 from containing any code which requires libc |
5822 | # support. | |
b39d221a | 5823 | inhibit_libc= |
dc06db20 R |
5824 | if { { test x$host != x$target && test "x$with_sysroot" = x ; } || |
5825 | test x$with_newlib = xyes ; } && | |
e50084fa | 5826 | { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then |
b39d221a | 5827 | inhibit_libc=-Dinhibit_libc |
b39d221a EC |
5828 | fi |
5829 | ||
5830 | ||
a078a589 ZW |
5831 | # When building gcc with a cross-compiler, we need to adjust things so |
5832 | # that the generator programs are still built with the native compiler. | |
5833 | # Also, we cannot run fixincludes or fix-header. | |
a078a589 ZW |
5834 | |
5835 | # These are the normal (build=host) settings: | |
63cf211a NN |
5836 | BUILD_PREFIX= |
5837 | BUILD_PREFIX_1=ignore- | |
5838 | CC_FOR_BUILD='$(CC)' | |
5839 | BUILD_CFLAGS='$(ALL_CFLAGS)' | |
a078a589 | 5840 | |
63cf211a | 5841 | STMP_FIXINC=stmp-fixinc |
8ad9fb33 AP |
5842 | |
5843 | # Possibly disable fixproto, on a per-target basis. | |
5844 | case ${use_fixproto} in | |
5845 | no) | |
5846 | STMP_FIXPROTO= | |
5847 | ;; | |
5848 | yes) | |
5849 | STMP_FIXPROTO=stmp-fixproto | |
5850 | ;; | |
5851 | esac | |
5852 | ||
a078a589 | 5853 | |
83599948 NS |
5854 | # And these apply if build != host, or we are generating coverage data |
5855 | if test x$build != x$host || test "x$coverage_flags" != x | |
ab87f8c8 | 5856 | then |
5c35940c NN |
5857 | BUILD_PREFIX=build- |
5858 | BUILD_PREFIX_1=build- | |
b11e4747 | 5859 | BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' |
a078a589 | 5860 | |
7a615b25 AO |
5861 | if test "x$TARGET_SYSTEM_ROOT" = x; then |
5862 | STMP_FIXINC= | |
5863 | STMP_FIXPROTO= | |
5864 | fi | |
ab87f8c8 JL |
5865 | fi |
5866 | ||
5867 | # Expand extra_headers to include complete path. | |
5868 | # This substitutes for lots of t-* files. | |
5869 | extra_headers_list= | |
b1ef58c8 NN |
5870 | # Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers. |
5871 | for file in ${extra_headers} ; do | |
5872 | extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}" | |
5873 | done | |
ab87f8c8 | 5874 | |
ab87f8c8 | 5875 | # Add a definition of USE_COLLECT2 if system wants one. |
34a86c2b NN |
5876 | case $use_collect2 in |
5877 | no) use_collect2= ;; | |
5878 | "") ;; | |
63cf211a | 5879 | *) |
34a86c2b NN |
5880 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
5881 | xm_defines="${xm_defines} USE_COLLECT2" | |
5882 | ;; | |
5883 | esac | |
ab87f8c8 | 5884 | |
d869a8c4 NN |
5885 | # Identify the assembler which will work hand-in-glove with the newly |
5886 | # built GCC, so that we can examine its features. This is the assembler | |
5887 | # which will be driven by the driver program. | |
5888 | # | |
5889 | # If build != host, and we aren't building gas in-tree, we identify a | |
5890 | # build->target assembler and hope that it will have the same features | |
5891 | # as the host->target assembler we'll be using. | |
63cf211a | 5892 | echo $ac_n "checking what assembler to use""... $ac_c" 1>&6 |
439a7e54 | 5893 | echo "configure:5894: checking what assembler to use" >&5 |
34a86c2b | 5894 | in_tree_gas=no |
ab87f8c8 | 5895 | gcc_cv_as= |
981d4858 JM |
5896 | gcc_cv_gas_major_version= |
5897 | gcc_cv_gas_minor_version= | |
ab87f8c8 JL |
5898 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas |
5899 | if test -x "$DEFAULT_ASSEMBLER"; then | |
5900 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
5901 | elif test -x "$AS"; then | |
5902 | gcc_cv_as="$AS" | |
5903 | elif test -x as$host_exeext; then | |
5904 | # Build using assembler in the current directory. | |
5905 | gcc_cv_as=./as$host_exeext | |
34a86c2b NN |
5906 | elif test -f $gcc_cv_as_gas_srcdir/configure.in \ |
5907 | && test -f ../gas/Makefile; then | |
ad9c4d9f NN |
5908 | # Single tree build which includes gas. |
5909 | in_tree_gas=yes | |
5910 | gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
5911 | for f in $gcc_cv_as_bfd_srcdir/configure \ | |
5912 | $gcc_cv_as_gas_srcdir/configure \ | |
5913 | $gcc_cv_as_gas_srcdir/configure.in \ | |
5914 | $gcc_cv_as_gas_srcdir/Makefile.in ; do | |
5915 | gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` | |
5916 | if test x$gcc_cv_gas_version != x; then | |
5917 | break | |
5918 | fi | |
5919 | done | |
5920 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
5921 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
5922 | gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"` | |
5aaaf0e8 NN |
5923 | case $gcc_cv_gas_patch_version in |
5924 | "") gcc_cv_gas_patch_version="0" ;; | |
5925 | esac | |
8ada417f ZW |
5926 | gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \ |
5927 | + $gcc_cv_gas_minor_version \) \* 1000 \ | |
5928 | + $gcc_cv_gas_patch_version` | |
ad9c4d9f | 5929 | |
f9c1196a ZW |
5930 | rm -f as$host_exeext |
5931 | $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null | |
5408ac6c HPN |
5932 | in_tree_gas_is_elf=no |
5933 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
5934 | || (grep 'obj_format = multi' ../gas/Makefile \ | |
5935 | && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null | |
5936 | then | |
5937 | in_tree_gas_is_elf=yes | |
5938 | fi | |
981d4858 | 5939 | fi |
9e423e6d | 5940 | |
534d0cc0 | 5941 | if test "x$gcc_cv_as" = x; then |
779243f7 JL |
5942 | # Search the same directories that the installed compiler will |
5943 | # search. Else we may find the wrong assembler and lose. If we | |
5944 | # do not find a suitable assembler binary, then try the user's | |
5945 | # path. | |
5946 | # | |
5947 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
5948 | # user's path. Unfortunately, there is no good way to get at the | |
5949 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
5950 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
5951 | # to be fixed as part of the make/configure rewrite too. | |
5952 | ||
5953 | if test "x$exec_prefix" = xNONE; then | |
5954 | if test "x$prefix" = xNONE; then | |
5955 | test_prefix=/usr/local | |
5956 | else | |
5957 | test_prefix=$prefix | |
5958 | fi | |
5959 | else | |
5960 | test_prefix=$exec_prefix | |
5961 | fi | |
5962 | ||
5963 | # If the loop below does not find an assembler, then use whatever | |
5964 | # one we can find in the users's path. | |
5965 | # user's path. | |
55a2ea2a AM |
5966 | if test "x$program_prefix" != xNONE; then |
5967 | gcc_cv_as=${program_prefix}as$host_exeext | |
5968 | else | |
5969 | gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext | |
5970 | fi | |
5971 | ||
caa55b1e NN |
5972 | test_dirs="$test_prefix/lib/gcc-lib/$target_noncanonical/$gcc_version \ |
5973 | $test_prefix/lib/gcc-lib/$target_noncanonical \ | |
5974 | /usr/lib/gcc/$target_noncanonical/$gcc_version \ | |
5975 | /usr/lib/gcc/$target_noncanonical \ | |
5976 | $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \ | |
5977 | $test_prefix/$target_noncanonical/bin" | |
55a2ea2a AM |
5978 | |
5979 | if test x$host = x$target; then | |
5980 | test_dirs="$test_dirs \ | |
779243f7 JL |
5981 | /usr/libexec \ |
5982 | /usr/ccs/gcc \ | |
5983 | /usr/ccs/bin \ | |
5984 | /udk/usr/ccs/bin \ | |
5985 | /bsd43/usr/lib/cmplrs/cc \ | |
5986 | /usr/cross64/usr/bin \ | |
5987 | /usr/lib/cmplrs/cc \ | |
5988 | /sysv/usr/lib/cmplrs/cc \ | |
5989 | /svr4/usr/lib/cmplrs/cc \ | |
5990 | /usr/bin" | |
55a2ea2a | 5991 | fi |
779243f7 JL |
5992 | |
5993 | for dir in $test_dirs; do | |
55a2ea2a | 5994 | if test -x $dir/as$host_exeext; then |
779243f7 JL |
5995 | gcc_cv_as=$dir/as$host_exeext |
5996 | break; | |
5997 | fi | |
5998 | done | |
9e423e6d | 5999 | fi |
34a86c2b NN |
6000 | case $in_tree_gas in |
6001 | yes) | |
63cf211a | 6002 | echo "$ac_t"""newly built gas"" 1>&6 |
34a86c2b NN |
6003 | ;; |
6004 | no) | |
63cf211a | 6005 | echo "$ac_t""$gcc_cv_as" 1>&6 |
34a86c2b NN |
6006 | ;; |
6007 | esac | |
981d4858 | 6008 | |
d869a8c4 NN |
6009 | # Identify the linker which will work hand-in-glove with the newly |
6010 | # built GCC, so that we can examine its features. This is the linker | |
6011 | # which will be driven by the driver program. | |
6012 | # | |
6013 | # If build != host, and we aren't building gas in-tree, we identify a | |
6014 | # build->target linker and hope that it will have the same features | |
6015 | # as the host->target linker we'll be using. | |
63cf211a | 6016 | echo $ac_n "checking what linker to use""... $ac_c" 1>&6 |
439a7e54 | 6017 | echo "configure:6018: checking what linker to use" >&5 |
34a86c2b | 6018 | in_tree_ld=no |
275b60d6 JJ |
6019 | gcc_cv_ld= |
6020 | gcc_cv_gld_major_version= | |
6021 | gcc_cv_gld_minor_version= | |
6022 | gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld | |
6023 | gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
6024 | if test -x "$DEFAULT_LINKER"; then | |
6025 | gcc_cv_ld="$DEFAULT_LINKER" | |
6026 | elif test -x "$LD"; then | |
6027 | gcc_cv_ld="$LD" | |
f9c1196a | 6028 | elif test -x collect-ld$host_exeext; then |
275b60d6 | 6029 | # Build using linker in the current directory. |
f9c1196a | 6030 | gcc_cv_ld=./collect-ld$host_exeext |
34a86c2b NN |
6031 | elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ |
6032 | && test -f ../ld/Makefile; then | |
275b60d6 | 6033 | # Single tree build which includes ld. |
34a86c2b | 6034 | in_tree_ld=yes |
5408ac6c HPN |
6035 | in_tree_ld_is_elf=no |
6036 | if (grep 'EMUL = .*elf' ../ld/Makefile \ | |
6037 | || grep 'EMUL = .*linux' ../ld/Makefile) > /dev/null; then | |
6038 | in_tree_ld_is_elf=yes | |
6039 | fi | |
275b60d6 JJ |
6040 | 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 |
6041 | do | |
6042 | gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` | |
6043 | if test x$gcc_cv_gld_version != x; then | |
6044 | break | |
6045 | fi | |
6046 | done | |
6047 | gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` | |
6048 | gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
f9c1196a ZW |
6049 | rm -f collect-ld$host_exeext |
6050 | $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \ | |
6051 | 2>/dev/null | |
275b60d6 JJ |
6052 | fi |
6053 | ||
534d0cc0 | 6054 | if test "x$gcc_cv_ld" = x; then |
275b60d6 JJ |
6055 | # Search the same directories that the installed compiler will |
6056 | # search. Else we may find the wrong linker and lose. If we | |
6057 | # do not find a suitable linker binary, then try the user's | |
6058 | # path. | |
6059 | # | |
6060 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
6061 | # user's path. Unfortunately, there is no good way to get at the | |
6062 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
6063 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
6064 | # to be fixed as part of the make/configure rewrite too. | |
6065 | ||
6066 | if test "x$exec_prefix" = xNONE; then | |
6067 | if test "x$prefix" = xNONE; then | |
6068 | test_prefix=/usr/local | |
6069 | else | |
6070 | test_prefix=$prefix | |
6071 | fi | |
6072 | else | |
6073 | test_prefix=$exec_prefix | |
6074 | fi | |
6075 | ||
6076 | # If the loop below does not find an linker, then use whatever | |
6077 | # one we can find in the users's path. | |
6078 | # user's path. | |
55a2ea2a AM |
6079 | if test "x$program_prefix" != xNONE; then |
6080 | gcc_cv_ld=${program_prefix}ld$host_exeext | |
6081 | else | |
6082 | gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext | |
6083 | fi | |
6084 | ||
caa55b1e NN |
6085 | test_dirs="$test_prefix/lib/gcc-lib/$target_noncanonical/$gcc_version \ |
6086 | $test_prefix/lib/gcc-lib/$target_noncanonical \ | |
6087 | /usr/lib/gcc/$target_noncanonical/$gcc_version \ | |
6088 | /usr/lib/gcc/$target_noncanonical \ | |
6089 | $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \ | |
6090 | $test_prefix/$target_noncanonical/bin" | |
55a2ea2a AM |
6091 | |
6092 | if test x$host = x$target; then | |
6093 | test_dirs="$test_dirs \ | |
275b60d6 JJ |
6094 | /usr/libexec \ |
6095 | /usr/ccs/gcc \ | |
6096 | /usr/ccs/bin \ | |
6097 | /udk/usr/ccs/bin \ | |
6098 | /bsd43/usr/lib/cmplrs/cc \ | |
6099 | /usr/cross64/usr/bin \ | |
6100 | /usr/lib/cmplrs/cc \ | |
6101 | /sysv/usr/lib/cmplrs/cc \ | |
6102 | /svr4/usr/lib/cmplrs/cc \ | |
6103 | /usr/bin" | |
55a2ea2a | 6104 | fi |
275b60d6 JJ |
6105 | |
6106 | for dir in $test_dirs; do | |
55a2ea2a | 6107 | if test -x $dir/ld$host_exeext; then |
275b60d6 JJ |
6108 | gcc_cv_ld=$dir/ld$host_exeext |
6109 | break; | |
6110 | fi | |
6111 | done | |
6112 | fi | |
34a86c2b NN |
6113 | case $in_tree_ld in |
6114 | yes) | |
63cf211a | 6115 | echo "$ac_t"""newly built ld"" 1>&6 |
34a86c2b NN |
6116 | ;; |
6117 | no) | |
63cf211a | 6118 | echo "$ac_t""$gcc_cv_ld" 1>&6 |
34a86c2b NN |
6119 | ;; |
6120 | esac | |
275b60d6 | 6121 | |
981d4858 | 6122 | # Figure out what nm we will be using. |
f9c1196a | 6123 | gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils |
63cf211a | 6124 | echo $ac_n "checking what nm to use""... $ac_c" 1>&6 |
439a7e54 | 6125 | echo "configure:6126: checking what nm to use" >&5 |
f9c1196a | 6126 | in_tree_nm=no |
981d4858 JM |
6127 | if test -x nm$host_exeext; then |
6128 | gcc_cv_nm=./nm$host_exeext | |
f9c1196a ZW |
6129 | elif test -f $gcc_cv_binutils_srcdir/configure.in \ |
6130 | && test -f ../binutils/Makefile; then | |
6131 | # Single tree build which includes binutils. | |
6132 | in_tree_nm=yes | |
6133 | gcc_cv_nm=./nm$host_exeext | |
6134 | rm -f nm$host_exeext | |
6135 | $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null | |
534d0cc0 AM |
6136 | elif test "x$program_prefix" != xNONE; then |
6137 | gcc_cv_nm=${program_prefix}nm$host_exeext | |
6138 | else | |
6139 | gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext | |
981d4858 | 6140 | fi |
f9c1196a | 6141 | case $in_tree_nm in |
63cf211a NN |
6142 | yes) echo "$ac_t"""newly built nm"" 1>&6 ;; |
6143 | no) echo "$ac_t""$gcc_cv_nm" 1>&6 ;; | |
f9c1196a | 6144 | esac |
981d4858 | 6145 | |
3cae5780 | 6146 | # Figure out what objdump we will be using. |
63cf211a | 6147 | echo $ac_n "checking what objdump to use""... $ac_c" 1>&6 |
439a7e54 | 6148 | echo "configure:6149: checking what objdump to use" >&5 |
f9c1196a | 6149 | in_tree_objdump=no |
3cae5780 AS |
6150 | if test -x objdump$host_exeext; then |
6151 | gcc_cv_objdump=./objdump$host_exeext | |
f9c1196a ZW |
6152 | elif test -f $gcc_cv_binutils_srcdir/configure.in \ |
6153 | && test -f ../binutils/Makefile; then | |
6154 | # Single tree build which includes binutils. | |
6155 | in_tree_objdump=yes | |
6156 | gcc_cv_objdump=./objdump$host_exeext | |
6157 | rm -f objdump$host_exeext | |
6158 | $symbolic_link ../binutils/objdump$host_exeext \ | |
6159 | objdump$host_exeext 2>/dev/null | |
534d0cc0 AM |
6160 | elif test "x$program_prefix" != xNONE; then |
6161 | gcc_cv_objdump=${program_prefix}objdump$host_exeext | |
6162 | else | |
f9c1196a ZW |
6163 | gcc_cv_objdump=`echo objdump | \ |
6164 | sed ${program_transform_name}`$host_exeext | |
3cae5780 | 6165 | fi |
f9c1196a | 6166 | case $in_tree_objdump in |
63cf211a NN |
6167 | yes) echo "$ac_t"""newly built objdump"" 1>&6 ;; |
6168 | no) echo "$ac_t""$gcc_cv_objdump" 1>&6 ;; | |
f9c1196a | 6169 | esac |
3cae5780 | 6170 | |
981d4858 | 6171 | # Figure out what assembler alignment features are present. |
63cf211a | 6172 | echo $ac_n "checking assembler for .balign and .p2align""... $ac_c" 1>&6 |
439a7e54 | 6173 | echo "configure:6174: checking assembler for .balign and .p2align" >&5 |
63cf211a NN |
6174 | if eval "test \"`echo '$''{'gcc_cv_as_balign_and_p2align'+set}'`\" = set"; then |
6175 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8ada417f ZW |
6176 | else |
6177 | gcc_cv_as_balign_and_p2align=no | |
6178 | if test $in_tree_gas = yes; then | |
6179 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0` | |
6180 | then gcc_cv_as_balign_and_p2align=yes | |
6181 | fi | |
6182 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 6183 | echo '.balign 4 |
8ada417f | 6184 | .p2align 2' > conftest.s |
439a7e54 | 6185 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6186: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6186 | then |
6187 | gcc_cv_as_balign_and_p2align=yes | |
6188 | else | |
6189 | echo "configure: failed program was" >&5 | |
6190 | cat conftest.s >&5 | |
6191 | fi | |
6192 | rm -f conftest.o conftest.s | |
6193 | fi | |
6194 | fi | |
6e3f3080 | 6195 | |
63cf211a NN |
6196 | echo "$ac_t""$gcc_cv_as_balign_and_p2align" 1>&6 |
6197 | if test $gcc_cv_as_balign_and_p2align = yes; then | |
6198 | cat >> confdefs.h <<\EOF | |
981d4858 | 6199 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 |
63cf211a | 6200 | EOF |
981d4858 | 6201 | |
ad9c4d9f NN |
6202 | fi |
6203 | ||
63cf211a | 6204 | echo $ac_n "checking assembler for .p2align with maximum skip""... $ac_c" 1>&6 |
439a7e54 | 6205 | echo "configure:6206: checking assembler for .p2align with maximum skip" >&5 |
63cf211a NN |
6206 | if eval "test \"`echo '$''{'gcc_cv_as_max_skip_p2align'+set}'`\" = set"; then |
6207 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8ada417f ZW |
6208 | else |
6209 | gcc_cv_as_max_skip_p2align=no | |
6210 | if test $in_tree_gas = yes; then | |
6211 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0` | |
6212 | then gcc_cv_as_max_skip_p2align=yes | |
6213 | fi | |
6214 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 6215 | echo '.p2align 4,,7' > conftest.s |
439a7e54 | 6216 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6217 | then |
6218 | gcc_cv_as_max_skip_p2align=yes | |
6219 | else | |
6220 | echo "configure: failed program was" >&5 | |
6221 | cat conftest.s >&5 | |
6222 | fi | |
6223 | rm -f conftest.o conftest.s | |
6224 | fi | |
ad9c4d9f | 6225 | fi |
6e3f3080 | 6226 | |
63cf211a NN |
6227 | echo "$ac_t""$gcc_cv_as_max_skip_p2align" 1>&6 |
6228 | if test $gcc_cv_as_max_skip_p2align = yes; then | |
6229 | cat >> confdefs.h <<\EOF | |
9e423e6d | 6230 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 |
63cf211a | 6231 | EOF |
9e423e6d | 6232 | |
9e423e6d | 6233 | fi |
ad9c4d9f | 6234 | |
63cf211a | 6235 | echo $ac_n "checking assembler for working .subsection -1""... $ac_c" 1>&6 |
439a7e54 | 6236 | echo "configure:6237: checking assembler for working .subsection -1" >&5 |
63cf211a NN |
6237 | if eval "test \"`echo '$''{'gcc_cv_as_subsection_m1'+set}'`\" = set"; then |
6238 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8ada417f ZW |
6239 | else |
6240 | gcc_cv_as_subsection_m1=no | |
6241 | if test $in_tree_gas = yes; then | |
6242 | if test $in_tree_gas_is_elf = yes \ | |
6243 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
6244 | then gcc_cv_as_subsection_m1=yes | |
ad9c4d9f | 6245 | fi |
8ada417f | 6246 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 6247 | echo 'conftest_label1: .word 0 |
d1accaa3 JJ |
6248 | .subsection -1 |
6249 | conftest_label2: .word 0 | |
8ada417f | 6250 | .previous' > conftest.s |
439a7e54 | 6251 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6252 | then |
6253 | if test x$gcc_cv_nm != x; then | |
6254 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
6255 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
6256 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1 | |
6257 | then : | |
6258 | else gcc_cv_as_subsection_m1=yes | |
6259 | fi | |
6260 | rm -f conftest.nm1 conftest.nm2 | |
6261 | fi | |
6262 | else | |
6263 | echo "configure: failed program was" >&5 | |
6264 | cat conftest.s >&5 | |
6265 | fi | |
6266 | rm -f conftest.o conftest.s | |
6267 | fi | |
981d4858 | 6268 | fi |
6e3f3080 | 6269 | |
63cf211a NN |
6270 | echo "$ac_t""$gcc_cv_as_subsection_m1" 1>&6 |
6271 | if test $gcc_cv_as_subsection_m1 = yes; then | |
6272 | cat >> confdefs.h <<\EOF | |
981d4858 | 6273 | #define HAVE_GAS_SUBSECTION_ORDERING 1 |
63cf211a | 6274 | EOF |
981d4858 | 6275 | |
d1accaa3 | 6276 | fi |
ad9c4d9f | 6277 | |
63cf211a | 6278 | echo $ac_n "checking assembler for .weak""... $ac_c" 1>&6 |
439a7e54 | 6279 | echo "configure:6280: checking assembler for .weak" >&5 |
63cf211a NN |
6280 | if eval "test \"`echo '$''{'gcc_cv_as_weak'+set}'`\" = set"; then |
6281 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8ada417f ZW |
6282 | else |
6283 | gcc_cv_as_weak=no | |
6284 | if test $in_tree_gas = yes; then | |
6285 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0` | |
6286 | then gcc_cv_as_weak=yes | |
ad9c4d9f | 6287 | fi |
8ada417f | 6288 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 6289 | echo ' .weak foobar' > conftest.s |
439a7e54 | 6290 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6291 | then |
6292 | gcc_cv_as_weak=yes | |
6293 | else | |
6294 | echo "configure: failed program was" >&5 | |
6295 | cat conftest.s >&5 | |
6296 | fi | |
6297 | rm -f conftest.o conftest.s | |
6298 | fi | |
981d4858 | 6299 | fi |
6e3f3080 | 6300 | |
63cf211a NN |
6301 | echo "$ac_t""$gcc_cv_as_weak" 1>&6 |
6302 | if test $gcc_cv_as_weak = yes; then | |
6303 | cat >> confdefs.h <<\EOF | |
981d4858 | 6304 | #define HAVE_GAS_WEAK 1 |
63cf211a | 6305 | EOF |
981d4858 | 6306 | |
12822146 | 6307 | fi |
ad9c4d9f | 6308 | |
8ada417f ZW |
6309 | # .hidden needs to be supported in both the assembler and the linker, |
6310 | # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | |
6311 | # This is irritatingly difficult to feature test for; we have to check the | |
6312 | # date string after the version number. If we've got an in-tree | |
6313 | # ld, we don't know its patchlevel version, so we set the baseline at 2.13 | |
6314 | # to be safe. | |
6315 | # The gcc_GAS_CHECK_FEATURE call just sets a cache variable. | |
63cf211a | 6316 | echo $ac_n "checking assembler for .hidden""... $ac_c" 1>&6 |
439a7e54 | 6317 | echo "configure:6318: checking assembler for .hidden" >&5 |
63cf211a NN |
6318 | if eval "test \"`echo '$''{'gcc_cv_as_hidden'+set}'`\" = set"; then |
6319 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8ada417f ZW |
6320 | else |
6321 | gcc_cv_as_hidden=no | |
6322 | if test $in_tree_gas = yes; then | |
6323 | if test $in_tree_gas_is_elf = yes \ | |
6324 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0` | |
6325 | then gcc_cv_as_hidden=yes | |
6326 | fi | |
6327 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 6328 | echo ' .hidden foobar |
8ada417f | 6329 | foobar:' > conftest.s |
439a7e54 | 6330 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6331 | then |
6332 | gcc_cv_as_hidden=yes | |
6333 | else | |
6334 | echo "configure: failed program was" >&5 | |
6335 | cat conftest.s >&5 | |
6336 | fi | |
6337 | rm -f conftest.o conftest.s | |
6338 | fi | |
6339 | fi | |
63cf211a NN |
6340 | |
6341 | echo "$ac_t""$gcc_cv_as_hidden" 1>&6 | |
ad9c4d9f | 6342 | |
ad9c4d9f | 6343 | |
63cf211a | 6344 | echo $ac_n "checking linker for .hidden support""... $ac_c" 1>&6 |
439a7e54 | 6345 | echo "configure:6346: checking linker for .hidden support" >&5 |
63cf211a NN |
6346 | if eval "test \"`echo '$''{'gcc_cv_ld_hidden'+set}'`\" = set"; then |
6347 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8ada417f ZW |
6348 | else |
6349 | if test $in_tree_ld = yes ; then | |
6350 | gcc_cv_ld_hidden=no | |
6351 | 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 \ | |
6352 | && test $in_tree_ld_is_elf = yes; then | |
6353 | gcc_cv_ld_hidden=yes | |
6354 | fi | |
6355 | else | |
6356 | gcc_cv_ld_hidden=yes | |
bace148a | 6357 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` |
8ada417f ZW |
6358 | if echo "$ld_ver" | grep GNU > /dev/null; then |
6359 | ld_vers=`echo $ld_ver | sed -n \ | |
6360 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
6361 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
6362 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
6363 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
6364 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
6365 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'` | |
6366 | 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'` | |
6367 | if test 0"$ld_date" -lt 20020404; then | |
6368 | if test -n "$ld_date"; then | |
6369 | # If there was date string, but was earlier than 2002-04-04, fail | |
6370 | gcc_cv_ld_hidden=no | |
6371 | elif test -z "$ld_vers"; then | |
6372 | # If there was no date string nor ld version number, something is wrong | |
6373 | gcc_cv_ld_hidden=no | |
6374 | else | |
6375 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` | |
6376 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
6377 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |
6378 | test -z "$ld_vers_patch" && ld_vers_patch=0 | |
6379 | if test "$ld_vers_major" -lt 2; then | |
6380 | gcc_cv_ld_hidden=no | |
6381 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
6382 | gcc_cv_ld_hidden="no" | |
6383 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then | |
6384 | gcc_cv_ld_hidden=no | |
c72931a6 | 6385 | fi |
8ada417f | 6386 | fi |
789b7de5 | 6387 | fi |
8ada417f | 6388 | else |
28690784 JDA |
6389 | case "${target}" in |
6390 | hppa64*-*-hpux*) | |
6391 | gcc_cv_ld_hidden=yes | |
6392 | ;; | |
6393 | *) | |
6394 | gcc_cv_ld_hidden=no | |
6395 | ;; | |
6396 | esac | |
8ada417f ZW |
6397 | fi |
6398 | fi | |
6d07784a | 6399 | fi |
63cf211a NN |
6400 | |
6401 | echo "$ac_t""$gcc_cv_ld_hidden" 1>&6 | |
8ada417f | 6402 | libgcc_visibility=no |
ad9c4d9f | 6403 | |
8e3940b2 | 6404 | if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then |
8ada417f | 6405 | libgcc_visibility=yes |
63cf211a | 6406 | cat >> confdefs.h <<\EOF |
8ada417f | 6407 | #define HAVE_GAS_HIDDEN 1 |
63cf211a | 6408 | EOF |
ad9c4d9f NN |
6409 | |
6410 | fi | |
6411 | ||
8ada417f | 6412 | # Check if we have .[us]leb128, and support symbol arithmetic with it. |
63cf211a | 6413 | echo $ac_n "checking assembler for .sleb128 and .uleb128""... $ac_c" 1>&6 |
439a7e54 | 6414 | echo "configure:6415: checking assembler for .sleb128 and .uleb128" >&5 |
63cf211a NN |
6415 | if eval "test \"`echo '$''{'gcc_cv_as_leb128'+set}'`\" = set"; then |
6416 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8ada417f ZW |
6417 | else |
6418 | gcc_cv_as_leb128=no | |
6419 | if test $in_tree_gas = yes; then | |
6420 | if test $in_tree_gas_is_elf = yes \ | |
6421 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
6422 | then gcc_cv_as_leb128=yes | |
6423 | fi | |
6424 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 6425 | echo ' .data |
b7460f24 RH |
6426 | .uleb128 L2 - L1 |
6427 | L1: | |
6428 | .uleb128 1280 | |
6429 | .sleb128 -1010 | |
8ada417f | 6430 | L2:' > conftest.s |
439a7e54 | 6431 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6432 | then |
6433 | # GAS versions before 2.11 do not support uleb128, | |
6434 | # despite appearing to. | |
6435 | # ??? There exists an elf-specific test that will crash | |
6436 | # the assembler. Perhaps it's better to figure out whether | |
6437 | # arbitrary sections are supported and try the test. | |
bace148a | 6438 | as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q` |
8ada417f ZW |
6439 | if echo "$as_ver" | grep GNU > /dev/null; then |
6440 | as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` | |
6441 | as_major=`echo $as_ver | sed 's/\..*//'` | |
6442 | as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` | |
6443 | if test $as_major -eq 2 && test $as_minor -lt 11 | |
6444 | then : | |
6445 | else gcc_cv_as_leb128=yes | |
6446 | fi | |
6447 | fi | |
6448 | else | |
6449 | echo "configure: failed program was" >&5 | |
6450 | cat conftest.s >&5 | |
6451 | fi | |
6452 | rm -f conftest.o conftest.s | |
6453 | fi | |
b7460f24 | 6454 | fi |
6e3f3080 | 6455 | |
63cf211a NN |
6456 | echo "$ac_t""$gcc_cv_as_leb128" 1>&6 |
6457 | if test $gcc_cv_as_leb128 = yes; then | |
6458 | cat >> confdefs.h <<\EOF | |
b7460f24 | 6459 | #define HAVE_AS_LEB128 1 |
63cf211a | 6460 | EOF |
b7460f24 RH |
6461 | |
6462 | fi | |
ad9c4d9f | 6463 | |
8ada417f ZW |
6464 | # GAS versions up to and including 2.11.0 may mis-optimize |
6465 | # .eh_frame data. | |
63cf211a | 6466 | echo $ac_n "checking assembler for eh_frame optimization""... $ac_c" 1>&6 |
439a7e54 | 6467 | echo "configure:6468: checking assembler for eh_frame optimization" >&5 |
63cf211a NN |
6468 | if eval "test \"`echo '$''{'gcc_cv_as_eh_frame'+set}'`\" = set"; then |
6469 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8ada417f ZW |
6470 | else |
6471 | gcc_cv_as_eh_frame=no | |
6472 | if test $in_tree_gas = yes; then | |
6473 | if test $in_tree_gas_is_elf = yes \ | |
6474 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
6475 | then gcc_cv_as_eh_frame=yes | |
ad9c4d9f | 6476 | fi |
8ada417f | 6477 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 6478 | echo ' .text |
c64688ae RH |
6479 | .LFB1: |
6480 | .4byte 0 | |
6481 | .L1: | |
6482 | .4byte 0 | |
6483 | .LFE1: | |
6484 | .section .eh_frame,"aw",@progbits | |
6485 | __FRAME_BEGIN__: | |
6486 | .4byte .LECIE1-.LSCIE1 | |
6487 | .LSCIE1: | |
6488 | .4byte 0x0 | |
6489 | .byte 0x1 | |
6490 | .ascii "z\0" | |
6491 | .byte 0x1 | |
6492 | .byte 0x78 | |
6493 | .byte 0x1a | |
6494 | .byte 0x0 | |
6495 | .byte 0x4 | |
6496 | .4byte 1 | |
6497 | .p2align 1 | |
6498 | .LECIE1: | |
6499 | .LSFDE1: | |
6500 | .4byte .LEFDE1-.LASFDE1 | |
6501 | .LASFDE1: | |
6502 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
6503 | .4byte .LFB1 | |
6504 | .4byte .LFE1-.LFB1 | |
6505 | .byte 0x4 | |
6506 | .4byte .LFE1-.LFB1 | |
6507 | .byte 0x4 | |
6508 | .4byte .L1-.LFB1 | |
8ada417f | 6509 | .LEFDE1:' > conftest.s |
439a7e54 | 6510 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6511 | then |
6512 | cat > conftest.lit <<EOF | |
c64688ae RH |
6513 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
6514 | 0010 01000000 12000000 18000000 00000000 ................ | |
093e61a6 | 6515 | 0020 08000000 04080000 0044 .........D |
01efb963 | 6516 | EOF |
63cf211a | 6517 | cat > conftest.big <<EOF |
01efb963 AS |
6518 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... |
6519 | 0010 00000001 00000012 00000018 00000000 ................ | |
093e61a6 | 6520 | 0020 00000008 04000000 0844 .........D |
c64688ae | 6521 | EOF |
8ada417f ZW |
6522 | # If the assembler didn't choke, and we can objdump, |
6523 | # and we got the correct data, then succeed. | |
6524 | if test x$gcc_cv_objdump != x \ | |
6525 | && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ | |
6526 | | tail -3 > conftest.got \ | |
6527 | && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ | |
6528 | || cmp conftest.big conftest.got > /dev/null 2>&1; } | |
6529 | then | |
6530 | gcc_cv_as_eh_frame=yes | |
439a7e54 | 6531 | elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'; { (eval echo configure:6532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then |
8ada417f ZW |
6532 | gcc_cv_as_eh_frame=buggy |
6533 | else | |
6534 | # Uh oh, what do we do now? | |
6535 | gcc_cv_as_eh_frame=no | |
6536 | fi | |
6537 | else | |
6538 | echo "configure: failed program was" >&5 | |
6539 | cat conftest.s >&5 | |
6540 | fi | |
6541 | rm -f conftest.o conftest.s | |
6542 | fi | |
c64688ae | 6543 | fi |
ad9c4d9f | 6544 | |
63cf211a | 6545 | echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6 |
ad9c4d9f | 6546 | |
6e3f3080 | 6547 | |
63cf211a NN |
6548 | if test $gcc_cv_as_eh_frame = buggy; then |
6549 | cat >> confdefs.h <<\EOF | |
8ada417f | 6550 | #define USE_AS_TRADITIONAL_FORMAT 1 |
63cf211a | 6551 | EOF |
ad9c4d9f NN |
6552 | |
6553 | fi | |
6554 | ||
63cf211a | 6555 | echo $ac_n "checking assembler for section merging support""... $ac_c" 1>&6 |
439a7e54 | 6556 | echo "configure:6557: checking assembler for section merging support" >&5 |
63cf211a NN |
6557 | if eval "test \"`echo '$''{'gcc_cv_as_shf_merge'+set}'`\" = set"; then |
6558 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8ada417f ZW |
6559 | else |
6560 | gcc_cv_as_shf_merge=no | |
6561 | if test $in_tree_gas = yes; then | |
6562 | if test $in_tree_gas_is_elf = yes \ | |
6563 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
6564 | then gcc_cv_as_shf_merge=yes | |
6565 | fi | |
6566 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 6567 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s |
439a7e54 | 6568 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'; { (eval echo configure:6569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6569 | then |
6570 | gcc_cv_as_shf_merge=yes | |
6571 | else | |
6572 | echo "configure: failed program was" >&5 | |
6573 | cat conftest.s >&5 | |
6574 | fi | |
6575 | rm -f conftest.o conftest.s | |
6576 | fi | |
201556f0 | 6577 | fi |
8ada417f | 6578 | |
63cf211a | 6579 | echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6 |
8ad9fb33 | 6580 | |
63cf211a | 6581 | cat >> confdefs.h <<EOF |
8ad9fb33 | 6582 | #define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi` |
63cf211a | 6583 | EOF |
201556f0 | 6584 | |
201556f0 | 6585 | |
8ada417f | 6586 | # Thread-local storage - the check is heavily parametrized. |
f996902d RH |
6587 | conftest_s= |
6588 | tls_first_major= | |
6589 | tls_first_minor= | |
9739c90c | 6590 | tls_as_opt= |
f996902d | 6591 | case "$target" in |
6f9b006d RH |
6592 | alpha*-*-*) |
6593 | conftest_s=' | |
6594 | .section ".tdata","awT",@progbits | |
6595 | foo: .long 25 | |
6596 | .text | |
6597 | ldq $27,__tls_get_addr($29) !literal!1 | |
6598 | lda $16,foo($29) !tlsgd!1 | |
6599 | jsr $26,($27),__tls_get_addr !lituse_tlsgd!1 | |
6600 | ldq $27,__tls_get_addr($29) !literal!2 | |
6601 | lda $16,foo($29) !tlsldm!2 | |
6602 | jsr $26,($27),__tls_get_addr !lituse_tlsldm!2 | |
6603 | ldq $1,foo($29) !gotdtprel | |
6604 | ldah $2,foo($29) !dtprelhi | |
6605 | lda $3,foo($2) !dtprello | |
6606 | lda $4,foo($29) !dtprel | |
6607 | ldq $1,foo($29) !gottprel | |
6608 | ldah $2,foo($29) !tprelhi | |
6609 | lda $3,foo($2) !tprello | |
6610 | lda $4,foo($29) !tprel' | |
6611 | tls_first_major=2 | |
6612 | tls_first_minor=13 | |
6613 | ;; | |
f996902d RH |
6614 | i[34567]86-*-*) |
6615 | conftest_s=' | |
6616 | .section ".tdata","awT",@progbits | |
6617 | foo: .long 25 | |
6618 | .text | |
6619 | movl %gs:0, %eax | |
6620 | leal foo@TLSGD(,%ebx,1), %eax | |
6621 | leal foo@TLSLDM(%ebx), %eax | |
6622 | leal foo@DTPOFF(%eax), %edx | |
6623 | movl foo@GOTTPOFF(%ebx), %eax | |
6624 | subl foo@GOTTPOFF(%ebx), %eax | |
75d38379 JJ |
6625 | addl foo@GOTNTPOFF(%ebx), %eax |
6626 | movl foo@INDNTPOFF, %eax | |
f996902d RH |
6627 | movl $foo@TPOFF, %eax |
6628 | subl $foo@TPOFF, %eax | |
6629 | leal foo@NTPOFF(%ecx), %eax' | |
6630 | tls_first_major=2 | |
75d38379 JJ |
6631 | tls_first_minor=14 |
6632 | ;; | |
6633 | x86_64-*-*) | |
6634 | conftest_s=' | |
6635 | .section ".tdata","awT",@progbits | |
6636 | foo: .long 25 | |
6637 | .text | |
6638 | movq %fs:0, %rax | |
6639 | leaq foo@TLSGD(%rip), %rdi | |
6640 | leaq foo@TLSLD(%rip), %rdi | |
6641 | leaq foo@DTPOFF(%rax), %rdx | |
6642 | movq foo@GOTTPOFF(%rip), %rax | |
6643 | movq $foo@TPOFF, %rax' | |
6644 | tls_first_major=2 | |
6645 | tls_first_minor=14 | |
f996902d | 6646 | ;; |
7b6e506e RH |
6647 | ia64-*-*) |
6648 | conftest_s=' | |
6649 | .section ".tdata","awT",@progbits | |
6650 | foo: data8 25 | |
6651 | .text | |
6652 | addl r16 = @ltoff(@dtpmod(foo#)), gp | |
6653 | addl r17 = @ltoff(@dtprel(foo#)), gp | |
6654 | addl r18 = @ltoff(@tprel(foo#)), gp | |
6655 | addl r19 = @dtprel(foo#), gp | |
6656 | adds r21 = @dtprel(foo#), r13 | |
6657 | movl r23 = @dtprel(foo#) | |
6658 | addl r20 = @tprel(foo#), gp | |
6659 | adds r22 = @tprel(foo#), r13 | |
6660 | movl r24 = @tprel(foo#)' | |
6661 | tls_first_major=2 | |
6662 | tls_first_minor=13 | |
6663 | ;; | |
c4501e62 JJ |
6664 | powerpc-*-*) |
6665 | conftest_s=' | |
6666 | .section ".tdata","awT",@progbits | |
6667 | .align 2 | |
6668 | ld0: .space 4 | |
6669 | ld1: .space 4 | |
6670 | x1: .space 4 | |
6671 | x2: .space 4 | |
6672 | x3: .space 4 | |
6673 | .text | |
6674 | addi 3,31,ld0@got@tlsgd | |
6675 | bl __tls_get_addr | |
6676 | addi 3,31,x1@got@tlsld | |
6677 | bl __tls_get_addr | |
6678 | addi 9,3,x1@dtprel | |
6679 | addis 9,3,x2@dtprel@ha | |
6680 | addi 9,9,x2@dtprel@l | |
6681 | lwz 9,x3@got@tprel(31) | |
6682 | add 9,9,x@tls | |
6683 | addi 9,2,x1@tprel | |
6684 | addis 9,2,x2@tprel@ha | |
6685 | addi 9,9,x2@tprel@l' | |
6686 | tls_first_major=2 | |
6687 | tls_first_minor=14 | |
9739c90c | 6688 | tls_as_opt=-a32 |
c4501e62 JJ |
6689 | ;; |
6690 | powerpc64-*-*) | |
6691 | conftest_s=' | |
6692 | .section ".tdata","awT",@progbits | |
6693 | .align 3 | |
6694 | ld0: .space 8 | |
6695 | ld1: .space 8 | |
6696 | x1: .space 8 | |
6697 | x2: .space 8 | |
6698 | x3: .space 8 | |
6699 | .text | |
6700 | addi 3,2,ld0@got@tlsgd | |
6701 | bl .__tls_get_addr | |
6702 | nop | |
6703 | addi 3,2,ld1@toc | |
6704 | bl .__tls_get_addr | |
6705 | nop | |
6706 | addi 3,2,x1@got@tlsld | |
6707 | bl .__tls_get_addr | |
6708 | nop | |
6709 | addi 9,3,x1@dtprel | |
6710 | bl .__tls_get_addr | |
6711 | nop | |
6712 | addis 9,3,x2@dtprel@ha | |
6713 | addi 9,9,x2@dtprel@l | |
6714 | bl .__tls_get_addr | |
6715 | nop | |
6716 | ld 9,x3@got@dtprel(2) | |
6717 | add 9,9,3 | |
6718 | bl .__tls_get_addr | |
6719 | nop' | |
6720 | tls_first_major=2 | |
6721 | tls_first_minor=14 | |
9739c90c | 6722 | tls_as_opt=-a64 |
c4501e62 | 6723 | ;; |
fd3cd001 UW |
6724 | s390-*-*) |
6725 | conftest_s=' | |
6726 | .section ".tdata","awT",@progbits | |
6727 | foo: .long 25 | |
6728 | .text | |
6729 | .long foo@TLSGD | |
6730 | .long foo@TLSLDM | |
6731 | .long foo@DTPOFF | |
6732 | .long foo@NTPOFF | |
6733 | .long foo@GOTNTPOFF | |
6734 | .long foo@INDNTPOFF | |
6735 | l %r1,foo@GOTNTPOFF(%r12) | |
6736 | l %r1,0(%r1):tls_load:foo | |
6737 | bas %r14,0(%r1,%r13):tls_gdcall:foo | |
6738 | bas %r14,0(%r1,%r13):tls_ldcall:foo' | |
6739 | tls_first_major=2 | |
6740 | tls_first_minor=14 | |
9739c90c | 6741 | tls_as_opt=-m31 |
fd3cd001 UW |
6742 | ;; |
6743 | s390x-*-*) | |
6744 | conftest_s=' | |
6745 | .section ".tdata","awT",@progbits | |
6746 | foo: .long 25 | |
6747 | .text | |
6748 | .quad foo@TLSGD | |
6749 | .quad foo@TLSLDM | |
6750 | .quad foo@DTPOFF | |
6751 | .quad foo@NTPOFF | |
6752 | .quad foo@GOTNTPOFF | |
6753 | lg %r1,foo@GOTNTPOFF(%r12) | |
6754 | larl %r1,foo@INDNTPOFF | |
6755 | brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo | |
6756 | brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo' | |
6757 | tls_first_major=2 | |
6758 | tls_first_minor=14 | |
9739c90c | 6759 | tls_as_opt="-m64 -Aesame" |
fd3cd001 | 6760 | ;; |
9ff13962 KK |
6761 | sh-*-* | sh[34]-*-*) |
6762 | conftest_s=' | |
6763 | .section ".tdata","awT",@progbits | |
6764 | foo: .long 25 | |
6765 | .text | |
6766 | .long foo@TLSGD | |
6767 | .long foo@TLSLDM | |
6768 | .long foo@DTPOFF | |
6769 | .long foo@GOTTPOFF | |
6770 | .long foo@TPOFF' | |
6771 | tls_first_major=2 | |
6772 | tls_first_minor=13 | |
6773 | ;; | |
5751a10b JJ |
6774 | sparc*-*-*) |
6775 | conftest_s=' | |
6776 | .section ".tdata","awT",@progbits | |
6777 | foo: .long 25 | |
6778 | .text | |
6779 | sethi %tgd_hi22(foo), %o0 | |
6780 | add %o0, %tgd_lo10(foo), %o1 | |
6781 | add %l7, %o1, %o0, %tgd_add(foo) | |
6782 | call __tls_get_addr, %tgd_call(foo) | |
6783 | sethi %tldm_hi22(foo), %l1 | |
6784 | add %l1, %tldm_lo10(foo), %l2 | |
6785 | add %l7, %l2, %o0, %tldm_add(foo) | |
6786 | call __tls_get_addr, %tldm_call(foo) | |
6787 | sethi %tldo_hix22(foo), %l3 | |
6788 | xor %l3, %tldo_lox10(foo), %l4 | |
6789 | add %o0, %l4, %l5, %tldo_add(foo) | |
6790 | sethi %tie_hi22(foo), %o3 | |
6791 | add %o3, %tie_lo10(foo), %o3 | |
6792 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
6793 | add %g7, %o2, %o4, %tie_add(foo) | |
6794 | sethi %tle_hix22(foo), %l1 | |
6795 | xor %l1, %tle_lox10(foo), %o5 | |
6796 | ld [%g7 + %o5], %o1' | |
6797 | tls_first_major=2 | |
6798 | tls_first_minor=14 | |
6799 | tls_as_opt=-32 | |
6800 | ;; | |
f996902d RH |
6801 | esac |
6802 | if test -z "$tls_first_major"; then | |
8ada417f ZW |
6803 | : # If we don't have a check, assume no support. |
6804 | else | |
63cf211a | 6805 | echo $ac_n "checking assembler for thread-local storage support""... $ac_c" 1>&6 |
439a7e54 | 6806 | echo "configure:6807: checking assembler for thread-local storage support" >&5 |
63cf211a NN |
6807 | if eval "test \"`echo '$''{'gcc_cv_as_tls'+set}'`\" = set"; then |
6808 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8ada417f ZW |
6809 | else |
6810 | gcc_cv_as_tls=no | |
6811 | if test $in_tree_gas = yes; then | |
6812 | if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0` | |
6813 | then gcc_cv_as_tls=yes | |
ad9c4d9f | 6814 | fi |
8ada417f | 6815 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 6816 | echo "$conftest_s" > conftest.s |
439a7e54 | 6817 | if { ac_try='$gcc_cv_as $tls_as_opt --fatal-warnings -o conftest.o conftest.s >&5'; { (eval echo configure:6818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6818 | then |
6819 | gcc_cv_as_tls=yes | |
6820 | else | |
6821 | echo "configure: failed program was" >&5 | |
6822 | cat conftest.s >&5 | |
6823 | fi | |
6824 | rm -f conftest.o conftest.s | |
f996902d | 6825 | fi |
f996902d | 6826 | fi |
6e3f3080 | 6827 | |
63cf211a NN |
6828 | echo "$ac_t""$gcc_cv_as_tls" 1>&6 |
6829 | if test $gcc_cv_as_tls = yes; then | |
6830 | cat >> confdefs.h <<\EOF | |
f996902d | 6831 | #define HAVE_AS_TLS 1 |
63cf211a | 6832 | EOF |
f996902d RH |
6833 | |
6834 | fi | |
8ada417f ZW |
6835 | fi |
6836 | ||
6837 | # Target-specific assembler checks. | |
f996902d | 6838 | |
3a37b08e RH |
6839 | case "$target" in |
6840 | # All TARGET_ABI_OSF targets. | |
6841 | alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) | |
63cf211a | 6842 | echo $ac_n "checking assembler for explicit relocation support""... $ac_c" 1>&6 |
439a7e54 | 6843 | echo "configure:6844: checking assembler for explicit relocation support" >&5 |
63cf211a NN |
6844 | if eval "test \"`echo '$''{'gcc_cv_as_alpha_explicit_relocs'+set}'`\" = set"; then |
6845 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3a37b08e | 6846 | else |
8ada417f ZW |
6847 | gcc_cv_as_alpha_explicit_relocs=no |
6848 | if test $in_tree_gas = yes; then | |
6849 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
6850 | then gcc_cv_as_alpha_explicit_relocs=yes | |
ad9c4d9f | 6851 | fi |
8ada417f | 6852 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 6853 | echo ' .set nomacro |
3a37b08e RH |
6854 | .text |
6855 | extbl $3, $2, $3 !lituse_bytoff!1 | |
6856 | ldq $2, a($29) !literal!1 | |
6857 | ldq $4, b($29) !literal!2 | |
6858 | ldq_u $3, 0($2) !lituse_base!1 | |
6859 | ldq $27, f($29) !literal!5 | |
6860 | jsr $26, ($27), f !lituse_jsr!5 | |
6861 | ldah $29, 0($26) !gpdisp!3 | |
6862 | lda $0, c($29) !gprel | |
6863 | ldah $1, d($29) !gprelhigh | |
6864 | lda $1, d($1) !gprellow | |
8ada417f | 6865 | lda $29, 0($29) !gpdisp!3' > conftest.s |
439a7e54 | 6866 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6867 | then |
6868 | gcc_cv_as_alpha_explicit_relocs=yes | |
6869 | else | |
6870 | echo "configure: failed program was" >&5 | |
6871 | cat conftest.s >&5 | |
6872 | fi | |
6873 | rm -f conftest.o conftest.s | |
6874 | fi | |
cafe096b | 6875 | fi |
6e3f3080 | 6876 | |
63cf211a NN |
6877 | echo "$ac_t""$gcc_cv_as_alpha_explicit_relocs" 1>&6 |
6878 | if test $gcc_cv_as_alpha_explicit_relocs = yes; then | |
6879 | cat >> confdefs.h <<\EOF | |
3a37b08e | 6880 | #define HAVE_AS_EXPLICIT_RELOCS 1 |
63cf211a | 6881 | EOF |
3a37b08e | 6882 | |
8ada417f | 6883 | fi |
3a37b08e | 6884 | ;; |
8ada417f | 6885 | |
1cb36a98 | 6886 | sparc*-*-*) |
63cf211a | 6887 | echo $ac_n "checking assembler for .register""... $ac_c" 1>&6 |
439a7e54 | 6888 | echo "configure:6889: checking assembler for .register" >&5 |
63cf211a NN |
6889 | if eval "test \"`echo '$''{'gcc_cv_as_sparc_register_op'+set}'`\" = set"; then |
6890 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5b68c389 | 6891 | else |
8ada417f ZW |
6892 | gcc_cv_as_sparc_register_op=no |
6893 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 6894 | echo '.register %g2, #scratch' > conftest.s |
439a7e54 | 6895 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6896 | then |
6897 | gcc_cv_as_sparc_register_op=yes | |
6898 | else | |
6899 | echo "configure: failed program was" >&5 | |
6900 | cat conftest.s >&5 | |
6901 | fi | |
6902 | rm -f conftest.o conftest.s | |
6903 | fi | |
cafe096b | 6904 | fi |
6e3f3080 | 6905 | |
63cf211a NN |
6906 | echo "$ac_t""$gcc_cv_as_sparc_register_op" 1>&6 |
6907 | if test $gcc_cv_as_sparc_register_op = yes; then | |
6908 | cat >> confdefs.h <<\EOF | |
1cb36a98 | 6909 | #define HAVE_AS_REGISTER_PSEUDO_OP 1 |
63cf211a | 6910 | EOF |
1cb36a98 | 6911 | |
8ada417f | 6912 | fi |
1cb36a98 | 6913 | |
63cf211a | 6914 | echo $ac_n "checking assembler for -relax option""... $ac_c" 1>&6 |
439a7e54 | 6915 | echo "configure:6916: checking assembler for -relax option" >&5 |
63cf211a NN |
6916 | if eval "test \"`echo '$''{'gcc_cv_as_sparc_relax'+set}'`\" = set"; then |
6917 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e95b1e6a | 6918 | else |
8ada417f ZW |
6919 | gcc_cv_as_sparc_relax=no |
6920 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 6921 | echo '.text' > conftest.s |
439a7e54 | 6922 | if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'; { (eval echo configure:6923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6923 | then |
6924 | gcc_cv_as_sparc_relax=yes | |
6925 | else | |
6926 | echo "configure: failed program was" >&5 | |
6927 | cat conftest.s >&5 | |
6928 | fi | |
6929 | rm -f conftest.o conftest.s | |
6930 | fi | |
cafe096b | 6931 | fi |
6e3f3080 | 6932 | |
63cf211a NN |
6933 | echo "$ac_t""$gcc_cv_as_sparc_relax" 1>&6 |
6934 | if test $gcc_cv_as_sparc_relax = yes; then | |
6935 | cat >> confdefs.h <<\EOF | |
e95b1e6a | 6936 | #define HAVE_AS_RELAX_OPTION 1 |
63cf211a | 6937 | EOF |
e95b1e6a | 6938 | |
8ada417f | 6939 | fi |
e95b1e6a | 6940 | |
63cf211a | 6941 | echo $ac_n "checking assembler for unaligned pcrel relocs""... $ac_c" 1>&6 |
439a7e54 | 6942 | echo "configure:6943: checking assembler for unaligned pcrel relocs" >&5 |
63cf211a NN |
6943 | if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then |
6944 | echo $ac_n "(cached) $ac_c" 1>&6 | |
17e9e88c | 6945 | else |
8ada417f ZW |
6946 | gcc_cv_as_sparc_ua_pcrel=no |
6947 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 6948 | echo '.text |
8ada417f ZW |
6949 | foo: |
6950 | nop | |
6951 | .data | |
6952 | .align 4 | |
6953 | .byte 0 | |
6954 | .uaword %r_disp32(foo)' > conftest.s | |
439a7e54 | 6955 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'; { (eval echo configure:6956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6956 | then |
6957 | if test x$gcc_cv_ld != x \ | |
6958 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then | |
6959 | gcc_cv_as_sparc_ua_pcrel=yes | |
6960 | fi | |
6961 | rm -f conftest | |
6962 | else | |
6963 | echo "configure: failed program was" >&5 | |
6964 | cat conftest.s >&5 | |
6965 | fi | |
6966 | rm -f conftest.o conftest.s | |
6967 | fi | |
cafe096b | 6968 | fi |
6e3f3080 | 6969 | |
63cf211a NN |
6970 | echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6 |
6971 | if test $gcc_cv_as_sparc_ua_pcrel = yes; then | |
6972 | cat >> confdefs.h <<\EOF | |
17e9e88c | 6973 | #define HAVE_AS_SPARC_UA_PCREL 1 |
63cf211a | 6974 | EOF |
17e9e88c | 6975 | |
17e9e88c | 6976 | |
63cf211a | 6977 | echo $ac_n "checking assembler for unaligned pcrel relocs against hidden symbols""... $ac_c" 1>&6 |
439a7e54 | 6978 | echo "configure:6979: checking assembler for unaligned pcrel relocs against hidden symbols" >&5 |
63cf211a NN |
6979 | if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then |
6980 | echo $ac_n "(cached) $ac_c" 1>&6 | |
cf7b8b0d | 6981 | else |
8ada417f ZW |
6982 | gcc_cv_as_sparc_ua_pcrel_hidden=no |
6983 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 6984 | echo '.data |
8ada417f ZW |
6985 | .align 4 |
6986 | .byte 0x31 | |
6987 | .uaword %r_disp32(foo) | |
6988 | .byte 0x32, 0x33, 0x34 | |
6989 | .global foo | |
6990 | .hidden foo | |
6991 | foo: | |
6992 | .skip 4' > conftest.s | |
439a7e54 | 6993 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'; { (eval echo configure:6994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
6994 | then |
6995 | if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \ | |
6996 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ | |
6997 | && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ | |
6998 | | grep ' 31000000 07323334' > /dev/null 2>&1; then | |
6999 | if $gcc_cv_objdump -R conftest 2> /dev/null \ | |
7000 | | grep 'DISP32' > /dev/null 2>&1; then | |
7001 | : | |
7002 | else | |
7003 | gcc_cv_as_sparc_ua_pcrel_hidden=yes | |
cf7b8b0d | 7004 | fi |
8ada417f ZW |
7005 | fi |
7006 | rm -f conftest | |
7007 | else | |
7008 | echo "configure: failed program was" >&5 | |
7009 | cat conftest.s >&5 | |
7010 | fi | |
7011 | rm -f conftest.o conftest.s | |
7012 | fi | |
cafe096b | 7013 | fi |
6e3f3080 | 7014 | |
63cf211a NN |
7015 | echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6 |
7016 | if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then | |
7017 | cat >> confdefs.h <<\EOF | |
cf7b8b0d | 7018 | #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1 |
63cf211a | 7019 | EOF |
cf7b8b0d | 7020 | |
8ada417f | 7021 | fi |
63cf211a | 7022 | |
8ada417f | 7023 | fi # unaligned pcrel relocs |
cf7b8b0d | 7024 | |
63cf211a | 7025 | echo $ac_n "checking assembler for offsetable %lo()""... $ac_c" 1>&6 |
439a7e54 | 7026 | echo "configure:7027: checking assembler for offsetable %lo()" >&5 |
63cf211a NN |
7027 | if eval "test \"`echo '$''{'gcc_cv_as_sparc_offsetable_lo10'+set}'`\" = set"; then |
7028 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5b68c389 | 7029 | else |
8ada417f ZW |
7030 | gcc_cv_as_sparc_offsetable_lo10=no |
7031 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 7032 | echo '.text |
8ada417f ZW |
7033 | or %g1, %lo(ab) + 12, %g1 |
7034 | or %g1, %lo(ab + 12), %g1' > conftest.s | |
439a7e54 | 7035 | if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'; { (eval echo configure:7036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
7036 | then |
7037 | if test x$gcc_cv_objdump != x \ | |
7038 | && %gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \ | |
7039 | | grep ' 82106000 82106000' > /dev/null 2>&1; then | |
7040 | gcc_cv_as_offsetable_lo10=yes | |
7041 | fi | |
7042 | else | |
7043 | echo "configure: failed program was" >&5 | |
7044 | cat conftest.s >&5 | |
7045 | fi | |
7046 | rm -f conftest.o conftest.s | |
7047 | fi | |
cafe096b | 7048 | fi |
6e3f3080 | 7049 | |
63cf211a NN |
7050 | echo "$ac_t""$gcc_cv_as_sparc_offsetable_lo10" 1>&6 |
7051 | if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then | |
7052 | cat >> confdefs.h <<\EOF | |
1cb36a98 | 7053 | #define HAVE_AS_OFFSETABLE_LO10 1 |
63cf211a | 7054 | EOF |
1cb36a98 | 7055 | |
8ada417f | 7056 | fi |
1cb36a98 RH |
7057 | ;; |
7058 | ||
c307e6dd | 7059 | i[34567]86-*-* | x86_64-*-*) |
63cf211a | 7060 | echo $ac_n "checking assembler for filds and fists mnemonics""... $ac_c" 1>&6 |
439a7e54 | 7061 | echo "configure:7062: checking assembler for filds and fists mnemonics" >&5 |
63cf211a NN |
7062 | if eval "test \"`echo '$''{'gcc_cv_as_ix86_filds_fists'+set}'`\" = set"; then |
7063 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8ada417f ZW |
7064 | else |
7065 | gcc_cv_as_ix86_filds_fists=no | |
7066 | if test $in_tree_gas = yes; then | |
7067 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
7068 | then gcc_cv_as_ix86_filds_fists=yes | |
ad9c4d9f | 7069 | fi |
8ada417f | 7070 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 7071 | echo 'filds mem; fists mem' > conftest.s |
439a7e54 | 7072 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:7073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
7073 | then |
7074 | gcc_cv_as_ix86_filds_fists=yes | |
7075 | else | |
7076 | echo "configure: failed program was" >&5 | |
7077 | cat conftest.s >&5 | |
981d4858 | 7078 | fi |
8ada417f ZW |
7079 | rm -f conftest.o conftest.s |
7080 | fi | |
7081 | fi | |
6e3f3080 | 7082 | |
63cf211a NN |
7083 | echo "$ac_t""$gcc_cv_as_ix86_filds_fists" 1>&6 |
7084 | if test $gcc_cv_as_ix86_filds_fists = yes; then | |
7085 | cat >> confdefs.h <<\EOF | |
8ada417f | 7086 | #define HAVE_GAS_FILDS_FISTS 1 |
63cf211a | 7087 | EOF |
ad9c4d9f | 7088 | |
f6f5dff2 RO |
7089 | fi |
7090 | ||
63cf211a | 7091 | echo $ac_n "checking assembler for cmov syntax""... $ac_c" 1>&6 |
439a7e54 | 7092 | echo "configure:7093: checking assembler for cmov syntax" >&5 |
63cf211a NN |
7093 | if eval "test \"`echo '$''{'gcc_cv_as_ix86_cmov_sun_syntax'+set}'`\" = set"; then |
7094 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f6f5dff2 RO |
7095 | else |
7096 | gcc_cv_as_ix86_cmov_sun_syntax=no | |
7097 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 7098 | echo 'cmovl.l %edx, %eax' > conftest.s |
439a7e54 | 7099 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:7100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
f6f5dff2 RO |
7100 | then |
7101 | gcc_cv_as_ix86_cmov_sun_syntax=yes | |
7102 | else | |
7103 | echo "configure: failed program was" >&5 | |
7104 | cat conftest.s >&5 | |
7105 | fi | |
7106 | rm -f conftest.o conftest.s | |
7107 | fi | |
7108 | fi | |
6e3f3080 | 7109 | |
63cf211a NN |
7110 | echo "$ac_t""$gcc_cv_as_ix86_cmov_sun_syntax" 1>&6 |
7111 | if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then | |
7112 | cat >> confdefs.h <<\EOF | |
f6f5dff2 | 7113 | #define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1 |
63cf211a | 7114 | EOF |
f6f5dff2 | 7115 | |
ad9c4d9f NN |
7116 | fi |
7117 | ||
6f3ca281 ZW |
7118 | # This one is used unconditionally by i386.[ch]; it is to be defined |
7119 | # to 1 if the feature is present, 0 otherwise. | |
63cf211a | 7120 | echo $ac_n "checking assembler for GOTOFF in data""... $ac_c" 1>&6 |
439a7e54 | 7121 | echo "configure:7122: checking assembler for GOTOFF in data" >&5 |
63cf211a NN |
7122 | if eval "test \"`echo '$''{'gcc_cv_as_ix86_gotoff_in_data'+set}'`\" = set"; then |
7123 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8ada417f ZW |
7124 | else |
7125 | gcc_cv_as_ix86_gotoff_in_data=no | |
7126 | if test $in_tree_gas = yes; then | |
7127 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
7128 | then gcc_cv_as_ix86_gotoff_in_data=yes | |
7129 | fi | |
7130 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 7131 | echo ' .text |
f88c65f7 RH |
7132 | .L0: |
7133 | nop | |
7134 | .data | |
8ada417f | 7135 | .long .L0@GOTOFF' > conftest.s |
439a7e54 | 7136 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:7137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
7137 | then |
7138 | gcc_cv_as_ix86_gotoff_in_data=yes | |
7139 | else | |
7140 | echo "configure: failed program was" >&5 | |
7141 | cat conftest.s >&5 | |
f88c65f7 | 7142 | fi |
8ada417f ZW |
7143 | rm -f conftest.o conftest.s |
7144 | fi | |
7145 | fi | |
7146 | ||
63cf211a | 7147 | echo "$ac_t""$gcc_cv_as_ix86_gotoff_in_data" 1>&6 |
6f3ca281 | 7148 | |
63cf211a | 7149 | cat >> confdefs.h <<EOF |
6f3ca281 | 7150 | #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi` |
63cf211a | 7151 | EOF |
f88c65f7 | 7152 | |
1cb36a98 | 7153 | ;; |
ef1ecf87 RH |
7154 | |
7155 | ia64*-*-*) | |
63cf211a | 7156 | echo $ac_n "checking assembler for ltoffx and ldxmov relocs""... $ac_c" 1>&6 |
439a7e54 | 7157 | echo "configure:7158: checking assembler for ltoffx and ldxmov relocs" >&5 |
63cf211a NN |
7158 | if eval "test \"`echo '$''{'gcc_cv_as_ia64_ltoffx_ldxmov_relocs'+set}'`\" = set"; then |
7159 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ef1ecf87 | 7160 | else |
8ada417f ZW |
7161 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no |
7162 | if test $in_tree_gas = yes; then | |
7163 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
7164 | then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes | |
ad9c4d9f | 7165 | fi |
8ada417f | 7166 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 7167 | echo ' .text |
ef1ecf87 RH |
7168 | addl r15 = @ltoffx(x#), gp |
7169 | ;; | |
cfa9ee99 | 7170 | ld8.mov r16 = [r15], x#' > conftest.s |
439a7e54 | 7171 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:7172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f | 7172 | then |
cfa9ee99 | 7173 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes |
8ada417f ZW |
7174 | else |
7175 | echo "configure: failed program was" >&5 | |
7176 | cat conftest.s >&5 | |
2c4a9cff | 7177 | fi |
8ada417f ZW |
7178 | rm -f conftest.o conftest.s |
7179 | fi | |
7180 | fi | |
6e3f3080 | 7181 | |
63cf211a NN |
7182 | echo "$ac_t""$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" 1>&6 |
7183 | if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then | |
7184 | cat >> confdefs.h <<\EOF | |
cfa9ee99 | 7185 | #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1 |
63cf211a | 7186 | EOF |
8ada417f | 7187 | |
cfa9ee99 | 7188 | fi |
8ada417f | 7189 | |
2c4a9cff | 7190 | ;; |
8ada417f | 7191 | |
2c4a9cff | 7192 | powerpc*-*-*) |
8ada417f ZW |
7193 | case $target in |
7194 | *-*-aix) conftest_s=' .csect .textPR';; | |
7195 | *) conftest_s=' .text';; | |
7196 | esac | |
7197 | conftest_s="$conftest_s | |
7198 | mfcr 3,128" | |
7199 | ||
63cf211a | 7200 | echo $ac_n "checking assembler for mfcr field support""... $ac_c" 1>&6 |
439a7e54 | 7201 | echo "configure:7202: checking assembler for mfcr field support" >&5 |
63cf211a NN |
7202 | if eval "test \"`echo '$''{'gcc_cv_as_powerpc_mfcrf'+set}'`\" = set"; then |
7203 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2c4a9cff | 7204 | else |
8ada417f ZW |
7205 | gcc_cv_as_powerpc_mfcrf=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_powerpc_mfcrf=yes | |
2c4a9cff | 7209 | fi |
8ada417f | 7210 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 7211 | echo "$conftest_s" > conftest.s |
439a7e54 | 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_powerpc_mfcrf=yes | |
7215 | else | |
7216 | echo "configure: failed program was" >&5 | |
7217 | cat conftest.s >&5 | |
7218 | fi | |
7219 | rm -f conftest.o conftest.s | |
7220 | fi | |
2c4a9cff | 7221 | fi |
6e3f3080 | 7222 | |
63cf211a NN |
7223 | echo "$ac_t""$gcc_cv_as_powerpc_mfcrf" 1>&6 |
7224 | if test $gcc_cv_as_powerpc_mfcrf = yes; then | |
7225 | cat >> confdefs.h <<\EOF | |
2c4a9cff | 7226 | #define HAVE_AS_MFCRF 1 |
63cf211a | 7227 | EOF |
ef1ecf87 | 7228 | |
8ada417f ZW |
7229 | fi |
7230 | ;; | |
7231 | ||
7232 | mips*-*-*) | |
63cf211a | 7233 | echo $ac_n "checking assembler for explicit relocation support""... $ac_c" 1>&6 |
439a7e54 | 7234 | echo "configure:7235: checking assembler for explicit relocation support" >&5 |
63cf211a NN |
7235 | if eval "test \"`echo '$''{'gcc_cv_as_mips_explicit_relocs'+set}'`\" = set"; then |
7236 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8ada417f ZW |
7237 | else |
7238 | gcc_cv_as_mips_explicit_relocs=no | |
7239 | if test $in_tree_gas = yes; then | |
7240 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
7241 | then gcc_cv_as_mips_explicit_relocs=yes | |
7242 | fi | |
7243 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 7244 | echo ' lw $4,%gp_rel(foo)($4)' > conftest.s |
439a7e54 | 7245 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:7246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
7246 | then |
7247 | gcc_cv_as_mips_explicit_relocs=yes | |
7248 | else | |
7249 | echo "configure: failed program was" >&5 | |
7250 | cat conftest.s >&5 | |
ef1ecf87 | 7251 | fi |
8ada417f ZW |
7252 | rm -f conftest.o conftest.s |
7253 | fi | |
7254 | fi | |
63cf211a NN |
7255 | |
7256 | echo "$ac_t""$gcc_cv_as_mips_explicit_relocs" 1>&6 | |
8ada417f ZW |
7257 | if test $gcc_cv_as_mips_explicit_relocs = yes; then |
7258 | if test x$target_cpu_default = x | |
7259 | then target_cpu_default=MASK_EXPLICIT_RELOCS | |
7260 | else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS" | |
7261 | fi | |
7262 | fi | |
7263 | ||
ef1ecf87 | 7264 | ;; |
1cb36a98 | 7265 | esac |
9d147085 RH |
7266 | # ??? Not all targets support dwarf2 debug_line, even within a version |
7267 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
7268 | # info to the output file. So, as supported targets are added to gas 2.11, | |
7269 | # add some instruction here to (also) show we expect this might work. | |
7270 | # ??? Once 2.11 is released, probably need to add first known working | |
7271 | # version to the per-target configury. | |
7272 | case "$target" in | |
80486e06 | 7273 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ |
2853bc5a | 7274 | | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \ |
d116bdf8 | 7275 | | xstormy16*-*-* | cris-*-* | xtensa-*-*) |
9d147085 RH |
7276 | insn="nop" |
7277 | ;; | |
7278 | ia64*-*-*) | |
7279 | insn="nop 0" | |
7280 | ;; | |
2853bc5a HPN |
7281 | mmix-*-*) |
7282 | insn="swym 0" | |
7283 | ;; | |
8ada417f ZW |
7284 | esac |
7285 | if test x"$insn" != x; then | |
7286 | conftest_s="\ | |
7287 | .file 1 \"conftest.s\" | |
7288 | .loc 1 3 0 | |
7289 | $insn" | |
63cf211a | 7290 | echo $ac_n "checking assembler for dwarf2 debug_line support""... $ac_c" 1>&6 |
439a7e54 | 7291 | echo "configure:7292: checking assembler for dwarf2 debug_line support" >&5 |
63cf211a NN |
7292 | if eval "test \"`echo '$''{'gcc_cv_as_dwarf2_debug_line'+set}'`\" = set"; then |
7293 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8ada417f ZW |
7294 | else |
7295 | gcc_cv_as_dwarf2_debug_line=no | |
7296 | if test $in_tree_gas = yes; then | |
7297 | if test $in_tree_gas_is_elf = yes \ | |
7298 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
7299 | then gcc_cv_as_dwarf2_debug_line=yes | |
7300 | fi | |
7301 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 7302 | echo "$conftest_s" > conftest.s |
439a7e54 | 7303 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:7304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
7304 | then |
7305 | # ??? This fails with non-gnu grep. Maybe use objdump? | |
7306 | if grep debug_line conftest.o > /dev/null 2>&1; then | |
7307 | gcc_cv_as_dwarf2_debug_line=yes | |
7308 | fi | |
7309 | else | |
7310 | echo "configure: failed program was" >&5 | |
7311 | cat conftest.s >&5 | |
7312 | fi | |
7313 | rm -f conftest.o conftest.s | |
7314 | fi | |
7315 | fi | |
63cf211a NN |
7316 | |
7317 | echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6 | |
ad9c4d9f | 7318 | |
ad9c4d9f | 7319 | |
8ada417f ZW |
7320 | # The .debug_line file table must be in the exact order that |
7321 | # we specified the files, since these indices are also used | |
7322 | # by DW_AT_decl_file. Approximate this test by testing if | |
7323 | # the assembler bitches if the same index is assigned twice. | |
63cf211a | 7324 | echo $ac_n "checking assembler for buggy dwarf2 .file directive""... $ac_c" 1>&6 |
439a7e54 | 7325 | echo "configure:7326: checking assembler for buggy dwarf2 .file directive" >&5 |
63cf211a NN |
7326 | if eval "test \"`echo '$''{'gcc_cv_as_dwarf2_file_buggy'+set}'`\" = set"; then |
7327 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8ada417f ZW |
7328 | else |
7329 | gcc_cv_as_dwarf2_file_buggy=no | |
7330 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 7331 | echo ' .file 1 "foo.s" |
8ada417f | 7332 | .file 1 "bar.s"' > conftest.s |
439a7e54 | 7333 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:7334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
7334 | then |
7335 | gcc_cv_as_dwarf2_file_buggy=yes | |
7336 | else | |
7337 | echo "configure: failed program was" >&5 | |
7338 | cat conftest.s >&5 | |
7339 | fi | |
7340 | rm -f conftest.o conftest.s | |
7341 | fi | |
ad9c4d9f | 7342 | fi |
63cf211a NN |
7343 | |
7344 | echo "$ac_t""$gcc_cv_as_dwarf2_file_buggy" 1>&6 | |
8ada417f ZW |
7345 | |
7346 | ||
7347 | if test $gcc_cv_as_dwarf2_debug_line = yes \ | |
7348 | && test $gcc_cv_as_dwarf2_file_buggy = no; then | |
63cf211a | 7349 | cat >> confdefs.h <<\EOF |
9d147085 | 7350 | #define HAVE_AS_DWARF2_DEBUG_LINE 1 |
63cf211a | 7351 | EOF |
9d147085 | 7352 | |
8ada417f | 7353 | fi |
ad9c4d9f | 7354 | |
63cf211a | 7355 | echo $ac_n "checking assembler for --gdwarf2 option""... $ac_c" 1>&6 |
439a7e54 | 7356 | echo "configure:7357: checking assembler for --gdwarf2 option" >&5 |
63cf211a NN |
7357 | if eval "test \"`echo '$''{'gcc_cv_as_gdwarf2_flag'+set}'`\" = set"; then |
7358 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8ada417f ZW |
7359 | else |
7360 | gcc_cv_as_gdwarf2_flag=no | |
7361 | if test $in_tree_gas = yes; then | |
7362 | if test $in_tree_gas_is_elf = yes \ | |
7363 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
7364 | then gcc_cv_as_gdwarf2_flag=yes | |
7365 | fi | |
7366 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 7367 | echo "$insn" > conftest.s |
439a7e54 | 7368 | if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'; { (eval echo configure:7369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
7369 | then |
7370 | gcc_cv_as_gdwarf2_flag=yes | |
7371 | else | |
7372 | echo "configure: failed program was" >&5 | |
7373 | cat conftest.s >&5 | |
7374 | fi | |
7375 | rm -f conftest.o conftest.s | |
7376 | fi | |
ad9c4d9f | 7377 | fi |
6e3f3080 | 7378 | |
63cf211a NN |
7379 | echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6 |
7380 | if test $gcc_cv_as_gdwarf2_flag = yes; then | |
7381 | cat >> confdefs.h <<\EOF | |
5f0e9ea2 | 7382 | #define HAVE_AS_GDWARF2_DEBUG_FLAG 1 |
63cf211a | 7383 | EOF |
5f0e9ea2 GK |
7384 | |
7385 | fi | |
ad9c4d9f | 7386 | |
63cf211a | 7387 | echo $ac_n "checking assembler for --gstabs option""... $ac_c" 1>&6 |
439a7e54 | 7388 | echo "configure:7389: checking assembler for --gstabs option" >&5 |
63cf211a NN |
7389 | if eval "test \"`echo '$''{'gcc_cv_as_gstabs_flag'+set}'`\" = set"; then |
7390 | echo $ac_n "(cached) $ac_c" 1>&6 | |
8ada417f ZW |
7391 | else |
7392 | gcc_cv_as_gstabs_flag=no | |
7393 | if test $in_tree_gas = yes; then | |
7394 | if test $in_tree_gas_is_elf = yes \ | |
7395 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
7396 | then gcc_cv_as_gstabs_flag=yes | |
7397 | fi | |
7398 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 7399 | echo "$insn" > conftest.s |
439a7e54 | 7400 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'; { (eval echo configure:7401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
7401 | then |
7402 | # The native Solaris 9/Intel assembler doesn't understand --gstabs | |
7403 | # and warns about it, but still exits successfully. So check for | |
7404 | # this. | |
439a7e54 | 7405 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'; { (eval echo configure:7406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
8ada417f ZW |
7406 | then : |
7407 | else gcc_cv_as_gstabs_flag=yes | |
7408 | fi | |
7409 | else | |
7410 | echo "configure: failed program was" >&5 | |
7411 | cat conftest.s >&5 | |
7412 | fi | |
7413 | rm -f conftest.o conftest.s | |
7414 | fi | |
ad9c4d9f | 7415 | fi |
6e3f3080 | 7416 | |
63cf211a NN |
7417 | echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6 |
7418 | if test $gcc_cv_as_gstabs_flag = yes; then | |
7419 | cat >> confdefs.h <<\EOF | |
5f0e9ea2 | 7420 | #define HAVE_AS_GSTABS_DEBUG_FLAG 1 |
63cf211a | 7421 | EOF |
5f0e9ea2 GK |
7422 | |
7423 | fi | |
8ada417f | 7424 | fi |
5f0e9ea2 | 7425 | |
63cf211a | 7426 | echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6 |
439a7e54 | 7427 | echo "configure:7428: checking linker read-only and read-write section mixing" >&5 |
96d0f4dc | 7428 | gcc_cv_ld_ro_rw_mix=unknown |
34a86c2b | 7429 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
7430 | 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 \ |
7431 | && test $in_tree_ld_is_elf = yes; then | |
96d0f4dc JJ |
7432 | gcc_cv_ld_ro_rw_mix=read-write |
7433 | fi | |
7434 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
90e145da KC |
7435 | echo '.section myfoosect, "a"' > conftest1.s |
7436 | echo '.section myfoosect, "aw"' > conftest2.s | |
96d0f4dc | 7437 | echo '.byte 1' >> conftest2.s |
90e145da | 7438 | echo '.section myfoosect, "a"' > conftest3.s |
96d0f4dc | 7439 | echo '.byte 0' >> conftest3.s |
6cd656d0 KC |
7440 | if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \ |
7441 | && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
7442 | && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \ | |
96d0f4dc | 7443 | && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ |
c6cc7e13 | 7444 | conftest2.o conftest3.o > /dev/null 2>&1; then |
96d0f4dc | 7445 | gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ |
c6cc7e13 | 7446 | | sed -e '/myfoosect/!d' -e N` |
96d0f4dc JJ |
7447 | if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then |
7448 | if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then | |
7449 | gcc_cv_ld_ro_rw_mix=read-only | |
7450 | else | |
7451 | gcc_cv_ld_ro_rw_mix=read-write | |
7452 | fi | |
7453 | fi | |
7454 | fi | |
7455 | rm -f conftest.* conftest[123].* | |
7456 | fi | |
7457 | if test x$gcc_cv_ld_ro_rw_mix = xread-write; then | |
63cf211a | 7458 | cat >> confdefs.h <<\EOF |
96d0f4dc | 7459 | #define HAVE_LD_RO_RW_SECTION_MIXING 1 |
63cf211a | 7460 | EOF |
96d0f4dc JJ |
7461 | |
7462 | fi | |
63cf211a | 7463 | echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6 |
96d0f4dc | 7464 | |
63cf211a | 7465 | echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6 |
439a7e54 | 7466 | echo "configure:7467: checking linker PT_GNU_EH_FRAME support" >&5 |
275b60d6 | 7467 | gcc_cv_ld_eh_frame_hdr=no |
34a86c2b | 7468 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
7469 | 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 \ |
7470 | && test $in_tree_ld_is_elf = yes; then | |
275b60d6 JJ |
7471 | gcc_cv_ld_eh_frame_hdr=yes |
7472 | fi | |
7473 | elif test x$gcc_cv_ld != x; then | |
7474 | # Check if linker supports --eh-frame-hdr option | |
7475 | if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then | |
7476 | gcc_cv_ld_eh_frame_hdr=yes | |
7477 | fi | |
7478 | fi | |
7479 | if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then | |
63cf211a | 7480 | cat >> confdefs.h <<\EOF |
275b60d6 | 7481 | #define HAVE_LD_EH_FRAME_HDR 1 |
63cf211a | 7482 | EOF |
275b60d6 JJ |
7483 | |
7484 | fi | |
63cf211a | 7485 | echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6 |
275b60d6 | 7486 | |
63cf211a | 7487 | echo $ac_n "checking linker position independent executable support""... $ac_c" 1>&6 |
439a7e54 | 7488 | echo "configure:7489: checking linker position independent executable support" >&5 |
24a4dd31 JJ |
7489 | gcc_cv_ld_pie=no |
7490 | if test $in_tree_ld = yes ; then | |
5408ac6c HPN |
7491 | 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 \ |
7492 | && test $in_tree_ld_is_elf = yes; then | |
24a4dd31 JJ |
7493 | gcc_cv_ld_pie=yes |
7494 | fi | |
7495 | elif test x$gcc_cv_ld != x; then | |
7496 | # Check if linker supports -pie option | |
7497 | if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then | |
7498 | gcc_cv_ld_pie=yes | |
7499 | fi | |
7500 | fi | |
7501 | if test x"$gcc_cv_ld_pie" = xyes; then | |
63cf211a | 7502 | cat >> confdefs.h <<\EOF |
24a4dd31 | 7503 | #define HAVE_LD_PIE 1 |
63cf211a | 7504 | EOF |
24a4dd31 JJ |
7505 | |
7506 | fi | |
63cf211a | 7507 | echo "$ac_t""$gcc_cv_ld_pie" 1>&6 |
24a4dd31 | 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 |
63cf211a | 7511 | cat >> confdefs.h <<EOF |
793e9558 | 7512 | #define PREFIX_INCLUDE_DIR "$prefix/include" |
63cf211a | 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}" |
63cf211a | 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 |
63cf211a | 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} .. | |
63cf211a | 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} .. | |
63cf211a | 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 | |
63cf211a | 7633 | { echo "configure: error: |
015089dd | 7634 | The following requested languages were not found:${missing_languages} |
63cf211a | 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 | *) | |
63cf211a | 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 |
63cf211a NN |
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 | ||
63cf211a NN |
7675 | fi |
7676 | ||
3c809ba4 AG |
7677 | |
7678 | ||
7679 | ||
dc6746e7 | 7680 | |
63cf211a | 7681 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
439a7e54 | 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 | |
63cf211a NN |
7689 | fi |
7690 | ||
dc6746e7 | 7691 | |
63cf211a | 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" | |
63cf211a NN |
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 |
63cf211a NN |
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 | ||
6e3f3080 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 | |
7976 | else | |
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 | |
7984 | fi | |
7985 | ||
7986 | # Configure the subdirectories | |
7987 | # AC_CONFIG_SUBDIRS($subdirs) | |
7988 | ||
7989 | # Create the Makefile | |
7990 | # and configure language subdirectories | |
63cf211a NN |
7991 | trap '' 1 2 15 |
7992 | cat > confcache <<\EOF | |
6e3f3080 NN |
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 | |
63cf211a NN |
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. | |
6e3f3080 | 7997 | # |
63cf211a NN |
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. | |
6e3f3080 | 8006 | # |
63cf211a | 8007 | EOF |
6e3f3080 NN |
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. | |
63cf211a NN |
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 | |
6e3f3080 | 8030 | if test -w $cache_file; then |
63cf211a NN |
8031 | echo "updating cache $cache_file" |
8032 | cat confcache > $cache_file | |
6e3f3080 NN |
8033 | else |
8034 | echo "not updating unwritable cache $cache_file" | |
8035 | fi | |
8036 | fi | |
8037 | rm -f confcache | |
8038 | ||
63cf211a NN |
8039 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
8040 | ||
6e3f3080 NN |
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 | ||
63cf211a NN |
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. | |
6e3f3080 | 8048 | if test "x$srcdir" = x.; then |
63cf211a | 8049 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
6e3f3080 NN |
8050 | fi |
8051 | ||
63cf211a | 8052 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
6e3f3080 | 8053 | |
63cf211a | 8054 | DEFS=-DHAVE_CONFIG_H |
6e3f3080 | 8055 | |
63cf211a | 8056 | # Without the "./", some shells look in PATH for config.status. |
6e3f3080 | 8057 | : ${CONFIG_STATUS=./config.status} |
63cf211a NN |
8058 | |
8059 | echo creating $CONFIG_STATUS | |
8060 | rm -f $CONFIG_STATUS | |
8061 | cat > $CONFIG_STATUS <<EOF | |
8062 | #! /bin/sh | |
8063 | # Generated automatically by configure. | |
6e3f3080 | 8064 | # Run this file to recreate the current configuration. |
63cf211a NN |
8065 | # This directory was configured as follows, |
8066 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
8067 | # | |
8068 | # $0 $ac_configure_args | |
8069 | # | |
6e3f3080 | 8070 | # Compiler output produced by configure, useful for debugging |
63cf211a | 8071 | # configure, is in ./config.log if it exists. |
6e3f3080 | 8072 | |
63cf211a NN |
8073 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
8074 | for ac_option | |
6e3f3080 | 8075 | do |
63cf211a NN |
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 ;; | |
8086 | esac | |
6e3f3080 NN |
8087 | done |
8088 | ||
63cf211a | 8089 | ac_given_srcdir=$srcdir |
6e3f3080 | 8090 | |
63cf211a NN |
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 | |
6e3f3080 | 8094 | |
63cf211a NN |
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 | |
8138 | s%@build_subdir@%$build_subdir%g | |
8139 | s%@host_subdir@%$host_subdir%g | |
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%@strict1_warn@%$strict1_warn%g | |
8147 | s%@warn_cflags@%$warn_cflags%g | |
8148 | s%@WERROR@%$WERROR%g | |
8149 | s%@nocommon_flag@%$nocommon_flag%g | |
8150 | s%@valgrind_path@%$valgrind_path%g | |
8151 | s%@valgrind_path_defines@%$valgrind_path_defines%g | |
8152 | s%@valgrind_command@%$valgrind_command%g | |
8153 | s%@coverage_flags@%$coverage_flags%g | |
8154 | s%@enable_multilib@%$enable_multilib%g | |
8155 | s%@enable_shared@%$enable_shared%g | |
8156 | s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g | |
8157 | s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g | |
8158 | s%@CROSS_SYSTEM_HEADER_DIR@%$CROSS_SYSTEM_HEADER_DIR%g | |
8159 | s%@onestep@%$onestep%g | |
8160 | s%@SET_MAKE@%$SET_MAKE%g | |
8161 | s%@AWK@%$AWK%g | |
8162 | s%@LN@%$LN%g | |
8163 | s%@LN_S@%$LN_S%g | |
8164 | s%@RANLIB@%$RANLIB%g | |
8165 | s%@INSTALL@%$INSTALL%g | |
8166 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g | |
8167 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
8168 | s%@make_compare_target@%$make_compare_target%g | |
8169 | s%@have_mktemp_command@%$have_mktemp_command%g | |
8170 | s%@MAKEINFO@%$MAKEINFO%g | |
8171 | s%@BUILD_INFO@%$BUILD_INFO%g | |
8172 | s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g | |
8173 | s%@FLEX@%$FLEX%g | |
8174 | s%@BISON@%$BISON%g | |
8175 | s%@stage1_cflags@%$stage1_cflags%g | |
8176 | s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g | |
8177 | s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g | |
8178 | s%@LDEXP_LIB@%$LDEXP_LIB%g | |
8179 | s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g | |
8180 | s%@LIBICONV@%$LIBICONV%g | |
8181 | s%@LIBICONV_DEP@%$LIBICONV_DEP%g | |
8182 | s%@manext@%$manext%g | |
8183 | s%@objext@%$objext%g | |
8184 | s%@extra_modes_file@%$extra_modes_file%g | |
8185 | s%@FORBUILD@%$FORBUILD%g | |
8186 | s%@PACKAGE@%$PACKAGE%g | |
8187 | s%@VERSION@%$VERSION%g | |
8188 | s%@USE_NLS@%$USE_NLS%g | |
8189 | s%@LIBINTL@%$LIBINTL%g | |
8190 | s%@LIBINTL_DEP@%$LIBINTL_DEP%g | |
8191 | s%@INCINTL@%$INCINTL%g | |
8192 | s%@XGETTEXT@%$XGETTEXT%g | |
8193 | s%@GMSGFMT@%$GMSGFMT%g | |
8194 | s%@POSUB@%$POSUB%g | |
8195 | s%@CATALOGS@%$CATALOGS%g | |
8196 | s%@CROSS@%$CROSS%g | |
8197 | s%@ALL@%$ALL%g | |
8198 | s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g | |
8199 | s%@inhibit_libc@%$inhibit_libc%g | |
8200 | s%@BUILD_PREFIX@%$BUILD_PREFIX%g | |
8201 | s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g | |
8202 | s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g | |
8203 | s%@BUILD_CFLAGS@%$BUILD_CFLAGS%g | |
8204 | s%@STMP_FIXINC@%$STMP_FIXINC%g | |
8205 | s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g | |
8206 | s%@libgcc_visibility@%$libgcc_visibility%g | |
8207 | s%@gthread_flags@%$gthread_flags%g | |
8208 | s%@GGC@%$GGC%g | |
8209 | s%@zlibdir@%$zlibdir%g | |
8210 | s%@zlibinc@%$zlibinc%g | |
8211 | s%@MAINT@%$MAINT%g | |
8212 | s%@gcc_tooldir@%$gcc_tooldir%g | |
8213 | s%@dollar@%$dollar%g | |
8214 | s%@slibdir@%$slibdir%g | |
8215 | s%@objdir@%$objdir%g | |
8216 | s%@subdirs@%$subdirs%g | |
8217 | s%@srcdir@%$srcdir%g | |
8218 | s%@docobjdir@%$docobjdir%g | |
8219 | s%@parsedir@%$parsedir%g | |
8220 | s%@all_boot_languages@%$all_boot_languages%g | |
8221 | s%@all_compilers@%$all_compilers%g | |
8222 | s%@all_gtfiles@%$all_gtfiles%g | |
8223 | s%@all_gtfiles_files_langs@%$all_gtfiles_files_langs%g | |
8224 | s%@all_gtfiles_files_files@%$all_gtfiles_files_files%g | |
8225 | s%@all_lang_makefrags@%$all_lang_makefrags%g | |
8226 | s%@all_lang_makefiles@%$all_lang_makefiles%g | |
8227 | s%@all_languages@%$all_languages%g | |
8228 | s%@all_stagestuff@%$all_stagestuff%g | |
8229 | s%@build_exeext@%$build_exeext%g | |
8230 | s%@build_install_headers_dir@%$build_install_headers_dir%g | |
8231 | s%@build_xm_file_list@%$build_xm_file_list%g | |
8232 | s%@build_xm_include_list@%$build_xm_include_list%g | |
8233 | s%@build_xm_defines@%$build_xm_defines%g | |
8234 | s%@check_languages@%$check_languages%g | |
8235 | s%@cc_set_by_configure@%$cc_set_by_configure%g | |
8236 | s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g | |
8237 | s%@cpp_install_dir@%$cpp_install_dir%g | |
8238 | s%@xmake_file@%$xmake_file%g | |
8239 | s%@tmake_file@%$tmake_file%g | |
8240 | s%@extra_headers_list@%$extra_headers_list%g | |
8241 | s%@extra_objs@%$extra_objs%g | |
8242 | s%@extra_parts@%$extra_parts%g | |
8243 | s%@extra_passes@%$extra_passes%g | |
8244 | s%@extra_programs@%$extra_programs%g | |
8245 | s%@float_h_file@%$float_h_file%g | |
8246 | s%@gcc_config_arguments@%$gcc_config_arguments%g | |
8247 | s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g | |
8248 | s%@libstdcxx_incdir@%$libstdcxx_incdir%g | |
8249 | s%@gcc_version@%$gcc_version%g | |
8250 | s%@gcc_version_full@%$gcc_version_full%g | |
8251 | s%@gcc_version_trigger@%$gcc_version_trigger%g | |
8252 | s%@host_exeext@%$host_exeext%g | |
8253 | s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g | |
8254 | s%@host_xm_file_list@%$host_xm_file_list%g | |
8255 | s%@host_xm_include_list@%$host_xm_include_list%g | |
8256 | s%@host_xm_defines@%$host_xm_defines%g | |
8257 | s%@out_host_hook_obj@%$out_host_hook_obj%g | |
8258 | s%@install@%$install%g | |
8259 | s%@lang_opt_files@%$lang_opt_files%g | |
8260 | s%@lang_specs_files@%$lang_specs_files%g | |
8261 | s%@lang_tree_files@%$lang_tree_files%g | |
8262 | s%@local_prefix@%$local_prefix%g | |
8263 | s%@md_file@%$md_file%g | |
8264 | s%@objc_boehm_gc@%$objc_boehm_gc%g | |
8265 | s%@out_file@%$out_file%g | |
8266 | s%@out_object_file@%$out_object_file%g | |
8267 | s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g | |
8268 | s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g | |
8269 | s%@symbolic_link@%$symbolic_link%g | |
8270 | s%@thread_file@%$thread_file%g | |
8271 | s%@tm_file_list@%$tm_file_list%g | |
8272 | s%@tm_include_list@%$tm_include_list%g | |
8273 | s%@tm_defines@%$tm_defines%g | |
8274 | s%@tm_p_file_list@%$tm_p_file_list%g | |
8275 | s%@tm_p_include_list@%$tm_p_include_list%g | |
8276 | s%@xm_file_list@%$xm_file_list%g | |
8277 | s%@xm_include_list@%$xm_include_list%g | |
8278 | s%@xm_defines@%$xm_defines%g | |
8279 | s%@target_noncanonical@%$target_noncanonical%g | |
8280 | s%@c_target_objs@%$c_target_objs%g | |
8281 | s%@cxx_target_objs@%$cxx_target_objs%g | |
8282 | s%@target_cpu_default@%$target_cpu_default%g | |
8283 | /@language_hooks@/r $language_hooks | |
8284 | s%@language_hooks@%%g | |
6e3f3080 | 8285 | |
63cf211a NN |
8286 | CEOF |
8287 | EOF | |
6e3f3080 | 8288 | |
63cf211a NN |
8289 | cat >> $CONFIG_STATUS <<\EOF |
8290 | ||
8291 | # Split the substitutions into bite-sized pieces for seds with | |
8292 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
8293 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
8294 | ac_file=1 # Number of current file. | |
8295 | ac_beg=1 # First line for current file. | |
8296 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
8297 | ac_more_lines=: | |
8298 | ac_sed_cmds="" | |
8299 | while $ac_more_lines; do | |
8300 | if test $ac_beg -gt 1; then | |
8301 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
6e3f3080 | 8302 | else |
63cf211a | 8303 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file |
6e3f3080 | 8304 | fi |
63cf211a NN |
8305 | if test ! -s conftest.s$ac_file; then |
8306 | ac_more_lines=false | |
8307 | rm -f conftest.s$ac_file | |
6e3f3080 | 8308 | else |
63cf211a NN |
8309 | if test -z "$ac_sed_cmds"; then |
8310 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
8311 | else | |
8312 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
8313 | fi | |
8314 | ac_file=`expr $ac_file + 1` | |
8315 | ac_beg=$ac_end | |
8316 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
6e3f3080 | 8317 | fi |
6e3f3080 | 8318 | done |
63cf211a NN |
8319 | if test -z "$ac_sed_cmds"; then |
8320 | ac_sed_cmds=cat | |
861bb6c1 | 8321 | fi |
63cf211a | 8322 | EOF |
861bb6c1 | 8323 | |
63cf211a | 8324 | cat >> $CONFIG_STATUS <<EOF |
861bb6c1 | 8325 | |
63cf211a NN |
8326 | CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"} |
8327 | EOF | |
8328 | cat >> $CONFIG_STATUS <<\EOF | |
8329 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
861bb6c1 | 8330 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
63cf211a NN |
8331 | case "$ac_file" in |
8332 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
8333 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
8334 | *) ac_file_in="${ac_file}.in" ;; | |
861bb6c1 JL |
8335 | esac |
8336 | ||
63cf211a | 8337 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
6e3f3080 | 8338 | |
63cf211a NN |
8339 | # Remove last slash and all that follows it. Not all systems have dirname. |
8340 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
8341 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
8342 | # The file is in a subdirectory. | |
8343 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
8344 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
8345 | # A "../" for each directory in $ac_dir_suffix. | |
8346 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
8347 | else | |
8348 | ac_dir_suffix= ac_dots= | |
8349 | fi | |
cafe096b | 8350 | |
63cf211a NN |
8351 | case "$ac_given_srcdir" in |
8352 | .) srcdir=. | |
8353 | if test -z "$ac_dots"; then top_srcdir=. | |
8354 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
8355 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
861bb6c1 | 8356 | *) # Relative path. |
63cf211a NN |
8357 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
8358 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
8359 | esac | |
cafe096b | 8360 | |
6e3f3080 | 8361 | |
63cf211a NN |
8362 | echo creating "$ac_file" |
8363 | rm -f "$ac_file" | |
8364 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
8365 | case "$ac_file" in | |
8366 | *Makefile*) ac_comsub="1i\\ | |
8367 | # $configure_input" ;; | |
8368 | *) ac_comsub= ;; | |
8369 | esac | |
6e3f3080 | 8370 | |
63cf211a NN |
8371 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
8372 | sed -e "$ac_comsub | |
8373 | s%@configure_input@%$configure_input%g | |
8374 | s%@srcdir@%$srcdir%g | |
8375 | s%@top_srcdir@%$top_srcdir%g | |
8376 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
8377 | fi; done | |
8378 | rm -f conftest.s* | |
861bb6c1 JL |
8379 | |
8380 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
8381 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
8382 | # | |
8383 | # ac_d sets the value in "#define NAME VALUE" lines. | |
63cf211a NN |
8384 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
8385 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
8386 | ac_dC='\3' | |
8387 | ac_dD='%g' | |
8388 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
8389 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
8390 | ac_uB='\([ ]\)%\1#\2define\3' | |
861bb6c1 | 8391 | ac_uC=' ' |
63cf211a NN |
8392 | ac_uD='\4%g' |
8393 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
8394 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
8395 | ac_eB='$%\1#\2define\3' | |
8396 | ac_eC=' ' | |
8397 | ac_eD='%g' | |
8398 | ||
8399 | if test "${CONFIG_HEADERS+set}" != set; then | |
8400 | EOF | |
8401 | cat >> $CONFIG_STATUS <<EOF | |
8402 | CONFIG_HEADERS="auto-host.h:config.in" | |
8403 | EOF | |
8404 | cat >> $CONFIG_STATUS <<\EOF | |
8405 | fi | |
8406 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
861bb6c1 | 8407 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
63cf211a NN |
8408 | case "$ac_file" in |
8409 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
8410 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
8411 | *) ac_file_in="${ac_file}.in" ;; | |
861bb6c1 JL |
8412 | esac |
8413 | ||
63cf211a NN |
8414 | echo creating $ac_file |
8415 | ||
8416 | rm -f conftest.frag conftest.in conftest.out | |
8417 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
8418 | cat $ac_file_inputs > conftest.in | |
8419 | ||
8420 | EOF | |
8421 | ||
8422 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
8423 | # the proper values into config.h.in to produce config.h. And first: | |
8424 | # Protect against being on the right side of a sed subst in config.status. | |
8425 | # Protect against being in an unquoted here document in config.status. | |
8426 | rm -f conftest.vals | |
8427 | cat > conftest.hdr <<\EOF | |
8428 | s/[\\&%]/\\&/g | |
8429 | s%[\\$`]%\\&%g | |
8430 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
8431 | s%ac_d%ac_u%gp | |
8432 | s%ac_u%ac_e%gp | |
8433 | EOF | |
8434 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
8435 | rm -f conftest.hdr | |
861bb6c1 JL |
8436 | |
8437 | # This sed command replaces #undef with comments. This is necessary, for | |
8438 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
8439 | # on some systems where configure will not decide to define it. | |
63cf211a NN |
8440 | cat >> conftest.vals <<\EOF |
8441 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
8442 | EOF | |
8443 | ||
8444 | # Break up conftest.vals because some shells have a limit on | |
8445 | # the size of here documents, and old seds have small limits too. | |
861bb6c1 JL |
8446 | |
8447 | rm -f conftest.tail | |
63cf211a | 8448 | while : |
861bb6c1 | 8449 | do |
63cf211a NN |
8450 | ac_lines=`grep -c . conftest.vals` |
8451 | # grep -c gives empty output for an empty file on some AIX systems. | |
8452 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
8453 | # Write a limited-size here document to conftest.frag. | |
8454 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
8455 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
861bb6c1 | 8456 | echo 'CEOF |
63cf211a NN |
8457 | sed -f conftest.frag conftest.in > conftest.out |
8458 | rm -f conftest.in | |
8459 | mv conftest.out conftest.in | |
8460 | ' >> $CONFIG_STATUS | |
8461 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
8462 | rm -f conftest.vals | |
8463 | mv conftest.tail conftest.vals | |
861bb6c1 | 8464 | done |
63cf211a NN |
8465 | rm -f conftest.vals |
8466 | ||
8467 | cat >> $CONFIG_STATUS <<\EOF | |
8468 | rm -f conftest.frag conftest.h | |
8469 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
8470 | cat conftest.in >> conftest.h | |
8471 | rm -f conftest.in | |
8472 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
8473 | echo "$ac_file is unchanged" | |
8474 | rm -f conftest.h | |
6e3f3080 | 8475 | else |
63cf211a NN |
8476 | # Remove last slash and all that follows it. Not all systems have dirname. |
8477 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
8478 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
8479 | # The file is in a subdirectory. | |
8480 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
cafe096b | 8481 | fi |
63cf211a NN |
8482 | rm -f $ac_file |
8483 | mv conftest.h $ac_file | |
cafe096b | 8484 | fi |
63cf211a NN |
8485 | fi; done |
8486 | ||
8487 | EOF | |
8488 | cat >> $CONFIG_STATUS <<EOF | |
8489 | subdirs='$subdirs' | |
8490 | symbolic_link='$symbolic_link' | |
8491 | ||
8492 | EOF | |
8493 | cat >> $CONFIG_STATUS <<\EOF | |
861bb6c1 | 8494 | |
f1faaabd NN |
8495 | case ${CONFIG_HEADERS} in |
8496 | *auto-host.h:config.in*) | |
8497 | echo > cstamp-h ;; | |
861bb6c1 | 8498 | esac |
2ed26f6b | 8499 | # Make sure all the subdirs exist. |
c406e779 | 8500 | for d in $subdirs |
2ed26f6b | 8501 | do |
2ed26f6b | 8502 | test -d $d || mkdir $d |
2ed26f6b | 8503 | done |
93cf819d BK |
8504 | # If the host supports symlinks, point stage[1234] at ../stage[1234] so |
8505 | # bootstrapping and the installation procedure can still use | |
8506 | # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks, | |
8507 | # FLAGS_TO_PASS has been modified to solve the problem there. | |
8508 | # This is virtually a duplicate of what happens in configure.lang; we do | |
8509 | # an extra check to make sure this only happens if ln -s can be used. | |
75bffa71 | 8510 | if test "$symbolic_link" = "ln -s"; then |
c406e779 | 8511 | for d in ${subdirs} fixinc ; do |
1e6347d8 | 8512 | STARTDIR=`${PWDCMD-pwd}` |
4e8a434e | 8513 | cd $d |
6a1b7268 | 8514 | for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include |
4e8a434e BK |
8515 | do |
8516 | rm -f $t | |
8517 | $symbolic_link ../$t $t 2>/dev/null | |
8518 | done | |
8519 | cd $STARTDIR | |
93cf819d BK |
8520 | done |
8521 | else true ; fi | |
cafe096b | 8522 | |
63cf211a NN |
8523 | exit 0 |
8524 | EOF | |
861bb6c1 | 8525 | chmod +x $CONFIG_STATUS |
63cf211a NN |
8526 | rm -fr confdefs* $ac_clean_files |
8527 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
861bb6c1 | 8528 |