]>
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 | |
ec2f730d | 707 | result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $t 2>/dev/null` |
e7757ad0 KR |
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 ;; | |
76fb6d2f | 740 | thumb*) cpu_type=arm endian=little ;; |
e7757ad0 | 741 | hppa*) cpu_type=hppa ;; |
7c2fadd1 | 742 | i[456]86) cpu_type=i386 ;; |
e7757ad0 KR |
743 | m680[012346]0) cpu_type=m68k ;; |
744 | m68008) cpu_type=m68k ;; | |
745 | m683??) cpu_type=m68k ;; | |
746 | m8*) cpu_type=m88k ;; | |
e16b9537 | 747 | mips*el) cpu_type=mips endian=little ;; |
e7757ad0 KR |
748 | mips*) cpu_type=mips endian=big ;; |
749 | powerpcle*) cpu_type=ppc endian=little ;; | |
750 | powerpc*) cpu_type=ppc endian=big ;; | |
751 | rs6000*) cpu_type=ppc ;; | |
6df07e7f | 752 | sparc64) cpu_type=sparc want_sparc_v9=true ;; |
63e4edb5 | 753 | sparc*) cpu_type=sparc ;; |
a1c7c0f3 | 754 | *) cpu_type=${cpu} ;; |
e7757ad0 KR |
755 | esac |
756 | ||
757 | if test ${this_target} = $target ; then | |
758 | target_cpu_type=${cpu_type} | |
759 | elif test ${target_cpu_type} != ${cpu_type} ; then | |
760 | continue | |
761 | fi | |
762 | ||
763 | targ=${cpu_type} | |
764 | generic_target=${cpu_type}-$vendor-$os | |
765 | dev=no | |
766 | bfd_gas=no | |
767 | em=generic | |
768 | ||
769 | # assign object format | |
770 | case ${generic_target} in | |
805e36ab | 771 | a29k-*-coff) fmt=coff targ=ebmon29k ;; |
e7757ad0 KR |
772 | a29k-amd-udi) fmt=coff targ=ebmon29k ;; |
773 | a29k-amd-ebmon) fmt=coff targ=ebmon29k ;; | |
880b7429 | 774 | a29k-nyu-sym1) fmt=coff targ=ebmon29k ;; |
e7757ad0 KR |
775 | a29k-*-vxworks*) fmt=coff ;; |
776 | ||
c6aa56bc | 777 | alpha-*-*vms*) fmt=evax ;; |
e7757ad0 | 778 | alpha-*-netware*) fmt=ecoff ;; |
894cca25 | 779 | alpha-*-openbsd*) fmt=ecoff ;; |
e7757ad0 | 780 | alpha-*-osf*) fmt=ecoff ;; |
df586de2 ILT |
781 | alpha-*-linuxecoff*) fmt=ecoff ;; |
782 | alpha-*-linux*) fmt=elf em=linux ;; | |
b11fb939 | 783 | |
4181c985 | 784 | # start-sanitize-arc |
e7757ad0 | 785 | arc-*-elf*) fmt=elf bfd_gas=yes ;; |
4181c985 KR |
786 | # end-sanitize-arc |
787 | ||
7be9a312 | 788 | arm-*-riscix*) fmt=aout targ=arm-lit em=riscix ;; |
1cb0d00d KR |
789 | arm-*-aout) fmt=aout |
790 | case "$endian" in | |
791 | big) targ=arm-big ;; | |
792 | *) targ=arm-lit ;; | |
793 | esac | |
794 | ;; | |
76fb6d2f | 795 | arm-*-coff | thumb-*-coff) fmt=coff ;; |
e7757ad0 | 796 | arm-*-riscix*) fmt=aout ;; |
1cb0d00d | 797 | arm-*-pe) fmt=coff targ=armcoff em=pe ;; |
e7757ad0 | 798 | |
cbe7dccb | 799 | d10v-*-*) fmt=elf bfd_gas=yes ;; |
7d0f8249 MH |
800 | # start-sanitize-d30v |
801 | d30v-*-*) fmt=elf bfd_gas=yes ;; | |
802 | # end-sanitize-d30v | |
7be9a312 | 803 | |
e7757ad0 KR |
804 | hppa-*-*elf*) fmt=elf em=hppa ;; |
805 | hppa-*-lites*) fmt=elf em=hppa ;; | |
806 | hppa-*-osf*) fmt=som em=hppa ;; | |
332d5c49 | 807 | hppa-*-rtems*) fmt=elf em=hppa ;; |
e7757ad0 KR |
808 | hppa-*-hpux*) fmt=som em=hppa ;; |
809 | hppa-*-bsd*) fmt=som em=hppa ;; | |
810 | hppa-*-hiux*) fmt=som em=hppa ;; | |
811 | ||
812 | h8300-*-coff) fmt=coff ;; | |
813 | ||
814 | i386-ibm-aix*) fmt=coff targ=i386coff | |
815 | em=i386aix ;; | |
7d0f8249 | 816 | i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;; |
e7757ad0 KR |
817 | i386-*-bsd*) fmt=aout em=386bsd ;; |
818 | i386-*-netbsd0.8) fmt=aout em=386bsd ;; | |
819 | i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;; | |
76fb6d2f | 820 | i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;; |
a1c7c0f3 | 821 | i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;; |
e7757ad0 KR |
822 | i386-*-linux*coff*) fmt=coff em=linux |
823 | targ=i386coff ;; | |
824 | i386-*-linux*) fmt=elf em=linux ;; | |
825 | i386-*-lynxos*) fmt=coff targ=i386coff | |
826 | em=lynx ;; | |
2ae5f50b | 827 | i386-*-sysv4* | i386-*-solaris* | i386-*-elf | i386-*-freebsdelf*) |
e7757ad0 | 828 | fmt=elf ;; |
66b935da | 829 | i386-*-sco*elf*) fmt=elf targ=sco5 ;; |
e7757ad0 KR |
830 | i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*) |
831 | fmt=coff targ=i386coff ;; | |
832 | i386-*-vsta) fmt=aout ;; | |
833 | i386-*-go32) fmt=coff targ=i386coff ;; | |
7be9a312 | 834 | i386-*-rtems*) fmt=coff targ=i386coff ;; |
6c186c48 SC |
835 | i386-*-gnu*) fmt=elf ;; |
836 | i386-*-mach*) | |
e7757ad0 KR |
837 | fmt=aout em=mach bfd_gas=yes ;; |
838 | i386-*-msdos*) fmt=aout ;; | |
6c186c48 | 839 | i386-*-moss*) fmt=elf ;; |
d0352cbb | 840 | i386-*-pe) fmt=coff targ=i386coff em=pe ;; |
76fb6d2f | 841 | i386-*-cygwin32) fmt=coff targ=i386coff em=pe bfd_gas=yes ;; |
d0352cbb | 842 | i386-*-*nt) fmt=coff targ=i386coff em=pe ;; |
e7757ad0 KR |
843 | i960-*-bout) fmt=bout ;; |
844 | i960-*-coff) fmt=coff em=ic960 targ=ic960coff ;; | |
7be9a312 | 845 | i960-*-rtems*) fmt=coff em=ic960 targ=ic960coff ;; |
e7757ad0 KR |
846 | i960-*-nindy*) fmt=bout ;; |
847 | i960-*-vxworks4*) fmt=bout ;; | |
848 | i960-*-vxworks5.0) fmt=bout ;; | |
849 | i960-*-vxworks5.*) fmt=coff em=ic960 targ=ic960coff ;; | |
850 | i960-*-vxworks*) fmt=bout ;; | |
851 | ||
374bdac7 DE |
852 | m32r-*-*) fmt=elf bfd_gas=yes ;; |
853 | ||
e7757ad0 KR |
854 | m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*) |
855 | fmt=aout em=sun3 ;; | |
880b7429 | 856 | m68k-motorola-sysv*) fmt=coff targ=m68kcoff em=delta ;; |
e7757ad0 KR |
857 | m68k-bull-sysv3*) fmt=coff targ=m68kcoff em=dpx2 ;; |
858 | m68k-apollo-*) fmt=coff targ=apollo em=apollo ;; | |
fee3e248 ILT |
859 | m68k-*-sysv4*) # must be before -sysv* |
860 | fmt=elf em=svr4 ;; | |
861 | m68k-*-elf*) fmt=elf ;; | |
7be9a312 | 862 | m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*) |
e7757ad0 | 863 | fmt=coff targ=m68kcoff ;; |
e7757ad0 | 864 | m68k-*-hpux*) fmt=hp300 em=hp300 ;; |
535cfd0f ILT |
865 | m68k-*-linux*aout*) fmt=aout em=linux ;; |
866 | m68k-*-linux*) fmt=elf em=linux ;; | |
e7757ad0 KR |
867 | m68k-*-lynxos*) fmt=coff targ=m68kcoff |
868 | em=lynx ;; | |
869 | m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; | |
76fb6d2f | 870 | m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;; |
2b37714a ILT |
871 | m68k-apple-aux*) fmt=coff targ=m68kcoff em=aux ;; |
872 | m68k-*-psos*) fmt=elf em=psos;; | |
e7757ad0 | 873 | |
880b7429 | 874 | m88k-motorola-sysv3*) fmt=coff targ=m88kcoff em=delt88 ;; |
e7757ad0 KR |
875 | m88k-*-coff*) fmt=coff targ=m88kcoff ;; |
876 | ||
877 | # don't change em like *-*-bsd does | |
4cbbec31 | 878 | mips-dec-netbsd*) fmt=elf targ=mips-lit endian=little ;; |
76fb6d2f | 879 | mips-dec-openbsd*) fmt=elf targ=mips-lit endian=little ;; |
e7757ad0 KR |
880 | mips-dec-bsd*) fmt=aout targ=mips-lit ;; |
881 | mips-sony-bsd*) fmt=ecoff targ=mips-big ;; | |
882 | mips-*-bsd*) { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;; | |
70f4dbce | 883 | mips-*-ultrix*) fmt=ecoff targ=mips-lit endian=little ;; |
7be9a312 | 884 | mips-*-osf*) fmt=ecoff targ=mips-lit endian=little ;; |
e7757ad0 KR |
885 | mips-*-ecoff*) fmt=ecoff |
886 | case "$endian" in | |
887 | big) targ=mips-big ;; | |
888 | *) targ=mips-lit ;; | |
889 | esac | |
890 | ;; | |
891 | mips-*-ecoff*) fmt=ecoff targ=mips-big ;; | |
cbe7dccb | 892 | mips-*-irix6*) fmt=elf targ=mips-big ;; |
e7757ad0 KR |
893 | mips-*-irix5*) fmt=elf targ=mips-big ;; |
894 | mips-*-irix*) fmt=ecoff targ=mips-big ;; | |
515c7142 | 895 | mips-*-lnews*) fmt=ecoff targ=mips-lit em=lnews ;; |
e7757ad0 KR |
896 | mips-*-riscos*) fmt=ecoff targ=mips-big ;; |
897 | mips-*-sysv*) fmt=ecoff targ=mips-big ;; | |
fc984eb0 | 898 | mips-*-elf* | mips-*-rtems* | mips-*-linux* | mips-*-gnu* | mips-*-openbsd*) |
fed13a5e | 899 | fmt=elf |
e7757ad0 KR |
900 | case "$endian" in |
901 | big) targ=mips-big ;; | |
902 | *) targ=mips-lit ;; | |
903 | esac | |
904 | ;; | |
ae1b99e4 JL |
905 | mn10200-*-*) fmt=elf bfd_gas=yes ;; |
906 | mn10300-*-*) fmt=elf bfd_gas=yes ;; | |
0ff513d9 SC |
907 | ppc-*-pe | ppc-*-cygwin32 | ppc-*-winnt*) |
908 | fmt=coff em=pe | |
85cc2190 KK |
909 | case "$endian" in |
910 | big) targ=ppc-big ;; | |
911 | *) targ=ppc-lit ;; | |
912 | esac | |
913 | ;; | |
e7757ad0 | 914 | ppc-*-aix*) fmt=coff ;; |
515c7142 | 915 | ppc-*-beos*) fmt=coff ;; |
76fb6d2f | 916 | ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*) |
e7757ad0 KR |
917 | fmt=elf |
918 | case "$endian" in | |
919 | big) targ=ppc-big ;; | |
920 | *) targ=ppc-lit ;; | |
921 | esac | |
922 | ;; | |
159e6ef8 MM |
923 | ppc-*-linux*) fmt=elf |
924 | case "$endian" in | |
925 | big) targ=ppc-big ;; | |
926 | *) { echo "configure: error: Linux must be configured big endian" 1>&2; exit 1; } ;; | |
927 | esac | |
928 | ;; | |
929 | ppc-*-solaris*) fmt=elf | |
930 | case "$endian" in | |
931 | big) { echo "configure: error: Solaris must be configured little endian" 1>&2; exit 1; } ;; | |
932 | *) targ=ppc-sol ;; | |
933 | esac | |
934 | ;; | |
7be9a312 MH |
935 | ppc-*-rtems*) |
936 | fmt=elf | |
937 | case "$endian" in | |
938 | big) targ=ppc-big ;; | |
939 | *) targ=ppc-lit ;; | |
940 | esac | |
941 | ;; | |
880b7429 KR |
942 | ppc-*-macos* | ppc-*-mpw*) |
943 | fmt=coff em=macos ;; | |
e7757ad0 KR |
944 | ppc-*-netware*) fmt=elf em=ppcnw ;; |
945 | ||
df4021c1 DE |
946 | sh-*-elf*) fmt=elf ;; |
947 | sh-*-coff*) fmt=coff ;; | |
b11fb939 | 948 | |
5f757edc ILT |
949 | ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;; |
950 | ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;; | |
76fb6d2f | 951 | ns32k-pc532-openbsd*) fmt=aout em=nbsd532 ;; |
e7757ad0 | 952 | |
7be9a312 | 953 | sparc-*-rtems*) fmt=aout ;; |
e7757ad0 | 954 | sparc-*-sunos4*) fmt=aout em=sun3 ;; |
df586de2 | 955 | sparc-*-aout | sparc*-*-vxworks*) |
df4021c1 | 956 | fmt=aout em=sparcaout ;; |
e7757ad0 | 957 | sparc-*-coff) fmt=coff ;; |
2e013bb7 ILT |
958 | sparc-*-linux*aout*) fmt=aout em=linux ;; |
959 | sparc-*-linux*) fmt=elf em=linux ;; | |
e7757ad0 KR |
960 | sparc-*-lynxos*) fmt=coff em=lynx ;; |
961 | sparc-fujitsu-none) fmt=aout ;; | |
0b27ea39 | 962 | sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*) |
e7757ad0 KR |
963 | fmt=elf ;; |
964 | sparc-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; | |
76fb6d2f | 965 | sparc-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;; |
e7757ad0 | 966 | |
64556643 | 967 | # start-sanitize-tic80 |
7d0f8249 | 968 | tic80-*-*) fmt=coff targ=tic80coff;; |
64556643 | 969 | # end-sanitize-tic80 |
ec2f730d | 970 | # start-sanitize-v850 |
c6aa56bc C |
971 | v850-*-*) fmt=elf bfd_gas=yes ;; |
972 | ||
ec2f730d | 973 | # end-sanitize-v850 |
e7757ad0 KR |
974 | vax-*-bsd* | vax-*-ultrix*) |
975 | fmt=aout ;; | |
976 | vax-*-vms) fmt=vms ;; | |
977 | ||
978 | z8k-*-coff | z8k-*-sim) | |
979 | fmt=coff ;; | |
980 | ||
981 | w65-*-*) fmt=coff ;; | |
982 | ||
983 | *-*-aout | *-*-scout) | |
984 | fmt=aout ;; | |
985 | *-*-nindy*) | |
986 | fmt=bout ;; | |
987 | *-*-bsd*) | |
988 | fmt=aout em=sun3 ;; | |
989 | *-*-generic) fmt=generic ;; | |
990 | *-*-xray | *-*-hms) fmt=coff ;; | |
991 | *-*-sim) fmt=coff ;; | |
992 | *-*-elf | *-*-sysv4* | *-*-solaris*) | |
6df07e7f | 993 | echo "configure: warning: GAS support for ${generic_target} is incomplete." 1>&2 |
e7757ad0 KR |
994 | fmt=elf dev=yes ;; |
995 | *-*-vxworks) fmt=aout ;; | |
996 | *-*-netware) fmt=elf ;; | |
997 | esac | |
998 | ||
999 | case ${cpu_type}-${fmt} in | |
df586de2 | 1000 | alpha-*) bfd_gas=yes ;; |
e7757ad0 KR |
1001 | arm-*) bfd_gas=yes ;; |
1002 | # not yet | |
1003 | # i386-aout) bfd_gas=preferred ;; | |
1004 | mips-*) bfd_gas=yes ;; | |
1005 | ns32k-*) bfd_gas=yes ;; | |
1006 | ppc-*) bfd_gas=yes ;; | |
1007 | sparc-*) bfd_gas=yes ;; | |
1008 | *-elf) bfd_gas=yes ;; | |
1009 | *-ecoff) bfd_gas=yes ;; | |
1010 | *-som) bfd_gas=yes ;; | |
1011 | *) ;; | |
1012 | esac | |
1013 | ||
5f757edc ILT |
1014 | # Other random stuff. |
1015 | ||
ae09d880 ILT |
1016 | # do we need the opcodes library? |
1017 | case ${cpu_type} in | |
df586de2 | 1018 | vax | i386) |
7c2fadd1 ILT |
1019 | ;; |
1020 | *) | |
1021 | need_opcodes=yes | |
159e6ef8 | 1022 | if test "${shared_opcodes}" = "true"; then |
7c2fadd1 ILT |
1023 | # A shared libopcodes must be linked against libbfd. |
1024 | need_bfd=yes | |
1025 | fi | |
1026 | ;; | |
ae09d880 ILT |
1027 | esac |
1028 | ||
6df07e7f DE |
1029 | test -n "$want_sparc_v9" && cat >> confdefs.h <<\EOF |
1030 | #define SPARC_V9 1 | |
5f757edc ILT |
1031 | EOF |
1032 | ||
1033 | ||
6df07e7f DE |
1034 | case ${cpu}-${vendor}-${os} in |
1035 | sparc64-*-elf*) cat >> confdefs.h <<\EOF | |
1036 | #define SPARC_ARCH64 1 | |
1037 | EOF | |
1038 | ;; | |
1039 | esac | |
1040 | ||
5f757edc | 1041 | case ${cpu_type} in |
374bdac7 DE |
1042 | m32r) |
1043 | case ${extra_objects} in | |
1044 | *cgen.o*) ;; | |
1045 | *) extra_objects="$extra_objects cgen.o" | |
374bdac7 DE |
1046 | cat >> confdefs.h <<\EOF |
1047 | #define USING_CGEN 1 | |
1048 | EOF | |
1049 | ||
1050 | ;; | |
1051 | esac | |
1052 | ;; | |
1053 | ||
1c9dbb83 ILT |
1054 | m68k) |
1055 | case ${extra_objects} in | |
1056 | *m68k-parse.o*) ;; | |
1057 | *) extra_objects="$extra_objects m68k-parse.o" ;; | |
1058 | esac | |
1059 | ;; | |
efec4a28 DP |
1060 | |
1061 | mips) | |
1062 | echo ${extra_objects} | grep -s "itbl-parse.o" | |
1063 | if test $? -ne 0 ; then | |
515c7142 | 1064 | extra_objects="$extra_objects itbl-parse.o" |
efec4a28 DP |
1065 | fi |
1066 | ||
1067 | echo ${extra_objects} | grep -s "itbl-lex.o" | |
1068 | if test $? -ne 0 ; then | |
515c7142 | 1069 | extra_objects="$extra_objects itbl-lex.o" |
efec4a28 DP |
1070 | fi |
1071 | ||
1072 | echo ${extra_objects} | grep -s "itbl-ops.o" | |
1073 | if test $? -ne 0 ; then | |
515c7142 | 1074 | extra_objects="$extra_objects itbl-ops.o" |
efec4a28 DP |
1075 | fi |
1076 | ;; | |
1077 | ||
1078 | *) | |
1079 | ;; | |
5f757edc ILT |
1080 | esac |
1081 | ||
e7757ad0 KR |
1082 | # See if we really can support this configuration with the emulation code. |
1083 | ||
1084 | if test $this_target = $target ; then | |
1085 | primary_bfd_gas=$bfd_gas | |
1086 | obj_format=$fmt | |
1087 | gas_target=$targ | |
1088 | te_file=$em | |
1089 | ||
1090 | if test $bfd_gas = no ; then | |
1091 | # Can't support other configurations this way. | |
1092 | break | |
1093 | fi | |
1094 | elif test $bfd_gas = no ; then | |
1095 | # Can't support this configuration. | |
1096 | break | |
1097 | fi | |
1098 | ||
1099 | # From target name and format, produce a list of supported emulations. | |
1100 | ||
1101 | case ${generic_target}-${fmt} in | |
1cb0d00d | 1102 | mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;; |
515c7142 ILT |
1103 | mips-*-linux*-*) case "$endian" in |
1104 | big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;; | |
1105 | *) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;; | |
1106 | esac ;; | |
1107 | mips-*-lnews*-ecoff) ;; | |
e7757ad0 | 1108 | mips-*-*-ecoff) case "$endian" in |
1cb0d00d KR |
1109 | big) emulation="mipsbecoff mipslecoff mipsecoff" ;; |
1110 | *) emulation="mipslecoff mipsbecoff mipsecoff" ;; | |
e7757ad0 KR |
1111 | esac ;; |
1112 | mips-*-*-elf) case "$endian" in | |
1cb0d00d KR |
1113 | big) emulation="mipsbelf mipslelf mipself" ;; |
1114 | *) emulation="mipslelf mipsbelf mipself" ;; | |
515c7142 ILT |
1115 | # Uncommenting the next line will turn on support for i386 COFF |
1116 | # in any i386 ELF configuration. This probably doesn't work | |
1117 | # correctly. | |
1118 | # i386-*-*-elf) emulation="i386coff i386elf" ;; | |
e7757ad0 KR |
1119 | esac ;; |
1120 | esac | |
1121 | ||
1122 | emulations="$emulations $emulation" | |
1123 | ||
e7757ad0 | 1124 | done |
b11fb939 KR |
1125 | |
1126 | # Assign floating point type. Most processors with FP support | |
1127 | # IEEE FP. On those that don't support FP at all, usually IEEE | |
1128 | # is emulated. | |
1129 | case ${target_cpu} in | |
1130 | vax | tahoe ) atof=${target_cpu} ;; | |
e7757ad0 | 1131 | *) atof=ieee ;; |
b11fb939 KR |
1132 | esac |
1133 | ||
1134 | case "${obj_format}" in | |
ba49e48d | 1135 | "") { echo "configure: error: GAS does not know what format to use for target ${target}" 1>&2; exit 1; } ;; |
b11fb939 KR |
1136 | esac |
1137 | ||
1138 | ||
bf4bd1fc ILT |
1139 | if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then |
1140 | { echo "configure: error: GAS does not support target CPU ${target_cpu_type}" 1>&2; exit 1; } | |
b11fb939 KR |
1141 | fi |
1142 | ||
fb589130 | 1143 | if test ! -r ${srcdir}/config/obj-${obj_format}.c; then |
ba49e48d | 1144 | { echo "configure: error: GAS does not have support for object file format ${obj_format}" 1>&2; exit 1; } |
b11fb939 KR |
1145 | fi |
1146 | ||
b11fb939 KR |
1147 | # and target makefile frag |
1148 | ||
1149 | target_frag=${srcdir}/config/${gas_target}.mt | |
f2889110 KR |
1150 | if test ! -r ${target_frag}; then |
1151 | target_frag=/dev/null # ick! but subst_file can't be conditionalized | |
1152 | fi | |
b11fb939 | 1153 | |
4cbbec31 | 1154 | |
e7757ad0 | 1155 | case ${user_bfd_gas}-${primary_bfd_gas} in |
b11fb939 KR |
1156 | yes-yes | no-no) |
1157 | # We didn't override user's choice. | |
1158 | ;; | |
1159 | no-yes) | |
1160 | echo "configure: warning: Use of BFD is required for ${target}; overriding config options." 1>&2 | |
1161 | ;; | |
1162 | no-preferred) | |
e7757ad0 | 1163 | primary_bfd_gas=no |
b11fb939 KR |
1164 | ;; |
1165 | *-preferred) | |
e7757ad0 | 1166 | primary_bfd_gas=yes |
b11fb939 | 1167 | ;; |
ba49e48d | 1168 | yes-*) |
e7757ad0 | 1169 | primary_bfd_gas=yes |
ba49e48d | 1170 | ;; |
b11fb939 KR |
1171 | -*) |
1172 | # User specified nothing. | |
1173 | ;; | |
1174 | esac | |
1175 | ||
e7757ad0 KR |
1176 | # Some COFF configurations want these random other flags set. |
1177 | case ${obj_format} in | |
1178 | coff) | |
1179 | case ${target_cpu_type} in | |
1180 | i386) cat >> confdefs.h <<\EOF | |
1181 | #define I386COFF 1 | |
1182 | EOF | |
1183 | ;; | |
1184 | m68k) cat >> confdefs.h <<\EOF | |
1185 | #define M68KCOFF 1 | |
1186 | EOF | |
1187 | ;; | |
1188 | m88k) cat >> confdefs.h <<\EOF | |
1189 | #define M88KCOFF 1 | |
1190 | EOF | |
1191 | ;; | |
1192 | esac | |
1193 | ;; | |
1194 | esac | |
1195 | ||
1196 | # Getting this done right is going to be a bitch. Each configuration specified | |
1197 | # with --enable-targets=... should be checked for environment, format, cpu, and | |
1198 | # bfd_gas setting. | |
1199 | # | |
1200 | # For each configuration, the necessary object file support code must be linked | |
1201 | # in. This might be only one, it might be up to four. The necessary emulation | |
1202 | # code needs to be provided, too. | |
1203 | # | |
1204 | # And then there's "--enable-targets=all".... | |
1205 | # | |
1206 | # For now, just always do it for MIPS ELF or ECOFF configurations. Sigh. | |
1207 | ||
1208 | formats="${obj_format}" | |
1209 | emfiles="" | |
1210 | EMULATIONS="" | |
1211 | _gas_uniq_list="$emulations" | |
1212 | _gas_uniq_newlist="" | |
1213 | for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do | |
1214 | case $_gas_uniq_i in | |
1215 | _gas_uniq_dummy) ;; | |
1216 | *) case " $_gas_uniq_newlist " in | |
1217 | *" $_gas_uniq_i "*) ;; | |
1218 | *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;; | |
1219 | esac ;; | |
1220 | esac | |
1221 | done | |
1222 | emulations=$_gas_uniq_newlist | |
1223 | ||
1224 | for em in . $emulations ; do | |
1225 | case $em in | |
1226 | .) continue ;; | |
1227 | mipsbelf | mipslelf) | |
1228 | fmt=elf file=mipself ;; | |
1229 | mipsbecoff | mipslecoff) | |
1230 | fmt=ecoff file=mipsecoff ;; | |
515c7142 ILT |
1231 | i386coff) |
1232 | fmt=coff file=i386coff ;; | |
1233 | i386elf) | |
1234 | fmt=elf file=i386elf ;; | |
e7757ad0 KR |
1235 | esac |
1236 | formats="$formats $fmt" | |
1237 | emfiles="$emfiles e-$file.o" | |
1238 | EMULATIONS="$EMULATIONS &$em," | |
1239 | done | |
1240 | _gas_uniq_list="$formats" | |
1241 | _gas_uniq_newlist="" | |
1242 | for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do | |
1243 | case $_gas_uniq_i in | |
1244 | _gas_uniq_dummy) ;; | |
1245 | *) case " $_gas_uniq_newlist " in | |
1246 | *" $_gas_uniq_i "*) ;; | |
1247 | *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;; | |
1248 | esac ;; | |
1249 | esac | |
1250 | done | |
1251 | formats=$_gas_uniq_newlist | |
1252 | ||
1253 | _gas_uniq_list="$emfiles" | |
1254 | _gas_uniq_newlist="" | |
1255 | for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do | |
1256 | case $_gas_uniq_i in | |
1257 | _gas_uniq_dummy) ;; | |
1258 | *) case " $_gas_uniq_newlist " in | |
1259 | *" $_gas_uniq_i "*) ;; | |
1260 | *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;; | |
1261 | esac ;; | |
1262 | esac | |
1263 | done | |
1264 | emfiles=$_gas_uniq_newlist | |
1265 | ||
1266 | if test `set . $formats ; shift ; echo $#` -gt 1 ; then | |
1267 | for fmt in $formats ; do | |
1268 | case $fmt in | |
1269 | aout) cat >> confdefs.h <<\EOF | |
1270 | #define OBJ_MAYBE_AOUT 1 | |
1271 | EOF | |
1272 | ;; | |
1273 | bout) cat >> confdefs.h <<\EOF | |
1274 | #define OBJ_MAYBE_BOUT 1 | |
1275 | EOF | |
1276 | ;; | |
1277 | coff) cat >> confdefs.h <<\EOF | |
1278 | #define OBJ_MAYBE_COFF 1 | |
1279 | EOF | |
1280 | ;; | |
1281 | ecoff) cat >> confdefs.h <<\EOF | |
1282 | #define OBJ_MAYBE_ECOFF 1 | |
1283 | EOF | |
1284 | ;; | |
1285 | elf) cat >> confdefs.h <<\EOF | |
1286 | #define OBJ_MAYBE_ELF 1 | |
1287 | EOF | |
1288 | ;; | |
1289 | generic) cat >> confdefs.h <<\EOF | |
1290 | #define OBJ_MAYBE_GENERIC 1 | |
1291 | EOF | |
1292 | ;; | |
1293 | hp300) cat >> confdefs.h <<\EOF | |
1294 | #define OBJ_MAYBE_HP300 1 | |
1295 | EOF | |
1296 | ;; | |
1297 | ieee) cat >> confdefs.h <<\EOF | |
1298 | #define OBJ_MAYBE_IEEE 1 | |
1299 | EOF | |
1300 | ;; | |
1301 | som) cat >> confdefs.h <<\EOF | |
1302 | #define OBJ_MAYBE_SOM 1 | |
1303 | EOF | |
1304 | ;; | |
1305 | vms) cat >> confdefs.h <<\EOF | |
1306 | #define OBJ_MAYBE_VMS 1 | |
1307 | EOF | |
1308 | ;; | |
1309 | esac | |
1310 | extra_objects="$extra_objects obj-$fmt.o" | |
1311 | done | |
1312 | obj_format=multi | |
1313 | fi | |
1314 | if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then | |
1315 | te_file=multi | |
1316 | extra_objects="$extra_objects $emfiles" | |
1317 | DEFAULT_EMULATION=`set . $emulations ; echo $2` | |
1318 | cat >> confdefs.h <<\EOF | |
1319 | #define USE_EMULATIONS 1 | |
1320 | EOF | |
1321 | ||
1322 | fi | |
1323 | ||
1324 | cat >> confdefs.h <<EOF | |
1325 | #define EMULATIONS $EMULATIONS | |
1326 | EOF | |
1327 | ||
1328 | cat >> confdefs.h <<EOF | |
1329 | #define DEFAULT_EMULATION "$DEFAULT_EMULATION" | |
1330 | EOF | |
1331 | ||
1332 | ||
bf4bd1fc | 1333 | case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in |
318b02b6 KR |
1334 | yes-*-coff) need_bfd=yes ;; |
1335 | no-*-coff) need_bfd=yes | |
1336 | cat >> confdefs.h <<\EOF | |
1337 | #define MANY_SEGMENTS 1 | |
1338 | EOF | |
1339 | ;; | |
1340 | esac | |
1341 | ||
b11fb939 KR |
1342 | reject_dev_configs=yes |
1343 | ||
1344 | case ${reject_dev_configs}-${dev} in | |
1345 | yes-yes) # Oops. | |
ba49e48d | 1346 | { echo "configure: error: GAS does not support the ${generic_target} configuration." 1>&2; exit 1; } |
b11fb939 KR |
1347 | ;; |
1348 | esac | |
1349 | ||
b11fb939 KR |
1350 | |
1351 | ||
833c46e1 KR |
1352 | |
1353 | ||
1354 | ||
e7757ad0 | 1355 | case "${primary_bfd_gas}" in |
b11fb939 KR |
1356 | yes) cat >> confdefs.h <<\EOF |
1357 | #define BFD_ASSEMBLER 1 | |
1358 | EOF | |
1359 | ||
1360 | need_bfd=yes ;; | |
1361 | esac | |
1362 | ||
ae09d880 ILT |
1363 | # do we need the opcodes library? |
1364 | case "${need_opcodes}" in | |
7be9a312 MH |
1365 | yes) |
1366 | OPCODES_DEP=../opcodes/libopcodes.a | |
1367 | OPCODES_LIB='-L../opcodes -lopcodes' | |
ae09d880 | 1368 | |
7be9a312 MH |
1369 | # We need to handle some special cases for shared libraries. |
1370 | case "${host}" in | |
1371 | *-*-sunos*) | |
1372 | # On SunOS, we must link against the name we are going to install, | |
1373 | # not -lbfd, since SunOS does not support SONAME. | |
159e6ef8 | 1374 | if test "${shared_opcodes}" = "true"; then |
ae09d880 | 1375 | OPCODES_LIB='-L../opcodes -l`echo opcodes | sed '"'"'$(program_transform_name)'"'"'`' |
ae09d880 ILT |
1376 | fi |
1377 | ;; | |
7be9a312 MH |
1378 | alpha*-*-osf*) |
1379 | # On Alpha OSF/1, the native linker searches all the -L | |
1380 | # directories for any LIB.so files, and only then searches for any | |
1381 | # LIB.a files. That means that if there is an installed | |
1382 | # libbfd.so, but this build is not done with --enable-shared, the | |
1383 | # link will wind up being against the install libbfd.so rather | |
1384 | # than the newly built libbfd. To avoid this, we must explicitly | |
1385 | # link against libbfd.a when --enable-shared is not used. | |
1386 | if test "${shared_opcodes}" != "true"; then | |
1387 | OPCODES_LIB='../opcodes/libopcodes.a' | |
1388 | fi | |
1389 | ;; | |
1390 | esac | |
1391 | ;; | |
ae09d880 ILT |
1392 | esac |
1393 | ||
b11fb939 | 1394 | case "${need_bfd}" in |
7be9a312 MH |
1395 | yes) |
1396 | BFDDEP=../bfd/libbfd.a | |
1397 | BFDLIB='-L../bfd -lbfd' | |
1398 | ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h" | |
ae09d880 | 1399 | |
7be9a312 MH |
1400 | # We need to handle some special cases for shared libraries |
1401 | case "${host}" in | |
1402 | *-*-sunos*) | |
1403 | # On SunOS, we must link against the name we are going to install, | |
1404 | # not -lbfd, since SunOS does not support SONAME. | |
159e6ef8 | 1405 | if test "${shared_bfd}" = "true"; then |
7be9a312 MH |
1406 | BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`' |
1407 | fi | |
1408 | ;; | |
1409 | alpha*-*-osf*) | |
1410 | # On Alpha OSF/1, the native linker searches all the -L | |
1411 | # directories for any LIB.so files, and only then searches for any | |
1412 | # LIB.a files. That means that if there is an installed | |
1413 | # libbfd.so, but this build is not done with --enable-shared, the | |
1414 | # link will wind up being against the install libbfd.so rather | |
1415 | # than the newly built libbfd. To avoid this, we must explicitly | |
1416 | # link against libbfd.a when --enable-shared is not used. | |
1417 | if test "${shared_bfd}" != "true"; then | |
1418 | BFDLIB='../bfd/libbfd.a' | |
ae09d880 ILT |
1419 | fi |
1420 | ;; | |
7be9a312 | 1421 | esac |
2e013bb7 ILT |
1422 | |
1423 | if test "${commonbfdlib}" = "true"; then | |
1424 | # when a shared libbfd is built with --enable-commonbfdlib, | |
1425 | # all of libopcodes is available in libbfd.so | |
1426 | OPCODES_LIB= | |
1427 | fi | |
7be9a312 | 1428 | ;; |
b11fb939 KR |
1429 | esac |
1430 | ||
1431 | ||
1432 | ||
1c9dbb83 | 1433 | |
2e013bb7 ILT |
1434 | |
1435 | ||
1436 | ||
1437 | ||
b11fb939 KR |
1438 | cat >> confdefs.h <<EOF |
1439 | #define TARGET_ALIAS "${target_alias}" | |
1440 | EOF | |
1441 | ||
1442 | cat >> confdefs.h <<EOF | |
1443 | #define TARGET_CANONICAL "${target}" | |
1444 | EOF | |
1445 | ||
1446 | cat >> confdefs.h <<EOF | |
1447 | #define TARGET_CPU "${target_cpu}" | |
1448 | EOF | |
1449 | ||
1450 | cat >> confdefs.h <<EOF | |
1451 | #define TARGET_VENDOR "${target_vendor}" | |
1452 | EOF | |
1453 | ||
1454 | cat >> confdefs.h <<EOF | |
1455 | #define TARGET_OS "${target_os}" | |
1456 | EOF | |
1457 | ||
1458 | ||
330add8a ILT |
1459 | # Extract the first word of "gcc", so it can be a program name with args. |
1460 | set dummy gcc; ac_word=$2 | |
1461 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
76fb6d2f | 1462 | echo "configure:1463: checking for $ac_word" >&5 |
330add8a ILT |
1463 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1464 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1465 | else | |
1466 | if test -n "$CC"; then | |
1467 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1468 | else | |
1469 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1470 | for ac_dir in $PATH; do | |
1471 | test -z "$ac_dir" && ac_dir=. | |
1472 | if test -f $ac_dir/$ac_word; then | |
1473 | ac_cv_prog_CC="gcc" | |
1474 | break | |
1475 | fi | |
1476 | done | |
1477 | IFS="$ac_save_ifs" | |
330add8a ILT |
1478 | fi |
1479 | fi | |
1480 | CC="$ac_cv_prog_CC" | |
1481 | if test -n "$CC"; then | |
1482 | echo "$ac_t""$CC" 1>&6 | |
1483 | else | |
1484 | echo "$ac_t""no" 1>&6 | |
1485 | fi | |
1486 | ||
d0352cbb DE |
1487 | if test -z "$CC"; then |
1488 | # Extract the first word of "cc", so it can be a program name with args. | |
1489 | set dummy cc; ac_word=$2 | |
1490 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
76fb6d2f | 1491 | echo "configure:1492: checking for $ac_word" >&5 |
d0352cbb DE |
1492 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1493 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1494 | else | |
1495 | if test -n "$CC"; then | |
1496 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1497 | else | |
1498 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1499 | ac_prog_rejected=no | |
1500 | for ac_dir in $PATH; do | |
1501 | test -z "$ac_dir" && ac_dir=. | |
1502 | if test -f $ac_dir/$ac_word; then | |
1503 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
1504 | ac_prog_rejected=yes | |
1505 | continue | |
1506 | fi | |
1507 | ac_cv_prog_CC="cc" | |
1508 | break | |
1509 | fi | |
1510 | done | |
1511 | IFS="$ac_save_ifs" | |
1512 | if test $ac_prog_rejected = yes; then | |
1513 | # We found a bogon in the path, so make sure we never use it. | |
1514 | set dummy $ac_cv_prog_CC | |
1515 | shift | |
1516 | if test $# -gt 0; then | |
1517 | # We chose a different compiler from the bogus one. | |
1518 | # However, it has the same basename, so the bogon will be chosen | |
1519 | # first if we set CC to just the basename; use the full file name. | |
1520 | shift | |
1521 | set dummy "$ac_dir/$ac_word" "$@" | |
1522 | shift | |
1523 | ac_cv_prog_CC="$@" | |
1524 | fi | |
1525 | fi | |
1526 | fi | |
1527 | fi | |
1528 | CC="$ac_cv_prog_CC" | |
1529 | if test -n "$CC"; then | |
1530 | echo "$ac_t""$CC" 1>&6 | |
1531 | else | |
1532 | echo "$ac_t""no" 1>&6 | |
1533 | fi | |
1534 | ||
1535 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
1536 | fi | |
b11fb939 | 1537 | |
c6c7035c | 1538 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
76fb6d2f | 1539 | echo "configure:1540: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
c6c7035c MM |
1540 | |
1541 | ac_ext=c | |
1542 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1543 | ac_cpp='$CPP $CPPFLAGS' | |
1544 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1545 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1546 | cross_compiling=$ac_cv_prog_cc_cross | |
1547 | ||
1548 | cat > conftest.$ac_ext <<EOF | |
76fb6d2f | 1549 | #line 1550 "configure" |
c6c7035c MM |
1550 | #include "confdefs.h" |
1551 | main(){return(0);} | |
1552 | EOF | |
76fb6d2f | 1553 | if { (eval echo configure:1554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
c6c7035c MM |
1554 | ac_cv_prog_cc_works=yes |
1555 | # If we can't run a trivial program, we are probably using a cross compiler. | |
1556 | if (./conftest; exit) 2>/dev/null; then | |
1557 | ac_cv_prog_cc_cross=no | |
1558 | else | |
1559 | ac_cv_prog_cc_cross=yes | |
1560 | fi | |
1561 | else | |
1562 | echo "configure: failed program was:" >&5 | |
1563 | cat conftest.$ac_ext >&5 | |
1564 | ac_cv_prog_cc_works=no | |
1565 | fi | |
1566 | rm -fr conftest* | |
1567 | ||
1568 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
1569 | if test $ac_cv_prog_cc_works = no; then | |
1570 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
1571 | fi | |
1572 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
76fb6d2f | 1573 | echo "configure:1574: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
c6c7035c MM |
1574 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
1575 | cross_compiling=$ac_cv_prog_cc_cross | |
1576 | ||
330add8a | 1577 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
76fb6d2f | 1578 | echo "configure:1579: checking whether we are using GNU C" >&5 |
330add8a ILT |
1579 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
1580 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1581 | else | |
1582 | cat > conftest.c <<EOF | |
b11fb939 | 1583 | #ifdef __GNUC__ |
330add8a | 1584 | yes; |
b11fb939 KR |
1585 | #endif |
1586 | EOF | |
76fb6d2f | 1587 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
330add8a ILT |
1588 | ac_cv_prog_gcc=yes |
1589 | else | |
1590 | ac_cv_prog_gcc=no | |
1591 | fi | |
1592 | fi | |
1c9dbb83 | 1593 | |
330add8a | 1594 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
c6c7035c | 1595 | |
330add8a | 1596 | if test $ac_cv_prog_gcc = yes; then |
b11fb939 | 1597 | GCC=yes |
c6c7035c MM |
1598 | ac_test_CFLAGS="${CFLAGS+set}" |
1599 | ac_save_CFLAGS="$CFLAGS" | |
1600 | CFLAGS= | |
1601 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
76fb6d2f | 1602 | echo "configure:1603: checking whether ${CC-cc} accepts -g" >&5 |
c6c7035c | 1603 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
330add8a | 1604 | echo $ac_n "(cached) $ac_c" 1>&6 |
b11fb939 | 1605 | else |
330add8a ILT |
1606 | echo 'void f(){}' > conftest.c |
1607 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
c6c7035c | 1608 | ac_cv_prog_cc_g=yes |
330add8a | 1609 | else |
c6c7035c | 1610 | ac_cv_prog_cc_g=no |
b11fb939 KR |
1611 | fi |
1612 | rm -f conftest* | |
1613 | ||
330add8a | 1614 | fi |
1c9dbb83 | 1615 | |
c6c7035c MM |
1616 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
1617 | if test "$ac_test_CFLAGS" = set; then | |
1618 | CFLAGS="$ac_save_CFLAGS" | |
1619 | elif test $ac_cv_prog_cc_g = yes; then | |
1620 | CFLAGS="-g -O2" | |
1621 | else | |
1622 | CFLAGS="-O2" | |
330add8a ILT |
1623 | fi |
1624 | else | |
1625 | GCC= | |
1626 | test "${CFLAGS+set}" = set || CFLAGS="-g" | |
1627 | fi | |
1628 | ||
bf111c9f KR |
1629 | # Find a good install program. We prefer a C program (faster), |
1630 | # so one script is as good as another. But avoid the broken or | |
1631 | # incompatible versions: | |
b11fb939 KR |
1632 | # SysV /etc/install, /usr/sbin/install |
1633 | # SunOS /usr/etc/install | |
1634 | # IRIX /sbin/install | |
1635 | # AIX /bin/install | |
1636 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
1637 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
1638 | # ./install, which can be erroneously created by make from ./install.sh. | |
833c46e1 | 1639 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
76fb6d2f | 1640 | echo "configure:1641: checking for a BSD compatible install" >&5 |
28d3e4a3 | 1641 | if test -z "$INSTALL"; then |
833c46e1 KR |
1642 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
1643 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b11fb939 | 1644 | else |
c6c7035c | 1645 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" |
b11fb939 | 1646 | for ac_dir in $PATH; do |
833c46e1 KR |
1647 | # Account for people who put trailing slashes in PATH elements. |
1648 | case "$ac_dir/" in | |
1649 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
b11fb939 KR |
1650 | *) |
1651 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
1652 | for ac_prog in ginstall installbsd scoinst install; do | |
1653 | if test -f $ac_dir/$ac_prog; then | |
1654 | if test $ac_prog = install && | |
1655 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
1656 | # AIX install. It has an incompatible calling convention. | |
1657 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
1658 | : | |
1659 | else | |
1660 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
1661 | break 2 | |
1662 | fi | |
1663 | fi | |
1664 | done | |
1665 | ;; | |
1666 | esac | |
1667 | done | |
c6c7035c | 1668 | IFS="$ac_save_IFS" |
1c9dbb83 | 1669 | |
b11fb939 | 1670 | fi |
1c9dbb83 ILT |
1671 | if test "${ac_cv_path_install+set}" = set; then |
1672 | INSTALL="$ac_cv_path_install" | |
1673 | else | |
1674 | # As a last resort, use the slow shell script. We don't cache a | |
1675 | # path for INSTALL within a source directory, because that will | |
1676 | # break other packages using the cache if that directory is | |
1677 | # removed, or if the path is relative. | |
1678 | INSTALL="$ac_install_sh" | |
1679 | fi | |
b11fb939 | 1680 | fi |
833c46e1 | 1681 | echo "$ac_t""$INSTALL" 1>&6 |
b11fb939 KR |
1682 | |
1683 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
1684 | # It thinks the first close brace ends the variable substitution. | |
1685 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
1686 | ||
1687 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
1688 | ||
1689 | ||
833c46e1 | 1690 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
76fb6d2f | 1691 | echo "configure:1692: checking how to run the C preprocessor" >&5 |
b11fb939 KR |
1692 | # On Suns, sometimes $CPP names a directory. |
1693 | if test -n "$CPP" && test -d "$CPP"; then | |
1694 | CPP= | |
1695 | fi | |
1696 | if test -z "$CPP"; then | |
833c46e1 KR |
1697 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then |
1698 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b11fb939 KR |
1699 | else |
1700 | # This must be in double quotes, not single quotes, because CPP may get | |
1701 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
1702 | CPP="${CC-cc} -E" | |
1703 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
1704 | # not just through cpp. | |
28d3e4a3 | 1705 | cat > conftest.$ac_ext <<EOF |
76fb6d2f | 1706 | #line 1707 "configure" |
b11fb939 | 1707 | #include "confdefs.h" |
f2889110 | 1708 | #include <assert.h> |
b11fb939 KR |
1709 | Syntax Error |
1710 | EOF | |
d0352cbb | 1711 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
76fb6d2f | 1712 | { (eval echo configure:1713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
bf111c9f | 1713 | ac_err=`grep -v '^ *+' conftest.out` |
b11fb939 KR |
1714 | if test -z "$ac_err"; then |
1715 | : | |
1716 | else | |
fb589130 | 1717 | echo "$ac_err" >&5 |
c6c7035c MM |
1718 | echo "configure: failed program was:" >&5 |
1719 | cat conftest.$ac_ext >&5 | |
b11fb939 KR |
1720 | rm -rf conftest* |
1721 | CPP="${CC-cc} -E -traditional-cpp" | |
28d3e4a3 | 1722 | cat > conftest.$ac_ext <<EOF |
76fb6d2f | 1723 | #line 1724 "configure" |
b11fb939 | 1724 | #include "confdefs.h" |
f2889110 | 1725 | #include <assert.h> |
b11fb939 KR |
1726 | Syntax Error |
1727 | EOF | |
d0352cbb | 1728 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
76fb6d2f | 1729 | { (eval echo configure:1730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
bf111c9f | 1730 | ac_err=`grep -v '^ *+' conftest.out` |
b11fb939 KR |
1731 | if test -z "$ac_err"; then |
1732 | : | |
1733 | else | |
fb589130 | 1734 | echo "$ac_err" >&5 |
c6c7035c MM |
1735 | echo "configure: failed program was:" >&5 |
1736 | cat conftest.$ac_ext >&5 | |
b11fb939 KR |
1737 | rm -rf conftest* |
1738 | CPP=/lib/cpp | |
1739 | fi | |
1740 | rm -f conftest* | |
1741 | fi | |
1742 | rm -f conftest* | |
1743 | ac_cv_prog_CPP="$CPP" | |
1744 | fi | |
e63c594d FF |
1745 | CPP="$ac_cv_prog_CPP" |
1746 | else | |
1747 | ac_cv_prog_CPP="$CPP" | |
b11fb939 | 1748 | fi |
833c46e1 | 1749 | echo "$ac_t""$CPP" 1>&6 |
fb589130 KR |
1750 | |
1751 | for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h | |
1752 | do | |
c6c7035c | 1753 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
833c46e1 | 1754 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
76fb6d2f | 1755 | echo "configure:1756: checking for $ac_hdr" >&5 |
833c46e1 KR |
1756 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1757 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b11fb939 | 1758 | else |
28d3e4a3 | 1759 | cat > conftest.$ac_ext <<EOF |
76fb6d2f | 1760 | #line 1761 "configure" |
b11fb939 | 1761 | #include "confdefs.h" |
28d3e4a3 | 1762 | #include <$ac_hdr> |
b11fb939 | 1763 | EOF |
d0352cbb | 1764 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
76fb6d2f | 1765 | { (eval echo configure:1766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
bf111c9f | 1766 | ac_err=`grep -v '^ *+' conftest.out` |
b11fb939 KR |
1767 | if test -z "$ac_err"; then |
1768 | rm -rf conftest* | |
fb589130 | 1769 | eval "ac_cv_header_$ac_safe=yes" |
b11fb939 | 1770 | else |
fb589130 | 1771 | echo "$ac_err" >&5 |
c6c7035c MM |
1772 | echo "configure: failed program was:" >&5 |
1773 | cat conftest.$ac_ext >&5 | |
b11fb939 | 1774 | rm -rf conftest* |
fb589130 | 1775 | eval "ac_cv_header_$ac_safe=no" |
b11fb939 KR |
1776 | fi |
1777 | rm -f conftest* | |
b11fb939 | 1778 | fi |
fb589130 | 1779 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
833c46e1 | 1780 | echo "$ac_t""yes" 1>&6 |
c6c7035c | 1781 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
fb589130 | 1782 | cat >> confdefs.h <<EOF |
28d3e4a3 | 1783 | #define $ac_tr_hdr 1 |
b11fb939 | 1784 | EOF |
fb589130 | 1785 | |
b11fb939 | 1786 | else |
833c46e1 | 1787 | echo "$ac_t""no" 1>&6 |
b11fb939 | 1788 | fi |
fb589130 | 1789 | done |
b11fb939 | 1790 | |
b11fb939 | 1791 | |
bf111c9f KR |
1792 | # Put this here so that autoconf's "cross-compiling" message doesn't confuse |
1793 | # people who are not cross-compiling but are compiling cross-assemblers. | |
833c46e1 | 1794 | echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6 |
76fb6d2f | 1795 | echo "configure:1796: checking whether compiling a cross-assembler" >&5 |
bf111c9f | 1796 | if test "${host}" = "${target}"; then |
ba49e48d KR |
1797 | cross_gas=no |
1798 | else | |
bf111c9f KR |
1799 | cross_gas=yes |
1800 | cat >> confdefs.h <<\EOF | |
1801 | #define CROSS_COMPILE 1 | |
1802 | EOF | |
1803 | ||
bf111c9f | 1804 | fi |
833c46e1 | 1805 | echo "$ac_t""$cross_gas" 1>&6 |
bf111c9f | 1806 | |
b11fb939 KR |
1807 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
1808 | # for constant arguments. Useless! | |
833c46e1 | 1809 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 |
76fb6d2f | 1810 | echo "configure:1811: checking for working alloca.h" >&5 |
833c46e1 KR |
1811 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
1812 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b11fb939 | 1813 | else |
28d3e4a3 | 1814 | cat > conftest.$ac_ext <<EOF |
76fb6d2f | 1815 | #line 1816 "configure" |
b11fb939 KR |
1816 | #include "confdefs.h" |
1817 | #include <alloca.h> | |
c6c7035c | 1818 | int main() { |
b11fb939 KR |
1819 | char *p = alloca(2 * sizeof(int)); |
1820 | ; return 0; } | |
1821 | EOF | |
76fb6d2f | 1822 | if { (eval echo configure:1823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
b11fb939 KR |
1823 | rm -rf conftest* |
1824 | ac_cv_header_alloca_h=yes | |
1825 | else | |
c6c7035c MM |
1826 | echo "configure: failed program was:" >&5 |
1827 | cat conftest.$ac_ext >&5 | |
b11fb939 KR |
1828 | rm -rf conftest* |
1829 | ac_cv_header_alloca_h=no | |
1830 | fi | |
1831 | rm -f conftest* | |
b11fb939 | 1832 | fi |
1c9dbb83 | 1833 | |
833c46e1 | 1834 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 |
b11fb939 KR |
1835 | if test $ac_cv_header_alloca_h = yes; then |
1836 | cat >> confdefs.h <<\EOF | |
1837 | #define HAVE_ALLOCA_H 1 | |
1838 | EOF | |
1839 | ||
1840 | fi | |
1841 | ||
833c46e1 | 1842 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 |
76fb6d2f | 1843 | echo "configure:1844: checking for alloca" >&5 |
c6c7035c | 1844 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
833c46e1 | 1845 | echo $ac_n "(cached) $ac_c" 1>&6 |
b11fb939 | 1846 | else |
28d3e4a3 | 1847 | cat > conftest.$ac_ext <<EOF |
76fb6d2f | 1848 | #line 1849 "configure" |
b11fb939 KR |
1849 | #include "confdefs.h" |
1850 | ||
1851 | #ifdef __GNUC__ | |
1852 | # define alloca __builtin_alloca | |
1853 | #else | |
1854 | # if HAVE_ALLOCA_H | |
1855 | # include <alloca.h> | |
1856 | # else | |
1857 | # ifdef _AIX | |
1858 | #pragma alloca | |
1859 | # else | |
1860 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1861 | char *alloca (); | |
1862 | # endif | |
1863 | # endif | |
1864 | # endif | |
1865 | #endif | |
1866 | ||
c6c7035c | 1867 | int main() { |
b11fb939 KR |
1868 | char *p = (char *) alloca(1); |
1869 | ; return 0; } | |
1870 | EOF | |
76fb6d2f | 1871 | if { (eval echo configure:1872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
b11fb939 | 1872 | rm -rf conftest* |
c6c7035c | 1873 | ac_cv_func_alloca_works=yes |
b11fb939 | 1874 | else |
c6c7035c MM |
1875 | echo "configure: failed program was:" >&5 |
1876 | cat conftest.$ac_ext >&5 | |
b11fb939 | 1877 | rm -rf conftest* |
c6c7035c | 1878 | ac_cv_func_alloca_works=no |
b11fb939 KR |
1879 | fi |
1880 | rm -f conftest* | |
b11fb939 | 1881 | fi |
1c9dbb83 | 1882 | |
c6c7035c MM |
1883 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 |
1884 | if test $ac_cv_func_alloca_works = yes; then | |
b11fb939 KR |
1885 | cat >> confdefs.h <<\EOF |
1886 | #define HAVE_ALLOCA 1 | |
1887 | EOF | |
1888 | ||
1889 | fi | |
1890 | ||
c6c7035c | 1891 | if test $ac_cv_func_alloca_works = no; then |
b11fb939 KR |
1892 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions |
1893 | # that cause trouble. Some versions do not even contain alloca or | |
1894 | # contain a buggy version. If you still want to use their alloca, | |
1895 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
1896 | ALLOCA=alloca.o | |
1897 | cat >> confdefs.h <<\EOF | |
1898 | #define C_ALLOCA 1 | |
1899 | EOF | |
1900 | ||
1901 | ||
833c46e1 | 1902 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 |
76fb6d2f | 1903 | echo "configure:1904: checking whether alloca needs Cray hooks" >&5 |
833c46e1 KR |
1904 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
1905 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b11fb939 | 1906 | else |
28d3e4a3 | 1907 | cat > conftest.$ac_ext <<EOF |
76fb6d2f | 1908 | #line 1909 "configure" |
b11fb939 KR |
1909 | #include "confdefs.h" |
1910 | #if defined(CRAY) && ! defined(CRAY2) | |
1911 | webecray | |
1912 | #else | |
1913 | wenotbecray | |
1914 | #endif | |
1915 | ||
1916 | EOF | |
28d3e4a3 | 1917 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
fb589130 | 1918 | egrep "webecray" >/dev/null 2>&1; then |
b11fb939 KR |
1919 | rm -rf conftest* |
1920 | ac_cv_os_cray=yes | |
1921 | else | |
1922 | rm -rf conftest* | |
1923 | ac_cv_os_cray=no | |
1924 | fi | |
1925 | rm -f conftest* | |
1926 | ||
1927 | fi | |
1c9dbb83 | 1928 | |
833c46e1 | 1929 | echo "$ac_t""$ac_cv_os_cray" 1>&6 |
b11fb939 | 1930 | if test $ac_cv_os_cray = yes; then |
833c46e1 KR |
1931 | for ac_func in _getb67 GETB67 getb67; do |
1932 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
76fb6d2f | 1933 | echo "configure:1934: checking for $ac_func" >&5 |
833c46e1 KR |
1934 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1935 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b11fb939 | 1936 | else |
28d3e4a3 | 1937 | cat > conftest.$ac_ext <<EOF |
76fb6d2f | 1938 | #line 1939 "configure" |
b11fb939 | 1939 | #include "confdefs.h" |
833c46e1 KR |
1940 | /* System header to define __stub macros and hopefully few prototypes, |
1941 | which can conflict with char $ac_func(); below. */ | |
1942 | #include <assert.h> | |
f1698cb7 | 1943 | /* Override any gcc2 internal prototype to avoid an error. */ |
df586de2 ILT |
1944 | /* We use char because int might match the return type of a gcc2 |
1945 | builtin and then its argument prototype would still apply. */ | |
1c9dbb83 | 1946 | char $ac_func(); |
f1698cb7 | 1947 | |
c6c7035c | 1948 | int main() { |
b11fb939 KR |
1949 | |
1950 | /* The GNU C library defines this for functions which it implements | |
1951 | to always fail with ENOSYS. Some functions are actually named | |
1952 | something starting with __ and the normal name is an alias. */ | |
833c46e1 | 1953 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
b11fb939 KR |
1954 | choke me |
1955 | #else | |
833c46e1 | 1956 | $ac_func(); |
b11fb939 KR |
1957 | #endif |
1958 | ||
1959 | ; return 0; } | |
1960 | EOF | |
76fb6d2f | 1961 | if { (eval echo configure:1962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
b11fb939 | 1962 | rm -rf conftest* |
833c46e1 | 1963 | eval "ac_cv_func_$ac_func=yes" |
b11fb939 | 1964 | else |
c6c7035c MM |
1965 | echo "configure: failed program was:" >&5 |
1966 | cat conftest.$ac_ext >&5 | |
b11fb939 | 1967 | rm -rf conftest* |
833c46e1 | 1968 | eval "ac_cv_func_$ac_func=no" |
b11fb939 KR |
1969 | fi |
1970 | rm -f conftest* | |
7d0f8249 | 1971 | fi |
c6c7035c | 1972 | |
833c46e1 KR |
1973 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
1974 | echo "$ac_t""yes" 1>&6 | |
1975 | cat >> confdefs.h <<EOF | |
1976 | #define CRAY_STACKSEG_END $ac_func | |
b11fb939 KR |
1977 | EOF |
1978 | ||
833c46e1 | 1979 | break |
b11fb939 | 1980 | else |
833c46e1 | 1981 | echo "$ac_t""no" 1>&6 |
b11fb939 KR |
1982 | fi |
1983 | ||
833c46e1 | 1984 | done |
b11fb939 KR |
1985 | fi |
1986 | ||
833c46e1 | 1987 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 |
76fb6d2f | 1988 | echo "configure:1989: checking stack direction for C alloca" >&5 |
833c46e1 KR |
1989 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
1990 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b11fb939 KR |
1991 | else |
1992 | if test "$cross_compiling" = yes; then | |
bf111c9f | 1993 | ac_cv_c_stack_direction=0 |
b11fb939 | 1994 | else |
c6c7035c | 1995 | cat > conftest.$ac_ext <<EOF |
76fb6d2f | 1996 | #line 1997 "configure" |
b11fb939 KR |
1997 | #include "confdefs.h" |
1998 | find_stack_direction () | |
1999 | { | |
2000 | static char *addr = 0; | |
2001 | auto char dummy; | |
2002 | if (addr == 0) | |
2003 | { | |
2004 | addr = &dummy; | |
2005 | return find_stack_direction (); | |
2006 | } | |
2007 | else | |
2008 | return (&dummy > addr) ? 1 : -1; | |
2009 | } | |
2010 | main () | |
2011 | { | |
2012 | exit (find_stack_direction() < 0); | |
2013 | } | |
2014 | EOF | |
76fb6d2f | 2015 | if { (eval echo configure:2016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
c6c7035c | 2016 | then |
b11fb939 KR |
2017 | ac_cv_c_stack_direction=1 |
2018 | else | |
c6c7035c MM |
2019 | echo "configure: failed program was:" >&5 |
2020 | cat conftest.$ac_ext >&5 | |
2021 | rm -fr conftest* | |
b11fb939 KR |
2022 | ac_cv_c_stack_direction=-1 |
2023 | fi | |
7d0f8249 | 2024 | rm -fr conftest* |
64556643 FF |
2025 | fi |
2026 | ||
c6c7035c MM |
2027 | fi |
2028 | ||
833c46e1 | 2029 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 |
b11fb939 KR |
2030 | cat >> confdefs.h <<EOF |
2031 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
2032 | EOF | |
2033 | ||
2034 | fi | |
2035 | ||
833c46e1 | 2036 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
76fb6d2f | 2037 | echo "configure:2038: checking for inline" >&5 |
833c46e1 KR |
2038 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
2039 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b11fb939 | 2040 | else |
833c46e1 KR |
2041 | ac_cv_c_inline=no |
2042 | for ac_kw in inline __inline__ __inline; do | |
2043 | cat > conftest.$ac_ext <<EOF | |
76fb6d2f | 2044 | #line 2045 "configure" |
b11fb939 KR |
2045 | #include "confdefs.h" |
2046 | ||
c6c7035c | 2047 | int main() { |
833c46e1 | 2048 | } $ac_kw foo() { |
b11fb939 KR |
2049 | ; return 0; } |
2050 | EOF | |
76fb6d2f | 2051 | if { (eval echo configure:2052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b11fb939 | 2052 | rm -rf conftest* |
833c46e1 | 2053 | ac_cv_c_inline=$ac_kw; break |
c6c7035c MM |
2054 | else |
2055 | echo "configure: failed program was:" >&5 | |
2056 | cat conftest.$ac_ext >&5 | |
b11fb939 KR |
2057 | fi |
2058 | rm -f conftest* | |
833c46e1 | 2059 | done |
b11fb939 KR |
2060 | |
2061 | fi | |
1c9dbb83 | 2062 | |
833c46e1 KR |
2063 | echo "$ac_t""$ac_cv_c_inline" 1>&6 |
2064 | case "$ac_cv_c_inline" in | |
2065 | inline | yes) ;; | |
2066 | no) cat >> confdefs.h <<\EOF | |
2067 | #define inline | |
2068 | EOF | |
2069 | ;; | |
2070 | *) cat >> confdefs.h <<EOF | |
2071 | #define inline $ac_cv_c_inline | |
2072 | EOF | |
2073 | ;; | |
2074 | esac | |
b11fb939 KR |
2075 | |
2076 | ||
ba49e48d KR |
2077 | # VMS doesn't have unlink. |
2078 | for ac_func in unlink remove | |
b9419dd2 | 2079 | do |
833c46e1 | 2080 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
76fb6d2f | 2081 | echo "configure:2082: checking for $ac_func" >&5 |
833c46e1 KR |
2082 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2083 | echo $ac_n "(cached) $ac_c" 1>&6 | |
28d3e4a3 KR |
2084 | else |
2085 | cat > conftest.$ac_ext <<EOF | |
76fb6d2f | 2086 | #line 2087 "configure" |
28d3e4a3 | 2087 | #include "confdefs.h" |
833c46e1 KR |
2088 | /* System header to define __stub macros and hopefully few prototypes, |
2089 | which can conflict with char $ac_func(); below. */ | |
2090 | #include <assert.h> | |
f1698cb7 | 2091 | /* Override any gcc2 internal prototype to avoid an error. */ |
df586de2 ILT |
2092 | /* We use char because int might match the return type of a gcc2 |
2093 | builtin and then its argument prototype would still apply. */ | |
1c9dbb83 | 2094 | char $ac_func(); |
f1698cb7 | 2095 | |
c6c7035c | 2096 | int main() { |
28d3e4a3 KR |
2097 | |
2098 | /* The GNU C library defines this for functions which it implements | |
2099 | to always fail with ENOSYS. Some functions are actually named | |
2100 | something starting with __ and the normal name is an alias. */ | |
b9419dd2 | 2101 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
28d3e4a3 KR |
2102 | choke me |
2103 | #else | |
f1698cb7 | 2104 | $ac_func(); |
28d3e4a3 KR |
2105 | #endif |
2106 | ||
2107 | ; return 0; } | |
2108 | EOF | |
76fb6d2f | 2109 | if { (eval echo configure:2110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
28d3e4a3 | 2110 | rm -rf conftest* |
b9419dd2 | 2111 | eval "ac_cv_func_$ac_func=yes" |
28d3e4a3 | 2112 | else |
c6c7035c MM |
2113 | echo "configure: failed program was:" >&5 |
2114 | cat conftest.$ac_ext >&5 | |
28d3e4a3 | 2115 | rm -rf conftest* |
b9419dd2 | 2116 | eval "ac_cv_func_$ac_func=no" |
28d3e4a3 KR |
2117 | fi |
2118 | rm -f conftest* | |
7d0f8249 | 2119 | fi |
c6c7035c | 2120 | |
b9419dd2 | 2121 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
833c46e1 | 2122 | echo "$ac_t""yes" 1>&6 |
1c9dbb83 | 2123 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
b9419dd2 KR |
2124 | cat >> confdefs.h <<EOF |
2125 | #define $ac_tr_func 1 | |
28d3e4a3 | 2126 | EOF |
b9419dd2 | 2127 | break |
28d3e4a3 | 2128 | else |
833c46e1 | 2129 | echo "$ac_t""no" 1>&6 |
28d3e4a3 | 2130 | fi |
b9419dd2 | 2131 | done |
28d3e4a3 KR |
2132 | |
2133 | ||
e63c594d FF |
2134 | # Some systems don't have sbrk(). |
2135 | for ac_func in sbrk | |
2136 | do | |
2137 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
76fb6d2f | 2138 | echo "configure:2139: checking for $ac_func" >&5 |
e63c594d FF |
2139 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2140 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2141 | else | |
2142 | cat > conftest.$ac_ext <<EOF | |
76fb6d2f | 2143 | #line 2144 "configure" |
e63c594d FF |
2144 | #include "confdefs.h" |
2145 | /* System header to define __stub macros and hopefully few prototypes, | |
2146 | which can conflict with char $ac_func(); below. */ | |
2147 | #include <assert.h> | |
2148 | /* Override any gcc2 internal prototype to avoid an error. */ | |
df586de2 ILT |
2149 | /* We use char because int might match the return type of a gcc2 |
2150 | builtin and then its argument prototype would still apply. */ | |
1c9dbb83 | 2151 | char $ac_func(); |
e63c594d | 2152 | |
c6c7035c | 2153 | int main() { |
e63c594d FF |
2154 | |
2155 | /* The GNU C library defines this for functions which it implements | |
2156 | to always fail with ENOSYS. Some functions are actually named | |
2157 | something starting with __ and the normal name is an alias. */ | |
2158 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2159 | choke me | |
2160 | #else | |
2161 | $ac_func(); | |
2162 | #endif | |
2163 | ||
2164 | ; return 0; } | |
2165 | EOF | |
76fb6d2f | 2166 | if { (eval echo configure:2167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
e63c594d FF |
2167 | rm -rf conftest* |
2168 | eval "ac_cv_func_$ac_func=yes" | |
2169 | else | |
c6c7035c MM |
2170 | echo "configure: failed program was:" >&5 |
2171 | cat conftest.$ac_ext >&5 | |
e63c594d FF |
2172 | rm -rf conftest* |
2173 | eval "ac_cv_func_$ac_func=no" | |
2174 | fi | |
2175 | rm -f conftest* | |
7d0f8249 | 2176 | fi |
c6c7035c | 2177 | |
e63c594d FF |
2178 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
2179 | echo "$ac_t""yes" 1>&6 | |
1c9dbb83 | 2180 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
e63c594d FF |
2181 | cat >> confdefs.h <<EOF |
2182 | #define $ac_tr_func 1 | |
2183 | EOF | |
2184 | ||
2185 | else | |
2186 | echo "$ac_t""no" 1>&6 | |
2187 | fi | |
2188 | done | |
2189 | ||
2190 | ||
b11fb939 KR |
2191 | # Some non-ANSI preprocessors botch requoting inside strings. That's bad |
2192 | # enough, but on some of those systems, the assert macro relies on requoting | |
2193 | # working properly! | |
833c46e1 | 2194 | echo $ac_n "checking for working assert macro""... $ac_c" 1>&6 |
76fb6d2f | 2195 | echo "configure:2196: checking for working assert macro" >&5 |
833c46e1 KR |
2196 | if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then |
2197 | echo $ac_n "(cached) $ac_c" 1>&6 | |
fb589130 | 2198 | else |
28d3e4a3 | 2199 | cat > conftest.$ac_ext <<EOF |
76fb6d2f | 2200 | #line 2201 "configure" |
b11fb939 KR |
2201 | #include "confdefs.h" |
2202 | #include <assert.h> | |
2203 | #include <stdio.h> | |
c6c7035c | 2204 | int main() { |
b11fb939 KR |
2205 | |
2206 | /* check for requoting problems */ | |
2207 | static int a, b, c, d; | |
2208 | static char *s; | |
2209 | assert (!strcmp(s, "foo bar baz quux")); | |
2210 | /* check for newline handling */ | |
2211 | assert (a == b | |
2212 | || c == d); | |
2213 | ||
2214 | ; return 0; } | |
2215 | EOF | |
76fb6d2f | 2216 | if { (eval echo configure:2217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
fb589130 KR |
2217 | rm -rf conftest* |
2218 | gas_cv_assert_ok=yes | |
b11fb939 | 2219 | else |
c6c7035c MM |
2220 | echo "configure: failed program was:" >&5 |
2221 | cat conftest.$ac_ext >&5 | |
b11fb939 | 2222 | rm -rf conftest* |
fb589130 | 2223 | gas_cv_assert_ok=no |
b11fb939 KR |
2224 | fi |
2225 | rm -f conftest* | |
fb589130 | 2226 | fi |
833c46e1 | 2227 | echo "$ac_t""$gas_cv_assert_ok" 1>&6 |
fb589130 KR |
2228 | test $gas_cv_assert_ok = yes || cat >> confdefs.h <<\EOF |
2229 | #define BROKEN_ASSERT 1 | |
2230 | EOF | |
2231 | ||
b11fb939 | 2232 | |
bf111c9f | 2233 | |
b11fb939 KR |
2234 | # On some systems, the system header files may not declare malloc, realloc, |
2235 | # and free. There are places where gas needs these functions to have been | |
2236 | # declared -- such as when taking their addresses. | |
bf111c9f | 2237 | gas_test_headers=" |
b11fb939 KR |
2238 | #ifdef HAVE_MEMORY_H |
2239 | #include <memory.h> | |
2240 | #endif | |
2241 | #ifdef HAVE_STRING_H | |
2242 | #include <string.h> | |
5cece526 ILT |
2243 | #else |
2244 | #ifdef HAVE_STRINGS_H | |
2245 | #include <strings.h> | |
2246 | #endif | |
b11fb939 KR |
2247 | #endif |
2248 | #ifdef HAVE_STDLIB_H | |
2249 | #include <stdlib.h> | |
2250 | #endif | |
2251 | #ifdef HAVE_UNISTD_H | |
2252 | #include <unistd.h> | |
2253 | #endif | |
bf111c9f | 2254 | " |
b11fb939 | 2255 | |
5cece526 | 2256 | echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6 |
76fb6d2f | 2257 | echo "configure:2258: checking whether declaration is required for strstr" >&5 |
5cece526 ILT |
2258 | if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then |
2259 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2260 | else | |
2261 | cat > conftest.$ac_ext <<EOF | |
76fb6d2f | 2262 | #line 2263 "configure" |
5cece526 ILT |
2263 | #include "confdefs.h" |
2264 | $gas_test_headers | |
c6c7035c | 2265 | int main() { |
5cece526 ILT |
2266 | |
2267 | typedef char *(*f)(); | |
2268 | f x; | |
2269 | x = (f) strstr; | |
2270 | ||
2271 | ; return 0; } | |
2272 | EOF | |
76fb6d2f | 2273 | if { (eval echo configure:2274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
5cece526 ILT |
2274 | rm -rf conftest* |
2275 | gas_cv_decl_needed_strstr=no | |
2276 | else | |
c6c7035c MM |
2277 | echo "configure: failed program was:" >&5 |
2278 | cat conftest.$ac_ext >&5 | |
5cece526 ILT |
2279 | rm -rf conftest* |
2280 | gas_cv_decl_needed_strstr=yes | |
2281 | fi | |
2282 | rm -f conftest* | |
5cece526 ILT |
2283 | fi |
2284 | echo "$ac_t""$gas_cv_decl_needed_strstr" 1>&6 | |
2285 | test $gas_cv_decl_needed_strstr = no || { | |
2286 | cat >> confdefs.h <<\EOF | |
2287 | #define NEED_DECLARATION_STRSTR 1 | |
2288 | EOF | |
2289 | ||
2290 | } | |
2291 | ||
2292 | ||
833c46e1 | 2293 | echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6 |
76fb6d2f | 2294 | echo "configure:2295: checking whether declaration is required for malloc" >&5 |
833c46e1 KR |
2295 | if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then |
2296 | echo $ac_n "(cached) $ac_c" 1>&6 | |
bf111c9f | 2297 | else |
28d3e4a3 | 2298 | cat > conftest.$ac_ext <<EOF |
76fb6d2f | 2299 | #line 2300 "configure" |
bf111c9f KR |
2300 | #include "confdefs.h" |
2301 | $gas_test_headers | |
c6c7035c | 2302 | int main() { |
b11fb939 | 2303 | |
bf111c9f KR |
2304 | typedef char *(*f)(); |
2305 | f x; | |
2306 | x = (f) malloc; | |
b11fb939 KR |
2307 | |
2308 | ; return 0; } | |
2309 | EOF | |
76fb6d2f | 2310 | if { (eval echo configure:2311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
fb589130 | 2311 | rm -rf conftest* |
bf111c9f | 2312 | gas_cv_decl_needed_malloc=no |
b11fb939 | 2313 | else |
c6c7035c MM |
2314 | echo "configure: failed program was:" >&5 |
2315 | cat conftest.$ac_ext >&5 | |
b11fb939 | 2316 | rm -rf conftest* |
bf111c9f | 2317 | gas_cv_decl_needed_malloc=yes |
fb589130 KR |
2318 | fi |
2319 | rm -f conftest* | |
fb589130 | 2320 | fi |
833c46e1 | 2321 | echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&6 |
bf111c9f KR |
2322 | test $gas_cv_decl_needed_malloc = no || { |
2323 | cat >> confdefs.h <<\EOF | |
2324 | #define NEED_DECLARATION_MALLOC 1 | |
b11fb939 KR |
2325 | EOF |
2326 | ||
bf111c9f KR |
2327 | } |
2328 | ||
b11fb939 | 2329 | |
833c46e1 | 2330 | echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6 |
76fb6d2f | 2331 | echo "configure:2332: checking whether declaration is required for free" >&5 |
833c46e1 KR |
2332 | if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then |
2333 | echo $ac_n "(cached) $ac_c" 1>&6 | |
fb589130 | 2334 | else |
28d3e4a3 | 2335 | cat > conftest.$ac_ext <<EOF |
76fb6d2f | 2336 | #line 2337 "configure" |
b11fb939 | 2337 | #include "confdefs.h" |
bf111c9f | 2338 | $gas_test_headers |
c6c7035c | 2339 | int main() { |
b11fb939 | 2340 | |
5f757edc | 2341 | typedef void (*f)(); |
bf111c9f KR |
2342 | f x; |
2343 | x = (f) free; | |
b11fb939 KR |
2344 | |
2345 | ; return 0; } | |
2346 | EOF | |
76fb6d2f | 2347 | if { (eval echo configure:2348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
fb589130 | 2348 | rm -rf conftest* |
bf111c9f | 2349 | gas_cv_decl_needed_free=no |
b11fb939 | 2350 | else |
c6c7035c MM |
2351 | echo "configure: failed program was:" >&5 |
2352 | cat conftest.$ac_ext >&5 | |
b11fb939 | 2353 | rm -rf conftest* |
bf111c9f | 2354 | gas_cv_decl_needed_free=yes |
b11fb939 KR |
2355 | fi |
2356 | rm -f conftest* | |
fb589130 | 2357 | fi |
833c46e1 | 2358 | echo "$ac_t""$gas_cv_decl_needed_free" 1>&6 |
bf111c9f KR |
2359 | test $gas_cv_decl_needed_free = no || { |
2360 | cat >> confdefs.h <<\EOF | |
2361 | #define NEED_DECLARATION_FREE 1 | |
fb589130 KR |
2362 | EOF |
2363 | ||
bf111c9f KR |
2364 | } |
2365 | ||
b11fb939 | 2366 | |
5cece526 | 2367 | echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6 |
76fb6d2f | 2368 | echo "configure:2369: checking whether declaration is required for sbrk" >&5 |
5cece526 ILT |
2369 | if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then |
2370 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2371 | else | |
2372 | cat > conftest.$ac_ext <<EOF | |
76fb6d2f | 2373 | #line 2374 "configure" |
5cece526 ILT |
2374 | #include "confdefs.h" |
2375 | $gas_test_headers | |
c6c7035c | 2376 | int main() { |
5cece526 ILT |
2377 | |
2378 | typedef char *(*f)(); | |
2379 | f x; | |
2380 | x = (f) sbrk; | |
2381 | ||
2382 | ; return 0; } | |
2383 | EOF | |
76fb6d2f | 2384 | if { (eval echo configure:2385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
5cece526 ILT |
2385 | rm -rf conftest* |
2386 | gas_cv_decl_needed_sbrk=no | |
2387 | else | |
c6c7035c MM |
2388 | echo "configure: failed program was:" >&5 |
2389 | cat conftest.$ac_ext >&5 | |
5cece526 ILT |
2390 | rm -rf conftest* |
2391 | gas_cv_decl_needed_sbrk=yes | |
2392 | fi | |
2393 | rm -f conftest* | |
5cece526 ILT |
2394 | fi |
2395 | echo "$ac_t""$gas_cv_decl_needed_sbrk" 1>&6 | |
2396 | test $gas_cv_decl_needed_sbrk = no || { | |
2397 | cat >> confdefs.h <<\EOF | |
2398 | #define NEED_DECLARATION_SBRK 1 | |
2399 | EOF | |
2400 | ||
2401 | } | |
2402 | ||
2403 | ||
b11fb939 KR |
2404 | # Does errno.h declare errno, or do we have to add a separate declaration |
2405 | # for it? | |
bf111c9f | 2406 | |
833c46e1 | 2407 | echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6 |
76fb6d2f | 2408 | echo "configure:2409: checking whether declaration is required for errno" >&5 |
833c46e1 KR |
2409 | if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then |
2410 | echo $ac_n "(cached) $ac_c" 1>&6 | |
fb589130 | 2411 | else |
28d3e4a3 | 2412 | cat > conftest.$ac_ext <<EOF |
76fb6d2f | 2413 | #line 2414 "configure" |
b11fb939 KR |
2414 | #include "confdefs.h" |
2415 | ||
2416 | #ifdef HAVE_ERRNO_H | |
2417 | #include <errno.h> | |
2418 | #endif | |
2419 | ||
c6c7035c | 2420 | int main() { |
b11fb939 | 2421 | |
bf111c9f KR |
2422 | typedef int f; |
2423 | f x; | |
2424 | x = (f) errno; | |
b11fb939 KR |
2425 | |
2426 | ; return 0; } | |
2427 | EOF | |
76fb6d2f | 2428 | if { (eval echo configure:2429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
fb589130 | 2429 | rm -rf conftest* |
bf111c9f | 2430 | gas_cv_decl_needed_errno=no |
b11fb939 | 2431 | else |
c6c7035c MM |
2432 | echo "configure: failed program was:" >&5 |
2433 | cat conftest.$ac_ext >&5 | |
b11fb939 | 2434 | rm -rf conftest* |
bf111c9f | 2435 | gas_cv_decl_needed_errno=yes |
b11fb939 KR |
2436 | fi |
2437 | rm -f conftest* | |
fb589130 | 2438 | fi |
833c46e1 | 2439 | echo "$ac_t""$gas_cv_decl_needed_errno" 1>&6 |
bf111c9f KR |
2440 | test $gas_cv_decl_needed_errno = no || { |
2441 | cat >> confdefs.h <<\EOF | |
2442 | #define NEED_DECLARATION_ERRNO 1 | |
fb589130 KR |
2443 | EOF |
2444 | ||
bf111c9f KR |
2445 | } |
2446 | ||
b11fb939 | 2447 | |
1c9dbb83 | 2448 | HLDFLAGS= |
df4021c1 | 2449 | HLDENV= |
1a2f3c3f | 2450 | RPATH_ENVVAR=LD_LIBRARY_PATH |
1c9dbb83 ILT |
2451 | # If we have shared libraries, try to set rpath reasonably. |
2452 | if test "${shared}" = "true"; then | |
2453 | case "${host}" in | |
56f9773f ILT |
2454 | *-*-hpux*) |
2455 | HLDFLAGS='-Wl,+s,+b,$(libdir)' | |
1a2f3c3f | 2456 | RPATH_ENVVAR=SHLIB_PATH |
56f9773f | 2457 | ;; |
cbe7dccb | 2458 | *-*-irix5* | *-*-irix6*) |
1c9dbb83 ILT |
2459 | HLDFLAGS='-Wl,-rpath,$(libdir)' |
2460 | ;; | |
2461 | *-*-linux*aout*) | |
2462 | ;; | |
2463 | *-*-linux*) | |
2464 | HLDFLAGS='-Wl,-rpath,$(libdir)' | |
2465 | ;; | |
df4021c1 | 2466 | *-*-solaris*) |
1c9dbb83 ILT |
2467 | HLDFLAGS='-R $(libdir)' |
2468 | ;; | |
df4021c1 DE |
2469 | *-*-sysv4*) |
2470 | 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;' | |
2471 | ;; | |
1c9dbb83 ILT |
2472 | esac |
2473 | fi | |
2474 | ||
2475 | # On SunOS, if the linker supports the -rpath option, use it to | |
2476 | # prevent ../bfd and ../opcodes from being included in the run time | |
2477 | # search path. | |
2478 | case "${host}" in | |
2479 | *-*-sunos*) | |
2480 | echo 'main () { }' > conftest.c | |
2481 | ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t | |
2482 | if grep 'unrecognized' conftest.t >/dev/null 2>&1; then | |
2483 | : | |
2484 | elif grep 'No such file' conftest.t >/dev/null 2>&1; then | |
2485 | : | |
7925f4d4 ILT |
2486 | elif grep 'do not mix' conftest.t >/dev/null 2>&1; then |
2487 | : | |
1c9dbb83 ILT |
2488 | elif test "${shared}" = "true"; then |
2489 | HLDFLAGS='-Wl,-rpath=$(libdir)' | |
2490 | else | |
2491 | HLDFLAGS='-Wl,-rpath=' | |
2492 | fi | |
2493 | rm -f conftest.t conftest.c conftest | |
2494 | ;; | |
2495 | esac | |
2496 | ||
2497 | ||
1a2f3c3f | 2498 | |
df4021c1 | 2499 | |
515c7142 ILT |
2500 | |
2501 | ||
ba49e48d | 2502 | trap '' 1 2 15 |
833c46e1 | 2503 | cat > confcache <<\EOF |
b11fb939 KR |
2504 | # This file is a shell script that caches the results of configure |
2505 | # tests run on this system so they can be shared between configure | |
2506 | # scripts and configure runs. It is not useful on other systems. | |
bf111c9f | 2507 | # If it contains results you don't want to keep, you may remove or edit it. |
b11fb939 KR |
2508 | # |
2509 | # By default, configure uses ./config.cache as the cache file, | |
2510 | # creating it if it does not exist already. You can give configure | |
2511 | # the --cache-file=FILE option to use a different cache file; that is | |
2512 | # what configure does when it calls configure scripts in | |
2513 | # subdirectories, so they share the cache. | |
2514 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
2515 | # config.status only pays attention to the cache file if you give it the | |
2516 | # --recheck option to rerun configure. | |
e23b25ec | 2517 | # |
b11fb939 | 2518 | EOF |
c6c7035c MM |
2519 | # The following way of writing the cache mishandles newlines in values, |
2520 | # but we know of no workaround that is simple, portable, and efficient. | |
2521 | # So, don't put newlines in cache variables' values. | |
833c46e1 KR |
2522 | # Ultrix sh set writes to stderr and can't be redirected directly, |
2523 | # and sets the high bit in the cache file unless we assign to the vars. | |
e23b25ec | 2524 | (set) 2>&1 | |
c6c7035c MM |
2525 | case `(ac_space=' '; set) 2>&1` in |
2526 | *ac_space=\ *) | |
2527 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
2528 | # turns \\\\ into \\, and sed turns \\ into \). | |
2529 | sed -n \ | |
2530 | -e "s/'/'\\\\''/g" \ | |
2531 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
2532 | ;; | |
2533 | *) | |
2534 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
2535 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
2536 | ;; | |
2537 | esac >> confcache | |
833c46e1 KR |
2538 | if cmp -s $cache_file confcache; then |
2539 | : | |
b11fb939 | 2540 | else |
833c46e1 KR |
2541 | if test -w $cache_file; then |
2542 | echo "updating cache $cache_file" | |
2543 | cat confcache > $cache_file | |
2544 | else | |
2545 | echo "not updating unwritable cache $cache_file" | |
2546 | fi | |
b11fb939 | 2547 | fi |
833c46e1 | 2548 | rm -f confcache |
b11fb939 | 2549 | |
833c46e1 | 2550 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
b11fb939 | 2551 | |
f2889110 | 2552 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
b11fb939 KR |
2553 | # Let make expand exec_prefix. |
2554 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
2555 | ||
2556 | # Any assignment to VPATH causes Sun make to only execute | |
2557 | # the first set of double-colon rules, so remove it if not needed. | |
2558 | # If there is a colon in the path, we need to keep it. | |
2559 | if test "x$srcdir" = x.; then | |
2560 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
2561 | fi | |
2562 | ||
2563 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
2564 | ||
2565 | DEFS=-DHAVE_CONFIG_H | |
2566 | ||
2567 | # Without the "./", some shells look in PATH for config.status. | |
2568 | : ${CONFIG_STATUS=./config.status} | |
2569 | ||
28d3e4a3 KR |
2570 | echo creating $CONFIG_STATUS |
2571 | rm -f $CONFIG_STATUS | |
2572 | cat > $CONFIG_STATUS <<EOF | |
833c46e1 | 2573 | #! /bin/sh |
b11fb939 KR |
2574 | # Generated automatically by configure. |
2575 | # Run this file to recreate the current configuration. | |
2576 | # This directory was configured as follows, | |
2577 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
2578 | # | |
e23b25ec | 2579 | # $0 $ac_configure_args |
b11fb939 KR |
2580 | # |
2581 | # Compiler output produced by configure, useful for debugging | |
2582 | # configure, is in ./config.log if it exists. | |
2583 | ||
28d3e4a3 | 2584 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
b11fb939 KR |
2585 | for ac_option |
2586 | do | |
2587 | case "\$ac_option" in | |
2588 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
e23b25ec KR |
2589 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" |
2590 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
b11fb939 | 2591 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
c6c7035c | 2592 | echo "$CONFIG_STATUS generated by autoconf version 2.12" |
b11fb939 KR |
2593 | exit 0 ;; |
2594 | -help | --help | --hel | --he | --h) | |
2595 | echo "\$ac_cs_usage"; exit 0 ;; | |
2596 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
2597 | esac | |
2598 | done | |
2599 | ||
2600 | ac_given_srcdir=$srcdir | |
2601 | ac_given_INSTALL="$INSTALL" | |
2602 | ||
833c46e1 | 2603 | trap 'rm -fr `echo "Makefile doc/Makefile .gdbinit:gdbinit.in conf" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
1c9dbb83 ILT |
2604 | EOF |
2605 | cat >> $CONFIG_STATUS <<EOF | |
b11fb939 | 2606 | |
1c9dbb83 ILT |
2607 | # Protect against being on the right side of a sed subst in config.status. |
2608 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
2609 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
b11fb939 KR |
2610 | $ac_vpsub |
2611 | $extrasub | |
b11fb939 | 2612 | s%@CFLAGS@%$CFLAGS%g |
b11fb939 | 2613 | s%@CPPFLAGS@%$CPPFLAGS%g |
bf111c9f KR |
2614 | s%@CXXFLAGS@%$CXXFLAGS%g |
2615 | s%@DEFS@%$DEFS%g | |
b11fb939 | 2616 | s%@LDFLAGS@%$LDFLAGS%g |
bf111c9f KR |
2617 | s%@LIBS@%$LIBS%g |
2618 | s%@exec_prefix@%$exec_prefix%g | |
2619 | s%@prefix@%$prefix%g | |
ba49e48d | 2620 | s%@program_transform_name@%$program_transform_name%g |
1c9dbb83 ILT |
2621 | s%@bindir@%$bindir%g |
2622 | s%@sbindir@%$sbindir%g | |
2623 | s%@libexecdir@%$libexecdir%g | |
2624 | s%@datadir@%$datadir%g | |
2625 | s%@sysconfdir@%$sysconfdir%g | |
2626 | s%@sharedstatedir@%$sharedstatedir%g | |
2627 | s%@localstatedir@%$localstatedir%g | |
2628 | s%@libdir@%$libdir%g | |
2629 | s%@includedir@%$includedir%g | |
2630 | s%@oldincludedir@%$oldincludedir%g | |
2631 | s%@infodir@%$infodir%g | |
2632 | s%@mandir@%$mandir%g | |
b11fb939 KR |
2633 | s%@host@%$host%g |
2634 | s%@host_alias@%$host_alias%g | |
2635 | s%@host_cpu@%$host_cpu%g | |
2636 | s%@host_vendor@%$host_vendor%g | |
2637 | s%@host_os@%$host_os%g | |
2638 | s%@target@%$target%g | |
2639 | s%@target_alias@%$target_alias%g | |
2640 | s%@target_cpu@%$target_cpu%g | |
2641 | s%@target_vendor@%$target_vendor%g | |
2642 | s%@target_os@%$target_os%g | |
2643 | s%@build@%$build%g | |
2644 | s%@build_alias@%$build_alias%g | |
2645 | s%@build_cpu@%$build_cpu%g | |
2646 | s%@build_vendor@%$build_vendor%g | |
2647 | s%@build_os@%$build_os%g | |
b11fb939 KR |
2648 | /@target_frag@/r $target_frag |
2649 | s%@target_frag@%%g | |
e7757ad0 | 2650 | s%@extra_objects@%$extra_objects%g |
bf4bd1fc | 2651 | s%@target_cpu_type@%$target_cpu_type%g |
833c46e1 | 2652 | s%@obj_format@%$obj_format%g |
515c7142 | 2653 | s%@te_file@%$te_file%g |
833c46e1 | 2654 | s%@atof@%$atof%g |
1c9dbb83 | 2655 | s%@BFDDEP@%$BFDDEP%g |
b11fb939 | 2656 | s%@BFDLIB@%$BFDLIB%g |
2e013bb7 ILT |
2657 | s%@OPCODES_DEP@%$OPCODES_DEP%g |
2658 | s%@OPCODES_LIB@%$OPCODES_LIB%g | |
b11fb939 KR |
2659 | s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g |
2660 | s%@CC@%$CC%g | |
2661 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g | |
2662 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
2663 | s%@CPP@%$CPP%g | |
2664 | s%@ALLOCA@%$ALLOCA%g | |
1c9dbb83 | 2665 | s%@HLDFLAGS@%$HLDFLAGS%g |
df4021c1 | 2666 | s%@HLDENV@%$HLDENV%g |
1a2f3c3f | 2667 | s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g |
b11fb939 KR |
2668 | |
2669 | CEOF | |
2670 | EOF | |
c6c7035c MM |
2671 | |
2672 | cat >> $CONFIG_STATUS <<\EOF | |
2673 | ||
2674 | # Split the substitutions into bite-sized pieces for seds with | |
2675 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
2676 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
2677 | ac_file=1 # Number of current file. | |
2678 | ac_beg=1 # First line for current file. | |
2679 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
2680 | ac_more_lines=: | |
2681 | ac_sed_cmds="" | |
2682 | while $ac_more_lines; do | |
2683 | if test $ac_beg -gt 1; then | |
2684 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
2685 | else | |
2686 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
2687 | fi | |
2688 | if test ! -s conftest.s$ac_file; then | |
2689 | ac_more_lines=false | |
2690 | rm -f conftest.s$ac_file | |
2691 | else | |
2692 | if test -z "$ac_sed_cmds"; then | |
2693 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
2694 | else | |
2695 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
2696 | fi | |
2697 | ac_file=`expr $ac_file + 1` | |
2698 | ac_beg=$ac_end | |
2699 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
2700 | fi | |
2701 | done | |
2702 | if test -z "$ac_sed_cmds"; then | |
2703 | ac_sed_cmds=cat | |
2704 | fi | |
2705 | EOF | |
2706 | ||
28d3e4a3 | 2707 | cat >> $CONFIG_STATUS <<EOF |
b11fb939 | 2708 | |
28d3e4a3 | 2709 | CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile .gdbinit:gdbinit.in"} |
bf111c9f | 2710 | EOF |
28d3e4a3 KR |
2711 | cat >> $CONFIG_STATUS <<\EOF |
2712 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
c6c7035c | 2713 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
b11fb939 | 2714 | case "$ac_file" in |
c6c7035c | 2715 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
b11fb939 KR |
2716 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
2717 | *) ac_file_in="${ac_file}.in" ;; | |
2718 | esac | |
2719 | ||
c6c7035c | 2720 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
b11fb939 KR |
2721 | |
2722 | # Remove last slash and all that follows it. Not all systems have dirname. | |
2723 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
2724 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
2725 | # The file is in a subdirectory. | |
2726 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
833c46e1 | 2727 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" |
b11fb939 KR |
2728 | # A "../" for each directory in $ac_dir_suffix. |
2729 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
2730 | else | |
2731 | ac_dir_suffix= ac_dots= | |
2732 | fi | |
2733 | ||
2734 | case "$ac_given_srcdir" in | |
2735 | .) srcdir=. | |
2736 | if test -z "$ac_dots"; then top_srcdir=. | |
2737 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
2738 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
2739 | *) # Relative path. | |
2740 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
2741 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
2742 | esac | |
2743 | ||
2744 | case "$ac_given_INSTALL" in | |
2745 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
28d3e4a3 | 2746 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; |
b11fb939 | 2747 | esac |
c6c7035c | 2748 | |
b11fb939 KR |
2749 | echo creating "$ac_file" |
2750 | rm -f "$ac_file" | |
28d3e4a3 | 2751 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." |
ba49e48d KR |
2752 | case "$ac_file" in |
2753 | *Makefile*) ac_comsub="1i\\ | |
2754 | # $configure_input" ;; | |
2755 | *) ac_comsub= ;; | |
2756 | esac | |
c6c7035c MM |
2757 | |
2758 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
ba49e48d | 2759 | sed -e "$ac_comsub |
28d3e4a3 | 2760 | s%@configure_input@%$configure_input%g |
b11fb939 KR |
2761 | s%@srcdir@%$srcdir%g |
2762 | s%@top_srcdir@%$top_srcdir%g | |
2763 | s%@INSTALL@%$INSTALL%g | |
c6c7035c | 2764 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
b11fb939 | 2765 | fi; done |
c6c7035c | 2766 | rm -f conftest.s* |
b11fb939 KR |
2767 | |
2768 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
2769 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
2770 | # | |
2771 | # ac_d sets the value in "#define NAME VALUE" lines. | |
2772 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
2773 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
2774 | ac_dC='\3' | |
2775 | ac_dD='%g' | |
2776 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
2777 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
2778 | ac_uB='\([ ]\)%\1#\2define\3' | |
2779 | ac_uC=' ' | |
2780 | ac_uD='\4%g' | |
2781 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
2782 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
2783 | ac_eB='$%\1#\2define\3' | |
2784 | ac_eC=' ' | |
2785 | ac_eD='%g' | |
2786 | ||
c6c7035c MM |
2787 | if test "${CONFIG_HEADERS+set}" != set; then |
2788 | EOF | |
2789 | cat >> $CONFIG_STATUS <<EOF | |
2790 | CONFIG_HEADERS="conf" | |
2791 | EOF | |
2792 | cat >> $CONFIG_STATUS <<\EOF | |
2793 | fi | |
28d3e4a3 | 2794 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then |
c6c7035c | 2795 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
b11fb939 | 2796 | case "$ac_file" in |
c6c7035c | 2797 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
b11fb939 KR |
2798 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
2799 | *) ac_file_in="${ac_file}.in" ;; | |
2800 | esac | |
2801 | ||
2802 | echo creating $ac_file | |
2803 | ||
2804 | rm -f conftest.frag conftest.in conftest.out | |
c6c7035c MM |
2805 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
2806 | cat $ac_file_inputs > conftest.in | |
b11fb939 KR |
2807 | |
2808 | EOF | |
2809 | ||
2810 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
fb589130 | 2811 | # the proper values into config.h.in to produce config.h. And first: |
1c9dbb83 | 2812 | # Protect against being on the right side of a sed subst in config.status. |
fb589130 | 2813 | # Protect against being in an unquoted here document in config.status. |
b11fb939 KR |
2814 | rm -f conftest.vals |
2815 | cat > conftest.hdr <<\EOF | |
b11fb939 | 2816 | s/[\\&%]/\\&/g |
b11fb939 | 2817 | s%[\\$`]%\\&%g |
df586de2 | 2818 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp |
b11fb939 KR |
2819 | s%ac_d%ac_u%gp |
2820 | s%ac_u%ac_e%gp | |
2821 | EOF | |
2822 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
2823 | rm -f conftest.hdr | |
2824 | ||
2825 | # This sed command replaces #undef with comments. This is necessary, for | |
2826 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
2827 | # on some systems where configure will not decide to define it. | |
2828 | cat >> conftest.vals <<\EOF | |
2829 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
2830 | EOF | |
2831 | ||
2832 | # Break up conftest.vals because some shells have a limit on | |
2833 | # the size of here documents, and old seds have small limits too. | |
b11fb939 KR |
2834 | |
2835 | rm -f conftest.tail | |
2836 | while : | |
2837 | do | |
2838 | ac_lines=`grep -c . conftest.vals` | |
2839 | # grep -c gives empty output for an empty file on some AIX systems. | |
2840 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
2841 | # Write a limited-size here document to conftest.frag. | |
28d3e4a3 KR |
2842 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS |
2843 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
b11fb939 KR |
2844 | echo 'CEOF |
2845 | sed -f conftest.frag conftest.in > conftest.out | |
2846 | rm -f conftest.in | |
2847 | mv conftest.out conftest.in | |
28d3e4a3 | 2848 | ' >> $CONFIG_STATUS |
b11fb939 KR |
2849 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail |
2850 | rm -f conftest.vals | |
2851 | mv conftest.tail conftest.vals | |
2852 | done | |
2853 | rm -f conftest.vals | |
2854 | ||
28d3e4a3 | 2855 | cat >> $CONFIG_STATUS <<\EOF |
b11fb939 KR |
2856 | rm -f conftest.frag conftest.h |
2857 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
2858 | cat conftest.in >> conftest.h | |
2859 | rm -f conftest.in | |
2860 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
2861 | echo "$ac_file is unchanged" | |
2862 | rm -f conftest.h | |
2863 | else | |
df586de2 ILT |
2864 | # Remove last slash and all that follows it. Not all systems have dirname. |
2865 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
2866 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
2867 | # The file is in a subdirectory. | |
2868 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
2869 | fi | |
b11fb939 KR |
2870 | rm -f $ac_file |
2871 | mv conftest.h $ac_file | |
2872 | fi | |
2873 | fi; done | |
2874 | ||
c6c7035c MM |
2875 | EOF |
2876 | cat >> $CONFIG_STATUS <<EOF | |
515c7142 ILT |
2877 | target_cpu_type=${target_cpu_type} |
2878 | obj_format=${obj_format} | |
2879 | te_file=${te_file} | |
c6c7035c MM |
2880 | EOF |
2881 | cat >> $CONFIG_STATUS <<\EOF | |
515c7142 ILT |
2882 | rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h |
2883 | echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h | |
2884 | echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h | |
2885 | echo '#include "te-'"${te_file}"'.h"' > targ-env.h | |
2886 | echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h | |
39ffbb4d DE |
2887 | case ${target_cpu_type} in |
2888 | m32r) echo '#include "opcodes/'"${target_cpu_type}"'-opc.h"' > cgen-opc.h ;; | |
2889 | esac | |
36e889af | 2890 | exit 0 |
b11fb939 | 2891 | EOF |
28d3e4a3 | 2892 | chmod +x $CONFIG_STATUS |
bf111c9f | 2893 | rm -fr confdefs* $ac_clean_files |
833c46e1 | 2894 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 |
b11fb939 | 2895 |