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