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