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