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