Commit | Line | Data |
---|---|---|
252b5132 | 1 | #! /bin/sh |
6be7c12c | 2 | |
252b5132 | 3 | # Guess values for system-dependent variables and create Makefiles. |
6be7c12c AO |
4 | # Generated automatically using autoconf version 2.13 |
5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. | |
252b5132 RH |
6 | # |
7 | # This configure script is free software; the Free Software Foundation | |
8 | # gives unlimited permission to copy, distribute and modify it. | |
9 | ||
6be7c12c AO |
10 | # Defaults: |
11 | ac_help= | |
252b5132 | 12 | ac_default_prefix=/usr/local |
6be7c12c AO |
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]" | |
18 | ac_help="$ac_help | |
19 | --enable-fast-install[=PKGS] optimize for fast installation [default=yes]" | |
20 | ac_help="$ac_help | |
21 | --with-gnu-ld assume the C compiler uses GNU ld [default=no]" | |
22 | ac_help="$ac_help | |
23 | --disable-libtool-lock avoid locking (might break parallel builds)" | |
24 | ac_help="$ac_help | |
25 | --with-pic try to use only PIC/non-PIC objects [default=use both]" | |
26 | ac_help="$ac_help | |
27 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)" | |
28 | ac_help="$ac_help | |
29 | --enable-targets alternative target configurations" | |
30 | ac_help="$ac_help | |
31 | --enable-commonbfdlib build shared BFD/opcodes/libiberty library" | |
32 | ac_help="$ac_help | |
33 | --with-mmap try using mmap for BFD input files if available" | |
34 | ac_help="$ac_help | |
35 | --enable-build-warnings Enable build-time compiler warnings if gcc is used" | |
36 | ac_help="$ac_help | |
37 | --enable-maintainer-mode enable make rules and dependencies not useful | |
38 | (and sometimes confusing) to the casual installer" | |
a703a6ea | 39 | ac_help="$ac_help |
6a457e5c | 40 | --enable-install-libbfd controls installation of libbfd and related headers" |
6be7c12c AO |
41 | ac_help="$ac_help |
42 | --disable-nls do not use Native Language Support" | |
43 | ac_help="$ac_help | |
44 | --with-included-gettext use the GNU gettext library included here" | |
252b5132 RH |
45 | |
46 | # Initialize some variables set by options. | |
47 | # The variables have the same names as the options, with | |
48 | # dashes changed to underlines. | |
6be7c12c AO |
49 | build=NONE |
50 | cache_file=./config.cache | |
252b5132 | 51 | exec_prefix=NONE |
6be7c12c | 52 | host=NONE |
252b5132 | 53 | no_create= |
6be7c12c | 54 | nonopt=NONE |
252b5132 RH |
55 | no_recursion= |
56 | prefix=NONE | |
57 | program_prefix=NONE | |
58 | program_suffix=NONE | |
59 | program_transform_name=s,x,x, | |
60 | silent= | |
61 | site= | |
62 | srcdir= | |
6be7c12c | 63 | target=NONE |
252b5132 RH |
64 | verbose= |
65 | x_includes=NONE | |
66 | x_libraries=NONE | |
67 | bindir='${exec_prefix}/bin' | |
68 | sbindir='${exec_prefix}/sbin' | |
69 | libexecdir='${exec_prefix}/libexec' | |
70 | datadir='${prefix}/share' | |
71 | sysconfdir='${prefix}/etc' | |
72 | sharedstatedir='${prefix}/com' | |
73 | localstatedir='${prefix}/var' | |
74 | libdir='${exec_prefix}/lib' | |
75 | includedir='${prefix}/include' | |
76 | oldincludedir='/usr/include' | |
77 | infodir='${prefix}/info' | |
78 | mandir='${prefix}/man' | |
79 | ||
6be7c12c AO |
80 | # Initialize some other variables. |
81 | subdirs= | |
82 | MFLAGS= MAKEFLAGS= | |
83 | SHELL=${CONFIG_SHELL-/bin/sh} | |
84 | # Maximum number of lines to put in a shell here document. | |
85 | ac_max_here_lines=12 | |
252b5132 RH |
86 | |
87 | ac_prev= | |
88 | for ac_option | |
89 | do | |
6be7c12c | 90 | |
252b5132 RH |
91 | # If the previous option needs an argument, assign it. |
92 | if test -n "$ac_prev"; then | |
93 | eval "$ac_prev=\$ac_option" | |
94 | ac_prev= | |
95 | continue | |
96 | fi | |
97 | ||
6be7c12c AO |
98 | case "$ac_option" in |
99 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
100 | *) ac_optarg= ;; | |
101 | esac | |
252b5132 RH |
102 | |
103 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
104 | ||
6be7c12c | 105 | case "$ac_option" in |
252b5132 RH |
106 | |
107 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
108 | ac_prev=bindir ;; | |
109 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
6be7c12c | 110 | bindir="$ac_optarg" ;; |
252b5132 RH |
111 | |
112 | -build | --build | --buil | --bui | --bu) | |
6be7c12c | 113 | ac_prev=build ;; |
252b5132 | 114 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
6be7c12c | 115 | build="$ac_optarg" ;; |
252b5132 RH |
116 | |
117 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
118 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
119 | ac_prev=cache_file ;; | |
120 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
121 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
6be7c12c | 122 | cache_file="$ac_optarg" ;; |
252b5132 RH |
123 | |
124 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
125 | ac_prev=datadir ;; | |
126 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
127 | | --da=*) | |
6be7c12c | 128 | datadir="$ac_optarg" ;; |
252b5132 RH |
129 | |
130 | -disable-* | --disable-*) | |
6be7c12c | 131 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` |
252b5132 | 132 | # Reject names that are not valid shell variable names. |
6be7c12c AO |
133 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then |
134 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
135 | fi | |
136 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
137 | eval "enable_${ac_feature}=no" ;; | |
252b5132 RH |
138 | |
139 | -enable-* | --enable-*) | |
6be7c12c | 140 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` |
252b5132 | 141 | # Reject names that are not valid shell variable names. |
6be7c12c AO |
142 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then |
143 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
144 | fi | |
145 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
146 | case "$ac_option" in | |
147 | *=*) ;; | |
252b5132 RH |
148 | *) ac_optarg=yes ;; |
149 | esac | |
6be7c12c | 150 | eval "enable_${ac_feature}='$ac_optarg'" ;; |
252b5132 RH |
151 | |
152 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
153 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
154 | | --exec | --exe | --ex) | |
155 | ac_prev=exec_prefix ;; | |
156 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
157 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
158 | | --exec=* | --exe=* | --ex=*) | |
6be7c12c | 159 | exec_prefix="$ac_optarg" ;; |
252b5132 RH |
160 | |
161 | -gas | --gas | --ga | --g) | |
162 | # Obsolete; use --with-gas. | |
163 | with_gas=yes ;; | |
164 | ||
6be7c12c AO |
165 | -help | --help | --hel | --he) |
166 | # Omit some internal or obsolete options to make the list less imposing. | |
167 | # This message is too long to be a string in the A/UX 3.1 sh. | |
168 | cat << EOF | |
169 | Usage: configure [options] [host] | |
170 | Options: [defaults in brackets after descriptions] | |
171 | Configuration: | |
172 | --cache-file=FILE cache test results in FILE | |
173 | --help print this message | |
174 | --no-create do not create output files | |
175 | --quiet, --silent do not print \`checking...' messages | |
6be7c12c AO |
176 | --version print the version of autoconf that created configure |
177 | Directory and file names: | |
178 | --prefix=PREFIX install architecture-independent files in PREFIX | |
179 | [$ac_default_prefix] | |
180 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
181 | [same as prefix] | |
182 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
183 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
184 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
185 | --datadir=DIR read-only architecture-independent data in DIR | |
186 | [PREFIX/share] | |
187 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
188 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
189 | [PREFIX/com] | |
190 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
191 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
192 | --includedir=DIR C header files in DIR [PREFIX/include] | |
193 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
194 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
195 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
196 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
197 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
198 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
199 | --program-transform-name=PROGRAM | |
200 | run sed PROGRAM on installed program names | |
201 | EOF | |
202 | cat << EOF | |
203 | Host type: | |
204 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
205 | --host=HOST configure for HOST [guessed] | |
206 | --target=TARGET configure for TARGET [TARGET=HOST] | |
207 | Features and packages: | |
208 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
209 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
210 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
211 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
212 | --x-includes=DIR X include files are in DIR | |
213 | --x-libraries=DIR X library files are in DIR | |
214 | EOF | |
215 | if test -n "$ac_help"; then | |
216 | echo "--enable and --with options recognized:$ac_help" | |
217 | fi | |
218 | exit 0 ;; | |
252b5132 RH |
219 | |
220 | -host | --host | --hos | --ho) | |
6be7c12c | 221 | ac_prev=host ;; |
252b5132 | 222 | -host=* | --host=* | --hos=* | --ho=*) |
6be7c12c | 223 | host="$ac_optarg" ;; |
252b5132 RH |
224 | |
225 | -includedir | --includedir | --includedi | --included | --include \ | |
226 | | --includ | --inclu | --incl | --inc) | |
227 | ac_prev=includedir ;; | |
228 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
229 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
6be7c12c | 230 | includedir="$ac_optarg" ;; |
252b5132 RH |
231 | |
232 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
233 | ac_prev=infodir ;; | |
234 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
6be7c12c | 235 | infodir="$ac_optarg" ;; |
252b5132 RH |
236 | |
237 | -libdir | --libdir | --libdi | --libd) | |
238 | ac_prev=libdir ;; | |
239 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
6be7c12c | 240 | libdir="$ac_optarg" ;; |
252b5132 RH |
241 | |
242 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
243 | | --libexe | --libex | --libe) | |
244 | ac_prev=libexecdir ;; | |
245 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
246 | | --libexe=* | --libex=* | --libe=*) | |
6be7c12c | 247 | libexecdir="$ac_optarg" ;; |
252b5132 RH |
248 | |
249 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
250 | | --localstate | --localstat | --localsta | --localst \ | |
251 | | --locals | --local | --loca | --loc | --lo) | |
252 | ac_prev=localstatedir ;; | |
253 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
254 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
255 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
6be7c12c | 256 | localstatedir="$ac_optarg" ;; |
252b5132 RH |
257 | |
258 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
259 | ac_prev=mandir ;; | |
260 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
6be7c12c | 261 | mandir="$ac_optarg" ;; |
252b5132 RH |
262 | |
263 | -nfp | --nfp | --nf) | |
264 | # Obsolete; use --without-fp. | |
265 | with_fp=no ;; | |
266 | ||
267 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
268 | | --no-cr | --no-c) | |
269 | no_create=yes ;; | |
270 | ||
271 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
272 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
273 | no_recursion=yes ;; | |
274 | ||
275 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
276 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
277 | | --oldin | --oldi | --old | --ol | --o) | |
278 | ac_prev=oldincludedir ;; | |
279 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
280 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
281 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
6be7c12c | 282 | oldincludedir="$ac_optarg" ;; |
252b5132 RH |
283 | |
284 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
285 | ac_prev=prefix ;; | |
286 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
6be7c12c | 287 | prefix="$ac_optarg" ;; |
252b5132 RH |
288 | |
289 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
290 | | --program-pre | --program-pr | --program-p) | |
291 | ac_prev=program_prefix ;; | |
292 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
293 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
6be7c12c | 294 | program_prefix="$ac_optarg" ;; |
252b5132 RH |
295 | |
296 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
297 | | --program-suf | --program-su | --program-s) | |
298 | ac_prev=program_suffix ;; | |
299 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
300 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
6be7c12c | 301 | program_suffix="$ac_optarg" ;; |
252b5132 RH |
302 | |
303 | -program-transform-name | --program-transform-name \ | |
304 | | --program-transform-nam | --program-transform-na \ | |
305 | | --program-transform-n | --program-transform- \ | |
306 | | --program-transform | --program-transfor \ | |
307 | | --program-transfo | --program-transf \ | |
308 | | --program-trans | --program-tran \ | |
309 | | --progr-tra | --program-tr | --program-t) | |
310 | ac_prev=program_transform_name ;; | |
311 | -program-transform-name=* | --program-transform-name=* \ | |
312 | | --program-transform-nam=* | --program-transform-na=* \ | |
313 | | --program-transform-n=* | --program-transform-=* \ | |
314 | | --program-transform=* | --program-transfor=* \ | |
315 | | --program-transfo=* | --program-transf=* \ | |
316 | | --program-trans=* | --program-tran=* \ | |
317 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
6be7c12c | 318 | program_transform_name="$ac_optarg" ;; |
252b5132 RH |
319 | |
320 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
321 | | -silent | --silent | --silen | --sile | --sil) | |
322 | silent=yes ;; | |
323 | ||
324 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
325 | ac_prev=sbindir ;; | |
326 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
327 | | --sbi=* | --sb=*) | |
6be7c12c | 328 | sbindir="$ac_optarg" ;; |
252b5132 RH |
329 | |
330 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
331 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
332 | | --sharedst | --shareds | --shared | --share | --shar \ | |
333 | | --sha | --sh) | |
334 | ac_prev=sharedstatedir ;; | |
335 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
336 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
337 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
338 | | --sha=* | --sh=*) | |
6be7c12c | 339 | sharedstatedir="$ac_optarg" ;; |
252b5132 RH |
340 | |
341 | -site | --site | --sit) | |
342 | ac_prev=site ;; | |
343 | -site=* | --site=* | --sit=*) | |
6be7c12c AO |
344 | site="$ac_optarg" ;; |
345 | ||
252b5132 RH |
346 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
347 | ac_prev=srcdir ;; | |
348 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
6be7c12c | 349 | srcdir="$ac_optarg" ;; |
252b5132 RH |
350 | |
351 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
352 | | --syscon | --sysco | --sysc | --sys | --sy) | |
353 | ac_prev=sysconfdir ;; | |
354 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
355 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
6be7c12c | 356 | sysconfdir="$ac_optarg" ;; |
252b5132 RH |
357 | |
358 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
6be7c12c | 359 | ac_prev=target ;; |
252b5132 | 360 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
6be7c12c | 361 | target="$ac_optarg" ;; |
252b5132 RH |
362 | |
363 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
364 | verbose=yes ;; | |
365 | ||
6be7c12c AO |
366 | -version | --version | --versio | --versi | --vers) |
367 | echo "configure generated by autoconf version 2.13" | |
368 | exit 0 ;; | |
252b5132 RH |
369 | |
370 | -with-* | --with-*) | |
6be7c12c | 371 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` |
252b5132 | 372 | # Reject names that are not valid shell variable names. |
6be7c12c AO |
373 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then |
374 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
375 | fi | |
252b5132 | 376 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
6be7c12c AO |
377 | case "$ac_option" in |
378 | *=*) ;; | |
252b5132 RH |
379 | *) ac_optarg=yes ;; |
380 | esac | |
6be7c12c | 381 | eval "with_${ac_package}='$ac_optarg'" ;; |
252b5132 RH |
382 | |
383 | -without-* | --without-*) | |
6be7c12c | 384 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` |
252b5132 | 385 | # Reject names that are not valid shell variable names. |
6be7c12c AO |
386 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then |
387 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
388 | fi | |
389 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
390 | eval "with_${ac_package}=no" ;; | |
252b5132 RH |
391 | |
392 | --x) | |
393 | # Obsolete; use --with-x. | |
394 | with_x=yes ;; | |
395 | ||
396 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
397 | | --x-incl | --x-inc | --x-in | --x-i) | |
398 | ac_prev=x_includes ;; | |
399 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
400 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
6be7c12c | 401 | x_includes="$ac_optarg" ;; |
252b5132 RH |
402 | |
403 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
404 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
405 | ac_prev=x_libraries ;; | |
406 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
407 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
6be7c12c | 408 | x_libraries="$ac_optarg" ;; |
252b5132 | 409 | |
6be7c12c | 410 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } |
252b5132 RH |
411 | ;; |
412 | ||
413 | *) | |
6be7c12c AO |
414 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
415 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
416 | fi | |
417 | if test "x$nonopt" != xNONE; then | |
418 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
419 | fi | |
420 | nonopt="$ac_option" | |
252b5132 RH |
421 | ;; |
422 | ||
423 | esac | |
424 | done | |
425 | ||
426 | if test -n "$ac_prev"; then | |
6be7c12c AO |
427 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } |
428 | fi | |
429 | ||
430 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
431 | ||
432 | # File descriptor usage: | |
433 | # 0 standard input | |
434 | # 1 file creation | |
435 | # 2 errors and warnings | |
436 | # 3 some systems may open it to /dev/tty | |
437 | # 4 used on the Kubota Titan | |
438 | # 6 checking for... messages and results | |
439 | # 5 compiler messages saved in config.log | |
440 | if test "$silent" = yes; then | |
441 | exec 6>/dev/null | |
442 | else | |
443 | exec 6>&1 | |
252b5132 | 444 | fi |
6be7c12c | 445 | exec 5>./config.log |
252b5132 | 446 | |
6be7c12c AO |
447 | echo "\ |
448 | This file contains any messages produced by compilers while | |
449 | running configure, to aid debugging if configure makes a mistake. | |
450 | " 1>&5 | |
451 | ||
452 | # Strip out --no-create and --no-recursion so they do not pile up. | |
453 | # Also quote any args containing shell metacharacters. | |
454 | ac_configure_args= | |
455 | for ac_arg | |
252b5132 | 456 | do |
6be7c12c AO |
457 | case "$ac_arg" in |
458 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
459 | | --no-cr | --no-c) ;; | |
460 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
461 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
462 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
463 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
464 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
252b5132 RH |
465 | esac |
466 | done | |
467 | ||
6be7c12c AO |
468 | # NLS nuisances. |
469 | # Only set these to C if already set. These must not be set unconditionally | |
470 | # because not all systems understand e.g. LANG=C (notably SCO). | |
471 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
472 | # Non-C LC_CTYPE values break the ctype check. | |
473 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
474 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
475 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
476 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
252b5132 | 477 | |
6be7c12c AO |
478 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
479 | rm -rf conftest* confdefs.h | |
480 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
481 | echo > confdefs.h | |
252b5132 | 482 | |
6be7c12c AO |
483 | # A filename unique to this package, relative to the directory that |
484 | # configure is in, which we can look for to find out if srcdir is correct. | |
485 | ac_unique_file=libbfd.c | |
252b5132 RH |
486 | |
487 | # Find the source files, if location was not specified. | |
488 | if test -z "$srcdir"; then | |
489 | ac_srcdir_defaulted=yes | |
490 | # Try the directory containing this script, then its parent. | |
491 | ac_prog=$0 | |
6be7c12c | 492 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` |
252b5132 RH |
493 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. |
494 | srcdir=$ac_confdir | |
495 | if test ! -r $srcdir/$ac_unique_file; then | |
496 | srcdir=.. | |
497 | fi | |
498 | else | |
499 | ac_srcdir_defaulted=no | |
500 | fi | |
501 | if test ! -r $srcdir/$ac_unique_file; then | |
502 | if test "$ac_srcdir_defaulted" = yes; then | |
6be7c12c | 503 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } |
252b5132 | 504 | else |
6be7c12c | 505 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } |
252b5132 RH |
506 | fi |
507 | fi | |
6be7c12c | 508 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` |
b3baf5d0 | 509 | |
6be7c12c | 510 | # Prefer explicitly selected file to automatically selected ones. |
225247f0 JT |
511 | if test -z "$CONFIG_SITE"; then |
512 | if test "x$prefix" != xNONE; then | |
513 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
514 | else | |
515 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
252b5132 RH |
516 | fi |
517 | fi | |
518 | for ac_site_file in $CONFIG_SITE; do | |
519 | if test -r "$ac_site_file"; then | |
6be7c12c | 520 | echo "loading site script $ac_site_file" |
252b5132 RH |
521 | . "$ac_site_file" |
522 | fi | |
523 | done | |
524 | ||
525 | if test -r "$cache_file"; then | |
6be7c12c AO |
526 | echo "loading cache $cache_file" |
527 | . $cache_file | |
252b5132 | 528 | else |
6be7c12c AO |
529 | echo "creating cache $cache_file" |
530 | > $cache_file | |
252b5132 RH |
531 | fi |
532 | ||
533 | ac_ext=c | |
6be7c12c | 534 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
252b5132 | 535 | ac_cpp='$CPP $CPPFLAGS' |
6be7c12c AO |
536 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
537 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
538 | cross_compiling=$ac_cv_prog_cc_cross | |
539 | ||
540 | ac_exeext= | |
541 | ac_objext=o | |
542 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
543 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
544 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
545 | ac_n= ac_c=' | |
546 | ' ac_t=' ' | |
547 | else | |
548 | ac_n=-n ac_c= ac_t= | |
549 | fi | |
550 | else | |
551 | ac_n= ac_c='\c' ac_t= | |
552 | fi | |
553 | ||
554 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
225247f0 | 555 | echo "configure:556: checking for Cygwin environment" >&5 |
6be7c12c AO |
556 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
557 | echo $ac_n "(cached) $ac_c" 1>&6 | |
558 | else | |
559 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 560 | #line 561 "configure" |
6be7c12c AO |
561 | #include "confdefs.h" |
562 | ||
563 | int main() { | |
564 | ||
565 | #ifndef __CYGWIN__ | |
566 | #define __CYGWIN__ __CYGWIN32__ | |
567 | #endif | |
568 | return __CYGWIN__; | |
569 | ; return 0; } | |
570 | EOF | |
225247f0 | 571 | if { (eval echo configure:572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c AO |
572 | rm -rf conftest* |
573 | ac_cv_cygwin=yes | |
574 | else | |
575 | echo "configure: failed program was:" >&5 | |
576 | cat conftest.$ac_ext >&5 | |
577 | rm -rf conftest* | |
578 | ac_cv_cygwin=no | |
579 | fi | |
580 | rm -f conftest* | |
581 | rm -f conftest* | |
582 | fi | |
583 | ||
584 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
585 | CYGWIN= | |
586 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
587 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
225247f0 | 588 | echo "configure:589: checking for mingw32 environment" >&5 |
6be7c12c AO |
589 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
590 | echo $ac_n "(cached) $ac_c" 1>&6 | |
591 | else | |
592 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 593 | #line 594 "configure" |
6be7c12c AO |
594 | #include "confdefs.h" |
595 | ||
596 | int main() { | |
597 | return __MINGW32__; | |
598 | ; return 0; } | |
599 | EOF | |
225247f0 | 600 | if { (eval echo configure:601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c AO |
601 | rm -rf conftest* |
602 | ac_cv_mingw32=yes | |
ac48eca1 | 603 | else |
6be7c12c AO |
604 | echo "configure: failed program was:" >&5 |
605 | cat conftest.$ac_ext >&5 | |
606 | rm -rf conftest* | |
607 | ac_cv_mingw32=no | |
608 | fi | |
609 | rm -f conftest* | |
610 | rm -f conftest* | |
ac48eca1 | 611 | fi |
6be7c12c AO |
612 | |
613 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
614 | MINGW32= | |
615 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
616 | ||
252b5132 RH |
617 | |
618 | ac_aux_dir= | |
619 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do | |
620 | if test -f $ac_dir/install-sh; then | |
621 | ac_aux_dir=$ac_dir | |
622 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
623 | break | |
624 | elif test -f $ac_dir/install.sh; then | |
625 | ac_aux_dir=$ac_dir | |
626 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
627 | break | |
628 | fi | |
629 | done | |
630 | if test -z "$ac_aux_dir"; then | |
6be7c12c | 631 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } |
252b5132 | 632 | fi |
6be7c12c AO |
633 | ac_config_guess=$ac_aux_dir/config.guess |
634 | ac_config_sub=$ac_aux_dir/config.sub | |
635 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
252b5132 | 636 | |
6be7c12c AO |
637 | |
638 | # Do some error checking and defaulting for the host and target type. | |
639 | # The inputs are: | |
640 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
641 | # | |
642 | # The rules are: | |
643 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
644 | # same time. | |
645 | # 2. Host defaults to nonopt. | |
646 | # 3. If nonopt is not specified, then host defaults to the current host, | |
647 | # as determined by config.guess. | |
648 | # 4. Target and build default to nonopt. | |
649 | # 5. If nonopt is not specified, then target and build default to host. | |
252b5132 RH |
650 | |
651 | # The aliases save the names the user supplied, while $host etc. | |
652 | # will get canonicalized. | |
6be7c12c AO |
653 | case $host---$target---$nonopt in |
654 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
655 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
656 | esac | |
657 | ||
658 | ||
659 | # Make sure we can run config.sub. | |
660 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
661 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
662 | fi | |
663 | ||
664 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
225247f0 | 665 | echo "configure:666: checking host system type" >&5 |
6be7c12c AO |
666 | |
667 | host_alias=$host | |
668 | case "$host_alias" in | |
669 | NONE) | |
670 | case $nonopt in | |
671 | NONE) | |
672 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
673 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
674 | fi ;; | |
675 | *) host_alias=$nonopt ;; | |
676 | esac ;; | |
677 | esac | |
678 | ||
679 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
680 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
681 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
682 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
683 | echo "$ac_t""$host" 1>&6 | |
684 | ||
685 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
225247f0 | 686 | echo "configure:687: checking target system type" >&5 |
6be7c12c AO |
687 | |
688 | target_alias=$target | |
689 | case "$target_alias" in | |
690 | NONE) | |
691 | case $nonopt in | |
692 | NONE) target_alias=$host_alias ;; | |
693 | *) target_alias=$nonopt ;; | |
694 | esac ;; | |
695 | esac | |
696 | ||
697 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
698 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
699 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
700 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
701 | echo "$ac_t""$target" 1>&6 | |
702 | ||
703 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
225247f0 | 704 | echo "configure:705: checking build system type" >&5 |
6be7c12c AO |
705 | |
706 | build_alias=$build | |
707 | case "$build_alias" in | |
708 | NONE) | |
709 | case $nonopt in | |
710 | NONE) build_alias=$host_alias ;; | |
711 | *) build_alias=$nonopt ;; | |
712 | esac ;; | |
713 | esac | |
714 | ||
715 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
716 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
717 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
718 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
719 | echo "$ac_t""$build" 1>&6 | |
720 | ||
721 | test "$host_alias" != "$target_alias" && | |
252b5132 RH |
722 | test "$program_prefix$program_suffix$program_transform_name" = \ |
723 | NONENONEs,x,x, && | |
724 | program_prefix=${target_alias}- | |
6be7c12c | 725 | |
66e25bab | 726 | |
c5d1701e | 727 | echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6 |
225247f0 | 728 | echo "configure:729: checking for strerror in -lcposix" >&5 |
c5d1701e NC |
729 | ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'` |
730 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
66e25bab AM |
731 | echo $ac_n "(cached) $ac_c" 1>&6 |
732 | else | |
c5d1701e NC |
733 | ac_save_LIBS="$LIBS" |
734 | LIBS="-lcposix $LIBS" | |
735 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 736 | #line 737 "configure" |
b3baf5d0 | 737 | #include "confdefs.h" |
c5d1701e NC |
738 | /* Override any gcc2 internal prototype to avoid an error. */ |
739 | /* We use char because int might match the return type of a gcc2 | |
740 | builtin and then its argument prototype would still apply. */ | |
741 | char strerror(); | |
b3baf5d0 | 742 | |
c5d1701e NC |
743 | int main() { |
744 | strerror() | |
745 | ; return 0; } | |
6be7c12c | 746 | EOF |
225247f0 | 747 | if { (eval echo configure:748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c5d1701e NC |
748 | rm -rf conftest* |
749 | eval "ac_cv_lib_$ac_lib_var=yes" | |
b3baf5d0 | 750 | else |
6be7c12c AO |
751 | echo "configure: failed program was:" >&5 |
752 | cat conftest.$ac_ext >&5 | |
c5d1701e NC |
753 | rm -rf conftest* |
754 | eval "ac_cv_lib_$ac_lib_var=no" | |
b3baf5d0 | 755 | fi |
6be7c12c | 756 | rm -f conftest* |
c5d1701e | 757 | LIBS="$ac_save_LIBS" |
6be7c12c | 758 | |
b3baf5d0 | 759 | fi |
c5d1701e | 760 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
6be7c12c | 761 | echo "$ac_t""yes" 1>&6 |
c5d1701e | 762 | LIBS="$LIBS -lcposix" |
b3baf5d0 | 763 | else |
6be7c12c | 764 | echo "$ac_t""no" 1>&6 |
b3baf5d0 | 765 | fi |
252b5132 | 766 | |
c5d1701e NC |
767 | |
768 | ||
6be7c12c | 769 | |
6726e1ea | 770 | am__api_version="1.4" |
252b5132 RH |
771 | # Find a good install program. We prefer a C program (faster), |
772 | # so one script is as good as another. But avoid the broken or | |
773 | # incompatible versions: | |
774 | # SysV /etc/install, /usr/sbin/install | |
775 | # SunOS /usr/etc/install | |
776 | # IRIX /sbin/install | |
777 | # AIX /bin/install | |
778 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
779 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
780 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
781 | # ./install, which can be erroneously created by make from ./install.sh. | |
6be7c12c | 782 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
225247f0 | 783 | echo "configure:784: checking for a BSD compatible install" >&5 |
252b5132 | 784 | if test -z "$INSTALL"; then |
6be7c12c AO |
785 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
786 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 787 | else |
6be7c12c | 788 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" |
252b5132 RH |
789 | for ac_dir in $PATH; do |
790 | # Account for people who put trailing slashes in PATH elements. | |
6be7c12c AO |
791 | case "$ac_dir/" in |
792 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
252b5132 RH |
793 | *) |
794 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
795 | # Don't use installbsd from OSF since it installs stuff as root | |
796 | # by default. | |
797 | for ac_prog in ginstall scoinst install; do | |
6be7c12c | 798 | if test -f $ac_dir/$ac_prog; then |
252b5132 | 799 | if test $ac_prog = install && |
6be7c12c | 800 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then |
252b5132 RH |
801 | # AIX install. It has an incompatible calling convention. |
802 | : | |
803 | else | |
804 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
805 | break 2 | |
806 | fi | |
807 | fi | |
808 | done | |
809 | ;; | |
810 | esac | |
811 | done | |
6be7c12c | 812 | IFS="$ac_save_IFS" |
252b5132 RH |
813 | |
814 | fi | |
815 | if test "${ac_cv_path_install+set}" = set; then | |
6be7c12c | 816 | INSTALL="$ac_cv_path_install" |
252b5132 RH |
817 | else |
818 | # As a last resort, use the slow shell script. We don't cache a | |
819 | # path for INSTALL within a source directory, because that will | |
820 | # break other packages using the cache if that directory is | |
821 | # removed, or if the path is relative. | |
6be7c12c | 822 | INSTALL="$ac_install_sh" |
252b5132 RH |
823 | fi |
824 | fi | |
6be7c12c | 825 | echo "$ac_t""$INSTALL" 1>&6 |
252b5132 RH |
826 | |
827 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
828 | # It thinks the first close brace ends the variable substitution. | |
829 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
830 | ||
6be7c12c | 831 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' |
252b5132 RH |
832 | |
833 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
834 | ||
6be7c12c | 835 | echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 |
225247f0 | 836 | echo "configure:837: checking whether build environment is sane" >&5 |
252b5132 RH |
837 | # Just in case |
838 | sleep 1 | |
839 | echo timestamp > conftestfile | |
840 | # Do `set' in a subshell so we don't clobber the current shell's | |
841 | # arguments. Must try -L first in case configure is actually a | |
842 | # symlink; some systems play weird games with the mod time of symlinks | |
843 | # (eg FreeBSD returns the mod time of the symlink's containing | |
844 | # directory). | |
845 | if ( | |
846 | set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` | |
847 | if test "$*" = "X"; then | |
848 | # -L didn't work. | |
849 | set X `ls -t $srcdir/configure conftestfile` | |
850 | fi | |
851 | if test "$*" != "X $srcdir/configure conftestfile" \ | |
852 | && test "$*" != "X conftestfile $srcdir/configure"; then | |
853 | ||
854 | # If neither matched, then we have a broken ls. This can happen | |
855 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
856 | # broken ls alias from the environment. This has actually | |
857 | # happened. Such a system could not be considered "sane". | |
6be7c12c AO |
858 | { echo "configure: error: ls -t appears to fail. Make sure there is not a broken |
859 | alias in your environment" 1>&2; exit 1; } | |
252b5132 RH |
860 | fi |
861 | ||
862 | test "$2" = conftestfile | |
863 | ) | |
864 | then | |
865 | # Ok. | |
866 | : | |
867 | else | |
6be7c12c AO |
868 | { echo "configure: error: newly created file is older than distributed files! |
869 | Check your system clock" 1>&2; exit 1; } | |
252b5132 RH |
870 | fi |
871 | rm -f conftest* | |
6be7c12c | 872 | echo "$ac_t""yes" 1>&6 |
252b5132 RH |
873 | if test "$program_transform_name" = s,x,x,; then |
874 | program_transform_name= | |
875 | else | |
876 | # Double any \ or $. echo might interpret backslashes. | |
6be7c12c | 877 | cat <<\EOF_SED > conftestsed |
252b5132 | 878 | s,\\,\\\\,g; s,\$,$$,g |
6be7c12c AO |
879 | EOF_SED |
880 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
881 | rm -f conftestsed | |
252b5132 RH |
882 | fi |
883 | test "$program_prefix" != NONE && | |
6be7c12c | 884 | program_transform_name="s,^,${program_prefix},; $program_transform_name" |
252b5132 RH |
885 | # Use a double $ so make ignores it. |
886 | test "$program_suffix" != NONE && | |
6be7c12c | 887 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" |
252b5132 RH |
888 | |
889 | # sed with no file args requires a program. | |
6be7c12c | 890 | test "$program_transform_name" = "" && program_transform_name="s,x,x," |
252b5132 | 891 | |
6be7c12c | 892 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 |
225247f0 | 893 | echo "configure:894: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
6be7c12c AO |
894 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
895 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
896 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 897 | else |
6be7c12c | 898 | cat > conftestmake <<\EOF |
252b5132 RH |
899 | all: |
900 | @echo 'ac_maketemp="${MAKE}"' | |
901 | EOF | |
902 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
6be7c12c | 903 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` |
252b5132 RH |
904 | if test -n "$ac_maketemp"; then |
905 | eval ac_cv_prog_make_${ac_make}_set=yes | |
906 | else | |
907 | eval ac_cv_prog_make_${ac_make}_set=no | |
908 | fi | |
6be7c12c | 909 | rm -f conftestmake |
252b5132 RH |
910 | fi |
911 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
6be7c12c | 912 | echo "$ac_t""yes" 1>&6 |
252b5132 RH |
913 | SET_MAKE= |
914 | else | |
6be7c12c | 915 | echo "$ac_t""no" 1>&6 |
252b5132 RH |
916 | SET_MAKE="MAKE=${MAKE-make}" |
917 | fi | |
918 | ||
6be7c12c | 919 | |
252b5132 RH |
920 | PACKAGE=bfd |
921 | ||
7dfb3b6b | 922 | VERSION=2.15.91 |
252b5132 RH |
923 | |
924 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then | |
6be7c12c | 925 | { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } |
252b5132 | 926 | fi |
6be7c12c | 927 | cat >> confdefs.h <<EOF |
252b5132 RH |
928 | #define PACKAGE "$PACKAGE" |
929 | EOF | |
930 | ||
6be7c12c | 931 | cat >> confdefs.h <<EOF |
252b5132 RH |
932 | #define VERSION "$VERSION" |
933 | EOF | |
934 | ||
6be7c12c AO |
935 | |
936 | ||
252b5132 | 937 | missing_dir=`cd $ac_aux_dir && pwd` |
6726e1ea | 938 | echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6 |
225247f0 | 939 | echo "configure:940: checking for working aclocal-${am__api_version}" >&5 |
252b5132 RH |
940 | # Run test in a subshell; some versions of sh will print an error if |
941 | # an executable is not found, even if stderr is redirected. | |
942 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
6726e1ea L |
943 | if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then |
944 | ACLOCAL=aclocal-${am__api_version} | |
6be7c12c | 945 | echo "$ac_t""found" 1>&6 |
252b5132 | 946 | else |
6726e1ea | 947 | ACLOCAL="$missing_dir/missing aclocal-${am__api_version}" |
6be7c12c | 948 | echo "$ac_t""missing" 1>&6 |
252b5132 RH |
949 | fi |
950 | ||
6be7c12c | 951 | echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 |
225247f0 | 952 | echo "configure:953: checking for working autoconf" >&5 |
252b5132 RH |
953 | # Run test in a subshell; some versions of sh will print an error if |
954 | # an executable is not found, even if stderr is redirected. | |
955 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
956 | if (autoconf --version) < /dev/null > /dev/null 2>&1; then | |
957 | AUTOCONF=autoconf | |
6be7c12c | 958 | echo "$ac_t""found" 1>&6 |
252b5132 RH |
959 | else |
960 | AUTOCONF="$missing_dir/missing autoconf" | |
6be7c12c | 961 | echo "$ac_t""missing" 1>&6 |
252b5132 RH |
962 | fi |
963 | ||
6726e1ea | 964 | echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6 |
225247f0 | 965 | echo "configure:966: checking for working automake-${am__api_version}" >&5 |
252b5132 RH |
966 | # Run test in a subshell; some versions of sh will print an error if |
967 | # an executable is not found, even if stderr is redirected. | |
968 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
6726e1ea L |
969 | if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then |
970 | AUTOMAKE=automake-${am__api_version} | |
6be7c12c | 971 | echo "$ac_t""found" 1>&6 |
252b5132 | 972 | else |
6726e1ea | 973 | AUTOMAKE="$missing_dir/missing automake-${am__api_version}" |
6be7c12c | 974 | echo "$ac_t""missing" 1>&6 |
252b5132 RH |
975 | fi |
976 | ||
6be7c12c | 977 | echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 |
225247f0 | 978 | echo "configure:979: checking for working autoheader" >&5 |
252b5132 RH |
979 | # Run test in a subshell; some versions of sh will print an error if |
980 | # an executable is not found, even if stderr is redirected. | |
981 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
982 | if (autoheader --version) < /dev/null > /dev/null 2>&1; then | |
983 | AUTOHEADER=autoheader | |
6be7c12c | 984 | echo "$ac_t""found" 1>&6 |
252b5132 RH |
985 | else |
986 | AUTOHEADER="$missing_dir/missing autoheader" | |
6be7c12c | 987 | echo "$ac_t""missing" 1>&6 |
252b5132 RH |
988 | fi |
989 | ||
6be7c12c | 990 | echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 |
225247f0 | 991 | echo "configure:992: checking for working makeinfo" >&5 |
252b5132 RH |
992 | # Run test in a subshell; some versions of sh will print an error if |
993 | # an executable is not found, even if stderr is redirected. | |
994 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
995 | if (makeinfo --version) < /dev/null > /dev/null 2>&1; then | |
996 | MAKEINFO=makeinfo | |
6be7c12c | 997 | echo "$ac_t""found" 1>&6 |
252b5132 RH |
998 | else |
999 | MAKEINFO="$missing_dir/missing makeinfo" | |
6be7c12c | 1000 | echo "$ac_t""missing" 1>&6 |
252b5132 RH |
1001 | fi |
1002 | ||
6be7c12c | 1003 | |
e43d48cc | 1004 | |
6be7c12c AO |
1005 | if test $host != $build; then |
1006 | ac_tool_prefix=${host_alias}- | |
1007 | else | |
1008 | ac_tool_prefix= | |
1009 | fi | |
1010 | ||
1011 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
252b5132 | 1012 | set dummy ${ac_tool_prefix}ar; ac_word=$2 |
6be7c12c | 1013 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
225247f0 | 1014 | echo "configure:1015: checking for $ac_word" >&5 |
6be7c12c AO |
1015 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
1016 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 RH |
1017 | else |
1018 | if test -n "$AR"; then | |
1019 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
1020 | else | |
6be7c12c AO |
1021 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1022 | ac_dummy="$PATH" | |
1023 | for ac_dir in $ac_dummy; do | |
1024 | test -z "$ac_dir" && ac_dir=. | |
1025 | if test -f $ac_dir/$ac_word; then | |
1026 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
1027 | break | |
1028 | fi | |
1029 | done | |
1030 | IFS="$ac_save_ifs" | |
1031 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" | |
252b5132 RH |
1032 | fi |
1033 | fi | |
6be7c12c | 1034 | AR="$ac_cv_prog_AR" |
252b5132 | 1035 | if test -n "$AR"; then |
6be7c12c | 1036 | echo "$ac_t""$AR" 1>&6 |
252b5132 | 1037 | else |
6be7c12c | 1038 | echo "$ac_t""no" 1>&6 |
252b5132 RH |
1039 | fi |
1040 | ||
1041 | ||
6be7c12c AO |
1042 | |
1043 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
252b5132 | 1044 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 |
6be7c12c | 1045 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
225247f0 | 1046 | echo "configure:1047: checking for $ac_word" >&5 |
6be7c12c AO |
1047 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1048 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 RH |
1049 | else |
1050 | if test -n "$RANLIB"; then | |
1051 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1052 | else | |
6be7c12c AO |
1053 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1054 | ac_dummy="$PATH" | |
1055 | for ac_dir in $ac_dummy; do | |
1056 | test -z "$ac_dir" && ac_dir=. | |
1057 | if test -f $ac_dir/$ac_word; then | |
1058 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
1059 | break | |
1060 | fi | |
1061 | done | |
1062 | IFS="$ac_save_ifs" | |
252b5132 RH |
1063 | fi |
1064 | fi | |
6be7c12c | 1065 | RANLIB="$ac_cv_prog_RANLIB" |
252b5132 | 1066 | if test -n "$RANLIB"; then |
6be7c12c | 1067 | echo "$ac_t""$RANLIB" 1>&6 |
252b5132 | 1068 | else |
6be7c12c | 1069 | echo "$ac_t""no" 1>&6 |
252b5132 RH |
1070 | fi |
1071 | ||
6be7c12c | 1072 | |
252b5132 | 1073 | if test -z "$ac_cv_prog_RANLIB"; then |
6be7c12c | 1074 | if test -n "$ac_tool_prefix"; then |
252b5132 RH |
1075 | # Extract the first word of "ranlib", so it can be a program name with args. |
1076 | set dummy ranlib; ac_word=$2 | |
6be7c12c | 1077 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
225247f0 | 1078 | echo "configure:1079: checking for $ac_word" >&5 |
6be7c12c AO |
1079 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1080 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1081 | else | |
1082 | if test -n "$RANLIB"; then | |
1083 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1084 | else | |
1085 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1086 | ac_dummy="$PATH" | |
1087 | for ac_dir in $ac_dummy; do | |
1088 | test -z "$ac_dir" && ac_dir=. | |
1089 | if test -f $ac_dir/$ac_word; then | |
1090 | ac_cv_prog_RANLIB="ranlib" | |
1091 | break | |
1092 | fi | |
1093 | done | |
1094 | IFS="$ac_save_ifs" | |
1095 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
252b5132 RH |
1096 | fi |
1097 | fi | |
6be7c12c AO |
1098 | RANLIB="$ac_cv_prog_RANLIB" |
1099 | if test -n "$RANLIB"; then | |
1100 | echo "$ac_t""$RANLIB" 1>&6 | |
252b5132 | 1101 | else |
6be7c12c | 1102 | echo "$ac_t""no" 1>&6 |
252b5132 RH |
1103 | fi |
1104 | ||
1105 | else | |
6be7c12c | 1106 | RANLIB=":" |
252b5132 | 1107 | fi |
6be7c12c AO |
1108 | fi |
1109 | ||
252b5132 RH |
1110 | |
1111 | # Check whether --enable-shared or --disable-shared was given. | |
1112 | if test "${enable_shared+set}" = set; then | |
1113 | enableval="$enable_shared" | |
1114 | p=${PACKAGE-default} | |
55c80943 | 1115 | case $enableval in |
252b5132 RH |
1116 | yes) enable_shared=yes ;; |
1117 | no) enable_shared=no ;; | |
1118 | *) | |
1119 | enable_shared=no | |
1120 | # Look at the argument we got. We use all the common list separators. | |
1121 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
1122 | for pkg in $enableval; do | |
1123 | if test "X$pkg" = "X$p"; then | |
1124 | enable_shared=yes | |
1125 | fi | |
1126 | done | |
1127 | IFS="$ac_save_ifs" | |
1128 | ;; | |
1129 | esac | |
1130 | else | |
1131 | enable_shared=no | |
6be7c12c AO |
1132 | fi |
1133 | ||
252b5132 RH |
1134 | |
1135 | # Check whether --enable-static or --disable-static was given. | |
1136 | if test "${enable_static+set}" = set; then | |
1137 | enableval="$enable_static" | |
1138 | p=${PACKAGE-default} | |
55c80943 | 1139 | case $enableval in |
252b5132 RH |
1140 | yes) enable_static=yes ;; |
1141 | no) enable_static=no ;; | |
1142 | *) | |
1143 | enable_static=no | |
1144 | # Look at the argument we got. We use all the common list separators. | |
1145 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
1146 | for pkg in $enableval; do | |
1147 | if test "X$pkg" = "X$p"; then | |
1148 | enable_static=yes | |
1149 | fi | |
1150 | done | |
1151 | IFS="$ac_save_ifs" | |
1152 | ;; | |
1153 | esac | |
1154 | else | |
1155 | enable_static=yes | |
6be7c12c AO |
1156 | fi |
1157 | ||
b2ef150d ILT |
1158 | # Check whether --enable-fast-install or --disable-fast-install was given. |
1159 | if test "${enable_fast_install+set}" = set; then | |
1160 | enableval="$enable_fast_install" | |
1161 | p=${PACKAGE-default} | |
55c80943 | 1162 | case $enableval in |
b2ef150d ILT |
1163 | yes) enable_fast_install=yes ;; |
1164 | no) enable_fast_install=no ;; | |
1165 | *) | |
1166 | enable_fast_install=no | |
1167 | # Look at the argument we got. We use all the common list separators. | |
1168 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
1169 | for pkg in $enableval; do | |
1170 | if test "X$pkg" = "X$p"; then | |
1171 | enable_fast_install=yes | |
1172 | fi | |
1173 | done | |
1174 | IFS="$ac_save_ifs" | |
1175 | ;; | |
1176 | esac | |
1177 | else | |
1178 | enable_fast_install=yes | |
6be7c12c | 1179 | fi |
8d88c4ca | 1180 | |
c5d1701e NC |
1181 | # Extract the first word of "gcc", so it can be a program name with args. |
1182 | set dummy gcc; ac_word=$2 | |
1183 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
225247f0 | 1184 | echo "configure:1185: checking for $ac_word" >&5 |
c5d1701e NC |
1185 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1186 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1187 | else | |
1188 | if test -n "$CC"; then | |
1189 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1190 | else | |
1191 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1192 | ac_dummy="$PATH" | |
1193 | for ac_dir in $ac_dummy; do | |
1194 | test -z "$ac_dir" && ac_dir=. | |
1195 | if test -f $ac_dir/$ac_word; then | |
1196 | ac_cv_prog_CC="gcc" | |
1197 | break | |
1198 | fi | |
1199 | done | |
1200 | IFS="$ac_save_ifs" | |
1201 | fi | |
1202 | fi | |
1203 | CC="$ac_cv_prog_CC" | |
1204 | if test -n "$CC"; then | |
1205 | echo "$ac_t""$CC" 1>&6 | |
1206 | else | |
1207 | echo "$ac_t""no" 1>&6 | |
1208 | fi | |
1209 | ||
1210 | if test -z "$CC"; then | |
1211 | # Extract the first word of "cc", so it can be a program name with args. | |
1212 | set dummy cc; ac_word=$2 | |
1213 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
225247f0 | 1214 | echo "configure:1215: checking for $ac_word" >&5 |
c5d1701e NC |
1215 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1216 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1217 | else | |
1218 | if test -n "$CC"; then | |
1219 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1220 | else | |
1221 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1222 | ac_prog_rejected=no | |
1223 | ac_dummy="$PATH" | |
1224 | for ac_dir in $ac_dummy; do | |
1225 | test -z "$ac_dir" && ac_dir=. | |
1226 | if test -f $ac_dir/$ac_word; then | |
1227 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
1228 | ac_prog_rejected=yes | |
1229 | continue | |
1230 | fi | |
1231 | ac_cv_prog_CC="cc" | |
1232 | break | |
1233 | fi | |
1234 | done | |
1235 | IFS="$ac_save_ifs" | |
1236 | if test $ac_prog_rejected = yes; then | |
1237 | # We found a bogon in the path, so make sure we never use it. | |
1238 | set dummy $ac_cv_prog_CC | |
1239 | shift | |
1240 | if test $# -gt 0; then | |
1241 | # We chose a different compiler from the bogus one. | |
1242 | # However, it has the same basename, so the bogon will be chosen | |
1243 | # first if we set CC to just the basename; use the full file name. | |
1244 | shift | |
1245 | set dummy "$ac_dir/$ac_word" "$@" | |
1246 | shift | |
1247 | ac_cv_prog_CC="$@" | |
1248 | fi | |
1249 | fi | |
1250 | fi | |
1251 | fi | |
1252 | CC="$ac_cv_prog_CC" | |
1253 | if test -n "$CC"; then | |
1254 | echo "$ac_t""$CC" 1>&6 | |
1255 | else | |
1256 | echo "$ac_t""no" 1>&6 | |
1257 | fi | |
1258 | ||
1259 | if test -z "$CC"; then | |
1260 | case "`uname -s`" in | |
1261 | *win32* | *WIN32*) | |
1262 | # Extract the first word of "cl", so it can be a program name with args. | |
1263 | set dummy cl; ac_word=$2 | |
1264 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
225247f0 | 1265 | echo "configure:1266: checking for $ac_word" >&5 |
c5d1701e NC |
1266 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1267 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1268 | else | |
1269 | if test -n "$CC"; then | |
1270 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1271 | else | |
1272 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1273 | ac_dummy="$PATH" | |
1274 | for ac_dir in $ac_dummy; do | |
1275 | test -z "$ac_dir" && ac_dir=. | |
1276 | if test -f $ac_dir/$ac_word; then | |
1277 | ac_cv_prog_CC="cl" | |
1278 | break | |
1279 | fi | |
1280 | done | |
1281 | IFS="$ac_save_ifs" | |
1282 | fi | |
1283 | fi | |
1284 | CC="$ac_cv_prog_CC" | |
1285 | if test -n "$CC"; then | |
1286 | echo "$ac_t""$CC" 1>&6 | |
1287 | else | |
1288 | echo "$ac_t""no" 1>&6 | |
1289 | fi | |
1290 | ;; | |
1291 | esac | |
1292 | fi | |
1293 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
1294 | fi | |
1295 | ||
1296 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
225247f0 | 1297 | echo "configure:1298: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
c5d1701e NC |
1298 | |
1299 | ac_ext=c | |
1300 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1301 | ac_cpp='$CPP $CPPFLAGS' | |
1302 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1303 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1304 | cross_compiling=$ac_cv_prog_cc_cross | |
1305 | ||
1306 | cat > conftest.$ac_ext << EOF | |
1307 | ||
225247f0 | 1308 | #line 1309 "configure" |
c5d1701e NC |
1309 | #include "confdefs.h" |
1310 | ||
1311 | main(){return(0);} | |
1312 | EOF | |
225247f0 | 1313 | if { (eval echo configure:1314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c5d1701e NC |
1314 | ac_cv_prog_cc_works=yes |
1315 | # If we can't run a trivial program, we are probably using a cross compiler. | |
1316 | if (./conftest; exit) 2>/dev/null; then | |
1317 | ac_cv_prog_cc_cross=no | |
1318 | else | |
1319 | ac_cv_prog_cc_cross=yes | |
1320 | fi | |
1321 | else | |
1322 | echo "configure: failed program was:" >&5 | |
1323 | cat conftest.$ac_ext >&5 | |
1324 | ac_cv_prog_cc_works=no | |
1325 | fi | |
1326 | rm -fr conftest* | |
1327 | ac_ext=c | |
1328 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1329 | ac_cpp='$CPP $CPPFLAGS' | |
1330 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1331 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1332 | cross_compiling=$ac_cv_prog_cc_cross | |
1333 | ||
1334 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
1335 | if test $ac_cv_prog_cc_works = no; then | |
1336 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
1337 | fi | |
1338 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
225247f0 | 1339 | echo "configure:1340: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
c5d1701e NC |
1340 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
1341 | cross_compiling=$ac_cv_prog_cc_cross | |
1342 | ||
1343 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
225247f0 | 1344 | echo "configure:1345: checking whether we are using GNU C" >&5 |
c5d1701e NC |
1345 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
1346 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1347 | else | |
1348 | cat > conftest.c <<EOF | |
1349 | #ifdef __GNUC__ | |
1350 | yes; | |
1351 | #endif | |
1352 | EOF | |
225247f0 | 1353 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
c5d1701e NC |
1354 | ac_cv_prog_gcc=yes |
1355 | else | |
1356 | ac_cv_prog_gcc=no | |
1357 | fi | |
1358 | fi | |
1359 | ||
1360 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
1361 | ||
1362 | if test $ac_cv_prog_gcc = yes; then | |
1363 | GCC=yes | |
1364 | else | |
1365 | GCC= | |
1366 | fi | |
1367 | ||
1368 | ac_test_CFLAGS="${CFLAGS+set}" | |
1369 | ac_save_CFLAGS="$CFLAGS" | |
1370 | CFLAGS= | |
1371 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
225247f0 | 1372 | echo "configure:1373: checking whether ${CC-cc} accepts -g" >&5 |
c5d1701e NC |
1373 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
1374 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1375 | else | |
1376 | echo 'void f(){}' > conftest.c | |
1377 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
1378 | ac_cv_prog_cc_g=yes | |
1379 | else | |
1380 | ac_cv_prog_cc_g=no | |
1381 | fi | |
1382 | rm -f conftest* | |
1383 | ||
1384 | fi | |
1385 | ||
1386 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
1387 | if test "$ac_test_CFLAGS" = set; then | |
1388 | CFLAGS="$ac_save_CFLAGS" | |
1389 | elif test $ac_cv_prog_cc_g = yes; then | |
1390 | if test "$GCC" = yes; then | |
1391 | CFLAGS="-g -O2" | |
1392 | else | |
1393 | CFLAGS="-g" | |
1394 | fi | |
1395 | else | |
1396 | if test "$GCC" = yes; then | |
1397 | CFLAGS="-O2" | |
1398 | else | |
1399 | CFLAGS= | |
1400 | fi | |
1401 | fi | |
1402 | ||
252b5132 RH |
1403 | # Check whether --with-gnu-ld or --without-gnu-ld was given. |
1404 | if test "${with_gnu_ld+set}" = set; then | |
1405 | withval="$with_gnu_ld" | |
1406 | test "$withval" = no || with_gnu_ld=yes | |
1407 | else | |
1408 | with_gnu_ld=no | |
6be7c12c AO |
1409 | fi |
1410 | ||
252b5132 | 1411 | ac_prog=ld |
55c80943 | 1412 | if test "$GCC" = yes; then |
252b5132 | 1413 | # Check if gcc -print-prog-name=ld gives a path. |
6be7c12c | 1414 | echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 |
225247f0 | 1415 | echo "configure:1416: checking for ld used by GCC" >&5 |
ac48eca1 AO |
1416 | case $host in |
1417 | *-*-mingw*) | |
1418 | # gcc leaves a trailing carriage return which upsets mingw | |
1419 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
1420 | *) | |
1421 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
1422 | esac | |
55c80943 | 1423 | case $ac_prog in |
b2ef150d | 1424 | # Accept absolute paths. |
a74801ba | 1425 | [\\/]* | [A-Za-z]:[\\/]*) |
b2ef150d ILT |
1426 | re_direlt='/[^/][^/]*/\.\./' |
1427 | # Canonicalize the path of ld | |
1428 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
1429 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
1430 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
1431 | done | |
1432 | test -z "$LD" && LD="$ac_prog" | |
1433 | ;; | |
252b5132 RH |
1434 | "") |
1435 | # If it fails, then pretend we aren't using GCC. | |
1436 | ac_prog=ld | |
1437 | ;; | |
1438 | *) | |
1439 | # If it is relative, then search for the first ld in PATH. | |
1440 | with_gnu_ld=unknown | |
1441 | ;; | |
1442 | esac | |
1443 | elif test "$with_gnu_ld" = yes; then | |
6be7c12c | 1444 | echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 |
225247f0 | 1445 | echo "configure:1446: checking for GNU ld" >&5 |
252b5132 | 1446 | else |
6be7c12c | 1447 | echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 |
225247f0 | 1448 | echo "configure:1449: checking for non-GNU ld" >&5 |
252b5132 | 1449 | fi |
6be7c12c AO |
1450 | if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then |
1451 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 RH |
1452 | else |
1453 | if test -z "$LD"; then | |
a74801ba | 1454 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" |
252b5132 RH |
1455 | for ac_dir in $PATH; do |
1456 | test -z "$ac_dir" && ac_dir=. | |
a74801ba | 1457 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
55c80943 | 1458 | lt_cv_path_LD="$ac_dir/$ac_prog" |
252b5132 RH |
1459 | # Check to see if the program is GNU ld. I'd rather use --version, |
1460 | # but apparently some GNU ld's only accept -v. | |
1461 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
55c80943 | 1462 | if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
252b5132 RH |
1463 | test "$with_gnu_ld" != no && break |
1464 | else | |
b2ef150d | 1465 | test "$with_gnu_ld" != yes && break |
252b5132 RH |
1466 | fi |
1467 | fi | |
1468 | done | |
1469 | IFS="$ac_save_ifs" | |
1470 | else | |
55c80943 | 1471 | lt_cv_path_LD="$LD" # Let the user override the test with a path. |
252b5132 RH |
1472 | fi |
1473 | fi | |
1474 | ||
55c80943 | 1475 | LD="$lt_cv_path_LD" |
252b5132 | 1476 | if test -n "$LD"; then |
6be7c12c | 1477 | echo "$ac_t""$LD" 1>&6 |
252b5132 | 1478 | else |
6be7c12c | 1479 | echo "$ac_t""no" 1>&6 |
252b5132 | 1480 | fi |
6be7c12c AO |
1481 | test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } |
1482 | echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 | |
225247f0 | 1483 | echo "configure:1484: checking if the linker ($LD) is GNU ld" >&5 |
6be7c12c AO |
1484 | if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then |
1485 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 RH |
1486 | else |
1487 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
1488 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
55c80943 | 1489 | lt_cv_prog_gnu_ld=yes |
252b5132 | 1490 | else |
55c80943 | 1491 | lt_cv_prog_gnu_ld=no |
252b5132 RH |
1492 | fi |
1493 | fi | |
6be7c12c AO |
1494 | |
1495 | echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6 | |
55c80943 | 1496 | with_gnu_ld=$lt_cv_prog_gnu_ld |
252b5132 | 1497 | |
6be7c12c AO |
1498 | |
1499 | echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 | |
225247f0 | 1500 | echo "configure:1501: checking for $LD option to reload object files" >&5 |
6be7c12c AO |
1501 | if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then |
1502 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ac48eca1 AO |
1503 | else |
1504 | lt_cv_ld_reload_flag='-r' | |
1505 | fi | |
6be7c12c AO |
1506 | |
1507 | echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6 | |
ac48eca1 AO |
1508 | reload_flag=$lt_cv_ld_reload_flag |
1509 | test -n "$reload_flag" && reload_flag=" $reload_flag" | |
1510 | ||
6be7c12c | 1511 | echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 |
225247f0 | 1512 | echo "configure:1513: checking for BSD-compatible nm" >&5 |
6be7c12c AO |
1513 | if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then |
1514 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 RH |
1515 | else |
1516 | if test -n "$NM"; then | |
1517 | # Let the user override the test. | |
55c80943 | 1518 | lt_cv_path_NM="$NM" |
252b5132 | 1519 | else |
a74801ba | 1520 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" |
b2ef150d | 1521 | for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do |
252b5132 | 1522 | test -z "$ac_dir" && ac_dir=. |
ac48eca1 AO |
1523 | tmp_nm=$ac_dir/${ac_tool_prefix}nm |
1524 | if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then | |
252b5132 RH |
1525 | # Check to see if the nm accepts a BSD-compat flag. |
1526 | # Adding the `sed 1q' prevents false positives on HP-UX, which says: | |
1527 | # nm: unknown option "B" ignored | |
90f2472a AO |
1528 | # Tru64's nm complains that /dev/null is an invalid object file |
1529 | if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then | |
55c80943 | 1530 | lt_cv_path_NM="$tmp_nm -B" |
b2ef150d | 1531 | break |
ac48eca1 | 1532 | elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
55c80943 | 1533 | lt_cv_path_NM="$tmp_nm -p" |
b2ef150d | 1534 | break |
252b5132 | 1535 | else |
55c80943 | 1536 | lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but |
b2ef150d | 1537 | continue # so that we can try to find one that supports BSD flags |
252b5132 | 1538 | fi |
252b5132 RH |
1539 | fi |
1540 | done | |
1541 | IFS="$ac_save_ifs" | |
55c80943 | 1542 | test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm |
252b5132 RH |
1543 | fi |
1544 | fi | |
1545 | ||
55c80943 | 1546 | NM="$lt_cv_path_NM" |
6be7c12c | 1547 | echo "$ac_t""$NM" 1>&6 |
252b5132 | 1548 | |
6be7c12c | 1549 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
225247f0 | 1550 | echo "configure:1551: checking whether ln -s works" >&5 |
6be7c12c AO |
1551 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
1552 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1553 | else | |
1554 | rm -f conftestdata | |
1555 | if ln -s X conftestdata 2>/dev/null | |
1556 | then | |
1557 | rm -f conftestdata | |
1558 | ac_cv_prog_LN_S="ln -s" | |
252b5132 | 1559 | else |
6be7c12c AO |
1560 | ac_cv_prog_LN_S=ln |
1561 | fi | |
1562 | fi | |
1563 | LN_S="$ac_cv_prog_LN_S" | |
1564 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
1565 | echo "$ac_t""yes" 1>&6 | |
1566 | else | |
1567 | echo "$ac_t""no" 1>&6 | |
252b5132 RH |
1568 | fi |
1569 | ||
6be7c12c | 1570 | echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 |
225247f0 | 1571 | echo "configure:1572: checking how to recognise dependant libraries" >&5 |
6be7c12c AO |
1572 | if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then |
1573 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ac48eca1 | 1574 | else |
d64552c5 | 1575 | lt_cv_file_magic_cmd='$MAGIC_CMD' |
ac48eca1 AO |
1576 | lt_cv_file_magic_test_file= |
1577 | lt_cv_deplibs_check_method='unknown' | |
1578 | # Need to set the preceding variable on all platforms that support | |
1579 | # interlibrary dependencies. | |
1580 | # 'none' -- dependencies not supported. | |
1581 | # `unknown' -- same as none, but documents that we really don't know. | |
1582 | # 'pass_all' -- all dependencies passed with no checks. | |
1583 | # 'test_compile' -- check by making test program. | |
1584 | # 'file_magic [regex]' -- check by looking for files in library path | |
1585 | # which responds to the $file_magic_cmd with a given egrep regex. | |
1586 | # If you have `file' or equivalent on your system and you're not sure | |
1587 | # whether `pass_all' will *always* work, you probably want this one. | |
1588 | ||
55c80943 NC |
1589 | case $host_os in |
1590 | aix*) | |
ac48eca1 AO |
1591 | lt_cv_deplibs_check_method=pass_all |
1592 | ;; | |
1593 | ||
1594 | beos*) | |
1595 | lt_cv_deplibs_check_method=pass_all | |
1596 | ;; | |
1597 | ||
1598 | bsdi4*) | |
55c80943 NC |
1599 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' |
1600 | lt_cv_file_magic_cmd='/usr/bin/file -L' | |
ac48eca1 AO |
1601 | lt_cv_file_magic_test_file=/shlib/libc.so |
1602 | ;; | |
1603 | ||
d64552c5 | 1604 | cygwin* | mingw* |pw32*) |
ac48eca1 | 1605 | lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' |
d64552c5 | 1606 | lt_cv_file_magic_cmd='$OBJDUMP -f' |
ac48eca1 AO |
1607 | ;; |
1608 | ||
55c80943 NC |
1609 | darwin* | rhapsody*) |
1610 | lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' | |
b3baf5d0 NC |
1611 | lt_cv_file_magic_cmd='/usr/bin/file -L' |
1612 | case "$host_os" in | |
1613 | rhapsody* | darwin1.012) | |
1614 | lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System' | |
1615 | ;; | |
1616 | *) # Darwin 1.3 on | |
1617 | lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' | |
1618 | ;; | |
1619 | esac | |
55c80943 NC |
1620 | ;; |
1621 | ||
bc286f95 | 1622 | freebsd* ) |
ac48eca1 | 1623 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
55c80943 | 1624 | case $host_cpu in |
ac48eca1 | 1625 | i*86 ) |
90f2472a AO |
1626 | # Not sure whether the presence of OpenBSD here was a mistake. |
1627 | # Let's accept both of them until this is cleared up. | |
55c80943 NC |
1628 | lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' |
1629 | lt_cv_file_magic_cmd=/usr/bin/file | |
ac48eca1 AO |
1630 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
1631 | ;; | |
1632 | esac | |
1633 | else | |
1634 | lt_cv_deplibs_check_method=pass_all | |
1635 | fi | |
1636 | ;; | |
1637 | ||
1638 | gnu*) | |
1639 | lt_cv_deplibs_check_method=pass_all | |
1640 | ;; | |
1641 | ||
55c80943 | 1642 | hpux10.20*|hpux11*) |
4867be41 DJ |
1643 | case $host_cpu in |
1644 | hppa*) | |
1645 | lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' | |
1646 | lt_cv_file_magic_cmd=/usr/bin/file | |
1647 | lt_cv_file_magic_test_file=/usr/lib/libc.sl | |
1648 | ;; | |
1649 | ia64*) | |
1650 | lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' | |
1651 | lt_cv_file_magic_cmd=/usr/bin/file | |
1652 | lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so | |
1653 | ;; | |
1654 | esac | |
ac48eca1 AO |
1655 | ;; |
1656 | ||
1657 | irix5* | irix6*) | |
55c80943 | 1658 | case $host_os in |
ac48eca1 AO |
1659 | irix5*) |
1660 | # this will be overridden with pass_all, but let us keep it just in case | |
1661 | lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" | |
1662 | ;; | |
1663 | *) | |
55c80943 | 1664 | case $LD in |
ac48eca1 AO |
1665 | *-32|*"-32 ") libmagic=32-bit;; |
1666 | *-n32|*"-n32 ") libmagic=N32;; | |
1667 | *-64|*"-64 ") libmagic=64-bit;; | |
1668 | *) libmagic=never-match;; | |
1669 | esac | |
1670 | # this will be overridden with pass_all, but let us keep it just in case | |
55c80943 NC |
1671 | lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" |
1672 | ;; | |
ac48eca1 AO |
1673 | esac |
1674 | lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` | |
1675 | lt_cv_deplibs_check_method=pass_all | |
1676 | ;; | |
1677 | ||
1678 | # This must be Linux ELF. | |
90f2472a | 1679 | linux-gnu*) |
55c80943 | 1680 | case $host_cpu in |
c5d1701e | 1681 | alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* ) |
ac48eca1 AO |
1682 | lt_cv_deplibs_check_method=pass_all ;; |
1683 | *) | |
1684 | # glibc up to 2.1.1 does not perform some relocations on ARM | |
55c80943 NC |
1685 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; |
1686 | esac | |
ac48eca1 AO |
1687 | lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` |
1688 | ;; | |
1689 | ||
bc286f95 | 1690 | netbsd*) |
55c80943 | 1691 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
b3baf5d0 | 1692 | lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' |
ac48eca1 | 1693 | else |
b3baf5d0 | 1694 | lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$' |
ac48eca1 | 1695 | fi |
55c80943 NC |
1696 | ;; |
1697 | ||
1698 | newsos6) | |
1699 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' | |
1700 | lt_cv_file_magic_cmd=/usr/bin/file | |
1701 | lt_cv_file_magic_test_file=/usr/lib/libnls.so | |
ac48eca1 AO |
1702 | ;; |
1703 | ||
1704 | osf3* | osf4* | osf5*) | |
1705 | # this will be overridden with pass_all, but let us keep it just in case | |
1706 | lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' | |
1707 | lt_cv_file_magic_test_file=/shlib/libc.so | |
1708 | lt_cv_deplibs_check_method=pass_all | |
1709 | ;; | |
1710 | ||
1711 | sco3.2v5*) | |
1712 | lt_cv_deplibs_check_method=pass_all | |
1713 | ;; | |
1714 | ||
1715 | solaris*) | |
1716 | lt_cv_deplibs_check_method=pass_all | |
1717 | lt_cv_file_magic_test_file=/lib/libc.so | |
1718 | ;; | |
1719 | ||
6be7c12c AO |
1720 | sysv5uw[78]* | sysv4*uw2*) |
1721 | lt_cv_deplibs_check_method=pass_all | |
1722 | ;; | |
1723 | ||
ac48eca1 | 1724 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
55c80943 | 1725 | case $host_vendor in |
ac48eca1 AO |
1726 | ncr) |
1727 | lt_cv_deplibs_check_method=pass_all | |
1728 | ;; | |
1729 | motorola) | |
55c80943 NC |
1730 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' |
1731 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` | |
ac48eca1 AO |
1732 | ;; |
1733 | esac | |
1734 | ;; | |
1735 | esac | |
1736 | ||
1737 | fi | |
6be7c12c AO |
1738 | |
1739 | echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6 | |
ac48eca1 AO |
1740 | file_magic_cmd=$lt_cv_file_magic_cmd |
1741 | deplibs_check_method=$lt_cv_deplibs_check_method | |
1742 | ||
6be7c12c | 1743 | echo $ac_n "checking for object suffix""... $ac_c" 1>&6 |
225247f0 | 1744 | echo "configure:1745: checking for object suffix" >&5 |
6be7c12c AO |
1745 | if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then |
1746 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1747 | else | |
1748 | rm -f conftest* | |
1749 | echo 'int i = 1;' > conftest.$ac_ext | |
225247f0 | 1750 | if { (eval echo configure:1751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c AO |
1751 | for ac_file in conftest.*; do |
1752 | case $ac_file in | |
1753 | *.c) ;; | |
1754 | *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; | |
1755 | esac | |
1756 | done | |
1757 | else | |
1758 | { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; } | |
1759 | fi | |
1760 | rm -f conftest* | |
1761 | fi | |
ac48eca1 | 1762 | |
6be7c12c AO |
1763 | echo "$ac_t""$ac_cv_objext" 1>&6 |
1764 | OBJEXT=$ac_cv_objext | |
1765 | ac_objext=$ac_cv_objext | |
1766 | ||
1767 | ||
1768 | ||
1769 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
225247f0 | 1770 | echo "configure:1771: checking for executable suffix" >&5 |
6be7c12c AO |
1771 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
1772 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ac48eca1 | 1773 | else |
6be7c12c AO |
1774 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then |
1775 | ac_cv_exeext=.exe | |
1776 | else | |
1777 | rm -f conftest* | |
1778 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
1779 | ac_cv_exeext= | |
225247f0 | 1780 | if { (eval echo configure:1781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
6be7c12c AO |
1781 | for file in conftest.*; do |
1782 | case $file in | |
225247f0 | 1783 | *.c | *.o | *.obj) ;; |
6be7c12c AO |
1784 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
1785 | esac | |
1786 | done | |
1787 | else | |
1788 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
1789 | fi | |
1790 | rm -f conftest* | |
1791 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
1792 | fi | |
1793 | fi | |
1794 | ||
1795 | EXEEXT="" | |
1796 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
1797 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
1798 | ac_exeext=$EXEEXT | |
1799 | ||
1800 | # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! | |
1801 | ||
1802 | # Only perform the check for file, if the check method requires it | |
1803 | case $deplibs_check_method in | |
1804 | file_magic*) | |
1805 | if test "$file_magic_cmd" = '$MAGIC_CMD'; then | |
1806 | echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 | |
225247f0 | 1807 | echo "configure:1808: checking for ${ac_tool_prefix}file" >&5 |
6be7c12c AO |
1808 | if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then |
1809 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1810 | else | |
1811 | case $MAGIC_CMD in | |
1812 | /*) | |
1813 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. | |
1814 | ;; | |
1815 | ?:/*) | |
1816 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. | |
1817 | ;; | |
1818 | *) | |
d64552c5 | 1819 | ac_save_MAGIC_CMD="$MAGIC_CMD" |
ac48eca1 AO |
1820 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1821 | ac_dummy="/usr/bin:$PATH" | |
1822 | for ac_dir in $ac_dummy; do | |
1823 | test -z "$ac_dir" && ac_dir=. | |
1824 | if test -f $ac_dir/${ac_tool_prefix}file; then | |
d64552c5 | 1825 | lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" |
ac48eca1 | 1826 | if test -n "$file_magic_test_file"; then |
55c80943 | 1827 | case $deplibs_check_method in |
ac48eca1 AO |
1828 | "file_magic "*) |
1829 | file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" | |
d64552c5 | 1830 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
ac48eca1 AO |
1831 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | |
1832 | egrep "$file_magic_regex" > /dev/null; then | |
1833 | : | |
1834 | else | |
1835 | cat <<EOF 1>&2 | |
1836 | ||
1837 | *** Warning: the command libtool uses to detect shared libraries, | |
1838 | *** $file_magic_cmd, produces output that libtool cannot recognize. | |
1839 | *** The result is that libtool may fail to recognize shared libraries | |
1840 | *** as such. This will affect the creation of libtool libraries that | |
1841 | *** depend on shared libraries, but programs linked with such libtool | |
1842 | *** libraries will work regardless of this problem. Nevertheless, you | |
1843 | *** may want to report the problem to your system manager and/or to | |
1844 | *** bug-libtool@gnu.org | |
1845 | ||
1846 | EOF | |
1847 | fi ;; | |
1848 | esac | |
1849 | fi | |
1850 | break | |
1851 | fi | |
1852 | done | |
1853 | IFS="$ac_save_ifs" | |
d64552c5 | 1854 | MAGIC_CMD="$ac_save_MAGIC_CMD" |
ac48eca1 AO |
1855 | ;; |
1856 | esac | |
1857 | fi | |
1858 | ||
d64552c5 AO |
1859 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
1860 | if test -n "$MAGIC_CMD"; then | |
6be7c12c | 1861 | echo "$ac_t""$MAGIC_CMD" 1>&6 |
ac48eca1 | 1862 | else |
6be7c12c | 1863 | echo "$ac_t""no" 1>&6 |
ac48eca1 AO |
1864 | fi |
1865 | ||
d64552c5 | 1866 | if test -z "$lt_cv_path_MAGIC_CMD"; then |
ac48eca1 | 1867 | if test -n "$ac_tool_prefix"; then |
6be7c12c | 1868 | echo $ac_n "checking for file""... $ac_c" 1>&6 |
225247f0 | 1869 | echo "configure:1870: checking for file" >&5 |
6be7c12c AO |
1870 | if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then |
1871 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ac48eca1 | 1872 | else |
55c80943 | 1873 | case $MAGIC_CMD in |
ac48eca1 | 1874 | /*) |
d64552c5 | 1875 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. |
ac48eca1 AO |
1876 | ;; |
1877 | ?:/*) | |
d64552c5 | 1878 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. |
ac48eca1 AO |
1879 | ;; |
1880 | *) | |
d64552c5 | 1881 | ac_save_MAGIC_CMD="$MAGIC_CMD" |
ac48eca1 AO |
1882 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1883 | ac_dummy="/usr/bin:$PATH" | |
1884 | for ac_dir in $ac_dummy; do | |
1885 | test -z "$ac_dir" && ac_dir=. | |
1886 | if test -f $ac_dir/file; then | |
d64552c5 | 1887 | lt_cv_path_MAGIC_CMD="$ac_dir/file" |
ac48eca1 | 1888 | if test -n "$file_magic_test_file"; then |
55c80943 | 1889 | case $deplibs_check_method in |
ac48eca1 AO |
1890 | "file_magic "*) |
1891 | file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" | |
d64552c5 | 1892 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
ac48eca1 AO |
1893 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | |
1894 | egrep "$file_magic_regex" > /dev/null; then | |
1895 | : | |
1896 | else | |
1897 | cat <<EOF 1>&2 | |
1898 | ||
1899 | *** Warning: the command libtool uses to detect shared libraries, | |
1900 | *** $file_magic_cmd, produces output that libtool cannot recognize. | |
1901 | *** The result is that libtool may fail to recognize shared libraries | |
1902 | *** as such. This will affect the creation of libtool libraries that | |
1903 | *** depend on shared libraries, but programs linked with such libtool | |
1904 | *** libraries will work regardless of this problem. Nevertheless, you | |
1905 | *** may want to report the problem to your system manager and/or to | |
1906 | *** bug-libtool@gnu.org | |
1907 | ||
1908 | EOF | |
1909 | fi ;; | |
1910 | esac | |
1911 | fi | |
1912 | break | |
1913 | fi | |
1914 | done | |
1915 | IFS="$ac_save_ifs" | |
d64552c5 | 1916 | MAGIC_CMD="$ac_save_MAGIC_CMD" |
ac48eca1 AO |
1917 | ;; |
1918 | esac | |
1919 | fi | |
1920 | ||
d64552c5 AO |
1921 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
1922 | if test -n "$MAGIC_CMD"; then | |
6be7c12c | 1923 | echo "$ac_t""$MAGIC_CMD" 1>&6 |
ac48eca1 | 1924 | else |
6be7c12c | 1925 | echo "$ac_t""no" 1>&6 |
ac48eca1 AO |
1926 | fi |
1927 | ||
1928 | else | |
d64552c5 | 1929 | MAGIC_CMD=: |
ac48eca1 AO |
1930 | fi |
1931 | fi | |
1932 | ||
1933 | fi | |
1934 | ;; | |
1935 | esac | |
1936 | ||
6be7c12c | 1937 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. |
ac48eca1 | 1938 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 |
6be7c12c | 1939 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
225247f0 | 1940 | echo "configure:1941: checking for $ac_word" >&5 |
6be7c12c AO |
1941 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1942 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ac48eca1 AO |
1943 | else |
1944 | if test -n "$RANLIB"; then | |
1945 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1946 | else | |
6be7c12c AO |
1947 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1948 | ac_dummy="$PATH" | |
1949 | for ac_dir in $ac_dummy; do | |
1950 | test -z "$ac_dir" && ac_dir=. | |
1951 | if test -f $ac_dir/$ac_word; then | |
1952 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
1953 | break | |
1954 | fi | |
1955 | done | |
1956 | IFS="$ac_save_ifs" | |
ac48eca1 AO |
1957 | fi |
1958 | fi | |
6be7c12c | 1959 | RANLIB="$ac_cv_prog_RANLIB" |
ac48eca1 | 1960 | if test -n "$RANLIB"; then |
6be7c12c | 1961 | echo "$ac_t""$RANLIB" 1>&6 |
ac48eca1 | 1962 | else |
6be7c12c | 1963 | echo "$ac_t""no" 1>&6 |
ac48eca1 AO |
1964 | fi |
1965 | ||
6be7c12c | 1966 | |
ac48eca1 | 1967 | if test -z "$ac_cv_prog_RANLIB"; then |
6be7c12c | 1968 | if test -n "$ac_tool_prefix"; then |
ac48eca1 AO |
1969 | # Extract the first word of "ranlib", so it can be a program name with args. |
1970 | set dummy ranlib; ac_word=$2 | |
6be7c12c | 1971 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
225247f0 | 1972 | echo "configure:1973: checking for $ac_word" >&5 |
6be7c12c AO |
1973 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1974 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1975 | else | |
1976 | if test -n "$RANLIB"; then | |
1977 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1978 | else | |
1979 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1980 | ac_dummy="$PATH" | |
1981 | for ac_dir in $ac_dummy; do | |
1982 | test -z "$ac_dir" && ac_dir=. | |
1983 | if test -f $ac_dir/$ac_word; then | |
1984 | ac_cv_prog_RANLIB="ranlib" | |
1985 | break | |
1986 | fi | |
1987 | done | |
1988 | IFS="$ac_save_ifs" | |
1989 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
ac48eca1 AO |
1990 | fi |
1991 | fi | |
6be7c12c AO |
1992 | RANLIB="$ac_cv_prog_RANLIB" |
1993 | if test -n "$RANLIB"; then | |
1994 | echo "$ac_t""$RANLIB" 1>&6 | |
ac48eca1 | 1995 | else |
6be7c12c | 1996 | echo "$ac_t""no" 1>&6 |
ac48eca1 AO |
1997 | fi |
1998 | ||
1999 | else | |
6be7c12c AO |
2000 | RANLIB=":" |
2001 | fi | |
ac48eca1 AO |
2002 | fi |
2003 | ||
6be7c12c | 2004 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. |
ac48eca1 | 2005 | set dummy ${ac_tool_prefix}strip; ac_word=$2 |
6be7c12c | 2006 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
225247f0 | 2007 | echo "configure:2008: checking for $ac_word" >&5 |
6be7c12c AO |
2008 | if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then |
2009 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ac48eca1 AO |
2010 | else |
2011 | if test -n "$STRIP"; then | |
2012 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
2013 | else | |
6be7c12c AO |
2014 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2015 | ac_dummy="$PATH" | |
2016 | for ac_dir in $ac_dummy; do | |
2017 | test -z "$ac_dir" && ac_dir=. | |
2018 | if test -f $ac_dir/$ac_word; then | |
2019 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
2020 | break | |
2021 | fi | |
2022 | done | |
2023 | IFS="$ac_save_ifs" | |
ac48eca1 AO |
2024 | fi |
2025 | fi | |
6be7c12c | 2026 | STRIP="$ac_cv_prog_STRIP" |
ac48eca1 | 2027 | if test -n "$STRIP"; then |
6be7c12c | 2028 | echo "$ac_t""$STRIP" 1>&6 |
ac48eca1 | 2029 | else |
6be7c12c | 2030 | echo "$ac_t""no" 1>&6 |
ac48eca1 AO |
2031 | fi |
2032 | ||
6be7c12c | 2033 | |
ac48eca1 | 2034 | if test -z "$ac_cv_prog_STRIP"; then |
6be7c12c | 2035 | if test -n "$ac_tool_prefix"; then |
ac48eca1 AO |
2036 | # Extract the first word of "strip", so it can be a program name with args. |
2037 | set dummy strip; ac_word=$2 | |
6be7c12c | 2038 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
225247f0 | 2039 | echo "configure:2040: checking for $ac_word" >&5 |
6be7c12c AO |
2040 | if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then |
2041 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2042 | else | |
2043 | if test -n "$STRIP"; then | |
2044 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
2045 | else | |
2046 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2047 | ac_dummy="$PATH" | |
2048 | for ac_dir in $ac_dummy; do | |
2049 | test -z "$ac_dir" && ac_dir=. | |
2050 | if test -f $ac_dir/$ac_word; then | |
2051 | ac_cv_prog_STRIP="strip" | |
2052 | break | |
2053 | fi | |
2054 | done | |
2055 | IFS="$ac_save_ifs" | |
2056 | test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":" | |
ac48eca1 AO |
2057 | fi |
2058 | fi | |
6be7c12c AO |
2059 | STRIP="$ac_cv_prog_STRIP" |
2060 | if test -n "$STRIP"; then | |
2061 | echo "$ac_t""$STRIP" 1>&6 | |
ac48eca1 | 2062 | else |
6be7c12c | 2063 | echo "$ac_t""no" 1>&6 |
ac48eca1 AO |
2064 | fi |
2065 | ||
2066 | else | |
6be7c12c AO |
2067 | STRIP=":" |
2068 | fi | |
ac48eca1 | 2069 | fi |
252b5132 | 2070 | |
6be7c12c | 2071 | |
252b5132 | 2072 | # Check for any special flags to pass to ltconfig. |
b2ef150d | 2073 | libtool_flags="--cache-file=$cache_file" |
252b5132 RH |
2074 | test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" |
2075 | test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" | |
b2ef150d | 2076 | test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" |
55c80943 NC |
2077 | test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc" |
2078 | test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" | |
252b5132 | 2079 | |
6be7c12c | 2080 | |
a74801ba ILT |
2081 | # Check whether --enable-libtool-lock or --disable-libtool-lock was given. |
2082 | if test "${enable_libtool_lock+set}" = set; then | |
2083 | enableval="$enable_libtool_lock" | |
6be7c12c AO |
2084 | : |
2085 | fi | |
a74801ba ILT |
2086 | |
2087 | test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" | |
2088 | test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" | |
2089 | ||
ac48eca1 AO |
2090 | # Check whether --with-pic or --without-pic was given. |
2091 | if test "${with_pic+set}" = set; then | |
2092 | withval="$with_pic" | |
2093 | pic_mode="$withval" | |
2094 | else | |
2095 | pic_mode=default | |
6be7c12c AO |
2096 | fi |
2097 | ||
ac48eca1 AO |
2098 | test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic" |
2099 | test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" | |
2100 | ||
252b5132 RH |
2101 | # Some flags need to be propagated to the compiler or linker for good |
2102 | # libtool support. | |
55c80943 | 2103 | case $host in |
252b5132 RH |
2104 | *-*-irix6*) |
2105 | # Find out which ABI we are using. | |
225247f0 JT |
2106 | echo '#line 2107 "configure"' > conftest.$ac_ext |
2107 | if { (eval echo configure:2108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
6a457e5c NC |
2108 | if test "$lt_cv_prog_gnu_ld" = yes; then |
2109 | case `/usr/bin/file conftest.$ac_objext` in | |
2110 | *32-bit*) | |
2111 | LD="${LD-ld} -melf32bsmip" | |
2112 | ;; | |
2113 | *N32*) | |
2114 | LD="${LD-ld} -melf32bmipn32" | |
2115 | ;; | |
2116 | *64-bit*) | |
2117 | LD="${LD-ld} -melf64bmip" | |
2118 | ;; | |
2119 | esac | |
2120 | else | |
55c80943 | 2121 | case `/usr/bin/file conftest.$ac_objext` in |
252b5132 RH |
2122 | *32-bit*) |
2123 | LD="${LD-ld} -32" | |
2124 | ;; | |
2125 | *N32*) | |
2126 | LD="${LD-ld} -n32" | |
2127 | ;; | |
2128 | *64-bit*) | |
2129 | LD="${LD-ld} -64" | |
2130 | ;; | |
2131 | esac | |
6a457e5c | 2132 | fi |
252b5132 RH |
2133 | fi |
2134 | rm -rf conftest* | |
2135 | ;; | |
2136 | ||
4867be41 DJ |
2137 | ia64-*-hpux*) |
2138 | # Find out which ABI we are using. | |
2139 | echo 'int i;' > conftest.$ac_ext | |
225247f0 | 2140 | if { (eval echo configure:2141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
4867be41 DJ |
2141 | case "`/usr/bin/file conftest.o`" in |
2142 | *ELF-32*) | |
2143 | HPUX_IA64_MODE="32" | |
2144 | ;; | |
2145 | *ELF-64*) | |
2146 | HPUX_IA64_MODE="64" | |
2147 | ;; | |
2148 | esac | |
2149 | fi | |
2150 | rm -rf conftest* | |
2151 | ;; | |
2152 | ||
252b5132 RH |
2153 | *-*-sco3.2v5*) |
2154 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. | |
b2ef150d | 2155 | SAVE_CFLAGS="$CFLAGS" |
252b5132 | 2156 | CFLAGS="$CFLAGS -belf" |
6be7c12c | 2157 | echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 |
225247f0 | 2158 | echo "configure:2159: checking whether the C compiler needs -belf" >&5 |
6be7c12c AO |
2159 | if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then |
2160 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b2ef150d | 2161 | else |
6be7c12c | 2162 | |
ac48eca1 | 2163 | ac_ext=c |
6be7c12c | 2164 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
ac48eca1 | 2165 | ac_cpp='$CPP $CPPFLAGS' |
6be7c12c AO |
2166 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
2167 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2168 | cross_compiling=$ac_cv_prog_cc_cross | |
ac48eca1 | 2169 | |
6be7c12c | 2170 | cat > conftest.$ac_ext <<EOF |
225247f0 | 2171 | #line 2172 "configure" |
b2ef150d ILT |
2172 | #include "confdefs.h" |
2173 | ||
6be7c12c | 2174 | int main() { |
b2ef150d | 2175 | |
6be7c12c AO |
2176 | ; return 0; } |
2177 | EOF | |
225247f0 | 2178 | if { (eval echo configure:2179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
6be7c12c | 2179 | rm -rf conftest* |
b2ef150d ILT |
2180 | lt_cv_cc_needs_belf=yes |
2181 | else | |
6be7c12c AO |
2182 | echo "configure: failed program was:" >&5 |
2183 | cat conftest.$ac_ext >&5 | |
2184 | rm -rf conftest* | |
2185 | lt_cv_cc_needs_belf=no | |
b2ef150d | 2186 | fi |
6be7c12c | 2187 | rm -f conftest* |
ac48eca1 | 2188 | ac_ext=c |
6be7c12c | 2189 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
ac48eca1 | 2190 | ac_cpp='$CPP $CPPFLAGS' |
6be7c12c AO |
2191 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
2192 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2193 | cross_compiling=$ac_cv_prog_cc_cross | |
ac48eca1 | 2194 | |
b2ef150d | 2195 | fi |
6be7c12c AO |
2196 | |
2197 | echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 | |
b2ef150d ILT |
2198 | if test x"$lt_cv_cc_needs_belf" != x"yes"; then |
2199 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf | |
2200 | CFLAGS="$SAVE_CFLAGS" | |
2201 | fi | |
252b5132 RH |
2202 | ;; |
2203 | ||
6be7c12c | 2204 | |
252b5132 RH |
2205 | esac |
2206 | ||
6be7c12c | 2207 | |
b2ef150d | 2208 | # Save cache, so that ltconfig can load it |
6be7c12c | 2209 | cat > confcache <<\EOF |
b2ef150d ILT |
2210 | # This file is a shell script that caches the results of configure |
2211 | # tests run on this system so they can be shared between configure | |
6be7c12c AO |
2212 | # scripts and configure runs. It is not useful on other systems. |
2213 | # If it contains results you don't want to keep, you may remove or edit it. | |
b2ef150d | 2214 | # |
6be7c12c AO |
2215 | # By default, configure uses ./config.cache as the cache file, |
2216 | # creating it if it does not exist already. You can give configure | |
2217 | # the --cache-file=FILE option to use a different cache file; that is | |
2218 | # what configure does when it calls configure scripts in | |
2219 | # subdirectories, so they share the cache. | |
2220 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
2221 | # config.status only pays attention to the cache file if you give it the | |
2222 | # --recheck option to rerun configure. | |
b2ef150d | 2223 | # |
6be7c12c | 2224 | EOF |
b2ef150d ILT |
2225 | # The following way of writing the cache mishandles newlines in values, |
2226 | # but we know of no workaround that is simple, portable, and efficient. | |
2227 | # So, don't put newlines in cache variables' values. | |
2228 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
2229 | # and sets the high bit in the cache file unless we assign to the vars. | |
6be7c12c AO |
2230 | (set) 2>&1 | |
2231 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
2232 | *ac_space=\ *) | |
2233 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
2234 | # turns \\\\ into \\, and sed turns \\ into \). | |
2235 | sed -n \ | |
2236 | -e "s/'/'\\\\''/g" \ | |
2237 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
2238 | ;; | |
2239 | *) | |
2240 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
2241 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
2242 | ;; | |
2243 | esac >> confcache | |
2244 | if cmp -s $cache_file confcache; then | |
2245 | : | |
2246 | else | |
b2ef150d | 2247 | if test -w $cache_file; then |
6be7c12c AO |
2248 | echo "updating cache $cache_file" |
2249 | cat confcache > $cache_file | |
b2ef150d ILT |
2250 | else |
2251 | echo "not updating unwritable cache $cache_file" | |
2252 | fi | |
2253 | fi | |
2254 | rm -f confcache | |
2255 | ||
6be7c12c | 2256 | |
252b5132 | 2257 | # Actually configure libtool. ac_aux_dir is where install-sh is found. |
ac48eca1 | 2258 | AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ |
d64552c5 | 2259 | MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ |
ac48eca1 AO |
2260 | LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ |
2261 | AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ | |
2262 | objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \ | |
2263 | deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \ | |
252b5132 | 2264 | ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ |
ac48eca1 | 2265 | $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \ |
6be7c12c | 2266 | || { echo "configure: error: libtool configure failed" 1>&2; exit 1; } |
252b5132 | 2267 | |
b2ef150d ILT |
2268 | # Reload cache, that may have been modified by ltconfig |
2269 | if test -r "$cache_file"; then | |
6be7c12c AO |
2270 | echo "loading cache $cache_file" |
2271 | . $cache_file | |
b2ef150d | 2272 | else |
6be7c12c AO |
2273 | echo "creating cache $cache_file" |
2274 | > $cache_file | |
b2ef150d ILT |
2275 | fi |
2276 | ||
6be7c12c | 2277 | |
b2ef150d | 2278 | # This can be used to rebuild libtool when needed |
ac48eca1 | 2279 | LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh" |
b2ef150d ILT |
2280 | |
2281 | # Always use our own libtool. | |
2282 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' | |
2283 | ||
252b5132 RH |
2284 | # Redirect the config.log output again, so that the ltconfig log is not |
2285 | # clobbered by the next message. | |
2286 | exec 5>>./config.log | |
2287 | ||
6be7c12c AO |
2288 | |
2289 | ||
2290 | ||
2291 | ||
2292 | ||
2293 | ||
252b5132 RH |
2294 | # Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given. |
2295 | if test "${enable_64_bit_bfd+set}" = set; then | |
2296 | enableval="$enable_64_bit_bfd" | |
2297 | case "${enableval}" in | |
2298 | yes) want64=true ;; | |
2299 | no) want64=false ;; | |
6be7c12c | 2300 | *) { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;; |
252b5132 RH |
2301 | esac |
2302 | else | |
2303 | want64=false | |
6be7c12c AO |
2304 | fi |
2305 | # Check whether --enable-targets or --disable-targets was given. | |
252b5132 RH |
2306 | if test "${enable_targets+set}" = set; then |
2307 | enableval="$enable_targets" | |
2308 | case "${enableval}" in | |
6be7c12c | 2309 | yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; } |
252b5132 RH |
2310 | ;; |
2311 | no) enable_targets= ;; | |
2312 | *) enable_targets=$enableval ;; | |
2313 | esac | |
6be7c12c AO |
2314 | fi |
2315 | # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given. | |
252b5132 RH |
2316 | if test "${enable_commonbfdlib+set}" = set; then |
2317 | enableval="$enable_commonbfdlib" | |
2318 | case "${enableval}" in | |
2319 | yes) commonbfdlib=true ;; | |
2320 | no) commonbfdlib=false ;; | |
6be7c12c | 2321 | *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;; |
252b5132 | 2322 | esac |
6be7c12c | 2323 | fi |
252b5132 RH |
2324 | # Check whether --with-mmap or --without-mmap was given. |
2325 | if test "${with_mmap+set}" = set; then | |
2326 | withval="$with_mmap" | |
2327 | case "${withval}" in | |
2328 | yes) want_mmap=true ;; | |
2329 | no) want_mmap=false ;; | |
6be7c12c | 2330 | *) { echo "configure: error: bad value ${withval} for BFD with-mmap option" 1>&2; exit 1; } ;; |
252b5132 RH |
2331 | esac |
2332 | else | |
2333 | want_mmap=false | |
6be7c12c AO |
2334 | fi |
2335 | ||
0218d1e4 | 2336 | build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" |
a2d91340 AC |
2337 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
2338 | if test "${enable_build_warnings+set}" = set; then | |
2339 | enableval="$enable_build_warnings" | |
2340 | case "${enableval}" in | |
2341 | yes) ;; | |
2342 | no) build_warnings="-w";; | |
2343 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
2344 | build_warnings="${build_warnings} ${t}";; | |
2345 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
2346 | build_warnings="${t} ${build_warnings}";; | |
2347 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
2348 | esac | |
2349 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
2350 | echo "Setting warning flags = $build_warnings" 6>&1 | |
2351 | fi | |
6be7c12c AO |
2352 | fi |
2353 | WARN_CFLAGS="" | |
66e25bab | 2354 | if test "x${build_warnings}" != x && test "x$GCC" = xyes ; then |
a2d91340 AC |
2355 | WARN_CFLAGS="${build_warnings}" |
2356 | fi | |
2357 | ||
2358 | ||
6be7c12c AO |
2359 | |
2360 | ||
2361 | ||
252b5132 RH |
2362 | |
2363 | if test -z "$target" ; then | |
6be7c12c | 2364 | { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; } |
252b5132 | 2365 | fi |
252b5132 | 2366 | |
6be7c12c | 2367 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
225247f0 | 2368 | echo "configure:2369: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
252b5132 RH |
2369 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
2370 | if test "${enable_maintainer_mode+set}" = set; then | |
2371 | enableval="$enable_maintainer_mode" | |
2372 | USE_MAINTAINER_MODE=$enableval | |
2373 | else | |
2374 | USE_MAINTAINER_MODE=no | |
6be7c12c AO |
2375 | fi |
2376 | ||
2377 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 | |
2378 | ||
252b5132 RH |
2379 | |
2380 | if test $USE_MAINTAINER_MODE = yes; then | |
2381 | MAINTAINER_MODE_TRUE= | |
2382 | MAINTAINER_MODE_FALSE='#' | |
2383 | else | |
2384 | MAINTAINER_MODE_TRUE='#' | |
2385 | MAINTAINER_MODE_FALSE= | |
2386 | fi | |
2387 | MAINT=$MAINTAINER_MODE_TRUE | |
6be7c12c | 2388 | |
252b5132 | 2389 | |
a703a6ea | 2390 | echo $ac_n "checking whether to install libbfd""... $ac_c" 1>&6 |
225247f0 | 2391 | echo "configure:2392: checking whether to install libbfd" >&5 |
a703a6ea AM |
2392 | # Check whether --enable-install-libbfd or --disable-install-libbfd was given. |
2393 | if test "${enable_install_libbfd+set}" = set; then | |
2394 | enableval="$enable_install_libbfd" | |
2395 | install_libbfd_p=$enableval | |
2396 | else | |
66e25bab | 2397 | if test "${host}" = "${target}" || test "$enable_shared" = "yes"; then |
a703a6ea AM |
2398 | install_libbfd_p=yes |
2399 | else | |
2400 | install_libbfd_p=no | |
2401 | fi | |
2402 | fi | |
2403 | ||
2404 | echo "$ac_t""$install_libbfd_p" 1>&6 | |
2405 | ||
2406 | ||
2407 | if test $install_libbfd_p = yes; then | |
2408 | INSTALL_LIBBFD_TRUE= | |
2409 | INSTALL_LIBBFD_FALSE='#' | |
2410 | else | |
2411 | INSTALL_LIBBFD_TRUE='#' | |
2412 | INSTALL_LIBBFD_FALSE= | |
2413 | fi | |
2414 | # libbfd.a is a host library containing target dependent code | |
2415 | bfdlibdir='$(libdir)' | |
2416 | bfdincludedir='$(includedir)' | |
2417 | if test "${host}" != "${target}"; then | |
2418 | bfdlibdir='$(exec_prefix)/$(host_alias)/$(target_alias)/lib' | |
2419 | bfdincludedir='$(exec_prefix)/$(host_alias)/$(target_alias)/include' | |
2420 | fi | |
2421 | ||
2422 | ||
2423 | ||
2424 | ||
252b5132 RH |
2425 | |
2426 | ||
6be7c12c | 2427 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 |
225247f0 | 2428 | echo "configure:2429: checking for executable suffix" >&5 |
6be7c12c AO |
2429 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
2430 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 2431 | else |
6be7c12c AO |
2432 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then |
2433 | ac_cv_exeext=.exe | |
252b5132 | 2434 | else |
6be7c12c AO |
2435 | rm -f conftest* |
2436 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
2437 | ac_cv_exeext= | |
225247f0 | 2438 | if { (eval echo configure:2439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
6be7c12c AO |
2439 | for file in conftest.*; do |
2440 | case $file in | |
225247f0 | 2441 | *.c | *.o | *.obj) ;; |
6be7c12c AO |
2442 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
2443 | esac | |
2444 | done | |
2445 | else | |
2446 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
2447 | fi | |
2448 | rm -f conftest* | |
2449 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
252b5132 | 2450 | fi |
b3baf5d0 | 2451 | fi |
252b5132 | 2452 | |
6be7c12c AO |
2453 | EXEEXT="" |
2454 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
2455 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
2456 | ac_exeext=$EXEEXT | |
252b5132 | 2457 | |
252b5132 | 2458 | |
6be7c12c AO |
2459 | host64=false |
2460 | target64=false | |
69263e90 | 2461 | bfd_default_target_size=32 |
252b5132 | 2462 | |
6be7c12c AO |
2463 | # host stuff: |
2464 | ||
2465 | # Extract the first word of "gcc", so it can be a program name with args. | |
2466 | set dummy gcc; ac_word=$2 | |
2467 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
225247f0 | 2468 | echo "configure:2469: checking for $ac_word" >&5 |
6be7c12c AO |
2469 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
2470 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 RH |
2471 | else |
2472 | if test -n "$CC"; then | |
2473 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2474 | else | |
6be7c12c AO |
2475 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2476 | ac_dummy="$PATH" | |
2477 | for ac_dir in $ac_dummy; do | |
2478 | test -z "$ac_dir" && ac_dir=. | |
2479 | if test -f $ac_dir/$ac_word; then | |
2480 | ac_cv_prog_CC="gcc" | |
2481 | break | |
2482 | fi | |
2483 | done | |
2484 | IFS="$ac_save_ifs" | |
252b5132 RH |
2485 | fi |
2486 | fi | |
6be7c12c | 2487 | CC="$ac_cv_prog_CC" |
252b5132 | 2488 | if test -n "$CC"; then |
6be7c12c | 2489 | echo "$ac_t""$CC" 1>&6 |
b3baf5d0 | 2490 | else |
6be7c12c | 2491 | echo "$ac_t""no" 1>&6 |
b3baf5d0 NC |
2492 | fi |
2493 | ||
252b5132 RH |
2494 | if test -z "$CC"; then |
2495 | # Extract the first word of "cc", so it can be a program name with args. | |
2496 | set dummy cc; ac_word=$2 | |
6be7c12c | 2497 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
225247f0 | 2498 | echo "configure:2499: checking for $ac_word" >&5 |
6be7c12c AO |
2499 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
2500 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 RH |
2501 | else |
2502 | if test -n "$CC"; then | |
2503 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2504 | else | |
6be7c12c | 2505 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
252b5132 | 2506 | ac_prog_rejected=no |
6be7c12c AO |
2507 | ac_dummy="$PATH" |
2508 | for ac_dir in $ac_dummy; do | |
2509 | test -z "$ac_dir" && ac_dir=. | |
2510 | if test -f $ac_dir/$ac_word; then | |
2511 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
2512 | ac_prog_rejected=yes | |
2513 | continue | |
2514 | fi | |
2515 | ac_cv_prog_CC="cc" | |
2516 | break | |
2517 | fi | |
2518 | done | |
2519 | IFS="$ac_save_ifs" | |
252b5132 RH |
2520 | if test $ac_prog_rejected = yes; then |
2521 | # We found a bogon in the path, so make sure we never use it. | |
2522 | set dummy $ac_cv_prog_CC | |
2523 | shift | |
6be7c12c | 2524 | if test $# -gt 0; then |
252b5132 RH |
2525 | # We chose a different compiler from the bogus one. |
2526 | # However, it has the same basename, so the bogon will be chosen | |
2527 | # first if we set CC to just the basename; use the full file name. | |
2528 | shift | |
6be7c12c | 2529 | set dummy "$ac_dir/$ac_word" "$@" |
252b5132 RH |
2530 | shift |
2531 | ac_cv_prog_CC="$@" | |
2532 | fi | |
2533 | fi | |
2534 | fi | |
2535 | fi | |
6be7c12c | 2536 | CC="$ac_cv_prog_CC" |
252b5132 | 2537 | if test -n "$CC"; then |
6be7c12c | 2538 | echo "$ac_t""$CC" 1>&6 |
252b5132 | 2539 | else |
6be7c12c | 2540 | echo "$ac_t""no" 1>&6 |
252b5132 RH |
2541 | fi |
2542 | ||
6be7c12c AO |
2543 | if test -z "$CC"; then |
2544 | case "`uname -s`" in | |
2545 | *win32* | *WIN32*) | |
2546 | # Extract the first word of "cl", so it can be a program name with args. | |
2547 | set dummy cl; ac_word=$2 | |
2548 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
225247f0 | 2549 | echo "configure:2550: checking for $ac_word" >&5 |
6be7c12c AO |
2550 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
2551 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 RH |
2552 | else |
2553 | if test -n "$CC"; then | |
2554 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2555 | else | |
6be7c12c AO |
2556 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2557 | ac_dummy="$PATH" | |
2558 | for ac_dir in $ac_dummy; do | |
2559 | test -z "$ac_dir" && ac_dir=. | |
2560 | if test -f $ac_dir/$ac_word; then | |
2561 | ac_cv_prog_CC="cl" | |
2562 | break | |
2563 | fi | |
2564 | done | |
2565 | IFS="$ac_save_ifs" | |
252b5132 RH |
2566 | fi |
2567 | fi | |
6be7c12c | 2568 | CC="$ac_cv_prog_CC" |
252b5132 | 2569 | if test -n "$CC"; then |
6be7c12c | 2570 | echo "$ac_t""$CC" 1>&6 |
252b5132 | 2571 | else |
6be7c12c | 2572 | echo "$ac_t""no" 1>&6 |
252b5132 | 2573 | fi |
6be7c12c AO |
2574 | ;; |
2575 | esac | |
2576 | fi | |
2577 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
b3baf5d0 | 2578 | fi |
252b5132 | 2579 | |
6be7c12c | 2580 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
225247f0 | 2581 | echo "configure:2582: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
252b5132 | 2582 | |
6be7c12c AO |
2583 | ac_ext=c |
2584 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2585 | ac_cpp='$CPP $CPPFLAGS' | |
2586 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2587 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2588 | cross_compiling=$ac_cv_prog_cc_cross | |
252b5132 | 2589 | |
6be7c12c | 2590 | cat > conftest.$ac_ext << EOF |
252b5132 | 2591 | |
225247f0 | 2592 | #line 2593 "configure" |
6be7c12c AO |
2593 | #include "confdefs.h" |
2594 | ||
2595 | main(){return(0);} | |
2596 | EOF | |
225247f0 | 2597 | if { (eval echo configure:2598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
6be7c12c AO |
2598 | ac_cv_prog_cc_works=yes |
2599 | # If we can't run a trivial program, we are probably using a cross compiler. | |
2600 | if (./conftest; exit) 2>/dev/null; then | |
2601 | ac_cv_prog_cc_cross=no | |
2602 | else | |
2603 | ac_cv_prog_cc_cross=yes | |
2604 | fi | |
2605 | else | |
2606 | echo "configure: failed program was:" >&5 | |
2607 | cat conftest.$ac_ext >&5 | |
2608 | ac_cv_prog_cc_works=no | |
252b5132 | 2609 | fi |
6be7c12c AO |
2610 | rm -fr conftest* |
2611 | ac_ext=c | |
2612 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2613 | ac_cpp='$CPP $CPPFLAGS' | |
2614 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2615 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2616 | cross_compiling=$ac_cv_prog_cc_cross | |
252b5132 | 2617 | |
6be7c12c AO |
2618 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 |
2619 | if test $ac_cv_prog_cc_works = no; then | |
2620 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
2621 | fi | |
2622 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
225247f0 | 2623 | echo "configure:2624: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
6be7c12c AO |
2624 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
2625 | cross_compiling=$ac_cv_prog_cc_cross | |
b3baf5d0 | 2626 | |
6be7c12c | 2627 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
225247f0 | 2628 | echo "configure:2629: checking whether we are using GNU C" >&5 |
6be7c12c AO |
2629 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
2630 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 2631 | else |
6be7c12c AO |
2632 | cat > conftest.c <<EOF |
2633 | #ifdef __GNUC__ | |
2634 | yes; | |
252b5132 | 2635 | #endif |
6be7c12c | 2636 | EOF |
225247f0 | 2637 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
6be7c12c AO |
2638 | ac_cv_prog_gcc=yes |
2639 | else | |
2640 | ac_cv_prog_gcc=no | |
2641 | fi | |
2642 | fi | |
252b5132 | 2643 | |
6be7c12c | 2644 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
252b5132 | 2645 | |
6be7c12c AO |
2646 | if test $ac_cv_prog_gcc = yes; then |
2647 | GCC=yes | |
2648 | else | |
2649 | GCC= | |
2650 | fi | |
252b5132 | 2651 | |
6be7c12c AO |
2652 | ac_test_CFLAGS="${CFLAGS+set}" |
2653 | ac_save_CFLAGS="$CFLAGS" | |
2654 | CFLAGS= | |
2655 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
225247f0 | 2656 | echo "configure:2657: checking whether ${CC-cc} accepts -g" >&5 |
6be7c12c AO |
2657 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
2658 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2659 | else | |
2660 | echo 'void f(){}' > conftest.c | |
2661 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
252b5132 RH |
2662 | ac_cv_prog_cc_g=yes |
2663 | else | |
6be7c12c | 2664 | ac_cv_prog_cc_g=no |
252b5132 | 2665 | fi |
6be7c12c AO |
2666 | rm -f conftest* |
2667 | ||
252b5132 | 2668 | fi |
6be7c12c AO |
2669 | |
2670 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
252b5132 | 2671 | if test "$ac_test_CFLAGS" = set; then |
6be7c12c | 2672 | CFLAGS="$ac_save_CFLAGS" |
252b5132 RH |
2673 | elif test $ac_cv_prog_cc_g = yes; then |
2674 | if test "$GCC" = yes; then | |
2675 | CFLAGS="-g -O2" | |
2676 | else | |
2677 | CFLAGS="-g" | |
2678 | fi | |
2679 | else | |
2680 | if test "$GCC" = yes; then | |
2681 | CFLAGS="-O2" | |
2682 | else | |
2683 | CFLAGS= | |
2684 | fi | |
2685 | fi | |
2686 | ||
2687 | ||
f9d1e83f | 2688 | ALL_LINGUAS="fr tr ja es sv da zh_CN ro" |
6be7c12c | 2689 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
225247f0 | 2690 | echo "configure:2691: checking how to run the C preprocessor" >&5 |
252b5132 RH |
2691 | # On Suns, sometimes $CPP names a directory. |
2692 | if test -n "$CPP" && test -d "$CPP"; then | |
2693 | CPP= | |
2694 | fi | |
2695 | if test -z "$CPP"; then | |
6be7c12c AO |
2696 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then |
2697 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2698 | else | |
2699 | # This must be in double quotes, not single quotes, because CPP may get | |
2700 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
2701 | CPP="${CC-cc} -E" | |
2702 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
2703 | # not just through cpp. | |
2704 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 2705 | #line 2706 "configure" |
252b5132 RH |
2706 | #include "confdefs.h" |
2707 | #include <assert.h> | |
6be7c12c AO |
2708 | Syntax Error |
2709 | EOF | |
2710 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
225247f0 | 2711 | { (eval echo configure:2712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
6be7c12c AO |
2712 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2713 | if test -z "$ac_err"; then | |
2714 | : | |
252b5132 | 2715 | else |
6be7c12c AO |
2716 | echo "$ac_err" >&5 |
2717 | echo "configure: failed program was:" >&5 | |
2718 | cat conftest.$ac_ext >&5 | |
2719 | rm -rf conftest* | |
2720 | CPP="${CC-cc} -E -traditional-cpp" | |
2721 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 2722 | #line 2723 "configure" |
252b5132 | 2723 | #include "confdefs.h" |
6be7c12c AO |
2724 | #include <assert.h> |
2725 | Syntax Error | |
2726 | EOF | |
2727 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
225247f0 | 2728 | { (eval echo configure:2729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
6be7c12c AO |
2729 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2730 | if test -z "$ac_err"; then | |
2731 | : | |
252b5132 | 2732 | else |
6be7c12c AO |
2733 | echo "$ac_err" >&5 |
2734 | echo "configure: failed program was:" >&5 | |
252b5132 | 2735 | cat conftest.$ac_ext >&5 |
6be7c12c AO |
2736 | rm -rf conftest* |
2737 | CPP="${CC-cc} -nologo -E" | |
2738 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 2739 | #line 2740 "configure" |
6be7c12c AO |
2740 | #include "confdefs.h" |
2741 | #include <assert.h> | |
2742 | Syntax Error | |
2743 | EOF | |
2744 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
225247f0 | 2745 | { (eval echo configure:2746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
6be7c12c AO |
2746 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2747 | if test -z "$ac_err"; then | |
2748 | : | |
b3baf5d0 | 2749 | else |
6be7c12c AO |
2750 | echo "$ac_err" >&5 |
2751 | echo "configure: failed program was:" >&5 | |
b3baf5d0 | 2752 | cat conftest.$ac_ext >&5 |
6be7c12c AO |
2753 | rm -rf conftest* |
2754 | CPP=/lib/cpp | |
252b5132 | 2755 | fi |
6be7c12c | 2756 | rm -f conftest* |
252b5132 | 2757 | fi |
6be7c12c | 2758 | rm -f conftest* |
252b5132 | 2759 | fi |
6be7c12c AO |
2760 | rm -f conftest* |
2761 | ac_cv_prog_CPP="$CPP" | |
2762 | fi | |
2763 | CPP="$ac_cv_prog_CPP" | |
ac48eca1 | 2764 | else |
6be7c12c | 2765 | ac_cv_prog_CPP="$CPP" |
b3baf5d0 | 2766 | fi |
6be7c12c AO |
2767 | echo "$ac_t""$CPP" 1>&6 |
2768 | ||
2769 | # Extract the first word of "ranlib", so it can be a program name with args. | |
2770 | set dummy ranlib; ac_word=$2 | |
2771 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
225247f0 | 2772 | echo "configure:2773: checking for $ac_word" >&5 |
6be7c12c AO |
2773 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
2774 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ac48eca1 | 2775 | else |
6be7c12c AO |
2776 | if test -n "$RANLIB"; then |
2777 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2778 | else | |
2779 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2780 | ac_dummy="$PATH" | |
2781 | for ac_dir in $ac_dummy; do | |
2782 | test -z "$ac_dir" && ac_dir=. | |
2783 | if test -f $ac_dir/$ac_word; then | |
2784 | ac_cv_prog_RANLIB="ranlib" | |
2785 | break | |
ac48eca1 | 2786 | fi |
6be7c12c AO |
2787 | done |
2788 | IFS="$ac_save_ifs" | |
2789 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
ac48eca1 AO |
2790 | fi |
2791 | fi | |
6be7c12c AO |
2792 | RANLIB="$ac_cv_prog_RANLIB" |
2793 | if test -n "$RANLIB"; then | |
2794 | echo "$ac_t""$RANLIB" 1>&6 | |
ac48eca1 | 2795 | else |
6be7c12c | 2796 | echo "$ac_t""no" 1>&6 |
b3baf5d0 | 2797 | fi |
ac48eca1 | 2798 | |
6be7c12c | 2799 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
225247f0 | 2800 | echo "configure:2801: checking for ANSI C header files" >&5 |
6be7c12c AO |
2801 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
2802 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 2803 | else |
6be7c12c | 2804 | cat > conftest.$ac_ext <<EOF |
225247f0 | 2805 | #line 2806 "configure" |
252b5132 RH |
2806 | #include "confdefs.h" |
2807 | #include <stdlib.h> | |
2808 | #include <stdarg.h> | |
2809 | #include <string.h> | |
2810 | #include <float.h> | |
6be7c12c AO |
2811 | EOF |
2812 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
225247f0 | 2813 | { (eval echo configure:2814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
6be7c12c AO |
2814 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2815 | if test -z "$ac_err"; then | |
2816 | rm -rf conftest* | |
252b5132 RH |
2817 | ac_cv_header_stdc=yes |
2818 | else | |
6be7c12c AO |
2819 | echo "$ac_err" >&5 |
2820 | echo "configure: failed program was:" >&5 | |
252b5132 | 2821 | cat conftest.$ac_ext >&5 |
6be7c12c | 2822 | rm -rf conftest* |
252b5132 RH |
2823 | ac_cv_header_stdc=no |
2824 | fi | |
6be7c12c | 2825 | rm -f conftest* |
252b5132 RH |
2826 | |
2827 | if test $ac_cv_header_stdc = yes; then | |
2828 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
6be7c12c | 2829 | cat > conftest.$ac_ext <<EOF |
225247f0 | 2830 | #line 2831 "configure" |
252b5132 RH |
2831 | #include "confdefs.h" |
2832 | #include <string.h> | |
6be7c12c | 2833 | EOF |
252b5132 RH |
2834 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
2835 | egrep "memchr" >/dev/null 2>&1; then | |
2836 | : | |
2837 | else | |
6be7c12c | 2838 | rm -rf conftest* |
252b5132 RH |
2839 | ac_cv_header_stdc=no |
2840 | fi | |
2841 | rm -f conftest* | |
2842 | ||
2843 | fi | |
2844 | ||
2845 | if test $ac_cv_header_stdc = yes; then | |
2846 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
6be7c12c | 2847 | cat > conftest.$ac_ext <<EOF |
225247f0 | 2848 | #line 2849 "configure" |
252b5132 RH |
2849 | #include "confdefs.h" |
2850 | #include <stdlib.h> | |
6be7c12c | 2851 | EOF |
252b5132 RH |
2852 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
2853 | egrep "free" >/dev/null 2>&1; then | |
2854 | : | |
2855 | else | |
6be7c12c | 2856 | rm -rf conftest* |
252b5132 RH |
2857 | ac_cv_header_stdc=no |
2858 | fi | |
2859 | rm -f conftest* | |
2860 | ||
2861 | fi | |
2862 | ||
2863 | if test $ac_cv_header_stdc = yes; then | |
2864 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
6be7c12c | 2865 | if test "$cross_compiling" = yes; then |
252b5132 RH |
2866 | : |
2867 | else | |
6be7c12c | 2868 | cat > conftest.$ac_ext <<EOF |
225247f0 | 2869 | #line 2870 "configure" |
252b5132 RH |
2870 | #include "confdefs.h" |
2871 | #include <ctype.h> | |
6be7c12c AO |
2872 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
2873 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
b3baf5d0 | 2874 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
6be7c12c AO |
2875 | int main () { int i; for (i = 0; i < 256; i++) |
2876 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
2877 | exit (0); } | |
2878 | ||
2879 | EOF | |
225247f0 | 2880 | if { (eval echo configure:2881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
6be7c12c | 2881 | then |
252b5132 RH |
2882 | : |
2883 | else | |
6be7c12c AO |
2884 | echo "configure: failed program was:" >&5 |
2885 | cat conftest.$ac_ext >&5 | |
2886 | rm -fr conftest* | |
2887 | ac_cv_header_stdc=no | |
252b5132 | 2888 | fi |
6be7c12c | 2889 | rm -fr conftest* |
252b5132 | 2890 | fi |
6be7c12c | 2891 | |
252b5132 RH |
2892 | fi |
2893 | fi | |
b3baf5d0 | 2894 | |
6be7c12c AO |
2895 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
2896 | if test $ac_cv_header_stdc = yes; then | |
2897 | cat >> confdefs.h <<\EOF | |
252b5132 RH |
2898 | #define STDC_HEADERS 1 |
2899 | EOF | |
2900 | ||
2901 | fi | |
2902 | ||
6be7c12c | 2903 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
225247f0 | 2904 | echo "configure:2905: checking for working const" >&5 |
6be7c12c AO |
2905 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
2906 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 2907 | else |
6be7c12c | 2908 | cat > conftest.$ac_ext <<EOF |
225247f0 | 2909 | #line 2910 "configure" |
252b5132 | 2910 | #include "confdefs.h" |
6be7c12c AO |
2911 | |
2912 | int main() { | |
2913 | ||
2914 | /* Ultrix mips cc rejects this. */ | |
2915 | typedef int charset[2]; const charset x; | |
2916 | /* SunOS 4.1.1 cc rejects this. */ | |
2917 | char const *const *ccp; | |
2918 | char **p; | |
2919 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
2920 | struct point {int x, y;}; | |
2921 | static struct point const zero = {0,0}; | |
2922 | /* AIX XL C 1.02.0.0 rejects this. | |
2923 | It does not let you subtract one const X* pointer from another in an arm | |
2924 | of an if-expression whose if-part is not a constant expression */ | |
2925 | const char *g = "string"; | |
2926 | ccp = &g + (g ? g-g : 0); | |
2927 | /* HPUX 7.0 cc rejects these. */ | |
2928 | ++ccp; | |
2929 | p = (char**) ccp; | |
2930 | ccp = (char const *const *) p; | |
2931 | { /* SCO 3.2v4 cc rejects this. */ | |
2932 | char *t; | |
2933 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
2934 | ||
2935 | *t++ = 0; | |
252b5132 | 2936 | } |
6be7c12c AO |
2937 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
2938 | int x[] = {25, 17}; | |
2939 | const int *foo = &x[0]; | |
2940 | ++foo; | |
252b5132 | 2941 | } |
6be7c12c AO |
2942 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
2943 | typedef const int *iptr; | |
2944 | iptr p = 0; | |
2945 | ++p; | |
252b5132 | 2946 | } |
6be7c12c AO |
2947 | { /* AIX XL C 1.02.0.0 rejects this saying |
2948 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
2949 | struct s { int j; const int *ap[3]; }; | |
2950 | struct s *b; b->j = 5; | |
b3baf5d0 | 2951 | } |
6be7c12c AO |
2952 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
2953 | const int foo = 10; | |
2954 | } | |
2955 | ||
2956 | ; return 0; } | |
2957 | EOF | |
225247f0 | 2958 | if { (eval echo configure:2959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c | 2959 | rm -rf conftest* |
252b5132 RH |
2960 | ac_cv_c_const=yes |
2961 | else | |
6be7c12c AO |
2962 | echo "configure: failed program was:" >&5 |
2963 | cat conftest.$ac_ext >&5 | |
2964 | rm -rf conftest* | |
2965 | ac_cv_c_const=no | |
252b5132 | 2966 | fi |
6be7c12c | 2967 | rm -f conftest* |
252b5132 | 2968 | fi |
b3baf5d0 | 2969 | |
6be7c12c AO |
2970 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
2971 | if test $ac_cv_c_const = no; then | |
2972 | cat >> confdefs.h <<\EOF | |
2973 | #define const | |
252b5132 RH |
2974 | EOF |
2975 | ||
2976 | fi | |
2977 | ||
6be7c12c | 2978 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
225247f0 | 2979 | echo "configure:2980: checking for inline" >&5 |
6be7c12c AO |
2980 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
2981 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 RH |
2982 | else |
2983 | ac_cv_c_inline=no | |
2984 | for ac_kw in inline __inline__ __inline; do | |
6be7c12c | 2985 | cat > conftest.$ac_ext <<EOF |
225247f0 | 2986 | #line 2987 "configure" |
252b5132 RH |
2987 | #include "confdefs.h" |
2988 | ||
6be7c12c AO |
2989 | int main() { |
2990 | } $ac_kw foo() { | |
2991 | ; return 0; } | |
2992 | EOF | |
225247f0 | 2993 | if { (eval echo configure:2994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c | 2994 | rm -rf conftest* |
252b5132 RH |
2995 | ac_cv_c_inline=$ac_kw; break |
2996 | else | |
6be7c12c AO |
2997 | echo "configure: failed program was:" >&5 |
2998 | cat conftest.$ac_ext >&5 | |
252b5132 | 2999 | fi |
6be7c12c | 3000 | rm -f conftest* |
252b5132 RH |
3001 | done |
3002 | ||
3003 | fi | |
6be7c12c AO |
3004 | |
3005 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
3006 | case "$ac_cv_c_inline" in | |
252b5132 | 3007 | inline | yes) ;; |
6be7c12c AO |
3008 | no) cat >> confdefs.h <<\EOF |
3009 | #define inline | |
252b5132 RH |
3010 | EOF |
3011 | ;; | |
6be7c12c | 3012 | *) cat >> confdefs.h <<EOF |
252b5132 RH |
3013 | #define inline $ac_cv_c_inline |
3014 | EOF | |
3015 | ;; | |
3016 | esac | |
3017 | ||
6be7c12c | 3018 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
225247f0 | 3019 | echo "configure:3020: checking for off_t" >&5 |
6be7c12c AO |
3020 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
3021 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b3baf5d0 | 3022 | else |
6be7c12c | 3023 | cat > conftest.$ac_ext <<EOF |
225247f0 | 3024 | #line 3025 "configure" |
b3baf5d0 | 3025 | #include "confdefs.h" |
6be7c12c AO |
3026 | #include <sys/types.h> |
3027 | #if STDC_HEADERS | |
3028 | #include <stdlib.h> | |
3029 | #include <stddef.h> | |
3030 | #endif | |
3031 | EOF | |
3032 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3033 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
3034 | rm -rf conftest* | |
653f71ca | 3035 | ac_cv_type_off_t=yes |
252b5132 | 3036 | else |
6be7c12c AO |
3037 | rm -rf conftest* |
3038 | ac_cv_type_off_t=no | |
252b5132 | 3039 | fi |
6be7c12c | 3040 | rm -f conftest* |
b3baf5d0 | 3041 | |
6be7c12c AO |
3042 | fi |
3043 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
3044 | if test $ac_cv_type_off_t = no; then | |
3045 | cat >> confdefs.h <<\EOF | |
252b5132 RH |
3046 | #define off_t long |
3047 | EOF | |
3048 | ||
3049 | fi | |
3050 | ||
6be7c12c | 3051 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
225247f0 | 3052 | echo "configure:3053: checking for size_t" >&5 |
6be7c12c AO |
3053 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
3054 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 3055 | else |
6be7c12c | 3056 | cat > conftest.$ac_ext <<EOF |
225247f0 | 3057 | #line 3058 "configure" |
252b5132 | 3058 | #include "confdefs.h" |
6be7c12c AO |
3059 | #include <sys/types.h> |
3060 | #if STDC_HEADERS | |
3061 | #include <stdlib.h> | |
3062 | #include <stddef.h> | |
3063 | #endif | |
3064 | EOF | |
3065 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3066 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
3067 | rm -rf conftest* | |
653f71ca | 3068 | ac_cv_type_size_t=yes |
252b5132 | 3069 | else |
6be7c12c AO |
3070 | rm -rf conftest* |
3071 | ac_cv_type_size_t=no | |
252b5132 | 3072 | fi |
6be7c12c | 3073 | rm -f conftest* |
b3baf5d0 | 3074 | |
6be7c12c AO |
3075 | fi |
3076 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
3077 | if test $ac_cv_type_size_t = no; then | |
3078 | cat >> confdefs.h <<\EOF | |
252b5132 RH |
3079 | #define size_t unsigned |
3080 | EOF | |
3081 | ||
3082 | fi | |
3083 | ||
3084 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
3085 | # for constant arguments. Useless! | |
6be7c12c | 3086 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 |
225247f0 | 3087 | echo "configure:3088: checking for working alloca.h" >&5 |
6be7c12c AO |
3088 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
3089 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 3090 | else |
6be7c12c | 3091 | cat > conftest.$ac_ext <<EOF |
225247f0 | 3092 | #line 3093 "configure" |
252b5132 RH |
3093 | #include "confdefs.h" |
3094 | #include <alloca.h> | |
6be7c12c AO |
3095 | int main() { |
3096 | char *p = alloca(2 * sizeof(int)); | |
3097 | ; return 0; } | |
3098 | EOF | |
225247f0 | 3099 | if { (eval echo configure:3100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
6be7c12c AO |
3100 | rm -rf conftest* |
3101 | ac_cv_header_alloca_h=yes | |
3102 | else | |
3103 | echo "configure: failed program was:" >&5 | |
3104 | cat conftest.$ac_ext >&5 | |
3105 | rm -rf conftest* | |
3106 | ac_cv_header_alloca_h=no | |
3107 | fi | |
3108 | rm -f conftest* | |
3109 | fi | |
3110 | ||
3111 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
3112 | if test $ac_cv_header_alloca_h = yes; then | |
3113 | cat >> confdefs.h <<\EOF | |
252b5132 RH |
3114 | #define HAVE_ALLOCA_H 1 |
3115 | EOF | |
3116 | ||
3117 | fi | |
3118 | ||
6be7c12c | 3119 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 |
225247f0 | 3120 | echo "configure:3121: checking for alloca" >&5 |
6be7c12c AO |
3121 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
3122 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 3123 | else |
6be7c12c | 3124 | cat > conftest.$ac_ext <<EOF |
225247f0 | 3125 | #line 3126 "configure" |
252b5132 | 3126 | #include "confdefs.h" |
6be7c12c | 3127 | |
252b5132 RH |
3128 | #ifdef __GNUC__ |
3129 | # define alloca __builtin_alloca | |
3130 | #else | |
3131 | # ifdef _MSC_VER | |
3132 | # include <malloc.h> | |
3133 | # define alloca _alloca | |
3134 | # else | |
3135 | # if HAVE_ALLOCA_H | |
3136 | # include <alloca.h> | |
3137 | # else | |
3138 | # ifdef _AIX | |
3139 | #pragma alloca | |
3140 | # else | |
3141 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
3142 | char *alloca (); | |
3143 | # endif | |
3144 | # endif | |
3145 | # endif | |
3146 | # endif | |
3147 | #endif | |
3148 | ||
6be7c12c AO |
3149 | int main() { |
3150 | char *p = (char *) alloca(1); | |
3151 | ; return 0; } | |
3152 | EOF | |
225247f0 | 3153 | if { (eval echo configure:3154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
6be7c12c | 3154 | rm -rf conftest* |
252b5132 RH |
3155 | ac_cv_func_alloca_works=yes |
3156 | else | |
6be7c12c AO |
3157 | echo "configure: failed program was:" >&5 |
3158 | cat conftest.$ac_ext >&5 | |
3159 | rm -rf conftest* | |
3160 | ac_cv_func_alloca_works=no | |
252b5132 | 3161 | fi |
6be7c12c | 3162 | rm -f conftest* |
252b5132 RH |
3163 | fi |
3164 | ||
6be7c12c | 3165 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 |
252b5132 | 3166 | if test $ac_cv_func_alloca_works = yes; then |
6be7c12c | 3167 | cat >> confdefs.h <<\EOF |
252b5132 RH |
3168 | #define HAVE_ALLOCA 1 |
3169 | EOF | |
3170 | ||
6be7c12c | 3171 | fi |
b3baf5d0 | 3172 | |
6be7c12c AO |
3173 | if test $ac_cv_func_alloca_works = no; then |
3174 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
3175 | # that cause trouble. Some versions do not even contain alloca or | |
3176 | # contain a buggy version. If you still want to use their alloca, | |
3177 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
3178 | ALLOCA=alloca.${ac_objext} | |
3179 | cat >> confdefs.h <<\EOF | |
252b5132 RH |
3180 | #define C_ALLOCA 1 |
3181 | EOF | |
3182 | ||
6be7c12c AO |
3183 | |
3184 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
225247f0 | 3185 | echo "configure:3186: checking whether alloca needs Cray hooks" >&5 |
6be7c12c AO |
3186 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
3187 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 3188 | else |
6be7c12c | 3189 | cat > conftest.$ac_ext <<EOF |
225247f0 | 3190 | #line 3191 "configure" |
252b5132 RH |
3191 | #include "confdefs.h" |
3192 | #if defined(CRAY) && ! defined(CRAY2) | |
3193 | webecray | |
3194 | #else | |
3195 | wenotbecray | |
3196 | #endif | |
3197 | ||
6be7c12c | 3198 | EOF |
252b5132 RH |
3199 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
3200 | egrep "webecray" >/dev/null 2>&1; then | |
6be7c12c | 3201 | rm -rf conftest* |
252b5132 RH |
3202 | ac_cv_os_cray=yes |
3203 | else | |
6be7c12c | 3204 | rm -rf conftest* |
252b5132 RH |
3205 | ac_cv_os_cray=no |
3206 | fi | |
3207 | rm -f conftest* | |
3208 | ||
3209 | fi | |
6be7c12c AO |
3210 | |
3211 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
252b5132 | 3212 | if test $ac_cv_os_cray = yes; then |
6be7c12c AO |
3213 | for ac_func in _getb67 GETB67 getb67; do |
3214 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
225247f0 | 3215 | echo "configure:3216: checking for $ac_func" >&5 |
6be7c12c AO |
3216 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3217 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3218 | else | |
3219 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 3220 | #line 3221 "configure" |
252b5132 RH |
3221 | #include "confdefs.h" |
3222 | /* System header to define __stub macros and hopefully few prototypes, | |
6be7c12c | 3223 | which can conflict with char $ac_func(); below. */ |
252b5132 RH |
3224 | #include <assert.h> |
3225 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3226 | /* We use char because int might match the return type of a gcc2 | |
6be7c12c AO |
3227 | builtin and then its argument prototype would still apply. */ |
3228 | char $ac_func(); | |
3229 | ||
3230 | int main() { | |
252b5132 RH |
3231 | |
3232 | /* The GNU C library defines this for functions which it implements | |
3233 | to always fail with ENOSYS. Some functions are actually named | |
3234 | something starting with __ and the normal name is an alias. */ | |
3235 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3236 | choke me | |
3237 | #else | |
6be7c12c | 3238 | $ac_func(); |
252b5132 RH |
3239 | #endif |
3240 | ||
6be7c12c AO |
3241 | ; return 0; } |
3242 | EOF | |
225247f0 | 3243 | if { (eval echo configure:3244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
6be7c12c AO |
3244 | rm -rf conftest* |
3245 | eval "ac_cv_func_$ac_func=yes" | |
3246 | else | |
3247 | echo "configure: failed program was:" >&5 | |
3248 | cat conftest.$ac_ext >&5 | |
3249 | rm -rf conftest* | |
3250 | eval "ac_cv_func_$ac_func=no" | |
3251 | fi | |
3252 | rm -f conftest* | |
3253 | fi | |
3254 | ||
3255 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3256 | echo "$ac_t""yes" 1>&6 | |
3257 | cat >> confdefs.h <<EOF | |
252b5132 RH |
3258 | #define CRAY_STACKSEG_END $ac_func |
3259 | EOF | |
3260 | ||
6be7c12c AO |
3261 | break |
3262 | else | |
3263 | echo "$ac_t""no" 1>&6 | |
252b5132 RH |
3264 | fi |
3265 | ||
6be7c12c | 3266 | done |
252b5132 RH |
3267 | fi |
3268 | ||
6be7c12c | 3269 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 |
225247f0 | 3270 | echo "configure:3271: checking stack direction for C alloca" >&5 |
6be7c12c AO |
3271 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
3272 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 RH |
3273 | else |
3274 | if test "$cross_compiling" = yes; then | |
3275 | ac_cv_c_stack_direction=0 | |
3276 | else | |
6be7c12c | 3277 | cat > conftest.$ac_ext <<EOF |
225247f0 | 3278 | #line 3279 "configure" |
252b5132 RH |
3279 | #include "confdefs.h" |
3280 | find_stack_direction () | |
3281 | { | |
3282 | static char *addr = 0; | |
3283 | auto char dummy; | |
3284 | if (addr == 0) | |
3285 | { | |
3286 | addr = &dummy; | |
3287 | return find_stack_direction (); | |
3288 | } | |
3289 | else | |
3290 | return (&dummy > addr) ? 1 : -1; | |
3291 | } | |
3292 | main () | |
3293 | { | |
6be7c12c | 3294 | exit (find_stack_direction() < 0); |
252b5132 | 3295 | } |
6be7c12c | 3296 | EOF |
225247f0 | 3297 | if { (eval echo configure:3298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
6be7c12c | 3298 | then |
252b5132 RH |
3299 | ac_cv_c_stack_direction=1 |
3300 | else | |
6be7c12c AO |
3301 | echo "configure: failed program was:" >&5 |
3302 | cat conftest.$ac_ext >&5 | |
3303 | rm -fr conftest* | |
3304 | ac_cv_c_stack_direction=-1 | |
252b5132 | 3305 | fi |
6be7c12c | 3306 | rm -fr conftest* |
252b5132 | 3307 | fi |
6be7c12c | 3308 | |
252b5132 RH |
3309 | fi |
3310 | ||
6be7c12c AO |
3311 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 |
3312 | cat >> confdefs.h <<EOF | |
252b5132 RH |
3313 | #define STACK_DIRECTION $ac_cv_c_stack_direction |
3314 | EOF | |
3315 | ||
3316 | fi | |
3317 | ||
bc286f95 | 3318 | for ac_hdr in unistd.h |
252b5132 | 3319 | do |
6be7c12c AO |
3320 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
3321 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
225247f0 | 3322 | echo "configure:3323: checking for $ac_hdr" >&5 |
6be7c12c AO |
3323 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3324 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3325 | else | |
3326 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 3327 | #line 3328 "configure" |
252b5132 | 3328 | #include "confdefs.h" |
6be7c12c AO |
3329 | #include <$ac_hdr> |
3330 | EOF | |
3331 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
225247f0 | 3332 | { (eval echo configure:3333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
6be7c12c AO |
3333 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3334 | if test -z "$ac_err"; then | |
3335 | rm -rf conftest* | |
3336 | eval "ac_cv_header_$ac_safe=yes" | |
252b5132 | 3337 | else |
6be7c12c AO |
3338 | echo "$ac_err" >&5 |
3339 | echo "configure: failed program was:" >&5 | |
252b5132 | 3340 | cat conftest.$ac_ext >&5 |
6be7c12c AO |
3341 | rm -rf conftest* |
3342 | eval "ac_cv_header_$ac_safe=no" | |
252b5132 | 3343 | fi |
6be7c12c | 3344 | rm -f conftest* |
252b5132 | 3345 | fi |
6be7c12c AO |
3346 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
3347 | echo "$ac_t""yes" 1>&6 | |
3348 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3349 | cat >> confdefs.h <<EOF | |
3350 | #define $ac_tr_hdr 1 | |
252b5132 | 3351 | EOF |
6be7c12c AO |
3352 | |
3353 | else | |
3354 | echo "$ac_t""no" 1>&6 | |
252b5132 RH |
3355 | fi |
3356 | done | |
3357 | ||
3358 | for ac_func in getpagesize | |
3359 | do | |
6be7c12c | 3360 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
225247f0 | 3361 | echo "configure:3362: checking for $ac_func" >&5 |
6be7c12c AO |
3362 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3363 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3364 | else | |
3365 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 3366 | #line 3367 "configure" |
252b5132 RH |
3367 | #include "confdefs.h" |
3368 | /* System header to define __stub macros and hopefully few prototypes, | |
6be7c12c | 3369 | which can conflict with char $ac_func(); below. */ |
252b5132 RH |
3370 | #include <assert.h> |
3371 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3372 | /* We use char because int might match the return type of a gcc2 | |
6be7c12c AO |
3373 | builtin and then its argument prototype would still apply. */ |
3374 | char $ac_func(); | |
3375 | ||
3376 | int main() { | |
252b5132 RH |
3377 | |
3378 | /* The GNU C library defines this for functions which it implements | |
3379 | to always fail with ENOSYS. Some functions are actually named | |
3380 | something starting with __ and the normal name is an alias. */ | |
3381 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3382 | choke me | |
3383 | #else | |
6be7c12c | 3384 | $ac_func(); |
252b5132 RH |
3385 | #endif |
3386 | ||
6be7c12c | 3387 | ; return 0; } |
252b5132 | 3388 | EOF |
225247f0 | 3389 | if { (eval echo configure:3390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
6be7c12c AO |
3390 | rm -rf conftest* |
3391 | eval "ac_cv_func_$ac_func=yes" | |
3392 | else | |
3393 | echo "configure: failed program was:" >&5 | |
3394 | cat conftest.$ac_ext >&5 | |
3395 | rm -rf conftest* | |
3396 | eval "ac_cv_func_$ac_func=no" | |
3397 | fi | |
3398 | rm -f conftest* | |
3399 | fi | |
252b5132 | 3400 | |
6be7c12c AO |
3401 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
3402 | echo "$ac_t""yes" 1>&6 | |
3403 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3404 | cat >> confdefs.h <<EOF | |
3405 | #define $ac_tr_func 1 | |
3406 | EOF | |
3407 | ||
3408 | else | |
3409 | echo "$ac_t""no" 1>&6 | |
252b5132 RH |
3410 | fi |
3411 | done | |
3412 | ||
6be7c12c | 3413 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
225247f0 | 3414 | echo "configure:3415: checking for working mmap" >&5 |
6be7c12c AO |
3415 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
3416 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 RH |
3417 | else |
3418 | if test "$cross_compiling" = yes; then | |
3419 | ac_cv_func_mmap_fixed_mapped=no | |
3420 | else | |
6be7c12c | 3421 | cat > conftest.$ac_ext <<EOF |
225247f0 | 3422 | #line 3423 "configure" |
252b5132 | 3423 | #include "confdefs.h" |
6be7c12c | 3424 | |
252b5132 RH |
3425 | /* Thanks to Mike Haertel and Jim Avera for this test. |
3426 | Here is a matrix of mmap possibilities: | |
3427 | mmap private not fixed | |
3428 | mmap private fixed at somewhere currently unmapped | |
3429 | mmap private fixed at somewhere already mapped | |
3430 | mmap shared not fixed | |
3431 | mmap shared fixed at somewhere currently unmapped | |
3432 | mmap shared fixed at somewhere already mapped | |
3433 | For private mappings, we should verify that changes cannot be read() | |
3434 | back from the file, nor mmap's back from the file at a different | |
3435 | address. (There have been systems where private was not correctly | |
3436 | implemented like the infamous i386 svr4.0, and systems where the | |
6be7c12c | 3437 | VM page cache was not coherent with the filesystem buffer cache |
252b5132 RH |
3438 | like early versions of FreeBSD and possibly contemporary NetBSD.) |
3439 | For shared mappings, we should conversely verify that changes get | |
3440 | propogated back to all the places they're supposed to be. | |
3441 | ||
3442 | Grep wants private fixed already mapped. | |
3443 | The main things grep needs to know about mmap are: | |
3444 | * does it exist and is it safe to write into the mmap'd area | |
3445 | * how to use it (BSD variants) */ | |
3446 | #include <sys/types.h> | |
3447 | #include <fcntl.h> | |
3448 | #include <sys/mman.h> | |
3449 | ||
b3baf5d0 | 3450 | /* This mess was copied from the GNU getpagesize.h. */ |
6be7c12c | 3451 | #ifndef HAVE_GETPAGESIZE |
bc286f95 BE |
3452 | # ifdef HAVE_UNISTD_H |
3453 | # include <unistd.h> | |
3454 | # endif | |
6be7c12c | 3455 | |
252b5132 | 3456 | /* Assume that all systems that can run configure have sys/param.h. */ |
6be7c12c | 3457 | # ifndef HAVE_SYS_PARAM_H |
252b5132 RH |
3458 | # define HAVE_SYS_PARAM_H 1 |
3459 | # endif | |
3460 | ||
3461 | # ifdef _SC_PAGESIZE | |
3462 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
3463 | # else /* no _SC_PAGESIZE */ | |
6be7c12c | 3464 | # ifdef HAVE_SYS_PARAM_H |
252b5132 RH |
3465 | # include <sys/param.h> |
3466 | # ifdef EXEC_PAGESIZE | |
3467 | # define getpagesize() EXEC_PAGESIZE | |
3468 | # else /* no EXEC_PAGESIZE */ | |
3469 | # ifdef NBPG | |
3470 | # define getpagesize() NBPG * CLSIZE | |
3471 | # ifndef CLSIZE | |
3472 | # define CLSIZE 1 | |
3473 | # endif /* no CLSIZE */ | |
3474 | # else /* no NBPG */ | |
3475 | # ifdef NBPC | |
3476 | # define getpagesize() NBPC | |
3477 | # else /* no NBPC */ | |
3478 | # ifdef PAGESIZE | |
3479 | # define getpagesize() PAGESIZE | |
3480 | # endif /* PAGESIZE */ | |
3481 | # endif /* no NBPC */ | |
3482 | # endif /* no NBPG */ | |
3483 | # endif /* no EXEC_PAGESIZE */ | |
3484 | # else /* no HAVE_SYS_PARAM_H */ | |
3485 | # define getpagesize() 8192 /* punt totally */ | |
3486 | # endif /* no HAVE_SYS_PARAM_H */ | |
3487 | # endif /* no _SC_PAGESIZE */ | |
3488 | ||
3489 | #endif /* no HAVE_GETPAGESIZE */ | |
3490 | ||
6be7c12c AO |
3491 | #ifdef __cplusplus |
3492 | extern "C" { void *malloc(unsigned); } | |
3493 | #else | |
3494 | char *malloc(); | |
3495 | #endif | |
3496 | ||
252b5132 | 3497 | int |
6be7c12c | 3498 | main() |
252b5132 | 3499 | { |
6be7c12c AO |
3500 | char *data, *data2, *data3; |
3501 | int i, pagesize; | |
3502 | int fd; | |
3503 | ||
3504 | pagesize = getpagesize(); | |
3505 | ||
3506 | /* | |
3507 | * First, make a file with some known garbage in it. | |
3508 | */ | |
3509 | data = malloc(pagesize); | |
3510 | if (!data) | |
3511 | exit(1); | |
3512 | for (i = 0; i < pagesize; ++i) | |
3513 | *(data + i) = rand(); | |
3514 | umask(0); | |
3515 | fd = creat("conftestmmap", 0600); | |
3516 | if (fd < 0) | |
3517 | exit(1); | |
3518 | if (write(fd, data, pagesize) != pagesize) | |
3519 | exit(1); | |
3520 | close(fd); | |
3521 | ||
3522 | /* | |
3523 | * Next, try to mmap the file at a fixed address which | |
3524 | * already has something else allocated at it. If we can, | |
3525 | * also make sure that we see the same garbage. | |
3526 | */ | |
3527 | fd = open("conftestmmap", O_RDWR); | |
3528 | if (fd < 0) | |
3529 | exit(1); | |
3530 | data2 = malloc(2 * pagesize); | |
3531 | if (!data2) | |
3532 | exit(1); | |
3533 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
3534 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
3535 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
3536 | exit(1); | |
3537 | for (i = 0; i < pagesize; ++i) | |
3538 | if (*(data + i) != *(data2 + i)) | |
3539 | exit(1); | |
3540 | ||
3541 | /* | |
3542 | * Finally, make sure that changes to the mapped area | |
3543 | * do not percolate back to the file as seen by read(). | |
3544 | * (This is a bug on some variants of i386 svr4.0.) | |
3545 | */ | |
3546 | for (i = 0; i < pagesize; ++i) | |
3547 | *(data2 + i) = *(data2 + i) + 1; | |
3548 | data3 = malloc(pagesize); | |
3549 | if (!data3) | |
3550 | exit(1); | |
3551 | if (read(fd, data3, pagesize) != pagesize) | |
3552 | exit(1); | |
3553 | for (i = 0; i < pagesize; ++i) | |
3554 | if (*(data + i) != *(data3 + i)) | |
3555 | exit(1); | |
3556 | close(fd); | |
3557 | unlink("conftestmmap"); | |
3558 | exit(0); | |
252b5132 | 3559 | } |
6be7c12c AO |
3560 | |
3561 | EOF | |
225247f0 | 3562 | if { (eval echo configure:3563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
6be7c12c | 3563 | then |
252b5132 RH |
3564 | ac_cv_func_mmap_fixed_mapped=yes |
3565 | else | |
6be7c12c AO |
3566 | echo "configure: failed program was:" >&5 |
3567 | cat conftest.$ac_ext >&5 | |
3568 | rm -fr conftest* | |
3569 | ac_cv_func_mmap_fixed_mapped=no | |
252b5132 | 3570 | fi |
6be7c12c | 3571 | rm -fr conftest* |
252b5132 | 3572 | fi |
6be7c12c | 3573 | |
252b5132 | 3574 | fi |
b3baf5d0 | 3575 | |
6be7c12c AO |
3576 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 |
3577 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
3578 | cat >> confdefs.h <<\EOF | |
252b5132 RH |
3579 | #define HAVE_MMAP 1 |
3580 | EOF | |
3581 | ||
3582 | fi | |
3583 | ||
6be7c12c AO |
3584 | |
3585 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
252b5132 RH |
3586 | unistd.h values.h sys/param.h |
3587 | do | |
6be7c12c AO |
3588 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
3589 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
225247f0 | 3590 | echo "configure:3591: checking for $ac_hdr" >&5 |
6be7c12c AO |
3591 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3592 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3593 | else | |
3594 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 3595 | #line 3596 "configure" |
252b5132 | 3596 | #include "confdefs.h" |
6be7c12c AO |
3597 | #include <$ac_hdr> |
3598 | EOF | |
3599 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
225247f0 | 3600 | { (eval echo configure:3601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
6be7c12c AO |
3601 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3602 | if test -z "$ac_err"; then | |
3603 | rm -rf conftest* | |
3604 | eval "ac_cv_header_$ac_safe=yes" | |
252b5132 | 3605 | else |
6be7c12c AO |
3606 | echo "$ac_err" >&5 |
3607 | echo "configure: failed program was:" >&5 | |
252b5132 | 3608 | cat conftest.$ac_ext >&5 |
6be7c12c AO |
3609 | rm -rf conftest* |
3610 | eval "ac_cv_header_$ac_safe=no" | |
252b5132 | 3611 | fi |
6be7c12c | 3612 | rm -f conftest* |
252b5132 | 3613 | fi |
6be7c12c AO |
3614 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
3615 | echo "$ac_t""yes" 1>&6 | |
3616 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3617 | cat >> confdefs.h <<EOF | |
3618 | #define $ac_tr_hdr 1 | |
252b5132 | 3619 | EOF |
6be7c12c AO |
3620 | |
3621 | else | |
3622 | echo "$ac_t""no" 1>&6 | |
252b5132 RH |
3623 | fi |
3624 | done | |
3625 | ||
6be7c12c | 3626 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ |
252b5132 RH |
3627 | __argz_count __argz_stringify __argz_next |
3628 | do | |
6be7c12c | 3629 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
225247f0 | 3630 | echo "configure:3631: checking for $ac_func" >&5 |
6be7c12c AO |
3631 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3632 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3633 | else | |
3634 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 3635 | #line 3636 "configure" |
252b5132 RH |
3636 | #include "confdefs.h" |
3637 | /* System header to define __stub macros and hopefully few prototypes, | |
6be7c12c | 3638 | which can conflict with char $ac_func(); below. */ |
252b5132 RH |
3639 | #include <assert.h> |
3640 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3641 | /* We use char because int might match the return type of a gcc2 | |
6be7c12c AO |
3642 | builtin and then its argument prototype would still apply. */ |
3643 | char $ac_func(); | |
3644 | ||
3645 | int main() { | |
252b5132 RH |
3646 | |
3647 | /* The GNU C library defines this for functions which it implements | |
3648 | to always fail with ENOSYS. Some functions are actually named | |
3649 | something starting with __ and the normal name is an alias. */ | |
3650 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3651 | choke me | |
3652 | #else | |
6be7c12c | 3653 | $ac_func(); |
252b5132 RH |
3654 | #endif |
3655 | ||
6be7c12c | 3656 | ; return 0; } |
252b5132 | 3657 | EOF |
225247f0 | 3658 | if { (eval echo configure:3659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
6be7c12c AO |
3659 | rm -rf conftest* |
3660 | eval "ac_cv_func_$ac_func=yes" | |
3661 | else | |
3662 | echo "configure: failed program was:" >&5 | |
3663 | cat conftest.$ac_ext >&5 | |
3664 | rm -rf conftest* | |
3665 | eval "ac_cv_func_$ac_func=no" | |
3666 | fi | |
3667 | rm -f conftest* | |
3668 | fi | |
252b5132 | 3669 | |
6be7c12c AO |
3670 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
3671 | echo "$ac_t""yes" 1>&6 | |
3672 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3673 | cat >> confdefs.h <<EOF | |
3674 | #define $ac_tr_func 1 | |
3675 | EOF | |
3676 | ||
3677 | else | |
3678 | echo "$ac_t""no" 1>&6 | |
252b5132 RH |
3679 | fi |
3680 | done | |
3681 | ||
b3baf5d0 | 3682 | |
6be7c12c AO |
3683 | if test "${ac_cv_func_stpcpy+set}" != "set"; then |
3684 | for ac_func in stpcpy | |
252b5132 | 3685 | do |
6be7c12c | 3686 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
225247f0 | 3687 | echo "configure:3688: checking for $ac_func" >&5 |
6be7c12c AO |
3688 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3689 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3690 | else | |
3691 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 3692 | #line 3693 "configure" |
252b5132 RH |
3693 | #include "confdefs.h" |
3694 | /* System header to define __stub macros and hopefully few prototypes, | |
6be7c12c | 3695 | which can conflict with char $ac_func(); below. */ |
252b5132 RH |
3696 | #include <assert.h> |
3697 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3698 | /* We use char because int might match the return type of a gcc2 | |
6be7c12c AO |
3699 | builtin and then its argument prototype would still apply. */ |
3700 | char $ac_func(); | |
3701 | ||
3702 | int main() { | |
252b5132 RH |
3703 | |
3704 | /* The GNU C library defines this for functions which it implements | |
3705 | to always fail with ENOSYS. Some functions are actually named | |
3706 | something starting with __ and the normal name is an alias. */ | |
3707 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3708 | choke me | |
3709 | #else | |
6be7c12c | 3710 | $ac_func(); |
252b5132 RH |
3711 | #endif |
3712 | ||
6be7c12c | 3713 | ; return 0; } |
252b5132 | 3714 | EOF |
225247f0 | 3715 | if { (eval echo configure:3716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
6be7c12c AO |
3716 | rm -rf conftest* |
3717 | eval "ac_cv_func_$ac_func=yes" | |
3718 | else | |
3719 | echo "configure: failed program was:" >&5 | |
3720 | cat conftest.$ac_ext >&5 | |
3721 | rm -rf conftest* | |
3722 | eval "ac_cv_func_$ac_func=no" | |
3723 | fi | |
3724 | rm -f conftest* | |
3725 | fi | |
252b5132 | 3726 | |
6be7c12c AO |
3727 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
3728 | echo "$ac_t""yes" 1>&6 | |
3729 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3730 | cat >> confdefs.h <<EOF | |
3731 | #define $ac_tr_func 1 | |
3732 | EOF | |
3733 | ||
3734 | else | |
3735 | echo "$ac_t""no" 1>&6 | |
252b5132 RH |
3736 | fi |
3737 | done | |
3738 | ||
3739 | fi | |
3740 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
6be7c12c | 3741 | cat >> confdefs.h <<\EOF |
252b5132 RH |
3742 | #define HAVE_STPCPY 1 |
3743 | EOF | |
3744 | ||
3745 | fi | |
3746 | ||
3747 | if test $ac_cv_header_locale_h = yes; then | |
6be7c12c | 3748 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 |
225247f0 | 3749 | echo "configure:3750: checking for LC_MESSAGES" >&5 |
6be7c12c AO |
3750 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
3751 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 3752 | else |
6be7c12c | 3753 | cat > conftest.$ac_ext <<EOF |
225247f0 | 3754 | #line 3755 "configure" |
252b5132 RH |
3755 | #include "confdefs.h" |
3756 | #include <locale.h> | |
6be7c12c | 3757 | int main() { |
252b5132 | 3758 | return LC_MESSAGES |
6be7c12c AO |
3759 | ; return 0; } |
3760 | EOF | |
225247f0 | 3761 | if { (eval echo configure:3762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
6be7c12c | 3762 | rm -rf conftest* |
252b5132 RH |
3763 | am_cv_val_LC_MESSAGES=yes |
3764 | else | |
6be7c12c AO |
3765 | echo "configure: failed program was:" >&5 |
3766 | cat conftest.$ac_ext >&5 | |
3767 | rm -rf conftest* | |
3768 | am_cv_val_LC_MESSAGES=no | |
252b5132 | 3769 | fi |
6be7c12c | 3770 | rm -f conftest* |
252b5132 | 3771 | fi |
b3baf5d0 | 3772 | |
6be7c12c AO |
3773 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 |
3774 | if test $am_cv_val_LC_MESSAGES = yes; then | |
3775 | cat >> confdefs.h <<\EOF | |
252b5132 RH |
3776 | #define HAVE_LC_MESSAGES 1 |
3777 | EOF | |
3778 | ||
3779 | fi | |
3780 | fi | |
6be7c12c | 3781 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 |
225247f0 | 3782 | echo "configure:3783: checking whether NLS is requested" >&5 |
252b5132 RH |
3783 | # Check whether --enable-nls or --disable-nls was given. |
3784 | if test "${enable_nls+set}" = set; then | |
3785 | enableval="$enable_nls" | |
3786 | USE_NLS=$enableval | |
3787 | else | |
3788 | USE_NLS=yes | |
6be7c12c AO |
3789 | fi |
3790 | ||
3791 | echo "$ac_t""$USE_NLS" 1>&6 | |
3792 | ||
252b5132 RH |
3793 | |
3794 | USE_INCLUDED_LIBINTL=no | |
3795 | ||
3796 | if test "$USE_NLS" = "yes"; then | |
6be7c12c | 3797 | cat >> confdefs.h <<\EOF |
252b5132 RH |
3798 | #define ENABLE_NLS 1 |
3799 | EOF | |
3800 | ||
6be7c12c | 3801 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 |
225247f0 | 3802 | echo "configure:3803: checking whether included gettext is requested" >&5 |
6be7c12c | 3803 | # Check whether --with-included-gettext or --without-included-gettext was given. |
252b5132 RH |
3804 | if test "${with_included_gettext+set}" = set; then |
3805 | withval="$with_included_gettext" | |
3806 | nls_cv_force_use_gnu_gettext=$withval | |
3807 | else | |
3808 | nls_cv_force_use_gnu_gettext=no | |
6be7c12c AO |
3809 | fi |
3810 | ||
3811 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
252b5132 RH |
3812 | |
3813 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
3814 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
3815 | nls_cv_header_intl= | |
3816 | nls_cv_header_libgt= | |
3817 | CATOBJEXT=NONE | |
3818 | ||
6be7c12c AO |
3819 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` |
3820 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
225247f0 | 3821 | echo "configure:3822: checking for libintl.h" >&5 |
6be7c12c AO |
3822 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3823 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 3824 | else |
6be7c12c | 3825 | cat > conftest.$ac_ext <<EOF |
225247f0 | 3826 | #line 3827 "configure" |
252b5132 RH |
3827 | #include "confdefs.h" |
3828 | #include <libintl.h> | |
6be7c12c AO |
3829 | EOF |
3830 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
225247f0 | 3831 | { (eval echo configure:3832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
6be7c12c AO |
3832 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3833 | if test -z "$ac_err"; then | |
3834 | rm -rf conftest* | |
3835 | eval "ac_cv_header_$ac_safe=yes" | |
252b5132 | 3836 | else |
6be7c12c AO |
3837 | echo "$ac_err" >&5 |
3838 | echo "configure: failed program was:" >&5 | |
252b5132 | 3839 | cat conftest.$ac_ext >&5 |
6be7c12c AO |
3840 | rm -rf conftest* |
3841 | eval "ac_cv_header_$ac_safe=no" | |
252b5132 | 3842 | fi |
6be7c12c | 3843 | rm -f conftest* |
252b5132 | 3844 | fi |
6be7c12c AO |
3845 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
3846 | echo "$ac_t""yes" 1>&6 | |
3847 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
225247f0 | 3848 | echo "configure:3849: checking for gettext in libc" >&5 |
6be7c12c AO |
3849 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
3850 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 3851 | else |
6be7c12c | 3852 | cat > conftest.$ac_ext <<EOF |
225247f0 | 3853 | #line 3854 "configure" |
252b5132 RH |
3854 | #include "confdefs.h" |
3855 | #include <libintl.h> | |
6be7c12c | 3856 | int main() { |
252b5132 | 3857 | return (int) gettext ("") |
6be7c12c AO |
3858 | ; return 0; } |
3859 | EOF | |
225247f0 | 3860 | if { (eval echo configure:3861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
6be7c12c | 3861 | rm -rf conftest* |
252b5132 RH |
3862 | gt_cv_func_gettext_libc=yes |
3863 | else | |
6be7c12c AO |
3864 | echo "configure: failed program was:" >&5 |
3865 | cat conftest.$ac_ext >&5 | |
3866 | rm -rf conftest* | |
3867 | gt_cv_func_gettext_libc=no | |
252b5132 | 3868 | fi |
6be7c12c | 3869 | rm -f conftest* |
252b5132 | 3870 | fi |
6be7c12c AO |
3871 | |
3872 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
252b5132 RH |
3873 | |
3874 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
6be7c12c | 3875 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 |
225247f0 | 3876 | echo "configure:3877: checking for bindtextdomain in -lintl" >&5 |
6be7c12c AO |
3877 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
3878 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3879 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 3880 | else |
6be7c12c | 3881 | ac_save_LIBS="$LIBS" |
252b5132 | 3882 | LIBS="-lintl $LIBS" |
6be7c12c | 3883 | cat > conftest.$ac_ext <<EOF |
225247f0 | 3884 | #line 3885 "configure" |
252b5132 RH |
3885 | #include "confdefs.h" |
3886 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3887 | /* We use char because int might match the return type of a gcc2 | |
6be7c12c AO |
3888 | builtin and then its argument prototype would still apply. */ |
3889 | char bindtextdomain(); | |
3890 | ||
3891 | int main() { | |
3892 | bindtextdomain() | |
3893 | ; return 0; } | |
3894 | EOF | |
225247f0 | 3895 | if { (eval echo configure:3896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
6be7c12c AO |
3896 | rm -rf conftest* |
3897 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3898 | else | |
3899 | echo "configure: failed program was:" >&5 | |
3900 | cat conftest.$ac_ext >&5 | |
3901 | rm -rf conftest* | |
3902 | eval "ac_cv_lib_$ac_lib_var=no" | |
3903 | fi | |
3904 | rm -f conftest* | |
3905 | LIBS="$ac_save_LIBS" | |
3906 | ||
3907 | fi | |
3908 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3909 | echo "$ac_t""yes" 1>&6 | |
3910 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
225247f0 | 3911 | echo "configure:3912: checking for gettext in libintl" >&5 |
6be7c12c AO |
3912 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
3913 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3914 | else | |
3915 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 3916 | #line 3917 "configure" |
252b5132 RH |
3917 | #include "confdefs.h" |
3918 | ||
6be7c12c | 3919 | int main() { |
252b5132 | 3920 | return (int) gettext ("") |
6be7c12c AO |
3921 | ; return 0; } |
3922 | EOF | |
225247f0 | 3923 | if { (eval echo configure:3924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
6be7c12c | 3924 | rm -rf conftest* |
252b5132 RH |
3925 | gt_cv_func_gettext_libintl=yes |
3926 | else | |
6be7c12c AO |
3927 | echo "configure: failed program was:" >&5 |
3928 | cat conftest.$ac_ext >&5 | |
3929 | rm -rf conftest* | |
3930 | gt_cv_func_gettext_libintl=no | |
252b5132 | 3931 | fi |
6be7c12c | 3932 | rm -f conftest* |
252b5132 | 3933 | fi |
6be7c12c AO |
3934 | |
3935 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
3936 | else | |
3937 | echo "$ac_t""no" 1>&6 | |
252b5132 RH |
3938 | fi |
3939 | ||
3940 | fi | |
3941 | ||
3942 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
3943 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
6be7c12c | 3944 | cat >> confdefs.h <<\EOF |
252b5132 RH |
3945 | #define HAVE_GETTEXT 1 |
3946 | EOF | |
3947 | ||
3948 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
3949 | set dummy msgfmt; ac_word=$2 | |
6be7c12c | 3950 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
225247f0 | 3951 | echo "configure:3952: checking for $ac_word" >&5 |
6be7c12c AO |
3952 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
3953 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 RH |
3954 | else |
3955 | case "$MSGFMT" in | |
3956 | /*) | |
3957 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
3958 | ;; | |
3959 | *) | |
3960 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
3961 | for ac_dir in $PATH; do | |
3962 | test -z "$ac_dir" && ac_dir=. | |
3963 | if test -f $ac_dir/$ac_word; then | |
3964 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
3965 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
3966 | break | |
3967 | fi | |
3968 | fi | |
3969 | done | |
3970 | IFS="$ac_save_ifs" | |
3971 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
3972 | ;; | |
3973 | esac | |
3974 | fi | |
3975 | MSGFMT="$ac_cv_path_MSGFMT" | |
3976 | if test -n "$MSGFMT"; then | |
6be7c12c | 3977 | echo "$ac_t""$MSGFMT" 1>&6 |
252b5132 | 3978 | else |
6be7c12c | 3979 | echo "$ac_t""no" 1>&6 |
252b5132 RH |
3980 | fi |
3981 | if test "$MSGFMT" != "no"; then | |
6be7c12c | 3982 | for ac_func in dcgettext |
252b5132 | 3983 | do |
6be7c12c | 3984 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
225247f0 | 3985 | echo "configure:3986: checking for $ac_func" >&5 |
6be7c12c AO |
3986 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3987 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3988 | else | |
3989 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 3990 | #line 3991 "configure" |
252b5132 RH |
3991 | #include "confdefs.h" |
3992 | /* System header to define __stub macros and hopefully few prototypes, | |
6be7c12c | 3993 | which can conflict with char $ac_func(); below. */ |
252b5132 RH |
3994 | #include <assert.h> |
3995 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3996 | /* We use char because int might match the return type of a gcc2 | |
6be7c12c AO |
3997 | builtin and then its argument prototype would still apply. */ |
3998 | char $ac_func(); | |
3999 | ||
4000 | int main() { | |
252b5132 RH |
4001 | |
4002 | /* The GNU C library defines this for functions which it implements | |
4003 | to always fail with ENOSYS. Some functions are actually named | |
4004 | something starting with __ and the normal name is an alias. */ | |
4005 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4006 | choke me | |
4007 | #else | |
6be7c12c | 4008 | $ac_func(); |
252b5132 RH |
4009 | #endif |
4010 | ||
6be7c12c | 4011 | ; return 0; } |
252b5132 | 4012 | EOF |
225247f0 | 4013 | if { (eval echo configure:4014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
6be7c12c AO |
4014 | rm -rf conftest* |
4015 | eval "ac_cv_func_$ac_func=yes" | |
4016 | else | |
4017 | echo "configure: failed program was:" >&5 | |
4018 | cat conftest.$ac_ext >&5 | |
4019 | rm -rf conftest* | |
4020 | eval "ac_cv_func_$ac_func=no" | |
4021 | fi | |
4022 | rm -f conftest* | |
4023 | fi | |
252b5132 | 4024 | |
6be7c12c AO |
4025 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
4026 | echo "$ac_t""yes" 1>&6 | |
4027 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4028 | cat >> confdefs.h <<EOF | |
4029 | #define $ac_tr_func 1 | |
4030 | EOF | |
4031 | ||
4032 | else | |
4033 | echo "$ac_t""no" 1>&6 | |
252b5132 RH |
4034 | fi |
4035 | done | |
4036 | ||
4037 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
4038 | set dummy gmsgfmt; ac_word=$2 | |
6be7c12c | 4039 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
225247f0 | 4040 | echo "configure:4041: checking for $ac_word" >&5 |
6be7c12c AO |
4041 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
4042 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 4043 | else |
6be7c12c AO |
4044 | case "$GMSGFMT" in |
4045 | /*) | |
252b5132 RH |
4046 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. |
4047 | ;; | |
6be7c12c AO |
4048 | ?:/*) |
4049 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
4050 | ;; | |
252b5132 | 4051 | *) |
6be7c12c AO |
4052 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
4053 | ac_dummy="$PATH" | |
4054 | for ac_dir in $ac_dummy; do | |
4055 | test -z "$ac_dir" && ac_dir=. | |
4056 | if test -f $ac_dir/$ac_word; then | |
4057 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
4058 | break | |
4059 | fi | |
4060 | done | |
4061 | IFS="$ac_save_ifs" | |
252b5132 RH |
4062 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" |
4063 | ;; | |
4064 | esac | |
4065 | fi | |
6be7c12c | 4066 | GMSGFMT="$ac_cv_path_GMSGFMT" |
252b5132 | 4067 | if test -n "$GMSGFMT"; then |
6be7c12c | 4068 | echo "$ac_t""$GMSGFMT" 1>&6 |
252b5132 | 4069 | else |
6be7c12c | 4070 | echo "$ac_t""no" 1>&6 |
252b5132 RH |
4071 | fi |
4072 | ||
4073 | # Extract the first word of "xgettext", so it can be a program name with args. | |
4074 | set dummy xgettext; ac_word=$2 | |
6be7c12c | 4075 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
225247f0 | 4076 | echo "configure:4077: checking for $ac_word" >&5 |
6be7c12c AO |
4077 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
4078 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 RH |
4079 | else |
4080 | case "$XGETTEXT" in | |
4081 | /*) | |
4082 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
4083 | ;; | |
4084 | *) | |
4085 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
4086 | for ac_dir in $PATH; do | |
4087 | test -z "$ac_dir" && ac_dir=. | |
4088 | if test -f $ac_dir/$ac_word; then | |
4089 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
4090 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
4091 | break | |
4092 | fi | |
4093 | fi | |
4094 | done | |
4095 | IFS="$ac_save_ifs" | |
4096 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
4097 | ;; | |
4098 | esac | |
4099 | fi | |
4100 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
4101 | if test -n "$XGETTEXT"; then | |
6be7c12c | 4102 | echo "$ac_t""$XGETTEXT" 1>&6 |
252b5132 | 4103 | else |
6be7c12c | 4104 | echo "$ac_t""no" 1>&6 |
252b5132 RH |
4105 | fi |
4106 | ||
6be7c12c | 4107 | cat > conftest.$ac_ext <<EOF |
225247f0 | 4108 | #line 4109 "configure" |
252b5132 RH |
4109 | #include "confdefs.h" |
4110 | ||
6be7c12c | 4111 | int main() { |
252b5132 RH |
4112 | extern int _nl_msg_cat_cntr; |
4113 | return _nl_msg_cat_cntr | |
6be7c12c AO |
4114 | ; return 0; } |
4115 | EOF | |
225247f0 | 4116 | if { (eval echo configure:4117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
6be7c12c | 4117 | rm -rf conftest* |
252b5132 RH |
4118 | CATOBJEXT=.gmo |
4119 | DATADIRNAME=share | |
4120 | else | |
6be7c12c AO |
4121 | echo "configure: failed program was:" >&5 |
4122 | cat conftest.$ac_ext >&5 | |
4123 | rm -rf conftest* | |
4124 | CATOBJEXT=.mo | |
252b5132 RH |
4125 | DATADIRNAME=lib |
4126 | fi | |
6be7c12c | 4127 | rm -f conftest* |
252b5132 RH |
4128 | INSTOBJEXT=.mo |
4129 | fi | |
4130 | fi | |
6be7c12c AO |
4131 | |
4132 | else | |
4133 | echo "$ac_t""no" 1>&6 | |
b3baf5d0 | 4134 | fi |
252b5132 | 4135 | |
6be7c12c AO |
4136 | |
4137 | ||
252b5132 RH |
4138 | if test "$CATOBJEXT" = "NONE"; then |
4139 | nls_cv_use_gnu_gettext=yes | |
4140 | fi | |
4141 | fi | |
4142 | ||
4143 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
4144 | INTLOBJS="\$(GETTOBJS)" | |
4145 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
4146 | set dummy msgfmt; ac_word=$2 | |
6be7c12c | 4147 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
225247f0 | 4148 | echo "configure:4149: checking for $ac_word" >&5 |
6be7c12c AO |
4149 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
4150 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 RH |
4151 | else |
4152 | case "$MSGFMT" in | |
4153 | /*) | |
4154 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
4155 | ;; | |
4156 | *) | |
4157 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
4158 | for ac_dir in $PATH; do | |
4159 | test -z "$ac_dir" && ac_dir=. | |
4160 | if test -f $ac_dir/$ac_word; then | |
4161 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
4162 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
4163 | break | |
4164 | fi | |
4165 | fi | |
4166 | done | |
4167 | IFS="$ac_save_ifs" | |
4168 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
4169 | ;; | |
4170 | esac | |
4171 | fi | |
4172 | MSGFMT="$ac_cv_path_MSGFMT" | |
4173 | if test -n "$MSGFMT"; then | |
6be7c12c | 4174 | echo "$ac_t""$MSGFMT" 1>&6 |
252b5132 | 4175 | else |
6be7c12c | 4176 | echo "$ac_t""no" 1>&6 |
252b5132 RH |
4177 | fi |
4178 | ||
4179 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
4180 | set dummy gmsgfmt; ac_word=$2 | |
6be7c12c | 4181 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
225247f0 | 4182 | echo "configure:4183: checking for $ac_word" >&5 |
6be7c12c AO |
4183 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
4184 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 4185 | else |
6be7c12c AO |
4186 | case "$GMSGFMT" in |
4187 | /*) | |
252b5132 RH |
4188 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. |
4189 | ;; | |
6be7c12c AO |
4190 | ?:/*) |
4191 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
4192 | ;; | |
252b5132 | 4193 | *) |
6be7c12c AO |
4194 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
4195 | ac_dummy="$PATH" | |
4196 | for ac_dir in $ac_dummy; do | |
4197 | test -z "$ac_dir" && ac_dir=. | |
4198 | if test -f $ac_dir/$ac_word; then | |
4199 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
4200 | break | |
4201 | fi | |
4202 | done | |
4203 | IFS="$ac_save_ifs" | |
252b5132 RH |
4204 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" |
4205 | ;; | |
4206 | esac | |
4207 | fi | |
6be7c12c | 4208 | GMSGFMT="$ac_cv_path_GMSGFMT" |
252b5132 | 4209 | if test -n "$GMSGFMT"; then |
6be7c12c | 4210 | echo "$ac_t""$GMSGFMT" 1>&6 |
252b5132 | 4211 | else |
6be7c12c | 4212 | echo "$ac_t""no" 1>&6 |
252b5132 RH |
4213 | fi |
4214 | ||
4215 | # Extract the first word of "xgettext", so it can be a program name with args. | |
4216 | set dummy xgettext; ac_word=$2 | |
6be7c12c | 4217 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
225247f0 | 4218 | echo "configure:4219: checking for $ac_word" >&5 |
6be7c12c AO |
4219 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
4220 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 RH |
4221 | else |
4222 | case "$XGETTEXT" in | |
4223 | /*) | |
4224 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
4225 | ;; | |
4226 | *) | |
4227 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
4228 | for ac_dir in $PATH; do | |
4229 | test -z "$ac_dir" && ac_dir=. | |
4230 | if test -f $ac_dir/$ac_word; then | |
4231 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
4232 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
4233 | break | |
4234 | fi | |
4235 | fi | |
4236 | done | |
4237 | IFS="$ac_save_ifs" | |
4238 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
4239 | ;; | |
4240 | esac | |
4241 | fi | |
4242 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
4243 | if test -n "$XGETTEXT"; then | |
6be7c12c | 4244 | echo "$ac_t""$XGETTEXT" 1>&6 |
252b5132 | 4245 | else |
6be7c12c | 4246 | echo "$ac_t""no" 1>&6 |
252b5132 RH |
4247 | fi |
4248 | ||
6be7c12c | 4249 | |
252b5132 RH |
4250 | USE_INCLUDED_LIBINTL=yes |
4251 | CATOBJEXT=.gmo | |
4252 | INSTOBJEXT=.mo | |
4253 | DATADIRNAME=share | |
4254 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
4255 | INTLLIBS=$INTLDEPS | |
4256 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
4257 | nls_cv_header_intl=libintl.h | |
4258 | nls_cv_header_libgt=libgettext.h | |
4259 | fi | |
4260 | ||
4261 | if test "$XGETTEXT" != ":"; then | |
4262 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
4263 | : ; | |
4264 | else | |
6be7c12c | 4265 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 |
252b5132 RH |
4266 | XGETTEXT=":" |
4267 | fi | |
4268 | fi | |
4269 | ||
4270 | # We need to process the po/ directory. | |
4271 | POSUB=po | |
4272 | else | |
4273 | DATADIRNAME=share | |
4274 | nls_cv_header_intl=libintl.h | |
4275 | nls_cv_header_libgt=libgettext.h | |
4276 | fi | |
4277 | ||
4278 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
4279 | # because some of the sources are only built for this goal. | |
4280 | if test "$PACKAGE" = gettext; then | |
4281 | USE_NLS=yes | |
4282 | USE_INCLUDED_LIBINTL=yes | |
4283 | fi | |
4284 | ||
4285 | for lang in $ALL_LINGUAS; do | |
4286 | GMOFILES="$GMOFILES $lang.gmo" | |
4287 | POFILES="$POFILES $lang.po" | |
4288 | done | |
4289 | ||
6be7c12c AO |
4290 | |
4291 | ||
4292 | ||
4293 | ||
4294 | ||
4295 | ||
4296 | ||
4297 | ||
4298 | ||
4299 | ||
4300 | ||
4301 | ||
4302 | ||
252b5132 RH |
4303 | if test "x$CATOBJEXT" != "x"; then |
4304 | if test "x$ALL_LINGUAS" = "x"; then | |
4305 | LINGUAS= | |
4306 | else | |
6be7c12c | 4307 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 |
225247f0 | 4308 | echo "configure:4309: checking for catalogs to be installed" >&5 |
252b5132 RH |
4309 | NEW_LINGUAS= |
4310 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
4311 | case "$ALL_LINGUAS" in | |
4312 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
4313 | esac | |
4314 | done | |
4315 | LINGUAS=$NEW_LINGUAS | |
6be7c12c | 4316 | echo "$ac_t""$LINGUAS" 1>&6 |
252b5132 RH |
4317 | fi |
4318 | ||
4319 | if test -n "$LINGUAS"; then | |
4320 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
4321 | fi | |
4322 | fi | |
4323 | ||
4324 | if test $ac_cv_header_locale_h = yes; then | |
4325 | INCLUDE_LOCALE_H="#include <locale.h>" | |
4326 | else | |
4327 | INCLUDE_LOCALE_H="\ | |
4328 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
4329 | fi | |
6be7c12c | 4330 | |
252b5132 RH |
4331 | |
4332 | if test -f $srcdir/po2tbl.sed.in; then | |
4333 | if test "$CATOBJEXT" = ".cat"; then | |
6be7c12c AO |
4334 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` |
4335 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
225247f0 | 4336 | echo "configure:4337: checking for linux/version.h" >&5 |
6be7c12c AO |
4337 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4338 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4339 | else | |
4340 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 4341 | #line 4342 "configure" |
252b5132 RH |
4342 | #include "confdefs.h" |
4343 | #include <linux/version.h> | |
6be7c12c AO |
4344 | EOF |
4345 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
225247f0 | 4346 | { (eval echo configure:4347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
6be7c12c AO |
4347 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4348 | if test -z "$ac_err"; then | |
4349 | rm -rf conftest* | |
4350 | eval "ac_cv_header_$ac_safe=yes" | |
252b5132 | 4351 | else |
6be7c12c AO |
4352 | echo "$ac_err" >&5 |
4353 | echo "configure: failed program was:" >&5 | |
252b5132 | 4354 | cat conftest.$ac_ext >&5 |
6be7c12c AO |
4355 | rm -rf conftest* |
4356 | eval "ac_cv_header_$ac_safe=no" | |
252b5132 | 4357 | fi |
6be7c12c | 4358 | rm -f conftest* |
252b5132 | 4359 | fi |
6be7c12c AO |
4360 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
4361 | echo "$ac_t""yes" 1>&6 | |
252b5132 RH |
4362 | msgformat=linux |
4363 | else | |
6be7c12c AO |
4364 | echo "$ac_t""no" 1>&6 |
4365 | msgformat=xopen | |
252b5132 RH |
4366 | fi |
4367 | ||
6be7c12c | 4368 | |
252b5132 RH |
4369 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed |
4370 | fi | |
4371 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
4372 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
4373 | fi | |
4374 | ||
4375 | if test "$PACKAGE" = "gettext"; then | |
4376 | GT_NO="#NO#" | |
4377 | GT_YES= | |
4378 | else | |
4379 | GT_NO= | |
4380 | GT_YES="#YES#" | |
4381 | fi | |
6be7c12c AO |
4382 | |
4383 | ||
252b5132 RH |
4384 | |
4385 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
6be7c12c | 4386 | |
252b5132 RH |
4387 | |
4388 | l= | |
6be7c12c | 4389 | |
252b5132 | 4390 | |
3c3bdf30 | 4391 | if test -f $srcdir/po/POTFILES.in; then |
252b5132 RH |
4392 | test -d po || mkdir po |
4393 | if test "x$srcdir" != "x."; then | |
4394 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
4395 | posrcprefix="$srcdir/" | |
4396 | else | |
4397 | posrcprefix="../$srcdir/" | |
4398 | fi | |
4399 | else | |
4400 | posrcprefix="../" | |
4401 | fi | |
4402 | rm -f po/POTFILES | |
4403 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
4404 | < $srcdir/po/POTFILES.in > po/POTFILES | |
4405 | fi | |
6be7c12c | 4406 | |
252b5132 RH |
4407 | |
4408 | # Permit host specific settings. | |
4409 | . ${srcdir}/configure.host | |
4410 | ||
6be7c12c | 4411 | |
252b5132 RH |
4412 | # Find a good install program. We prefer a C program (faster), |
4413 | # so one script is as good as another. But avoid the broken or | |
4414 | # incompatible versions: | |
4415 | # SysV /etc/install, /usr/sbin/install | |
4416 | # SunOS /usr/etc/install | |
4417 | # IRIX /sbin/install | |
4418 | # AIX /bin/install | |
4419 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
4420 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
4421 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
4422 | # ./install, which can be erroneously created by make from ./install.sh. | |
6be7c12c | 4423 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
225247f0 | 4424 | echo "configure:4425: checking for a BSD compatible install" >&5 |
252b5132 | 4425 | if test -z "$INSTALL"; then |
6be7c12c AO |
4426 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
4427 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 4428 | else |
6be7c12c | 4429 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" |
252b5132 RH |
4430 | for ac_dir in $PATH; do |
4431 | # Account for people who put trailing slashes in PATH elements. | |
6be7c12c AO |
4432 | case "$ac_dir/" in |
4433 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
252b5132 RH |
4434 | *) |
4435 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
4436 | # Don't use installbsd from OSF since it installs stuff as root | |
4437 | # by default. | |
4438 | for ac_prog in ginstall scoinst install; do | |
6be7c12c | 4439 | if test -f $ac_dir/$ac_prog; then |
252b5132 | 4440 | if test $ac_prog = install && |
6be7c12c | 4441 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then |
252b5132 RH |
4442 | # AIX install. It has an incompatible calling convention. |
4443 | : | |
4444 | else | |
4445 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
4446 | break 2 | |
4447 | fi | |
4448 | fi | |
4449 | done | |
4450 | ;; | |
4451 | esac | |
4452 | done | |
6be7c12c | 4453 | IFS="$ac_save_IFS" |
252b5132 RH |
4454 | |
4455 | fi | |
4456 | if test "${ac_cv_path_install+set}" = set; then | |
6be7c12c | 4457 | INSTALL="$ac_cv_path_install" |
252b5132 RH |
4458 | else |
4459 | # As a last resort, use the slow shell script. We don't cache a | |
4460 | # path for INSTALL within a source directory, because that will | |
4461 | # break other packages using the cache if that directory is | |
4462 | # removed, or if the path is relative. | |
6be7c12c | 4463 | INSTALL="$ac_install_sh" |
252b5132 RH |
4464 | fi |
4465 | fi | |
6be7c12c | 4466 | echo "$ac_t""$INSTALL" 1>&6 |
252b5132 RH |
4467 | |
4468 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
4469 | # It thinks the first close brace ends the variable substitution. | |
4470 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
4471 | ||
6be7c12c | 4472 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' |
252b5132 RH |
4473 | |
4474 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
4475 | ||
6be7c12c | 4476 | |
252b5132 | 4477 | BFD_HOST_64BIT_LONG=0 |
ec317fb1 | 4478 | BFD_HOST_LONG_LONG=0 |
252b5132 RH |
4479 | BFD_HOST_64_BIT_DEFINED=0 |
4480 | BFD_HOST_64_BIT= | |
4481 | BFD_HOST_U_64_BIT= | |
252b5132 | 4482 | |
ec317fb1 | 4483 | echo $ac_n "checking for long long""... $ac_c" 1>&6 |
225247f0 | 4484 | echo "configure:4485: checking for long long" >&5 |
ec317fb1 ILT |
4485 | if eval "test \"`echo '$''{'bfd_cv_has_long_long'+set}'`\" = set"; then |
4486 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4487 | else | |
4488 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 4489 | #line 4490 "configure" |
ec317fb1 ILT |
4490 | #include "confdefs.h" |
4491 | ||
4492 | int main() { | |
4493 | unsigned long long ll = 18446744073709551615ULL; | |
4494 | ; return 0; } | |
4495 | EOF | |
225247f0 | 4496 | if { (eval echo configure:4497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
ec317fb1 ILT |
4497 | rm -rf conftest* |
4498 | bfd_cv_has_long_long=yes | |
4499 | else | |
4500 | echo "configure: failed program was:" >&5 | |
4501 | cat conftest.$ac_ext >&5 | |
4502 | rm -rf conftest* | |
4503 | bfd_cv_has_long_long=no | |
4504 | fi | |
4505 | rm -f conftest* | |
4506 | fi | |
4507 | ||
4508 | echo "$ac_t""$bfd_cv_has_long_long" 1>&6 | |
4509 | if test $bfd_cv_has_long_long = yes; then | |
4510 | BFD_HOST_LONG_LONG=1 | |
6726e1ea | 4511 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 |
225247f0 | 4512 | echo "configure:4513: checking size of long long" >&5 |
6726e1ea L |
4513 | if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then |
4514 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4515 | else | |
4516 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. | |
4517 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 4518 | #line 4519 "configure" |
6726e1ea L |
4519 | #include "confdefs.h" |
4520 | #include "confdefs.h" | |
4521 | #include <sys/types.h> | |
4522 | ||
4523 | ||
4524 | int main() { | |
4525 | switch (0) case 0: case (sizeof (long long) == $ac_size):; | |
4526 | ; return 0; } | |
4527 | EOF | |
225247f0 | 4528 | if { (eval echo configure:4529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6726e1ea L |
4529 | rm -rf conftest* |
4530 | ac_cv_sizeof_long_long=$ac_size | |
4531 | else | |
4532 | echo "configure: failed program was:" >&5 | |
4533 | cat conftest.$ac_ext >&5 | |
4534 | fi | |
4535 | rm -f conftest* | |
4536 | if test x$ac_cv_sizeof_long_long != x ; then break; fi | |
4537 | done | |
4538 | ||
4539 | fi | |
4540 | ||
4541 | if test x$ac_cv_sizeof_long_long = x ; then | |
4542 | { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; } | |
4543 | fi | |
4544 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 | |
4545 | cat >> confdefs.h <<EOF | |
4546 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
4547 | EOF | |
4548 | ||
4549 | ||
4550 | fi | |
4551 | ||
4552 | echo $ac_n "checking size of long""... $ac_c" 1>&6 | |
225247f0 | 4553 | echo "configure:4554: checking size of long" >&5 |
6726e1ea L |
4554 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
4555 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4556 | else | |
4557 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. | |
4558 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 4559 | #line 4560 "configure" |
6726e1ea L |
4560 | #include "confdefs.h" |
4561 | #include "confdefs.h" | |
4562 | #include <sys/types.h> | |
4563 | ||
4564 | ||
4565 | int main() { | |
4566 | switch (0) case 0: case (sizeof (long) == $ac_size):; | |
4567 | ; return 0; } | |
4568 | EOF | |
225247f0 | 4569 | if { (eval echo configure:4570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6726e1ea L |
4570 | rm -rf conftest* |
4571 | ac_cv_sizeof_long=$ac_size | |
4572 | else | |
4573 | echo "configure: failed program was:" >&5 | |
4574 | cat conftest.$ac_ext >&5 | |
4575 | fi | |
4576 | rm -f conftest* | |
4577 | if test x$ac_cv_sizeof_long != x ; then break; fi | |
4578 | done | |
4579 | ||
4580 | fi | |
4581 | ||
4582 | if test x$ac_cv_sizeof_long = x ; then | |
4583 | { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } | |
4584 | fi | |
4585 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 | |
4586 | cat >> confdefs.h <<EOF | |
4587 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
4588 | EOF | |
4589 | ||
4590 | ||
4591 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
4592 | host64=true | |
ccba357f AM |
4593 | BFD_HOST_64BIT_LONG=1 |
4594 | test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long" | |
4595 | test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long" | |
6726e1ea | 4596 | elif test "x${ac_cv_sizeof_long_long}" = "x8"; then |
ccba357f AM |
4597 | test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long" |
4598 | test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long" | |
6726e1ea L |
4599 | fi |
4600 | ||
ccba357f | 4601 | if test -n "${HOST_64BIT_TYPE}" -a -n "${HOST_U_64BIT_TYPE}"; then |
6726e1ea | 4602 | BFD_HOST_64_BIT_DEFINED=1 |
ccba357f AM |
4603 | BFD_HOST_64_BIT="${HOST_64BIT_TYPE}" |
4604 | BFD_HOST_U_64_BIT="${HOST_U_64BIT_TYPE}" | |
ec317fb1 ILT |
4605 | fi |
4606 | ||
4607 | ||
4608 | ||
6be7c12c AO |
4609 | |
4610 | ||
4611 | ||
4612 | ||
252b5132 RH |
4613 | # Put a plausible default for CC_FOR_BUILD in Makefile. |
4614 | if test -z "$CC_FOR_BUILD"; then | |
4615 | if test "x$cross_compiling" = "xno"; then | |
4616 | CC_FOR_BUILD='$(CC)' | |
4617 | else | |
4618 | CC_FOR_BUILD=gcc | |
4619 | fi | |
4620 | fi | |
4621 | ||
4622 | # Also set EXEEXT_FOR_BUILD. | |
4623 | if test "x$cross_compiling" = "xno"; then | |
4624 | EXEEXT_FOR_BUILD='$(EXEEXT)' | |
4625 | else | |
6be7c12c | 4626 | echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6 |
225247f0 | 4627 | echo "configure:4628: checking for build system executable suffix" >&5 |
6be7c12c AO |
4628 | if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then |
4629 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 4630 | else |
aab08431 ILT |
4631 | rm -f conftest* |
4632 | echo 'int main () { return 0; }' > conftest.c | |
4633 | bfd_cv_build_exeext= | |
4634 | ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5 | |
4635 | for file in conftest.*; do | |
4636 | case $file in | |
4637 | *.c | *.o | *.obj | *.ilk | *.pdb) ;; | |
4638 | *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;; | |
4639 | esac | |
4640 | done | |
4641 | rm -f conftest* | |
4642 | test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no | |
252b5132 | 4643 | fi |
6be7c12c AO |
4644 | |
4645 | echo "$ac_t""$bfd_cv_build_exeext" 1>&6 | |
252b5132 RH |
4646 | EXEEXT_FOR_BUILD="" |
4647 | test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext} | |
4648 | fi | |
4649 | ||
6be7c12c AO |
4650 | |
4651 | for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h | |
252b5132 | 4652 | do |
6be7c12c AO |
4653 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
4654 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
225247f0 | 4655 | echo "configure:4656: checking for $ac_hdr" >&5 |
6be7c12c AO |
4656 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4657 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4658 | else | |
4659 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 4660 | #line 4661 "configure" |
252b5132 | 4661 | #include "confdefs.h" |
6be7c12c AO |
4662 | #include <$ac_hdr> |
4663 | EOF | |
4664 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
225247f0 | 4665 | { (eval echo configure:4666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
6be7c12c AO |
4666 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4667 | if test -z "$ac_err"; then | |
4668 | rm -rf conftest* | |
4669 | eval "ac_cv_header_$ac_safe=yes" | |
252b5132 | 4670 | else |
6be7c12c AO |
4671 | echo "$ac_err" >&5 |
4672 | echo "configure: failed program was:" >&5 | |
252b5132 | 4673 | cat conftest.$ac_ext >&5 |
6be7c12c AO |
4674 | rm -rf conftest* |
4675 | eval "ac_cv_header_$ac_safe=no" | |
252b5132 | 4676 | fi |
6be7c12c | 4677 | rm -f conftest* |
252b5132 | 4678 | fi |
6be7c12c AO |
4679 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
4680 | echo "$ac_t""yes" 1>&6 | |
4681 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4682 | cat >> confdefs.h <<EOF | |
4683 | #define $ac_tr_hdr 1 | |
252b5132 | 4684 | EOF |
6be7c12c AO |
4685 | |
4686 | else | |
4687 | echo "$ac_t""no" 1>&6 | |
252b5132 RH |
4688 | fi |
4689 | done | |
4690 | ||
6be7c12c | 4691 | for ac_hdr in fcntl.h sys/file.h sys/time.h |
252b5132 | 4692 | do |
6be7c12c AO |
4693 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
4694 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
225247f0 | 4695 | echo "configure:4696: checking for $ac_hdr" >&5 |
6be7c12c AO |
4696 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4697 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4698 | else | |
4699 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 4700 | #line 4701 "configure" |
252b5132 | 4701 | #include "confdefs.h" |
6be7c12c AO |
4702 | #include <$ac_hdr> |
4703 | EOF | |
4704 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
225247f0 | 4705 | { (eval echo configure:4706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
6be7c12c AO |
4706 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4707 | if test -z "$ac_err"; then | |
4708 | rm -rf conftest* | |
4709 | eval "ac_cv_header_$ac_safe=yes" | |
252b5132 | 4710 | else |
6be7c12c AO |
4711 | echo "$ac_err" >&5 |
4712 | echo "configure: failed program was:" >&5 | |
252b5132 | 4713 | cat conftest.$ac_ext >&5 |
6be7c12c AO |
4714 | rm -rf conftest* |
4715 | eval "ac_cv_header_$ac_safe=no" | |
252b5132 | 4716 | fi |
6be7c12c | 4717 | rm -f conftest* |
252b5132 | 4718 | fi |
6be7c12c AO |
4719 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
4720 | echo "$ac_t""yes" 1>&6 | |
4721 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4722 | cat >> confdefs.h <<EOF | |
4723 | #define $ac_tr_hdr 1 | |
252b5132 | 4724 | EOF |
6be7c12c AO |
4725 | |
4726 | else | |
4727 | echo "$ac_t""no" 1>&6 | |
252b5132 RH |
4728 | fi |
4729 | done | |
4730 | ||
6be7c12c | 4731 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
225247f0 | 4732 | echo "configure:4733: checking whether time.h and sys/time.h may both be included" >&5 |
6be7c12c AO |
4733 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
4734 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 4735 | else |
6be7c12c | 4736 | cat > conftest.$ac_ext <<EOF |
225247f0 | 4737 | #line 4738 "configure" |
252b5132 RH |
4738 | #include "confdefs.h" |
4739 | #include <sys/types.h> | |
4740 | #include <sys/time.h> | |
4741 | #include <time.h> | |
6be7c12c | 4742 | int main() { |
252b5132 | 4743 | struct tm *tp; |
6be7c12c AO |
4744 | ; return 0; } |
4745 | EOF | |
225247f0 | 4746 | if { (eval echo configure:4747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c | 4747 | rm -rf conftest* |
252b5132 RH |
4748 | ac_cv_header_time=yes |
4749 | else | |
6be7c12c AO |
4750 | echo "configure: failed program was:" >&5 |
4751 | cat conftest.$ac_ext >&5 | |
4752 | rm -rf conftest* | |
4753 | ac_cv_header_time=no | |
252b5132 | 4754 | fi |
6be7c12c | 4755 | rm -f conftest* |
252b5132 | 4756 | fi |
b3baf5d0 | 4757 | |
6be7c12c AO |
4758 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
4759 | if test $ac_cv_header_time = yes; then | |
4760 | cat >> confdefs.h <<\EOF | |
252b5132 RH |
4761 | #define TIME_WITH_SYS_TIME 1 |
4762 | EOF | |
4763 | ||
4764 | fi | |
4765 | ||
4766 | ac_header_dirent=no | |
6be7c12c AO |
4767 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h |
4768 | do | |
4769 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4770 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 | |
225247f0 | 4771 | echo "configure:4772: checking for $ac_hdr that defines DIR" >&5 |
6be7c12c AO |
4772 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
4773 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4774 | else | |
4775 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 4776 | #line 4777 "configure" |
252b5132 RH |
4777 | #include "confdefs.h" |
4778 | #include <sys/types.h> | |
4779 | #include <$ac_hdr> | |
6be7c12c | 4780 | int main() { |
252b5132 | 4781 | DIR *dirp = 0; |
6be7c12c AO |
4782 | ; return 0; } |
4783 | EOF | |
225247f0 | 4784 | if { (eval echo configure:4785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c AO |
4785 | rm -rf conftest* |
4786 | eval "ac_cv_header_dirent_$ac_safe=yes" | |
252b5132 | 4787 | else |
6be7c12c AO |
4788 | echo "configure: failed program was:" >&5 |
4789 | cat conftest.$ac_ext >&5 | |
4790 | rm -rf conftest* | |
4791 | eval "ac_cv_header_dirent_$ac_safe=no" | |
252b5132 | 4792 | fi |
6be7c12c | 4793 | rm -f conftest* |
252b5132 | 4794 | fi |
6be7c12c AO |
4795 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then |
4796 | echo "$ac_t""yes" 1>&6 | |
4797 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4798 | cat >> confdefs.h <<EOF | |
4799 | #define $ac_tr_hdr 1 | |
252b5132 | 4800 | EOF |
6be7c12c AO |
4801 | ac_header_dirent=$ac_hdr; break |
4802 | else | |
4803 | echo "$ac_t""no" 1>&6 | |
252b5132 RH |
4804 | fi |
4805 | done | |
4806 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
4807 | if test $ac_header_dirent = dirent.h; then | |
6be7c12c | 4808 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 |
225247f0 | 4809 | echo "configure:4810: checking for opendir in -ldir" >&5 |
6be7c12c AO |
4810 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
4811 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4812 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 4813 | else |
6be7c12c | 4814 | ac_save_LIBS="$LIBS" |
252b5132 | 4815 | LIBS="-ldir $LIBS" |
6be7c12c | 4816 | cat > conftest.$ac_ext <<EOF |
225247f0 | 4817 | #line 4818 "configure" |
252b5132 RH |
4818 | #include "confdefs.h" |
4819 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4820 | /* We use char because int might match the return type of a gcc2 | |
6be7c12c AO |
4821 | builtin and then its argument prototype would still apply. */ |
4822 | char opendir(); | |
4823 | ||
4824 | int main() { | |
4825 | opendir() | |
4826 | ; return 0; } | |
4827 | EOF | |
225247f0 | 4828 | if { (eval echo configure:4829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
6be7c12c AO |
4829 | rm -rf conftest* |
4830 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4831 | else | |
4832 | echo "configure: failed program was:" >&5 | |
4833 | cat conftest.$ac_ext >&5 | |
4834 | rm -rf conftest* | |
4835 | eval "ac_cv_lib_$ac_lib_var=no" | |
4836 | fi | |
4837 | rm -f conftest* | |
4838 | LIBS="$ac_save_LIBS" | |
4839 | ||
4840 | fi | |
4841 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4842 | echo "$ac_t""yes" 1>&6 | |
252b5132 | 4843 | LIBS="$LIBS -ldir" |
6be7c12c AO |
4844 | else |
4845 | echo "$ac_t""no" 1>&6 | |
252b5132 RH |
4846 | fi |
4847 | ||
4848 | else | |
6be7c12c | 4849 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 |
225247f0 | 4850 | echo "configure:4851: checking for opendir in -lx" >&5 |
6be7c12c AO |
4851 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
4852 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4853 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b3baf5d0 | 4854 | else |
6be7c12c | 4855 | ac_save_LIBS="$LIBS" |
b3baf5d0 | 4856 | LIBS="-lx $LIBS" |
6be7c12c | 4857 | cat > conftest.$ac_ext <<EOF |
225247f0 | 4858 | #line 4859 "configure" |
b3baf5d0 | 4859 | #include "confdefs.h" |
6be7c12c AO |
4860 | /* Override any gcc2 internal prototype to avoid an error. */ |
4861 | /* We use char because int might match the return type of a gcc2 | |
4862 | builtin and then its argument prototype would still apply. */ | |
4863 | char opendir(); | |
4864 | ||
4865 | int main() { | |
4866 | opendir() | |
4867 | ; return 0; } | |
4868 | EOF | |
225247f0 | 4869 | if { (eval echo configure:4870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
6be7c12c AO |
4870 | rm -rf conftest* |
4871 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4872 | else | |
4873 | echo "configure: failed program was:" >&5 | |
4874 | cat conftest.$ac_ext >&5 | |
4875 | rm -rf conftest* | |
4876 | eval "ac_cv_lib_$ac_lib_var=no" | |
4877 | fi | |
4878 | rm -f conftest* | |
4879 | LIBS="$ac_save_LIBS" | |
252b5132 | 4880 | |
6be7c12c AO |
4881 | fi |
4882 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4883 | echo "$ac_t""yes" 1>&6 | |
252b5132 | 4884 | LIBS="$LIBS -lx" |
6be7c12c AO |
4885 | else |
4886 | echo "$ac_t""no" 1>&6 | |
252b5132 RH |
4887 | fi |
4888 | ||
4889 | fi | |
4890 | ||
633fd09f | 4891 | for ac_func in fcntl getpagesize setitimer sysconf fdopen getuid getgid |
252b5132 | 4892 | do |
6be7c12c | 4893 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
225247f0 | 4894 | echo "configure:4895: checking for $ac_func" >&5 |
6be7c12c AO |
4895 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
4896 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4897 | else | |
4898 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 4899 | #line 4900 "configure" |
252b5132 RH |
4900 | #include "confdefs.h" |
4901 | /* System header to define __stub macros and hopefully few prototypes, | |
6be7c12c | 4902 | which can conflict with char $ac_func(); below. */ |
252b5132 RH |
4903 | #include <assert.h> |
4904 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4905 | /* We use char because int might match the return type of a gcc2 | |
6be7c12c AO |
4906 | builtin and then its argument prototype would still apply. */ |
4907 | char $ac_func(); | |
4908 | ||
4909 | int main() { | |
252b5132 RH |
4910 | |
4911 | /* The GNU C library defines this for functions which it implements | |
4912 | to always fail with ENOSYS. Some functions are actually named | |
4913 | something starting with __ and the normal name is an alias. */ | |
4914 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4915 | choke me | |
4916 | #else | |
6be7c12c | 4917 | $ac_func(); |
252b5132 RH |
4918 | #endif |
4919 | ||
6be7c12c | 4920 | ; return 0; } |
252b5132 | 4921 | EOF |
225247f0 | 4922 | if { (eval echo configure:4923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
6be7c12c AO |
4923 | rm -rf conftest* |
4924 | eval "ac_cv_func_$ac_func=yes" | |
4925 | else | |
4926 | echo "configure: failed program was:" >&5 | |
4927 | cat conftest.$ac_ext >&5 | |
4928 | rm -rf conftest* | |
4929 | eval "ac_cv_func_$ac_func=no" | |
4930 | fi | |
4931 | rm -f conftest* | |
4932 | fi | |
252b5132 | 4933 | |
6be7c12c AO |
4934 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
4935 | echo "$ac_t""yes" 1>&6 | |
4936 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4937 | cat >> confdefs.h <<EOF | |
4938 | #define $ac_tr_func 1 | |
4939 | EOF | |
4940 | ||
4941 | else | |
4942 | echo "$ac_t""no" 1>&6 | |
252b5132 RH |
4943 | fi |
4944 | done | |
4945 | ||
49c97a80 ILT |
4946 | for ac_func in strtoull |
4947 | do | |
4948 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
225247f0 | 4949 | echo "configure:4950: checking for $ac_func" >&5 |
49c97a80 ILT |
4950 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
4951 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4952 | else | |
4953 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 4954 | #line 4955 "configure" |
49c97a80 ILT |
4955 | #include "confdefs.h" |
4956 | /* System header to define __stub macros and hopefully few prototypes, | |
4957 | which can conflict with char $ac_func(); below. */ | |
4958 | #include <assert.h> | |
4959 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4960 | /* We use char because int might match the return type of a gcc2 | |
4961 | builtin and then its argument prototype would still apply. */ | |
4962 | char $ac_func(); | |
4963 | ||
4964 | int main() { | |
4965 | ||
4966 | /* The GNU C library defines this for functions which it implements | |
4967 | to always fail with ENOSYS. Some functions are actually named | |
4968 | something starting with __ and the normal name is an alias. */ | |
4969 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4970 | choke me | |
4971 | #else | |
4972 | $ac_func(); | |
4973 | #endif | |
4974 | ||
4975 | ; return 0; } | |
4976 | EOF | |
225247f0 | 4977 | if { (eval echo configure:4978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
49c97a80 ILT |
4978 | rm -rf conftest* |
4979 | eval "ac_cv_func_$ac_func=yes" | |
4980 | else | |
4981 | echo "configure: failed program was:" >&5 | |
4982 | cat conftest.$ac_ext >&5 | |
4983 | rm -rf conftest* | |
4984 | eval "ac_cv_func_$ac_func=no" | |
4985 | fi | |
4986 | rm -f conftest* | |
4987 | fi | |
4988 | ||
4989 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
4990 | echo "$ac_t""yes" 1>&6 | |
4991 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4992 | cat >> confdefs.h <<EOF | |
4993 | #define $ac_tr_func 1 | |
4994 | EOF | |
4995 | ||
4996 | else | |
4997 | echo "$ac_t""no" 1>&6 | |
4998 | fi | |
4999 | done | |
5000 | ||
6be7c12c AO |
5001 | |
5002 | ||
252b5132 | 5003 | case "${host}" in |
855b0be7 | 5004 | *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*) |
6be7c12c | 5005 | cat >> confdefs.h <<\EOF |
252b5132 RH |
5006 | #define USE_BINARY_FOPEN 1 |
5007 | EOF | |
5008 | ;; | |
5009 | esac | |
5010 | ||
6be7c12c | 5011 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
225247f0 | 5012 | echo "configure:5013: checking whether strstr must be declared" >&5 |
6be7c12c AO |
5013 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
5014 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 5015 | else |
6be7c12c | 5016 | cat > conftest.$ac_ext <<EOF |
225247f0 | 5017 | #line 5018 "configure" |
252b5132 RH |
5018 | #include "confdefs.h" |
5019 | ||
5020 | #include <stdio.h> | |
5021 | #ifdef HAVE_STRING_H | |
5022 | #include <string.h> | |
5023 | #else | |
5024 | #ifdef HAVE_STRINGS_H | |
5025 | #include <strings.h> | |
5026 | #endif | |
5027 | #endif | |
5028 | #ifdef HAVE_STDLIB_H | |
5029 | #include <stdlib.h> | |
5030 | #endif | |
5031 | #ifdef HAVE_UNISTD_H | |
5032 | #include <unistd.h> | |
5033 | #endif | |
6be7c12c | 5034 | int main() { |
252b5132 | 5035 | char *(*pfn) = (char *(*)) strstr |
6be7c12c AO |
5036 | ; return 0; } |
5037 | EOF | |
225247f0 | 5038 | if { (eval echo configure:5039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c | 5039 | rm -rf conftest* |
252b5132 RH |
5040 | bfd_cv_decl_needed_strstr=no |
5041 | else | |
6be7c12c AO |
5042 | echo "configure: failed program was:" >&5 |
5043 | cat conftest.$ac_ext >&5 | |
5044 | rm -rf conftest* | |
5045 | bfd_cv_decl_needed_strstr=yes | |
252b5132 | 5046 | fi |
6be7c12c | 5047 | rm -f conftest* |
252b5132 RH |
5048 | fi |
5049 | ||
6be7c12c | 5050 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 |
252b5132 | 5051 | if test $bfd_cv_decl_needed_strstr = yes; then |
6be7c12c | 5052 | cat >> confdefs.h <<\EOF |
252b5132 RH |
5053 | #define NEED_DECLARATION_STRSTR 1 |
5054 | EOF | |
5055 | ||
5056 | fi | |
5057 | ||
6be7c12c | 5058 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 |
225247f0 | 5059 | echo "configure:5060: checking whether malloc must be declared" >&5 |
6be7c12c AO |
5060 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
5061 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 5062 | else |
6be7c12c | 5063 | cat > conftest.$ac_ext <<EOF |
225247f0 | 5064 | #line 5065 "configure" |
252b5132 RH |
5065 | #include "confdefs.h" |
5066 | ||
5067 | #include <stdio.h> | |
5068 | #ifdef HAVE_STRING_H | |
5069 | #include <string.h> | |
5070 | #else | |
5071 | #ifdef HAVE_STRINGS_H | |
5072 | #include <strings.h> | |
5073 | #endif | |
5074 | #endif | |
5075 | #ifdef HAVE_STDLIB_H | |
5076 | #include <stdlib.h> | |
5077 | #endif | |
5078 | #ifdef HAVE_UNISTD_H | |
5079 | #include <unistd.h> | |
5080 | #endif | |
6be7c12c | 5081 | int main() { |
252b5132 | 5082 | char *(*pfn) = (char *(*)) malloc |
6be7c12c AO |
5083 | ; return 0; } |
5084 | EOF | |
225247f0 | 5085 | if { (eval echo configure:5086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c | 5086 | rm -rf conftest* |
252b5132 RH |
5087 | bfd_cv_decl_needed_malloc=no |
5088 | else | |
6be7c12c AO |
5089 | echo "configure: failed program was:" >&5 |
5090 | cat conftest.$ac_ext >&5 | |
5091 | rm -rf conftest* | |
5092 | bfd_cv_decl_needed_malloc=yes | |
252b5132 | 5093 | fi |
6be7c12c | 5094 | rm -f conftest* |
252b5132 RH |
5095 | fi |
5096 | ||
6be7c12c | 5097 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 |
252b5132 | 5098 | if test $bfd_cv_decl_needed_malloc = yes; then |
6be7c12c | 5099 | cat >> confdefs.h <<\EOF |
252b5132 RH |
5100 | #define NEED_DECLARATION_MALLOC 1 |
5101 | EOF | |
5102 | ||
5103 | fi | |
5104 | ||
6be7c12c | 5105 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 |
225247f0 | 5106 | echo "configure:5107: checking whether realloc must be declared" >&5 |
6be7c12c AO |
5107 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
5108 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 5109 | else |
6be7c12c | 5110 | cat > conftest.$ac_ext <<EOF |
225247f0 | 5111 | #line 5112 "configure" |
252b5132 RH |
5112 | #include "confdefs.h" |
5113 | ||
5114 | #include <stdio.h> | |
5115 | #ifdef HAVE_STRING_H | |
5116 | #include <string.h> | |
5117 | #else | |
5118 | #ifdef HAVE_STRINGS_H | |
5119 | #include <strings.h> | |
5120 | #endif | |
5121 | #endif | |
5122 | #ifdef HAVE_STDLIB_H | |
5123 | #include <stdlib.h> | |
5124 | #endif | |
5125 | #ifdef HAVE_UNISTD_H | |
5126 | #include <unistd.h> | |
5127 | #endif | |
6be7c12c | 5128 | int main() { |
252b5132 | 5129 | char *(*pfn) = (char *(*)) realloc |
6be7c12c AO |
5130 | ; return 0; } |
5131 | EOF | |
225247f0 | 5132 | if { (eval echo configure:5133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c | 5133 | rm -rf conftest* |
252b5132 RH |
5134 | bfd_cv_decl_needed_realloc=no |
5135 | else | |
6be7c12c AO |
5136 | echo "configure: failed program was:" >&5 |
5137 | cat conftest.$ac_ext >&5 | |
5138 | rm -rf conftest* | |
5139 | bfd_cv_decl_needed_realloc=yes | |
252b5132 | 5140 | fi |
6be7c12c | 5141 | rm -f conftest* |
252b5132 RH |
5142 | fi |
5143 | ||
6be7c12c | 5144 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 |
252b5132 | 5145 | if test $bfd_cv_decl_needed_realloc = yes; then |
6be7c12c | 5146 | cat >> confdefs.h <<\EOF |
252b5132 RH |
5147 | #define NEED_DECLARATION_REALLOC 1 |
5148 | EOF | |
5149 | ||
5150 | fi | |
5151 | ||
6be7c12c | 5152 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 |
225247f0 | 5153 | echo "configure:5154: checking whether free must be declared" >&5 |
6be7c12c AO |
5154 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
5155 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 5156 | else |
6be7c12c | 5157 | cat > conftest.$ac_ext <<EOF |
225247f0 | 5158 | #line 5159 "configure" |
252b5132 RH |
5159 | #include "confdefs.h" |
5160 | ||
5161 | #include <stdio.h> | |
5162 | #ifdef HAVE_STRING_H | |
5163 | #include <string.h> | |
5164 | #else | |
5165 | #ifdef HAVE_STRINGS_H | |
5166 | #include <strings.h> | |
5167 | #endif | |
5168 | #endif | |
5169 | #ifdef HAVE_STDLIB_H | |
5170 | #include <stdlib.h> | |
5171 | #endif | |
5172 | #ifdef HAVE_UNISTD_H | |
5173 | #include <unistd.h> | |
5174 | #endif | |
6be7c12c | 5175 | int main() { |
252b5132 | 5176 | char *(*pfn) = (char *(*)) free |
6be7c12c AO |
5177 | ; return 0; } |
5178 | EOF | |
225247f0 | 5179 | if { (eval echo configure:5180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c | 5180 | rm -rf conftest* |
252b5132 RH |
5181 | bfd_cv_decl_needed_free=no |
5182 | else | |
6be7c12c AO |
5183 | echo "configure: failed program was:" >&5 |
5184 | cat conftest.$ac_ext >&5 | |
5185 | rm -rf conftest* | |
5186 | bfd_cv_decl_needed_free=yes | |
252b5132 | 5187 | fi |
6be7c12c | 5188 | rm -f conftest* |
252b5132 RH |
5189 | fi |
5190 | ||
6be7c12c | 5191 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 |
252b5132 | 5192 | if test $bfd_cv_decl_needed_free = yes; then |
6be7c12c | 5193 | cat >> confdefs.h <<\EOF |
252b5132 RH |
5194 | #define NEED_DECLARATION_FREE 1 |
5195 | EOF | |
5196 | ||
5197 | fi | |
5198 | ||
6be7c12c | 5199 | echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 |
225247f0 | 5200 | echo "configure:5201: checking whether getenv must be declared" >&5 |
6be7c12c AO |
5201 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then |
5202 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 5203 | else |
6be7c12c | 5204 | cat > conftest.$ac_ext <<EOF |
225247f0 | 5205 | #line 5206 "configure" |
252b5132 RH |
5206 | #include "confdefs.h" |
5207 | ||
5208 | #include <stdio.h> | |
5209 | #ifdef HAVE_STRING_H | |
5210 | #include <string.h> | |
5211 | #else | |
5212 | #ifdef HAVE_STRINGS_H | |
5213 | #include <strings.h> | |
5214 | #endif | |
5215 | #endif | |
5216 | #ifdef HAVE_STDLIB_H | |
5217 | #include <stdlib.h> | |
5218 | #endif | |
5219 | #ifdef HAVE_UNISTD_H | |
5220 | #include <unistd.h> | |
5221 | #endif | |
6be7c12c | 5222 | int main() { |
252b5132 | 5223 | char *(*pfn) = (char *(*)) getenv |
6be7c12c AO |
5224 | ; return 0; } |
5225 | EOF | |
225247f0 | 5226 | if { (eval echo configure:5227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c | 5227 | rm -rf conftest* |
252b5132 RH |
5228 | bfd_cv_decl_needed_getenv=no |
5229 | else | |
6be7c12c AO |
5230 | echo "configure: failed program was:" >&5 |
5231 | cat conftest.$ac_ext >&5 | |
5232 | rm -rf conftest* | |
5233 | bfd_cv_decl_needed_getenv=yes | |
252b5132 | 5234 | fi |
6be7c12c | 5235 | rm -f conftest* |
252b5132 RH |
5236 | fi |
5237 | ||
6be7c12c | 5238 | echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6 |
252b5132 | 5239 | if test $bfd_cv_decl_needed_getenv = yes; then |
6be7c12c | 5240 | cat >> confdefs.h <<\EOF |
252b5132 RH |
5241 | #define NEED_DECLARATION_GETENV 1 |
5242 | EOF | |
5243 | ||
5244 | fi | |
5245 | ||
6be7c12c | 5246 | |
252b5132 RH |
5247 | # If we are configured native, pick a core file support file. |
5248 | COREFILE= | |
5249 | COREFLAG= | |
5250 | TRAD_HEADER= | |
5251 | if test "${target}" = "${host}"; then | |
5252 | case "${host}" in | |
13dfd2d0 | 5253 | alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu) |
46d59bfa DB |
5254 | COREFILE='' |
5255 | ;; | |
252b5132 RH |
5256 | alpha*-*-linux-gnu*) |
5257 | COREFILE=trad-core.lo | |
5258 | TRAD_HEADER='"hosts/alphalinux.h"' | |
5259 | ;; | |
690cc98b NC |
5260 | alpha*-*-netbsd* | alpha*-*-openbsd*) |
5261 | COREFILE=netbsd-core.lo | |
5262 | ;; | |
252b5132 | 5263 | alpha*-*-*) COREFILE=osf-core.lo ;; |
13dfd2d0 NC |
5264 | arm-*-freebsd* | arm-*-kfreebsd*-gnu) |
5265 | COREFILE='' ;; | |
61d0bc33 | 5266 | arm-*-netbsd*) COREFILE=netbsd-core.lo ;; |
252b5132 RH |
5267 | arm-*-riscix) COREFILE=trad-core.lo ;; |
5268 | hppa*-*-hpux*) COREFILE=hpux-core.lo ;; | |
5269 | hppa*-*-hiux*) COREFILE=hpux-core.lo ;; | |
5270 | hppa*-*-mpeix*) COREFILE=hpux-core.lo ;; | |
5271 | hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo" | |
5272 | COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;; | |
eef0f186 MK |
5273 | hppa*-*-netbsd* | hppa*-*-openbsd*) |
5274 | COREFILE=netbsd-core.lo | |
5275 | ;; | |
5276 | ||
dc810e39 | 5277 | i370-*-*) |
5b93d8bb AM |
5278 | COREFILE=trad-core.lo |
5279 | TRAD_HEADER='"hosts/i370linux.h"' | |
5280 | ;; | |
5281 | ||
80c7c40a | 5282 | i[3-7]86-sequent-bsd*) |
5b93d8bb | 5283 | COREFILE=trad-core.lo |
252b5132 RH |
5284 | TRAD_HEADER='"hosts/symmetry.h"' |
5285 | ;; | |
80c7c40a NC |
5286 | i[3-7]86-sequent-sysv4*) ;; |
5287 | i[3-7]86-sequent-sysv*) | |
252b5132 RH |
5288 | COREFILE=trad-core.lo |
5289 | TRAD_HEADER='"hosts/symmetry.h"' | |
5290 | ;; | |
80c7c40a | 5291 | i[3-7]86-*-bsdi) |
7e3b3466 NC |
5292 | COREFILE= |
5293 | ;; | |
d2bef492 | 5294 | i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234] | i[3-7]86-*-freebsd4\.[01234]\.* | i[3-7]86-*-freebsd*aout*) |
252b5132 RH |
5295 | COREFILE=trad-core.lo |
5296 | TRAD_HEADER='"hosts/i386bsd.h"' | |
5297 | ;; | |
13dfd2d0 | 5298 | i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu) |
d4af9775 DB |
5299 | COREFILE='' |
5300 | TRAD_HEADER='"hosts/i386bsd.h"' | |
5301 | ;; | |
4615568e | 5302 | i[3-7]86-*-netbsd* | i[3-7]86-*-knetbsd*-gnu | i[3-7]86-*-openbsd*) |
252b5132 RH |
5303 | COREFILE=netbsd-core.lo |
5304 | ;; | |
80c7c40a | 5305 | i[3-7]86-esix-sysv3*) |
252b5132 RH |
5306 | COREFILE=trad-core.lo |
5307 | TRAD_HEADER='"hosts/esix.h"' | |
5308 | ;; | |
80c7c40a | 5309 | i[3-7]86-*-sco3.2v5*) |
252b5132 RH |
5310 | COREFILE=sco5-core.lo |
5311 | ;; | |
80c7c40a | 5312 | i[3-7]86-*-sco* | i[3-7]86-*-isc*) |
252b5132 RH |
5313 | COREFILE=trad-core.lo |
5314 | TRAD_HEADER='"hosts/i386sco.h"' | |
5315 | ;; | |
80c7c40a | 5316 | i[3-7]86-*-mach3*) |
252b5132 RH |
5317 | COREFILE=trad-core.lo |
5318 | TRAD_HEADER='"hosts/i386mach3.h"' | |
5319 | ;; | |
80c7c40a | 5320 | i[3-7]86-*-linux-gnu*) |
252b5132 RH |
5321 | COREFILE=trad-core.lo |
5322 | TRAD_HEADER='"hosts/i386linux.h"' | |
5323 | ;; | |
80c7c40a NC |
5324 | i[3-7]86-*-isc*) COREFILE=trad-core.lo ;; |
5325 | i[3-7]86-*-aix*) COREFILE=aix386-core.lo ;; | |
252b5132 RH |
5326 | i860-*-mach3* | i860-*-osf1*) |
5327 | COREFILE=trad-core.lo | |
5328 | TRAD_HEADER='"hosts/i860mach3.h"' | |
5329 | ;; | |
252b5132 RH |
5330 | mips-*-netbsd* | mips*-*-openbsd*) |
5331 | COREFILE=netbsd-core.lo | |
5332 | ;; | |
5333 | mips-dec-*) | |
5334 | COREFILE=trad-core.lo | |
5335 | TRAD_HEADER='"hosts/decstation.h"' | |
5336 | ;; | |
5337 | mips-sgi-irix4*) COREFILE=irix-core.lo ;; | |
5338 | mips-sgi-irix5*) COREFILE=irix-core.lo ;; | |
5339 | mips-sgi-irix6*) COREFILE=irix-core.lo ;; | |
252b5132 RH |
5340 | mips-*-sysv4*) ;; |
5341 | mips-*-sysv* | mips-*-riscos*) | |
5342 | COREFILE=trad-core.lo | |
5343 | TRAD_HEADER='"hosts/riscos.h"' | |
5344 | ;; | |
5345 | mips-sony-bsd*) | |
5346 | COREFILE=trad-core.lo | |
5347 | TRAD_HEADER='"hosts/news-mips.h"' | |
5348 | ;; | |
5349 | m68*-bull*-sysv*) | |
5350 | COREFILE=trad-core.lo | |
5351 | TRAD_HEADER='"hosts/dpx2.h"' | |
5352 | ;; | |
5353 | m68*-hp-hpux*) COREFILE=hpux-core.lo ;; | |
5354 | m68*-hp-bsd*) | |
5355 | COREFILE=trad-core.lo | |
5356 | TRAD_HEADER='"hosts/hp300bsd.h"' | |
5357 | ;; | |
5358 | m68*-*-linux-gnu*) | |
5359 | COREFILE=trad-core.lo | |
5360 | TRAD_HEADER='"hosts/m68klinux.h"' | |
5361 | ;; | |
5362 | m68*-motorola-sysv*) | |
5363 | COREFILE=trad-core.lo | |
5364 | TRAD_HEADER='"hosts/delta68.h"' | |
5365 | ;; | |
5366 | m68*-sony-*) | |
5367 | COREFILE=trad-core.lo | |
5368 | TRAD_HEADER='"hosts/news.h"' | |
5369 | ;; | |
5370 | m68*-*-netbsd* | m68*-*-openbsd*) | |
5371 | COREFILE=netbsd-core.lo | |
5372 | ;; | |
5373 | m68*-apple-aux*) | |
5374 | COREFILE=trad-core.lo | |
5375 | TRAD_HEADER='"hosts/m68kaux.h"' | |
5376 | ;; | |
eb1e0e80 NC |
5377 | m88*-*-sysv4*) |
5378 | ;; | |
5379 | m88*-motorola-sysv*) | |
5380 | COREFILE=ptrace-core.lo | |
5381 | ;; | |
252b5132 RH |
5382 | m88*-*-mach3*) |
5383 | COREFILE=trad-core.lo | |
5384 | TRAD_HEADER='"hosts/m88kmach3.h"' | |
5385 | ;; | |
c6f8758f NC |
5386 | m88*-*-openbsd*) |
5387 | COREFILE=netbsd-core.lo | |
5388 | ;; | |
252b5132 RH |
5389 | ns32k-pc532-mach) |
5390 | COREFILE=trad-core.lo | |
5391 | TRAD_HEADER='"hosts/pc532mach.h"' | |
5392 | ;; | |
5393 | ns32k-*-netbsd* | ns32k-*-openbsd*) | |
5394 | COREFILE=netbsd-core.lo | |
5395 | ;; | |
eb1e0e80 NC |
5396 | rs6000-*-lynx*) |
5397 | COREFILE=lynx-core.lo | |
5398 | ;; | |
5399 | rs6000-*-aix5.* | powerpc-*-aix5.*) | |
5400 | COREFILE=rs6000-core.lo | |
5401 | COREFLAG="$COREFLAG -DAIX_5_CORE -DAIX_CORE_DUMPX_CORE" | |
5402 | ;; | |
83954261 | 5403 | rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*) |
653f71ca KB |
5404 | COREFILE=rs6000-core.lo |
5405 | COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE" | |
83954261 AM |
5406 | # Not all versions of AIX with -DAIX_CORE_DUMPX_CORE |
5407 | # have c_impl as a member of struct core_dumpx | |
5408 | echo $ac_n "checking for c_impl in struct core_dumpx""... $ac_c" 1>&6 | |
225247f0 | 5409 | echo "configure:5410: checking for c_impl in struct core_dumpx" >&5 |
83954261 | 5410 | cat > conftest.$ac_ext <<EOF |
225247f0 | 5411 | #line 5412 "configure" |
83954261 AM |
5412 | #include "confdefs.h" |
5413 | #include <core.h> | |
5414 | int main() { | |
5415 | struct core_dumpx c; c.c_impl = 0; | |
5416 | ; return 0; } | |
5417 | EOF | |
225247f0 | 5418 | if { (eval echo configure:5419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
83954261 AM |
5419 | rm -rf conftest* |
5420 | cat >> confdefs.h <<\EOF | |
5421 | #define HAVE_ST_C_IMPL 1 | |
5422 | EOF | |
5423 | ||
5424 | echo "$ac_t""yes" 1>&6 | |
5425 | else | |
5426 | echo "configure: failed program was:" >&5 | |
5427 | cat conftest.$ac_ext >&5 | |
5428 | rm -rf conftest* | |
5429 | echo "$ac_t""no" 1>&6 | |
5430 | fi | |
5431 | rm -f conftest* | |
653f71ca | 5432 | ;; |
252b5132 RH |
5433 | rs6000-*-aix4*) COREFILE=rs6000-core.lo ;; |
5434 | rs6000-*-*) COREFILE=rs6000-core.lo ;; | |
252b5132 RH |
5435 | powerpc-*-aix4*) COREFILE=rs6000-core.lo ;; |
5436 | powerpc-*-aix*) COREFILE=rs6000-core.lo ;; | |
5437 | powerpc-*-beos*) ;; | |
13dfd2d0 NC |
5438 | powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu) |
5439 | COREFILE='' ;; | |
252b5132 | 5440 | powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;; |
d4af9775 | 5441 | powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;; |
dc810e39 | 5442 | s390*-*-*) COREFILE=trad-core.lo ;; |
8d05742f | 5443 | sh*-*-netbsd*) COREFILE=netbsd-core.lo ;; |
a9bf1154 | 5444 | sparc-*-netbsd* | sparc*-*-openbsd*) |
252b5132 RH |
5445 | COREFILE=netbsd-core.lo |
5446 | ;; | |
5447 | tahoe-*-*) | |
5448 | COREFILE=trad-core.lo | |
5449 | TRAD_HEADER='"hosts/tahoe.h"' | |
5450 | ;; | |
de6e5e1a NC |
5451 | vax-*-netbsd* | vax-*-openbsd*) |
5452 | COREFILE=netbsd-core.lo | |
5453 | ;; | |
252b5132 RH |
5454 | vax-*-ultrix2*) |
5455 | COREFILE=trad-core.lo | |
5456 | TRAD_HEADER='"hosts/vaxult2.h"' | |
5457 | ;; | |
5458 | vax-*-ultrix*) | |
5459 | COREFILE=trad-core.lo | |
5460 | TRAD_HEADER='"hosts/vaxult2.h"' | |
5461 | ;; | |
f8fc3443 NC |
5462 | vax-*-linux-gnu*) |
5463 | COREFILE=trad-core.lo | |
5464 | TRAD_HEADER='"hosts/vaxlinux.h"' | |
5465 | ;; | |
252b5132 RH |
5466 | vax-*-*) |
5467 | COREFILE=trad-core.lo | |
5468 | TRAD_HEADER='"hosts/vaxbsd.h"' | |
5469 | ;; | |
85cfd8d3 MK |
5470 | x86_64-*-netbsd* | x86_64-*-openbsd*) |
5471 | COREFILE=netbsd-core.lo | |
5472 | ;; | |
252b5132 RH |
5473 | esac |
5474 | ||
5475 | case "$COREFILE" in | |
5476 | aix386-core.lo) COREFLAG=-DAIX386_CORE ;; | |
5477 | hppabsd-core.lo) COREFLAG=-DHPPABSD_CORE ;; | |
5478 | hpux-core.lo) COREFLAG=-DHPUX_CORE ;; | |
5479 | irix-core.lo) COREFLAG=-DIRIX_CORE ;; | |
5480 | lynx-core.lo) COREFLAG=-DLYNX_CORE ;; | |
5481 | netbsd-core.lo) COREFLAG=-DNETBSD_CORE ;; | |
5482 | osf-core.lo) COREFLAG=-DOSF_CORE ;; | |
5483 | ptrace-core.lo) COREFLAG=-DPTRACE_CORE ;; | |
5484 | rs6000-core.lo) COREFLAG="$COREFLAG -DAIX_CORE" ;; | |
5485 | sco5-core.lo) COREFLAG="$COREFLAG -DSCO5_CORE" ;; | |
5486 | trad-core.lo) COREFLAG="$COREFLAG -DTRAD_CORE" ;; | |
5487 | esac | |
5488 | ||
5489 | # ELF corefile support has several flavors, but all of | |
5490 | # them use something called <sys/procfs.h> | |
6be7c12c | 5491 | for ac_hdr in sys/procfs.h |
252b5132 | 5492 | do |
6be7c12c AO |
5493 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
5494 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
225247f0 | 5495 | echo "configure:5496: checking for $ac_hdr" >&5 |
6be7c12c AO |
5496 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5497 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5498 | else | |
5499 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 5500 | #line 5501 "configure" |
252b5132 | 5501 | #include "confdefs.h" |
6be7c12c AO |
5502 | #include <$ac_hdr> |
5503 | EOF | |
5504 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
225247f0 | 5505 | { (eval echo configure:5506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
6be7c12c AO |
5506 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5507 | if test -z "$ac_err"; then | |
5508 | rm -rf conftest* | |
5509 | eval "ac_cv_header_$ac_safe=yes" | |
252b5132 | 5510 | else |
6be7c12c AO |
5511 | echo "$ac_err" >&5 |
5512 | echo "configure: failed program was:" >&5 | |
252b5132 | 5513 | cat conftest.$ac_ext >&5 |
6be7c12c AO |
5514 | rm -rf conftest* |
5515 | eval "ac_cv_header_$ac_safe=no" | |
252b5132 | 5516 | fi |
6be7c12c | 5517 | rm -f conftest* |
252b5132 | 5518 | fi |
6be7c12c AO |
5519 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
5520 | echo "$ac_t""yes" 1>&6 | |
5521 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5522 | cat >> confdefs.h <<EOF | |
5523 | #define $ac_tr_hdr 1 | |
252b5132 | 5524 | EOF |
6be7c12c AO |
5525 | |
5526 | else | |
5527 | echo "$ac_t""no" 1>&6 | |
252b5132 RH |
5528 | fi |
5529 | done | |
5530 | ||
5531 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
6be7c12c | 5532 | echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6 |
225247f0 | 5533 | echo "configure:5534: checking for prstatus_t in sys/procfs.h" >&5 |
6be7c12c AO |
5534 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus_t'+set}'`\" = set"; then |
5535 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 5536 | else |
6be7c12c | 5537 | cat > conftest.$ac_ext <<EOF |
225247f0 | 5538 | #line 5539 "configure" |
252b5132 | 5539 | #include "confdefs.h" |
7ee38065 MS |
5540 | |
5541 | #define _SYSCALL32 | |
252b5132 | 5542 | #include <sys/procfs.h> |
6be7c12c | 5543 | int main() { |
252b5132 | 5544 | prstatus_t avar |
6be7c12c AO |
5545 | ; return 0; } |
5546 | EOF | |
225247f0 | 5547 | if { (eval echo configure:5548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c | 5548 | rm -rf conftest* |
252b5132 RH |
5549 | bfd_cv_have_sys_procfs_type_prstatus_t=yes |
5550 | else | |
6be7c12c AO |
5551 | echo "configure: failed program was:" >&5 |
5552 | cat conftest.$ac_ext >&5 | |
5553 | rm -rf conftest* | |
5554 | bfd_cv_have_sys_procfs_type_prstatus_t=no | |
5555 | ||
252b5132 | 5556 | fi |
6be7c12c | 5557 | rm -f conftest* |
252b5132 RH |
5558 | fi |
5559 | ||
5560 | if test $bfd_cv_have_sys_procfs_type_prstatus_t = yes; then | |
6be7c12c | 5561 | cat >> confdefs.h <<\EOF |
252b5132 RH |
5562 | #define HAVE_PRSTATUS_T 1 |
5563 | EOF | |
5564 | ||
5565 | fi | |
6be7c12c | 5566 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6 |
252b5132 | 5567 | |
6be7c12c | 5568 | echo $ac_n "checking for prstatus32_t in sys/procfs.h""... $ac_c" 1>&6 |
225247f0 | 5569 | echo "configure:5570: checking for prstatus32_t in sys/procfs.h" >&5 |
6be7c12c AO |
5570 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus32_t'+set}'`\" = set"; then |
5571 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7ee38065 | 5572 | else |
6be7c12c | 5573 | cat > conftest.$ac_ext <<EOF |
225247f0 | 5574 | #line 5575 "configure" |
7ee38065 MS |
5575 | #include "confdefs.h" |
5576 | ||
5577 | #define _SYSCALL32 | |
5578 | #include <sys/procfs.h> | |
6be7c12c | 5579 | int main() { |
7ee38065 | 5580 | prstatus32_t avar |
6be7c12c AO |
5581 | ; return 0; } |
5582 | EOF | |
225247f0 | 5583 | if { (eval echo configure:5584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c | 5584 | rm -rf conftest* |
7ee38065 MS |
5585 | bfd_cv_have_sys_procfs_type_prstatus32_t=yes |
5586 | else | |
6be7c12c AO |
5587 | echo "configure: failed program was:" >&5 |
5588 | cat conftest.$ac_ext >&5 | |
5589 | rm -rf conftest* | |
5590 | bfd_cv_have_sys_procfs_type_prstatus32_t=no | |
5591 | ||
7ee38065 | 5592 | fi |
6be7c12c | 5593 | rm -f conftest* |
7ee38065 MS |
5594 | fi |
5595 | ||
5596 | if test $bfd_cv_have_sys_procfs_type_prstatus32_t = yes; then | |
6be7c12c | 5597 | cat >> confdefs.h <<\EOF |
7ee38065 MS |
5598 | #define HAVE_PRSTATUS32_T 1 |
5599 | EOF | |
5600 | ||
5601 | fi | |
6be7c12c | 5602 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus32_t" 1>&6 |
7ee38065 | 5603 | |
6be7c12c | 5604 | echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6 |
225247f0 | 5605 | echo "configure:5606: checking for prstatus_t.pr_who in sys/procfs.h" >&5 |
6be7c12c AO |
5606 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then |
5607 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 5608 | else |
6be7c12c | 5609 | cat > conftest.$ac_ext <<EOF |
225247f0 | 5610 | #line 5611 "configure" |
252b5132 | 5611 | #include "confdefs.h" |
7ee38065 MS |
5612 | |
5613 | #define _SYSCALL32 | |
252b5132 | 5614 | #include <sys/procfs.h> |
6be7c12c | 5615 | int main() { |
252b5132 | 5616 | prstatus_t avar; void* aref = (void*) &avar.pr_who |
6be7c12c AO |
5617 | ; return 0; } |
5618 | EOF | |
225247f0 | 5619 | if { (eval echo configure:5620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c | 5620 | rm -rf conftest* |
252b5132 RH |
5621 | bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes |
5622 | else | |
6be7c12c AO |
5623 | echo "configure: failed program was:" >&5 |
5624 | cat conftest.$ac_ext >&5 | |
5625 | rm -rf conftest* | |
5626 | bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=no | |
5627 | ||
252b5132 | 5628 | fi |
6be7c12c | 5629 | rm -f conftest* |
252b5132 RH |
5630 | fi |
5631 | ||
5632 | if test $bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who = yes; then | |
6be7c12c | 5633 | cat >> confdefs.h <<\EOF |
252b5132 RH |
5634 | #define HAVE_PRSTATUS_T_PR_WHO 1 |
5635 | EOF | |
5636 | ||
5637 | fi | |
6be7c12c | 5638 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6 |
252b5132 | 5639 | |
6be7c12c | 5640 | echo $ac_n "checking for prstatus32_t.pr_who in sys/procfs.h""... $ac_c" 1>&6 |
225247f0 | 5641 | echo "configure:5642: checking for prstatus32_t.pr_who in sys/procfs.h" >&5 |
6be7c12c AO |
5642 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who'+set}'`\" = set"; then |
5643 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7ee38065 | 5644 | else |
6be7c12c | 5645 | cat > conftest.$ac_ext <<EOF |
225247f0 | 5646 | #line 5647 "configure" |
7ee38065 MS |
5647 | #include "confdefs.h" |
5648 | ||
5649 | #define _SYSCALL32 | |
5650 | #include <sys/procfs.h> | |
6be7c12c | 5651 | int main() { |
7ee38065 | 5652 | prstatus32_t avar; void* aref = (void*) &avar.pr_who |
6be7c12c AO |
5653 | ; return 0; } |
5654 | EOF | |
225247f0 | 5655 | if { (eval echo configure:5656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c | 5656 | rm -rf conftest* |
7ee38065 MS |
5657 | bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes |
5658 | else | |
6be7c12c AO |
5659 | echo "configure: failed program was:" >&5 |
5660 | cat conftest.$ac_ext >&5 | |
5661 | rm -rf conftest* | |
5662 | bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=no | |
5663 | ||
7ee38065 | 5664 | fi |
6be7c12c | 5665 | rm -f conftest* |
7ee38065 MS |
5666 | fi |
5667 | ||
5668 | if test $bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who = yes; then | |
6be7c12c | 5669 | cat >> confdefs.h <<\EOF |
7ee38065 MS |
5670 | #define HAVE_PRSTATUS32_T_PR_WHO 1 |
5671 | EOF | |
5672 | ||
5673 | fi | |
6be7c12c | 5674 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" 1>&6 |
7ee38065 | 5675 | |
6be7c12c | 5676 | echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 |
225247f0 | 5677 | echo "configure:5678: checking for pstatus_t in sys/procfs.h" >&5 |
6be7c12c AO |
5678 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then |
5679 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 5680 | else |
6be7c12c | 5681 | cat > conftest.$ac_ext <<EOF |
225247f0 | 5682 | #line 5683 "configure" |
252b5132 | 5683 | #include "confdefs.h" |
7ee38065 MS |
5684 | |
5685 | #define _SYSCALL32 | |
252b5132 | 5686 | #include <sys/procfs.h> |
6be7c12c | 5687 | int main() { |
252b5132 | 5688 | pstatus_t avar |
6be7c12c AO |
5689 | ; return 0; } |
5690 | EOF | |
225247f0 | 5691 | if { (eval echo configure:5692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c | 5692 | rm -rf conftest* |
252b5132 RH |
5693 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
5694 | else | |
6be7c12c AO |
5695 | echo "configure: failed program was:" >&5 |
5696 | cat conftest.$ac_ext >&5 | |
5697 | rm -rf conftest* | |
5698 | bfd_cv_have_sys_procfs_type_pstatus_t=no | |
5699 | ||
252b5132 | 5700 | fi |
6be7c12c | 5701 | rm -f conftest* |
252b5132 RH |
5702 | fi |
5703 | ||
5704 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then | |
6be7c12c | 5705 | cat >> confdefs.h <<\EOF |
252b5132 RH |
5706 | #define HAVE_PSTATUS_T 1 |
5707 | EOF | |
5708 | ||
5709 | fi | |
6be7c12c | 5710 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 |
252b5132 | 5711 | |
6be7c12c | 5712 | echo $ac_n "checking for pxstatus_t in sys/procfs.h""... $ac_c" 1>&6 |
225247f0 | 5713 | echo "configure:5714: checking for pxstatus_t in sys/procfs.h" >&5 |
6be7c12c AO |
5714 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pxstatus_t'+set}'`\" = set"; then |
5715 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f572a39d | 5716 | else |
6be7c12c | 5717 | cat > conftest.$ac_ext <<EOF |
225247f0 | 5718 | #line 5719 "configure" |
f572a39d AM |
5719 | #include "confdefs.h" |
5720 | ||
5721 | #define _SYSCALL32 | |
5722 | #include <sys/procfs.h> | |
6be7c12c | 5723 | int main() { |
f572a39d | 5724 | pxstatus_t avar |
6be7c12c AO |
5725 | ; return 0; } |
5726 | EOF | |
225247f0 | 5727 | if { (eval echo configure:5728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c | 5728 | rm -rf conftest* |
f572a39d AM |
5729 | bfd_cv_have_sys_procfs_type_pxstatus_t=yes |
5730 | else | |
6be7c12c AO |
5731 | echo "configure: failed program was:" >&5 |
5732 | cat conftest.$ac_ext >&5 | |
5733 | rm -rf conftest* | |
5734 | bfd_cv_have_sys_procfs_type_pxstatus_t=no | |
5735 | ||
f572a39d | 5736 | fi |
6be7c12c | 5737 | rm -f conftest* |
f572a39d AM |
5738 | fi |
5739 | ||
5740 | if test $bfd_cv_have_sys_procfs_type_pxstatus_t = yes; then | |
6be7c12c | 5741 | cat >> confdefs.h <<\EOF |
f572a39d AM |
5742 | #define HAVE_PXSTATUS_T 1 |
5743 | EOF | |
5744 | ||
5745 | fi | |
6be7c12c | 5746 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pxstatus_t" 1>&6 |
f572a39d | 5747 | |
6be7c12c | 5748 | echo $ac_n "checking for pstatus32_t in sys/procfs.h""... $ac_c" 1>&6 |
225247f0 | 5749 | echo "configure:5750: checking for pstatus32_t in sys/procfs.h" >&5 |
6be7c12c AO |
5750 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus32_t'+set}'`\" = set"; then |
5751 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7ee38065 | 5752 | else |
6be7c12c | 5753 | cat > conftest.$ac_ext <<EOF |
225247f0 | 5754 | #line 5755 "configure" |
7ee38065 MS |
5755 | #include "confdefs.h" |
5756 | ||
5757 | #define _SYSCALL32 | |
5758 | #include <sys/procfs.h> | |
6be7c12c | 5759 | int main() { |
7ee38065 | 5760 | pstatus32_t avar |
6be7c12c AO |
5761 | ; return 0; } |
5762 | EOF | |
225247f0 | 5763 | if { (eval echo configure:5764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c | 5764 | rm -rf conftest* |
7ee38065 MS |
5765 | bfd_cv_have_sys_procfs_type_pstatus32_t=yes |
5766 | else | |
6be7c12c AO |
5767 | echo "configure: failed program was:" >&5 |
5768 | cat conftest.$ac_ext >&5 | |
5769 | rm -rf conftest* | |
5770 | bfd_cv_have_sys_procfs_type_pstatus32_t=no | |
5771 | ||
7ee38065 | 5772 | fi |
6be7c12c | 5773 | rm -f conftest* |
7ee38065 MS |
5774 | fi |
5775 | ||
5776 | if test $bfd_cv_have_sys_procfs_type_pstatus32_t = yes; then | |
6be7c12c | 5777 | cat >> confdefs.h <<\EOF |
7ee38065 MS |
5778 | #define HAVE_PSTATUS32_T 1 |
5779 | EOF | |
5780 | ||
5781 | fi | |
6be7c12c | 5782 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus32_t" 1>&6 |
7ee38065 | 5783 | |
6be7c12c | 5784 | echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6 |
225247f0 | 5785 | echo "configure:5786: checking for prpsinfo_t in sys/procfs.h" >&5 |
6be7c12c AO |
5786 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then |
5787 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 5788 | else |
6be7c12c | 5789 | cat > conftest.$ac_ext <<EOF |
225247f0 | 5790 | #line 5791 "configure" |
252b5132 | 5791 | #include "confdefs.h" |
7ee38065 MS |
5792 | |
5793 | #define _SYSCALL32 | |
252b5132 | 5794 | #include <sys/procfs.h> |
6be7c12c | 5795 | int main() { |
252b5132 | 5796 | prpsinfo_t avar |
6be7c12c AO |
5797 | ; return 0; } |
5798 | EOF | |
225247f0 | 5799 | if { (eval echo configure:5800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c | 5800 | rm -rf conftest* |
252b5132 RH |
5801 | bfd_cv_have_sys_procfs_type_prpsinfo_t=yes |
5802 | else | |
6be7c12c AO |
5803 | echo "configure: failed program was:" >&5 |
5804 | cat conftest.$ac_ext >&5 | |
5805 | rm -rf conftest* | |
5806 | bfd_cv_have_sys_procfs_type_prpsinfo_t=no | |
5807 | ||
252b5132 | 5808 | fi |
6be7c12c | 5809 | rm -f conftest* |
252b5132 RH |
5810 | fi |
5811 | ||
5812 | if test $bfd_cv_have_sys_procfs_type_prpsinfo_t = yes; then | |
6be7c12c | 5813 | cat >> confdefs.h <<\EOF |
252b5132 RH |
5814 | #define HAVE_PRPSINFO_T 1 |
5815 | EOF | |
5816 | ||
5817 | fi | |
6be7c12c | 5818 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6 |
252b5132 | 5819 | |
6be7c12c | 5820 | echo $ac_n "checking for prpsinfo32_t in sys/procfs.h""... $ac_c" 1>&6 |
225247f0 | 5821 | echo "configure:5822: checking for prpsinfo32_t in sys/procfs.h" >&5 |
6be7c12c AO |
5822 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo32_t'+set}'`\" = set"; then |
5823 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7ee38065 | 5824 | else |
6be7c12c | 5825 | cat > conftest.$ac_ext <<EOF |
225247f0 | 5826 | #line 5827 "configure" |
7ee38065 MS |
5827 | #include "confdefs.h" |
5828 | ||
5829 | #define _SYSCALL32 | |
5830 | #include <sys/procfs.h> | |
6be7c12c | 5831 | int main() { |
7ee38065 | 5832 | prpsinfo32_t avar |
6be7c12c AO |
5833 | ; return 0; } |
5834 | EOF | |
225247f0 | 5835 | if { (eval echo configure:5836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c | 5836 | rm -rf conftest* |
7ee38065 MS |
5837 | bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes |
5838 | else | |
6be7c12c AO |
5839 | echo "configure: failed program was:" >&5 |
5840 | cat conftest.$ac_ext >&5 | |
5841 | rm -rf conftest* | |
5842 | bfd_cv_have_sys_procfs_type_prpsinfo32_t=no | |
5843 | ||
7ee38065 | 5844 | fi |
6be7c12c | 5845 | rm -f conftest* |
7ee38065 MS |
5846 | fi |
5847 | ||
5848 | if test $bfd_cv_have_sys_procfs_type_prpsinfo32_t = yes; then | |
6be7c12c | 5849 | cat >> confdefs.h <<\EOF |
7ee38065 MS |
5850 | #define HAVE_PRPSINFO32_T 1 |
5851 | EOF | |
5852 | ||
5853 | fi | |
6be7c12c | 5854 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo32_t" 1>&6 |
7ee38065 | 5855 | |
6be7c12c | 5856 | echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6 |
225247f0 | 5857 | echo "configure:5858: checking for psinfo_t in sys/procfs.h" >&5 |
6be7c12c AO |
5858 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then |
5859 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 5860 | else |
6be7c12c | 5861 | cat > conftest.$ac_ext <<EOF |
225247f0 | 5862 | #line 5863 "configure" |
252b5132 | 5863 | #include "confdefs.h" |
7ee38065 MS |
5864 | |
5865 | #define _SYSCALL32 | |
252b5132 | 5866 | #include <sys/procfs.h> |
6be7c12c | 5867 | int main() { |
252b5132 | 5868 | psinfo_t avar |
6be7c12c AO |
5869 | ; return 0; } |
5870 | EOF | |
225247f0 | 5871 | if { (eval echo configure:5872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c | 5872 | rm -rf conftest* |
252b5132 RH |
5873 | bfd_cv_have_sys_procfs_type_psinfo_t=yes |
5874 | else | |
6be7c12c AO |
5875 | echo "configure: failed program was:" >&5 |
5876 | cat conftest.$ac_ext >&5 | |
5877 | rm -rf conftest* | |
5878 | bfd_cv_have_sys_procfs_type_psinfo_t=no | |
5879 | ||
252b5132 | 5880 | fi |
6be7c12c | 5881 | rm -f conftest* |
252b5132 RH |
5882 | fi |
5883 | ||
5884 | if test $bfd_cv_have_sys_procfs_type_psinfo_t = yes; then | |
6be7c12c | 5885 | cat >> confdefs.h <<\EOF |
252b5132 RH |
5886 | #define HAVE_PSINFO_T 1 |
5887 | EOF | |
5888 | ||
5889 | fi | |
6be7c12c | 5890 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6 |
252b5132 | 5891 | |
6be7c12c | 5892 | echo $ac_n "checking for psinfo32_t in sys/procfs.h""... $ac_c" 1>&6 |
225247f0 | 5893 | echo "configure:5894: checking for psinfo32_t in sys/procfs.h" >&5 |
6be7c12c AO |
5894 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo32_t'+set}'`\" = set"; then |
5895 | echo $ac_n "(cached) $ac_c" 1>&6 | |
7ee38065 | 5896 | else |
6be7c12c | 5897 | cat > conftest.$ac_ext <<EOF |
225247f0 | 5898 | #line 5899 "configure" |
7ee38065 MS |
5899 | #include "confdefs.h" |
5900 | ||
5901 | #define _SYSCALL32 | |
5902 | #include <sys/procfs.h> | |
6be7c12c | 5903 | int main() { |
7ee38065 | 5904 | psinfo32_t avar |
6be7c12c AO |
5905 | ; return 0; } |
5906 | EOF | |
225247f0 | 5907 | if { (eval echo configure:5908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c | 5908 | rm -rf conftest* |
7ee38065 MS |
5909 | bfd_cv_have_sys_procfs_type_psinfo32_t=yes |
5910 | else | |
6be7c12c AO |
5911 | echo "configure: failed program was:" >&5 |
5912 | cat conftest.$ac_ext >&5 | |
5913 | rm -rf conftest* | |
5914 | bfd_cv_have_sys_procfs_type_psinfo32_t=no | |
5915 | ||
7ee38065 | 5916 | fi |
6be7c12c | 5917 | rm -f conftest* |
7ee38065 MS |
5918 | fi |
5919 | ||
5920 | if test $bfd_cv_have_sys_procfs_type_psinfo32_t = yes; then | |
6be7c12c | 5921 | cat >> confdefs.h <<\EOF |
7ee38065 MS |
5922 | #define HAVE_PSINFO32_T 1 |
5923 | EOF | |
5924 | ||
5925 | fi | |
6be7c12c | 5926 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo32_t" 1>&6 |
7ee38065 | 5927 | |
6be7c12c | 5928 | echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6 |
225247f0 | 5929 | echo "configure:5930: checking for lwpstatus_t in sys/procfs.h" >&5 |
6be7c12c AO |
5930 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then |
5931 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 5932 | else |
6be7c12c | 5933 | cat > conftest.$ac_ext <<EOF |
225247f0 | 5934 | #line 5935 "configure" |
252b5132 | 5935 | #include "confdefs.h" |
7ee38065 MS |
5936 | |
5937 | #define _SYSCALL32 | |
252b5132 | 5938 | #include <sys/procfs.h> |
6be7c12c | 5939 | int main() { |
252b5132 | 5940 | lwpstatus_t avar |
6be7c12c AO |
5941 | ; return 0; } |
5942 | EOF | |
225247f0 | 5943 | if { (eval echo configure:5944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c | 5944 | rm -rf conftest* |
252b5132 RH |
5945 | bfd_cv_have_sys_procfs_type_lwpstatus_t=yes |
5946 | else | |
6be7c12c AO |
5947 | echo "configure: failed program was:" >&5 |
5948 | cat conftest.$ac_ext >&5 | |
5949 | rm -rf conftest* | |
5950 | bfd_cv_have_sys_procfs_type_lwpstatus_t=no | |
5951 | ||
252b5132 | 5952 | fi |
6be7c12c | 5953 | rm -f conftest* |
252b5132 RH |
5954 | fi |
5955 | ||
5956 | if test $bfd_cv_have_sys_procfs_type_lwpstatus_t = yes; then | |
6be7c12c | 5957 | cat >> confdefs.h <<\EOF |
252b5132 RH |
5958 | #define HAVE_LWPSTATUS_T 1 |
5959 | EOF | |
5960 | ||
5961 | fi | |
6be7c12c | 5962 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6 |
252b5132 | 5963 | |
6be7c12c | 5964 | echo $ac_n "checking for lwpxstatus_t in sys/procfs.h""... $ac_c" 1>&6 |
225247f0 | 5965 | echo "configure:5966: checking for lwpxstatus_t in sys/procfs.h" >&5 |
6be7c12c AO |
5966 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpxstatus_t'+set}'`\" = set"; then |
5967 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f572a39d | 5968 | else |
6be7c12c | 5969 | cat > conftest.$ac_ext <<EOF |
225247f0 | 5970 | #line 5971 "configure" |
f572a39d AM |
5971 | #include "confdefs.h" |
5972 | ||
5973 | #define _SYSCALL32 | |
5974 | #include <sys/procfs.h> | |
6be7c12c | 5975 | int main() { |
f572a39d | 5976 | lwpxstatus_t avar |
6be7c12c AO |
5977 | ; return 0; } |
5978 | EOF | |
225247f0 | 5979 | if { (eval echo configure:5980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c | 5980 | rm -rf conftest* |
f572a39d AM |
5981 | bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes |
5982 | else | |
6be7c12c AO |
5983 | echo "configure: failed program was:" >&5 |
5984 | cat conftest.$ac_ext >&5 | |
5985 | rm -rf conftest* | |
5986 | bfd_cv_have_sys_procfs_type_lwpxstatus_t=no | |
5987 | ||
f572a39d | 5988 | fi |
6be7c12c | 5989 | rm -f conftest* |
f572a39d AM |
5990 | fi |
5991 | ||
5992 | if test $bfd_cv_have_sys_procfs_type_lwpxstatus_t = yes; then | |
6be7c12c | 5993 | cat >> confdefs.h <<\EOF |
f572a39d AM |
5994 | #define HAVE_LWPXSTATUS_T 1 |
5995 | EOF | |
5996 | ||
5997 | fi | |
6be7c12c | 5998 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpxstatus_t" 1>&6 |
f572a39d | 5999 | |
6be7c12c | 6000 | echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6 |
225247f0 | 6001 | echo "configure:6002: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5 |
6be7c12c AO |
6002 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then |
6003 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 6004 | else |
6be7c12c | 6005 | cat > conftest.$ac_ext <<EOF |
225247f0 | 6006 | #line 6007 "configure" |
252b5132 | 6007 | #include "confdefs.h" |
7ee38065 MS |
6008 | |
6009 | #define _SYSCALL32 | |
252b5132 | 6010 | #include <sys/procfs.h> |
6be7c12c | 6011 | int main() { |
252b5132 | 6012 | lwpstatus_t avar; void* aref = (void*) &avar.pr_context |
6be7c12c AO |
6013 | ; return 0; } |
6014 | EOF | |
225247f0 | 6015 | if { (eval echo configure:6016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c | 6016 | rm -rf conftest* |
252b5132 RH |
6017 | bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes |
6018 | else | |
6be7c12c AO |
6019 | echo "configure: failed program was:" >&5 |
6020 | cat conftest.$ac_ext >&5 | |
6021 | rm -rf conftest* | |
6022 | bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=no | |
6023 | ||
252b5132 | 6024 | fi |
6be7c12c | 6025 | rm -f conftest* |
252b5132 RH |
6026 | fi |
6027 | ||
6028 | if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context = yes; then | |
6be7c12c | 6029 | cat >> confdefs.h <<\EOF |
252b5132 RH |
6030 | #define HAVE_LWPSTATUS_T_PR_CONTEXT 1 |
6031 | EOF | |
6032 | ||
6033 | fi | |
6be7c12c | 6034 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6 |
252b5132 | 6035 | |
6be7c12c | 6036 | echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6 |
225247f0 | 6037 | echo "configure:6038: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5 |
6be7c12c AO |
6038 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then |
6039 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 | 6040 | else |
6be7c12c | 6041 | cat > conftest.$ac_ext <<EOF |
225247f0 | 6042 | #line 6043 "configure" |
252b5132 | 6043 | #include "confdefs.h" |
7ee38065 MS |
6044 | |
6045 | #define _SYSCALL32 | |
252b5132 | 6046 | #include <sys/procfs.h> |
6be7c12c | 6047 | int main() { |
252b5132 | 6048 | lwpstatus_t avar; void* aref = (void*) &avar.pr_reg |
6be7c12c AO |
6049 | ; return 0; } |
6050 | EOF | |
225247f0 | 6051 | if { (eval echo configure:6052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c | 6052 | rm -rf conftest* |
252b5132 RH |
6053 | bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes |
6054 | else | |
6be7c12c AO |
6055 | echo "configure: failed program was:" >&5 |
6056 | cat conftest.$ac_ext >&5 | |
6057 | rm -rf conftest* | |
6058 | bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=no | |
6059 | ||
252b5132 | 6060 | fi |
6be7c12c | 6061 | rm -f conftest* |
252b5132 RH |
6062 | fi |
6063 | ||
6064 | if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg = yes; then | |
6be7c12c | 6065 | cat >> confdefs.h <<\EOF |
252b5132 RH |
6066 | #define HAVE_LWPSTATUS_T_PR_REG 1 |
6067 | EOF | |
6068 | ||
6069 | fi | |
6be7c12c | 6070 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6 |
252b5132 | 6071 | |
6be7c12c | 6072 | echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6 |
225247f0 | 6073 | echo "configure:6074: checking for win32_pstatus_t in sys/procfs.h" >&5 |
6be7c12c AO |
6074 | if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_win32_pstatus_t'+set}'`\" = set"; then |
6075 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e3c976c4 | 6076 | else |
6be7c12c | 6077 | cat > conftest.$ac_ext <<EOF |
225247f0 | 6078 | #line 6079 "configure" |
e3c976c4 | 6079 | #include "confdefs.h" |
7ee38065 MS |
6080 | |
6081 | #define _SYSCALL32 | |
e3c976c4 | 6082 | #include <sys/procfs.h> |
6be7c12c | 6083 | int main() { |
e3c976c4 | 6084 | win32_pstatus_t avar |
6be7c12c AO |
6085 | ; return 0; } |
6086 | EOF | |
225247f0 | 6087 | if { (eval echo configure:6088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6be7c12c | 6088 | rm -rf conftest* |
e3c976c4 ILT |
6089 | bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes |
6090 | else | |
6be7c12c AO |
6091 | echo "configure: failed program was:" >&5 |
6092 | cat conftest.$ac_ext >&5 | |
6093 | rm -rf conftest* | |
6094 | bfd_cv_have_sys_procfs_type_win32_pstatus_t=no | |
6095 | ||
e3c976c4 | 6096 | fi |
6be7c12c | 6097 | rm -f conftest* |
252b5132 RH |
6098 | fi |
6099 | ||
e3c976c4 | 6100 | if test $bfd_cv_have_sys_procfs_type_win32_pstatus_t = yes; then |
6be7c12c | 6101 | cat >> confdefs.h <<\EOF |
e3c976c4 | 6102 | #define HAVE_WIN32_PSTATUS_T 1 |
16e9c715 NC |
6103 | EOF |
6104 | ||
6105 | fi | |
6be7c12c | 6106 | echo "$ac_t""$bfd_cv_have_sys_procfs_type_win32_pstatus_t" 1>&6 |
e3c976c4 ILT |
6107 | |
6108 | fi | |
6109 | fi | |
16e9c715 | 6110 | |
b3baf5d0 | 6111 | |
6be7c12c AO |
6112 | if test -n "$TRAD_HEADER"; then |
6113 | cat >> confdefs.h <<EOF | |
252b5132 RH |
6114 | #define TRAD_HEADER $TRAD_HEADER |
6115 | EOF | |
6116 | ||
3f9b03b5 | 6117 | fi |
252b5132 RH |
6118 | |
6119 | # Horrible hacks to build DLLs on Windows. | |
6120 | WIN32LDFLAGS= | |
6121 | WIN32LIBADD= | |
6122 | case "${host}" in | |
6123 | *-*-cygwin*) | |
6124 | if test "$enable_shared" = "yes"; then | |
6125 | WIN32LDFLAGS="-no-undefined" | |
6126 | WIN32LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32" | |
6127 | fi | |
6128 | ;; | |
78be1d6e | 6129 | *-*-linux*) |
39691762 L |
6130 | # We borrow WIN32LIBADD so that the shared libbfd won't depend on |
6131 | # libiberty.a. | |
ca51bfff L |
6132 | case "${host}" in |
6133 | mips*-*-linux*) | |
6134 | # Linux/MIPS uses PIC by default. | |
6135 | if test "$enable_shared" = "yes"; then | |
6136 | WIN32LIBADD="-L../libiberty -liberty" | |
6137 | fi | |
6138 | ;; | |
6139 | *) | |
66e25bab | 6140 | x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` |
bb2a49f2 | 6141 | if test -n "$x"; then |
ca51bfff L |
6142 | WIN32LIBADD="-L../libiberty/pic -liberty" |
6143 | fi | |
6144 | ;; | |
6145 | esac | |
39691762 | 6146 | ;; |
252b5132 RH |
6147 | esac |
6148 | ||
6be7c12c AO |
6149 | |
6150 | ||
252b5132 RH |
6151 | # target stuff: |
6152 | ||
6153 | # Canonicalize the secondary target names. | |
6154 | if test -n "$enable_targets" ; then | |
6155 | for targ in `echo $enable_targets | sed 's/,/ /g'` | |
6156 | do | |
6d83c84b | 6157 | result=`$ac_config_sub $targ 2>/dev/null` |
252b5132 RH |
6158 | if test -n "$result" ; then |
6159 | canon_targets="$canon_targets $result" | |
6160 | else | |
6161 | # Allow targets that config.sub doesn't recognize, like "all". | |
6162 | canon_targets="$canon_targets $targ" | |
6163 | fi | |
6164 | done | |
6165 | fi | |
6166 | ||
6167 | all_targets=false | |
6168 | defvec= | |
6169 | selvecs= | |
08f74004 | 6170 | assocvecs= |
252b5132 RH |
6171 | selarchs= |
6172 | TDEFINES= | |
6173 | for targ in $target $canon_targets | |
6174 | do | |
6175 | if test "x$targ" = "xall"; then | |
6176 | all_targets=true | |
08f74004 | 6177 | assocvecs="$assocvecs $targ_defvec $targ_selvecs" |
252b5132 RH |
6178 | else |
6179 | . $srcdir/config.bfd | |
6180 | if test "x$targ" = "x$target"; then | |
6181 | defvec=$targ_defvec | |
6182 | fi | |
6183 | selvecs="$selvecs $targ_defvec $targ_selvecs" | |
6184 | selarchs="$selarchs $targ_archs" | |
6185 | TDEFINES="$TDEFINES $targ_cflags" | |
6186 | fi | |
6187 | done | |
6188 | ||
6be7c12c | 6189 | |
252b5132 RH |
6190 | # This processing still needs to be done if we're to decide properly whether |
6191 | # 64-bit support needs to be compiled in. Currently, it will be included if | |
6192 | # the default or any other explicitly requested target requires it; it | |
6193 | # will not be included on a 32-bit host if no 64-bit target is requested, and | |
9eb7245e | 6194 | # no "--with-64-bit-bfd" option is given, even if "--enable-targets=all" is |
252b5132 RH |
6195 | # used. |
6196 | ||
6197 | # uniq the default and selected vectors in all the configured targets. | |
6198 | f="" | |
6199 | for i in $selvecs ; do | |
6200 | case " $f " in | |
6201 | *" $i "*) ;; | |
6202 | *) f="$f $i" ;; | |
6203 | esac | |
6204 | done | |
6205 | selvecs="$f" | |
6206 | ||
6be7c12c | 6207 | |
08f74004 AM |
6208 | # uniq the associated vectors in all the configured targets. |
6209 | f="" | |
6210 | for i in $assocvecs ; do | |
6211 | case " $f " in | |
6212 | *" $i "*) ;; | |
6213 | *) f="$f $i" ;; | |
6214 | esac | |
6215 | done | |
6216 | assocvecs="$f" | |
6217 | ||
6218 | ||
252b5132 RH |
6219 | # uniq the architectures in all the configured targets. |
6220 | f="" | |
6221 | for i in $selarchs ; do | |
6222 | case " $f " in | |
6223 | *" $i "*) ;; | |
6224 | *) f="$f $i" ;; | |
6225 | esac | |
6226 | done | |
6227 | selarchs="$f" | |
6228 | ||
6229 | # Target backend .o files. | |
6230 | tb= | |
6231 | ||
65765700 | 6232 | elf="elf.lo elflink.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo" |
252b5132 RH |
6233 | |
6234 | for vec in $selvecs | |
6235 | do | |
69263e90 | 6236 | target_size=32 |
252b5132 RH |
6237 | case "$vec" in |
6238 | # This list is alphabetized to make it easy to compare | |
dc810e39 AM |
6239 | # with the two vector lists in targets.c. For the same reason, |
6240 | # use one entry per line, even though this leads to long lines. | |
252b5132 RH |
6241 | a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;; |
6242 | a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;; | |
341ca622 | 6243 | aix5coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;; |
252b5132 RH |
6244 | aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;; |
6245 | aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;; | |
6246 | aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;; | |
252b5132 | 6247 | apollocoff_vec) tb="$tb coff-apollo.lo" ;; |
dc810e39 AM |
6248 | arm_epoc_pe_big_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;; |
6249 | arm_epoc_pe_little_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;; | |
6250 | arm_epoc_pei_big_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;; | |
6251 | arm_epoc_pei_little_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;; | |
6252 | armcoff_big_vec) tb="$tb coff-arm.lo cofflink.lo " ;; | |
6253 | armcoff_little_vec) tb="$tb coff-arm.lo cofflink.lo " ;; | |
6254 | armnetbsd_vec) tb="$tb armnetbsd.lo aout32.lo" ;; | |
6255 | armpe_big_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;; | |
6256 | armpe_little_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;; | |
6257 | armpei_big_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;; | |
6258 | armpei_little_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;; | |
252b5132 RH |
6259 | b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;; |
6260 | b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;; | |
fac41780 | 6261 | bfd_efi_app_ia32_vec) tb="$tb efi-app-ia32.lo peigen.lo cofflink.lo" ;; |
dc810e39 | 6262 | bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;; |
73c3cd1c | 6263 | bfd_elf32_am33lin_vec) tb="$tb elf32-am33lin.lo elf32.lo $elf" ;; |
adde6300 | 6264 | bfd_elf32_avr_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;; |
dc810e39 | 6265 | bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;; |
252b5132 | 6266 | bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;; |
252b5132 | 6267 | bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;; |
b6821651 | 6268 | bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;; |
c6e90b02 | 6269 | bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;; |
0949843d | 6270 | bfd_elf32_cr16c_vec) tb="$tb elf32-cr16c.lo elf32.lo $elf" ;; |
06c15ad7 | 6271 | bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;; |
1fe1f39c | 6272 | bfd_elf32_crx_vec) tb="$tb elf32-crx.lo elf32.lo $elf" ;; |
252b5132 RH |
6273 | bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;; |
6274 | bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;; | |
d172d4ba | 6275 | bfd_elf32_dlx_big_vec) tb="$tb elf32-dlx.lo elf32.lo $elf" ;; |
252b5132 | 6276 | bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;; |
4e5ba5b7 | 6277 | bfd_elf32_frv_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;; |
43850d5b | 6278 | bfd_elf32_frvfdpic_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;; |
e01b0e69 | 6279 | bfd_elf32_h8300_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;; |
dc810e39 | 6280 | bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; |
225247f0 | 6281 | bfd_elf32_hppa_nbsd_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; |
dc810e39 | 6282 | bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; |
5b93d8bb | 6283 | bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; |
b6821651 AM |
6284 | bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;; |
6285 | bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;; | |
9d751335 | 6286 | bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; |
dc810e39 | 6287 | bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; |
b2ef150d | 6288 | bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;; |
dc810e39 | 6289 | bfd_elf32_ia64_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf" ;; |
fcf12726 | 6290 | bfd_elf32_ia64_hpux_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf";; |
cf88bb9f | 6291 | bfd_elf32_ip2k_vec) tb="$tb elf32-ip2k.lo elf32.lo $elf" ;; |
a75473eb | 6292 | bfd_elf32_iq2000_vec) tb="$tb elf32-iq2000.lo elf32.lo $elf" ;; |
252b5132 | 6293 | bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;; |
dc810e39 AM |
6294 | bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;; |
6295 | bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;; | |
b6821651 | 6296 | bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;; |
c6e90b02 | 6297 | bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;; |
252b5132 | 6298 | bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; |
6edf0760 NC |
6299 | bfd_elf32_m32rle_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; |
6300 | bfd_elf32_m32rlin_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; | |
6301 | bfd_elf32_m32rlelin_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; | |
f5a6f915 SC |
6302 | bfd_elf32_m68hc11_vec) tb="$tb elf32-m68hc11.lo elf32-m68hc1x.lo elf32.lo $elf" ;; |
6303 | bfd_elf32_m68hc12_vec) tb="$tb elf32-m68hc12.lo elf32-m68hc1x.lo elf32.lo $elf" ;; | |
252b5132 RH |
6304 | bfd_elf32_m68k_vec) tb="$tb elf32-m68k.lo elf32.lo $elf" ;; |
6305 | bfd_elf32_m88k_vec) tb="$tb elf32-m88k.lo elf32.lo $elf" ;; | |
6306 | bfd_elf32_mcore_big_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;; | |
6307 | bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;; | |
6308 | bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;; | |
6309 | bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;; | |
2469cfa2 | 6310 | bfd_elf32_msp430_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;; |
8a397dad TS |
6311 | bfd_elf32_nbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; |
6312 | bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; | |
6313 | bfd_elf32_ntradbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; | |
6314 | bfd_elf32_ntradlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; | |
b3baf5d0 | 6315 | bfd_elf32_openrisc_vec) tb="$tb elf32-openrisc.lo elf32.lo $elf" ;; |
3b16e843 | 6316 | bfd_elf32_or32_big_vec) tb="$tb elf32-or32.lo elf32.lo $elf" ;; |
0bcb993b ILT |
6317 | bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";; |
6318 | bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";; | |
b6821651 AM |
6319 | bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;; |
6320 | bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;; | |
a85d7ed0 | 6321 | bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;; |
eb1e0e80 NC |
6322 | # FIXME: We include cofflink.lo not because it's needed for |
6323 | # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec | |
6324 | # which needs it but does not list it. Should be fixed in right place. | |
9cba27b2 JT |
6325 | bfd_elf32_sh64_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;; |
6326 | bfd_elf32_sh64l_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;; | |
2bc3c89a AM |
6327 | bfd_elf32_sh64lin_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;; |
6328 | bfd_elf32_sh64blin_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;; | |
6329 | bfd_elf32_sh64lnbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;; | |
6330 | bfd_elf32_sh64nbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;; | |
b6821651 AM |
6331 | bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; |
6332 | bfd_elf32_shblin_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; | |
6333 | bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; | |
85fbca6a | 6334 | bfd_elf32_shl_symbian_vec) tb="$tb elf32-sh-symbian.lo elf32-sh64-com.lo elf32.lo $elf coff-sh.lo" ;; |
b6821651 AM |
6335 | bfd_elf32_shlin_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; |
6336 | bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; | |
6337 | bfd_elf32_shnbsd_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; | |
252b5132 | 6338 | bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;; |
c6e90b02 TS |
6339 | bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;; |
6340 | bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;; | |
dc810e39 | 6341 | bfd_elf32_us_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;; |
252b5132 | 6342 | bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;; |
90ace9e9 | 6343 | bfd_elf32_vax_vec) tb="$tb elf32-vax.lo elf32.lo $elf" ;; |
93fbbb04 | 6344 | bfd_elf32_xstormy16_vec) tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;; |
e0001a05 NC |
6345 | bfd_elf32_xtensa_le_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;; |
6346 | bfd_elf32_xtensa_be_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;; | |
2238051f | 6347 | bfd_elf64_alpha_freebsd_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;; |
dc810e39 AM |
6348 | bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;; |
6349 | bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;; | |
c6e90b02 | 6350 | bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; |
dc810e39 AM |
6351 | bfd_elf64_hppa_linux_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;; |
6352 | bfd_elf64_hppa_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;; | |
dc810e39 | 6353 | bfd_elf64_ia64_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; |
fcf12726 | 6354 | bfd_elf64_ia64_hpux_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; |
dc810e39 AM |
6355 | bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; |
6356 | bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;; | |
c6e90b02 | 6357 | bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; |
3c3bdf30 | 6358 | bfd_elf64_mmix_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;; |
dc810e39 AM |
6359 | bfd_elf64_powerpc_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;; |
6360 | bfd_elf64_powerpcle_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;; | |
6361 | bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;; | |
341ca622 AM |
6362 | bfd_elf64_sh64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; |
6363 | bfd_elf64_sh64l_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; | |
2bc3c89a AM |
6364 | bfd_elf64_sh64lin_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; |
6365 | bfd_elf64_sh64blin_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; | |
6366 | bfd_elf64_sh64lnbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; | |
6367 | bfd_elf64_sh64nbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; | |
dc810e39 | 6368 | bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"; target_size=64 ;; |
c6e90b02 TS |
6369 | bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; |
6370 | bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; | |
dc810e39 | 6371 | bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;; |
3c3bdf30 | 6372 | bfd_mmo_vec) tb="$tb mmo.lo" target_size=64 ;; |
dc810e39 AM |
6373 | bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;; |
6374 | bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;; | |
6375 | bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;; | |
6376 | bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;; | |
06c15ad7 | 6377 | cris_aout_vec) tb="$tb aout-cris.lo" ;; |
dc810e39 | 6378 | demo_64_vec) tb="$tb demo64.lo aout64.lo"; target_size=64 ;; |
252b5132 | 6379 | ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;; |
252b5132 | 6380 | ecoff_biglittle_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;; |
dc810e39 AM |
6381 | ecoff_little_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;; |
6382 | ecoffalpha_little_vec) tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo"; target_size=64 ;; | |
252b5132 RH |
6383 | go32coff_vec) tb="$tb coff-go32.lo cofflink.lo" ;; |
6384 | go32stubbedcoff_vec) tb="$tb coff-stgo32.lo cofflink.lo" ;; | |
6385 | h8300coff_vec) tb="$tb coff-h8300.lo reloc16.lo" ;; | |
6386 | h8500coff_vec) tb="$tb coff-h8500.lo reloc16.lo" ;; | |
6387 | host_aout_vec) tb="$tb host-aout.lo aout32.lo" ;; | |
6388 | hp300bsd_vec) tb="$tb hp300bsd.lo aout32.lo" ;; | |
6389 | hp300hpux_vec) tb="$tb hp300hpux.lo aout32.lo" ;; | |
6390 | i386aout_vec) tb="$tb i386aout.lo aout32.lo" ;; | |
6391 | i386bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;; | |
6392 | i386coff_vec) tb="$tb coff-i386.lo cofflink.lo" ;; | |
6393 | i386dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;; | |
6394 | i386freebsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;; | |
252b5132 RH |
6395 | i386linux_vec) tb="$tb i386linux.lo aout32.lo" ;; |
6396 | i386lynx_aout_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;; | |
6397 | i386lynx_coff_vec) tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;; | |
6398 | i386mach3_vec) tb="$tb i386mach3.lo aout32.lo" ;; | |
dc810e39 | 6399 | i386msdos_vec) tb="$tb i386msdos.lo" ;; |
252b5132 RH |
6400 | i386netbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;; |
6401 | i386os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;; | |
dc810e39 AM |
6402 | i386pe_vec) tb="$tb pe-i386.lo peigen.lo cofflink.lo" ;; |
6403 | i386pei_vec) tb="$tb pei-i386.lo peigen.lo cofflink.lo" ;; | |
252b5132 RH |
6404 | i860coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;; |
6405 | icoff_big_vec) tb="$tb coff-i960.lo cofflink.lo" ;; | |
6406 | icoff_little_vec) tb="$tb coff-i960.lo cofflink.lo" ;; | |
6407 | ieee_vec) tb="$tb ieee.lo" ;; | |
dc810e39 AM |
6408 | m68k4knetbsd_vec) tb="$tb m68k4knetbsd.lo aout32.lo" ;; |
6409 | m68kaux_coff_vec) tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;; | |
252b5132 RH |
6410 | m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;; |
6411 | m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;; | |
6412 | m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;; | |
6413 | m68klynx_aout_vec) tb="$tb m68klynx.lo lynx-core.lo aout32.lo" ;; | |
6414 | m68klynx_coff_vec) tb="$tb cf-m68klynx.lo coff-m68k.lo cofflink.lo lynx-core.lo" ;; | |
6415 | m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;; | |
252b5132 RH |
6416 | m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;; |
6417 | m88kbcs_vec) tb="$tb coff-m88k.lo" ;; | |
341ca622 | 6418 | m88kmach3_vec) tb="$tb m88kmach3.lo aout32.lo" ;; |
c6f8758f | 6419 | m88kopenbsd_vec) tb="$tb m88kopenbsd.lo aout32.lo" ;; |
93509525 KD |
6420 | mach_o_be_vec) tb="$tb mach-o.lo" ;; |
6421 | mach_o_le_vec) tb="$tb mach-o.lo" ;; | |
6422 | mach_o_fat_vec) tb="$tb mach-o.lo" ;; | |
277d1b5e ILT |
6423 | mcore_pe_big_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;; |
6424 | mcore_pe_little_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;; | |
6425 | mcore_pei_big_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;; | |
6426 | mcore_pei_little_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;; | |
dc810e39 AM |
6427 | mipslpe_vec) tb="$tb pe-mips.lo peigen.lo cofflink.lo" ;; |
6428 | mipslpei_vec) tb="$tb pei-mips.lo peigen.lo cofflink.lo" ;; | |
252b5132 | 6429 | newsos3_vec) tb="$tb newsos3.lo aout32.lo" ;; |
dc810e39 | 6430 | nlm32_alpha_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"; target_size=64 ;; |
252b5132 | 6431 | nlm32_i386_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;; |
252b5132 | 6432 | nlm32_powerpc_vec) tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;; |
dc810e39 | 6433 | nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;; |
3b16e843 | 6434 | or32coff_big_vec) tb="$tb coff-or32.lo cofflink.lo" ;; |
252b5132 | 6435 | pc532machaout_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;; |
dc810e39 | 6436 | pc532netbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;; |
93509525 KD |
6437 | pef_vec) tb="$tb pef.lo" ;; |
6438 | pef_xlib_vec) tb="$tb pef.lo" ;; | |
e135f41b | 6439 | pdp11_aout_vec) tb="$tb pdp11.lo" ;; |
6768c14a | 6440 | pmac_xcoff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;; |
252b5132 | 6441 | ppcboot_vec) tb="$tb ppcboot.lo" ;; |
dc810e39 | 6442 | riscix_vec) tb="$tb aout32.lo riscix.lo" ;; |
eb1e0e80 | 6443 | rs6000coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;; |
dc810e39 | 6444 | rs6000coff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;; |
252b5132 | 6445 | shcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;; |
dc810e39 | 6446 | shcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;; |
252b5132 | 6447 | shlcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;; |
dc810e39 | 6448 | shlcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;; |
60bcf0fa NC |
6449 | shlpe_vec) tb="$tb pe-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;; |
6450 | shlpei_vec) tb="$tb pei-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;; | |
252b5132 | 6451 | som_vec) tb="$tb som.lo" ;; |
dc810e39 | 6452 | sparccoff_vec) tb="$tb coff-sparc.lo" ;; |
252b5132 RH |
6453 | sparcle_aout_vec) tb="$tb aout-sparcle.lo aout32.lo" ;; |
6454 | sparclinux_vec) tb="$tb sparclinux.lo aout32.lo" ;; | |
6455 | sparclynx_aout_vec) tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;; | |
6456 | sparclynx_coff_vec) tb="$tb cf-sparclynx.lo lynx-core.lo" ;; | |
6457 | sparcnetbsd_vec) tb="$tb sparcnetbsd.lo aout32.lo" ;; | |
252b5132 | 6458 | sunos_big_vec) tb="$tb sunos.lo aout32.lo" ;; |
93509525 | 6459 | sym_vec) tb="$tb xsym.lo" ;; |
252b5132 RH |
6460 | tic30_aout_vec) tb="$tb aout-tic30.lo" ;; |
6461 | tic30_coff_vec) tb="$tb coff-tic30.lo" ;; | |
026df7c5 NC |
6462 | tic4x_coff0_vec) tb="$tb coff-tic4x.lo" ;; |
6463 | tic4x_coff0_beh_vec) tb="$tb coff-tic4x.lo" ;; | |
6464 | tic4x_coff1_vec) tb="$tb coff-tic4x.lo" ;; | |
6465 | tic4x_coff1_beh_vec) tb="$tb coff-tic4x.lo" ;; | |
6466 | tic4x_coff2_vec) tb="$tb coff-tic4x.lo" ;; | |
6467 | tic4x_coff2_beh_vec) tb="$tb coff-tic4x.lo" ;; | |
81635ce4 | 6468 | tic54x_coff0_beh_vec) tb="$tb coff-tic54x.lo" ;; |
dc810e39 | 6469 | tic54x_coff0_vec) tb="$tb coff-tic54x.lo" ;; |
81635ce4 | 6470 | tic54x_coff1_beh_vec) tb="$tb coff-tic54x.lo" ;; |
dc810e39 | 6471 | tic54x_coff1_vec) tb="$tb coff-tic54x.lo" ;; |
81635ce4 | 6472 | tic54x_coff2_beh_vec) tb="$tb coff-tic54x.lo" ;; |
dc810e39 | 6473 | tic54x_coff2_vec) tb="$tb coff-tic54x.lo" ;; |
252b5132 | 6474 | tic80coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;; |
90ace9e9 | 6475 | vaxnetbsd_vec) tb="$tb vaxnetbsd.lo aout32.lo" ;; |
3c2bfad6 | 6476 | vax1knetbsd_vec) tb="$tb vax1knetbsd.lo aout32.lo" ;; |
ba26fd96 | 6477 | vaxbsd_vec) tb="$tb vaxbsd.lo aout32.lo" ;; |
252b5132 | 6478 | versados_vec) tb="$tb versados.lo" ;; |
dc810e39 | 6479 | vms_alpha_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo"; target_size=64 ;; |
252b5132 RH |
6480 | vms_vax_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo" ;; |
6481 | w65_vec) tb="$tb coff-w65.lo reloc16.lo" ;; | |
6482 | we32kcoff_vec) tb="$tb coff-we32k.lo" ;; | |
6483 | z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;; | |
6484 | ||
341ca622 AM |
6485 | # These appear out of order in targets.c |
6486 | srec_vec) tb="$tb srec.lo" ;; | |
6487 | symbolsrec_vec) tb="$tb srec.lo" ;; | |
6488 | tekhex_vec) tb="$tb tekhex.lo" ;; | |
6489 | cisco_core_big_vec) tb="$tb cisco-core.lo" ;; | |
6490 | cisco_core_little_vec) tb="$tb cisco-core.lo" ;; | |
6491 | ||
252b5132 | 6492 | "") ;; |
6be7c12c | 6493 | *) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;; |
252b5132 | 6494 | esac |
69263e90 AM |
6495 | |
6496 | if test ${target_size} = 64; then | |
6497 | target64=true | |
6498 | fi | |
6499 | if test x"${vec}" = x"${defvec}"; then | |
6500 | bfd_default_target_size=${target_size} | |
6501 | fi | |
252b5132 RH |
6502 | done |
6503 | ||
6504 | # Target architecture .o files. | |
6505 | # A couple of CPUs use shorter file names to avoid problems on DOS | |
6506 | # filesystems. | |
6507 | ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/` | |
6508 | ||
6509 | # Weed out duplicate .o files. | |
6510 | f="" | |
6511 | for i in $tb ; do | |
6512 | case " $f " in | |
6513 | *" $i "*) ;; | |
6514 | *) f="$f $i" ;; | |
6515 | esac | |
6516 | done | |
6517 | tb="$f" | |
6518 | ||
6519 | f="" | |
6520 | for i in $ta ; do | |
6521 | case " $f " in | |
6522 | *" $i "*) ;; | |
6523 | *) f="$f $i" ;; | |
6524 | esac | |
6525 | done | |
6526 | ta="$f" | |
6527 | ||
6528 | bfd_backends="$tb" | |
6529 | bfd_machines="$ta" | |
6530 | ||
6531 | if test x${all_targets} = xtrue ; then | |
6532 | bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)' | |
6533 | bfd_machines="${bfd_machines}"' $(ALL_MACHINES)' | |
6534 | selvecs= | |
6535 | havevecs= | |
6536 | selarchs= | |
08f74004 AM |
6537 | test -n "$assocvecs" && |
6538 | assocvecs=`echo $assocvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` | |
252b5132 RH |
6539 | else # all_targets is true |
6540 | # Only set these if they will be nonempty, for the clever echo. | |
6541 | havevecs= | |
08f74004 | 6542 | assocvecs= |
252b5132 RH |
6543 | test -n "$selvecs" && |
6544 | havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'` | |
6545 | test -n "$selvecs" && | |
6546 | selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` | |
6547 | test -n "$selarchs" && | |
6548 | selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` | |
6549 | fi # all_targets is true | |
6550 | ||
6551 | case ${host64}-${target64}-${want64} in | |
6552 | *true*) | |
6553 | wordsize=64 | |
2858ef35 | 6554 | bfd_libs='$(BFD64_LIBS) $(BFD32_LIBS)' |
252b5132 | 6555 | all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)' |
ccba357f | 6556 | if test $BFD_HOST_64_BIT_DEFINED = 0; then |
6be7c12c AO |
6557 | echo "configure: warning: You have requested a 64 bit BFD configuration, but" 1>&2 |
6558 | echo "configure: warning: your compiler may not have a 64 bit integral type" 1>&2 | |
252b5132 | 6559 | fi |
966abd70 HPN |
6560 | if test -n "$GCC" ; then |
6561 | bad_64bit_gcc=no; | |
6562 | echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6 | |
225247f0 | 6563 | echo "configure:6564: checking for gcc version with buggy 64-bit support" >&5 |
966abd70 HPN |
6564 | # Add more tests for gcc versions with non-working 64-bit support here. |
6565 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 6566 | #line 6567 "configure" |
966abd70 HPN |
6567 | #include "confdefs.h" |
6568 | :__GNUC__:__GNUC_MINOR__:__i386__: | |
6569 | EOF | |
6570 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6571 | egrep ": 2 : 91 : 1 :" >/dev/null 2>&1; then | |
6572 | rm -rf conftest* | |
6573 | bad_64bit_gcc=yes; | |
6574 | echo "$ac_t""yes: egcs-1.1.2 on ix86 spotted" 1>&6 | |
6575 | else | |
6576 | rm -rf conftest* | |
6577 | echo "$ac_t""no" 1>&6 | |
6578 | fi | |
6579 | rm -f conftest* | |
6580 | ||
6581 | if test $bad_64bit_gcc = yes ; then | |
6582 | { echo "configure: error: A newer version of gcc is needed for the requested 64-bit BFD configuration" 1>&2; exit 1; } | |
6583 | fi | |
6584 | fi | |
252b5132 RH |
6585 | ;; |
6586 | false-false-false) | |
6587 | wordsize=32 | |
2858ef35 | 6588 | bfd_libs='$(BFD32_LIBS)' |
252b5132 RH |
6589 | all_backends='$(BFD32_BACKENDS)' |
6590 | ;; | |
6591 | esac | |
6592 | ||
6be7c12c AO |
6593 | |
6594 | ||
6595 | ||
6596 | ||
6597 | ||
69263e90 | 6598 | |
2858ef35 | 6599 | |
1012372a AC |
6600 | # Determine the host dependant file_ptr a.k.a. off_t type. In order |
6601 | # prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and | |
6602 | # fseeko, long. This assumes that sizeof off_t is .ge. sizeof long. | |
6603 | # Hopefully a reasonable assumption since fseeko et.al. should be | |
6604 | # upward compatible. | |
6605 | for ac_func in ftello ftello64 fseeko fseeko64 | |
6606 | do | |
6607 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
225247f0 | 6608 | echo "configure:6609: checking for $ac_func" >&5 |
1012372a AC |
6609 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6610 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6611 | else | |
6612 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 6613 | #line 6614 "configure" |
1012372a AC |
6614 | #include "confdefs.h" |
6615 | /* System header to define __stub macros and hopefully few prototypes, | |
6616 | which can conflict with char $ac_func(); below. */ | |
6617 | #include <assert.h> | |
6618 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6619 | /* We use char because int might match the return type of a gcc2 | |
6620 | builtin and then its argument prototype would still apply. */ | |
6621 | char $ac_func(); | |
6622 | ||
6623 | int main() { | |
6624 | ||
6625 | /* The GNU C library defines this for functions which it implements | |
6626 | to always fail with ENOSYS. Some functions are actually named | |
6627 | something starting with __ and the normal name is an alias. */ | |
6628 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6629 | choke me | |
6630 | #else | |
6631 | $ac_func(); | |
6632 | #endif | |
6633 | ||
6634 | ; return 0; } | |
6635 | EOF | |
225247f0 | 6636 | if { (eval echo configure:6637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
1012372a AC |
6637 | rm -rf conftest* |
6638 | eval "ac_cv_func_$ac_func=yes" | |
6639 | else | |
6640 | echo "configure: failed program was:" >&5 | |
6641 | cat conftest.$ac_ext >&5 | |
6642 | rm -rf conftest* | |
6643 | eval "ac_cv_func_$ac_func=no" | |
6644 | fi | |
6645 | rm -f conftest* | |
6646 | fi | |
6647 | ||
6648 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6649 | echo "$ac_t""yes" 1>&6 | |
6650 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6651 | cat >> confdefs.h <<EOF | |
6652 | #define $ac_tr_func 1 | |
6653 | EOF | |
6654 | ||
6655 | else | |
6656 | echo "$ac_t""no" 1>&6 | |
6657 | fi | |
6658 | done | |
6659 | ||
1012372a AC |
6660 | if test x"$ac_cv_func_ftello" = xyes -a x"$ac_cv_func_fseeko" = xyes; then |
6661 | echo $ac_n "checking size of off_t""... $ac_c" 1>&6 | |
225247f0 | 6662 | echo "configure:6663: checking size of off_t" >&5 |
1012372a AC |
6663 | if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then |
6664 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6665 | else | |
6666 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. | |
6667 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 6668 | #line 6669 "configure" |
1012372a AC |
6669 | #include "confdefs.h" |
6670 | #include "confdefs.h" | |
6671 | #include <sys/types.h> | |
6672 | ||
6673 | ||
6674 | int main() { | |
6675 | switch (0) case 0: case (sizeof (off_t) == $ac_size):; | |
6676 | ; return 0; } | |
6677 | EOF | |
225247f0 | 6678 | if { (eval echo configure:6679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
1012372a AC |
6679 | rm -rf conftest* |
6680 | ac_cv_sizeof_off_t=$ac_size | |
6681 | else | |
6682 | echo "configure: failed program was:" >&5 | |
6683 | cat conftest.$ac_ext >&5 | |
6684 | fi | |
6685 | rm -f conftest* | |
6686 | if test x$ac_cv_sizeof_off_t != x ; then break; fi | |
6687 | done | |
6688 | ||
6689 | fi | |
6690 | ||
6691 | if test x$ac_cv_sizeof_off_t = x ; then | |
6692 | { echo "configure: error: cannot determine a size for off_t" 1>&2; exit 1; } | |
6693 | fi | |
6694 | echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6 | |
6695 | cat >> confdefs.h <<EOF | |
6696 | #define SIZEOF_OFF_T $ac_cv_sizeof_off_t | |
6697 | EOF | |
6698 | ||
6699 | ||
1012372a | 6700 | fi |
ccba357f | 6701 | echo $ac_n "checking file_ptr type""... $ac_c" 1>&6 |
225247f0 | 6702 | echo "configure:6703: checking file_ptr type" >&5 |
ccba357f AM |
6703 | bfd_file_ptr="long" |
6704 | bfd_ufile_ptr="unsigned long" | |
6705 | if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes \ | |
6706 | -o x"${ac_cv_sizeof_off_t}" = x8; then | |
1012372a AC |
6707 | bfd_file_ptr=BFD_HOST_64_BIT |
6708 | bfd_ufile_ptr=BFD_HOST_U_64_BIT | |
6709 | fi | |
6710 | echo "$ac_t""$bfd_file_ptr" 1>&6 | |
6711 | ||
6712 | ||
6713 | ||
6714 | ||
252b5132 RH |
6715 | tdefaults="" |
6716 | test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}" | |
6717 | test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'" | |
08f74004 | 6718 | test -n "${assocvecs}" && tdefaults="${tdefaults} -DASSOCIATED_VECS='${assocvecs}'" |
252b5132 RH |
6719 | test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'" |
6720 | test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}" | |
6721 | ||
6be7c12c | 6722 | |
bc286f95 | 6723 | for ac_hdr in unistd.h |
252b5132 | 6724 | do |
6be7c12c AO |
6725 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
6726 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
225247f0 | 6727 | echo "configure:6728: checking for $ac_hdr" >&5 |
6be7c12c AO |
6728 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6729 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6730 | else | |
6731 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 6732 | #line 6733 "configure" |
252b5132 | 6733 | #include "confdefs.h" |
6be7c12c AO |
6734 | #include <$ac_hdr> |
6735 | EOF | |
6736 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
225247f0 | 6737 | { (eval echo configure:6738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
6be7c12c AO |
6738 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6739 | if test -z "$ac_err"; then | |
6740 | rm -rf conftest* | |
6741 | eval "ac_cv_header_$ac_safe=yes" | |
252b5132 | 6742 | else |
6be7c12c AO |
6743 | echo "$ac_err" >&5 |
6744 | echo "configure: failed program was:" >&5 | |
252b5132 | 6745 | cat conftest.$ac_ext >&5 |
6be7c12c AO |
6746 | rm -rf conftest* |
6747 | eval "ac_cv_header_$ac_safe=no" | |
252b5132 | 6748 | fi |
6be7c12c | 6749 | rm -f conftest* |
252b5132 | 6750 | fi |
6be7c12c AO |
6751 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
6752 | echo "$ac_t""yes" 1>&6 | |
6753 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
6754 | cat >> confdefs.h <<EOF | |
6755 | #define $ac_tr_hdr 1 | |
252b5132 | 6756 | EOF |
6be7c12c AO |
6757 | |
6758 | else | |
6759 | echo "$ac_t""no" 1>&6 | |
252b5132 RH |
6760 | fi |
6761 | done | |
6762 | ||
6763 | for ac_func in getpagesize | |
6764 | do | |
6be7c12c | 6765 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
225247f0 | 6766 | echo "configure:6767: checking for $ac_func" >&5 |
6be7c12c AO |
6767 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6768 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6769 | else | |
6770 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 6771 | #line 6772 "configure" |
252b5132 RH |
6772 | #include "confdefs.h" |
6773 | /* System header to define __stub macros and hopefully few prototypes, | |
6be7c12c | 6774 | which can conflict with char $ac_func(); below. */ |
252b5132 RH |
6775 | #include <assert.h> |
6776 | /* Override any gcc2 internal prototype to avoid an error. */ | |
6777 | /* We use char because int might match the return type of a gcc2 | |
6be7c12c AO |
6778 | builtin and then its argument prototype would still apply. */ |
6779 | char $ac_func(); | |
6780 | ||
6781 | int main() { | |
252b5132 RH |
6782 | |
6783 | /* The GNU C library defines this for functions which it implements | |
6784 | to always fail with ENOSYS. Some functions are actually named | |
6785 | something starting with __ and the normal name is an alias. */ | |
6786 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6787 | choke me | |
6788 | #else | |
6be7c12c | 6789 | $ac_func(); |
252b5132 RH |
6790 | #endif |
6791 | ||
6be7c12c | 6792 | ; return 0; } |
252b5132 | 6793 | EOF |
225247f0 | 6794 | if { (eval echo configure:6795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
6be7c12c AO |
6795 | rm -rf conftest* |
6796 | eval "ac_cv_func_$ac_func=yes" | |
6797 | else | |
6798 | echo "configure: failed program was:" >&5 | |
6799 | cat conftest.$ac_ext >&5 | |
6800 | rm -rf conftest* | |
6801 | eval "ac_cv_func_$ac_func=no" | |
6802 | fi | |
6803 | rm -f conftest* | |
6804 | fi | |
252b5132 | 6805 | |
6be7c12c AO |
6806 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6807 | echo "$ac_t""yes" 1>&6 | |
6808 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6809 | cat >> confdefs.h <<EOF | |
6810 | #define $ac_tr_func 1 | |
6811 | EOF | |
6812 | ||
6813 | else | |
6814 | echo "$ac_t""no" 1>&6 | |
252b5132 RH |
6815 | fi |
6816 | done | |
6817 | ||
6be7c12c | 6818 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
225247f0 | 6819 | echo "configure:6820: checking for working mmap" >&5 |
6be7c12c AO |
6820 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
6821 | echo $ac_n "(cached) $ac_c" 1>&6 | |
252b5132 RH |
6822 | else |
6823 | if test "$cross_compiling" = yes; then | |
6824 | ac_cv_func_mmap_fixed_mapped=no | |
6825 | else | |
6be7c12c | 6826 | cat > conftest.$ac_ext <<EOF |
225247f0 | 6827 | #line 6828 "configure" |
252b5132 | 6828 | #include "confdefs.h" |
6be7c12c | 6829 | |
252b5132 RH |
6830 | /* Thanks to Mike Haertel and Jim Avera for this test. |
6831 | Here is a matrix of mmap possibilities: | |
6832 | mmap private not fixed | |
6833 | mmap private fixed at somewhere currently unmapped | |
6834 | mmap private fixed at somewhere already mapped | |
6835 | mmap shared not fixed | |
6836 | mmap shared fixed at somewhere currently unmapped | |
6837 | mmap shared fixed at somewhere already mapped | |
6838 | For private mappings, we should verify that changes cannot be read() | |
6839 | back from the file, nor mmap's back from the file at a different | |
6840 | address. (There have been systems where private was not correctly | |
6841 | implemented like the infamous i386 svr4.0, and systems where the | |
6be7c12c | 6842 | VM page cache was not coherent with the filesystem buffer cache |
252b5132 RH |
6843 | like early versions of FreeBSD and possibly contemporary NetBSD.) |
6844 | For shared mappings, we should conversely verify that changes get | |
6845 | propogated back to all the places they're supposed to be. | |
6846 | ||
6847 | Grep wants private fixed already mapped. | |
6848 | The main things grep needs to know about mmap are: | |
6849 | * does it exist and is it safe to write into the mmap'd area | |
6850 | * how to use it (BSD variants) */ | |
6851 | #include <sys/types.h> | |
6852 | #include <fcntl.h> | |
6853 | #include <sys/mman.h> | |
6854 | ||
b3baf5d0 | 6855 | /* This mess was copied from the GNU getpagesize.h. */ |
6be7c12c | 6856 | #ifndef HAVE_GETPAGESIZE |
bc286f95 BE |
6857 | # ifdef HAVE_UNISTD_H |
6858 | # include <unistd.h> | |
6859 | # endif | |
6be7c12c | 6860 | |
252b5132 | 6861 | /* Assume that all systems that can run configure have sys/param.h. */ |
6be7c12c | 6862 | # ifndef HAVE_SYS_PARAM_H |
252b5132 RH |
6863 | # define HAVE_SYS_PARAM_H 1 |
6864 | # endif | |
6865 | ||
6866 | # ifdef _SC_PAGESIZE | |
6867 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
6868 | # else /* no _SC_PAGESIZE */ | |
6be7c12c | 6869 | # ifdef HAVE_SYS_PARAM_H |
252b5132 RH |
6870 | # include <sys/param.h> |
6871 | # ifdef EXEC_PAGESIZE | |
6872 | # define getpagesize() EXEC_PAGESIZE | |
6873 | # else /* no EXEC_PAGESIZE */ | |
6874 | # ifdef NBPG | |
6875 | # define getpagesize() NBPG * CLSIZE | |
6876 | # ifndef CLSIZE | |
6877 | # define CLSIZE 1 | |
6878 | # endif /* no CLSIZE */ | |
6879 | # else /* no NBPG */ | |
6880 | # ifdef NBPC | |
6881 | # define getpagesize() NBPC | |
6882 | # else /* no NBPC */ | |
6883 | # ifdef PAGESIZE | |
6884 | # define getpagesize() PAGESIZE | |
6885 | # endif /* PAGESIZE */ | |
6886 | # endif /* no NBPC */ | |
6887 | # endif /* no NBPG */ | |
6888 | # endif /* no EXEC_PAGESIZE */ | |
6889 | # else /* no HAVE_SYS_PARAM_H */ | |
6890 | # define getpagesize() 8192 /* punt totally */ | |
6891 | # endif /* no HAVE_SYS_PARAM_H */ | |
6892 | # endif /* no _SC_PAGESIZE */ | |
6893 | ||
6894 | #endif /* no HAVE_GETPAGESIZE */ | |
6895 | ||
6be7c12c AO |
6896 | #ifdef __cplusplus |
6897 | extern "C" { void *malloc(unsigned); } | |
6898 | #else | |
6899 | char *malloc(); | |
6900 | #endif | |
6901 | ||
252b5132 | 6902 | int |
6be7c12c | 6903 | main() |
252b5132 | 6904 | { |
6be7c12c AO |
6905 | char *data, *data2, *data3; |
6906 | int i, pagesize; | |
6907 | int fd; | |
6908 | ||
6909 | pagesize = getpagesize(); | |
6910 | ||
6911 | /* | |
6912 | * First, make a file with some known garbage in it. | |
6913 | */ | |
6914 | data = malloc(pagesize); | |
6915 | if (!data) | |
6916 | exit(1); | |
6917 | for (i = 0; i < pagesize; ++i) | |
6918 | *(data + i) = rand(); | |
6919 | umask(0); | |
6920 | fd = creat("conftestmmap", 0600); | |
6921 | if (fd < 0) | |
6922 | exit(1); | |
6923 | if (write(fd, data, pagesize) != pagesize) | |
6924 | exit(1); | |
6925 | close(fd); | |
6926 | ||
6927 | /* | |
6928 | * Next, try to mmap the file at a fixed address which | |
6929 | * already has something else allocated at it. If we can, | |
6930 | * also make sure that we see the same garbage. | |
6931 | */ | |
6932 | fd = open("conftestmmap", O_RDWR); | |
6933 | if (fd < 0) | |
6934 | exit(1); | |
6935 | data2 = malloc(2 * pagesize); | |
6936 | if (!data2) | |
6937 | exit(1); | |
6938 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
6939 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
6940 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
6941 | exit(1); | |
6942 | for (i = 0; i < pagesize; ++i) | |
6943 | if (*(data + i) != *(data2 + i)) | |
6944 | exit(1); | |
6945 | ||
6946 | /* | |
6947 | * Finally, make sure that changes to the mapped area | |
6948 | * do not percolate back to the file as seen by read(). | |
6949 | * (This is a bug on some variants of i386 svr4.0.) | |
6950 | */ | |
6951 | for (i = 0; i < pagesize; ++i) | |
6952 | *(data2 + i) = *(data2 + i) + 1; | |
6953 | data3 = malloc(pagesize); | |
6954 | if (!data3) | |
6955 | exit(1); | |
6956 | if (read(fd, data3, pagesize) != pagesize) | |
6957 | exit(1); | |
6958 | for (i = 0; i < pagesize; ++i) | |
6959 | if (*(data + i) != *(data3 + i)) | |
6960 | exit(1); | |
6961 | close(fd); | |
6962 | unlink("conftestmmap"); | |
6963 | exit(0); | |
252b5132 | 6964 | } |
6be7c12c AO |
6965 | |
6966 | EOF | |
225247f0 | 6967 | if { (eval echo configure:6968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
6be7c12c | 6968 | then |
252b5132 RH |
6969 | ac_cv_func_mmap_fixed_mapped=yes |
6970 | else | |
6be7c12c AO |
6971 | echo "configure: failed program was:" >&5 |
6972 | cat conftest.$ac_ext >&5 | |
6973 | rm -fr conftest* | |
6974 | ac_cv_func_mmap_fixed_mapped=no | |
252b5132 | 6975 | fi |
6be7c12c | 6976 | rm -fr conftest* |
252b5132 | 6977 | fi |
6be7c12c | 6978 | |
252b5132 | 6979 | fi |
b3baf5d0 | 6980 | |
6be7c12c AO |
6981 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 |
6982 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
6983 | cat >> confdefs.h <<\EOF | |
252b5132 RH |
6984 | #define HAVE_MMAP 1 |
6985 | EOF | |
6986 | ||
6987 | fi | |
6988 | ||
6989 | for ac_func in madvise mprotect | |
6990 | do | |
6be7c12c | 6991 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
225247f0 | 6992 | echo "configure:6993: checking for $ac_func" >&5 |
6be7c12c AO |
6993 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6994 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6995 | else | |
6996 | cat > conftest.$ac_ext <<EOF | |
225247f0 | 6997 | #line 6998 "configure" |
252b5132 RH |
6998 | #include "confdefs.h" |
6999 | /* System header to define __stub macros and hopefully few prototypes, | |
6be7c12c | 7000 | which can conflict with char $ac_func(); below. */ |
252b5132 RH |
7001 | #include <assert.h> |
7002 | /* Override any gcc2 internal prototype to avoid an error. */ | |
7003 | /* We use char because int might match the return type of a gcc2 | |
6be7c12c AO |
7004 | builtin and then its argument prototype would still apply. */ |
7005 | char $ac_func(); | |
7006 | ||
7007 | int main() { | |
252b5132 RH |
7008 | |
7009 | /* The GNU C library defines this for functions which it implements | |
7010 | to always fail with ENOSYS. Some functions are actually named | |
7011 | something starting with __ and the normal name is an alias. */ | |
7012 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
7013 | choke me | |
7014 | #else | |
6be7c12c | 7015 | $ac_func(); |
252b5132 RH |
7016 | #endif |
7017 | ||
6be7c12c | 7018 | ; return 0; } |
252b5132 | 7019 | EOF |
225247f0 | 7020 | if { (eval echo configure:7021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
6be7c12c AO |
7021 | rm -rf conftest* |
7022 | eval "ac_cv_func_$ac_func=yes" | |
7023 | else | |
7024 | echo "configure: failed program was:" >&5 | |
7025 | cat conftest.$ac_ext >&5 | |
7026 | rm -rf conftest* | |
7027 | eval "ac_cv_func_$ac_func=no" | |
7028 | fi | |
7029 | rm -f conftest* | |
7030 | fi | |
252b5132 | 7031 | |
6be7c12c AO |
7032 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
7033 | echo "$ac_t""yes" 1>&6 | |
7034 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
7035 | cat >> confdefs.h <<EOF | |
7036 | #define $ac_tr_func 1 | |
7037 | EOF | |
7038 | ||
7039 | else | |
7040 | echo "$ac_t""no" 1>&6 | |
252b5132 RH |
7041 | fi |
7042 | done | |
7043 | ||
7044 | case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in | |
6be7c12c | 7045 | true+yes ) cat >> confdefs.h <<\EOF |
252b5132 RH |
7046 | #define USE_MMAP 1 |
7047 | EOF | |
7048 | ;; | |
7049 | esac | |
7050 | ||
7051 | rm -f doc/config.status | |
6be7c12c AO |
7052 | trap '' 1 2 15 |
7053 | cat > confcache <<\EOF | |
252b5132 RH |
7054 | # This file is a shell script that caches the results of configure |
7055 | # tests run on this system so they can be shared between configure | |
6be7c12c AO |
7056 | # scripts and configure runs. It is not useful on other systems. |
7057 | # If it contains results you don't want to keep, you may remove or edit it. | |
252b5132 | 7058 | # |
6be7c12c AO |
7059 | # By default, configure uses ./config.cache as the cache file, |
7060 | # creating it if it does not exist already. You can give configure | |
7061 | # the --cache-file=FILE option to use a different cache file; that is | |
7062 | # what configure does when it calls configure scripts in | |
7063 | # subdirectories, so they share the cache. | |
7064 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
7065 | # config.status only pays attention to the cache file if you give it the | |
7066 | # --recheck option to rerun configure. | |
252b5132 | 7067 | # |
6be7c12c | 7068 | EOF |
252b5132 RH |
7069 | # The following way of writing the cache mishandles newlines in values, |
7070 | # but we know of no workaround that is simple, portable, and efficient. | |
7071 | # So, don't put newlines in cache variables' values. | |
7072 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
7073 | # and sets the high bit in the cache file unless we assign to the vars. | |
6be7c12c AO |
7074 | (set) 2>&1 | |
7075 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
7076 | *ac_space=\ *) | |
7077 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
7078 | # turns \\\\ into \\, and sed turns \\ into \). | |
7079 | sed -n \ | |
7080 | -e "s/'/'\\\\''/g" \ | |
7081 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
7082 | ;; | |
7083 | *) | |
7084 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
7085 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
7086 | ;; | |
7087 | esac >> confcache | |
7088 | if cmp -s $cache_file confcache; then | |
7089 | : | |
7090 | else | |
252b5132 | 7091 | if test -w $cache_file; then |
6be7c12c AO |
7092 | echo "updating cache $cache_file" |
7093 | cat confcache > $cache_file | |
252b5132 RH |
7094 | else |
7095 | echo "not updating unwritable cache $cache_file" | |
7096 | fi | |
7097 | fi | |
7098 | rm -f confcache | |
7099 | ||
6be7c12c AO |
7100 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
7101 | ||
252b5132 RH |
7102 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
7103 | # Let make expand exec_prefix. | |
7104 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7105 | ||
6be7c12c AO |
7106 | # Any assignment to VPATH causes Sun make to only execute |
7107 | # the first set of double-colon rules, so remove it if not needed. | |
7108 | # If there is a colon in the path, we need to keep it. | |
252b5132 | 7109 | if test "x$srcdir" = x.; then |
6be7c12c | 7110 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
252b5132 RH |
7111 | fi |
7112 | ||
6be7c12c AO |
7113 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
7114 | ||
252b5132 RH |
7115 | DEFS=-DHAVE_CONFIG_H |
7116 | ||
6be7c12c | 7117 | # Without the "./", some shells look in PATH for config.status. |
252b5132 | 7118 | : ${CONFIG_STATUS=./config.status} |
6be7c12c AO |
7119 | |
7120 | echo creating $CONFIG_STATUS | |
7121 | rm -f $CONFIG_STATUS | |
7122 | cat > $CONFIG_STATUS <<EOF | |
7123 | #! /bin/sh | |
252b5132 RH |
7124 | # Generated automatically by configure. |
7125 | # Run this file to recreate the current configuration. | |
6be7c12c AO |
7126 | # This directory was configured as follows, |
7127 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
7128 | # | |
7129 | # $0 $ac_configure_args | |
7130 | # | |
252b5132 | 7131 | # Compiler output produced by configure, useful for debugging |
6be7c12c | 7132 | # configure, is in ./config.log if it exists. |
b3baf5d0 | 7133 | |
6be7c12c AO |
7134 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
7135 | for ac_option | |
252b5132 | 7136 | do |
6be7c12c | 7137 | case "\$ac_option" in |
252b5132 | 7138 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
6be7c12c AO |
7139 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" |
7140 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
7141 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
7142 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
7143 | exit 0 ;; | |
7144 | -help | --help | --hel | --he | --h) | |
7145 | echo "\$ac_cs_usage"; exit 0 ;; | |
7146 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
252b5132 RH |
7147 | esac |
7148 | done | |
7149 | ||
6be7c12c AO |
7150 | ac_given_srcdir=$srcdir |
7151 | ac_given_INSTALL="$INSTALL" | |
b3baf5d0 | 7152 | |
bc286f95 | 7153 | 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 |
b3baf5d0 | 7154 | EOF |
6be7c12c | 7155 | cat >> $CONFIG_STATUS <<EOF |
b3baf5d0 | 7156 | |
6be7c12c AO |
7157 | # Protect against being on the right side of a sed subst in config.status. |
7158 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
7159 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
7160 | $ac_vpsub | |
7161 | $extrasub | |
7162 | s%@SHELL@%$SHELL%g | |
7163 | s%@CFLAGS@%$CFLAGS%g | |
7164 | s%@CPPFLAGS@%$CPPFLAGS%g | |
7165 | s%@CXXFLAGS@%$CXXFLAGS%g | |
7166 | s%@FFLAGS@%$FFLAGS%g | |
7167 | s%@DEFS@%$DEFS%g | |
7168 | s%@LDFLAGS@%$LDFLAGS%g | |
7169 | s%@LIBS@%$LIBS%g | |
7170 | s%@exec_prefix@%$exec_prefix%g | |
7171 | s%@prefix@%$prefix%g | |
7172 | s%@program_transform_name@%$program_transform_name%g | |
7173 | s%@bindir@%$bindir%g | |
7174 | s%@sbindir@%$sbindir%g | |
7175 | s%@libexecdir@%$libexecdir%g | |
7176 | s%@datadir@%$datadir%g | |
7177 | s%@sysconfdir@%$sysconfdir%g | |
7178 | s%@sharedstatedir@%$sharedstatedir%g | |
7179 | s%@localstatedir@%$localstatedir%g | |
7180 | s%@libdir@%$libdir%g | |
7181 | s%@includedir@%$includedir%g | |
7182 | s%@oldincludedir@%$oldincludedir%g | |
7183 | s%@infodir@%$infodir%g | |
7184 | s%@mandir@%$mandir%g | |
7185 | s%@host@%$host%g | |
7186 | s%@host_alias@%$host_alias%g | |
7187 | s%@host_cpu@%$host_cpu%g | |
7188 | s%@host_vendor@%$host_vendor%g | |
7189 | s%@host_os@%$host_os%g | |
7190 | s%@target@%$target%g | |
7191 | s%@target_alias@%$target_alias%g | |
7192 | s%@target_cpu@%$target_cpu%g | |
7193 | s%@target_vendor@%$target_vendor%g | |
7194 | s%@target_os@%$target_os%g | |
7195 | s%@build@%$build%g | |
7196 | s%@build_alias@%$build_alias%g | |
7197 | s%@build_cpu@%$build_cpu%g | |
7198 | s%@build_vendor@%$build_vendor%g | |
7199 | s%@build_os@%$build_os%g | |
6be7c12c AO |
7200 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
7201 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
7202 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
7203 | s%@PACKAGE@%$PACKAGE%g | |
7204 | s%@VERSION@%$VERSION%g | |
7205 | s%@ACLOCAL@%$ACLOCAL%g | |
7206 | s%@AUTOCONF@%$AUTOCONF%g | |
7207 | s%@AUTOMAKE@%$AUTOMAKE%g | |
7208 | s%@AUTOHEADER@%$AUTOHEADER%g | |
7209 | s%@MAKEINFO@%$MAKEINFO%g | |
7210 | s%@SET_MAKE@%$SET_MAKE%g | |
7211 | s%@AR@%$AR%g | |
7212 | s%@RANLIB@%$RANLIB%g | |
c5d1701e | 7213 | s%@CC@%$CC%g |
6be7c12c AO |
7214 | s%@LN_S@%$LN_S%g |
7215 | s%@OBJEXT@%$OBJEXT%g | |
7216 | s%@EXEEXT@%$EXEEXT%g | |
7217 | s%@STRIP@%$STRIP%g | |
7218 | s%@LIBTOOL@%$LIBTOOL%g | |
7219 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g | |
7220 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g | |
7221 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
7222 | s%@MAINT@%$MAINT%g | |
a703a6ea AM |
7223 | s%@INSTALL_LIBBFD_TRUE@%$INSTALL_LIBBFD_TRUE%g |
7224 | s%@INSTALL_LIBBFD_FALSE@%$INSTALL_LIBBFD_FALSE%g | |
7225 | s%@bfdlibdir@%$bfdlibdir%g | |
7226 | s%@bfdincludedir@%$bfdincludedir%g | |
6be7c12c AO |
7227 | s%@CPP@%$CPP%g |
7228 | s%@ALLOCA@%$ALLOCA%g | |
7229 | s%@USE_NLS@%$USE_NLS%g | |
7230 | s%@MSGFMT@%$MSGFMT%g | |
7231 | s%@GMSGFMT@%$GMSGFMT%g | |
7232 | s%@XGETTEXT@%$XGETTEXT%g | |
7233 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
7234 | s%@CATALOGS@%$CATALOGS%g | |
7235 | s%@CATOBJEXT@%$CATOBJEXT%g | |
7236 | s%@DATADIRNAME@%$DATADIRNAME%g | |
7237 | s%@GMOFILES@%$GMOFILES%g | |
7238 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
7239 | s%@INTLDEPS@%$INTLDEPS%g | |
7240 | s%@INTLLIBS@%$INTLLIBS%g | |
7241 | s%@INTLOBJS@%$INTLOBJS%g | |
7242 | s%@POFILES@%$POFILES%g | |
7243 | s%@POSUB@%$POSUB%g | |
7244 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
7245 | s%@GT_NO@%$GT_NO%g | |
7246 | s%@GT_YES@%$GT_YES%g | |
7247 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
7248 | s%@l@%$l%g | |
7249 | s%@HDEFINES@%$HDEFINES%g | |
7250 | s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g | |
ec317fb1 | 7251 | s%@BFD_HOST_LONG_LONG@%$BFD_HOST_LONG_LONG%g |
6be7c12c AO |
7252 | s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g |
7253 | s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g | |
7254 | s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g | |
7255 | s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g | |
7256 | s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g | |
7257 | s%@COREFILE@%$COREFILE%g | |
7258 | s%@COREFLAG@%$COREFLAG%g | |
7259 | s%@WIN32LDFLAGS@%$WIN32LDFLAGS%g | |
7260 | s%@WIN32LIBADD@%$WIN32LIBADD%g | |
7261 | s%@TDEFINES@%$TDEFINES%g | |
7262 | s%@wordsize@%$wordsize%g | |
2858ef35 | 7263 | s%@bfd_libs@%$bfd_libs%g |
6be7c12c AO |
7264 | s%@all_backends@%$all_backends%g |
7265 | s%@bfd_backends@%$bfd_backends%g | |
7266 | s%@bfd_machines@%$bfd_machines%g | |
69263e90 | 7267 | s%@bfd_default_target_size@%$bfd_default_target_size%g |
1012372a AC |
7268 | s%@bfd_file_ptr@%$bfd_file_ptr%g |
7269 | s%@bfd_ufile_ptr@%$bfd_ufile_ptr%g | |
6be7c12c | 7270 | s%@tdefaults@%$tdefaults%g |
b3baf5d0 | 7271 | |
252b5132 RH |
7272 | CEOF |
7273 | EOF | |
7274 | ||
6be7c12c AO |
7275 | cat >> $CONFIG_STATUS <<\EOF |
7276 | ||
7277 | # Split the substitutions into bite-sized pieces for seds with | |
7278 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
dc810e39 | 7279 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
6be7c12c AO |
7280 | ac_file=1 # Number of current file. |
7281 | ac_beg=1 # First line for current file. | |
7282 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
7283 | ac_more_lines=: | |
7284 | ac_sed_cmds="" | |
7285 | while $ac_more_lines; do | |
7286 | if test $ac_beg -gt 1; then | |
7287 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
7288 | else | |
7289 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
7290 | fi | |
7291 | if test ! -s conftest.s$ac_file; then | |
7292 | ac_more_lines=false | |
7293 | rm -f conftest.s$ac_file | |
7294 | else | |
7295 | if test -z "$ac_sed_cmds"; then | |
7296 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
252b5132 | 7297 | else |
6be7c12c | 7298 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
252b5132 | 7299 | fi |
6be7c12c AO |
7300 | ac_file=`expr $ac_file + 1` |
7301 | ac_beg=$ac_end | |
7302 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
252b5132 | 7303 | fi |
6be7c12c AO |
7304 | done |
7305 | if test -z "$ac_sed_cmds"; then | |
7306 | ac_sed_cmds=cat | |
7307 | fi | |
7308 | EOF | |
7309 | ||
7310 | cat >> $CONFIG_STATUS <<EOF | |
252b5132 | 7311 | |
bc286f95 | 7312 | CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in"} |
252b5132 | 7313 | EOF |
6be7c12c AO |
7314 | cat >> $CONFIG_STATUS <<\EOF |
7315 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
252b5132 | 7316 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
6be7c12c AO |
7317 | case "$ac_file" in |
7318 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
7319 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
7320 | *) ac_file_in="${ac_file}.in" ;; | |
252b5132 RH |
7321 | esac |
7322 | ||
6be7c12c | 7323 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
b3baf5d0 | 7324 | |
6be7c12c AO |
7325 | # Remove last slash and all that follows it. Not all systems have dirname. |
7326 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
7327 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
7328 | # The file is in a subdirectory. | |
7329 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
7330 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
252b5132 | 7331 | # A "../" for each directory in $ac_dir_suffix. |
6be7c12c | 7332 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` |
252b5132 RH |
7333 | else |
7334 | ac_dir_suffix= ac_dots= | |
7335 | fi | |
7336 | ||
6be7c12c AO |
7337 | case "$ac_given_srcdir" in |
7338 | .) srcdir=. | |
7339 | if test -z "$ac_dots"; then top_srcdir=. | |
7340 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
7341 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
252b5132 | 7342 | *) # Relative path. |
6be7c12c AO |
7343 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
7344 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
252b5132 RH |
7345 | esac |
7346 | ||
6be7c12c AO |
7347 | case "$ac_given_INSTALL" in |
7348 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
7349 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
252b5132 RH |
7350 | esac |
7351 | ||
6be7c12c AO |
7352 | echo creating "$ac_file" |
7353 | rm -f "$ac_file" | |
7354 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
7355 | case "$ac_file" in | |
7356 | *Makefile*) ac_comsub="1i\\ | |
7357 | # $configure_input" ;; | |
7358 | *) ac_comsub= ;; | |
7359 | esac | |
252b5132 | 7360 | |
6be7c12c AO |
7361 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
7362 | sed -e "$ac_comsub | |
7363 | s%@configure_input@%$configure_input%g | |
7364 | s%@srcdir@%$srcdir%g | |
7365 | s%@top_srcdir@%$top_srcdir%g | |
7366 | s%@INSTALL@%$INSTALL%g | |
7367 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
7368 | fi; done | |
7369 | rm -f conftest.s* | |
252b5132 RH |
7370 | |
7371 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
7372 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
7373 | # | |
7374 | # ac_d sets the value in "#define NAME VALUE" lines. | |
6be7c12c AO |
7375 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
7376 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
7377 | ac_dC='\3' | |
7378 | ac_dD='%g' | |
7379 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
7380 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
7381 | ac_uB='\([ ]\)%\1#\2define\3' | |
252b5132 | 7382 | ac_uC=' ' |
6be7c12c AO |
7383 | ac_uD='\4%g' |
7384 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
7385 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
7386 | ac_eB='$%\1#\2define\3' | |
7387 | ac_eC=' ' | |
7388 | ac_eD='%g' | |
7389 | ||
7390 | if test "${CONFIG_HEADERS+set}" != set; then | |
7391 | EOF | |
7392 | cat >> $CONFIG_STATUS <<EOF | |
7393 | CONFIG_HEADERS="config.h:config.in" | |
7394 | EOF | |
7395 | cat >> $CONFIG_STATUS <<\EOF | |
7396 | fi | |
7397 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
252b5132 | 7398 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
6be7c12c AO |
7399 | case "$ac_file" in |
7400 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
7401 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
7402 | *) ac_file_in="${ac_file}.in" ;; | |
252b5132 RH |
7403 | esac |
7404 | ||
6be7c12c AO |
7405 | echo creating $ac_file |
7406 | ||
7407 | rm -f conftest.frag conftest.in conftest.out | |
7408 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
7409 | cat $ac_file_inputs > conftest.in | |
7410 | ||
7411 | EOF | |
7412 | ||
7413 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
7414 | # the proper values into config.h.in to produce config.h. And first: | |
7415 | # Protect against being on the right side of a sed subst in config.status. | |
7416 | # Protect against being in an unquoted here document in config.status. | |
7417 | rm -f conftest.vals | |
7418 | cat > conftest.hdr <<\EOF | |
7419 | s/[\\&%]/\\&/g | |
7420 | s%[\\$`]%\\&%g | |
7421 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
7422 | s%ac_d%ac_u%gp | |
7423 | s%ac_u%ac_e%gp | |
7424 | EOF | |
7425 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
7426 | rm -f conftest.hdr | |
252b5132 RH |
7427 | |
7428 | # This sed command replaces #undef with comments. This is necessary, for | |
7429 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
7430 | # on some systems where configure will not decide to define it. | |
6be7c12c AO |
7431 | cat >> conftest.vals <<\EOF |
7432 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
252b5132 RH |
7433 | EOF |
7434 | ||
6be7c12c AO |
7435 | # Break up conftest.vals because some shells have a limit on |
7436 | # the size of here documents, and old seds have small limits too. | |
252b5132 RH |
7437 | |
7438 | rm -f conftest.tail | |
6be7c12c | 7439 | while : |
252b5132 | 7440 | do |
6be7c12c AO |
7441 | ac_lines=`grep -c . conftest.vals` |
7442 | # grep -c gives empty output for an empty file on some AIX systems. | |
7443 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
7444 | # Write a limited-size here document to conftest.frag. | |
7445 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
7446 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
252b5132 | 7447 | echo 'CEOF |
6be7c12c AO |
7448 | sed -f conftest.frag conftest.in > conftest.out |
7449 | rm -f conftest.in | |
7450 | mv conftest.out conftest.in | |
7451 | ' >> $CONFIG_STATUS | |
7452 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
7453 | rm -f conftest.vals | |
7454 | mv conftest.tail conftest.vals | |
252b5132 | 7455 | done |
6be7c12c AO |
7456 | rm -f conftest.vals |
7457 | ||
7458 | cat >> $CONFIG_STATUS <<\EOF | |
7459 | rm -f conftest.frag conftest.h | |
7460 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
7461 | cat conftest.in >> conftest.h | |
7462 | rm -f conftest.in | |
7463 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
7464 | echo "$ac_file is unchanged" | |
7465 | rm -f conftest.h | |
252b5132 | 7466 | else |
6be7c12c AO |
7467 | # Remove last slash and all that follows it. Not all systems have dirname. |
7468 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
252b5132 | 7469 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
6be7c12c AO |
7470 | # The file is in a subdirectory. |
7471 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
252b5132 | 7472 | fi |
6be7c12c AO |
7473 | rm -f $ac_file |
7474 | mv conftest.h $ac_file | |
252b5132 | 7475 | fi |
6be7c12c | 7476 | fi; done |
252b5132 RH |
7477 | |
7478 | EOF | |
6be7c12c | 7479 | cat >> $CONFIG_STATUS <<EOF |
b3baf5d0 | 7480 | |
b3baf5d0 | 7481 | |
6be7c12c AO |
7482 | EOF |
7483 | cat >> $CONFIG_STATUS <<\EOF | |
7484 | test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h | |
7485 | sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile | |
7486 | exit 0 | |
252b5132 RH |
7487 | EOF |
7488 | chmod +x $CONFIG_STATUS | |
6be7c12c AO |
7489 | rm -fr confdefs* $ac_clean_files |
7490 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
252b5132 | 7491 | |
55c80943 | 7492 |