This commit was generated by cvs2svn to track changes on a CVS vendor
[deliverable/binutils-gdb.git] / sim / common / configure
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
122
123
124 # Guess values for system-dependent variables and create Makefiles.
125 # Generated automatically using autoconf version 2.13
126 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
127 #
128 # This configure script is free software; the Free Software Foundation
129 # gives unlimited permission to copy, distribute and modify it.
130
131 # Defaults:
132 ac_help=
133 ac_default_prefix=/usr/local
134 # Any additions from configure.in:
135 ac_help="$ac_help
136 --disable-nls do not use Native Language Support"
137 ac_help="$ac_help
138 --with-included-gettext use the GNU gettext library included here"
139 ac_help="$ac_help
140 --enable-maintainer-mode Enable developer functionality."
141 ac_help="$ac_help
142 --enable-sim-bswap Use Host specific BSWAP instruction."
143 ac_help="$ac_help
144 --enable-sim-cflags=opts Extra CFLAGS for use in building simulator"
145 ac_help="$ac_help
146 --enable-sim-debug=opts Enable debugging flags"
147 ac_help="$ac_help
148 --enable-sim-stdio Specify whether to use stdio for console input/output."
149 ac_help="$ac_help
150 --enable-sim-trace=opts Enable tracing flags"
151 ac_help="$ac_help
152 --enable-sim-profile=opts Enable profiling flags"
153
154 # Initialize some variables set by options.
155 # The variables have the same names as the options, with
156 # dashes changed to underlines.
157 build=NONE
158 cache_file=./config.cache
159 exec_prefix=NONE
160 host=NONE
161 no_create=
162 nonopt=NONE
163 no_recursion=
164 prefix=NONE
165 program_prefix=NONE
166 program_suffix=NONE
167 program_transform_name=s,x,x,
168 silent=
169 site=
170 sitefile=
171 srcdir=
172 target=NONE
173 verbose=
174 x_includes=NONE
175 x_libraries=NONE
176 bindir='${exec_prefix}/bin'
177 sbindir='${exec_prefix}/sbin'
178 libexecdir='${exec_prefix}/libexec'
179 datadir='${prefix}/share'
180 sysconfdir='${prefix}/etc'
181 sharedstatedir='${prefix}/com'
182 localstatedir='${prefix}/var'
183 libdir='${exec_prefix}/lib'
184 includedir='${prefix}/include'
185 oldincludedir='/usr/include'
186 infodir='${prefix}/info'
187 mandir='${prefix}/man'
188
189 # Initialize some other variables.
190 subdirs=
191 MFLAGS= MAKEFLAGS=
192 SHELL=${CONFIG_SHELL-/bin/sh}
193 # Maximum number of lines to put in a shell here document.
194 ac_max_here_lines=12
195
196 ac_prev=
197 for ac_option
198 do
199
200 # If the previous option needs an argument, assign it.
201 if test -n "$ac_prev"; then
202 eval "$ac_prev=\$ac_option"
203 ac_prev=
204 continue
205 fi
206
207 case "$ac_option" in
208 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
209 *) ac_optarg= ;;
210 esac
211
212 # Accept the important Cygnus configure options, so we can diagnose typos.
213
214 case "$ac_option" in
215
216 -bindir | --bindir | --bindi | --bind | --bin | --bi)
217 ac_prev=bindir ;;
218 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
219 bindir="$ac_optarg" ;;
220
221 -build | --build | --buil | --bui | --bu)
222 ac_prev=build ;;
223 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
224 build="$ac_optarg" ;;
225
226 -cache-file | --cache-file | --cache-fil | --cache-fi \
227 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
228 ac_prev=cache_file ;;
229 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
230 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
231 cache_file="$ac_optarg" ;;
232
233 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
234 ac_prev=datadir ;;
235 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
236 | --da=*)
237 datadir="$ac_optarg" ;;
238
239 -disable-* | --disable-*)
240 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
241 # Reject names that are not valid shell variable names.
242 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
243 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
244 fi
245 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
246 eval "enable_${ac_feature}=no" ;;
247
248 -enable-* | --enable-*)
249 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
250 # Reject names that are not valid shell variable names.
251 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
252 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
253 fi
254 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
255 case "$ac_option" in
256 *=*) ;;
257 *) ac_optarg=yes ;;
258 esac
259 eval "enable_${ac_feature}='$ac_optarg'" ;;
260
261 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
262 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
263 | --exec | --exe | --ex)
264 ac_prev=exec_prefix ;;
265 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
266 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
267 | --exec=* | --exe=* | --ex=*)
268 exec_prefix="$ac_optarg" ;;
269
270 -gas | --gas | --ga | --g)
271 # Obsolete; use --with-gas.
272 with_gas=yes ;;
273
274 -help | --help | --hel | --he)
275 # Omit some internal or obsolete options to make the list less imposing.
276 # This message is too long to be a string in the A/UX 3.1 sh.
277 cat << EOF
278 Usage: configure [options] [host]
279 Options: [defaults in brackets after descriptions]
280 Configuration:
281 --cache-file=FILE cache test results in FILE
282 --help print this message
283 --no-create do not create output files
284 --quiet, --silent do not print \`checking...' messages
285 --site-file=FILE use FILE as the site file
286 --version print the version of autoconf that created configure
287 Directory and file names:
288 --prefix=PREFIX install architecture-independent files in PREFIX
289 [$ac_default_prefix]
290 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
291 [same as prefix]
292 --bindir=DIR user executables in DIR [EPREFIX/bin]
293 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
294 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
295 --datadir=DIR read-only architecture-independent data in DIR
296 [PREFIX/share]
297 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
298 --sharedstatedir=DIR modifiable architecture-independent data in DIR
299 [PREFIX/com]
300 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
301 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
302 --includedir=DIR C header files in DIR [PREFIX/include]
303 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
304 --infodir=DIR info documentation in DIR [PREFIX/info]
305 --mandir=DIR man documentation in DIR [PREFIX/man]
306 --srcdir=DIR find the sources in DIR [configure dir or ..]
307 --program-prefix=PREFIX prepend PREFIX to installed program names
308 --program-suffix=SUFFIX append SUFFIX to installed program names
309 --program-transform-name=PROGRAM
310 run sed PROGRAM on installed program names
311 EOF
312 cat << EOF
313 Host type:
314 --build=BUILD configure for building on BUILD [BUILD=HOST]
315 --host=HOST configure for HOST [guessed]
316 --target=TARGET configure for TARGET [TARGET=HOST]
317 Features and packages:
318 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
319 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
320 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
321 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
322 --x-includes=DIR X include files are in DIR
323 --x-libraries=DIR X library files are in DIR
324 EOF
325 if test -n "$ac_help"; then
326 echo "--enable and --with options recognized:$ac_help"
327 fi
328 exit 0 ;;
329
330 -host | --host | --hos | --ho)
331 ac_prev=host ;;
332 -host=* | --host=* | --hos=* | --ho=*)
333 host="$ac_optarg" ;;
334
335 -includedir | --includedir | --includedi | --included | --include \
336 | --includ | --inclu | --incl | --inc)
337 ac_prev=includedir ;;
338 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
339 | --includ=* | --inclu=* | --incl=* | --inc=*)
340 includedir="$ac_optarg" ;;
341
342 -infodir | --infodir | --infodi | --infod | --info | --inf)
343 ac_prev=infodir ;;
344 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
345 infodir="$ac_optarg" ;;
346
347 -libdir | --libdir | --libdi | --libd)
348 ac_prev=libdir ;;
349 -libdir=* | --libdir=* | --libdi=* | --libd=*)
350 libdir="$ac_optarg" ;;
351
352 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
353 | --libexe | --libex | --libe)
354 ac_prev=libexecdir ;;
355 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
356 | --libexe=* | --libex=* | --libe=*)
357 libexecdir="$ac_optarg" ;;
358
359 -localstatedir | --localstatedir | --localstatedi | --localstated \
360 | --localstate | --localstat | --localsta | --localst \
361 | --locals | --local | --loca | --loc | --lo)
362 ac_prev=localstatedir ;;
363 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
364 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
365 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
366 localstatedir="$ac_optarg" ;;
367
368 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
369 ac_prev=mandir ;;
370 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
371 mandir="$ac_optarg" ;;
372
373 -nfp | --nfp | --nf)
374 # Obsolete; use --without-fp.
375 with_fp=no ;;
376
377 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
378 | --no-cr | --no-c)
379 no_create=yes ;;
380
381 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
382 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
383 no_recursion=yes ;;
384
385 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
386 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
387 | --oldin | --oldi | --old | --ol | --o)
388 ac_prev=oldincludedir ;;
389 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
390 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
391 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
392 oldincludedir="$ac_optarg" ;;
393
394 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
395 ac_prev=prefix ;;
396 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
397 prefix="$ac_optarg" ;;
398
399 -program-prefix | --program-prefix | --program-prefi | --program-pref \
400 | --program-pre | --program-pr | --program-p)
401 ac_prev=program_prefix ;;
402 -program-prefix=* | --program-prefix=* | --program-prefi=* \
403 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
404 program_prefix="$ac_optarg" ;;
405
406 -program-suffix | --program-suffix | --program-suffi | --program-suff \
407 | --program-suf | --program-su | --program-s)
408 ac_prev=program_suffix ;;
409 -program-suffix=* | --program-suffix=* | --program-suffi=* \
410 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
411 program_suffix="$ac_optarg" ;;
412
413 -program-transform-name | --program-transform-name \
414 | --program-transform-nam | --program-transform-na \
415 | --program-transform-n | --program-transform- \
416 | --program-transform | --program-transfor \
417 | --program-transfo | --program-transf \
418 | --program-trans | --program-tran \
419 | --progr-tra | --program-tr | --program-t)
420 ac_prev=program_transform_name ;;
421 -program-transform-name=* | --program-transform-name=* \
422 | --program-transform-nam=* | --program-transform-na=* \
423 | --program-transform-n=* | --program-transform-=* \
424 | --program-transform=* | --program-transfor=* \
425 | --program-transfo=* | --program-transf=* \
426 | --program-trans=* | --program-tran=* \
427 | --progr-tra=* | --program-tr=* | --program-t=*)
428 program_transform_name="$ac_optarg" ;;
429
430 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
431 | -silent | --silent | --silen | --sile | --sil)
432 silent=yes ;;
433
434 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
435 ac_prev=sbindir ;;
436 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
437 | --sbi=* | --sb=*)
438 sbindir="$ac_optarg" ;;
439
440 -sharedstatedir | --sharedstatedir | --sharedstatedi \
441 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
442 | --sharedst | --shareds | --shared | --share | --shar \
443 | --sha | --sh)
444 ac_prev=sharedstatedir ;;
445 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
446 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
447 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
448 | --sha=* | --sh=*)
449 sharedstatedir="$ac_optarg" ;;
450
451 -site | --site | --sit)
452 ac_prev=site ;;
453 -site=* | --site=* | --sit=*)
454 site="$ac_optarg" ;;
455
456 -site-file | --site-file | --site-fil | --site-fi | --site-f)
457 ac_prev=sitefile ;;
458 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
459 sitefile="$ac_optarg" ;;
460
461 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
462 ac_prev=srcdir ;;
463 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
464 srcdir="$ac_optarg" ;;
465
466 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
467 | --syscon | --sysco | --sysc | --sys | --sy)
468 ac_prev=sysconfdir ;;
469 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
470 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
471 sysconfdir="$ac_optarg" ;;
472
473 -target | --target | --targe | --targ | --tar | --ta | --t)
474 ac_prev=target ;;
475 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
476 target="$ac_optarg" ;;
477
478 -v | -verbose | --verbose | --verbos | --verbo | --verb)
479 verbose=yes ;;
480
481 -version | --version | --versio | --versi | --vers)
482 echo "configure generated by autoconf version 2.13"
483 exit 0 ;;
484
485 -with-* | --with-*)
486 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
487 # Reject names that are not valid shell variable names.
488 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
489 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
490 fi
491 ac_package=`echo $ac_package| sed 's/-/_/g'`
492 case "$ac_option" in
493 *=*) ;;
494 *) ac_optarg=yes ;;
495 esac
496 eval "with_${ac_package}='$ac_optarg'" ;;
497
498 -without-* | --without-*)
499 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
500 # Reject names that are not valid shell variable names.
501 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
502 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
503 fi
504 ac_package=`echo $ac_package| sed 's/-/_/g'`
505 eval "with_${ac_package}=no" ;;
506
507 --x)
508 # Obsolete; use --with-x.
509 with_x=yes ;;
510
511 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
512 | --x-incl | --x-inc | --x-in | --x-i)
513 ac_prev=x_includes ;;
514 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
515 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
516 x_includes="$ac_optarg" ;;
517
518 -x-libraries | --x-libraries | --x-librarie | --x-librari \
519 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
520 ac_prev=x_libraries ;;
521 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
522 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
523 x_libraries="$ac_optarg" ;;
524
525 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
526 ;;
527
528 *)
529 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
530 echo "configure: warning: $ac_option: invalid host type" 1>&2
531 fi
532 if test "x$nonopt" != xNONE; then
533 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
534 fi
535 nonopt="$ac_option"
536 ;;
537
538 esac
539 done
540
541 if test -n "$ac_prev"; then
542 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
543 fi
544
545 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
546
547 # File descriptor usage:
548 # 0 standard input
549 # 1 file creation
550 # 2 errors and warnings
551 # 3 some systems may open it to /dev/tty
552 # 4 used on the Kubota Titan
553 # 6 checking for... messages and results
554 # 5 compiler messages saved in config.log
555 if test "$silent" = yes; then
556 exec 6>/dev/null
557 else
558 exec 6>&1
559 fi
560 exec 5>./config.log
561
562 echo "\
563 This file contains any messages produced by compilers while
564 running configure, to aid debugging if configure makes a mistake.
565 " 1>&5
566
567 # Strip out --no-create and --no-recursion so they do not pile up.
568 # Also quote any args containing shell metacharacters.
569 ac_configure_args=
570 for ac_arg
571 do
572 case "$ac_arg" in
573 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
574 | --no-cr | --no-c) ;;
575 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
576 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
577 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
578 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
579 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
580 esac
581 done
582
583 # NLS nuisances.
584 # Only set these to C if already set. These must not be set unconditionally
585 # because not all systems understand e.g. LANG=C (notably SCO).
586 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
587 # Non-C LC_CTYPE values break the ctype check.
588 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
589 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
590 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
591 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
592
593 # confdefs.h avoids OS command line length limits that DEFS can exceed.
594 rm -rf conftest* confdefs.h
595 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
596 echo > confdefs.h
597
598 # A filename unique to this package, relative to the directory that
599 # configure is in, which we can look for to find out if srcdir is correct.
600 ac_unique_file=Makefile.in
601
602 # Find the source files, if location was not specified.
603 if test -z "$srcdir"; then
604 ac_srcdir_defaulted=yes
605 # Try the directory containing this script, then its parent.
606 ac_prog=$0
607 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
608 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
609 srcdir=$ac_confdir
610 if test ! -r $srcdir/$ac_unique_file; then
611 srcdir=..
612 fi
613 else
614 ac_srcdir_defaulted=no
615 fi
616 if test ! -r $srcdir/$ac_unique_file; then
617 if test "$ac_srcdir_defaulted" = yes; then
618 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
619 else
620 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
621 fi
622 fi
623 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
624
625 # Prefer explicitly selected file to automatically selected ones.
626 if test -z "$sitefile"; then
627 if test -z "$CONFIG_SITE"; then
628 if test "x$prefix" != xNONE; then
629 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
630 else
631 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
632 fi
633 fi
634 else
635 CONFIG_SITE="$sitefile"
636 fi
637 for ac_site_file in $CONFIG_SITE; do
638 if test -r "$ac_site_file"; then
639 echo "loading site script $ac_site_file"
640 . "$ac_site_file"
641 fi
642 done
643
644 if test -r "$cache_file"; then
645 echo "loading cache $cache_file"
646 . $cache_file
647 else
648 echo "creating cache $cache_file"
649 > $cache_file
650 fi
651
652 ac_ext=c
653 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
654 ac_cpp='$CPP $CPPFLAGS'
655 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
656 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
657 cross_compiling=$ac_cv_prog_cc_cross
658
659 ac_exeext=
660 ac_objext=o
661 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
662 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
663 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
664 ac_n= ac_c='
665 ' ac_t=' '
666 else
667 ac_n=-n ac_c= ac_t=
668 fi
669 else
670 ac_n= ac_c='\c' ac_t=
671 fi
672
673
674
675 # This is intended for use by the target specific directories, and by us.
676 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
677 echo "configure:678: checking how to run the C preprocessor" >&5
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
692 #line 693 "configure"
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"
698 { (eval echo configure:699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
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
709 #line 710 "configure"
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"
715 { (eval echo configure:716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
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
726 #line 727 "configure"
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"
732 { (eval echo configure:733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
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
757 echo "configure:758: checking whether ${MAKE-make} sets \${MAKE}" >&5
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
784 echo "configure:785: checking for POSIXized ISC" >&5
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
805 echo "configure:806: checking for ANSI C header files" >&5
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
810 #line 811 "configure"
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"
818 { (eval echo configure:819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
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
835 #line 836 "configure"
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
853 #line 854 "configure"
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
874 #line 875 "configure"
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
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
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
909 echo "configure:910: checking for working const" >&5
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
914 #line 915 "configure"
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
963 if { (eval echo configure:964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
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
984 echo "configure:985: checking for inline" >&5
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
991 #line 992 "configure"
992 #include "confdefs.h"
993
994 int main() {
995 } $ac_kw foo() {
996 ; return 0; }
997 EOF
998 if { (eval echo configure:999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
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
1024 echo "configure:1025: checking for off_t" >&5
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
1029 #line 1030 "configure"
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 |
1038 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
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
1057 echo "configure:1058: checking for size_t" >&5
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
1062 #line 1063 "configure"
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 |
1071 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
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
1092 echo "configure:1093: checking for working alloca.h" >&5
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
1097 #line 1098 "configure"
1098 #include "confdefs.h"
1099 #include <alloca.h>
1100 int main() {
1101 char *p = alloca(2 * sizeof(int));
1102 ; return 0; }
1103 EOF
1104 if { (eval echo configure:1105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
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
1125 echo "configure:1126: checking for alloca" >&5
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
1130 #line 1131 "configure"
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
1158 if { (eval echo configure:1159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
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
1190 echo "configure:1191: checking whether alloca needs Cray hooks" >&5
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
1195 #line 1196 "configure"
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
1220 echo "configure:1221: checking for $ac_func" >&5
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
1225 #line 1226 "configure"
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
1248 if { (eval echo configure:1249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
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
1275 echo "configure:1276: checking stack direction for C alloca" >&5
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
1283 #line 1284 "configure"
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
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
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
1327 echo "configure:1328: checking for $ac_hdr" >&5
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
1332 #line 1333 "configure"
1333 #include "confdefs.h"
1334 #include <$ac_hdr>
1335 EOF
1336 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1337 { (eval echo configure:1338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
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
1366 echo "configure:1367: checking for $ac_func" >&5
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
1371 #line 1372 "configure"
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
1394 if { (eval echo configure:1395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
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
1419 echo "configure:1420: checking for working mmap" >&5
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
1427 #line 1428 "configure"
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
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
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
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
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
1702 echo "configure:1703: checking host system type" >&5
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
1723 echo "configure:1724: checking target system type" >&5
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
1741 echo "configure:1742: checking build system type" >&5
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
1785 echo "configure:1786: checking for $ac_word" >&5
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=":"
1793 ac_dummy="$PATH"
1794 for ac_dir in $ac_dummy; do
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
1815 echo "configure:1816: checking for $ac_word" >&5
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
1824 ac_dummy="$PATH"
1825 for ac_dir in $ac_dummy; do
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
1866 echo "configure:1867: checking for $ac_word" >&5
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=":"
1874 ac_dummy="$PATH"
1875 for ac_dir in $ac_dummy; do
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
1898 echo "configure:1899: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
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
1907 cat > conftest.$ac_ext << EOF
1908
1909 #line 1910 "configure"
1910 #include "confdefs.h"
1911
1912 main(){return(0);}
1913 EOF
1914 if { (eval echo configure:1915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
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*
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
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
1940 echo "configure:1941: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
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
1945 echo "configure:1946: checking whether we are using GNU C" >&5
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
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
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
1973 echo "configure:1974: checking whether ${CC-cc} accepts -g" >&5
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
2016 echo "configure:2017: checking for a BSD compatible install" >&5
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
2064 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2065
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
2084 echo "configure:2085: checking for $ac_word" >&5
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=":"
2092 ac_dummy="$PATH"
2093 for ac_dir in $ac_dummy; do
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
2119 echo "configure:2120: checking for $ac_hdr" >&5
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
2124 #line 2125 "configure"
2125 #include "confdefs.h"
2126 #include <$ac_hdr>
2127 EOF
2128 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2129 { (eval echo configure:2130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
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
2159 echo "configure:2160: checking for $ac_func" >&5
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
2164 #line 2165 "configure"
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
2187 if { (eval echo configure:2188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
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
2216 echo "configure:2217: checking for $ac_func" >&5
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
2221 #line 2222 "configure"
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
2244 if { (eval echo configure:2245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
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
2278 echo "configure:2279: checking for LC_MESSAGES" >&5
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
2283 #line 2284 "configure"
2284 #include "confdefs.h"
2285 #include <locale.h>
2286 int main() {
2287 return LC_MESSAGES
2288 ; return 0; }
2289 EOF
2290 if { (eval echo configure:2291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
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
2311 echo "configure:2312: checking whether NLS is requested" >&5
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
2331 echo "configure:2332: checking whether included gettext is requested" >&5
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
2350 echo "configure:2351: checking for libintl.h" >&5
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
2355 #line 2356 "configure"
2356 #include "confdefs.h"
2357 #include <libintl.h>
2358 EOF
2359 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2360 { (eval echo configure:2361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
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
2377 echo "configure:2378: checking for gettext in libc" >&5
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
2382 #line 2383 "configure"
2383 #include "confdefs.h"
2384 #include <libintl.h>
2385 int main() {
2386 return (int) gettext ("")
2387 ; return 0; }
2388 EOF
2389 if { (eval echo configure:2390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
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
2405 echo "configure:2406: checking for bindtextdomain in -lintl" >&5
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
2413 #line 2414 "configure"
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
2424 if { (eval echo configure:2425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
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
2440 echo "configure:2441: checking for gettext in libintl" >&5
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
2445 #line 2446 "configure"
2446 #include "confdefs.h"
2447
2448 int main() {
2449 return (int) gettext ("")
2450 ; return 0; }
2451 EOF
2452 if { (eval echo configure:2453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
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
2480 echo "configure:2481: checking for $ac_word" >&5
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
2514 echo "configure:2515: checking for $ac_func" >&5
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
2519 #line 2520 "configure"
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
2542 if { (eval echo configure:2543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
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
2569 echo "configure:2570: checking for $ac_word" >&5
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=":"
2582 ac_dummy="$PATH"
2583 for ac_dir in $ac_dummy; do
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
2605 echo "configure:2606: checking for $ac_word" >&5
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
2637 #line 2638 "configure"
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
2645 if { (eval echo configure:2646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
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
2677 echo "configure:2678: checking for $ac_word" >&5
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
2711 echo "configure:2712: checking for $ac_word" >&5
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=":"
2724 ac_dummy="$PATH"
2725 for ac_dir in $ac_dummy; do
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
2747 echo "configure:2748: checking for $ac_word" >&5
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
2837 echo "configure:2838: checking for catalogs to be installed" >&5
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
2865 echo "configure:2866: checking for linux/version.h" >&5
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
2870 #line 2871 "configure"
2871 #include "confdefs.h"
2872 #include <linux/version.h>
2873 EOF
2874 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2875 { (eval echo configure:2876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
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
2944 echo "configure:2945: checking for $ac_hdr" >&5
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
2949 #line 2950 "configure"
2950 #include "confdefs.h"
2951 #include <$ac_hdr>
2952 EOF
2953 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2954 { (eval echo configure:2955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
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
2984 echo "configure:2985: checking for $ac_hdr" >&5
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
2989 #line 2990 "configure"
2990 #include "confdefs.h"
2991 #include <$ac_hdr>
2992 EOF
2993 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2994 { (eval echo configure:2995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
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
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
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
3069 #line 3070 "configure"
3070 #include "confdefs.h"
3071 #include <$ac_hdr>
3072 EOF
3073 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3074 { (eval echo configure:3075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
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
3103 echo "configure:3104: checking for $ac_func" >&5
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
3108 #line 3109 "configure"
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
3131 if { (eval echo configure:3132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
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
3158 echo "configure:3159: checking for bind in -lsocket" >&5
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
3166 #line 3167 "configure"
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
3177 if { (eval echo configure:3178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
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
3205 echo "configure:3206: checking for gethostbyname in -lnsl" >&5
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
3213 #line 3214 "configure"
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
3224 if { (eval echo configure:3225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
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
3400 echo "configure:3401: checking return type of signal handlers" >&5
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
3405 #line 3406 "configure"
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
3422 if { (eval echo configure:3423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
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
3441
3442
3443 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3444 echo "configure:3445: checking for executable suffix" >&5
3445 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
3446 echo $ac_n "(cached) $ac_c" 1>&6
3447 else
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
3466 fi
3467 fi
3468
3469 EXEEXT=""
3470 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3471 echo "$ac_t""${ac_cv_exeext}" 1>&6
3472 ac_exeext=$EXEEXT
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 # Put a useful copy of CPP_FOR_TARGET in Makefile.
3496 # This is only used to build the target values header files. These files are
3497 # shipped with distributions so CPP_FOR_TARGET only needs to work in
3498 # developer's trees. This value is borrowed from ../../Makefile.in.
3499 CPP_FOR_TARGET="\` \
3500 if test -f \$\${rootme}/../../gcc/Makefile ; then \
3501 if test -f \$\${rootme}/../../\$(TARGET_SUBDIR)/newlib/Makefile ; then \
3502 echo \$\${rootme}/../../gcc/xgcc -B\$\${rootme}/../../gcc/ -idirafter \$\${rootme}/../../\$(TARGET_SUBDIR)/newlib/targ-include -idirafter \$(srcroot)/newlib/libc/include -nostdinc; \
3503 else \
3504 echo \$\${rootme}/../../gcc/xgcc -B\$\${rootme}/../../gcc/; \
3505 fi; \
3506 else \
3507 if test '\$(host_canonical)' = '\$(target_canonical)' ; then \
3508 echo \$(CC); \
3509 else \
3510 t='\$(program_transform_name)'; echo gcc | sed -e 's/x/x/' \$\$t; \
3511 fi; \
3512 fi\` -E"
3513
3514
3515 # Set TARGET_SUBDIR, needed by CPP_FOR_TARGET.
3516 if test x"${host}" = x"${target}" ; then
3517 TARGET_SUBDIR="."
3518 else
3519 TARGET_SUBDIR=${target_alias}
3520 fi
3521
3522
3523 # These aren't all needed yet, but will be eventually.
3524 for ac_hdr in stdlib.h string.h strings.h time.h sys/times.h
3525 do
3526 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3527 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3528 echo "configure:3529: checking for $ac_hdr" >&5
3529 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3530 echo $ac_n "(cached) $ac_c" 1>&6
3531 else
3532 cat > conftest.$ac_ext <<EOF
3533 #line 3534 "configure"
3534 #include "confdefs.h"
3535 #include <$ac_hdr>
3536 EOF
3537 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3538 { (eval echo configure:3539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3539 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3540 if test -z "$ac_err"; then
3541 rm -rf conftest*
3542 eval "ac_cv_header_$ac_safe=yes"
3543 else
3544 echo "$ac_err" >&5
3545 echo "configure: failed program was:" >&5
3546 cat conftest.$ac_ext >&5
3547 rm -rf conftest*
3548 eval "ac_cv_header_$ac_safe=no"
3549 fi
3550 rm -f conftest*
3551 fi
3552 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3553 echo "$ac_t""yes" 1>&6
3554 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3555 cat >> confdefs.h <<EOF
3556 #define $ac_tr_hdr 1
3557 EOF
3558
3559 else
3560 echo "$ac_t""no" 1>&6
3561 fi
3562 done
3563
3564
3565 trap '' 1 2 15
3566 cat > confcache <<\EOF
3567 # This file is a shell script that caches the results of configure
3568 # tests run on this system so they can be shared between configure
3569 # scripts and configure runs. It is not useful on other systems.
3570 # If it contains results you don't want to keep, you may remove or edit it.
3571 #
3572 # By default, configure uses ./config.cache as the cache file,
3573 # creating it if it does not exist already. You can give configure
3574 # the --cache-file=FILE option to use a different cache file; that is
3575 # what configure does when it calls configure scripts in
3576 # subdirectories, so they share the cache.
3577 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3578 # config.status only pays attention to the cache file if you give it the
3579 # --recheck option to rerun configure.
3580 #
3581 EOF
3582 # The following way of writing the cache mishandles newlines in values,
3583 # but we know of no workaround that is simple, portable, and efficient.
3584 # So, don't put newlines in cache variables' values.
3585 # Ultrix sh set writes to stderr and can't be redirected directly,
3586 # and sets the high bit in the cache file unless we assign to the vars.
3587 (set) 2>&1 |
3588 case `(ac_space=' '; set | grep ac_space) 2>&1` in
3589 *ac_space=\ *)
3590 # `set' does not quote correctly, so add quotes (double-quote substitution
3591 # turns \\\\ into \\, and sed turns \\ into \).
3592 sed -n \
3593 -e "s/'/'\\\\''/g" \
3594 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3595 ;;
3596 *)
3597 # `set' quotes correctly as required by POSIX, so do not add quotes.
3598 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3599 ;;
3600 esac >> confcache
3601 if cmp -s $cache_file confcache; then
3602 :
3603 else
3604 if test -w $cache_file; then
3605 echo "updating cache $cache_file"
3606 cat confcache > $cache_file
3607 else
3608 echo "not updating unwritable cache $cache_file"
3609 fi
3610 fi
3611 rm -f confcache
3612
3613 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3614
3615 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3616 # Let make expand exec_prefix.
3617 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3618
3619 # Any assignment to VPATH causes Sun make to only execute
3620 # the first set of double-colon rules, so remove it if not needed.
3621 # If there is a colon in the path, we need to keep it.
3622 if test "x$srcdir" = x.; then
3623 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3624 fi
3625
3626 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3627
3628 DEFS=-DHAVE_CONFIG_H
3629
3630 # Without the "./", some shells look in PATH for config.status.
3631 : ${CONFIG_STATUS=./config.status}
3632
3633 echo creating $CONFIG_STATUS
3634 rm -f $CONFIG_STATUS
3635 cat > $CONFIG_STATUS <<EOF
3636 #! /bin/sh
3637 # Generated automatically by configure.
3638 # Run this file to recreate the current configuration.
3639 # This directory was configured as follows,
3640 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3641 #
3642 # $0 $ac_configure_args
3643 #
3644 # Compiler output produced by configure, useful for debugging
3645 # configure, is in ./config.log if it exists.
3646
3647 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3648 for ac_option
3649 do
3650 case "\$ac_option" in
3651 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3652 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3653 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3654 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3655 echo "$CONFIG_STATUS generated by autoconf version 2.13"
3656 exit 0 ;;
3657 -help | --help | --hel | --he | --h)
3658 echo "\$ac_cs_usage"; exit 0 ;;
3659 *) echo "\$ac_cs_usage"; exit 1 ;;
3660 esac
3661 done
3662
3663 ac_given_srcdir=$srcdir
3664 ac_given_INSTALL="$INSTALL"
3665
3666 trap 'rm -fr `echo "Makefile cconfig.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3667 EOF
3668 cat >> $CONFIG_STATUS <<EOF
3669
3670 # Protect against being on the right side of a sed subst in config.status.
3671 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3672 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3673 $ac_vpsub
3674 $extrasub
3675 s%@sim_environment@%$sim_environment%g
3676 s%@sim_alignment@%$sim_alignment%g
3677 s%@sim_assert@%$sim_assert%g
3678 s%@sim_bitsize@%$sim_bitsize%g
3679 s%@sim_endian@%$sim_endian%g
3680 s%@sim_hostendian@%$sim_hostendian%g
3681 s%@sim_float@%$sim_float%g
3682 s%@sim_scache@%$sim_scache%g
3683 s%@sim_default_model@%$sim_default_model%g
3684 s%@sim_hw_cflags@%$sim_hw_cflags%g
3685 s%@sim_hw_objs@%$sim_hw_objs%g
3686 s%@sim_hw@%$sim_hw%g
3687 s%@sim_inline@%$sim_inline%g
3688 s%@sim_packages@%$sim_packages%g
3689 s%@sim_regparm@%$sim_regparm%g
3690 s%@sim_reserved_bits@%$sim_reserved_bits%g
3691 s%@sim_smp@%$sim_smp%g
3692 s%@sim_stdcall@%$sim_stdcall%g
3693 s%@sim_xor_endian@%$sim_xor_endian%g
3694 s%@build_warnings@%$build_warnings%g
3695 s%@SHELL@%$SHELL%g
3696 s%@CFLAGS@%$CFLAGS%g
3697 s%@CPPFLAGS@%$CPPFLAGS%g
3698 s%@CXXFLAGS@%$CXXFLAGS%g
3699 s%@FFLAGS@%$FFLAGS%g
3700 s%@DEFS@%$DEFS%g
3701 s%@LDFLAGS@%$LDFLAGS%g
3702 s%@LIBS@%$LIBS%g
3703 s%@exec_prefix@%$exec_prefix%g
3704 s%@prefix@%$prefix%g
3705 s%@program_transform_name@%$program_transform_name%g
3706 s%@bindir@%$bindir%g
3707 s%@sbindir@%$sbindir%g
3708 s%@libexecdir@%$libexecdir%g
3709 s%@datadir@%$datadir%g
3710 s%@sysconfdir@%$sysconfdir%g
3711 s%@sharedstatedir@%$sharedstatedir%g
3712 s%@localstatedir@%$localstatedir%g
3713 s%@libdir@%$libdir%g
3714 s%@includedir@%$includedir%g
3715 s%@oldincludedir@%$oldincludedir%g
3716 s%@infodir@%$infodir%g
3717 s%@mandir@%$mandir%g
3718 s%@host@%$host%g
3719 s%@host_alias@%$host_alias%g
3720 s%@host_cpu@%$host_cpu%g
3721 s%@host_vendor@%$host_vendor%g
3722 s%@host_os@%$host_os%g
3723 s%@target@%$target%g
3724 s%@target_alias@%$target_alias%g
3725 s%@target_cpu@%$target_cpu%g
3726 s%@target_vendor@%$target_vendor%g
3727 s%@target_os@%$target_os%g
3728 s%@build@%$build%g
3729 s%@build_alias@%$build_alias%g
3730 s%@build_cpu@%$build_cpu%g
3731 s%@build_vendor@%$build_vendor%g
3732 s%@build_os@%$build_os%g
3733 s%@CC@%$CC%g
3734 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3735 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3736 s%@INSTALL_DATA@%$INSTALL_DATA%g
3737 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
3738 s%@HDEFINES@%$HDEFINES%g
3739 s%@AR@%$AR%g
3740 s%@RANLIB@%$RANLIB%g
3741 s%@SET_MAKE@%$SET_MAKE%g
3742 s%@CPP@%$CPP%g
3743 s%@ALLOCA@%$ALLOCA%g
3744 s%@USE_NLS@%$USE_NLS%g
3745 s%@MSGFMT@%$MSGFMT%g
3746 s%@GMSGFMT@%$GMSGFMT%g
3747 s%@XGETTEXT@%$XGETTEXT%g
3748 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
3749 s%@CATALOGS@%$CATALOGS%g
3750 s%@CATOBJEXT@%$CATOBJEXT%g
3751 s%@DATADIRNAME@%$DATADIRNAME%g
3752 s%@GMOFILES@%$GMOFILES%g
3753 s%@INSTOBJEXT@%$INSTOBJEXT%g
3754 s%@INTLDEPS@%$INTLDEPS%g
3755 s%@INTLLIBS@%$INTLLIBS%g
3756 s%@INTLOBJS@%$INTLOBJS%g
3757 s%@POFILES@%$POFILES%g
3758 s%@POSUB@%$POSUB%g
3759 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
3760 s%@GT_NO@%$GT_NO%g
3761 s%@GT_YES@%$GT_YES%g
3762 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
3763 s%@l@%$l%g
3764 s%@MAINT@%$MAINT%g
3765 s%@sim_bswap@%$sim_bswap%g
3766 s%@sim_cflags@%$sim_cflags%g
3767 s%@sim_debug@%$sim_debug%g
3768 s%@sim_stdio@%$sim_stdio%g
3769 s%@sim_trace@%$sim_trace%g
3770 s%@sim_profile@%$sim_profile%g
3771 s%@EXEEXT@%$EXEEXT%g
3772 s%@CPP_FOR_TARGET@%$CPP_FOR_TARGET%g
3773 s%@TARGET_SUBDIR@%$TARGET_SUBDIR%g
3774
3775 CEOF
3776 EOF
3777
3778 cat >> $CONFIG_STATUS <<\EOF
3779
3780 # Split the substitutions into bite-sized pieces for seds with
3781 # small command number limits, like on Digital OSF/1 and HP-UX.
3782 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3783 ac_file=1 # Number of current file.
3784 ac_beg=1 # First line for current file.
3785 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3786 ac_more_lines=:
3787 ac_sed_cmds=""
3788 while $ac_more_lines; do
3789 if test $ac_beg -gt 1; then
3790 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3791 else
3792 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3793 fi
3794 if test ! -s conftest.s$ac_file; then
3795 ac_more_lines=false
3796 rm -f conftest.s$ac_file
3797 else
3798 if test -z "$ac_sed_cmds"; then
3799 ac_sed_cmds="sed -f conftest.s$ac_file"
3800 else
3801 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3802 fi
3803 ac_file=`expr $ac_file + 1`
3804 ac_beg=$ac_end
3805 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3806 fi
3807 done
3808 if test -z "$ac_sed_cmds"; then
3809 ac_sed_cmds=cat
3810 fi
3811 EOF
3812
3813 cat >> $CONFIG_STATUS <<EOF
3814
3815 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
3816 EOF
3817 cat >> $CONFIG_STATUS <<\EOF
3818 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3819 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3820 case "$ac_file" in
3821 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3822 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3823 *) ac_file_in="${ac_file}.in" ;;
3824 esac
3825
3826 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3827
3828 # Remove last slash and all that follows it. Not all systems have dirname.
3829 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3830 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3831 # The file is in a subdirectory.
3832 test ! -d "$ac_dir" && mkdir "$ac_dir"
3833 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3834 # A "../" for each directory in $ac_dir_suffix.
3835 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3836 else
3837 ac_dir_suffix= ac_dots=
3838 fi
3839
3840 case "$ac_given_srcdir" in
3841 .) srcdir=.
3842 if test -z "$ac_dots"; then top_srcdir=.
3843 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3844 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3845 *) # Relative path.
3846 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3847 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3848 esac
3849
3850 case "$ac_given_INSTALL" in
3851 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3852 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3853 esac
3854
3855 echo creating "$ac_file"
3856 rm -f "$ac_file"
3857 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3858 case "$ac_file" in
3859 *Makefile*) ac_comsub="1i\\
3860 # $configure_input" ;;
3861 *) ac_comsub= ;;
3862 esac
3863
3864 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3865 sed -e "$ac_comsub
3866 s%@configure_input@%$configure_input%g
3867 s%@srcdir@%$srcdir%g
3868 s%@top_srcdir@%$top_srcdir%g
3869 s%@INSTALL@%$INSTALL%g
3870 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3871 fi; done
3872 rm -f conftest.s*
3873
3874 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3875 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3876 #
3877 # ac_d sets the value in "#define NAME VALUE" lines.
3878 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3879 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3880 ac_dC='\3'
3881 ac_dD='%g'
3882 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3883 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3884 ac_uB='\([ ]\)%\1#\2define\3'
3885 ac_uC=' '
3886 ac_uD='\4%g'
3887 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3888 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3889 ac_eB='$%\1#\2define\3'
3890 ac_eC=' '
3891 ac_eD='%g'
3892
3893 if test "${CONFIG_HEADERS+set}" != set; then
3894 EOF
3895 cat >> $CONFIG_STATUS <<EOF
3896 CONFIG_HEADERS="cconfig.h:config.in"
3897 EOF
3898 cat >> $CONFIG_STATUS <<\EOF
3899 fi
3900 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3901 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3902 case "$ac_file" in
3903 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3904 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3905 *) ac_file_in="${ac_file}.in" ;;
3906 esac
3907
3908 echo creating $ac_file
3909
3910 rm -f conftest.frag conftest.in conftest.out
3911 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3912 cat $ac_file_inputs > conftest.in
3913
3914 EOF
3915
3916 # Transform confdefs.h into a sed script conftest.vals that substitutes
3917 # the proper values into config.h.in to produce config.h. And first:
3918 # Protect against being on the right side of a sed subst in config.status.
3919 # Protect against being in an unquoted here document in config.status.
3920 rm -f conftest.vals
3921 cat > conftest.hdr <<\EOF
3922 s/[\\&%]/\\&/g
3923 s%[\\$`]%\\&%g
3924 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3925 s%ac_d%ac_u%gp
3926 s%ac_u%ac_e%gp
3927 EOF
3928 sed -n -f conftest.hdr confdefs.h > conftest.vals
3929 rm -f conftest.hdr
3930
3931 # This sed command replaces #undef with comments. This is necessary, for
3932 # example, in the case of _POSIX_SOURCE, which is predefined and required
3933 # on some systems where configure will not decide to define it.
3934 cat >> conftest.vals <<\EOF
3935 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3936 EOF
3937
3938 # Break up conftest.vals because some shells have a limit on
3939 # the size of here documents, and old seds have small limits too.
3940
3941 rm -f conftest.tail
3942 while :
3943 do
3944 ac_lines=`grep -c . conftest.vals`
3945 # grep -c gives empty output for an empty file on some AIX systems.
3946 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3947 # Write a limited-size here document to conftest.frag.
3948 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3949 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3950 echo 'CEOF
3951 sed -f conftest.frag conftest.in > conftest.out
3952 rm -f conftest.in
3953 mv conftest.out conftest.in
3954 ' >> $CONFIG_STATUS
3955 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3956 rm -f conftest.vals
3957 mv conftest.tail conftest.vals
3958 done
3959 rm -f conftest.vals
3960
3961 cat >> $CONFIG_STATUS <<\EOF
3962 rm -f conftest.frag conftest.h
3963 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3964 cat conftest.in >> conftest.h
3965 rm -f conftest.in
3966 if cmp -s $ac_file conftest.h 2>/dev/null; then
3967 echo "$ac_file is unchanged"
3968 rm -f conftest.h
3969 else
3970 # Remove last slash and all that follows it. Not all systems have dirname.
3971 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3972 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3973 # The file is in a subdirectory.
3974 test ! -d "$ac_dir" && mkdir "$ac_dir"
3975 fi
3976 rm -f $ac_file
3977 mv conftest.h $ac_file
3978 fi
3979 fi; done
3980
3981 EOF
3982 cat >> $CONFIG_STATUS <<EOF
3983
3984 EOF
3985 cat >> $CONFIG_STATUS <<\EOF
3986 case x$CONFIG_HEADERS in xcconfig.h:config.in) echo > stamp-h ;; esac
3987 exit 0
3988 EOF
3989 chmod +x $CONFIG_STATUS
3990 rm -fr confdefs* $ac_clean_files
3991 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3992
This page took 0.133568 seconds and 5 git commands to generate.