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