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