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