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