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