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