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