Commit | Line | Data |
---|---|---|
c632873c C |
1 | #! /bin/sh |
2 | ||
92f91d1f AC |
3 | |
4 | ||
5 | ||
6 | ||
7 | ||
8 | ||
9 | ||
10 | ||
11 | ||
12 | ||
13 | ||
14 | ||
15 | ||
16 | ||
17 | ||
18 | ||
19 | ||
20 | ||
21 | ||
22 | ||
23 | ||
24 | ||
25 | ||
26 | ||
27 | ||
28 | ||
29 | ||
30 | ||
31 | ||
32 | ||
33 | ||
34 | ||
35 | ||
36 | ||
37 | ||
38 | ||
39 | ||
40 | ||
41 | ||
42 | ||
43 | ||
44 | ||
b1df34b9 | 45 | sim_inline="-DDEFAULT_INLINE=0" |
92f91d1f AC |
46 | |
47 | ||
48 | ||
49 | ||
50 | ||
51 | ||
52 | ||
53 | ||
54 | ||
55 | ||
56 | ||
57 | ||
58 | ||
59 | ||
462cfbc4 DE |
60 | |
61 | ||
62 | ||
63 | ||
64 | ||
65 | ||
66 | ||
67 | ||
68 | ||
92f91d1f AC |
69 | |
70 | ||
71 | ||
72 | ||
73 | ||
74 | ||
75 | ||
b1df34b9 TT |
76 | |
77 | ||
78 | ||
79 | ||
80 | ||
81 | # This file is derived from `gettext.m4'. The difference is that the | |
82 | # included macros assume Cygnus-style source and build trees. | |
83 | ||
84 | # Macro to add for using GNU gettext. | |
85 | # Ulrich Drepper <drepper@cygnus.com>, 1995. | |
86 | # | |
87 | # This file file be copied and used freely without restrictions. It can | |
88 | # be used in projects which are not available under the GNU Public License | |
89 | # but which still want to provide support for the GNU gettext functionality. | |
90 | # Please note that the actual code is *not* freely available. | |
91 | ||
92 | # serial 3 | |
93 | ||
94 | ||
95 | ||
96 | ||
97 | ||
98 | # Search path for a program which passes the given test. | |
99 | # Ulrich Drepper <drepper@cygnus.com>, 1996. | |
100 | # | |
101 | # This file file be copied and used freely without restrictions. It can | |
102 | # be used in projects which are not available under the GNU Public License | |
103 | # but which still want to provide support for the GNU gettext functionality. | |
104 | # Please note that the actual code is *not* freely available. | |
105 | ||
106 | # serial 1 | |
107 | ||
108 | ||
109 | ||
110 | # Check whether LC_MESSAGES is available in <locale.h>. | |
111 | # Ulrich Drepper <drepper@cygnus.com>, 1995. | |
112 | # | |
113 | # This file file be copied and used freely without restrictions. It can | |
114 | # be used in projects which are not available under the GNU Public License | |
115 | # but which still want to provide support for the GNU gettext functionality. | |
116 | # Please note that the actual code is *not* freely available. | |
117 | ||
118 | # serial 1 | |
92f91d1f AC |
119 | |
120 | ||
121 | ||
c632873c | 122 | # Guess values for system-dependent variables and create Makefiles. |
462cfbc4 | 123 | # Generated automatically using autoconf version 2.12.1 |
295dbbe4 | 124 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
c632873c C |
125 | # |
126 | # This configure script is free software; the Free Software Foundation | |
127 | # gives unlimited permission to copy, distribute and modify it. | |
128 | ||
129 | # Defaults: | |
130 | ac_help= | |
131 | ac_default_prefix=/usr/local | |
132 | # Any additions from configure.in: | |
b1df34b9 TT |
133 | ac_help="$ac_help |
134 | --disable-nls do not use Native Language Support" | |
135 | ac_help="$ac_help | |
136 | --with-included-gettext use the GNU gettext library included here" | |
462cfbc4 DE |
137 | ac_help="$ac_help |
138 | --enable-maintainer-mode Enable developer functionality." | |
601fb8ae MM |
139 | ac_help="$ac_help |
140 | --enable-sim-bswap Use Host specific BSWAP instruction." | |
295dbbe4 SG |
141 | ac_help="$ac_help |
142 | --enable-sim-cflags=opts Extra CFLAGS for use in building simulator" | |
143 | ac_help="$ac_help | |
144 | --enable-sim-debug=opts Enable debugging flags" | |
a35e91c3 AC |
145 | ac_help="$ac_help |
146 | --enable-sim-stdio Specify whether to use stdio for console input/output." | |
295dbbe4 SG |
147 | ac_help="$ac_help |
148 | --enable-sim-trace=opts Enable tracing flags" | |
6fea4763 DE |
149 | ac_help="$ac_help |
150 | --enable-sim-profile=opts Enable profiling flags" | |
c632873c C |
151 | |
152 | # Initialize some variables set by options. | |
153 | # The variables have the same names as the options, with | |
154 | # dashes changed to underlines. | |
155 | build=NONE | |
156 | cache_file=./config.cache | |
157 | exec_prefix=NONE | |
158 | host=NONE | |
159 | no_create= | |
160 | nonopt=NONE | |
161 | no_recursion= | |
162 | prefix=NONE | |
163 | program_prefix=NONE | |
164 | program_suffix=NONE | |
165 | program_transform_name=s,x,x, | |
166 | silent= | |
167 | site= | |
168 | srcdir= | |
169 | target=NONE | |
170 | verbose= | |
171 | x_includes=NONE | |
172 | x_libraries=NONE | |
173 | bindir='${exec_prefix}/bin' | |
174 | sbindir='${exec_prefix}/sbin' | |
175 | libexecdir='${exec_prefix}/libexec' | |
176 | datadir='${prefix}/share' | |
177 | sysconfdir='${prefix}/etc' | |
178 | sharedstatedir='${prefix}/com' | |
179 | localstatedir='${prefix}/var' | |
180 | libdir='${exec_prefix}/lib' | |
181 | includedir='${prefix}/include' | |
182 | oldincludedir='/usr/include' | |
183 | infodir='${prefix}/info' | |
184 | mandir='${prefix}/man' | |
185 | ||
186 | # Initialize some other variables. | |
187 | subdirs= | |
295dbbe4 | 188 | MFLAGS= MAKEFLAGS= |
462cfbc4 | 189 | SHELL=${CONFIG_SHELL-/bin/sh} |
6fea4763 DE |
190 | # Maximum number of lines to put in a shell here document. |
191 | ac_max_here_lines=12 | |
c632873c C |
192 | |
193 | ac_prev= | |
194 | for ac_option | |
195 | do | |
196 | ||
197 | # If the previous option needs an argument, assign it. | |
198 | if test -n "$ac_prev"; then | |
199 | eval "$ac_prev=\$ac_option" | |
200 | ac_prev= | |
201 | continue | |
202 | fi | |
203 | ||
204 | case "$ac_option" in | |
205 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
206 | *) ac_optarg= ;; | |
207 | esac | |
208 | ||
209 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
210 | ||
211 | case "$ac_option" in | |
212 | ||
213 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
214 | ac_prev=bindir ;; | |
215 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
216 | bindir="$ac_optarg" ;; | |
217 | ||
218 | -build | --build | --buil | --bui | --bu) | |
219 | ac_prev=build ;; | |
220 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
221 | build="$ac_optarg" ;; | |
222 | ||
223 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
224 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
225 | ac_prev=cache_file ;; | |
226 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
227 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
228 | cache_file="$ac_optarg" ;; | |
229 | ||
230 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
231 | ac_prev=datadir ;; | |
232 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
233 | | --da=*) | |
234 | datadir="$ac_optarg" ;; | |
235 | ||
236 | -disable-* | --disable-*) | |
237 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
238 | # Reject names that are not valid shell variable names. | |
239 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
240 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
241 | fi | |
242 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
243 | eval "enable_${ac_feature}=no" ;; | |
244 | ||
245 | -enable-* | --enable-*) | |
246 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
247 | # Reject names that are not valid shell variable names. | |
248 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
249 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
250 | fi | |
251 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
252 | case "$ac_option" in | |
253 | *=*) ;; | |
254 | *) ac_optarg=yes ;; | |
255 | esac | |
256 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
257 | ||
258 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
259 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
260 | | --exec | --exe | --ex) | |
261 | ac_prev=exec_prefix ;; | |
262 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
263 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
264 | | --exec=* | --exe=* | --ex=*) | |
265 | exec_prefix="$ac_optarg" ;; | |
266 | ||
267 | -gas | --gas | --ga | --g) | |
268 | # Obsolete; use --with-gas. | |
269 | with_gas=yes ;; | |
270 | ||
271 | -help | --help | --hel | --he) | |
272 | # Omit some internal or obsolete options to make the list less imposing. | |
273 | # This message is too long to be a string in the A/UX 3.1 sh. | |
274 | cat << EOF | |
275 | Usage: configure [options] [host] | |
276 | Options: [defaults in brackets after descriptions] | |
277 | Configuration: | |
278 | --cache-file=FILE cache test results in FILE | |
279 | --help print this message | |
280 | --no-create do not create output files | |
281 | --quiet, --silent do not print \`checking...' messages | |
282 | --version print the version of autoconf that created configure | |
283 | Directory and file names: | |
284 | --prefix=PREFIX install architecture-independent files in PREFIX | |
285 | [$ac_default_prefix] | |
286 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
287 | [same as prefix] | |
288 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
289 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
290 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
295dbbe4 SG |
291 | --datadir=DIR read-only architecture-independent data in DIR |
292 | [PREFIX/share] | |
c632873c | 293 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] |
295dbbe4 SG |
294 | --sharedstatedir=DIR modifiable architecture-independent data in DIR |
295 | [PREFIX/com] | |
c632873c C |
296 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] |
297 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
298 | --includedir=DIR C header files in DIR [PREFIX/include] | |
299 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
300 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
301 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
302 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
303 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
304 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
295dbbe4 SG |
305 | --program-transform-name=PROGRAM |
306 | run sed PROGRAM on installed program names | |
c632873c C |
307 | EOF |
308 | cat << EOF | |
309 | Host type: | |
310 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
311 | --host=HOST configure for HOST [guessed] | |
312 | --target=TARGET configure for TARGET [TARGET=HOST] | |
313 | Features and packages: | |
314 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
315 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
316 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
317 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
318 | --x-includes=DIR X include files are in DIR | |
319 | --x-libraries=DIR X library files are in DIR | |
c632873c | 320 | EOF |
295dbbe4 SG |
321 | if test -n "$ac_help"; then |
322 | echo "--enable and --with options recognized:$ac_help" | |
323 | fi | |
c632873c C |
324 | exit 0 ;; |
325 | ||
326 | -host | --host | --hos | --ho) | |
327 | ac_prev=host ;; | |
328 | -host=* | --host=* | --hos=* | --ho=*) | |
329 | host="$ac_optarg" ;; | |
330 | ||
331 | -includedir | --includedir | --includedi | --included | --include \ | |
332 | | --includ | --inclu | --incl | --inc) | |
333 | ac_prev=includedir ;; | |
334 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
335 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
336 | includedir="$ac_optarg" ;; | |
337 | ||
338 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
339 | ac_prev=infodir ;; | |
340 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
341 | infodir="$ac_optarg" ;; | |
342 | ||
343 | -libdir | --libdir | --libdi | --libd) | |
344 | ac_prev=libdir ;; | |
345 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
346 | libdir="$ac_optarg" ;; | |
347 | ||
348 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
349 | | --libexe | --libex | --libe) | |
350 | ac_prev=libexecdir ;; | |
351 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
352 | | --libexe=* | --libex=* | --libe=*) | |
353 | libexecdir="$ac_optarg" ;; | |
354 | ||
355 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
356 | | --localstate | --localstat | --localsta | --localst \ | |
357 | | --locals | --local | --loca | --loc | --lo) | |
358 | ac_prev=localstatedir ;; | |
359 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
360 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
361 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
362 | localstatedir="$ac_optarg" ;; | |
363 | ||
364 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
365 | ac_prev=mandir ;; | |
366 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
367 | mandir="$ac_optarg" ;; | |
368 | ||
369 | -nfp | --nfp | --nf) | |
370 | # Obsolete; use --without-fp. | |
371 | with_fp=no ;; | |
372 | ||
373 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
374 | | --no-cr | --no-c) | |
375 | no_create=yes ;; | |
376 | ||
377 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
378 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
379 | no_recursion=yes ;; | |
380 | ||
381 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
382 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
383 | | --oldin | --oldi | --old | --ol | --o) | |
384 | ac_prev=oldincludedir ;; | |
385 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
386 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
387 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
388 | oldincludedir="$ac_optarg" ;; | |
389 | ||
390 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
391 | ac_prev=prefix ;; | |
392 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
393 | prefix="$ac_optarg" ;; | |
394 | ||
395 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
396 | | --program-pre | --program-pr | --program-p) | |
397 | ac_prev=program_prefix ;; | |
398 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
399 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
400 | program_prefix="$ac_optarg" ;; | |
401 | ||
402 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
403 | | --program-suf | --program-su | --program-s) | |
404 | ac_prev=program_suffix ;; | |
405 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
406 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
407 | program_suffix="$ac_optarg" ;; | |
408 | ||
409 | -program-transform-name | --program-transform-name \ | |
410 | | --program-transform-nam | --program-transform-na \ | |
411 | | --program-transform-n | --program-transform- \ | |
412 | | --program-transform | --program-transfor \ | |
413 | | --program-transfo | --program-transf \ | |
414 | | --program-trans | --program-tran \ | |
415 | | --progr-tra | --program-tr | --program-t) | |
416 | ac_prev=program_transform_name ;; | |
417 | -program-transform-name=* | --program-transform-name=* \ | |
418 | | --program-transform-nam=* | --program-transform-na=* \ | |
419 | | --program-transform-n=* | --program-transform-=* \ | |
420 | | --program-transform=* | --program-transfor=* \ | |
421 | | --program-transfo=* | --program-transf=* \ | |
422 | | --program-trans=* | --program-tran=* \ | |
423 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
424 | program_transform_name="$ac_optarg" ;; | |
425 | ||
426 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
427 | | -silent | --silent | --silen | --sile | --sil) | |
428 | silent=yes ;; | |
429 | ||
430 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
431 | ac_prev=sbindir ;; | |
432 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
433 | | --sbi=* | --sb=*) | |
434 | sbindir="$ac_optarg" ;; | |
435 | ||
436 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
437 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
438 | | --sharedst | --shareds | --shared | --share | --shar \ | |
439 | | --sha | --sh) | |
440 | ac_prev=sharedstatedir ;; | |
441 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
442 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
443 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
444 | | --sha=* | --sh=*) | |
445 | sharedstatedir="$ac_optarg" ;; | |
446 | ||
447 | -site | --site | --sit) | |
448 | ac_prev=site ;; | |
449 | -site=* | --site=* | --sit=*) | |
450 | site="$ac_optarg" ;; | |
451 | ||
452 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
453 | ac_prev=srcdir ;; | |
454 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
455 | srcdir="$ac_optarg" ;; | |
456 | ||
457 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
458 | | --syscon | --sysco | --sysc | --sys | --sy) | |
459 | ac_prev=sysconfdir ;; | |
460 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
461 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
462 | sysconfdir="$ac_optarg" ;; | |
463 | ||
464 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
465 | ac_prev=target ;; | |
466 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
467 | target="$ac_optarg" ;; | |
468 | ||
469 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
470 | verbose=yes ;; | |
471 | ||
472 | -version | --version | --versio | --versi | --vers) | |
462cfbc4 | 473 | echo "configure generated by autoconf version 2.12.1" |
c632873c C |
474 | exit 0 ;; |
475 | ||
476 | -with-* | --with-*) | |
477 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
478 | # Reject names that are not valid shell variable names. | |
479 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
480 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
481 | fi | |
482 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
483 | case "$ac_option" in | |
484 | *=*) ;; | |
485 | *) ac_optarg=yes ;; | |
486 | esac | |
487 | eval "with_${ac_package}='$ac_optarg'" ;; | |
488 | ||
489 | -without-* | --without-*) | |
490 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
491 | # Reject names that are not valid shell variable names. | |
492 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
493 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
494 | fi | |
495 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
496 | eval "with_${ac_package}=no" ;; | |
497 | ||
498 | --x) | |
499 | # Obsolete; use --with-x. | |
500 | with_x=yes ;; | |
501 | ||
502 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
503 | | --x-incl | --x-inc | --x-in | --x-i) | |
504 | ac_prev=x_includes ;; | |
505 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
506 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
507 | x_includes="$ac_optarg" ;; | |
508 | ||
509 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
510 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
511 | ac_prev=x_libraries ;; | |
512 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
513 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
514 | x_libraries="$ac_optarg" ;; | |
515 | ||
516 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
517 | ;; | |
518 | ||
295dbbe4 | 519 | *) |
c632873c C |
520 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
521 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
522 | fi | |
523 | if test "x$nonopt" != xNONE; then | |
524 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
525 | fi | |
526 | nonopt="$ac_option" | |
527 | ;; | |
528 | ||
529 | esac | |
530 | done | |
531 | ||
532 | if test -n "$ac_prev"; then | |
533 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
534 | fi | |
535 | ||
536 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
537 | ||
538 | # File descriptor usage: | |
539 | # 0 standard input | |
540 | # 1 file creation | |
541 | # 2 errors and warnings | |
542 | # 3 some systems may open it to /dev/tty | |
543 | # 4 used on the Kubota Titan | |
544 | # 6 checking for... messages and results | |
545 | # 5 compiler messages saved in config.log | |
546 | if test "$silent" = yes; then | |
547 | exec 6>/dev/null | |
548 | else | |
549 | exec 6>&1 | |
550 | fi | |
551 | exec 5>./config.log | |
552 | ||
553 | echo "\ | |
554 | This file contains any messages produced by compilers while | |
555 | running configure, to aid debugging if configure makes a mistake. | |
556 | " 1>&5 | |
557 | ||
558 | # Strip out --no-create and --no-recursion so they do not pile up. | |
559 | # Also quote any args containing shell metacharacters. | |
560 | ac_configure_args= | |
561 | for ac_arg | |
562 | do | |
563 | case "$ac_arg" in | |
564 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
565 | | --no-cr | --no-c) ;; | |
566 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
567 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
568 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
569 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
570 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
571 | esac | |
572 | done | |
573 | ||
574 | # NLS nuisances. | |
6fea4763 DE |
575 | # Only set these to C if already set. These must not be set unconditionally |
576 | # because not all systems understand e.g. LANG=C (notably SCO). | |
577 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
578 | # Non-C LC_CTYPE values break the ctype check. | |
08db4a65 | 579 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
6fea4763 DE |
580 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
581 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
582 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
c632873c C |
583 | |
584 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
585 | rm -rf conftest* confdefs.h | |
586 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
587 | echo > confdefs.h | |
588 | ||
589 | # A filename unique to this package, relative to the directory that | |
590 | # configure is in, which we can look for to find out if srcdir is correct. | |
591 | ac_unique_file=Makefile.in | |
592 | ||
593 | # Find the source files, if location was not specified. | |
594 | if test -z "$srcdir"; then | |
595 | ac_srcdir_defaulted=yes | |
596 | # Try the directory containing this script, then its parent. | |
597 | ac_prog=$0 | |
598 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
599 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
600 | srcdir=$ac_confdir | |
601 | if test ! -r $srcdir/$ac_unique_file; then | |
602 | srcdir=.. | |
603 | fi | |
604 | else | |
605 | ac_srcdir_defaulted=no | |
606 | fi | |
607 | if test ! -r $srcdir/$ac_unique_file; then | |
608 | if test "$ac_srcdir_defaulted" = yes; then | |
609 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
610 | else | |
611 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
612 | fi | |
613 | fi | |
614 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
615 | ||
616 | # Prefer explicitly selected file to automatically selected ones. | |
617 | if test -z "$CONFIG_SITE"; then | |
618 | if test "x$prefix" != xNONE; then | |
619 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
620 | else | |
621 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
622 | fi | |
623 | fi | |
624 | for ac_site_file in $CONFIG_SITE; do | |
625 | if test -r "$ac_site_file"; then | |
626 | echo "loading site script $ac_site_file" | |
627 | . "$ac_site_file" | |
628 | fi | |
629 | done | |
630 | ||
631 | if test -r "$cache_file"; then | |
632 | echo "loading cache $cache_file" | |
633 | . $cache_file | |
634 | else | |
635 | echo "creating cache $cache_file" | |
636 | > $cache_file | |
637 | fi | |
638 | ||
639 | ac_ext=c | |
640 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
295dbbe4 SG |
641 | ac_cpp='$CPP $CPPFLAGS' |
642 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
643 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
6fea4763 | 644 | cross_compiling=$ac_cv_prog_cc_cross |
c632873c C |
645 | |
646 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
647 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
648 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
649 | ac_n= ac_c=' | |
650 | ' ac_t=' ' | |
651 | else | |
652 | ac_n=-n ac_c= ac_t= | |
653 | fi | |
654 | else | |
655 | ac_n= ac_c='\c' ac_t= | |
656 | fi | |
657 | ||
658 | ||
659 | ||
fbda74b1 | 660 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
b1df34b9 | 661 | echo "configure:662: checking how to run the C preprocessor" >&5 |
fbda74b1 DE |
662 | # On Suns, sometimes $CPP names a directory. |
663 | if test -n "$CPP" && test -d "$CPP"; then | |
664 | CPP= | |
665 | fi | |
666 | if test -z "$CPP"; then | |
667 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
668 | echo $ac_n "(cached) $ac_c" 1>&6 | |
669 | else | |
670 | # This must be in double quotes, not single quotes, because CPP may get | |
671 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
672 | CPP="${CC-cc} -E" | |
673 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
674 | # not just through cpp. | |
675 | cat > conftest.$ac_ext <<EOF | |
b1df34b9 | 676 | #line 677 "configure" |
fbda74b1 DE |
677 | #include "confdefs.h" |
678 | #include <assert.h> | |
679 | Syntax Error | |
680 | EOF | |
681 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b1df34b9 | 682 | { (eval echo configure:683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
fbda74b1 DE |
683 | ac_err=`grep -v '^ *+' conftest.out` |
684 | if test -z "$ac_err"; then | |
685 | : | |
686 | else | |
687 | echo "$ac_err" >&5 | |
6fea4763 DE |
688 | echo "configure: failed program was:" >&5 |
689 | cat conftest.$ac_ext >&5 | |
fbda74b1 DE |
690 | rm -rf conftest* |
691 | CPP="${CC-cc} -E -traditional-cpp" | |
692 | cat > conftest.$ac_ext <<EOF | |
b1df34b9 | 693 | #line 694 "configure" |
fbda74b1 DE |
694 | #include "confdefs.h" |
695 | #include <assert.h> | |
696 | Syntax Error | |
697 | EOF | |
698 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b1df34b9 | 699 | { (eval echo configure:700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
fbda74b1 DE |
700 | ac_err=`grep -v '^ *+' conftest.out` |
701 | if test -z "$ac_err"; then | |
702 | : | |
703 | else | |
704 | echo "$ac_err" >&5 | |
6fea4763 DE |
705 | echo "configure: failed program was:" >&5 |
706 | cat conftest.$ac_ext >&5 | |
fbda74b1 DE |
707 | rm -rf conftest* |
708 | CPP=/lib/cpp | |
709 | fi | |
710 | rm -f conftest* | |
711 | fi | |
712 | rm -f conftest* | |
713 | ac_cv_prog_CPP="$CPP" | |
714 | fi | |
715 | CPP="$ac_cv_prog_CPP" | |
716 | else | |
717 | ac_cv_prog_CPP="$CPP" | |
718 | fi | |
719 | echo "$ac_t""$CPP" 1>&6 | |
720 | ||
b1df34b9 TT |
721 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 |
722 | echo "configure:723: checking whether ${MAKE-make} sets \${MAKE}" >&5 | |
723 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` | |
724 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
725 | echo $ac_n "(cached) $ac_c" 1>&6 | |
726 | else | |
727 | cat > conftestmake <<\EOF | |
728 | all: | |
729 | @echo 'ac_maketemp="${MAKE}"' | |
730 | EOF | |
731 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
732 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
733 | if test -n "$ac_maketemp"; then | |
734 | eval ac_cv_prog_make_${ac_make}_set=yes | |
735 | else | |
736 | eval ac_cv_prog_make_${ac_make}_set=no | |
737 | fi | |
738 | rm -f conftestmake | |
739 | fi | |
740 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
741 | echo "$ac_t""yes" 1>&6 | |
742 | SET_MAKE= | |
743 | else | |
744 | echo "$ac_t""no" 1>&6 | |
745 | SET_MAKE="MAKE=${MAKE-make}" | |
746 | fi | |
295dbbe4 | 747 | |
b1df34b9 TT |
748 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 |
749 | echo "configure:750: checking for POSIXized ISC" >&5 | |
750 | if test -d /etc/conf/kconfig.d && | |
751 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
752 | then | |
753 | echo "$ac_t""yes" 1>&6 | |
754 | ISC=yes # If later tests want to check for ISC. | |
755 | cat >> confdefs.h <<\EOF | |
756 | #define _POSIX_SOURCE 1 | |
757 | EOF | |
295dbbe4 | 758 | |
b1df34b9 TT |
759 | if test "$GCC" = yes; then |
760 | CC="$CC -posix" | |
761 | else | |
762 | CC="$CC -Xp" | |
c632873c | 763 | fi |
b1df34b9 TT |
764 | else |
765 | echo "$ac_t""no" 1>&6 | |
766 | ISC= | |
c632873c | 767 | fi |
c632873c | 768 | |
b1df34b9 TT |
769 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
770 | echo "configure:771: checking for ANSI C header files" >&5 | |
771 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then | |
772 | echo $ac_n "(cached) $ac_c" 1>&6 | |
773 | else | |
774 | cat > conftest.$ac_ext <<EOF | |
775 | #line 776 "configure" | |
776 | #include "confdefs.h" | |
777 | #include <stdlib.h> | |
778 | #include <stdarg.h> | |
779 | #include <string.h> | |
780 | #include <float.h> | |
781 | EOF | |
782 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
783 | { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
784 | ac_err=`grep -v '^ *+' conftest.out` | |
785 | if test -z "$ac_err"; then | |
786 | rm -rf conftest* | |
787 | ac_cv_header_stdc=yes | |
788 | else | |
789 | echo "$ac_err" >&5 | |
790 | echo "configure: failed program was:" >&5 | |
791 | cat conftest.$ac_ext >&5 | |
792 | rm -rf conftest* | |
793 | ac_cv_header_stdc=no | |
794 | fi | |
795 | rm -f conftest* | |
c632873c | 796 | |
b1df34b9 TT |
797 | if test $ac_cv_header_stdc = yes; then |
798 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
799 | cat > conftest.$ac_ext <<EOF | |
800 | #line 801 "configure" | |
801 | #include "confdefs.h" | |
802 | #include <string.h> | |
803 | EOF | |
804 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
805 | egrep "memchr" >/dev/null 2>&1; then | |
806 | : | |
807 | else | |
808 | rm -rf conftest* | |
809 | ac_cv_header_stdc=no | |
810 | fi | |
811 | rm -f conftest* | |
c632873c | 812 | |
c632873c C |
813 | fi |
814 | ||
b1df34b9 TT |
815 | if test $ac_cv_header_stdc = yes; then |
816 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
817 | cat > conftest.$ac_ext <<EOF | |
818 | #line 819 "configure" | |
819 | #include "confdefs.h" | |
820 | #include <stdlib.h> | |
821 | EOF | |
822 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
823 | egrep "free" >/dev/null 2>&1; then | |
824 | : | |
825 | else | |
826 | rm -rf conftest* | |
827 | ac_cv_header_stdc=no | |
828 | fi | |
829 | rm -f conftest* | |
c632873c | 830 | |
b1df34b9 | 831 | fi |
c632873c | 832 | |
b1df34b9 TT |
833 | if test $ac_cv_header_stdc = yes; then |
834 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
835 | if test "$cross_compiling" = yes; then | |
836 | : | |
837 | else | |
838 | cat > conftest.$ac_ext <<EOF | |
839 | #line 840 "configure" | |
840 | #include "confdefs.h" | |
841 | #include <ctype.h> | |
842 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
843 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
844 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
845 | int main () { int i; for (i = 0; i < 256; i++) | |
846 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
847 | exit (0); } | |
c632873c | 848 | |
b1df34b9 TT |
849 | EOF |
850 | if { (eval echo configure:851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null | |
851 | then | |
852 | : | |
853 | else | |
854 | echo "configure: failed program was:" >&5 | |
855 | cat conftest.$ac_ext >&5 | |
856 | rm -fr conftest* | |
857 | ac_cv_header_stdc=no | |
858 | fi | |
859 | rm -fr conftest* | |
860 | fi | |
c632873c | 861 | |
b1df34b9 TT |
862 | fi |
863 | fi | |
c632873c | 864 | |
b1df34b9 TT |
865 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
866 | if test $ac_cv_header_stdc = yes; then | |
867 | cat >> confdefs.h <<\EOF | |
868 | #define STDC_HEADERS 1 | |
869 | EOF | |
c632873c | 870 | |
b1df34b9 | 871 | fi |
c632873c | 872 | |
b1df34b9 TT |
873 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
874 | echo "configure:875: checking for working const" >&5 | |
875 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then | |
876 | echo $ac_n "(cached) $ac_c" 1>&6 | |
877 | else | |
878 | cat > conftest.$ac_ext <<EOF | |
879 | #line 880 "configure" | |
880 | #include "confdefs.h" | |
c632873c | 881 | |
b1df34b9 | 882 | int main() { |
c632873c | 883 | |
b1df34b9 TT |
884 | /* Ultrix mips cc rejects this. */ |
885 | typedef int charset[2]; const charset x; | |
886 | /* SunOS 4.1.1 cc rejects this. */ | |
887 | char const *const *ccp; | |
888 | char **p; | |
889 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
890 | struct point {int x, y;}; | |
891 | static struct point const zero = {0,0}; | |
892 | /* AIX XL C 1.02.0.0 rejects this. | |
893 | It does not let you subtract one const X* pointer from another in an arm | |
894 | of an if-expression whose if-part is not a constant expression */ | |
895 | const char *g = "string"; | |
896 | ccp = &g + (g ? g-g : 0); | |
897 | /* HPUX 7.0 cc rejects these. */ | |
898 | ++ccp; | |
899 | p = (char**) ccp; | |
900 | ccp = (char const *const *) p; | |
901 | { /* SCO 3.2v4 cc rejects this. */ | |
902 | char *t; | |
903 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
904 | ||
905 | *t++ = 0; | |
906 | } | |
907 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
908 | int x[] = {25, 17}; | |
909 | const int *foo = &x[0]; | |
910 | ++foo; | |
911 | } | |
912 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
913 | typedef const int *iptr; | |
914 | iptr p = 0; | |
915 | ++p; | |
916 | } | |
917 | { /* AIX XL C 1.02.0.0 rejects this saying | |
918 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
919 | struct s { int j; const int *ap[3]; }; | |
920 | struct s *b; b->j = 5; | |
921 | } | |
922 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
923 | const int foo = 10; | |
924 | } | |
c632873c | 925 | |
b1df34b9 TT |
926 | ; return 0; } |
927 | EOF | |
928 | if { (eval echo configure:929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
929 | rm -rf conftest* | |
930 | ac_cv_c_const=yes | |
c632873c | 931 | else |
b1df34b9 TT |
932 | echo "configure: failed program was:" >&5 |
933 | cat conftest.$ac_ext >&5 | |
934 | rm -rf conftest* | |
935 | ac_cv_c_const=no | |
936 | fi | |
937 | rm -f conftest* | |
c632873c | 938 | fi |
c632873c | 939 | |
b1df34b9 TT |
940 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
941 | if test $ac_cv_c_const = no; then | |
942 | cat >> confdefs.h <<\EOF | |
943 | #define const | |
944 | EOF | |
c632873c | 945 | |
b1df34b9 TT |
946 | fi |
947 | ||
948 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
949 | echo "configure:950: checking for inline" >&5 | |
950 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then | |
c632873c C |
951 | echo $ac_n "(cached) $ac_c" 1>&6 |
952 | else | |
b1df34b9 TT |
953 | ac_cv_c_inline=no |
954 | for ac_kw in inline __inline__ __inline; do | |
955 | cat > conftest.$ac_ext <<EOF | |
956 | #line 957 "configure" | |
957 | #include "confdefs.h" | |
958 | ||
959 | int main() { | |
960 | } $ac_kw foo() { | |
961 | ; return 0; } | |
962 | EOF | |
963 | if { (eval echo configure:964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
964 | rm -rf conftest* | |
965 | ac_cv_c_inline=$ac_kw; break | |
c632873c | 966 | else |
b1df34b9 TT |
967 | echo "configure: failed program was:" >&5 |
968 | cat conftest.$ac_ext >&5 | |
c632873c | 969 | fi |
b1df34b9 TT |
970 | rm -f conftest* |
971 | done | |
972 | ||
c632873c C |
973 | fi |
974 | ||
b1df34b9 TT |
975 | echo "$ac_t""$ac_cv_c_inline" 1>&6 |
976 | case "$ac_cv_c_inline" in | |
977 | inline | yes) ;; | |
978 | no) cat >> confdefs.h <<\EOF | |
979 | #define inline | |
980 | EOF | |
981 | ;; | |
982 | *) cat >> confdefs.h <<EOF | |
983 | #define inline $ac_cv_c_inline | |
984 | EOF | |
985 | ;; | |
986 | esac | |
987 | ||
988 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
989 | echo "configure:990: checking for off_t" >&5 | |
990 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then | |
295dbbe4 SG |
991 | echo $ac_n "(cached) $ac_c" 1>&6 |
992 | else | |
b1df34b9 TT |
993 | cat > conftest.$ac_ext <<EOF |
994 | #line 995 "configure" | |
995 | #include "confdefs.h" | |
996 | #include <sys/types.h> | |
997 | #if STDC_HEADERS | |
998 | #include <stdlib.h> | |
999 | #include <stddef.h> | |
1000 | #endif | |
1001 | EOF | |
1002 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1003 | egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1004 | rm -rf conftest* | |
1005 | ac_cv_type_off_t=yes | |
1006 | else | |
1007 | rm -rf conftest* | |
1008 | ac_cv_type_off_t=no | |
295dbbe4 | 1009 | fi |
b1df34b9 TT |
1010 | rm -f conftest* |
1011 | ||
295dbbe4 | 1012 | fi |
b1df34b9 TT |
1013 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 |
1014 | if test $ac_cv_type_off_t = no; then | |
1015 | cat >> confdefs.h <<\EOF | |
1016 | #define off_t long | |
1017 | EOF | |
1018 | ||
295dbbe4 | 1019 | fi |
b1df34b9 TT |
1020 | |
1021 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
1022 | echo "configure:1023: checking for size_t" >&5 | |
1023 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then | |
1024 | echo $ac_n "(cached) $ac_c" 1>&6 | |
295dbbe4 | 1025 | else |
b1df34b9 TT |
1026 | cat > conftest.$ac_ext <<EOF |
1027 | #line 1028 "configure" | |
1028 | #include "confdefs.h" | |
1029 | #include <sys/types.h> | |
1030 | #if STDC_HEADERS | |
1031 | #include <stdlib.h> | |
1032 | #include <stddef.h> | |
1033 | #endif | |
1034 | EOF | |
1035 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1036 | egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
1037 | rm -rf conftest* | |
1038 | ac_cv_type_size_t=yes | |
1039 | else | |
1040 | rm -rf conftest* | |
1041 | ac_cv_type_size_t=no | |
295dbbe4 | 1042 | fi |
b1df34b9 | 1043 | rm -f conftest* |
295dbbe4 | 1044 | |
295dbbe4 | 1045 | fi |
b1df34b9 TT |
1046 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 |
1047 | if test $ac_cv_type_size_t = no; then | |
1048 | cat >> confdefs.h <<\EOF | |
1049 | #define size_t unsigned | |
1050 | EOF | |
295dbbe4 | 1051 | |
b1df34b9 | 1052 | fi |
6fea4763 | 1053 | |
b1df34b9 TT |
1054 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
1055 | # for constant arguments. Useless! | |
1056 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
1057 | echo "configure:1058: checking for working alloca.h" >&5 | |
1058 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then | |
1059 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1060 | else | |
1061 | cat > conftest.$ac_ext <<EOF | |
1062 | #line 1063 "configure" | |
6fea4763 | 1063 | #include "confdefs.h" |
b1df34b9 TT |
1064 | #include <alloca.h> |
1065 | int main() { | |
1066 | char *p = alloca(2 * sizeof(int)); | |
1067 | ; return 0; } | |
6fea4763 | 1068 | EOF |
b1df34b9 TT |
1069 | if { (eval echo configure:1070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
1070 | rm -rf conftest* | |
1071 | ac_cv_header_alloca_h=yes | |
6fea4763 DE |
1072 | else |
1073 | echo "configure: failed program was:" >&5 | |
1074 | cat conftest.$ac_ext >&5 | |
b1df34b9 TT |
1075 | rm -rf conftest* |
1076 | ac_cv_header_alloca_h=no | |
1077 | fi | |
1078 | rm -f conftest* | |
6fea4763 | 1079 | fi |
6fea4763 | 1080 | |
b1df34b9 TT |
1081 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 |
1082 | if test $ac_cv_header_alloca_h = yes; then | |
1083 | cat >> confdefs.h <<\EOF | |
1084 | #define HAVE_ALLOCA_H 1 | |
1085 | EOF | |
1086 | ||
6fea4763 | 1087 | fi |
6fea4763 | 1088 | |
b1df34b9 TT |
1089 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 |
1090 | echo "configure:1091: checking for alloca" >&5 | |
1091 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then | |
c632873c C |
1092 | echo $ac_n "(cached) $ac_c" 1>&6 |
1093 | else | |
b1df34b9 TT |
1094 | cat > conftest.$ac_ext <<EOF |
1095 | #line 1096 "configure" | |
1096 | #include "confdefs.h" | |
1097 | ||
c632873c | 1098 | #ifdef __GNUC__ |
b1df34b9 TT |
1099 | # define alloca __builtin_alloca |
1100 | #else | |
1101 | # if HAVE_ALLOCA_H | |
1102 | # include <alloca.h> | |
1103 | # else | |
1104 | # ifdef _AIX | |
1105 | #pragma alloca | |
1106 | # else | |
1107 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1108 | char *alloca (); | |
1109 | # endif | |
1110 | # endif | |
1111 | # endif | |
c632873c | 1112 | #endif |
b1df34b9 TT |
1113 | |
1114 | int main() { | |
1115 | char *p = (char *) alloca(1); | |
1116 | ; return 0; } | |
c632873c | 1117 | EOF |
b1df34b9 TT |
1118 | if { (eval echo configure:1119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
1119 | rm -rf conftest* | |
1120 | ac_cv_func_alloca_works=yes | |
c632873c | 1121 | else |
b1df34b9 TT |
1122 | echo "configure: failed program was:" >&5 |
1123 | cat conftest.$ac_ext >&5 | |
1124 | rm -rf conftest* | |
1125 | ac_cv_func_alloca_works=no | |
c632873c | 1126 | fi |
b1df34b9 | 1127 | rm -f conftest* |
c632873c C |
1128 | fi |
1129 | ||
b1df34b9 TT |
1130 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 |
1131 | if test $ac_cv_func_alloca_works = yes; then | |
1132 | cat >> confdefs.h <<\EOF | |
1133 | #define HAVE_ALLOCA 1 | |
1134 | EOF | |
6fea4763 | 1135 | |
c632873c | 1136 | fi |
c632873c | 1137 | |
b1df34b9 TT |
1138 | if test $ac_cv_func_alloca_works = no; then |
1139 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1140 | # that cause trouble. Some versions do not even contain alloca or | |
1141 | # contain a buggy version. If you still want to use their alloca, | |
1142 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
1143 | ALLOCA=alloca.o | |
1144 | cat >> confdefs.h <<\EOF | |
1145 | #define C_ALLOCA 1 | |
1146 | EOF | |
c632873c | 1147 | |
c632873c | 1148 | |
b1df34b9 TT |
1149 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 |
1150 | echo "configure:1151: checking whether alloca needs Cray hooks" >&5 | |
1151 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then | |
c632873c C |
1152 | echo $ac_n "(cached) $ac_c" 1>&6 |
1153 | else | |
b1df34b9 TT |
1154 | cat > conftest.$ac_ext <<EOF |
1155 | #line 1156 "configure" | |
1156 | #include "confdefs.h" | |
1157 | #if defined(CRAY) && ! defined(CRAY2) | |
1158 | webecray | |
1159 | #else | |
1160 | wenotbecray | |
1161 | #endif | |
c632873c | 1162 | |
b1df34b9 TT |
1163 | EOF |
1164 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1165 | egrep "webecray" >/dev/null 2>&1; then | |
1166 | rm -rf conftest* | |
1167 | ac_cv_os_cray=yes | |
1168 | else | |
1169 | rm -rf conftest* | |
1170 | ac_cv_os_cray=no | |
c632873c | 1171 | fi |
b1df34b9 TT |
1172 | rm -f conftest* |
1173 | ||
c632873c | 1174 | fi |
c632873c | 1175 | |
b1df34b9 TT |
1176 | echo "$ac_t""$ac_cv_os_cray" 1>&6 |
1177 | if test $ac_cv_os_cray = yes; then | |
1178 | for ac_func in _getb67 GETB67 getb67; do | |
1179 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
1180 | echo "configure:1181: checking for $ac_func" >&5 | |
1181 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then | |
1182 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1183 | else | |
1184 | cat > conftest.$ac_ext <<EOF | |
1185 | #line 1186 "configure" | |
1186 | #include "confdefs.h" | |
1187 | /* System header to define __stub macros and hopefully few prototypes, | |
1188 | which can conflict with char $ac_func(); below. */ | |
1189 | #include <assert.h> | |
1190 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1191 | /* We use char because int might match the return type of a gcc2 | |
1192 | builtin and then its argument prototype would still apply. */ | |
1193 | char $ac_func(); | |
c632873c | 1194 | |
b1df34b9 | 1195 | int main() { |
c632873c | 1196 | |
b1df34b9 TT |
1197 | /* The GNU C library defines this for functions which it implements |
1198 | to always fail with ENOSYS. Some functions are actually named | |
1199 | something starting with __ and the normal name is an alias. */ | |
1200 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1201 | choke me | |
1202 | #else | |
1203 | $ac_func(); | |
1204 | #endif | |
295dbbe4 | 1205 | |
b1df34b9 TT |
1206 | ; return 0; } |
1207 | EOF | |
1208 | if { (eval echo configure:1209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
1209 | rm -rf conftest* | |
1210 | eval "ac_cv_func_$ac_func=yes" | |
295dbbe4 | 1211 | else |
b1df34b9 TT |
1212 | echo "configure: failed program was:" >&5 |
1213 | cat conftest.$ac_ext >&5 | |
1214 | rm -rf conftest* | |
1215 | eval "ac_cv_func_$ac_func=no" | |
1216 | fi | |
1217 | rm -f conftest* | |
295dbbe4 SG |
1218 | fi |
1219 | ||
b1df34b9 TT |
1220 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
1221 | echo "$ac_t""yes" 1>&6 | |
1222 | cat >> confdefs.h <<EOF | |
1223 | #define CRAY_STACKSEG_END $ac_func | |
1224 | EOF | |
295dbbe4 | 1225 | |
b1df34b9 TT |
1226 | break |
1227 | else | |
1228 | echo "$ac_t""no" 1>&6 | |
1229 | fi | |
295dbbe4 | 1230 | |
b1df34b9 TT |
1231 | done |
1232 | fi | |
295dbbe4 | 1233 | |
b1df34b9 TT |
1234 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 |
1235 | echo "configure:1236: checking stack direction for C alloca" >&5 | |
1236 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then | |
295dbbe4 SG |
1237 | echo $ac_n "(cached) $ac_c" 1>&6 |
1238 | else | |
b1df34b9 TT |
1239 | if test "$cross_compiling" = yes; then |
1240 | ac_cv_c_stack_direction=0 | |
295dbbe4 | 1241 | else |
b1df34b9 TT |
1242 | cat > conftest.$ac_ext <<EOF |
1243 | #line 1244 "configure" | |
1244 | #include "confdefs.h" | |
1245 | find_stack_direction () | |
1246 | { | |
1247 | static char *addr = 0; | |
1248 | auto char dummy; | |
1249 | if (addr == 0) | |
1250 | { | |
1251 | addr = &dummy; | |
1252 | return find_stack_direction (); | |
1253 | } | |
1254 | else | |
1255 | return (&dummy > addr) ? 1 : -1; | |
1256 | } | |
1257 | main () | |
1258 | { | |
1259 | exit (find_stack_direction() < 0); | |
1260 | } | |
1261 | EOF | |
1262 | if { (eval echo configure:1263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null | |
1263 | then | |
1264 | ac_cv_c_stack_direction=1 | |
1265 | else | |
1266 | echo "configure: failed program was:" >&5 | |
1267 | cat conftest.$ac_ext >&5 | |
1268 | rm -fr conftest* | |
1269 | ac_cv_c_stack_direction=-1 | |
1270 | fi | |
1271 | rm -fr conftest* | |
1272 | fi | |
1273 | ||
1274 | fi | |
1275 | ||
1276 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
1277 | cat >> confdefs.h <<EOF | |
1278 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1279 | EOF | |
1280 | ||
1281 | fi | |
1282 | ||
1283 | for ac_hdr in unistd.h | |
1284 | do | |
1285 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1286 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
1287 | echo "configure:1288: checking for $ac_hdr" >&5 | |
1288 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
1289 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1290 | else | |
1291 | cat > conftest.$ac_ext <<EOF | |
1292 | #line 1293 "configure" | |
1293 | #include "confdefs.h" | |
1294 | #include <$ac_hdr> | |
1295 | EOF | |
1296 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
1297 | { (eval echo configure:1298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
1298 | ac_err=`grep -v '^ *+' conftest.out` | |
1299 | if test -z "$ac_err"; then | |
1300 | rm -rf conftest* | |
1301 | eval "ac_cv_header_$ac_safe=yes" | |
1302 | else | |
1303 | echo "$ac_err" >&5 | |
1304 | echo "configure: failed program was:" >&5 | |
1305 | cat conftest.$ac_ext >&5 | |
1306 | rm -rf conftest* | |
1307 | eval "ac_cv_header_$ac_safe=no" | |
1308 | fi | |
1309 | rm -f conftest* | |
1310 | fi | |
1311 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1312 | echo "$ac_t""yes" 1>&6 | |
1313 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1314 | cat >> confdefs.h <<EOF | |
1315 | #define $ac_tr_hdr 1 | |
1316 | EOF | |
1317 | ||
1318 | else | |
1319 | echo "$ac_t""no" 1>&6 | |
1320 | fi | |
1321 | done | |
1322 | ||
1323 | for ac_func in getpagesize | |
1324 | do | |
1325 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
1326 | echo "configure:1327: checking for $ac_func" >&5 | |
1327 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then | |
1328 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1329 | else | |
1330 | cat > conftest.$ac_ext <<EOF | |
1331 | #line 1332 "configure" | |
1332 | #include "confdefs.h" | |
1333 | /* System header to define __stub macros and hopefully few prototypes, | |
1334 | which can conflict with char $ac_func(); below. */ | |
1335 | #include <assert.h> | |
1336 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1337 | /* We use char because int might match the return type of a gcc2 | |
1338 | builtin and then its argument prototype would still apply. */ | |
1339 | char $ac_func(); | |
1340 | ||
1341 | int main() { | |
1342 | ||
1343 | /* The GNU C library defines this for functions which it implements | |
1344 | to always fail with ENOSYS. Some functions are actually named | |
1345 | something starting with __ and the normal name is an alias. */ | |
1346 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1347 | choke me | |
1348 | #else | |
1349 | $ac_func(); | |
1350 | #endif | |
1351 | ||
1352 | ; return 0; } | |
1353 | EOF | |
1354 | if { (eval echo configure:1355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
1355 | rm -rf conftest* | |
1356 | eval "ac_cv_func_$ac_func=yes" | |
1357 | else | |
1358 | echo "configure: failed program was:" >&5 | |
1359 | cat conftest.$ac_ext >&5 | |
1360 | rm -rf conftest* | |
1361 | eval "ac_cv_func_$ac_func=no" | |
1362 | fi | |
1363 | rm -f conftest* | |
1364 | fi | |
1365 | ||
1366 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1367 | echo "$ac_t""yes" 1>&6 | |
1368 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1369 | cat >> confdefs.h <<EOF | |
1370 | #define $ac_tr_func 1 | |
1371 | EOF | |
1372 | ||
1373 | else | |
1374 | echo "$ac_t""no" 1>&6 | |
1375 | fi | |
1376 | done | |
1377 | ||
1378 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
1379 | echo "configure:1380: checking for working mmap" >&5 | |
1380 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then | |
1381 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1382 | else | |
1383 | if test "$cross_compiling" = yes; then | |
1384 | ac_cv_func_mmap_fixed_mapped=no | |
1385 | else | |
1386 | cat > conftest.$ac_ext <<EOF | |
1387 | #line 1388 "configure" | |
1388 | #include "confdefs.h" | |
1389 | ||
1390 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
1391 | Here is a matrix of mmap possibilities: | |
1392 | mmap private not fixed | |
1393 | mmap private fixed at somewhere currently unmapped | |
1394 | mmap private fixed at somewhere already mapped | |
1395 | mmap shared not fixed | |
1396 | mmap shared fixed at somewhere currently unmapped | |
1397 | mmap shared fixed at somewhere already mapped | |
1398 | For private mappings, we should verify that changes cannot be read() | |
1399 | back from the file, nor mmap's back from the file at a different | |
1400 | address. (There have been systems where private was not correctly | |
1401 | implemented like the infamous i386 svr4.0, and systems where the | |
1402 | VM page cache was not coherent with the filesystem buffer cache | |
1403 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1404 | For shared mappings, we should conversely verify that changes get | |
1405 | propogated back to all the places they're supposed to be. | |
1406 | ||
1407 | Grep wants private fixed already mapped. | |
1408 | The main things grep needs to know about mmap are: | |
1409 | * does it exist and is it safe to write into the mmap'd area | |
1410 | * how to use it (BSD variants) */ | |
1411 | #include <sys/types.h> | |
1412 | #include <fcntl.h> | |
1413 | #include <sys/mman.h> | |
1414 | ||
1415 | /* This mess was copied from the GNU getpagesize.h. */ | |
1416 | #ifndef HAVE_GETPAGESIZE | |
1417 | # ifdef HAVE_UNISTD_H | |
1418 | # include <unistd.h> | |
1419 | # endif | |
1420 | ||
1421 | /* Assume that all systems that can run configure have sys/param.h. */ | |
1422 | # ifndef HAVE_SYS_PARAM_H | |
1423 | # define HAVE_SYS_PARAM_H 1 | |
1424 | # endif | |
1425 | ||
1426 | # ifdef _SC_PAGESIZE | |
1427 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
1428 | # else /* no _SC_PAGESIZE */ | |
1429 | # ifdef HAVE_SYS_PARAM_H | |
1430 | # include <sys/param.h> | |
1431 | # ifdef EXEC_PAGESIZE | |
1432 | # define getpagesize() EXEC_PAGESIZE | |
1433 | # else /* no EXEC_PAGESIZE */ | |
1434 | # ifdef NBPG | |
1435 | # define getpagesize() NBPG * CLSIZE | |
1436 | # ifndef CLSIZE | |
1437 | # define CLSIZE 1 | |
1438 | # endif /* no CLSIZE */ | |
1439 | # else /* no NBPG */ | |
1440 | # ifdef NBPC | |
1441 | # define getpagesize() NBPC | |
1442 | # else /* no NBPC */ | |
1443 | # ifdef PAGESIZE | |
1444 | # define getpagesize() PAGESIZE | |
1445 | # endif /* PAGESIZE */ | |
1446 | # endif /* no NBPC */ | |
1447 | # endif /* no NBPG */ | |
1448 | # endif /* no EXEC_PAGESIZE */ | |
1449 | # else /* no HAVE_SYS_PARAM_H */ | |
1450 | # define getpagesize() 8192 /* punt totally */ | |
1451 | # endif /* no HAVE_SYS_PARAM_H */ | |
1452 | # endif /* no _SC_PAGESIZE */ | |
1453 | ||
1454 | #endif /* no HAVE_GETPAGESIZE */ | |
1455 | ||
1456 | #ifdef __cplusplus | |
1457 | extern "C" { void *malloc(unsigned); } | |
1458 | #else | |
1459 | char *malloc(); | |
1460 | #endif | |
1461 | ||
1462 | int | |
1463 | main() | |
1464 | { | |
1465 | char *data, *data2, *data3; | |
1466 | int i, pagesize; | |
1467 | int fd; | |
1468 | ||
1469 | pagesize = getpagesize(); | |
1470 | ||
1471 | /* | |
1472 | * First, make a file with some known garbage in it. | |
1473 | */ | |
1474 | data = malloc(pagesize); | |
1475 | if (!data) | |
1476 | exit(1); | |
1477 | for (i = 0; i < pagesize; ++i) | |
1478 | *(data + i) = rand(); | |
1479 | umask(0); | |
1480 | fd = creat("conftestmmap", 0600); | |
1481 | if (fd < 0) | |
1482 | exit(1); | |
1483 | if (write(fd, data, pagesize) != pagesize) | |
1484 | exit(1); | |
1485 | close(fd); | |
1486 | ||
1487 | /* | |
1488 | * Next, try to mmap the file at a fixed address which | |
1489 | * already has something else allocated at it. If we can, | |
1490 | * also make sure that we see the same garbage. | |
1491 | */ | |
1492 | fd = open("conftestmmap", O_RDWR); | |
1493 | if (fd < 0) | |
1494 | exit(1); | |
1495 | data2 = malloc(2 * pagesize); | |
1496 | if (!data2) | |
1497 | exit(1); | |
1498 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
1499 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
1500 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
1501 | exit(1); | |
1502 | for (i = 0; i < pagesize; ++i) | |
1503 | if (*(data + i) != *(data2 + i)) | |
1504 | exit(1); | |
1505 | ||
1506 | /* | |
1507 | * Finally, make sure that changes to the mapped area | |
1508 | * do not percolate back to the file as seen by read(). | |
1509 | * (This is a bug on some variants of i386 svr4.0.) | |
1510 | */ | |
1511 | for (i = 0; i < pagesize; ++i) | |
1512 | *(data2 + i) = *(data2 + i) + 1; | |
1513 | data3 = malloc(pagesize); | |
1514 | if (!data3) | |
1515 | exit(1); | |
1516 | if (read(fd, data3, pagesize) != pagesize) | |
1517 | exit(1); | |
1518 | for (i = 0; i < pagesize; ++i) | |
1519 | if (*(data + i) != *(data3 + i)) | |
1520 | exit(1); | |
1521 | close(fd); | |
1522 | unlink("conftestmmap"); | |
1523 | exit(0); | |
1524 | } | |
1525 | ||
1526 | EOF | |
1527 | if { (eval echo configure:1528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null | |
1528 | then | |
1529 | ac_cv_func_mmap_fixed_mapped=yes | |
1530 | else | |
1531 | echo "configure: failed program was:" >&5 | |
1532 | cat conftest.$ac_ext >&5 | |
1533 | rm -fr conftest* | |
1534 | ac_cv_func_mmap_fixed_mapped=no | |
1535 | fi | |
1536 | rm -fr conftest* | |
1537 | fi | |
1538 | ||
1539 | fi | |
1540 | ||
1541 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
1542 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
1543 | cat >> confdefs.h <<\EOF | |
1544 | #define HAVE_MMAP 1 | |
1545 | EOF | |
1546 | ||
1547 | fi | |
1548 | ||
1549 | ||
1550 | # autoconf.info says this should be called right after AC_INIT. | |
1551 | ||
1552 | ||
1553 | ac_aux_dir= | |
1554 | for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do | |
1555 | if test -f $ac_dir/install-sh; then | |
1556 | ac_aux_dir=$ac_dir | |
1557 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1558 | break | |
1559 | elif test -f $ac_dir/install.sh; then | |
1560 | ac_aux_dir=$ac_dir | |
1561 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1562 | break | |
1563 | fi | |
1564 | done | |
1565 | if test -z "$ac_aux_dir"; then | |
1566 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; } | |
1567 | fi | |
1568 | ac_config_guess=$ac_aux_dir/config.guess | |
1569 | ac_config_sub=$ac_aux_dir/config.sub | |
1570 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
1571 | ||
1572 | ||
1573 | # Do some error checking and defaulting for the host and target type. | |
1574 | # The inputs are: | |
1575 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
1576 | # | |
1577 | # The rules are: | |
1578 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1579 | # same time. | |
1580 | # 2. Host defaults to nonopt. | |
1581 | # 3. If nonopt is not specified, then host defaults to the current host, | |
1582 | # as determined by config.guess. | |
1583 | # 4. Target and build default to nonopt. | |
1584 | # 5. If nonopt is not specified, then target and build default to host. | |
1585 | ||
1586 | # The aliases save the names the user supplied, while $host etc. | |
1587 | # will get canonicalized. | |
1588 | case $host---$target---$nonopt in | |
1589 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
1590 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
1591 | esac | |
1592 | ||
1593 | ||
1594 | # Make sure we can run config.sub. | |
1595 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
1596 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
1597 | fi | |
1598 | ||
1599 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
1600 | echo "configure:1601: checking host system type" >&5 | |
1601 | ||
1602 | host_alias=$host | |
1603 | case "$host_alias" in | |
1604 | NONE) | |
1605 | case $nonopt in | |
1606 | NONE) | |
1607 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
1608 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
1609 | fi ;; | |
1610 | *) host_alias=$nonopt ;; | |
1611 | esac ;; | |
1612 | esac | |
1613 | ||
1614 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
1615 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1616 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1617 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1618 | echo "$ac_t""$host" 1>&6 | |
1619 | ||
1620 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
1621 | echo "configure:1622: checking target system type" >&5 | |
1622 | ||
1623 | target_alias=$target | |
1624 | case "$target_alias" in | |
1625 | NONE) | |
1626 | case $nonopt in | |
1627 | NONE) target_alias=$host_alias ;; | |
1628 | *) target_alias=$nonopt ;; | |
1629 | esac ;; | |
1630 | esac | |
1631 | ||
1632 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
1633 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1634 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1635 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1636 | echo "$ac_t""$target" 1>&6 | |
1637 | ||
1638 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
1639 | echo "configure:1640: checking build system type" >&5 | |
1640 | ||
1641 | build_alias=$build | |
1642 | case "$build_alias" in | |
1643 | NONE) | |
1644 | case $nonopt in | |
1645 | NONE) build_alias=$host_alias ;; | |
1646 | *) build_alias=$nonopt ;; | |
1647 | esac ;; | |
1648 | esac | |
1649 | ||
1650 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
1651 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1652 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1653 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1654 | echo "$ac_t""$build" 1>&6 | |
1655 | ||
1656 | test "$host_alias" != "$target_alias" && | |
1657 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1658 | NONENONEs,x,x, && | |
1659 | program_prefix=${target_alias}- | |
1660 | ||
1661 | if test "$program_transform_name" = s,x,x,; then | |
1662 | program_transform_name= | |
1663 | else | |
1664 | # Double any \ or $. echo might interpret backslashes. | |
1665 | cat <<\EOF_SED > conftestsed | |
1666 | s,\\,\\\\,g; s,\$,$$,g | |
1667 | EOF_SED | |
1668 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
1669 | rm -f conftestsed | |
1670 | fi | |
1671 | test "$program_prefix" != NONE && | |
1672 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
1673 | # Use a double $ so make ignores it. | |
1674 | test "$program_suffix" != NONE && | |
1675 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
1676 | ||
1677 | # sed with no file args requires a program. | |
1678 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
1679 | ||
1680 | # Extract the first word of "gcc", so it can be a program name with args. | |
1681 | set dummy gcc; ac_word=$2 | |
1682 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
1683 | echo "configure:1684: checking for $ac_word" >&5 | |
1684 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then | |
1685 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1686 | else | |
1687 | if test -n "$CC"; then | |
1688 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1689 | else | |
1690 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1691 | for ac_dir in $PATH; do | |
1692 | test -z "$ac_dir" && ac_dir=. | |
1693 | if test -f $ac_dir/$ac_word; then | |
1694 | ac_cv_prog_CC="gcc" | |
1695 | break | |
1696 | fi | |
1697 | done | |
1698 | IFS="$ac_save_ifs" | |
1699 | fi | |
1700 | fi | |
1701 | CC="$ac_cv_prog_CC" | |
1702 | if test -n "$CC"; then | |
1703 | echo "$ac_t""$CC" 1>&6 | |
1704 | else | |
1705 | echo "$ac_t""no" 1>&6 | |
1706 | fi | |
1707 | ||
1708 | if test -z "$CC"; then | |
1709 | # Extract the first word of "cc", so it can be a program name with args. | |
1710 | set dummy cc; ac_word=$2 | |
1711 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
1712 | echo "configure:1713: checking for $ac_word" >&5 | |
1713 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then | |
1714 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1715 | else | |
1716 | if test -n "$CC"; then | |
1717 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1718 | else | |
1719 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1720 | ac_prog_rejected=no | |
1721 | for ac_dir in $PATH; do | |
1722 | test -z "$ac_dir" && ac_dir=. | |
1723 | if test -f $ac_dir/$ac_word; then | |
1724 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
1725 | ac_prog_rejected=yes | |
1726 | continue | |
1727 | fi | |
1728 | ac_cv_prog_CC="cc" | |
1729 | break | |
1730 | fi | |
1731 | done | |
1732 | IFS="$ac_save_ifs" | |
1733 | if test $ac_prog_rejected = yes; then | |
1734 | # We found a bogon in the path, so make sure we never use it. | |
1735 | set dummy $ac_cv_prog_CC | |
1736 | shift | |
1737 | if test $# -gt 0; then | |
1738 | # We chose a different compiler from the bogus one. | |
1739 | # However, it has the same basename, so the bogon will be chosen | |
1740 | # first if we set CC to just the basename; use the full file name. | |
1741 | shift | |
1742 | set dummy "$ac_dir/$ac_word" "$@" | |
1743 | shift | |
1744 | ac_cv_prog_CC="$@" | |
1745 | fi | |
1746 | fi | |
1747 | fi | |
1748 | fi | |
1749 | CC="$ac_cv_prog_CC" | |
1750 | if test -n "$CC"; then | |
1751 | echo "$ac_t""$CC" 1>&6 | |
1752 | else | |
1753 | echo "$ac_t""no" 1>&6 | |
1754 | fi | |
1755 | ||
1756 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
1757 | fi | |
1758 | ||
1759 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
1760 | echo "configure:1761: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 | |
1761 | ||
1762 | ac_ext=c | |
1763 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1764 | ac_cpp='$CPP $CPPFLAGS' | |
1765 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1766 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1767 | cross_compiling=$ac_cv_prog_cc_cross | |
1768 | ||
1769 | cat > conftest.$ac_ext <<EOF | |
1770 | #line 1771 "configure" | |
1771 | #include "confdefs.h" | |
1772 | main(){return(0);} | |
1773 | EOF | |
1774 | if { (eval echo configure:1775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
1775 | ac_cv_prog_cc_works=yes | |
1776 | # If we can't run a trivial program, we are probably using a cross compiler. | |
1777 | if (./conftest; exit) 2>/dev/null; then | |
1778 | ac_cv_prog_cc_cross=no | |
1779 | else | |
1780 | ac_cv_prog_cc_cross=yes | |
1781 | fi | |
1782 | else | |
1783 | echo "configure: failed program was:" >&5 | |
1784 | cat conftest.$ac_ext >&5 | |
1785 | ac_cv_prog_cc_works=no | |
1786 | fi | |
1787 | rm -fr conftest* | |
1788 | ||
1789 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
1790 | if test $ac_cv_prog_cc_works = no; then | |
1791 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
1792 | fi | |
1793 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
1794 | echo "configure:1795: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 | |
1795 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 | |
1796 | cross_compiling=$ac_cv_prog_cc_cross | |
1797 | ||
1798 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
1799 | echo "configure:1800: checking whether we are using GNU C" >&5 | |
1800 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then | |
1801 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1802 | else | |
1803 | cat > conftest.c <<EOF | |
1804 | #ifdef __GNUC__ | |
1805 | yes; | |
1806 | #endif | |
1807 | EOF | |
1808 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then | |
1809 | ac_cv_prog_gcc=yes | |
1810 | else | |
1811 | ac_cv_prog_gcc=no | |
1812 | fi | |
1813 | fi | |
1814 | ||
1815 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
1816 | ||
1817 | if test $ac_cv_prog_gcc = yes; then | |
1818 | GCC=yes | |
1819 | ac_test_CFLAGS="${CFLAGS+set}" | |
1820 | ac_save_CFLAGS="$CFLAGS" | |
1821 | CFLAGS= | |
1822 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
1823 | echo "configure:1824: checking whether ${CC-cc} accepts -g" >&5 | |
1824 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then | |
1825 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1826 | else | |
1827 | echo 'void f(){}' > conftest.c | |
1828 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
1829 | ac_cv_prog_cc_g=yes | |
1830 | else | |
1831 | ac_cv_prog_cc_g=no | |
1832 | fi | |
1833 | rm -f conftest* | |
1834 | ||
1835 | fi | |
1836 | ||
1837 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
1838 | if test "$ac_test_CFLAGS" = set; then | |
1839 | CFLAGS="$ac_save_CFLAGS" | |
1840 | elif test $ac_cv_prog_cc_g = yes; then | |
1841 | CFLAGS="-g -O2" | |
1842 | else | |
1843 | CFLAGS="-O2" | |
1844 | fi | |
1845 | else | |
1846 | GCC= | |
1847 | test "${CFLAGS+set}" = set || CFLAGS="-g" | |
1848 | fi | |
1849 | ||
1850 | # Find a good install program. We prefer a C program (faster), | |
1851 | # so one script is as good as another. But avoid the broken or | |
1852 | # incompatible versions: | |
1853 | # SysV /etc/install, /usr/sbin/install | |
1854 | # SunOS /usr/etc/install | |
1855 | # IRIX /sbin/install | |
1856 | # AIX /bin/install | |
1857 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
1858 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
1859 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
1860 | # ./install, which can be erroneously created by make from ./install.sh. | |
1861 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
1862 | echo "configure:1863: checking for a BSD compatible install" >&5 | |
1863 | if test -z "$INSTALL"; then | |
1864 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
1865 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1866 | else | |
1867 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
1868 | for ac_dir in $PATH; do | |
1869 | # Account for people who put trailing slashes in PATH elements. | |
1870 | case "$ac_dir/" in | |
1871 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
1872 | *) | |
1873 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
1874 | # Don't use installbsd from OSF since it installs stuff as root | |
1875 | # by default. | |
1876 | for ac_prog in ginstall scoinst install; do | |
1877 | if test -f $ac_dir/$ac_prog; then | |
1878 | if test $ac_prog = install && | |
1879 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
1880 | # AIX install. It has an incompatible calling convention. | |
1881 | : | |
1882 | else | |
1883 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
1884 | break 2 | |
1885 | fi | |
1886 | fi | |
1887 | done | |
1888 | ;; | |
1889 | esac | |
1890 | done | |
1891 | IFS="$ac_save_IFS" | |
1892 | ||
1893 | fi | |
1894 | if test "${ac_cv_path_install+set}" = set; then | |
1895 | INSTALL="$ac_cv_path_install" | |
1896 | else | |
1897 | # As a last resort, use the slow shell script. We don't cache a | |
1898 | # path for INSTALL within a source directory, because that will | |
1899 | # break other packages using the cache if that directory is | |
1900 | # removed, or if the path is relative. | |
1901 | INSTALL="$ac_install_sh" | |
1902 | fi | |
1903 | fi | |
1904 | echo "$ac_t""$INSTALL" 1>&6 | |
1905 | ||
1906 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
1907 | # It thinks the first close brace ends the variable substitution. | |
1908 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
1909 | ||
1910 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
1911 | ||
1912 | ||
1913 | # Put a plausible default for CC_FOR_BUILD in Makefile. | |
1914 | if test "x$cross_compiling" = "xno"; then | |
1915 | CC_FOR_BUILD='$(CC)' | |
1916 | else | |
1917 | CC_FOR_BUILD=gcc | |
1918 | fi | |
1919 | ||
1920 | ||
1921 | ||
1922 | ||
1923 | AR=${AR-ar} | |
1924 | ||
1925 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1926 | set dummy ranlib; ac_word=$2 | |
1927 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
1928 | echo "configure:1929: checking for $ac_word" >&5 | |
1929 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then | |
1930 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1931 | else | |
1932 | if test -n "$RANLIB"; then | |
1933 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1934 | else | |
1935 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1936 | for ac_dir in $PATH; do | |
1937 | test -z "$ac_dir" && ac_dir=. | |
1938 | if test -f $ac_dir/$ac_word; then | |
1939 | ac_cv_prog_RANLIB="ranlib" | |
1940 | break | |
1941 | fi | |
1942 | done | |
1943 | IFS="$ac_save_ifs" | |
1944 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1945 | fi | |
1946 | fi | |
1947 | RANLIB="$ac_cv_prog_RANLIB" | |
1948 | if test -n "$RANLIB"; then | |
1949 | echo "$ac_t""$RANLIB" 1>&6 | |
1950 | else | |
1951 | echo "$ac_t""no" 1>&6 | |
1952 | fi | |
1953 | ||
1954 | ||
1955 | ALL_LINGUAS= | |
1956 | ||
1957 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
1958 | unistd.h values.h sys/param.h | |
1959 | do | |
1960 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1961 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
1962 | echo "configure:1963: checking for $ac_hdr" >&5 | |
1963 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
1964 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1965 | else | |
1966 | cat > conftest.$ac_ext <<EOF | |
1967 | #line 1968 "configure" | |
1968 | #include "confdefs.h" | |
1969 | #include <$ac_hdr> | |
1970 | EOF | |
1971 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
1972 | { (eval echo configure:1973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
1973 | ac_err=`grep -v '^ *+' conftest.out` | |
1974 | if test -z "$ac_err"; then | |
1975 | rm -rf conftest* | |
1976 | eval "ac_cv_header_$ac_safe=yes" | |
1977 | else | |
1978 | echo "$ac_err" >&5 | |
1979 | echo "configure: failed program was:" >&5 | |
1980 | cat conftest.$ac_ext >&5 | |
1981 | rm -rf conftest* | |
1982 | eval "ac_cv_header_$ac_safe=no" | |
1983 | fi | |
1984 | rm -f conftest* | |
1985 | fi | |
1986 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1987 | echo "$ac_t""yes" 1>&6 | |
1988 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1989 | cat >> confdefs.h <<EOF | |
1990 | #define $ac_tr_hdr 1 | |
1991 | EOF | |
1992 | ||
1993 | else | |
1994 | echo "$ac_t""no" 1>&6 | |
1995 | fi | |
1996 | done | |
1997 | ||
1998 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
1999 | __argz_count __argz_stringify __argz_next | |
2000 | do | |
2001 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
2002 | echo "configure:2003: checking for $ac_func" >&5 | |
2003 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then | |
2004 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2005 | else | |
2006 | cat > conftest.$ac_ext <<EOF | |
2007 | #line 2008 "configure" | |
2008 | #include "confdefs.h" | |
2009 | /* System header to define __stub macros and hopefully few prototypes, | |
2010 | which can conflict with char $ac_func(); below. */ | |
2011 | #include <assert.h> | |
2012 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2013 | /* We use char because int might match the return type of a gcc2 | |
2014 | builtin and then its argument prototype would still apply. */ | |
2015 | char $ac_func(); | |
2016 | ||
2017 | int main() { | |
2018 | ||
2019 | /* The GNU C library defines this for functions which it implements | |
2020 | to always fail with ENOSYS. Some functions are actually named | |
2021 | something starting with __ and the normal name is an alias. */ | |
2022 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2023 | choke me | |
2024 | #else | |
2025 | $ac_func(); | |
2026 | #endif | |
2027 | ||
2028 | ; return 0; } | |
2029 | EOF | |
2030 | if { (eval echo configure:2031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
2031 | rm -rf conftest* | |
2032 | eval "ac_cv_func_$ac_func=yes" | |
2033 | else | |
2034 | echo "configure: failed program was:" >&5 | |
2035 | cat conftest.$ac_ext >&5 | |
2036 | rm -rf conftest* | |
2037 | eval "ac_cv_func_$ac_func=no" | |
2038 | fi | |
2039 | rm -f conftest* | |
2040 | fi | |
2041 | ||
2042 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2043 | echo "$ac_t""yes" 1>&6 | |
2044 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2045 | cat >> confdefs.h <<EOF | |
2046 | #define $ac_tr_func 1 | |
2047 | EOF | |
2048 | ||
2049 | else | |
2050 | echo "$ac_t""no" 1>&6 | |
2051 | fi | |
2052 | done | |
2053 | ||
2054 | ||
2055 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
2056 | for ac_func in stpcpy | |
2057 | do | |
2058 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
2059 | echo "configure:2060: checking for $ac_func" >&5 | |
2060 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then | |
2061 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2062 | else | |
2063 | cat > conftest.$ac_ext <<EOF | |
2064 | #line 2065 "configure" | |
2065 | #include "confdefs.h" | |
2066 | /* System header to define __stub macros and hopefully few prototypes, | |
2067 | which can conflict with char $ac_func(); below. */ | |
2068 | #include <assert.h> | |
2069 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2070 | /* We use char because int might match the return type of a gcc2 | |
2071 | builtin and then its argument prototype would still apply. */ | |
2072 | char $ac_func(); | |
2073 | ||
2074 | int main() { | |
2075 | ||
2076 | /* The GNU C library defines this for functions which it implements | |
2077 | to always fail with ENOSYS. Some functions are actually named | |
2078 | something starting with __ and the normal name is an alias. */ | |
2079 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2080 | choke me | |
2081 | #else | |
2082 | $ac_func(); | |
2083 | #endif | |
2084 | ||
2085 | ; return 0; } | |
2086 | EOF | |
2087 | if { (eval echo configure:2088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
2088 | rm -rf conftest* | |
2089 | eval "ac_cv_func_$ac_func=yes" | |
2090 | else | |
2091 | echo "configure: failed program was:" >&5 | |
2092 | cat conftest.$ac_ext >&5 | |
2093 | rm -rf conftest* | |
2094 | eval "ac_cv_func_$ac_func=no" | |
2095 | fi | |
2096 | rm -f conftest* | |
2097 | fi | |
2098 | ||
2099 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2100 | echo "$ac_t""yes" 1>&6 | |
2101 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2102 | cat >> confdefs.h <<EOF | |
2103 | #define $ac_tr_func 1 | |
2104 | EOF | |
2105 | ||
2106 | else | |
2107 | echo "$ac_t""no" 1>&6 | |
2108 | fi | |
2109 | done | |
2110 | ||
2111 | fi | |
2112 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
2113 | cat >> confdefs.h <<\EOF | |
2114 | #define HAVE_STPCPY 1 | |
2115 | EOF | |
2116 | ||
2117 | fi | |
2118 | ||
2119 | if test $ac_cv_header_locale_h = yes; then | |
2120 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
2121 | echo "configure:2122: checking for LC_MESSAGES" >&5 | |
2122 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then | |
2123 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2124 | else | |
2125 | cat > conftest.$ac_ext <<EOF | |
2126 | #line 2127 "configure" | |
2127 | #include "confdefs.h" | |
2128 | #include <locale.h> | |
2129 | int main() { | |
2130 | return LC_MESSAGES | |
2131 | ; return 0; } | |
2132 | EOF | |
2133 | if { (eval echo configure:2134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
2134 | rm -rf conftest* | |
2135 | am_cv_val_LC_MESSAGES=yes | |
2136 | else | |
2137 | echo "configure: failed program was:" >&5 | |
2138 | cat conftest.$ac_ext >&5 | |
2139 | rm -rf conftest* | |
2140 | am_cv_val_LC_MESSAGES=no | |
2141 | fi | |
2142 | rm -f conftest* | |
2143 | fi | |
2144 | ||
2145 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
2146 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2147 | cat >> confdefs.h <<\EOF | |
2148 | #define HAVE_LC_MESSAGES 1 | |
2149 | EOF | |
2150 | ||
2151 | fi | |
2152 | fi | |
2153 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
2154 | echo "configure:2155: checking whether NLS is requested" >&5 | |
2155 | # Check whether --enable-nls or --disable-nls was given. | |
2156 | if test "${enable_nls+set}" = set; then | |
2157 | enableval="$enable_nls" | |
2158 | USE_NLS=$enableval | |
2159 | else | |
2160 | USE_NLS=yes | |
2161 | fi | |
2162 | ||
2163 | echo "$ac_t""$USE_NLS" 1>&6 | |
2164 | ||
2165 | ||
2166 | USE_INCLUDED_LIBINTL=no | |
2167 | ||
2168 | if test "$USE_NLS" = "yes"; then | |
2169 | cat >> confdefs.h <<\EOF | |
2170 | #define ENABLE_NLS 1 | |
2171 | EOF | |
2172 | ||
2173 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
2174 | echo "configure:2175: checking whether included gettext is requested" >&5 | |
2175 | # Check whether --with-included-gettext or --without-included-gettext was given. | |
2176 | if test "${with_included_gettext+set}" = set; then | |
2177 | withval="$with_included_gettext" | |
2178 | nls_cv_force_use_gnu_gettext=$withval | |
2179 | else | |
2180 | nls_cv_force_use_gnu_gettext=no | |
2181 | fi | |
2182 | ||
2183 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
2184 | ||
2185 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
2186 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
2187 | nls_cv_header_intl= | |
2188 | nls_cv_header_libgt= | |
2189 | CATOBJEXT=NONE | |
2190 | ||
2191 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
2192 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
2193 | echo "configure:2194: checking for libintl.h" >&5 | |
2194 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
2195 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2196 | else | |
2197 | cat > conftest.$ac_ext <<EOF | |
2198 | #line 2199 "configure" | |
2199 | #include "confdefs.h" | |
2200 | #include <libintl.h> | |
2201 | EOF | |
2202 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
2203 | { (eval echo configure:2204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
2204 | ac_err=`grep -v '^ *+' conftest.out` | |
2205 | if test -z "$ac_err"; then | |
2206 | rm -rf conftest* | |
2207 | eval "ac_cv_header_$ac_safe=yes" | |
2208 | else | |
2209 | echo "$ac_err" >&5 | |
2210 | echo "configure: failed program was:" >&5 | |
2211 | cat conftest.$ac_ext >&5 | |
2212 | rm -rf conftest* | |
2213 | eval "ac_cv_header_$ac_safe=no" | |
2214 | fi | |
2215 | rm -f conftest* | |
2216 | fi | |
2217 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2218 | echo "$ac_t""yes" 1>&6 | |
2219 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
2220 | echo "configure:2221: checking for gettext in libc" >&5 | |
2221 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then | |
2222 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2223 | else | |
2224 | cat > conftest.$ac_ext <<EOF | |
2225 | #line 2226 "configure" | |
2226 | #include "confdefs.h" | |
2227 | #include <libintl.h> | |
2228 | int main() { | |
2229 | return (int) gettext ("") | |
2230 | ; return 0; } | |
2231 | EOF | |
2232 | if { (eval echo configure:2233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
2233 | rm -rf conftest* | |
2234 | gt_cv_func_gettext_libc=yes | |
2235 | else | |
2236 | echo "configure: failed program was:" >&5 | |
2237 | cat conftest.$ac_ext >&5 | |
2238 | rm -rf conftest* | |
2239 | gt_cv_func_gettext_libc=no | |
2240 | fi | |
2241 | rm -f conftest* | |
2242 | fi | |
2243 | ||
2244 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
2245 | ||
2246 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
2247 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
2248 | echo "configure:2249: checking for bindtextdomain in -lintl" >&5 | |
2249 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` | |
2250 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2251 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2252 | else | |
2253 | ac_save_LIBS="$LIBS" | |
2254 | LIBS="-lintl $LIBS" | |
2255 | cat > conftest.$ac_ext <<EOF | |
2256 | #line 2257 "configure" | |
2257 | #include "confdefs.h" | |
2258 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2259 | /* We use char because int might match the return type of a gcc2 | |
2260 | builtin and then its argument prototype would still apply. */ | |
2261 | char bindtextdomain(); | |
2262 | ||
2263 | int main() { | |
2264 | bindtextdomain() | |
2265 | ; return 0; } | |
2266 | EOF | |
2267 | if { (eval echo configure:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
2268 | rm -rf conftest* | |
2269 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2270 | else | |
2271 | echo "configure: failed program was:" >&5 | |
2272 | cat conftest.$ac_ext >&5 | |
2273 | rm -rf conftest* | |
2274 | eval "ac_cv_lib_$ac_lib_var=no" | |
2275 | fi | |
2276 | rm -f conftest* | |
2277 | LIBS="$ac_save_LIBS" | |
2278 | ||
2279 | fi | |
2280 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2281 | echo "$ac_t""yes" 1>&6 | |
2282 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
2283 | echo "configure:2284: checking for gettext in libintl" >&5 | |
2284 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then | |
2285 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2286 | else | |
2287 | cat > conftest.$ac_ext <<EOF | |
2288 | #line 2289 "configure" | |
2289 | #include "confdefs.h" | |
2290 | ||
2291 | int main() { | |
2292 | return (int) gettext ("") | |
2293 | ; return 0; } | |
2294 | EOF | |
2295 | if { (eval echo configure:2296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
2296 | rm -rf conftest* | |
2297 | gt_cv_func_gettext_libintl=yes | |
2298 | else | |
2299 | echo "configure: failed program was:" >&5 | |
2300 | cat conftest.$ac_ext >&5 | |
2301 | rm -rf conftest* | |
2302 | gt_cv_func_gettext_libintl=no | |
2303 | fi | |
2304 | rm -f conftest* | |
2305 | fi | |
2306 | ||
2307 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
2308 | else | |
2309 | echo "$ac_t""no" 1>&6 | |
2310 | fi | |
2311 | ||
2312 | fi | |
2313 | ||
2314 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
2315 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
2316 | cat >> confdefs.h <<\EOF | |
2317 | #define HAVE_GETTEXT 1 | |
2318 | EOF | |
2319 | ||
2320 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2321 | set dummy msgfmt; ac_word=$2 | |
2322 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
2323 | echo "configure:2324: checking for $ac_word" >&5 | |
2324 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then | |
2325 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2326 | else | |
2327 | case "$MSGFMT" in | |
2328 | /*) | |
2329 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2330 | ;; | |
2331 | *) | |
2332 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2333 | for ac_dir in $PATH; do | |
2334 | test -z "$ac_dir" && ac_dir=. | |
2335 | if test -f $ac_dir/$ac_word; then | |
2336 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2337 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2338 | break | |
2339 | fi | |
2340 | fi | |
2341 | done | |
2342 | IFS="$ac_save_ifs" | |
2343 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
2344 | ;; | |
2345 | esac | |
2346 | fi | |
2347 | MSGFMT="$ac_cv_path_MSGFMT" | |
2348 | if test -n "$MSGFMT"; then | |
2349 | echo "$ac_t""$MSGFMT" 1>&6 | |
2350 | else | |
2351 | echo "$ac_t""no" 1>&6 | |
2352 | fi | |
2353 | if test "$MSGFMT" != "no"; then | |
2354 | for ac_func in dcgettext | |
2355 | do | |
2356 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
2357 | echo "configure:2358: checking for $ac_func" >&5 | |
2358 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then | |
2359 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2360 | else | |
2361 | cat > conftest.$ac_ext <<EOF | |
2362 | #line 2363 "configure" | |
2363 | #include "confdefs.h" | |
2364 | /* System header to define __stub macros and hopefully few prototypes, | |
2365 | which can conflict with char $ac_func(); below. */ | |
2366 | #include <assert.h> | |
2367 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2368 | /* We use char because int might match the return type of a gcc2 | |
2369 | builtin and then its argument prototype would still apply. */ | |
2370 | char $ac_func(); | |
2371 | ||
2372 | int main() { | |
2373 | ||
2374 | /* The GNU C library defines this for functions which it implements | |
2375 | to always fail with ENOSYS. Some functions are actually named | |
2376 | something starting with __ and the normal name is an alias. */ | |
2377 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2378 | choke me | |
2379 | #else | |
2380 | $ac_func(); | |
2381 | #endif | |
2382 | ||
2383 | ; return 0; } | |
2384 | EOF | |
2385 | if { (eval echo configure:2386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
2386 | rm -rf conftest* | |
2387 | eval "ac_cv_func_$ac_func=yes" | |
2388 | else | |
2389 | echo "configure: failed program was:" >&5 | |
2390 | cat conftest.$ac_ext >&5 | |
2391 | rm -rf conftest* | |
2392 | eval "ac_cv_func_$ac_func=no" | |
2393 | fi | |
2394 | rm -f conftest* | |
2395 | fi | |
2396 | ||
2397 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2398 | echo "$ac_t""yes" 1>&6 | |
2399 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2400 | cat >> confdefs.h <<EOF | |
2401 | #define $ac_tr_func 1 | |
2402 | EOF | |
2403 | ||
2404 | else | |
2405 | echo "$ac_t""no" 1>&6 | |
2406 | fi | |
2407 | done | |
2408 | ||
2409 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2410 | set dummy gmsgfmt; ac_word=$2 | |
2411 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
2412 | echo "configure:2413: checking for $ac_word" >&5 | |
2413 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then | |
2414 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2415 | else | |
2416 | case "$GMSGFMT" in | |
2417 | /*) | |
2418 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2419 | ;; | |
2420 | ?:/*) | |
2421 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2422 | ;; | |
2423 | *) | |
2424 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
295dbbe4 SG |
2425 | for ac_dir in $PATH; do |
2426 | test -z "$ac_dir" && ac_dir=. | |
2427 | if test -f $ac_dir/$ac_word; then | |
b1df34b9 | 2428 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" |
295dbbe4 SG |
2429 | break |
2430 | fi | |
2431 | done | |
2432 | IFS="$ac_save_ifs" | |
b1df34b9 TT |
2433 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" |
2434 | ;; | |
2435 | esac | |
295dbbe4 | 2436 | fi |
b1df34b9 TT |
2437 | GMSGFMT="$ac_cv_path_GMSGFMT" |
2438 | if test -n "$GMSGFMT"; then | |
2439 | echo "$ac_t""$GMSGFMT" 1>&6 | |
2440 | else | |
2441 | echo "$ac_t""no" 1>&6 | |
295dbbe4 | 2442 | fi |
b1df34b9 TT |
2443 | |
2444 | # Extract the first word of "xgettext", so it can be a program name with args. | |
2445 | set dummy xgettext; ac_word=$2 | |
2446 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
2447 | echo "configure:2448: checking for $ac_word" >&5 | |
2448 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then | |
2449 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2450 | else | |
2451 | case "$XGETTEXT" in | |
2452 | /*) | |
2453 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2454 | ;; | |
2455 | *) | |
2456 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2457 | for ac_dir in $PATH; do | |
2458 | test -z "$ac_dir" && ac_dir=. | |
2459 | if test -f $ac_dir/$ac_word; then | |
2460 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2461 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2462 | break | |
2463 | fi | |
2464 | fi | |
2465 | done | |
2466 | IFS="$ac_save_ifs" | |
2467 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2468 | ;; | |
2469 | esac | |
2470 | fi | |
2471 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2472 | if test -n "$XGETTEXT"; then | |
2473 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2474 | else | |
2475 | echo "$ac_t""no" 1>&6 | |
2476 | fi | |
2477 | ||
2478 | cat > conftest.$ac_ext <<EOF | |
2479 | #line 2480 "configure" | |
2480 | #include "confdefs.h" | |
2481 | ||
2482 | int main() { | |
2483 | extern int _nl_msg_cat_cntr; | |
2484 | return _nl_msg_cat_cntr | |
2485 | ; return 0; } | |
2486 | EOF | |
2487 | if { (eval echo configure:2488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
2488 | rm -rf conftest* | |
2489 | CATOBJEXT=.gmo | |
2490 | DATADIRNAME=share | |
2491 | else | |
2492 | echo "configure: failed program was:" >&5 | |
2493 | cat conftest.$ac_ext >&5 | |
2494 | rm -rf conftest* | |
2495 | CATOBJEXT=.mo | |
2496 | DATADIRNAME=lib | |
2497 | fi | |
2498 | rm -f conftest* | |
2499 | INSTOBJEXT=.mo | |
2500 | fi | |
2501 | fi | |
2502 | ||
2503 | else | |
2504 | echo "$ac_t""no" 1>&6 | |
2505 | fi | |
2506 | ||
2507 | ||
2508 | ||
2509 | if test "$CATOBJEXT" = "NONE"; then | |
2510 | nls_cv_use_gnu_gettext=yes | |
2511 | fi | |
2512 | fi | |
2513 | ||
2514 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
2515 | INTLOBJS="\$(GETTOBJS)" | |
2516 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
2517 | set dummy msgfmt; ac_word=$2 | |
2518 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
2519 | echo "configure:2520: checking for $ac_word" >&5 | |
2520 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then | |
2521 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2522 | else | |
2523 | case "$MSGFMT" in | |
2524 | /*) | |
2525 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
2526 | ;; | |
2527 | *) | |
2528 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2529 | for ac_dir in $PATH; do | |
2530 | test -z "$ac_dir" && ac_dir=. | |
2531 | if test -f $ac_dir/$ac_word; then | |
2532 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
2533 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
2534 | break | |
2535 | fi | |
2536 | fi | |
2537 | done | |
2538 | IFS="$ac_save_ifs" | |
2539 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
2540 | ;; | |
2541 | esac | |
2542 | fi | |
2543 | MSGFMT="$ac_cv_path_MSGFMT" | |
2544 | if test -n "$MSGFMT"; then | |
2545 | echo "$ac_t""$MSGFMT" 1>&6 | |
2546 | else | |
2547 | echo "$ac_t""no" 1>&6 | |
2548 | fi | |
2549 | ||
2550 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
2551 | set dummy gmsgfmt; ac_word=$2 | |
2552 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
2553 | echo "configure:2554: checking for $ac_word" >&5 | |
2554 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then | |
2555 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2556 | else | |
2557 | case "$GMSGFMT" in | |
2558 | /*) | |
2559 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
2560 | ;; | |
2561 | ?:/*) | |
2562 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
2563 | ;; | |
2564 | *) | |
2565 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2566 | for ac_dir in $PATH; do | |
2567 | test -z "$ac_dir" && ac_dir=. | |
2568 | if test -f $ac_dir/$ac_word; then | |
2569 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
2570 | break | |
2571 | fi | |
2572 | done | |
2573 | IFS="$ac_save_ifs" | |
2574 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
2575 | ;; | |
2576 | esac | |
2577 | fi | |
2578 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
2579 | if test -n "$GMSGFMT"; then | |
2580 | echo "$ac_t""$GMSGFMT" 1>&6 | |
295dbbe4 SG |
2581 | else |
2582 | echo "$ac_t""no" 1>&6 | |
2583 | fi | |
2584 | ||
b1df34b9 TT |
2585 | # Extract the first word of "xgettext", so it can be a program name with args. |
2586 | set dummy xgettext; ac_word=$2 | |
2587 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
2588 | echo "configure:2589: checking for $ac_word" >&5 | |
2589 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then | |
2590 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2591 | else | |
2592 | case "$XGETTEXT" in | |
2593 | /*) | |
2594 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
2595 | ;; | |
2596 | *) | |
2597 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2598 | for ac_dir in $PATH; do | |
2599 | test -z "$ac_dir" && ac_dir=. | |
2600 | if test -f $ac_dir/$ac_word; then | |
2601 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
2602 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
2603 | break | |
2604 | fi | |
2605 | fi | |
2606 | done | |
2607 | IFS="$ac_save_ifs" | |
2608 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
2609 | ;; | |
2610 | esac | |
2611 | fi | |
2612 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
2613 | if test -n "$XGETTEXT"; then | |
2614 | echo "$ac_t""$XGETTEXT" 1>&6 | |
2615 | else | |
2616 | echo "$ac_t""no" 1>&6 | |
2617 | fi | |
2618 | ||
2619 | ||
2620 | USE_INCLUDED_LIBINTL=yes | |
2621 | CATOBJEXT=.gmo | |
2622 | INSTOBJEXT=.mo | |
2623 | DATADIRNAME=share | |
2624 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
2625 | INTLLIBS=$INTLDEPS | |
2626 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
2627 | nls_cv_header_intl=libintl.h | |
2628 | nls_cv_header_libgt=libgettext.h | |
2629 | fi | |
2630 | ||
2631 | if test "$XGETTEXT" != ":"; then | |
2632 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
2633 | : ; | |
2634 | else | |
2635 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
2636 | XGETTEXT=":" | |
2637 | fi | |
2638 | fi | |
2639 | ||
2640 | # We need to process the po/ directory. | |
2641 | POSUB=po | |
2642 | else | |
2643 | DATADIRNAME=share | |
2644 | nls_cv_header_intl=libintl.h | |
2645 | nls_cv_header_libgt=libgettext.h | |
2646 | fi | |
2647 | ||
2648 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
2649 | # because some of the sources are only built for this goal. | |
2650 | if test "$PACKAGE" = gettext; then | |
2651 | USE_NLS=yes | |
2652 | USE_INCLUDED_LIBINTL=yes | |
2653 | fi | |
2654 | ||
2655 | for lang in $ALL_LINGUAS; do | |
2656 | GMOFILES="$GMOFILES $lang.gmo" | |
2657 | POFILES="$POFILES $lang.po" | |
2658 | done | |
2659 | ||
2660 | ||
2661 | ||
2662 | ||
2663 | ||
2664 | ||
2665 | ||
2666 | ||
2667 | ||
2668 | ||
2669 | ||
2670 | ||
2671 | ||
2672 | ||
2673 | if test "x$CATOBJEXT" != "x"; then | |
2674 | if test "x$ALL_LINGUAS" = "x"; then | |
2675 | LINGUAS= | |
2676 | else | |
2677 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
2678 | echo "configure:2679: checking for catalogs to be installed" >&5 | |
2679 | NEW_LINGUAS= | |
2680 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
2681 | case "$ALL_LINGUAS" in | |
2682 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
2683 | esac | |
2684 | done | |
2685 | LINGUAS=$NEW_LINGUAS | |
2686 | echo "$ac_t""$LINGUAS" 1>&6 | |
2687 | fi | |
2688 | ||
2689 | if test -n "$LINGUAS"; then | |
2690 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
2691 | fi | |
2692 | fi | |
2693 | ||
2694 | if test $ac_cv_header_locale_h = yes; then | |
2695 | INCLUDE_LOCALE_H="#include <locale.h>" | |
2696 | else | |
2697 | INCLUDE_LOCALE_H="\ | |
2698 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
2699 | fi | |
2700 | ||
2701 | ||
2702 | if test -f $srcdir/po2tbl.sed.in; then | |
2703 | if test "$CATOBJEXT" = ".cat"; then | |
2704 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
2705 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
2706 | echo "configure:2707: checking for linux/version.h" >&5 | |
2707 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
2708 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2709 | else | |
2710 | cat > conftest.$ac_ext <<EOF | |
2711 | #line 2712 "configure" | |
2712 | #include "confdefs.h" | |
2713 | #include <linux/version.h> | |
2714 | EOF | |
2715 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
2716 | { (eval echo configure:2717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
2717 | ac_err=`grep -v '^ *+' conftest.out` | |
2718 | if test -z "$ac_err"; then | |
2719 | rm -rf conftest* | |
2720 | eval "ac_cv_header_$ac_safe=yes" | |
2721 | else | |
2722 | echo "$ac_err" >&5 | |
2723 | echo "configure: failed program was:" >&5 | |
2724 | cat conftest.$ac_ext >&5 | |
2725 | rm -rf conftest* | |
2726 | eval "ac_cv_header_$ac_safe=no" | |
2727 | fi | |
2728 | rm -f conftest* | |
2729 | fi | |
2730 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2731 | echo "$ac_t""yes" 1>&6 | |
2732 | msgformat=linux | |
2733 | else | |
2734 | echo "$ac_t""no" 1>&6 | |
2735 | msgformat=xopen | |
2736 | fi | |
2737 | ||
2738 | ||
2739 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed | |
2740 | fi | |
2741 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
2742 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
2743 | fi | |
2744 | ||
2745 | if test "$PACKAGE" = "gettext"; then | |
2746 | GT_NO="#NO#" | |
2747 | GT_YES= | |
2748 | else | |
2749 | GT_NO= | |
2750 | GT_YES="#YES#" | |
2751 | fi | |
2752 | ||
2753 | ||
2754 | ||
2755 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
2756 | ||
2757 | ||
2758 | l= | |
2759 | ||
2760 | ||
2761 | if test -d $srcdir/po; then | |
2762 | test -d po || mkdir po | |
2763 | if test "x$srcdir" != "x."; then | |
2764 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
2765 | posrcprefix="$srcdir/" | |
2766 | else | |
2767 | posrcprefix="../$srcdir/" | |
2768 | fi | |
2769 | else | |
2770 | posrcprefix="../" | |
2771 | fi | |
2772 | rm -f po/POTFILES | |
2773 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
2774 | < $srcdir/po/POTFILES.in > po/POTFILES | |
2775 | fi | |
2776 | ||
295dbbe4 | 2777 | |
fbda74b1 | 2778 | # Check for common headers. |
6fea4763 DE |
2779 | # FIXME: Seems to me this can cause problems for i386-windows hosts. |
2780 | # At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*. | |
b1df34b9 TT |
2781 | for ac_hdr in stdlib.h string.h strings.h unistd.h time.h |
2782 | do | |
2783 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2784 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
2785 | echo "configure:2786: checking for $ac_hdr" >&5 | |
2786 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
2787 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2788 | else | |
2789 | cat > conftest.$ac_ext <<EOF | |
2790 | #line 2791 "configure" | |
2791 | #include "confdefs.h" | |
2792 | #include <$ac_hdr> | |
2793 | EOF | |
2794 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
2795 | { (eval echo configure:2796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
2796 | ac_err=`grep -v '^ *+' conftest.out` | |
2797 | if test -z "$ac_err"; then | |
2798 | rm -rf conftest* | |
2799 | eval "ac_cv_header_$ac_safe=yes" | |
2800 | else | |
2801 | echo "$ac_err" >&5 | |
2802 | echo "configure: failed program was:" >&5 | |
2803 | cat conftest.$ac_ext >&5 | |
2804 | rm -rf conftest* | |
2805 | eval "ac_cv_header_$ac_safe=no" | |
2806 | fi | |
2807 | rm -f conftest* | |
2808 | fi | |
2809 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2810 | echo "$ac_t""yes" 1>&6 | |
2811 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2812 | cat >> confdefs.h <<EOF | |
2813 | #define $ac_tr_hdr 1 | |
2814 | EOF | |
2815 | ||
2816 | else | |
2817 | echo "$ac_t""no" 1>&6 | |
2818 | fi | |
2819 | done | |
2820 | ||
2821 | for ac_hdr in sys/time.h sys/resource.h | |
2822 | do | |
2823 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2824 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
2825 | echo "configure:2826: checking for $ac_hdr" >&5 | |
2826 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
2827 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2828 | else | |
2829 | cat > conftest.$ac_ext <<EOF | |
2830 | #line 2831 "configure" | |
2831 | #include "confdefs.h" | |
2832 | #include <$ac_hdr> | |
2833 | EOF | |
2834 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
2835 | { (eval echo configure:2836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
2836 | ac_err=`grep -v '^ *+' conftest.out` | |
2837 | if test -z "$ac_err"; then | |
2838 | rm -rf conftest* | |
2839 | eval "ac_cv_header_$ac_safe=yes" | |
2840 | else | |
2841 | echo "$ac_err" >&5 | |
2842 | echo "configure: failed program was:" >&5 | |
2843 | cat conftest.$ac_ext >&5 | |
2844 | rm -rf conftest* | |
2845 | eval "ac_cv_header_$ac_safe=no" | |
2846 | fi | |
2847 | rm -f conftest* | |
2848 | fi | |
2849 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2850 | echo "$ac_t""yes" 1>&6 | |
2851 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
2852 | cat >> confdefs.h <<EOF | |
2853 | #define $ac_tr_hdr 1 | |
2854 | EOF | |
2855 | ||
2856 | else | |
2857 | echo "$ac_t""no" 1>&6 | |
2858 | fi | |
2859 | done | |
2860 | ||
2861 | for ac_hdr in fcntl.h fpu_control.h | |
fbda74b1 | 2862 | do |
6fea4763 | 2863 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
fbda74b1 | 2864 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
b1df34b9 | 2865 | echo "configure:2866: checking for $ac_hdr" >&5 |
fbda74b1 DE |
2866 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2867 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2868 | else | |
2869 | cat > conftest.$ac_ext <<EOF | |
b1df34b9 | 2870 | #line 2871 "configure" |
fbda74b1 DE |
2871 | #include "confdefs.h" |
2872 | #include <$ac_hdr> | |
2873 | EOF | |
2874 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b1df34b9 | 2875 | { (eval echo configure:2876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
fbda74b1 DE |
2876 | ac_err=`grep -v '^ *+' conftest.out` |
2877 | if test -z "$ac_err"; then | |
2878 | rm -rf conftest* | |
2879 | eval "ac_cv_header_$ac_safe=yes" | |
2880 | else | |
2881 | echo "$ac_err" >&5 | |
6fea4763 DE |
2882 | echo "configure: failed program was:" >&5 |
2883 | cat conftest.$ac_ext >&5 | |
fbda74b1 DE |
2884 | rm -rf conftest* |
2885 | eval "ac_cv_header_$ac_safe=no" | |
2886 | fi | |
2887 | rm -f conftest* | |
2888 | fi | |
2889 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2890 | echo "$ac_t""yes" 1>&6 | |
6fea4763 | 2891 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
fbda74b1 DE |
2892 | cat >> confdefs.h <<EOF |
2893 | #define $ac_tr_hdr 1 | |
2894 | EOF | |
2895 | ||
2896 | else | |
2897 | echo "$ac_t""no" 1>&6 | |
2898 | fi | |
2899 | done | |
2900 | ||
b1df34b9 | 2901 | for ac_func in getrusage time sigaction __setfpucw |
6fea4763 DE |
2902 | do |
2903 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
b1df34b9 | 2904 | echo "configure:2905: checking for $ac_func" >&5 |
6fea4763 DE |
2905 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2906 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2907 | else | |
2908 | cat > conftest.$ac_ext <<EOF | |
b1df34b9 | 2909 | #line 2910 "configure" |
6fea4763 DE |
2910 | #include "confdefs.h" |
2911 | /* System header to define __stub macros and hopefully few prototypes, | |
2912 | which can conflict with char $ac_func(); below. */ | |
2913 | #include <assert.h> | |
2914 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2915 | /* We use char because int might match the return type of a gcc2 | |
2916 | builtin and then its argument prototype would still apply. */ | |
2917 | char $ac_func(); | |
2918 | ||
2919 | int main() { | |
2920 | ||
2921 | /* The GNU C library defines this for functions which it implements | |
2922 | to always fail with ENOSYS. Some functions are actually named | |
2923 | something starting with __ and the normal name is an alias. */ | |
2924 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2925 | choke me | |
2926 | #else | |
2927 | $ac_func(); | |
2928 | #endif | |
2929 | ||
2930 | ; return 0; } | |
2931 | EOF | |
b1df34b9 | 2932 | if { (eval echo configure:2933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
6fea4763 DE |
2933 | rm -rf conftest* |
2934 | eval "ac_cv_func_$ac_func=yes" | |
2935 | else | |
2936 | echo "configure: failed program was:" >&5 | |
2937 | cat conftest.$ac_ext >&5 | |
2938 | rm -rf conftest* | |
2939 | eval "ac_cv_func_$ac_func=no" | |
2940 | fi | |
2941 | rm -f conftest* | |
2942 | fi | |
2943 | ||
2944 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
2945 | echo "$ac_t""yes" 1>&6 | |
2946 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2947 | cat >> confdefs.h <<EOF | |
2948 | #define $ac_tr_func 1 | |
2949 | EOF | |
2950 | ||
2951 | else | |
2952 | echo "$ac_t""no" 1>&6 | |
2953 | fi | |
2954 | done | |
2955 | ||
fbda74b1 | 2956 | |
295dbbe4 SG |
2957 | . ${srcdir}/../../bfd/configure.host |
2958 | ||
2959 | ||
601fb8ae | 2960 | |
b1df34b9 | 2961 | USE_MAINTAINER_MODE=no |
462cfbc4 DE |
2962 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
2963 | if test "${enable_maintainer_mode+set}" = set; then | |
2964 | enableval="$enable_maintainer_mode" | |
2965 | case "${enableval}" in | |
b1df34b9 | 2966 | yes) MAINT="" USE_MAINTAINER_MODE=yes ;; |
462cfbc4 DE |
2967 | no) MAINT="#" ;; |
2968 | *) { echo "configure: error: "--enable-maintainer-mode does not take a value"" 1>&2; exit 1; }; MAINT="#" ;; | |
2969 | esac | |
2970 | if test x"$silent" != x"yes" && test x"$MAINT" = x""; then | |
2971 | echo "Setting maintainer mode" 6>&1 | |
2972 | fi | |
2973 | else | |
2974 | MAINT="#" | |
2975 | fi | |
2976 | ||
2977 | ||
2978 | ||
601fb8ae MM |
2979 | # Check whether --enable-sim-bswap or --disable-sim-bswap was given. |
2980 | if test "${enable_sim_bswap+set}" = set; then | |
2981 | enableval="$enable_sim_bswap" | |
2982 | case "${enableval}" in | |
a77aa7ec | 2983 | yes) sim_bswap="-DWITH_BSWAP=1 -DUSE_BSWAP=1";; |
601fb8ae MM |
2984 | no) sim_bswap="-DWITH_BSWAP=0";; |
2985 | *) { echo "configure: error: "--enable-sim-bswap does not take a value"" 1>&2; exit 1; }; sim_bswap="";; | |
2986 | esac | |
2987 | if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then | |
2988 | echo "Setting bswap flags = $sim_bswap" 6>&1 | |
2989 | fi | |
2990 | else | |
2991 | sim_bswap="" | |
2992 | fi | |
2993 | ||
2994 | ||
2995 | ||
295dbbe4 SG |
2996 | # Check whether --enable-sim-cflags or --disable-sim-cflags was given. |
2997 | if test "${enable_sim_cflags+set}" = set; then | |
2998 | enableval="$enable_sim_cflags" | |
2999 | case "${enableval}" in | |
b1df34b9 | 3000 | yes) sim_cflags="-O2 -fomit-frame-pointer";; |
295dbbe4 SG |
3001 | trace) { echo "configure: error: "Please use --enable-sim-debug instead."" 1>&2; exit 1; }; sim_cflags="";; |
3002 | no) sim_cflags="";; | |
3003 | *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
3004 | esac | |
3005 | if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then | |
3006 | echo "Setting sim cflags = $sim_cflags" 6>&1 | |
3007 | fi | |
3008 | else | |
3009 | sim_cflags="" | |
3010 | fi | |
3011 | ||
3012 | ||
601fb8ae | 3013 | |
295dbbe4 SG |
3014 | # Check whether --enable-sim-debug or --disable-sim-debug was given. |
3015 | if test "${enable_sim_debug+set}" = set; then | |
3016 | enableval="$enable_sim_debug" | |
3017 | case "${enableval}" in | |
fbda74b1 DE |
3018 | yes) sim_debug="-DDEBUG=7 -DWITH_DEBUG=7";; |
3019 | no) sim_debug="-DDEBUG=0 -DWITH_DEBUG=0";; | |
3020 | *) sim_debug="-DDEBUG='(${enableval})' -DWITH_DEBUG='(${enableval})'";; | |
295dbbe4 SG |
3021 | esac |
3022 | if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then | |
3023 | echo "Setting sim debug = $sim_debug" 6>&1 | |
3024 | fi | |
3025 | else | |
3026 | sim_debug="" | |
3027 | fi | |
3028 | ||
3029 | ||
601fb8ae | 3030 | |
a35e91c3 AC |
3031 | # Check whether --enable-sim-stdio or --disable-sim-stdio was given. |
3032 | if test "${enable_sim_stdio+set}" = set; then | |
3033 | enableval="$enable_sim_stdio" | |
3034 | case "${enableval}" in | |
3035 | yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";; | |
3036 | no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";; | |
3037 | *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-stdio"" 1>&2; exit 1; }; sim_stdio="";; | |
3038 | esac | |
3039 | if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then | |
3040 | echo "Setting stdio flags = $sim_stdio" 6>&1 | |
3041 | fi | |
3042 | else | |
3043 | sim_stdio="" | |
3044 | fi | |
a77aa7ec AC |
3045 | |
3046 | ||
3047 | ||
295dbbe4 SG |
3048 | # Check whether --enable-sim-trace or --disable-sim-trace was given. |
3049 | if test "${enable_sim_trace+set}" = set; then | |
3050 | enableval="$enable_sim_trace" | |
3051 | case "${enableval}" in | |
6fea4763 | 3052 | yes) sim_trace="-DTRACE=1 -DWITH_TRACE=-1";; |
a77aa7ec | 3053 | no) sim_trace="-DTRACE=0 -DWITH_TRACE=0";; |
6fea4763 DE |
3054 | [-0-9]*) |
3055 | sim_trace="-DTRACE='(${enableval})' -DWITH_TRACE='(${enableval})'";; | |
3056 | [a-z]*) | |
3057 | sim_trace="" | |
3058 | for x in `echo "$enableval" | sed -e "s/,/ /g"`; do | |
3059 | if test x"$sim_trace" = x; then | |
3060 | sim_trace="-DWITH_TRACE='(TRACE_$x" | |
3061 | else | |
3062 | sim_trace="${sim_trace}|TRACE_$x" | |
3063 | fi | |
3064 | done | |
3065 | sim_trace="$sim_trace)'" ;; | |
295dbbe4 SG |
3066 | esac |
3067 | if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then | |
3068 | echo "Setting sim trace = $sim_trace" 6>&1 | |
3069 | fi | |
3070 | else | |
3071 | sim_trace="" | |
3072 | fi | |
3073 | ||
3074 | ||
295dbbe4 | 3075 | |
6fea4763 DE |
3076 | # Check whether --enable-sim-profile or --disable-sim-profile was given. |
3077 | if test "${enable_sim_profile+set}" = set; then | |
3078 | enableval="$enable_sim_profile" | |
3079 | case "${enableval}" in | |
3080 | yes) sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1";; | |
3081 | no) sim_profile="-DPROFILE=0 -DWITH_PROFILE=0";; | |
3082 | [-0-9]*) | |
3083 | sim_profile="-DPROFILE='(${enableval})' -DWITH_PROFILE='(${enableval})'";; | |
3084 | [a-z]*) | |
3085 | sim_profile="" | |
3086 | for x in `echo "$enableval" | sed -e "s/,/ /g"`; do | |
3087 | if test x"$sim_profile" = x; then | |
3088 | sim_profile="-DWITH_PROFILE='(PROFILE_$x" | |
3089 | else | |
3090 | sim_profile="${sim_profile}|PROFILE_$x" | |
3091 | fi | |
3092 | done | |
3093 | sim_profile="$sim_profile)'" ;; | |
3094 | esac | |
3095 | if test x"$silent" != x"yes" && test x"$sim_profile" != x""; then | |
3096 | echo "Setting sim profile = $sim_profile" 6>&1 | |
3097 | fi | |
3098 | else | |
3099 | sim_profile="" | |
3100 | fi | |
3101 | ||
3102 | ||
3103 | ||
08db4a65 | 3104 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 |
b1df34b9 | 3105 | echo "configure:3106: checking return type of signal handlers" >&5 |
08db4a65 AC |
3106 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
3107 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3108 | else | |
3109 | cat > conftest.$ac_ext <<EOF | |
b1df34b9 | 3110 | #line 3111 "configure" |
08db4a65 AC |
3111 | #include "confdefs.h" |
3112 | #include <sys/types.h> | |
3113 | #include <signal.h> | |
3114 | #ifdef signal | |
3115 | #undef signal | |
3116 | #endif | |
3117 | #ifdef __cplusplus | |
3118 | extern "C" void (*signal (int, void (*)(int)))(int); | |
3119 | #else | |
3120 | void (*signal ()) (); | |
3121 | #endif | |
3122 | ||
6fea4763 | 3123 | int main() { |
08db4a65 AC |
3124 | int i; |
3125 | ; return 0; } | |
3126 | EOF | |
b1df34b9 | 3127 | if { (eval echo configure:3128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
08db4a65 AC |
3128 | rm -rf conftest* |
3129 | ac_cv_type_signal=void | |
3130 | else | |
6fea4763 DE |
3131 | echo "configure: failed program was:" >&5 |
3132 | cat conftest.$ac_ext >&5 | |
08db4a65 AC |
3133 | rm -rf conftest* |
3134 | ac_cv_type_signal=int | |
3135 | fi | |
3136 | rm -f conftest* | |
08db4a65 AC |
3137 | fi |
3138 | ||
3139 | echo "$ac_t""$ac_cv_type_signal" 1>&6 | |
3140 | cat >> confdefs.h <<EOF | |
3141 | #define RETSIGTYPE $ac_cv_type_signal | |
3142 | EOF | |
3143 | ||
3144 | ||
3145 | ||
3146 | ||
295dbbe4 SG |
3147 | sim_link_files= |
3148 | sim_link_links= | |
3149 | ||
3150 | sim_link_links=tconfig.h | |
3151 | if test -f ${srcdir}/tconfig.in | |
3152 | then | |
3153 | sim_link_files=tconfig.in | |
3154 | else | |
3155 | sim_link_files=../common/tconfig.in | |
3156 | fi | |
3157 | ||
601fb8ae | 3158 | # targ-vals.def points to the libc macro description file. |
295dbbe4 | 3159 | case "${target}" in |
601fb8ae | 3160 | *-*-*) TARG_VALS_DEF=../common/nltvals.def ;; |
295dbbe4 | 3161 | esac |
601fb8ae MM |
3162 | sim_link_files="${sim_link_files} ${TARG_VALS_DEF}" |
3163 | sim_link_links="${sim_link_links} targ-vals.def" | |
295dbbe4 SG |
3164 | |
3165 | ||
c632873c | 3166 | |
295dbbe4 SG |
3167 | for ac_hdr in unistd.h |
3168 | do | |
6fea4763 | 3169 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
295dbbe4 | 3170 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
b1df34b9 | 3171 | echo "configure:3172: checking for $ac_hdr" >&5 |
295dbbe4 SG |
3172 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3173 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3174 | else | |
3175 | cat > conftest.$ac_ext <<EOF | |
b1df34b9 | 3176 | #line 3177 "configure" |
295dbbe4 SG |
3177 | #include "confdefs.h" |
3178 | #include <$ac_hdr> | |
3179 | EOF | |
3180 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
b1df34b9 | 3181 | { (eval echo configure:3182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
295dbbe4 SG |
3182 | ac_err=`grep -v '^ *+' conftest.out` |
3183 | if test -z "$ac_err"; then | |
3184 | rm -rf conftest* | |
3185 | eval "ac_cv_header_$ac_safe=yes" | |
3186 | else | |
3187 | echo "$ac_err" >&5 | |
6fea4763 DE |
3188 | echo "configure: failed program was:" >&5 |
3189 | cat conftest.$ac_ext >&5 | |
295dbbe4 SG |
3190 | rm -rf conftest* |
3191 | eval "ac_cv_header_$ac_safe=no" | |
3192 | fi | |
3193 | rm -f conftest* | |
3194 | fi | |
3195 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3196 | echo "$ac_t""yes" 1>&6 | |
6fea4763 | 3197 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
295dbbe4 SG |
3198 | cat >> confdefs.h <<EOF |
3199 | #define $ac_tr_hdr 1 | |
3200 | EOF | |
3201 | ||
3202 | else | |
3203 | echo "$ac_t""no" 1>&6 | |
3204 | fi | |
3205 | done | |
3206 | ||
3207 | ||
3208 | ||
3209 | ||
601fb8ae | 3210 | trap '' 1 2 15 |
c632873c C |
3211 | cat > confcache <<\EOF |
3212 | # This file is a shell script that caches the results of configure | |
3213 | # tests run on this system so they can be shared between configure | |
3214 | # scripts and configure runs. It is not useful on other systems. | |
3215 | # If it contains results you don't want to keep, you may remove or edit it. | |
3216 | # | |
3217 | # By default, configure uses ./config.cache as the cache file, | |
3218 | # creating it if it does not exist already. You can give configure | |
3219 | # the --cache-file=FILE option to use a different cache file; that is | |
3220 | # what configure does when it calls configure scripts in | |
3221 | # subdirectories, so they share the cache. | |
3222 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
3223 | # config.status only pays attention to the cache file if you give it the | |
3224 | # --recheck option to rerun configure. | |
3225 | # | |
3226 | EOF | |
6fea4763 DE |
3227 | # The following way of writing the cache mishandles newlines in values, |
3228 | # but we know of no workaround that is simple, portable, and efficient. | |
3229 | # So, don't put newlines in cache variables' values. | |
c632873c C |
3230 | # Ultrix sh set writes to stderr and can't be redirected directly, |
3231 | # and sets the high bit in the cache file unless we assign to the vars. | |
3232 | (set) 2>&1 | | |
462cfbc4 | 3233 | case `(ac_space=' '; set) 2>&1 | grep ac_space` in |
6fea4763 DE |
3234 | *ac_space=\ *) |
3235 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
3236 | # turns \\\\ into \\, and sed turns \\ into \). | |
3237 | sed -n \ | |
3238 | -e "s/'/'\\\\''/g" \ | |
3239 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
3240 | ;; | |
3241 | *) | |
3242 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
3243 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
3244 | ;; | |
3245 | esac >> confcache | |
c632873c C |
3246 | if cmp -s $cache_file confcache; then |
3247 | : | |
3248 | else | |
3249 | if test -w $cache_file; then | |
3250 | echo "updating cache $cache_file" | |
3251 | cat confcache > $cache_file | |
3252 | else | |
3253 | echo "not updating unwritable cache $cache_file" | |
3254 | fi | |
3255 | fi | |
3256 | rm -f confcache | |
3257 | ||
3258 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
3259 | ||
3260 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
3261 | # Let make expand exec_prefix. | |
3262 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
3263 | ||
3264 | # Any assignment to VPATH causes Sun make to only execute | |
3265 | # the first set of double-colon rules, so remove it if not needed. | |
3266 | # If there is a colon in the path, we need to keep it. | |
3267 | if test "x$srcdir" = x.; then | |
3268 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
3269 | fi | |
3270 | ||
3271 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
3272 | ||
295dbbe4 | 3273 | DEFS=-DHAVE_CONFIG_H |
c632873c C |
3274 | |
3275 | # Without the "./", some shells look in PATH for config.status. | |
3276 | : ${CONFIG_STATUS=./config.status} | |
3277 | ||
3278 | echo creating $CONFIG_STATUS | |
3279 | rm -f $CONFIG_STATUS | |
3280 | cat > $CONFIG_STATUS <<EOF | |
3281 | #! /bin/sh | |
3282 | # Generated automatically by configure. | |
3283 | # Run this file to recreate the current configuration. | |
3284 | # This directory was configured as follows, | |
3285 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
3286 | # | |
3287 | # $0 $ac_configure_args | |
3288 | # | |
3289 | # Compiler output produced by configure, useful for debugging | |
3290 | # configure, is in ./config.log if it exists. | |
3291 | ||
3292 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
3293 | for ac_option | |
3294 | do | |
3295 | case "\$ac_option" in | |
3296 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
3297 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
3298 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
3299 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
462cfbc4 | 3300 | echo "$CONFIG_STATUS generated by autoconf version 2.12.1" |
c632873c C |
3301 | exit 0 ;; |
3302 | -help | --help | --hel | --he | --h) | |
3303 | echo "\$ac_cs_usage"; exit 0 ;; | |
3304 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
3305 | esac | |
3306 | done | |
3307 | ||
3308 | ac_given_srcdir=$srcdir | |
3309 | ac_given_INSTALL="$INSTALL" | |
3310 | ||
6fea4763 | 3311 | trap 'rm -fr `echo "Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
295dbbe4 SG |
3312 | EOF |
3313 | cat >> $CONFIG_STATUS <<EOF | |
c632873c | 3314 | |
295dbbe4 SG |
3315 | # Protect against being on the right side of a sed subst in config.status. |
3316 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
3317 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
c632873c C |
3318 | $ac_vpsub |
3319 | $extrasub | |
462cfbc4 | 3320 | s%@sim_environment@%$sim_environment%g |
92f91d1f AC |
3321 | s%@sim_alignment@%$sim_alignment%g |
3322 | s%@sim_assert@%$sim_assert%g | |
462cfbc4 | 3323 | s%@sim_bitsize@%$sim_bitsize%g |
92f91d1f AC |
3324 | s%@sim_endian@%$sim_endian%g |
3325 | s%@sim_hostendian@%$sim_hostendian%g | |
3326 | s%@sim_float@%$sim_float%g | |
3327 | s%@sim_scache@%$sim_scache%g | |
3328 | s%@sim_default_model@%$sim_default_model%g | |
3329 | s%@sim_hardware@%$sim_hardware%g | |
b1df34b9 TT |
3330 | s%@sim_hw_obj@%$sim_hw_obj%g |
3331 | s%@sim_hw@%$sim_hw%g | |
92f91d1f AC |
3332 | s%@sim_inline@%$sim_inline%g |
3333 | s%@sim_packages@%$sim_packages%g | |
3334 | s%@sim_regparm@%$sim_regparm%g | |
3335 | s%@sim_reserved_bits@%$sim_reserved_bits%g | |
3336 | s%@sim_smp@%$sim_smp%g | |
3337 | s%@sim_stdcall@%$sim_stdcall%g | |
3338 | s%@sim_xor_endian@%$sim_xor_endian%g | |
3339 | s%@sim_warnings@%$sim_warnings%g | |
462cfbc4 | 3340 | s%@SHELL@%$SHELL%g |
c632873c C |
3341 | s%@CFLAGS@%$CFLAGS%g |
3342 | s%@CPPFLAGS@%$CPPFLAGS%g | |
3343 | s%@CXXFLAGS@%$CXXFLAGS%g | |
3344 | s%@DEFS@%$DEFS%g | |
3345 | s%@LDFLAGS@%$LDFLAGS%g | |
3346 | s%@LIBS@%$LIBS%g | |
3347 | s%@exec_prefix@%$exec_prefix%g | |
3348 | s%@prefix@%$prefix%g | |
3349 | s%@program_transform_name@%$program_transform_name%g | |
3350 | s%@bindir@%$bindir%g | |
3351 | s%@sbindir@%$sbindir%g | |
3352 | s%@libexecdir@%$libexecdir%g | |
3353 | s%@datadir@%$datadir%g | |
3354 | s%@sysconfdir@%$sysconfdir%g | |
3355 | s%@sharedstatedir@%$sharedstatedir%g | |
3356 | s%@localstatedir@%$localstatedir%g | |
3357 | s%@libdir@%$libdir%g | |
3358 | s%@includedir@%$includedir%g | |
3359 | s%@oldincludedir@%$oldincludedir%g | |
3360 | s%@infodir@%$infodir%g | |
3361 | s%@mandir@%$mandir%g | |
3362 | s%@host@%$host%g | |
3363 | s%@host_alias@%$host_alias%g | |
3364 | s%@host_cpu@%$host_cpu%g | |
3365 | s%@host_vendor@%$host_vendor%g | |
3366 | s%@host_os@%$host_os%g | |
3367 | s%@target@%$target%g | |
3368 | s%@target_alias@%$target_alias%g | |
3369 | s%@target_cpu@%$target_cpu%g | |
3370 | s%@target_vendor@%$target_vendor%g | |
3371 | s%@target_os@%$target_os%g | |
3372 | s%@build@%$build%g | |
3373 | s%@build_alias@%$build_alias%g | |
3374 | s%@build_cpu@%$build_cpu%g | |
3375 | s%@build_vendor@%$build_vendor%g | |
3376 | s%@build_os@%$build_os%g | |
3377 | s%@CC@%$CC%g | |
295dbbe4 SG |
3378 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
3379 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
3380 | s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g | |
c632873c C |
3381 | s%@HDEFINES@%$HDEFINES%g |
3382 | s%@AR@%$AR%g | |
3383 | s%@RANLIB@%$RANLIB%g | |
b1df34b9 | 3384 | s%@SET_MAKE@%$SET_MAKE%g |
fbda74b1 | 3385 | s%@CPP@%$CPP%g |
b1df34b9 TT |
3386 | s%@ALLOCA@%$ALLOCA%g |
3387 | s%@USE_NLS@%$USE_NLS%g | |
3388 | s%@MSGFMT@%$MSGFMT%g | |
3389 | s%@GMSGFMT@%$GMSGFMT%g | |
3390 | s%@XGETTEXT@%$XGETTEXT%g | |
3391 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
3392 | s%@CATALOGS@%$CATALOGS%g | |
3393 | s%@CATOBJEXT@%$CATOBJEXT%g | |
3394 | s%@DATADIRNAME@%$DATADIRNAME%g | |
3395 | s%@GMOFILES@%$GMOFILES%g | |
3396 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
3397 | s%@INTLDEPS@%$INTLDEPS%g | |
3398 | s%@INTLLIBS@%$INTLLIBS%g | |
3399 | s%@INTLOBJS@%$INTLOBJS%g | |
3400 | s%@POFILES@%$POFILES%g | |
3401 | s%@POSUB@%$POSUB%g | |
3402 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
3403 | s%@GT_NO@%$GT_NO%g | |
3404 | s%@GT_YES@%$GT_YES%g | |
3405 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
3406 | s%@l@%$l%g | |
462cfbc4 | 3407 | s%@MAINT@%$MAINT%g |
601fb8ae | 3408 | s%@sim_bswap@%$sim_bswap%g |
295dbbe4 SG |
3409 | s%@sim_cflags@%$sim_cflags%g |
3410 | s%@sim_debug@%$sim_debug%g | |
a35e91c3 | 3411 | s%@sim_stdio@%$sim_stdio%g |
295dbbe4 | 3412 | s%@sim_trace@%$sim_trace%g |
6fea4763 | 3413 | s%@sim_profile@%$sim_profile%g |
c632873c C |
3414 | |
3415 | CEOF | |
3416 | EOF | |
6fea4763 DE |
3417 | |
3418 | cat >> $CONFIG_STATUS <<\EOF | |
3419 | ||
3420 | # Split the substitutions into bite-sized pieces for seds with | |
3421 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
3422 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
3423 | ac_file=1 # Number of current file. | |
3424 | ac_beg=1 # First line for current file. | |
3425 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
3426 | ac_more_lines=: | |
3427 | ac_sed_cmds="" | |
3428 | while $ac_more_lines; do | |
3429 | if test $ac_beg -gt 1; then | |
3430 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
3431 | else | |
3432 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
3433 | fi | |
3434 | if test ! -s conftest.s$ac_file; then | |
3435 | ac_more_lines=false | |
3436 | rm -f conftest.s$ac_file | |
3437 | else | |
3438 | if test -z "$ac_sed_cmds"; then | |
3439 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
3440 | else | |
3441 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
3442 | fi | |
3443 | ac_file=`expr $ac_file + 1` | |
3444 | ac_beg=$ac_end | |
3445 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
3446 | fi | |
3447 | done | |
3448 | if test -z "$ac_sed_cmds"; then | |
3449 | ac_sed_cmds=cat | |
3450 | fi | |
3451 | EOF | |
3452 | ||
c632873c C |
3453 | cat >> $CONFIG_STATUS <<EOF |
3454 | ||
6fea4763 | 3455 | CONFIG_FILES=\${CONFIG_FILES-"Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in"} |
c632873c C |
3456 | EOF |
3457 | cat >> $CONFIG_STATUS <<\EOF | |
3458 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
6fea4763 | 3459 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
c632873c | 3460 | case "$ac_file" in |
6fea4763 | 3461 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
c632873c C |
3462 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
3463 | *) ac_file_in="${ac_file}.in" ;; | |
3464 | esac | |
3465 | ||
6fea4763 | 3466 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
c632873c C |
3467 | |
3468 | # Remove last slash and all that follows it. Not all systems have dirname. | |
3469 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
3470 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
3471 | # The file is in a subdirectory. | |
3472 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
3473 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
3474 | # A "../" for each directory in $ac_dir_suffix. | |
3475 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
3476 | else | |
3477 | ac_dir_suffix= ac_dots= | |
3478 | fi | |
3479 | ||
3480 | case "$ac_given_srcdir" in | |
3481 | .) srcdir=. | |
3482 | if test -z "$ac_dots"; then top_srcdir=. | |
3483 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
3484 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
3485 | *) # Relative path. | |
3486 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
3487 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
3488 | esac | |
3489 | ||
3490 | case "$ac_given_INSTALL" in | |
3491 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
3492 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
3493 | esac | |
6fea4763 | 3494 | |
c632873c C |
3495 | echo creating "$ac_file" |
3496 | rm -f "$ac_file" | |
3497 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
3498 | case "$ac_file" in | |
3499 | *Makefile*) ac_comsub="1i\\ | |
3500 | # $configure_input" ;; | |
3501 | *) ac_comsub= ;; | |
3502 | esac | |
6fea4763 DE |
3503 | |
3504 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
c632873c C |
3505 | sed -e "$ac_comsub |
3506 | s%@configure_input@%$configure_input%g | |
3507 | s%@srcdir@%$srcdir%g | |
3508 | s%@top_srcdir@%$top_srcdir%g | |
3509 | s%@INSTALL@%$INSTALL%g | |
6fea4763 | 3510 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
c632873c | 3511 | fi; done |
6fea4763 | 3512 | rm -f conftest.s* |
c632873c | 3513 | |
295dbbe4 SG |
3514 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
3515 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
3516 | # | |
3517 | # ac_d sets the value in "#define NAME VALUE" lines. | |
3518 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
3519 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
3520 | ac_dC='\3' | |
3521 | ac_dD='%g' | |
3522 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
3523 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
3524 | ac_uB='\([ ]\)%\1#\2define\3' | |
3525 | ac_uC=' ' | |
3526 | ac_uD='\4%g' | |
3527 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
3528 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
3529 | ac_eB='$%\1#\2define\3' | |
3530 | ac_eC=' ' | |
3531 | ac_eD='%g' | |
3532 | ||
6fea4763 DE |
3533 | if test "${CONFIG_HEADERS+set}" != set; then |
3534 | EOF | |
3535 | cat >> $CONFIG_STATUS <<EOF | |
3536 | CONFIG_HEADERS="config.h:config.in" | |
3537 | EOF | |
3538 | cat >> $CONFIG_STATUS <<\EOF | |
3539 | fi | |
295dbbe4 | 3540 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then |
6fea4763 | 3541 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
295dbbe4 | 3542 | case "$ac_file" in |
6fea4763 | 3543 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
295dbbe4 SG |
3544 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
3545 | *) ac_file_in="${ac_file}.in" ;; | |
3546 | esac | |
3547 | ||
3548 | echo creating $ac_file | |
3549 | ||
3550 | rm -f conftest.frag conftest.in conftest.out | |
6fea4763 DE |
3551 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
3552 | cat $ac_file_inputs > conftest.in | |
295dbbe4 SG |
3553 | |
3554 | EOF | |
3555 | ||
3556 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
3557 | # the proper values into config.h.in to produce config.h. And first: | |
3558 | # Protect against being on the right side of a sed subst in config.status. | |
3559 | # Protect against being in an unquoted here document in config.status. | |
3560 | rm -f conftest.vals | |
3561 | cat > conftest.hdr <<\EOF | |
3562 | s/[\\&%]/\\&/g | |
3563 | s%[\\$`]%\\&%g | |
3564 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
3565 | s%ac_d%ac_u%gp | |
3566 | s%ac_u%ac_e%gp | |
3567 | EOF | |
3568 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
3569 | rm -f conftest.hdr | |
3570 | ||
3571 | # This sed command replaces #undef with comments. This is necessary, for | |
3572 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
3573 | # on some systems where configure will not decide to define it. | |
3574 | cat >> conftest.vals <<\EOF | |
3575 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
3576 | EOF | |
c632873c | 3577 | |
295dbbe4 SG |
3578 | # Break up conftest.vals because some shells have a limit on |
3579 | # the size of here documents, and old seds have small limits too. | |
c632873c | 3580 | |
295dbbe4 SG |
3581 | rm -f conftest.tail |
3582 | while : | |
3583 | do | |
3584 | ac_lines=`grep -c . conftest.vals` | |
3585 | # grep -c gives empty output for an empty file on some AIX systems. | |
3586 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
3587 | # Write a limited-size here document to conftest.frag. | |
3588 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
3589 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
3590 | echo 'CEOF | |
3591 | sed -f conftest.frag conftest.in > conftest.out | |
3592 | rm -f conftest.in | |
3593 | mv conftest.out conftest.in | |
3594 | ' >> $CONFIG_STATUS | |
3595 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
3596 | rm -f conftest.vals | |
3597 | mv conftest.tail conftest.vals | |
3598 | done | |
3599 | rm -f conftest.vals | |
3600 | ||
3601 | cat >> $CONFIG_STATUS <<\EOF | |
3602 | rm -f conftest.frag conftest.h | |
3603 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
3604 | cat conftest.in >> conftest.h | |
3605 | rm -f conftest.in | |
3606 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
3607 | echo "$ac_file is unchanged" | |
3608 | rm -f conftest.h | |
3609 | else | |
3610 | # Remove last slash and all that follows it. Not all systems have dirname. | |
3611 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
3612 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
3613 | # The file is in a subdirectory. | |
3614 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
3615 | fi | |
3616 | rm -f $ac_file | |
3617 | mv conftest.h $ac_file | |
3618 | fi | |
3619 | fi; done | |
3620 | ||
3621 | EOF | |
3622 | ||
3623 | cat >> $CONFIG_STATUS <<EOF | |
3624 | ac_sources="$sim_link_files" | |
3625 | ac_dests="$sim_link_links" | |
3626 | EOF | |
3627 | ||
3628 | cat >> $CONFIG_STATUS <<\EOF | |
3629 | srcdir=$ac_given_srcdir | |
3630 | while test -n "$ac_sources"; do | |
3631 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
3632 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
3633 | ||
3634 | echo "linking $srcdir/$ac_source to $ac_dest" | |
3635 | ||
3636 | if test ! -r $srcdir/$ac_source; then | |
3637 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
3638 | fi | |
3639 | rm -f $ac_dest | |
3640 | ||
3641 | # Make relative symlinks. | |
3642 | # Remove last slash and all that follows it. Not all systems have dirname. | |
3643 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
3644 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
3645 | # The dest file is in a subdirectory. | |
3646 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
3647 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
3648 | # A "../" for each directory in $ac_dest_dir_suffix. | |
3649 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
3650 | else | |
3651 | ac_dest_dir_suffix= ac_dots= | |
3652 | fi | |
3653 | ||
3654 | case "$srcdir" in | |
3655 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
3656 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
3657 | esac | |
3658 | ||
3659 | # Make a symlink if possible; otherwise try a hard link. | |
3660 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
3661 | ln $srcdir/$ac_source $ac_dest; then : | |
3662 | else | |
3663 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
3664 | fi | |
3665 | done | |
6fea4763 DE |
3666 | EOF |
3667 | cat >> $CONFIG_STATUS <<EOF | |
295dbbe4 | 3668 | |
6fea4763 DE |
3669 | EOF |
3670 | cat >> $CONFIG_STATUS <<\EOF | |
3671 | case "x$CONFIG_FILES" in | |
3672 | xMakefile*) | |
601fb8ae MM |
3673 | echo "Merging Makefile.sim+Make-common.sim into Makefile ..." |
3674 | rm -f Makesim1.tmp Makesim2.tmp Makefile | |
3675 | sed -n -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ p' <Make-common.sim >Makesim1.tmp | |
3676 | sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >Makesim2.tmp | |
3677 | sed -e '/^## COMMON_PRE_/ r Makesim1.tmp' \ | |
3678 | -e '/^## COMMON_POST_/ r Makesim2.tmp' \ | |
3679 | <Makefile.sim >Makefile | |
3680 | rm -f Makefile.sim Make-common.sim Makesim1.tmp Makesim2.tmp | |
3681 | ;; | |
3682 | esac | |
295dbbe4 | 3683 | case "x$CONFIG_HEADERS" in xconfig.h:config.in) echo > stamp-h ;; esac |
601fb8ae | 3684 | |
c632873c C |
3685 | exit 0 |
3686 | EOF | |
3687 | chmod +x $CONFIG_STATUS | |
3688 | rm -fr confdefs* $ac_clean_files | |
3689 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
3690 | ||
295dbbe4 | 3691 |