Commit | Line | Data |
---|---|---|
833c46e1 | 1 | #! /bin/sh |
fb589130 | 2 | |
b11fb939 | 3 | # Guess values for system-dependent variables and create Makefiles. |
53bdc990 | 4 | # Generated automatically using autoconf version 2.12 |
df586de2 | 5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
b11fb939 | 6 | # |
f2889110 KR |
7 | # This configure script is free software; the Free Software Foundation |
8 | # gives unlimited permission to copy, distribute and modify it. | |
b11fb939 | 9 | |
f2889110 | 10 | # Defaults: |
b11fb939 | 11 | ac_help= |
f2889110 KR |
12 | ac_default_prefix=/usr/local |
13 | # Any additions from configure.in: | |
e2b4bd2a ILT |
14 | ac_help="$ac_help |
15 | --with-gnu-ld assume the C compiler uses GNU ld [default=no]" | |
16 | ac_help="$ac_help | |
17 | --enable-shared build shared libraries [default=yes]" | |
18 | ac_help="$ac_help | |
19 | --enable-static build static libraries [default=yes]" | |
28d3e4a3 | 20 | ac_help="$ac_help |
d7b2038f | 21 | --enable-bfd-assembler use BFD back end for writing object files" |
e7757ad0 KR |
22 | ac_help="$ac_help |
23 | targets alternative target configurations besides the primary" | |
2e013bb7 ILT |
24 | ac_help="$ac_help |
25 | --enable-commonbfdlib build shared BFD/opcodes/libiberty library" | |
e2b4bd2a ILT |
26 | ac_help="$ac_help |
27 | --enable-maintainer-mode enable make rules and dependencies not useful | |
28 | (and sometimes confusing) to the casual installer" | |
b11fb939 | 29 | |
b11fb939 KR |
30 | # Initialize some variables set by options. |
31 | # The variables have the same names as the options, with | |
32 | # dashes changed to underlines. | |
33 | build=NONE | |
34 | cache_file=./config.cache | |
35 | exec_prefix=NONE | |
36 | host=NONE | |
37 | no_create= | |
38 | nonopt=NONE | |
bf111c9f | 39 | no_recursion= |
b11fb939 | 40 | prefix=NONE |
bf111c9f KR |
41 | program_prefix=NONE |
42 | program_suffix=NONE | |
ba49e48d | 43 | program_transform_name=s,x,x, |
b11fb939 | 44 | silent= |
f2889110 | 45 | site= |
b11fb939 KR |
46 | srcdir= |
47 | target=NONE | |
48 | verbose= | |
49 | x_includes=NONE | |
50 | x_libraries=NONE | |
1c9dbb83 ILT |
51 | bindir='${exec_prefix}/bin' |
52 | sbindir='${exec_prefix}/sbin' | |
53 | libexecdir='${exec_prefix}/libexec' | |
54 | datadir='${prefix}/share' | |
55 | sysconfdir='${prefix}/etc' | |
56 | sharedstatedir='${prefix}/com' | |
57 | localstatedir='${prefix}/var' | |
58 | libdir='${exec_prefix}/lib' | |
59 | includedir='${prefix}/include' | |
60 | oldincludedir='/usr/include' | |
61 | infodir='${prefix}/info' | |
62 | mandir='${prefix}/man' | |
b11fb939 KR |
63 | |
64 | # Initialize some other variables. | |
65 | subdirs= | |
1c9dbb83 | 66 | MFLAGS= MAKEFLAGS= |
c6c7035c MM |
67 | # Maximum number of lines to put in a shell here document. |
68 | ac_max_here_lines=12 | |
b11fb939 KR |
69 | |
70 | ac_prev= | |
71 | for ac_option | |
72 | do | |
73 | ||
74 | # If the previous option needs an argument, assign it. | |
75 | if test -n "$ac_prev"; then | |
76 | eval "$ac_prev=\$ac_option" | |
77 | ac_prev= | |
78 | continue | |
79 | fi | |
80 | ||
81 | case "$ac_option" in | |
82 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
83 | *) ac_optarg= ;; | |
84 | esac | |
85 | ||
bf111c9f | 86 | # Accept the important Cygnus configure options, so we can diagnose typos. |
b11fb939 KR |
87 | |
88 | case "$ac_option" in | |
89 | ||
1c9dbb83 ILT |
90 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
91 | ac_prev=bindir ;; | |
92 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
93 | bindir="$ac_optarg" ;; | |
94 | ||
95 | -build | --build | --buil | --bui | --bu) | |
b11fb939 | 96 | ac_prev=build ;; |
1c9dbb83 | 97 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
b11fb939 KR |
98 | build="$ac_optarg" ;; |
99 | ||
100 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
101 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
102 | ac_prev=cache_file ;; | |
103 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
104 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
105 | cache_file="$ac_optarg" ;; | |
106 | ||
1c9dbb83 ILT |
107 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) |
108 | ac_prev=datadir ;; | |
109 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
110 | | --da=*) | |
111 | datadir="$ac_optarg" ;; | |
112 | ||
b11fb939 KR |
113 | -disable-* | --disable-*) |
114 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
115 | # Reject names that are not valid shell variable names. | |
116 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
ba49e48d | 117 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } |
b11fb939 KR |
118 | fi |
119 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
120 | eval "enable_${ac_feature}=no" ;; | |
121 | ||
122 | -enable-* | --enable-*) | |
123 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
124 | # Reject names that are not valid shell variable names. | |
125 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
ba49e48d | 126 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } |
b11fb939 KR |
127 | fi |
128 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
129 | case "$ac_option" in | |
130 | *=*) ;; | |
131 | *) ac_optarg=yes ;; | |
132 | esac | |
133 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
134 | ||
135 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
136 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
137 | | --exec | --exe | --ex) | |
138 | ac_prev=exec_prefix ;; | |
139 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
140 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
141 | | --exec=* | --exe=* | --ex=*) | |
142 | exec_prefix="$ac_optarg" ;; | |
143 | ||
144 | -gas | --gas | --ga | --g) | |
145 | # Obsolete; use --with-gas. | |
146 | with_gas=yes ;; | |
147 | ||
148 | -help | --help | --hel | --he) | |
f1698cb7 KR |
149 | # Omit some internal or obsolete options to make the list less imposing. |
150 | # This message is too long to be a string in the A/UX 3.1 sh. | |
b11fb939 | 151 | cat << EOF |
f1698cb7 KR |
152 | Usage: configure [options] [host] |
153 | Options: [defaults in brackets after descriptions] | |
154 | Configuration: | |
155 | --cache-file=FILE cache test results in FILE | |
156 | --help print this message | |
157 | --no-create do not create output files | |
158 | --quiet, --silent do not print \`checking...' messages | |
159 | --version print the version of autoconf that created configure | |
160 | Directory and file names: | |
161 | --prefix=PREFIX install architecture-independent files in PREFIX | |
162 | [$ac_default_prefix] | |
1c9dbb83 | 163 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
f1698cb7 | 164 | [same as prefix] |
1c9dbb83 ILT |
165 | --bindir=DIR user executables in DIR [EPREFIX/bin] |
166 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
167 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
168 | --datadir=DIR read-only architecture-independent data in DIR | |
169 | [PREFIX/share] | |
170 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
171 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
172 | [PREFIX/com] | |
173 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
174 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
175 | --includedir=DIR C header files in DIR [PREFIX/include] | |
176 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
177 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
178 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
f1698cb7 KR |
179 | --srcdir=DIR find the sources in DIR [configure dir or ..] |
180 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
181 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1c9dbb83 ILT |
182 | --program-transform-name=PROGRAM |
183 | run sed PROGRAM on installed program names | |
184 | EOF | |
185 | cat << EOF | |
f1698cb7 KR |
186 | Host type: |
187 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
188 | --host=HOST configure for HOST [guessed] | |
189 | --target=TARGET configure for TARGET [TARGET=HOST] | |
190 | Features and packages: | |
191 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
192 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
193 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
194 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
195 | --x-includes=DIR X include files are in DIR | |
196 | --x-libraries=DIR X library files are in DIR | |
b11fb939 | 197 | EOF |
1c9dbb83 ILT |
198 | if test -n "$ac_help"; then |
199 | echo "--enable and --with options recognized:$ac_help" | |
200 | fi | |
b11fb939 KR |
201 | exit 0 ;; |
202 | ||
203 | -host | --host | --hos | --ho) | |
204 | ac_prev=host ;; | |
205 | -host=* | --host=* | --hos=* | --ho=*) | |
206 | host="$ac_optarg" ;; | |
207 | ||
1c9dbb83 ILT |
208 | -includedir | --includedir | --includedi | --included | --include \ |
209 | | --includ | --inclu | --incl | --inc) | |
210 | ac_prev=includedir ;; | |
211 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
212 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
213 | includedir="$ac_optarg" ;; | |
214 | ||
215 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
216 | ac_prev=infodir ;; | |
217 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
218 | infodir="$ac_optarg" ;; | |
219 | ||
220 | -libdir | --libdir | --libdi | --libd) | |
221 | ac_prev=libdir ;; | |
222 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
223 | libdir="$ac_optarg" ;; | |
224 | ||
225 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
226 | | --libexe | --libex | --libe) | |
227 | ac_prev=libexecdir ;; | |
228 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
229 | | --libexe=* | --libex=* | --libe=*) | |
230 | libexecdir="$ac_optarg" ;; | |
231 | ||
232 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
233 | | --localstate | --localstat | --localsta | --localst \ | |
234 | | --locals | --local | --loca | --loc | --lo) | |
235 | ac_prev=localstatedir ;; | |
236 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
237 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
238 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
239 | localstatedir="$ac_optarg" ;; | |
240 | ||
241 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
242 | ac_prev=mandir ;; | |
243 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
244 | mandir="$ac_optarg" ;; | |
245 | ||
b11fb939 KR |
246 | -nfp | --nfp | --nf) |
247 | # Obsolete; use --without-fp. | |
248 | with_fp=no ;; | |
249 | ||
250 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
251 | | --no-cr | --no-c) | |
252 | no_create=yes ;; | |
253 | ||
bf111c9f KR |
254 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
255 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
256 | no_recursion=yes ;; | |
b11fb939 | 257 | |
1c9dbb83 ILT |
258 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
259 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
260 | | --oldin | --oldi | --old | --ol | --o) | |
261 | ac_prev=oldincludedir ;; | |
262 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
263 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
264 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
265 | oldincludedir="$ac_optarg" ;; | |
266 | ||
b11fb939 KR |
267 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
268 | ac_prev=prefix ;; | |
269 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
270 | prefix="$ac_optarg" ;; | |
271 | ||
272 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
273 | | --program-pre | --program-pr | --program-p) | |
274 | ac_prev=program_prefix ;; | |
275 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
276 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
277 | program_prefix="$ac_optarg" ;; | |
278 | ||
279 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
280 | | --program-suf | --program-su | --program-s) | |
281 | ac_prev=program_suffix ;; | |
282 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
283 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
284 | program_suffix="$ac_optarg" ;; | |
285 | ||
286 | -program-transform-name | --program-transform-name \ | |
287 | | --program-transform-nam | --program-transform-na \ | |
288 | | --program-transform-n | --program-transform- \ | |
289 | | --program-transform | --program-transfor \ | |
290 | | --program-transfo | --program-transf \ | |
291 | | --program-trans | --program-tran \ | |
292 | | --progr-tra | --program-tr | --program-t) | |
293 | ac_prev=program_transform_name ;; | |
294 | -program-transform-name=* | --program-transform-name=* \ | |
295 | | --program-transform-nam=* | --program-transform-na=* \ | |
296 | | --program-transform-n=* | --program-transform-=* \ | |
297 | | --program-transform=* | --program-transfor=* \ | |
298 | | --program-transfo=* | --program-transf=* \ | |
299 | | --program-trans=* | --program-tran=* \ | |
300 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bf111c9f | 301 | program_transform_name="$ac_optarg" ;; |
b11fb939 KR |
302 | |
303 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
304 | | -silent | --silent | --silen | --sile | --sil) | |
305 | silent=yes ;; | |
306 | ||
1c9dbb83 ILT |
307 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
308 | ac_prev=sbindir ;; | |
309 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
310 | | --sbi=* | --sb=*) | |
311 | sbindir="$ac_optarg" ;; | |
312 | ||
313 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
314 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
315 | | --sharedst | --shareds | --shared | --share | --shar \ | |
316 | | --sha | --sh) | |
317 | ac_prev=sharedstatedir ;; | |
318 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
319 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
320 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
321 | | --sha=* | --sh=*) | |
322 | sharedstatedir="$ac_optarg" ;; | |
323 | ||
f2889110 KR |
324 | -site | --site | --sit) |
325 | ac_prev=site ;; | |
326 | -site=* | --site=* | --sit=*) | |
327 | site="$ac_optarg" ;; | |
328 | ||
b11fb939 KR |
329 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
330 | ac_prev=srcdir ;; | |
331 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
332 | srcdir="$ac_optarg" ;; | |
333 | ||
1c9dbb83 ILT |
334 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
335 | | --syscon | --sysco | --sysc | --sys | --sy) | |
336 | ac_prev=sysconfdir ;; | |
337 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
338 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
339 | sysconfdir="$ac_optarg" ;; | |
340 | ||
b11fb939 KR |
341 | -target | --target | --targe | --targ | --tar | --ta | --t) |
342 | ac_prev=target ;; | |
343 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
344 | target="$ac_optarg" ;; | |
345 | ||
346 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
347 | verbose=yes ;; | |
348 | ||
349 | -version | --version | --versio | --versi | --vers) | |
53bdc990 | 350 | echo "configure generated by autoconf version 2.12" |
b11fb939 KR |
351 | exit 0 ;; |
352 | ||
353 | -with-* | --with-*) | |
354 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
355 | # Reject names that are not valid shell variable names. | |
356 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
ba49e48d | 357 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } |
b11fb939 KR |
358 | fi |
359 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
360 | case "$ac_option" in | |
361 | *=*) ;; | |
362 | *) ac_optarg=yes ;; | |
363 | esac | |
364 | eval "with_${ac_package}='$ac_optarg'" ;; | |
365 | ||
366 | -without-* | --without-*) | |
367 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
368 | # Reject names that are not valid shell variable names. | |
369 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
ba49e48d | 370 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } |
b11fb939 KR |
371 | fi |
372 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
373 | eval "with_${ac_package}=no" ;; | |
374 | ||
375 | --x) | |
376 | # Obsolete; use --with-x. | |
377 | with_x=yes ;; | |
378 | ||
379 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
380 | | --x-incl | --x-inc | --x-in | --x-i) | |
381 | ac_prev=x_includes ;; | |
382 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
383 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
384 | x_includes="$ac_optarg" ;; | |
385 | ||
386 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
387 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
388 | ac_prev=x_libraries ;; | |
389 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
390 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
391 | x_libraries="$ac_optarg" ;; | |
392 | ||
ba49e48d | 393 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } |
b11fb939 KR |
394 | ;; |
395 | ||
1c9dbb83 | 396 | *) |
b11fb939 KR |
397 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
398 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
399 | fi | |
400 | if test "x$nonopt" != xNONE; then | |
ba49e48d | 401 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } |
b11fb939 KR |
402 | fi |
403 | nonopt="$ac_option" | |
404 | ;; | |
405 | ||
406 | esac | |
407 | done | |
408 | ||
409 | if test -n "$ac_prev"; then | |
ba49e48d | 410 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } |
b11fb939 KR |
411 | fi |
412 | ||
833c46e1 | 413 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
b11fb939 KR |
414 | |
415 | # File descriptor usage: | |
833c46e1 | 416 | # 0 standard input |
b11fb939 KR |
417 | # 1 file creation |
418 | # 2 errors and warnings | |
833c46e1 KR |
419 | # 3 some systems may open it to /dev/tty |
420 | # 4 used on the Kubota Titan | |
421 | # 6 checking for... messages and results | |
b11fb939 KR |
422 | # 5 compiler messages saved in config.log |
423 | if test "$silent" = yes; then | |
833c46e1 | 424 | exec 6>/dev/null |
b11fb939 | 425 | else |
833c46e1 | 426 | exec 6>&1 |
b11fb939 KR |
427 | fi |
428 | exec 5>./config.log | |
429 | ||
430 | echo "\ | |
431 | This file contains any messages produced by compilers while | |
432 | running configure, to aid debugging if configure makes a mistake. | |
433 | " 1>&5 | |
434 | ||
bf111c9f | 435 | # Strip out --no-create and --no-recursion so they do not pile up. |
e23b25ec KR |
436 | # Also quote any args containing shell metacharacters. |
437 | ac_configure_args= | |
438 | for ac_arg | |
439 | do | |
b11fb939 KR |
440 | case "$ac_arg" in |
441 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
442 | | --no-cr | --no-c) ;; | |
bf111c9f KR |
443 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
444 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
e23b25ec KR |
445 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) |
446 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
447 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
b11fb939 KR |
448 | esac |
449 | done | |
450 | ||
451 | # NLS nuisances. | |
c6c7035c MM |
452 | # Only set these to C if already set. These must not be set unconditionally |
453 | # because not all systems understand e.g. LANG=C (notably SCO). | |
454 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
455 | # Non-C LC_CTYPE values break the ctype check. | |
7d0f8249 | 456 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
c6c7035c MM |
457 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
458 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
459 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
b11fb939 KR |
460 | |
461 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
462 | rm -rf conftest* confdefs.h | |
463 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
464 | echo > confdefs.h | |
465 | ||
466 | # A filename unique to this package, relative to the directory that | |
467 | # configure is in, which we can look for to find out if srcdir is correct. | |
468 | ac_unique_file=as.h | |
469 | ||
470 | # Find the source files, if location was not specified. | |
471 | if test -z "$srcdir"; then | |
472 | ac_srcdir_defaulted=yes | |
473 | # Try the directory containing this script, then its parent. | |
474 | ac_prog=$0 | |
475 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
476 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
477 | srcdir=$ac_confdir | |
478 | if test ! -r $srcdir/$ac_unique_file; then | |
479 | srcdir=.. | |
480 | fi | |
481 | else | |
482 | ac_srcdir_defaulted=no | |
483 | fi | |
484 | if test ! -r $srcdir/$ac_unique_file; then | |
485 | if test "$ac_srcdir_defaulted" = yes; then | |
ba49e48d | 486 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } |
b11fb939 | 487 | else |
ba49e48d | 488 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } |
b11fb939 KR |
489 | fi |
490 | fi | |
f2889110 | 491 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` |
b11fb939 KR |
492 | |
493 | # Prefer explicitly selected file to automatically selected ones. | |
bf111c9f | 494 | if test -z "$CONFIG_SITE"; then |
b11fb939 | 495 | if test "x$prefix" != xNONE; then |
f2889110 | 496 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" |
b11fb939 | 497 | else |
f2889110 | 498 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" |
b11fb939 KR |
499 | fi |
500 | fi | |
501 | for ac_site_file in $CONFIG_SITE; do | |
502 | if test -r "$ac_site_file"; then | |
503 | echo "loading site script $ac_site_file" | |
504 | . "$ac_site_file" | |
505 | fi | |
506 | done | |
507 | ||
508 | if test -r "$cache_file"; then | |
509 | echo "loading cache $cache_file" | |
510 | . $cache_file | |
511 | else | |
512 | echo "creating cache $cache_file" | |
513 | > $cache_file | |
514 | fi | |
515 | ||
516 | ac_ext=c | |
517 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
d0352cbb DE |
518 | ac_cpp='$CPP $CPPFLAGS' |
519 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
520 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
c6c7035c | 521 | cross_compiling=$ac_cv_prog_cc_cross |
b11fb939 | 522 | |
bf111c9f KR |
523 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then |
524 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
525 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
526 | ac_n= ac_c=' | |
527 | ' ac_t=' ' | |
528 | else | |
529 | ac_n=-n ac_c= ac_t= | |
530 | fi | |
531 | else | |
532 | ac_n= ac_c='\c' ac_t= | |
533 | fi | |
534 | ||
b11fb939 KR |
535 | |
536 | ||
537 | ac_aux_dir= | |
e2b4bd2a | 538 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do |
e23b25ec KR |
539 | if test -f $ac_dir/install-sh; then |
540 | ac_aux_dir=$ac_dir | |
28d3e4a3 | 541 | ac_install_sh="$ac_aux_dir/install-sh -c" |
e23b25ec KR |
542 | break |
543 | elif test -f $ac_dir/install.sh; then | |
544 | ac_aux_dir=$ac_dir | |
28d3e4a3 | 545 | ac_install_sh="$ac_aux_dir/install.sh -c" |
e23b25ec | 546 | break |
b11fb939 KR |
547 | fi |
548 | done | |
549 | if test -z "$ac_aux_dir"; then | |
e2b4bd2a | 550 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } |
b11fb939 | 551 | fi |
28d3e4a3 KR |
552 | ac_config_guess=$ac_aux_dir/config.guess |
553 | ac_config_sub=$ac_aux_dir/config.sub | |
554 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
b11fb939 | 555 | |
fb589130 | 556 | |
b11fb939 KR |
557 | # Do some error checking and defaulting for the host and target type. |
558 | # The inputs are: | |
559 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
560 | # | |
561 | # The rules are: | |
562 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1c9dbb83 | 563 | # same time. |
b11fb939 KR |
564 | # 2. Host defaults to nonopt. |
565 | # 3. If nonopt is not specified, then host defaults to the current host, | |
566 | # as determined by config.guess. | |
f2889110 KR |
567 | # 4. Target and build default to nonopt. |
568 | # 5. If nonopt is not specified, then target and build default to host. | |
b11fb939 KR |
569 | |
570 | # The aliases save the names the user supplied, while $host etc. | |
571 | # will get canonicalized. | |
572 | case $host---$target---$nonopt in | |
573 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
ba49e48d | 574 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; |
b11fb939 KR |
575 | esac |
576 | ||
e23b25ec | 577 | |
b11fb939 | 578 | # Make sure we can run config.sub. |
53bdc990 | 579 | if $ac_config_sub sun4 >/dev/null 2>&1; then : |
ba49e48d | 580 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } |
b11fb939 KR |
581 | fi |
582 | ||
833c46e1 | 583 | echo $ac_n "checking host system type""... $ac_c" 1>&6 |
e2b4bd2a | 584 | echo "configure:585: checking host system type" >&5 |
b11fb939 KR |
585 | |
586 | host_alias=$host | |
28d3e4a3 | 587 | case "$host_alias" in |
b11fb939 KR |
588 | NONE) |
589 | case $nonopt in | |
590 | NONE) | |
53bdc990 | 591 | if host_alias=`$ac_config_guess`; then : |
ba49e48d | 592 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } |
b11fb939 KR |
593 | fi ;; |
594 | *) host_alias=$nonopt ;; | |
595 | esac ;; | |
596 | esac | |
597 | ||
53bdc990 | 598 | host=`$ac_config_sub $host_alias` |
c6c7035c MM |
599 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
600 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
601 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
833c46e1 | 602 | echo "$ac_t""$host" 1>&6 |
b11fb939 | 603 | |
833c46e1 | 604 | echo $ac_n "checking target system type""... $ac_c" 1>&6 |
e2b4bd2a | 605 | echo "configure:606: checking target system type" >&5 |
b11fb939 KR |
606 | |
607 | target_alias=$target | |
28d3e4a3 | 608 | case "$target_alias" in |
b11fb939 KR |
609 | NONE) |
610 | case $nonopt in | |
611 | NONE) target_alias=$host_alias ;; | |
612 | *) target_alias=$nonopt ;; | |
613 | esac ;; | |
614 | esac | |
615 | ||
53bdc990 | 616 | target=`$ac_config_sub $target_alias` |
c6c7035c MM |
617 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
618 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
619 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
833c46e1 | 620 | echo "$ac_t""$target" 1>&6 |
b11fb939 | 621 | |
833c46e1 | 622 | echo $ac_n "checking build system type""... $ac_c" 1>&6 |
e2b4bd2a | 623 | echo "configure:624: checking build system type" >&5 |
b11fb939 KR |
624 | |
625 | build_alias=$build | |
28d3e4a3 | 626 | case "$build_alias" in |
f2889110 KR |
627 | NONE) |
628 | case $nonopt in | |
629 | NONE) build_alias=$host_alias ;; | |
630 | *) build_alias=$nonopt ;; | |
631 | esac ;; | |
632 | esac | |
633 | ||
53bdc990 | 634 | build=`$ac_config_sub $build_alias` |
e2b4bd2a ILT |
635 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
636 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
637 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
638 | echo "$ac_t""$build" 1>&6 | |
639 | ||
640 | test "$host_alias" != "$target_alias" && | |
641 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
642 | NONENONEs,x,x, && | |
643 | program_prefix=${target_alias}- | |
644 | ||
645 | ||
646 | # Find a good install program. We prefer a C program (faster), | |
647 | # so one script is as good as another. But avoid the broken or | |
648 | # incompatible versions: | |
649 | # SysV /etc/install, /usr/sbin/install | |
650 | # SunOS /usr/etc/install | |
651 | # IRIX /sbin/install | |
652 | # AIX /bin/install | |
653 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
654 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
655 | # ./install, which can be erroneously created by make from ./install.sh. | |
656 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
657 | echo "configure:658: checking for a BSD compatible install" >&5 | |
658 | if test -z "$INSTALL"; then | |
659 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
660 | echo $ac_n "(cached) $ac_c" 1>&6 | |
661 | else | |
662 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
663 | for ac_dir in $PATH; do | |
664 | # Account for people who put trailing slashes in PATH elements. | |
665 | case "$ac_dir/" in | |
666 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
667 | *) | |
668 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
669 | for ac_prog in ginstall installbsd scoinst install; do | |
670 | if test -f $ac_dir/$ac_prog; then | |
671 | if test $ac_prog = install && | |
672 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
673 | # AIX install. It has an incompatible calling convention. | |
674 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
675 | : | |
676 | else | |
677 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
678 | break 2 | |
679 | fi | |
680 | fi | |
681 | done | |
682 | ;; | |
683 | esac | |
684 | done | |
685 | IFS="$ac_save_IFS" | |
686 | ||
687 | fi | |
688 | if test "${ac_cv_path_install+set}" = set; then | |
689 | INSTALL="$ac_cv_path_install" | |
690 | else | |
691 | # As a last resort, use the slow shell script. We don't cache a | |
692 | # path for INSTALL within a source directory, because that will | |
693 | # break other packages using the cache if that directory is | |
694 | # removed, or if the path is relative. | |
695 | INSTALL="$ac_install_sh" | |
696 | fi | |
697 | fi | |
698 | echo "$ac_t""$INSTALL" 1>&6 | |
699 | ||
700 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
701 | # It thinks the first close brace ends the variable substitution. | |
702 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
703 | ||
704 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
705 | ||
706 | ||
707 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
708 | ||
709 | ||
710 | PACKAGE=gas | |
711 | ||
712 | VERSION=2.8.2 | |
713 | ||
714 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then | |
715 | { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } | |
716 | fi | |
717 | cat >> confdefs.h <<EOF | |
718 | #define PACKAGE "$PACKAGE" | |
719 | EOF | |
720 | ||
721 | cat >> confdefs.h <<EOF | |
722 | #define VERSION "$VERSION" | |
723 | EOF | |
724 | ||
725 | echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 | |
726 | echo "configure:727: checking whether build environment is sane" >&5 | |
727 | # Just in case | |
728 | sleep 1 | |
729 | echo timestamp > conftestfile | |
730 | # Do `set' in a subshell so we don't clobber the current shell's | |
731 | # arguments. Must try -L first in case configure is actually a | |
732 | # symlink; some systems play weird games with the mod time of symlinks | |
733 | # (eg FreeBSD returns the mod time of the symlink's containing | |
734 | # directory). | |
735 | if ( | |
736 | set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` | |
737 | if test "" = "X"; then | |
738 | # -L didn't work. | |
739 | set X `ls -t $srcdir/configure conftestfile` | |
740 | fi | |
741 | test "$2" = conftestfile | |
742 | ) | |
743 | then | |
744 | # Ok. | |
745 | : | |
746 | else | |
747 | { echo "configure: error: newly created file is older than distributed files! | |
748 | Check your system clock" 1>&2; exit 1; } | |
749 | fi | |
750 | rm -f conftest* | |
751 | echo "$ac_t""yes" 1>&6 | |
752 | if test "$program_transform_name" = s,x,x,; then | |
753 | program_transform_name= | |
754 | else | |
755 | # Double any \ or $. echo might interpret backslashes. | |
756 | cat <<\EOF_SED > conftestsed | |
757 | s,\\,\\\\,g; s,\$,$$,g | |
758 | EOF_SED | |
759 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
760 | rm -f conftestsed | |
761 | fi | |
762 | test "$program_prefix" != NONE && | |
763 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
764 | # Use a double $ so make ignores it. | |
765 | test "$program_suffix" != NONE && | |
766 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
767 | ||
768 | # sed with no file args requires a program. | |
769 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
770 | ||
771 | missing_dir=`cd $ac_aux_dir && pwd` | |
772 | echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 | |
773 | echo "configure:774: checking for working aclocal" >&5 | |
774 | # Run test in a subshell; some versions of sh will print an error if | |
775 | # an executable is not found, even if stderr is redirected. | |
776 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
777 | if (aclocal --version) < /dev/null > /dev/null 2>&1; then | |
778 | ACLOCAL=aclocal | |
779 | echo "$ac_t""found" 1>&6 | |
780 | else | |
781 | ACLOCAL="$missing_dir/missing aclocal" | |
782 | echo "$ac_t""missing" 1>&6 | |
783 | fi | |
784 | ||
785 | echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 | |
786 | echo "configure:787: checking for working autoconf" >&5 | |
787 | # Run test in a subshell; some versions of sh will print an error if | |
788 | # an executable is not found, even if stderr is redirected. | |
789 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
790 | if (autoconf --version) < /dev/null > /dev/null 2>&1; then | |
791 | AUTOCONF=autoconf | |
792 | echo "$ac_t""found" 1>&6 | |
793 | else | |
794 | AUTOCONF="$missing_dir/missing autoconf" | |
795 | echo "$ac_t""missing" 1>&6 | |
796 | fi | |
797 | ||
798 | echo $ac_n "checking for working automake""... $ac_c" 1>&6 | |
799 | echo "configure:800: checking for working automake" >&5 | |
800 | # Run test in a subshell; some versions of sh will print an error if | |
801 | # an executable is not found, even if stderr is redirected. | |
802 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
803 | if (automake --version) < /dev/null > /dev/null 2>&1; then | |
804 | AUTOMAKE=automake | |
805 | echo "$ac_t""found" 1>&6 | |
806 | else | |
807 | AUTOMAKE="$missing_dir/missing automake" | |
808 | echo "$ac_t""missing" 1>&6 | |
809 | fi | |
810 | ||
811 | echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 | |
812 | echo "configure:813: checking for working autoheader" >&5 | |
813 | # Run test in a subshell; some versions of sh will print an error if | |
814 | # an executable is not found, even if stderr is redirected. | |
815 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
816 | if (autoheader --version) < /dev/null > /dev/null 2>&1; then | |
817 | AUTOHEADER=autoheader | |
818 | echo "$ac_t""found" 1>&6 | |
819 | else | |
820 | AUTOHEADER="$missing_dir/missing autoheader" | |
821 | echo "$ac_t""missing" 1>&6 | |
822 | fi | |
823 | ||
824 | echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 | |
825 | echo "configure:826: checking for working makeinfo" >&5 | |
826 | # Run test in a subshell; some versions of sh will print an error if | |
827 | # an executable is not found, even if stderr is redirected. | |
828 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
829 | if (makeinfo --version) < /dev/null > /dev/null 2>&1; then | |
830 | MAKEINFO=makeinfo | |
831 | echo "$ac_t""found" 1>&6 | |
832 | else | |
833 | MAKEINFO="$missing_dir/missing makeinfo" | |
834 | echo "$ac_t""missing" 1>&6 | |
835 | fi | |
836 | ||
837 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
838 | echo "configure:839: checking whether ${MAKE-make} sets \${MAKE}" >&5 | |
839 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` | |
840 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
841 | echo $ac_n "(cached) $ac_c" 1>&6 | |
842 | else | |
843 | cat > conftestmake <<\EOF | |
844 | all: | |
845 | @echo 'ac_maketemp="${MAKE}"' | |
846 | EOF | |
847 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
848 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
849 | if test -n "$ac_maketemp"; then | |
850 | eval ac_cv_prog_make_${ac_make}_set=yes | |
851 | else | |
852 | eval ac_cv_prog_make_${ac_make}_set=no | |
853 | fi | |
854 | rm -f conftestmake | |
855 | fi | |
856 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
857 | echo "$ac_t""yes" 1>&6 | |
858 | SET_MAKE= | |
859 | else | |
860 | echo "$ac_t""no" 1>&6 | |
861 | SET_MAKE="MAKE=${MAKE-make}" | |
862 | fi | |
863 | ||
864 | ||
865 | # Extract the first word of "gcc", so it can be a program name with args. | |
866 | set dummy gcc; ac_word=$2 | |
867 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
868 | echo "configure:869: checking for $ac_word" >&5 | |
869 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then | |
870 | echo $ac_n "(cached) $ac_c" 1>&6 | |
871 | else | |
872 | if test -n "$CC"; then | |
873 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
874 | else | |
875 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
876 | for ac_dir in $PATH; do | |
877 | test -z "$ac_dir" && ac_dir=. | |
878 | if test -f $ac_dir/$ac_word; then | |
879 | ac_cv_prog_CC="gcc" | |
880 | break | |
881 | fi | |
882 | done | |
883 | IFS="$ac_save_ifs" | |
884 | fi | |
885 | fi | |
886 | CC="$ac_cv_prog_CC" | |
887 | if test -n "$CC"; then | |
888 | echo "$ac_t""$CC" 1>&6 | |
889 | else | |
890 | echo "$ac_t""no" 1>&6 | |
891 | fi | |
892 | ||
893 | if test -z "$CC"; then | |
894 | # Extract the first word of "cc", so it can be a program name with args. | |
895 | set dummy cc; ac_word=$2 | |
896 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
897 | echo "configure:898: checking for $ac_word" >&5 | |
898 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then | |
899 | echo $ac_n "(cached) $ac_c" 1>&6 | |
900 | else | |
901 | if test -n "$CC"; then | |
902 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
903 | else | |
904 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
905 | ac_prog_rejected=no | |
906 | for ac_dir in $PATH; do | |
907 | test -z "$ac_dir" && ac_dir=. | |
908 | if test -f $ac_dir/$ac_word; then | |
909 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
910 | ac_prog_rejected=yes | |
911 | continue | |
912 | fi | |
913 | ac_cv_prog_CC="cc" | |
914 | break | |
915 | fi | |
916 | done | |
917 | IFS="$ac_save_ifs" | |
918 | if test $ac_prog_rejected = yes; then | |
919 | # We found a bogon in the path, so make sure we never use it. | |
920 | set dummy $ac_cv_prog_CC | |
921 | shift | |
922 | if test $# -gt 0; then | |
923 | # We chose a different compiler from the bogus one. | |
924 | # However, it has the same basename, so the bogon will be chosen | |
925 | # first if we set CC to just the basename; use the full file name. | |
926 | shift | |
927 | set dummy "$ac_dir/$ac_word" "$@" | |
928 | shift | |
929 | ac_cv_prog_CC="$@" | |
930 | fi | |
931 | fi | |
932 | fi | |
933 | fi | |
934 | CC="$ac_cv_prog_CC" | |
935 | if test -n "$CC"; then | |
936 | echo "$ac_t""$CC" 1>&6 | |
937 | else | |
938 | echo "$ac_t""no" 1>&6 | |
939 | fi | |
940 | ||
941 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
942 | fi | |
943 | ||
944 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
945 | echo "configure:946: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 | |
946 | ||
947 | ac_ext=c | |
948 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
949 | ac_cpp='$CPP $CPPFLAGS' | |
950 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
951 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
952 | cross_compiling=$ac_cv_prog_cc_cross | |
953 | ||
954 | cat > conftest.$ac_ext <<EOF | |
955 | #line 956 "configure" | |
956 | #include "confdefs.h" | |
957 | main(){return(0);} | |
958 | EOF | |
959 | if { (eval echo configure:960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
960 | ac_cv_prog_cc_works=yes | |
961 | # If we can't run a trivial program, we are probably using a cross compiler. | |
962 | if (./conftest; exit) 2>/dev/null; then | |
963 | ac_cv_prog_cc_cross=no | |
964 | else | |
965 | ac_cv_prog_cc_cross=yes | |
966 | fi | |
967 | else | |
968 | echo "configure: failed program was:" >&5 | |
969 | cat conftest.$ac_ext >&5 | |
970 | ac_cv_prog_cc_works=no | |
971 | fi | |
972 | rm -fr conftest* | |
973 | ||
974 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
975 | if test $ac_cv_prog_cc_works = no; then | |
976 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
977 | fi | |
978 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
979 | echo "configure:980: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 | |
980 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 | |
981 | cross_compiling=$ac_cv_prog_cc_cross | |
982 | ||
983 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
984 | echo "configure:985: checking whether we are using GNU C" >&5 | |
985 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then | |
986 | echo $ac_n "(cached) $ac_c" 1>&6 | |
987 | else | |
988 | cat > conftest.c <<EOF | |
989 | #ifdef __GNUC__ | |
990 | yes; | |
991 | #endif | |
992 | EOF | |
993 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then | |
994 | ac_cv_prog_gcc=yes | |
995 | else | |
996 | ac_cv_prog_gcc=no | |
997 | fi | |
998 | fi | |
999 | ||
1000 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
1001 | ||
1002 | if test $ac_cv_prog_gcc = yes; then | |
1003 | GCC=yes | |
1004 | ac_test_CFLAGS="${CFLAGS+set}" | |
1005 | ac_save_CFLAGS="$CFLAGS" | |
1006 | CFLAGS= | |
1007 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
1008 | echo "configure:1009: checking whether ${CC-cc} accepts -g" >&5 | |
1009 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then | |
1010 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1011 | else | |
1012 | echo 'void f(){}' > conftest.c | |
1013 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
1014 | ac_cv_prog_cc_g=yes | |
1015 | else | |
1016 | ac_cv_prog_cc_g=no | |
1017 | fi | |
1018 | rm -f conftest* | |
1019 | ||
1020 | fi | |
1021 | ||
1022 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
1023 | if test "$ac_test_CFLAGS" = set; then | |
1024 | CFLAGS="$ac_save_CFLAGS" | |
1025 | elif test $ac_cv_prog_cc_g = yes; then | |
1026 | CFLAGS="-g -O2" | |
1027 | else | |
1028 | CFLAGS="-O2" | |
1029 | fi | |
1030 | else | |
1031 | GCC= | |
1032 | test "${CFLAGS+set}" = set || CFLAGS="-g" | |
1033 | fi | |
1034 | ||
1035 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1036 | set dummy ranlib; ac_word=$2 | |
1037 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
1038 | echo "configure:1039: checking for $ac_word" >&5 | |
1039 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then | |
1040 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1041 | else | |
1042 | if test -n "$RANLIB"; then | |
1043 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1044 | else | |
1045 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1046 | for ac_dir in $PATH; do | |
1047 | test -z "$ac_dir" && ac_dir=. | |
1048 | if test -f $ac_dir/$ac_word; then | |
1049 | ac_cv_prog_RANLIB="ranlib" | |
1050 | break | |
1051 | fi | |
1052 | done | |
1053 | IFS="$ac_save_ifs" | |
1054 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1055 | fi | |
1056 | fi | |
1057 | RANLIB="$ac_cv_prog_RANLIB" | |
1058 | if test -n "$RANLIB"; then | |
1059 | echo "$ac_t""$RANLIB" 1>&6 | |
1060 | else | |
1061 | echo "$ac_t""no" 1>&6 | |
1062 | fi | |
1063 | ||
1064 | # Check whether --with-gnu-ld or --without-gnu-ld was given. | |
1065 | if test "${with_gnu_ld+set}" = set; then | |
1066 | withval="$with_gnu_ld" | |
1067 | test "$withval" = no || with_gnu_ld=yes | |
1068 | else | |
1069 | with_gnu_ld=no | |
1070 | fi | |
1071 | ||
1072 | if test "$with_gnu_ld" = yes; then | |
1073 | echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 | |
1074 | echo "configure:1075: checking for GNU ld" >&5 | |
1075 | else | |
1076 | echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 | |
1077 | echo "configure:1078: checking for non-GNU ld" >&5 | |
1078 | fi | |
1079 | if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then | |
1080 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1081 | else | |
1082 | case "$LD" in | |
1083 | /*) | |
1084 | ac_cv_path_LD="$LD" # Let the user override the test with a path. | |
1085 | ;; | |
1086 | *) | |
1087 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1088 | for ac_dir in $PATH; do | |
1089 | test -z "$ac_dir" && ac_dir=. | |
1090 | if test -f "$ac_dir/ld"; then | |
1091 | ac_cv_path_LD="$ac_dir/ld" | |
1092 | # Check to see if the program is GNU ld. I'd rather use --version, | |
1093 | # but apparently some GNU ld's only accept -v. | |
1094 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
1095 | if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then | |
1096 | test "$with_gnu_ld" = yes && break | |
1097 | else | |
1098 | test "$with_gnu_ld" != yes && break | |
1099 | fi | |
1100 | fi | |
1101 | done | |
1102 | IFS="$ac_save_ifs" | |
1103 | ;; | |
1104 | esac | |
1105 | fi | |
1106 | ||
1107 | LD="$ac_cv_path_LD" | |
1108 | if test -n "$LD"; then | |
1109 | echo "$ac_t""$LD" 1>&6 | |
1110 | else | |
1111 | echo "$ac_t""no" 1>&6 | |
1112 | fi | |
1113 | test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } | |
1114 | ||
1115 | echo $ac_n "checking whether we are using GNU ld""... $ac_c" 1>&6 | |
1116 | echo "configure:1117: checking whether we are using GNU ld" >&5 | |
1117 | if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then | |
1118 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1119 | else | |
1120 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
1121 | if $LD -v 2>&1 </dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then | |
1122 | ac_cv_prog_gnu_ld=yes | |
1123 | else | |
1124 | ac_cv_prog_gnu_ld=no | |
1125 | fi | |
1126 | fi | |
1127 | ||
1128 | echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 | |
1129 | ||
1130 | ||
1131 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 | |
1132 | echo "configure:1133: checking whether ln -s works" >&5 | |
1133 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then | |
1134 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1135 | else | |
1136 | rm -f conftestdata | |
1137 | if ln -s X conftestdata 2>/dev/null | |
1138 | then | |
1139 | rm -f conftestdata | |
1140 | ac_cv_prog_LN_S="ln -s" | |
1141 | else | |
1142 | ac_cv_prog_LN_S=ln | |
1143 | fi | |
1144 | fi | |
1145 | LN_S="$ac_cv_prog_LN_S" | |
1146 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
1147 | echo "$ac_t""yes" 1>&6 | |
1148 | else | |
1149 | echo "$ac_t""no" 1>&6 | |
1150 | fi | |
1151 | ||
1152 | ||
1153 | ||
1154 | ||
1155 | ||
1156 | ||
1157 | ||
1158 | # Always use our own libtool. | |
1159 | LIBTOOL='$(top_builddir)/libtool' | |
1160 | ||
1161 | ||
1162 | # Check whether --enable-shared or --disable-shared was given. | |
1163 | if test "${enable_shared+set}" = set; then | |
1164 | enableval="$enable_shared" | |
1165 | if test "$enableval" = no; then | |
1166 | enable_shared=no | |
1167 | else | |
1168 | enable_shared=yes | |
1169 | fi | |
1170 | fi | |
1171 | ||
1172 | libtool_shared= | |
1173 | test "$enable_shared" = no && libtool_shared=" --disable-shared" | |
1174 | ||
1175 | # Check whether --enable-static or --disable-static was given. | |
1176 | if test "${enable_static+set}" = set; then | |
1177 | enableval="$enable_static" | |
1178 | if test "$enableval" = no; then | |
1179 | enable_static=no | |
1180 | else | |
1181 | enable_static=yes | |
1182 | fi | |
1183 | fi | |
1184 | ||
1185 | libtool_static= | |
1186 | test "$enable_static" = no && libtool_static=" --disable-static" | |
1187 | ||
1188 | libtool_flags="$libtool_shared$libtool_static" | |
1189 | test "$silent" = yes && libtool_flags="$libtool_flags --silent" | |
1190 | test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" | |
1191 | test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" | |
1192 | ||
1193 | # Some flags need to be propagated to the compiler or linker for good | |
1194 | # libtool support. | |
1195 | case "$host" in | |
1196 | *-*-irix6*) | |
1197 | ac_save_CFLAGS="$CFLAGS" | |
1198 | # -n32 always needs to be added to the linker when using GCC. | |
1199 | test "$ac_cv_prog_gcc" = yes && CFLAGS="$CFLAGS -n32" | |
1200 | for f in '-32' '-64' '-cckr' '-n32' '-mips1' '-mips2' '-mips3' '-mips4'; do | |
1201 | if echo " $CC $CFLAGS " | egrep -e "[ ]$f[ ]" > /dev/null; then | |
1202 | LD="${LD-ld} $f" | |
1203 | fi | |
1204 | done | |
1205 | CFLAGS="$ac_save_CFLAGS" | |
1206 | ;; | |
1207 | ||
1208 | *-*-sco3.2v5*) | |
1209 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. | |
1210 | CFLAGS="$CFLAGS -belf" | |
1211 | ;; | |
1212 | esac | |
1213 | ||
1214 | # Actually configure libtool. ac_aux_dir is where install-sh is found. | |
1215 | CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ | |
1216 | LD="$LD" RANLIB="$RANLIB" LN_S="$LN_S" \ | |
1217 | ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \ | |
1218 | $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ | |
1219 | || { echo "configure: error: libtool configure failed" 1>&2; exit 1; } | |
1220 | ||
1221 | ||
1222 | user_bfd_gas= | |
1223 | # Check whether --enable-bfd-assembler or --disable-bfd-assembler was given. | |
1224 | if test "${enable_bfd_assembler+set}" = set; then | |
1225 | enableval="$enable_bfd_assembler" | |
1226 | case "${enableval}" in | |
1227 | yes) need_bfd=yes user_bfd_gas=yes ;; | |
1228 | no) user_bfd_gas=no ;; | |
1229 | *) { echo "configure: error: bad value ${enableval} given for bfd-assembler option" 1>&2; exit 1; } ;; | |
1230 | esac | |
1231 | fi | |
1232 | # Check whether --enable-targets or --disable-targets was given. | |
1233 | if test "${enable_targets+set}" = set; then | |
1234 | enableval="$enable_targets" | |
1235 | case "${enableval}" in | |
1236 | yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; } | |
1237 | ;; | |
1238 | no) enable_targets= ;; | |
1239 | *) enable_targets=$enableval ;; | |
1240 | esac | |
1241 | fi | |
1242 | # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given. | |
1243 | if test "${enable_commonbfdlib+set}" = set; then | |
1244 | enableval="$enable_commonbfdlib" | |
1245 | case "${enableval}" in | |
1246 | yes) commonbfdlib=true ;; | |
1247 | no) commonbfdlib=false ;; | |
1248 | *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;; | |
1249 | esac | |
1250 | fi | |
1251 | ||
1252 | # Generate a header file | |
b11fb939 | 1253 | |
318b02b6 | 1254 | |
318b02b6 | 1255 | |
b11fb939 | 1256 | |
e7757ad0 | 1257 | te_file=generic |
b11fb939 | 1258 | |
e7757ad0 KR |
1259 | canon_targets="" |
1260 | if test -n "$enable_targets" ; then | |
1261 | for t in `echo $enable_targets | sed 's/,/ /g'`; do | |
ec2f730d | 1262 | result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $t 2>/dev/null` |
e7757ad0 KR |
1263 | if test -n "$result" ; then |
1264 | canon_targets="$canon_targets $result" | |
1265 | # else | |
1266 | # # Permit "all", etc. We don't support it yet though. | |
1267 | # canon_targets="$canon_targets $t" | |
1268 | fi | |
1269 | done | |
1270 | _gas_uniq_list="$canon_targets" | |
1271 | _gas_uniq_newlist="" | |
1272 | for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do | |
1273 | case $_gas_uniq_i in | |
1274 | _gas_uniq_dummy) ;; | |
1275 | *) case " $_gas_uniq_newlist " in | |
1276 | *" $_gas_uniq_i "*) ;; | |
1277 | *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;; | |
1278 | esac ;; | |
1279 | esac | |
1280 | done | |
1281 | canon_targets=$_gas_uniq_newlist | |
b11fb939 | 1282 | |
e7757ad0 | 1283 | fi |
b11fb939 | 1284 | |
e7757ad0 KR |
1285 | emulations="" |
1286 | ||
1287 | for this_target in $target $canon_targets ; do | |
1288 | ||
64556643 | 1289 | eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'` |
e7757ad0 KR |
1290 | |
1291 | # check for architecture variants | |
6ff87ead | 1292 | endian= |
e7757ad0 | 1293 | case ${cpu} in |
ae09d880 ILT |
1294 | armeb) cpu_type=arm endian=big ;; |
1295 | arm*) cpu_type=arm endian=little ;; | |
76fb6d2f | 1296 | thumb*) cpu_type=arm endian=little ;; |
e7757ad0 | 1297 | hppa*) cpu_type=hppa ;; |
7c2fadd1 | 1298 | i[456]86) cpu_type=i386 ;; |
e7757ad0 KR |
1299 | m680[012346]0) cpu_type=m68k ;; |
1300 | m68008) cpu_type=m68k ;; | |
1301 | m683??) cpu_type=m68k ;; | |
1302 | m8*) cpu_type=m88k ;; | |
e16b9537 | 1303 | mips*el) cpu_type=mips endian=little ;; |
ea1c39ce | 1304 | mips*5900*) cpu_type=mips endian=little ;; |
e7757ad0 KR |
1305 | mips*) cpu_type=mips endian=big ;; |
1306 | powerpcle*) cpu_type=ppc endian=little ;; | |
1307 | powerpc*) cpu_type=ppc endian=big ;; | |
1308 | rs6000*) cpu_type=ppc ;; | |
6df07e7f | 1309 | sparc64) cpu_type=sparc want_sparc_v9=true ;; |
63e4edb5 | 1310 | sparc*) cpu_type=sparc ;; |
756adc97 | 1311 | v850*) cpu_type=v850 ;; |
a1c7c0f3 | 1312 | *) cpu_type=${cpu} ;; |
e7757ad0 KR |
1313 | esac |
1314 | ||
1315 | if test ${this_target} = $target ; then | |
1316 | target_cpu_type=${cpu_type} | |
6ff87ead NC |
1317 | if test x${endian} = xbig; then |
1318 | cat >> confdefs.h <<\EOF | |
1319 | #define TARGET_BYTES_BIG_ENDIAN 1 | |
1320 | EOF | |
1321 | ||
1322 | elif test x${endian} = xlittle; then | |
1323 | cat >> confdefs.h <<\EOF | |
1324 | #define TARGET_BYTES_BIG_ENDIAN 0 | |
1325 | EOF | |
1326 | ||
1327 | fi | |
e7757ad0 KR |
1328 | elif test ${target_cpu_type} != ${cpu_type} ; then |
1329 | continue | |
1330 | fi | |
1331 | ||
e7757ad0 KR |
1332 | generic_target=${cpu_type}-$vendor-$os |
1333 | dev=no | |
1334 | bfd_gas=no | |
1335 | em=generic | |
1336 | ||
1337 | # assign object format | |
1338 | case ${generic_target} in | |
6ff87ead NC |
1339 | a29k-*-coff) fmt=coff ;; |
1340 | a29k-amd-udi) fmt=coff ;; | |
1341 | a29k-amd-ebmon) fmt=coff ;; | |
1342 | a29k-nyu-sym1) fmt=coff ;; | |
e7757ad0 KR |
1343 | a29k-*-vxworks*) fmt=coff ;; |
1344 | ||
c6aa56bc | 1345 | alpha-*-*vms*) fmt=evax ;; |
e7757ad0 | 1346 | alpha-*-netware*) fmt=ecoff ;; |
894cca25 | 1347 | alpha-*-openbsd*) fmt=ecoff ;; |
e7757ad0 | 1348 | alpha-*-osf*) fmt=ecoff ;; |
df586de2 ILT |
1349 | alpha-*-linuxecoff*) fmt=ecoff ;; |
1350 | alpha-*-linux*) fmt=elf em=linux ;; | |
b11fb939 | 1351 | |
e7757ad0 | 1352 | arc-*-elf*) fmt=elf bfd_gas=yes ;; |
4181c985 | 1353 | |
6ff87ead NC |
1354 | arm-*-riscix*) fmt=aout em=riscix ;; |
1355 | arm-*-aout) fmt=aout ;; | |
76fb6d2f | 1356 | arm-*-coff | thumb-*-coff) fmt=coff ;; |
e7757ad0 | 1357 | arm-*-riscix*) fmt=aout ;; |
6ff87ead | 1358 | arm-*-pe) fmt=coff em=pe ;; |
e7757ad0 | 1359 | |
cbe7dccb | 1360 | d10v-*-*) fmt=elf bfd_gas=yes ;; |
7d0f8249 MH |
1361 | # start-sanitize-d30v |
1362 | d30v-*-*) fmt=elf bfd_gas=yes ;; | |
1363 | # end-sanitize-d30v | |
7be9a312 | 1364 | |
e7757ad0 KR |
1365 | hppa-*-*elf*) fmt=elf em=hppa ;; |
1366 | hppa-*-lites*) fmt=elf em=hppa ;; | |
1367 | hppa-*-osf*) fmt=som em=hppa ;; | |
332d5c49 | 1368 | hppa-*-rtems*) fmt=elf em=hppa ;; |
e7757ad0 KR |
1369 | hppa-*-hpux*) fmt=som em=hppa ;; |
1370 | hppa-*-bsd*) fmt=som em=hppa ;; | |
1371 | hppa-*-hiux*) fmt=som em=hppa ;; | |
1372 | ||
1373 | h8300-*-coff) fmt=coff ;; | |
1374 | ||
6ff87ead | 1375 | i386-ibm-aix*) fmt=coff em=i386aix ;; |
7d0f8249 | 1376 | i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;; |
e7757ad0 KR |
1377 | i386-*-bsd*) fmt=aout em=386bsd ;; |
1378 | i386-*-netbsd0.8) fmt=aout em=386bsd ;; | |
1379 | i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;; | |
76fb6d2f | 1380 | i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;; |
a1c7c0f3 | 1381 | i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;; |
6ff87ead | 1382 | i386-*-linux*coff*) fmt=coff em=linux ;; |
e7757ad0 | 1383 | i386-*-linux*) fmt=elf em=linux ;; |
6ff87ead | 1384 | i386-*-lynxos*) fmt=coff em=lynx ;; |
2ae5f50b | 1385 | i386-*-sysv4* | i386-*-solaris* | i386-*-elf | i386-*-freebsdelf*) |
e7757ad0 | 1386 | fmt=elf ;; |
6ff87ead NC |
1387 | i386-*-sco*elf*) fmt=elf |
1388 | if test ${this_target} = $target; then | |
1389 | cat >> confdefs.h <<\EOF | |
1390 | #define SCO_ELF 1 | |
1391 | EOF | |
1392 | ||
1393 | fi | |
1394 | ;; | |
e7757ad0 | 1395 | i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*) |
6ff87ead | 1396 | fmt=coff ;; |
e7757ad0 | 1397 | i386-*-vsta) fmt=aout ;; |
ea1c39ce | 1398 | i386-*-msdosdjgpp* | i386-*-go32*) |
6ff87ead NC |
1399 | fmt=coff em=go32;; |
1400 | i386-*-rtems*) fmt=coff ;; | |
6c186c48 SC |
1401 | i386-*-gnu*) fmt=elf ;; |
1402 | i386-*-mach*) | |
e7757ad0 KR |
1403 | fmt=aout em=mach bfd_gas=yes ;; |
1404 | i386-*-msdos*) fmt=aout ;; | |
6c186c48 | 1405 | i386-*-moss*) fmt=elf ;; |
6ff87ead NC |
1406 | i386-*-pe) fmt=coff em=pe ;; |
1407 | i386-*-cygwin32) fmt=coff em=pe bfd_gas=yes ;; | |
1408 | i386-*-*nt) fmt=coff em=pe ;; | |
e7757ad0 | 1409 | i960-*-bout) fmt=bout ;; |
6ff87ead NC |
1410 | i960-*-coff) fmt=coff em=ic960 ;; |
1411 | i960-*-rtems*) fmt=coff em=ic960 ;; | |
e7757ad0 KR |
1412 | i960-*-nindy*) fmt=bout ;; |
1413 | i960-*-vxworks4*) fmt=bout ;; | |
1414 | i960-*-vxworks5.0) fmt=bout ;; | |
6ff87ead | 1415 | i960-*-vxworks5.*) fmt=coff em=ic960 ;; |
e7757ad0 KR |
1416 | i960-*-vxworks*) fmt=bout ;; |
1417 | ||
374bdac7 DE |
1418 | m32r-*-*) fmt=elf bfd_gas=yes ;; |
1419 | ||
e7757ad0 KR |
1420 | m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*) |
1421 | fmt=aout em=sun3 ;; | |
6ff87ead NC |
1422 | m68k-motorola-sysv*) fmt=coff em=delta ;; |
1423 | m68k-bull-sysv3*) fmt=coff em=dpx2 ;; | |
1424 | m68k-apollo-*) fmt=coff em=apollo ;; | |
fee3e248 ILT |
1425 | m68k-*-sysv4*) # must be before -sysv* |
1426 | fmt=elf em=svr4 ;; | |
1427 | m68k-*-elf*) fmt=elf ;; | |
7be9a312 | 1428 | m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*) |
6ff87ead | 1429 | fmt=coff ;; |
e7757ad0 | 1430 | m68k-*-hpux*) fmt=hp300 em=hp300 ;; |
535cfd0f ILT |
1431 | m68k-*-linux*aout*) fmt=aout em=linux ;; |
1432 | m68k-*-linux*) fmt=elf em=linux ;; | |
6ff87ead | 1433 | m68k-*-lynxos*) fmt=coff em=lynx ;; |
e7757ad0 | 1434 | m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; |
76fb6d2f | 1435 | m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;; |
6ff87ead | 1436 | m68k-apple-aux*) fmt=coff em=aux ;; |
2b37714a | 1437 | m68k-*-psos*) fmt=elf em=psos;; |
e7757ad0 | 1438 | |
6ff87ead NC |
1439 | m88k-motorola-sysv3*) fmt=coff em=delt88 ;; |
1440 | m88k-*-coff*) fmt=coff ;; | |
e7757ad0 KR |
1441 | |
1442 | # don't change em like *-*-bsd does | |
6ff87ead NC |
1443 | mips-dec-netbsd*) fmt=elf endian=little ;; |
1444 | mips-dec-openbsd*) fmt=elf endian=little ;; | |
1445 | mips-dec-bsd*) fmt=aout ;; | |
1446 | mips-sony-bsd*) fmt=ecoff ;; | |
e7757ad0 | 1447 | mips-*-bsd*) { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;; |
6ff87ead NC |
1448 | mips-*-ultrix*) fmt=ecoff endian=little ;; |
1449 | mips-*-osf*) fmt=ecoff endian=little ;; | |
1450 | mips-*-ecoff*) fmt=ecoff ;; | |
1451 | mips-*-ecoff*) fmt=ecoff ;; | |
1452 | mips-*-irix6*) fmt=elf ;; | |
1453 | mips-*-irix5*) fmt=elf ;; | |
1454 | mips-*-irix*) fmt=ecoff ;; | |
1455 | mips-*-lnews*) fmt=ecoff em=lnews ;; | |
1456 | mips-*-riscos*) fmt=ecoff ;; | |
1457 | mips-*-sysv*) fmt=ecoff ;; | |
fc984eb0 | 1458 | mips-*-elf* | mips-*-rtems* | mips-*-linux* | mips-*-gnu* | mips-*-openbsd*) |
6ff87ead | 1459 | fmt=elf ;; |
ae1b99e4 JL |
1460 | mn10200-*-*) fmt=elf bfd_gas=yes ;; |
1461 | mn10300-*-*) fmt=elf bfd_gas=yes ;; | |
0ff513d9 | 1462 | ppc-*-pe | ppc-*-cygwin32 | ppc-*-winnt*) |
6ff87ead | 1463 | fmt=coff em=pe ;; |
e7757ad0 | 1464 | ppc-*-aix*) fmt=coff ;; |
515c7142 | 1465 | ppc-*-beos*) fmt=coff ;; |
76fb6d2f | 1466 | ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*) |
6ff87ead | 1467 | fmt=elf ;; |
159e6ef8 MM |
1468 | ppc-*-linux*) fmt=elf |
1469 | case "$endian" in | |
6ff87ead | 1470 | big) ;; |
159e6ef8 MM |
1471 | *) { echo "configure: error: Linux must be configured big endian" 1>&2; exit 1; } ;; |
1472 | esac | |
1473 | ;; | |
1474 | ppc-*-solaris*) fmt=elf | |
6ff87ead NC |
1475 | if test ${this_target} = $target; then |
1476 | cat >> confdefs.h <<\EOF | |
1477 | #define TARGET_SOLARIS_COMMENT 1 | |
1478 | EOF | |
1479 | ||
1480 | fi | |
1481 | if test x${endian} = xbig; then | |
1482 | { echo "configure: error: Solaris must be configured little endian" 1>&2; exit 1; } | |
1483 | fi | |
7be9a312 | 1484 | ;; |
6ff87ead | 1485 | ppc-*-rtems*) fmt=elf ;; |
880b7429 KR |
1486 | ppc-*-macos* | ppc-*-mpw*) |
1487 | fmt=coff em=macos ;; | |
e7757ad0 KR |
1488 | ppc-*-netware*) fmt=elf em=ppcnw ;; |
1489 | ||
df4021c1 DE |
1490 | sh-*-elf*) fmt=elf ;; |
1491 | sh-*-coff*) fmt=coff ;; | |
b11fb939 | 1492 | |
5f757edc ILT |
1493 | ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;; |
1494 | ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;; | |
76fb6d2f | 1495 | ns32k-pc532-openbsd*) fmt=aout em=nbsd532 ;; |
e7757ad0 | 1496 | |
7be9a312 | 1497 | sparc-*-rtems*) fmt=aout ;; |
e7757ad0 | 1498 | sparc-*-sunos4*) fmt=aout em=sun3 ;; |
df586de2 | 1499 | sparc-*-aout | sparc*-*-vxworks*) |
df4021c1 | 1500 | fmt=aout em=sparcaout ;; |
e7757ad0 | 1501 | sparc-*-coff) fmt=coff ;; |
2e013bb7 ILT |
1502 | sparc-*-linux*aout*) fmt=aout em=linux ;; |
1503 | sparc-*-linux*) fmt=elf em=linux ;; | |
e7757ad0 KR |
1504 | sparc-*-lynxos*) fmt=coff em=lynx ;; |
1505 | sparc-fujitsu-none) fmt=aout ;; | |
0b27ea39 | 1506 | sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*) |
e7757ad0 KR |
1507 | fmt=elf ;; |
1508 | sparc-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; | |
76fb6d2f | 1509 | sparc-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;; |
e7757ad0 | 1510 | |
64556643 | 1511 | # start-sanitize-tic80 |
6ff87ead | 1512 | tic80-*-*) fmt=coff ;; |
64556643 | 1513 | # end-sanitize-tic80 |
c6aa56bc | 1514 | v850-*-*) fmt=elf bfd_gas=yes ;; |
53bdc990 | 1515 | |
6ff87ead | 1516 | # start-sanitize-v850e |
53bdc990 | 1517 | v850e-*-*) fmt=elf bfd_gas=yes ;; |
6ff87ead NC |
1518 | # end-sanitize-v850e |
1519 | # start-sanitize-v850eq | |
53bdc990 | 1520 | v850eq-*-*) fmt=elf bfd_gas=yes ;; |
6ff87ead | 1521 | # end-sanitize-v850eq |
e7757ad0 KR |
1522 | vax-*-bsd* | vax-*-ultrix*) |
1523 | fmt=aout ;; | |
1524 | vax-*-vms) fmt=vms ;; | |
1525 | ||
1526 | z8k-*-coff | z8k-*-sim) | |
1527 | fmt=coff ;; | |
1528 | ||
1529 | w65-*-*) fmt=coff ;; | |
1530 | ||
1531 | *-*-aout | *-*-scout) | |
1532 | fmt=aout ;; | |
1533 | *-*-nindy*) | |
1534 | fmt=bout ;; | |
1535 | *-*-bsd*) | |
1536 | fmt=aout em=sun3 ;; | |
1537 | *-*-generic) fmt=generic ;; | |
1538 | *-*-xray | *-*-hms) fmt=coff ;; | |
1539 | *-*-sim) fmt=coff ;; | |
1540 | *-*-elf | *-*-sysv4* | *-*-solaris*) | |
6df07e7f | 1541 | echo "configure: warning: GAS support for ${generic_target} is incomplete." 1>&2 |
e7757ad0 KR |
1542 | fmt=elf dev=yes ;; |
1543 | *-*-vxworks) fmt=aout ;; | |
1544 | *-*-netware) fmt=elf ;; | |
1545 | esac | |
1546 | ||
1547 | case ${cpu_type}-${fmt} in | |
df586de2 | 1548 | alpha-*) bfd_gas=yes ;; |
e7757ad0 KR |
1549 | arm-*) bfd_gas=yes ;; |
1550 | # not yet | |
1551 | # i386-aout) bfd_gas=preferred ;; | |
1552 | mips-*) bfd_gas=yes ;; | |
1553 | ns32k-*) bfd_gas=yes ;; | |
1554 | ppc-*) bfd_gas=yes ;; | |
1555 | sparc-*) bfd_gas=yes ;; | |
1556 | *-elf) bfd_gas=yes ;; | |
1557 | *-ecoff) bfd_gas=yes ;; | |
1558 | *-som) bfd_gas=yes ;; | |
1559 | *) ;; | |
1560 | esac | |
1561 | ||
5f757edc ILT |
1562 | # Other random stuff. |
1563 | ||
ae09d880 ILT |
1564 | # do we need the opcodes library? |
1565 | case ${cpu_type} in | |
df586de2 | 1566 | vax | i386) |
7c2fadd1 ILT |
1567 | ;; |
1568 | *) | |
1569 | need_opcodes=yes | |
159e6ef8 | 1570 | if test "${shared_opcodes}" = "true"; then |
7c2fadd1 ILT |
1571 | # A shared libopcodes must be linked against libbfd. |
1572 | need_bfd=yes | |
1573 | fi | |
1574 | ;; | |
ae09d880 ILT |
1575 | esac |
1576 | ||
6df07e7f DE |
1577 | test -n "$want_sparc_v9" && cat >> confdefs.h <<\EOF |
1578 | #define SPARC_V9 1 | |
5f757edc ILT |
1579 | EOF |
1580 | ||
1581 | ||
6df07e7f DE |
1582 | case ${cpu}-${vendor}-${os} in |
1583 | sparc64-*-elf*) cat >> confdefs.h <<\EOF | |
1584 | #define SPARC_ARCH64 1 | |
1585 | EOF | |
1586 | ;; | |
1587 | esac | |
1588 | ||
5f757edc | 1589 | case ${cpu_type} in |
374bdac7 DE |
1590 | m32r) |
1591 | case ${extra_objects} in | |
1592 | *cgen.o*) ;; | |
1593 | *) extra_objects="$extra_objects cgen.o" | |
374bdac7 DE |
1594 | cat >> confdefs.h <<\EOF |
1595 | #define USING_CGEN 1 | |
1596 | EOF | |
1597 | ||
1598 | ;; | |
1599 | esac | |
1600 | ;; | |
1601 | ||
1c9dbb83 ILT |
1602 | m68k) |
1603 | case ${extra_objects} in | |
1604 | *m68k-parse.o*) ;; | |
1605 | *) extra_objects="$extra_objects m68k-parse.o" ;; | |
1606 | esac | |
1607 | ;; | |
efec4a28 DP |
1608 | |
1609 | mips) | |
1610 | echo ${extra_objects} | grep -s "itbl-parse.o" | |
1611 | if test $? -ne 0 ; then | |
515c7142 | 1612 | extra_objects="$extra_objects itbl-parse.o" |
efec4a28 DP |
1613 | fi |
1614 | ||
1615 | echo ${extra_objects} | grep -s "itbl-lex.o" | |
1616 | if test $? -ne 0 ; then | |
515c7142 | 1617 | extra_objects="$extra_objects itbl-lex.o" |
efec4a28 DP |
1618 | fi |
1619 | ||
1620 | echo ${extra_objects} | grep -s "itbl-ops.o" | |
1621 | if test $? -ne 0 ; then | |
515c7142 | 1622 | extra_objects="$extra_objects itbl-ops.o" |
efec4a28 DP |
1623 | fi |
1624 | ;; | |
1625 | ||
1626 | *) | |
1627 | ;; | |
5f757edc ILT |
1628 | esac |
1629 | ||
e7757ad0 KR |
1630 | # See if we really can support this configuration with the emulation code. |
1631 | ||
1632 | if test $this_target = $target ; then | |
1633 | primary_bfd_gas=$bfd_gas | |
1634 | obj_format=$fmt | |
e7757ad0 KR |
1635 | te_file=$em |
1636 | ||
1637 | if test $bfd_gas = no ; then | |
1638 | # Can't support other configurations this way. | |
1639 | break | |
1640 | fi | |
1641 | elif test $bfd_gas = no ; then | |
1642 | # Can't support this configuration. | |
1643 | break | |
1644 | fi | |
1645 | ||
1646 | # From target name and format, produce a list of supported emulations. | |
1647 | ||
1648 | case ${generic_target}-${fmt} in | |
1cb0d00d | 1649 | mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;; |
515c7142 ILT |
1650 | mips-*-linux*-*) case "$endian" in |
1651 | big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;; | |
1652 | *) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;; | |
1653 | esac ;; | |
1654 | mips-*-lnews*-ecoff) ;; | |
e7757ad0 | 1655 | mips-*-*-ecoff) case "$endian" in |
1cb0d00d KR |
1656 | big) emulation="mipsbecoff mipslecoff mipsecoff" ;; |
1657 | *) emulation="mipslecoff mipsbecoff mipsecoff" ;; | |
e7757ad0 KR |
1658 | esac ;; |
1659 | mips-*-*-elf) case "$endian" in | |
1cb0d00d KR |
1660 | big) emulation="mipsbelf mipslelf mipself" ;; |
1661 | *) emulation="mipslelf mipsbelf mipself" ;; | |
515c7142 ILT |
1662 | # Uncommenting the next line will turn on support for i386 COFF |
1663 | # in any i386 ELF configuration. This probably doesn't work | |
1664 | # correctly. | |
1665 | # i386-*-*-elf) emulation="i386coff i386elf" ;; | |
e7757ad0 KR |
1666 | esac ;; |
1667 | esac | |
1668 | ||
1669 | emulations="$emulations $emulation" | |
1670 | ||
e7757ad0 | 1671 | done |
b11fb939 KR |
1672 | |
1673 | # Assign floating point type. Most processors with FP support | |
1674 | # IEEE FP. On those that don't support FP at all, usually IEEE | |
1675 | # is emulated. | |
1676 | case ${target_cpu} in | |
1677 | vax | tahoe ) atof=${target_cpu} ;; | |
e7757ad0 | 1678 | *) atof=ieee ;; |
b11fb939 KR |
1679 | esac |
1680 | ||
1681 | case "${obj_format}" in | |
ba49e48d | 1682 | "") { echo "configure: error: GAS does not know what format to use for target ${target}" 1>&2; exit 1; } ;; |
b11fb939 KR |
1683 | esac |
1684 | ||
1685 | ||
bf4bd1fc ILT |
1686 | if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then |
1687 | { echo "configure: error: GAS does not support target CPU ${target_cpu_type}" 1>&2; exit 1; } | |
b11fb939 KR |
1688 | fi |
1689 | ||
fb589130 | 1690 | if test ! -r ${srcdir}/config/obj-${obj_format}.c; then |
ba49e48d | 1691 | { echo "configure: error: GAS does not have support for object file format ${obj_format}" 1>&2; exit 1; } |
b11fb939 KR |
1692 | fi |
1693 | ||
e7757ad0 | 1694 | case ${user_bfd_gas}-${primary_bfd_gas} in |
b11fb939 KR |
1695 | yes-yes | no-no) |
1696 | # We didn't override user's choice. | |
1697 | ;; | |
1698 | no-yes) | |
1699 | echo "configure: warning: Use of BFD is required for ${target}; overriding config options." 1>&2 | |
1700 | ;; | |
1701 | no-preferred) | |
e7757ad0 | 1702 | primary_bfd_gas=no |
b11fb939 KR |
1703 | ;; |
1704 | *-preferred) | |
e7757ad0 | 1705 | primary_bfd_gas=yes |
b11fb939 | 1706 | ;; |
ba49e48d | 1707 | yes-*) |
e7757ad0 | 1708 | primary_bfd_gas=yes |
ba49e48d | 1709 | ;; |
b11fb939 KR |
1710 | -*) |
1711 | # User specified nothing. | |
1712 | ;; | |
1713 | esac | |
1714 | ||
e7757ad0 KR |
1715 | # Some COFF configurations want these random other flags set. |
1716 | case ${obj_format} in | |
1717 | coff) | |
1718 | case ${target_cpu_type} in | |
1719 | i386) cat >> confdefs.h <<\EOF | |
1720 | #define I386COFF 1 | |
1721 | EOF | |
1722 | ;; | |
1723 | m68k) cat >> confdefs.h <<\EOF | |
1724 | #define M68KCOFF 1 | |
1725 | EOF | |
1726 | ;; | |
1727 | m88k) cat >> confdefs.h <<\EOF | |
1728 | #define M88KCOFF 1 | |
1729 | EOF | |
1730 | ;; | |
1731 | esac | |
1732 | ;; | |
1733 | esac | |
1734 | ||
1735 | # Getting this done right is going to be a bitch. Each configuration specified | |
1736 | # with --enable-targets=... should be checked for environment, format, cpu, and | |
1737 | # bfd_gas setting. | |
1738 | # | |
1739 | # For each configuration, the necessary object file support code must be linked | |
1740 | # in. This might be only one, it might be up to four. The necessary emulation | |
1741 | # code needs to be provided, too. | |
1742 | # | |
1743 | # And then there's "--enable-targets=all".... | |
1744 | # | |
1745 | # For now, just always do it for MIPS ELF or ECOFF configurations. Sigh. | |
1746 | ||
1747 | formats="${obj_format}" | |
1748 | emfiles="" | |
1749 | EMULATIONS="" | |
1750 | _gas_uniq_list="$emulations" | |
1751 | _gas_uniq_newlist="" | |
1752 | for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do | |
1753 | case $_gas_uniq_i in | |
1754 | _gas_uniq_dummy) ;; | |
1755 | *) case " $_gas_uniq_newlist " in | |
1756 | *" $_gas_uniq_i "*) ;; | |
1757 | *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;; | |
1758 | esac ;; | |
1759 | esac | |
1760 | done | |
1761 | emulations=$_gas_uniq_newlist | |
1762 | ||
1763 | for em in . $emulations ; do | |
1764 | case $em in | |
1765 | .) continue ;; | |
1766 | mipsbelf | mipslelf) | |
1767 | fmt=elf file=mipself ;; | |
1768 | mipsbecoff | mipslecoff) | |
1769 | fmt=ecoff file=mipsecoff ;; | |
515c7142 ILT |
1770 | i386coff) |
1771 | fmt=coff file=i386coff ;; | |
1772 | i386elf) | |
1773 | fmt=elf file=i386elf ;; | |
e7757ad0 KR |
1774 | esac |
1775 | formats="$formats $fmt" | |
1776 | emfiles="$emfiles e-$file.o" | |
1777 | EMULATIONS="$EMULATIONS &$em," | |
1778 | done | |
1779 | _gas_uniq_list="$formats" | |
1780 | _gas_uniq_newlist="" | |
1781 | for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do | |
1782 | case $_gas_uniq_i in | |
1783 | _gas_uniq_dummy) ;; | |
1784 | *) case " $_gas_uniq_newlist " in | |
1785 | *" $_gas_uniq_i "*) ;; | |
1786 | *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;; | |
1787 | esac ;; | |
1788 | esac | |
1789 | done | |
1790 | formats=$_gas_uniq_newlist | |
1791 | ||
1792 | _gas_uniq_list="$emfiles" | |
1793 | _gas_uniq_newlist="" | |
1794 | for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do | |
1795 | case $_gas_uniq_i in | |
1796 | _gas_uniq_dummy) ;; | |
1797 | *) case " $_gas_uniq_newlist " in | |
1798 | *" $_gas_uniq_i "*) ;; | |
1799 | *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;; | |
1800 | esac ;; | |
1801 | esac | |
1802 | done | |
1803 | emfiles=$_gas_uniq_newlist | |
1804 | ||
1805 | if test `set . $formats ; shift ; echo $#` -gt 1 ; then | |
1806 | for fmt in $formats ; do | |
1807 | case $fmt in | |
1808 | aout) cat >> confdefs.h <<\EOF | |
1809 | #define OBJ_MAYBE_AOUT 1 | |
1810 | EOF | |
1811 | ;; | |
1812 | bout) cat >> confdefs.h <<\EOF | |
1813 | #define OBJ_MAYBE_BOUT 1 | |
1814 | EOF | |
1815 | ;; | |
1816 | coff) cat >> confdefs.h <<\EOF | |
1817 | #define OBJ_MAYBE_COFF 1 | |
1818 | EOF | |
1819 | ;; | |
1820 | ecoff) cat >> confdefs.h <<\EOF | |
1821 | #define OBJ_MAYBE_ECOFF 1 | |
1822 | EOF | |
1823 | ;; | |
1824 | elf) cat >> confdefs.h <<\EOF | |
1825 | #define OBJ_MAYBE_ELF 1 | |
1826 | EOF | |
1827 | ;; | |
1828 | generic) cat >> confdefs.h <<\EOF | |
1829 | #define OBJ_MAYBE_GENERIC 1 | |
1830 | EOF | |
1831 | ;; | |
1832 | hp300) cat >> confdefs.h <<\EOF | |
1833 | #define OBJ_MAYBE_HP300 1 | |
1834 | EOF | |
1835 | ;; | |
1836 | ieee) cat >> confdefs.h <<\EOF | |
1837 | #define OBJ_MAYBE_IEEE 1 | |
1838 | EOF | |
1839 | ;; | |
1840 | som) cat >> confdefs.h <<\EOF | |
1841 | #define OBJ_MAYBE_SOM 1 | |
1842 | EOF | |
1843 | ;; | |
1844 | vms) cat >> confdefs.h <<\EOF | |
1845 | #define OBJ_MAYBE_VMS 1 | |
1846 | EOF | |
1847 | ;; | |
1848 | esac | |
1849 | extra_objects="$extra_objects obj-$fmt.o" | |
1850 | done | |
1851 | obj_format=multi | |
1852 | fi | |
1853 | if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then | |
1854 | te_file=multi | |
1855 | extra_objects="$extra_objects $emfiles" | |
1856 | DEFAULT_EMULATION=`set . $emulations ; echo $2` | |
1857 | cat >> confdefs.h <<\EOF | |
1858 | #define USE_EMULATIONS 1 | |
1859 | EOF | |
1860 | ||
1861 | fi | |
1862 | ||
1863 | cat >> confdefs.h <<EOF | |
1864 | #define EMULATIONS $EMULATIONS | |
1865 | EOF | |
1866 | ||
1867 | cat >> confdefs.h <<EOF | |
1868 | #define DEFAULT_EMULATION "$DEFAULT_EMULATION" | |
1869 | EOF | |
1870 | ||
1871 | ||
bf4bd1fc | 1872 | case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in |
318b02b6 KR |
1873 | yes-*-coff) need_bfd=yes ;; |
1874 | no-*-coff) need_bfd=yes | |
1875 | cat >> confdefs.h <<\EOF | |
1876 | #define MANY_SEGMENTS 1 | |
1877 | EOF | |
1878 | ;; | |
1879 | esac | |
1880 | ||
b11fb939 KR |
1881 | reject_dev_configs=yes |
1882 | ||
1883 | case ${reject_dev_configs}-${dev} in | |
1884 | yes-yes) # Oops. | |
ba49e48d | 1885 | { echo "configure: error: GAS does not support the ${generic_target} configuration." 1>&2; exit 1; } |
b11fb939 KR |
1886 | ;; |
1887 | esac | |
1888 | ||
b11fb939 KR |
1889 | |
1890 | ||
833c46e1 KR |
1891 | |
1892 | ||
1893 | ||
e7757ad0 | 1894 | case "${primary_bfd_gas}" in |
b11fb939 KR |
1895 | yes) cat >> confdefs.h <<\EOF |
1896 | #define BFD_ASSEMBLER 1 | |
1897 | EOF | |
1898 | ||
1899 | need_bfd=yes ;; | |
1900 | esac | |
1901 | ||
ae09d880 ILT |
1902 | # do we need the opcodes library? |
1903 | case "${need_opcodes}" in | |
7be9a312 | 1904 | yes) |
e2b4bd2a | 1905 | OPCODES_LIB=../opcodes/libopcodes.la |
7be9a312 | 1906 | ;; |
ae09d880 ILT |
1907 | esac |
1908 | ||
b11fb939 | 1909 | case "${need_bfd}" in |
7be9a312 | 1910 | yes) |
e2b4bd2a | 1911 | BFDLIB=../bfd/libbfd.la |
7be9a312 | 1912 | ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h" |
7be9a312 | 1913 | ;; |
b11fb939 KR |
1914 | esac |
1915 | ||
1916 | ||
1917 | ||
1c9dbb83 | 1918 | |
2e013bb7 ILT |
1919 | |
1920 | ||
b11fb939 KR |
1921 | cat >> confdefs.h <<EOF |
1922 | #define TARGET_ALIAS "${target_alias}" | |
1923 | EOF | |
1924 | ||
1925 | cat >> confdefs.h <<EOF | |
1926 | #define TARGET_CANONICAL "${target}" | |
1927 | EOF | |
1928 | ||
1929 | cat >> confdefs.h <<EOF | |
1930 | #define TARGET_CPU "${target_cpu}" | |
1931 | EOF | |
1932 | ||
1933 | cat >> confdefs.h <<EOF | |
1934 | #define TARGET_VENDOR "${target_vendor}" | |
1935 | EOF | |
1936 | ||
1937 | cat >> confdefs.h <<EOF | |
1938 | #define TARGET_OS "${target_os}" | |
1939 | EOF | |
1940 | ||
1941 | ||
330add8a ILT |
1942 | # Extract the first word of "gcc", so it can be a program name with args. |
1943 | set dummy gcc; ac_word=$2 | |
1944 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
53bdc990 | 1945 | echo "configure:1945: checking for $ac_word" >&5 |
330add8a ILT |
1946 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1947 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1948 | else | |
1949 | if test -n "$CC"; then | |
1950 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1951 | else | |
1952 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1953 | for ac_dir in $PATH; do | |
1954 | test -z "$ac_dir" && ac_dir=. | |
1955 | if test -f $ac_dir/$ac_word; then | |
1956 | ac_cv_prog_CC="gcc" | |
1957 | break | |
1958 | fi | |
1959 | done | |
1960 | IFS="$ac_save_ifs" | |
330add8a ILT |
1961 | fi |
1962 | fi | |
1963 | CC="$ac_cv_prog_CC" | |
1964 | if test -n "$CC"; then | |
1965 | echo "$ac_t""$CC" 1>&6 | |
1966 | else | |
1967 | echo "$ac_t""no" 1>&6 | |
1968 | fi | |
1969 | ||
d0352cbb DE |
1970 | if test -z "$CC"; then |
1971 | # Extract the first word of "cc", so it can be a program name with args. | |
1972 | set dummy cc; ac_word=$2 | |
1973 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
53bdc990 | 1974 | echo "configure:1974: checking for $ac_word" >&5 |
d0352cbb DE |
1975 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1976 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1977 | else | |
1978 | if test -n "$CC"; then | |
1979 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1980 | else | |
1981 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1982 | ac_prog_rejected=no | |
1983 | for ac_dir in $PATH; do | |
1984 | test -z "$ac_dir" && ac_dir=. | |
1985 | if test -f $ac_dir/$ac_word; then | |
1986 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
1987 | ac_prog_rejected=yes | |
1988 | continue | |
1989 | fi | |
1990 | ac_cv_prog_CC="cc" | |
1991 | break | |
1992 | fi | |
1993 | done | |
1994 | IFS="$ac_save_ifs" | |
1995 | if test $ac_prog_rejected = yes; then | |
1996 | # We found a bogon in the path, so make sure we never use it. | |
1997 | set dummy $ac_cv_prog_CC | |
1998 | shift | |
1999 | if test $# -gt 0; then | |
2000 | # We chose a different compiler from the bogus one. | |
2001 | # However, it has the same basename, so the bogon will be chosen | |
2002 | # first if we set CC to just the basename; use the full file name. | |
2003 | shift | |
2004 | set dummy "$ac_dir/$ac_word" "$@" | |
2005 | shift | |
2006 | ac_cv_prog_CC="$@" | |
2007 | fi | |
2008 | fi | |
2009 | fi | |
2010 | fi | |
2011 | CC="$ac_cv_prog_CC" | |
2012 | if test -n "$CC"; then | |
2013 | echo "$ac_t""$CC" 1>&6 | |
2014 | else | |
2015 | echo "$ac_t""no" 1>&6 | |
2016 | fi | |
2017 | ||
2018 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
2019 | fi | |
b11fb939 | 2020 | |
c6c7035c | 2021 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
53bdc990 | 2022 | echo "configure:2022: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
c6c7035c MM |
2023 | |
2024 | ac_ext=c | |
2025 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2026 | ac_cpp='$CPP $CPPFLAGS' | |
2027 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2028 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2029 | cross_compiling=$ac_cv_prog_cc_cross | |
2030 | ||
2031 | cat > conftest.$ac_ext <<EOF | |
53bdc990 | 2032 | #line 2032 "configure" |
c6c7035c MM |
2033 | #include "confdefs.h" |
2034 | main(){return(0);} | |
2035 | EOF | |
53bdc990 | 2036 | if { (eval echo configure:2036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
c6c7035c MM |
2037 | ac_cv_prog_cc_works=yes |
2038 | # If we can't run a trivial program, we are probably using a cross compiler. | |
2039 | if (./conftest; exit) 2>/dev/null; then | |
2040 | ac_cv_prog_cc_cross=no | |
2041 | else | |
2042 | ac_cv_prog_cc_cross=yes | |
2043 | fi | |
2044 | else | |
2045 | echo "configure: failed program was:" >&5 | |
2046 | cat conftest.$ac_ext >&5 | |
2047 | ac_cv_prog_cc_works=no | |
2048 | fi | |
2049 | rm -fr conftest* | |
2050 | ||
2051 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
2052 | if test $ac_cv_prog_cc_works = no; then | |
2053 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
2054 | fi | |
2055 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
53bdc990 | 2056 | echo "configure:2056: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
c6c7035c MM |
2057 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
2058 | cross_compiling=$ac_cv_prog_cc_cross | |
2059 | ||
330add8a | 2060 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
53bdc990 | 2061 | echo "configure:2061: checking whether we are using GNU C" >&5 |
330add8a ILT |
2062 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
2063 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2064 | else | |
2065 | cat > conftest.c <<EOF | |
b11fb939 | 2066 | #ifdef __GNUC__ |
330add8a | 2067 | yes; |
b11fb939 KR |
2068 | #endif |
2069 | EOF | |
53bdc990 | 2070 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
330add8a ILT |
2071 | ac_cv_prog_gcc=yes |
2072 | else | |
2073 | ac_cv_prog_gcc=no | |
2074 | fi | |
2075 | fi | |
1c9dbb83 | 2076 | |
330add8a | 2077 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
c6c7035c | 2078 | |
330add8a | 2079 | if test $ac_cv_prog_gcc = yes; then |
b11fb939 | 2080 | GCC=yes |
c6c7035c MM |
2081 | ac_test_CFLAGS="${CFLAGS+set}" |
2082 | ac_save_CFLAGS="$CFLAGS" | |
2083 | CFLAGS= | |
2084 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
53bdc990 | 2085 | echo "configure:2085: checking whether ${CC-cc} accepts -g" >&5 |
c6c7035c | 2086 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
330add8a | 2087 | echo $ac_n "(cached) $ac_c" 1>&6 |
b11fb939 | 2088 | else |
330add8a ILT |
2089 | echo 'void f(){}' > conftest.c |
2090 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
c6c7035c | 2091 | ac_cv_prog_cc_g=yes |
330add8a | 2092 | else |
c6c7035c | 2093 | ac_cv_prog_cc_g=no |
b11fb939 KR |
2094 | fi |
2095 | rm -f conftest* | |
2096 | ||
330add8a | 2097 | fi |
1c9dbb83 | 2098 | |
c6c7035c MM |
2099 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
2100 | if test "$ac_test_CFLAGS" = set; then | |
2101 | CFLAGS="$ac_save_CFLAGS" | |
2102 | elif test $ac_cv_prog_cc_g = yes; then | |
2103 | CFLAGS="-g -O2" | |
2104 | else | |
2105 | CFLAGS="-O2" | |
330add8a ILT |
2106 | fi |
2107 | else | |
2108 | GCC= | |
2109 | test "${CFLAGS+set}" = set || CFLAGS="-g" | |
2110 | fi | |
2111 | ||
bf111c9f KR |
2112 | # Find a good install program. We prefer a C program (faster), |
2113 | # so one script is as good as another. But avoid the broken or | |
2114 | # incompatible versions: | |
b11fb939 KR |
2115 | # SysV /etc/install, /usr/sbin/install |
2116 | # SunOS /usr/etc/install | |
2117 | # IRIX /sbin/install | |
2118 | # AIX /bin/install | |
2119 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2120 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2121 | # ./install, which can be erroneously created by make from ./install.sh. | |
833c46e1 | 2122 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
53bdc990 | 2123 | echo "configure:2123: checking for a BSD compatible install" >&5 |
28d3e4a3 | 2124 | if test -z "$INSTALL"; then |
833c46e1 KR |
2125 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
2126 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b11fb939 | 2127 | else |
c6c7035c | 2128 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" |
b11fb939 | 2129 | for ac_dir in $PATH; do |
833c46e1 KR |
2130 | # Account for people who put trailing slashes in PATH elements. |
2131 | case "$ac_dir/" in | |
2132 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
b11fb939 KR |
2133 | *) |
2134 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2135 | for ac_prog in ginstall installbsd scoinst install; do | |
2136 | if test -f $ac_dir/$ac_prog; then | |
2137 | if test $ac_prog = install && | |
2138 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
2139 | # AIX install. It has an incompatible calling convention. | |
2140 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
2141 | : | |
2142 | else | |
2143 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
2144 | break 2 | |
2145 | fi | |
2146 | fi | |
2147 | done | |
2148 | ;; | |
2149 | esac | |
2150 | done | |
c6c7035c | 2151 | IFS="$ac_save_IFS" |
1c9dbb83 | 2152 | |
b11fb939 | 2153 | fi |
1c9dbb83 ILT |
2154 | if test "${ac_cv_path_install+set}" = set; then |
2155 | INSTALL="$ac_cv_path_install" | |
2156 | else | |
2157 | # As a last resort, use the slow shell script. We don't cache a | |
2158 | # path for INSTALL within a source directory, because that will | |
2159 | # break other packages using the cache if that directory is | |
2160 | # removed, or if the path is relative. | |
2161 | INSTALL="$ac_install_sh" | |
2162 | fi | |
b11fb939 | 2163 | fi |
833c46e1 | 2164 | echo "$ac_t""$INSTALL" 1>&6 |
b11fb939 KR |
2165 | |
2166 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
2167 | # It thinks the first close brace ends the variable substitution. | |
2168 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
2169 | ||
2170 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
2171 | ||
2172 | ||
e2b4bd2a ILT |
2173 | for ac_prog in 'bison -y' byacc |
2174 | do | |
2175 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2176 | set dummy $ac_prog; ac_word=$2 | |
2177 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
53bdc990 | 2178 | echo "configure:2178: checking for $ac_word" >&5 |
e2b4bd2a ILT |
2179 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
2180 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2181 | else | |
2182 | if test -n "$YACC"; then | |
2183 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
2184 | else | |
2185 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2186 | for ac_dir in $PATH; do | |
2187 | test -z "$ac_dir" && ac_dir=. | |
2188 | if test -f $ac_dir/$ac_word; then | |
2189 | ac_cv_prog_YACC="$ac_prog" | |
2190 | break | |
2191 | fi | |
2192 | done | |
2193 | IFS="$ac_save_ifs" | |
2194 | fi | |
2195 | fi | |
2196 | YACC="$ac_cv_prog_YACC" | |
2197 | if test -n "$YACC"; then | |
2198 | echo "$ac_t""$YACC" 1>&6 | |
2199 | else | |
2200 | echo "$ac_t""no" 1>&6 | |
2201 | fi | |
2202 | ||
2203 | test -n "$YACC" && break | |
2204 | done | |
2205 | test -n "$YACC" || YACC="yacc" | |
2206 | ||
2207 | # Extract the first word of "flex", so it can be a program name with args. | |
2208 | set dummy flex; ac_word=$2 | |
2209 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
53bdc990 | 2210 | echo "configure:2210: checking for $ac_word" >&5 |
e2b4bd2a ILT |
2211 | if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then |
2212 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2213 | else | |
2214 | if test -n "$LEX"; then | |
2215 | ac_cv_prog_LEX="$LEX" # Let the user override the test. | |
2216 | else | |
2217 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2218 | for ac_dir in $PATH; do | |
2219 | test -z "$ac_dir" && ac_dir=. | |
2220 | if test -f $ac_dir/$ac_word; then | |
2221 | ac_cv_prog_LEX="flex" | |
2222 | break | |
2223 | fi | |
2224 | done | |
2225 | IFS="$ac_save_ifs" | |
2226 | test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex" | |
2227 | fi | |
2228 | fi | |
2229 | LEX="$ac_cv_prog_LEX" | |
2230 | if test -n "$LEX"; then | |
2231 | echo "$ac_t""$LEX" 1>&6 | |
2232 | else | |
2233 | echo "$ac_t""no" 1>&6 | |
2234 | fi | |
2235 | ||
2236 | if test -z "$LEXLIB" | |
2237 | then | |
2238 | case "$LEX" in | |
2239 | flex*) ac_lib=fl ;; | |
2240 | *) ac_lib=l ;; | |
2241 | esac | |
2242 | echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 | |
53bdc990 | 2243 | echo "configure:2243: checking for yywrap in -l$ac_lib" >&5 |
e2b4bd2a ILT |
2244 | ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` |
2245 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2246 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2247 | else | |
2248 | ac_save_LIBS="$LIBS" | |
2249 | LIBS="-l$ac_lib $LIBS" | |
2250 | cat > conftest.$ac_ext <<EOF | |
53bdc990 | 2251 | #line 2251 "configure" |
e2b4bd2a ILT |
2252 | #include "confdefs.h" |
2253 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2254 | /* We use char because int might match the return type of a gcc2 | |
2255 | builtin and then its argument prototype would still apply. */ | |
2256 | char yywrap(); | |
2257 | ||
2258 | int main() { | |
2259 | yywrap() | |
2260 | ; return 0; } | |
2261 | EOF | |
53bdc990 | 2262 | if { (eval echo configure:2262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
e2b4bd2a ILT |
2263 | rm -rf conftest* |
2264 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2265 | else | |
2266 | echo "configure: failed program was:" >&5 | |
2267 | cat conftest.$ac_ext >&5 | |
2268 | rm -rf conftest* | |
2269 | eval "ac_cv_lib_$ac_lib_var=no" | |
2270 | fi | |
2271 | rm -f conftest* | |
2272 | LIBS="$ac_save_LIBS" | |
2273 | ||
2274 | fi | |
2275 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2276 | echo "$ac_t""yes" 1>&6 | |
2277 | LEXLIB="-l$ac_lib" | |
2278 | else | |
2279 | echo "$ac_t""no" 1>&6 | |
2280 | fi | |
2281 | ||
2282 | fi | |
2283 | ||
833c46e1 | 2284 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
53bdc990 | 2285 | echo "configure:2285: checking how to run the C preprocessor" >&5 |
b11fb939 KR |
2286 | # On Suns, sometimes $CPP names a directory. |
2287 | if test -n "$CPP" && test -d "$CPP"; then | |
2288 | CPP= | |
2289 | fi | |
2290 | if test -z "$CPP"; then | |
833c46e1 KR |
2291 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then |
2292 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b11fb939 KR |
2293 | else |
2294 | # This must be in double quotes, not single quotes, because CPP may get | |
2295 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
2296 | CPP="${CC-cc} -E" | |
2297 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
2298 | # not just through cpp. | |
28d3e4a3 | 2299 | cat > conftest.$ac_ext <<EOF |
53bdc990 | 2300 | #line 2300 "configure" |
b11fb939 | 2301 | #include "confdefs.h" |
f2889110 | 2302 | #include <assert.h> |
b11fb939 KR |
2303 | Syntax Error |
2304 | EOF | |
d0352cbb | 2305 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
53bdc990 | 2306 | { (eval echo configure:2306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
bf111c9f | 2307 | ac_err=`grep -v '^ *+' conftest.out` |
b11fb939 KR |
2308 | if test -z "$ac_err"; then |
2309 | : | |
2310 | else | |
fb589130 | 2311 | echo "$ac_err" >&5 |
c6c7035c MM |
2312 | echo "configure: failed program was:" >&5 |
2313 | cat conftest.$ac_ext >&5 | |
b11fb939 KR |
2314 | rm -rf conftest* |
2315 | CPP="${CC-cc} -E -traditional-cpp" | |
28d3e4a3 | 2316 | cat > conftest.$ac_ext <<EOF |
53bdc990 | 2317 | #line 2317 "configure" |
b11fb939 | 2318 | #include "confdefs.h" |
f2889110 | 2319 | #include <assert.h> |
b11fb939 KR |
2320 | Syntax Error |
2321 | EOF | |
d0352cbb | 2322 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
53bdc990 | 2323 | { (eval echo configure:2323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
bf111c9f | 2324 | ac_err=`grep -v '^ *+' conftest.out` |
b11fb939 KR |
2325 | if test -z "$ac_err"; then |
2326 | : | |
2327 | else | |
fb589130 | 2328 | echo "$ac_err" >&5 |
c6c7035c MM |
2329 | echo "configure: failed program was:" >&5 |
2330 | cat conftest.$ac_ext >&5 | |
b11fb939 KR |
2331 | rm -rf conftest* |
2332 | CPP=/lib/cpp | |
2333 | fi | |
2334 | rm -f conftest* | |
2335 | fi | |
2336 | rm -f conftest* | |
2337 | ac_cv_prog_CPP="$CPP" | |
2338 | fi | |
e63c594d FF |
2339 | CPP="$ac_cv_prog_CPP" |
2340 | else | |
2341 | ac_cv_prog_CPP="$CPP" | |
b11fb939 | 2342 | fi |
833c46e1 | 2343 | echo "$ac_t""$CPP" 1>&6 |
fb589130 | 2344 | |
e2b4bd2a | 2345 | echo $ac_n "checking lex output file root""... $ac_c" 1>&6 |
53bdc990 | 2346 | echo "configure:2346: checking lex output file root" >&5 |
e2b4bd2a | 2347 | if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then |
833c46e1 | 2348 | echo $ac_n "(cached) $ac_c" 1>&6 |
b11fb939 | 2349 | else |
e2b4bd2a ILT |
2350 | # The minimal lex program is just a single line: %%. But some broken lexes |
2351 | # (Solaris, I think it was) want two %% lines, so accommodate them. | |
2352 | echo '%% | |
2353 | %%' | $LEX | |
2354 | if test -f lex.yy.c; then | |
2355 | ac_cv_prog_lex_root=lex.yy | |
2356 | elif test -f lexyy.c; then | |
2357 | ac_cv_prog_lex_root=lexyy | |
2358 | else | |
2359 | { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; } | |
2360 | fi | |
2361 | fi | |
2362 | ||
2363 | echo "$ac_t""$ac_cv_prog_lex_root" 1>&6 | |
2364 | LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root | |
2365 | ||
2366 | echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 | |
53bdc990 | 2367 | echo "configure:2367: checking whether yytext is a pointer" >&5 |
e2b4bd2a ILT |
2368 | if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then |
2369 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2370 | else | |
2371 | # POSIX says lex can declare yytext either as a pointer or an array; the | |
2372 | # default is implementation-dependent. Figure out which it is, since | |
2373 | # not all implementations provide the %pointer and %array declarations. | |
2374 | ac_cv_prog_lex_yytext_pointer=no | |
2375 | echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c | |
2376 | ac_save_LIBS="$LIBS" | |
2377 | LIBS="$LIBS $LEXLIB" | |
2378 | cat > conftest.$ac_ext <<EOF | |
53bdc990 | 2379 | #line 2379 "configure" |
b11fb939 | 2380 | #include "confdefs.h" |
e2b4bd2a ILT |
2381 | `cat $LEX_OUTPUT_ROOT.c` |
2382 | int main() { | |
2383 | ||
2384 | ; return 0; } | |
b11fb939 | 2385 | EOF |
53bdc990 | 2386 | if { (eval echo configure:2386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
b11fb939 | 2387 | rm -rf conftest* |
e2b4bd2a | 2388 | ac_cv_prog_lex_yytext_pointer=yes |
b11fb939 | 2389 | else |
c6c7035c MM |
2390 | echo "configure: failed program was:" >&5 |
2391 | cat conftest.$ac_ext >&5 | |
b11fb939 KR |
2392 | fi |
2393 | rm -f conftest* | |
e2b4bd2a ILT |
2394 | LIBS="$ac_save_LIBS" |
2395 | rm -f "${LEX_OUTPUT_ROOT}.c" | |
2396 | ||
b11fb939 | 2397 | fi |
e2b4bd2a ILT |
2398 | |
2399 | echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6 | |
2400 | if test $ac_cv_prog_lex_yytext_pointer = yes; then | |
2401 | cat >> confdefs.h <<\EOF | |
2402 | #define YYTEXT_POINTER 1 | |
b11fb939 | 2403 | EOF |
e2b4bd2a | 2404 | |
b11fb939 | 2405 | fi |
b11fb939 | 2406 | |
b11fb939 | 2407 | |
e2b4bd2a | 2408 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
53bdc990 | 2409 | echo "configure:2409: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
e2b4bd2a ILT |
2410 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
2411 | if test "${enable_maintainer_mode+set}" = set; then | |
2412 | enableval="$enable_maintainer_mode" | |
2413 | USE_MAINTAINER_MODE=$enableval | |
ba49e48d | 2414 | else |
e2b4bd2a | 2415 | USE_MAINTAINER_MODE=no |
bf111c9f | 2416 | fi |
bf111c9f | 2417 | |
e2b4bd2a ILT |
2418 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 |
2419 | if test $USE_MAINTAINER_MODE = yes; then | |
2420 | MAINT= | |
2421 | else | |
2422 | MAINT='#M#' | |
2423 | fi | |
2424 | ||
2425 | ||
e42b2520 | 2426 | echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6 |
53bdc990 | 2427 | echo "configure:2427: checking for Cygwin32 environment" >&5 |
e42b2520 RS |
2428 | if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then |
2429 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2430 | else | |
2431 | cat > conftest.$ac_ext <<EOF | |
53bdc990 | 2432 | #line 2432 "configure" |
e42b2520 RS |
2433 | #include "confdefs.h" |
2434 | ||
2435 | int main() { | |
2436 | int main () { return __CYGWIN32__; } | |
2437 | ; return 0; } | |
2438 | EOF | |
53bdc990 | 2439 | if { (eval echo configure:2439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
e42b2520 RS |
2440 | rm -rf conftest* |
2441 | am_cv_cygwin32=yes | |
2442 | else | |
2443 | echo "configure: failed program was:" >&5 | |
2444 | cat conftest.$ac_ext >&5 | |
2445 | rm -rf conftest* | |
2446 | am_cv_cygwin32=no | |
2447 | fi | |
2448 | rm -f conftest* | |
2449 | rm -f conftest* | |
2450 | fi | |
2451 | ||
2452 | echo "$ac_t""$am_cv_cygwin32" 1>&6 | |
2453 | CYGWIN32= | |
2454 | test "$am_cv_cygwin32" = yes && CYGWIN32=yes | |
e2b4bd2a | 2455 | |
e42b2520 | 2456 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 |
53bdc990 | 2457 | echo "configure:2457: checking for executable suffix" >&5 |
e42b2520 RS |
2458 | if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then |
2459 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2460 | else | |
2461 | if test "$CYGWIN32" = yes; then | |
2462 | am_cv_exeext=.exe | |
2463 | else | |
2464 | cat > am_c_test.c << 'EOF' | |
2465 | int main() { | |
2466 | /* Nothing needed here */ | |
2467 | } | |
2468 | EOF | |
2469 | ${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5 | |
e2b4bd2a | 2470 | am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//` |
e42b2520 RS |
2471 | rm -f am_c_test* |
2472 | fi | |
2473 | ||
2474 | test x"${am_cv_exeext}" = x && am_cv_exeext=no | |
2475 | fi | |
2476 | EXEEXT="" | |
2477 | test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext} | |
2478 | echo "$ac_t""${am_cv_exeext}" 1>&6 | |
2479 | ||
2480 | ||
e2b4bd2a ILT |
2481 | for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h |
2482 | do | |
2483 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2484 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
53bdc990 | 2485 | echo "configure:2485: checking for $ac_hdr" >&5 |
e2b4bd2a ILT |
2486 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2487 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2488 | else | |
2489 | cat > conftest.$ac_ext <<EOF | |
53bdc990 | 2490 | #line 2490 "configure" |
e2b4bd2a ILT |
2491 | #include "confdefs.h" |
2492 | #include <$ac_hdr> | |
2493 | EOF | |
2494 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
53bdc990 | 2495 | { (eval echo configure:2495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
e2b4bd2a ILT |
2496 | ac_err=`grep -v '^ *+' conftest.out` |
2497 | if test -z "$ac_err"; then | |
2498 | rm -rf conftest* | |
2499 | eval "ac_cv_header_$ac_safe=yes" | |
2500 | else | |
2501 | echo "$ac_err" >&5 | |
2502 | echo "configure: failed program was:" >&5 | |
2503 | cat conftest.$ac_ext >&5 | |
2504 | rm -rf conftest* | |
2505 | eval "ac_cv_header_$ac_safe=no" | |
2506 | fi | |
2507 | rm -f conftest* | |
2508 | fi | |
2509 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2510 | echo "$ac_t""yes" 1>&6 | |
2511 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2512 | cat >> confdefs.h <<EOF | |
2513 | #define $ac_tr_hdr 1 | |
2514 | EOF | |
2515 | ||
2516 | else | |
2517 | echo "$ac_t""no" 1>&6 | |
2518 | fi | |
2519 | done | |
2520 | ||
2521 | ||
2522 | # Put this here so that autoconf's "cross-compiling" message doesn't confuse | |
2523 | # people who are not cross-compiling but are compiling cross-assemblers. | |
2524 | echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6 | |
53bdc990 | 2525 | echo "configure:2525: checking whether compiling a cross-assembler" >&5 |
e2b4bd2a ILT |
2526 | if test "${host}" = "${target}"; then |
2527 | cross_gas=no | |
2528 | else | |
2529 | cross_gas=yes | |
2530 | cat >> confdefs.h <<\EOF | |
2531 | #define CROSS_COMPILE 1 | |
2532 | EOF | |
2533 | ||
2534 | fi | |
2535 | echo "$ac_t""$cross_gas" 1>&6 | |
2536 | ||
b11fb939 KR |
2537 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
2538 | # for constant arguments. Useless! | |
833c46e1 | 2539 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 |
53bdc990 | 2540 | echo "configure:2540: checking for working alloca.h" >&5 |
833c46e1 KR |
2541 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
2542 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b11fb939 | 2543 | else |
28d3e4a3 | 2544 | cat > conftest.$ac_ext <<EOF |
53bdc990 | 2545 | #line 2545 "configure" |
b11fb939 KR |
2546 | #include "confdefs.h" |
2547 | #include <alloca.h> | |
c6c7035c | 2548 | int main() { |
b11fb939 KR |
2549 | char *p = alloca(2 * sizeof(int)); |
2550 | ; return 0; } | |
2551 | EOF | |
53bdc990 | 2552 | if { (eval echo configure:2552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
b11fb939 KR |
2553 | rm -rf conftest* |
2554 | ac_cv_header_alloca_h=yes | |
2555 | else | |
c6c7035c MM |
2556 | echo "configure: failed program was:" >&5 |
2557 | cat conftest.$ac_ext >&5 | |
b11fb939 KR |
2558 | rm -rf conftest* |
2559 | ac_cv_header_alloca_h=no | |
2560 | fi | |
2561 | rm -f conftest* | |
b11fb939 | 2562 | fi |
1c9dbb83 | 2563 | |
833c46e1 | 2564 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 |
b11fb939 KR |
2565 | if test $ac_cv_header_alloca_h = yes; then |
2566 | cat >> confdefs.h <<\EOF | |
2567 | #define HAVE_ALLOCA_H 1 | |
2568 | EOF | |
2569 | ||
2570 | fi | |
2571 | ||
833c46e1 | 2572 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 |
53bdc990 | 2573 | echo "configure:2573: checking for alloca" >&5 |
c6c7035c | 2574 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
833c46e1 | 2575 | echo $ac_n "(cached) $ac_c" 1>&6 |
b11fb939 | 2576 | else |
28d3e4a3 | 2577 | cat > conftest.$ac_ext <<EOF |
53bdc990 | 2578 | #line 2578 "configure" |
b11fb939 KR |
2579 | #include "confdefs.h" |
2580 | ||
2581 | #ifdef __GNUC__ | |
2582 | # define alloca __builtin_alloca | |
2583 | #else | |
2584 | # if HAVE_ALLOCA_H | |
2585 | # include <alloca.h> | |
2586 | # else | |
2587 | # ifdef _AIX | |
2588 | #pragma alloca | |
2589 | # else | |
2590 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
2591 | char *alloca (); | |
2592 | # endif | |
2593 | # endif | |
2594 | # endif | |
2595 | #endif | |
2596 | ||
c6c7035c | 2597 | int main() { |
b11fb939 KR |
2598 | char *p = (char *) alloca(1); |
2599 | ; return 0; } | |
2600 | EOF | |
53bdc990 | 2601 | if { (eval echo configure:2601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
b11fb939 | 2602 | rm -rf conftest* |
c6c7035c | 2603 | ac_cv_func_alloca_works=yes |
b11fb939 | 2604 | else |
c6c7035c MM |
2605 | echo "configure: failed program was:" >&5 |
2606 | cat conftest.$ac_ext >&5 | |
b11fb939 | 2607 | rm -rf conftest* |
c6c7035c | 2608 | ac_cv_func_alloca_works=no |
b11fb939 KR |
2609 | fi |
2610 | rm -f conftest* | |
b11fb939 | 2611 | fi |
1c9dbb83 | 2612 | |
c6c7035c MM |
2613 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 |
2614 | if test $ac_cv_func_alloca_works = yes; then | |
b11fb939 KR |
2615 | cat >> confdefs.h <<\EOF |
2616 | #define HAVE_ALLOCA 1 | |
2617 | EOF | |
2618 | ||
2619 | fi | |
2620 | ||
c6c7035c | 2621 | if test $ac_cv_func_alloca_works = no; then |
b11fb939 KR |
2622 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions |
2623 | # that cause trouble. Some versions do not even contain alloca or | |
2624 | # contain a buggy version. If you still want to use their alloca, | |
2625 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
2626 | ALLOCA=alloca.o | |
2627 | cat >> confdefs.h <<\EOF | |
2628 | #define C_ALLOCA 1 | |
2629 | EOF | |
2630 | ||
2631 | ||
833c46e1 | 2632 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 |
53bdc990 | 2633 | echo "configure:2633: checking whether alloca needs Cray hooks" >&5 |
833c46e1 KR |
2634 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
2635 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b11fb939 | 2636 | else |
28d3e4a3 | 2637 | cat > conftest.$ac_ext <<EOF |
53bdc990 | 2638 | #line 2638 "configure" |
b11fb939 KR |
2639 | #include "confdefs.h" |
2640 | #if defined(CRAY) && ! defined(CRAY2) | |
2641 | webecray | |
2642 | #else | |
2643 | wenotbecray | |
2644 | #endif | |
2645 | ||
2646 | EOF | |
28d3e4a3 | 2647 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
fb589130 | 2648 | egrep "webecray" >/dev/null 2>&1; then |
b11fb939 KR |
2649 | rm -rf conftest* |
2650 | ac_cv_os_cray=yes | |
2651 | else | |
2652 | rm -rf conftest* | |
2653 | ac_cv_os_cray=no | |
2654 | fi | |
2655 | rm -f conftest* | |
2656 | ||
2657 | fi | |
1c9dbb83 | 2658 | |
833c46e1 | 2659 | echo "$ac_t""$ac_cv_os_cray" 1>&6 |
b11fb939 | 2660 | if test $ac_cv_os_cray = yes; then |
833c46e1 KR |
2661 | for ac_func in _getb67 GETB67 getb67; do |
2662 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
53bdc990 | 2663 | echo "configure:2663: checking for $ac_func" >&5 |
833c46e1 KR |
2664 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2665 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b11fb939 | 2666 | else |
28d3e4a3 | 2667 | cat > conftest.$ac_ext <<EOF |
53bdc990 | 2668 | #line 2668 "configure" |
b11fb939 | 2669 | #include "confdefs.h" |
833c46e1 KR |
2670 | /* System header to define __stub macros and hopefully few prototypes, |
2671 | which can conflict with char $ac_func(); below. */ | |
2672 | #include <assert.h> | |
f1698cb7 | 2673 | /* Override any gcc2 internal prototype to avoid an error. */ |
df586de2 ILT |
2674 | /* We use char because int might match the return type of a gcc2 |
2675 | builtin and then its argument prototype would still apply. */ | |
1c9dbb83 | 2676 | char $ac_func(); |
f1698cb7 | 2677 | |
c6c7035c | 2678 | int main() { |
b11fb939 KR |
2679 | |
2680 | /* The GNU C library defines this for functions which it implements | |
2681 | to always fail with ENOSYS. Some functions are actually named | |
2682 | something starting with __ and the normal name is an alias. */ | |
833c46e1 | 2683 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
b11fb939 KR |
2684 | choke me |
2685 | #else | |
833c46e1 | 2686 | $ac_func(); |
b11fb939 KR |
2687 | #endif |
2688 | ||
2689 | ; return 0; } | |
2690 | EOF | |
53bdc990 | 2691 | if { (eval echo configure:2691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
b11fb939 | 2692 | rm -rf conftest* |
833c46e1 | 2693 | eval "ac_cv_func_$ac_func=yes" |
b11fb939 | 2694 | else |
c6c7035c MM |
2695 | echo "configure: failed program was:" >&5 |
2696 | cat conftest.$ac_ext >&5 | |
b11fb939 | 2697 | rm -rf conftest* |
833c46e1 | 2698 | eval "ac_cv_func_$ac_func=no" |
b11fb939 KR |
2699 | fi |
2700 | rm -f conftest* | |
7d0f8249 | 2701 | fi |
c6c7035c | 2702 | |
833c46e1 KR |
2703 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
2704 | echo "$ac_t""yes" 1>&6 | |
2705 | cat >> confdefs.h <<EOF | |
2706 | #define CRAY_STACKSEG_END $ac_func | |
b11fb939 KR |
2707 | EOF |
2708 | ||
833c46e1 | 2709 | break |
b11fb939 | 2710 | else |
833c46e1 | 2711 | echo "$ac_t""no" 1>&6 |
b11fb939 KR |
2712 | fi |
2713 | ||
833c46e1 | 2714 | done |
b11fb939 KR |
2715 | fi |
2716 | ||
833c46e1 | 2717 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 |
53bdc990 | 2718 | echo "configure:2718: checking stack direction for C alloca" >&5 |
833c46e1 KR |
2719 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
2720 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b11fb939 KR |
2721 | else |
2722 | if test "$cross_compiling" = yes; then | |
bf111c9f | 2723 | ac_cv_c_stack_direction=0 |
b11fb939 | 2724 | else |
c6c7035c | 2725 | cat > conftest.$ac_ext <<EOF |
53bdc990 | 2726 | #line 2726 "configure" |
b11fb939 KR |
2727 | #include "confdefs.h" |
2728 | find_stack_direction () | |
2729 | { | |
2730 | static char *addr = 0; | |
2731 | auto char dummy; | |
2732 | if (addr == 0) | |
2733 | { | |
2734 | addr = &dummy; | |
2735 | return find_stack_direction (); | |
2736 | } | |
2737 | else | |
2738 | return (&dummy > addr) ? 1 : -1; | |
2739 | } | |
2740 | main () | |
2741 | { | |
2742 | exit (find_stack_direction() < 0); | |
2743 | } | |
2744 | EOF | |
53bdc990 | 2745 | if { (eval echo configure:2745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
c6c7035c | 2746 | then |
b11fb939 KR |
2747 | ac_cv_c_stack_direction=1 |
2748 | else | |
c6c7035c MM |
2749 | echo "configure: failed program was:" >&5 |
2750 | cat conftest.$ac_ext >&5 | |
2751 | rm -fr conftest* | |
b11fb939 KR |
2752 | ac_cv_c_stack_direction=-1 |
2753 | fi | |
7d0f8249 | 2754 | rm -fr conftest* |
64556643 FF |
2755 | fi |
2756 | ||
c6c7035c MM |
2757 | fi |
2758 | ||
833c46e1 | 2759 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 |
b11fb939 KR |
2760 | cat >> confdefs.h <<EOF |
2761 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
2762 | EOF | |
2763 | ||
2764 | fi | |
2765 | ||
833c46e1 | 2766 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
53bdc990 | 2767 | echo "configure:2767: checking for inline" >&5 |
833c46e1 KR |
2768 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
2769 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b11fb939 | 2770 | else |
833c46e1 KR |
2771 | ac_cv_c_inline=no |
2772 | for ac_kw in inline __inline__ __inline; do | |
2773 | cat > conftest.$ac_ext <<EOF | |
53bdc990 | 2774 | #line 2774 "configure" |
b11fb939 KR |
2775 | #include "confdefs.h" |
2776 | ||
c6c7035c | 2777 | int main() { |
833c46e1 | 2778 | } $ac_kw foo() { |
b11fb939 KR |
2779 | ; return 0; } |
2780 | EOF | |
53bdc990 | 2781 | if { (eval echo configure:2781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b11fb939 | 2782 | rm -rf conftest* |
833c46e1 | 2783 | ac_cv_c_inline=$ac_kw; break |
c6c7035c MM |
2784 | else |
2785 | echo "configure: failed program was:" >&5 | |
2786 | cat conftest.$ac_ext >&5 | |
b11fb939 KR |
2787 | fi |
2788 | rm -f conftest* | |
833c46e1 | 2789 | done |
b11fb939 KR |
2790 | |
2791 | fi | |
1c9dbb83 | 2792 | |
833c46e1 KR |
2793 | echo "$ac_t""$ac_cv_c_inline" 1>&6 |
2794 | case "$ac_cv_c_inline" in | |
2795 | inline | yes) ;; | |
2796 | no) cat >> confdefs.h <<\EOF | |
2797 | #define inline | |
2798 | EOF | |
2799 | ;; | |
2800 | *) cat >> confdefs.h <<EOF | |
2801 | #define inline $ac_cv_c_inline | |
2802 | EOF | |
2803 | ;; | |
2804 | esac | |
b11fb939 KR |
2805 | |
2806 | ||
ba49e48d KR |
2807 | # VMS doesn't have unlink. |
2808 | for ac_func in unlink remove | |
b9419dd2 | 2809 | do |
833c46e1 | 2810 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
53bdc990 | 2811 | echo "configure:2811: checking for $ac_func" >&5 |
833c46e1 KR |
2812 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2813 | echo $ac_n "(cached) $ac_c" 1>&6 | |
28d3e4a3 KR |
2814 | else |
2815 | cat > conftest.$ac_ext <<EOF | |
53bdc990 | 2816 | #line 2816 "configure" |
28d3e4a3 | 2817 | #include "confdefs.h" |
833c46e1 KR |
2818 | /* System header to define __stub macros and hopefully few prototypes, |
2819 | which can conflict with char $ac_func(); below. */ | |
2820 | #include <assert.h> | |
f1698cb7 | 2821 | /* Override any gcc2 internal prototype to avoid an error. */ |
df586de2 ILT |
2822 | /* We use char because int might match the return type of a gcc2 |
2823 | builtin and then its argument prototype would still apply. */ | |
1c9dbb83 | 2824 | char $ac_func(); |
f1698cb7 | 2825 | |
c6c7035c | 2826 | int main() { |
28d3e4a3 KR |
2827 | |
2828 | /* The GNU C library defines this for functions which it implements | |
2829 | to always fail with ENOSYS. Some functions are actually named | |
2830 | something starting with __ and the normal name is an alias. */ | |
b9419dd2 | 2831 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
28d3e4a3 KR |
2832 | choke me |
2833 | #else | |
f1698cb7 | 2834 | $ac_func(); |
28d3e4a3 KR |
2835 | #endif |
2836 | ||
2837 | ; return 0; } | |
2838 | EOF | |
53bdc990 | 2839 | if { (eval echo configure:2839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
28d3e4a3 | 2840 | rm -rf conftest* |
b9419dd2 | 2841 | eval "ac_cv_func_$ac_func=yes" |
28d3e4a3 | 2842 | else |
c6c7035c MM |
2843 | echo "configure: failed program was:" >&5 |
2844 | cat conftest.$ac_ext >&5 | |
28d3e4a3 | 2845 | rm -rf conftest* |
b9419dd2 | 2846 | eval "ac_cv_func_$ac_func=no" |
28d3e4a3 KR |
2847 | fi |
2848 | rm -f conftest* | |
7d0f8249 | 2849 | fi |
c6c7035c | 2850 | |
b9419dd2 | 2851 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
833c46e1 | 2852 | echo "$ac_t""yes" 1>&6 |
1c9dbb83 | 2853 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
b9419dd2 KR |
2854 | cat >> confdefs.h <<EOF |
2855 | #define $ac_tr_func 1 | |
28d3e4a3 | 2856 | EOF |
b9419dd2 | 2857 | break |
28d3e4a3 | 2858 | else |
833c46e1 | 2859 | echo "$ac_t""no" 1>&6 |
28d3e4a3 | 2860 | fi |
b9419dd2 | 2861 | done |
28d3e4a3 KR |
2862 | |
2863 | ||
e63c594d FF |
2864 | # Some systems don't have sbrk(). |
2865 | for ac_func in sbrk | |
2866 | do | |
2867 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
53bdc990 | 2868 | echo "configure:2868: checking for $ac_func" >&5 |
e63c594d FF |
2869 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2870 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2871 | else | |
2872 | cat > conftest.$ac_ext <<EOF | |
53bdc990 | 2873 | #line 2873 "configure" |
e63c594d FF |
2874 | #include "confdefs.h" |
2875 | /* System header to define __stub macros and hopefully few prototypes, | |
2876 | which can conflict with char $ac_func(); below. */ | |
2877 | #include <assert.h> | |
2878 | /* Override any gcc2 internal prototype to avoid an error. */ | |
df586de2 ILT |
2879 | /* We use char because int might match the return type of a gcc2 |
2880 | builtin and then its argument prototype would still apply. */ | |
1c9dbb83 | 2881 | char $ac_func(); |
e63c594d | 2882 | |
c6c7035c | 2883 | int main() { |
e63c594d FF |
2884 | |
2885 | /* The GNU C library defines this for functions which it implements | |
2886 | to always fail with ENOSYS. Some functions are actually named | |
2887 | something starting with __ and the normal name is an alias. */ | |
2888 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2889 | choke me | |
2890 | #else | |
2891 | $ac_func(); | |
2892 | #endif | |
2893 | ||
2894 | ; return 0; } | |
2895 | EOF | |
53bdc990 | 2896 | if { (eval echo configure:2896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
e63c594d FF |
2897 | rm -rf conftest* |
2898 | eval "ac_cv_func_$ac_func=yes" | |
2899 | else | |
c6c7035c MM |
2900 | echo "configure: failed program was:" >&5 |
2901 | cat conftest.$ac_ext >&5 | |
e63c594d FF |
2902 | rm -rf conftest* |
2903 | eval "ac_cv_func_$ac_func=no" | |
2904 | fi | |
2905 | rm -f conftest* | |
7d0f8249 | 2906 | fi |
c6c7035c | 2907 | |
e63c594d FF |
2908 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
2909 | echo "$ac_t""yes" 1>&6 | |
1c9dbb83 | 2910 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
e63c594d FF |
2911 | cat >> confdefs.h <<EOF |
2912 | #define $ac_tr_func 1 | |
2913 | EOF | |
2914 | ||
2915 | else | |
2916 | echo "$ac_t""no" 1>&6 | |
2917 | fi | |
2918 | done | |
2919 | ||
2920 | ||
b11fb939 KR |
2921 | # Some non-ANSI preprocessors botch requoting inside strings. That's bad |
2922 | # enough, but on some of those systems, the assert macro relies on requoting | |
2923 | # working properly! | |
833c46e1 | 2924 | echo $ac_n "checking for working assert macro""... $ac_c" 1>&6 |
53bdc990 | 2925 | echo "configure:2925: checking for working assert macro" >&5 |
833c46e1 KR |
2926 | if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then |
2927 | echo $ac_n "(cached) $ac_c" 1>&6 | |
fb589130 | 2928 | else |
28d3e4a3 | 2929 | cat > conftest.$ac_ext <<EOF |
53bdc990 | 2930 | #line 2930 "configure" |
b11fb939 KR |
2931 | #include "confdefs.h" |
2932 | #include <assert.h> | |
2933 | #include <stdio.h> | |
c6c7035c | 2934 | int main() { |
b11fb939 KR |
2935 | |
2936 | /* check for requoting problems */ | |
2937 | static int a, b, c, d; | |
2938 | static char *s; | |
2939 | assert (!strcmp(s, "foo bar baz quux")); | |
2940 | /* check for newline handling */ | |
2941 | assert (a == b | |
2942 | || c == d); | |
2943 | ||
2944 | ; return 0; } | |
2945 | EOF | |
53bdc990 | 2946 | if { (eval echo configure:2946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
fb589130 KR |
2947 | rm -rf conftest* |
2948 | gas_cv_assert_ok=yes | |
b11fb939 | 2949 | else |
c6c7035c MM |
2950 | echo "configure: failed program was:" >&5 |
2951 | cat conftest.$ac_ext >&5 | |
b11fb939 | 2952 | rm -rf conftest* |
fb589130 | 2953 | gas_cv_assert_ok=no |
b11fb939 KR |
2954 | fi |
2955 | rm -f conftest* | |
fb589130 | 2956 | fi |
833c46e1 | 2957 | echo "$ac_t""$gas_cv_assert_ok" 1>&6 |
fb589130 KR |
2958 | test $gas_cv_assert_ok = yes || cat >> confdefs.h <<\EOF |
2959 | #define BROKEN_ASSERT 1 | |
2960 | EOF | |
2961 | ||
b11fb939 | 2962 | |
bf111c9f | 2963 | |
b11fb939 KR |
2964 | # On some systems, the system header files may not declare malloc, realloc, |
2965 | # and free. There are places where gas needs these functions to have been | |
2966 | # declared -- such as when taking their addresses. | |
bf111c9f | 2967 | gas_test_headers=" |
b11fb939 KR |
2968 | #ifdef HAVE_MEMORY_H |
2969 | #include <memory.h> | |
2970 | #endif | |
2971 | #ifdef HAVE_STRING_H | |
2972 | #include <string.h> | |
5cece526 ILT |
2973 | #else |
2974 | #ifdef HAVE_STRINGS_H | |
2975 | #include <strings.h> | |
2976 | #endif | |
b11fb939 KR |
2977 | #endif |
2978 | #ifdef HAVE_STDLIB_H | |
2979 | #include <stdlib.h> | |
2980 | #endif | |
2981 | #ifdef HAVE_UNISTD_H | |
2982 | #include <unistd.h> | |
2983 | #endif | |
bf111c9f | 2984 | " |
b11fb939 | 2985 | |
5cece526 | 2986 | echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6 |
53bdc990 | 2987 | echo "configure:2987: checking whether declaration is required for strstr" >&5 |
5cece526 ILT |
2988 | if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then |
2989 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2990 | else | |
2991 | cat > conftest.$ac_ext <<EOF | |
53bdc990 | 2992 | #line 2992 "configure" |
5cece526 ILT |
2993 | #include "confdefs.h" |
2994 | $gas_test_headers | |
c6c7035c | 2995 | int main() { |
5cece526 ILT |
2996 | |
2997 | typedef char *(*f)(); | |
2998 | f x; | |
2999 | x = (f) strstr; | |
3000 | ||
3001 | ; return 0; } | |
3002 | EOF | |
53bdc990 | 3003 | if { (eval echo configure:3003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
5cece526 ILT |
3004 | rm -rf conftest* |
3005 | gas_cv_decl_needed_strstr=no | |
3006 | else | |
c6c7035c MM |
3007 | echo "configure: failed program was:" >&5 |
3008 | cat conftest.$ac_ext >&5 | |
5cece526 ILT |
3009 | rm -rf conftest* |
3010 | gas_cv_decl_needed_strstr=yes | |
3011 | fi | |
3012 | rm -f conftest* | |
5cece526 ILT |
3013 | fi |
3014 | echo "$ac_t""$gas_cv_decl_needed_strstr" 1>&6 | |
3015 | test $gas_cv_decl_needed_strstr = no || { | |
3016 | cat >> confdefs.h <<\EOF | |
3017 | #define NEED_DECLARATION_STRSTR 1 | |
3018 | EOF | |
3019 | ||
3020 | } | |
3021 | ||
3022 | ||
833c46e1 | 3023 | echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6 |
53bdc990 | 3024 | echo "configure:3024: checking whether declaration is required for malloc" >&5 |
833c46e1 KR |
3025 | if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then |
3026 | echo $ac_n "(cached) $ac_c" 1>&6 | |
bf111c9f | 3027 | else |
28d3e4a3 | 3028 | cat > conftest.$ac_ext <<EOF |
53bdc990 | 3029 | #line 3029 "configure" |
bf111c9f KR |
3030 | #include "confdefs.h" |
3031 | $gas_test_headers | |
c6c7035c | 3032 | int main() { |
b11fb939 | 3033 | |
bf111c9f KR |
3034 | typedef char *(*f)(); |
3035 | f x; | |
3036 | x = (f) malloc; | |
b11fb939 KR |
3037 | |
3038 | ; return 0; } | |
3039 | EOF | |
53bdc990 | 3040 | if { (eval echo configure:3040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
fb589130 | 3041 | rm -rf conftest* |
bf111c9f | 3042 | gas_cv_decl_needed_malloc=no |
b11fb939 | 3043 | else |
c6c7035c MM |
3044 | echo "configure: failed program was:" >&5 |
3045 | cat conftest.$ac_ext >&5 | |
b11fb939 | 3046 | rm -rf conftest* |
bf111c9f | 3047 | gas_cv_decl_needed_malloc=yes |
fb589130 KR |
3048 | fi |
3049 | rm -f conftest* | |
fb589130 | 3050 | fi |
833c46e1 | 3051 | echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&6 |
bf111c9f KR |
3052 | test $gas_cv_decl_needed_malloc = no || { |
3053 | cat >> confdefs.h <<\EOF | |
3054 | #define NEED_DECLARATION_MALLOC 1 | |
b11fb939 KR |
3055 | EOF |
3056 | ||
bf111c9f KR |
3057 | } |
3058 | ||
b11fb939 | 3059 | |
833c46e1 | 3060 | echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6 |
53bdc990 | 3061 | echo "configure:3061: checking whether declaration is required for free" >&5 |
833c46e1 KR |
3062 | if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then |
3063 | echo $ac_n "(cached) $ac_c" 1>&6 | |
fb589130 | 3064 | else |
28d3e4a3 | 3065 | cat > conftest.$ac_ext <<EOF |
53bdc990 | 3066 | #line 3066 "configure" |
b11fb939 | 3067 | #include "confdefs.h" |
bf111c9f | 3068 | $gas_test_headers |
c6c7035c | 3069 | int main() { |
b11fb939 | 3070 | |
5f757edc | 3071 | typedef void (*f)(); |
bf111c9f KR |
3072 | f x; |
3073 | x = (f) free; | |
b11fb939 KR |
3074 | |
3075 | ; return 0; } | |
3076 | EOF | |
53bdc990 | 3077 | if { (eval echo configure:3077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
fb589130 | 3078 | rm -rf conftest* |
bf111c9f | 3079 | gas_cv_decl_needed_free=no |
b11fb939 | 3080 | else |
c6c7035c MM |
3081 | echo "configure: failed program was:" >&5 |
3082 | cat conftest.$ac_ext >&5 | |
b11fb939 | 3083 | rm -rf conftest* |
bf111c9f | 3084 | gas_cv_decl_needed_free=yes |
b11fb939 KR |
3085 | fi |
3086 | rm -f conftest* | |
fb589130 | 3087 | fi |
833c46e1 | 3088 | echo "$ac_t""$gas_cv_decl_needed_free" 1>&6 |
bf111c9f KR |
3089 | test $gas_cv_decl_needed_free = no || { |
3090 | cat >> confdefs.h <<\EOF | |
3091 | #define NEED_DECLARATION_FREE 1 | |
fb589130 KR |
3092 | EOF |
3093 | ||
bf111c9f KR |
3094 | } |
3095 | ||
b11fb939 | 3096 | |
5cece526 | 3097 | echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6 |
53bdc990 | 3098 | echo "configure:3098: checking whether declaration is required for sbrk" >&5 |
5cece526 ILT |
3099 | if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then |
3100 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3101 | else | |
3102 | cat > conftest.$ac_ext <<EOF | |
53bdc990 | 3103 | #line 3103 "configure" |
5cece526 ILT |
3104 | #include "confdefs.h" |
3105 | $gas_test_headers | |
c6c7035c | 3106 | int main() { |
5cece526 ILT |
3107 | |
3108 | typedef char *(*f)(); | |
3109 | f x; | |
3110 | x = (f) sbrk; | |
3111 | ||
3112 | ; return 0; } | |
3113 | EOF | |
53bdc990 | 3114 | if { (eval echo configure:3114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
5cece526 ILT |
3115 | rm -rf conftest* |
3116 | gas_cv_decl_needed_sbrk=no | |
3117 | else | |
c6c7035c MM |
3118 | echo "configure: failed program was:" >&5 |
3119 | cat conftest.$ac_ext >&5 | |
5cece526 ILT |
3120 | rm -rf conftest* |
3121 | gas_cv_decl_needed_sbrk=yes | |
3122 | fi | |
3123 | rm -f conftest* | |
5cece526 ILT |
3124 | fi |
3125 | echo "$ac_t""$gas_cv_decl_needed_sbrk" 1>&6 | |
3126 | test $gas_cv_decl_needed_sbrk = no || { | |
3127 | cat >> confdefs.h <<\EOF | |
3128 | #define NEED_DECLARATION_SBRK 1 | |
3129 | EOF | |
3130 | ||
3131 | } | |
3132 | ||
3133 | ||
b11fb939 KR |
3134 | # Does errno.h declare errno, or do we have to add a separate declaration |
3135 | # for it? | |
bf111c9f | 3136 | |
833c46e1 | 3137 | echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6 |
53bdc990 | 3138 | echo "configure:3138: checking whether declaration is required for errno" >&5 |
833c46e1 KR |
3139 | if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then |
3140 | echo $ac_n "(cached) $ac_c" 1>&6 | |
fb589130 | 3141 | else |
28d3e4a3 | 3142 | cat > conftest.$ac_ext <<EOF |
53bdc990 | 3143 | #line 3143 "configure" |
b11fb939 KR |
3144 | #include "confdefs.h" |
3145 | ||
3146 | #ifdef HAVE_ERRNO_H | |
3147 | #include <errno.h> | |
3148 | #endif | |
3149 | ||
c6c7035c | 3150 | int main() { |
b11fb939 | 3151 | |
bf111c9f KR |
3152 | typedef int f; |
3153 | f x; | |
3154 | x = (f) errno; | |
b11fb939 KR |
3155 | |
3156 | ; return 0; } | |
3157 | EOF | |
53bdc990 | 3158 | if { (eval echo configure:3158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
fb589130 | 3159 | rm -rf conftest* |
bf111c9f | 3160 | gas_cv_decl_needed_errno=no |
b11fb939 | 3161 | else |
c6c7035c MM |
3162 | echo "configure: failed program was:" >&5 |
3163 | cat conftest.$ac_ext >&5 | |
b11fb939 | 3164 | rm -rf conftest* |
bf111c9f | 3165 | gas_cv_decl_needed_errno=yes |
b11fb939 KR |
3166 | fi |
3167 | rm -f conftest* | |
fb589130 | 3168 | fi |
833c46e1 | 3169 | echo "$ac_t""$gas_cv_decl_needed_errno" 1>&6 |
bf111c9f KR |
3170 | test $gas_cv_decl_needed_errno = no || { |
3171 | cat >> confdefs.h <<\EOF | |
3172 | #define NEED_DECLARATION_ERRNO 1 | |
fb589130 KR |
3173 | EOF |
3174 | ||
bf111c9f KR |
3175 | } |
3176 | ||
b11fb939 | 3177 | |
515c7142 ILT |
3178 | |
3179 | ||
ba49e48d | 3180 | trap '' 1 2 15 |
833c46e1 | 3181 | cat > confcache <<\EOF |
b11fb939 KR |
3182 | # This file is a shell script that caches the results of configure |
3183 | # tests run on this system so they can be shared between configure | |
3184 | # scripts and configure runs. It is not useful on other systems. | |
bf111c9f | 3185 | # If it contains results you don't want to keep, you may remove or edit it. |
b11fb939 KR |
3186 | # |
3187 | # By default, configure uses ./config.cache as the cache file, | |
3188 | # creating it if it does not exist already. You can give configure | |
3189 | # the --cache-file=FILE option to use a different cache file; that is | |
3190 | # what configure does when it calls configure scripts in | |
3191 | # subdirectories, so they share the cache. | |
3192 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
3193 | # config.status only pays attention to the cache file if you give it the | |
3194 | # --recheck option to rerun configure. | |
e23b25ec | 3195 | # |
b11fb939 | 3196 | EOF |
c6c7035c MM |
3197 | # The following way of writing the cache mishandles newlines in values, |
3198 | # but we know of no workaround that is simple, portable, and efficient. | |
3199 | # So, don't put newlines in cache variables' values. | |
833c46e1 KR |
3200 | # Ultrix sh set writes to stderr and can't be redirected directly, |
3201 | # and sets the high bit in the cache file unless we assign to the vars. | |
e23b25ec | 3202 | (set) 2>&1 | |
c6c7035c MM |
3203 | case `(ac_space=' '; set) 2>&1` in |
3204 | *ac_space=\ *) | |
3205 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
3206 | # turns \\\\ into \\, and sed turns \\ into \). | |
3207 | sed -n \ | |
3208 | -e "s/'/'\\\\''/g" \ | |
3209 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
3210 | ;; | |
3211 | *) | |
3212 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
3213 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
3214 | ;; | |
3215 | esac >> confcache | |
833c46e1 KR |
3216 | if cmp -s $cache_file confcache; then |
3217 | : | |
b11fb939 | 3218 | else |
833c46e1 KR |
3219 | if test -w $cache_file; then |
3220 | echo "updating cache $cache_file" | |
3221 | cat confcache > $cache_file | |
3222 | else | |
3223 | echo "not updating unwritable cache $cache_file" | |
3224 | fi | |
b11fb939 | 3225 | fi |
833c46e1 | 3226 | rm -f confcache |
b11fb939 | 3227 | |
833c46e1 | 3228 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
b11fb939 | 3229 | |
f2889110 | 3230 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
b11fb939 KR |
3231 | # Let make expand exec_prefix. |
3232 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
3233 | ||
3234 | # Any assignment to VPATH causes Sun make to only execute | |
3235 | # the first set of double-colon rules, so remove it if not needed. | |
3236 | # If there is a colon in the path, we need to keep it. | |
3237 | if test "x$srcdir" = x.; then | |
3238 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
3239 | fi | |
3240 | ||
3241 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
3242 | ||
3243 | DEFS=-DHAVE_CONFIG_H | |
3244 | ||
3245 | # Without the "./", some shells look in PATH for config.status. | |
3246 | : ${CONFIG_STATUS=./config.status} | |
3247 | ||
28d3e4a3 KR |
3248 | echo creating $CONFIG_STATUS |
3249 | rm -f $CONFIG_STATUS | |
3250 | cat > $CONFIG_STATUS <<EOF | |
833c46e1 | 3251 | #! /bin/sh |
b11fb939 KR |
3252 | # Generated automatically by configure. |
3253 | # Run this file to recreate the current configuration. | |
3254 | # This directory was configured as follows, | |
3255 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
3256 | # | |
e23b25ec | 3257 | # $0 $ac_configure_args |
b11fb939 KR |
3258 | # |
3259 | # Compiler output produced by configure, useful for debugging | |
3260 | # configure, is in ./config.log if it exists. | |
3261 | ||
28d3e4a3 | 3262 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
b11fb939 KR |
3263 | for ac_option |
3264 | do | |
3265 | case "\$ac_option" in | |
3266 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
e23b25ec KR |
3267 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" |
3268 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
b11fb939 | 3269 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
53bdc990 | 3270 | echo "$CONFIG_STATUS generated by autoconf version 2.12" |
b11fb939 KR |
3271 | exit 0 ;; |
3272 | -help | --help | --hel | --he | --h) | |
3273 | echo "\$ac_cs_usage"; exit 0 ;; | |
3274 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
3275 | esac | |
3276 | done | |
3277 | ||
3278 | ac_given_srcdir=$srcdir | |
3279 | ac_given_INSTALL="$INSTALL" | |
3280 | ||
e2b4bd2a | 3281 | trap 'rm -fr `echo "Makefile doc/Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
1c9dbb83 ILT |
3282 | EOF |
3283 | cat >> $CONFIG_STATUS <<EOF | |
b11fb939 | 3284 | |
1c9dbb83 ILT |
3285 | # Protect against being on the right side of a sed subst in config.status. |
3286 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
3287 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
b11fb939 KR |
3288 | $ac_vpsub |
3289 | $extrasub | |
b11fb939 | 3290 | s%@CFLAGS@%$CFLAGS%g |
b11fb939 | 3291 | s%@CPPFLAGS@%$CPPFLAGS%g |
bf111c9f KR |
3292 | s%@CXXFLAGS@%$CXXFLAGS%g |
3293 | s%@DEFS@%$DEFS%g | |
b11fb939 | 3294 | s%@LDFLAGS@%$LDFLAGS%g |
bf111c9f KR |
3295 | s%@LIBS@%$LIBS%g |
3296 | s%@exec_prefix@%$exec_prefix%g | |
3297 | s%@prefix@%$prefix%g | |
ba49e48d | 3298 | s%@program_transform_name@%$program_transform_name%g |
1c9dbb83 ILT |
3299 | s%@bindir@%$bindir%g |
3300 | s%@sbindir@%$sbindir%g | |
3301 | s%@libexecdir@%$libexecdir%g | |
3302 | s%@datadir@%$datadir%g | |
3303 | s%@sysconfdir@%$sysconfdir%g | |
3304 | s%@sharedstatedir@%$sharedstatedir%g | |
3305 | s%@localstatedir@%$localstatedir%g | |
3306 | s%@libdir@%$libdir%g | |
3307 | s%@includedir@%$includedir%g | |
3308 | s%@oldincludedir@%$oldincludedir%g | |
3309 | s%@infodir@%$infodir%g | |
3310 | s%@mandir@%$mandir%g | |
b11fb939 KR |
3311 | s%@host@%$host%g |
3312 | s%@host_alias@%$host_alias%g | |
3313 | s%@host_cpu@%$host_cpu%g | |
3314 | s%@host_vendor@%$host_vendor%g | |
3315 | s%@host_os@%$host_os%g | |
3316 | s%@target@%$target%g | |
3317 | s%@target_alias@%$target_alias%g | |
3318 | s%@target_cpu@%$target_cpu%g | |
3319 | s%@target_vendor@%$target_vendor%g | |
3320 | s%@target_os@%$target_os%g | |
3321 | s%@build@%$build%g | |
3322 | s%@build_alias@%$build_alias%g | |
3323 | s%@build_cpu@%$build_cpu%g | |
3324 | s%@build_vendor@%$build_vendor%g | |
3325 | s%@build_os@%$build_os%g | |
e2b4bd2a ILT |
3326 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
3327 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
3328 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
3329 | s%@PACKAGE@%$PACKAGE%g | |
3330 | s%@VERSION@%$VERSION%g | |
3331 | s%@ACLOCAL@%$ACLOCAL%g | |
3332 | s%@AUTOCONF@%$AUTOCONF%g | |
3333 | s%@AUTOMAKE@%$AUTOMAKE%g | |
3334 | s%@AUTOHEADER@%$AUTOHEADER%g | |
3335 | s%@MAKEINFO@%$MAKEINFO%g | |
3336 | s%@SET_MAKE@%$SET_MAKE%g | |
3337 | s%@CC@%$CC%g | |
3338 | s%@RANLIB@%$RANLIB%g | |
3339 | s%@LD@%$LD%g | |
3340 | s%@LN_S@%$LN_S%g | |
3341 | s%@LIBTOOL@%$LIBTOOL%g | |
e7757ad0 | 3342 | s%@extra_objects@%$extra_objects%g |
bf4bd1fc | 3343 | s%@target_cpu_type@%$target_cpu_type%g |
833c46e1 | 3344 | s%@obj_format@%$obj_format%g |
515c7142 | 3345 | s%@te_file@%$te_file%g |
833c46e1 | 3346 | s%@atof@%$atof%g |
b11fb939 | 3347 | s%@BFDLIB@%$BFDLIB%g |
2e013bb7 | 3348 | s%@OPCODES_LIB@%$OPCODES_LIB%g |
b11fb939 | 3349 | s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g |
e2b4bd2a ILT |
3350 | s%@YACC@%$YACC%g |
3351 | s%@LEX@%$LEX%g | |
3352 | s%@LEXLIB@%$LEXLIB%g | |
b11fb939 | 3353 | s%@CPP@%$CPP%g |
e2b4bd2a ILT |
3354 | s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g |
3355 | s%@MAINT@%$MAINT%g | |
e42b2520 | 3356 | s%@EXEEXT@%$EXEEXT%g |
b11fb939 | 3357 | s%@ALLOCA@%$ALLOCA%g |
b11fb939 KR |
3358 | |
3359 | CEOF | |
3360 | EOF | |
c6c7035c MM |
3361 | |
3362 | cat >> $CONFIG_STATUS <<\EOF | |
3363 | ||
3364 | # Split the substitutions into bite-sized pieces for seds with | |
3365 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
3366 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
3367 | ac_file=1 # Number of current file. | |
3368 | ac_beg=1 # First line for current file. | |
3369 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
3370 | ac_more_lines=: | |
3371 | ac_sed_cmds="" | |
3372 | while $ac_more_lines; do | |
3373 | if test $ac_beg -gt 1; then | |
3374 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
3375 | else | |
3376 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
3377 | fi | |
3378 | if test ! -s conftest.s$ac_file; then | |
3379 | ac_more_lines=false | |
3380 | rm -f conftest.s$ac_file | |
3381 | else | |
3382 | if test -z "$ac_sed_cmds"; then | |
3383 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
3384 | else | |
3385 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
3386 | fi | |
3387 | ac_file=`expr $ac_file + 1` | |
3388 | ac_beg=$ac_end | |
3389 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
3390 | fi | |
3391 | done | |
3392 | if test -z "$ac_sed_cmds"; then | |
3393 | ac_sed_cmds=cat | |
3394 | fi | |
3395 | EOF | |
3396 | ||
28d3e4a3 | 3397 | cat >> $CONFIG_STATUS <<EOF |
b11fb939 | 3398 | |
28d3e4a3 | 3399 | CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile .gdbinit:gdbinit.in"} |
bf111c9f | 3400 | EOF |
28d3e4a3 KR |
3401 | cat >> $CONFIG_STATUS <<\EOF |
3402 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
c6c7035c | 3403 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
b11fb939 | 3404 | case "$ac_file" in |
c6c7035c | 3405 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
b11fb939 KR |
3406 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
3407 | *) ac_file_in="${ac_file}.in" ;; | |
3408 | esac | |
3409 | ||
c6c7035c | 3410 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
b11fb939 KR |
3411 | |
3412 | # Remove last slash and all that follows it. Not all systems have dirname. | |
3413 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
3414 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
3415 | # The file is in a subdirectory. | |
3416 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
833c46e1 | 3417 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" |
b11fb939 KR |
3418 | # A "../" for each directory in $ac_dir_suffix. |
3419 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
3420 | else | |
3421 | ac_dir_suffix= ac_dots= | |
3422 | fi | |
3423 | ||
3424 | case "$ac_given_srcdir" in | |
3425 | .) srcdir=. | |
3426 | if test -z "$ac_dots"; then top_srcdir=. | |
3427 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
3428 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
3429 | *) # Relative path. | |
3430 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
3431 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
3432 | esac | |
3433 | ||
3434 | case "$ac_given_INSTALL" in | |
3435 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
28d3e4a3 | 3436 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; |
b11fb939 | 3437 | esac |
c6c7035c | 3438 | |
b11fb939 KR |
3439 | echo creating "$ac_file" |
3440 | rm -f "$ac_file" | |
28d3e4a3 | 3441 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." |
ba49e48d KR |
3442 | case "$ac_file" in |
3443 | *Makefile*) ac_comsub="1i\\ | |
3444 | # $configure_input" ;; | |
3445 | *) ac_comsub= ;; | |
3446 | esac | |
c6c7035c | 3447 | |
e2b4bd2a | 3448 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
ba49e48d | 3449 | sed -e "$ac_comsub |
28d3e4a3 | 3450 | s%@configure_input@%$configure_input%g |
b11fb939 KR |
3451 | s%@srcdir@%$srcdir%g |
3452 | s%@top_srcdir@%$top_srcdir%g | |
3453 | s%@INSTALL@%$INSTALL%g | |
c6c7035c | 3454 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
b11fb939 | 3455 | fi; done |
c6c7035c | 3456 | rm -f conftest.s* |
b11fb939 KR |
3457 | |
3458 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
3459 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
3460 | # | |
3461 | # ac_d sets the value in "#define NAME VALUE" lines. | |
3462 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
3463 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
3464 | ac_dC='\3' | |
3465 | ac_dD='%g' | |
3466 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
3467 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
3468 | ac_uB='\([ ]\)%\1#\2define\3' | |
3469 | ac_uC=' ' | |
3470 | ac_uD='\4%g' | |
3471 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
3472 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
3473 | ac_eB='$%\1#\2define\3' | |
3474 | ac_eC=' ' | |
3475 | ac_eD='%g' | |
3476 | ||
c6c7035c MM |
3477 | if test "${CONFIG_HEADERS+set}" != set; then |
3478 | EOF | |
3479 | cat >> $CONFIG_STATUS <<EOF | |
e2b4bd2a | 3480 | CONFIG_HEADERS="config.h:config.in" |
c6c7035c MM |
3481 | EOF |
3482 | cat >> $CONFIG_STATUS <<\EOF | |
3483 | fi | |
28d3e4a3 | 3484 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then |
c6c7035c | 3485 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
b11fb939 | 3486 | case "$ac_file" in |
c6c7035c | 3487 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
b11fb939 KR |
3488 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
3489 | *) ac_file_in="${ac_file}.in" ;; | |
3490 | esac | |
3491 | ||
3492 | echo creating $ac_file | |
3493 | ||
3494 | rm -f conftest.frag conftest.in conftest.out | |
e2b4bd2a | 3495 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
c6c7035c | 3496 | cat $ac_file_inputs > conftest.in |
b11fb939 KR |
3497 | |
3498 | EOF | |
3499 | ||
3500 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
fb589130 | 3501 | # the proper values into config.h.in to produce config.h. And first: |
1c9dbb83 | 3502 | # Protect against being on the right side of a sed subst in config.status. |
fb589130 | 3503 | # Protect against being in an unquoted here document in config.status. |
b11fb939 KR |
3504 | rm -f conftest.vals |
3505 | cat > conftest.hdr <<\EOF | |
b11fb939 | 3506 | s/[\\&%]/\\&/g |
b11fb939 | 3507 | s%[\\$`]%\\&%g |
df586de2 | 3508 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp |
b11fb939 KR |
3509 | s%ac_d%ac_u%gp |
3510 | s%ac_u%ac_e%gp | |
3511 | EOF | |
3512 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
3513 | rm -f conftest.hdr | |
3514 | ||
3515 | # This sed command replaces #undef with comments. This is necessary, for | |
3516 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
3517 | # on some systems where configure will not decide to define it. | |
3518 | cat >> conftest.vals <<\EOF | |
3519 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
3520 | EOF | |
3521 | ||
3522 | # Break up conftest.vals because some shells have a limit on | |
3523 | # the size of here documents, and old seds have small limits too. | |
b11fb939 KR |
3524 | |
3525 | rm -f conftest.tail | |
3526 | while : | |
3527 | do | |
3528 | ac_lines=`grep -c . conftest.vals` | |
3529 | # grep -c gives empty output for an empty file on some AIX systems. | |
3530 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
3531 | # Write a limited-size here document to conftest.frag. | |
28d3e4a3 KR |
3532 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS |
3533 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
b11fb939 KR |
3534 | echo 'CEOF |
3535 | sed -f conftest.frag conftest.in > conftest.out | |
3536 | rm -f conftest.in | |
3537 | mv conftest.out conftest.in | |
28d3e4a3 | 3538 | ' >> $CONFIG_STATUS |
b11fb939 KR |
3539 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail |
3540 | rm -f conftest.vals | |
3541 | mv conftest.tail conftest.vals | |
3542 | done | |
3543 | rm -f conftest.vals | |
3544 | ||
28d3e4a3 | 3545 | cat >> $CONFIG_STATUS <<\EOF |
b11fb939 KR |
3546 | rm -f conftest.frag conftest.h |
3547 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
3548 | cat conftest.in >> conftest.h | |
3549 | rm -f conftest.in | |
3550 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
3551 | echo "$ac_file is unchanged" | |
3552 | rm -f conftest.h | |
3553 | else | |
df586de2 ILT |
3554 | # Remove last slash and all that follows it. Not all systems have dirname. |
3555 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
3556 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
3557 | # The file is in a subdirectory. | |
3558 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
3559 | fi | |
b11fb939 KR |
3560 | rm -f $ac_file |
3561 | mv conftest.h $ac_file | |
3562 | fi | |
3563 | fi; done | |
3564 | ||
c6c7035c MM |
3565 | EOF |
3566 | cat >> $CONFIG_STATUS <<EOF | |
515c7142 ILT |
3567 | target_cpu_type=${target_cpu_type} |
3568 | obj_format=${obj_format} | |
3569 | te_file=${te_file} | |
c6c7035c MM |
3570 | EOF |
3571 | cat >> $CONFIG_STATUS <<\EOF | |
e2b4bd2a | 3572 | test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h |
515c7142 ILT |
3573 | rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h |
3574 | echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h | |
3575 | echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h | |
3576 | echo '#include "te-'"${te_file}"'.h"' > targ-env.h | |
3577 | echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h | |
39ffbb4d DE |
3578 | case ${target_cpu_type} in |
3579 | m32r) echo '#include "opcodes/'"${target_cpu_type}"'-opc.h"' > cgen-opc.h ;; | |
3580 | esac | |
36e889af | 3581 | exit 0 |
b11fb939 | 3582 | EOF |
28d3e4a3 | 3583 | chmod +x $CONFIG_STATUS |
bf111c9f | 3584 | rm -fr confdefs* $ac_clean_files |
833c46e1 | 3585 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 |
b11fb939 | 3586 |