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