]>
Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | #! /bin/sh |
2 | ||
3 | # Guess values for system-dependent variables and create Makefiles. | |
4 | # Generated automatically using autoconf version 2.13 | |
5 | # Copyright (C) 1992, 93, 94, 95, 96 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 | |
15 | --enable-shared[=PKGS] build shared libraries [default=no]" | |
16 | ac_help="$ac_help | |
17 | --enable-static[=PKGS] build static libraries [default=yes]" | |
b2ef150d ILT |
18 | ac_help="$ac_help |
19 | --enable-fast-install[=PKGS] optimize for fast installation [default=yes]" | |
252b5132 RH |
20 | ac_help="$ac_help |
21 | --with-gnu-ld assume the C compiler uses GNU ld [default=no]" | |
b2ef150d ILT |
22 | ac_help="$ac_help |
23 | --disable-libtool-lock force libtool not to do file locking" | |
252b5132 RH |
24 | ac_help="$ac_help |
25 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)" | |
26 | ac_help="$ac_help | |
27 | --enable-targets alternative target configurations" | |
28 | ac_help="$ac_help | |
29 | --enable-commonbfdlib build shared BFD/opcodes/libiberty library" | |
30 | ac_help="$ac_help | |
31 | --with-mmap try using mmap for BFD input files if available" | |
32 | ac_help="$ac_help | |
33 | --enable-maintainer-mode enable make rules and dependencies not useful | |
34 | (and sometimes confusing) to the casual installer" | |
35 | ac_help="$ac_help | |
36 | --disable-nls do not use Native Language Support" | |
37 | ac_help="$ac_help | |
38 | --with-included-gettext use the GNU gettext library included here" | |
39 | ||
40 | # Initialize some variables set by options. | |
41 | # The variables have the same names as the options, with | |
42 | # dashes changed to underlines. | |
43 | build=NONE | |
44 | cache_file=./config.cache | |
45 | exec_prefix=NONE | |
46 | host=NONE | |
47 | no_create= | |
48 | nonopt=NONE | |
49 | no_recursion= | |
50 | prefix=NONE | |
51 | program_prefix=NONE | |
52 | program_suffix=NONE | |
53 | program_transform_name=s,x,x, | |
54 | silent= | |
55 | site= | |
3a6ae616 | 56 | sitefile= |
252b5132 RH |
57 | srcdir= |
58 | target=NONE | |
59 | verbose= | |
60 | x_includes=NONE | |
61 | x_libraries=NONE | |
62 | bindir='${exec_prefix}/bin' | |
63 | sbindir='${exec_prefix}/sbin' | |
64 | libexecdir='${exec_prefix}/libexec' | |
65 | datadir='${prefix}/share' | |
66 | sysconfdir='${prefix}/etc' | |
67 | sharedstatedir='${prefix}/com' | |
68 | localstatedir='${prefix}/var' | |
69 | libdir='${exec_prefix}/lib' | |
70 | includedir='${prefix}/include' | |
71 | oldincludedir='/usr/include' | |
72 | infodir='${prefix}/info' | |
73 | mandir='${prefix}/man' | |
74 | ||
75 | # Initialize some other variables. | |
76 | subdirs= | |
77 | MFLAGS= MAKEFLAGS= | |
78 | SHELL=${CONFIG_SHELL-/bin/sh} | |
79 | # Maximum number of lines to put in a shell here document. | |
80 | ac_max_here_lines=12 | |
81 | ||
82 | ac_prev= | |
83 | for ac_option | |
84 | do | |
85 | ||
86 | # If the previous option needs an argument, assign it. | |
87 | if test -n "$ac_prev"; then | |
88 | eval "$ac_prev=\$ac_option" | |
89 | ac_prev= | |
90 | continue | |
91 | fi | |
92 | ||
93 | case "$ac_option" in | |
94 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
95 | *) ac_optarg= ;; | |
96 | esac | |
97 | ||
98 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
99 | ||
100 | case "$ac_option" in | |
101 | ||
102 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
103 | ac_prev=bindir ;; | |
104 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
105 | bindir="$ac_optarg" ;; | |
106 | ||
107 | -build | --build | --buil | --bui | --bu) | |
108 | ac_prev=build ;; | |
109 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
110 | build="$ac_optarg" ;; | |
111 | ||
112 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
113 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
114 | ac_prev=cache_file ;; | |
115 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
116 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
117 | cache_file="$ac_optarg" ;; | |
118 | ||
119 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
120 | ac_prev=datadir ;; | |
121 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
122 | | --da=*) | |
123 | datadir="$ac_optarg" ;; | |
124 | ||
125 | -disable-* | --disable-*) | |
126 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
127 | # Reject names that are not valid shell variable names. | |
128 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
129 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
130 | fi | |
131 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
132 | eval "enable_${ac_feature}=no" ;; | |
133 | ||
134 | -enable-* | --enable-*) | |
135 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
136 | # Reject names that are not valid shell variable names. | |
137 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
138 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
139 | fi | |
140 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
141 | case "$ac_option" in | |
142 | *=*) ;; | |
143 | *) ac_optarg=yes ;; | |
144 | esac | |
145 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
146 | ||
147 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
148 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
149 | | --exec | --exe | --ex) | |
150 | ac_prev=exec_prefix ;; | |
151 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
152 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
153 | | --exec=* | --exe=* | --ex=*) | |
154 | exec_prefix="$ac_optarg" ;; | |
155 | ||
156 | -gas | --gas | --ga | --g) | |
157 | # Obsolete; use --with-gas. | |
158 | with_gas=yes ;; | |
159 | ||
160 | -help | --help | --hel | --he) | |
161 | # Omit some internal or obsolete options to make the list less imposing. | |
162 | # This message is too long to be a string in the A/UX 3.1 sh. | |
163 | cat << EOF | |
164 | Usage: configure [options] [host] | |
165 | Options: [defaults in brackets after descriptions] | |
166 | Configuration: | |
167 | --cache-file=FILE cache test results in FILE | |
168 | --help print this message | |
169 | --no-create do not create output files | |
170 | --quiet, --silent do not print \`checking...' messages | |
3a6ae616 | 171 | --site-file=FILE use FILE as the site file |
252b5132 RH |
172 | --version print the version of autoconf that created configure |
173 | Directory and file names: | |
174 | --prefix=PREFIX install architecture-independent files in PREFIX | |
175 | [$ac_default_prefix] | |
176 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
177 | [same as prefix] | |
178 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
179 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
180 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
181 | --datadir=DIR read-only architecture-independent data in DIR | |
182 | [PREFIX/share] | |
183 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
184 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
185 | [PREFIX/com] | |
186 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
187 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
188 | --includedir=DIR C header files in DIR [PREFIX/include] | |
189 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
190 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
191 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
192 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
193 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
194 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
195 | --program-transform-name=PROGRAM | |
196 | run sed PROGRAM on installed program names | |
197 | EOF | |
198 | cat << EOF | |
199 | Host type: | |
200 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
201 | --host=HOST configure for HOST [guessed] | |
202 | --target=TARGET configure for TARGET [TARGET=HOST] | |
203 | Features and packages: | |
204 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
205 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
206 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
207 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
208 | --x-includes=DIR X include files are in DIR | |
209 | --x-libraries=DIR X library files are in DIR | |
210 | EOF | |
211 | if test -n "$ac_help"; then | |
212 | echo "--enable and --with options recognized:$ac_help" | |
213 | fi | |
214 | exit 0 ;; | |
215 | ||
216 | -host | --host | --hos | --ho) | |
217 | ac_prev=host ;; | |
218 | -host=* | --host=* | --hos=* | --ho=*) | |
219 | host="$ac_optarg" ;; | |
220 | ||
221 | -includedir | --includedir | --includedi | --included | --include \ | |
222 | | --includ | --inclu | --incl | --inc) | |
223 | ac_prev=includedir ;; | |
224 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
225 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
226 | includedir="$ac_optarg" ;; | |
227 | ||
228 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
229 | ac_prev=infodir ;; | |
230 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
231 | infodir="$ac_optarg" ;; | |
232 | ||
233 | -libdir | --libdir | --libdi | --libd) | |
234 | ac_prev=libdir ;; | |
235 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
236 | libdir="$ac_optarg" ;; | |
237 | ||
238 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
239 | | --libexe | --libex | --libe) | |
240 | ac_prev=libexecdir ;; | |
241 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
242 | | --libexe=* | --libex=* | --libe=*) | |
243 | libexecdir="$ac_optarg" ;; | |
244 | ||
245 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
246 | | --localstate | --localstat | --localsta | --localst \ | |
247 | | --locals | --local | --loca | --loc | --lo) | |
248 | ac_prev=localstatedir ;; | |
249 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
250 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
251 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
252 | localstatedir="$ac_optarg" ;; | |
253 | ||
254 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
255 | ac_prev=mandir ;; | |
256 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
257 | mandir="$ac_optarg" ;; | |
258 | ||
259 | -nfp | --nfp | --nf) | |
260 | # Obsolete; use --without-fp. | |
261 | with_fp=no ;; | |
262 | ||
263 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
264 | | --no-cr | --no-c) | |
265 | no_create=yes ;; | |
266 | ||
267 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
268 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
269 | no_recursion=yes ;; | |
270 | ||
271 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
272 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
273 | | --oldin | --oldi | --old | --ol | --o) | |
274 | ac_prev=oldincludedir ;; | |
275 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
276 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
277 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
278 | oldincludedir="$ac_optarg" ;; | |
279 | ||
280 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
281 | ac_prev=prefix ;; | |
282 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
283 | prefix="$ac_optarg" ;; | |
284 | ||
285 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
286 | | --program-pre | --program-pr | --program-p) | |
287 | ac_prev=program_prefix ;; | |
288 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
289 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
290 | program_prefix="$ac_optarg" ;; | |
291 | ||
292 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
293 | | --program-suf | --program-su | --program-s) | |
294 | ac_prev=program_suffix ;; | |
295 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
296 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
297 | program_suffix="$ac_optarg" ;; | |
298 | ||
299 | -program-transform-name | --program-transform-name \ | |
300 | | --program-transform-nam | --program-transform-na \ | |
301 | | --program-transform-n | --program-transform- \ | |
302 | | --program-transform | --program-transfor \ | |
303 | | --program-transfo | --program-transf \ | |
304 | | --program-trans | --program-tran \ | |
305 | | --progr-tra | --program-tr | --program-t) | |
306 | ac_prev=program_transform_name ;; | |
307 | -program-transform-name=* | --program-transform-name=* \ | |
308 | | --program-transform-nam=* | --program-transform-na=* \ | |
309 | | --program-transform-n=* | --program-transform-=* \ | |
310 | | --program-transform=* | --program-transfor=* \ | |
311 | | --program-transfo=* | --program-transf=* \ | |
312 | | --program-trans=* | --program-tran=* \ | |
313 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
314 | program_transform_name="$ac_optarg" ;; | |
315 | ||
316 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
317 | | -silent | --silent | --silen | --sile | --sil) | |
318 | silent=yes ;; | |
319 | ||
320 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
321 | ac_prev=sbindir ;; | |
322 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
323 | | --sbi=* | --sb=*) | |
324 | sbindir="$ac_optarg" ;; | |
325 | ||
326 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
327 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
328 | | --sharedst | --shareds | --shared | --share | --shar \ | |
329 | | --sha | --sh) | |
330 | ac_prev=sharedstatedir ;; | |
331 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
332 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
333 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
334 | | --sha=* | --sh=*) | |
335 | sharedstatedir="$ac_optarg" ;; | |
336 | ||
337 | -site | --site | --sit) | |
338 | ac_prev=site ;; | |
339 | -site=* | --site=* | --sit=*) | |
340 | site="$ac_optarg" ;; | |
341 | ||
3a6ae616 ILT |
342 | -site-file | --site-file | --site-fil | --site-fi | --site-f) |
343 | ac_prev=sitefile ;; | |
344 | -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) | |
345 | sitefile="$ac_optarg" ;; | |
346 | ||
252b5132 RH |
347 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
348 | ac_prev=srcdir ;; | |
349 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
350 | srcdir="$ac_optarg" ;; | |
351 | ||
352 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
353 | | --syscon | --sysco | --sysc | --sys | --sy) | |
354 | ac_prev=sysconfdir ;; | |
355 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
356 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
357 | sysconfdir="$ac_optarg" ;; | |
358 | ||
359 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
360 | ac_prev=target ;; | |
361 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
362 | target="$ac_optarg" ;; | |
363 | ||
364 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
365 | verbose=yes ;; | |
366 | ||
367 | -version | --version | --versio | --versi | --vers) | |
368 | echo "configure generated by autoconf version 2.13" | |
369 | exit 0 ;; | |
370 | ||
371 | -with-* | --with-*) | |
372 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
373 | # Reject names that are not valid shell variable names. | |
374 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
375 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
376 | fi | |
377 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
378 | case "$ac_option" in | |
379 | *=*) ;; | |
380 | *) ac_optarg=yes ;; | |
381 | esac | |
382 | eval "with_${ac_package}='$ac_optarg'" ;; | |
383 | ||
384 | -without-* | --without-*) | |
385 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
386 | # Reject names that are not valid shell variable names. | |
387 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
388 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
389 | fi | |
390 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
391 | eval "with_${ac_package}=no" ;; | |
392 | ||
393 | --x) | |
394 | # Obsolete; use --with-x. | |
395 | with_x=yes ;; | |
396 | ||
397 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
398 | | --x-incl | --x-inc | --x-in | --x-i) | |
399 | ac_prev=x_includes ;; | |
400 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
401 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
402 | x_includes="$ac_optarg" ;; | |
403 | ||
404 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
405 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
406 | ac_prev=x_libraries ;; | |
407 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
408 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
409 | x_libraries="$ac_optarg" ;; | |
410 | ||
411 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
412 | ;; | |
413 | ||
414 | *) | |
415 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
416 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
417 | fi | |
418 | if test "x$nonopt" != xNONE; then | |
419 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
420 | fi | |
421 | nonopt="$ac_option" | |
422 | ;; | |
423 | ||
424 | esac | |
425 | done | |
426 | ||
427 | if test -n "$ac_prev"; then | |
428 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
429 | fi | |
430 | ||
431 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
432 | ||
433 | # File descriptor usage: | |
434 | # 0 standard input | |
435 | # 1 file creation | |
436 | # 2 errors and warnings | |
437 | # 3 some systems may open it to /dev/tty | |
438 | # 4 used on the Kubota Titan | |
439 | # 6 checking for... messages and results | |
440 | # 5 compiler messages saved in config.log | |
441 | if test "$silent" = yes; then | |
442 | exec 6>/dev/null | |
443 | else | |
444 | exec 6>&1 | |
445 | fi | |
446 | exec 5>./config.log | |
447 | ||
448 | echo "\ | |
449 | This file contains any messages produced by compilers while | |
450 | running configure, to aid debugging if configure makes a mistake. | |
451 | " 1>&5 | |
452 | ||
453 | # Strip out --no-create and --no-recursion so they do not pile up. | |
454 | # Also quote any args containing shell metacharacters. | |
455 | ac_configure_args= | |
456 | for ac_arg | |
457 | do | |
458 | case "$ac_arg" in | |
459 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
460 | | --no-cr | --no-c) ;; | |
461 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
462 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
463 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
464 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
465 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
466 | esac | |
467 | done | |
468 | ||
469 | # NLS nuisances. | |
470 | # Only set these to C if already set. These must not be set unconditionally | |
471 | # because not all systems understand e.g. LANG=C (notably SCO). | |
472 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
473 | # Non-C LC_CTYPE values break the ctype check. | |
474 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
475 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
476 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
477 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
478 | ||
479 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
480 | rm -rf conftest* confdefs.h | |
481 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
482 | echo > confdefs.h | |
483 | ||
484 | # A filename unique to this package, relative to the directory that | |
485 | # configure is in, which we can look for to find out if srcdir is correct. | |
486 | ac_unique_file=libbfd.c | |
487 | ||
488 | # Find the source files, if location was not specified. | |
489 | if test -z "$srcdir"; then | |
490 | ac_srcdir_defaulted=yes | |
491 | # Try the directory containing this script, then its parent. | |
492 | ac_prog=$0 | |
493 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
494 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
495 | srcdir=$ac_confdir | |
496 | if test ! -r $srcdir/$ac_unique_file; then | |
497 | srcdir=.. | |
498 | fi | |
499 | else | |
500 | ac_srcdir_defaulted=no | |
501 | fi | |
502 | if test ! -r $srcdir/$ac_unique_file; then | |
503 | if test "$ac_srcdir_defaulted" = yes; then | |
504 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
505 | else | |
506 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
507 | fi | |
508 | fi | |
509 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
510 | ||
511 | # Prefer explicitly selected file to automatically selected ones. | |
3a6ae616 ILT |
512 | if test -z "$sitefile"; then |
513 | if test -z "$CONFIG_SITE"; then | |
514 | if test "x$prefix" != xNONE; then | |
515 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
516 | else | |
517 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
518 | fi | |
252b5132 | 519 | fi |
3a6ae616 ILT |
520 | else |
521 | CONFIG_SITE="$sitefile" | |
252b5132 RH |
522 | fi |
523 | for ac_site_file in $CONFIG_SITE; do | |
524 | if test -r "$ac_site_file"; then | |
525 | echo "loading site script $ac_site_file" | |
526 | . "$ac_site_file" | |
527 | fi | |
528 | done | |
529 | ||
530 | if test -r "$cache_file"; then | |
531 | echo "loading cache $cache_file" | |
532 | . $cache_file | |
533 | else | |
534 | echo "creating cache $cache_file" | |
535 | > $cache_file | |
536 | fi | |
537 | ||
538 | ac_ext=c | |
539 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
540 | ac_cpp='$CPP $CPPFLAGS' | |
541 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
542 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
543 | cross_compiling=$ac_cv_prog_cc_cross | |
544 | ||
545 | ac_exeext= | |
546 | ac_objext=o | |
547 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
548 | # Stardent Vistra SVR4 grep lacks -e, says [email protected]. | |
549 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
550 | ac_n= ac_c=' | |
551 | ' ac_t=' ' | |
552 | else | |
553 | ac_n=-n ac_c= ac_t= | |
554 | fi | |
555 | else | |
556 | ac_n= ac_c='\c' ac_t= | |
557 | fi | |
558 | ||
559 | ||
560 | ||
561 | ac_aux_dir= | |
562 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do | |
563 | if test -f $ac_dir/install-sh; then | |
564 | ac_aux_dir=$ac_dir | |
565 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
566 | break | |
567 | elif test -f $ac_dir/install.sh; then | |
568 | ac_aux_dir=$ac_dir | |
569 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
570 | break | |
571 | fi | |
572 | done | |
573 | if test -z "$ac_aux_dir"; then | |
574 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } | |
575 | fi | |
576 | ac_config_guess=$ac_aux_dir/config.guess | |
577 | ac_config_sub=$ac_aux_dir/config.sub | |
578 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
579 | ||
580 | ||
581 | # Do some error checking and defaulting for the host and target type. | |
582 | # The inputs are: | |
583 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
584 | # | |
585 | # The rules are: | |
586 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
587 | # same time. | |
588 | # 2. Host defaults to nonopt. | |
589 | # 3. If nonopt is not specified, then host defaults to the current host, | |
590 | # as determined by config.guess. | |
591 | # 4. Target and build default to nonopt. | |
592 | # 5. If nonopt is not specified, then target and build default to host. | |
593 | ||
594 | # The aliases save the names the user supplied, while $host etc. | |
595 | # will get canonicalized. | |
596 | case $host---$target---$nonopt in | |
597 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
598 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
599 | esac | |
600 | ||
601 | ||
602 | # Make sure we can run config.sub. | |
603 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
604 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
605 | fi | |
606 | ||
607 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
3a6ae616 | 608 | echo "configure:609: checking host system type" >&5 |
252b5132 RH |
609 | |
610 | host_alias=$host | |
611 | case "$host_alias" in | |
612 | NONE) | |
613 | case $nonopt in | |
614 | NONE) | |
615 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
616 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
617 | fi ;; | |
618 | *) host_alias=$nonopt ;; | |
619 | esac ;; | |
620 | esac | |
621 | ||
622 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
623 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
624 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
625 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
626 | echo "$ac_t""$host" 1>&6 | |
627 | ||
628 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
3a6ae616 | 629 | echo "configure:630: checking target system type" >&5 |
252b5132 RH |
630 | |
631 | target_alias=$target | |
632 | case "$target_alias" in | |
633 | NONE) | |
634 | case $nonopt in | |
635 | NONE) target_alias=$host_alias ;; | |
636 | *) target_alias=$nonopt ;; | |
637 | esac ;; | |
638 | esac | |
639 | ||
640 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
641 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
642 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
643 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
644 | echo "$ac_t""$target" 1>&6 | |
645 | ||
646 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
3a6ae616 | 647 | echo "configure:648: checking build system type" >&5 |
252b5132 RH |
648 | |
649 | build_alias=$build | |
650 | case "$build_alias" in | |
651 | NONE) | |
652 | case $nonopt in | |
653 | NONE) build_alias=$host_alias ;; | |
654 | *) build_alias=$nonopt ;; | |
655 | esac ;; | |
656 | esac | |
657 | ||
658 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
659 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
660 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
661 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
662 | echo "$ac_t""$build" 1>&6 | |
663 | ||
664 | test "$host_alias" != "$target_alias" && | |
665 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
666 | NONENONEs,x,x, && | |
667 | program_prefix=${target_alias}- | |
668 | ||
669 | # Extract the first word of "gcc", so it can be a program name with args. | |
670 | set dummy gcc; ac_word=$2 | |
671 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3a6ae616 | 672 | echo "configure:673: checking for $ac_word" >&5 |
252b5132 RH |
673 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
674 | echo $ac_n "(cached) $ac_c" 1>&6 | |
675 | else | |
676 | if test -n "$CC"; then | |
677 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
678 | else | |
679 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
680 | ac_dummy="$PATH" | |
681 | for ac_dir in $ac_dummy; do | |
682 | test -z "$ac_dir" && ac_dir=. | |
683 | if test -f $ac_dir/$ac_word; then | |
684 | ac_cv_prog_CC="gcc" | |
685 | break | |
686 | fi | |
687 | done | |
688 | IFS="$ac_save_ifs" | |
689 | fi | |
690 | fi | |
691 | CC="$ac_cv_prog_CC" | |
692 | if test -n "$CC"; then | |
693 | echo "$ac_t""$CC" 1>&6 | |
694 | else | |
695 | echo "$ac_t""no" 1>&6 | |
696 | fi | |
697 | ||
698 | if test -z "$CC"; then | |
699 | # Extract the first word of "cc", so it can be a program name with args. | |
700 | set dummy cc; ac_word=$2 | |
701 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3a6ae616 | 702 | echo "configure:703: checking for $ac_word" >&5 |
252b5132 RH |
703 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
704 | echo $ac_n "(cached) $ac_c" 1>&6 | |
705 | else | |
706 | if test -n "$CC"; then | |
707 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
708 | else | |
709 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
710 | ac_prog_rejected=no | |
711 | ac_dummy="$PATH" | |
712 | for ac_dir in $ac_dummy; do | |
713 | test -z "$ac_dir" && ac_dir=. | |
714 | if test -f $ac_dir/$ac_word; then | |
715 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
716 | ac_prog_rejected=yes | |
717 | continue | |
718 | fi | |
719 | ac_cv_prog_CC="cc" | |
720 | break | |
721 | fi | |
722 | done | |
723 | IFS="$ac_save_ifs" | |
724 | if test $ac_prog_rejected = yes; then | |
725 | # We found a bogon in the path, so make sure we never use it. | |
726 | set dummy $ac_cv_prog_CC | |
727 | shift | |
728 | if test $# -gt 0; then | |
729 | # We chose a different compiler from the bogus one. | |
730 | # However, it has the same basename, so the bogon will be chosen | |
731 | # first if we set CC to just the basename; use the full file name. | |
732 | shift | |
733 | set dummy "$ac_dir/$ac_word" "$@" | |
734 | shift | |
735 | ac_cv_prog_CC="$@" | |
736 | fi | |
737 | fi | |
738 | fi | |
739 | fi | |
740 | CC="$ac_cv_prog_CC" | |
741 | if test -n "$CC"; then | |
742 | echo "$ac_t""$CC" 1>&6 | |
743 | else | |
744 | echo "$ac_t""no" 1>&6 | |
745 | fi | |
746 | ||
747 | if test -z "$CC"; then | |
748 | case "`uname -s`" in | |
749 | *win32* | *WIN32*) | |
750 | # Extract the first word of "cl", so it can be a program name with args. | |
751 | set dummy cl; ac_word=$2 | |
752 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3a6ae616 | 753 | echo "configure:754: checking for $ac_word" >&5 |
252b5132 RH |
754 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
755 | echo $ac_n "(cached) $ac_c" 1>&6 | |
756 | else | |
757 | if test -n "$CC"; then | |
758 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
759 | else | |
760 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
761 | ac_dummy="$PATH" | |
762 | for ac_dir in $ac_dummy; do | |
763 | test -z "$ac_dir" && ac_dir=. | |
764 | if test -f $ac_dir/$ac_word; then | |
765 | ac_cv_prog_CC="cl" | |
766 | break | |
767 | fi | |
768 | done | |
769 | IFS="$ac_save_ifs" | |
770 | fi | |
771 | fi | |
772 | CC="$ac_cv_prog_CC" | |
773 | if test -n "$CC"; then | |
774 | echo "$ac_t""$CC" 1>&6 | |
775 | else | |
776 | echo "$ac_t""no" 1>&6 | |
777 | fi | |
778 | ;; | |
779 | esac | |
780 | fi | |
781 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
782 | fi | |
783 | ||
784 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
3a6ae616 | 785 | echo "configure:786: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
252b5132 RH |
786 | |
787 | ac_ext=c | |
788 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
789 | ac_cpp='$CPP $CPPFLAGS' | |
790 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
791 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
792 | cross_compiling=$ac_cv_prog_cc_cross | |
793 | ||
794 | cat > conftest.$ac_ext << EOF | |
795 | ||
3a6ae616 | 796 | #line 797 "configure" |
252b5132 RH |
797 | #include "confdefs.h" |
798 | ||
799 | main(){return(0);} | |
800 | EOF | |
3a6ae616 | 801 | if { (eval echo configure:802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
802 | ac_cv_prog_cc_works=yes |
803 | # If we can't run a trivial program, we are probably using a cross compiler. | |
804 | if (./conftest; exit) 2>/dev/null; then | |
805 | ac_cv_prog_cc_cross=no | |
806 | else | |
807 | ac_cv_prog_cc_cross=yes | |
808 | fi | |
809 | else | |
810 | echo "configure: failed program was:" >&5 | |
811 | cat conftest.$ac_ext >&5 | |
812 | ac_cv_prog_cc_works=no | |
813 | fi | |
814 | rm -fr conftest* | |
815 | ac_ext=c | |
816 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
817 | ac_cpp='$CPP $CPPFLAGS' | |
818 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
819 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
820 | cross_compiling=$ac_cv_prog_cc_cross | |
821 | ||
822 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
823 | if test $ac_cv_prog_cc_works = no; then | |
824 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
825 | fi | |
826 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
3a6ae616 | 827 | echo "configure:828: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
252b5132 RH |
828 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
829 | cross_compiling=$ac_cv_prog_cc_cross | |
830 | ||
831 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
3a6ae616 | 832 | echo "configure:833: checking whether we are using GNU C" >&5 |
252b5132 RH |
833 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
834 | echo $ac_n "(cached) $ac_c" 1>&6 | |
835 | else | |
836 | cat > conftest.c <<EOF | |
837 | #ifdef __GNUC__ | |
838 | yes; | |
839 | #endif | |
840 | EOF | |
3a6ae616 | 841 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
252b5132 RH |
842 | ac_cv_prog_gcc=yes |
843 | else | |
844 | ac_cv_prog_gcc=no | |
845 | fi | |
846 | fi | |
847 | ||
848 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
849 | ||
850 | if test $ac_cv_prog_gcc = yes; then | |
851 | GCC=yes | |
852 | else | |
853 | GCC= | |
854 | fi | |
855 | ||
856 | ac_test_CFLAGS="${CFLAGS+set}" | |
857 | ac_save_CFLAGS="$CFLAGS" | |
858 | CFLAGS= | |
859 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
3a6ae616 | 860 | echo "configure:861: checking whether ${CC-cc} accepts -g" >&5 |
252b5132 RH |
861 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
862 | echo $ac_n "(cached) $ac_c" 1>&6 | |
863 | else | |
864 | echo 'void f(){}' > conftest.c | |
865 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
866 | ac_cv_prog_cc_g=yes | |
867 | else | |
868 | ac_cv_prog_cc_g=no | |
869 | fi | |
870 | rm -f conftest* | |
871 | ||
872 | fi | |
873 | ||
874 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
875 | if test "$ac_test_CFLAGS" = set; then | |
876 | CFLAGS="$ac_save_CFLAGS" | |
877 | elif test $ac_cv_prog_cc_g = yes; then | |
878 | if test "$GCC" = yes; then | |
879 | CFLAGS="-g -O2" | |
880 | else | |
881 | CFLAGS="-g" | |
882 | fi | |
883 | else | |
884 | if test "$GCC" = yes; then | |
885 | CFLAGS="-O2" | |
886 | else | |
887 | CFLAGS= | |
888 | fi | |
889 | fi | |
890 | ||
891 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 | |
3a6ae616 | 892 | echo "configure:893: checking for POSIXized ISC" >&5 |
252b5132 RH |
893 | if test -d /etc/conf/kconfig.d && |
894 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
895 | then | |
896 | echo "$ac_t""yes" 1>&6 | |
897 | ISC=yes # If later tests want to check for ISC. | |
898 | cat >> confdefs.h <<\EOF | |
899 | #define _POSIX_SOURCE 1 | |
900 | EOF | |
901 | ||
902 | if test "$GCC" = yes; then | |
903 | CC="$CC -posix" | |
904 | else | |
905 | CC="$CC -Xp" | |
906 | fi | |
907 | else | |
908 | echo "$ac_t""no" 1>&6 | |
909 | ISC= | |
910 | fi | |
911 | ||
912 | ||
913 | # Find a good install program. We prefer a C program (faster), | |
914 | # so one script is as good as another. But avoid the broken or | |
915 | # incompatible versions: | |
916 | # SysV /etc/install, /usr/sbin/install | |
917 | # SunOS /usr/etc/install | |
918 | # IRIX /sbin/install | |
919 | # AIX /bin/install | |
920 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
921 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
922 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
923 | # ./install, which can be erroneously created by make from ./install.sh. | |
924 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
3a6ae616 | 925 | echo "configure:926: checking for a BSD compatible install" >&5 |
252b5132 RH |
926 | if test -z "$INSTALL"; then |
927 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
928 | echo $ac_n "(cached) $ac_c" 1>&6 | |
929 | else | |
930 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
931 | for ac_dir in $PATH; do | |
932 | # Account for people who put trailing slashes in PATH elements. | |
933 | case "$ac_dir/" in | |
934 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
935 | *) | |
936 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
937 | # Don't use installbsd from OSF since it installs stuff as root | |
938 | # by default. | |
939 | for ac_prog in ginstall scoinst install; do | |
940 | if test -f $ac_dir/$ac_prog; then | |
941 | if test $ac_prog = install && | |
942 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
943 | # AIX install. It has an incompatible calling convention. | |
944 | : | |
945 | else | |
946 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
947 | break 2 | |
948 | fi | |
949 | fi | |
950 | done | |
951 | ;; | |
952 | esac | |
953 | done | |
954 | IFS="$ac_save_IFS" | |
955 | ||
956 | fi | |
957 | if test "${ac_cv_path_install+set}" = set; then | |
958 | INSTALL="$ac_cv_path_install" | |
959 | else | |
960 | # As a last resort, use the slow shell script. We don't cache a | |
961 | # path for INSTALL within a source directory, because that will | |
962 | # break other packages using the cache if that directory is | |
963 | # removed, or if the path is relative. | |
964 | INSTALL="$ac_install_sh" | |
965 | fi | |
966 | fi | |
967 | echo "$ac_t""$INSTALL" 1>&6 | |
968 | ||
969 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
970 | # It thinks the first close brace ends the variable substitution. | |
971 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
972 | ||
973 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
974 | ||
975 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
976 | ||
977 | echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 | |
3a6ae616 | 978 | echo "configure:979: checking whether build environment is sane" >&5 |
252b5132 RH |
979 | # Just in case |
980 | sleep 1 | |
981 | echo timestamp > conftestfile | |
982 | # Do `set' in a subshell so we don't clobber the current shell's | |
983 | # arguments. Must try -L first in case configure is actually a | |
984 | # symlink; some systems play weird games with the mod time of symlinks | |
985 | # (eg FreeBSD returns the mod time of the symlink's containing | |
986 | # directory). | |
987 | if ( | |
988 | set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` | |
989 | if test "$*" = "X"; then | |
990 | # -L didn't work. | |
991 | set X `ls -t $srcdir/configure conftestfile` | |
992 | fi | |
993 | if test "$*" != "X $srcdir/configure conftestfile" \ | |
994 | && test "$*" != "X conftestfile $srcdir/configure"; then | |
995 | ||
996 | # If neither matched, then we have a broken ls. This can happen | |
997 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
998 | # broken ls alias from the environment. This has actually | |
999 | # happened. Such a system could not be considered "sane". | |
1000 | { echo "configure: error: ls -t appears to fail. Make sure there is not a broken | |
1001 | alias in your environment" 1>&2; exit 1; } | |
1002 | fi | |
1003 | ||
1004 | test "$2" = conftestfile | |
1005 | ) | |
1006 | then | |
1007 | # Ok. | |
1008 | : | |
1009 | else | |
1010 | { echo "configure: error: newly created file is older than distributed files! | |
1011 | Check your system clock" 1>&2; exit 1; } | |
1012 | fi | |
1013 | rm -f conftest* | |
1014 | echo "$ac_t""yes" 1>&6 | |
1015 | if test "$program_transform_name" = s,x,x,; then | |
1016 | program_transform_name= | |
1017 | else | |
1018 | # Double any \ or $. echo might interpret backslashes. | |
1019 | cat <<\EOF_SED > conftestsed | |
1020 | s,\\,\\\\,g; s,\$,$$,g | |
1021 | EOF_SED | |
1022 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
1023 | rm -f conftestsed | |
1024 | fi | |
1025 | test "$program_prefix" != NONE && | |
1026 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
1027 | # Use a double $ so make ignores it. | |
1028 | test "$program_suffix" != NONE && | |
1029 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
1030 | ||
1031 | # sed with no file args requires a program. | |
1032 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
1033 | ||
1034 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
3a6ae616 | 1035 | echo "configure:1036: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
252b5132 RH |
1036 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1037 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
1038 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1039 | else | |
1040 | cat > conftestmake <<\EOF | |
1041 | all: | |
1042 | @echo 'ac_maketemp="${MAKE}"' | |
1043 | EOF | |
1044 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1045 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
1046 | if test -n "$ac_maketemp"; then | |
1047 | eval ac_cv_prog_make_${ac_make}_set=yes | |
1048 | else | |
1049 | eval ac_cv_prog_make_${ac_make}_set=no | |
1050 | fi | |
1051 | rm -f conftestmake | |
1052 | fi | |
1053 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
1054 | echo "$ac_t""yes" 1>&6 | |
1055 | SET_MAKE= | |
1056 | else | |
1057 | echo "$ac_t""no" 1>&6 | |
1058 | SET_MAKE="MAKE=${MAKE-make}" | |
1059 | fi | |
1060 | ||
1061 | ||
1062 | PACKAGE=bfd | |
1063 | ||
3a6ae616 | 1064 | VERSION=2.9.5 |
252b5132 RH |
1065 | |
1066 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then | |
1067 | { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } | |
1068 | fi | |
1069 | cat >> confdefs.h <<EOF | |
1070 | #define PACKAGE "$PACKAGE" | |
1071 | EOF | |
1072 | ||
1073 | cat >> confdefs.h <<EOF | |
1074 | #define VERSION "$VERSION" | |
1075 | EOF | |
1076 | ||
1077 | ||
1078 | ||
1079 | missing_dir=`cd $ac_aux_dir && pwd` | |
1080 | echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 | |
3a6ae616 | 1081 | echo "configure:1082: checking for working aclocal" >&5 |
252b5132 RH |
1082 | # Run test in a subshell; some versions of sh will print an error if |
1083 | # an executable is not found, even if stderr is redirected. | |
1084 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
1085 | if (aclocal --version) < /dev/null > /dev/null 2>&1; then | |
1086 | ACLOCAL=aclocal | |
1087 | echo "$ac_t""found" 1>&6 | |
1088 | else | |
1089 | ACLOCAL="$missing_dir/missing aclocal" | |
1090 | echo "$ac_t""missing" 1>&6 | |
1091 | fi | |
1092 | ||
1093 | echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 | |
3a6ae616 | 1094 | echo "configure:1095: checking for working autoconf" >&5 |
252b5132 RH |
1095 | # Run test in a subshell; some versions of sh will print an error if |
1096 | # an executable is not found, even if stderr is redirected. | |
1097 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
1098 | if (autoconf --version) < /dev/null > /dev/null 2>&1; then | |
1099 | AUTOCONF=autoconf | |
1100 | echo "$ac_t""found" 1>&6 | |
1101 | else | |
1102 | AUTOCONF="$missing_dir/missing autoconf" | |
1103 | echo "$ac_t""missing" 1>&6 | |
1104 | fi | |
1105 | ||
1106 | echo $ac_n "checking for working automake""... $ac_c" 1>&6 | |
3a6ae616 | 1107 | echo "configure:1108: checking for working automake" >&5 |
252b5132 RH |
1108 | # Run test in a subshell; some versions of sh will print an error if |
1109 | # an executable is not found, even if stderr is redirected. | |
1110 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
1111 | if (automake --version) < /dev/null > /dev/null 2>&1; then | |
1112 | AUTOMAKE=automake | |
1113 | echo "$ac_t""found" 1>&6 | |
1114 | else | |
1115 | AUTOMAKE="$missing_dir/missing automake" | |
1116 | echo "$ac_t""missing" 1>&6 | |
1117 | fi | |
1118 | ||
1119 | echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 | |
3a6ae616 | 1120 | echo "configure:1121: checking for working autoheader" >&5 |
252b5132 RH |
1121 | # Run test in a subshell; some versions of sh will print an error if |
1122 | # an executable is not found, even if stderr is redirected. | |
1123 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
1124 | if (autoheader --version) < /dev/null > /dev/null 2>&1; then | |
1125 | AUTOHEADER=autoheader | |
1126 | echo "$ac_t""found" 1>&6 | |
1127 | else | |
1128 | AUTOHEADER="$missing_dir/missing autoheader" | |
1129 | echo "$ac_t""missing" 1>&6 | |
1130 | fi | |
1131 | ||
1132 | echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 | |
3a6ae616 | 1133 | echo "configure:1134: checking for working makeinfo" >&5 |
252b5132 RH |
1134 | # Run test in a subshell; some versions of sh will print an error if |
1135 | # an executable is not found, even if stderr is redirected. | |
1136 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
1137 | if (makeinfo --version) < /dev/null > /dev/null 2>&1; then | |
1138 | MAKEINFO=makeinfo | |
1139 | echo "$ac_t""found" 1>&6 | |
1140 | else | |
1141 | MAKEINFO="$missing_dir/missing makeinfo" | |
1142 | echo "$ac_t""missing" 1>&6 | |
1143 | fi | |
1144 | ||
1145 | ||
1146 | ||
1147 | if test $host != $build; then | |
1148 | ac_tool_prefix=${host_alias}- | |
1149 | else | |
1150 | ac_tool_prefix= | |
1151 | fi | |
1152 | ||
1153 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
1154 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
1155 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3a6ae616 | 1156 | echo "configure:1157: checking for $ac_word" >&5 |
252b5132 RH |
1157 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
1158 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1159 | else | |
1160 | if test -n "$AR"; then | |
1161 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
1162 | else | |
1163 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1164 | ac_dummy="$PATH" | |
1165 | for ac_dir in $ac_dummy; do | |
1166 | test -z "$ac_dir" && ac_dir=. | |
1167 | if test -f $ac_dir/$ac_word; then | |
1168 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
1169 | break | |
1170 | fi | |
1171 | done | |
1172 | IFS="$ac_save_ifs" | |
1173 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" | |
1174 | fi | |
1175 | fi | |
1176 | AR="$ac_cv_prog_AR" | |
1177 | if test -n "$AR"; then | |
1178 | echo "$ac_t""$AR" 1>&6 | |
1179 | else | |
1180 | echo "$ac_t""no" 1>&6 | |
1181 | fi | |
1182 | ||
1183 | ||
1184 | ||
1185 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
1186 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
1187 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3a6ae616 | 1188 | echo "configure:1189: checking for $ac_word" >&5 |
252b5132 RH |
1189 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1190 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1191 | else | |
1192 | if test -n "$RANLIB"; then | |
1193 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1194 | else | |
1195 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1196 | ac_dummy="$PATH" | |
1197 | for ac_dir in $ac_dummy; do | |
1198 | test -z "$ac_dir" && ac_dir=. | |
1199 | if test -f $ac_dir/$ac_word; then | |
1200 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
1201 | break | |
1202 | fi | |
1203 | done | |
1204 | IFS="$ac_save_ifs" | |
1205 | fi | |
1206 | fi | |
1207 | RANLIB="$ac_cv_prog_RANLIB" | |
1208 | if test -n "$RANLIB"; then | |
1209 | echo "$ac_t""$RANLIB" 1>&6 | |
1210 | else | |
1211 | echo "$ac_t""no" 1>&6 | |
1212 | fi | |
1213 | ||
1214 | ||
1215 | if test -z "$ac_cv_prog_RANLIB"; then | |
1216 | if test -n "$ac_tool_prefix"; then | |
1217 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1218 | set dummy ranlib; ac_word=$2 | |
1219 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3a6ae616 | 1220 | echo "configure:1221: checking for $ac_word" >&5 |
252b5132 RH |
1221 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1222 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1223 | else | |
1224 | if test -n "$RANLIB"; then | |
1225 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1226 | else | |
1227 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1228 | ac_dummy="$PATH" | |
1229 | for ac_dir in $ac_dummy; do | |
1230 | test -z "$ac_dir" && ac_dir=. | |
1231 | if test -f $ac_dir/$ac_word; then | |
1232 | ac_cv_prog_RANLIB="ranlib" | |
1233 | break | |
1234 | fi | |
1235 | done | |
1236 | IFS="$ac_save_ifs" | |
1237 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1238 | fi | |
1239 | fi | |
1240 | RANLIB="$ac_cv_prog_RANLIB" | |
1241 | if test -n "$RANLIB"; then | |
1242 | echo "$ac_t""$RANLIB" 1>&6 | |
1243 | else | |
1244 | echo "$ac_t""no" 1>&6 | |
1245 | fi | |
1246 | ||
1247 | else | |
1248 | RANLIB=":" | |
1249 | fi | |
1250 | fi | |
1251 | ||
1252 | ||
1253 | # Check whether --enable-shared or --disable-shared was given. | |
1254 | if test "${enable_shared+set}" = set; then | |
1255 | enableval="$enable_shared" | |
1256 | p=${PACKAGE-default} | |
1257 | case "$enableval" in | |
1258 | yes) enable_shared=yes ;; | |
1259 | no) enable_shared=no ;; | |
1260 | *) | |
1261 | enable_shared=no | |
1262 | # Look at the argument we got. We use all the common list separators. | |
1263 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
1264 | for pkg in $enableval; do | |
1265 | if test "X$pkg" = "X$p"; then | |
1266 | enable_shared=yes | |
1267 | fi | |
1268 | done | |
1269 | IFS="$ac_save_ifs" | |
1270 | ;; | |
1271 | esac | |
1272 | else | |
1273 | enable_shared=no | |
1274 | fi | |
1275 | ||
1276 | ||
1277 | # Check whether --enable-static or --disable-static was given. | |
1278 | if test "${enable_static+set}" = set; then | |
1279 | enableval="$enable_static" | |
1280 | p=${PACKAGE-default} | |
1281 | case "$enableval" in | |
1282 | yes) enable_static=yes ;; | |
1283 | no) enable_static=no ;; | |
1284 | *) | |
1285 | enable_static=no | |
1286 | # Look at the argument we got. We use all the common list separators. | |
1287 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
1288 | for pkg in $enableval; do | |
1289 | if test "X$pkg" = "X$p"; then | |
1290 | enable_static=yes | |
1291 | fi | |
1292 | done | |
1293 | IFS="$ac_save_ifs" | |
1294 | ;; | |
1295 | esac | |
1296 | else | |
1297 | enable_static=yes | |
1298 | fi | |
1299 | ||
b2ef150d ILT |
1300 | # Check whether --enable-fast-install or --disable-fast-install was given. |
1301 | if test "${enable_fast_install+set}" = set; then | |
1302 | enableval="$enable_fast_install" | |
1303 | p=${PACKAGE-default} | |
1304 | case "$enableval" in | |
1305 | yes) enable_fast_install=yes ;; | |
1306 | no) enable_fast_install=no ;; | |
1307 | *) | |
1308 | enable_fast_install=no | |
1309 | # Look at the argument we got. We use all the common list separators. | |
1310 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
1311 | for pkg in $enableval; do | |
1312 | if test "X$pkg" = "X$p"; then | |
1313 | enable_fast_install=yes | |
1314 | fi | |
1315 | done | |
1316 | IFS="$ac_save_ifs" | |
1317 | ;; | |
1318 | esac | |
1319 | else | |
1320 | enable_fast_install=yes | |
1321 | fi | |
1322 | ||
252b5132 RH |
1323 | # Extract the first word of "ranlib", so it can be a program name with args. |
1324 | set dummy ranlib; ac_word=$2 | |
1325 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3a6ae616 | 1326 | echo "configure:1327: checking for $ac_word" >&5 |
252b5132 RH |
1327 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1328 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1329 | else | |
1330 | if test -n "$RANLIB"; then | |
1331 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1332 | else | |
1333 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1334 | ac_dummy="$PATH" | |
1335 | for ac_dir in $ac_dummy; do | |
1336 | test -z "$ac_dir" && ac_dir=. | |
1337 | if test -f $ac_dir/$ac_word; then | |
1338 | ac_cv_prog_RANLIB="ranlib" | |
1339 | break | |
1340 | fi | |
1341 | done | |
1342 | IFS="$ac_save_ifs" | |
1343 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1344 | fi | |
1345 | fi | |
1346 | RANLIB="$ac_cv_prog_RANLIB" | |
1347 | if test -n "$RANLIB"; then | |
1348 | echo "$ac_t""$RANLIB" 1>&6 | |
1349 | else | |
1350 | echo "$ac_t""no" 1>&6 | |
1351 | fi | |
1352 | ||
1353 | # Check whether --with-gnu-ld or --without-gnu-ld was given. | |
1354 | if test "${with_gnu_ld+set}" = set; then | |
1355 | withval="$with_gnu_ld" | |
1356 | test "$withval" = no || with_gnu_ld=yes | |
1357 | else | |
1358 | with_gnu_ld=no | |
1359 | fi | |
1360 | ||
252b5132 RH |
1361 | ac_prog=ld |
1362 | if test "$ac_cv_prog_gcc" = yes; then | |
1363 | # Check if gcc -print-prog-name=ld gives a path. | |
1364 | echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 | |
3a6ae616 | 1365 | echo "configure:1366: checking for ld used by GCC" >&5 |
252b5132 RH |
1366 | ac_prog=`($CC -print-prog-name=ld) 2>&5` |
1367 | case "$ac_prog" in | |
b2ef150d ILT |
1368 | # Accept absolute paths. |
1369 | /* | [A-Za-z]:[\\/]*) | |
1370 | re_direlt='/[^/][^/]*/\.\./' | |
1371 | # Canonicalize the path of ld | |
1372 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
1373 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
1374 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
1375 | done | |
1376 | test -z "$LD" && LD="$ac_prog" | |
1377 | ;; | |
252b5132 RH |
1378 | "") |
1379 | # If it fails, then pretend we aren't using GCC. | |
1380 | ac_prog=ld | |
1381 | ;; | |
1382 | *) | |
1383 | # If it is relative, then search for the first ld in PATH. | |
1384 | with_gnu_ld=unknown | |
1385 | ;; | |
1386 | esac | |
1387 | elif test "$with_gnu_ld" = yes; then | |
1388 | echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 | |
3a6ae616 | 1389 | echo "configure:1390: checking for GNU ld" >&5 |
252b5132 RH |
1390 | else |
1391 | echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 | |
3a6ae616 | 1392 | echo "configure:1393: checking for non-GNU ld" >&5 |
252b5132 RH |
1393 | fi |
1394 | if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then | |
1395 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1396 | else | |
1397 | if test -z "$LD"; then | |
1398 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1399 | for ac_dir in $PATH; do | |
1400 | test -z "$ac_dir" && ac_dir=. | |
1401 | if test -f "$ac_dir/$ac_prog"; then | |
1402 | ac_cv_path_LD="$ac_dir/$ac_prog" | |
1403 | # Check to see if the program is GNU ld. I'd rather use --version, | |
1404 | # but apparently some GNU ld's only accept -v. | |
1405 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
1406 | if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
1407 | test "$with_gnu_ld" != no && break | |
1408 | else | |
b2ef150d | 1409 | test "$with_gnu_ld" != yes && break |
252b5132 RH |
1410 | fi |
1411 | fi | |
1412 | done | |
1413 | IFS="$ac_save_ifs" | |
1414 | else | |
1415 | ac_cv_path_LD="$LD" # Let the user override the test with a path. | |
1416 | fi | |
1417 | fi | |
1418 | ||
1419 | LD="$ac_cv_path_LD" | |
1420 | if test -n "$LD"; then | |
1421 | echo "$ac_t""$LD" 1>&6 | |
1422 | else | |
1423 | echo "$ac_t""no" 1>&6 | |
1424 | fi | |
1425 | test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } | |
1426 | ||
1427 | echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 | |
3a6ae616 | 1428 | echo "configure:1429: checking if the linker ($LD) is GNU ld" >&5 |
252b5132 RH |
1429 | if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then |
1430 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1431 | else | |
1432 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
1433 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
1434 | ac_cv_prog_gnu_ld=yes | |
1435 | else | |
1436 | ac_cv_prog_gnu_ld=no | |
1437 | fi | |
1438 | fi | |
1439 | ||
1440 | echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 | |
1441 | ||
1442 | ||
1443 | echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 | |
3a6ae616 | 1444 | echo "configure:1445: checking for BSD-compatible nm" >&5 |
252b5132 RH |
1445 | if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then |
1446 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1447 | else | |
1448 | if test -n "$NM"; then | |
1449 | # Let the user override the test. | |
1450 | ac_cv_path_NM="$NM" | |
1451 | else | |
1452 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
b2ef150d | 1453 | for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do |
252b5132 RH |
1454 | test -z "$ac_dir" && ac_dir=. |
1455 | if test -f $ac_dir/nm; then | |
1456 | # Check to see if the nm accepts a BSD-compat flag. | |
1457 | # Adding the `sed 1q' prevents false positives on HP-UX, which says: | |
1458 | # nm: unknown option "B" ignored | |
1459 | if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then | |
b2ef150d ILT |
1460 | ac_cv_path_NM="$ac_dir/nm -B" |
1461 | break | |
252b5132 | 1462 | elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
b2ef150d ILT |
1463 | ac_cv_path_NM="$ac_dir/nm -p" |
1464 | break | |
252b5132 | 1465 | else |
b2ef150d ILT |
1466 | ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but |
1467 | continue # so that we can try to find one that supports BSD flags | |
252b5132 | 1468 | fi |
252b5132 RH |
1469 | fi |
1470 | done | |
1471 | IFS="$ac_save_ifs" | |
1472 | test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm | |
1473 | fi | |
1474 | fi | |
1475 | ||
1476 | NM="$ac_cv_path_NM" | |
1477 | echo "$ac_t""$NM" 1>&6 | |
1478 | ||
1479 | ||
b2ef150d ILT |
1480 | # Check for command to grab the raw symbol name followed by C symbol from nm. |
1481 | echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6 | |
3a6ae616 | 1482 | echo "configure:1483: checking command to parse $NM output" >&5 |
b2ef150d ILT |
1483 | if eval "test \"`echo '$''{'ac_cv_sys_global_symbol_pipe'+set}'`\" = set"; then |
1484 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1485 | else | |
1486 | # These are sane defaults that work on at least a few old systems. | |
1487 | # {They come from Ultrix. What could be older than Ultrix?!! ;)} | |
1488 | ||
1489 | # Character class describing NM global symbol codes. | |
1490 | ac_symcode='[BCDEGRST]' | |
1491 | ||
1492 | # Regexp to match symbols that can be accessed directly from C. | |
1493 | ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)' | |
1494 | ||
1495 | # Transform the above into a raw symbol and a C symbol. | |
1496 | ac_symxfrm='\1 \2\3 \3' | |
1497 | ||
1498 | # Transform an extracted symbol line into a proper C declaration | |
1499 | ac_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" | |
1500 | ||
1501 | # Define system-specific variables. | |
1502 | case "$host_os" in | |
1503 | aix*) | |
1504 | ac_symcode='[BCDT]' | |
1505 | ;; | |
1506 | cygwin* | mingw*) | |
1507 | ac_symcode='[ABCDGISTW]' | |
1508 | ;; | |
1509 | hpux*) | |
1510 | ac_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'" | |
1511 | ;; | |
1512 | irix*) | |
1513 | ac_symcode='[BCDEGRST]' | |
1514 | ;; | |
1515 | solaris*) | |
1516 | ac_symcode='[BDT]' | |
1517 | ;; | |
1518 | esac | |
1519 | ||
1520 | # If we're using GNU nm, then use its standard symbol codes. | |
1521 | if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then | |
1522 | ac_symcode='[ABCDGISTW]' | |
1523 | fi | |
1524 | ||
1525 | # Try without a prefix undercore, then with it. | |
1526 | for ac_symprfx in "" "_"; do | |
1527 | ||
1528 | ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.* \($ac_symcode\) *\($ac_symprfx\)$ac_sympat$/$ac_symxfrm/p'" | |
1529 | ||
1530 | # Check to see that the pipe works correctly. | |
1531 | ac_pipe_works=no | |
1532 | rm -f conftest.$ac_ext | |
1533 | cat > conftest.$ac_ext <<EOF | |
1534 | #ifdef __cplusplus | |
1535 | extern "C" { | |
1536 | #endif | |
1537 | char nm_test_var; | |
1538 | void nm_test_func(){} | |
1539 | #ifdef __cplusplus | |
1540 | } | |
1541 | #endif | |
1542 | int main(){nm_test_var='a';nm_test_func;return 0;} | |
1543 | EOF | |
1544 | ||
3a6ae616 | 1545 | if { (eval echo configure:1546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b2ef150d ILT |
1546 | # Now try to grab the symbols. |
1547 | ac_nlist=conftest.nm | |
1548 | ||
3a6ae616 | 1549 | if { (eval echo configure:1550: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then |
b2ef150d ILT |
1550 | |
1551 | # Try sorting and uniquifying the output. | |
1552 | if sort "$ac_nlist" | uniq > "$ac_nlist"T; then | |
1553 | mv -f "$ac_nlist"T "$ac_nlist" | |
1554 | else | |
1555 | rm -f "$ac_nlist"T | |
1556 | fi | |
1557 | ||
1558 | # Make sure that we snagged all the symbols we need. | |
1559 | if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then | |
1560 | if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then | |
1561 | cat <<EOF > conftest.c | |
1562 | #ifdef __cplusplus | |
1563 | extern "C" { | |
1564 | #endif | |
1565 | ||
1566 | EOF | |
1567 | # Now generate the symbol file. | |
1568 | eval "$ac_global_symbol_to_cdecl"' < "$ac_nlist" >> conftest.c' | |
1569 | ||
1570 | cat <<EOF >> conftest.c | |
1571 | #if defined (__STDC__) && __STDC__ | |
1572 | # define lt_ptr_t void * | |
1573 | #else | |
1574 | # define lt_ptr_t char * | |
1575 | # define const | |
1576 | #endif | |
1577 | ||
1578 | /* The mapping between symbol names and symbols. */ | |
1579 | const struct { | |
1580 | const char *name; | |
1581 | lt_ptr_t address; | |
1582 | } | |
1583 | lt_preloaded_symbols[] = | |
1584 | { | |
1585 | EOF | |
1586 | sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c | |
1587 | cat <<\EOF >> conftest.c | |
1588 | {0, (lt_ptr_t) 0} | |
1589 | }; | |
1590 | ||
1591 | #ifdef __cplusplus | |
1592 | } | |
1593 | #endif | |
1594 | EOF | |
1595 | # Now try linking the two files. | |
1596 | mv conftest.$ac_objext conftestm.$ac_objext | |
1597 | ac_save_LIBS="$LIBS" | |
1598 | ac_save_CFLAGS="$CFLAGS" | |
1599 | LIBS="conftestm.$ac_objext" | |
1600 | CFLAGS="$CFLAGS$no_builtin_flag" | |
3a6ae616 | 1601 | if { (eval echo configure:1602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
b2ef150d ILT |
1602 | ac_pipe_works=yes |
1603 | else | |
1604 | echo "configure: failed program was:" >&5 | |
1605 | cat conftest.c >&5 | |
1606 | fi | |
1607 | LIBS="$ac_save_LIBS" | |
1608 | CFLAGS="$ac_save_CFLAGS" | |
1609 | else | |
1610 | echo "cannot find nm_test_func in $ac_nlist" >&5 | |
1611 | fi | |
1612 | else | |
1613 | echo "cannot find nm_test_var in $ac_nlist" >&5 | |
1614 | fi | |
1615 | else | |
1616 | echo "cannot run $ac_cv_sys_global_symbol_pipe" >&5 | |
1617 | fi | |
1618 | else | |
1619 | echo "$progname: failed program was:" >&5 | |
1620 | cat conftest.c >&5 | |
1621 | fi | |
1622 | rm -rf conftest* | |
1623 | ||
1624 | # Do not use the global_symbol_pipe unless it works. | |
1625 | if test "$ac_pipe_works" = yes; then | |
1626 | if test x"$ac_symprfx" = x"_"; then | |
1627 | ac_cv_sys_symbol_underscore=yes | |
1628 | else | |
1629 | ac_cv_sys_symbol_underscore=no | |
1630 | fi | |
1631 | break | |
1632 | else | |
1633 | ac_cv_sys_global_symbol_pipe= | |
1634 | fi | |
1635 | done | |
1636 | ||
1637 | fi | |
1638 | ||
1639 | ||
1640 | ac_result=yes | |
1641 | if test -z "$ac_cv_sys_global_symbol_pipe"; then | |
1642 | ac_result=no | |
1643 | fi | |
1644 | echo "$ac_t""$ac_result" 1>&6 | |
1645 | ||
1646 | echo $ac_n "checking for _ prefix in compiled symbols""... $ac_c" 1>&6 | |
3a6ae616 | 1647 | echo "configure:1648: checking for _ prefix in compiled symbols" >&5 |
b2ef150d ILT |
1648 | if eval "test \"`echo '$''{'ac_cv_sys_symbol_underscore'+set}'`\" = set"; then |
1649 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1650 | else | |
1651 | ac_cv_sys_symbol_underscore=no | |
1652 | cat > conftest.$ac_ext <<EOF | |
1653 | void nm_test_func(){} | |
1654 | int main(){nm_test_func;return 0;} | |
1655 | EOF | |
3a6ae616 | 1656 | if { (eval echo configure:1657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b2ef150d ILT |
1657 | # Now try to grab the symbols. |
1658 | ac_nlist=conftest.nm | |
3a6ae616 | 1659 | if { (eval echo configure:1660: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then |
b2ef150d ILT |
1660 | # See whether the symbols have a leading underscore. |
1661 | if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then | |
1662 | ac_cv_sys_symbol_underscore=yes | |
1663 | else | |
1664 | if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then | |
1665 | : | |
1666 | else | |
1667 | echo "configure: cannot find nm_test_func in $ac_nlist" >&5 | |
1668 | fi | |
1669 | fi | |
1670 | else | |
1671 | echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&5 | |
1672 | fi | |
1673 | else | |
1674 | echo "configure: failed program was:" >&5 | |
1675 | cat conftest.c >&5 | |
1676 | fi | |
1677 | rm -rf conftest* | |
1678 | ||
1679 | fi | |
1680 | ||
1681 | echo "$ac_t""$ac_cv_sys_symbol_underscore" 1>&6 | |
1682 | USE_SYMBOL_UNDERSCORE=${ac_cv_sys_symbol_underscore=no} | |
1683 | ||
252b5132 | 1684 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
3a6ae616 | 1685 | echo "configure:1686: checking whether ln -s works" >&5 |
252b5132 RH |
1686 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
1687 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1688 | else | |
1689 | rm -f conftestdata | |
1690 | if ln -s X conftestdata 2>/dev/null | |
1691 | then | |
1692 | rm -f conftestdata | |
1693 | ac_cv_prog_LN_S="ln -s" | |
1694 | else | |
1695 | ac_cv_prog_LN_S=ln | |
1696 | fi | |
1697 | fi | |
1698 | LN_S="$ac_cv_prog_LN_S" | |
1699 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
1700 | echo "$ac_t""yes" 1>&6 | |
1701 | else | |
1702 | echo "$ac_t""no" 1>&6 | |
1703 | fi | |
1704 | ||
252b5132 RH |
1705 | |
1706 | # Check for any special flags to pass to ltconfig. | |
b2ef150d | 1707 | libtool_flags="--cache-file=$cache_file" |
252b5132 RH |
1708 | test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" |
1709 | test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" | |
b2ef150d ILT |
1710 | test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" |
1711 | test "$lt_dlopen" = yes && libtool_flags="$libtool_flags --enable-dlopen" | |
252b5132 RH |
1712 | test "$silent" = yes && libtool_flags="$libtool_flags --silent" |
1713 | test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" | |
1714 | test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" | |
1715 | ||
1716 | # Some flags need to be propagated to the compiler or linker for good | |
1717 | # libtool support. | |
1718 | case "$host" in | |
1719 | *-*-irix6*) | |
1720 | # Find out which ABI we are using. | |
3a6ae616 ILT |
1721 | echo '#line 1722 "configure"' > conftest.$ac_ext |
1722 | if { (eval echo configure:1723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
252b5132 RH |
1723 | case "`/usr/bin/file conftest.o`" in |
1724 | *32-bit*) | |
1725 | LD="${LD-ld} -32" | |
1726 | ;; | |
1727 | *N32*) | |
1728 | LD="${LD-ld} -n32" | |
1729 | ;; | |
1730 | *64-bit*) | |
1731 | LD="${LD-ld} -64" | |
1732 | ;; | |
1733 | esac | |
1734 | fi | |
1735 | rm -rf conftest* | |
1736 | ;; | |
1737 | ||
1738 | *-*-sco3.2v5*) | |
1739 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. | |
b2ef150d | 1740 | SAVE_CFLAGS="$CFLAGS" |
252b5132 | 1741 | CFLAGS="$CFLAGS -belf" |
b2ef150d | 1742 | echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 |
3a6ae616 | 1743 | echo "configure:1744: checking whether the C compiler needs -belf" >&5 |
b2ef150d ILT |
1744 | if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then |
1745 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1746 | else | |
1747 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 1748 | #line 1749 "configure" |
b2ef150d ILT |
1749 | #include "confdefs.h" |
1750 | ||
1751 | int main() { | |
1752 | ||
1753 | ; return 0; } | |
1754 | EOF | |
3a6ae616 | 1755 | if { (eval echo configure:1756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
b2ef150d ILT |
1756 | rm -rf conftest* |
1757 | lt_cv_cc_needs_belf=yes | |
1758 | else | |
1759 | echo "configure: failed program was:" >&5 | |
1760 | cat conftest.$ac_ext >&5 | |
1761 | rm -rf conftest* | |
1762 | lt_cv_cc_needs_belf=no | |
1763 | fi | |
1764 | rm -f conftest* | |
1765 | fi | |
1766 | ||
1767 | echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 | |
1768 | if test x"$lt_cv_cc_needs_belf" != x"yes"; then | |
1769 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf | |
1770 | CFLAGS="$SAVE_CFLAGS" | |
1771 | fi | |
252b5132 RH |
1772 | ;; |
1773 | ||
1774 | *-*-cygwin*) | |
1775 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
1776 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
1777 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3a6ae616 | 1778 | echo "configure:1779: checking for $ac_word" >&5 |
252b5132 RH |
1779 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then |
1780 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1781 | else | |
1782 | if test -n "$DLLTOOL"; then | |
1783 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
1784 | else | |
1785 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1786 | ac_dummy="$PATH" | |
1787 | for ac_dir in $ac_dummy; do | |
1788 | test -z "$ac_dir" && ac_dir=. | |
1789 | if test -f $ac_dir/$ac_word; then | |
1790 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | |
1791 | break | |
1792 | fi | |
1793 | done | |
1794 | IFS="$ac_save_ifs" | |
1795 | fi | |
1796 | fi | |
1797 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
1798 | if test -n "$DLLTOOL"; then | |
1799 | echo "$ac_t""$DLLTOOL" 1>&6 | |
1800 | else | |
1801 | echo "$ac_t""no" 1>&6 | |
1802 | fi | |
1803 | ||
1804 | ||
1805 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
1806 | if test -n "$ac_tool_prefix"; then | |
1807 | # Extract the first word of "dlltool", so it can be a program name with args. | |
1808 | set dummy dlltool; ac_word=$2 | |
1809 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3a6ae616 | 1810 | echo "configure:1811: checking for $ac_word" >&5 |
252b5132 RH |
1811 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then |
1812 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1813 | else | |
1814 | if test -n "$DLLTOOL"; then | |
1815 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
1816 | else | |
1817 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1818 | ac_dummy="$PATH" | |
1819 | for ac_dir in $ac_dummy; do | |
1820 | test -z "$ac_dir" && ac_dir=. | |
1821 | if test -f $ac_dir/$ac_word; then | |
1822 | ac_cv_prog_DLLTOOL="dlltool" | |
1823 | break | |
1824 | fi | |
1825 | done | |
1826 | IFS="$ac_save_ifs" | |
1827 | test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false" | |
1828 | fi | |
1829 | fi | |
1830 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
1831 | if test -n "$DLLTOOL"; then | |
1832 | echo "$ac_t""$DLLTOOL" 1>&6 | |
1833 | else | |
1834 | echo "$ac_t""no" 1>&6 | |
1835 | fi | |
1836 | ||
1837 | else | |
1838 | DLLTOOL="false" | |
1839 | fi | |
1840 | fi | |
1841 | ||
1842 | # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. | |
1843 | set dummy ${ac_tool_prefix}as; ac_word=$2 | |
1844 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3a6ae616 | 1845 | echo "configure:1846: checking for $ac_word" >&5 |
252b5132 RH |
1846 | if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then |
1847 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1848 | else | |
1849 | if test -n "$AS"; then | |
1850 | ac_cv_prog_AS="$AS" # Let the user override the test. | |
1851 | else | |
1852 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1853 | ac_dummy="$PATH" | |
1854 | for ac_dir in $ac_dummy; do | |
1855 | test -z "$ac_dir" && ac_dir=. | |
1856 | if test -f $ac_dir/$ac_word; then | |
1857 | ac_cv_prog_AS="${ac_tool_prefix}as" | |
1858 | break | |
1859 | fi | |
1860 | done | |
1861 | IFS="$ac_save_ifs" | |
1862 | fi | |
1863 | fi | |
1864 | AS="$ac_cv_prog_AS" | |
1865 | if test -n "$AS"; then | |
1866 | echo "$ac_t""$AS" 1>&6 | |
1867 | else | |
1868 | echo "$ac_t""no" 1>&6 | |
1869 | fi | |
1870 | ||
1871 | ||
1872 | if test -z "$ac_cv_prog_AS"; then | |
1873 | if test -n "$ac_tool_prefix"; then | |
1874 | # Extract the first word of "as", so it can be a program name with args. | |
1875 | set dummy as; ac_word=$2 | |
1876 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3a6ae616 | 1877 | echo "configure:1878: checking for $ac_word" >&5 |
252b5132 RH |
1878 | if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then |
1879 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1880 | else | |
1881 | if test -n "$AS"; then | |
1882 | ac_cv_prog_AS="$AS" # Let the user override the test. | |
1883 | else | |
1884 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1885 | ac_dummy="$PATH" | |
1886 | for ac_dir in $ac_dummy; do | |
1887 | test -z "$ac_dir" && ac_dir=. | |
1888 | if test -f $ac_dir/$ac_word; then | |
1889 | ac_cv_prog_AS="as" | |
1890 | break | |
1891 | fi | |
1892 | done | |
1893 | IFS="$ac_save_ifs" | |
1894 | test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false" | |
1895 | fi | |
1896 | fi | |
1897 | AS="$ac_cv_prog_AS" | |
1898 | if test -n "$AS"; then | |
1899 | echo "$ac_t""$AS" 1>&6 | |
1900 | else | |
1901 | echo "$ac_t""no" 1>&6 | |
1902 | fi | |
1903 | ||
1904 | else | |
1905 | AS="false" | |
1906 | fi | |
1907 | fi | |
1908 | ||
1909 | ||
1910 | ;; | |
1911 | ||
1912 | esac | |
1913 | ||
b2ef150d ILT |
1914 | # enable the --disable-libtool-lock switch |
1915 | ||
1916 | # Check whether --enable-libtool-lock or --disable-libtool-lock was given. | |
1917 | if test "${enable_libtool_lock+set}" = set; then | |
1918 | enableval="$enable_libtool_lock" | |
1919 | need_locks=$enableval | |
1920 | else | |
1921 | need_locks=yes | |
1922 | fi | |
1923 | ||
1924 | ||
1925 | if test x"$need_locks" = xno; then | |
1926 | libtool_flags="$libtool_flags --disable-lock" | |
1927 | fi | |
1928 | ||
1929 | ||
1930 | # Save cache, so that ltconfig can load it | |
1931 | cat > confcache <<\EOF | |
1932 | # This file is a shell script that caches the results of configure | |
1933 | # tests run on this system so they can be shared between configure | |
1934 | # scripts and configure runs. It is not useful on other systems. | |
1935 | # If it contains results you don't want to keep, you may remove or edit it. | |
1936 | # | |
1937 | # By default, configure uses ./config.cache as the cache file, | |
1938 | # creating it if it does not exist already. You can give configure | |
1939 | # the --cache-file=FILE option to use a different cache file; that is | |
1940 | # what configure does when it calls configure scripts in | |
1941 | # subdirectories, so they share the cache. | |
1942 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
1943 | # config.status only pays attention to the cache file if you give it the | |
1944 | # --recheck option to rerun configure. | |
1945 | # | |
1946 | EOF | |
1947 | # The following way of writing the cache mishandles newlines in values, | |
1948 | # but we know of no workaround that is simple, portable, and efficient. | |
1949 | # So, don't put newlines in cache variables' values. | |
1950 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
1951 | # and sets the high bit in the cache file unless we assign to the vars. | |
1952 | (set) 2>&1 | | |
1953 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
1954 | *ac_space=\ *) | |
1955 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
1956 | # turns \\\\ into \\, and sed turns \\ into \). | |
1957 | sed -n \ | |
1958 | -e "s/'/'\\\\''/g" \ | |
1959 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
1960 | ;; | |
1961 | *) | |
1962 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
1963 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
1964 | ;; | |
1965 | esac >> confcache | |
1966 | if cmp -s $cache_file confcache; then | |
1967 | : | |
1968 | else | |
1969 | if test -w $cache_file; then | |
1970 | echo "updating cache $cache_file" | |
1971 | cat confcache > $cache_file | |
1972 | else | |
1973 | echo "not updating unwritable cache $cache_file" | |
1974 | fi | |
1975 | fi | |
1976 | rm -f confcache | |
1977 | ||
1978 | ||
252b5132 RH |
1979 | # Actually configure libtool. ac_aux_dir is where install-sh is found. |
1980 | CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ | |
1981 | LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \ | |
1982 | DLLTOOL="$DLLTOOL" AS="$AS" \ | |
1983 | ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ | |
1984 | $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ | |
1985 | || { echo "configure: error: libtool configure failed" 1>&2; exit 1; } | |
1986 | ||
b2ef150d ILT |
1987 | # Reload cache, that may have been modified by ltconfig |
1988 | if test -r "$cache_file"; then | |
1989 | echo "loading cache $cache_file" | |
1990 | . $cache_file | |
1991 | else | |
1992 | echo "creating cache $cache_file" | |
1993 | > $cache_file | |
1994 | fi | |
1995 | ||
1996 | ||
1997 | # This can be used to rebuild libtool when needed | |
1998 | LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" | |
1999 | ||
2000 | # Always use our own libtool. | |
2001 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' | |
2002 | ||
252b5132 RH |
2003 | # Redirect the config.log output again, so that the ltconfig log is not |
2004 | # clobbered by the next message. | |
2005 | exec 5>>./config.log | |
2006 | ||
2007 | ||
2008 | # Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given. | |
2009 | if test "${enable_64_bit_bfd+set}" = set; then | |
2010 | enableval="$enable_64_bit_bfd" | |
2011 | case "${enableval}" in | |
2012 | yes) want64=true ;; | |
2013 | no) want64=false ;; | |
2014 | *) { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;; | |
2015 | esac | |
2016 | else | |
2017 | want64=false | |
2018 | fi | |
2019 | # Check whether --enable-targets or --disable-targets was given. | |
2020 | if test "${enable_targets+set}" = set; then | |
2021 | enableval="$enable_targets" | |
2022 | case "${enableval}" in | |
2023 | yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; } | |
2024 | ;; | |
2025 | no) enable_targets= ;; | |
2026 | *) enable_targets=$enableval ;; | |
2027 | esac | |
2028 | fi | |
2029 | # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given. | |
2030 | if test "${enable_commonbfdlib+set}" = set; then | |
2031 | enableval="$enable_commonbfdlib" | |
2032 | case "${enableval}" in | |
2033 | yes) commonbfdlib=true ;; | |
2034 | no) commonbfdlib=false ;; | |
2035 | *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;; | |
2036 | esac | |
2037 | fi | |
2038 | # Check whether --with-mmap or --without-mmap was given. | |
2039 | if test "${with_mmap+set}" = set; then | |
2040 | withval="$with_mmap" | |
2041 | case "${withval}" in | |
2042 | yes) want_mmap=true ;; | |
2043 | no) want_mmap=false ;; | |
2044 | *) { echo "configure: error: bad value ${withval} for BFD with-mmap option" 1>&2; exit 1; } ;; | |
2045 | esac | |
2046 | else | |
2047 | want_mmap=false | |
2048 | fi | |
2049 | ||
2050 | ||
2051 | ||
2052 | ||
2053 | ||
2054 | if test -z "$target" ; then | |
2055 | { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; } | |
2056 | fi | |
2057 | if test "$program_transform_name" = s,x,x,; then | |
2058 | program_transform_name= | |
2059 | else | |
2060 | # Double any \ or $. echo might interpret backslashes. | |
2061 | cat <<\EOF_SED > conftestsed | |
2062 | s,\\,\\\\,g; s,\$,$$,g | |
2063 | EOF_SED | |
2064 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
2065 | rm -f conftestsed | |
2066 | fi | |
2067 | test "$program_prefix" != NONE && | |
2068 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
2069 | # Use a double $ so make ignores it. | |
2070 | test "$program_suffix" != NONE && | |
2071 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
2072 | ||
2073 | # sed with no file args requires a program. | |
2074 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
2075 | ||
2076 | ||
2077 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 | |
3a6ae616 | 2078 | echo "configure:2079: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
252b5132 RH |
2079 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
2080 | if test "${enable_maintainer_mode+set}" = set; then | |
2081 | enableval="$enable_maintainer_mode" | |
2082 | USE_MAINTAINER_MODE=$enableval | |
2083 | else | |
2084 | USE_MAINTAINER_MODE=no | |
2085 | fi | |
2086 | ||
2087 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 | |
2088 | ||
2089 | ||
2090 | if test $USE_MAINTAINER_MODE = yes; then | |
2091 | MAINTAINER_MODE_TRUE= | |
2092 | MAINTAINER_MODE_FALSE='#' | |
2093 | else | |
2094 | MAINTAINER_MODE_TRUE='#' | |
2095 | MAINTAINER_MODE_FALSE= | |
2096 | fi | |
2097 | MAINT=$MAINTAINER_MODE_TRUE | |
2098 | ||
2099 | ||
2100 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
3a6ae616 | 2101 | echo "configure:2102: checking for Cygwin environment" >&5 |
252b5132 RH |
2102 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
2103 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2104 | else | |
2105 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 2106 | #line 2107 "configure" |
252b5132 RH |
2107 | #include "confdefs.h" |
2108 | ||
2109 | int main() { | |
2110 | ||
2111 | #ifndef __CYGWIN__ | |
2112 | #define __CYGWIN__ __CYGWIN32__ | |
2113 | #endif | |
2114 | return __CYGWIN__; | |
2115 | ; return 0; } | |
2116 | EOF | |
3a6ae616 | 2117 | if { (eval echo configure:2118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
252b5132 RH |
2118 | rm -rf conftest* |
2119 | ac_cv_cygwin=yes | |
2120 | else | |
2121 | echo "configure: failed program was:" >&5 | |
2122 | cat conftest.$ac_ext >&5 | |
2123 | rm -rf conftest* | |
2124 | ac_cv_cygwin=no | |
2125 | fi | |
2126 | rm -f conftest* | |
2127 | rm -f conftest* | |
2128 | fi | |
2129 | ||
2130 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
2131 | CYGWIN= | |
2132 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
2133 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
3a6ae616 | 2134 | echo "configure:2135: checking for mingw32 environment" >&5 |
252b5132 RH |
2135 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
2136 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2137 | else | |
2138 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 2139 | #line 2140 "configure" |
252b5132 RH |
2140 | #include "confdefs.h" |
2141 | ||
2142 | int main() { | |
2143 | return __MINGW32__; | |
2144 | ; return 0; } | |
2145 | EOF | |
3a6ae616 | 2146 | if { (eval echo configure:2147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
252b5132 RH |
2147 | rm -rf conftest* |
2148 | ac_cv_mingw32=yes | |
2149 | else | |
2150 | echo "configure: failed program was:" >&5 | |
2151 | cat conftest.$ac_ext >&5 | |
2152 | rm -rf conftest* | |
2153 | ac_cv_mingw32=no | |
2154 | fi | |
2155 | rm -f conftest* | |
2156 | rm -f conftest* | |
2157 | fi | |
2158 | ||
2159 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
2160 | MINGW32= | |
2161 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
2162 | ||
2163 | ||
2164 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
3a6ae616 | 2165 | echo "configure:2166: checking for executable suffix" >&5 |
252b5132 RH |
2166 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
2167 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2168 | else | |
2169 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then | |
2170 | ac_cv_exeext=.exe | |
2171 | else | |
2172 | rm -f conftest* | |
2173 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
2174 | ac_cv_exeext= | |
3a6ae616 | 2175 | if { (eval echo configure:2176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
252b5132 RH |
2176 | for file in conftest.*; do |
2177 | case $file in | |
2178 | *.c | *.o | *.obj | *.ilk | *.pdb) ;; | |
2179 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; | |
2180 | esac | |
2181 | done | |
2182 | else | |
2183 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
2184 | fi | |
2185 | rm -f conftest* | |
2186 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
2187 | fi | |
2188 | fi | |
2189 | ||
2190 | EXEEXT="" | |
2191 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
2192 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
2193 | ac_exeext=$EXEEXT | |
2194 | ||
2195 | ||
2196 | host64=false | |
2197 | target64=false | |
2198 | ||
2199 | # host stuff: | |
2200 | ||
2201 | # Extract the first word of "gcc", so it can be a program name with args. | |
2202 | set dummy gcc; ac_word=$2 | |
2203 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3a6ae616 | 2204 | echo "configure:2205: checking for $ac_word" >&5 |
252b5132 RH |
2205 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
2206 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2207 | else | |
2208 | if test -n "$CC"; then | |
2209 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2210 | else | |
2211 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2212 | ac_dummy="$PATH" | |
2213 | for ac_dir in $ac_dummy; do | |
2214 | test -z "$ac_dir" && ac_dir=. | |
2215 | if test -f $ac_dir/$ac_word; then | |
2216 | ac_cv_prog_CC="gcc" | |
2217 | break | |
2218 | fi | |
2219 | done | |
2220 | IFS="$ac_save_ifs" | |
2221 | fi | |
2222 | fi | |
2223 | CC="$ac_cv_prog_CC" | |
2224 | if test -n "$CC"; then | |
2225 | echo "$ac_t""$CC" 1>&6 | |
2226 | else | |
2227 | echo "$ac_t""no" 1>&6 | |
2228 | fi | |
2229 | ||
2230 | if test -z "$CC"; then | |
2231 | # Extract the first word of "cc", so it can be a program name with args. | |
2232 | set dummy cc; ac_word=$2 | |
2233 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3a6ae616 | 2234 | echo "configure:2235: checking for $ac_word" >&5 |
252b5132 RH |
2235 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
2236 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2237 | else | |
2238 | if test -n "$CC"; then | |
2239 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2240 | else | |
2241 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2242 | ac_prog_rejected=no | |
2243 | ac_dummy="$PATH" | |
2244 | for ac_dir in $ac_dummy; do | |
2245 | test -z "$ac_dir" && ac_dir=. | |
2246 | if test -f $ac_dir/$ac_word; then | |
2247 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
2248 | ac_prog_rejected=yes | |
2249 | continue | |
2250 | fi | |
2251 | ac_cv_prog_CC="cc" | |
2252 | break | |
2253 | fi | |
2254 | done | |
2255 | IFS="$ac_save_ifs" | |
2256 | if test $ac_prog_rejected = yes; then | |
2257 | # We found a bogon in the path, so make sure we never use it. | |
2258 | set dummy $ac_cv_prog_CC | |
2259 | shift | |
2260 | if test $# -gt 0; then | |
2261 | # We chose a different compiler from the bogus one. | |
2262 | # However, it has the same basename, so the bogon will be chosen | |
2263 | # first if we set CC to just the basename; use the full file name. | |
2264 | shift | |
2265 | set dummy "$ac_dir/$ac_word" "$@" | |
2266 | shift | |
2267 | ac_cv_prog_CC="$@" | |
2268 | fi | |
2269 | fi | |
2270 | fi | |
2271 | fi | |
2272 | CC="$ac_cv_prog_CC" | |
2273 | if test -n "$CC"; then | |
2274 | echo "$ac_t""$CC" 1>&6 | |
2275 | else | |
2276 | echo "$ac_t""no" 1>&6 | |
2277 | fi | |
2278 | ||
2279 | if test -z "$CC"; then | |
2280 | case "`uname -s`" in | |
2281 | *win32* | *WIN32*) | |
2282 | # Extract the first word of "cl", so it can be a program name with args. | |
2283 | set dummy cl; ac_word=$2 | |
2284 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3a6ae616 | 2285 | echo "configure:2286: checking for $ac_word" >&5 |
252b5132 RH |
2286 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
2287 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2288 | else | |
2289 | if test -n "$CC"; then | |
2290 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2291 | else | |
2292 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2293 | ac_dummy="$PATH" | |
2294 | for ac_dir in $ac_dummy; do | |
2295 | test -z "$ac_dir" && ac_dir=. | |
2296 | if test -f $ac_dir/$ac_word; then | |
2297 | ac_cv_prog_CC="cl" | |
2298 | break | |
2299 | fi | |
2300 | done | |
2301 | IFS="$ac_save_ifs" | |
2302 | fi | |
2303 | fi | |
2304 | CC="$ac_cv_prog_CC" | |
2305 | if test -n "$CC"; then | |
2306 | echo "$ac_t""$CC" 1>&6 | |
2307 | else | |
2308 | echo "$ac_t""no" 1>&6 | |
2309 | fi | |
2310 | ;; | |
2311 | esac | |
2312 | fi | |
2313 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
2314 | fi | |
2315 | ||
2316 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
3a6ae616 | 2317 | echo "configure:2318: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
252b5132 RH |
2318 | |
2319 | ac_ext=c | |
2320 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2321 | ac_cpp='$CPP $CPPFLAGS' | |
2322 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2323 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2324 | cross_compiling=$ac_cv_prog_cc_cross | |
2325 | ||
2326 | cat > conftest.$ac_ext << EOF | |
2327 | ||
3a6ae616 | 2328 | #line 2329 "configure" |
252b5132 RH |
2329 | #include "confdefs.h" |
2330 | ||
2331 | main(){return(0);} | |
2332 | EOF | |
3a6ae616 | 2333 | if { (eval echo configure:2334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
2334 | ac_cv_prog_cc_works=yes |
2335 | # If we can't run a trivial program, we are probably using a cross compiler. | |
2336 | if (./conftest; exit) 2>/dev/null; then | |
2337 | ac_cv_prog_cc_cross=no | |
2338 | else | |
2339 | ac_cv_prog_cc_cross=yes | |
2340 | fi | |
2341 | else | |
2342 | echo "configure: failed program was:" >&5 | |
2343 | cat conftest.$ac_ext >&5 | |
2344 | ac_cv_prog_cc_works=no | |
2345 | fi | |
2346 | rm -fr conftest* | |
2347 | ac_ext=c | |
2348 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2349 | ac_cpp='$CPP $CPPFLAGS' | |
2350 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2351 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2352 | cross_compiling=$ac_cv_prog_cc_cross | |
2353 | ||
2354 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
2355 | if test $ac_cv_prog_cc_works = no; then | |
2356 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
2357 | fi | |
2358 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
3a6ae616 | 2359 | echo "configure:2360: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
252b5132 RH |
2360 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
2361 | cross_compiling=$ac_cv_prog_cc_cross | |
2362 | ||
2363 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
3a6ae616 | 2364 | echo "configure:2365: checking whether we are using GNU C" >&5 |
252b5132 RH |
2365 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
2366 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2367 | else | |
2368 | cat > conftest.c <<EOF | |
2369 | #ifdef __GNUC__ | |
2370 | yes; | |
2371 | #endif | |
2372 | EOF | |
3a6ae616 | 2373 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
252b5132 RH |
2374 | ac_cv_prog_gcc=yes |
2375 | else | |
2376 | ac_cv_prog_gcc=no | |
2377 | fi | |
2378 | fi | |
2379 | ||
2380 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
2381 | ||
2382 | if test $ac_cv_prog_gcc = yes; then | |
2383 | GCC=yes | |
2384 | else | |
2385 | GCC= | |
2386 | fi | |
2387 | ||
2388 | ac_test_CFLAGS="${CFLAGS+set}" | |
2389 | ac_save_CFLAGS="$CFLAGS" | |
2390 | CFLAGS= | |
2391 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
3a6ae616 | 2392 | echo "configure:2393: checking whether ${CC-cc} accepts -g" >&5 |
252b5132 RH |
2393 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
2394 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2395 | else | |
2396 | echo 'void f(){}' > conftest.c | |
2397 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
2398 | ac_cv_prog_cc_g=yes | |
2399 | else | |
2400 | ac_cv_prog_cc_g=no | |
2401 | fi | |
2402 | rm -f conftest* | |
2403 | ||
2404 | fi | |
2405 | ||
2406 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
2407 | if test "$ac_test_CFLAGS" = set; then | |
2408 | CFLAGS="$ac_save_CFLAGS" | |
2409 | elif test $ac_cv_prog_cc_g = yes; then | |
2410 | if test "$GCC" = yes; then | |
2411 | CFLAGS="-g -O2" | |
2412 | else | |
2413 | CFLAGS="-g" | |
2414 | fi | |
2415 | else | |
2416 | if test "$GCC" = yes; then | |
2417 | CFLAGS="-O2" | |
2418 | else | |
2419 | CFLAGS= | |
2420 | fi | |
2421 | fi | |
2422 | ||
2423 | ||
2424 | ALL_LINGUAS= | |
2425 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
3a6ae616 | 2426 | echo "configure:2427: checking how to run the C preprocessor" >&5 |
252b5132 RH |
2427 | # On Suns, sometimes $CPP names a directory. |
2428 | if test -n "$CPP" && test -d "$CPP"; then | |
2429 | CPP= | |
2430 | fi | |
2431 | if test -z "$CPP"; then | |
2432 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
2433 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2434 | else | |
2435 | # This must be in double quotes, not single quotes, because CPP may get | |
2436 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
2437 | CPP="${CC-cc} -E" | |
2438 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
2439 | # not just through cpp. | |
2440 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 2441 | #line 2442 "configure" |
252b5132 RH |
2442 | #include "confdefs.h" |
2443 | #include <assert.h> | |
2444 | Syntax Error | |
2445 | EOF | |
2446 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3a6ae616 | 2447 | { (eval echo configure:2448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
252b5132 RH |
2448 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2449 | if test -z "$ac_err"; then | |
2450 | : | |
2451 | else | |
2452 | echo "$ac_err" >&5 | |
2453 | echo "configure: failed program was:" >&5 | |
2454 | cat conftest.$ac_ext >&5 | |
2455 | rm -rf conftest* | |
2456 | CPP="${CC-cc} -E -traditional-cpp" | |
2457 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 2458 | #line 2459 "configure" |
252b5132 RH |
2459 | #include "confdefs.h" |
2460 | #include <assert.h> | |
2461 | Syntax Error | |
2462 | EOF | |
2463 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3a6ae616 | 2464 | { (eval echo configure:2465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
252b5132 RH |
2465 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2466 | if test -z "$ac_err"; then | |
2467 | : | |
2468 | else | |
2469 | echo "$ac_err" >&5 | |
2470 | echo "configure: failed program was:" >&5 | |
2471 | cat conftest.$ac_ext >&5 | |
2472 | rm -rf conftest* | |
2473 | CPP="${CC-cc} -nologo -E" | |
2474 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 2475 | #line 2476 "configure" |
252b5132 RH |
2476 | #include "confdefs.h" |
2477 | #include <assert.h> | |
2478 | Syntax Error | |
2479 | EOF | |
2480 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3a6ae616 | 2481 | { (eval echo configure:2482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
252b5132 RH |
2482 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2483 | if test -z "$ac_err"; then | |
2484 | : | |
2485 | else | |
2486 | echo "$ac_err" >&5 | |
2487 | echo "configure: failed program was:" >&5 | |
2488 | cat conftest.$ac_ext >&5 | |
2489 | rm -rf conftest* | |
2490 | CPP=/lib/cpp | |
2491 | fi | |
2492 | rm -f conftest* | |
2493 | fi | |
2494 | rm -f conftest* | |
2495 | fi | |
2496 | rm -f conftest* | |
2497 | ac_cv_prog_CPP="$CPP" | |
2498 | fi | |
2499 | CPP="$ac_cv_prog_CPP" | |
2500 | else | |
2501 | ac_cv_prog_CPP="$CPP" | |
2502 | fi | |
2503 | echo "$ac_t""$CPP" 1>&6 | |
2504 | ||
2505 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
3a6ae616 | 2506 | echo "configure:2507: checking for ANSI C header files" >&5 |
252b5132 RH |
2507 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
2508 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2509 | else | |
2510 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 2511 | #line 2512 "configure" |
252b5132 RH |
2512 | #include "confdefs.h" |
2513 | #include <stdlib.h> | |
2514 | #include <stdarg.h> | |
2515 | #include <string.h> | |
2516 | #include <float.h> | |
2517 | EOF | |
2518 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3a6ae616 | 2519 | { (eval echo configure:2520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
252b5132 RH |
2520 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2521 | if test -z "$ac_err"; then | |
2522 | rm -rf conftest* | |
2523 | ac_cv_header_stdc=yes | |
2524 | else | |
2525 | echo "$ac_err" >&5 | |
2526 | echo "configure: failed program was:" >&5 | |
2527 | cat conftest.$ac_ext >&5 | |
2528 | rm -rf conftest* | |
2529 | ac_cv_header_stdc=no | |
2530 | fi | |
2531 | rm -f conftest* | |
2532 | ||
2533 | if test $ac_cv_header_stdc = yes; then | |
2534 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
2535 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 2536 | #line 2537 "configure" |
252b5132 RH |
2537 | #include "confdefs.h" |
2538 | #include <string.h> | |
2539 | EOF | |
2540 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2541 | egrep "memchr" >/dev/null 2>&1; then | |
2542 | : | |
2543 | else | |
2544 | rm -rf conftest* | |
2545 | ac_cv_header_stdc=no | |
2546 | fi | |
2547 | rm -f conftest* | |
2548 | ||
2549 | fi | |
2550 | ||
2551 | if test $ac_cv_header_stdc = yes; then | |
2552 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
2553 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 2554 | #line 2555 "configure" |
252b5132 RH |
2555 | #include "confdefs.h" |
2556 | #include <stdlib.h> | |
2557 | EOF | |
2558 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2559 | egrep "free" >/dev/null 2>&1; then | |
2560 | : | |
2561 | else | |
2562 | rm -rf conftest* | |
2563 | ac_cv_header_stdc=no | |
2564 | fi | |
2565 | rm -f conftest* | |
2566 | ||
2567 | fi | |
2568 | ||
2569 | if test $ac_cv_header_stdc = yes; then | |
2570 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
2571 | if test "$cross_compiling" = yes; then | |
2572 | : | |
2573 | else | |
2574 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 2575 | #line 2576 "configure" |
252b5132 RH |
2576 | #include "confdefs.h" |
2577 | #include <ctype.h> | |
2578 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
2579 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
2580 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
2581 | int main () { int i; for (i = 0; i < 256; i++) | |
2582 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
2583 | exit (0); } | |
2584 | ||
2585 | EOF | |
3a6ae616 | 2586 | if { (eval echo configure:2587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
252b5132 RH |
2587 | then |
2588 | : | |
2589 | else | |
2590 | echo "configure: failed program was:" >&5 | |
2591 | cat conftest.$ac_ext >&5 | |
2592 | rm -fr conftest* | |
2593 | ac_cv_header_stdc=no | |
2594 | fi | |
2595 | rm -fr conftest* | |
2596 | fi | |
2597 | ||
2598 | fi | |
2599 | fi | |
2600 | ||
2601 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
2602 | if test $ac_cv_header_stdc = yes; then | |
2603 | cat >> confdefs.h <<\EOF | |
2604 | #define STDC_HEADERS 1 | |
2605 | EOF | |
2606 | ||
2607 | fi | |
2608 | ||
2609 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
3a6ae616 | 2610 | echo "configure:2611: checking for working const" >&5 |
252b5132 RH |
2611 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
2612 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2613 | else | |
2614 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 2615 | #line 2616 "configure" |
252b5132 RH |
2616 | #include "confdefs.h" |
2617 | ||
2618 | int main() { | |
2619 | ||
2620 | /* Ultrix mips cc rejects this. */ | |
2621 | typedef int charset[2]; const charset x; | |
2622 | /* SunOS 4.1.1 cc rejects this. */ | |
2623 | char const *const *ccp; | |
2624 | char **p; | |
2625 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
2626 | struct point {int x, y;}; | |
2627 | static struct point const zero = {0,0}; | |
2628 | /* AIX XL C 1.02.0.0 rejects this. | |
2629 | It does not let you subtract one const X* pointer from another in an arm | |
2630 | of an if-expression whose if-part is not a constant expression */ | |
2631 | const char *g = "string"; | |
2632 | ccp = &g + (g ? g-g : 0); | |
2633 | /* HPUX 7.0 cc rejects these. */ | |
2634 | ++ccp; | |
2635 | p = (char**) ccp; | |
2636 | ccp = (char const *const *) p; | |
2637 | { /* SCO 3.2v4 cc rejects this. */ | |
2638 | char *t; | |
2639 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
2640 | ||
2641 | *t++ = 0; | |
2642 | } | |
2643 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
2644 | int x[] = {25, 17}; | |
2645 | const int *foo = &x[0]; | |
2646 | ++foo; | |
2647 | } | |
2648 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
2649 | typedef const int *iptr; | |
2650 | iptr p = 0; | |
2651 | ++p; | |
2652 | } | |
2653 | { /* AIX XL C 1.02.0.0 rejects this saying | |
2654 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
2655 | struct s { int j; const int *ap[3]; }; | |
2656 | struct s *b; b->j = 5; | |
2657 | } | |
2658 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
2659 | const int foo = 10; | |
2660 | } | |
2661 | ||
2662 | ; return 0; } | |
2663 | EOF | |
3a6ae616 | 2664 | if { (eval echo configure:2665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
252b5132 RH |
2665 | rm -rf conftest* |
2666 | ac_cv_c_const=yes | |
2667 | else | |
2668 | echo "configure: failed program was:" >&5 | |
2669 | cat conftest.$ac_ext >&5 | |
2670 | rm -rf conftest* | |
2671 | ac_cv_c_const=no | |
2672 | fi | |
2673 | rm -f conftest* | |
2674 | fi | |
2675 | ||
2676 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
2677 | if test $ac_cv_c_const = no; then | |
2678 | cat >> confdefs.h <<\EOF | |
2679 | #define const | |
2680 | EOF | |
2681 | ||
2682 | fi | |
2683 | ||
2684 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
3a6ae616 | 2685 | echo "configure:2686: checking for inline" >&5 |
252b5132 RH |
2686 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
2687 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2688 | else | |
2689 | ac_cv_c_inline=no | |
2690 | for ac_kw in inline __inline__ __inline; do | |
2691 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 2692 | #line 2693 "configure" |
252b5132 RH |
2693 | #include "confdefs.h" |
2694 | ||
2695 | int main() { | |
2696 | } $ac_kw foo() { | |
2697 | ; return 0; } | |
2698 | EOF | |
3a6ae616 | 2699 | if { (eval echo configure:2700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
252b5132 RH |
2700 | rm -rf conftest* |
2701 | ac_cv_c_inline=$ac_kw; break | |
2702 | else | |
2703 | echo "configure: failed program was:" >&5 | |
2704 | cat conftest.$ac_ext >&5 | |
2705 | fi | |
2706 | rm -f conftest* | |
2707 | done | |
2708 | ||
2709 | fi | |
2710 | ||
2711 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
2712 | case "$ac_cv_c_inline" in | |
2713 | inline | yes) ;; | |
2714 | no) cat >> confdefs.h <<\EOF | |
2715 | #define inline | |
2716 | EOF | |
2717 | ;; | |
2718 | *) cat >> confdefs.h <<EOF | |
2719 | #define inline $ac_cv_c_inline | |
2720 | EOF | |
2721 | ;; | |
2722 | esac | |
2723 | ||
2724 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
3a6ae616 | 2725 | echo "configure:2726: checking for off_t" >&5 |
252b5132 RH |
2726 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
2727 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2728 | else | |
2729 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 2730 | #line 2731 "configure" |
252b5132 RH |
2731 | #include "confdefs.h" |
2732 | #include <sys/types.h> | |
2733 | #if STDC_HEADERS | |
2734 | #include <stdlib.h> | |
2735 | #include <stddef.h> | |
2736 | #endif | |
2737 | EOF | |
2738 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2739 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
2740 | rm -rf conftest* | |
2741 | ac_cv_type_off_t=yes | |
2742 | else | |
2743 | rm -rf conftest* | |
2744 | ac_cv_type_off_t=no | |
2745 | fi | |
2746 | rm -f conftest* | |
2747 | ||
2748 | fi | |
2749 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
2750 | if test $ac_cv_type_off_t = no; then | |
2751 | cat >> confdefs.h <<\EOF | |
2752 | #define off_t long | |
2753 | EOF | |
2754 | ||
2755 | fi | |
2756 | ||
2757 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
3a6ae616 | 2758 | echo "configure:2759: checking for size_t" >&5 |
252b5132 RH |
2759 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
2760 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2761 | else | |
2762 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 2763 | #line 2764 "configure" |
252b5132 RH |
2764 | #include "confdefs.h" |
2765 | #include <sys/types.h> | |
2766 | #if STDC_HEADERS | |
2767 | #include <stdlib.h> | |
2768 | #include <stddef.h> | |
2769 | #endif | |
2770 | EOF | |
2771 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2772 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
2773 | rm -rf conftest* | |
2774 | ac_cv_type_size_t=yes | |
2775 | else | |
2776 | rm -rf conftest* | |
2777 | ac_cv_type_size_t=no | |
2778 | fi | |
2779 | rm -f conftest* | |
2780 | ||
2781 | fi | |
2782 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
2783 | if test $ac_cv_type_size_t = no; then | |
2784 | cat >> confdefs.h <<\EOF | |
2785 | #define size_t unsigned | |
2786 | EOF | |
2787 | ||
2788 | fi | |
2789 | ||
2790 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
2791 | # for constant arguments. Useless! | |
2792 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
3a6ae616 | 2793 | echo "configure:2794: checking for working alloca.h" >&5 |
252b5132 RH |
2794 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
2795 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2796 | else | |
2797 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 2798 | #line 2799 "configure" |
252b5132 RH |
2799 | #include "confdefs.h" |
2800 | #include <alloca.h> | |
2801 | int main() { | |
2802 | char *p = alloca(2 * sizeof(int)); | |
2803 | ; return 0; } | |
2804 | EOF | |
3a6ae616 | 2805 | if { (eval echo configure:2806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
2806 | rm -rf conftest* |
2807 | ac_cv_header_alloca_h=yes | |
2808 | else | |
2809 | echo "configure: failed program was:" >&5 | |
2810 | cat conftest.$ac_ext >&5 | |
2811 | rm -rf conftest* | |
2812 | ac_cv_header_alloca_h=no | |
2813 | fi | |
2814 | rm -f conftest* | |
2815 | fi | |
2816 | ||
2817 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
2818 | if test $ac_cv_header_alloca_h = yes; then | |
2819 | cat >> confdefs.h <<\EOF | |
2820 | #define HAVE_ALLOCA_H 1 | |
2821 | EOF | |
2822 | ||
2823 | fi | |
2824 | ||
2825 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
3a6ae616 | 2826 | echo "configure:2827: checking for alloca" >&5 |
252b5132 RH |
2827 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
2828 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2829 | else | |
2830 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 2831 | #line 2832 "configure" |
252b5132 RH |
2832 | #include "confdefs.h" |
2833 | ||
2834 | #ifdef __GNUC__ | |
2835 | # define alloca __builtin_alloca | |
2836 | #else | |
2837 | # ifdef _MSC_VER | |
2838 | # include <malloc.h> | |
2839 | # define alloca _alloca | |
2840 | # else | |
2841 | # if HAVE_ALLOCA_H | |
2842 | # include <alloca.h> | |
2843 | # else | |
2844 | # ifdef _AIX | |
2845 | #pragma alloca | |
2846 | # else | |
2847 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
2848 | char *alloca (); | |
2849 | # endif | |
2850 | # endif | |
2851 | # endif | |
2852 | # endif | |
2853 | #endif | |
2854 | ||
2855 | int main() { | |
2856 | char *p = (char *) alloca(1); | |
2857 | ; return 0; } | |
2858 | EOF | |
3a6ae616 | 2859 | if { (eval echo configure:2860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
2860 | rm -rf conftest* |
2861 | ac_cv_func_alloca_works=yes | |
2862 | else | |
2863 | echo "configure: failed program was:" >&5 | |
2864 | cat conftest.$ac_ext >&5 | |
2865 | rm -rf conftest* | |
2866 | ac_cv_func_alloca_works=no | |
2867 | fi | |
2868 | rm -f conftest* | |
2869 | fi | |
2870 | ||
2871 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
2872 | if test $ac_cv_func_alloca_works = yes; then | |
2873 | cat >> confdefs.h <<\EOF | |
2874 | #define HAVE_ALLOCA 1 | |
2875 | EOF | |
2876 | ||
2877 | fi | |
2878 | ||
2879 | if test $ac_cv_func_alloca_works = no; then | |
2880 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
2881 | # that cause trouble. Some versions do not even contain alloca or | |
2882 | # contain a buggy version. If you still want to use their alloca, | |
2883 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
2884 | ALLOCA=alloca.${ac_objext} | |
2885 | cat >> confdefs.h <<\EOF | |
2886 | #define C_ALLOCA 1 | |
2887 | EOF | |
2888 | ||
2889 | ||
2890 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
3a6ae616 | 2891 | echo "configure:2892: checking whether alloca needs Cray hooks" >&5 |
252b5132 RH |
2892 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
2893 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2894 | else | |
2895 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 2896 | #line 2897 "configure" |
252b5132 RH |
2897 | #include "confdefs.h" |
2898 | #if defined(CRAY) && ! defined(CRAY2) | |
2899 | webecray | |
2900 | #else | |
2901 | wenotbecray | |
2902 | #endif | |
2903 | ||
2904 | EOF | |
2905 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2906 | egrep "webecray" >/dev/null 2>&1; then | |
2907 | rm -rf conftest* | |
2908 | ac_cv_os_cray=yes | |
2909 | else | |
2910 | rm -rf conftest* | |
2911 | ac_cv_os_cray=no | |
2912 | fi | |
2913 | rm -f conftest* | |
2914 | ||
2915 | fi | |
2916 | ||
2917 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
2918 | if test $ac_cv_os_cray = yes; then | |
2919 | for ac_func in _getb67 GETB67 getb67; do | |
2920 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
3a6ae616 | 2921 | echo "configure:2922: checking for $ac_func" >&5 |
252b5132 RH |
2922 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2923 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2924 | else | |
2925 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 2926 | #line 2927 "configure" |
252b5132 RH |
2927 | #include "confdefs.h" |
2928 | /* System header to define __stub macros and hopefully few prototypes, | |
2929 | which can conflict with char $ac_func(); below. */ | |
2930 | #include <assert.h> | |
2931 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2932 | /* We use char because int might match the return type of a gcc2 | |
2933 | builtin and then its argument prototype would still apply. */ | |
2934 | char $ac_func(); | |
2935 | ||
2936 | int main() { | |
2937 | ||
2938 | /* The GNU C library defines this for functions which it implements | |
2939 | to always fail with ENOSYS. Some functions are actually named | |
2940 | something starting with __ and the normal name is an alias. */ | |
2941 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2942 | choke me | |
2943 | #else | |
2944 | $ac_func(); | |
2945 | #endif | |
2946 | ||
2947 | ; return 0; } | |
2948 | EOF | |
3a6ae616 | 2949 | if { (eval echo configure:2950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
2950 | rm -rf conftest* |
2951 | eval "ac_cv_func_$ac_func=yes" | |
2952 | else | |
2953 | echo "configure: failed program was:" >&5 | |
2954 | cat conftest.$ac_ext >&5 | |
2955 | rm -rf conftest* | |
2956 | eval "ac_cv_func_$ac_func=no" | |
2957 | fi | |
2958 | rm -f conftest* | |
2959 | fi | |
2960 | ||
2961 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2962 | echo "$ac_t""yes" 1>&6 | |
2963 | cat >> confdefs.h <<EOF | |
2964 | #define CRAY_STACKSEG_END $ac_func | |
2965 | EOF | |
2966 | ||
2967 | break | |
2968 | else | |
2969 | echo "$ac_t""no" 1>&6 | |
2970 | fi | |
2971 | ||
2972 | done | |
2973 | fi | |
2974 | ||
2975 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
3a6ae616 | 2976 | echo "configure:2977: checking stack direction for C alloca" >&5 |
252b5132 RH |
2977 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
2978 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2979 | else | |
2980 | if test "$cross_compiling" = yes; then | |
2981 | ac_cv_c_stack_direction=0 | |
2982 | else | |
2983 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 2984 | #line 2985 "configure" |
252b5132 RH |
2985 | #include "confdefs.h" |
2986 | find_stack_direction () | |
2987 | { | |
2988 | static char *addr = 0; | |
2989 | auto char dummy; | |
2990 | if (addr == 0) | |
2991 | { | |
2992 | addr = &dummy; | |
2993 | return find_stack_direction (); | |
2994 | } | |
2995 | else | |
2996 | return (&dummy > addr) ? 1 : -1; | |
2997 | } | |
2998 | main () | |
2999 | { | |
3000 | exit (find_stack_direction() < 0); | |
3001 | } | |
3002 | EOF | |
3a6ae616 | 3003 | if { (eval echo configure:3004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
252b5132 RH |
3004 | then |
3005 | ac_cv_c_stack_direction=1 | |
3006 | else | |
3007 | echo "configure: failed program was:" >&5 | |
3008 | cat conftest.$ac_ext >&5 | |
3009 | rm -fr conftest* | |
3010 | ac_cv_c_stack_direction=-1 | |
3011 | fi | |
3012 | rm -fr conftest* | |
3013 | fi | |
3014 | ||
3015 | fi | |
3016 | ||
3017 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
3018 | cat >> confdefs.h <<EOF | |
3019 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
3020 | EOF | |
3021 | ||
3022 | fi | |
3023 | ||
3024 | for ac_hdr in unistd.h | |
3025 | do | |
3026 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3027 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
3a6ae616 | 3028 | echo "configure:3029: checking for $ac_hdr" >&5 |
252b5132 RH |
3029 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3030 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3031 | else | |
3032 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 3033 | #line 3034 "configure" |
252b5132 RH |
3034 | #include "confdefs.h" |
3035 | #include <$ac_hdr> | |
3036 | EOF | |
3037 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3a6ae616 | 3038 | { (eval echo configure:3039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
252b5132 RH |
3039 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3040 | if test -z "$ac_err"; then | |
3041 | rm -rf conftest* | |
3042 | eval "ac_cv_header_$ac_safe=yes" | |
3043 | else | |
3044 | echo "$ac_err" >&5 | |
3045 | echo "configure: failed program was:" >&5 | |
3046 | cat conftest.$ac_ext >&5 | |
3047 | rm -rf conftest* | |
3048 | eval "ac_cv_header_$ac_safe=no" | |
3049 | fi | |
3050 | rm -f conftest* | |
3051 | fi | |
3052 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3053 | echo "$ac_t""yes" 1>&6 | |
3054 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3055 | cat >> confdefs.h <<EOF | |
3056 | #define $ac_tr_hdr 1 | |
3057 | EOF | |
3058 | ||
3059 | else | |
3060 | echo "$ac_t""no" 1>&6 | |
3061 | fi | |
3062 | done | |
3063 | ||
3064 | for ac_func in getpagesize | |
3065 | do | |
3066 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
3a6ae616 | 3067 | echo "configure:3068: checking for $ac_func" >&5 |
252b5132 RH |
3068 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3069 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3070 | else | |
3071 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 3072 | #line 3073 "configure" |
252b5132 RH |
3073 | #include "confdefs.h" |
3074 | /* System header to define __stub macros and hopefully few prototypes, | |
3075 | which can conflict with char $ac_func(); below. */ | |
3076 | #include <assert.h> | |
3077 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3078 | /* We use char because int might match the return type of a gcc2 | |
3079 | builtin and then its argument prototype would still apply. */ | |
3080 | char $ac_func(); | |
3081 | ||
3082 | int main() { | |
3083 | ||
3084 | /* The GNU C library defines this for functions which it implements | |
3085 | to always fail with ENOSYS. Some functions are actually named | |
3086 | something starting with __ and the normal name is an alias. */ | |
3087 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3088 | choke me | |
3089 | #else | |
3090 | $ac_func(); | |
3091 | #endif | |
3092 | ||
3093 | ; return 0; } | |
3094 | EOF | |
3a6ae616 | 3095 | if { (eval echo configure:3096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
3096 | rm -rf conftest* |
3097 | eval "ac_cv_func_$ac_func=yes" | |
3098 | else | |
3099 | echo "configure: failed program was:" >&5 | |
3100 | cat conftest.$ac_ext >&5 | |
3101 | rm -rf conftest* | |
3102 | eval "ac_cv_func_$ac_func=no" | |
3103 | fi | |
3104 | rm -f conftest* | |
3105 | fi | |
3106 | ||
3107 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3108 | echo "$ac_t""yes" 1>&6 | |
3109 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3110 | cat >> confdefs.h <<EOF | |
3111 | #define $ac_tr_func 1 | |
3112 | EOF | |
3113 | ||
3114 | else | |
3115 | echo "$ac_t""no" 1>&6 | |
3116 | fi | |
3117 | done | |
3118 | ||
3119 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
3a6ae616 | 3120 | echo "configure:3121: checking for working mmap" >&5 |
252b5132 RH |
3121 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
3122 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3123 | else | |
3124 | if test "$cross_compiling" = yes; then | |
3125 | ac_cv_func_mmap_fixed_mapped=no | |
3126 | else | |
3127 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 3128 | #line 3129 "configure" |
252b5132 RH |
3129 | #include "confdefs.h" |
3130 | ||
3131 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
3132 | Here is a matrix of mmap possibilities: | |
3133 | mmap private not fixed | |
3134 | mmap private fixed at somewhere currently unmapped | |
3135 | mmap private fixed at somewhere already mapped | |
3136 | mmap shared not fixed | |
3137 | mmap shared fixed at somewhere currently unmapped | |
3138 | mmap shared fixed at somewhere already mapped | |
3139 | For private mappings, we should verify that changes cannot be read() | |
3140 | back from the file, nor mmap's back from the file at a different | |
3141 | address. (There have been systems where private was not correctly | |
3142 | implemented like the infamous i386 svr4.0, and systems where the | |
3143 | VM page cache was not coherent with the filesystem buffer cache | |
3144 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
3145 | For shared mappings, we should conversely verify that changes get | |
3146 | propogated back to all the places they're supposed to be. | |
3147 | ||
3148 | Grep wants private fixed already mapped. | |
3149 | The main things grep needs to know about mmap are: | |
3150 | * does it exist and is it safe to write into the mmap'd area | |
3151 | * how to use it (BSD variants) */ | |
3152 | #include <sys/types.h> | |
3153 | #include <fcntl.h> | |
3154 | #include <sys/mman.h> | |
3155 | ||
3156 | /* This mess was copied from the GNU getpagesize.h. */ | |
3157 | #ifndef HAVE_GETPAGESIZE | |
3158 | # ifdef HAVE_UNISTD_H | |
3159 | # include <unistd.h> | |
3160 | # endif | |
3161 | ||
3162 | /* Assume that all systems that can run configure have sys/param.h. */ | |
3163 | # ifndef HAVE_SYS_PARAM_H | |
3164 | # define HAVE_SYS_PARAM_H 1 | |
3165 | # endif | |
3166 | ||
3167 | # ifdef _SC_PAGESIZE | |
3168 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
3169 | # else /* no _SC_PAGESIZE */ | |
3170 | # ifdef HAVE_SYS_PARAM_H | |
3171 | # include <sys/param.h> | |
3172 | # ifdef EXEC_PAGESIZE | |
3173 | # define getpagesize() EXEC_PAGESIZE | |
3174 | # else /* no EXEC_PAGESIZE */ | |
3175 | # ifdef NBPG | |
3176 | # define getpagesize() NBPG * CLSIZE | |
3177 | # ifndef CLSIZE | |
3178 | # define CLSIZE 1 | |
3179 | # endif /* no CLSIZE */ | |
3180 | # else /* no NBPG */ | |
3181 | # ifdef NBPC | |
3182 | # define getpagesize() NBPC | |
3183 | # else /* no NBPC */ | |
3184 | # ifdef PAGESIZE | |
3185 | # define getpagesize() PAGESIZE | |
3186 | # endif /* PAGESIZE */ | |
3187 | # endif /* no NBPC */ | |
3188 | # endif /* no NBPG */ | |
3189 | # endif /* no EXEC_PAGESIZE */ | |
3190 | # else /* no HAVE_SYS_PARAM_H */ | |
3191 | # define getpagesize() 8192 /* punt totally */ | |
3192 | # endif /* no HAVE_SYS_PARAM_H */ | |
3193 | # endif /* no _SC_PAGESIZE */ | |
3194 | ||
3195 | #endif /* no HAVE_GETPAGESIZE */ | |
3196 | ||
3197 | #ifdef __cplusplus | |
3198 | extern "C" { void *malloc(unsigned); } | |
3199 | #else | |
3200 | char *malloc(); | |
3201 | #endif | |
3202 | ||
3203 | int | |
3204 | main() | |
3205 | { | |
3206 | char *data, *data2, *data3; | |
3207 | int i, pagesize; | |
3208 | int fd; | |
3209 | ||
3210 | pagesize = getpagesize(); | |
3211 | ||
3212 | /* | |
3213 | * First, make a file with some known garbage in it. | |
3214 | */ | |
3215 | data = malloc(pagesize); | |
3216 | if (!data) | |
3217 | exit(1); | |
3218 | for (i = 0; i < pagesize; ++i) | |
3219 | *(data + i) = rand(); | |
3220 | umask(0); | |
3221 | fd = creat("conftestmmap", 0600); | |
3222 | if (fd < 0) | |
3223 | exit(1); | |
3224 | if (write(fd, data, pagesize) != pagesize) | |
3225 | exit(1); | |
3226 | close(fd); | |
3227 | ||
3228 | /* | |
3229 | * Next, try to mmap the file at a fixed address which | |
3230 | * already has something else allocated at it. If we can, | |
3231 | * also make sure that we see the same garbage. | |
3232 | */ | |
3233 | fd = open("conftestmmap", O_RDWR); | |
3234 | if (fd < 0) | |
3235 | exit(1); | |
3236 | data2 = malloc(2 * pagesize); | |
3237 | if (!data2) | |
3238 | exit(1); | |
3239 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
3240 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
3241 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
3242 | exit(1); | |
3243 | for (i = 0; i < pagesize; ++i) | |
3244 | if (*(data + i) != *(data2 + i)) | |
3245 | exit(1); | |
3246 | ||
3247 | /* | |
3248 | * Finally, make sure that changes to the mapped area | |
3249 | * do not percolate back to the file as seen by read(). | |
3250 | * (This is a bug on some variants of i386 svr4.0.) | |
3251 | */ | |
3252 | for (i = 0; i < pagesize; ++i) | |
3253 | *(data2 + i) = *(data2 + i) + 1; | |
3254 | data3 = malloc(pagesize); | |
3255 | if (!data3) | |
3256 | exit(1); | |
3257 | if (read(fd, data3, pagesize) != pagesize) | |
3258 | exit(1); | |
3259 | for (i = 0; i < pagesize; ++i) | |
3260 | if (*(data + i) != *(data3 + i)) | |
3261 | exit(1); | |
3262 | close(fd); | |
3263 | unlink("conftestmmap"); | |
3264 | exit(0); | |
3265 | } | |
3266 | ||
3267 | EOF | |
3a6ae616 | 3268 | if { (eval echo configure:3269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
252b5132 RH |
3269 | then |
3270 | ac_cv_func_mmap_fixed_mapped=yes | |
3271 | else | |
3272 | echo "configure: failed program was:" >&5 | |
3273 | cat conftest.$ac_ext >&5 | |
3274 | rm -fr conftest* | |
3275 | ac_cv_func_mmap_fixed_mapped=no | |
3276 | fi | |
3277 | rm -fr conftest* | |
3278 | fi | |
3279 | ||
3280 | fi | |
3281 | ||
3282 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
3283 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
3284 | cat >> confdefs.h <<\EOF | |
3285 | #define HAVE_MMAP 1 | |
3286 | EOF | |
3287 | ||
3288 | fi | |
3289 | ||
3290 | ||
3291 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
3292 | unistd.h values.h sys/param.h | |
3293 | do | |
3294 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3295 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
3a6ae616 | 3296 | echo "configure:3297: checking for $ac_hdr" >&5 |
252b5132 RH |
3297 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3298 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3299 | else | |
3300 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 3301 | #line 3302 "configure" |
252b5132 RH |
3302 | #include "confdefs.h" |
3303 | #include <$ac_hdr> | |
3304 | EOF | |
3305 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3a6ae616 | 3306 | { (eval echo configure:3307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
252b5132 RH |
3307 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3308 | if test -z "$ac_err"; then | |
3309 | rm -rf conftest* | |
3310 | eval "ac_cv_header_$ac_safe=yes" | |
3311 | else | |
3312 | echo "$ac_err" >&5 | |
3313 | echo "configure: failed program was:" >&5 | |
3314 | cat conftest.$ac_ext >&5 | |
3315 | rm -rf conftest* | |
3316 | eval "ac_cv_header_$ac_safe=no" | |
3317 | fi | |
3318 | rm -f conftest* | |
3319 | fi | |
3320 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3321 | echo "$ac_t""yes" 1>&6 | |
3322 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3323 | cat >> confdefs.h <<EOF | |
3324 | #define $ac_tr_hdr 1 | |
3325 | EOF | |
3326 | ||
3327 | else | |
3328 | echo "$ac_t""no" 1>&6 | |
3329 | fi | |
3330 | done | |
3331 | ||
3332 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
3333 | __argz_count __argz_stringify __argz_next | |
3334 | do | |
3335 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
3a6ae616 | 3336 | echo "configure:3337: checking for $ac_func" >&5 |
252b5132 RH |
3337 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3338 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3339 | else | |
3340 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 3341 | #line 3342 "configure" |
252b5132 RH |
3342 | #include "confdefs.h" |
3343 | /* System header to define __stub macros and hopefully few prototypes, | |
3344 | which can conflict with char $ac_func(); below. */ | |
3345 | #include <assert.h> | |
3346 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3347 | /* We use char because int might match the return type of a gcc2 | |
3348 | builtin and then its argument prototype would still apply. */ | |
3349 | char $ac_func(); | |
3350 | ||
3351 | int main() { | |
3352 | ||
3353 | /* The GNU C library defines this for functions which it implements | |
3354 | to always fail with ENOSYS. Some functions are actually named | |
3355 | something starting with __ and the normal name is an alias. */ | |
3356 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3357 | choke me | |
3358 | #else | |
3359 | $ac_func(); | |
3360 | #endif | |
3361 | ||
3362 | ; return 0; } | |
3363 | EOF | |
3a6ae616 | 3364 | if { (eval echo configure:3365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
3365 | rm -rf conftest* |
3366 | eval "ac_cv_func_$ac_func=yes" | |
3367 | else | |
3368 | echo "configure: failed program was:" >&5 | |
3369 | cat conftest.$ac_ext >&5 | |
3370 | rm -rf conftest* | |
3371 | eval "ac_cv_func_$ac_func=no" | |
3372 | fi | |
3373 | rm -f conftest* | |
3374 | fi | |
3375 | ||
3376 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3377 | echo "$ac_t""yes" 1>&6 | |
3378 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3379 | cat >> confdefs.h <<EOF | |
3380 | #define $ac_tr_func 1 | |
3381 | EOF | |
3382 | ||
3383 | else | |
3384 | echo "$ac_t""no" 1>&6 | |
3385 | fi | |
3386 | done | |
3387 | ||
3388 | ||
3389 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
3390 | for ac_func in stpcpy | |
3391 | do | |
3392 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
3a6ae616 | 3393 | echo "configure:3394: checking for $ac_func" >&5 |
252b5132 RH |
3394 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3395 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3396 | else | |
3397 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 3398 | #line 3399 "configure" |
252b5132 RH |
3399 | #include "confdefs.h" |
3400 | /* System header to define __stub macros and hopefully few prototypes, | |
3401 | which can conflict with char $ac_func(); below. */ | |
3402 | #include <assert.h> | |
3403 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3404 | /* We use char because int might match the return type of a gcc2 | |
3405 | builtin and then its argument prototype would still apply. */ | |
3406 | char $ac_func(); | |
3407 | ||
3408 | int main() { | |
3409 | ||
3410 | /* The GNU C library defines this for functions which it implements | |
3411 | to always fail with ENOSYS. Some functions are actually named | |
3412 | something starting with __ and the normal name is an alias. */ | |
3413 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3414 | choke me | |
3415 | #else | |
3416 | $ac_func(); | |
3417 | #endif | |
3418 | ||
3419 | ; return 0; } | |
3420 | EOF | |
3a6ae616 | 3421 | if { (eval echo configure:3422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
3422 | rm -rf conftest* |
3423 | eval "ac_cv_func_$ac_func=yes" | |
3424 | else | |
3425 | echo "configure: failed program was:" >&5 | |
3426 | cat conftest.$ac_ext >&5 | |
3427 | rm -rf conftest* | |
3428 | eval "ac_cv_func_$ac_func=no" | |
3429 | fi | |
3430 | rm -f conftest* | |
3431 | fi | |
3432 | ||
3433 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3434 | echo "$ac_t""yes" 1>&6 | |
3435 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3436 | cat >> confdefs.h <<EOF | |
3437 | #define $ac_tr_func 1 | |
3438 | EOF | |
3439 | ||
3440 | else | |
3441 | echo "$ac_t""no" 1>&6 | |
3442 | fi | |
3443 | done | |
3444 | ||
3445 | fi | |
3446 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
3447 | cat >> confdefs.h <<\EOF | |
3448 | #define HAVE_STPCPY 1 | |
3449 | EOF | |
3450 | ||
3451 | fi | |
3452 | ||
3453 | if test $ac_cv_header_locale_h = yes; then | |
3454 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
3a6ae616 | 3455 | echo "configure:3456: checking for LC_MESSAGES" >&5 |
252b5132 RH |
3456 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
3457 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3458 | else | |
3459 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 3460 | #line 3461 "configure" |
252b5132 RH |
3461 | #include "confdefs.h" |
3462 | #include <locale.h> | |
3463 | int main() { | |
3464 | return LC_MESSAGES | |
3465 | ; return 0; } | |
3466 | EOF | |
3a6ae616 | 3467 | if { (eval echo configure:3468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
3468 | rm -rf conftest* |
3469 | am_cv_val_LC_MESSAGES=yes | |
3470 | else | |
3471 | echo "configure: failed program was:" >&5 | |
3472 | cat conftest.$ac_ext >&5 | |
3473 | rm -rf conftest* | |
3474 | am_cv_val_LC_MESSAGES=no | |
3475 | fi | |
3476 | rm -f conftest* | |
3477 | fi | |
3478 | ||
3479 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
3480 | if test $am_cv_val_LC_MESSAGES = yes; then | |
3481 | cat >> confdefs.h <<\EOF | |
3482 | #define HAVE_LC_MESSAGES 1 | |
3483 | EOF | |
3484 | ||
3485 | fi | |
3486 | fi | |
3487 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
3a6ae616 | 3488 | echo "configure:3489: checking whether NLS is requested" >&5 |
252b5132 RH |
3489 | # Check whether --enable-nls or --disable-nls was given. |
3490 | if test "${enable_nls+set}" = set; then | |
3491 | enableval="$enable_nls" | |
3492 | USE_NLS=$enableval | |
3493 | else | |
3494 | USE_NLS=yes | |
3495 | fi | |
3496 | ||
3497 | echo "$ac_t""$USE_NLS" 1>&6 | |
3498 | ||
3499 | ||
3500 | USE_INCLUDED_LIBINTL=no | |
3501 | ||
3502 | if test "$USE_NLS" = "yes"; then | |
3503 | cat >> confdefs.h <<\EOF | |
3504 | #define ENABLE_NLS 1 | |
3505 | EOF | |
3506 | ||
3507 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
3a6ae616 | 3508 | echo "configure:3509: checking whether included gettext is requested" >&5 |
252b5132 RH |
3509 | # Check whether --with-included-gettext or --without-included-gettext was given. |
3510 | if test "${with_included_gettext+set}" = set; then | |
3511 | withval="$with_included_gettext" | |
3512 | nls_cv_force_use_gnu_gettext=$withval | |
3513 | else | |
3514 | nls_cv_force_use_gnu_gettext=no | |
3515 | fi | |
3516 | ||
3517 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
3518 | ||
3519 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
3520 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
3521 | nls_cv_header_intl= | |
3522 | nls_cv_header_libgt= | |
3523 | CATOBJEXT=NONE | |
3524 | ||
3525 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
3526 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
3a6ae616 | 3527 | echo "configure:3528: checking for libintl.h" >&5 |
252b5132 RH |
3528 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3529 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3530 | else | |
3531 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 3532 | #line 3533 "configure" |
252b5132 RH |
3533 | #include "confdefs.h" |
3534 | #include <libintl.h> | |
3535 | EOF | |
3536 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3a6ae616 | 3537 | { (eval echo configure:3538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
252b5132 RH |
3538 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3539 | if test -z "$ac_err"; then | |
3540 | rm -rf conftest* | |
3541 | eval "ac_cv_header_$ac_safe=yes" | |
3542 | else | |
3543 | echo "$ac_err" >&5 | |
3544 | echo "configure: failed program was:" >&5 | |
3545 | cat conftest.$ac_ext >&5 | |
3546 | rm -rf conftest* | |
3547 | eval "ac_cv_header_$ac_safe=no" | |
3548 | fi | |
3549 | rm -f conftest* | |
3550 | fi | |
3551 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3552 | echo "$ac_t""yes" 1>&6 | |
3553 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
3a6ae616 | 3554 | echo "configure:3555: checking for gettext in libc" >&5 |
252b5132 RH |
3555 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
3556 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3557 | else | |
3558 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 3559 | #line 3560 "configure" |
252b5132 RH |
3560 | #include "confdefs.h" |
3561 | #include <libintl.h> | |
3562 | int main() { | |
3563 | return (int) gettext ("") | |
3564 | ; return 0; } | |
3565 | EOF | |
3a6ae616 | 3566 | if { (eval echo configure:3567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
3567 | rm -rf conftest* |
3568 | gt_cv_func_gettext_libc=yes | |
3569 | else | |
3570 | echo "configure: failed program was:" >&5 | |
3571 | cat conftest.$ac_ext >&5 | |
3572 | rm -rf conftest* | |
3573 | gt_cv_func_gettext_libc=no | |
3574 | fi | |
3575 | rm -f conftest* | |
3576 | fi | |
3577 | ||
3578 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
3579 | ||
3580 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
3581 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
3a6ae616 | 3582 | echo "configure:3583: checking for bindtextdomain in -lintl" >&5 |
252b5132 RH |
3583 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
3584 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3585 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3586 | else | |
3587 | ac_save_LIBS="$LIBS" | |
3588 | LIBS="-lintl $LIBS" | |
3589 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 3590 | #line 3591 "configure" |
252b5132 RH |
3591 | #include "confdefs.h" |
3592 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3593 | /* We use char because int might match the return type of a gcc2 | |
3594 | builtin and then its argument prototype would still apply. */ | |
3595 | char bindtextdomain(); | |
3596 | ||
3597 | int main() { | |
3598 | bindtextdomain() | |
3599 | ; return 0; } | |
3600 | EOF | |
3a6ae616 | 3601 | if { (eval echo configure:3602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
3602 | rm -rf conftest* |
3603 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3604 | else | |
3605 | echo "configure: failed program was:" >&5 | |
3606 | cat conftest.$ac_ext >&5 | |
3607 | rm -rf conftest* | |
3608 | eval "ac_cv_lib_$ac_lib_var=no" | |
3609 | fi | |
3610 | rm -f conftest* | |
3611 | LIBS="$ac_save_LIBS" | |
3612 | ||
3613 | fi | |
3614 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3615 | echo "$ac_t""yes" 1>&6 | |
3616 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
3a6ae616 | 3617 | echo "configure:3618: checking for gettext in libintl" >&5 |
252b5132 RH |
3618 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
3619 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3620 | else | |
3621 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 3622 | #line 3623 "configure" |
252b5132 RH |
3623 | #include "confdefs.h" |
3624 | ||
3625 | int main() { | |
3626 | return (int) gettext ("") | |
3627 | ; return 0; } | |
3628 | EOF | |
3a6ae616 | 3629 | if { (eval echo configure:3630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
3630 | rm -rf conftest* |
3631 | gt_cv_func_gettext_libintl=yes | |
3632 | else | |
3633 | echo "configure: failed program was:" >&5 | |
3634 | cat conftest.$ac_ext >&5 | |
3635 | rm -rf conftest* | |
3636 | gt_cv_func_gettext_libintl=no | |
3637 | fi | |
3638 | rm -f conftest* | |
3639 | fi | |
3640 | ||
3641 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
3642 | else | |
3643 | echo "$ac_t""no" 1>&6 | |
3644 | fi | |
3645 | ||
3646 | fi | |
3647 | ||
3648 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
3649 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
3650 | cat >> confdefs.h <<\EOF | |
3651 | #define HAVE_GETTEXT 1 | |
3652 | EOF | |
3653 | ||
3654 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
3655 | set dummy msgfmt; ac_word=$2 | |
3656 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3a6ae616 | 3657 | echo "configure:3658: checking for $ac_word" >&5 |
252b5132 RH |
3658 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
3659 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3660 | else | |
3661 | case "$MSGFMT" in | |
3662 | /*) | |
3663 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
3664 | ;; | |
3665 | *) | |
3666 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
3667 | for ac_dir in $PATH; do | |
3668 | test -z "$ac_dir" && ac_dir=. | |
3669 | if test -f $ac_dir/$ac_word; then | |
3670 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
3671 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
3672 | break | |
3673 | fi | |
3674 | fi | |
3675 | done | |
3676 | IFS="$ac_save_ifs" | |
3677 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
3678 | ;; | |
3679 | esac | |
3680 | fi | |
3681 | MSGFMT="$ac_cv_path_MSGFMT" | |
3682 | if test -n "$MSGFMT"; then | |
3683 | echo "$ac_t""$MSGFMT" 1>&6 | |
3684 | else | |
3685 | echo "$ac_t""no" 1>&6 | |
3686 | fi | |
3687 | if test "$MSGFMT" != "no"; then | |
3688 | for ac_func in dcgettext | |
3689 | do | |
3690 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
3a6ae616 | 3691 | echo "configure:3692: checking for $ac_func" >&5 |
252b5132 RH |
3692 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3693 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3694 | else | |
3695 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 3696 | #line 3697 "configure" |
252b5132 RH |
3697 | #include "confdefs.h" |
3698 | /* System header to define __stub macros and hopefully few prototypes, | |
3699 | which can conflict with char $ac_func(); below. */ | |
3700 | #include <assert.h> | |
3701 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3702 | /* We use char because int might match the return type of a gcc2 | |
3703 | builtin and then its argument prototype would still apply. */ | |
3704 | char $ac_func(); | |
3705 | ||
3706 | int main() { | |
3707 | ||
3708 | /* The GNU C library defines this for functions which it implements | |
3709 | to always fail with ENOSYS. Some functions are actually named | |
3710 | something starting with __ and the normal name is an alias. */ | |
3711 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3712 | choke me | |
3713 | #else | |
3714 | $ac_func(); | |
3715 | #endif | |
3716 | ||
3717 | ; return 0; } | |
3718 | EOF | |
3a6ae616 | 3719 | if { (eval echo configure:3720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
3720 | rm -rf conftest* |
3721 | eval "ac_cv_func_$ac_func=yes" | |
3722 | else | |
3723 | echo "configure: failed program was:" >&5 | |
3724 | cat conftest.$ac_ext >&5 | |
3725 | rm -rf conftest* | |
3726 | eval "ac_cv_func_$ac_func=no" | |
3727 | fi | |
3728 | rm -f conftest* | |
3729 | fi | |
3730 | ||
3731 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3732 | echo "$ac_t""yes" 1>&6 | |
3733 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3734 | cat >> confdefs.h <<EOF | |
3735 | #define $ac_tr_func 1 | |
3736 | EOF | |
3737 | ||
3738 | else | |
3739 | echo "$ac_t""no" 1>&6 | |
3740 | fi | |
3741 | done | |
3742 | ||
3743 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
3744 | set dummy gmsgfmt; ac_word=$2 | |
3745 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3a6ae616 | 3746 | echo "configure:3747: checking for $ac_word" >&5 |
252b5132 RH |
3747 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
3748 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3749 | else | |
3750 | case "$GMSGFMT" in | |
3751 | /*) | |
3752 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
3753 | ;; | |
3754 | ?:/*) | |
3755 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
3756 | ;; | |
3757 | *) | |
3758 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3759 | ac_dummy="$PATH" | |
3760 | for ac_dir in $ac_dummy; do | |
3761 | test -z "$ac_dir" && ac_dir=. | |
3762 | if test -f $ac_dir/$ac_word; then | |
3763 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
3764 | break | |
3765 | fi | |
3766 | done | |
3767 | IFS="$ac_save_ifs" | |
3768 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
3769 | ;; | |
3770 | esac | |
3771 | fi | |
3772 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
3773 | if test -n "$GMSGFMT"; then | |
3774 | echo "$ac_t""$GMSGFMT" 1>&6 | |
3775 | else | |
3776 | echo "$ac_t""no" 1>&6 | |
3777 | fi | |
3778 | ||
3779 | # Extract the first word of "xgettext", so it can be a program name with args. | |
3780 | set dummy xgettext; ac_word=$2 | |
3781 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3a6ae616 | 3782 | echo "configure:3783: checking for $ac_word" >&5 |
252b5132 RH |
3783 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
3784 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3785 | else | |
3786 | case "$XGETTEXT" in | |
3787 | /*) | |
3788 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
3789 | ;; | |
3790 | *) | |
3791 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
3792 | for ac_dir in $PATH; do | |
3793 | test -z "$ac_dir" && ac_dir=. | |
3794 | if test -f $ac_dir/$ac_word; then | |
3795 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
3796 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
3797 | break | |
3798 | fi | |
3799 | fi | |
3800 | done | |
3801 | IFS="$ac_save_ifs" | |
3802 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
3803 | ;; | |
3804 | esac | |
3805 | fi | |
3806 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
3807 | if test -n "$XGETTEXT"; then | |
3808 | echo "$ac_t""$XGETTEXT" 1>&6 | |
3809 | else | |
3810 | echo "$ac_t""no" 1>&6 | |
3811 | fi | |
3812 | ||
3813 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 3814 | #line 3815 "configure" |
252b5132 RH |
3815 | #include "confdefs.h" |
3816 | ||
3817 | int main() { | |
3818 | extern int _nl_msg_cat_cntr; | |
3819 | return _nl_msg_cat_cntr | |
3820 | ; return 0; } | |
3821 | EOF | |
3a6ae616 | 3822 | if { (eval echo configure:3823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
3823 | rm -rf conftest* |
3824 | CATOBJEXT=.gmo | |
3825 | DATADIRNAME=share | |
3826 | else | |
3827 | echo "configure: failed program was:" >&5 | |
3828 | cat conftest.$ac_ext >&5 | |
3829 | rm -rf conftest* | |
3830 | CATOBJEXT=.mo | |
3831 | DATADIRNAME=lib | |
3832 | fi | |
3833 | rm -f conftest* | |
3834 | INSTOBJEXT=.mo | |
3835 | fi | |
3836 | fi | |
3837 | ||
3838 | else | |
3839 | echo "$ac_t""no" 1>&6 | |
3840 | fi | |
3841 | ||
3842 | ||
3843 | ||
3844 | if test "$CATOBJEXT" = "NONE"; then | |
3845 | nls_cv_use_gnu_gettext=yes | |
3846 | fi | |
3847 | fi | |
3848 | ||
3849 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
3850 | INTLOBJS="\$(GETTOBJS)" | |
3851 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
3852 | set dummy msgfmt; ac_word=$2 | |
3853 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3a6ae616 | 3854 | echo "configure:3855: checking for $ac_word" >&5 |
252b5132 RH |
3855 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
3856 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3857 | else | |
3858 | case "$MSGFMT" in | |
3859 | /*) | |
3860 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
3861 | ;; | |
3862 | *) | |
3863 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
3864 | for ac_dir in $PATH; do | |
3865 | test -z "$ac_dir" && ac_dir=. | |
3866 | if test -f $ac_dir/$ac_word; then | |
3867 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
3868 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
3869 | break | |
3870 | fi | |
3871 | fi | |
3872 | done | |
3873 | IFS="$ac_save_ifs" | |
3874 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
3875 | ;; | |
3876 | esac | |
3877 | fi | |
3878 | MSGFMT="$ac_cv_path_MSGFMT" | |
3879 | if test -n "$MSGFMT"; then | |
3880 | echo "$ac_t""$MSGFMT" 1>&6 | |
3881 | else | |
3882 | echo "$ac_t""no" 1>&6 | |
3883 | fi | |
3884 | ||
3885 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
3886 | set dummy gmsgfmt; ac_word=$2 | |
3887 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3a6ae616 | 3888 | echo "configure:3889: checking for $ac_word" >&5 |
252b5132 RH |
3889 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
3890 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3891 | else | |
3892 | case "$GMSGFMT" in | |
3893 | /*) | |
3894 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
3895 | ;; | |
3896 | ?:/*) | |
3897 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
3898 | ;; | |
3899 | *) | |
3900 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3901 | ac_dummy="$PATH" | |
3902 | for ac_dir in $ac_dummy; do | |
3903 | test -z "$ac_dir" && ac_dir=. | |
3904 | if test -f $ac_dir/$ac_word; then | |
3905 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
3906 | break | |
3907 | fi | |
3908 | done | |
3909 | IFS="$ac_save_ifs" | |
3910 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
3911 | ;; | |
3912 | esac | |
3913 | fi | |
3914 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
3915 | if test -n "$GMSGFMT"; then | |
3916 | echo "$ac_t""$GMSGFMT" 1>&6 | |
3917 | else | |
3918 | echo "$ac_t""no" 1>&6 | |
3919 | fi | |
3920 | ||
3921 | # Extract the first word of "xgettext", so it can be a program name with args. | |
3922 | set dummy xgettext; ac_word=$2 | |
3923 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3a6ae616 | 3924 | echo "configure:3925: checking for $ac_word" >&5 |
252b5132 RH |
3925 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
3926 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3927 | else | |
3928 | case "$XGETTEXT" in | |
3929 | /*) | |
3930 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
3931 | ;; | |
3932 | *) | |
3933 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
3934 | for ac_dir in $PATH; do | |
3935 | test -z "$ac_dir" && ac_dir=. | |
3936 | if test -f $ac_dir/$ac_word; then | |
3937 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
3938 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
3939 | break | |
3940 | fi | |
3941 | fi | |
3942 | done | |
3943 | IFS="$ac_save_ifs" | |
3944 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
3945 | ;; | |
3946 | esac | |
3947 | fi | |
3948 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
3949 | if test -n "$XGETTEXT"; then | |
3950 | echo "$ac_t""$XGETTEXT" 1>&6 | |
3951 | else | |
3952 | echo "$ac_t""no" 1>&6 | |
3953 | fi | |
3954 | ||
3955 | ||
3956 | USE_INCLUDED_LIBINTL=yes | |
3957 | CATOBJEXT=.gmo | |
3958 | INSTOBJEXT=.mo | |
3959 | DATADIRNAME=share | |
3960 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
3961 | INTLLIBS=$INTLDEPS | |
3962 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
3963 | nls_cv_header_intl=libintl.h | |
3964 | nls_cv_header_libgt=libgettext.h | |
3965 | fi | |
3966 | ||
3967 | if test "$XGETTEXT" != ":"; then | |
3968 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
3969 | : ; | |
3970 | else | |
3971 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
3972 | XGETTEXT=":" | |
3973 | fi | |
3974 | fi | |
3975 | ||
3976 | # We need to process the po/ directory. | |
3977 | POSUB=po | |
3978 | else | |
3979 | DATADIRNAME=share | |
3980 | nls_cv_header_intl=libintl.h | |
3981 | nls_cv_header_libgt=libgettext.h | |
3982 | fi | |
3983 | ||
3984 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
3985 | # because some of the sources are only built for this goal. | |
3986 | if test "$PACKAGE" = gettext; then | |
3987 | USE_NLS=yes | |
3988 | USE_INCLUDED_LIBINTL=yes | |
3989 | fi | |
3990 | ||
3991 | for lang in $ALL_LINGUAS; do | |
3992 | GMOFILES="$GMOFILES $lang.gmo" | |
3993 | POFILES="$POFILES $lang.po" | |
3994 | done | |
3995 | ||
3996 | ||
3997 | ||
3998 | ||
3999 | ||
4000 | ||
4001 | ||
4002 | ||
4003 | ||
4004 | ||
4005 | ||
4006 | ||
4007 | ||
4008 | ||
4009 | if test "x$CATOBJEXT" != "x"; then | |
4010 | if test "x$ALL_LINGUAS" = "x"; then | |
4011 | LINGUAS= | |
4012 | else | |
4013 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
3a6ae616 | 4014 | echo "configure:4015: checking for catalogs to be installed" >&5 |
252b5132 RH |
4015 | NEW_LINGUAS= |
4016 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
4017 | case "$ALL_LINGUAS" in | |
4018 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
4019 | esac | |
4020 | done | |
4021 | LINGUAS=$NEW_LINGUAS | |
4022 | echo "$ac_t""$LINGUAS" 1>&6 | |
4023 | fi | |
4024 | ||
4025 | if test -n "$LINGUAS"; then | |
4026 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
4027 | fi | |
4028 | fi | |
4029 | ||
4030 | if test $ac_cv_header_locale_h = yes; then | |
4031 | INCLUDE_LOCALE_H="#include <locale.h>" | |
4032 | else | |
4033 | INCLUDE_LOCALE_H="\ | |
4034 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
4035 | fi | |
4036 | ||
4037 | ||
4038 | if test -f $srcdir/po2tbl.sed.in; then | |
4039 | if test "$CATOBJEXT" = ".cat"; then | |
4040 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
4041 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
3a6ae616 | 4042 | echo "configure:4043: checking for linux/version.h" >&5 |
252b5132 RH |
4043 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4044 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4045 | else | |
4046 | cat > conftest.$ac_ext <<EOF | |
3a6ae616 | 4047 | #line 4048 "configure" |
252b5132 RH |
4048 | #include "confdefs.h" |
4049 | #include <linux/version.h> | |
4050 | EOF | |
4051 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3a6ae616 | 4052 | { (eval echo configure:4053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
252b5132 RH |
4053 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4054 | if test -z "$ac_err"; then | |
4055 | rm -rf conftest* | |
4056 | eval "ac_cv_header_$ac_safe=yes" | |
4057 | else | |
4058 | echo "$ac_err" >&5 | |
4059 | echo "configure: failed program was:" >&5 | |
4060 | cat conftest.$ac_ext >&5 | |
4061 | rm -rf conftest* | |
4062 | eval "ac_cv_header_$ac_safe=no" | |
4063 | fi | |
4064 | rm -f conftest* | |
4065 | fi | |
4066 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4067 | echo "$ac_t""yes" 1>&6 | |
4068 | msgformat=linux | |
4069 | else | |
4070 | echo "$ac_t""no" 1>&6 | |
4071 | msgformat=xopen | |
4072 | fi | |
4073 | ||
4074 | ||
4075 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed | |
4076 | fi | |
4077 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
4078 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
4079 | fi | |
4080 | ||
4081 | if test "$PACKAGE" = "gettext"; then | |
4082 | GT_NO="#NO#" | |
4083 | GT_YES= | |
4084 | else | |
4085 | GT_NO= | |
4086 | GT_YES="#YES#" | |
4087 | fi | |
4088 | ||
4089 | ||
4090 | ||
4091 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
4092 | ||
4093 | ||
4094 | l= | |
4095 | ||
4096 | ||
4097 | if test -d $srcdir/po; then | |
4098 | test -d po || mkdir po | |
4099 | if test "x$srcdir" != "x."; then | |
4100 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
4101 | posrcprefix="$srcdir/" | |
4102 | else | |
4103 | posrcprefix="../$srcdir/" | |
4104 | fi | |
4105 | else | |
4106 | posrcprefix="../" | |
4107 | fi | |
4108 | rm -f po/POTFILES | |
4109 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
4110 | < $srcdir/po/POTFILES.in > po/POTFILES | |
4111 | fi | |
4112 | ||
4113 | ||
4114 | # Permit host specific settings. | |
4115 | . ${srcdir}/configure.host | |
4116 | ||
4117 | ||
4118 | # Find a good install program. We prefer a C program (faster), | |
4119 | # so one script is as good as another. But avoid the broken or | |
4120 | # incompatible versions: | |
4121 | # SysV /etc/install, /usr/sbin/install | |
4122 | # SunOS /usr/etc/install | |
4123 | # IRIX /sbin/install | |
4124 | # AIX /bin/install | |
4125 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
4126 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
4127 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
4128 | # ./install, which can be erroneously created by make from ./install.sh. | |
4129 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
3a6ae616 | 4130 | echo "configure:4131: checking for a BSD compatible install" >&5 |
252b5132 RH |
4131 | if test -z "$INSTALL"; then |
4132 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
4133 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4134 | else | |
4135 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
4136 | for ac_dir in $PATH; do | |
4137 | # Account for people who put trailing slashes in PATH elements. | |
4138 | case "$ac_dir/" in | |
4139 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
4140 | *) | |
4141 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
4142 | # Don't use installbsd from OSF since it installs stuff as root | |
4143 | # by default. | |
4144 | for ac_prog in ginstall scoinst install; do | |
4145 | if test -f $ac_dir/$ac_prog; then | |
4146 | if test $ac_prog = install && | |
4147 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
4148 | # AIX install. It has an incompatible calling convention. | |
4149 | : | |
4150 | else | |
4151 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
4152 | break 2 | |
4153 | fi | |
4154 | fi | |
4155 | done | |
4156 | ;; | |
4157 | esac | |
4158 | done | |
4159 | IFS="$ac_save_IFS" | |
4160 | ||
4161 | fi | |
4162 | if test "${ac_cv_path_install+set}" = set; then | |
4163 | INSTALL="$ac_cv_path_install" | |
4164 | else | |
4165 | # As a last resort, use the slow shell script. We don't cache a | |
4166 | # path for INSTALL within a source directory, because that will | |
4167 | # break other packages using the cache if that directory is | |
4168 | # removed, or if the path is relative. | |
4169 | INSTALL="$ac_install_sh" | |
4170 | fi | |
4171 | fi | |
4172 | echo "$ac_t""$INSTALL" 1>&6 | |
4173 | ||
4174 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
4175 | # It thinks the first close brace ends the variable substitution. | |
4176 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
4177 | ||
4178 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
4179 | ||
4180 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
4181 | ||
4182 | ||
4183 | BFD_HOST_64BIT_LONG=0 | |
4184 | BFD_HOST_64_BIT_DEFINED=0 | |
4185 | BFD_HOST_64_BIT= | |
4186 | BFD_HOST_U_64_BIT= | |
4187 | if test "x${HOST_64BIT_TYPE}" = "xlong"; then | |
4188 | BFD_HOST_64BIT_LONG=1 | |
4189 | elif test "x${HOST_64BIT_TYPE}" != "x"; then | |
4190 | BFD_HOST_64_BIT_DEFINED=1 | |
4191 | BFD_HOST_64_BIT=${HOST_64BIT_TYPE} | |
4192 | BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE} | |
4193 | fi | |
4194 | ||
4195 | ||
4196 | ||
4197 | ||
4198 | ||
4199 | # Put a plausible default for CC_FOR_BUILD in Makefile. | |
4200 | if test -z "$CC_FOR_BUILD"; then | |
4201 | if test "x$cross_compiling" = "xno"; then | |
4202 | CC_FOR_BUILD='$(CC)' | |
4203 | else | |
4204 | CC_FOR_BUILD=gcc | |
4205 | fi | |
4206 | fi | |
4207 | ||
4208 | # Also set EXEEXT_FOR_BUILD. | |
4209 | if test "x$cross_compiling" = "xno"; then | |
4210 | EXEEXT_FOR_BUILD='$(EXEEXT)' | |
4211 | else | |
4212 | echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6 | |
3a6ae616 | 4213 | echo "configure:4214: checking for build system executable suffix" >&5 |
252b5132 RH |
4214 | if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then |
4215 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4216 | else | |
aab08431 ILT |
4217 | rm -f conftest* |
4218 | echo 'int main () { return 0; }' > conftest.c | |
4219 | bfd_cv_build_exeext= | |
4220 | ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5 | |
4221 | for file in conftest.*; do | |
4222 | case $file in | |
4223 | *.c | *.o | *.obj | *.ilk | *.pdb) ;; | |
4224 | *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;; | |
4225 | esac | |
4226 | done | |
4227 | rm -f conftest* | |
4228 | test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no | |
252b5132 RH |
4229 | fi |
4230 | ||
4231 | echo "$ac_t""$bfd_cv_build_exeext" 1>&6 | |
4232 | EXEEXT_FOR_BUILD="" | |
4233 | test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext} | |
4234 | fi | |
4235 | ||
4236 | ||
4237 | for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h | |
4238 | do | |
4239 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4240 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
aab08431 | 4241 | echo "configure:4242: checking for $ac_hdr" >&5 |
252b5132 RH |
4242 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4243 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4244 | else | |
4245 | cat > conftest.$ac_ext <<EOF | |
aab08431 | 4246 | #line 4247 "configure" |
252b5132 RH |
4247 | #include "confdefs.h" |
4248 | #include <$ac_hdr> | |
4249 | EOF | |
4250 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
aab08431 | 4251 | { (eval echo configure:4252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
252b5132 RH |
4252 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4253 | if test -z "$ac_err"; then | |
4254 | rm -rf conftest* | |
4255 | eval "ac_cv_header_$ac_safe=yes" | |
4256 | else | |
4257 | echo "$ac_err" >&5 | |
4258 | echo "configure: failed program was:" >&5 | |
4259 | cat conftest.$ac_ext >&5 | |
4260 | rm -rf conftest* | |
4261 | eval "ac_cv_header_$ac_safe=no" | |
4262 | fi | |
4263 | rm -f conftest* | |
4264 | fi | |
4265 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4266 | echo "$ac_t""yes" 1>&6 | |
4267 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4268 | cat >> confdefs.h <<EOF | |
4269 | #define $ac_tr_hdr 1 | |
4270 | EOF | |
4271 | ||
4272 | else | |
4273 | echo "$ac_t""no" 1>&6 | |
4274 | fi | |
4275 | done | |
4276 | ||
4277 | for ac_hdr in fcntl.h sys/file.h sys/time.h | |
4278 | do | |
4279 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4280 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
aab08431 | 4281 | echo "configure:4282: checking for $ac_hdr" >&5 |
252b5132 RH |
4282 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4283 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4284 | else | |
4285 | cat > conftest.$ac_ext <<EOF | |
aab08431 | 4286 | #line 4287 "configure" |
252b5132 RH |
4287 | #include "confdefs.h" |
4288 | #include <$ac_hdr> | |
4289 | EOF | |
4290 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
aab08431 | 4291 | { (eval echo configure:4292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
252b5132 RH |
4292 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4293 | if test -z "$ac_err"; then | |
4294 | rm -rf conftest* | |
4295 | eval "ac_cv_header_$ac_safe=yes" | |
4296 | else | |
4297 | echo "$ac_err" >&5 | |
4298 | echo "configure: failed program was:" >&5 | |
4299 | cat conftest.$ac_ext >&5 | |
4300 | rm -rf conftest* | |
4301 | eval "ac_cv_header_$ac_safe=no" | |
4302 | fi | |
4303 | rm -f conftest* | |
4304 | fi | |
4305 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4306 | echo "$ac_t""yes" 1>&6 | |
4307 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4308 | cat >> confdefs.h <<EOF | |
4309 | #define $ac_tr_hdr 1 | |
4310 | EOF | |
4311 | ||
4312 | else | |
4313 | echo "$ac_t""no" 1>&6 | |
4314 | fi | |
4315 | done | |
4316 | ||
4317 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 | |
aab08431 | 4318 | echo "configure:4319: checking whether time.h and sys/time.h may both be included" >&5 |
252b5132 RH |
4319 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
4320 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4321 | else | |
4322 | cat > conftest.$ac_ext <<EOF | |
aab08431 | 4323 | #line 4324 "configure" |
252b5132 RH |
4324 | #include "confdefs.h" |
4325 | #include <sys/types.h> | |
4326 | #include <sys/time.h> | |
4327 | #include <time.h> | |
4328 | int main() { | |
4329 | struct tm *tp; | |
4330 | ; return 0; } | |
4331 | EOF | |
aab08431 | 4332 | if { (eval echo configure:4333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
252b5132 RH |
4333 | rm -rf conftest* |
4334 | ac_cv_header_time=yes | |
4335 | else | |
4336 | echo "configure: failed program was:" >&5 | |
4337 | cat conftest.$ac_ext >&5 | |
4338 | rm -rf conftest* | |
4339 | ac_cv_header_time=no | |
4340 | fi | |
4341 | rm -f conftest* | |
4342 | fi | |
4343 | ||
4344 | echo "$ac_t""$ac_cv_header_time" 1>&6 | |
4345 | if test $ac_cv_header_time = yes; then | |
4346 | cat >> confdefs.h <<\EOF | |
4347 | #define TIME_WITH_SYS_TIME 1 | |
4348 | EOF | |
4349 | ||
4350 | fi | |
4351 | ||
4352 | ac_header_dirent=no | |
4353 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h | |
4354 | do | |
4355 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4356 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 | |
aab08431 | 4357 | echo "configure:4358: checking for $ac_hdr that defines DIR" >&5 |
252b5132 RH |
4358 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
4359 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4360 | else | |
4361 | cat > conftest.$ac_ext <<EOF | |
aab08431 | 4362 | #line 4363 "configure" |
252b5132 RH |
4363 | #include "confdefs.h" |
4364 | #include <sys/types.h> | |
4365 | #include <$ac_hdr> | |
4366 | int main() { | |
4367 | DIR *dirp = 0; | |
4368 | ; return 0; } | |
4369 | EOF | |
aab08431 | 4370 | if { (eval echo configure:4371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
252b5132 RH |
4371 | rm -rf conftest* |
4372 | eval "ac_cv_header_dirent_$ac_safe=yes" | |
4373 | else | |
4374 | echo "configure: failed program was:" >&5 | |
4375 | cat conftest.$ac_ext >&5 | |
4376 | rm -rf conftest* | |
4377 | eval "ac_cv_header_dirent_$ac_safe=no" | |
4378 | fi | |
4379 | rm -f conftest* | |
4380 | fi | |
4381 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then | |
4382 | echo "$ac_t""yes" 1>&6 | |
4383 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4384 | cat >> confdefs.h <<EOF | |
4385 | #define $ac_tr_hdr 1 | |
4386 | EOF | |
4387 | ac_header_dirent=$ac_hdr; break | |
4388 | else | |
4389 | echo "$ac_t""no" 1>&6 | |
4390 | fi | |
4391 | done | |
4392 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
4393 | if test $ac_header_dirent = dirent.h; then | |
4394 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 | |
aab08431 | 4395 | echo "configure:4396: checking for opendir in -ldir" >&5 |
252b5132 RH |
4396 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
4397 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4398 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4399 | else | |
4400 | ac_save_LIBS="$LIBS" | |
4401 | LIBS="-ldir $LIBS" | |
4402 | cat > conftest.$ac_ext <<EOF | |
aab08431 | 4403 | #line 4404 "configure" |
252b5132 RH |
4404 | #include "confdefs.h" |
4405 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4406 | /* We use char because int might match the return type of a gcc2 | |
4407 | builtin and then its argument prototype would still apply. */ | |
4408 | char opendir(); | |
4409 | ||
4410 | int main() { | |
4411 | opendir() | |
4412 | ; return 0; } | |
4413 | EOF | |
aab08431 | 4414 | if { (eval echo configure:4415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
4415 | rm -rf conftest* |
4416 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4417 | else | |
4418 | echo "configure: failed program was:" >&5 | |
4419 | cat conftest.$ac_ext >&5 | |
4420 | rm -rf conftest* | |
4421 | eval "ac_cv_lib_$ac_lib_var=no" | |
4422 | fi | |
4423 | rm -f conftest* | |
4424 | LIBS="$ac_save_LIBS" | |
4425 | ||
4426 | fi | |
4427 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4428 | echo "$ac_t""yes" 1>&6 | |
4429 | LIBS="$LIBS -ldir" | |
4430 | else | |
4431 | echo "$ac_t""no" 1>&6 | |
4432 | fi | |
4433 | ||
4434 | else | |
4435 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 | |
aab08431 | 4436 | echo "configure:4437: checking for opendir in -lx" >&5 |
252b5132 RH |
4437 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
4438 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4439 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4440 | else | |
4441 | ac_save_LIBS="$LIBS" | |
4442 | LIBS="-lx $LIBS" | |
4443 | cat > conftest.$ac_ext <<EOF | |
aab08431 | 4444 | #line 4445 "configure" |
252b5132 RH |
4445 | #include "confdefs.h" |
4446 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4447 | /* We use char because int might match the return type of a gcc2 | |
4448 | builtin and then its argument prototype would still apply. */ | |
4449 | char opendir(); | |
4450 | ||
4451 | int main() { | |
4452 | opendir() | |
4453 | ; return 0; } | |
4454 | EOF | |
aab08431 | 4455 | if { (eval echo configure:4456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
4456 | rm -rf conftest* |
4457 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4458 | else | |
4459 | echo "configure: failed program was:" >&5 | |
4460 | cat conftest.$ac_ext >&5 | |
4461 | rm -rf conftest* | |
4462 | eval "ac_cv_lib_$ac_lib_var=no" | |
4463 | fi | |
4464 | rm -f conftest* | |
4465 | LIBS="$ac_save_LIBS" | |
4466 | ||
4467 | fi | |
4468 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4469 | echo "$ac_t""yes" 1>&6 | |
4470 | LIBS="$LIBS -lx" | |
4471 | else | |
4472 | echo "$ac_t""no" 1>&6 | |
4473 | fi | |
4474 | ||
4475 | fi | |
4476 | ||
633fd09f | 4477 | for ac_func in fcntl getpagesize setitimer sysconf fdopen getuid getgid |
252b5132 RH |
4478 | do |
4479 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
aab08431 | 4480 | echo "configure:4481: checking for $ac_func" >&5 |
252b5132 RH |
4481 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
4482 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4483 | else | |
4484 | cat > conftest.$ac_ext <<EOF | |
aab08431 | 4485 | #line 4486 "configure" |
252b5132 RH |
4486 | #include "confdefs.h" |
4487 | /* System header to define __stub macros and hopefully few prototypes, | |
4488 | which can conflict with char $ac_func(); below. */ | |
4489 | #include <assert.h> | |
4490 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4491 | /* We use char because int might match the return type of a gcc2 | |
4492 | builtin and then its argument prototype would still apply. */ | |
4493 | char $ac_func(); | |
4494 | ||
4495 | int main() { | |
4496 | ||
4497 | /* The GNU C library defines this for functions which it implements | |
4498 | to always fail with ENOSYS. Some functions are actually named | |
4499 | something starting with __ and the normal name is an alias. */ | |
4500 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4501 | choke me | |
4502 | #else | |
4503 | $ac_func(); | |
4504 | #endif | |
4505 | ||
4506 | ; return 0; } | |
4507 | EOF | |
aab08431 | 4508 | if { (eval echo configure:4509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
4509 | rm -rf conftest* |
4510 | eval "ac_cv_func_$ac_func=yes" | |
4511 | else | |
4512 | echo "configure: failed program was:" >&5 | |
4513 | cat conftest.$ac_ext >&5 | |
4514 | rm -rf conftest* | |
4515 | eval "ac_cv_func_$ac_func=no" | |
4516 | fi | |
4517 | rm -f conftest* | |
4518 | fi | |
4519 | ||
4520 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
4521 | echo "$ac_t""yes" 1>&6 | |
4522 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4523 | cat >> confdefs.h <<EOF | |
4524 | #define $ac_tr_func 1 | |
4525 | EOF | |
4526 | ||
4527 | else | |
4528 | echo "$ac_t""no" 1>&6 | |
4529 | fi | |
4530 | done | |
4531 | ||
4532 | ||
4533 | ||
4534 | case "${host}" in | |
855b0be7 | 4535 | *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*) |
252b5132 RH |
4536 | cat >> confdefs.h <<\EOF |
4537 | #define USE_BINARY_FOPEN 1 | |
4538 | EOF | |
4539 | ;; | |
4540 | esac | |
4541 | ||
4542 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 | |
aab08431 | 4543 | echo "configure:4544: checking whether strstr must be declared" >&5 |
252b5132 RH |
4544 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
4545 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4546 | else | |
4547 | cat > conftest.$ac_ext <<EOF | |
aab08431 | 4548 | #line 4549 "configure" |
252b5132 RH |
4549 | #include "confdefs.h" |
4550 | ||
4551 | #include <stdio.h> | |
4552 | #ifdef HAVE_STRING_H | |
4553 | #include <string.h> | |
4554 | #else | |
4555 | #ifdef HAVE_STRINGS_H | |
4556 | #include <strings.h> | |
4557 | #endif | |
4558 | #endif | |
4559 | #ifdef HAVE_STDLIB_H | |
4560 | #include <stdlib.h> | |
4561 | #endif | |
4562 | #ifdef HAVE_UNISTD_H | |
4563 | #include <unistd.h> | |
4564 | #endif | |
4565 | int main() { | |
4566 | char *(*pfn) = (char *(*)) strstr | |
4567 | ; return 0; } | |
4568 | EOF | |
aab08431 | 4569 | if { (eval echo configure:4570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
252b5132 RH |
4570 | rm -rf conftest* |
4571 | bfd_cv_decl_needed_strstr=no | |
4572 | else | |
4573 | echo "configure: failed program was:" >&5 | |
4574 | cat conftest.$ac_ext >&5 | |
4575 | rm -rf conftest* | |
4576 | bfd_cv_decl_needed_strstr=yes | |
4577 | fi | |
4578 | rm -f conftest* | |
4579 | fi | |
4580 | ||
4581 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 | |
4582 | if test $bfd_cv_decl_needed_strstr = yes; then | |
4583 | cat >> confdefs.h <<\EOF | |
4584 | #define NEED_DECLARATION_STRSTR 1 | |
4585 | EOF | |
4586 | ||
4587 | fi | |
4588 | ||
4589 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 | |
aab08431 | 4590 | echo "configure:4591: checking whether malloc must be declared" >&5 |
252b5132 RH |
4591 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
4592 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4593 | else | |
4594 | cat > conftest.$ac_ext <<EOF | |
aab08431 | 4595 | #line 4596 "configure" |
252b5132 RH |
4596 | #include "confdefs.h" |
4597 | ||
4598 | #include <stdio.h> | |
4599 | #ifdef HAVE_STRING_H | |
4600 | #include <string.h> | |
4601 | #else | |
4602 | #ifdef HAVE_STRINGS_H | |
4603 | #include <strings.h> | |
4604 | #endif | |
4605 | #endif | |
4606 | #ifdef HAVE_STDLIB_H | |
4607 | #include <stdlib.h> | |
4608 | #endif | |
4609 | #ifdef HAVE_UNISTD_H | |
4610 | #include <unistd.h> | |
4611 | #endif | |
4612 | int main() { | |
4613 | char *(*pfn) = (char *(*)) malloc | |
4614 | ; return 0; } | |
4615 | EOF | |
aab08431 | 4616 | if { (eval echo configure:4617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
252b5132 RH |
4617 | rm -rf conftest* |
4618 | bfd_cv_decl_needed_malloc=no | |
4619 | else | |
4620 | echo "configure: failed program was:" >&5 | |
4621 | cat conftest.$ac_ext >&5 | |
4622 | rm -rf conftest* | |
4623 | bfd_cv_decl_needed_malloc=yes | |
4624 | fi | |
4625 | rm -f conftest* | |
4626 | fi | |
4627 | ||
4628 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 | |
4629 | if test $bfd_cv_decl_needed_malloc = yes; then | |
4630 | cat >> confdefs.h <<\EOF | |
4631 | #define NEED_DECLARATION_MALLOC 1 | |
4632 | EOF | |
4633 | ||
4634 | fi | |
4635 | ||
4636 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 | |
aab08431 | 4637 | echo "configure:4638: checking whether realloc must be declared" >&5 |
252b5132 RH |
4638 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
4639 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4640 | else | |
4641 | cat > conftest.$ac_ext <<EOF | |
aab08431 | 4642 | #line 4643 "configure" |
252b5132 RH |
4643 | #include "confdefs.h" |
4644 | ||
4645 | #include <stdio.h> | |
4646 | #ifdef HAVE_STRING_H | |
4647 | #include <string.h> | |
4648 | #else | |
4649 | #ifdef HAVE_STRINGS_H | |
4650 | #include <strings.h> | |
4651 | #endif | |
4652 | #endif | |
4653 | #ifdef HAVE_STDLIB_H | |
4654 | #include <stdlib.h> | |
4655 | #endif | |
4656 | #ifdef HAVE_UNISTD_H | |
4657 | #include <unistd.h> | |
4658 | #endif | |
4659 | int main() { | |
4660 | char *(*pfn) = (char *(*)) realloc | |
4661 | ; return 0; } | |
4662 | EOF | |
aab08431 | 4663 | if { (eval echo configure:4664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
252b5132 RH |
4664 | rm -rf conftest* |
4665 | bfd_cv_decl_needed_realloc=no | |
4666 | else | |
4667 | echo "configure: failed program was:" >&5 | |
4668 | cat conftest.$ac_ext >&5 | |
4669 | rm -rf conftest* | |
4670 | bfd_cv_decl_needed_realloc=yes | |
4671 | fi | |
4672 | rm -f conftest* | |
4673 | fi | |
4674 | ||
4675 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 | |
4676 | if test $bfd_cv_decl_needed_realloc = yes; then | |
4677 | cat >> confdefs.h <<\EOF | |
4678 | #define NEED_DECLARATION_REALLOC 1 | |
4679 | EOF | |
4680 | ||
4681 | fi | |
4682 | ||
4683 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 | |
aab08431 | 4684 | echo "configure:4685: checking whether free must be declared" >&5 |
252b5132 RH |
4685 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
4686 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4687 | else | |
4688 | cat > conftest.$ac_ext <<EOF | |
aab08431 | 4689 | #line 4690 "configure" |
252b5132 RH |
4690 | #include "confdefs.h" |
4691 | ||
4692 | #include <stdio.h> | |
4693 | #ifdef HAVE_STRING_H | |
4694 | #include <string.h> | |
4695 | #else | |
4696 | #ifdef HAVE_STRINGS_H | |
4697 | #include <strings.h> | |
4698 | #endif | |
4699 | #endif | |
4700 | #ifdef HAVE_STDLIB_H | |
4701 | #include <stdlib.h> | |
4702 | #endif | |
4703 | #ifdef HAVE_UNISTD_H | |
4704 | #include <unistd.h> | |
4705 | #endif | |
4706 | int main() { | |
4707 | char *(*pfn) = (char *(*)) free | |
4708 | ; return 0; } | |
4709 | EOF | |
aab08431 | 4710 | if { (eval echo configure:4711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
252b5132 RH |
4711 | rm -rf conftest* |
4712 | bfd_cv_decl_needed_free=no | |
4713 | else | |
4714 | echo "configure: failed program was:" >&5 | |
4715 | cat conftest.$ac_ext >&5 | |
4716 | rm -rf conftest* | |
4717 | bfd_cv_decl_needed_free=yes | |
4718 | fi | |
4719 | rm -f conftest* | |
4720 | fi | |
4721 | ||
4722 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 | |
4723 | if test $bfd_cv_decl_needed_free = yes; then | |
4724 | cat >> confdefs.h <<\EOF | |
4725 | #define NEED_DECLARATION_FREE 1 | |
4726 | EOF | |
4727 | ||
4728 | fi | |
4729 | ||
4730 | echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 | |
aab08431 | 4731 | echo "configure:4732: checking whether getenv must be declared" >&5 |
252b5132 RH |
4732 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then |
4733 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4734 | else | |
4735 | cat > conftest.$ac_ext <<EOF | |
aab08431 | 4736 | #line 4737 "configure" |
252b5132 RH |
4737 | #include "confdefs.h" |
4738 | ||
4739 | #include <stdio.h> | |
4740 | #ifdef HAVE_STRING_H | |
4741 | #include <string.h> | |
4742 | #else | |
4743 | #ifdef HAVE_STRINGS_H | |
4744 | #include <strings.h> | |
4745 | #endif | |
4746 | #endif | |
4747 | #ifdef HAVE_STDLIB_H | |
4748 | #include <stdlib.h> | |
4749 | #endif | |
4750 | #ifdef HAVE_UNISTD_H | |
4751 | #include <unistd.h> | |
4752 | #endif | |
4753 | int main() { | |
4754 | char *(*pfn) = (char *(*)) getenv | |
4755 | ; return 0; } | |
4756 | EOF | |
aab08431 | 4757 | if { (eval echo configure:4758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
252b5132 RH |
4758 | rm -rf conftest* |
4759 | bfd_cv_decl_needed_getenv=no | |
4760 | else | |
4761 | echo "configure: failed program was:" >&5 | |
4762 | cat conftest.$ac_ext >&5 | |
4763 | rm -rf conftest* | |
4764 | bfd_cv_decl_needed_getenv=yes | |
4765 | fi | |
4766 | rm -f conftest* | |
4767 | fi | |
4768 | ||
4769 | echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6 | |
4770 | if test $bfd_cv_decl_needed_getenv = yes; then | |
4771 | cat >> confdefs.h <<\EOF | |
4772 | #define NEED_DECLARATION_GETENV 1 | |
4773 | EOF | |
4774 | ||
4775 | fi | |
4776 | ||
4777 | ||
4778 | # If we are configured native, pick a core file support file. | |
4779 | COREFILE= | |
4780 | COREFLAG= | |
4781 | TRAD_HEADER= | |
4782 | if test "${target}" = "${host}"; then | |
4783 | case "${host}" in | |
4784 | alpha*-*-linux-gnu*) | |
4785 | COREFILE=trad-core.lo | |
4786 | TRAD_HEADER='"hosts/alphalinux.h"' | |
4787 | ;; | |
4788 | alpha*-*-netbsd*) COREFILE=netbsd-core.lo ;; | |
4789 | alpha*-*-*) COREFILE=osf-core.lo ;; | |
4790 | arm-*-riscix) COREFILE=trad-core.lo ;; | |
4791 | hppa*-*-hpux*) COREFILE=hpux-core.lo ;; | |
4792 | hppa*-*-hiux*) COREFILE=hpux-core.lo ;; | |
4793 | hppa*-*-mpeix*) COREFILE=hpux-core.lo ;; | |
4794 | hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo" | |
4795 | COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;; | |
4796 | i[3456]86-sequent-bsd*) | |
4797 | COREFILE=trad-core.lo; | |
4798 | TRAD_HEADER='"hosts/symmetry.h"' | |
4799 | ;; | |
4800 | i[3456]86-sequent-sysv4*) ;; | |
4801 | i[3456]86-sequent-sysv*) | |
4802 | COREFILE=trad-core.lo | |
4803 | TRAD_HEADER='"hosts/symmetry.h"' | |
4804 | ;; | |
4805 | i[3456]86-*-bsd* | i[3456]86-*-freebsd*) | |
4806 | COREFILE=trad-core.lo | |
4807 | TRAD_HEADER='"hosts/i386bsd.h"' | |
4808 | ;; | |
4809 | i[3456]86-*-netbsd* | i[3456]86-*-openbsd*) | |
4810 | COREFILE=netbsd-core.lo | |
4811 | ;; | |
4812 | i[3456]86-esix-sysv3*) | |
4813 | COREFILE=trad-core.lo | |
4814 | TRAD_HEADER='"hosts/esix.h"' | |
4815 | ;; | |
4816 | i[3456]86-*-sco3.2v5*) | |
4817 | COREFILE=sco5-core.lo | |
4818 | ;; | |
4819 | i[3456]86-*-sco* | i[3456]86-*-isc*) | |
4820 | COREFILE=trad-core.lo | |
4821 | TRAD_HEADER='"hosts/i386sco.h"' | |
4822 | ;; | |
4823 | i[3456]86-*-mach3*) | |
4824 | COREFILE=trad-core.lo | |
4825 | TRAD_HEADER='"hosts/i386mach3.h"' | |
4826 | ;; | |
4827 | i[3456]86-*-linux-gnu*) | |
4828 | COREFILE=trad-core.lo | |
4829 | TRAD_HEADER='"hosts/i386linux.h"' | |
4830 | ;; | |
4831 | i[3456]86-*-isc*) COREFILE=trad-core.lo ;; | |
4832 | i[3456]86-*-aix*) COREFILE=aix386-core.lo ;; | |
4833 | i860-*-mach3* | i860-*-osf1*) | |
4834 | COREFILE=trad-core.lo | |
4835 | TRAD_HEADER='"hosts/i860mach3.h"' | |
4836 | ;; | |
4837 | mips-dec-bsd*) | |
4838 | COREFILE=trad-core.lo | |
4839 | TRAD_HEADER='"hosts/mipsbsd.h"' | |
4840 | ;; | |
4841 | mips-dec-mach3*) | |
4842 | COREFILE=trad-core.lo | |
4843 | TRAD_HEADER='"hosts/mipsmach3.h"' | |
4844 | ;; | |
4845 | mips-*-netbsd* | mips*-*-openbsd*) | |
4846 | COREFILE=netbsd-core.lo | |
4847 | ;; | |
4848 | mips-dec-*) | |
4849 | COREFILE=trad-core.lo | |
4850 | TRAD_HEADER='"hosts/decstation.h"' | |
4851 | ;; | |
4852 | mips-sgi-irix4*) COREFILE=irix-core.lo ;; | |
4853 | mips-sgi-irix5*) COREFILE=irix-core.lo ;; | |
4854 | mips-sgi-irix6*) COREFILE=irix-core.lo ;; | |
4855 | mips-*-mach3*) | |
4856 | COREFILE=trad-core.lo | |
4857 | TRAD_HEADER='"hosts/mipsmach3.h"' | |
4858 | ;; | |
4859 | mips-*-sysv4*) ;; | |
4860 | mips-*-sysv* | mips-*-riscos*) | |
4861 | COREFILE=trad-core.lo | |
4862 | TRAD_HEADER='"hosts/riscos.h"' | |
4863 | ;; | |
4864 | mips-sony-bsd*) | |
4865 | COREFILE=trad-core.lo | |
4866 | TRAD_HEADER='"hosts/news-mips.h"' | |
4867 | ;; | |
4868 | m68*-bull*-sysv*) | |
4869 | COREFILE=trad-core.lo | |
4870 | TRAD_HEADER='"hosts/dpx2.h"' | |
4871 | ;; | |
4872 | m68*-hp-hpux*) COREFILE=hpux-core.lo ;; | |
4873 | m68*-hp-bsd*) | |
4874 | COREFILE=trad-core.lo | |
4875 | TRAD_HEADER='"hosts/hp300bsd.h"' | |
4876 | ;; | |
4877 | m68*-*-linux-gnu*) | |
4878 | COREFILE=trad-core.lo | |
4879 | TRAD_HEADER='"hosts/m68klinux.h"' | |
4880 | ;; | |
4881 | m68*-motorola-sysv*) | |
4882 | COREFILE=trad-core.lo | |
4883 | TRAD_HEADER='"hosts/delta68.h"' | |
4884 | ;; | |
4885 | m68*-sony-*) | |
4886 | COREFILE=trad-core.lo | |
4887 | TRAD_HEADER='"hosts/news.h"' | |
4888 | ;; | |
4889 | m68*-*-netbsd* | m68*-*-openbsd*) | |
4890 | COREFILE=netbsd-core.lo | |
4891 | ;; | |
4892 | m68*-apple-aux*) | |
4893 | COREFILE=trad-core.lo | |
4894 | TRAD_HEADER='"hosts/m68kaux.h"' | |
4895 | ;; | |
4896 | m88*-*-sysv4*) ;; | |
4897 | m88*-motorola-sysv*) COREFILE=ptrace-core.lo ;; | |
4898 | m88*-*-mach3*) | |
4899 | COREFILE=trad-core.lo | |
4900 | TRAD_HEADER='"hosts/m88kmach3.h"' | |
4901 | ;; | |
4902 | ns32k-pc532-mach) | |
4903 | COREFILE=trad-core.lo | |
4904 | TRAD_HEADER='"hosts/pc532mach.h"' | |
4905 | ;; | |
4906 | ns32k-*-netbsd* | ns32k-*-openbsd*) | |
4907 | COREFILE=netbsd-core.lo | |
4908 | ;; | |
4909 | rs6000-*-lynx*) COREFILE=lynx-core.lo ;; | |
4910 | rs6000-*-aix4*) COREFILE=rs6000-core.lo ;; | |
4911 | rs6000-*-*) COREFILE=rs6000-core.lo ;; | |
4912 | powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;; | |
4913 | powerpc-*-aix4*) COREFILE=rs6000-core.lo ;; | |
4914 | powerpc-*-aix*) COREFILE=rs6000-core.lo ;; | |
4915 | powerpc-*-beos*) ;; | |
4916 | powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;; | |
4917 | sparc-*-netbsd* | sparc-*-openbsd*) | |
4918 | COREFILE=netbsd-core.lo | |
4919 | ;; | |
4920 | tahoe-*-*) | |
4921 | COREFILE=trad-core.lo | |
4922 | TRAD_HEADER='"hosts/tahoe.h"' | |
4923 | ;; | |
4924 | vax-*-ultrix2*) | |
4925 | COREFILE=trad-core.lo | |
4926 | TRAD_HEADER='"hosts/vaxult2.h"' | |
4927 | ;; | |
4928 | vax-*-ultrix*) | |
4929 | COREFILE=trad-core.lo | |
4930 | TRAD_HEADER='"hosts/vaxult2.h"' | |
4931 | ;; | |
4932 | vax-*-*) | |
4933 | COREFILE=trad-core.lo | |
4934 | TRAD_HEADER='"hosts/vaxbsd.h"' | |
4935 | ;; | |
4936 | esac | |
4937 | ||
4938 | case "$COREFILE" in | |
4939 | aix386-core.lo) COREFLAG=-DAIX386_CORE ;; | |
4940 | hppabsd-core.lo) COREFLAG=-DHPPABSD_CORE ;; | |
4941 | hpux-core.lo) COREFLAG=-DHPUX_CORE ;; | |
4942 | irix-core.lo) COREFLAG=-DIRIX_CORE ;; | |
4943 | lynx-core.lo) COREFLAG=-DLYNX_CORE ;; | |
4944 | netbsd-core.lo) COREFLAG=-DNETBSD_CORE ;; | |
4945 | osf-core.lo) COREFLAG=-DOSF_CORE ;; | |
4946 | ptrace-core.lo) COREFLAG=-DPTRACE_CORE ;; | |
4947 | rs6000-core.lo) COREFLAG="$COREFLAG -DAIX_CORE" ;; | |
4948 | sco5-core.lo) COREFLAG="$COREFLAG -DSCO5_CORE" ;; | |
4949 | trad-core.lo) COREFLAG="$COREFLAG -DTRAD_CORE" ;; | |
4950 | esac | |
4951 | ||
4952 | # ELF corefile support has several flavors, but all of | |
4953 | # them use something called <sys/procfs.h> | |
4954 | for ac_hdr in sys/procfs.h | |
4955 | do | |
4956 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4957 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
aab08431 | 4958 | echo "configure:4959: checking for $ac_hdr" >&5 |
252b5132 RH |
4959 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4960 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4961 | else | |
4962 | cat > conftest.$ac_ext <<EOF | |
aab08431 | 4963 | #line 4964 "configure" |
252b5132 RH |
4964 | #include "confdefs.h" |
4965 | #include <$ac_hdr> | |
4966 | EOF | |
4967 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
aab08431 | 4968 | { (eval echo configure:4969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
252b5132 RH |
4969 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4970 | if test -z "$ac_err"; then | |
4971 | rm -rf conftest* | |
4972 | eval "ac_cv_header_$ac_safe=yes" | |
4973 | else | |
4974 | echo "$ac_err" >&5 | |
4975 | echo "configure: failed program was:" >&5 | |
4976 | cat conftest.$ac_ext >&5 | |
4977 | rm -rf conftest* | |
4978 | eval "ac_cv_header_$ac_safe=no" | |
4979 | fi | |
4980 | rm -f conftest* | |
4981 | fi | |
4982 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4983 | echo "$ac_t""yes" 1>&6 | |
4984 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4985 | cat >> confdefs.h <<EOF | |
4986 | #define $ac_tr_hdr 1 | |
4987 | EOF | |
4988 | ||
4989 | else | |
4990 | echo "$ac_t""no" 1>&6 | |
4991 | fi | |
4992 | done | |
4993 | ||
4994 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
4995 | echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
aab08431 | 4996 | echo "configure:4997: checking for prstatus_t in sys/procfs.h" >&5 |
252b5132 RH |
4997 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus_t'+set}'`\" = set"; then |
4998 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4999 | else | |
5000 | cat > conftest.$ac_ext <<EOF | |
aab08431 | 5001 | #line 5002 "configure" |
252b5132 RH |
5002 | #include "confdefs.h" |
5003 | #include <sys/procfs.h> | |
5004 | int main() { | |
5005 | prstatus_t avar | |
5006 | ; return 0; } | |
5007 | EOF | |
aab08431 | 5008 | if { (eval echo configure:5009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
252b5132 RH |
5009 | rm -rf conftest* |
5010 | bfd_cv_have_sys_procfs_type_prstatus_t=yes | |
5011 | else | |
5012 | echo "configure: failed program was:" >&5 | |
5013 | cat conftest.$ac_ext >&5 | |
5014 | rm -rf conftest* | |
5015 | bfd_cv_have_sys_procfs_type_prstatus_t=no | |
5016 | ||
5017 | fi | |
5018 | rm -f conftest* | |
5019 | fi | |
5020 | ||
5021 | if test $bfd_cv_have_sys_procfs_type_prstatus_t = yes; then | |
5022 | cat >> confdefs.h <<\EOF | |
5023 | #define HAVE_PRSTATUS_T 1 | |
5024 | EOF | |
5025 | ||
5026 | fi | |
5027 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6 | |
5028 | ||
5029 | echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6 | |
aab08431 | 5030 | echo "configure:5031: checking for prstatus_t.pr_who in sys/procfs.h" >&5 |
252b5132 RH |
5031 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then |
5032 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5033 | else | |
5034 | cat > conftest.$ac_ext <<EOF | |
aab08431 | 5035 | #line 5036 "configure" |
252b5132 RH |
5036 | #include "confdefs.h" |
5037 | #include <sys/procfs.h> | |
5038 | int main() { | |
5039 | prstatus_t avar; void* aref = (void*) &avar.pr_who | |
5040 | ; return 0; } | |
5041 | EOF | |
aab08431 | 5042 | if { (eval echo configure:5043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
252b5132 RH |
5043 | rm -rf conftest* |
5044 | bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes | |
5045 | else | |
5046 | echo "configure: failed program was:" >&5 | |
5047 | cat conftest.$ac_ext >&5 | |
5048 | rm -rf conftest* | |
5049 | bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=no | |
5050 | ||
5051 | fi | |
5052 | rm -f conftest* | |
5053 | fi | |
5054 | ||
5055 | if test $bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who = yes; then | |
5056 | cat >> confdefs.h <<\EOF | |
5057 | #define HAVE_PRSTATUS_T_PR_WHO 1 | |
5058 | EOF | |
5059 | ||
5060 | fi | |
5061 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6 | |
5062 | ||
5063 | echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
aab08431 | 5064 | echo "configure:5065: checking for pstatus_t in sys/procfs.h" >&5 |
252b5132 RH |
5065 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then |
5066 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5067 | else | |
5068 | cat > conftest.$ac_ext <<EOF | |
aab08431 | 5069 | #line 5070 "configure" |
252b5132 RH |
5070 | #include "confdefs.h" |
5071 | #include <sys/procfs.h> | |
5072 | int main() { | |
5073 | pstatus_t avar | |
5074 | ; return 0; } | |
5075 | EOF | |
aab08431 | 5076 | if { (eval echo configure:5077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
252b5132 RH |
5077 | rm -rf conftest* |
5078 | bfd_cv_have_sys_procfs_type_pstatus_t=yes | |
5079 | else | |
5080 | echo "configure: failed program was:" >&5 | |
5081 | cat conftest.$ac_ext >&5 | |
5082 | rm -rf conftest* | |
5083 | bfd_cv_have_sys_procfs_type_pstatus_t=no | |
5084 | ||
5085 | fi | |
5086 | rm -f conftest* | |
5087 | fi | |
5088 | ||
5089 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then | |
5090 | cat >> confdefs.h <<\EOF | |
5091 | #define HAVE_PSTATUS_T 1 | |
5092 | EOF | |
5093 | ||
5094 | fi | |
5095 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 | |
5096 | ||
5097 | echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6 | |
aab08431 | 5098 | echo "configure:5099: checking for prpsinfo_t in sys/procfs.h" >&5 |
252b5132 RH |
5099 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then |
5100 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5101 | else | |
5102 | cat > conftest.$ac_ext <<EOF | |
aab08431 | 5103 | #line 5104 "configure" |
252b5132 RH |
5104 | #include "confdefs.h" |
5105 | #include <sys/procfs.h> | |
5106 | int main() { | |
5107 | prpsinfo_t avar | |
5108 | ; return 0; } | |
5109 | EOF | |
aab08431 | 5110 | if { (eval echo configure:5111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
252b5132 RH |
5111 | rm -rf conftest* |
5112 | bfd_cv_have_sys_procfs_type_prpsinfo_t=yes | |
5113 | else | |
5114 | echo "configure: failed program was:" >&5 | |
5115 | cat conftest.$ac_ext >&5 | |
5116 | rm -rf conftest* | |
5117 | bfd_cv_have_sys_procfs_type_prpsinfo_t=no | |
5118 | ||
5119 | fi | |
5120 | rm -f conftest* | |
5121 | fi | |
5122 | ||
5123 | if test $bfd_cv_have_sys_procfs_type_prpsinfo_t = yes; then | |
5124 | cat >> confdefs.h <<\EOF | |
5125 | #define HAVE_PRPSINFO_T 1 | |
5126 | EOF | |
5127 | ||
5128 | fi | |
5129 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6 | |
5130 | ||
5131 | echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6 | |
aab08431 | 5132 | echo "configure:5133: checking for psinfo_t in sys/procfs.h" >&5 |
252b5132 RH |
5133 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then |
5134 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5135 | else | |
5136 | cat > conftest.$ac_ext <<EOF | |
aab08431 | 5137 | #line 5138 "configure" |
252b5132 RH |
5138 | #include "confdefs.h" |
5139 | #include <sys/procfs.h> | |
5140 | int main() { | |
5141 | psinfo_t avar | |
5142 | ; return 0; } | |
5143 | EOF | |
aab08431 | 5144 | if { (eval echo configure:5145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
252b5132 RH |
5145 | rm -rf conftest* |
5146 | bfd_cv_have_sys_procfs_type_psinfo_t=yes | |
5147 | else | |
5148 | echo "configure: failed program was:" >&5 | |
5149 | cat conftest.$ac_ext >&5 | |
5150 | rm -rf conftest* | |
5151 | bfd_cv_have_sys_procfs_type_psinfo_t=no | |
5152 | ||
5153 | fi | |
5154 | rm -f conftest* | |
5155 | fi | |
5156 | ||
5157 | if test $bfd_cv_have_sys_procfs_type_psinfo_t = yes; then | |
5158 | cat >> confdefs.h <<\EOF | |
5159 | #define HAVE_PSINFO_T 1 | |
5160 | EOF | |
5161 | ||
5162 | fi | |
5163 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6 | |
5164 | ||
5165 | echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6 | |
aab08431 | 5166 | echo "configure:5167: checking for lwpstatus_t in sys/procfs.h" >&5 |
252b5132 RH |
5167 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then |
5168 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5169 | else | |
5170 | cat > conftest.$ac_ext <<EOF | |
aab08431 | 5171 | #line 5172 "configure" |
252b5132 RH |
5172 | #include "confdefs.h" |
5173 | #include <sys/procfs.h> | |
5174 | int main() { | |
5175 | lwpstatus_t avar | |
5176 | ; return 0; } | |
5177 | EOF | |
aab08431 | 5178 | if { (eval echo configure:5179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
252b5132 RH |
5179 | rm -rf conftest* |
5180 | bfd_cv_have_sys_procfs_type_lwpstatus_t=yes | |
5181 | else | |
5182 | echo "configure: failed program was:" >&5 | |
5183 | cat conftest.$ac_ext >&5 | |
5184 | rm -rf conftest* | |
5185 | bfd_cv_have_sys_procfs_type_lwpstatus_t=no | |
5186 | ||
5187 | fi | |
5188 | rm -f conftest* | |
5189 | fi | |
5190 | ||
5191 | if test $bfd_cv_have_sys_procfs_type_lwpstatus_t = yes; then | |
5192 | cat >> confdefs.h <<\EOF | |
5193 | #define HAVE_LWPSTATUS_T 1 | |
5194 | EOF | |
5195 | ||
5196 | fi | |
5197 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6 | |
5198 | ||
5199 | echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6 | |
aab08431 | 5200 | echo "configure:5201: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5 |
252b5132 RH |
5201 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then |
5202 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5203 | else | |
5204 | cat > conftest.$ac_ext <<EOF | |
aab08431 | 5205 | #line 5206 "configure" |
252b5132 RH |
5206 | #include "confdefs.h" |
5207 | #include <sys/procfs.h> | |
5208 | int main() { | |
5209 | lwpstatus_t avar; void* aref = (void*) &avar.pr_context | |
5210 | ; return 0; } | |
5211 | EOF | |
aab08431 | 5212 | if { (eval echo configure:5213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
252b5132 RH |
5213 | rm -rf conftest* |
5214 | bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes | |
5215 | else | |
5216 | echo "configure: failed program was:" >&5 | |
5217 | cat conftest.$ac_ext >&5 | |
5218 | rm -rf conftest* | |
5219 | bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=no | |
5220 | ||
5221 | fi | |
5222 | rm -f conftest* | |
5223 | fi | |
5224 | ||
5225 | if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context = yes; then | |
5226 | cat >> confdefs.h <<\EOF | |
5227 | #define HAVE_LWPSTATUS_T_PR_CONTEXT 1 | |
5228 | EOF | |
5229 | ||
5230 | fi | |
5231 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6 | |
5232 | ||
5233 | echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6 | |
aab08431 | 5234 | echo "configure:5235: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5 |
252b5132 RH |
5235 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then |
5236 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5237 | else | |
5238 | cat > conftest.$ac_ext <<EOF | |
aab08431 | 5239 | #line 5240 "configure" |
252b5132 RH |
5240 | #include "confdefs.h" |
5241 | #include <sys/procfs.h> | |
5242 | int main() { | |
5243 | lwpstatus_t avar; void* aref = (void*) &avar.pr_reg | |
5244 | ; return 0; } | |
5245 | EOF | |
aab08431 | 5246 | if { (eval echo configure:5247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
252b5132 RH |
5247 | rm -rf conftest* |
5248 | bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes | |
5249 | else | |
5250 | echo "configure: failed program was:" >&5 | |
5251 | cat conftest.$ac_ext >&5 | |
5252 | rm -rf conftest* | |
5253 | bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=no | |
5254 | ||
5255 | fi | |
5256 | rm -f conftest* | |
5257 | fi | |
5258 | ||
5259 | if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg = yes; then | |
5260 | cat >> confdefs.h <<\EOF | |
5261 | #define HAVE_LWPSTATUS_T_PR_REG 1 | |
5262 | EOF | |
5263 | ||
5264 | fi | |
5265 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6 | |
5266 | ||
5267 | fi | |
5268 | fi | |
5269 | ||
5270 | ||
5271 | cat >> confdefs.h <<EOF | |
5272 | #define TRAD_HEADER $TRAD_HEADER | |
5273 | EOF | |
5274 | ||
5275 | ||
5276 | # Horrible hacks to build DLLs on Windows. | |
5277 | WIN32LDFLAGS= | |
5278 | WIN32LIBADD= | |
5279 | case "${host}" in | |
5280 | *-*-cygwin*) | |
5281 | if test "$enable_shared" = "yes"; then | |
5282 | WIN32LDFLAGS="-no-undefined" | |
5283 | WIN32LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32" | |
5284 | fi | |
5285 | ;; | |
5286 | esac | |
5287 | ||
5288 | ||
5289 | ||
5290 | # target stuff: | |
5291 | ||
5292 | # Canonicalize the secondary target names. | |
5293 | if test -n "$enable_targets" ; then | |
5294 | for targ in `echo $enable_targets | sed 's/,/ /g'` | |
5295 | do | |
6d83c84b | 5296 | result=`$ac_config_sub $targ 2>/dev/null` |
252b5132 RH |
5297 | if test -n "$result" ; then |
5298 | canon_targets="$canon_targets $result" | |
5299 | else | |
5300 | # Allow targets that config.sub doesn't recognize, like "all". | |
5301 | canon_targets="$canon_targets $targ" | |
5302 | fi | |
5303 | done | |
5304 | fi | |
5305 | ||
5306 | all_targets=false | |
5307 | defvec= | |
5308 | selvecs= | |
5309 | selarchs= | |
5310 | TDEFINES= | |
5311 | for targ in $target $canon_targets | |
5312 | do | |
5313 | if test "x$targ" = "xall"; then | |
5314 | all_targets=true | |
5315 | else | |
5316 | . $srcdir/config.bfd | |
5317 | if test "x$targ" = "x$target"; then | |
5318 | defvec=$targ_defvec | |
5319 | fi | |
5320 | selvecs="$selvecs $targ_defvec $targ_selvecs" | |
5321 | selarchs="$selarchs $targ_archs" | |
5322 | TDEFINES="$TDEFINES $targ_cflags" | |
5323 | fi | |
5324 | done | |
5325 | ||
5326 | ||
5327 | # This processing still needs to be done if we're to decide properly whether | |
5328 | # 64-bit support needs to be compiled in. Currently, it will be included if | |
5329 | # the default or any other explicitly requested target requires it; it | |
5330 | # will not be included on a 32-bit host if no 64-bit target is requested, and | |
9eb7245e | 5331 | # no "--with-64-bit-bfd" option is given, even if "--enable-targets=all" is |
252b5132 RH |
5332 | # used. |
5333 | ||
5334 | # uniq the default and selected vectors in all the configured targets. | |
5335 | f="" | |
5336 | for i in $selvecs ; do | |
5337 | case " $f " in | |
5338 | *" $i "*) ;; | |
5339 | *) f="$f $i" ;; | |
5340 | esac | |
5341 | done | |
5342 | selvecs="$f" | |
5343 | ||
5344 | ||
5345 | # uniq the architectures in all the configured targets. | |
5346 | f="" | |
5347 | for i in $selarchs ; do | |
5348 | case " $f " in | |
5349 | *" $i "*) ;; | |
5350 | *) f="$f $i" ;; | |
5351 | esac | |
5352 | done | |
5353 | selarchs="$f" | |
5354 | ||
5355 | # Target backend .o files. | |
5356 | tb= | |
5357 | ||
5358 | elf="elf.lo elflink.lo dwarf2.lo dwarf1.lo" | |
5359 | ||
5360 | for vec in $selvecs | |
5361 | do | |
5362 | case "$vec" in | |
5363 | # This list is alphabetized to make it easy to compare | |
5364 | # with the two vector lists in targets.c. | |
5365 | a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;; | |
5366 | a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;; | |
5367 | armcoff_little_vec) tb="$tb coff-arm.lo cofflink.lo " ;; | |
5368 | armcoff_big_vec) tb="$tb coff-arm.lo cofflink.lo " ;; | |
021e3cc0 | 5369 | armnetbsd_vec) tb="$tb armnetbsd.lo aout32.lo" ;; |
277d1b5e ILT |
5370 | armpe_little_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;; |
5371 | armpe_big_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;; | |
5372 | armpei_little_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;; | |
5373 | armpei_big_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;; | |
5374 | arm_epoc_pe_little_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;; | |
5375 | arm_epoc_pe_big_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;; | |
5376 | arm_epoc_pei_little_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;; | |
5377 | arm_epoc_pei_big_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;; | |
252b5132 RH |
5378 | aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;; |
5379 | aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;; | |
5380 | aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;; | |
5381 | aout_mips_big_vec) tb="$tb mipsbsd.lo aout32.lo" ;; | |
5382 | aout_mips_little_vec) tb="$tb mipsbsd.lo aout32.lo" ;; | |
5383 | apollocoff_vec) tb="$tb coff-apollo.lo" ;; | |
5384 | b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;; | |
5385 | b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;; | |
5386 | bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf" | |
5387 | target64=true ;; | |
5388 | bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;; | |
5389 | bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;; | |
5390 | bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;; | |
5391 | bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;; | |
5392 | bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;; | |
5393 | bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;; | |
5394 | bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;; | |
5395 | bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;; | |
5396 | bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo" | |
5397 | target64=true ;; | |
5398 | bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;; | |
5399 | bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;; | |
5400 | bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;; | |
5401 | bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; | |
5402 | bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;; | |
5403 | bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; | |
b2ef150d | 5404 | bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;; |
252b5132 RH |
5405 | bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;; |
5406 | bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;; | |
5407 | bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo" | |
5408 | target64=true ;; | |
5409 | bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; | |
5410 | bfd_elf32_m68k_vec) tb="$tb elf32-m68k.lo elf32.lo $elf" ;; | |
5411 | bfd_elf32_m88k_vec) tb="$tb elf32-m88k.lo elf32.lo $elf" ;; | |
5412 | bfd_elf32_mcore_big_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;; | |
5413 | bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;; | |
5414 | bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;; | |
5415 | bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;; | |
0bcb993b ILT |
5416 | bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";; |
5417 | bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";; | |
252b5132 RH |
5418 | bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;; |
5419 | bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;; | |
5420 | bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; | |
5421 | bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; | |
5422 | bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;; | |
5423 | bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;; | |
5424 | bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf" | |
5425 | target64=true ;; | |
5426 | bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf" | |
5427 | target64=true ;; | |
5428 | bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf" | |
5429 | target64=true ;; | |
f4bda984 RH |
5430 | cisco_core_big_vec) tb="$tb cisco-core.lo" ;; |
5431 | cisco_core_little_vec) tb="$tb cisco-core.lo" ;; | |
252b5132 RH |
5432 | demo_64_vec) tb="$tb demo64.lo aout64.lo" |
5433 | target64=true ;; | |
5434 | ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;; | |
5435 | ecoff_little_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;; | |
5436 | ecoff_biglittle_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;; | |
5437 | ecoffalpha_little_vec) tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo" | |
5438 | target64=true ;; | |
5439 | go32coff_vec) tb="$tb coff-go32.lo cofflink.lo" ;; | |
5440 | go32stubbedcoff_vec) tb="$tb coff-stgo32.lo cofflink.lo" ;; | |
5441 | h8300coff_vec) tb="$tb coff-h8300.lo reloc16.lo" ;; | |
5442 | h8500coff_vec) tb="$tb coff-h8500.lo reloc16.lo" ;; | |
5443 | host_aout_vec) tb="$tb host-aout.lo aout32.lo" ;; | |
5444 | hp300bsd_vec) tb="$tb hp300bsd.lo aout32.lo" ;; | |
5445 | hp300hpux_vec) tb="$tb hp300hpux.lo aout32.lo" ;; | |
5446 | i386aout_vec) tb="$tb i386aout.lo aout32.lo" ;; | |
5447 | i386bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;; | |
5448 | i386coff_vec) tb="$tb coff-i386.lo cofflink.lo" ;; | |
5449 | i386dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;; | |
5450 | i386freebsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;; | |
5451 | i386msdos_vec) tb="$tb i386msdos.lo" ;; | |
277d1b5e ILT |
5452 | i386pe_vec) tb="$tb pe-i386.lo peigen.lo cofflink.lo" ;; |
5453 | i386pei_vec) tb="$tb pei-i386.lo peigen.lo cofflink.lo" ;; | |
252b5132 RH |
5454 | i386linux_vec) tb="$tb i386linux.lo aout32.lo" ;; |
5455 | i386lynx_aout_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;; | |
5456 | i386lynx_coff_vec) tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;; | |
5457 | i386mach3_vec) tb="$tb i386mach3.lo aout32.lo" ;; | |
5458 | i386netbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;; | |
5459 | i386os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;; | |
5460 | i860coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;; | |
5461 | icoff_big_vec) tb="$tb coff-i960.lo cofflink.lo" ;; | |
5462 | icoff_little_vec) tb="$tb coff-i960.lo cofflink.lo" ;; | |
5463 | ieee_vec) tb="$tb ieee.lo" ;; | |
5464 | m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;; | |
5465 | m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;; | |
5466 | m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;; | |
5467 | m68klynx_aout_vec) tb="$tb m68klynx.lo lynx-core.lo aout32.lo" ;; | |
5468 | m68klynx_coff_vec) tb="$tb cf-m68klynx.lo coff-m68k.lo cofflink.lo lynx-core.lo" ;; | |
5469 | m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;; | |
5470 | m68k4knetbsd_vec) tb="$tb m68k4knetbsd.lo aout32.lo" ;; | |
5471 | m68kaux_coff_vec) tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;; | |
5472 | m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;; | |
5473 | m88kbcs_vec) tb="$tb coff-m88k.lo" ;; | |
277d1b5e ILT |
5474 | mcore_pe_big_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;; |
5475 | mcore_pe_little_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;; | |
5476 | mcore_pei_big_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;; | |
5477 | mcore_pei_little_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;; | |
252b5132 RH |
5478 | newsos3_vec) tb="$tb newsos3.lo aout32.lo" ;; |
5479 | nlm32_i386_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;; | |
5480 | nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;; | |
5481 | nlm32_alpha_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo" | |
5482 | target64=true ;; | |
5483 | riscix_vec) tb="$tb aout32.lo riscix.lo" ;; | |
5484 | nlm32_powerpc_vec) tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;; | |
5485 | pc532netbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;; | |
5486 | pc532machaout_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;; | |
5487 | pmac_xcoff_vec) tb="$tb coff-pmac.lo xcofflink.lo" ;; | |
5488 | rs6000coff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;; | |
277d1b5e ILT |
5489 | bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;; |
5490 | bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;; | |
5491 | bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;; | |
5492 | bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;; | |
252b5132 RH |
5493 | ppcboot_vec) tb="$tb ppcboot.lo" ;; |
5494 | shcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;; | |
5495 | shlcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;; | |
5496 | shcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;; | |
5497 | shlcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;; | |
5498 | som_vec) tb="$tb som.lo" ;; | |
5499 | sparcle_aout_vec) tb="$tb aout-sparcle.lo aout32.lo" ;; | |
5500 | sparclinux_vec) tb="$tb sparclinux.lo aout32.lo" ;; | |
5501 | sparclynx_aout_vec) tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;; | |
5502 | sparclynx_coff_vec) tb="$tb cf-sparclynx.lo lynx-core.lo" ;; | |
5503 | sparcnetbsd_vec) tb="$tb sparcnetbsd.lo aout32.lo" ;; | |
5504 | sparccoff_vec) tb="$tb coff-sparc.lo" ;; | |
5505 | srec_vec) tb="$tb srec.lo" ;; | |
5506 | sunos_big_vec) tb="$tb sunos.lo aout32.lo" ;; | |
5507 | symbolsrec_vec) tb="$tb srec.lo" ;; | |
5508 | tekhex_vec) tb="$tb tekhex.lo" ;; | |
5509 | tic30_aout_vec) tb="$tb aout-tic30.lo" ;; | |
5510 | tic30_coff_vec) tb="$tb coff-tic30.lo" ;; | |
5511 | tic80coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;; | |
5512 | versados_vec) tb="$tb versados.lo" ;; | |
5513 | vms_alpha_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo" | |
5514 | target64=true ;; | |
5515 | vms_vax_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo" ;; | |
5516 | w65_vec) tb="$tb coff-w65.lo reloc16.lo" ;; | |
5517 | we32kcoff_vec) tb="$tb coff-we32k.lo" ;; | |
5518 | z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;; | |
5519 | ||
5520 | "") ;; | |
5521 | *) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;; | |
5522 | esac | |
5523 | done | |
5524 | ||
5525 | # Target architecture .o files. | |
5526 | # A couple of CPUs use shorter file names to avoid problems on DOS | |
5527 | # filesystems. | |
5528 | ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/` | |
5529 | ||
5530 | # Weed out duplicate .o files. | |
5531 | f="" | |
5532 | for i in $tb ; do | |
5533 | case " $f " in | |
5534 | *" $i "*) ;; | |
5535 | *) f="$f $i" ;; | |
5536 | esac | |
5537 | done | |
5538 | tb="$f" | |
5539 | ||
5540 | f="" | |
5541 | for i in $ta ; do | |
5542 | case " $f " in | |
5543 | *" $i "*) ;; | |
5544 | *) f="$f $i" ;; | |
5545 | esac | |
5546 | done | |
5547 | ta="$f" | |
5548 | ||
5549 | bfd_backends="$tb" | |
5550 | bfd_machines="$ta" | |
5551 | ||
5552 | if test x${all_targets} = xtrue ; then | |
5553 | bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)' | |
5554 | bfd_machines="${bfd_machines}"' $(ALL_MACHINES)' | |
5555 | selvecs= | |
5556 | havevecs= | |
5557 | selarchs= | |
5558 | else # all_targets is true | |
5559 | # Only set these if they will be nonempty, for the clever echo. | |
5560 | havevecs= | |
5561 | test -n "$selvecs" && | |
5562 | havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'` | |
5563 | test -n "$selvecs" && | |
5564 | selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` | |
5565 | test -n "$selarchs" && | |
5566 | selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` | |
5567 | fi # all_targets is true | |
5568 | ||
5569 | case ${host64}-${target64}-${want64} in | |
5570 | *true*) | |
5571 | wordsize=64 | |
5572 | all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)' | |
5573 | if test -z "$GCC" && test "$BFD_HOST_64BIT_LONG" = "0" && test "$BFD_HOST_64_BIT_DEFINED" = "0"; then | |
5574 | echo "configure: warning: You have requested a 64 bit BFD configuration, but" 1>&2 | |
5575 | echo "configure: warning: your compiler may not have a 64 bit integral type" 1>&2 | |
5576 | fi | |
5577 | ;; | |
5578 | false-false-false) | |
5579 | wordsize=32 | |
5580 | all_backends='$(BFD32_BACKENDS)' | |
5581 | ;; | |
5582 | esac | |
5583 | ||
5584 | ||
5585 | ||
5586 | ||
5587 | ||
5588 | ||
5589 | tdefaults="" | |
5590 | test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}" | |
5591 | test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'" | |
5592 | test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'" | |
5593 | test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}" | |
5594 | ||
5595 | ||
5596 | for ac_hdr in unistd.h | |
5597 | do | |
5598 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5599 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
0bcb993b | 5600 | echo "configure:5600: checking for $ac_hdr" >&5 |
252b5132 RH |
5601 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5602 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5603 | else | |
5604 | cat > conftest.$ac_ext <<EOF | |
0bcb993b | 5605 | #line 5605 "configure" |
252b5132 RH |
5606 | #include "confdefs.h" |
5607 | #include <$ac_hdr> | |
5608 | EOF | |
5609 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
0bcb993b | 5610 | { (eval echo configure:5610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
252b5132 RH |
5611 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5612 | if test -z "$ac_err"; then | |
5613 | rm -rf conftest* | |
5614 | eval "ac_cv_header_$ac_safe=yes" | |
5615 | else | |
5616 | echo "$ac_err" >&5 | |
5617 | echo "configure: failed program was:" >&5 | |
5618 | cat conftest.$ac_ext >&5 | |
5619 | rm -rf conftest* | |
5620 | eval "ac_cv_header_$ac_safe=no" | |
5621 | fi | |
5622 | rm -f conftest* | |
5623 | fi | |
5624 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5625 | echo "$ac_t""yes" 1>&6 | |
5626 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5627 | cat >> confdefs.h <<EOF | |
5628 | #define $ac_tr_hdr 1 | |
5629 | EOF | |
5630 | ||
5631 | else | |
5632 | echo "$ac_t""no" 1>&6 | |
5633 | fi | |
5634 | done | |
5635 | ||
5636 | for ac_func in getpagesize | |
5637 | do | |
5638 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0bcb993b | 5639 | echo "configure:5639: checking for $ac_func" >&5 |
252b5132 RH |
5640 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5641 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5642 | else | |
5643 | cat > conftest.$ac_ext <<EOF | |
0bcb993b | 5644 | #line 5644 "configure" |
252b5132 RH |
5645 | #include "confdefs.h" |
5646 | /* System header to define __stub macros and hopefully few prototypes, | |
5647 | which can conflict with char $ac_func(); below. */ | |
5648 | #include <assert.h> | |
5649 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5650 | /* We use char because int might match the return type of a gcc2 | |
5651 | builtin and then its argument prototype would still apply. */ | |
5652 | char $ac_func(); | |
5653 | ||
5654 | int main() { | |
5655 | ||
5656 | /* The GNU C library defines this for functions which it implements | |
5657 | to always fail with ENOSYS. Some functions are actually named | |
5658 | something starting with __ and the normal name is an alias. */ | |
5659 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5660 | choke me | |
5661 | #else | |
5662 | $ac_func(); | |
5663 | #endif | |
5664 | ||
5665 | ; return 0; } | |
5666 | EOF | |
0bcb993b | 5667 | if { (eval echo configure:5667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
5668 | rm -rf conftest* |
5669 | eval "ac_cv_func_$ac_func=yes" | |
5670 | else | |
5671 | echo "configure: failed program was:" >&5 | |
5672 | cat conftest.$ac_ext >&5 | |
5673 | rm -rf conftest* | |
5674 | eval "ac_cv_func_$ac_func=no" | |
5675 | fi | |
5676 | rm -f conftest* | |
5677 | fi | |
5678 | ||
5679 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5680 | echo "$ac_t""yes" 1>&6 | |
5681 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5682 | cat >> confdefs.h <<EOF | |
5683 | #define $ac_tr_func 1 | |
5684 | EOF | |
5685 | ||
5686 | else | |
5687 | echo "$ac_t""no" 1>&6 | |
5688 | fi | |
5689 | done | |
5690 | ||
5691 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
0bcb993b | 5692 | echo "configure:5692: checking for working mmap" >&5 |
252b5132 RH |
5693 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
5694 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5695 | else | |
5696 | if test "$cross_compiling" = yes; then | |
5697 | ac_cv_func_mmap_fixed_mapped=no | |
5698 | else | |
5699 | cat > conftest.$ac_ext <<EOF | |
0bcb993b | 5700 | #line 5700 "configure" |
252b5132 RH |
5701 | #include "confdefs.h" |
5702 | ||
5703 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
5704 | Here is a matrix of mmap possibilities: | |
5705 | mmap private not fixed | |
5706 | mmap private fixed at somewhere currently unmapped | |
5707 | mmap private fixed at somewhere already mapped | |
5708 | mmap shared not fixed | |
5709 | mmap shared fixed at somewhere currently unmapped | |
5710 | mmap shared fixed at somewhere already mapped | |
5711 | For private mappings, we should verify that changes cannot be read() | |
5712 | back from the file, nor mmap's back from the file at a different | |
5713 | address. (There have been systems where private was not correctly | |
5714 | implemented like the infamous i386 svr4.0, and systems where the | |
5715 | VM page cache was not coherent with the filesystem buffer cache | |
5716 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
5717 | For shared mappings, we should conversely verify that changes get | |
5718 | propogated back to all the places they're supposed to be. | |
5719 | ||
5720 | Grep wants private fixed already mapped. | |
5721 | The main things grep needs to know about mmap are: | |
5722 | * does it exist and is it safe to write into the mmap'd area | |
5723 | * how to use it (BSD variants) */ | |
5724 | #include <sys/types.h> | |
5725 | #include <fcntl.h> | |
5726 | #include <sys/mman.h> | |
5727 | ||
5728 | /* This mess was copied from the GNU getpagesize.h. */ | |
5729 | #ifndef HAVE_GETPAGESIZE | |
5730 | # ifdef HAVE_UNISTD_H | |
5731 | # include <unistd.h> | |
5732 | # endif | |
5733 | ||
5734 | /* Assume that all systems that can run configure have sys/param.h. */ | |
5735 | # ifndef HAVE_SYS_PARAM_H | |
5736 | # define HAVE_SYS_PARAM_H 1 | |
5737 | # endif | |
5738 | ||
5739 | # ifdef _SC_PAGESIZE | |
5740 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
5741 | # else /* no _SC_PAGESIZE */ | |
5742 | # ifdef HAVE_SYS_PARAM_H | |
5743 | # include <sys/param.h> | |
5744 | # ifdef EXEC_PAGESIZE | |
5745 | # define getpagesize() EXEC_PAGESIZE | |
5746 | # else /* no EXEC_PAGESIZE */ | |
5747 | # ifdef NBPG | |
5748 | # define getpagesize() NBPG * CLSIZE | |
5749 | # ifndef CLSIZE | |
5750 | # define CLSIZE 1 | |
5751 | # endif /* no CLSIZE */ | |
5752 | # else /* no NBPG */ | |
5753 | # ifdef NBPC | |
5754 | # define getpagesize() NBPC | |
5755 | # else /* no NBPC */ | |
5756 | # ifdef PAGESIZE | |
5757 | # define getpagesize() PAGESIZE | |
5758 | # endif /* PAGESIZE */ | |
5759 | # endif /* no NBPC */ | |
5760 | # endif /* no NBPG */ | |
5761 | # endif /* no EXEC_PAGESIZE */ | |
5762 | # else /* no HAVE_SYS_PARAM_H */ | |
5763 | # define getpagesize() 8192 /* punt totally */ | |
5764 | # endif /* no HAVE_SYS_PARAM_H */ | |
5765 | # endif /* no _SC_PAGESIZE */ | |
5766 | ||
5767 | #endif /* no HAVE_GETPAGESIZE */ | |
5768 | ||
5769 | #ifdef __cplusplus | |
5770 | extern "C" { void *malloc(unsigned); } | |
5771 | #else | |
5772 | char *malloc(); | |
5773 | #endif | |
5774 | ||
5775 | int | |
5776 | main() | |
5777 | { | |
5778 | char *data, *data2, *data3; | |
5779 | int i, pagesize; | |
5780 | int fd; | |
5781 | ||
5782 | pagesize = getpagesize(); | |
5783 | ||
5784 | /* | |
5785 | * First, make a file with some known garbage in it. | |
5786 | */ | |
5787 | data = malloc(pagesize); | |
5788 | if (!data) | |
5789 | exit(1); | |
5790 | for (i = 0; i < pagesize; ++i) | |
5791 | *(data + i) = rand(); | |
5792 | umask(0); | |
5793 | fd = creat("conftestmmap", 0600); | |
5794 | if (fd < 0) | |
5795 | exit(1); | |
5796 | if (write(fd, data, pagesize) != pagesize) | |
5797 | exit(1); | |
5798 | close(fd); | |
5799 | ||
5800 | /* | |
5801 | * Next, try to mmap the file at a fixed address which | |
5802 | * already has something else allocated at it. If we can, | |
5803 | * also make sure that we see the same garbage. | |
5804 | */ | |
5805 | fd = open("conftestmmap", O_RDWR); | |
5806 | if (fd < 0) | |
5807 | exit(1); | |
5808 | data2 = malloc(2 * pagesize); | |
5809 | if (!data2) | |
5810 | exit(1); | |
5811 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
5812 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
5813 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
5814 | exit(1); | |
5815 | for (i = 0; i < pagesize; ++i) | |
5816 | if (*(data + i) != *(data2 + i)) | |
5817 | exit(1); | |
5818 | ||
5819 | /* | |
5820 | * Finally, make sure that changes to the mapped area | |
5821 | * do not percolate back to the file as seen by read(). | |
5822 | * (This is a bug on some variants of i386 svr4.0.) | |
5823 | */ | |
5824 | for (i = 0; i < pagesize; ++i) | |
5825 | *(data2 + i) = *(data2 + i) + 1; | |
5826 | data3 = malloc(pagesize); | |
5827 | if (!data3) | |
5828 | exit(1); | |
5829 | if (read(fd, data3, pagesize) != pagesize) | |
5830 | exit(1); | |
5831 | for (i = 0; i < pagesize; ++i) | |
5832 | if (*(data + i) != *(data3 + i)) | |
5833 | exit(1); | |
5834 | close(fd); | |
5835 | unlink("conftestmmap"); | |
5836 | exit(0); | |
5837 | } | |
5838 | ||
5839 | EOF | |
0bcb993b | 5840 | if { (eval echo configure:5840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
252b5132 RH |
5841 | then |
5842 | ac_cv_func_mmap_fixed_mapped=yes | |
5843 | else | |
5844 | echo "configure: failed program was:" >&5 | |
5845 | cat conftest.$ac_ext >&5 | |
5846 | rm -fr conftest* | |
5847 | ac_cv_func_mmap_fixed_mapped=no | |
5848 | fi | |
5849 | rm -fr conftest* | |
5850 | fi | |
5851 | ||
5852 | fi | |
5853 | ||
5854 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
5855 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
5856 | cat >> confdefs.h <<\EOF | |
5857 | #define HAVE_MMAP 1 | |
5858 | EOF | |
5859 | ||
5860 | fi | |
5861 | ||
5862 | for ac_func in madvise mprotect | |
5863 | do | |
5864 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
0bcb993b | 5865 | echo "configure:5865: checking for $ac_func" >&5 |
252b5132 RH |
5866 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5867 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5868 | else | |
5869 | cat > conftest.$ac_ext <<EOF | |
0bcb993b | 5870 | #line 5870 "configure" |
252b5132 RH |
5871 | #include "confdefs.h" |
5872 | /* System header to define __stub macros and hopefully few prototypes, | |
5873 | which can conflict with char $ac_func(); below. */ | |
5874 | #include <assert.h> | |
5875 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5876 | /* We use char because int might match the return type of a gcc2 | |
5877 | builtin and then its argument prototype would still apply. */ | |
5878 | char $ac_func(); | |
5879 | ||
5880 | int main() { | |
5881 | ||
5882 | /* The GNU C library defines this for functions which it implements | |
5883 | to always fail with ENOSYS. Some functions are actually named | |
5884 | something starting with __ and the normal name is an alias. */ | |
5885 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5886 | choke me | |
5887 | #else | |
5888 | $ac_func(); | |
5889 | #endif | |
5890 | ||
5891 | ; return 0; } | |
5892 | EOF | |
0bcb993b | 5893 | if { (eval echo configure:5893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
5894 | rm -rf conftest* |
5895 | eval "ac_cv_func_$ac_func=yes" | |
5896 | else | |
5897 | echo "configure: failed program was:" >&5 | |
5898 | cat conftest.$ac_ext >&5 | |
5899 | rm -rf conftest* | |
5900 | eval "ac_cv_func_$ac_func=no" | |
5901 | fi | |
5902 | rm -f conftest* | |
5903 | fi | |
5904 | ||
5905 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5906 | echo "$ac_t""yes" 1>&6 | |
5907 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5908 | cat >> confdefs.h <<EOF | |
5909 | #define $ac_tr_func 1 | |
5910 | EOF | |
5911 | ||
5912 | else | |
5913 | echo "$ac_t""no" 1>&6 | |
5914 | fi | |
5915 | done | |
5916 | ||
5917 | case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in | |
5918 | true+yes ) cat >> confdefs.h <<\EOF | |
5919 | #define USE_MMAP 1 | |
5920 | EOF | |
5921 | ;; | |
5922 | esac | |
5923 | ||
5924 | rm -f doc/config.status | |
5925 | trap '' 1 2 15 | |
5926 | cat > confcache <<\EOF | |
5927 | # This file is a shell script that caches the results of configure | |
5928 | # tests run on this system so they can be shared between configure | |
5929 | # scripts and configure runs. It is not useful on other systems. | |
5930 | # If it contains results you don't want to keep, you may remove or edit it. | |
5931 | # | |
5932 | # By default, configure uses ./config.cache as the cache file, | |
5933 | # creating it if it does not exist already. You can give configure | |
5934 | # the --cache-file=FILE option to use a different cache file; that is | |
5935 | # what configure does when it calls configure scripts in | |
5936 | # subdirectories, so they share the cache. | |
5937 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
5938 | # config.status only pays attention to the cache file if you give it the | |
5939 | # --recheck option to rerun configure. | |
5940 | # | |
5941 | EOF | |
5942 | # The following way of writing the cache mishandles newlines in values, | |
5943 | # but we know of no workaround that is simple, portable, and efficient. | |
5944 | # So, don't put newlines in cache variables' values. | |
5945 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
5946 | # and sets the high bit in the cache file unless we assign to the vars. | |
5947 | (set) 2>&1 | | |
5948 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
5949 | *ac_space=\ *) | |
5950 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
5951 | # turns \\\\ into \\, and sed turns \\ into \). | |
5952 | sed -n \ | |
5953 | -e "s/'/'\\\\''/g" \ | |
5954 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
5955 | ;; | |
5956 | *) | |
5957 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
5958 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
5959 | ;; | |
5960 | esac >> confcache | |
5961 | if cmp -s $cache_file confcache; then | |
5962 | : | |
5963 | else | |
5964 | if test -w $cache_file; then | |
5965 | echo "updating cache $cache_file" | |
5966 | cat confcache > $cache_file | |
5967 | else | |
5968 | echo "not updating unwritable cache $cache_file" | |
5969 | fi | |
5970 | fi | |
5971 | rm -f confcache | |
5972 | ||
5973 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
5974 | ||
5975 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
5976 | # Let make expand exec_prefix. | |
5977 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
5978 | ||
5979 | # Any assignment to VPATH causes Sun make to only execute | |
5980 | # the first set of double-colon rules, so remove it if not needed. | |
5981 | # If there is a colon in the path, we need to keep it. | |
5982 | if test "x$srcdir" = x.; then | |
5983 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
5984 | fi | |
5985 | ||
5986 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
5987 | ||
5988 | DEFS=-DHAVE_CONFIG_H | |
5989 | ||
5990 | # Without the "./", some shells look in PATH for config.status. | |
5991 | : ${CONFIG_STATUS=./config.status} | |
5992 | ||
5993 | echo creating $CONFIG_STATUS | |
5994 | rm -f $CONFIG_STATUS | |
5995 | cat > $CONFIG_STATUS <<EOF | |
5996 | #! /bin/sh | |
5997 | # Generated automatically by configure. | |
5998 | # Run this file to recreate the current configuration. | |
5999 | # This directory was configured as follows, | |
6000 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
6001 | # | |
6002 | # $0 $ac_configure_args | |
6003 | # | |
6004 | # Compiler output produced by configure, useful for debugging | |
6005 | # configure, is in ./config.log if it exists. | |
6006 | ||
6007 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
6008 | for ac_option | |
6009 | do | |
6010 | case "\$ac_option" in | |
6011 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
6012 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
6013 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
6014 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
6015 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
6016 | exit 0 ;; | |
6017 | -help | --help | --hel | --he | --h) | |
6018 | echo "\$ac_cs_usage"; exit 0 ;; | |
6019 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
6020 | esac | |
6021 | done | |
6022 | ||
6023 | ac_given_srcdir=$srcdir | |
6024 | ac_given_INSTALL="$INSTALL" | |
6025 | ||
6026 | trap 'rm -fr `echo "Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 | |
6027 | EOF | |
6028 | cat >> $CONFIG_STATUS <<EOF | |
6029 | ||
6030 | # Protect against being on the right side of a sed subst in config.status. | |
6031 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
6032 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
6033 | $ac_vpsub | |
6034 | $extrasub | |
6035 | s%@SHELL@%$SHELL%g | |
6036 | s%@CFLAGS@%$CFLAGS%g | |
6037 | s%@CPPFLAGS@%$CPPFLAGS%g | |
6038 | s%@CXXFLAGS@%$CXXFLAGS%g | |
6039 | s%@FFLAGS@%$FFLAGS%g | |
6040 | s%@DEFS@%$DEFS%g | |
6041 | s%@LDFLAGS@%$LDFLAGS%g | |
6042 | s%@LIBS@%$LIBS%g | |
6043 | s%@exec_prefix@%$exec_prefix%g | |
6044 | s%@prefix@%$prefix%g | |
6045 | s%@program_transform_name@%$program_transform_name%g | |
6046 | s%@bindir@%$bindir%g | |
6047 | s%@sbindir@%$sbindir%g | |
6048 | s%@libexecdir@%$libexecdir%g | |
6049 | s%@datadir@%$datadir%g | |
6050 | s%@sysconfdir@%$sysconfdir%g | |
6051 | s%@sharedstatedir@%$sharedstatedir%g | |
6052 | s%@localstatedir@%$localstatedir%g | |
6053 | s%@libdir@%$libdir%g | |
6054 | s%@includedir@%$includedir%g | |
6055 | s%@oldincludedir@%$oldincludedir%g | |
6056 | s%@infodir@%$infodir%g | |
6057 | s%@mandir@%$mandir%g | |
6058 | s%@host@%$host%g | |
6059 | s%@host_alias@%$host_alias%g | |
6060 | s%@host_cpu@%$host_cpu%g | |
6061 | s%@host_vendor@%$host_vendor%g | |
6062 | s%@host_os@%$host_os%g | |
6063 | s%@target@%$target%g | |
6064 | s%@target_alias@%$target_alias%g | |
6065 | s%@target_cpu@%$target_cpu%g | |
6066 | s%@target_vendor@%$target_vendor%g | |
6067 | s%@target_os@%$target_os%g | |
6068 | s%@build@%$build%g | |
6069 | s%@build_alias@%$build_alias%g | |
6070 | s%@build_cpu@%$build_cpu%g | |
6071 | s%@build_vendor@%$build_vendor%g | |
6072 | s%@build_os@%$build_os%g | |
6073 | s%@CC@%$CC%g | |
6074 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g | |
6075 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
6076 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
6077 | s%@PACKAGE@%$PACKAGE%g | |
6078 | s%@VERSION@%$VERSION%g | |
6079 | s%@ACLOCAL@%$ACLOCAL%g | |
6080 | s%@AUTOCONF@%$AUTOCONF%g | |
6081 | s%@AUTOMAKE@%$AUTOMAKE%g | |
6082 | s%@AUTOHEADER@%$AUTOHEADER%g | |
6083 | s%@MAKEINFO@%$MAKEINFO%g | |
6084 | s%@SET_MAKE@%$SET_MAKE%g | |
6085 | s%@AR@%$AR%g | |
6086 | s%@RANLIB@%$RANLIB%g | |
6087 | s%@LD@%$LD%g | |
6088 | s%@NM@%$NM%g | |
b2ef150d | 6089 | s%@USE_SYMBOL_UNDERSCORE@%$USE_SYMBOL_UNDERSCORE%g |
252b5132 | 6090 | s%@LN_S@%$LN_S%g |
252b5132 RH |
6091 | s%@DLLTOOL@%$DLLTOOL%g |
6092 | s%@AS@%$AS%g | |
b2ef150d | 6093 | s%@LIBTOOL@%$LIBTOOL%g |
252b5132 RH |
6094 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g |
6095 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
6096 | s%@MAINT@%$MAINT%g | |
6097 | s%@EXEEXT@%$EXEEXT%g | |
6098 | s%@CPP@%$CPP%g | |
6099 | s%@ALLOCA@%$ALLOCA%g | |
6100 | s%@USE_NLS@%$USE_NLS%g | |
6101 | s%@MSGFMT@%$MSGFMT%g | |
6102 | s%@GMSGFMT@%$GMSGFMT%g | |
6103 | s%@XGETTEXT@%$XGETTEXT%g | |
6104 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
6105 | s%@CATALOGS@%$CATALOGS%g | |
6106 | s%@CATOBJEXT@%$CATOBJEXT%g | |
6107 | s%@DATADIRNAME@%$DATADIRNAME%g | |
6108 | s%@GMOFILES@%$GMOFILES%g | |
6109 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
6110 | s%@INTLDEPS@%$INTLDEPS%g | |
6111 | s%@INTLLIBS@%$INTLLIBS%g | |
6112 | s%@INTLOBJS@%$INTLOBJS%g | |
6113 | s%@POFILES@%$POFILES%g | |
6114 | s%@POSUB@%$POSUB%g | |
6115 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
6116 | s%@GT_NO@%$GT_NO%g | |
6117 | s%@GT_YES@%$GT_YES%g | |
6118 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
6119 | s%@l@%$l%g | |
6120 | s%@HDEFINES@%$HDEFINES%g | |
6121 | s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g | |
6122 | s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g | |
6123 | s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g | |
6124 | s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g | |
6125 | s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g | |
6126 | s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g | |
6127 | s%@COREFILE@%$COREFILE%g | |
6128 | s%@COREFLAG@%$COREFLAG%g | |
6129 | s%@WIN32LDFLAGS@%$WIN32LDFLAGS%g | |
6130 | s%@WIN32LIBADD@%$WIN32LIBADD%g | |
6131 | s%@TDEFINES@%$TDEFINES%g | |
6132 | s%@wordsize@%$wordsize%g | |
6133 | s%@all_backends@%$all_backends%g | |
6134 | s%@bfd_backends@%$bfd_backends%g | |
6135 | s%@bfd_machines@%$bfd_machines%g | |
6136 | s%@tdefaults@%$tdefaults%g | |
6137 | ||
6138 | CEOF | |
6139 | EOF | |
6140 | ||
6141 | cat >> $CONFIG_STATUS <<\EOF | |
6142 | ||
6143 | # Split the substitutions into bite-sized pieces for seds with | |
6144 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
6145 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
6146 | ac_file=1 # Number of current file. | |
6147 | ac_beg=1 # First line for current file. | |
6148 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
6149 | ac_more_lines=: | |
6150 | ac_sed_cmds="" | |
6151 | while $ac_more_lines; do | |
6152 | if test $ac_beg -gt 1; then | |
6153 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
6154 | else | |
6155 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
6156 | fi | |
6157 | if test ! -s conftest.s$ac_file; then | |
6158 | ac_more_lines=false | |
6159 | rm -f conftest.s$ac_file | |
6160 | else | |
6161 | if test -z "$ac_sed_cmds"; then | |
6162 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
6163 | else | |
6164 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
6165 | fi | |
6166 | ac_file=`expr $ac_file + 1` | |
6167 | ac_beg=$ac_end | |
6168 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
6169 | fi | |
6170 | done | |
6171 | if test -z "$ac_sed_cmds"; then | |
6172 | ac_sed_cmds=cat | |
6173 | fi | |
6174 | EOF | |
6175 | ||
6176 | cat >> $CONFIG_STATUS <<EOF | |
6177 | ||
6178 | CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in"} | |
6179 | EOF | |
6180 | cat >> $CONFIG_STATUS <<\EOF | |
6181 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
6182 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
6183 | case "$ac_file" in | |
6184 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
6185 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
6186 | *) ac_file_in="${ac_file}.in" ;; | |
6187 | esac | |
6188 | ||
6189 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
6190 | ||
6191 | # Remove last slash and all that follows it. Not all systems have dirname. | |
6192 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
6193 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
6194 | # The file is in a subdirectory. | |
6195 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
6196 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
6197 | # A "../" for each directory in $ac_dir_suffix. | |
6198 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
6199 | else | |
6200 | ac_dir_suffix= ac_dots= | |
6201 | fi | |
6202 | ||
6203 | case "$ac_given_srcdir" in | |
6204 | .) srcdir=. | |
6205 | if test -z "$ac_dots"; then top_srcdir=. | |
6206 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
6207 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
6208 | *) # Relative path. | |
6209 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
6210 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
6211 | esac | |
6212 | ||
6213 | case "$ac_given_INSTALL" in | |
6214 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
6215 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
6216 | esac | |
6217 | ||
6218 | echo creating "$ac_file" | |
6219 | rm -f "$ac_file" | |
6220 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
6221 | case "$ac_file" in | |
6222 | *Makefile*) ac_comsub="1i\\ | |
6223 | # $configure_input" ;; | |
6224 | *) ac_comsub= ;; | |
6225 | esac | |
6226 | ||
6227 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
6228 | sed -e "$ac_comsub | |
6229 | s%@configure_input@%$configure_input%g | |
6230 | s%@srcdir@%$srcdir%g | |
6231 | s%@top_srcdir@%$top_srcdir%g | |
6232 | s%@INSTALL@%$INSTALL%g | |
6233 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
6234 | fi; done | |
6235 | rm -f conftest.s* | |
6236 | ||
6237 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
6238 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
6239 | # | |
6240 | # ac_d sets the value in "#define NAME VALUE" lines. | |
6241 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
6242 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
6243 | ac_dC='\3' | |
6244 | ac_dD='%g' | |
6245 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
6246 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
6247 | ac_uB='\([ ]\)%\1#\2define\3' | |
6248 | ac_uC=' ' | |
6249 | ac_uD='\4%g' | |
6250 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
6251 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
6252 | ac_eB='$%\1#\2define\3' | |
6253 | ac_eC=' ' | |
6254 | ac_eD='%g' | |
6255 | ||
6256 | if test "${CONFIG_HEADERS+set}" != set; then | |
6257 | EOF | |
6258 | cat >> $CONFIG_STATUS <<EOF | |
6259 | CONFIG_HEADERS="config.h:config.in" | |
6260 | EOF | |
6261 | cat >> $CONFIG_STATUS <<\EOF | |
6262 | fi | |
6263 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
6264 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
6265 | case "$ac_file" in | |
6266 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
6267 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
6268 | *) ac_file_in="${ac_file}.in" ;; | |
6269 | esac | |
6270 | ||
6271 | echo creating $ac_file | |
6272 | ||
6273 | rm -f conftest.frag conftest.in conftest.out | |
6274 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
6275 | cat $ac_file_inputs > conftest.in | |
6276 | ||
6277 | EOF | |
6278 | ||
6279 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
6280 | # the proper values into config.h.in to produce config.h. And first: | |
6281 | # Protect against being on the right side of a sed subst in config.status. | |
6282 | # Protect against being in an unquoted here document in config.status. | |
6283 | rm -f conftest.vals | |
6284 | cat > conftest.hdr <<\EOF | |
6285 | s/[\\&%]/\\&/g | |
6286 | s%[\\$`]%\\&%g | |
6287 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
6288 | s%ac_d%ac_u%gp | |
6289 | s%ac_u%ac_e%gp | |
6290 | EOF | |
6291 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
6292 | rm -f conftest.hdr | |
6293 | ||
6294 | # This sed command replaces #undef with comments. This is necessary, for | |
6295 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
6296 | # on some systems where configure will not decide to define it. | |
6297 | cat >> conftest.vals <<\EOF | |
6298 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
6299 | EOF | |
6300 | ||
6301 | # Break up conftest.vals because some shells have a limit on | |
6302 | # the size of here documents, and old seds have small limits too. | |
6303 | ||
6304 | rm -f conftest.tail | |
6305 | while : | |
6306 | do | |
6307 | ac_lines=`grep -c . conftest.vals` | |
6308 | # grep -c gives empty output for an empty file on some AIX systems. | |
6309 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
6310 | # Write a limited-size here document to conftest.frag. | |
6311 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
6312 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
6313 | echo 'CEOF | |
6314 | sed -f conftest.frag conftest.in > conftest.out | |
6315 | rm -f conftest.in | |
6316 | mv conftest.out conftest.in | |
6317 | ' >> $CONFIG_STATUS | |
6318 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
6319 | rm -f conftest.vals | |
6320 | mv conftest.tail conftest.vals | |
6321 | done | |
6322 | rm -f conftest.vals | |
6323 | ||
6324 | cat >> $CONFIG_STATUS <<\EOF | |
6325 | rm -f conftest.frag conftest.h | |
6326 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
6327 | cat conftest.in >> conftest.h | |
6328 | rm -f conftest.in | |
6329 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
6330 | echo "$ac_file is unchanged" | |
6331 | rm -f conftest.h | |
6332 | else | |
6333 | # Remove last slash and all that follows it. Not all systems have dirname. | |
6334 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
6335 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
6336 | # The file is in a subdirectory. | |
6337 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
6338 | fi | |
6339 | rm -f $ac_file | |
6340 | mv conftest.h $ac_file | |
6341 | fi | |
6342 | fi; done | |
6343 | ||
6344 | EOF | |
6345 | cat >> $CONFIG_STATUS <<EOF | |
6346 | ||
6347 | ||
6348 | EOF | |
6349 | cat >> $CONFIG_STATUS <<\EOF | |
6350 | test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h | |
6351 | sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile | |
6352 | exit 0 | |
6353 | EOF | |
6354 | chmod +x $CONFIG_STATUS | |
6355 | rm -fr confdefs* $ac_clean_files | |
6356 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
6357 |