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