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