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