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