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