]>
Commit | Line | Data |
---|---|---|
8c693660 KR |
1 | #! /bin/sh |
2 | ||
3 | # Guess values for system-dependent variables and create Makefiles. | |
85e493f0 | 4 | # Generated automatically using autoconf version 2.6 |
8c693660 KR |
5 | # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. |
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: | |
14 | ac_help="$ac_help | |
e818c22e | 15 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)" |
8c693660 | 16 | ac_help="$ac_help |
e818c22e | 17 | --enable-targets alternative target configurations" |
85e493f0 ILT |
18 | ac_help="$ac_help |
19 | --with-mmap try using mmap for BFD input files if available" | |
8c693660 KR |
20 | |
21 | # Initialize some variables set by options. | |
22 | # The variables have the same names as the options, with | |
23 | # dashes changed to underlines. | |
24 | build=NONE | |
25 | cache_file=./config.cache | |
26 | exec_prefix=NONE | |
27 | host=NONE | |
28 | no_create= | |
29 | nonopt=NONE | |
30 | no_recursion= | |
31 | prefix=NONE | |
32 | program_prefix=NONE | |
33 | program_suffix=NONE | |
34 | program_transform_name=s,x,x, | |
35 | silent= | |
36 | site= | |
37 | srcdir= | |
38 | target=NONE | |
39 | verbose= | |
40 | x_includes=NONE | |
41 | x_libraries=NONE | |
85e493f0 ILT |
42 | bindir='${exec_prefix}/bin' |
43 | sbindir='${exec_prefix}/sbin' | |
44 | libexecdir='${exec_prefix}/libexec' | |
45 | datadir='${prefix}/share' | |
46 | sysconfdir='${prefix}/etc' | |
47 | sharedstatedir='${prefix}/com' | |
48 | localstatedir='${prefix}/var' | |
49 | libdir='${exec_prefix}/lib' | |
50 | includedir='${prefix}/include' | |
51 | oldincludedir='/usr/include' | |
52 | infodir='${prefix}/info' | |
53 | mandir='${prefix}/man' | |
8c693660 KR |
54 | |
55 | # Initialize some other variables. | |
56 | subdirs= | |
85e493f0 | 57 | MFLAGS= MAKEFLAGS= |
8c693660 KR |
58 | |
59 | ac_prev= | |
60 | for ac_option | |
61 | do | |
62 | ||
63 | # If the previous option needs an argument, assign it. | |
64 | if test -n "$ac_prev"; then | |
65 | eval "$ac_prev=\$ac_option" | |
66 | ac_prev= | |
67 | continue | |
68 | fi | |
69 | ||
70 | case "$ac_option" in | |
71 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
72 | *) ac_optarg= ;; | |
73 | esac | |
74 | ||
75 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
76 | ||
77 | case "$ac_option" in | |
78 | ||
85e493f0 ILT |
79 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
80 | ac_prev=bindir ;; | |
81 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
82 | bindir="$ac_optarg" ;; | |
83 | ||
84 | -build | --build | --buil | --bui | --bu) | |
8c693660 | 85 | ac_prev=build ;; |
85e493f0 | 86 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
8c693660 KR |
87 | build="$ac_optarg" ;; |
88 | ||
89 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
90 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
91 | ac_prev=cache_file ;; | |
92 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
93 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
94 | cache_file="$ac_optarg" ;; | |
95 | ||
85e493f0 ILT |
96 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) |
97 | ac_prev=datadir ;; | |
98 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
99 | | --da=*) | |
100 | datadir="$ac_optarg" ;; | |
101 | ||
8c693660 KR |
102 | -disable-* | --disable-*) |
103 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
104 | # Reject names that are not valid shell variable names. | |
105 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
106 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
107 | fi | |
108 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
109 | eval "enable_${ac_feature}=no" ;; | |
110 | ||
111 | -enable-* | --enable-*) | |
112 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
113 | # Reject names that are not valid shell variable names. | |
114 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
115 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
116 | fi | |
117 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
118 | case "$ac_option" in | |
119 | *=*) ;; | |
120 | *) ac_optarg=yes ;; | |
121 | esac | |
122 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
123 | ||
124 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
125 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
126 | | --exec | --exe | --ex) | |
127 | ac_prev=exec_prefix ;; | |
128 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
129 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
130 | | --exec=* | --exe=* | --ex=*) | |
131 | exec_prefix="$ac_optarg" ;; | |
132 | ||
133 | -gas | --gas | --ga | --g) | |
134 | # Obsolete; use --with-gas. | |
135 | with_gas=yes ;; | |
136 | ||
137 | -help | --help | --hel | --he) | |
138 | # Omit some internal or obsolete options to make the list less imposing. | |
139 | # This message is too long to be a string in the A/UX 3.1 sh. | |
140 | cat << EOF | |
141 | Usage: configure [options] [host] | |
142 | Options: [defaults in brackets after descriptions] | |
143 | Configuration: | |
144 | --cache-file=FILE cache test results in FILE | |
145 | --help print this message | |
146 | --no-create do not create output files | |
147 | --quiet, --silent do not print \`checking...' messages | |
148 | --version print the version of autoconf that created configure | |
149 | Directory and file names: | |
150 | --prefix=PREFIX install architecture-independent files in PREFIX | |
151 | [$ac_default_prefix] | |
85e493f0 | 152 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
8c693660 | 153 | [same as prefix] |
85e493f0 ILT |
154 | --bindir=DIR user executables in DIR [EPREFIX/bin] |
155 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
156 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
157 | --datadir=DIR read-only architecture-independent data in DIR | |
158 | [PREFIX/share] | |
159 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
160 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
161 | [PREFIX/com] | |
162 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
163 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
164 | --includedir=DIR C header files in DIR [PREFIX/include] | |
165 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
166 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
167 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
8c693660 KR |
168 | --srcdir=DIR find the sources in DIR [configure dir or ..] |
169 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
170 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
85e493f0 ILT |
171 | --program-transform-name=PROGRAM |
172 | run sed PROGRAM on installed program names | |
173 | EOF | |
174 | cat << EOF | |
8c693660 KR |
175 | Host type: |
176 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
177 | --host=HOST configure for HOST [guessed] | |
178 | --target=TARGET configure for TARGET [TARGET=HOST] | |
179 | Features and packages: | |
180 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
181 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
182 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
183 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
184 | --x-includes=DIR X include files are in DIR | |
185 | --x-libraries=DIR X library files are in DIR | |
8c693660 | 186 | EOF |
85e493f0 ILT |
187 | if test -n "$ac_help"; then |
188 | echo "--enable and --with options recognized:$ac_help" | |
189 | fi | |
8c693660 KR |
190 | exit 0 ;; |
191 | ||
192 | -host | --host | --hos | --ho) | |
193 | ac_prev=host ;; | |
194 | -host=* | --host=* | --hos=* | --ho=*) | |
195 | host="$ac_optarg" ;; | |
196 | ||
85e493f0 ILT |
197 | -includedir | --includedir | --includedi | --included | --include \ |
198 | | --includ | --inclu | --incl | --inc) | |
199 | ac_prev=includedir ;; | |
200 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
201 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
202 | includedir="$ac_optarg" ;; | |
203 | ||
204 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
205 | ac_prev=infodir ;; | |
206 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
207 | infodir="$ac_optarg" ;; | |
208 | ||
209 | -libdir | --libdir | --libdi | --libd) | |
210 | ac_prev=libdir ;; | |
211 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
212 | libdir="$ac_optarg" ;; | |
213 | ||
214 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
215 | | --libexe | --libex | --libe) | |
216 | ac_prev=libexecdir ;; | |
217 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
218 | | --libexe=* | --libex=* | --libe=*) | |
219 | libexecdir="$ac_optarg" ;; | |
220 | ||
221 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
222 | | --localstate | --localstat | --localsta | --localst \ | |
223 | | --locals | --local | --loca | --loc | --lo) | |
224 | ac_prev=localstatedir ;; | |
225 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
226 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
227 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
228 | localstatedir="$ac_optarg" ;; | |
229 | ||
230 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
231 | ac_prev=mandir ;; | |
232 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
233 | mandir="$ac_optarg" ;; | |
234 | ||
8c693660 KR |
235 | -nfp | --nfp | --nf) |
236 | # Obsolete; use --without-fp. | |
237 | with_fp=no ;; | |
238 | ||
239 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
240 | | --no-cr | --no-c) | |
241 | no_create=yes ;; | |
242 | ||
243 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
244 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
245 | no_recursion=yes ;; | |
246 | ||
85e493f0 ILT |
247 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
248 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
249 | | --oldin | --oldi | --old | --ol | --o) | |
250 | ac_prev=oldincludedir ;; | |
251 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
252 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
253 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
254 | oldincludedir="$ac_optarg" ;; | |
255 | ||
8c693660 KR |
256 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
257 | ac_prev=prefix ;; | |
258 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
259 | prefix="$ac_optarg" ;; | |
260 | ||
261 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
262 | | --program-pre | --program-pr | --program-p) | |
263 | ac_prev=program_prefix ;; | |
264 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
265 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
266 | program_prefix="$ac_optarg" ;; | |
267 | ||
268 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
269 | | --program-suf | --program-su | --program-s) | |
270 | ac_prev=program_suffix ;; | |
271 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
272 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
273 | program_suffix="$ac_optarg" ;; | |
274 | ||
275 | -program-transform-name | --program-transform-name \ | |
276 | | --program-transform-nam | --program-transform-na \ | |
277 | | --program-transform-n | --program-transform- \ | |
278 | | --program-transform | --program-transfor \ | |
279 | | --program-transfo | --program-transf \ | |
280 | | --program-trans | --program-tran \ | |
281 | | --progr-tra | --program-tr | --program-t) | |
282 | ac_prev=program_transform_name ;; | |
283 | -program-transform-name=* | --program-transform-name=* \ | |
284 | | --program-transform-nam=* | --program-transform-na=* \ | |
285 | | --program-transform-n=* | --program-transform-=* \ | |
286 | | --program-transform=* | --program-transfor=* \ | |
287 | | --program-transfo=* | --program-transf=* \ | |
288 | | --program-trans=* | --program-tran=* \ | |
289 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
290 | program_transform_name="$ac_optarg" ;; | |
291 | ||
292 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
293 | | -silent | --silent | --silen | --sile | --sil) | |
294 | silent=yes ;; | |
295 | ||
85e493f0 ILT |
296 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
297 | ac_prev=sbindir ;; | |
298 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
299 | | --sbi=* | --sb=*) | |
300 | sbindir="$ac_optarg" ;; | |
301 | ||
302 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
303 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
304 | | --sharedst | --shareds | --shared | --share | --shar \ | |
305 | | --sha | --sh) | |
306 | ac_prev=sharedstatedir ;; | |
307 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
308 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
309 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
310 | | --sha=* | --sh=*) | |
311 | sharedstatedir="$ac_optarg" ;; | |
312 | ||
8c693660 KR |
313 | -site | --site | --sit) |
314 | ac_prev=site ;; | |
315 | -site=* | --site=* | --sit=*) | |
316 | site="$ac_optarg" ;; | |
317 | ||
318 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
319 | ac_prev=srcdir ;; | |
320 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
321 | srcdir="$ac_optarg" ;; | |
322 | ||
85e493f0 ILT |
323 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
324 | | --syscon | --sysco | --sysc | --sys | --sy) | |
325 | ac_prev=sysconfdir ;; | |
326 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
327 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
328 | sysconfdir="$ac_optarg" ;; | |
329 | ||
8c693660 KR |
330 | -target | --target | --targe | --targ | --tar | --ta | --t) |
331 | ac_prev=target ;; | |
332 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
333 | target="$ac_optarg" ;; | |
334 | ||
335 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
336 | verbose=yes ;; | |
337 | ||
338 | -version | --version | --versio | --versi | --vers) | |
85e493f0 | 339 | echo "configure generated by autoconf version 2.6" |
8c693660 KR |
340 | exit 0 ;; |
341 | ||
342 | -with-* | --with-*) | |
343 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
344 | # Reject names that are not valid shell variable names. | |
345 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
346 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
347 | fi | |
348 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
349 | case "$ac_option" in | |
350 | *=*) ;; | |
351 | *) ac_optarg=yes ;; | |
352 | esac | |
353 | eval "with_${ac_package}='$ac_optarg'" ;; | |
354 | ||
355 | -without-* | --without-*) | |
356 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
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 | eval "with_${ac_package}=no" ;; | |
363 | ||
364 | --x) | |
365 | # Obsolete; use --with-x. | |
366 | with_x=yes ;; | |
367 | ||
368 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
369 | | --x-incl | --x-inc | --x-in | --x-i) | |
370 | ac_prev=x_includes ;; | |
371 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
372 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
373 | x_includes="$ac_optarg" ;; | |
374 | ||
375 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
376 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
377 | ac_prev=x_libraries ;; | |
378 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
379 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
380 | x_libraries="$ac_optarg" ;; | |
381 | ||
382 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
383 | ;; | |
384 | ||
85e493f0 | 385 | *) |
8c693660 KR |
386 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
387 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
388 | fi | |
389 | if test "x$nonopt" != xNONE; then | |
390 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
391 | fi | |
392 | nonopt="$ac_option" | |
393 | ;; | |
394 | ||
395 | esac | |
396 | done | |
397 | ||
398 | if test -n "$ac_prev"; then | |
399 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
400 | fi | |
401 | ||
402 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
403 | ||
404 | # File descriptor usage: | |
405 | # 0 standard input | |
406 | # 1 file creation | |
407 | # 2 errors and warnings | |
408 | # 3 some systems may open it to /dev/tty | |
409 | # 4 used on the Kubota Titan | |
410 | # 6 checking for... messages and results | |
411 | # 5 compiler messages saved in config.log | |
412 | if test "$silent" = yes; then | |
413 | exec 6>/dev/null | |
414 | else | |
415 | exec 6>&1 | |
416 | fi | |
417 | exec 5>./config.log | |
418 | ||
419 | echo "\ | |
420 | This file contains any messages produced by compilers while | |
421 | running configure, to aid debugging if configure makes a mistake. | |
422 | " 1>&5 | |
423 | ||
424 | # Strip out --no-create and --no-recursion so they do not pile up. | |
425 | # Also quote any args containing shell metacharacters. | |
426 | ac_configure_args= | |
427 | for ac_arg | |
428 | do | |
429 | case "$ac_arg" in | |
430 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
431 | | --no-cr | --no-c) ;; | |
432 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
433 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
434 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
435 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
436 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
437 | esac | |
438 | done | |
439 | ||
440 | # NLS nuisances. | |
441 | # Only set LANG and LC_ALL to C if already set. | |
442 | # These must not be set unconditionally because not all systems understand | |
443 | # e.g. LANG=C (notably SCO). | |
444 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
445 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
446 | ||
447 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
448 | rm -rf conftest* confdefs.h | |
449 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
450 | echo > confdefs.h | |
451 | ||
452 | # A filename unique to this package, relative to the directory that | |
453 | # configure is in, which we can look for to find out if srcdir is correct. | |
454 | ac_unique_file=libbfd.c | |
455 | ||
456 | # Find the source files, if location was not specified. | |
457 | if test -z "$srcdir"; then | |
458 | ac_srcdir_defaulted=yes | |
459 | # Try the directory containing this script, then its parent. | |
460 | ac_prog=$0 | |
461 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
462 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
463 | srcdir=$ac_confdir | |
464 | if test ! -r $srcdir/$ac_unique_file; then | |
465 | srcdir=.. | |
466 | fi | |
467 | else | |
468 | ac_srcdir_defaulted=no | |
469 | fi | |
470 | if test ! -r $srcdir/$ac_unique_file; then | |
471 | if test "$ac_srcdir_defaulted" = yes; then | |
472 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
473 | else | |
474 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
475 | fi | |
476 | fi | |
477 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
478 | ||
479 | # Prefer explicitly selected file to automatically selected ones. | |
480 | if test -z "$CONFIG_SITE"; then | |
481 | if test "x$prefix" != xNONE; then | |
482 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
483 | else | |
484 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
485 | fi | |
486 | fi | |
487 | for ac_site_file in $CONFIG_SITE; do | |
488 | if test -r "$ac_site_file"; then | |
489 | echo "loading site script $ac_site_file" | |
490 | . "$ac_site_file" | |
491 | fi | |
492 | done | |
493 | ||
494 | if test -r "$cache_file"; then | |
495 | echo "loading cache $cache_file" | |
496 | . $cache_file | |
497 | else | |
498 | echo "creating cache $cache_file" | |
499 | > $cache_file | |
500 | fi | |
501 | ||
502 | ac_ext=c | |
503 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
85e493f0 ILT |
504 | ac_cpp='echo $CPP $CPPFLAGS 1>&5; |
505 | $CPP $CPPFLAGS' | |
506 | ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5; | |
507 | ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5' | |
508 | ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5; | |
509 | ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5' | |
8c693660 KR |
510 | |
511 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
512 | # Stardent Vistra SVR4 grep lacks -e, says [email protected]. | |
513 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
514 | ac_n= ac_c=' | |
515 | ' ac_t=' ' | |
516 | else | |
517 | ac_n=-n ac_c= ac_t= | |
518 | fi | |
519 | else | |
520 | ac_n= ac_c='\c' ac_t= | |
521 | fi | |
522 | ||
523 | ||
524 | ||
525 | # Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given. | |
85e493f0 ILT |
526 | if test "${enable_64_bit_bfd+set}" = set; then |
527 | enableval="$enable_64_bit_bfd" | |
a52a3ce8 | 528 | case "${enableval}" in |
8c693660 KR |
529 | yes) want64=true ;; |
530 | no) want64=false ;; | |
531 | *) { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;; | |
532 | esac | |
533 | else | |
534 | want64=false | |
535 | fi | |
536 | # Check whether --enable-targets or --disable-targets was given. | |
85e493f0 ILT |
537 | if test "${enable_targets+set}" = set; then |
538 | enableval="$enable_targets" | |
8c693660 KR |
539 | case "${enableval}" in |
540 | yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; } | |
541 | ;; | |
542 | no) enable_targets= ;; | |
543 | *) enable_targets=$enableval ;; | |
544 | esac | |
545 | fi | |
85e493f0 ILT |
546 | # Check whether --with-mmap or --without-mmap was given. |
547 | if test "${with_mmap+set}" = set; then | |
548 | withval="$with_mmap" | |
549 | case "${withval}" in | |
550 | yes) want_mmap=true ;; | |
551 | no) want_mmap=false ;; | |
552 | *) { echo "configure: error: bad value ${withval} for BFD with-mmap option" 1>&2; exit 1; } ;; | |
553 | esac | |
554 | else | |
555 | want_mmap=false | |
556 | fi | |
8c693660 | 557 | |
b7577823 ILT |
558 | |
559 | ||
8c693660 KR |
560 | ac_aux_dir= |
561 | for ac_dir in `cd $srcdir/..;pwd` $srcdir/`cd $srcdir/..;pwd`; do | |
562 | if test -f $ac_dir/install-sh; then | |
563 | ac_aux_dir=$ac_dir | |
564 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
565 | break | |
566 | elif test -f $ac_dir/install.sh; then | |
567 | ac_aux_dir=$ac_dir | |
568 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
569 | break | |
570 | fi | |
571 | done | |
572 | if test -z "$ac_aux_dir"; then | |
573 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir/..;pwd` $srcdir/`cd $srcdir/..;pwd`" 1>&2; exit 1; } | |
574 | fi | |
575 | ac_config_guess=$ac_aux_dir/config.guess | |
576 | ac_config_sub=$ac_aux_dir/config.sub | |
577 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
578 | ||
579 | ||
580 | # Do some error checking and defaulting for the host and target type. | |
581 | # The inputs are: | |
582 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
583 | # | |
584 | # The rules are: | |
585 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
85e493f0 | 586 | # same time. |
8c693660 KR |
587 | # 2. Host defaults to nonopt. |
588 | # 3. If nonopt is not specified, then host defaults to the current host, | |
589 | # as determined by config.guess. | |
590 | # 4. Target and build default to nonopt. | |
591 | # 5. If nonopt is not specified, then target and build default to host. | |
592 | ||
593 | # The aliases save the names the user supplied, while $host etc. | |
594 | # will get canonicalized. | |
595 | case $host---$target---$nonopt in | |
596 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
597 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
598 | esac | |
599 | ||
600 | ||
601 | # Make sure we can run config.sub. | |
602 | if $ac_config_sub sun4 >/dev/null 2>&1; then : | |
603 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
604 | fi | |
605 | ||
606 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
607 | ||
608 | host_alias=$host | |
609 | case "$host_alias" in | |
610 | NONE) | |
611 | case $nonopt in | |
612 | NONE) | |
613 | if host_alias=`$ac_config_guess`; then : | |
614 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
615 | fi ;; | |
616 | *) host_alias=$nonopt ;; | |
617 | esac ;; | |
618 | esac | |
619 | ||
620 | host=`$ac_config_sub $host_alias` | |
621 | host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` | |
622 | host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` | |
623 | host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` | |
624 | echo "$ac_t""$host" 1>&6 | |
625 | ||
626 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
627 | ||
628 | target_alias=$target | |
629 | case "$target_alias" in | |
630 | NONE) | |
631 | case $nonopt in | |
632 | NONE) target_alias=$host_alias ;; | |
633 | *) target_alias=$nonopt ;; | |
634 | esac ;; | |
635 | esac | |
636 | ||
637 | target=`$ac_config_sub $target_alias` | |
638 | target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` | |
639 | target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` | |
640 | target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` | |
641 | echo "$ac_t""$target" 1>&6 | |
642 | ||
643 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
644 | ||
645 | build_alias=$build | |
646 | case "$build_alias" in | |
647 | NONE) | |
648 | case $nonopt in | |
649 | NONE) build_alias=$host_alias ;; | |
650 | *) build_alias=$nonopt ;; | |
651 | esac ;; | |
652 | esac | |
653 | ||
654 | build=`$ac_config_sub $build_alias` | |
655 | build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` | |
656 | build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` | |
657 | build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` | |
658 | echo "$ac_t""$build" 1>&6 | |
659 | ||
660 | test "$host_alias" != "$target_alias" && | |
661 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
662 | NONENONEs,x,x, && | |
663 | program_prefix=${target_alias}- | |
664 | ||
665 | if test -z "$target" ; then | |
666 | { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; } | |
667 | fi | |
668 | if test "$program_transform_name" = s,x,x,; then | |
669 | program_transform_name= | |
670 | else | |
671 | # Double any \ or $. | |
672 | echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed | |
673 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
674 | rm -f conftestsed | |
675 | fi | |
676 | test "$program_prefix" != NONE && | |
677 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
678 | # Use a double $ so make ignores it. | |
679 | test "$program_suffix" != NONE && | |
680 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
681 | ||
682 | # sed with no file args requires a program. | |
683 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
684 | ||
685 | ||
686 | host64=false | |
687 | target64=false | |
688 | ||
689 | # host stuff: | |
690 | ||
f515fb2f | 691 | # Permit host specific settings. |
8c693660 KR |
692 | . ${srcdir}/configure.host |
693 | ||
85e493f0 ILT |
694 | # Extract the first word of "gcc", so it can be a program name with args. |
695 | set dummy gcc; ac_word=$2 | |
696 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
697 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then | |
698 | echo $ac_n "(cached) $ac_c" 1>&6 | |
699 | else | |
700 | if test -n "$CC"; then | |
701 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
702 | else | |
703 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
704 | for ac_dir in $PATH; do | |
705 | test -z "$ac_dir" && ac_dir=. | |
706 | if test -f $ac_dir/$ac_word; then | |
707 | ac_cv_prog_CC="gcc" | |
708 | break | |
709 | fi | |
710 | done | |
711 | IFS="$ac_save_ifs" | |
712 | test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc" | |
713 | fi | |
714 | fi | |
715 | CC="$ac_cv_prog_CC" | |
716 | if test -n "$CC"; then | |
717 | echo "$ac_t""$CC" 1>&6 | |
718 | else | |
719 | echo "$ac_t""no" 1>&6 | |
720 | fi | |
721 | ||
f515fb2f | 722 | |
85e493f0 ILT |
723 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
724 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then | |
725 | echo $ac_n "(cached) $ac_c" 1>&6 | |
726 | else | |
727 | cat > conftest.c <<EOF | |
f515fb2f ILT |
728 | #ifdef __GNUC__ |
729 | yes; | |
730 | #endif | |
731 | EOF | |
732 | if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then | |
85e493f0 ILT |
733 | ac_cv_prog_gcc=yes |
734 | else | |
735 | ac_cv_prog_gcc=no | |
736 | fi | |
737 | fi | |
738 | ||
739 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
740 | if test $ac_cv_prog_gcc = yes; then | |
f515fb2f ILT |
741 | GCC=yes |
742 | if test "${CFLAGS+set}" != set; then | |
85e493f0 ILT |
743 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 |
744 | if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then | |
745 | echo $ac_n "(cached) $ac_c" 1>&6 | |
746 | else | |
747 | echo 'void f(){}' > conftest.c | |
748 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
749 | ac_cv_prog_gcc_g=yes | |
750 | else | |
751 | ac_cv_prog_gcc_g=no | |
752 | fi | |
753 | rm -f conftest* | |
754 | ||
755 | fi | |
756 | ||
757 | echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 | |
758 | if test $ac_cv_prog_gcc_g = yes; then | |
f515fb2f ILT |
759 | CFLAGS="-g -O" |
760 | else | |
761 | CFLAGS="-O" | |
762 | fi | |
763 | fi | |
764 | else | |
765 | GCC= | |
766 | test "${CFLAGS+set}" = set || CFLAGS="-g" | |
767 | fi | |
f515fb2f ILT |
768 | |
769 | ||
770 | ||
6a468850 ILT |
771 | # Extract the first word of "ar", so it can be a program name with args. |
772 | set dummy ar; ac_word=$2 | |
773 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
774 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then | |
775 | echo $ac_n "(cached) $ac_c" 1>&6 | |
776 | else | |
777 | if test -n "$AR"; then | |
778 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
779 | else | |
780 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
781 | for ac_dir in $PATH; do | |
782 | test -z "$ac_dir" && ac_dir=. | |
783 | if test -f $ac_dir/$ac_word; then | |
784 | ac_cv_prog_AR="ar" | |
785 | break | |
786 | fi | |
787 | done | |
788 | IFS="$ac_save_ifs" | |
789 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR=":" | |
790 | fi | |
791 | fi | |
792 | AR="$ac_cv_prog_AR" | |
793 | if test -n "$AR"; then | |
794 | echo "$ac_t""$AR" 1>&6 | |
795 | else | |
796 | echo "$ac_t""no" 1>&6 | |
797 | fi | |
f515fb2f | 798 | |
8c693660 KR |
799 | # Extract the first word of "ranlib", so it can be a program name with args. |
800 | set dummy ranlib; ac_word=$2 | |
801 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
802 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then | |
803 | echo $ac_n "(cached) $ac_c" 1>&6 | |
804 | else | |
805 | if test -n "$RANLIB"; then | |
806 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
807 | else | |
808 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
809 | for ac_dir in $PATH; do | |
810 | test -z "$ac_dir" && ac_dir=. | |
811 | if test -f $ac_dir/$ac_word; then | |
812 | ac_cv_prog_RANLIB="ranlib" | |
813 | break | |
814 | fi | |
815 | done | |
816 | IFS="$ac_save_ifs" | |
817 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
818 | fi | |
819 | fi | |
820 | RANLIB="$ac_cv_prog_RANLIB" | |
821 | if test -n "$RANLIB"; then | |
822 | echo "$ac_t""$RANLIB" 1>&6 | |
823 | else | |
824 | echo "$ac_t""no" 1>&6 | |
825 | fi | |
826 | ||
f515fb2f ILT |
827 | # Find a good install program. We prefer a C program (faster), |
828 | # so one script is as good as another. But avoid the broken or | |
829 | # incompatible versions: | |
830 | # SysV /etc/install, /usr/sbin/install | |
831 | # SunOS /usr/etc/install | |
832 | # IRIX /sbin/install | |
833 | # AIX /bin/install | |
834 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
835 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
836 | # ./install, which can be erroneously created by make from ./install.sh. | |
837 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
838 | if test -z "$INSTALL"; then | |
839 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
840 | echo $ac_n "(cached) $ac_c" 1>&6 | |
841 | else | |
842 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
843 | for ac_dir in $PATH; do | |
844 | # Account for people who put trailing slashes in PATH elements. | |
845 | case "$ac_dir/" in | |
846 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
847 | *) | |
848 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
849 | for ac_prog in ginstall installbsd scoinst install; do | |
850 | if test -f $ac_dir/$ac_prog; then | |
851 | if test $ac_prog = install && | |
852 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
853 | # AIX install. It has an incompatible calling convention. | |
854 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
855 | : | |
856 | else | |
857 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
858 | break 2 | |
859 | fi | |
860 | fi | |
861 | done | |
862 | ;; | |
863 | esac | |
864 | done | |
865 | IFS="$ac_save_ifs" | |
85e493f0 | 866 | |
f515fb2f | 867 | fi |
85e493f0 ILT |
868 | if test "${ac_cv_path_install+set}" = set; then |
869 | INSTALL="$ac_cv_path_install" | |
870 | else | |
871 | # As a last resort, use the slow shell script. We don't cache a | |
872 | # path for INSTALL within a source directory, because that will | |
873 | # break other packages using the cache if that directory is | |
874 | # removed, or if the path is relative. | |
875 | INSTALL="$ac_install_sh" | |
876 | fi | |
f515fb2f ILT |
877 | fi |
878 | echo "$ac_t""$INSTALL" 1>&6 | |
8c693660 | 879 | |
f515fb2f ILT |
880 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
881 | # It thinks the first close brace ends the variable substitution. | |
882 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
8c693660 | 883 | |
f515fb2f | 884 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
8c693660 KR |
885 | |
886 | ||
b7577823 ILT |
887 | HOST_64BIT_LONG=0 |
888 | if test "x${HOST_64BIT_TYPE}" = "xlong"; then | |
889 | HOST_64BIT_LONG=1 | |
890 | fi | |
891 | ||
892 | ||
f515fb2f ILT |
893 | # If we cannot run a trivial program, we must be cross compiling. |
894 | echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 | |
895 | if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then | |
896 | echo $ac_n "(cached) $ac_c" 1>&6 | |
897 | else | |
898 | if test "$cross_compiling" = yes; then | |
899 | ac_cv_c_cross=yes | |
900 | else | |
901 | cat > conftest.$ac_ext <<EOF | |
85e493f0 | 902 | #line 903 "configure" |
f515fb2f ILT |
903 | #include "confdefs.h" |
904 | main(){return(0);} | |
905 | EOF | |
906 | eval $ac_link | |
907 | if test -s conftest && (./conftest; exit) 2>/dev/null; then | |
908 | ac_cv_c_cross=no | |
909 | else | |
910 | ac_cv_c_cross=yes | |
911 | fi | |
912 | fi | |
913 | rm -fr conftest* | |
914 | fi | |
85e493f0 | 915 | |
f515fb2f | 916 | echo "$ac_t""$ac_cv_c_cross" 1>&6 |
85e493f0 | 917 | cross_compiling=$ac_cv_c_cross |
8c693660 | 918 | |
b7577823 | 919 | # Put a plausible default for CC_FOR_BUILD in Makefile. |
6a468850 ILT |
920 | if test -z "$CC_FOR_BUILD"; then |
921 | if test "x$cross_compiling" = "xno"; then | |
922 | CC_FOR_BUILD='$(CC)' | |
923 | else | |
924 | CC_FOR_BUILD=gcc | |
925 | fi | |
8c693660 KR |
926 | fi |
927 | ||
f515fb2f | 928 | |
b7577823 ILT |
929 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
930 | # On Suns, sometimes $CPP names a directory. | |
931 | if test -n "$CPP" && test -d "$CPP"; then | |
932 | CPP= | |
933 | fi | |
934 | if test -z "$CPP"; then | |
935 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
936 | echo $ac_n "(cached) $ac_c" 1>&6 | |
937 | else | |
938 | # This must be in double quotes, not single quotes, because CPP may get | |
939 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
940 | CPP="${CC-cc} -E" | |
941 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
942 | # not just through cpp. | |
943 | cat > conftest.$ac_ext <<EOF | |
85e493f0 | 944 | #line 945 "configure" |
b7577823 ILT |
945 | #include "confdefs.h" |
946 | #include <assert.h> | |
947 | Syntax Error | |
948 | EOF | |
949 | eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
950 | ac_err=`grep -v '^ *+' conftest.out` | |
951 | if test -z "$ac_err"; then | |
952 | : | |
953 | else | |
954 | echo "$ac_err" >&5 | |
955 | rm -rf conftest* | |
956 | CPP="${CC-cc} -E -traditional-cpp" | |
957 | cat > conftest.$ac_ext <<EOF | |
85e493f0 | 958 | #line 959 "configure" |
b7577823 ILT |
959 | #include "confdefs.h" |
960 | #include <assert.h> | |
961 | Syntax Error | |
962 | EOF | |
963 | eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
964 | ac_err=`grep -v '^ *+' conftest.out` | |
965 | if test -z "$ac_err"; then | |
966 | : | |
967 | else | |
968 | echo "$ac_err" >&5 | |
969 | rm -rf conftest* | |
970 | CPP=/lib/cpp | |
971 | fi | |
972 | rm -f conftest* | |
973 | fi | |
974 | rm -f conftest* | |
975 | ac_cv_prog_CPP="$CPP" | |
976 | fi | |
977 | CPP="$ac_cv_prog_CPP" | |
978 | else | |
979 | ac_cv_prog_CPP="$CPP" | |
980 | fi | |
981 | echo "$ac_t""$CPP" 1>&6 | |
982 | ||
983 | for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h | |
984 | do | |
985 | ac_safe=`echo "$ac_hdr" | tr './\055' '___'` | |
986 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
987 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
988 | echo $ac_n "(cached) $ac_c" 1>&6 | |
989 | else | |
990 | cat > conftest.$ac_ext <<EOF | |
85e493f0 | 991 | #line 992 "configure" |
b7577823 ILT |
992 | #include "confdefs.h" |
993 | #include <$ac_hdr> | |
994 | EOF | |
995 | eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
996 | ac_err=`grep -v '^ *+' conftest.out` | |
997 | if test -z "$ac_err"; then | |
998 | rm -rf conftest* | |
999 | eval "ac_cv_header_$ac_safe=yes" | |
1000 | else | |
1001 | echo "$ac_err" >&5 | |
1002 | rm -rf conftest* | |
1003 | eval "ac_cv_header_$ac_safe=no" | |
1004 | fi | |
1005 | rm -f conftest* | |
1006 | fi | |
1007 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1008 | echo "$ac_t""yes" 1>&6 | |
85e493f0 | 1009 | ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` |
b7577823 ILT |
1010 | cat >> confdefs.h <<EOF |
1011 | #define $ac_tr_hdr 1 | |
1012 | EOF | |
1013 | ||
1014 | else | |
1015 | echo "$ac_t""no" 1>&6 | |
1016 | fi | |
1017 | done | |
1018 | ||
1dff7902 | 1019 | for ac_hdr in fcntl.h sys/file.h |
b7577823 ILT |
1020 | do |
1021 | ac_safe=`echo "$ac_hdr" | tr './\055' '___'` | |
1022 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
1023 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
1024 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1025 | else | |
1026 | cat > conftest.$ac_ext <<EOF | |
85e493f0 | 1027 | #line 1028 "configure" |
b7577823 ILT |
1028 | #include "confdefs.h" |
1029 | #include <$ac_hdr> | |
1030 | EOF | |
1031 | eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
1032 | ac_err=`grep -v '^ *+' conftest.out` | |
1033 | if test -z "$ac_err"; then | |
1034 | rm -rf conftest* | |
1035 | eval "ac_cv_header_$ac_safe=yes" | |
1036 | else | |
1037 | echo "$ac_err" >&5 | |
1038 | rm -rf conftest* | |
1039 | eval "ac_cv_header_$ac_safe=no" | |
1040 | fi | |
1041 | rm -f conftest* | |
1042 | fi | |
1043 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1044 | echo "$ac_t""yes" 1>&6 | |
85e493f0 | 1045 | ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` |
b7577823 ILT |
1046 | cat >> confdefs.h <<EOF |
1047 | #define $ac_tr_hdr 1 | |
1048 | EOF | |
1049 | ||
1050 | else | |
1051 | echo "$ac_t""no" 1>&6 | |
1052 | fi | |
1053 | done | |
1054 | ||
aadf04f7 | 1055 | for ac_func in fcntl getpagesize |
b7577823 ILT |
1056 | do |
1057 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
1058 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then | |
1059 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1060 | else | |
1061 | cat > conftest.$ac_ext <<EOF | |
85e493f0 | 1062 | #line 1063 "configure" |
b7577823 ILT |
1063 | #include "confdefs.h" |
1064 | /* System header to define __stub macros and hopefully few prototypes, | |
1065 | which can conflict with char $ac_func(); below. */ | |
1066 | #include <assert.h> | |
1067 | /* Override any gcc2 internal prototype to avoid an error. */ | |
85e493f0 | 1068 | char $ac_func(); |
b7577823 ILT |
1069 | |
1070 | int main() { return 0; } | |
1071 | int t() { | |
1072 | ||
1073 | /* The GNU C library defines this for functions which it implements | |
1074 | to always fail with ENOSYS. Some functions are actually named | |
1075 | something starting with __ and the normal name is an alias. */ | |
1076 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1077 | choke me | |
1078 | #else | |
1079 | $ac_func(); | |
1080 | #endif | |
1081 | ||
1082 | ; return 0; } | |
1083 | EOF | |
1084 | if eval $ac_link; then | |
1085 | rm -rf conftest* | |
1086 | eval "ac_cv_func_$ac_func=yes" | |
1087 | else | |
1088 | rm -rf conftest* | |
1089 | eval "ac_cv_func_$ac_func=no" | |
1090 | fi | |
1091 | rm -f conftest* | |
1092 | ||
1093 | fi | |
1094 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1095 | echo "$ac_t""yes" 1>&6 | |
85e493f0 | 1096 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
b7577823 ILT |
1097 | cat >> confdefs.h <<EOF |
1098 | #define $ac_tr_func 1 | |
1099 | EOF | |
1100 | ||
1101 | else | |
1102 | echo "$ac_t""no" 1>&6 | |
1103 | fi | |
1104 | done | |
1105 | ||
1106 | ||
85e493f0 | 1107 | |
b7577823 ILT |
1108 | case "${host}" in |
1109 | i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-win32) | |
1110 | cat >> confdefs.h <<\EOF | |
1111 | #define USE_BINARY_FOPEN 1 | |
1112 | EOF | |
1113 | ;; | |
1114 | esac | |
1115 | ||
1116 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 | |
1117 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then | |
1118 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1119 | else | |
1120 | cat > conftest.$ac_ext <<EOF | |
85e493f0 | 1121 | #line 1122 "configure" |
b7577823 ILT |
1122 | #include "confdefs.h" |
1123 | ||
1124 | #include <stdio.h> | |
1125 | #ifdef HAVE_STDLIB_H | |
1126 | #include <stdlib.h> | |
1127 | #endif | |
1128 | #ifdef HAVE_UNISTD_H | |
1129 | #include <unistd.h> | |
1130 | #endif | |
1131 | int main() { return 0; } | |
1132 | int t() { | |
1133 | char *(*pfn) = (char *(*)) malloc | |
1134 | ; return 0; } | |
1135 | EOF | |
1136 | if eval $ac_compile; then | |
1137 | rm -rf conftest* | |
1138 | bfd_cv_decl_needed_malloc=no | |
1139 | else | |
1140 | rm -rf conftest* | |
1141 | bfd_cv_decl_needed_malloc=yes | |
1142 | fi | |
1143 | rm -f conftest* | |
1144 | ||
1145 | fi | |
1146 | ||
1147 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 | |
1148 | if test $bfd_cv_decl_needed_malloc = yes; then | |
85e493f0 ILT |
1149 | bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
1150 | cat >> confdefs.h <<EOF | |
1151 | #define $bfd_tr_decl 1 | |
b7577823 | 1152 | EOF |
f515fb2f | 1153 | |
2b79a104 ILT |
1154 | fi |
1155 | ||
b7577823 ILT |
1156 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 |
1157 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then | |
1158 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1159 | else | |
1160 | cat > conftest.$ac_ext <<EOF | |
85e493f0 | 1161 | #line 1162 "configure" |
b7577823 | 1162 | #include "confdefs.h" |
8c693660 | 1163 | |
b7577823 ILT |
1164 | #include <stdio.h> |
1165 | #ifdef HAVE_STDLIB_H | |
1166 | #include <stdlib.h> | |
1167 | #endif | |
1168 | #ifdef HAVE_UNISTD_H | |
1169 | #include <unistd.h> | |
1170 | #endif | |
1171 | int main() { return 0; } | |
1172 | int t() { | |
85e493f0 | 1173 | char *(*pfn) = (char *(*)) free |
b7577823 ILT |
1174 | ; return 0; } |
1175 | EOF | |
1176 | if eval $ac_compile; then | |
1177 | rm -rf conftest* | |
1178 | bfd_cv_decl_needed_free=no | |
1179 | else | |
1180 | rm -rf conftest* | |
1181 | bfd_cv_decl_needed_free=yes | |
1182 | fi | |
1183 | rm -f conftest* | |
1184 | ||
1185 | fi | |
1186 | ||
1187 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 | |
1188 | if test $bfd_cv_decl_needed_free = yes; then | |
85e493f0 ILT |
1189 | bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
1190 | cat >> confdefs.h <<EOF | |
1191 | #define $bfd_tr_decl 1 | |
b7577823 ILT |
1192 | EOF |
1193 | ||
1194 | fi | |
f515fb2f | 1195 | |
85e493f0 | 1196 | |
a52a3ce8 ILT |
1197 | # If we are configured native, pick a core file support file. |
1198 | COREFILE= | |
1199 | COREFLAG= | |
1200 | if test "${target}" = "${host}"; then | |
1201 | case "${host}" in | |
999cc186 ILT |
1202 | alpha*-*-linux*) |
1203 | COREFILE=trad-core.o | |
1204 | cat >> confdefs.h <<\EOF | |
1205 | #define TRAD_HEADER "hosts/alphalinux.h" | |
1206 | EOF | |
1207 | ||
1208 | ;; | |
1209 | alpha*-*-*) COREFILE=osf-core.o ;; | |
a52a3ce8 ILT |
1210 | arm-*-riscix) COREFILE=trad-core.o ;; |
1211 | hppa*-*-hpux*) COREFILE=hpux-core.o ;; | |
1212 | hppa*-*-hiux*) COREFILE=hpux-core.o ;; | |
1213 | hppa*-*-bsd*) COREFILE="hpux-core.o hppabsd-core.o" | |
1214 | COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;; | |
b7577823 ILT |
1215 | i[345]86-sequent-bsd*) |
1216 | COREFILE=trad-core.o; | |
1217 | cat >> confdefs.h <<\EOF | |
1218 | #define TRAD_HEADER "hosts/symmetry.h" | |
1219 | EOF | |
1220 | ||
1221 | ;; | |
2cb159a5 | 1222 | i[345]86-sequent-sysv4*) ;; |
b7577823 ILT |
1223 | i[345]86-sequent-sysv*) |
1224 | COREFILE=trad-core.o | |
1225 | cat >> confdefs.h <<\EOF | |
1226 | #define TRAD_HEADER "hosts/symmetry.h" | |
1227 | EOF | |
1228 | ||
1229 | ;; | |
69a374c0 | 1230 | i[345]86-*-bsd* | i[345]86-*-freebsd*) |
b7577823 ILT |
1231 | COREFILE=trad-core.o |
1232 | cat >> confdefs.h <<\EOF | |
1233 | #define TRAD_HEADER "hosts/i386bsd.h" | |
69a374c0 NH |
1234 | EOF |
1235 | ||
1236 | ;; | |
1237 | i[345]86-*-netbsd*) | |
1238 | COREFILE=trad-core.o | |
1239 | cat >> confdefs.h <<\EOF | |
1240 | #define TRAD_HEADER "hosts/i386nbsd.h" | |
b7577823 ILT |
1241 | EOF |
1242 | ||
1243 | ;; | |
1244 | i[345]86-esix-sysv3*) | |
1245 | COREFILE=trad-core.o | |
1246 | cat >> confdefs.h <<\EOF | |
1247 | #define TRAD_HEADER "hosts/esix.h" | |
1248 | EOF | |
1249 | ||
1250 | ;; | |
1251 | i[345]86-*-sco* | i[345]86-*-isc*) | |
1252 | COREFILE=trad-core.o | |
1253 | cat >> confdefs.h <<\EOF | |
1254 | #define TRAD_HEADER "hosts/i386sco.h" | |
1255 | EOF | |
1256 | ||
1257 | ;; | |
1258 | i[345]86-*-mach3*) | |
1259 | COREFILE=trad-core.o | |
1260 | cat >> confdefs.h <<\EOF | |
1261 | #define TRAD_HEADER "hosts/i386mach3.h" | |
1262 | EOF | |
1263 | ||
1264 | ;; | |
1265 | i[345]86-*-linux*) | |
1266 | COREFILE=trad-core.o | |
1267 | cat >> confdefs.h <<\EOF | |
1268 | #define TRAD_HEADER "hosts/i386linux.h" | |
1269 | EOF | |
1270 | ||
1271 | ;; | |
2cb159a5 KR |
1272 | i[345]86-*-isc*) COREFILE=trad-core.o ;; |
1273 | i[345]86-*-aix*) COREFILE=aix386-core.o ;; | |
cf587de8 ILT |
1274 | i860-*-mach3* | i860-*-osf1*) |
1275 | COREFILE=trad-core.o | |
1276 | cat >> confdefs.h <<\EOF | |
1277 | #define TRAD_HEADER "hosts/i860mach3.h" | |
1278 | EOF | |
1279 | ||
1280 | ;; | |
b7577823 ILT |
1281 | mips-dec-bsd*) |
1282 | COREFILE=trad-core.o | |
1283 | cat >> confdefs.h <<\EOF | |
1284 | #define TRAD_HEADER "hosts/mipsbsd.h" | |
1285 | EOF | |
1286 | ||
1287 | ;; | |
1288 | mips-dec-mach3*) | |
1289 | COREFILE=trad-core.o | |
1290 | cat >> confdefs.h <<\EOF | |
1291 | #define TRAD_HEADER "hosts/mipsmach3.h" | |
1292 | EOF | |
1293 | ||
1294 | ;; | |
69a374c0 NH |
1295 | mips-*-netbsd*) |
1296 | COREFILE=trad-core.o | |
1297 | cat >> confdefs.h <<\EOF | |
1298 | #define TRAD_HEADER "hosts/mipsnbsd.h" | |
1299 | EOF | |
1300 | ||
1301 | ;; | |
b7577823 ILT |
1302 | mips-dec-*) |
1303 | COREFILE=trad-core.o | |
1304 | cat >> confdefs.h <<\EOF | |
1305 | #define TRAD_HEADER "hosts/decstation.h" | |
1306 | EOF | |
1307 | ||
1308 | ;; | |
a52a3ce8 ILT |
1309 | mips-sgi-irix4*) COREFILE=irix-core.o ;; |
1310 | mips-sgi-irix5*) COREFILE=irix-core.o ;; | |
b7577823 ILT |
1311 | mips-*-mach3*) |
1312 | COREFILE=trad-core.o | |
1313 | cat >> confdefs.h <<\EOF | |
1314 | #define TRAD_HEADER "hosts/mipsmach3.h" | |
1315 | EOF | |
1316 | ||
1317 | ;; | |
a52a3ce8 | 1318 | mips-*-sysv4*) ;; |
b7577823 ILT |
1319 | mips-*-sysv* | mips-*-riscos*) |
1320 | COREFILE=trad-core.o | |
1321 | cat >> confdefs.h <<\EOF | |
1322 | #define TRAD_HEADER "hosts/riscos.h" | |
1323 | EOF | |
1324 | ||
1325 | ;; | |
1326 | mips-sony-bsd*) | |
1327 | COREFILE=trad-core.o | |
1328 | cat >> confdefs.h <<\EOF | |
1329 | #define TRAD_HEADER "hosts/news-mips".h | |
1330 | EOF | |
1331 | ||
1332 | ;; | |
1333 | m68*-bull*-sysv*) | |
1334 | COREFILE=trad-core.o | |
1335 | cat >> confdefs.h <<\EOF | |
1336 | #define TRAD_HEADER "hosts/dpx2.h" | |
1337 | EOF | |
1338 | ||
1339 | ;; | |
a52a3ce8 | 1340 | m68*-hp-hpux*) COREFILE=hpux-core.o ;; |
b7577823 ILT |
1341 | m68*-hp-bsd*) |
1342 | COREFILE=trad-core.o | |
1343 | cat >> confdefs.h <<\EOF | |
1344 | #define TRAD_HEADER "hosts/hp300bsd.h" | |
7f82c7e1 ILT |
1345 | EOF |
1346 | ||
1347 | ;; | |
4c8b9746 | 1348 | m68*-motorola-sysv*) |
7f82c7e1 ILT |
1349 | COREFILE=trad-core.o |
1350 | cat >> confdefs.h <<\EOF | |
1351 | #define TRAD_HEADER "hosts/delta68.h" | |
b7577823 ILT |
1352 | EOF |
1353 | ||
1354 | ;; | |
b7577823 ILT |
1355 | m68*-sony-*) |
1356 | COREFILE=trad-core.o | |
1357 | cat >> confdefs.h <<\EOF | |
1358 | #define TRAD_HEADER "hosts/news.h" | |
69a374c0 NH |
1359 | EOF |
1360 | ||
1361 | ;; | |
1362 | m68*-*-netbsd*) | |
1363 | COREFILE=trad-core.o | |
1364 | cat >> confdefs.h <<\EOF | |
1365 | #define TRAD_HEADER "hosts/m68knbsd.h" | |
b7577823 ILT |
1366 | EOF |
1367 | ||
1368 | ;; | |
a52a3ce8 | 1369 | m88*-*-sysv4*) ;; |
7f82c7e1 | 1370 | m88*-motorola-sysv*) COREFILE=ptrace-core.o ;; |
b7577823 ILT |
1371 | m88*-*-mach3*) |
1372 | COREFILE=trad-core.o | |
1373 | cat >> confdefs.h <<\EOF | |
1374 | #define TRAD_HEADER "hosts/m88kmach3.h" | |
1375 | EOF | |
1376 | ||
1377 | ;; | |
1378 | ns32k-pc532-mach) | |
1379 | COREFILE=trad-core.o | |
1380 | cat >> confdefs.h <<\EOF | |
1381 | #define TRAD_HEADER "hosts/pc532mach.h" | |
69a374c0 NH |
1382 | EOF |
1383 | ||
1384 | ;; | |
1385 | ns32k-*-netbsd*) | |
1386 | COREFILE=trad-core.o | |
1387 | cat >> confdefs.h <<\EOF | |
1388 | #define TRAD_HEADER "hosts/ns32knbsd.h" | |
b7577823 ILT |
1389 | EOF |
1390 | ||
1391 | ;; | |
a52a3ce8 | 1392 | rs6000-*-lynx*) COREFILE=lynx-core.o ;; |
aadf04f7 | 1393 | rs6000-*-aix4*) COREFILE=rs6000-core.o ;; |
a52a3ce8 | 1394 | rs6000-*-*) COREFILE=rs6000-core.o ;; |
aadf04f7 | 1395 | powerpc-*-aix4*) COREFILE=rs6000-core.o ;; |
a52a3ce8 | 1396 | powerpc-*-aix*) COREFILE=rs6000-core.o ;; |
69a374c0 NH |
1397 | sparc-*-netbsd*) |
1398 | COREFILE=trad-core.o | |
1399 | cat >> confdefs.h <<\EOF | |
1400 | #define TRAD_HEADER "hosts/sparcnbsd.h" | |
1401 | EOF | |
1402 | ||
1403 | ;; | |
b7577823 ILT |
1404 | tahoe-*-*) |
1405 | COREFILE=trad-core.o | |
1406 | cat >> confdefs.h <<\EOF | |
1407 | #define TRAD_HEADER "hosts/tahoe.h" | |
1408 | EOF | |
1409 | ||
1410 | ;; | |
1411 | vax-*-ultrix2*) | |
1412 | COREFILE=trad-core.o | |
1413 | cat >> confdefs.h <<\EOF | |
1414 | #define TRAD_HEADER "hosts/vaxult2.h" | |
1415 | EOF | |
1416 | ||
1417 | ;; | |
1418 | vax-*-ultrix*) | |
1419 | COREFILE=trad-core.o | |
1420 | cat >> confdefs.h <<\EOF | |
1421 | #define TRAD_HEADER "hosts/vaxult2.h" | |
1422 | EOF | |
1423 | ||
1424 | ;; | |
1425 | vax-*-*) | |
1426 | COREFILE=trad-core.o | |
1427 | cat >> confdefs.h <<\EOF | |
1428 | #define TRAD_HEADER "hosts/vaxbsd.h" | |
1429 | EOF | |
1430 | ||
1431 | ;; | |
a52a3ce8 ILT |
1432 | esac |
1433 | ||
1434 | case "$COREFILE" in | |
1435 | aix386-core.o) COREFLAG=-DAIX386_CORE ;; | |
1436 | hppabsd-core.o) COREFLAG=-DHPPABSD_CORE ;; | |
1437 | hpux-core.o) COREFLAG=-DHPUX_CORE ;; | |
1438 | irix-core.o) COREFLAG=-DIRIX_CORE ;; | |
1439 | lynx-core.o) COREFLAG=-DLYNX_CORE ;; | |
1440 | osf-core.o) COREFLAG=-DOSF_CORE ;; | |
1441 | ptrace-core.o) COREFLAG=-DPTRACE_CORE ;; | |
1442 | rs6000-core.o) COREFLAG="$COREFLAG -DAIX_CORE" ;; | |
b7577823 | 1443 | trad-core.o) COREFLAG="$COREFLAG -DTRAD_CORE" ;; |
a52a3ce8 | 1444 | esac |
1dff7902 ILT |
1445 | |
1446 | # The ELF code uses the native <sys/procfs.h> to handle core files. | |
1447 | # Define HAVE_SYS_PROCFS_H if the file exists and defines | |
1448 | # prstatus_t. | |
1449 | echo $ac_n "checking for sys/procfs.h""... $ac_c" 1>&6 | |
1450 | if eval "test \"`echo '$''{'bfd_cv_header_sys_procfs_h'+set}'`\" = set"; then | |
1451 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1452 | else | |
1453 | cat > conftest.$ac_ext <<EOF | |
85e493f0 | 1454 | #line 1455 "configure" |
1dff7902 ILT |
1455 | #include "confdefs.h" |
1456 | #include <sys/procfs.h> | |
1457 | int main() { return 0; } | |
1458 | int t() { | |
1459 | prstatus_t t; | |
1460 | ; return 0; } | |
1461 | EOF | |
1462 | if eval $ac_compile; then | |
1463 | rm -rf conftest* | |
1464 | bfd_cv_header_sys_procfs_h=yes | |
1465 | else | |
1466 | rm -rf conftest* | |
1467 | bfd_cv_header_sys_procfs_h=no | |
1468 | fi | |
1469 | rm -f conftest* | |
1470 | ||
1471 | fi | |
1472 | ||
1473 | echo "$ac_t""$bfd_cv_header_sys_procfs_h" 1>&6 | |
1474 | if test $bfd_cv_header_sys_procfs_h = yes; then | |
1475 | cat >> confdefs.h <<\EOF | |
1476 | #define HAVE_SYS_PROCFS_H 1 | |
1477 | EOF | |
1478 | ||
1479 | fi | |
1480 | ||
a52a3ce8 ILT |
1481 | fi |
1482 | ||
1483 | ||
1484 | ||
8c693660 KR |
1485 | # target stuff: |
1486 | ||
1487 | # Canonicalize the secondary target names. | |
1488 | if test -n "$enable_targets" ; then | |
1489 | for targ in `echo $enable_targets | sed 's/,/ /g'` | |
1490 | do | |
9525b61b | 1491 | result=`$ac_config_sub $targ 2>/dev/null` |
8c693660 KR |
1492 | if test -n "$result" ; then |
1493 | canon_targets="$canon_targets $result" | |
1494 | else | |
1495 | # Allow targets that config.sub doesn't recognize, like "all". | |
1496 | canon_targets="$canon_targets $targ" | |
1497 | fi | |
1498 | done | |
1499 | fi | |
1500 | ||
1501 | all_targets=false | |
2b79a104 ILT |
1502 | defvec= |
1503 | selvecs= | |
1504 | selarchs= | |
1505 | TDEFINES= | |
8c693660 KR |
1506 | for targ in $target $canon_targets |
1507 | do | |
2b79a104 | 1508 | if test "x$targ" = "xall"; then |
8c693660 KR |
1509 | all_targets=true |
1510 | else | |
2b79a104 ILT |
1511 | . $srcdir/config.bfd |
1512 | if test "x$targ" = "x$target"; then | |
1513 | defvec=$targ_defvec | |
8c693660 | 1514 | fi |
2b79a104 ILT |
1515 | selvecs="$selvecs $targ_defvec $targ_selvecs" |
1516 | selarchs="$selarchs $targ_archs" | |
1517 | TDEFINES="$TDEFINES $targ_cflags" | |
8c693660 KR |
1518 | fi |
1519 | done | |
1520 | ||
8c693660 KR |
1521 | |
1522 | # This processing still needs to be done if we're to decide properly whether | |
1523 | # 64-bit support needs to be compiled in. Currently, it will be included if | |
1524 | # the default or any other explicitly requested target requires it; it | |
1525 | # will not be included on a 32-bit host if no 64-bit target is requested, and | |
1526 | # no "--with-64-bit-bfd" option is given, even if "--with-targets=all" is | |
1527 | # used. | |
1528 | ||
2b79a104 | 1529 | # uniq the default and selected vectors in all the configured targets. |
8c693660 | 1530 | f="" |
2b79a104 | 1531 | for i in $selvecs ; do |
8c693660 KR |
1532 | case " $f " in |
1533 | *" $i "*) ;; | |
1534 | *) f="$f $i" ;; | |
1535 | esac | |
1536 | done | |
2b79a104 | 1537 | selvecs="$f" |
8c693660 | 1538 | |
2b79a104 | 1539 | # uniq the architectures in all the configured targets. |
8c693660 | 1540 | f="" |
2b79a104 | 1541 | for i in $selarchs ; do |
8c693660 KR |
1542 | case " $f " in |
1543 | *" $i "*) ;; | |
1544 | *) f="$f $i" ;; | |
1545 | esac | |
1546 | done | |
2b79a104 | 1547 | selarchs="$f" |
8c693660 KR |
1548 | |
1549 | # Target backend .o files. | |
1550 | tb= | |
1551 | ||
a52a3ce8 ILT |
1552 | elf="elf.o elflink.o" |
1553 | ||
2b79a104 | 1554 | for vec in $selvecs |
8c693660 KR |
1555 | do |
1556 | case "$vec" in | |
1557 | # This list is alphabetized to make it easy to compare | |
1558 | # with the two vector lists in targets.c. | |
1559 | a29kcoff_big_vec) tb="$tb coff-a29k.o cofflink.o" ;; | |
1560 | a_out_adobe_vec) tb="$tb aout-adobe.o aout32.o stab-syms.o" ;; | |
a11e10fe DE |
1561 | armcoff_little_vec) tb="$tb coff-arm.o cofflink.o " ;; |
1562 | armcoff_big_vec) tb="$tb coff-arm.o cofflink.o " ;; | |
a52a3ce8 ILT |
1563 | armpe_little_vec) tb="$tb pe-arm.o cofflink.o " ;; |
1564 | armpe_big_vec) tb="$tb pe-arm.o cofflink.o " ;; | |
1565 | armpei_little_vec) tb="$tb pei-arm.o cofflink.o " ;; | |
1566 | armpei_big_vec) tb="$tb pei-arm.o cofflink.o " ;; | |
8c693660 KR |
1567 | aout0_big_vec) tb="$tb aout0.o aout32.o stab-syms.o" ;; |
1568 | aout_arm_big_vec) tb="$tb aout-arm.o aout32.o stab-syms.o" ;; | |
1569 | aout_arm_little_vec) tb="$tb aout-arm.o aout32.o stab-syms.o" ;; | |
1570 | aout_mips_big_vec) tb="$tb mipsbsd.o aout32.o stab-syms.o" ;; | |
1571 | aout_mips_little_vec) tb="$tb mipsbsd.o aout32.o stab-syms.o" ;; | |
1572 | apollocoff_vec) tb="$tb coff-apollo.o" ;; | |
1573 | b_out_vec_big_host) tb="$tb bout.o aout32.o stab-syms.o" ;; | |
1574 | b_out_vec_little_host) tb="$tb bout.o aout32.o stab-syms.o" ;; | |
1575 | # start-sanitize-arc | |
a52a3ce8 ILT |
1576 | bfd_elf32_littlearc_vec) tb="$tb elf32-arc.o elf32.o $elf" ;; |
1577 | bfd_elf32_bigarc_vec) tb="$tb elf32-arc.o elf32.o $elf" ;; | |
8c693660 | 1578 | # end-sanitize-arc |
a52a3ce8 ILT |
1579 | bfd_elf32_big_generic_vec) tb="$tb elf32-gen.o elf32.o $elf" ;; |
1580 | bfd_elf32_bigmips_vec) tb="$tb elf32-mips.o elf32.o $elf ecofflink.o" ;; | |
1581 | bfd_elf32_hppa_vec) tb="$tb elf32-hppa.o elf32.o $elf" ;; | |
1582 | bfd_elf32_i386_vec) tb="$tb elf32-i386.o elf32.o $elf" ;; | |
1583 | bfd_elf32_i860_vec) tb="$tb elf32-i860.o elf32.o $elf" ;; | |
1584 | bfd_elf32_little_generic_vec) tb="$tb elf32-gen.o elf32.o $elf" ;; | |
1585 | bfd_elf32_littlemips_vec) tb="$tb elf32-mips.o elf32.o $elf ecofflink.o" ;; | |
1586 | bfd_elf32_m68k_vec) tb="$tb elf32-m68k.o elf32.o $elf" ;; | |
1587 | bfd_elf32_m88k_vec) tb="$tb elf32-m88k.o elf32.o $elf" ;; | |
1588 | bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.o elf32.o $elf" ;; | |
1589 | bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.o elf32.o $elf" ;; | |
1590 | bfd_elf32_sparc_vec) tb="$tb elf32-sparc.o elf32.o $elf" ;; | |
1591 | bfd_elf64_big_generic_vec) tb="$tb elf64-gen.o elf64.o $elf" | |
8c693660 | 1592 | target64=true ;; |
a52a3ce8 | 1593 | bfd_elf64_little_generic_vec) tb="$tb elf64-gen.o elf64.o $elf" |
8c693660 | 1594 | target64=true ;; |
a52a3ce8 | 1595 | bfd_elf64_sparc_vec) tb="$tb elf64-sparc.o elf64.o $elf" |
8c693660 KR |
1596 | target64=true ;; |
1597 | cisco_core_vec) tb="$tb cisco-core.o" ;; | |
1598 | demo_64_vec) tb="$tb demo64.o aout64.o stab-syms.o" | |
1599 | target64=true ;; | |
1600 | ecoff_big_vec) tb="$tb coff-mips.o ecoff.o ecofflink.o" ;; | |
1601 | ecoff_little_vec) tb="$tb coff-mips.o ecoff.o ecofflink.o" ;; | |
1602 | ecoffalpha_little_vec) tb="$tb coff-alpha.o ecoff.o ecofflink.o" | |
1603 | target64=true ;; | |
1604 | h8300coff_vec) tb="$tb coff-h8300.o reloc16.o" ;; | |
1605 | h8500coff_vec) tb="$tb coff-h8500.o reloc16.o" ;; | |
1606 | host_aout_vec) tb="$tb host-aout.o aout32.o stab-syms.o" ;; | |
1607 | hp300bsd_vec) tb="$tb hp300bsd.o aout32.o stab-syms.o" ;; | |
1608 | hp300hpux_vec) tb="$tb hp300hpux.o aout32.o stab-syms.o" ;; | |
1609 | i386aout_vec) tb="$tb i386aout.o aout32.o stab-syms.o" ;; | |
1610 | i386bsd_vec) tb="$tb i386bsd.o aout32.o stab-syms.o" ;; | |
1611 | i386dynix_vec) tb="$tb i386dynix.o aout32.o stab-syms.o" ;; | |
1612 | i386coff_vec) tb="$tb coff-i386.o cofflink.o" ;; | |
1613 | i386msdos_vec) tb="$tb i386msdos.o" ;; | |
1614 | i386pe_vec) tb="$tb pe-i386.o cofflink.o " ;; | |
1615 | i386pei_vec) tb="$tb pei-i386.o cofflink.o" ;; | |
1616 | i386linux_vec) tb="$tb i386linux.o aout32.o stab-syms.o" ;; | |
1617 | i386lynx_aout_vec) tb="$tb i386lynx.o lynx-core.o aout32.o stab-syms.o" ;; | |
1618 | i386lynx_coff_vec) tb="$tb cf-i386lynx.o cofflink.o lynx-core.o stab-syms.o" ;; | |
1619 | i386mach3_vec) tb="$tb i386mach3.o aout32.o stab-syms.o" ;; | |
1620 | i386netbsd_vec) tb="$tb i386netbsd.o aout32.o stab-syms.o" ;; | |
1621 | i386os9k_vec) tb="$tb i386os9k.o aout32.o stab-syms.o" ;; | |
cf587de8 | 1622 | i860coff_vec) tb="$tb coff-i860.o cofflink.o" ;; |
a208a70f ILT |
1623 | icoff_big_vec) tb="$tb coff-i960.o cofflink.o" ;; |
1624 | icoff_little_vec) tb="$tb coff-i960.o cofflink.o" ;; | |
8c693660 KR |
1625 | ieee_vec) tb="$tb ieee.o" ;; |
1626 | m68kcoff_vec) tb="$tb coff-m68k.o cofflink.o" ;; | |
1627 | m68kcoffun_vec) tb="$tb coff-u68k.o coff-m68k.o cofflink.o" ;; | |
1628 | m68klynx_aout_vec) tb="$tb m68klynx.o lynx-core.o aout32.o stab-syms.o" ;; | |
1629 | m68klynx_coff_vec) tb="$tb cf-m68klynx.o coff-m68k.o cofflink.o lynx-core.o stab-syms.o" ;; | |
1630 | m68knetbsd_vec) tb="$tb m68knetbsd.o aout32.o stab-syms.o" ;; | |
69a374c0 | 1631 | m68k4knetbsd_vec) tb="$tb m68k4knetbsd.o aout32.o stab-syms.o" ;; |
8c693660 KR |
1632 | m88kbcs_vec) tb="$tb coff-m88k.o" ;; |
1633 | newsos3_vec) tb="$tb newsos3.o aout32.o stab-syms.o" ;; | |
1634 | nlm32_i386_vec) tb="$tb nlm32-i386.o nlm32.o nlm.o" ;; | |
1635 | nlm32_sparc_vec) tb="$tb nlm32-sparc.o nlm32.o nlm.o" ;; | |
1636 | nlm32_alpha_vec) tb="$tb nlm32-alpha.o nlm32.o nlm.o" | |
1637 | target64=true ;; | |
1638 | riscix_vec) tb="$tb aout32.o riscix.o stab-syms.o" ;; | |
1639 | nlm32_powerpc_vec) tb="$tb nlm32-ppc.o nlm32.o nlm.o" ;; | |
1640 | pc532netbsd_vec) tb="$tb ns32knetbsd.o aout-ns32k.o stab-syms.o" ;; | |
1641 | pc532machaout_vec) tb="$tb pc532-mach.o aout-ns32k.o stab-syms.o" ;; | |
aadf04f7 SS |
1642 | pmac_xcoff_vec) tb="$tb coff-pmac.o xcofflink.o" ;; |
1643 | rs6000coff_vec) tb="$tb coff-rs6000.o xcofflink.o" ;; | |
e0c10737 KK |
1644 | bfd_powerpc_pe_vec) tb="$tb pe-ppc.o cofflink.o" ;; |
1645 | bfd_powerpcle_pe_vec) tb="$tb pe-ppc.o cofflink.o" ;; | |
1646 | bfd_powerpc_pei_vec) tb="$tb pei-ppc.o cofflink.o" ;; | |
1647 | bfd_powerpcle_pei_vec) tb="$tb pei-ppc.o cofflink.o" ;; | |
8c693660 KR |
1648 | shcoff_vec) tb="$tb coff-sh.o cofflink.o" ;; |
1649 | # start-sanitize-rce | |
1650 | rce_aout_vec) tb="$tb aout-rce.o aout32.o stab-syms.o" ;; | |
1651 | # end-sanitize-rce | |
1652 | shlcoff_vec) tb="$tb coff-sh.o cofflink.o" ;; | |
1653 | som_vec) tb="$tb som.o" ;; | |
1654 | sparclynx_aout_vec) tb="$tb sparclynx.o lynx-core.o aout32.o stab-syms.o" ;; | |
1655 | sparclynx_coff_vec) tb="$tb cf-sparclynx.o lynx-core.o stab-syms.o" ;; | |
1656 | sparcnetbsd_vec) tb="$tb sparcnetbsd.o aout32.o stab-syms.o" ;; | |
1657 | sparccoff_vec) tb="$tb coff-sparc.o" ;; | |
1658 | srec_vec) tb="$tb srec.o" ;; | |
1659 | sunos_big_vec) tb="$tb sunos.o aout32.o stab-syms.o" ;; | |
1660 | symbolsrec_vec) tb="$tb srec.o" ;; | |
1661 | tekhex_vec) tb="$tb tekhex.o" ;; | |
1662 | we32kcoff_vec) tb="$tb coff-we32k.o" ;; | |
1663 | z8kcoff_vec) tb="$tb coff-z8k.o reloc16.o" ;; | |
1664 | w65_vec) tb="$tb coff-w65.o reloc16.o" ;; | |
1665 | versados_vec) tb="$tb versados.o" ;; | |
1666 | ||
1667 | "") ;; | |
1668 | *) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;; | |
1669 | esac | |
1670 | done | |
1671 | ||
1672 | # Target architecture .o files. | |
2b79a104 | 1673 | ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.o/g` |
8c693660 KR |
1674 | |
1675 | # Weed out duplicate .o files. | |
1676 | f="" | |
1677 | for i in $tb ; do | |
1678 | case " $f " in | |
1679 | *" $i "*) ;; | |
1680 | *) f="$f $i" ;; | |
1681 | esac | |
1682 | done | |
1683 | tb="$f" | |
1684 | ||
1685 | f="" | |
1686 | for i in $ta ; do | |
1687 | case " $f " in | |
1688 | *" $i "*) ;; | |
1689 | *) f="$f $i" ;; | |
1690 | esac | |
1691 | done | |
1692 | ta="$f" | |
1693 | ||
1694 | bfd_backends="$tb" | |
1695 | bfd_machines="$ta" | |
1696 | ||
1697 | if test x${all_targets} = xtrue ; then | |
1698 | bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)' | |
1699 | bfd_machines="${bfd_machines}"' $(ALL_MACHINES)' | |
2b79a104 ILT |
1700 | selvecs= |
1701 | selarchs= | |
8c693660 KR |
1702 | else # all_targets is true |
1703 | # Only set these if they will be nonempty, for the clever echo. | |
2b79a104 ILT |
1704 | test -n "$selvecs" && |
1705 | selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` | |
1706 | test -n "$selarchs" && | |
2ffbb79a | 1707 | selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` |
8c693660 KR |
1708 | fi # all_targets is true |
1709 | ||
1710 | case ${host64}-${target64}-${want64} in | |
1711 | *true*) | |
1712 | wordsize=64 | |
1713 | all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)' | |
1714 | ;; | |
1715 | false-false-false) | |
1716 | wordsize=32 | |
1717 | all_backends='$(BFD32_BACKENDS)' | |
1718 | ;; | |
1719 | esac | |
1720 | ||
1721 | ||
1722 | ||
1723 | ||
1724 | ||
1725 | ||
8c693660 KR |
1726 | tdefaults="" |
1727 | test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}" | |
1728 | test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'" | |
1729 | test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'" | |
1730 | ||
1731 | ||
4fe6d901 KR |
1732 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
1733 | if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then | |
1734 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1735 | else | |
1736 | if test "$cross_compiling" = yes; then | |
1737 | ac_cv_func_mmap=no | |
1738 | else | |
1739 | cat > conftest.$ac_ext <<EOF | |
85e493f0 | 1740 | #line 1741 "configure" |
4fe6d901 KR |
1741 | #include "confdefs.h" |
1742 | ||
1743 | /* Thanks to Mike Haertel and Jim Avera for this test. */ | |
1744 | #include <sys/types.h> | |
1745 | #include <fcntl.h> | |
1746 | #include <sys/mman.h> | |
1747 | ||
1748 | #ifdef BSD | |
1749 | # ifndef BSD4_1 | |
1750 | # define HAVE_GETPAGESIZE | |
1751 | # endif | |
1752 | #endif | |
1753 | ||
1754 | #ifndef HAVE_GETPAGESIZE | |
1755 | # include <sys/param.h> | |
1756 | # ifdef EXEC_PAGESIZE | |
1757 | # define getpagesize() EXEC_PAGESIZE | |
1758 | # else | |
1759 | # ifdef NBPG | |
1760 | # define getpagesize() NBPG * CLSIZE | |
1761 | # ifndef CLSIZE | |
1762 | # define CLSIZE 1 | |
1763 | # endif | |
1764 | # else | |
1765 | # ifdef NBPC | |
1766 | # define getpagesize() NBPC | |
1767 | # else | |
1768 | # define getpagesize() PAGESIZE /* SVR4 */ | |
1769 | # endif | |
1770 | # endif | |
1771 | # endif | |
1772 | #endif | |
1773 | ||
1774 | #ifdef __osf__ | |
1775 | # define valloc malloc | |
1776 | #endif | |
1777 | ||
1778 | #ifdef __cplusplus | |
1779 | extern "C" { void *valloc(unsigned), *malloc(unsigned); } | |
1780 | #else | |
1781 | char *valloc(), *malloc(); | |
1782 | #endif | |
1783 | ||
1784 | int | |
1785 | main() | |
1786 | { | |
1787 | char *buf1, *buf2, *buf3; | |
1788 | int i = getpagesize(), j; | |
1789 | int i2 = getpagesize()*2; | |
1790 | int fd; | |
1791 | ||
1792 | buf1 = (char *)valloc(i2); | |
1793 | buf2 = (char *)valloc(i); | |
1794 | buf3 = (char *)malloc(i2); | |
1795 | for (j = 0; j < i2; ++j) | |
1796 | *(buf1 + j) = rand(); | |
1797 | fd = open("conftestmmap", O_CREAT | O_RDWR, 0666); | |
1798 | write(fd, buf1, i2); | |
1799 | mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0); | |
1800 | for (j = 0; j < i; ++j) | |
1801 | if (*(buf1 + j) != *(buf2 + j)) | |
1802 | exit(1); | |
1803 | lseek(fd, (long)i, 0); | |
1804 | read(fd, buf2, i); /* read into mapped memory -- file should not change */ | |
1805 | /* (it does in i386 SVR4.0 - Jim Avera, [email protected]) */ | |
1806 | lseek(fd, (long)0, 0); | |
1807 | read(fd, buf3, i2); | |
1808 | for (j = 0; j < i2; ++j) | |
1809 | if (*(buf1 + j) != *(buf3 + j)) | |
1810 | exit(1); | |
1811 | exit(0); | |
1812 | } | |
1813 | ||
1814 | EOF | |
1815 | eval $ac_link | |
1816 | if test -s conftest && (./conftest; exit) 2>/dev/null; then | |
1817 | ac_cv_func_mmap=yes | |
1818 | else | |
1819 | ac_cv_func_mmap=no | |
1820 | fi | |
1821 | fi | |
1822 | rm -fr conftest* | |
1823 | fi | |
85e493f0 | 1824 | |
4fe6d901 KR |
1825 | echo "$ac_t""$ac_cv_func_mmap" 1>&6 |
1826 | if test $ac_cv_func_mmap = yes; then | |
1827 | cat >> confdefs.h <<\EOF | |
1828 | #define HAVE_MMAP 1 | |
1829 | EOF | |
1830 | ||
1831 | fi | |
1832 | ||
1833 | for ac_func in madvise mprotect | |
1834 | do | |
1835 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
1836 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then | |
1837 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1838 | else | |
1839 | cat > conftest.$ac_ext <<EOF | |
85e493f0 | 1840 | #line 1841 "configure" |
4fe6d901 KR |
1841 | #include "confdefs.h" |
1842 | /* System header to define __stub macros and hopefully few prototypes, | |
1843 | which can conflict with char $ac_func(); below. */ | |
1844 | #include <assert.h> | |
1845 | /* Override any gcc2 internal prototype to avoid an error. */ | |
85e493f0 | 1846 | char $ac_func(); |
4fe6d901 KR |
1847 | |
1848 | int main() { return 0; } | |
1849 | int t() { | |
1850 | ||
1851 | /* The GNU C library defines this for functions which it implements | |
1852 | to always fail with ENOSYS. Some functions are actually named | |
1853 | something starting with __ and the normal name is an alias. */ | |
1854 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1855 | choke me | |
1856 | #else | |
1857 | $ac_func(); | |
1858 | #endif | |
1859 | ||
1860 | ; return 0; } | |
1861 | EOF | |
1862 | if eval $ac_link; then | |
1863 | rm -rf conftest* | |
1864 | eval "ac_cv_func_$ac_func=yes" | |
1865 | else | |
1866 | rm -rf conftest* | |
1867 | eval "ac_cv_func_$ac_func=no" | |
1868 | fi | |
1869 | rm -f conftest* | |
1870 | ||
1871 | fi | |
1872 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1873 | echo "$ac_t""yes" 1>&6 | |
85e493f0 | 1874 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
4fe6d901 KR |
1875 | cat >> confdefs.h <<EOF |
1876 | #define $ac_tr_func 1 | |
1877 | EOF | |
1878 | ||
1879 | else | |
1880 | echo "$ac_t""no" 1>&6 | |
1881 | fi | |
1882 | done | |
1883 | ||
85e493f0 ILT |
1884 | case ${want_mmap}+${ac_cv_func_mmap} in |
1885 | true+yes ) cat >> confdefs.h <<\EOF | |
1886 | #define USE_MMAP 1 | |
1887 | EOF | |
1888 | ;; | |
1889 | esac | |
4fe6d901 | 1890 | |
8c693660 KR |
1891 | rm -f doc/config.status |
1892 | trap '' 1 2 15 | |
1893 | cat > confcache <<\EOF | |
1894 | # This file is a shell script that caches the results of configure | |
1895 | # tests run on this system so they can be shared between configure | |
1896 | # scripts and configure runs. It is not useful on other systems. | |
1897 | # If it contains results you don't want to keep, you may remove or edit it. | |
1898 | # | |
1899 | # By default, configure uses ./config.cache as the cache file, | |
1900 | # creating it if it does not exist already. You can give configure | |
1901 | # the --cache-file=FILE option to use a different cache file; that is | |
1902 | # what configure does when it calls configure scripts in | |
1903 | # subdirectories, so they share the cache. | |
1904 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
1905 | # config.status only pays attention to the cache file if you give it the | |
1906 | # --recheck option to rerun configure. | |
1907 | # | |
1908 | EOF | |
1909 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
1910 | # and sets the high bit in the cache file unless we assign to the vars. | |
1911 | (set) 2>&1 | | |
1912 | sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ | |
1913 | >> confcache | |
1914 | if cmp -s $cache_file confcache; then | |
1915 | : | |
1916 | else | |
1917 | if test -w $cache_file; then | |
1918 | echo "updating cache $cache_file" | |
1919 | cat confcache > $cache_file | |
1920 | else | |
1921 | echo "not updating unwritable cache $cache_file" | |
1922 | fi | |
1923 | fi | |
1924 | rm -f confcache | |
1925 | ||
1926 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
1927 | ||
1928 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
1929 | # Let make expand exec_prefix. | |
1930 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
1931 | ||
1932 | # Any assignment to VPATH causes Sun make to only execute | |
1933 | # the first set of double-colon rules, so remove it if not needed. | |
1934 | # If there is a colon in the path, we need to keep it. | |
1935 | if test "x$srcdir" = x.; then | |
1936 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
1937 | fi | |
1938 | ||
1939 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
1940 | ||
b7577823 | 1941 | DEFS=-DHAVE_CONFIG_H |
8c693660 KR |
1942 | |
1943 | # Without the "./", some shells look in PATH for config.status. | |
1944 | : ${CONFIG_STATUS=./config.status} | |
1945 | ||
1946 | echo creating $CONFIG_STATUS | |
1947 | rm -f $CONFIG_STATUS | |
1948 | cat > $CONFIG_STATUS <<EOF | |
1949 | #! /bin/sh | |
1950 | # Generated automatically by configure. | |
1951 | # Run this file to recreate the current configuration. | |
1952 | # This directory was configured as follows, | |
1953 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
1954 | # | |
1955 | # $0 $ac_configure_args | |
1956 | # | |
1957 | # Compiler output produced by configure, useful for debugging | |
1958 | # configure, is in ./config.log if it exists. | |
1959 | ||
1960 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
1961 | for ac_option | |
1962 | do | |
1963 | case "\$ac_option" in | |
1964 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
1965 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
1966 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
1967 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
85e493f0 | 1968 | echo "$CONFIG_STATUS generated by autoconf version 2.6" |
8c693660 KR |
1969 | exit 0 ;; |
1970 | -help | --help | --hel | --he | --h) | |
1971 | echo "\$ac_cs_usage"; exit 0 ;; | |
1972 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
1973 | esac | |
1974 | done | |
1975 | ||
1976 | ac_given_srcdir=$srcdir | |
f515fb2f | 1977 | ac_given_INSTALL="$INSTALL" |
8c693660 | 1978 | |
936b870c | 1979 | trap 'rm -fr `echo "Makefile doc/Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
8c693660 | 1980 | |
85e493f0 ILT |
1981 | # Protect against being on the right side of a sed subst in config.status. |
1982 | sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; | |
8c693660 KR |
1983 | s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF |
1984 | $ac_vpsub | |
1985 | $extrasub | |
1986 | s%@CFLAGS@%$CFLAGS%g | |
1987 | s%@CPPFLAGS@%$CPPFLAGS%g | |
1988 | s%@CXXFLAGS@%$CXXFLAGS%g | |
1989 | s%@DEFS@%$DEFS%g | |
1990 | s%@LDFLAGS@%$LDFLAGS%g | |
1991 | s%@LIBS@%$LIBS%g | |
1992 | s%@exec_prefix@%$exec_prefix%g | |
1993 | s%@prefix@%$prefix%g | |
1994 | s%@program_transform_name@%$program_transform_name%g | |
85e493f0 ILT |
1995 | s%@bindir@%$bindir%g |
1996 | s%@sbindir@%$sbindir%g | |
1997 | s%@libexecdir@%$libexecdir%g | |
1998 | s%@datadir@%$datadir%g | |
1999 | s%@sysconfdir@%$sysconfdir%g | |
2000 | s%@sharedstatedir@%$sharedstatedir%g | |
2001 | s%@localstatedir@%$localstatedir%g | |
2002 | s%@libdir@%$libdir%g | |
2003 | s%@includedir@%$includedir%g | |
2004 | s%@oldincludedir@%$oldincludedir%g | |
2005 | s%@infodir@%$infodir%g | |
2006 | s%@mandir@%$mandir%g | |
8c693660 KR |
2007 | s%@host@%$host%g |
2008 | s%@host_alias@%$host_alias%g | |
2009 | s%@host_cpu@%$host_cpu%g | |
2010 | s%@host_vendor@%$host_vendor%g | |
2011 | s%@host_os@%$host_os%g | |
2012 | s%@target@%$target%g | |
2013 | s%@target_alias@%$target_alias%g | |
2014 | s%@target_cpu@%$target_cpu%g | |
2015 | s%@target_vendor@%$target_vendor%g | |
2016 | s%@target_os@%$target_os%g | |
2017 | s%@build@%$build%g | |
2018 | s%@build_alias@%$build_alias%g | |
2019 | s%@build_cpu@%$build_cpu%g | |
2020 | s%@build_vendor@%$build_vendor%g | |
2021 | s%@build_os@%$build_os%g | |
f515fb2f ILT |
2022 | s%@CC@%$CC%g |
2023 | s%@HDEFINES@%$HDEFINES%g | |
2024 | s%@AR@%$AR%g | |
8c693660 | 2025 | s%@RANLIB@%$RANLIB%g |
f515fb2f ILT |
2026 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
2027 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
b7577823 | 2028 | s%@HOST_64BIT_LONG@%$HOST_64BIT_LONG%g |
f515fb2f | 2029 | s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g |
b7577823 | 2030 | s%@CPP@%$CPP%g |
a52a3ce8 ILT |
2031 | s%@COREFILE@%$COREFILE%g |
2032 | s%@COREFLAG@%$COREFLAG%g | |
2b79a104 | 2033 | s%@TDEFINES@%$TDEFINES%g |
8c693660 KR |
2034 | s%@wordsize@%$wordsize%g |
2035 | s%@all_backends@%$all_backends%g | |
2036 | s%@bfd_backends@%$bfd_backends%g | |
2037 | s%@bfd_machines@%$bfd_machines%g | |
2038 | s%@tdefaults@%$tdefaults%g | |
2039 | ||
2040 | CEOF | |
2041 | EOF | |
2042 | cat >> $CONFIG_STATUS <<EOF | |
2043 | ||
2044 | CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile"} | |
2045 | EOF | |
2046 | cat >> $CONFIG_STATUS <<\EOF | |
2047 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
2048 | # Support "outfile[:infile]", defaulting infile="outfile.in". | |
2049 | case "$ac_file" in | |
2050 | *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` | |
2051 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
2052 | *) ac_file_in="${ac_file}.in" ;; | |
2053 | esac | |
2054 | ||
2055 | # Adjust relative srcdir, etc. for subdirectories. | |
2056 | ||
2057 | # Remove last slash and all that follows it. Not all systems have dirname. | |
2058 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
2059 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
2060 | # The file is in a subdirectory. | |
2061 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
2062 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
2063 | # A "../" for each directory in $ac_dir_suffix. | |
2064 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
2065 | else | |
2066 | ac_dir_suffix= ac_dots= | |
2067 | fi | |
2068 | ||
2069 | case "$ac_given_srcdir" in | |
2070 | .) srcdir=. | |
2071 | if test -z "$ac_dots"; then top_srcdir=. | |
2072 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
2073 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
2074 | *) # Relative path. | |
2075 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
2076 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
2077 | esac | |
2078 | ||
f515fb2f ILT |
2079 | case "$ac_given_INSTALL" in |
2080 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
2081 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
2082 | esac | |
8c693660 KR |
2083 | echo creating "$ac_file" |
2084 | rm -f "$ac_file" | |
2085 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
2086 | case "$ac_file" in | |
2087 | *Makefile*) ac_comsub="1i\\ | |
2088 | # $configure_input" ;; | |
2089 | *) ac_comsub= ;; | |
2090 | esac | |
2091 | sed -e "$ac_comsub | |
2092 | s%@configure_input@%$configure_input%g | |
2093 | s%@srcdir@%$srcdir%g | |
2094 | s%@top_srcdir@%$top_srcdir%g | |
f515fb2f | 2095 | s%@INSTALL@%$INSTALL%g |
8c693660 KR |
2096 | " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file |
2097 | fi; done | |
2098 | rm -f conftest.subs | |
2099 | ||
b7577823 ILT |
2100 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
2101 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
2102 | # | |
2103 | # ac_d sets the value in "#define NAME VALUE" lines. | |
2104 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
2105 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
2106 | ac_dC='\3' | |
2107 | ac_dD='%g' | |
2108 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
2109 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
2110 | ac_uB='\([ ]\)%\1#\2define\3' | |
2111 | ac_uC=' ' | |
2112 | ac_uD='\4%g' | |
2113 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
2114 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
2115 | ac_eB='$%\1#\2define\3' | |
2116 | ac_eC=' ' | |
2117 | ac_eD='%g' | |
2118 | ||
936b870c | 2119 | CONFIG_HEADERS=${CONFIG_HEADERS-"config.h:config.in"} |
b7577823 ILT |
2120 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then |
2121 | # Support "outfile[:infile]", defaulting infile="outfile.in". | |
2122 | case "$ac_file" in | |
2123 | *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` | |
2124 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
2125 | *) ac_file_in="${ac_file}.in" ;; | |
2126 | esac | |
8c693660 | 2127 | |
b7577823 | 2128 | echo creating $ac_file |
8c693660 | 2129 | |
b7577823 ILT |
2130 | rm -f conftest.frag conftest.in conftest.out |
2131 | cp $ac_given_srcdir/$ac_file_in conftest.in | |
8c693660 | 2132 | |
b7577823 | 2133 | EOF |
8c693660 | 2134 | |
b7577823 ILT |
2135 | # Transform confdefs.h into a sed script conftest.vals that substitutes |
2136 | # the proper values into config.h.in to produce config.h. And first: | |
85e493f0 | 2137 | # Protect against being on the right side of a sed subst in config.status. |
b7577823 ILT |
2138 | # Protect against being in an unquoted here document in config.status. |
2139 | rm -f conftest.vals | |
2140 | cat > conftest.hdr <<\EOF | |
2141 | s/[\\&%]/\\&/g | |
2142 | s%[\\$`]%\\&%g | |
2143 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
2144 | s%ac_d%ac_u%gp | |
2145 | s%ac_u%ac_e%gp | |
2146 | EOF | |
2147 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
2148 | rm -f conftest.hdr | |
2149 | ||
2150 | # This sed command replaces #undef with comments. This is necessary, for | |
2151 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
2152 | # on some systems where configure will not decide to define it. | |
2153 | cat >> conftest.vals <<\EOF | |
2154 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
2155 | EOF | |
8c693660 | 2156 | |
b7577823 ILT |
2157 | # Break up conftest.vals because some shells have a limit on |
2158 | # the size of here documents, and old seds have small limits too. | |
2159 | # Maximum number of lines to put in a single here document. | |
2160 | ac_max_here_lines=12 | |
8c693660 | 2161 | |
b7577823 ILT |
2162 | rm -f conftest.tail |
2163 | while : | |
2164 | do | |
2165 | ac_lines=`grep -c . conftest.vals` | |
2166 | # grep -c gives empty output for an empty file on some AIX systems. | |
2167 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
2168 | # Write a limited-size here document to conftest.frag. | |
2169 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
2170 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
2171 | echo 'CEOF | |
2172 | sed -f conftest.frag conftest.in > conftest.out | |
2173 | rm -f conftest.in | |
2174 | mv conftest.out conftest.in | |
2175 | ' >> $CONFIG_STATUS | |
2176 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
2177 | rm -f conftest.vals | |
2178 | mv conftest.tail conftest.vals | |
2179 | done | |
2180 | rm -f conftest.vals | |
8c693660 | 2181 | |
b7577823 ILT |
2182 | cat >> $CONFIG_STATUS <<\EOF |
2183 | rm -f conftest.frag conftest.h | |
2184 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
2185 | cat conftest.in >> conftest.h | |
2186 | rm -f conftest.in | |
2187 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
2188 | echo "$ac_file is unchanged" | |
2189 | rm -f conftest.h | |
8c693660 | 2190 | else |
b7577823 ILT |
2191 | rm -f $ac_file |
2192 | mv conftest.h $ac_file | |
8c693660 | 2193 | fi |
b7577823 ILT |
2194 | fi; done |
2195 | ||
8c693660 | 2196 | |
a7873a6c | 2197 | case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac |
8c693660 KR |
2198 | exit 0 |
2199 | EOF | |
2200 | chmod +x $CONFIG_STATUS | |
2201 | rm -fr confdefs* $ac_clean_files | |
2202 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
2203 |