Updating to version 1.3.2, last public release by Mike Vanier.
[gnushogi.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.57 for gnushogi 1.3.2.
4 #
5 # Report bugs to <mvanier@cs.caltech.edu>.
6 #
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## --------------------- ##
12 ## M4sh Initialization.  ##
13 ## --------------------- ##
14
15 # Be Bourne compatible
16 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17   emulate sh
18   NULLCMD=:
19   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20   # is contrary to our usage.  Disable this feature.
21   alias -g '${1+"$@"}'='"$@"'
22 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23   set -o posix
24 fi
25
26 # Support unset when possible.
27 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
28   as_unset=unset
29 else
30   as_unset=false
31 fi
32
33
34 # Work around bugs in pre-3.0 UWIN ksh.
35 $as_unset ENV MAIL MAILPATH
36 PS1='$ '
37 PS2='> '
38 PS4='+ '
39
40 # NLS nuisances.
41 for as_var in \
42   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
43   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
44   LC_TELEPHONE LC_TIME
45 do
46   if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
47     eval $as_var=C; export $as_var
48   else
49     $as_unset $as_var
50   fi
51 done
52
53 # Required to use basename.
54 if expr a : '\(a\)' >/dev/null 2>&1; then
55   as_expr=expr
56 else
57   as_expr=false
58 fi
59
60 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
61   as_basename=basename
62 else
63   as_basename=false
64 fi
65
66
67 # Name of the executable.
68 as_me=`$as_basename "$0" ||
69 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
70          X"$0" : 'X\(//\)$' \| \
71          X"$0" : 'X\(/\)$' \| \
72          .     : '\(.\)' 2>/dev/null ||
73 echo X/"$0" |
74     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
75           /^X\/\(\/\/\)$/{ s//\1/; q; }
76           /^X\/\(\/\).*/{ s//\1/; q; }
77           s/.*/./; q'`
78
79
80 # PATH needs CR, and LINENO needs CR and PATH.
81 # Avoid depending upon Character Ranges.
82 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
83 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
84 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
85 as_cr_digits='0123456789'
86 as_cr_alnum=$as_cr_Letters$as_cr_digits
87
88 # The user is always right.
89 if test "${PATH_SEPARATOR+set}" != set; then
90   echo "#! /bin/sh" >conf$$.sh
91   echo  "exit 0"   >>conf$$.sh
92   chmod +x conf$$.sh
93   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
94     PATH_SEPARATOR=';'
95   else
96     PATH_SEPARATOR=:
97   fi
98   rm -f conf$$.sh
99 fi
100
101
102   as_lineno_1=$LINENO
103   as_lineno_2=$LINENO
104   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
105   test "x$as_lineno_1" != "x$as_lineno_2" &&
106   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
107   # Find who we are.  Look in the path if we contain no path at all
108   # relative or not.
109   case $0 in
110     *[\\/]* ) as_myself=$0 ;;
111     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
112 for as_dir in $PATH
113 do
114   IFS=$as_save_IFS
115   test -z "$as_dir" && as_dir=.
116   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
117 done
118
119        ;;
120   esac
121   # We did not find ourselves, most probably we were run as `sh COMMAND'
122   # in which case we are not to be found in the path.
123   if test "x$as_myself" = x; then
124     as_myself=$0
125   fi
126   if test ! -f "$as_myself"; then
127     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
128    { (exit 1); exit 1; }; }
129   fi
130   case $CONFIG_SHELL in
131   '')
132     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
133 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
134 do
135   IFS=$as_save_IFS
136   test -z "$as_dir" && as_dir=.
137   for as_base in sh bash ksh sh5; do
138          case $as_dir in
139          /*)
140            if ("$as_dir/$as_base" -c '
141   as_lineno_1=$LINENO
142   as_lineno_2=$LINENO
143   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
144   test "x$as_lineno_1" != "x$as_lineno_2" &&
145   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
146              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
147              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
148              CONFIG_SHELL=$as_dir/$as_base
149              export CONFIG_SHELL
150              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
151            fi;;
152          esac
153        done
154 done
155 ;;
156   esac
157
158   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
159   # uniformly replaced by the line number.  The first 'sed' inserts a
160   # line-number line before each line; the second 'sed' does the real
161   # work.  The second script uses 'N' to pair each line-number line
162   # with the numbered line, and appends trailing '-' during
163   # substitution so that $LINENO is not a special case at line end.
164   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
165   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
166   sed '=' <$as_myself |
167     sed '
168       N
169       s,$,-,
170       : loop
171       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
172       t loop
173       s,-$,,
174       s,^['$as_cr_digits']*\n,,
175     ' >$as_me.lineno &&
176   chmod +x $as_me.lineno ||
177     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
178    { (exit 1); exit 1; }; }
179
180   # Don't try to exec as it changes $[0], causing all sort of problems
181   # (the dirname of $[0] is not the place where we might find the
182   # original and so on.  Autoconf is especially sensible to this).
183   . ./$as_me.lineno
184   # Exit status is that of the last command.
185   exit
186 }
187
188
189 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
190   *c*,-n*) ECHO_N= ECHO_C='
191 ' ECHO_T='      ' ;;
192   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
193   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
194 esac
195
196 if expr a : '\(a\)' >/dev/null 2>&1; then
197   as_expr=expr
198 else
199   as_expr=false
200 fi
201
202 rm -f conf$$ conf$$.exe conf$$.file
203 echo >conf$$.file
204 if ln -s conf$$.file conf$$ 2>/dev/null; then
205   # We could just check for DJGPP; but this test a) works b) is more generic
206   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
207   if test -f conf$$.exe; then
208     # Don't use ln at all; we don't have any links
209     as_ln_s='cp -p'
210   else
211     as_ln_s='ln -s'
212   fi
213 elif ln conf$$.file conf$$ 2>/dev/null; then
214   as_ln_s=ln
215 else
216   as_ln_s='cp -p'
217 fi
218 rm -f conf$$ conf$$.exe conf$$.file
219
220 if mkdir -p . 2>/dev/null; then
221   as_mkdir_p=:
222 else
223   as_mkdir_p=false
224 fi
225
226 as_executable_p="test -f"
227
228 # Sed expression to map a string onto a valid CPP name.
229 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
230
231 # Sed expression to map a string onto a valid variable name.
232 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
233
234
235 # IFS
236 # We need space, tab and new line, in precisely that order.
237 as_nl='
238 '
239 IFS="   $as_nl"
240
241 # CDPATH.
242 $as_unset CDPATH
243
244
245 # Name of the host.
246 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
247 # so uname gets run too.
248 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
249
250 exec 6>&1
251
252 #
253 # Initializations.
254 #
255 ac_default_prefix=/usr/local
256 ac_config_libobj_dir=.
257 cross_compiling=no
258 subdirs=
259 MFLAGS=
260 MAKEFLAGS=
261 SHELL=${CONFIG_SHELL-/bin/sh}
262
263 # Maximum number of lines to put in a shell here document.
264 # This variable seems obsolete.  It should probably be removed, and
265 # only ac_max_sed_lines should be used.
266 : ${ac_max_here_lines=38}
267
268 # Identity of this package.
269 PACKAGE_NAME='gnushogi'
270 PACKAGE_TARNAME='gnushogi'
271 PACKAGE_VERSION='1.3.2'
272 PACKAGE_STRING='gnushogi 1.3.2'
273 PACKAGE_BUGREPORT='mvanier@cs.caltech.edu'
274
275 ac_unique_file="version.h"
276 # Factoring default headers for most tests.
277 ac_includes_default="\
278 #include <stdio.h>
279 #if HAVE_SYS_TYPES_H
280 # include <sys/types.h>
281 #endif
282 #if HAVE_SYS_STAT_H
283 # include <sys/stat.h>
284 #endif
285 #if STDC_HEADERS
286 # include <stdlib.h>
287 # include <stddef.h>
288 #else
289 # if HAVE_STDLIB_H
290 #  include <stdlib.h>
291 # endif
292 #endif
293 #if HAVE_STRING_H
294 # if !STDC_HEADERS && HAVE_MEMORY_H
295 #  include <memory.h>
296 # endif
297 # include <string.h>
298 #endif
299 #if HAVE_STRINGS_H
300 # include <strings.h>
301 #endif
302 #if HAVE_INTTYPES_H
303 # include <inttypes.h>
304 #else
305 # if HAVE_STDINT_H
306 #  include <stdint.h>
307 # endif
308 #endif
309 #if HAVE_UNISTD_H
310 # include <unistd.h>
311 #endif"
312
313 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT YACC LEX LEXLIB LEX_OUTPUT_ROOT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS WARNINGS CEXTRAFLAGS CEXTRAFLAGS2 EGREP LIBOBJS OPT FIRST_SHOGI_PROGRAM SECOND_SHOGI_PROGRAM FIRST_HOST SECOND_HOST XSHOGI XSHOGIINSTALL XSHOGICLEAN LTLIBOBJS'
314 ac_subst_files=''
315
316 # Initialize some variables set by options.
317 ac_init_help=
318 ac_init_version=false
319 # The variables have the same names as the options, with
320 # dashes changed to underlines.
321 cache_file=/dev/null
322 exec_prefix=NONE
323 no_create=
324 no_recursion=
325 prefix=NONE
326 program_prefix=NONE
327 program_suffix=NONE
328 program_transform_name=s,x,x,
329 silent=
330 site=
331 srcdir=
332 verbose=
333 x_includes=NONE
334 x_libraries=NONE
335
336 # Installation directory options.
337 # These are left unexpanded so users can "make install exec_prefix=/foo"
338 # and all the variables that are supposed to be based on exec_prefix
339 # by default will actually change.
340 # Use braces instead of parens because sh, perl, etc. also accept them.
341 bindir='${exec_prefix}/bin'
342 sbindir='${exec_prefix}/sbin'
343 libexecdir='${exec_prefix}/libexec'
344 datadir='${prefix}/share'
345 sysconfdir='${prefix}/etc'
346 sharedstatedir='${prefix}/com'
347 localstatedir='${prefix}/var'
348 libdir='${exec_prefix}/lib'
349 includedir='${prefix}/include'
350 oldincludedir='/usr/include'
351 infodir='${prefix}/info'
352 mandir='${prefix}/man'
353
354 ac_prev=
355 for ac_option
356 do
357   # If the previous option needs an argument, assign it.
358   if test -n "$ac_prev"; then
359     eval "$ac_prev=\$ac_option"
360     ac_prev=
361     continue
362   fi
363
364   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
365
366   # Accept the important Cygnus configure options, so we can diagnose typos.
367
368   case $ac_option in
369
370   -bindir | --bindir | --bindi | --bind | --bin | --bi)
371     ac_prev=bindir ;;
372   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
373     bindir=$ac_optarg ;;
374
375   -build | --build | --buil | --bui | --bu)
376     ac_prev=build_alias ;;
377   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
378     build_alias=$ac_optarg ;;
379
380   -cache-file | --cache-file | --cache-fil | --cache-fi \
381   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
382     ac_prev=cache_file ;;
383   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
384   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
385     cache_file=$ac_optarg ;;
386
387   --config-cache | -C)
388     cache_file=config.cache ;;
389
390   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
391     ac_prev=datadir ;;
392   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
393   | --da=*)
394     datadir=$ac_optarg ;;
395
396   -disable-* | --disable-*)
397     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
398     # Reject names that are not valid shell variable names.
399     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
400       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
401    { (exit 1); exit 1; }; }
402     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
403     eval "enable_$ac_feature=no" ;;
404
405   -enable-* | --enable-*)
406     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
407     # Reject names that are not valid shell variable names.
408     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
409       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
410    { (exit 1); exit 1; }; }
411     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
412     case $ac_option in
413       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
414       *) ac_optarg=yes ;;
415     esac
416     eval "enable_$ac_feature='$ac_optarg'" ;;
417
418   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
419   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
420   | --exec | --exe | --ex)
421     ac_prev=exec_prefix ;;
422   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
423   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
424   | --exec=* | --exe=* | --ex=*)
425     exec_prefix=$ac_optarg ;;
426
427   -gas | --gas | --ga | --g)
428     # Obsolete; use --with-gas.
429     with_gas=yes ;;
430
431   -help | --help | --hel | --he | -h)
432     ac_init_help=long ;;
433   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
434     ac_init_help=recursive ;;
435   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
436     ac_init_help=short ;;
437
438   -host | --host | --hos | --ho)
439     ac_prev=host_alias ;;
440   -host=* | --host=* | --hos=* | --ho=*)
441     host_alias=$ac_optarg ;;
442
443   -includedir | --includedir | --includedi | --included | --include \
444   | --includ | --inclu | --incl | --inc)
445     ac_prev=includedir ;;
446   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
447   | --includ=* | --inclu=* | --incl=* | --inc=*)
448     includedir=$ac_optarg ;;
449
450   -infodir | --infodir | --infodi | --infod | --info | --inf)
451     ac_prev=infodir ;;
452   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
453     infodir=$ac_optarg ;;
454
455   -libdir | --libdir | --libdi | --libd)
456     ac_prev=libdir ;;
457   -libdir=* | --libdir=* | --libdi=* | --libd=*)
458     libdir=$ac_optarg ;;
459
460   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
461   | --libexe | --libex | --libe)
462     ac_prev=libexecdir ;;
463   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
464   | --libexe=* | --libex=* | --libe=*)
465     libexecdir=$ac_optarg ;;
466
467   -localstatedir | --localstatedir | --localstatedi | --localstated \
468   | --localstate | --localstat | --localsta | --localst \
469   | --locals | --local | --loca | --loc | --lo)
470     ac_prev=localstatedir ;;
471   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
472   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
473   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
474     localstatedir=$ac_optarg ;;
475
476   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
477     ac_prev=mandir ;;
478   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
479     mandir=$ac_optarg ;;
480
481   -nfp | --nfp | --nf)
482     # Obsolete; use --without-fp.
483     with_fp=no ;;
484
485   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
486   | --no-cr | --no-c | -n)
487     no_create=yes ;;
488
489   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
490   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
491     no_recursion=yes ;;
492
493   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
494   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
495   | --oldin | --oldi | --old | --ol | --o)
496     ac_prev=oldincludedir ;;
497   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
498   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
499   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
500     oldincludedir=$ac_optarg ;;
501
502   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
503     ac_prev=prefix ;;
504   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
505     prefix=$ac_optarg ;;
506
507   -program-prefix | --program-prefix | --program-prefi | --program-pref \
508   | --program-pre | --program-pr | --program-p)
509     ac_prev=program_prefix ;;
510   -program-prefix=* | --program-prefix=* | --program-prefi=* \
511   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
512     program_prefix=$ac_optarg ;;
513
514   -program-suffix | --program-suffix | --program-suffi | --program-suff \
515   | --program-suf | --program-su | --program-s)
516     ac_prev=program_suffix ;;
517   -program-suffix=* | --program-suffix=* | --program-suffi=* \
518   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
519     program_suffix=$ac_optarg ;;
520
521   -program-transform-name | --program-transform-name \
522   | --program-transform-nam | --program-transform-na \
523   | --program-transform-n | --program-transform- \
524   | --program-transform | --program-transfor \
525   | --program-transfo | --program-transf \
526   | --program-trans | --program-tran \
527   | --progr-tra | --program-tr | --program-t)
528     ac_prev=program_transform_name ;;
529   -program-transform-name=* | --program-transform-name=* \
530   | --program-transform-nam=* | --program-transform-na=* \
531   | --program-transform-n=* | --program-transform-=* \
532   | --program-transform=* | --program-transfor=* \
533   | --program-transfo=* | --program-transf=* \
534   | --program-trans=* | --program-tran=* \
535   | --progr-tra=* | --program-tr=* | --program-t=*)
536     program_transform_name=$ac_optarg ;;
537
538   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
539   | -silent | --silent | --silen | --sile | --sil)
540     silent=yes ;;
541
542   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
543     ac_prev=sbindir ;;
544   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
545   | --sbi=* | --sb=*)
546     sbindir=$ac_optarg ;;
547
548   -sharedstatedir | --sharedstatedir | --sharedstatedi \
549   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
550   | --sharedst | --shareds | --shared | --share | --shar \
551   | --sha | --sh)
552     ac_prev=sharedstatedir ;;
553   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
554   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
555   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
556   | --sha=* | --sh=*)
557     sharedstatedir=$ac_optarg ;;
558
559   -site | --site | --sit)
560     ac_prev=site ;;
561   -site=* | --site=* | --sit=*)
562     site=$ac_optarg ;;
563
564   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
565     ac_prev=srcdir ;;
566   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
567     srcdir=$ac_optarg ;;
568
569   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
570   | --syscon | --sysco | --sysc | --sys | --sy)
571     ac_prev=sysconfdir ;;
572   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
573   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
574     sysconfdir=$ac_optarg ;;
575
576   -target | --target | --targe | --targ | --tar | --ta | --t)
577     ac_prev=target_alias ;;
578   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
579     target_alias=$ac_optarg ;;
580
581   -v | -verbose | --verbose | --verbos | --verbo | --verb)
582     verbose=yes ;;
583
584   -version | --version | --versio | --versi | --vers | -V)
585     ac_init_version=: ;;
586
587   -with-* | --with-*)
588     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
589     # Reject names that are not valid shell variable names.
590     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
591       { echo "$as_me: error: invalid package name: $ac_package" >&2
592    { (exit 1); exit 1; }; }
593     ac_package=`echo $ac_package| sed 's/-/_/g'`
594     case $ac_option in
595       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
596       *) ac_optarg=yes ;;
597     esac
598     eval "with_$ac_package='$ac_optarg'" ;;
599
600   -without-* | --without-*)
601     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
602     # Reject names that are not valid shell variable names.
603     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
604       { echo "$as_me: error: invalid package name: $ac_package" >&2
605    { (exit 1); exit 1; }; }
606     ac_package=`echo $ac_package | sed 's/-/_/g'`
607     eval "with_$ac_package=no" ;;
608
609   --x)
610     # Obsolete; use --with-x.
611     with_x=yes ;;
612
613   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
614   | --x-incl | --x-inc | --x-in | --x-i)
615     ac_prev=x_includes ;;
616   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
617   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
618     x_includes=$ac_optarg ;;
619
620   -x-libraries | --x-libraries | --x-librarie | --x-librari \
621   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
622     ac_prev=x_libraries ;;
623   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
624   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
625     x_libraries=$ac_optarg ;;
626
627   -*) { echo "$as_me: error: unrecognized option: $ac_option
628 Try \`$0 --help' for more information." >&2
629    { (exit 1); exit 1; }; }
630     ;;
631
632   *=*)
633     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
634     # Reject names that are not valid shell variable names.
635     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
636       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
637    { (exit 1); exit 1; }; }
638     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
639     eval "$ac_envvar='$ac_optarg'"
640     export $ac_envvar ;;
641
642   *)
643     # FIXME: should be removed in autoconf 3.0.
644     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
645     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
646       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
647     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
648     ;;
649
650   esac
651 done
652
653 if test -n "$ac_prev"; then
654   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
655   { echo "$as_me: error: missing argument to $ac_option" >&2
656    { (exit 1); exit 1; }; }
657 fi
658
659 # Be sure to have absolute paths.
660 for ac_var in exec_prefix prefix
661 do
662   eval ac_val=$`echo $ac_var`
663   case $ac_val in
664     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
665     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
666    { (exit 1); exit 1; }; };;
667   esac
668 done
669
670 # Be sure to have absolute paths.
671 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
672               localstatedir libdir includedir oldincludedir infodir mandir
673 do
674   eval ac_val=$`echo $ac_var`
675   case $ac_val in
676     [\\/$]* | ?:[\\/]* ) ;;
677     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
678    { (exit 1); exit 1; }; };;
679   esac
680 done
681
682 # There might be people who depend on the old broken behavior: `$host'
683 # used to hold the argument of --host etc.
684 # FIXME: To remove some day.
685 build=$build_alias
686 host=$host_alias
687 target=$target_alias
688
689 # FIXME: To remove some day.
690 if test "x$host_alias" != x; then
691   if test "x$build_alias" = x; then
692     cross_compiling=maybe
693     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
694     If a cross compiler is detected then cross compile mode will be used." >&2
695   elif test "x$build_alias" != "x$host_alias"; then
696     cross_compiling=yes
697   fi
698 fi
699
700 ac_tool_prefix=
701 test -n "$host_alias" && ac_tool_prefix=$host_alias-
702
703 test "$silent" = yes && exec 6>/dev/null
704
705
706 # Find the source files, if location was not specified.
707 if test -z "$srcdir"; then
708   ac_srcdir_defaulted=yes
709   # Try the directory containing this script, then its parent.
710   ac_confdir=`(dirname "$0") 2>/dev/null ||
711 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
712          X"$0" : 'X\(//\)[^/]' \| \
713          X"$0" : 'X\(//\)$' \| \
714          X"$0" : 'X\(/\)' \| \
715          .     : '\(.\)' 2>/dev/null ||
716 echo X"$0" |
717     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
718           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
719           /^X\(\/\/\)$/{ s//\1/; q; }
720           /^X\(\/\).*/{ s//\1/; q; }
721           s/.*/./; q'`
722   srcdir=$ac_confdir
723   if test ! -r $srcdir/$ac_unique_file; then
724     srcdir=..
725   fi
726 else
727   ac_srcdir_defaulted=no
728 fi
729 if test ! -r $srcdir/$ac_unique_file; then
730   if test "$ac_srcdir_defaulted" = yes; then
731     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
732    { (exit 1); exit 1; }; }
733   else
734     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
735    { (exit 1); exit 1; }; }
736   fi
737 fi
738 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
739   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
740    { (exit 1); exit 1; }; }
741 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
742 ac_env_build_alias_set=${build_alias+set}
743 ac_env_build_alias_value=$build_alias
744 ac_cv_env_build_alias_set=${build_alias+set}
745 ac_cv_env_build_alias_value=$build_alias
746 ac_env_host_alias_set=${host_alias+set}
747 ac_env_host_alias_value=$host_alias
748 ac_cv_env_host_alias_set=${host_alias+set}
749 ac_cv_env_host_alias_value=$host_alias
750 ac_env_target_alias_set=${target_alias+set}
751 ac_env_target_alias_value=$target_alias
752 ac_cv_env_target_alias_set=${target_alias+set}
753 ac_cv_env_target_alias_value=$target_alias
754 ac_env_CC_set=${CC+set}
755 ac_env_CC_value=$CC
756 ac_cv_env_CC_set=${CC+set}
757 ac_cv_env_CC_value=$CC
758 ac_env_CFLAGS_set=${CFLAGS+set}
759 ac_env_CFLAGS_value=$CFLAGS
760 ac_cv_env_CFLAGS_set=${CFLAGS+set}
761 ac_cv_env_CFLAGS_value=$CFLAGS
762 ac_env_LDFLAGS_set=${LDFLAGS+set}
763 ac_env_LDFLAGS_value=$LDFLAGS
764 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
765 ac_cv_env_LDFLAGS_value=$LDFLAGS
766 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
767 ac_env_CPPFLAGS_value=$CPPFLAGS
768 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
769 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
770 ac_env_CPP_set=${CPP+set}
771 ac_env_CPP_value=$CPP
772 ac_cv_env_CPP_set=${CPP+set}
773 ac_cv_env_CPP_value=$CPP
774
775 #
776 # Report the --help message.
777 #
778 if test "$ac_init_help" = "long"; then
779   # Omit some internal or obsolete options to make the list less imposing.
780   # This message is too long to be a string in the A/UX 3.1 sh.
781   cat <<_ACEOF
782 \`configure' configures gnushogi 1.3.2 to adapt to many kinds of systems.
783
784 Usage: $0 [OPTION]... [VAR=VALUE]...
785
786 To assign environment variables (e.g., CC, CFLAGS...), specify them as
787 VAR=VALUE.  See below for descriptions of some of the useful variables.
788
789 Defaults for the options are specified in brackets.
790
791 Configuration:
792   -h, --help              display this help and exit
793       --help=short        display options specific to this package
794       --help=recursive    display the short help of all the included packages
795   -V, --version           display version information and exit
796   -q, --quiet, --silent   do not print \`checking...' messages
797       --cache-file=FILE   cache test results in FILE [disabled]
798   -C, --config-cache      alias for \`--cache-file=config.cache'
799   -n, --no-create         do not create output files
800       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
801
802 _ACEOF
803
804   cat <<_ACEOF
805 Installation directories:
806   --prefix=PREFIX         install architecture-independent files in PREFIX
807                           [$ac_default_prefix]
808   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
809                           [PREFIX]
810
811 By default, \`make install' will install all the files in
812 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
813 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
814 for instance \`--prefix=\$HOME'.
815
816 For better control, use the options below.
817
818 Fine tuning of the installation directories:
819   --bindir=DIR           user executables [EPREFIX/bin]
820   --sbindir=DIR          system admin executables [EPREFIX/sbin]
821   --libexecdir=DIR       program executables [EPREFIX/libexec]
822   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
823   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
824   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
825   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
826   --libdir=DIR           object code libraries [EPREFIX/lib]
827   --includedir=DIR       C header files [PREFIX/include]
828   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
829   --infodir=DIR          info documentation [PREFIX/info]
830   --mandir=DIR           man documentation [PREFIX/man]
831 _ACEOF
832
833   cat <<\_ACEOF
834
835 X features:
836   --x-includes=DIR    X include files are in DIR
837   --x-libraries=DIR   X library files are in DIR
838 _ACEOF
839 fi
840
841 if test -n "$ac_init_help"; then
842   case $ac_init_help in
843      short | recursive ) echo "Configuration of gnushogi 1.3.2:";;
844    esac
845   cat <<\_ACEOF
846
847 Optional Packages:
848   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
849   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
850   --with-x                use the X Window System
851   --with-top-part-bitmaps    Use top part of Kanji bitmaps only.
852   --with-first-shogi-program=PROGNAME
853         Use PROGNAME as the first shogi program (default: gnushogi)
854   --with-second-shogi-program=PROGNAME
855         Use PROGNAME as the second shogi program (default: gnushogi)
856   --with-first-host=HOSTNAME
857         Use HOSTNAME as the machine on which the first shogi program
858         runs (default: localhost)
859   --with-second-host=HOSTNAME
860         Use HOSTNAME as the machine on which the second shogi program
861         runs (default: localhost)
862   --with-xshogi
863         Compile the xshogi graphical interface to GNU shogi (default: yes)
864
865 Some influential environment variables:
866   CC          C compiler command
867   CFLAGS      C compiler flags
868   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
869               nonstandard directory <lib dir>
870   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
871               headers in a nonstandard directory <include dir>
872   CPP         C preprocessor
873
874 Use these variables to override the choices made by `configure' or to help
875 it to find libraries and programs with nonstandard names/locations.
876
877 Report bugs to <mvanier@cs.caltech.edu>.
878 _ACEOF
879 fi
880
881 if test "$ac_init_help" = "recursive"; then
882   # If there are subdirs, report their specific --help.
883   ac_popdir=`pwd`
884   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
885     test -d $ac_dir || continue
886     ac_builddir=.
887
888 if test "$ac_dir" != .; then
889   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
890   # A "../" for each directory in $ac_dir_suffix.
891   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
892 else
893   ac_dir_suffix= ac_top_builddir=
894 fi
895
896 case $srcdir in
897   .)  # No --srcdir option.  We are building in place.
898     ac_srcdir=.
899     if test -z "$ac_top_builddir"; then
900        ac_top_srcdir=.
901     else
902        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
903     fi ;;
904   [\\/]* | ?:[\\/]* )  # Absolute path.
905     ac_srcdir=$srcdir$ac_dir_suffix;
906     ac_top_srcdir=$srcdir ;;
907   *) # Relative path.
908     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
909     ac_top_srcdir=$ac_top_builddir$srcdir ;;
910 esac
911 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
912 # absolute.
913 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
914 ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
915 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
916 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
917
918     cd $ac_dir
919     # Check for guested configure; otherwise get Cygnus style configure.
920     if test -f $ac_srcdir/configure.gnu; then
921       echo
922       $SHELL $ac_srcdir/configure.gnu  --help=recursive
923     elif test -f $ac_srcdir/configure; then
924       echo
925       $SHELL $ac_srcdir/configure  --help=recursive
926     elif test -f $ac_srcdir/configure.ac ||
927            test -f $ac_srcdir/configure.in; then
928       echo
929       $ac_configure --help
930     else
931       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
932     fi
933     cd $ac_popdir
934   done
935 fi
936
937 test -n "$ac_init_help" && exit 0
938 if $ac_init_version; then
939   cat <<\_ACEOF
940 gnushogi configure 1.3.2
941 generated by GNU Autoconf 2.57
942
943 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
944 Free Software Foundation, Inc.
945 This configure script is free software; the Free Software Foundation
946 gives unlimited permission to copy, distribute and modify it.
947 _ACEOF
948   exit 0
949 fi
950 exec 5>config.log
951 cat >&5 <<_ACEOF
952 This file contains any messages produced by compilers while
953 running configure, to aid debugging if configure makes a mistake.
954
955 It was created by gnushogi $as_me 1.3.2, which was
956 generated by GNU Autoconf 2.57.  Invocation command line was
957
958   $ $0 $@
959
960 _ACEOF
961 {
962 cat <<_ASUNAME
963 ## --------- ##
964 ## Platform. ##
965 ## --------- ##
966
967 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
968 uname -m = `(uname -m) 2>/dev/null || echo unknown`
969 uname -r = `(uname -r) 2>/dev/null || echo unknown`
970 uname -s = `(uname -s) 2>/dev/null || echo unknown`
971 uname -v = `(uname -v) 2>/dev/null || echo unknown`
972
973 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
974 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
975
976 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
977 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
978 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
979 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
980 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
981 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
982 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
983
984 _ASUNAME
985
986 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
987 for as_dir in $PATH
988 do
989   IFS=$as_save_IFS
990   test -z "$as_dir" && as_dir=.
991   echo "PATH: $as_dir"
992 done
993
994 } >&5
995
996 cat >&5 <<_ACEOF
997
998
999 ## ----------- ##
1000 ## Core tests. ##
1001 ## ----------- ##
1002
1003 _ACEOF
1004
1005
1006 # Keep a trace of the command line.
1007 # Strip out --no-create and --no-recursion so they do not pile up.
1008 # Strip out --silent because we don't want to record it for future runs.
1009 # Also quote any args containing shell meta-characters.
1010 # Make two passes to allow for proper duplicate-argument suppression.
1011 ac_configure_args=
1012 ac_configure_args0=
1013 ac_configure_args1=
1014 ac_sep=
1015 ac_must_keep_next=false
1016 for ac_pass in 1 2
1017 do
1018   for ac_arg
1019   do
1020     case $ac_arg in
1021     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1022     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1023     | -silent | --silent | --silen | --sile | --sil)
1024       continue ;;
1025     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1026       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1027     esac
1028     case $ac_pass in
1029     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1030     2)
1031       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1032       if test $ac_must_keep_next = true; then
1033         ac_must_keep_next=false # Got value, back to normal.
1034       else
1035         case $ac_arg in
1036           *=* | --config-cache | -C | -disable-* | --disable-* \
1037           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1038           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1039           | -with-* | --with-* | -without-* | --without-* | --x)
1040             case "$ac_configure_args0 " in
1041               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1042             esac
1043             ;;
1044           -* ) ac_must_keep_next=true ;;
1045         esac
1046       fi
1047       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1048       # Get rid of the leading space.
1049       ac_sep=" "
1050       ;;
1051     esac
1052   done
1053 done
1054 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1055 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1056
1057 # When interrupted or exit'd, cleanup temporary files, and complete
1058 # config.log.  We remove comments because anyway the quotes in there
1059 # would cause problems or look ugly.
1060 # WARNING: Be sure not to use single quotes in there, as some shells,
1061 # such as our DU 5.0 friend, will then `close' the trap.
1062 trap 'exit_status=$?
1063   # Save into config.log some information that might help in debugging.
1064   {
1065     echo
1066
1067     cat <<\_ASBOX
1068 ## ---------------- ##
1069 ## Cache variables. ##
1070 ## ---------------- ##
1071 _ASBOX
1072     echo
1073     # The following way of writing the cache mishandles newlines in values,
1074 {
1075   (set) 2>&1 |
1076     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1077     *ac_space=\ *)
1078       sed -n \
1079         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1080           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1081       ;;
1082     *)
1083       sed -n \
1084         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1085       ;;
1086     esac;
1087 }
1088     echo
1089
1090     cat <<\_ASBOX
1091 ## ----------------- ##
1092 ## Output variables. ##
1093 ## ----------------- ##
1094 _ASBOX
1095     echo
1096     for ac_var in $ac_subst_vars
1097     do
1098       eval ac_val=$`echo $ac_var`
1099       echo "$ac_var='"'"'$ac_val'"'"'"
1100     done | sort
1101     echo
1102
1103     if test -n "$ac_subst_files"; then
1104       cat <<\_ASBOX
1105 ## ------------- ##
1106 ## Output files. ##
1107 ## ------------- ##
1108 _ASBOX
1109       echo
1110       for ac_var in $ac_subst_files
1111       do
1112         eval ac_val=$`echo $ac_var`
1113         echo "$ac_var='"'"'$ac_val'"'"'"
1114       done | sort
1115       echo
1116     fi
1117
1118     if test -s confdefs.h; then
1119       cat <<\_ASBOX
1120 ## ----------- ##
1121 ## confdefs.h. ##
1122 ## ----------- ##
1123 _ASBOX
1124       echo
1125       sed "/^$/d" confdefs.h | sort
1126       echo
1127     fi
1128     test "$ac_signal" != 0 &&
1129       echo "$as_me: caught signal $ac_signal"
1130     echo "$as_me: exit $exit_status"
1131   } >&5
1132   rm -f core core.* *.core &&
1133   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1134     exit $exit_status
1135      ' 0
1136 for ac_signal in 1 2 13 15; do
1137   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1138 done
1139 ac_signal=0
1140
1141 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1142 rm -rf conftest* confdefs.h
1143 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1144 echo >confdefs.h
1145
1146 # Predefined preprocessor variables.
1147
1148 cat >>confdefs.h <<_ACEOF
1149 #define PACKAGE_NAME "$PACKAGE_NAME"
1150 _ACEOF
1151
1152
1153 cat >>confdefs.h <<_ACEOF
1154 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1155 _ACEOF
1156
1157
1158 cat >>confdefs.h <<_ACEOF
1159 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1160 _ACEOF
1161
1162
1163 cat >>confdefs.h <<_ACEOF
1164 #define PACKAGE_STRING "$PACKAGE_STRING"
1165 _ACEOF
1166
1167
1168 cat >>confdefs.h <<_ACEOF
1169 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1170 _ACEOF
1171
1172
1173 # Let the site file select an alternate cache file if it wants to.
1174 # Prefer explicitly selected file to automatically selected ones.
1175 if test -z "$CONFIG_SITE"; then
1176   if test "x$prefix" != xNONE; then
1177     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1178   else
1179     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1180   fi
1181 fi
1182 for ac_site_file in $CONFIG_SITE; do
1183   if test -r "$ac_site_file"; then
1184     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1185 echo "$as_me: loading site script $ac_site_file" >&6;}
1186     sed 's/^/| /' "$ac_site_file" >&5
1187     . "$ac_site_file"
1188   fi
1189 done
1190
1191 if test -r "$cache_file"; then
1192   # Some versions of bash will fail to source /dev/null (special
1193   # files actually), so we avoid doing that.
1194   if test -f "$cache_file"; then
1195     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1196 echo "$as_me: loading cache $cache_file" >&6;}
1197     case $cache_file in
1198       [\\/]* | ?:[\\/]* ) . $cache_file;;
1199       *)                      . ./$cache_file;;
1200     esac
1201   fi
1202 else
1203   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1204 echo "$as_me: creating cache $cache_file" >&6;}
1205   >$cache_file
1206 fi
1207
1208 # Check that the precious variables saved in the cache have kept the same
1209 # value.
1210 ac_cache_corrupted=false
1211 for ac_var in `(set) 2>&1 |
1212                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1213   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1214   eval ac_new_set=\$ac_env_${ac_var}_set
1215   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1216   eval ac_new_val="\$ac_env_${ac_var}_value"
1217   case $ac_old_set,$ac_new_set in
1218     set,)
1219       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1220 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1221       ac_cache_corrupted=: ;;
1222     ,set)
1223       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1224 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1225       ac_cache_corrupted=: ;;
1226     ,);;
1227     *)
1228       if test "x$ac_old_val" != "x$ac_new_val"; then
1229         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1230 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1231         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1232 echo "$as_me:   former value:  $ac_old_val" >&2;}
1233         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1234 echo "$as_me:   current value: $ac_new_val" >&2;}
1235         ac_cache_corrupted=:
1236       fi;;
1237   esac
1238   # Pass precious variables to config.status.
1239   if test "$ac_new_set" = set; then
1240     case $ac_new_val in
1241     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1242       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1243     *) ac_arg=$ac_var=$ac_new_val ;;
1244     esac
1245     case " $ac_configure_args " in
1246       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1247       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1248     esac
1249   fi
1250 done
1251 if $ac_cache_corrupted; then
1252   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1253 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1254   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1255 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1256    { (exit 1); exit 1; }; }
1257 fi
1258
1259 ac_ext=c
1260 ac_cpp='$CPP $CPPFLAGS'
1261 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1262 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1263 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292           ac_config_headers="$ac_config_headers config.h"
1293
1294
1295
1296 #
1297 # Check for C compiler.
1298 #
1299
1300 echo
1301 echo "$as_me:$LINENO: checking for C compiler" >&5
1302 echo $ECHO_N "checking for C compiler... $ECHO_C" >&6
1303 echo
1304
1305 ac_ext=c
1306 ac_cpp='$CPP $CPPFLAGS'
1307 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1308 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1309 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1310 if test -n "$ac_tool_prefix"; then
1311   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1312 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1313 echo "$as_me:$LINENO: checking for $ac_word" >&5
1314 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1315 if test "${ac_cv_prog_CC+set}" = set; then
1316   echo $ECHO_N "(cached) $ECHO_C" >&6
1317 else
1318   if test -n "$CC"; then
1319   ac_cv_prog_CC="$CC" # Let the user override the test.
1320 else
1321 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1322 for as_dir in $PATH
1323 do
1324   IFS=$as_save_IFS
1325   test -z "$as_dir" && as_dir=.
1326   for ac_exec_ext in '' $ac_executable_extensions; do
1327   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1328     ac_cv_prog_CC="${ac_tool_prefix}gcc"
1329     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1330     break 2
1331   fi
1332 done
1333 done
1334
1335 fi
1336 fi
1337 CC=$ac_cv_prog_CC
1338 if test -n "$CC"; then
1339   echo "$as_me:$LINENO: result: $CC" >&5
1340 echo "${ECHO_T}$CC" >&6
1341 else
1342   echo "$as_me:$LINENO: result: no" >&5
1343 echo "${ECHO_T}no" >&6
1344 fi
1345
1346 fi
1347 if test -z "$ac_cv_prog_CC"; then
1348   ac_ct_CC=$CC
1349   # Extract the first word of "gcc", so it can be a program name with args.
1350 set dummy gcc; ac_word=$2
1351 echo "$as_me:$LINENO: checking for $ac_word" >&5
1352 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1353 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1354   echo $ECHO_N "(cached) $ECHO_C" >&6
1355 else
1356   if test -n "$ac_ct_CC"; then
1357   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1358 else
1359 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1360 for as_dir in $PATH
1361 do
1362   IFS=$as_save_IFS
1363   test -z "$as_dir" && as_dir=.
1364   for ac_exec_ext in '' $ac_executable_extensions; do
1365   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1366     ac_cv_prog_ac_ct_CC="gcc"
1367     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1368     break 2
1369   fi
1370 done
1371 done
1372
1373 fi
1374 fi
1375 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1376 if test -n "$ac_ct_CC"; then
1377   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1378 echo "${ECHO_T}$ac_ct_CC" >&6
1379 else
1380   echo "$as_me:$LINENO: result: no" >&5
1381 echo "${ECHO_T}no" >&6
1382 fi
1383
1384   CC=$ac_ct_CC
1385 else
1386   CC="$ac_cv_prog_CC"
1387 fi
1388
1389 if test -z "$CC"; then
1390   if test -n "$ac_tool_prefix"; then
1391   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1392 set dummy ${ac_tool_prefix}cc; ac_word=$2
1393 echo "$as_me:$LINENO: checking for $ac_word" >&5
1394 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1395 if test "${ac_cv_prog_CC+set}" = set; then
1396   echo $ECHO_N "(cached) $ECHO_C" >&6
1397 else
1398   if test -n "$CC"; then
1399   ac_cv_prog_CC="$CC" # Let the user override the test.
1400 else
1401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1402 for as_dir in $PATH
1403 do
1404   IFS=$as_save_IFS
1405   test -z "$as_dir" && as_dir=.
1406   for ac_exec_ext in '' $ac_executable_extensions; do
1407   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1408     ac_cv_prog_CC="${ac_tool_prefix}cc"
1409     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1410     break 2
1411   fi
1412 done
1413 done
1414
1415 fi
1416 fi
1417 CC=$ac_cv_prog_CC
1418 if test -n "$CC"; then
1419   echo "$as_me:$LINENO: result: $CC" >&5
1420 echo "${ECHO_T}$CC" >&6
1421 else
1422   echo "$as_me:$LINENO: result: no" >&5
1423 echo "${ECHO_T}no" >&6
1424 fi
1425
1426 fi
1427 if test -z "$ac_cv_prog_CC"; then
1428   ac_ct_CC=$CC
1429   # Extract the first word of "cc", so it can be a program name with args.
1430 set dummy cc; ac_word=$2
1431 echo "$as_me:$LINENO: checking for $ac_word" >&5
1432 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1433 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1434   echo $ECHO_N "(cached) $ECHO_C" >&6
1435 else
1436   if test -n "$ac_ct_CC"; then
1437   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1438 else
1439 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1440 for as_dir in $PATH
1441 do
1442   IFS=$as_save_IFS
1443   test -z "$as_dir" && as_dir=.
1444   for ac_exec_ext in '' $ac_executable_extensions; do
1445   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1446     ac_cv_prog_ac_ct_CC="cc"
1447     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1448     break 2
1449   fi
1450 done
1451 done
1452
1453 fi
1454 fi
1455 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1456 if test -n "$ac_ct_CC"; then
1457   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1458 echo "${ECHO_T}$ac_ct_CC" >&6
1459 else
1460   echo "$as_me:$LINENO: result: no" >&5
1461 echo "${ECHO_T}no" >&6
1462 fi
1463
1464   CC=$ac_ct_CC
1465 else
1466   CC="$ac_cv_prog_CC"
1467 fi
1468
1469 fi
1470 if test -z "$CC"; then
1471   # Extract the first word of "cc", so it can be a program name with args.
1472 set dummy cc; ac_word=$2
1473 echo "$as_me:$LINENO: checking for $ac_word" >&5
1474 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1475 if test "${ac_cv_prog_CC+set}" = set; then
1476   echo $ECHO_N "(cached) $ECHO_C" >&6
1477 else
1478   if test -n "$CC"; then
1479   ac_cv_prog_CC="$CC" # Let the user override the test.
1480 else
1481   ac_prog_rejected=no
1482 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1483 for as_dir in $PATH
1484 do
1485   IFS=$as_save_IFS
1486   test -z "$as_dir" && as_dir=.
1487   for ac_exec_ext in '' $ac_executable_extensions; do
1488   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1489     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1490        ac_prog_rejected=yes
1491        continue
1492      fi
1493     ac_cv_prog_CC="cc"
1494     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1495     break 2
1496   fi
1497 done
1498 done
1499
1500 if test $ac_prog_rejected = yes; then
1501   # We found a bogon in the path, so make sure we never use it.
1502   set dummy $ac_cv_prog_CC
1503   shift
1504   if test $# != 0; then
1505     # We chose a different compiler from the bogus one.
1506     # However, it has the same basename, so the bogon will be chosen
1507     # first if we set CC to just the basename; use the full file name.
1508     shift
1509     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
1510   fi
1511 fi
1512 fi
1513 fi
1514 CC=$ac_cv_prog_CC
1515 if test -n "$CC"; then
1516   echo "$as_me:$LINENO: result: $CC" >&5
1517 echo "${ECHO_T}$CC" >&6
1518 else
1519   echo "$as_me:$LINENO: result: no" >&5
1520 echo "${ECHO_T}no" >&6
1521 fi
1522
1523 fi
1524 if test -z "$CC"; then
1525   if test -n "$ac_tool_prefix"; then
1526   for ac_prog in cl
1527   do
1528     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1529 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1530 echo "$as_me:$LINENO: checking for $ac_word" >&5
1531 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1532 if test "${ac_cv_prog_CC+set}" = set; then
1533   echo $ECHO_N "(cached) $ECHO_C" >&6
1534 else
1535   if test -n "$CC"; then
1536   ac_cv_prog_CC="$CC" # Let the user override the test.
1537 else
1538 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1539 for as_dir in $PATH
1540 do
1541   IFS=$as_save_IFS
1542   test -z "$as_dir" && as_dir=.
1543   for ac_exec_ext in '' $ac_executable_extensions; do
1544   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1545     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1546     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1547     break 2
1548   fi
1549 done
1550 done
1551
1552 fi
1553 fi
1554 CC=$ac_cv_prog_CC
1555 if test -n "$CC"; then
1556   echo "$as_me:$LINENO: result: $CC" >&5
1557 echo "${ECHO_T}$CC" >&6
1558 else
1559   echo "$as_me:$LINENO: result: no" >&5
1560 echo "${ECHO_T}no" >&6
1561 fi
1562
1563     test -n "$CC" && break
1564   done
1565 fi
1566 if test -z "$CC"; then
1567   ac_ct_CC=$CC
1568   for ac_prog in cl
1569 do
1570   # Extract the first word of "$ac_prog", so it can be a program name with args.
1571 set dummy $ac_prog; ac_word=$2
1572 echo "$as_me:$LINENO: checking for $ac_word" >&5
1573 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1574 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1575   echo $ECHO_N "(cached) $ECHO_C" >&6
1576 else
1577   if test -n "$ac_ct_CC"; then
1578   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1579 else
1580 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1581 for as_dir in $PATH
1582 do
1583   IFS=$as_save_IFS
1584   test -z "$as_dir" && as_dir=.
1585   for ac_exec_ext in '' $ac_executable_extensions; do
1586   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1587     ac_cv_prog_ac_ct_CC="$ac_prog"
1588     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1589     break 2
1590   fi
1591 done
1592 done
1593
1594 fi
1595 fi
1596 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1597 if test -n "$ac_ct_CC"; then
1598   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1599 echo "${ECHO_T}$ac_ct_CC" >&6
1600 else
1601   echo "$as_me:$LINENO: result: no" >&5
1602 echo "${ECHO_T}no" >&6
1603 fi
1604
1605   test -n "$ac_ct_CC" && break
1606 done
1607
1608   CC=$ac_ct_CC
1609 fi
1610
1611 fi
1612
1613
1614 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
1615 See \`config.log' for more details." >&5
1616 echo "$as_me: error: no acceptable C compiler found in \$PATH
1617 See \`config.log' for more details." >&2;}
1618    { (exit 1); exit 1; }; }
1619
1620 # Provide some information about the compiler.
1621 echo "$as_me:$LINENO:" \
1622      "checking for C compiler version" >&5
1623 ac_compiler=`set X $ac_compile; echo $2`
1624 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1625   (eval $ac_compiler --version </dev/null >&5) 2>&5
1626   ac_status=$?
1627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1628   (exit $ac_status); }
1629 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1630   (eval $ac_compiler -v </dev/null >&5) 2>&5
1631   ac_status=$?
1632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1633   (exit $ac_status); }
1634 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1635   (eval $ac_compiler -V </dev/null >&5) 2>&5
1636   ac_status=$?
1637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1638   (exit $ac_status); }
1639
1640 cat >conftest.$ac_ext <<_ACEOF
1641 #line $LINENO "configure"
1642 /* confdefs.h.  */
1643 _ACEOF
1644 cat confdefs.h >>conftest.$ac_ext
1645 cat >>conftest.$ac_ext <<_ACEOF
1646 /* end confdefs.h.  */
1647
1648 int
1649 main ()
1650 {
1651
1652   ;
1653   return 0;
1654 }
1655 _ACEOF
1656 ac_clean_files_save=$ac_clean_files
1657 ac_clean_files="$ac_clean_files a.out a.exe b.out"
1658 # Try to create an executable without -o first, disregard a.out.
1659 # It will help us diagnose broken compilers, and finding out an intuition
1660 # of exeext.
1661 echo "$as_me:$LINENO: checking for C compiler default output" >&5
1662 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1663 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1664 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1665   (eval $ac_link_default) 2>&5
1666   ac_status=$?
1667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1668   (exit $ac_status); }; then
1669   # Find the output, starting from the most likely.  This scheme is
1670 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1671 # resort.
1672
1673 # Be careful to initialize this variable, since it used to be cached.
1674 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1675 ac_cv_exeext=
1676 # b.out is created by i960 compilers.
1677 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1678 do
1679   test -f "$ac_file" || continue
1680   case $ac_file in
1681     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1682         ;;
1683     conftest.$ac_ext )
1684         # This is the source file.
1685         ;;
1686     [ab].out )
1687         # We found the default executable, but exeext='' is most
1688         # certainly right.
1689         break;;
1690     *.* )
1691         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1692         # FIXME: I believe we export ac_cv_exeext for Libtool,
1693         # but it would be cool to find out if it's true.  Does anybody
1694         # maintain Libtool? --akim.
1695         export ac_cv_exeext
1696         break;;
1697     * )
1698         break;;
1699   esac
1700 done
1701 else
1702   echo "$as_me: failed program was:" >&5
1703 sed 's/^/| /' conftest.$ac_ext >&5
1704
1705 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
1706 See \`config.log' for more details." >&5
1707 echo "$as_me: error: C compiler cannot create executables
1708 See \`config.log' for more details." >&2;}
1709    { (exit 77); exit 77; }; }
1710 fi
1711
1712 ac_exeext=$ac_cv_exeext
1713 echo "$as_me:$LINENO: result: $ac_file" >&5
1714 echo "${ECHO_T}$ac_file" >&6
1715
1716 # Check the compiler produces executables we can run.  If not, either
1717 # the compiler is broken, or we cross compile.
1718 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1719 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1720 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1721 # If not cross compiling, check that we can run a simple program.
1722 if test "$cross_compiling" != yes; then
1723   if { ac_try='./$ac_file'
1724   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1725   (eval $ac_try) 2>&5
1726   ac_status=$?
1727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1728   (exit $ac_status); }; }; then
1729     cross_compiling=no
1730   else
1731     if test "$cross_compiling" = maybe; then
1732         cross_compiling=yes
1733     else
1734         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
1735 If you meant to cross compile, use \`--host'.
1736 See \`config.log' for more details." >&5
1737 echo "$as_me: error: cannot run C compiled programs.
1738 If you meant to cross compile, use \`--host'.
1739 See \`config.log' for more details." >&2;}
1740    { (exit 1); exit 1; }; }
1741     fi
1742   fi
1743 fi
1744 echo "$as_me:$LINENO: result: yes" >&5
1745 echo "${ECHO_T}yes" >&6
1746
1747 rm -f a.out a.exe conftest$ac_cv_exeext b.out
1748 ac_clean_files=$ac_clean_files_save
1749 # Check the compiler produces executables we can run.  If not, either
1750 # the compiler is broken, or we cross compile.
1751 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1752 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1753 echo "$as_me:$LINENO: result: $cross_compiling" >&5
1754 echo "${ECHO_T}$cross_compiling" >&6
1755
1756 echo "$as_me:$LINENO: checking for suffix of executables" >&5
1757 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1758 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1759   (eval $ac_link) 2>&5
1760   ac_status=$?
1761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1762   (exit $ac_status); }; then
1763   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1764 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1765 # work properly (i.e., refer to `conftest.exe'), while it won't with
1766 # `rm'.
1767 for ac_file in conftest.exe conftest conftest.*; do
1768   test -f "$ac_file" || continue
1769   case $ac_file in
1770     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
1771     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1772           export ac_cv_exeext
1773           break;;
1774     * ) break;;
1775   esac
1776 done
1777 else
1778   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1779 See \`config.log' for more details." >&5
1780 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1781 See \`config.log' for more details." >&2;}
1782    { (exit 1); exit 1; }; }
1783 fi
1784
1785 rm -f conftest$ac_cv_exeext
1786 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1787 echo "${ECHO_T}$ac_cv_exeext" >&6
1788
1789 rm -f conftest.$ac_ext
1790 EXEEXT=$ac_cv_exeext
1791 ac_exeext=$EXEEXT
1792 echo "$as_me:$LINENO: checking for suffix of object files" >&5
1793 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
1794 if test "${ac_cv_objext+set}" = set; then
1795   echo $ECHO_N "(cached) $ECHO_C" >&6
1796 else
1797   cat >conftest.$ac_ext <<_ACEOF
1798 #line $LINENO "configure"
1799 /* confdefs.h.  */
1800 _ACEOF
1801 cat confdefs.h >>conftest.$ac_ext
1802 cat >>conftest.$ac_ext <<_ACEOF
1803 /* end confdefs.h.  */
1804
1805 int
1806 main ()
1807 {
1808
1809   ;
1810   return 0;
1811 }
1812 _ACEOF
1813 rm -f conftest.o conftest.obj
1814 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1815   (eval $ac_compile) 2>&5
1816   ac_status=$?
1817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1818   (exit $ac_status); }; then
1819   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1820   case $ac_file in
1821     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
1822     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1823        break;;
1824   esac
1825 done
1826 else
1827   echo "$as_me: failed program was:" >&5
1828 sed 's/^/| /' conftest.$ac_ext >&5
1829
1830 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
1831 See \`config.log' for more details." >&5
1832 echo "$as_me: error: cannot compute suffix of object files: cannot compile
1833 See \`config.log' for more details." >&2;}
1834    { (exit 1); exit 1; }; }
1835 fi
1836
1837 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1838 fi
1839 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
1840 echo "${ECHO_T}$ac_cv_objext" >&6
1841 OBJEXT=$ac_cv_objext
1842 ac_objext=$OBJEXT
1843 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
1844 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1845 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1846   echo $ECHO_N "(cached) $ECHO_C" >&6
1847 else
1848   cat >conftest.$ac_ext <<_ACEOF
1849 #line $LINENO "configure"
1850 /* confdefs.h.  */
1851 _ACEOF
1852 cat confdefs.h >>conftest.$ac_ext
1853 cat >>conftest.$ac_ext <<_ACEOF
1854 /* end confdefs.h.  */
1855
1856 int
1857 main ()
1858 {
1859 #ifndef __GNUC__
1860        choke me
1861 #endif
1862
1863   ;
1864   return 0;
1865 }
1866 _ACEOF
1867 rm -f conftest.$ac_objext
1868 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1869   (eval $ac_compile) 2>&5
1870   ac_status=$?
1871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1872   (exit $ac_status); } &&
1873          { ac_try='test -s conftest.$ac_objext'
1874   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1875   (eval $ac_try) 2>&5
1876   ac_status=$?
1877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1878   (exit $ac_status); }; }; then
1879   ac_compiler_gnu=yes
1880 else
1881   echo "$as_me: failed program was:" >&5
1882 sed 's/^/| /' conftest.$ac_ext >&5
1883
1884 ac_compiler_gnu=no
1885 fi
1886 rm -f conftest.$ac_objext conftest.$ac_ext
1887 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1888
1889 fi
1890 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
1891 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1892 GCC=`test $ac_compiler_gnu = yes && echo yes`
1893 ac_test_CFLAGS=${CFLAGS+set}
1894 ac_save_CFLAGS=$CFLAGS
1895 CFLAGS="-g"
1896 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
1897 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1898 if test "${ac_cv_prog_cc_g+set}" = set; then
1899   echo $ECHO_N "(cached) $ECHO_C" >&6
1900 else
1901   cat >conftest.$ac_ext <<_ACEOF
1902 #line $LINENO "configure"
1903 /* confdefs.h.  */
1904 _ACEOF
1905 cat confdefs.h >>conftest.$ac_ext
1906 cat >>conftest.$ac_ext <<_ACEOF
1907 /* end confdefs.h.  */
1908
1909 int
1910 main ()
1911 {
1912
1913   ;
1914   return 0;
1915 }
1916 _ACEOF
1917 rm -f conftest.$ac_objext
1918 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1919   (eval $ac_compile) 2>&5
1920   ac_status=$?
1921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1922   (exit $ac_status); } &&
1923          { ac_try='test -s conftest.$ac_objext'
1924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1925   (eval $ac_try) 2>&5
1926   ac_status=$?
1927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1928   (exit $ac_status); }; }; then
1929   ac_cv_prog_cc_g=yes
1930 else
1931   echo "$as_me: failed program was:" >&5
1932 sed 's/^/| /' conftest.$ac_ext >&5
1933
1934 ac_cv_prog_cc_g=no
1935 fi
1936 rm -f conftest.$ac_objext conftest.$ac_ext
1937 fi
1938 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
1939 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1940 if test "$ac_test_CFLAGS" = set; then
1941   CFLAGS=$ac_save_CFLAGS
1942 elif test $ac_cv_prog_cc_g = yes; then
1943   if test "$GCC" = yes; then
1944     CFLAGS="-g -O2"
1945   else
1946     CFLAGS="-g"
1947   fi
1948 else
1949   if test "$GCC" = yes; then
1950     CFLAGS="-O2"
1951   else
1952     CFLAGS=
1953   fi
1954 fi
1955 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
1956 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1957 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1958   echo $ECHO_N "(cached) $ECHO_C" >&6
1959 else
1960   ac_cv_prog_cc_stdc=no
1961 ac_save_CC=$CC
1962 cat >conftest.$ac_ext <<_ACEOF
1963 #line $LINENO "configure"
1964 /* confdefs.h.  */
1965 _ACEOF
1966 cat confdefs.h >>conftest.$ac_ext
1967 cat >>conftest.$ac_ext <<_ACEOF
1968 /* end confdefs.h.  */
1969 #include <stdarg.h>
1970 #include <stdio.h>
1971 #include <sys/types.h>
1972 #include <sys/stat.h>
1973 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1974 struct buf { int x; };
1975 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1976 static char *e (p, i)
1977      char **p;
1978      int i;
1979 {
1980   return p[i];
1981 }
1982 static char *f (char * (*g) (char **, int), char **p, ...)
1983 {
1984   char *s;
1985   va_list v;
1986   va_start (v,p);
1987   s = g (p, va_arg (v,int));
1988   va_end (v);
1989   return s;
1990 }
1991 int test (int i, double x);
1992 struct s1 {int (*f) (int a);};
1993 struct s2 {int (*f) (double a);};
1994 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1995 int argc;
1996 char **argv;
1997 int
1998 main ()
1999 {
2000 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2001   ;
2002   return 0;
2003 }
2004 _ACEOF
2005 # Don't try gcc -ansi; that turns off useful extensions and
2006 # breaks some systems' header files.
2007 # AIX                   -qlanglvl=ansi
2008 # Ultrix and OSF/1      -std1
2009 # HP-UX 10.20 and later -Ae
2010 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2011 # SVR4                  -Xc -D__EXTENSIONS__
2012 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2013 do
2014   CC="$ac_save_CC $ac_arg"
2015   rm -f conftest.$ac_objext
2016 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2017   (eval $ac_compile) 2>&5
2018   ac_status=$?
2019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2020   (exit $ac_status); } &&
2021          { ac_try='test -s conftest.$ac_objext'
2022   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2023   (eval $ac_try) 2>&5
2024   ac_status=$?
2025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2026   (exit $ac_status); }; }; then
2027   ac_cv_prog_cc_stdc=$ac_arg
2028 break
2029 else
2030   echo "$as_me: failed program was:" >&5
2031 sed 's/^/| /' conftest.$ac_ext >&5
2032
2033 fi
2034 rm -f conftest.$ac_objext
2035 done
2036 rm -f conftest.$ac_ext conftest.$ac_objext
2037 CC=$ac_save_CC
2038
2039 fi
2040
2041 case "x$ac_cv_prog_cc_stdc" in
2042   x|xno)
2043     echo "$as_me:$LINENO: result: none needed" >&5
2044 echo "${ECHO_T}none needed" >&6 ;;
2045   *)
2046     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2047 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2048     CC="$CC $ac_cv_prog_cc_stdc" ;;
2049 esac
2050
2051 # Some people use a C++ compiler to compile C.  Since we use `exit',
2052 # in C++ we need to declare it.  In case someone uses the same compiler
2053 # for both compiling C and C++ we need to have the C++ compiler decide
2054 # the declaration of exit, since it's the most demanding environment.
2055 cat >conftest.$ac_ext <<_ACEOF
2056 #ifndef __cplusplus
2057   choke me
2058 #endif
2059 _ACEOF
2060 rm -f conftest.$ac_objext
2061 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2062   (eval $ac_compile) 2>&5
2063   ac_status=$?
2064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2065   (exit $ac_status); } &&
2066          { ac_try='test -s conftest.$ac_objext'
2067   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2068   (eval $ac_try) 2>&5
2069   ac_status=$?
2070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2071   (exit $ac_status); }; }; then
2072   for ac_declaration in \
2073    ''\
2074    '#include <stdlib.h>' \
2075    'extern "C" void std::exit (int) throw (); using std::exit;' \
2076    'extern "C" void std::exit (int); using std::exit;' \
2077    'extern "C" void exit (int) throw ();' \
2078    'extern "C" void exit (int);' \
2079    'void exit (int);'
2080 do
2081   cat >conftest.$ac_ext <<_ACEOF
2082 #line $LINENO "configure"
2083 /* confdefs.h.  */
2084 _ACEOF
2085 cat confdefs.h >>conftest.$ac_ext
2086 cat >>conftest.$ac_ext <<_ACEOF
2087 /* end confdefs.h.  */
2088 #include <stdlib.h>
2089 $ac_declaration
2090 int
2091 main ()
2092 {
2093 exit (42);
2094   ;
2095   return 0;
2096 }
2097 _ACEOF
2098 rm -f conftest.$ac_objext
2099 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2100   (eval $ac_compile) 2>&5
2101   ac_status=$?
2102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2103   (exit $ac_status); } &&
2104          { ac_try='test -s conftest.$ac_objext'
2105   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2106   (eval $ac_try) 2>&5
2107   ac_status=$?
2108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2109   (exit $ac_status); }; }; then
2110   :
2111 else
2112   echo "$as_me: failed program was:" >&5
2113 sed 's/^/| /' conftest.$ac_ext >&5
2114
2115 continue
2116 fi
2117 rm -f conftest.$ac_objext conftest.$ac_ext
2118   cat >conftest.$ac_ext <<_ACEOF
2119 #line $LINENO "configure"
2120 /* confdefs.h.  */
2121 _ACEOF
2122 cat confdefs.h >>conftest.$ac_ext
2123 cat >>conftest.$ac_ext <<_ACEOF
2124 /* end confdefs.h.  */
2125 $ac_declaration
2126 int
2127 main ()
2128 {
2129 exit (42);
2130   ;
2131   return 0;
2132 }
2133 _ACEOF
2134 rm -f conftest.$ac_objext
2135 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2136   (eval $ac_compile) 2>&5
2137   ac_status=$?
2138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2139   (exit $ac_status); } &&
2140          { ac_try='test -s conftest.$ac_objext'
2141   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2142   (eval $ac_try) 2>&5
2143   ac_status=$?
2144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2145   (exit $ac_status); }; }; then
2146   break
2147 else
2148   echo "$as_me: failed program was:" >&5
2149 sed 's/^/| /' conftest.$ac_ext >&5
2150
2151 fi
2152 rm -f conftest.$ac_objext conftest.$ac_ext
2153 done
2154 rm -f conftest*
2155 if test -n "$ac_declaration"; then
2156   echo '#ifdef __cplusplus' >>confdefs.h
2157   echo $ac_declaration      >>confdefs.h
2158   echo '#endif'             >>confdefs.h
2159 fi
2160
2161 else
2162   echo "$as_me: failed program was:" >&5
2163 sed 's/^/| /' conftest.$ac_ext >&5
2164
2165 fi
2166 rm -f conftest.$ac_objext conftest.$ac_ext
2167 ac_ext=c
2168 ac_cpp='$CPP $CPPFLAGS'
2169 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2170 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2171 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2172
2173
2174
2175 #
2176 # Check for parser generators.
2177 #
2178
2179 echo
2180 echo "$as_me:$LINENO: checking for yacc/bison, lex/flex, and install" >&5
2181 echo $ECHO_N "checking for yacc/bison, lex/flex, and install... $ECHO_C" >&6
2182 echo
2183
2184 for ac_prog in 'bison -y' byacc
2185 do
2186   # Extract the first word of "$ac_prog", so it can be a program name with args.
2187 set dummy $ac_prog; ac_word=$2
2188 echo "$as_me:$LINENO: checking for $ac_word" >&5
2189 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2190 if test "${ac_cv_prog_YACC+set}" = set; then
2191   echo $ECHO_N "(cached) $ECHO_C" >&6
2192 else
2193   if test -n "$YACC"; then
2194   ac_cv_prog_YACC="$YACC" # Let the user override the test.
2195 else
2196 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2197 for as_dir in $PATH
2198 do
2199   IFS=$as_save_IFS
2200   test -z "$as_dir" && as_dir=.
2201   for ac_exec_ext in '' $ac_executable_extensions; do
2202   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2203     ac_cv_prog_YACC="$ac_prog"
2204     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2205     break 2
2206   fi
2207 done
2208 done
2209
2210 fi
2211 fi
2212 YACC=$ac_cv_prog_YACC
2213 if test -n "$YACC"; then
2214   echo "$as_me:$LINENO: result: $YACC" >&5
2215 echo "${ECHO_T}$YACC" >&6
2216 else
2217   echo "$as_me:$LINENO: result: no" >&5
2218 echo "${ECHO_T}no" >&6
2219 fi
2220
2221   test -n "$YACC" && break
2222 done
2223 test -n "$YACC" || YACC="yacc"
2224
2225
2226 for ac_prog in flex lex
2227 do
2228   # Extract the first word of "$ac_prog", so it can be a program name with args.
2229 set dummy $ac_prog; ac_word=$2
2230 echo "$as_me:$LINENO: checking for $ac_word" >&5
2231 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2232 if test "${ac_cv_prog_LEX+set}" = set; then
2233   echo $ECHO_N "(cached) $ECHO_C" >&6
2234 else
2235   if test -n "$LEX"; then
2236   ac_cv_prog_LEX="$LEX" # Let the user override the test.
2237 else
2238 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2239 for as_dir in $PATH
2240 do
2241   IFS=$as_save_IFS
2242   test -z "$as_dir" && as_dir=.
2243   for ac_exec_ext in '' $ac_executable_extensions; do
2244   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2245     ac_cv_prog_LEX="$ac_prog"
2246     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2247     break 2
2248   fi
2249 done
2250 done
2251
2252 fi
2253 fi
2254 LEX=$ac_cv_prog_LEX
2255 if test -n "$LEX"; then
2256   echo "$as_me:$LINENO: result: $LEX" >&5
2257 echo "${ECHO_T}$LEX" >&6
2258 else
2259   echo "$as_me:$LINENO: result: no" >&5
2260 echo "${ECHO_T}no" >&6
2261 fi
2262
2263   test -n "$LEX" && break
2264 done
2265 test -n "$LEX" || LEX=":"
2266
2267 if test -z "$LEXLIB"
2268 then
2269   echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5
2270 echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6
2271 if test "${ac_cv_lib_fl_yywrap+set}" = set; then
2272   echo $ECHO_N "(cached) $ECHO_C" >&6
2273 else
2274   ac_check_lib_save_LIBS=$LIBS
2275 LIBS="-lfl  $LIBS"
2276 cat >conftest.$ac_ext <<_ACEOF
2277 #line $LINENO "configure"
2278 /* confdefs.h.  */
2279 _ACEOF
2280 cat confdefs.h >>conftest.$ac_ext
2281 cat >>conftest.$ac_ext <<_ACEOF
2282 /* end confdefs.h.  */
2283
2284 /* Override any gcc2 internal prototype to avoid an error.  */
2285 #ifdef __cplusplus
2286 extern "C"
2287 #endif
2288 /* We use char because int might match the return type of a gcc2
2289    builtin and then its argument prototype would still apply.  */
2290 char yywrap ();
2291 int
2292 main ()
2293 {
2294 yywrap ();
2295   ;
2296   return 0;
2297 }
2298 _ACEOF
2299 rm -f conftest.$ac_objext conftest$ac_exeext
2300 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2301   (eval $ac_link) 2>&5
2302   ac_status=$?
2303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2304   (exit $ac_status); } &&
2305          { ac_try='test -s conftest$ac_exeext'
2306   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2307   (eval $ac_try) 2>&5
2308   ac_status=$?
2309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2310   (exit $ac_status); }; }; then
2311   ac_cv_lib_fl_yywrap=yes
2312 else
2313   echo "$as_me: failed program was:" >&5
2314 sed 's/^/| /' conftest.$ac_ext >&5
2315
2316 ac_cv_lib_fl_yywrap=no
2317 fi
2318 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2319 LIBS=$ac_check_lib_save_LIBS
2320 fi
2321 echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5
2322 echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6
2323 if test $ac_cv_lib_fl_yywrap = yes; then
2324   LEXLIB="-lfl"
2325 else
2326   echo "$as_me:$LINENO: checking for yywrap in -ll" >&5
2327 echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6
2328 if test "${ac_cv_lib_l_yywrap+set}" = set; then
2329   echo $ECHO_N "(cached) $ECHO_C" >&6
2330 else
2331   ac_check_lib_save_LIBS=$LIBS
2332 LIBS="-ll  $LIBS"
2333 cat >conftest.$ac_ext <<_ACEOF
2334 #line $LINENO "configure"
2335 /* confdefs.h.  */
2336 _ACEOF
2337 cat confdefs.h >>conftest.$ac_ext
2338 cat >>conftest.$ac_ext <<_ACEOF
2339 /* end confdefs.h.  */
2340
2341 /* Override any gcc2 internal prototype to avoid an error.  */
2342 #ifdef __cplusplus
2343 extern "C"
2344 #endif
2345 /* We use char because int might match the return type of a gcc2
2346    builtin and then its argument prototype would still apply.  */
2347 char yywrap ();
2348 int
2349 main ()
2350 {
2351 yywrap ();
2352   ;
2353   return 0;
2354 }
2355 _ACEOF
2356 rm -f conftest.$ac_objext conftest$ac_exeext
2357 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2358   (eval $ac_link) 2>&5
2359   ac_status=$?
2360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2361   (exit $ac_status); } &&
2362          { ac_try='test -s conftest$ac_exeext'
2363   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2364   (eval $ac_try) 2>&5
2365   ac_status=$?
2366   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2367   (exit $ac_status); }; }; then
2368   ac_cv_lib_l_yywrap=yes
2369 else
2370   echo "$as_me: failed program was:" >&5
2371 sed 's/^/| /' conftest.$ac_ext >&5
2372
2373 ac_cv_lib_l_yywrap=no
2374 fi
2375 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2376 LIBS=$ac_check_lib_save_LIBS
2377 fi
2378 echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5
2379 echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6
2380 if test $ac_cv_lib_l_yywrap = yes; then
2381   LEXLIB="-ll"
2382 fi
2383
2384 fi
2385
2386 fi
2387
2388 if test "x$LEX" != "x:"; then
2389   echo "$as_me:$LINENO: checking lex output file root" >&5
2390 echo $ECHO_N "checking lex output file root... $ECHO_C" >&6
2391 if test "${ac_cv_prog_lex_root+set}" = set; then
2392   echo $ECHO_N "(cached) $ECHO_C" >&6
2393 else
2394   # The minimal lex program is just a single line: %%.  But some broken lexes
2395 # (Solaris, I think it was) want two %% lines, so accommodate them.
2396 cat >conftest.l <<_ACEOF
2397 %%
2398 %%
2399 _ACEOF
2400 { (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5
2401   (eval $LEX conftest.l) 2>&5
2402   ac_status=$?
2403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2404   (exit $ac_status); }
2405 if test -f lex.yy.c; then
2406   ac_cv_prog_lex_root=lex.yy
2407 elif test -f lexyy.c; then
2408   ac_cv_prog_lex_root=lexyy
2409 else
2410   { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
2411 echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
2412    { (exit 1); exit 1; }; }
2413 fi
2414 fi
2415 echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
2416 echo "${ECHO_T}$ac_cv_prog_lex_root" >&6
2417 rm -f conftest.l
2418 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
2419
2420 echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
2421 echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6
2422 if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
2423   echo $ECHO_N "(cached) $ECHO_C" >&6
2424 else
2425   # POSIX says lex can declare yytext either as a pointer or an array; the
2426 # default is implementation-dependent. Figure out which it is, since
2427 # not all implementations provide the %pointer and %array declarations.
2428 ac_cv_prog_lex_yytext_pointer=no
2429 echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
2430 ac_save_LIBS=$LIBS
2431 LIBS="$LIBS $LEXLIB"
2432 cat >conftest.$ac_ext <<_ACEOF
2433 `cat $LEX_OUTPUT_ROOT.c`
2434 _ACEOF
2435 rm -f conftest.$ac_objext conftest$ac_exeext
2436 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2437   (eval $ac_link) 2>&5
2438   ac_status=$?
2439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2440   (exit $ac_status); } &&
2441          { ac_try='test -s conftest$ac_exeext'
2442   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2443   (eval $ac_try) 2>&5
2444   ac_status=$?
2445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2446   (exit $ac_status); }; }; then
2447   ac_cv_prog_lex_yytext_pointer=yes
2448 else
2449   echo "$as_me: failed program was:" >&5
2450 sed 's/^/| /' conftest.$ac_ext >&5
2451
2452 fi
2453 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2454 LIBS=$ac_save_LIBS
2455 rm -f "${LEX_OUTPUT_ROOT}.c"
2456
2457 fi
2458 echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
2459 echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6
2460 if test $ac_cv_prog_lex_yytext_pointer = yes; then
2461
2462 cat >>confdefs.h <<\_ACEOF
2463 #define YYTEXT_POINTER 1
2464 _ACEOF
2465
2466 fi
2467
2468 fi
2469 ac_aux_dir=
2470 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
2471   if test -f $ac_dir/install-sh; then
2472     ac_aux_dir=$ac_dir
2473     ac_install_sh="$ac_aux_dir/install-sh -c"
2474     break
2475   elif test -f $ac_dir/install.sh; then
2476     ac_aux_dir=$ac_dir
2477     ac_install_sh="$ac_aux_dir/install.sh -c"
2478     break
2479   elif test -f $ac_dir/shtool; then
2480     ac_aux_dir=$ac_dir
2481     ac_install_sh="$ac_aux_dir/shtool install -c"
2482     break
2483   fi
2484 done
2485 if test -z "$ac_aux_dir"; then
2486   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
2487 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
2488    { (exit 1); exit 1; }; }
2489 fi
2490 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
2491 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
2492 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
2493
2494 # Find a good install program.  We prefer a C program (faster),
2495 # so one script is as good as another.  But avoid the broken or
2496 # incompatible versions:
2497 # SysV /etc/install, /usr/sbin/install
2498 # SunOS /usr/etc/install
2499 # IRIX /sbin/install
2500 # AIX /bin/install
2501 # AmigaOS /C/install, which installs bootblocks on floppy discs
2502 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2503 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2504 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2505 # ./install, which can be erroneously created by make from ./install.sh.
2506 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
2507 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
2508 if test -z "$INSTALL"; then
2509 if test "${ac_cv_path_install+set}" = set; then
2510   echo $ECHO_N "(cached) $ECHO_C" >&6
2511 else
2512   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2513 for as_dir in $PATH
2514 do
2515   IFS=$as_save_IFS
2516   test -z "$as_dir" && as_dir=.
2517   # Account for people who put trailing slashes in PATH elements.
2518 case $as_dir/ in
2519   ./ | .// | /cC/* | \
2520   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2521   /usr/ucb/* ) ;;
2522   *)
2523     # OSF1 and SCO ODT 3.0 have their own names for install.
2524     # Don't use installbsd from OSF since it installs stuff as root
2525     # by default.
2526     for ac_prog in ginstall scoinst install; do
2527       for ac_exec_ext in '' $ac_executable_extensions; do
2528         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2529           if test $ac_prog = install &&
2530             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2531             # AIX install.  It has an incompatible calling convention.
2532             :
2533           elif test $ac_prog = install &&
2534             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2535             # program-specific install script used by HP pwplus--don't use.
2536             :
2537           else
2538             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2539             break 3
2540           fi
2541         fi
2542       done
2543     done
2544     ;;
2545 esac
2546 done
2547
2548
2549 fi
2550   if test "${ac_cv_path_install+set}" = set; then
2551     INSTALL=$ac_cv_path_install
2552   else
2553     # As a last resort, use the slow shell script.  We don't cache a
2554     # path for INSTALL within a source directory, because that will
2555     # break other packages using the cache if that directory is
2556     # removed, or if the path is relative.
2557     INSTALL=$ac_install_sh
2558   fi
2559 fi
2560 echo "$as_me:$LINENO: result: $INSTALL" >&5
2561 echo "${ECHO_T}$INSTALL" >&6
2562
2563 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2564 # It thinks the first close brace ends the variable substitution.
2565 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2566
2567 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2568
2569 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2570
2571
2572
2573 #
2574 # Check for X windows.
2575 #
2576
2577 echo
2578 ac_ext=c
2579 ac_cpp='$CPP $CPPFLAGS'
2580 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2581 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2582 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2583 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2584 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2585 # On Suns, sometimes $CPP names a directory.
2586 if test -n "$CPP" && test -d "$CPP"; then
2587   CPP=
2588 fi
2589 if test -z "$CPP"; then
2590   if test "${ac_cv_prog_CPP+set}" = set; then
2591   echo $ECHO_N "(cached) $ECHO_C" >&6
2592 else
2593       # Double quotes because CPP needs to be expanded
2594     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2595     do
2596       ac_preproc_ok=false
2597 for ac_c_preproc_warn_flag in '' yes
2598 do
2599   # Use a header file that comes with gcc, so configuring glibc
2600   # with a fresh cross-compiler works.
2601   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2602   # <limits.h> exists even on freestanding compilers.
2603   # On the NeXT, cc -E runs the code through the compiler's parser,
2604   # not just through cpp. "Syntax error" is here to catch this case.
2605   cat >conftest.$ac_ext <<_ACEOF
2606 #line $LINENO "configure"
2607 /* confdefs.h.  */
2608 _ACEOF
2609 cat confdefs.h >>conftest.$ac_ext
2610 cat >>conftest.$ac_ext <<_ACEOF
2611 /* end confdefs.h.  */
2612 #ifdef __STDC__
2613 # include <limits.h>
2614 #else
2615 # include <assert.h>
2616 #endif
2617                      Syntax error
2618 _ACEOF
2619 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2620   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2621   ac_status=$?
2622   grep -v '^ *+' conftest.er1 >conftest.err
2623   rm -f conftest.er1
2624   cat conftest.err >&5
2625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2626   (exit $ac_status); } >/dev/null; then
2627   if test -s conftest.err; then
2628     ac_cpp_err=$ac_c_preproc_warn_flag
2629   else
2630     ac_cpp_err=
2631   fi
2632 else
2633   ac_cpp_err=yes
2634 fi
2635 if test -z "$ac_cpp_err"; then
2636   :
2637 else
2638   echo "$as_me: failed program was:" >&5
2639 sed 's/^/| /' conftest.$ac_ext >&5
2640
2641   # Broken: fails on valid input.
2642 continue
2643 fi
2644 rm -f conftest.err conftest.$ac_ext
2645
2646   # OK, works on sane cases.  Now check whether non-existent headers
2647   # can be detected and how.
2648   cat >conftest.$ac_ext <<_ACEOF
2649 #line $LINENO "configure"
2650 /* confdefs.h.  */
2651 _ACEOF
2652 cat confdefs.h >>conftest.$ac_ext
2653 cat >>conftest.$ac_ext <<_ACEOF
2654 /* end confdefs.h.  */
2655 #include <ac_nonexistent.h>
2656 _ACEOF
2657 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2658   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2659   ac_status=$?
2660   grep -v '^ *+' conftest.er1 >conftest.err
2661   rm -f conftest.er1
2662   cat conftest.err >&5
2663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2664   (exit $ac_status); } >/dev/null; then
2665   if test -s conftest.err; then
2666     ac_cpp_err=$ac_c_preproc_warn_flag
2667   else
2668     ac_cpp_err=
2669   fi
2670 else
2671   ac_cpp_err=yes
2672 fi
2673 if test -z "$ac_cpp_err"; then
2674   # Broken: success on invalid input.
2675 continue
2676 else
2677   echo "$as_me: failed program was:" >&5
2678 sed 's/^/| /' conftest.$ac_ext >&5
2679
2680   # Passes both tests.
2681 ac_preproc_ok=:
2682 break
2683 fi
2684 rm -f conftest.err conftest.$ac_ext
2685
2686 done
2687 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2688 rm -f conftest.err conftest.$ac_ext
2689 if $ac_preproc_ok; then
2690   break
2691 fi
2692
2693     done
2694     ac_cv_prog_CPP=$CPP
2695
2696 fi
2697   CPP=$ac_cv_prog_CPP
2698 else
2699   ac_cv_prog_CPP=$CPP
2700 fi
2701 echo "$as_me:$LINENO: result: $CPP" >&5
2702 echo "${ECHO_T}$CPP" >&6
2703 ac_preproc_ok=false
2704 for ac_c_preproc_warn_flag in '' yes
2705 do
2706   # Use a header file that comes with gcc, so configuring glibc
2707   # with a fresh cross-compiler works.
2708   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2709   # <limits.h> exists even on freestanding compilers.
2710   # On the NeXT, cc -E runs the code through the compiler's parser,
2711   # not just through cpp. "Syntax error" is here to catch this case.
2712   cat >conftest.$ac_ext <<_ACEOF
2713 #line $LINENO "configure"
2714 /* confdefs.h.  */
2715 _ACEOF
2716 cat confdefs.h >>conftest.$ac_ext
2717 cat >>conftest.$ac_ext <<_ACEOF
2718 /* end confdefs.h.  */
2719 #ifdef __STDC__
2720 # include <limits.h>
2721 #else
2722 # include <assert.h>
2723 #endif
2724                      Syntax error
2725 _ACEOF
2726 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2727   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2728   ac_status=$?
2729   grep -v '^ *+' conftest.er1 >conftest.err
2730   rm -f conftest.er1
2731   cat conftest.err >&5
2732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2733   (exit $ac_status); } >/dev/null; then
2734   if test -s conftest.err; then
2735     ac_cpp_err=$ac_c_preproc_warn_flag
2736   else
2737     ac_cpp_err=
2738   fi
2739 else
2740   ac_cpp_err=yes
2741 fi
2742 if test -z "$ac_cpp_err"; then
2743   :
2744 else
2745   echo "$as_me: failed program was:" >&5
2746 sed 's/^/| /' conftest.$ac_ext >&5
2747
2748   # Broken: fails on valid input.
2749 continue
2750 fi
2751 rm -f conftest.err conftest.$ac_ext
2752
2753   # OK, works on sane cases.  Now check whether non-existent headers
2754   # can be detected and how.
2755   cat >conftest.$ac_ext <<_ACEOF
2756 #line $LINENO "configure"
2757 /* confdefs.h.  */
2758 _ACEOF
2759 cat confdefs.h >>conftest.$ac_ext
2760 cat >>conftest.$ac_ext <<_ACEOF
2761 /* end confdefs.h.  */
2762 #include <ac_nonexistent.h>
2763 _ACEOF
2764 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2765   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2766   ac_status=$?
2767   grep -v '^ *+' conftest.er1 >conftest.err
2768   rm -f conftest.er1
2769   cat conftest.err >&5
2770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2771   (exit $ac_status); } >/dev/null; then
2772   if test -s conftest.err; then
2773     ac_cpp_err=$ac_c_preproc_warn_flag
2774   else
2775     ac_cpp_err=
2776   fi
2777 else
2778   ac_cpp_err=yes
2779 fi
2780 if test -z "$ac_cpp_err"; then
2781   # Broken: success on invalid input.
2782 continue
2783 else
2784   echo "$as_me: failed program was:" >&5
2785 sed 's/^/| /' conftest.$ac_ext >&5
2786
2787   # Passes both tests.
2788 ac_preproc_ok=:
2789 break
2790 fi
2791 rm -f conftest.err conftest.$ac_ext
2792
2793 done
2794 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2795 rm -f conftest.err conftest.$ac_ext
2796 if $ac_preproc_ok; then
2797   :
2798 else
2799   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2800 See \`config.log' for more details." >&5
2801 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2802 See \`config.log' for more details." >&2;}
2803    { (exit 1); exit 1; }; }
2804 fi
2805
2806 ac_ext=c
2807 ac_cpp='$CPP $CPPFLAGS'
2808 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2809 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2810 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2811
2812
2813 echo "$as_me:$LINENO: checking for X" >&5
2814 echo $ECHO_N "checking for X... $ECHO_C" >&6
2815
2816
2817 # Check whether --with-x or --without-x was given.
2818 if test "${with_x+set}" = set; then
2819   withval="$with_x"
2820
2821 fi;
2822 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2823 if test "x$with_x" = xno; then
2824   # The user explicitly disabled X.
2825   have_x=disabled
2826 else
2827   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2828     # Both variables are already set.
2829     have_x=yes
2830   else
2831     if test "${ac_cv_have_x+set}" = set; then
2832   echo $ECHO_N "(cached) $ECHO_C" >&6
2833 else
2834   # One or both of the vars are not set, and there is no cached value.
2835 ac_x_includes=no ac_x_libraries=no
2836 rm -fr conftest.dir
2837 if mkdir conftest.dir; then
2838   cd conftest.dir
2839   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2840   cat >Imakefile <<'_ACEOF'
2841 acfindx:
2842         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2843 _ACEOF
2844   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2845     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2846     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2847     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2848     for ac_extension in a so sl; do
2849       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2850          test -f $ac_im_libdir/libX11.$ac_extension; then
2851         ac_im_usrlibdir=$ac_im_libdir; break
2852       fi
2853     done
2854     # Screen out bogus values from the imake configuration.  They are
2855     # bogus both because they are the default anyway, and because
2856     # using them would break gcc on systems where it needs fixed includes.
2857     case $ac_im_incroot in
2858         /usr/include) ;;
2859         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
2860     esac
2861     case $ac_im_usrlibdir in
2862         /usr/lib | /lib) ;;
2863         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
2864     esac
2865   fi
2866   cd ..
2867   rm -fr conftest.dir
2868 fi
2869
2870 # Standard set of common directories for X headers.
2871 # Check X11 before X11Rn because it is often a symlink to the current release.
2872 ac_x_header_dirs='
2873 /usr/X11/include
2874 /usr/X11R6/include
2875 /usr/X11R5/include
2876 /usr/X11R4/include
2877
2878 /usr/include/X11
2879 /usr/include/X11R6
2880 /usr/include/X11R5
2881 /usr/include/X11R4
2882
2883 /usr/local/X11/include
2884 /usr/local/X11R6/include
2885 /usr/local/X11R5/include
2886 /usr/local/X11R4/include
2887
2888 /usr/local/include/X11
2889 /usr/local/include/X11R6
2890 /usr/local/include/X11R5
2891 /usr/local/include/X11R4
2892
2893 /usr/X386/include
2894 /usr/x386/include
2895 /usr/XFree86/include/X11
2896
2897 /usr/include
2898 /usr/local/include
2899 /usr/unsupported/include
2900 /usr/athena/include
2901 /usr/local/x11r5/include
2902 /usr/lpp/Xamples/include
2903
2904 /usr/openwin/include
2905 /usr/openwin/share/include'
2906
2907 if test "$ac_x_includes" = no; then
2908   # Guess where to find include files, by looking for Intrinsic.h.
2909   # First, try using that file with no special directory specified.
2910   cat >conftest.$ac_ext <<_ACEOF
2911 #line $LINENO "configure"
2912 /* confdefs.h.  */
2913 _ACEOF
2914 cat confdefs.h >>conftest.$ac_ext
2915 cat >>conftest.$ac_ext <<_ACEOF
2916 /* end confdefs.h.  */
2917 #include <X11/Intrinsic.h>
2918 _ACEOF
2919 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2920   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2921   ac_status=$?
2922   grep -v '^ *+' conftest.er1 >conftest.err
2923   rm -f conftest.er1
2924   cat conftest.err >&5
2925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2926   (exit $ac_status); } >/dev/null; then
2927   if test -s conftest.err; then
2928     ac_cpp_err=$ac_c_preproc_warn_flag
2929   else
2930     ac_cpp_err=
2931   fi
2932 else
2933   ac_cpp_err=yes
2934 fi
2935 if test -z "$ac_cpp_err"; then
2936   # We can compile using X headers with no special include directory.
2937 ac_x_includes=
2938 else
2939   echo "$as_me: failed program was:" >&5
2940 sed 's/^/| /' conftest.$ac_ext >&5
2941
2942   for ac_dir in $ac_x_header_dirs; do
2943   if test -r "$ac_dir/X11/Intrinsic.h"; then
2944     ac_x_includes=$ac_dir
2945     break
2946   fi
2947 done
2948 fi
2949 rm -f conftest.err conftest.$ac_ext
2950 fi # $ac_x_includes = no
2951
2952 if test "$ac_x_libraries" = no; then
2953   # Check for the libraries.
2954   # See if we find them without any special options.
2955   # Don't add to $LIBS permanently.
2956   ac_save_LIBS=$LIBS
2957   LIBS="-lXt $LIBS"
2958   cat >conftest.$ac_ext <<_ACEOF
2959 #line $LINENO "configure"
2960 /* confdefs.h.  */
2961 _ACEOF
2962 cat confdefs.h >>conftest.$ac_ext
2963 cat >>conftest.$ac_ext <<_ACEOF
2964 /* end confdefs.h.  */
2965 #include <X11/Intrinsic.h>
2966 int
2967 main ()
2968 {
2969 XtMalloc (0)
2970   ;
2971   return 0;
2972 }
2973 _ACEOF
2974 rm -f conftest.$ac_objext conftest$ac_exeext
2975 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2976   (eval $ac_link) 2>&5
2977   ac_status=$?
2978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2979   (exit $ac_status); } &&
2980          { ac_try='test -s conftest$ac_exeext'
2981   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2982   (eval $ac_try) 2>&5
2983   ac_status=$?
2984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2985   (exit $ac_status); }; }; then
2986   LIBS=$ac_save_LIBS
2987 # We can link X programs with no special library path.
2988 ac_x_libraries=
2989 else
2990   echo "$as_me: failed program was:" >&5
2991 sed 's/^/| /' conftest.$ac_ext >&5
2992
2993 LIBS=$ac_save_LIBS
2994 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
2995 do
2996   # Don't even attempt the hair of trying to link an X program!
2997   for ac_extension in a so sl; do
2998     if test -r $ac_dir/libXt.$ac_extension; then
2999       ac_x_libraries=$ac_dir
3000       break 2
3001     fi
3002   done
3003 done
3004 fi
3005 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3006 fi # $ac_x_libraries = no
3007
3008 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
3009   # Didn't find X anywhere.  Cache the known absence of X.
3010   ac_cv_have_x="have_x=no"
3011 else
3012   # Record where we found X for the cache.
3013   ac_cv_have_x="have_x=yes \
3014                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
3015 fi
3016 fi
3017
3018   fi
3019   eval "$ac_cv_have_x"
3020 fi # $with_x != no
3021
3022 if test "$have_x" != yes; then
3023   echo "$as_me:$LINENO: result: $have_x" >&5
3024 echo "${ECHO_T}$have_x" >&6
3025   no_x=yes
3026 else
3027   # If each of the values was on the command line, it overrides each guess.
3028   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
3029   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
3030   # Update the cache value to reflect the command line values.
3031   ac_cv_have_x="have_x=yes \
3032                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
3033   echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
3034 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
3035 fi
3036
3037 if test "$no_x" = yes; then
3038   # Not all programs may use this symbol, but it does not hurt to define it.
3039
3040 cat >>confdefs.h <<\_ACEOF
3041 #define X_DISPLAY_MISSING 1
3042 _ACEOF
3043
3044   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
3045 else
3046   if test -n "$x_includes"; then
3047     X_CFLAGS="$X_CFLAGS -I$x_includes"
3048   fi
3049
3050   # It would also be nice to do this for all -L options, not just this one.
3051   if test -n "$x_libraries"; then
3052     X_LIBS="$X_LIBS -L$x_libraries"
3053     # For Solaris; some versions of Sun CC require a space after -R and
3054     # others require no space.  Words are not sufficient . . . .
3055     case `(uname -sr) 2>/dev/null` in
3056     "SunOS 5"*)
3057       echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
3058 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
3059       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
3060       cat >conftest.$ac_ext <<_ACEOF
3061 #line $LINENO "configure"
3062 /* confdefs.h.  */
3063 _ACEOF
3064 cat confdefs.h >>conftest.$ac_ext
3065 cat >>conftest.$ac_ext <<_ACEOF
3066 /* end confdefs.h.  */
3067
3068 int
3069 main ()
3070 {
3071
3072   ;
3073   return 0;
3074 }
3075 _ACEOF
3076 rm -f conftest.$ac_objext conftest$ac_exeext
3077 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3078   (eval $ac_link) 2>&5
3079   ac_status=$?
3080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3081   (exit $ac_status); } &&
3082          { ac_try='test -s conftest$ac_exeext'
3083   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3084   (eval $ac_try) 2>&5
3085   ac_status=$?
3086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3087   (exit $ac_status); }; }; then
3088   ac_R_nospace=yes
3089 else
3090   echo "$as_me: failed program was:" >&5
3091 sed 's/^/| /' conftest.$ac_ext >&5
3092
3093 ac_R_nospace=no
3094 fi
3095 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3096       if test $ac_R_nospace = yes; then
3097         echo "$as_me:$LINENO: result: no" >&5
3098 echo "${ECHO_T}no" >&6
3099         X_LIBS="$X_LIBS -R$x_libraries"
3100       else
3101         LIBS="$ac_xsave_LIBS -R $x_libraries"
3102         cat >conftest.$ac_ext <<_ACEOF
3103 #line $LINENO "configure"
3104 /* confdefs.h.  */
3105 _ACEOF
3106 cat confdefs.h >>conftest.$ac_ext
3107 cat >>conftest.$ac_ext <<_ACEOF
3108 /* end confdefs.h.  */
3109
3110 int
3111 main ()
3112 {
3113
3114   ;
3115   return 0;
3116 }
3117 _ACEOF
3118 rm -f conftest.$ac_objext conftest$ac_exeext
3119 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3120   (eval $ac_link) 2>&5
3121   ac_status=$?
3122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3123   (exit $ac_status); } &&
3124          { ac_try='test -s conftest$ac_exeext'
3125   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3126   (eval $ac_try) 2>&5
3127   ac_status=$?
3128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3129   (exit $ac_status); }; }; then
3130   ac_R_space=yes
3131 else
3132   echo "$as_me: failed program was:" >&5
3133 sed 's/^/| /' conftest.$ac_ext >&5
3134
3135 ac_R_space=no
3136 fi
3137 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3138         if test $ac_R_space = yes; then
3139           echo "$as_me:$LINENO: result: yes" >&5
3140 echo "${ECHO_T}yes" >&6
3141           X_LIBS="$X_LIBS -R $x_libraries"
3142         else
3143           echo "$as_me:$LINENO: result: neither works" >&5
3144 echo "${ECHO_T}neither works" >&6
3145         fi
3146       fi
3147       LIBS=$ac_xsave_LIBS
3148     esac
3149   fi
3150
3151   # Check for system-dependent libraries X programs must link with.
3152   # Do this before checking for the system-independent R6 libraries
3153   # (-lICE), since we may need -lsocket or whatever for X linking.
3154
3155   if test "$ISC" = yes; then
3156     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
3157   else
3158     # Martyn Johnson says this is needed for Ultrix, if the X
3159     # libraries were built with DECnet support.  And Karl Berry says
3160     # the Alpha needs dnet_stub (dnet does not exist).
3161     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
3162     cat >conftest.$ac_ext <<_ACEOF
3163 #line $LINENO "configure"
3164 /* confdefs.h.  */
3165 _ACEOF
3166 cat confdefs.h >>conftest.$ac_ext
3167 cat >>conftest.$ac_ext <<_ACEOF
3168 /* end confdefs.h.  */
3169
3170 /* Override any gcc2 internal prototype to avoid an error.  */
3171 #ifdef __cplusplus
3172 extern "C"
3173 #endif
3174 /* We use char because int might match the return type of a gcc2
3175    builtin and then its argument prototype would still apply.  */
3176 char XOpenDisplay ();
3177 int
3178 main ()
3179 {
3180 XOpenDisplay ();
3181   ;
3182   return 0;
3183 }
3184 _ACEOF
3185 rm -f conftest.$ac_objext conftest$ac_exeext
3186 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3187   (eval $ac_link) 2>&5
3188   ac_status=$?
3189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3190   (exit $ac_status); } &&
3191          { ac_try='test -s conftest$ac_exeext'
3192   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3193   (eval $ac_try) 2>&5
3194   ac_status=$?
3195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3196   (exit $ac_status); }; }; then
3197   :
3198 else
3199   echo "$as_me: failed program was:" >&5
3200 sed 's/^/| /' conftest.$ac_ext >&5
3201
3202 echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
3203 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
3204 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
3205   echo $ECHO_N "(cached) $ECHO_C" >&6
3206 else
3207   ac_check_lib_save_LIBS=$LIBS
3208 LIBS="-ldnet  $LIBS"
3209 cat >conftest.$ac_ext <<_ACEOF
3210 #line $LINENO "configure"
3211 /* confdefs.h.  */
3212 _ACEOF
3213 cat confdefs.h >>conftest.$ac_ext
3214 cat >>conftest.$ac_ext <<_ACEOF
3215 /* end confdefs.h.  */
3216
3217 /* Override any gcc2 internal prototype to avoid an error.  */
3218 #ifdef __cplusplus
3219 extern "C"
3220 #endif
3221 /* We use char because int might match the return type of a gcc2
3222    builtin and then its argument prototype would still apply.  */
3223 char dnet_ntoa ();
3224 int
3225 main ()
3226 {
3227 dnet_ntoa ();
3228   ;
3229   return 0;
3230 }
3231 _ACEOF
3232 rm -f conftest.$ac_objext conftest$ac_exeext
3233 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3234   (eval $ac_link) 2>&5
3235   ac_status=$?
3236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3237   (exit $ac_status); } &&
3238          { ac_try='test -s conftest$ac_exeext'
3239   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3240   (eval $ac_try) 2>&5
3241   ac_status=$?
3242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3243   (exit $ac_status); }; }; then
3244   ac_cv_lib_dnet_dnet_ntoa=yes
3245 else
3246   echo "$as_me: failed program was:" >&5
3247 sed 's/^/| /' conftest.$ac_ext >&5
3248
3249 ac_cv_lib_dnet_dnet_ntoa=no
3250 fi
3251 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3252 LIBS=$ac_check_lib_save_LIBS
3253 fi
3254 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
3255 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
3256 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
3257   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
3258 fi
3259
3260     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
3261       echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
3262 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
3263 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
3264   echo $ECHO_N "(cached) $ECHO_C" >&6
3265 else
3266   ac_check_lib_save_LIBS=$LIBS
3267 LIBS="-ldnet_stub  $LIBS"
3268 cat >conftest.$ac_ext <<_ACEOF
3269 #line $LINENO "configure"
3270 /* confdefs.h.  */
3271 _ACEOF
3272 cat confdefs.h >>conftest.$ac_ext
3273 cat >>conftest.$ac_ext <<_ACEOF
3274 /* end confdefs.h.  */
3275
3276 /* Override any gcc2 internal prototype to avoid an error.  */
3277 #ifdef __cplusplus
3278 extern "C"
3279 #endif
3280 /* We use char because int might match the return type of a gcc2
3281    builtin and then its argument prototype would still apply.  */
3282 char dnet_ntoa ();
3283 int
3284 main ()
3285 {
3286 dnet_ntoa ();
3287   ;
3288   return 0;
3289 }
3290 _ACEOF
3291 rm -f conftest.$ac_objext conftest$ac_exeext
3292 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3293   (eval $ac_link) 2>&5
3294   ac_status=$?
3295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3296   (exit $ac_status); } &&
3297          { ac_try='test -s conftest$ac_exeext'
3298   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3299   (eval $ac_try) 2>&5
3300   ac_status=$?
3301   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3302   (exit $ac_status); }; }; then
3303   ac_cv_lib_dnet_stub_dnet_ntoa=yes
3304 else
3305   echo "$as_me: failed program was:" >&5
3306 sed 's/^/| /' conftest.$ac_ext >&5
3307
3308 ac_cv_lib_dnet_stub_dnet_ntoa=no
3309 fi
3310 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3311 LIBS=$ac_check_lib_save_LIBS
3312 fi
3313 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
3314 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
3315 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
3316   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
3317 fi
3318
3319     fi
3320 fi
3321 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3322     LIBS="$ac_xsave_LIBS"
3323
3324     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
3325     # to get the SysV transport functions.
3326     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
3327     # needs -lnsl.
3328     # The nsl library prevents programs from opening the X display
3329     # on Irix 5.2, according to T.E. Dickey.
3330     # The functions gethostbyname, getservbyname, and inet_addr are
3331     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
3332     echo "$as_me:$LINENO: checking for gethostbyname" >&5
3333 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
3334 if test "${ac_cv_func_gethostbyname+set}" = set; then
3335   echo $ECHO_N "(cached) $ECHO_C" >&6
3336 else
3337   cat >conftest.$ac_ext <<_ACEOF
3338 #line $LINENO "configure"
3339 /* confdefs.h.  */
3340 _ACEOF
3341 cat confdefs.h >>conftest.$ac_ext
3342 cat >>conftest.$ac_ext <<_ACEOF
3343 /* end confdefs.h.  */
3344 /* System header to define __stub macros and hopefully few prototypes,
3345     which can conflict with char gethostbyname (); below.
3346     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3347     <limits.h> exists even on freestanding compilers.  */
3348 #ifdef __STDC__
3349 # include <limits.h>
3350 #else
3351 # include <assert.h>
3352 #endif
3353 /* Override any gcc2 internal prototype to avoid an error.  */
3354 #ifdef __cplusplus
3355 extern "C"
3356 {
3357 #endif
3358 /* We use char because int might match the return type of a gcc2
3359    builtin and then its argument prototype would still apply.  */
3360 char gethostbyname ();
3361 /* The GNU C library defines this for functions which it implements
3362     to always fail with ENOSYS.  Some functions are actually named
3363     something starting with __ and the normal name is an alias.  */
3364 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
3365 choke me
3366 #else
3367 char (*f) () = gethostbyname;
3368 #endif
3369 #ifdef __cplusplus
3370 }
3371 #endif
3372
3373 int
3374 main ()
3375 {
3376 return f != gethostbyname;
3377   ;
3378   return 0;
3379 }
3380 _ACEOF
3381 rm -f conftest.$ac_objext conftest$ac_exeext
3382 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3383   (eval $ac_link) 2>&5
3384   ac_status=$?
3385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3386   (exit $ac_status); } &&
3387          { ac_try='test -s conftest$ac_exeext'
3388   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3389   (eval $ac_try) 2>&5
3390   ac_status=$?
3391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3392   (exit $ac_status); }; }; then
3393   ac_cv_func_gethostbyname=yes
3394 else
3395   echo "$as_me: failed program was:" >&5
3396 sed 's/^/| /' conftest.$ac_ext >&5
3397
3398 ac_cv_func_gethostbyname=no
3399 fi
3400 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3401 fi
3402 echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
3403 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
3404
3405     if test $ac_cv_func_gethostbyname = no; then
3406       echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
3407 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
3408 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
3409   echo $ECHO_N "(cached) $ECHO_C" >&6
3410 else
3411   ac_check_lib_save_LIBS=$LIBS
3412 LIBS="-lnsl  $LIBS"
3413 cat >conftest.$ac_ext <<_ACEOF
3414 #line $LINENO "configure"
3415 /* confdefs.h.  */
3416 _ACEOF
3417 cat confdefs.h >>conftest.$ac_ext
3418 cat >>conftest.$ac_ext <<_ACEOF
3419 /* end confdefs.h.  */
3420
3421 /* Override any gcc2 internal prototype to avoid an error.  */
3422 #ifdef __cplusplus
3423 extern "C"
3424 #endif
3425 /* We use char because int might match the return type of a gcc2
3426    builtin and then its argument prototype would still apply.  */
3427 char gethostbyname ();
3428 int
3429 main ()
3430 {
3431 gethostbyname ();
3432   ;
3433   return 0;
3434 }
3435 _ACEOF
3436 rm -f conftest.$ac_objext conftest$ac_exeext
3437 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3438   (eval $ac_link) 2>&5
3439   ac_status=$?
3440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3441   (exit $ac_status); } &&
3442          { ac_try='test -s conftest$ac_exeext'
3443   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3444   (eval $ac_try) 2>&5
3445   ac_status=$?
3446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3447   (exit $ac_status); }; }; then
3448   ac_cv_lib_nsl_gethostbyname=yes
3449 else
3450   echo "$as_me: failed program was:" >&5
3451 sed 's/^/| /' conftest.$ac_ext >&5
3452
3453 ac_cv_lib_nsl_gethostbyname=no
3454 fi
3455 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3456 LIBS=$ac_check_lib_save_LIBS
3457 fi
3458 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
3459 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
3460 if test $ac_cv_lib_nsl_gethostbyname = yes; then
3461   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
3462 fi
3463
3464       if test $ac_cv_lib_nsl_gethostbyname = no; then
3465         echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
3466 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
3467 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
3468   echo $ECHO_N "(cached) $ECHO_C" >&6
3469 else
3470   ac_check_lib_save_LIBS=$LIBS
3471 LIBS="-lbsd  $LIBS"
3472 cat >conftest.$ac_ext <<_ACEOF
3473 #line $LINENO "configure"
3474 /* confdefs.h.  */
3475 _ACEOF
3476 cat confdefs.h >>conftest.$ac_ext
3477 cat >>conftest.$ac_ext <<_ACEOF
3478 /* end confdefs.h.  */
3479
3480 /* Override any gcc2 internal prototype to avoid an error.  */
3481 #ifdef __cplusplus
3482 extern "C"
3483 #endif
3484 /* We use char because int might match the return type of a gcc2
3485    builtin and then its argument prototype would still apply.  */
3486 char gethostbyname ();
3487 int
3488 main ()
3489 {
3490 gethostbyname ();
3491   ;
3492   return 0;
3493 }
3494 _ACEOF
3495 rm -f conftest.$ac_objext conftest$ac_exeext
3496 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3497   (eval $ac_link) 2>&5
3498   ac_status=$?
3499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3500   (exit $ac_status); } &&
3501          { ac_try='test -s conftest$ac_exeext'
3502   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3503   (eval $ac_try) 2>&5
3504   ac_status=$?
3505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3506   (exit $ac_status); }; }; then
3507   ac_cv_lib_bsd_gethostbyname=yes
3508 else
3509   echo "$as_me: failed program was:" >&5
3510 sed 's/^/| /' conftest.$ac_ext >&5
3511
3512 ac_cv_lib_bsd_gethostbyname=no
3513 fi
3514 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3515 LIBS=$ac_check_lib_save_LIBS
3516 fi
3517 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
3518 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
3519 if test $ac_cv_lib_bsd_gethostbyname = yes; then
3520   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
3521 fi
3522
3523       fi
3524     fi
3525
3526     # lieder@skyler.mavd.honeywell.com says without -lsocket,
3527     # socket/setsockopt and other routines are undefined under SCO ODT
3528     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
3529     # on later versions), says Simon Leinen: it contains gethostby*
3530     # variants that don't use the name server (or something).  -lsocket
3531     # must be given before -lnsl if both are needed.  We assume that
3532     # if connect needs -lnsl, so does gethostbyname.
3533     echo "$as_me:$LINENO: checking for connect" >&5
3534 echo $ECHO_N "checking for connect... $ECHO_C" >&6
3535 if test "${ac_cv_func_connect+set}" = set; then
3536   echo $ECHO_N "(cached) $ECHO_C" >&6
3537 else
3538   cat >conftest.$ac_ext <<_ACEOF
3539 #line $LINENO "configure"
3540 /* confdefs.h.  */
3541 _ACEOF
3542 cat confdefs.h >>conftest.$ac_ext
3543 cat >>conftest.$ac_ext <<_ACEOF
3544 /* end confdefs.h.  */
3545 /* System header to define __stub macros and hopefully few prototypes,
3546     which can conflict with char connect (); below.
3547     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3548     <limits.h> exists even on freestanding compilers.  */
3549 #ifdef __STDC__
3550 # include <limits.h>
3551 #else
3552 # include <assert.h>
3553 #endif
3554 /* Override any gcc2 internal prototype to avoid an error.  */
3555 #ifdef __cplusplus
3556 extern "C"
3557 {
3558 #endif
3559 /* We use char because int might match the return type of a gcc2
3560    builtin and then its argument prototype would still apply.  */
3561 char connect ();
3562 /* The GNU C library defines this for functions which it implements
3563     to always fail with ENOSYS.  Some functions are actually named
3564     something starting with __ and the normal name is an alias.  */
3565 #if defined (__stub_connect) || defined (__stub___connect)
3566 choke me
3567 #else
3568 char (*f) () = connect;
3569 #endif
3570 #ifdef __cplusplus
3571 }
3572 #endif
3573
3574 int
3575 main ()
3576 {
3577 return f != connect;
3578   ;
3579   return 0;
3580 }
3581 _ACEOF
3582 rm -f conftest.$ac_objext conftest$ac_exeext
3583 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3584   (eval $ac_link) 2>&5
3585   ac_status=$?
3586   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3587   (exit $ac_status); } &&
3588          { ac_try='test -s conftest$ac_exeext'
3589   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3590   (eval $ac_try) 2>&5
3591   ac_status=$?
3592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3593   (exit $ac_status); }; }; then
3594   ac_cv_func_connect=yes
3595 else
3596   echo "$as_me: failed program was:" >&5
3597 sed 's/^/| /' conftest.$ac_ext >&5
3598
3599 ac_cv_func_connect=no
3600 fi
3601 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3602 fi
3603 echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
3604 echo "${ECHO_T}$ac_cv_func_connect" >&6
3605
3606     if test $ac_cv_func_connect = no; then
3607       echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
3608 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
3609 if test "${ac_cv_lib_socket_connect+set}" = set; then
3610   echo $ECHO_N "(cached) $ECHO_C" >&6
3611 else
3612   ac_check_lib_save_LIBS=$LIBS
3613 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
3614 cat >conftest.$ac_ext <<_ACEOF
3615 #line $LINENO "configure"
3616 /* confdefs.h.  */
3617 _ACEOF
3618 cat confdefs.h >>conftest.$ac_ext
3619 cat >>conftest.$ac_ext <<_ACEOF
3620 /* end confdefs.h.  */
3621
3622 /* Override any gcc2 internal prototype to avoid an error.  */
3623 #ifdef __cplusplus
3624 extern "C"
3625 #endif
3626 /* We use char because int might match the return type of a gcc2
3627    builtin and then its argument prototype would still apply.  */
3628 char connect ();
3629 int
3630 main ()
3631 {
3632 connect ();
3633   ;
3634   return 0;
3635 }
3636 _ACEOF
3637 rm -f conftest.$ac_objext conftest$ac_exeext
3638 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3639   (eval $ac_link) 2>&5
3640   ac_status=$?
3641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3642   (exit $ac_status); } &&
3643          { ac_try='test -s conftest$ac_exeext'
3644   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3645   (eval $ac_try) 2>&5
3646   ac_status=$?
3647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3648   (exit $ac_status); }; }; then
3649   ac_cv_lib_socket_connect=yes
3650 else
3651   echo "$as_me: failed program was:" >&5
3652 sed 's/^/| /' conftest.$ac_ext >&5
3653
3654 ac_cv_lib_socket_connect=no
3655 fi
3656 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3657 LIBS=$ac_check_lib_save_LIBS
3658 fi
3659 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
3660 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
3661 if test $ac_cv_lib_socket_connect = yes; then
3662   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
3663 fi
3664
3665     fi
3666
3667     # Guillermo Gomez says -lposix is necessary on A/UX.
3668     echo "$as_me:$LINENO: checking for remove" >&5
3669 echo $ECHO_N "checking for remove... $ECHO_C" >&6
3670 if test "${ac_cv_func_remove+set}" = set; then
3671   echo $ECHO_N "(cached) $ECHO_C" >&6
3672 else
3673   cat >conftest.$ac_ext <<_ACEOF
3674 #line $LINENO "configure"
3675 /* confdefs.h.  */
3676 _ACEOF
3677 cat confdefs.h >>conftest.$ac_ext
3678 cat >>conftest.$ac_ext <<_ACEOF
3679 /* end confdefs.h.  */
3680 /* System header to define __stub macros and hopefully few prototypes,
3681     which can conflict with char remove (); below.
3682     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3683     <limits.h> exists even on freestanding compilers.  */
3684 #ifdef __STDC__
3685 # include <limits.h>
3686 #else
3687 # include <assert.h>
3688 #endif
3689 /* Override any gcc2 internal prototype to avoid an error.  */
3690 #ifdef __cplusplus
3691 extern "C"
3692 {
3693 #endif
3694 /* We use char because int might match the return type of a gcc2
3695    builtin and then its argument prototype would still apply.  */
3696 char remove ();
3697 /* The GNU C library defines this for functions which it implements
3698     to always fail with ENOSYS.  Some functions are actually named
3699     something starting with __ and the normal name is an alias.  */
3700 #if defined (__stub_remove) || defined (__stub___remove)
3701 choke me
3702 #else
3703 char (*f) () = remove;
3704 #endif
3705 #ifdef __cplusplus
3706 }
3707 #endif
3708
3709 int
3710 main ()
3711 {
3712 return f != remove;
3713   ;
3714   return 0;
3715 }
3716 _ACEOF
3717 rm -f conftest.$ac_objext conftest$ac_exeext
3718 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3719   (eval $ac_link) 2>&5
3720   ac_status=$?
3721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3722   (exit $ac_status); } &&
3723          { ac_try='test -s conftest$ac_exeext'
3724   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3725   (eval $ac_try) 2>&5
3726   ac_status=$?
3727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3728   (exit $ac_status); }; }; then
3729   ac_cv_func_remove=yes
3730 else
3731   echo "$as_me: failed program was:" >&5
3732 sed 's/^/| /' conftest.$ac_ext >&5
3733
3734 ac_cv_func_remove=no
3735 fi
3736 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3737 fi
3738 echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
3739 echo "${ECHO_T}$ac_cv_func_remove" >&6
3740
3741     if test $ac_cv_func_remove = no; then
3742       echo "$as_me:$LINENO: checking for remove in -lposix" >&5
3743 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
3744 if test "${ac_cv_lib_posix_remove+set}" = set; then
3745   echo $ECHO_N "(cached) $ECHO_C" >&6
3746 else
3747   ac_check_lib_save_LIBS=$LIBS
3748 LIBS="-lposix  $LIBS"
3749 cat >conftest.$ac_ext <<_ACEOF
3750 #line $LINENO "configure"
3751 /* confdefs.h.  */
3752 _ACEOF
3753 cat confdefs.h >>conftest.$ac_ext
3754 cat >>conftest.$ac_ext <<_ACEOF
3755 /* end confdefs.h.  */
3756
3757 /* Override any gcc2 internal prototype to avoid an error.  */
3758 #ifdef __cplusplus
3759 extern "C"
3760 #endif
3761 /* We use char because int might match the return type of a gcc2
3762    builtin and then its argument prototype would still apply.  */
3763 char remove ();
3764 int
3765 main ()
3766 {
3767 remove ();
3768   ;
3769   return 0;
3770 }
3771 _ACEOF
3772 rm -f conftest.$ac_objext conftest$ac_exeext
3773 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3774   (eval $ac_link) 2>&5
3775   ac_status=$?
3776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3777   (exit $ac_status); } &&
3778          { ac_try='test -s conftest$ac_exeext'
3779   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3780   (eval $ac_try) 2>&5
3781   ac_status=$?
3782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3783   (exit $ac_status); }; }; then
3784   ac_cv_lib_posix_remove=yes
3785 else
3786   echo "$as_me: failed program was:" >&5
3787 sed 's/^/| /' conftest.$ac_ext >&5
3788
3789 ac_cv_lib_posix_remove=no
3790 fi
3791 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3792 LIBS=$ac_check_lib_save_LIBS
3793 fi
3794 echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
3795 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
3796 if test $ac_cv_lib_posix_remove = yes; then
3797   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3798 fi
3799
3800     fi
3801
3802     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3803     echo "$as_me:$LINENO: checking for shmat" >&5
3804 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
3805 if test "${ac_cv_func_shmat+set}" = set; then
3806   echo $ECHO_N "(cached) $ECHO_C" >&6
3807 else
3808   cat >conftest.$ac_ext <<_ACEOF
3809 #line $LINENO "configure"
3810 /* confdefs.h.  */
3811 _ACEOF
3812 cat confdefs.h >>conftest.$ac_ext
3813 cat >>conftest.$ac_ext <<_ACEOF
3814 /* end confdefs.h.  */
3815 /* System header to define __stub macros and hopefully few prototypes,
3816     which can conflict with char shmat (); below.
3817     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3818     <limits.h> exists even on freestanding compilers.  */
3819 #ifdef __STDC__
3820 # include <limits.h>
3821 #else
3822 # include <assert.h>
3823 #endif
3824 /* Override any gcc2 internal prototype to avoid an error.  */
3825 #ifdef __cplusplus
3826 extern "C"
3827 {
3828 #endif
3829 /* We use char because int might match the return type of a gcc2
3830    builtin and then its argument prototype would still apply.  */
3831 char shmat ();
3832 /* The GNU C library defines this for functions which it implements
3833     to always fail with ENOSYS.  Some functions are actually named
3834     something starting with __ and the normal name is an alias.  */
3835 #if defined (__stub_shmat) || defined (__stub___shmat)
3836 choke me
3837 #else
3838 char (*f) () = shmat;
3839 #endif
3840 #ifdef __cplusplus
3841 }
3842 #endif
3843
3844 int
3845 main ()
3846 {
3847 return f != shmat;
3848   ;
3849   return 0;
3850 }
3851 _ACEOF
3852 rm -f conftest.$ac_objext conftest$ac_exeext
3853 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3854   (eval $ac_link) 2>&5
3855   ac_status=$?
3856   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3857   (exit $ac_status); } &&
3858          { ac_try='test -s conftest$ac_exeext'
3859   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3860   (eval $ac_try) 2>&5
3861   ac_status=$?
3862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3863   (exit $ac_status); }; }; then
3864   ac_cv_func_shmat=yes
3865 else
3866   echo "$as_me: failed program was:" >&5
3867 sed 's/^/| /' conftest.$ac_ext >&5
3868
3869 ac_cv_func_shmat=no
3870 fi
3871 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3872 fi
3873 echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
3874 echo "${ECHO_T}$ac_cv_func_shmat" >&6
3875
3876     if test $ac_cv_func_shmat = no; then
3877       echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
3878 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
3879 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
3880   echo $ECHO_N "(cached) $ECHO_C" >&6
3881 else
3882   ac_check_lib_save_LIBS=$LIBS
3883 LIBS="-lipc  $LIBS"
3884 cat >conftest.$ac_ext <<_ACEOF
3885 #line $LINENO "configure"
3886 /* confdefs.h.  */
3887 _ACEOF
3888 cat confdefs.h >>conftest.$ac_ext
3889 cat >>conftest.$ac_ext <<_ACEOF
3890 /* end confdefs.h.  */
3891
3892 /* Override any gcc2 internal prototype to avoid an error.  */
3893 #ifdef __cplusplus
3894 extern "C"
3895 #endif
3896 /* We use char because int might match the return type of a gcc2
3897    builtin and then its argument prototype would still apply.  */
3898 char shmat ();
3899 int
3900 main ()
3901 {
3902 shmat ();
3903   ;
3904   return 0;
3905 }
3906 _ACEOF
3907 rm -f conftest.$ac_objext conftest$ac_exeext
3908 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3909   (eval $ac_link) 2>&5
3910   ac_status=$?
3911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3912   (exit $ac_status); } &&
3913          { ac_try='test -s conftest$ac_exeext'
3914   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3915   (eval $ac_try) 2>&5
3916   ac_status=$?
3917   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3918   (exit $ac_status); }; }; then
3919   ac_cv_lib_ipc_shmat=yes
3920 else
3921   echo "$as_me: failed program was:" >&5
3922 sed 's/^/| /' conftest.$ac_ext >&5
3923
3924 ac_cv_lib_ipc_shmat=no
3925 fi
3926 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3927 LIBS=$ac_check_lib_save_LIBS
3928 fi
3929 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
3930 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
3931 if test $ac_cv_lib_ipc_shmat = yes; then
3932   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
3933 fi
3934
3935     fi
3936   fi
3937
3938   # Check for libraries that X11R6 Xt/Xaw programs need.
3939   ac_save_LDFLAGS=$LDFLAGS
3940   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
3941   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
3942   # check for ICE first), but we must link in the order -lSM -lICE or
3943   # we get undefined symbols.  So assume we have SM if we have ICE.
3944   # These have to be linked with before -lX11, unlike the other
3945   # libraries we check for below, so use a different variable.
3946   # John Interrante, Karl Berry
3947   echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
3948 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
3949 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
3950   echo $ECHO_N "(cached) $ECHO_C" >&6
3951 else
3952   ac_check_lib_save_LIBS=$LIBS
3953 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3954 cat >conftest.$ac_ext <<_ACEOF
3955 #line $LINENO "configure"
3956 /* confdefs.h.  */
3957 _ACEOF
3958 cat confdefs.h >>conftest.$ac_ext
3959 cat >>conftest.$ac_ext <<_ACEOF
3960 /* end confdefs.h.  */
3961
3962 /* Override any gcc2 internal prototype to avoid an error.  */
3963 #ifdef __cplusplus
3964 extern "C"
3965 #endif
3966 /* We use char because int might match the return type of a gcc2
3967    builtin and then its argument prototype would still apply.  */
3968 char IceConnectionNumber ();
3969 int
3970 main ()
3971 {
3972 IceConnectionNumber ();
3973   ;
3974   return 0;
3975 }
3976 _ACEOF
3977 rm -f conftest.$ac_objext conftest$ac_exeext
3978 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3979   (eval $ac_link) 2>&5
3980   ac_status=$?
3981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3982   (exit $ac_status); } &&
3983          { ac_try='test -s conftest$ac_exeext'
3984   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3985   (eval $ac_try) 2>&5
3986   ac_status=$?
3987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3988   (exit $ac_status); }; }; then
3989   ac_cv_lib_ICE_IceConnectionNumber=yes
3990 else
3991   echo "$as_me: failed program was:" >&5
3992 sed 's/^/| /' conftest.$ac_ext >&5
3993
3994 ac_cv_lib_ICE_IceConnectionNumber=no
3995 fi
3996 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3997 LIBS=$ac_check_lib_save_LIBS
3998 fi
3999 echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
4000 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
4001 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
4002   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
4003 fi
4004
4005   LDFLAGS=$ac_save_LDFLAGS
4006
4007 fi
4008
4009
4010
4011 #
4012 # Check for other libraries.
4013 #
4014
4015
4016 echo "$as_me:$LINENO: checking for clrtoeol in -lcurses" >&5
4017 echo $ECHO_N "checking for clrtoeol in -lcurses... $ECHO_C" >&6
4018 if test "${ac_cv_lib_curses_clrtoeol+set}" = set; then
4019   echo $ECHO_N "(cached) $ECHO_C" >&6
4020 else
4021   ac_check_lib_save_LIBS=$LIBS
4022 LIBS="-lcurses  $LIBS"
4023 cat >conftest.$ac_ext <<_ACEOF
4024 #line $LINENO "configure"
4025 /* confdefs.h.  */
4026 _ACEOF
4027 cat confdefs.h >>conftest.$ac_ext
4028 cat >>conftest.$ac_ext <<_ACEOF
4029 /* end confdefs.h.  */
4030
4031 /* Override any gcc2 internal prototype to avoid an error.  */
4032 #ifdef __cplusplus
4033 extern "C"
4034 #endif
4035 /* We use char because int might match the return type of a gcc2
4036    builtin and then its argument prototype would still apply.  */
4037 char clrtoeol ();
4038 int
4039 main ()
4040 {
4041 clrtoeol ();
4042   ;
4043   return 0;
4044 }
4045 _ACEOF
4046 rm -f conftest.$ac_objext conftest$ac_exeext
4047 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4048   (eval $ac_link) 2>&5
4049   ac_status=$?
4050   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4051   (exit $ac_status); } &&
4052          { ac_try='test -s conftest$ac_exeext'
4053   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4054   (eval $ac_try) 2>&5
4055   ac_status=$?
4056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4057   (exit $ac_status); }; }; then
4058   ac_cv_lib_curses_clrtoeol=yes
4059 else
4060   echo "$as_me: failed program was:" >&5
4061 sed 's/^/| /' conftest.$ac_ext >&5
4062
4063 ac_cv_lib_curses_clrtoeol=no
4064 fi
4065 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4066 LIBS=$ac_check_lib_save_LIBS
4067 fi
4068 echo "$as_me:$LINENO: result: $ac_cv_lib_curses_clrtoeol" >&5
4069 echo "${ECHO_T}$ac_cv_lib_curses_clrtoeol" >&6
4070 if test $ac_cv_lib_curses_clrtoeol = yes; then
4071   cat >>confdefs.h <<_ACEOF
4072 #define HAVE_LIBCURSES 1
4073 _ACEOF
4074
4075   LIBS="-lcurses $LIBS"
4076
4077 fi
4078
4079
4080 echo "$as_me:$LINENO: checking for pow in -lm" >&5
4081 echo $ECHO_N "checking for pow in -lm... $ECHO_C" >&6
4082 if test "${ac_cv_lib_m_pow+set}" = set; then
4083   echo $ECHO_N "(cached) $ECHO_C" >&6
4084 else
4085   ac_check_lib_save_LIBS=$LIBS
4086 LIBS="-lm  $LIBS"
4087 cat >conftest.$ac_ext <<_ACEOF
4088 #line $LINENO "configure"
4089 /* confdefs.h.  */
4090 _ACEOF
4091 cat confdefs.h >>conftest.$ac_ext
4092 cat >>conftest.$ac_ext <<_ACEOF
4093 /* end confdefs.h.  */
4094
4095 /* Override any gcc2 internal prototype to avoid an error.  */
4096 #ifdef __cplusplus
4097 extern "C"
4098 #endif
4099 /* We use char because int might match the return type of a gcc2
4100    builtin and then its argument prototype would still apply.  */
4101 char pow ();
4102 int
4103 main ()
4104 {
4105 pow ();
4106   ;
4107   return 0;
4108 }
4109 _ACEOF
4110 rm -f conftest.$ac_objext conftest$ac_exeext
4111 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4112   (eval $ac_link) 2>&5
4113   ac_status=$?
4114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4115   (exit $ac_status); } &&
4116          { ac_try='test -s conftest$ac_exeext'
4117   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4118   (eval $ac_try) 2>&5
4119   ac_status=$?
4120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4121   (exit $ac_status); }; }; then
4122   ac_cv_lib_m_pow=yes
4123 else
4124   echo "$as_me: failed program was:" >&5
4125 sed 's/^/| /' conftest.$ac_ext >&5
4126
4127 ac_cv_lib_m_pow=no
4128 fi
4129 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4130 LIBS=$ac_check_lib_save_LIBS
4131 fi
4132 echo "$as_me:$LINENO: result: $ac_cv_lib_m_pow" >&5
4133 echo "${ECHO_T}$ac_cv_lib_m_pow" >&6
4134 if test $ac_cv_lib_m_pow = yes; then
4135   cat >>confdefs.h <<_ACEOF
4136 #define HAVE_LIBM 1
4137 _ACEOF
4138
4139   LIBS="-lm $LIBS"
4140
4141 fi
4142
4143
4144 echo "$as_me:$LINENO: checking for tgoto in -ltermcap" >&5
4145 echo $ECHO_N "checking for tgoto in -ltermcap... $ECHO_C" >&6
4146 if test "${ac_cv_lib_termcap_tgoto+set}" = set; then
4147   echo $ECHO_N "(cached) $ECHO_C" >&6
4148 else
4149   ac_check_lib_save_LIBS=$LIBS
4150 LIBS="-ltermcap  $LIBS"
4151 cat >conftest.$ac_ext <<_ACEOF
4152 #line $LINENO "configure"
4153 /* confdefs.h.  */
4154 _ACEOF
4155 cat confdefs.h >>conftest.$ac_ext
4156 cat >>conftest.$ac_ext <<_ACEOF
4157 /* end confdefs.h.  */
4158
4159 /* Override any gcc2 internal prototype to avoid an error.  */
4160 #ifdef __cplusplus
4161 extern "C"
4162 #endif
4163 /* We use char because int might match the return type of a gcc2
4164    builtin and then its argument prototype would still apply.  */
4165 char tgoto ();
4166 int
4167 main ()
4168 {
4169 tgoto ();
4170   ;
4171   return 0;
4172 }
4173 _ACEOF
4174 rm -f conftest.$ac_objext conftest$ac_exeext
4175 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4176   (eval $ac_link) 2>&5
4177   ac_status=$?
4178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4179   (exit $ac_status); } &&
4180          { ac_try='test -s conftest$ac_exeext'
4181   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4182   (eval $ac_try) 2>&5
4183   ac_status=$?
4184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4185   (exit $ac_status); }; }; then
4186   ac_cv_lib_termcap_tgoto=yes
4187 else
4188   echo "$as_me: failed program was:" >&5
4189 sed 's/^/| /' conftest.$ac_ext >&5
4190
4191 ac_cv_lib_termcap_tgoto=no
4192 fi
4193 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4194 LIBS=$ac_check_lib_save_LIBS
4195 fi
4196 echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_tgoto" >&5
4197 echo "${ECHO_T}$ac_cv_lib_termcap_tgoto" >&6
4198 if test $ac_cv_lib_termcap_tgoto = yes; then
4199   cat >>confdefs.h <<_ACEOF
4200 #define HAVE_LIBTERMCAP 1
4201 _ACEOF
4202
4203   LIBS="-ltermcap $LIBS"
4204
4205 fi
4206
4207
4208
4209 #
4210 # C compiler warnings.
4211 #
4212
4213 if [ $ac_cv_c_compiler_gnu = yes ]
4214 then
4215 WARNINGS="-Wall -Wno-implicit-int -Wstrict-prototypes -ansi -pedantic"
4216 CEXTRAFLAGS="-fsigned-char -funroll-loops \$(HASH)"
4217 # For profiling targets:
4218 CEXTRAFLAGS2="-fsigned-char -pg -fprofile-arcs -ftest-coverage \$(HASH)"
4219 else
4220 # Who knows what warnings your compiler uses?
4221 WARNINGS=
4222 CEXTRAFLAGS="\$(HASH)"
4223 fi
4224
4225
4226
4227
4228
4229
4230 #
4231 # Check for header files.
4232 #
4233
4234 echo
4235 echo "$as_me:$LINENO: checking for header files" >&5
4236 echo $ECHO_N "checking for header files... $ECHO_C" >&6
4237 echo
4238
4239 echo "$as_me:$LINENO: checking for egrep" >&5
4240 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4241 if test "${ac_cv_prog_egrep+set}" = set; then
4242   echo $ECHO_N "(cached) $ECHO_C" >&6
4243 else
4244   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4245     then ac_cv_prog_egrep='grep -E'
4246     else ac_cv_prog_egrep='egrep'
4247     fi
4248 fi
4249 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4250 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4251  EGREP=$ac_cv_prog_egrep
4252
4253
4254 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4255 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4256 if test "${ac_cv_header_stdc+set}" = set; then
4257   echo $ECHO_N "(cached) $ECHO_C" >&6
4258 else
4259   cat >conftest.$ac_ext <<_ACEOF
4260 #line $LINENO "configure"
4261 /* confdefs.h.  */
4262 _ACEOF
4263 cat confdefs.h >>conftest.$ac_ext
4264 cat >>conftest.$ac_ext <<_ACEOF
4265 /* end confdefs.h.  */
4266 #include <stdlib.h>
4267 #include <stdarg.h>
4268 #include <string.h>
4269 #include <float.h>
4270
4271 int
4272 main ()
4273 {
4274
4275   ;
4276   return 0;
4277 }
4278 _ACEOF
4279 rm -f conftest.$ac_objext
4280 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4281   (eval $ac_compile) 2>&5
4282   ac_status=$?
4283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4284   (exit $ac_status); } &&
4285          { ac_try='test -s conftest.$ac_objext'
4286   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4287   (eval $ac_try) 2>&5
4288   ac_status=$?
4289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4290   (exit $ac_status); }; }; then
4291   ac_cv_header_stdc=yes
4292 else
4293   echo "$as_me: failed program was:" >&5
4294 sed 's/^/| /' conftest.$ac_ext >&5
4295
4296 ac_cv_header_stdc=no
4297 fi
4298 rm -f conftest.$ac_objext conftest.$ac_ext
4299
4300 if test $ac_cv_header_stdc = yes; then
4301   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4302   cat >conftest.$ac_ext <<_ACEOF
4303 #line $LINENO "configure"
4304 /* confdefs.h.  */
4305 _ACEOF
4306 cat confdefs.h >>conftest.$ac_ext
4307 cat >>conftest.$ac_ext <<_ACEOF
4308 /* end confdefs.h.  */
4309 #include <string.h>
4310
4311 _ACEOF
4312 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4313   $EGREP "memchr" >/dev/null 2>&1; then
4314   :
4315 else
4316   ac_cv_header_stdc=no
4317 fi
4318 rm -f conftest*
4319
4320 fi
4321
4322 if test $ac_cv_header_stdc = yes; then
4323   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4324   cat >conftest.$ac_ext <<_ACEOF
4325 #line $LINENO "configure"
4326 /* confdefs.h.  */
4327 _ACEOF
4328 cat confdefs.h >>conftest.$ac_ext
4329 cat >>conftest.$ac_ext <<_ACEOF
4330 /* end confdefs.h.  */
4331 #include <stdlib.h>
4332
4333 _ACEOF
4334 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4335   $EGREP "free" >/dev/null 2>&1; then
4336   :
4337 else
4338   ac_cv_header_stdc=no
4339 fi
4340 rm -f conftest*
4341
4342 fi
4343
4344 if test $ac_cv_header_stdc = yes; then
4345   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4346   if test "$cross_compiling" = yes; then
4347   :
4348 else
4349   cat >conftest.$ac_ext <<_ACEOF
4350 #line $LINENO "configure"
4351 /* confdefs.h.  */
4352 _ACEOF
4353 cat confdefs.h >>conftest.$ac_ext
4354 cat >>conftest.$ac_ext <<_ACEOF
4355 /* end confdefs.h.  */
4356 #include <ctype.h>
4357 #if ((' ' & 0x0FF) == 0x020)
4358 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4359 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4360 #else
4361 # define ISLOWER(c) \
4362                    (('a' <= (c) && (c) <= 'i') \
4363                      || ('j' <= (c) && (c) <= 'r') \
4364                      || ('s' <= (c) && (c) <= 'z'))
4365 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4366 #endif
4367
4368 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4369 int
4370 main ()
4371 {
4372   int i;
4373   for (i = 0; i < 256; i++)
4374     if (XOR (islower (i), ISLOWER (i))
4375         || toupper (i) != TOUPPER (i))
4376       exit(2);
4377   exit (0);
4378 }
4379 _ACEOF
4380 rm -f conftest$ac_exeext
4381 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4382   (eval $ac_link) 2>&5
4383   ac_status=$?
4384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4385   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4386   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4387   (eval $ac_try) 2>&5
4388   ac_status=$?
4389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4390   (exit $ac_status); }; }; then
4391   :
4392 else
4393   echo "$as_me: program exited with status $ac_status" >&5
4394 echo "$as_me: failed program was:" >&5
4395 sed 's/^/| /' conftest.$ac_ext >&5
4396
4397 ( exit $ac_status )
4398 ac_cv_header_stdc=no
4399 fi
4400 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4401 fi
4402 fi
4403 fi
4404 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4405 echo "${ECHO_T}$ac_cv_header_stdc" >&6
4406 if test $ac_cv_header_stdc = yes; then
4407
4408 cat >>confdefs.h <<\_ACEOF
4409 #define STDC_HEADERS 1
4410 _ACEOF
4411
4412 fi
4413
4414 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
4415 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
4416 if test "${ac_cv_header_sys_wait_h+set}" = set; then
4417   echo $ECHO_N "(cached) $ECHO_C" >&6
4418 else
4419   cat >conftest.$ac_ext <<_ACEOF
4420 #line $LINENO "configure"
4421 /* confdefs.h.  */
4422 _ACEOF
4423 cat confdefs.h >>conftest.$ac_ext
4424 cat >>conftest.$ac_ext <<_ACEOF
4425 /* end confdefs.h.  */
4426 #include <sys/types.h>
4427 #include <sys/wait.h>
4428 #ifndef WEXITSTATUS
4429 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4430 #endif
4431 #ifndef WIFEXITED
4432 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4433 #endif
4434
4435 int
4436 main ()
4437 {
4438   int s;
4439   wait (&s);
4440   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4441   ;
4442   return 0;
4443 }
4444 _ACEOF
4445 rm -f conftest.$ac_objext
4446 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4447   (eval $ac_compile) 2>&5
4448   ac_status=$?
4449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4450   (exit $ac_status); } &&
4451          { ac_try='test -s conftest.$ac_objext'
4452   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4453   (eval $ac_try) 2>&5
4454   ac_status=$?
4455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4456   (exit $ac_status); }; }; then
4457   ac_cv_header_sys_wait_h=yes
4458 else
4459   echo "$as_me: failed program was:" >&5
4460 sed 's/^/| /' conftest.$ac_ext >&5
4461
4462 ac_cv_header_sys_wait_h=no
4463 fi
4464 rm -f conftest.$ac_objext conftest.$ac_ext
4465 fi
4466 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
4467 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
4468 if test $ac_cv_header_sys_wait_h = yes; then
4469
4470 cat >>confdefs.h <<\_ACEOF
4471 #define HAVE_SYS_WAIT_H 1
4472 _ACEOF
4473
4474 fi
4475
4476 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4487                   inttypes.h stdint.h unistd.h
4488 do
4489 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4490 echo "$as_me:$LINENO: checking for $ac_header" >&5
4491 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4492 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4493   echo $ECHO_N "(cached) $ECHO_C" >&6
4494 else
4495   cat >conftest.$ac_ext <<_ACEOF
4496 #line $LINENO "configure"
4497 /* confdefs.h.  */
4498 _ACEOF
4499 cat confdefs.h >>conftest.$ac_ext
4500 cat >>conftest.$ac_ext <<_ACEOF
4501 /* end confdefs.h.  */
4502 $ac_includes_default
4503
4504 #include <$ac_header>
4505 _ACEOF
4506 rm -f conftest.$ac_objext
4507 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4508   (eval $ac_compile) 2>&5
4509   ac_status=$?
4510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4511   (exit $ac_status); } &&
4512          { ac_try='test -s conftest.$ac_objext'
4513   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4514   (eval $ac_try) 2>&5
4515   ac_status=$?
4516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4517   (exit $ac_status); }; }; then
4518   eval "$as_ac_Header=yes"
4519 else
4520   echo "$as_me: failed program was:" >&5
4521 sed 's/^/| /' conftest.$ac_ext >&5
4522
4523 eval "$as_ac_Header=no"
4524 fi
4525 rm -f conftest.$ac_objext conftest.$ac_ext
4526 fi
4527 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4528 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4529 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4530   cat >>confdefs.h <<_ACEOF
4531 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4532 _ACEOF
4533
4534 fi
4535
4536 done
4537
4538
4539
4540
4541
4542
4543
4544 for ac_header in fcntl.h stdlib.h string.h sys/file.h sys/ioctl.h
4545 do
4546 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4547 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4548   echo "$as_me:$LINENO: checking for $ac_header" >&5
4549 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4550 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4551   echo $ECHO_N "(cached) $ECHO_C" >&6
4552 fi
4553 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4554 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4555 else
4556   # Is the header compilable?
4557 echo "$as_me:$LINENO: checking $ac_header usability" >&5
4558 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4559 cat >conftest.$ac_ext <<_ACEOF
4560 #line $LINENO "configure"
4561 /* confdefs.h.  */
4562 _ACEOF
4563 cat confdefs.h >>conftest.$ac_ext
4564 cat >>conftest.$ac_ext <<_ACEOF
4565 /* end confdefs.h.  */
4566 $ac_includes_default
4567 #include <$ac_header>
4568 _ACEOF
4569 rm -f conftest.$ac_objext
4570 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4571   (eval $ac_compile) 2>&5
4572   ac_status=$?
4573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4574   (exit $ac_status); } &&
4575          { ac_try='test -s conftest.$ac_objext'
4576   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4577   (eval $ac_try) 2>&5
4578   ac_status=$?
4579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4580   (exit $ac_status); }; }; then
4581   ac_header_compiler=yes
4582 else
4583   echo "$as_me: failed program was:" >&5
4584 sed 's/^/| /' conftest.$ac_ext >&5
4585
4586 ac_header_compiler=no
4587 fi
4588 rm -f conftest.$ac_objext conftest.$ac_ext
4589 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4590 echo "${ECHO_T}$ac_header_compiler" >&6
4591
4592 # Is the header present?
4593 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4594 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4595 cat >conftest.$ac_ext <<_ACEOF
4596 #line $LINENO "configure"
4597 /* confdefs.h.  */
4598 _ACEOF
4599 cat confdefs.h >>conftest.$ac_ext
4600 cat >>conftest.$ac_ext <<_ACEOF
4601 /* end confdefs.h.  */
4602 #include <$ac_header>
4603 _ACEOF
4604 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4605   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4606   ac_status=$?
4607   grep -v '^ *+' conftest.er1 >conftest.err
4608   rm -f conftest.er1
4609   cat conftest.err >&5
4610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4611   (exit $ac_status); } >/dev/null; then
4612   if test -s conftest.err; then
4613     ac_cpp_err=$ac_c_preproc_warn_flag
4614   else
4615     ac_cpp_err=
4616   fi
4617 else
4618   ac_cpp_err=yes
4619 fi
4620 if test -z "$ac_cpp_err"; then
4621   ac_header_preproc=yes
4622 else
4623   echo "$as_me: failed program was:" >&5
4624 sed 's/^/| /' conftest.$ac_ext >&5
4625
4626   ac_header_preproc=no
4627 fi
4628 rm -f conftest.err conftest.$ac_ext
4629 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4630 echo "${ECHO_T}$ac_header_preproc" >&6
4631
4632 # So?  What about this header?
4633 case $ac_header_compiler:$ac_header_preproc in
4634   yes:no )
4635     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4636 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4637     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4638 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4639     (
4640       cat <<\_ASBOX
4641 ## ------------------------------------ ##
4642 ## Report this to bug-autoconf@gnu.org. ##
4643 ## ------------------------------------ ##
4644 _ASBOX
4645     ) |
4646       sed "s/^/$as_me: WARNING:     /" >&2
4647     ;;
4648   no:yes )
4649     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4650 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4651     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4652 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4653     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4654 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4655     (
4656       cat <<\_ASBOX
4657 ## ------------------------------------ ##
4658 ## Report this to bug-autoconf@gnu.org. ##
4659 ## ------------------------------------ ##
4660 _ASBOX
4661     ) |
4662       sed "s/^/$as_me: WARNING:     /" >&2
4663     ;;
4664 esac
4665 echo "$as_me:$LINENO: checking for $ac_header" >&5
4666 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4667 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4668   echo $ECHO_N "(cached) $ECHO_C" >&6
4669 else
4670   eval "$as_ac_Header=$ac_header_preproc"
4671 fi
4672 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4673 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4674
4675 fi
4676 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4677   cat >>confdefs.h <<_ACEOF
4678 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4679 _ACEOF
4680
4681 fi
4682
4683 done
4684
4685
4686
4687
4688 for ac_header in sys/param.h sys/time.h unistd.h
4689 do
4690 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4691 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4692   echo "$as_me:$LINENO: checking for $ac_header" >&5
4693 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4694 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4695   echo $ECHO_N "(cached) $ECHO_C" >&6
4696 fi
4697 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4698 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4699 else
4700   # Is the header compilable?
4701 echo "$as_me:$LINENO: checking $ac_header usability" >&5
4702 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4703 cat >conftest.$ac_ext <<_ACEOF
4704 #line $LINENO "configure"
4705 /* confdefs.h.  */
4706 _ACEOF
4707 cat confdefs.h >>conftest.$ac_ext
4708 cat >>conftest.$ac_ext <<_ACEOF
4709 /* end confdefs.h.  */
4710 $ac_includes_default
4711 #include <$ac_header>
4712 _ACEOF
4713 rm -f conftest.$ac_objext
4714 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4715   (eval $ac_compile) 2>&5
4716   ac_status=$?
4717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4718   (exit $ac_status); } &&
4719          { ac_try='test -s conftest.$ac_objext'
4720   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4721   (eval $ac_try) 2>&5
4722   ac_status=$?
4723   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4724   (exit $ac_status); }; }; then
4725   ac_header_compiler=yes
4726 else
4727   echo "$as_me: failed program was:" >&5
4728 sed 's/^/| /' conftest.$ac_ext >&5
4729
4730 ac_header_compiler=no
4731 fi
4732 rm -f conftest.$ac_objext conftest.$ac_ext
4733 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4734 echo "${ECHO_T}$ac_header_compiler" >&6
4735
4736 # Is the header present?
4737 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4738 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4739 cat >conftest.$ac_ext <<_ACEOF
4740 #line $LINENO "configure"
4741 /* confdefs.h.  */
4742 _ACEOF
4743 cat confdefs.h >>conftest.$ac_ext
4744 cat >>conftest.$ac_ext <<_ACEOF
4745 /* end confdefs.h.  */
4746 #include <$ac_header>
4747 _ACEOF
4748 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4749   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4750   ac_status=$?
4751   grep -v '^ *+' conftest.er1 >conftest.err
4752   rm -f conftest.er1
4753   cat conftest.err >&5
4754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4755   (exit $ac_status); } >/dev/null; then
4756   if test -s conftest.err; then
4757     ac_cpp_err=$ac_c_preproc_warn_flag
4758   else
4759     ac_cpp_err=
4760   fi
4761 else
4762   ac_cpp_err=yes
4763 fi
4764 if test -z "$ac_cpp_err"; then
4765   ac_header_preproc=yes
4766 else
4767   echo "$as_me: failed program was:" >&5
4768 sed 's/^/| /' conftest.$ac_ext >&5
4769
4770   ac_header_preproc=no
4771 fi
4772 rm -f conftest.err conftest.$ac_ext
4773 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4774 echo "${ECHO_T}$ac_header_preproc" >&6
4775
4776 # So?  What about this header?
4777 case $ac_header_compiler:$ac_header_preproc in
4778   yes:no )
4779     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4780 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4781     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4782 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4783     (
4784       cat <<\_ASBOX
4785 ## ------------------------------------ ##
4786 ## Report this to bug-autoconf@gnu.org. ##
4787 ## ------------------------------------ ##
4788 _ASBOX
4789     ) |
4790       sed "s/^/$as_me: WARNING:     /" >&2
4791     ;;
4792   no:yes )
4793     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4794 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4795     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4796 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4797     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4798 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4799     (
4800       cat <<\_ASBOX
4801 ## ------------------------------------ ##
4802 ## Report this to bug-autoconf@gnu.org. ##
4803 ## ------------------------------------ ##
4804 _ASBOX
4805     ) |
4806       sed "s/^/$as_me: WARNING:     /" >&2
4807     ;;
4808 esac
4809 echo "$as_me:$LINENO: checking for $ac_header" >&5
4810 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4811 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4812   echo $ECHO_N "(cached) $ECHO_C" >&6
4813 else
4814   eval "$as_ac_Header=$ac_header_preproc"
4815 fi
4816 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4817 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4818
4819 fi
4820 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4821   cat >>confdefs.h <<_ACEOF
4822 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4823 _ACEOF
4824
4825 fi
4826
4827 done
4828
4829
4830 for ac_header in errno.h
4831 do
4832 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4833 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4834   echo "$as_me:$LINENO: checking for $ac_header" >&5
4835 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4836 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4837   echo $ECHO_N "(cached) $ECHO_C" >&6
4838 fi
4839 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4840 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4841 else
4842   # Is the header compilable?
4843 echo "$as_me:$LINENO: checking $ac_header usability" >&5
4844 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4845 cat >conftest.$ac_ext <<_ACEOF
4846 #line $LINENO "configure"
4847 /* confdefs.h.  */
4848 _ACEOF
4849 cat confdefs.h >>conftest.$ac_ext
4850 cat >>conftest.$ac_ext <<_ACEOF
4851 /* end confdefs.h.  */
4852 $ac_includes_default
4853 #include <$ac_header>
4854 _ACEOF
4855 rm -f conftest.$ac_objext
4856 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4857   (eval $ac_compile) 2>&5
4858   ac_status=$?
4859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4860   (exit $ac_status); } &&
4861          { ac_try='test -s conftest.$ac_objext'
4862   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4863   (eval $ac_try) 2>&5
4864   ac_status=$?
4865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4866   (exit $ac_status); }; }; then
4867   ac_header_compiler=yes
4868 else
4869   echo "$as_me: failed program was:" >&5
4870 sed 's/^/| /' conftest.$ac_ext >&5
4871
4872 ac_header_compiler=no
4873 fi
4874 rm -f conftest.$ac_objext conftest.$ac_ext
4875 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4876 echo "${ECHO_T}$ac_header_compiler" >&6
4877
4878 # Is the header present?
4879 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4880 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4881 cat >conftest.$ac_ext <<_ACEOF
4882 #line $LINENO "configure"
4883 /* confdefs.h.  */
4884 _ACEOF
4885 cat confdefs.h >>conftest.$ac_ext
4886 cat >>conftest.$ac_ext <<_ACEOF
4887 /* end confdefs.h.  */
4888 #include <$ac_header>
4889 _ACEOF
4890 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4891   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4892   ac_status=$?
4893   grep -v '^ *+' conftest.er1 >conftest.err
4894   rm -f conftest.er1
4895   cat conftest.err >&5
4896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4897   (exit $ac_status); } >/dev/null; then
4898   if test -s conftest.err; then
4899     ac_cpp_err=$ac_c_preproc_warn_flag
4900   else
4901     ac_cpp_err=
4902   fi
4903 else
4904   ac_cpp_err=yes
4905 fi
4906 if test -z "$ac_cpp_err"; then
4907   ac_header_preproc=yes
4908 else
4909   echo "$as_me: failed program was:" >&5
4910 sed 's/^/| /' conftest.$ac_ext >&5
4911
4912   ac_header_preproc=no
4913 fi
4914 rm -f conftest.err conftest.$ac_ext
4915 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4916 echo "${ECHO_T}$ac_header_preproc" >&6
4917
4918 # So?  What about this header?
4919 case $ac_header_compiler:$ac_header_preproc in
4920   yes:no )
4921     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4922 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4923     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4924 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4925     (
4926       cat <<\_ASBOX
4927 ## ------------------------------------ ##
4928 ## Report this to bug-autoconf@gnu.org. ##
4929 ## ------------------------------------ ##
4930 _ASBOX
4931     ) |
4932       sed "s/^/$as_me: WARNING:     /" >&2
4933     ;;
4934   no:yes )
4935     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4936 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4937     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4938 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4939     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4940 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4941     (
4942       cat <<\_ASBOX
4943 ## ------------------------------------ ##
4944 ## Report this to bug-autoconf@gnu.org. ##
4945 ## ------------------------------------ ##
4946 _ASBOX
4947     ) |
4948       sed "s/^/$as_me: WARNING:     /" >&2
4949     ;;
4950 esac
4951 echo "$as_me:$LINENO: checking for $ac_header" >&5
4952 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4953 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4954   echo $ECHO_N "(cached) $ECHO_C" >&6
4955 else
4956   eval "$as_ac_Header=$ac_header_preproc"
4957 fi
4958 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4959 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4960
4961 fi
4962 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4963   cat >>confdefs.h <<_ACEOF
4964 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4965 _ACEOF
4966
4967 fi
4968
4969 done
4970
4971 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
4972 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
4973 if test "${ac_cv_header_time+set}" = set; then
4974   echo $ECHO_N "(cached) $ECHO_C" >&6
4975 else
4976   cat >conftest.$ac_ext <<_ACEOF
4977 #line $LINENO "configure"
4978 /* confdefs.h.  */
4979 _ACEOF
4980 cat confdefs.h >>conftest.$ac_ext
4981 cat >>conftest.$ac_ext <<_ACEOF
4982 /* end confdefs.h.  */
4983 #include <sys/types.h>
4984 #include <sys/time.h>
4985 #include <time.h>
4986
4987 int
4988 main ()
4989 {
4990 if ((struct tm *) 0)
4991 return 0;
4992   ;
4993   return 0;
4994 }
4995 _ACEOF
4996 rm -f conftest.$ac_objext
4997 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4998   (eval $ac_compile) 2>&5
4999   ac_status=$?
5000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5001   (exit $ac_status); } &&
5002          { ac_try='test -s conftest.$ac_objext'
5003   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5004   (eval $ac_try) 2>&5
5005   ac_status=$?
5006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5007   (exit $ac_status); }; }; then
5008   ac_cv_header_time=yes
5009 else
5010   echo "$as_me: failed program was:" >&5
5011 sed 's/^/| /' conftest.$ac_ext >&5
5012
5013 ac_cv_header_time=no
5014 fi
5015 rm -f conftest.$ac_objext conftest.$ac_ext
5016 fi
5017 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
5018 echo "${ECHO_T}$ac_cv_header_time" >&6
5019 if test $ac_cv_header_time = yes; then
5020
5021 cat >>confdefs.h <<\_ACEOF
5022 #define TIME_WITH_SYS_TIME 1
5023 _ACEOF
5024
5025 fi
5026
5027
5028
5029 #
5030 # Check for typedefs, structures, and compiler characteristics.
5031 #
5032
5033 echo
5034 echo "$as_me:$LINENO: checking for typedefs" >&5
5035 echo $ECHO_N "checking for typedefs... $ECHO_C" >&6
5036 echo
5037
5038 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
5039 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
5040 if test "${ac_cv_c_const+set}" = set; then
5041   echo $ECHO_N "(cached) $ECHO_C" >&6
5042 else
5043   cat >conftest.$ac_ext <<_ACEOF
5044 #line $LINENO "configure"
5045 /* confdefs.h.  */
5046 _ACEOF
5047 cat confdefs.h >>conftest.$ac_ext
5048 cat >>conftest.$ac_ext <<_ACEOF
5049 /* end confdefs.h.  */
5050
5051 int
5052 main ()
5053 {
5054 /* FIXME: Include the comments suggested by Paul. */
5055 #ifndef __cplusplus
5056   /* Ultrix mips cc rejects this.  */
5057   typedef int charset[2];
5058   const charset x;
5059   /* SunOS 4.1.1 cc rejects this.  */
5060   char const *const *ccp;
5061   char **p;
5062   /* NEC SVR4.0.2 mips cc rejects this.  */
5063   struct point {int x, y;};
5064   static struct point const zero = {0,0};
5065   /* AIX XL C 1.02.0.0 rejects this.
5066      It does not let you subtract one const X* pointer from another in
5067      an arm of an if-expression whose if-part is not a constant
5068      expression */
5069   const char *g = "string";
5070   ccp = &g + (g ? g-g : 0);
5071   /* HPUX 7.0 cc rejects these. */
5072   ++ccp;
5073   p = (char**) ccp;
5074   ccp = (char const *const *) p;
5075   { /* SCO 3.2v4 cc rejects this.  */
5076     char *t;
5077     char const *s = 0 ? (char *) 0 : (char const *) 0;
5078
5079     *t++ = 0;
5080   }
5081   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
5082     int x[] = {25, 17};
5083     const int *foo = &x[0];
5084     ++foo;
5085   }
5086   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5087     typedef const int *iptr;
5088     iptr p = 0;
5089     ++p;
5090   }
5091   { /* AIX XL C 1.02.0.0 rejects this saying
5092        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5093     struct s { int j; const int *ap[3]; };
5094     struct s *b; b->j = 5;
5095   }
5096   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5097     const int foo = 10;
5098   }
5099 #endif
5100
5101   ;
5102   return 0;
5103 }
5104 _ACEOF
5105 rm -f conftest.$ac_objext
5106 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5107   (eval $ac_compile) 2>&5
5108   ac_status=$?
5109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5110   (exit $ac_status); } &&
5111          { ac_try='test -s conftest.$ac_objext'
5112   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5113   (eval $ac_try) 2>&5
5114   ac_status=$?
5115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5116   (exit $ac_status); }; }; then
5117   ac_cv_c_const=yes
5118 else
5119   echo "$as_me: failed program was:" >&5
5120 sed 's/^/| /' conftest.$ac_ext >&5
5121
5122 ac_cv_c_const=no
5123 fi
5124 rm -f conftest.$ac_objext conftest.$ac_ext
5125 fi
5126 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
5127 echo "${ECHO_T}$ac_cv_c_const" >&6
5128 if test $ac_cv_c_const = no; then
5129
5130 cat >>confdefs.h <<\_ACEOF
5131 #define const
5132 _ACEOF
5133
5134 fi
5135
5136 echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
5137 echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6
5138 if test "${ac_cv_header_stdbool_h+set}" = set; then
5139   echo $ECHO_N "(cached) $ECHO_C" >&6
5140 else
5141   cat >conftest.$ac_ext <<_ACEOF
5142 #line $LINENO "configure"
5143 /* confdefs.h.  */
5144 _ACEOF
5145 cat confdefs.h >>conftest.$ac_ext
5146 cat >>conftest.$ac_ext <<_ACEOF
5147 /* end confdefs.h.  */
5148
5149 #include <stdbool.h>
5150 #ifndef bool
5151 # error bool is not defined
5152 #endif
5153 #ifndef false
5154 # error false is not defined
5155 #endif
5156 #if false
5157 # error false is not 0
5158 #endif
5159 #ifndef true
5160 # error true is not defined
5161 #endif
5162 #if true != 1
5163 # error true is not 1
5164 #endif
5165 #ifndef __bool_true_false_are_defined
5166 # error __bool_true_false_are_defined is not defined
5167 #endif
5168
5169         struct s { _Bool s: 1; _Bool t; } s;
5170
5171         char a[true == 1 ? 1 : -1];
5172         char b[false == 0 ? 1 : -1];
5173         char c[__bool_true_false_are_defined == 1 ? 1 : -1];
5174         char d[(bool) -0.5 == true ? 1 : -1];
5175         bool e = &s;
5176         char f[(_Bool) -0.0 == false ? 1 : -1];
5177         char g[true];
5178         char h[sizeof (_Bool)];
5179         char i[sizeof s.t];
5180
5181 int
5182 main ()
5183 {
5184  return !a + !b + !c + !d + !e + !f + !g + !h + !i;
5185   ;
5186   return 0;
5187 }
5188 _ACEOF
5189 rm -f conftest.$ac_objext
5190 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5191   (eval $ac_compile) 2>&5
5192   ac_status=$?
5193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5194   (exit $ac_status); } &&
5195          { ac_try='test -s conftest.$ac_objext'
5196   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5197   (eval $ac_try) 2>&5
5198   ac_status=$?
5199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5200   (exit $ac_status); }; }; then
5201   ac_cv_header_stdbool_h=yes
5202 else
5203   echo "$as_me: failed program was:" >&5
5204 sed 's/^/| /' conftest.$ac_ext >&5
5205
5206 ac_cv_header_stdbool_h=no
5207 fi
5208 rm -f conftest.$ac_objext conftest.$ac_ext
5209 fi
5210 echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
5211 echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
5212 echo "$as_me:$LINENO: checking for _Bool" >&5
5213 echo $ECHO_N "checking for _Bool... $ECHO_C" >&6
5214 if test "${ac_cv_type__Bool+set}" = set; then
5215   echo $ECHO_N "(cached) $ECHO_C" >&6
5216 else
5217   cat >conftest.$ac_ext <<_ACEOF
5218 #line $LINENO "configure"
5219 /* confdefs.h.  */
5220 _ACEOF
5221 cat confdefs.h >>conftest.$ac_ext
5222 cat >>conftest.$ac_ext <<_ACEOF
5223 /* end confdefs.h.  */
5224 $ac_includes_default
5225 int
5226 main ()
5227 {
5228 if ((_Bool *) 0)
5229   return 0;
5230 if (sizeof (_Bool))
5231   return 0;
5232   ;
5233   return 0;
5234 }
5235 _ACEOF
5236 rm -f conftest.$ac_objext
5237 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5238   (eval $ac_compile) 2>&5
5239   ac_status=$?
5240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5241   (exit $ac_status); } &&
5242          { ac_try='test -s conftest.$ac_objext'
5243   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5244   (eval $ac_try) 2>&5
5245   ac_status=$?
5246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5247   (exit $ac_status); }; }; then
5248   ac_cv_type__Bool=yes
5249 else
5250   echo "$as_me: failed program was:" >&5
5251 sed 's/^/| /' conftest.$ac_ext >&5
5252
5253 ac_cv_type__Bool=no
5254 fi
5255 rm -f conftest.$ac_objext conftest.$ac_ext
5256 fi
5257 echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
5258 echo "${ECHO_T}$ac_cv_type__Bool" >&6
5259 if test $ac_cv_type__Bool = yes; then
5260
5261 cat >>confdefs.h <<_ACEOF
5262 #define HAVE__BOOL 1
5263 _ACEOF
5264
5265
5266 fi
5267
5268 if test $ac_cv_header_stdbool_h = yes; then
5269
5270 cat >>confdefs.h <<\_ACEOF
5271 #define HAVE_STDBOOL_H 1
5272 _ACEOF
5273
5274 fi
5275
5276 echo "$as_me:$LINENO: checking for inline" >&5
5277 echo $ECHO_N "checking for inline... $ECHO_C" >&6
5278 if test "${ac_cv_c_inline+set}" = set; then
5279   echo $ECHO_N "(cached) $ECHO_C" >&6
5280 else
5281   ac_cv_c_inline=no
5282 for ac_kw in inline __inline__ __inline; do
5283   cat >conftest.$ac_ext <<_ACEOF
5284 #line $LINENO "configure"
5285 /* confdefs.h.  */
5286 _ACEOF
5287 cat confdefs.h >>conftest.$ac_ext
5288 cat >>conftest.$ac_ext <<_ACEOF
5289 /* end confdefs.h.  */
5290 #ifndef __cplusplus
5291 typedef int foo_t;
5292 static $ac_kw foo_t static_foo () {return 0; }
5293 $ac_kw foo_t foo () {return 0; }
5294 #endif
5295
5296 _ACEOF
5297 rm -f conftest.$ac_objext
5298 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5299   (eval $ac_compile) 2>&5
5300   ac_status=$?
5301   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5302   (exit $ac_status); } &&
5303          { ac_try='test -s conftest.$ac_objext'
5304   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5305   (eval $ac_try) 2>&5
5306   ac_status=$?
5307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5308   (exit $ac_status); }; }; then
5309   ac_cv_c_inline=$ac_kw; break
5310 else
5311   echo "$as_me: failed program was:" >&5
5312 sed 's/^/| /' conftest.$ac_ext >&5
5313
5314 fi
5315 rm -f conftest.$ac_objext conftest.$ac_ext
5316 done
5317
5318 fi
5319 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
5320 echo "${ECHO_T}$ac_cv_c_inline" >&6
5321 case $ac_cv_c_inline in
5322   inline | yes) ;;
5323   no)
5324 cat >>confdefs.h <<\_ACEOF
5325 #define inline
5326 _ACEOF
5327  ;;
5328   *)  cat >>confdefs.h <<_ACEOF
5329 #define inline $ac_cv_c_inline
5330 _ACEOF
5331  ;;
5332 esac
5333
5334 echo "$as_me:$LINENO: checking for pid_t" >&5
5335 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5336 if test "${ac_cv_type_pid_t+set}" = set; then
5337   echo $ECHO_N "(cached) $ECHO_C" >&6
5338 else
5339   cat >conftest.$ac_ext <<_ACEOF
5340 #line $LINENO "configure"
5341 /* confdefs.h.  */
5342 _ACEOF
5343 cat confdefs.h >>conftest.$ac_ext
5344 cat >>conftest.$ac_ext <<_ACEOF
5345 /* end confdefs.h.  */
5346 $ac_includes_default
5347 int
5348 main ()
5349 {
5350 if ((pid_t *) 0)
5351   return 0;
5352 if (sizeof (pid_t))
5353   return 0;
5354   ;
5355   return 0;
5356 }
5357 _ACEOF
5358 rm -f conftest.$ac_objext
5359 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5360   (eval $ac_compile) 2>&5
5361   ac_status=$?
5362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5363   (exit $ac_status); } &&
5364          { ac_try='test -s conftest.$ac_objext'
5365   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5366   (eval $ac_try) 2>&5
5367   ac_status=$?
5368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5369   (exit $ac_status); }; }; then
5370   ac_cv_type_pid_t=yes
5371 else
5372   echo "$as_me: failed program was:" >&5
5373 sed 's/^/| /' conftest.$ac_ext >&5
5374
5375 ac_cv_type_pid_t=no
5376 fi
5377 rm -f conftest.$ac_objext conftest.$ac_ext
5378 fi
5379 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5380 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5381 if test $ac_cv_type_pid_t = yes; then
5382   :
5383 else
5384
5385 cat >>confdefs.h <<_ACEOF
5386 #define pid_t int
5387 _ACEOF
5388
5389 fi
5390
5391 echo "$as_me:$LINENO: checking for size_t" >&5
5392 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5393 if test "${ac_cv_type_size_t+set}" = set; then
5394   echo $ECHO_N "(cached) $ECHO_C" >&6
5395 else
5396   cat >conftest.$ac_ext <<_ACEOF
5397 #line $LINENO "configure"
5398 /* confdefs.h.  */
5399 _ACEOF
5400 cat confdefs.h >>conftest.$ac_ext
5401 cat >>conftest.$ac_ext <<_ACEOF
5402 /* end confdefs.h.  */
5403 $ac_includes_default
5404 int
5405 main ()
5406 {
5407 if ((size_t *) 0)
5408   return 0;
5409 if (sizeof (size_t))
5410   return 0;
5411   ;
5412   return 0;
5413 }
5414 _ACEOF
5415 rm -f conftest.$ac_objext
5416 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5417   (eval $ac_compile) 2>&5
5418   ac_status=$?
5419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5420   (exit $ac_status); } &&
5421          { ac_try='test -s conftest.$ac_objext'
5422   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5423   (eval $ac_try) 2>&5
5424   ac_status=$?
5425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5426   (exit $ac_status); }; }; then
5427   ac_cv_type_size_t=yes
5428 else
5429   echo "$as_me: failed program was:" >&5
5430 sed 's/^/| /' conftest.$ac_ext >&5
5431
5432 ac_cv_type_size_t=no
5433 fi
5434 rm -f conftest.$ac_objext conftest.$ac_ext
5435 fi
5436 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5437 echo "${ECHO_T}$ac_cv_type_size_t" >&6
5438 if test $ac_cv_type_size_t = yes; then
5439   :
5440 else
5441
5442 cat >>confdefs.h <<_ACEOF
5443 #define size_t unsigned
5444 _ACEOF
5445
5446 fi
5447
5448 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
5449 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
5450 if test "${ac_cv_header_time+set}" = set; then
5451   echo $ECHO_N "(cached) $ECHO_C" >&6
5452 else
5453   cat >conftest.$ac_ext <<_ACEOF
5454 #line $LINENO "configure"
5455 /* confdefs.h.  */
5456 _ACEOF
5457 cat confdefs.h >>conftest.$ac_ext
5458 cat >>conftest.$ac_ext <<_ACEOF
5459 /* end confdefs.h.  */
5460 #include <sys/types.h>
5461 #include <sys/time.h>
5462 #include <time.h>
5463
5464 int
5465 main ()
5466 {
5467 if ((struct tm *) 0)
5468 return 0;
5469   ;
5470   return 0;
5471 }
5472 _ACEOF
5473 rm -f conftest.$ac_objext
5474 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5475   (eval $ac_compile) 2>&5
5476   ac_status=$?
5477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5478   (exit $ac_status); } &&
5479          { ac_try='test -s conftest.$ac_objext'
5480   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5481   (eval $ac_try) 2>&5
5482   ac_status=$?
5483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5484   (exit $ac_status); }; }; then
5485   ac_cv_header_time=yes
5486 else
5487   echo "$as_me: failed program was:" >&5
5488 sed 's/^/| /' conftest.$ac_ext >&5
5489
5490 ac_cv_header_time=no
5491 fi
5492 rm -f conftest.$ac_objext conftest.$ac_ext
5493 fi
5494 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
5495 echo "${ECHO_T}$ac_cv_header_time" >&6
5496 if test $ac_cv_header_time = yes; then
5497
5498 cat >>confdefs.h <<\_ACEOF
5499 #define TIME_WITH_SYS_TIME 1
5500 _ACEOF
5501
5502 fi
5503
5504 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
5505 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
5506 if test "${ac_cv_struct_tm+set}" = set; then
5507   echo $ECHO_N "(cached) $ECHO_C" >&6
5508 else
5509   cat >conftest.$ac_ext <<_ACEOF
5510 #line $LINENO "configure"
5511 /* confdefs.h.  */
5512 _ACEOF
5513 cat confdefs.h >>conftest.$ac_ext
5514 cat >>conftest.$ac_ext <<_ACEOF
5515 /* end confdefs.h.  */
5516 #include <sys/types.h>
5517 #include <time.h>
5518
5519 int
5520 main ()
5521 {
5522 struct tm *tp; tp->tm_sec;
5523   ;
5524   return 0;
5525 }
5526 _ACEOF
5527 rm -f conftest.$ac_objext
5528 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5529   (eval $ac_compile) 2>&5
5530   ac_status=$?
5531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5532   (exit $ac_status); } &&
5533          { ac_try='test -s conftest.$ac_objext'
5534   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5535   (eval $ac_try) 2>&5
5536   ac_status=$?
5537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5538   (exit $ac_status); }; }; then
5539   ac_cv_struct_tm=time.h
5540 else
5541   echo "$as_me: failed program was:" >&5
5542 sed 's/^/| /' conftest.$ac_ext >&5
5543
5544 ac_cv_struct_tm=sys/time.h
5545 fi
5546 rm -f conftest.$ac_objext conftest.$ac_ext
5547 fi
5548 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
5549 echo "${ECHO_T}$ac_cv_struct_tm" >&6
5550 if test $ac_cv_struct_tm = sys/time.h; then
5551
5552 cat >>confdefs.h <<\_ACEOF
5553 #define TM_IN_SYS_TIME 1
5554 _ACEOF
5555
5556 fi
5557
5558
5559 echo
5560 echo "$as_me:$LINENO: checking for compiler characteristics" >&5
5561 echo $ECHO_N "checking for compiler characteristics... $ECHO_C" >&6
5562 echo
5563
5564 echo "$as_me:$LINENO: checking for long" >&5
5565 echo $ECHO_N "checking for long... $ECHO_C" >&6
5566 if test "${ac_cv_type_long+set}" = set; then
5567   echo $ECHO_N "(cached) $ECHO_C" >&6
5568 else
5569   cat >conftest.$ac_ext <<_ACEOF
5570 #line $LINENO "configure"
5571 /* confdefs.h.  */
5572 _ACEOF
5573 cat confdefs.h >>conftest.$ac_ext
5574 cat >>conftest.$ac_ext <<_ACEOF
5575 /* end confdefs.h.  */
5576 $ac_includes_default
5577 int
5578 main ()
5579 {
5580 if ((long *) 0)
5581   return 0;
5582 if (sizeof (long))
5583   return 0;
5584   ;
5585   return 0;
5586 }
5587 _ACEOF
5588 rm -f conftest.$ac_objext
5589 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5590   (eval $ac_compile) 2>&5
5591   ac_status=$?
5592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5593   (exit $ac_status); } &&
5594          { ac_try='test -s conftest.$ac_objext'
5595   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5596   (eval $ac_try) 2>&5
5597   ac_status=$?
5598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5599   (exit $ac_status); }; }; then
5600   ac_cv_type_long=yes
5601 else
5602   echo "$as_me: failed program was:" >&5
5603 sed 's/^/| /' conftest.$ac_ext >&5
5604
5605 ac_cv_type_long=no
5606 fi
5607 rm -f conftest.$ac_objext conftest.$ac_ext
5608 fi
5609 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5610 echo "${ECHO_T}$ac_cv_type_long" >&6
5611
5612 echo "$as_me:$LINENO: checking size of long" >&5
5613 echo $ECHO_N "checking size of long... $ECHO_C" >&6
5614 if test "${ac_cv_sizeof_long+set}" = set; then
5615   echo $ECHO_N "(cached) $ECHO_C" >&6
5616 else
5617   if test "$ac_cv_type_long" = yes; then
5618   # The cast to unsigned long works around a bug in the HP C Compiler
5619   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5620   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5621   # This bug is HP SR number 8606223364.
5622   if test "$cross_compiling" = yes; then
5623   # Depending upon the size, compute the lo and hi bounds.
5624 cat >conftest.$ac_ext <<_ACEOF
5625 #line $LINENO "configure"
5626 /* confdefs.h.  */
5627 _ACEOF
5628 cat confdefs.h >>conftest.$ac_ext
5629 cat >>conftest.$ac_ext <<_ACEOF
5630 /* end confdefs.h.  */
5631 $ac_includes_default
5632 int
5633 main ()
5634 {
5635 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5636 test_array [0] = 0
5637
5638   ;
5639   return 0;
5640 }
5641 _ACEOF
5642 rm -f conftest.$ac_objext
5643 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5644   (eval $ac_compile) 2>&5
5645   ac_status=$?
5646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5647   (exit $ac_status); } &&
5648          { ac_try='test -s conftest.$ac_objext'
5649   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5650   (eval $ac_try) 2>&5
5651   ac_status=$?
5652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5653   (exit $ac_status); }; }; then
5654   ac_lo=0 ac_mid=0
5655   while :; do
5656     cat >conftest.$ac_ext <<_ACEOF
5657 #line $LINENO "configure"
5658 /* confdefs.h.  */
5659 _ACEOF
5660 cat confdefs.h >>conftest.$ac_ext
5661 cat >>conftest.$ac_ext <<_ACEOF
5662 /* end confdefs.h.  */
5663 $ac_includes_default
5664 int
5665 main ()
5666 {
5667 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5668 test_array [0] = 0
5669
5670   ;
5671   return 0;
5672 }
5673 _ACEOF
5674 rm -f conftest.$ac_objext
5675 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5676   (eval $ac_compile) 2>&5
5677   ac_status=$?
5678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5679   (exit $ac_status); } &&
5680          { ac_try='test -s conftest.$ac_objext'
5681   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5682   (eval $ac_try) 2>&5
5683   ac_status=$?
5684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5685   (exit $ac_status); }; }; then
5686   ac_hi=$ac_mid; break
5687 else
5688   echo "$as_me: failed program was:" >&5
5689 sed 's/^/| /' conftest.$ac_ext >&5
5690
5691 ac_lo=`expr $ac_mid + 1`
5692                     if test $ac_lo -le $ac_mid; then
5693                       ac_lo= ac_hi=
5694                       break
5695                     fi
5696                     ac_mid=`expr 2 '*' $ac_mid + 1`
5697 fi
5698 rm -f conftest.$ac_objext conftest.$ac_ext
5699   done
5700 else
5701   echo "$as_me: failed program was:" >&5
5702 sed 's/^/| /' conftest.$ac_ext >&5
5703
5704 cat >conftest.$ac_ext <<_ACEOF
5705 #line $LINENO "configure"
5706 /* confdefs.h.  */
5707 _ACEOF
5708 cat confdefs.h >>conftest.$ac_ext
5709 cat >>conftest.$ac_ext <<_ACEOF
5710 /* end confdefs.h.  */
5711 $ac_includes_default
5712 int
5713 main ()
5714 {
5715 static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5716 test_array [0] = 0
5717
5718   ;
5719   return 0;
5720 }
5721 _ACEOF
5722 rm -f conftest.$ac_objext
5723 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5724   (eval $ac_compile) 2>&5
5725   ac_status=$?
5726   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5727   (exit $ac_status); } &&
5728          { ac_try='test -s conftest.$ac_objext'
5729   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5730   (eval $ac_try) 2>&5
5731   ac_status=$?
5732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5733   (exit $ac_status); }; }; then
5734   ac_hi=-1 ac_mid=-1
5735   while :; do
5736     cat >conftest.$ac_ext <<_ACEOF
5737 #line $LINENO "configure"
5738 /* confdefs.h.  */
5739 _ACEOF
5740 cat confdefs.h >>conftest.$ac_ext
5741 cat >>conftest.$ac_ext <<_ACEOF
5742 /* end confdefs.h.  */
5743 $ac_includes_default
5744 int
5745 main ()
5746 {
5747 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5748 test_array [0] = 0
5749
5750   ;
5751   return 0;
5752 }
5753 _ACEOF
5754 rm -f conftest.$ac_objext
5755 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5756   (eval $ac_compile) 2>&5
5757   ac_status=$?
5758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5759   (exit $ac_status); } &&
5760          { ac_try='test -s conftest.$ac_objext'
5761   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5762   (eval $ac_try) 2>&5
5763   ac_status=$?
5764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5765   (exit $ac_status); }; }; then
5766   ac_lo=$ac_mid; break
5767 else
5768   echo "$as_me: failed program was:" >&5
5769 sed 's/^/| /' conftest.$ac_ext >&5
5770
5771 ac_hi=`expr '(' $ac_mid ')' - 1`
5772                        if test $ac_mid -le $ac_hi; then
5773                          ac_lo= ac_hi=
5774                          break
5775                        fi
5776                        ac_mid=`expr 2 '*' $ac_mid`
5777 fi
5778 rm -f conftest.$ac_objext conftest.$ac_ext
5779   done
5780 else
5781   echo "$as_me: failed program was:" >&5
5782 sed 's/^/| /' conftest.$ac_ext >&5
5783
5784 ac_lo= ac_hi=
5785 fi
5786 rm -f conftest.$ac_objext conftest.$ac_ext
5787 fi
5788 rm -f conftest.$ac_objext conftest.$ac_ext
5789 # Binary search between lo and hi bounds.
5790 while test "x$ac_lo" != "x$ac_hi"; do
5791   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5792   cat >conftest.$ac_ext <<_ACEOF
5793 #line $LINENO "configure"
5794 /* confdefs.h.  */
5795 _ACEOF
5796 cat confdefs.h >>conftest.$ac_ext
5797 cat >>conftest.$ac_ext <<_ACEOF
5798 /* end confdefs.h.  */
5799 $ac_includes_default
5800 int
5801 main ()
5802 {
5803 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5804 test_array [0] = 0
5805
5806   ;
5807   return 0;
5808 }
5809 _ACEOF
5810 rm -f conftest.$ac_objext
5811 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5812   (eval $ac_compile) 2>&5
5813   ac_status=$?
5814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5815   (exit $ac_status); } &&
5816          { ac_try='test -s conftest.$ac_objext'
5817   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5818   (eval $ac_try) 2>&5
5819   ac_status=$?
5820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5821   (exit $ac_status); }; }; then
5822   ac_hi=$ac_mid
5823 else
5824   echo "$as_me: failed program was:" >&5
5825 sed 's/^/| /' conftest.$ac_ext >&5
5826
5827 ac_lo=`expr '(' $ac_mid ')' + 1`
5828 fi
5829 rm -f conftest.$ac_objext conftest.$ac_ext
5830 done
5831 case $ac_lo in
5832 ?*) ac_cv_sizeof_long=$ac_lo;;
5833 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
5834 See \`config.log' for more details." >&5
5835 echo "$as_me: error: cannot compute sizeof (long), 77
5836 See \`config.log' for more details." >&2;}
5837    { (exit 1); exit 1; }; } ;;
5838 esac
5839 else
5840   if test "$cross_compiling" = yes; then
5841   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5842 See \`config.log' for more details." >&5
5843 echo "$as_me: error: cannot run test program while cross compiling
5844 See \`config.log' for more details." >&2;}
5845    { (exit 1); exit 1; }; }
5846 else
5847   cat >conftest.$ac_ext <<_ACEOF
5848 #line $LINENO "configure"
5849 /* confdefs.h.  */
5850 _ACEOF
5851 cat confdefs.h >>conftest.$ac_ext
5852 cat >>conftest.$ac_ext <<_ACEOF
5853 /* end confdefs.h.  */
5854 $ac_includes_default
5855 long longval () { return (long) (sizeof (long)); }
5856 unsigned long ulongval () { return (long) (sizeof (long)); }
5857 #include <stdio.h>
5858 #include <stdlib.h>
5859 int
5860 main ()
5861 {
5862
5863   FILE *f = fopen ("conftest.val", "w");
5864   if (! f)
5865     exit (1);
5866   if (((long) (sizeof (long))) < 0)
5867     {
5868       long i = longval ();
5869       if (i != ((long) (sizeof (long))))
5870         exit (1);
5871       fprintf (f, "%ld\n", i);
5872     }
5873   else
5874     {
5875       unsigned long i = ulongval ();
5876       if (i != ((long) (sizeof (long))))
5877         exit (1);
5878       fprintf (f, "%lu\n", i);
5879     }
5880   exit (ferror (f) || fclose (f) != 0);
5881
5882   ;
5883   return 0;
5884 }
5885 _ACEOF
5886 rm -f conftest$ac_exeext
5887 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5888   (eval $ac_link) 2>&5
5889   ac_status=$?
5890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5891   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5892   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5893   (eval $ac_try) 2>&5
5894   ac_status=$?
5895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5896   (exit $ac_status); }; }; then
5897   ac_cv_sizeof_long=`cat conftest.val`
5898 else
5899   echo "$as_me: program exited with status $ac_status" >&5
5900 echo "$as_me: failed program was:" >&5
5901 sed 's/^/| /' conftest.$ac_ext >&5
5902
5903 ( exit $ac_status )
5904 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
5905 See \`config.log' for more details." >&5
5906 echo "$as_me: error: cannot compute sizeof (long), 77
5907 See \`config.log' for more details." >&2;}
5908    { (exit 1); exit 1; }; }
5909 fi
5910 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5911 fi
5912 fi
5913 rm -f conftest.val
5914 else
5915   ac_cv_sizeof_long=0
5916 fi
5917 fi
5918 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5919 echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5920 cat >>confdefs.h <<_ACEOF
5921 #define SIZEOF_LONG $ac_cv_sizeof_long
5922 _ACEOF
5923
5924
5925
5926
5927 #
5928 # Check for library functions.
5929 #
5930
5931 echo
5932 echo "$as_me:$LINENO: checking for library functions" >&5
5933 echo $ECHO_N "checking for library functions... $ECHO_C" >&6
5934 echo
5935
5936
5937
5938 for ac_header in unistd.h vfork.h
5939 do
5940 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5941 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5942   echo "$as_me:$LINENO: checking for $ac_header" >&5
5943 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5944 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5945   echo $ECHO_N "(cached) $ECHO_C" >&6
5946 fi
5947 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5948 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5949 else
5950   # Is the header compilable?
5951 echo "$as_me:$LINENO: checking $ac_header usability" >&5
5952 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5953 cat >conftest.$ac_ext <<_ACEOF
5954 #line $LINENO "configure"
5955 /* confdefs.h.  */
5956 _ACEOF
5957 cat confdefs.h >>conftest.$ac_ext
5958 cat >>conftest.$ac_ext <<_ACEOF
5959 /* end confdefs.h.  */
5960 $ac_includes_default
5961 #include <$ac_header>
5962 _ACEOF
5963 rm -f conftest.$ac_objext
5964 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5965   (eval $ac_compile) 2>&5
5966   ac_status=$?
5967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5968   (exit $ac_status); } &&
5969          { ac_try='test -s conftest.$ac_objext'
5970   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5971   (eval $ac_try) 2>&5
5972   ac_status=$?
5973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5974   (exit $ac_status); }; }; then
5975   ac_header_compiler=yes
5976 else
5977   echo "$as_me: failed program was:" >&5
5978 sed 's/^/| /' conftest.$ac_ext >&5
5979
5980 ac_header_compiler=no
5981 fi
5982 rm -f conftest.$ac_objext conftest.$ac_ext
5983 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5984 echo "${ECHO_T}$ac_header_compiler" >&6
5985
5986 # Is the header present?
5987 echo "$as_me:$LINENO: checking $ac_header presence" >&5
5988 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5989 cat >conftest.$ac_ext <<_ACEOF
5990 #line $LINENO "configure"
5991 /* confdefs.h.  */
5992 _ACEOF
5993 cat confdefs.h >>conftest.$ac_ext
5994 cat >>conftest.$ac_ext <<_ACEOF
5995 /* end confdefs.h.  */
5996 #include <$ac_header>
5997 _ACEOF
5998 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5999   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6000   ac_status=$?
6001   grep -v '^ *+' conftest.er1 >conftest.err
6002   rm -f conftest.er1
6003   cat conftest.err >&5
6004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6005   (exit $ac_status); } >/dev/null; then
6006   if test -s conftest.err; then
6007     ac_cpp_err=$ac_c_preproc_warn_flag
6008   else
6009     ac_cpp_err=
6010   fi
6011 else
6012   ac_cpp_err=yes
6013 fi
6014 if test -z "$ac_cpp_err"; then
6015   ac_header_preproc=yes
6016 else
6017   echo "$as_me: failed program was:" >&5
6018 sed 's/^/| /' conftest.$ac_ext >&5
6019
6020   ac_header_preproc=no
6021 fi
6022 rm -f conftest.err conftest.$ac_ext
6023 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6024 echo "${ECHO_T}$ac_header_preproc" >&6
6025
6026 # So?  What about this header?
6027 case $ac_header_compiler:$ac_header_preproc in
6028   yes:no )
6029     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6030 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6031     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6032 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6033     (
6034       cat <<\_ASBOX
6035 ## ------------------------------------ ##
6036 ## Report this to bug-autoconf@gnu.org. ##
6037 ## ------------------------------------ ##
6038 _ASBOX
6039     ) |
6040       sed "s/^/$as_me: WARNING:     /" >&2
6041     ;;
6042   no:yes )
6043     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6044 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6045     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6046 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6047     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6048 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6049     (
6050       cat <<\_ASBOX
6051 ## ------------------------------------ ##
6052 ## Report this to bug-autoconf@gnu.org. ##
6053 ## ------------------------------------ ##
6054 _ASBOX
6055     ) |
6056       sed "s/^/$as_me: WARNING:     /" >&2
6057     ;;
6058 esac
6059 echo "$as_me:$LINENO: checking for $ac_header" >&5
6060 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6061 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6062   echo $ECHO_N "(cached) $ECHO_C" >&6
6063 else
6064   eval "$as_ac_Header=$ac_header_preproc"
6065 fi
6066 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6067 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6068
6069 fi
6070 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6071   cat >>confdefs.h <<_ACEOF
6072 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6073 _ACEOF
6074
6075 fi
6076
6077 done
6078
6079
6080
6081 for ac_func in fork vfork
6082 do
6083 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6084 echo "$as_me:$LINENO: checking for $ac_func" >&5
6085 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6086 if eval "test \"\${$as_ac_var+set}\" = set"; then
6087   echo $ECHO_N "(cached) $ECHO_C" >&6
6088 else
6089   cat >conftest.$ac_ext <<_ACEOF
6090 #line $LINENO "configure"
6091 /* confdefs.h.  */
6092 _ACEOF
6093 cat confdefs.h >>conftest.$ac_ext
6094 cat >>conftest.$ac_ext <<_ACEOF
6095 /* end confdefs.h.  */
6096 /* System header to define __stub macros and hopefully few prototypes,
6097     which can conflict with char $ac_func (); below.
6098     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6099     <limits.h> exists even on freestanding compilers.  */
6100 #ifdef __STDC__
6101 # include <limits.h>
6102 #else
6103 # include <assert.h>
6104 #endif
6105 /* Override any gcc2 internal prototype to avoid an error.  */
6106 #ifdef __cplusplus
6107 extern "C"
6108 {
6109 #endif
6110 /* We use char because int might match the return type of a gcc2
6111    builtin and then its argument prototype would still apply.  */
6112 char $ac_func ();
6113 /* The GNU C library defines this for functions which it implements
6114     to always fail with ENOSYS.  Some functions are actually named
6115     something starting with __ and the normal name is an alias.  */
6116 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6117 choke me
6118 #else
6119 char (*f) () = $ac_func;
6120 #endif
6121 #ifdef __cplusplus
6122 }
6123 #endif
6124
6125 int
6126 main ()
6127 {
6128 return f != $ac_func;
6129   ;
6130   return 0;
6131 }
6132 _ACEOF
6133 rm -f conftest.$ac_objext conftest$ac_exeext
6134 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6135   (eval $ac_link) 2>&5
6136   ac_status=$?
6137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6138   (exit $ac_status); } &&
6139          { ac_try='test -s conftest$ac_exeext'
6140   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6141   (eval $ac_try) 2>&5
6142   ac_status=$?
6143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6144   (exit $ac_status); }; }; then
6145   eval "$as_ac_var=yes"
6146 else
6147   echo "$as_me: failed program was:" >&5
6148 sed 's/^/| /' conftest.$ac_ext >&5
6149
6150 eval "$as_ac_var=no"
6151 fi
6152 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6153 fi
6154 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6155 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6156 if test `eval echo '${'$as_ac_var'}'` = yes; then
6157   cat >>confdefs.h <<_ACEOF
6158 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6159 _ACEOF
6160
6161 fi
6162 done
6163
6164 if test "x$ac_cv_func_fork" = xyes; then
6165   echo "$as_me:$LINENO: checking for working fork" >&5
6166 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
6167 if test "${ac_cv_func_fork_works+set}" = set; then
6168   echo $ECHO_N "(cached) $ECHO_C" >&6
6169 else
6170   if test "$cross_compiling" = yes; then
6171   ac_cv_func_fork_works=cross
6172 else
6173   cat >conftest.$ac_ext <<_ACEOF
6174 /* By Ruediger Kuhlmann. */
6175       #include <sys/types.h>
6176       #if HAVE_UNISTD_H
6177       # include <unistd.h>
6178       #endif
6179       /* Some systems only have a dummy stub for fork() */
6180       int main ()
6181       {
6182         if (fork() < 0)
6183           exit (1);
6184         exit (0);
6185       }
6186 _ACEOF
6187 rm -f conftest$ac_exeext
6188 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6189   (eval $ac_link) 2>&5
6190   ac_status=$?
6191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6192   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6193   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6194   (eval $ac_try) 2>&5
6195   ac_status=$?
6196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6197   (exit $ac_status); }; }; then
6198   ac_cv_func_fork_works=yes
6199 else
6200   echo "$as_me: program exited with status $ac_status" >&5
6201 echo "$as_me: failed program was:" >&5
6202 sed 's/^/| /' conftest.$ac_ext >&5
6203
6204 ( exit $ac_status )
6205 ac_cv_func_fork_works=no
6206 fi
6207 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6208 fi
6209 fi
6210 echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
6211 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
6212
6213 else
6214   ac_cv_func_fork_works=$ac_cv_func_fork
6215 fi
6216 if test "x$ac_cv_func_fork_works" = xcross; then
6217   case $host in
6218     *-*-amigaos* | *-*-msdosdjgpp*)
6219       # Override, as these systems have only a dummy fork() stub
6220       ac_cv_func_fork_works=no
6221       ;;
6222     *)
6223       ac_cv_func_fork_works=yes
6224       ;;
6225   esac
6226   { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
6227 echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
6228 fi
6229 ac_cv_func_vfork_works=$ac_cv_func_vfork
6230 if test "x$ac_cv_func_vfork" = xyes; then
6231   echo "$as_me:$LINENO: checking for working vfork" >&5
6232 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
6233 if test "${ac_cv_func_vfork_works+set}" = set; then
6234   echo $ECHO_N "(cached) $ECHO_C" >&6
6235 else
6236   if test "$cross_compiling" = yes; then
6237   ac_cv_func_vfork_works=cross
6238 else
6239   cat >conftest.$ac_ext <<_ACEOF
6240 #line $LINENO "configure"
6241 /* confdefs.h.  */
6242 _ACEOF
6243 cat confdefs.h >>conftest.$ac_ext
6244 cat >>conftest.$ac_ext <<_ACEOF
6245 /* end confdefs.h.  */
6246 /* Thanks to Paul Eggert for this test.  */
6247 #include <stdio.h>
6248 #include <stdlib.h>
6249 #include <sys/types.h>
6250 #include <sys/stat.h>
6251 #include <sys/wait.h>
6252 #if HAVE_UNISTD_H
6253 # include <unistd.h>
6254 #endif
6255 #if HAVE_VFORK_H
6256 # include <vfork.h>
6257 #endif
6258 /* On some sparc systems, changes by the child to local and incoming
6259    argument registers are propagated back to the parent.  The compiler
6260    is told about this with #include <vfork.h>, but some compilers
6261    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
6262    static variable whose address is put into a register that is
6263    clobbered by the vfork.  */
6264 static void
6265 #ifdef __cplusplus
6266 sparc_address_test (int arg)
6267 # else
6268 sparc_address_test (arg) int arg;
6269 #endif
6270 {
6271   static pid_t child;
6272   if (!child) {
6273     child = vfork ();
6274     if (child < 0) {
6275       perror ("vfork");
6276       _exit(2);
6277     }
6278     if (!child) {
6279       arg = getpid();
6280       write(-1, "", 0);
6281       _exit (arg);
6282     }
6283   }
6284 }
6285
6286 int
6287 main ()
6288 {
6289   pid_t parent = getpid ();
6290   pid_t child;
6291
6292   sparc_address_test (0);
6293
6294   child = vfork ();
6295
6296   if (child == 0) {
6297     /* Here is another test for sparc vfork register problems.  This
6298        test uses lots of local variables, at least as many local
6299        variables as main has allocated so far including compiler
6300        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
6301        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
6302        reuse the register of parent for one of the local variables,
6303        since it will think that parent can't possibly be used any more
6304        in this routine.  Assigning to the local variable will thus
6305        munge parent in the parent process.  */
6306     pid_t
6307       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6308       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6309     /* Convince the compiler that p..p7 are live; otherwise, it might
6310        use the same hardware register for all 8 local variables.  */
6311     if (p != p1 || p != p2 || p != p3 || p != p4
6312         || p != p5 || p != p6 || p != p7)
6313       _exit(1);
6314
6315     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
6316        from child file descriptors.  If the child closes a descriptor
6317        before it execs or exits, this munges the parent's descriptor
6318        as well.  Test for this by closing stdout in the child.  */
6319     _exit(close(fileno(stdout)) != 0);
6320   } else {
6321     int status;
6322     struct stat st;
6323
6324     while (wait(&status) != child)
6325       ;
6326     exit(
6327          /* Was there some problem with vforking?  */
6328          child < 0
6329
6330          /* Did the child fail?  (This shouldn't happen.)  */
6331          || status
6332
6333          /* Did the vfork/compiler bug occur?  */
6334          || parent != getpid()
6335
6336          /* Did the file descriptor bug occur?  */
6337          || fstat(fileno(stdout), &st) != 0
6338          );
6339   }
6340 }
6341 _ACEOF
6342 rm -f conftest$ac_exeext
6343 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6344   (eval $ac_link) 2>&5
6345   ac_status=$?
6346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6347   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6348   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6349   (eval $ac_try) 2>&5
6350   ac_status=$?
6351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6352   (exit $ac_status); }; }; then
6353   ac_cv_func_vfork_works=yes
6354 else
6355   echo "$as_me: program exited with status $ac_status" >&5
6356 echo "$as_me: failed program was:" >&5
6357 sed 's/^/| /' conftest.$ac_ext >&5
6358
6359 ( exit $ac_status )
6360 ac_cv_func_vfork_works=no
6361 fi
6362 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6363 fi
6364 fi
6365 echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
6366 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
6367
6368 fi;
6369 if test "x$ac_cv_func_fork_works" = xcross; then
6370   ac_cv_func_vfork_works=ac_cv_func_vfork
6371   { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
6372 echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
6373 fi
6374
6375 if test "x$ac_cv_func_vfork_works" = xyes; then
6376
6377 cat >>confdefs.h <<\_ACEOF
6378 #define HAVE_WORKING_VFORK 1
6379 _ACEOF
6380
6381 else
6382
6383 cat >>confdefs.h <<\_ACEOF
6384 #define vfork fork
6385 _ACEOF
6386
6387 fi
6388 if test "x$ac_cv_func_fork_works" = xyes; then
6389
6390 cat >>confdefs.h <<\_ACEOF
6391 #define HAVE_WORKING_FORK 1
6392 _ACEOF
6393
6394 fi
6395
6396 if test $ac_cv_c_compiler_gnu = yes; then
6397     echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5
6398 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
6399 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
6400   echo $ECHO_N "(cached) $ECHO_C" >&6
6401 else
6402     ac_pattern="Autoconf.*'x'"
6403   cat >conftest.$ac_ext <<_ACEOF
6404 #line $LINENO "configure"
6405 /* confdefs.h.  */
6406 _ACEOF
6407 cat confdefs.h >>conftest.$ac_ext
6408 cat >>conftest.$ac_ext <<_ACEOF
6409 /* end confdefs.h.  */
6410 #include <sgtty.h>
6411 Autoconf TIOCGETP
6412 _ACEOF
6413 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6414   $EGREP "$ac_pattern" >/dev/null 2>&1; then
6415   ac_cv_prog_gcc_traditional=yes
6416 else
6417   ac_cv_prog_gcc_traditional=no
6418 fi
6419 rm -f conftest*
6420
6421
6422   if test $ac_cv_prog_gcc_traditional = no; then
6423     cat >conftest.$ac_ext <<_ACEOF
6424 #line $LINENO "configure"
6425 /* confdefs.h.  */
6426 _ACEOF
6427 cat confdefs.h >>conftest.$ac_ext
6428 cat >>conftest.$ac_ext <<_ACEOF
6429 /* end confdefs.h.  */
6430 #include <termio.h>
6431 Autoconf TCGETA
6432 _ACEOF
6433 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6434   $EGREP "$ac_pattern" >/dev/null 2>&1; then
6435   ac_cv_prog_gcc_traditional=yes
6436 fi
6437 rm -f conftest*
6438
6439   fi
6440 fi
6441 echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5
6442 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
6443   if test $ac_cv_prog_gcc_traditional = yes; then
6444     CC="$CC -traditional"
6445   fi
6446 fi
6447
6448
6449 for ac_header in stdlib.h
6450 do
6451 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6452 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6453   echo "$as_me:$LINENO: checking for $ac_header" >&5
6454 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6455 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6456   echo $ECHO_N "(cached) $ECHO_C" >&6
6457 fi
6458 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6459 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6460 else
6461   # Is the header compilable?
6462 echo "$as_me:$LINENO: checking $ac_header usability" >&5
6463 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6464 cat >conftest.$ac_ext <<_ACEOF
6465 #line $LINENO "configure"
6466 /* confdefs.h.  */
6467 _ACEOF
6468 cat confdefs.h >>conftest.$ac_ext
6469 cat >>conftest.$ac_ext <<_ACEOF
6470 /* end confdefs.h.  */
6471 $ac_includes_default
6472 #include <$ac_header>
6473 _ACEOF
6474 rm -f conftest.$ac_objext
6475 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6476   (eval $ac_compile) 2>&5
6477   ac_status=$?
6478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6479   (exit $ac_status); } &&
6480          { ac_try='test -s conftest.$ac_objext'
6481   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6482   (eval $ac_try) 2>&5
6483   ac_status=$?
6484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6485   (exit $ac_status); }; }; then
6486   ac_header_compiler=yes
6487 else
6488   echo "$as_me: failed program was:" >&5
6489 sed 's/^/| /' conftest.$ac_ext >&5
6490
6491 ac_header_compiler=no
6492 fi
6493 rm -f conftest.$ac_objext conftest.$ac_ext
6494 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6495 echo "${ECHO_T}$ac_header_compiler" >&6
6496
6497 # Is the header present?
6498 echo "$as_me:$LINENO: checking $ac_header presence" >&5
6499 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6500 cat >conftest.$ac_ext <<_ACEOF
6501 #line $LINENO "configure"
6502 /* confdefs.h.  */
6503 _ACEOF
6504 cat confdefs.h >>conftest.$ac_ext
6505 cat >>conftest.$ac_ext <<_ACEOF
6506 /* end confdefs.h.  */
6507 #include <$ac_header>
6508 _ACEOF
6509 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6510   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6511   ac_status=$?
6512   grep -v '^ *+' conftest.er1 >conftest.err
6513   rm -f conftest.er1
6514   cat conftest.err >&5
6515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6516   (exit $ac_status); } >/dev/null; then
6517   if test -s conftest.err; then
6518     ac_cpp_err=$ac_c_preproc_warn_flag
6519   else
6520     ac_cpp_err=
6521   fi
6522 else
6523   ac_cpp_err=yes
6524 fi
6525 if test -z "$ac_cpp_err"; then
6526   ac_header_preproc=yes
6527 else
6528   echo "$as_me: failed program was:" >&5
6529 sed 's/^/| /' conftest.$ac_ext >&5
6530
6531   ac_header_preproc=no
6532 fi
6533 rm -f conftest.err conftest.$ac_ext
6534 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6535 echo "${ECHO_T}$ac_header_preproc" >&6
6536
6537 # So?  What about this header?
6538 case $ac_header_compiler:$ac_header_preproc in
6539   yes:no )
6540     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6541 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6542     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6543 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6544     (
6545       cat <<\_ASBOX
6546 ## ------------------------------------ ##
6547 ## Report this to bug-autoconf@gnu.org. ##
6548 ## ------------------------------------ ##
6549 _ASBOX
6550     ) |
6551       sed "s/^/$as_me: WARNING:     /" >&2
6552     ;;
6553   no:yes )
6554     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6555 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6556     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6557 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6558     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6559 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6560     (
6561       cat <<\_ASBOX
6562 ## ------------------------------------ ##
6563 ## Report this to bug-autoconf@gnu.org. ##
6564 ## ------------------------------------ ##
6565 _ASBOX
6566     ) |
6567       sed "s/^/$as_me: WARNING:     /" >&2
6568     ;;
6569 esac
6570 echo "$as_me:$LINENO: checking for $ac_header" >&5
6571 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6572 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6573   echo $ECHO_N "(cached) $ECHO_C" >&6
6574 else
6575   eval "$as_ac_Header=$ac_header_preproc"
6576 fi
6577 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6578 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6579
6580 fi
6581 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6582   cat >>confdefs.h <<_ACEOF
6583 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6584 _ACEOF
6585
6586 fi
6587
6588 done
6589
6590 echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5
6591 echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6
6592 if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then
6593   echo $ECHO_N "(cached) $ECHO_C" >&6
6594 else
6595   if test "$cross_compiling" = yes; then
6596   ac_cv_func_malloc_0_nonnull=no
6597 else
6598   cat >conftest.$ac_ext <<_ACEOF
6599 #line $LINENO "configure"
6600 /* confdefs.h.  */
6601 _ACEOF
6602 cat confdefs.h >>conftest.$ac_ext
6603 cat >>conftest.$ac_ext <<_ACEOF
6604 /* end confdefs.h.  */
6605 #if STDC_HEADERS || HAVE_STDLIB_H
6606 # include <stdlib.h>
6607 #else
6608 char *malloc ();
6609 #endif
6610
6611 int
6612 main ()
6613 {
6614 exit (malloc (0) ? 0 : 1);
6615   ;
6616   return 0;
6617 }
6618 _ACEOF
6619 rm -f conftest$ac_exeext
6620 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6621   (eval $ac_link) 2>&5
6622   ac_status=$?
6623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6624   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6625   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6626   (eval $ac_try) 2>&5
6627   ac_status=$?
6628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6629   (exit $ac_status); }; }; then
6630   ac_cv_func_malloc_0_nonnull=yes
6631 else
6632   echo "$as_me: program exited with status $ac_status" >&5
6633 echo "$as_me: failed program was:" >&5
6634 sed 's/^/| /' conftest.$ac_ext >&5
6635
6636 ( exit $ac_status )
6637 ac_cv_func_malloc_0_nonnull=no
6638 fi
6639 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6640 fi
6641 fi
6642 echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5
6643 echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6
6644 if test $ac_cv_func_malloc_0_nonnull = yes; then
6645
6646 cat >>confdefs.h <<\_ACEOF
6647 #define HAVE_MALLOC 1
6648 _ACEOF
6649
6650 else
6651   cat >>confdefs.h <<\_ACEOF
6652 #define HAVE_MALLOC 0
6653 _ACEOF
6654
6655    LIBOBJS="$LIBOBJS malloc.$ac_objext"
6656
6657 cat >>confdefs.h <<\_ACEOF
6658 #define malloc rpl_malloc
6659 _ACEOF
6660
6661 fi
6662
6663
6664
6665 echo "$as_me:$LINENO: checking for function prototypes" >&5
6666 echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
6667 if test "$ac_cv_prog_cc_stdc" != no; then
6668   echo "$as_me:$LINENO: result: yes" >&5
6669 echo "${ECHO_T}yes" >&6
6670
6671 cat >>confdefs.h <<\_ACEOF
6672 #define PROTOTYPES 1
6673 _ACEOF
6674
6675
6676 cat >>confdefs.h <<\_ACEOF
6677 #define __PROTOTYPES 1
6678 _ACEOF
6679
6680 else
6681   echo "$as_me:$LINENO: result: no" >&5
6682 echo "${ECHO_T}no" >&6
6683 fi
6684
6685 echo "$as_me:$LINENO: checking whether setvbuf arguments are reversed" >&5
6686 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
6687 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
6688   echo $ECHO_N "(cached) $ECHO_C" >&6
6689 else
6690   ac_cv_func_setvbuf_reversed=no
6691    cat >conftest.$ac_ext <<_ACEOF
6692 #line $LINENO "configure"
6693 /* confdefs.h.  */
6694 _ACEOF
6695 cat confdefs.h >>conftest.$ac_ext
6696 cat >>conftest.$ac_ext <<_ACEOF
6697 /* end confdefs.h.  */
6698 #include <stdio.h>
6699 #         if PROTOTYPES
6700            int (setvbuf) (FILE *, int, char *, size_t);
6701 #         endif
6702 int
6703 main ()
6704 {
6705 char buf; return setvbuf (stdout, _IOLBF, &buf, 1);
6706   ;
6707   return 0;
6708 }
6709 _ACEOF
6710 rm -f conftest.$ac_objext conftest$ac_exeext
6711 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6712   (eval $ac_link) 2>&5
6713   ac_status=$?
6714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6715   (exit $ac_status); } &&
6716          { ac_try='test -s conftest$ac_exeext'
6717   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6718   (eval $ac_try) 2>&5
6719   ac_status=$?
6720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6721   (exit $ac_status); }; }; then
6722   cat >conftest.$ac_ext <<_ACEOF
6723 #line $LINENO "configure"
6724 /* confdefs.h.  */
6725 _ACEOF
6726 cat confdefs.h >>conftest.$ac_ext
6727 cat >>conftest.$ac_ext <<_ACEOF
6728 /* end confdefs.h.  */
6729 #include <stdio.h>
6730 #            if PROTOTYPES
6731               int (setvbuf) (FILE *, int, char *, size_t);
6732 #            endif
6733 int
6734 main ()
6735 {
6736 char buf; return setvbuf (stdout, &buf, _IOLBF, 1);
6737   ;
6738   return 0;
6739 }
6740 _ACEOF
6741 rm -f conftest.$ac_objext conftest$ac_exeext
6742 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6743   (eval $ac_link) 2>&5
6744   ac_status=$?
6745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6746   (exit $ac_status); } &&
6747          { ac_try='test -s conftest$ac_exeext'
6748   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6749   (eval $ac_try) 2>&5
6750   ac_status=$?
6751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6752   (exit $ac_status); }; }; then
6753   # It compiles and links either way, so it must not be declared
6754          # with a prototype and most likely this is a K&R C compiler.
6755          # Try running it.
6756          if test "$cross_compiling" = yes; then
6757   : # Assume setvbuf is not reversed when cross-compiling.
6758 else
6759   cat >conftest.$ac_ext <<_ACEOF
6760 #line $LINENO "configure"
6761 /* confdefs.h.  */
6762 _ACEOF
6763 cat confdefs.h >>conftest.$ac_ext
6764 cat >>conftest.$ac_ext <<_ACEOF
6765 /* end confdefs.h.  */
6766 #include <stdio.h>
6767 int
6768 main ()
6769 {
6770 /* This call has the arguments reversed.
6771                    A reversed system may check and see that the address of buf
6772                    is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
6773                 char buf;
6774                 if (setvbuf (stdout, _IOLBF, &buf, 1) != 0)
6775                   exit (1);
6776                 putchar ('\r');
6777                 exit (0); /* Non-reversed systems SEGV here.  */
6778   ;
6779   return 0;
6780 }
6781 _ACEOF
6782 rm -f conftest$ac_exeext
6783 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6784   (eval $ac_link) 2>&5
6785   ac_status=$?
6786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6787   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6788   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6789   (eval $ac_try) 2>&5
6790   ac_status=$?
6791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6792   (exit $ac_status); }; }; then
6793   ac_cv_func_setvbuf_reversed=yes
6794 else
6795   echo "$as_me: program exited with status $ac_status" >&5
6796 echo "$as_me: failed program was:" >&5
6797 sed 's/^/| /' conftest.$ac_ext >&5
6798
6799 ( exit $ac_status )
6800 rm -f core core.* *.core
6801 fi
6802 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6803 fi
6804         ac_cv_func_setvbuf_reversed=yes
6805 else
6806   echo "$as_me: failed program was:" >&5
6807 sed 's/^/| /' conftest.$ac_ext >&5
6808
6809 fi
6810 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6811 else
6812   echo "$as_me: failed program was:" >&5
6813 sed 's/^/| /' conftest.$ac_ext >&5
6814
6815 fi
6816 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6817 fi
6818 echo "$as_me:$LINENO: result: $ac_cv_func_setvbuf_reversed" >&5
6819 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
6820 if test $ac_cv_func_setvbuf_reversed = yes; then
6821
6822 cat >>confdefs.h <<\_ACEOF
6823 #define SETVBUF_REVERSED 1
6824 _ACEOF
6825
6826 fi
6827
6828 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6829 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
6830 if test "${ac_cv_type_signal+set}" = set; then
6831   echo $ECHO_N "(cached) $ECHO_C" >&6
6832 else
6833   cat >conftest.$ac_ext <<_ACEOF
6834 #line $LINENO "configure"
6835 /* confdefs.h.  */
6836 _ACEOF
6837 cat confdefs.h >>conftest.$ac_ext
6838 cat >>conftest.$ac_ext <<_ACEOF
6839 /* end confdefs.h.  */
6840 #include <sys/types.h>
6841 #include <signal.h>
6842 #ifdef signal
6843 # undef signal
6844 #endif
6845 #ifdef __cplusplus
6846 extern "C" void (*signal (int, void (*)(int)))(int);
6847 #else
6848 void (*signal ()) ();
6849 #endif
6850
6851 int
6852 main ()
6853 {
6854 int i;
6855   ;
6856   return 0;
6857 }
6858 _ACEOF
6859 rm -f conftest.$ac_objext
6860 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6861   (eval $ac_compile) 2>&5
6862   ac_status=$?
6863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6864   (exit $ac_status); } &&
6865          { ac_try='test -s conftest.$ac_objext'
6866   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6867   (eval $ac_try) 2>&5
6868   ac_status=$?
6869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6870   (exit $ac_status); }; }; then
6871   ac_cv_type_signal=void
6872 else
6873   echo "$as_me: failed program was:" >&5
6874 sed 's/^/| /' conftest.$ac_ext >&5
6875
6876 ac_cv_type_signal=int
6877 fi
6878 rm -f conftest.$ac_objext conftest.$ac_ext
6879 fi
6880 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6881 echo "${ECHO_T}$ac_cv_type_signal" >&6
6882
6883 cat >>confdefs.h <<_ACEOF
6884 #define RETSIGTYPE $ac_cv_type_signal
6885 _ACEOF
6886
6887
6888
6889
6890
6891
6892
6893
6894 for ac_func in dup2 gethostname gettimeofday memset pow strcasecmp
6895 do
6896 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6897 echo "$as_me:$LINENO: checking for $ac_func" >&5
6898 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6899 if eval "test \"\${$as_ac_var+set}\" = set"; then
6900   echo $ECHO_N "(cached) $ECHO_C" >&6
6901 else
6902   cat >conftest.$ac_ext <<_ACEOF
6903 #line $LINENO "configure"
6904 /* confdefs.h.  */
6905 _ACEOF
6906 cat confdefs.h >>conftest.$ac_ext
6907 cat >>conftest.$ac_ext <<_ACEOF
6908 /* end confdefs.h.  */
6909 /* System header to define __stub macros and hopefully few prototypes,
6910     which can conflict with char $ac_func (); below.
6911     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6912     <limits.h> exists even on freestanding compilers.  */
6913 #ifdef __STDC__
6914 # include <limits.h>
6915 #else
6916 # include <assert.h>
6917 #endif
6918 /* Override any gcc2 internal prototype to avoid an error.  */
6919 #ifdef __cplusplus
6920 extern "C"
6921 {
6922 #endif
6923 /* We use char because int might match the return type of a gcc2
6924    builtin and then its argument prototype would still apply.  */
6925 char $ac_func ();
6926 /* The GNU C library defines this for functions which it implements
6927     to always fail with ENOSYS.  Some functions are actually named
6928     something starting with __ and the normal name is an alias.  */
6929 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6930 choke me
6931 #else
6932 char (*f) () = $ac_func;
6933 #endif
6934 #ifdef __cplusplus
6935 }
6936 #endif
6937
6938 int
6939 main ()
6940 {
6941 return f != $ac_func;
6942   ;
6943   return 0;
6944 }
6945 _ACEOF
6946 rm -f conftest.$ac_objext conftest$ac_exeext
6947 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6948   (eval $ac_link) 2>&5
6949   ac_status=$?
6950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6951   (exit $ac_status); } &&
6952          { ac_try='test -s conftest$ac_exeext'
6953   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6954   (eval $ac_try) 2>&5
6955   ac_status=$?
6956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6957   (exit $ac_status); }; }; then
6958   eval "$as_ac_var=yes"
6959 else
6960   echo "$as_me: failed program was:" >&5
6961 sed 's/^/| /' conftest.$ac_ext >&5
6962
6963 eval "$as_ac_var=no"
6964 fi
6965 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6966 fi
6967 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6968 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6969 if test `eval echo '${'$as_ac_var'}'` = yes; then
6970   cat >>confdefs.h <<_ACEOF
6971 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6972 _ACEOF
6973
6974 fi
6975 done
6976
6977
6978
6979
6980
6981
6982 for ac_func in strchr strerror strrchr strstr strtol
6983 do
6984 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6985 echo "$as_me:$LINENO: checking for $ac_func" >&5
6986 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6987 if eval "test \"\${$as_ac_var+set}\" = set"; then
6988   echo $ECHO_N "(cached) $ECHO_C" >&6
6989 else
6990   cat >conftest.$ac_ext <<_ACEOF
6991 #line $LINENO "configure"
6992 /* confdefs.h.  */
6993 _ACEOF
6994 cat confdefs.h >>conftest.$ac_ext
6995 cat >>conftest.$ac_ext <<_ACEOF
6996 /* end confdefs.h.  */
6997 /* System header to define __stub macros and hopefully few prototypes,
6998     which can conflict with char $ac_func (); below.
6999     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7000     <limits.h> exists even on freestanding compilers.  */
7001 #ifdef __STDC__
7002 # include <limits.h>
7003 #else
7004 # include <assert.h>
7005 #endif
7006 /* Override any gcc2 internal prototype to avoid an error.  */
7007 #ifdef __cplusplus
7008 extern "C"
7009 {
7010 #endif
7011 /* We use char because int might match the return type of a gcc2
7012    builtin and then its argument prototype would still apply.  */
7013 char $ac_func ();
7014 /* The GNU C library defines this for functions which it implements
7015     to always fail with ENOSYS.  Some functions are actually named
7016     something starting with __ and the normal name is an alias.  */
7017 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7018 choke me
7019 #else
7020 char (*f) () = $ac_func;
7021 #endif
7022 #ifdef __cplusplus
7023 }
7024 #endif
7025
7026 int
7027 main ()
7028 {
7029 return f != $ac_func;
7030   ;
7031   return 0;
7032 }
7033 _ACEOF
7034 rm -f conftest.$ac_objext conftest$ac_exeext
7035 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7036   (eval $ac_link) 2>&5
7037   ac_status=$?
7038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7039   (exit $ac_status); } &&
7040          { ac_try='test -s conftest$ac_exeext'
7041   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7042   (eval $ac_try) 2>&5
7043   ac_status=$?
7044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7045   (exit $ac_status); }; }; then
7046   eval "$as_ac_var=yes"
7047 else
7048   echo "$as_me: failed program was:" >&5
7049 sed 's/^/| /' conftest.$ac_ext >&5
7050
7051 eval "$as_ac_var=no"
7052 fi
7053 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7054 fi
7055 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7056 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7057 if test `eval echo '${'$as_ac_var'}'` = yes; then
7058   cat >>confdefs.h <<_ACEOF
7059 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7060 _ACEOF
7061
7062 fi
7063 done
7064
7065
7066
7067 for ac_func in memcpy bcopy
7068 do
7069 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7070 echo "$as_me:$LINENO: checking for $ac_func" >&5
7071 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7072 if eval "test \"\${$as_ac_var+set}\" = set"; then
7073   echo $ECHO_N "(cached) $ECHO_C" >&6
7074 else
7075   cat >conftest.$ac_ext <<_ACEOF
7076 #line $LINENO "configure"
7077 /* confdefs.h.  */
7078 _ACEOF
7079 cat confdefs.h >>conftest.$ac_ext
7080 cat >>conftest.$ac_ext <<_ACEOF
7081 /* end confdefs.h.  */
7082 /* System header to define __stub macros and hopefully few prototypes,
7083     which can conflict with char $ac_func (); below.
7084     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7085     <limits.h> exists even on freestanding compilers.  */
7086 #ifdef __STDC__
7087 # include <limits.h>
7088 #else
7089 # include <assert.h>
7090 #endif
7091 /* Override any gcc2 internal prototype to avoid an error.  */
7092 #ifdef __cplusplus
7093 extern "C"
7094 {
7095 #endif
7096 /* We use char because int might match the return type of a gcc2
7097    builtin and then its argument prototype would still apply.  */
7098 char $ac_func ();
7099 /* The GNU C library defines this for functions which it implements
7100     to always fail with ENOSYS.  Some functions are actually named
7101     something starting with __ and the normal name is an alias.  */
7102 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7103 choke me
7104 #else
7105 char (*f) () = $ac_func;
7106 #endif
7107 #ifdef __cplusplus
7108 }
7109 #endif
7110
7111 int
7112 main ()
7113 {
7114 return f != $ac_func;
7115   ;
7116   return 0;
7117 }
7118 _ACEOF
7119 rm -f conftest.$ac_objext conftest$ac_exeext
7120 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7121   (eval $ac_link) 2>&5
7122   ac_status=$?
7123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7124   (exit $ac_status); } &&
7125          { ac_try='test -s conftest$ac_exeext'
7126   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7127   (eval $ac_try) 2>&5
7128   ac_status=$?
7129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7130   (exit $ac_status); }; }; then
7131   eval "$as_ac_var=yes"
7132 else
7133   echo "$as_me: failed program was:" >&5
7134 sed 's/^/| /' conftest.$ac_ext >&5
7135
7136 eval "$as_ac_var=no"
7137 fi
7138 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7139 fi
7140 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7141 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7142 if test `eval echo '${'$as_ac_var'}'` = yes; then
7143   cat >>confdefs.h <<_ACEOF
7144 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7145 _ACEOF
7146
7147 fi
7148 done
7149
7150
7151
7152 for ac_func in setlinebuf setvbuf
7153 do
7154 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7155 echo "$as_me:$LINENO: checking for $ac_func" >&5
7156 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7157 if eval "test \"\${$as_ac_var+set}\" = set"; then
7158   echo $ECHO_N "(cached) $ECHO_C" >&6
7159 else
7160   cat >conftest.$ac_ext <<_ACEOF
7161 #line $LINENO "configure"
7162 /* confdefs.h.  */
7163 _ACEOF
7164 cat confdefs.h >>conftest.$ac_ext
7165 cat >>conftest.$ac_ext <<_ACEOF
7166 /* end confdefs.h.  */
7167 /* System header to define __stub macros and hopefully few prototypes,
7168     which can conflict with char $ac_func (); below.
7169     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7170     <limits.h> exists even on freestanding compilers.  */
7171 #ifdef __STDC__
7172 # include <limits.h>
7173 #else
7174 # include <assert.h>
7175 #endif
7176 /* Override any gcc2 internal prototype to avoid an error.  */
7177 #ifdef __cplusplus
7178 extern "C"
7179 {
7180 #endif
7181 /* We use char because int might match the return type of a gcc2
7182    builtin and then its argument prototype would still apply.  */
7183 char $ac_func ();
7184 /* The GNU C library defines this for functions which it implements
7185     to always fail with ENOSYS.  Some functions are actually named
7186     something starting with __ and the normal name is an alias.  */
7187 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7188 choke me
7189 #else
7190 char (*f) () = $ac_func;
7191 #endif
7192 #ifdef __cplusplus
7193 }
7194 #endif
7195
7196 int
7197 main ()
7198 {
7199 return f != $ac_func;
7200   ;
7201   return 0;
7202 }
7203 _ACEOF
7204 rm -f conftest.$ac_objext conftest$ac_exeext
7205 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7206   (eval $ac_link) 2>&5
7207   ac_status=$?
7208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7209   (exit $ac_status); } &&
7210          { ac_try='test -s conftest$ac_exeext'
7211   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7212   (eval $ac_try) 2>&5
7213   ac_status=$?
7214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7215   (exit $ac_status); }; }; then
7216   eval "$as_ac_var=yes"
7217 else
7218   echo "$as_me: failed program was:" >&5
7219 sed 's/^/| /' conftest.$ac_ext >&5
7220
7221 eval "$as_ac_var=no"
7222 fi
7223 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7224 fi
7225 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7226 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7227 if test `eval echo '${'$as_ac_var'}'` = yes; then
7228   cat >>confdefs.h <<_ACEOF
7229 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7230 _ACEOF
7231
7232 fi
7233 done
7234
7235
7236
7237 #
7238 # Set various user-definable options.
7239 #
7240 # Valid OPT settings:
7241 # --with-top-part-bitmaps
7242 #
7243 # Other settings:
7244 # --with-first-shogi-program=PROGNAME
7245 # --with-second-shogi-program=PROGNAME
7246 # --with-first-host=HOSTNAME
7247 # --with-second-host=HOSTNAME
7248 #
7249
7250 OPT=
7251 FIRST_SHOGI_PROGRAM=gnushogi
7252 SECOND_SHOGI_PROGRAM=gnushogi
7253 FIRST_HOST=localhost
7254 SECOND_HOST=localhost
7255
7256
7257 # Check whether --with-top-part-bitmaps or --without-top-part-bitmaps was given.
7258 if test "${with_top_part_bitmaps+set}" = set; then
7259   withval="$with_top_part_bitmaps"
7260   OPT=-DTOP_PART_BITMAPS
7261 fi;
7262
7263
7264 # Check whether --with-first-shogi-program or --without-first-shogi-program was given.
7265 if test "${with_first_shogi_program+set}" = set; then
7266   withval="$with_first_shogi_program"
7267   FIRST_SHOGI_PROGRAM=$withval
7268 fi;
7269
7270
7271 # Check whether --with-second-shogi-program or --without-second-shogi-program was given.
7272 if test "${with_second_shogi_program+set}" = set; then
7273   withval="$with_second_shogi_program"
7274   SECOND_SHOGI_PROGRAM=$withval
7275 fi;
7276
7277
7278 # Check whether --with-first-host or --without-first-host was given.
7279 if test "${with_first_host+set}" = set; then
7280   withval="$with_first_host"
7281   FIRST_HOST=$withval
7282 fi;
7283
7284
7285 # Check whether --with-second-host or --without-second-host was given.
7286 if test "${with_second_host+set}" = set; then
7287   withval="$with_second_host"
7288   SECOND_HOST=$withval
7289 fi;
7290
7291
7292 # Check whether --with-xshogi or --without-xshogi was given.
7293 if test "${with_xshogi+set}" = set; then
7294   withval="$with_xshogi"
7295   with_xshogi=$withval
7296 else
7297   with_xshogi=yes
7298 fi;
7299
7300
7301
7302
7303
7304
7305
7306 if [ $with_xshogi = yes ]
7307 then
7308 XSHOGI=xshogi_compile
7309 XSHOGIINSTALL=xshogi_install
7310 XSHOGICLEAN=xshogi_clean
7311 else
7312 XSHOGI=
7313 XSHOGIINSTALL=
7314 XSHOGICLEAN=
7315 fi
7316
7317
7318
7319
7320
7321
7322 echo
7323 echo outputting files...
7324
7325                                         ac_config_files="$ac_config_files Makefile gnushogi/Makefile gnushogi/Makefile.profile xshogi/Makefile"
7326
7327 cat >confcache <<\_ACEOF
7328 # This file is a shell script that caches the results of configure
7329 # tests run on this system so they can be shared between configure
7330 # scripts and configure runs, see configure's option --config-cache.
7331 # It is not useful on other systems.  If it contains results you don't
7332 # want to keep, you may remove or edit it.
7333 #
7334 # config.status only pays attention to the cache file if you give it
7335 # the --recheck option to rerun configure.
7336 #
7337 # `ac_cv_env_foo' variables (set or unset) will be overridden when
7338 # loading this file, other *unset* `ac_cv_foo' will be assigned the
7339 # following values.
7340
7341 _ACEOF
7342
7343 # The following way of writing the cache mishandles newlines in values,
7344 # but we know of no workaround that is simple, portable, and efficient.
7345 # So, don't put newlines in cache variables' values.
7346 # Ultrix sh set writes to stderr and can't be redirected directly,
7347 # and sets the high bit in the cache file unless we assign to the vars.
7348 {
7349   (set) 2>&1 |
7350     case `(ac_space=' '; set | grep ac_space) 2>&1` in
7351     *ac_space=\ *)
7352       # `set' does not quote correctly, so add quotes (double-quote
7353       # substitution turns \\\\ into \\, and sed turns \\ into \).
7354       sed -n \
7355         "s/'/'\\\\''/g;
7356           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
7357       ;;
7358     *)
7359       # `set' quotes correctly as required by POSIX, so do not add quotes.
7360       sed -n \
7361         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
7362       ;;
7363     esac;
7364 } |
7365   sed '
7366      t clear
7367      : clear
7368      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
7369      t end
7370      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
7371      : end' >>confcache
7372 if diff $cache_file confcache >/dev/null 2>&1; then :; else
7373   if test -w $cache_file; then
7374     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
7375     cat confcache >$cache_file
7376   else
7377     echo "not updating unwritable cache $cache_file"
7378   fi
7379 fi
7380 rm -f confcache
7381
7382 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7383 # Let make expand exec_prefix.
7384 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7385
7386 # VPATH may cause trouble with some makes, so we remove $(srcdir),
7387 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
7388 # trailing colons and then remove the whole line if VPATH becomes empty
7389 # (actually we leave an empty line to preserve line numbers).
7390 if test "x$srcdir" = x.; then
7391   ac_vpsub='/^[         ]*VPATH[        ]*=/{
7392 s/:*\$(srcdir):*/:/;
7393 s/:*\${srcdir}:*/:/;
7394 s/:*@srcdir@:*/:/;
7395 s/^\([^=]*=[    ]*\):*/\1/;
7396 s/:*$//;
7397 s/^[^=]*=[      ]*$//;
7398 }'
7399 fi
7400
7401 DEFS=-DHAVE_CONFIG_H
7402
7403 ac_libobjs=
7404 ac_ltlibobjs=
7405 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
7406   # 1. Remove the extension, and $U if already installed.
7407   ac_i=`echo "$ac_i" |
7408          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
7409   # 2. Add them.
7410   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
7411   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
7412 done
7413 LIBOBJS=$ac_libobjs
7414
7415 LTLIBOBJS=$ac_ltlibobjs
7416
7417
7418
7419 : ${CONFIG_STATUS=./config.status}
7420 ac_clean_files_save=$ac_clean_files
7421 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
7422 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
7423 echo "$as_me: creating $CONFIG_STATUS" >&6;}
7424 cat >$CONFIG_STATUS <<_ACEOF
7425 #! $SHELL
7426 # Generated by $as_me.
7427 # Run this file to recreate the current configuration.
7428 # Compiler output produced by configure, useful for debugging
7429 # configure, is in config.log if it exists.
7430
7431 debug=false
7432 ac_cs_recheck=false
7433 ac_cs_silent=false
7434 SHELL=\${CONFIG_SHELL-$SHELL}
7435 _ACEOF
7436
7437 cat >>$CONFIG_STATUS <<\_ACEOF
7438 ## --------------------- ##
7439 ## M4sh Initialization.  ##
7440 ## --------------------- ##
7441
7442 # Be Bourne compatible
7443 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
7444   emulate sh
7445   NULLCMD=:
7446   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
7447   # is contrary to our usage.  Disable this feature.
7448   alias -g '${1+"$@"}'='"$@"'
7449 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
7450   set -o posix
7451 fi
7452
7453 # Support unset when possible.
7454 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
7455   as_unset=unset
7456 else
7457   as_unset=false
7458 fi
7459
7460
7461 # Work around bugs in pre-3.0 UWIN ksh.
7462 $as_unset ENV MAIL MAILPATH
7463 PS1='$ '
7464 PS2='> '
7465 PS4='+ '
7466
7467 # NLS nuisances.
7468 for as_var in \
7469   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
7470   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
7471   LC_TELEPHONE LC_TIME
7472 do
7473   if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
7474     eval $as_var=C; export $as_var
7475   else
7476     $as_unset $as_var
7477   fi
7478 done
7479
7480 # Required to use basename.
7481 if expr a : '\(a\)' >/dev/null 2>&1; then
7482   as_expr=expr
7483 else
7484   as_expr=false
7485 fi
7486
7487 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
7488   as_basename=basename
7489 else
7490   as_basename=false
7491 fi
7492
7493
7494 # Name of the executable.
7495 as_me=`$as_basename "$0" ||
7496 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
7497          X"$0" : 'X\(//\)$' \| \
7498          X"$0" : 'X\(/\)$' \| \
7499          .     : '\(.\)' 2>/dev/null ||
7500 echo X/"$0" |
7501     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
7502           /^X\/\(\/\/\)$/{ s//\1/; q; }
7503           /^X\/\(\/\).*/{ s//\1/; q; }
7504           s/.*/./; q'`
7505
7506
7507 # PATH needs CR, and LINENO needs CR and PATH.
7508 # Avoid depending upon Character Ranges.
7509 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
7510 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
7511 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
7512 as_cr_digits='0123456789'
7513 as_cr_alnum=$as_cr_Letters$as_cr_digits
7514
7515 # The user is always right.
7516 if test "${PATH_SEPARATOR+set}" != set; then
7517   echo "#! /bin/sh" >conf$$.sh
7518   echo  "exit 0"   >>conf$$.sh
7519   chmod +x conf$$.sh
7520   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7521     PATH_SEPARATOR=';'
7522   else
7523     PATH_SEPARATOR=:
7524   fi
7525   rm -f conf$$.sh
7526 fi
7527
7528
7529   as_lineno_1=$LINENO
7530   as_lineno_2=$LINENO
7531   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
7532   test "x$as_lineno_1" != "x$as_lineno_2" &&
7533   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
7534   # Find who we are.  Look in the path if we contain no path at all
7535   # relative or not.
7536   case $0 in
7537     *[\\/]* ) as_myself=$0 ;;
7538     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7539 for as_dir in $PATH
7540 do
7541   IFS=$as_save_IFS
7542   test -z "$as_dir" && as_dir=.
7543   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
7544 done
7545
7546        ;;
7547   esac
7548   # We did not find ourselves, most probably we were run as `sh COMMAND'
7549   # in which case we are not to be found in the path.
7550   if test "x$as_myself" = x; then
7551     as_myself=$0
7552   fi
7553   if test ! -f "$as_myself"; then
7554     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
7555 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
7556    { (exit 1); exit 1; }; }
7557   fi
7558   case $CONFIG_SHELL in
7559   '')
7560     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7561 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
7562 do
7563   IFS=$as_save_IFS
7564   test -z "$as_dir" && as_dir=.
7565   for as_base in sh bash ksh sh5; do
7566          case $as_dir in
7567          /*)
7568            if ("$as_dir/$as_base" -c '
7569   as_lineno_1=$LINENO
7570   as_lineno_2=$LINENO
7571   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
7572   test "x$as_lineno_1" != "x$as_lineno_2" &&
7573   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
7574              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
7575              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
7576              CONFIG_SHELL=$as_dir/$as_base
7577              export CONFIG_SHELL
7578              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
7579            fi;;
7580          esac
7581        done
7582 done
7583 ;;
7584   esac
7585
7586   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
7587   # uniformly replaced by the line number.  The first 'sed' inserts a
7588   # line-number line before each line; the second 'sed' does the real
7589   # work.  The second script uses 'N' to pair each line-number line
7590   # with the numbered line, and appends trailing '-' during
7591   # substitution so that $LINENO is not a special case at line end.
7592   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
7593   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
7594   sed '=' <$as_myself |
7595     sed '
7596       N
7597       s,$,-,
7598       : loop
7599       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
7600       t loop
7601       s,-$,,
7602       s,^['$as_cr_digits']*\n,,
7603     ' >$as_me.lineno &&
7604   chmod +x $as_me.lineno ||
7605     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
7606 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
7607    { (exit 1); exit 1; }; }
7608
7609   # Don't try to exec as it changes $[0], causing all sort of problems
7610   # (the dirname of $[0] is not the place where we might find the
7611   # original and so on.  Autoconf is especially sensible to this).
7612   . ./$as_me.lineno
7613   # Exit status is that of the last command.
7614   exit
7615 }
7616
7617
7618 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
7619   *c*,-n*) ECHO_N= ECHO_C='
7620 ' ECHO_T='      ' ;;
7621   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
7622   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
7623 esac
7624
7625 if expr a : '\(a\)' >/dev/null 2>&1; then
7626   as_expr=expr
7627 else
7628   as_expr=false
7629 fi
7630
7631 rm -f conf$$ conf$$.exe conf$$.file
7632 echo >conf$$.file
7633 if ln -s conf$$.file conf$$ 2>/dev/null; then
7634   # We could just check for DJGPP; but this test a) works b) is more generic
7635   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
7636   if test -f conf$$.exe; then
7637     # Don't use ln at all; we don't have any links
7638     as_ln_s='cp -p'
7639   else
7640     as_ln_s='ln -s'
7641   fi
7642 elif ln conf$$.file conf$$ 2>/dev/null; then
7643   as_ln_s=ln
7644 else
7645   as_ln_s='cp -p'
7646 fi
7647 rm -f conf$$ conf$$.exe conf$$.file
7648
7649 if mkdir -p . 2>/dev/null; then
7650   as_mkdir_p=:
7651 else
7652   as_mkdir_p=false
7653 fi
7654
7655 as_executable_p="test -f"
7656
7657 # Sed expression to map a string onto a valid CPP name.
7658 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
7659
7660 # Sed expression to map a string onto a valid variable name.
7661 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
7662
7663
7664 # IFS
7665 # We need space, tab and new line, in precisely that order.
7666 as_nl='
7667 '
7668 IFS="   $as_nl"
7669
7670 # CDPATH.
7671 $as_unset CDPATH
7672
7673 exec 6>&1
7674
7675 # Open the log real soon, to keep \$[0] and so on meaningful, and to
7676 # report actual input values of CONFIG_FILES etc. instead of their
7677 # values after options handling.  Logging --version etc. is OK.
7678 exec 5>>config.log
7679 {
7680   echo
7681   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
7682 ## Running $as_me. ##
7683 _ASBOX
7684 } >&5
7685 cat >&5 <<_CSEOF
7686
7687 This file was extended by gnushogi $as_me 1.3.2, which was
7688 generated by GNU Autoconf 2.57.  Invocation command line was
7689
7690   CONFIG_FILES    = $CONFIG_FILES
7691   CONFIG_HEADERS  = $CONFIG_HEADERS
7692   CONFIG_LINKS    = $CONFIG_LINKS
7693   CONFIG_COMMANDS = $CONFIG_COMMANDS
7694   $ $0 $@
7695
7696 _CSEOF
7697 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
7698 echo >&5
7699 _ACEOF
7700
7701 # Files that config.status was made for.
7702 if test -n "$ac_config_files"; then
7703   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
7704 fi
7705
7706 if test -n "$ac_config_headers"; then
7707   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
7708 fi
7709
7710 if test -n "$ac_config_links"; then
7711   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
7712 fi
7713
7714 if test -n "$ac_config_commands"; then
7715   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
7716 fi
7717
7718 cat >>$CONFIG_STATUS <<\_ACEOF
7719
7720 ac_cs_usage="\
7721 \`$as_me' instantiates files from templates according to the
7722 current configuration.
7723
7724 Usage: $0 [OPTIONS] [FILE]...
7725
7726   -h, --help       print this help, then exit
7727   -V, --version    print version number, then exit
7728   -q, --quiet      do not print progress messages
7729   -d, --debug      don't remove temporary files
7730       --recheck    update $as_me by reconfiguring in the same conditions
7731   --file=FILE[:TEMPLATE]
7732                    instantiate the configuration file FILE
7733   --header=FILE[:TEMPLATE]
7734                    instantiate the configuration header FILE
7735
7736 Configuration files:
7737 $config_files
7738
7739 Configuration headers:
7740 $config_headers
7741
7742 Report bugs to <bug-autoconf@gnu.org>."
7743 _ACEOF
7744
7745 cat >>$CONFIG_STATUS <<_ACEOF
7746 ac_cs_version="\\
7747 gnushogi config.status 1.3.2
7748 configured by $0, generated by GNU Autoconf 2.57,
7749   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
7750
7751 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7752 Free Software Foundation, Inc.
7753 This config.status script is free software; the Free Software Foundation
7754 gives unlimited permission to copy, distribute and modify it."
7755 srcdir=$srcdir
7756 INSTALL="$INSTALL"
7757 _ACEOF
7758
7759 cat >>$CONFIG_STATUS <<\_ACEOF
7760 # If no file are specified by the user, then we need to provide default
7761 # value.  By we need to know if files were specified by the user.
7762 ac_need_defaults=:
7763 while test $# != 0
7764 do
7765   case $1 in
7766   --*=*)
7767     ac_option=`expr "x$1" : 'x\([^=]*\)='`
7768     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
7769     ac_shift=:
7770     ;;
7771   -*)
7772     ac_option=$1
7773     ac_optarg=$2
7774     ac_shift=shift
7775     ;;
7776   *) # This is not an option, so the user has probably given explicit
7777      # arguments.
7778      ac_option=$1
7779      ac_need_defaults=false;;
7780   esac
7781
7782   case $ac_option in
7783   # Handling of the options.
7784 _ACEOF
7785 cat >>$CONFIG_STATUS <<\_ACEOF
7786   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7787     ac_cs_recheck=: ;;
7788   --version | --vers* | -V )
7789     echo "$ac_cs_version"; exit 0 ;;
7790   --he | --h)
7791     # Conflict between --help and --header
7792     { { echo "$as_me:$LINENO: error: ambiguous option: $1
7793 Try \`$0 --help' for more information." >&5
7794 echo "$as_me: error: ambiguous option: $1
7795 Try \`$0 --help' for more information." >&2;}
7796    { (exit 1); exit 1; }; };;
7797   --help | --hel | -h )
7798     echo "$ac_cs_usage"; exit 0 ;;
7799   --debug | --d* | -d )
7800     debug=: ;;
7801   --file | --fil | --fi | --f )
7802     $ac_shift
7803     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
7804     ac_need_defaults=false;;
7805   --header | --heade | --head | --hea )
7806     $ac_shift
7807     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
7808     ac_need_defaults=false;;
7809   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
7810   | -silent | --silent | --silen | --sile | --sil | --si | --s)
7811     ac_cs_silent=: ;;
7812
7813   # This is an error.
7814   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
7815 Try \`$0 --help' for more information." >&5
7816 echo "$as_me: error: unrecognized option: $1
7817 Try \`$0 --help' for more information." >&2;}
7818    { (exit 1); exit 1; }; } ;;
7819
7820   *) ac_config_targets="$ac_config_targets $1" ;;
7821
7822   esac
7823   shift
7824 done
7825
7826 ac_configure_extra_args=
7827
7828 if $ac_cs_silent; then
7829   exec 6>/dev/null
7830   ac_configure_extra_args="$ac_configure_extra_args --silent"
7831 fi
7832
7833 _ACEOF
7834 cat >>$CONFIG_STATUS <<_ACEOF
7835 if \$ac_cs_recheck; then
7836   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
7837   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
7838 fi
7839
7840 _ACEOF
7841
7842
7843
7844
7845
7846 cat >>$CONFIG_STATUS <<\_ACEOF
7847 for ac_config_target in $ac_config_targets
7848 do
7849   case "$ac_config_target" in
7850   # Handling of arguments.
7851   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
7852   "gnushogi/Makefile" ) CONFIG_FILES="$CONFIG_FILES gnushogi/Makefile" ;;
7853   "gnushogi/Makefile.profile" ) CONFIG_FILES="$CONFIG_FILES gnushogi/Makefile.profile" ;;
7854   "xshogi/Makefile" ) CONFIG_FILES="$CONFIG_FILES xshogi/Makefile" ;;
7855   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
7856   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
7857 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
7858    { (exit 1); exit 1; }; };;
7859   esac
7860 done
7861
7862 # If the user did not use the arguments to specify the items to instantiate,
7863 # then the envvar interface is used.  Set only those that are not.
7864 # We use the long form for the default assignment because of an extremely
7865 # bizarre bug on SunOS 4.1.3.
7866 if $ac_need_defaults; then
7867   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
7868   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
7869 fi
7870
7871 # Have a temporary directory for convenience.  Make it in the build tree
7872 # simply because there is no reason to put it here, and in addition,
7873 # creating and moving files from /tmp can sometimes cause problems.
7874 # Create a temporary directory, and hook for its removal unless debugging.
7875 $debug ||
7876 {
7877   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
7878   trap '{ (exit 1); exit 1; }' 1 2 13 15
7879 }
7880
7881 # Create a (secure) tmp directory for tmp files.
7882
7883 {
7884   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
7885   test -n "$tmp" && test -d "$tmp"
7886 }  ||
7887 {
7888   tmp=./confstat$$-$RANDOM
7889   (umask 077 && mkdir $tmp)
7890 } ||
7891 {
7892    echo "$me: cannot create a temporary directory in ." >&2
7893    { (exit 1); exit 1; }
7894 }
7895
7896 _ACEOF
7897
7898 cat >>$CONFIG_STATUS <<_ACEOF
7899
7900 #
7901 # CONFIG_FILES section.
7902 #
7903
7904 # No need to generate the scripts if there are no CONFIG_FILES.
7905 # This happens for instance when ./config.status config.h
7906 if test -n "\$CONFIG_FILES"; then
7907   # Protect against being on the right side of a sed subst in config.status.
7908   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
7909    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
7910 s,@SHELL@,$SHELL,;t t
7911 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
7912 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
7913 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
7914 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
7915 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
7916 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
7917 s,@exec_prefix@,$exec_prefix,;t t
7918 s,@prefix@,$prefix,;t t
7919 s,@program_transform_name@,$program_transform_name,;t t
7920 s,@bindir@,$bindir,;t t
7921 s,@sbindir@,$sbindir,;t t
7922 s,@libexecdir@,$libexecdir,;t t
7923 s,@datadir@,$datadir,;t t
7924 s,@sysconfdir@,$sysconfdir,;t t
7925 s,@sharedstatedir@,$sharedstatedir,;t t
7926 s,@localstatedir@,$localstatedir,;t t
7927 s,@libdir@,$libdir,;t t
7928 s,@includedir@,$includedir,;t t
7929 s,@oldincludedir@,$oldincludedir,;t t
7930 s,@infodir@,$infodir,;t t
7931 s,@mandir@,$mandir,;t t
7932 s,@build_alias@,$build_alias,;t t
7933 s,@host_alias@,$host_alias,;t t
7934 s,@target_alias@,$target_alias,;t t
7935 s,@DEFS@,$DEFS,;t t
7936 s,@ECHO_C@,$ECHO_C,;t t
7937 s,@ECHO_N@,$ECHO_N,;t t
7938 s,@ECHO_T@,$ECHO_T,;t t
7939 s,@LIBS@,$LIBS,;t t
7940 s,@CC@,$CC,;t t
7941 s,@CFLAGS@,$CFLAGS,;t t
7942 s,@LDFLAGS@,$LDFLAGS,;t t
7943 s,@CPPFLAGS@,$CPPFLAGS,;t t
7944 s,@ac_ct_CC@,$ac_ct_CC,;t t
7945 s,@EXEEXT@,$EXEEXT,;t t
7946 s,@OBJEXT@,$OBJEXT,;t t
7947 s,@YACC@,$YACC,;t t
7948 s,@LEX@,$LEX,;t t
7949 s,@LEXLIB@,$LEXLIB,;t t
7950 s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
7951 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
7952 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
7953 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
7954 s,@CPP@,$CPP,;t t
7955 s,@X_CFLAGS@,$X_CFLAGS,;t t
7956 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
7957 s,@X_LIBS@,$X_LIBS,;t t
7958 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
7959 s,@WARNINGS@,$WARNINGS,;t t
7960 s,@CEXTRAFLAGS@,$CEXTRAFLAGS,;t t
7961 s,@CEXTRAFLAGS2@,$CEXTRAFLAGS2,;t t
7962 s,@EGREP@,$EGREP,;t t
7963 s,@LIBOBJS@,$LIBOBJS,;t t
7964 s,@OPT@,$OPT,;t t
7965 s,@FIRST_SHOGI_PROGRAM@,$FIRST_SHOGI_PROGRAM,;t t
7966 s,@SECOND_SHOGI_PROGRAM@,$SECOND_SHOGI_PROGRAM,;t t
7967 s,@FIRST_HOST@,$FIRST_HOST,;t t
7968 s,@SECOND_HOST@,$SECOND_HOST,;t t
7969 s,@XSHOGI@,$XSHOGI,;t t
7970 s,@XSHOGIINSTALL@,$XSHOGIINSTALL,;t t
7971 s,@XSHOGICLEAN@,$XSHOGICLEAN,;t t
7972 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
7973 CEOF
7974
7975 _ACEOF
7976
7977   cat >>$CONFIG_STATUS <<\_ACEOF
7978   # Split the substitutions into bite-sized pieces for seds with
7979   # small command number limits, like on Digital OSF/1 and HP-UX.
7980   ac_max_sed_lines=48
7981   ac_sed_frag=1 # Number of current file.
7982   ac_beg=1 # First line for current file.
7983   ac_end=$ac_max_sed_lines # Line after last line for current file.
7984   ac_more_lines=:
7985   ac_sed_cmds=
7986   while $ac_more_lines; do
7987     if test $ac_beg -gt 1; then
7988       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
7989     else
7990       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
7991     fi
7992     if test ! -s $tmp/subs.frag; then
7993       ac_more_lines=false
7994     else
7995       # The purpose of the label and of the branching condition is to
7996       # speed up the sed processing (if there are no `@' at all, there
7997       # is no need to browse any of the substitutions).
7998       # These are the two extra sed commands mentioned above.
7999       (echo ':t
8000   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
8001       if test -z "$ac_sed_cmds"; then
8002         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
8003       else
8004         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
8005       fi
8006       ac_sed_frag=`expr $ac_sed_frag + 1`
8007       ac_beg=$ac_end
8008       ac_end=`expr $ac_end + $ac_max_sed_lines`
8009     fi
8010   done
8011   if test -z "$ac_sed_cmds"; then
8012     ac_sed_cmds=cat
8013   fi
8014 fi # test -n "$CONFIG_FILES"
8015
8016 _ACEOF
8017 cat >>$CONFIG_STATUS <<\_ACEOF
8018 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
8019   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8020   case $ac_file in
8021   - | *:- | *:-:* ) # input from stdin
8022         cat >$tmp/stdin
8023         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8024         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8025   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8026         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8027   * )   ac_file_in=$ac_file.in ;;
8028   esac
8029
8030   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
8031   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
8032 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8033          X"$ac_file" : 'X\(//\)[^/]' \| \
8034          X"$ac_file" : 'X\(//\)$' \| \
8035          X"$ac_file" : 'X\(/\)' \| \
8036          .     : '\(.\)' 2>/dev/null ||
8037 echo X"$ac_file" |
8038     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8039           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8040           /^X\(\/\/\)$/{ s//\1/; q; }
8041           /^X\(\/\).*/{ s//\1/; q; }
8042           s/.*/./; q'`
8043   { if $as_mkdir_p; then
8044     mkdir -p "$ac_dir"
8045   else
8046     as_dir="$ac_dir"
8047     as_dirs=
8048     while test ! -d "$as_dir"; do
8049       as_dirs="$as_dir $as_dirs"
8050       as_dir=`(dirname "$as_dir") 2>/dev/null ||
8051 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8052          X"$as_dir" : 'X\(//\)[^/]' \| \
8053          X"$as_dir" : 'X\(//\)$' \| \
8054          X"$as_dir" : 'X\(/\)' \| \
8055          .     : '\(.\)' 2>/dev/null ||
8056 echo X"$as_dir" |
8057     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8058           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8059           /^X\(\/\/\)$/{ s//\1/; q; }
8060           /^X\(\/\).*/{ s//\1/; q; }
8061           s/.*/./; q'`
8062     done
8063     test ! -n "$as_dirs" || mkdir $as_dirs
8064   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
8065 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
8066    { (exit 1); exit 1; }; }; }
8067
8068   ac_builddir=.
8069
8070 if test "$ac_dir" != .; then
8071   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
8072   # A "../" for each directory in $ac_dir_suffix.
8073   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
8074 else
8075   ac_dir_suffix= ac_top_builddir=
8076 fi
8077
8078 case $srcdir in
8079   .)  # No --srcdir option.  We are building in place.
8080     ac_srcdir=.
8081     if test -z "$ac_top_builddir"; then
8082        ac_top_srcdir=.
8083     else
8084        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
8085     fi ;;
8086   [\\/]* | ?:[\\/]* )  # Absolute path.
8087     ac_srcdir=$srcdir$ac_dir_suffix;
8088     ac_top_srcdir=$srcdir ;;
8089   *) # Relative path.
8090     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
8091     ac_top_srcdir=$ac_top_builddir$srcdir ;;
8092 esac
8093 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
8094 # absolute.
8095 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
8096 ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
8097 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
8098 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
8099
8100
8101   case $INSTALL in
8102   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
8103   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
8104   esac
8105
8106   if test x"$ac_file" != x-; then
8107     { echo "$as_me:$LINENO: creating $ac_file" >&5
8108 echo "$as_me: creating $ac_file" >&6;}
8109     rm -f "$ac_file"
8110   fi
8111   # Let's still pretend it is `configure' which instantiates (i.e., don't
8112   # use $as_me), people would be surprised to read:
8113   #    /* config.h.  Generated by config.status.  */
8114   if test x"$ac_file" = x-; then
8115     configure_input=
8116   else
8117     configure_input="$ac_file.  "
8118   fi
8119   configure_input=$configure_input"Generated from `echo $ac_file_in |
8120                                      sed 's,.*/,,'` by configure."
8121
8122   # First look for the input files in the build tree, otherwise in the
8123   # src tree.
8124   ac_file_inputs=`IFS=:
8125     for f in $ac_file_in; do
8126       case $f in
8127       -) echo $tmp/stdin ;;
8128       [\\/$]*)
8129          # Absolute (can't be DOS-style, as IFS=:)
8130          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8131 echo "$as_me: error: cannot find input file: $f" >&2;}
8132    { (exit 1); exit 1; }; }
8133          echo $f;;
8134       *) # Relative
8135          if test -f "$f"; then
8136            # Build tree
8137            echo $f
8138          elif test -f "$srcdir/$f"; then
8139            # Source tree
8140            echo $srcdir/$f
8141          else
8142            # /dev/null tree
8143            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8144 echo "$as_me: error: cannot find input file: $f" >&2;}
8145    { (exit 1); exit 1; }; }
8146          fi;;
8147       esac
8148     done` || { (exit 1); exit 1; }
8149 _ACEOF
8150 cat >>$CONFIG_STATUS <<_ACEOF
8151   sed "$ac_vpsub
8152 $extrasub
8153 _ACEOF
8154 cat >>$CONFIG_STATUS <<\_ACEOF
8155 :t
8156 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
8157 s,@configure_input@,$configure_input,;t t
8158 s,@srcdir@,$ac_srcdir,;t t
8159 s,@abs_srcdir@,$ac_abs_srcdir,;t t
8160 s,@top_srcdir@,$ac_top_srcdir,;t t
8161 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
8162 s,@builddir@,$ac_builddir,;t t
8163 s,@abs_builddir@,$ac_abs_builddir,;t t
8164 s,@top_builddir@,$ac_top_builddir,;t t
8165 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
8166 s,@INSTALL@,$ac_INSTALL,;t t
8167 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
8168   rm -f $tmp/stdin
8169   if test x"$ac_file" != x-; then
8170     mv $tmp/out $ac_file
8171   else
8172     cat $tmp/out
8173     rm -f $tmp/out
8174   fi
8175
8176 done
8177 _ACEOF
8178 cat >>$CONFIG_STATUS <<\_ACEOF
8179
8180 #
8181 # CONFIG_HEADER section.
8182 #
8183
8184 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8185 # NAME is the cpp macro being defined and VALUE is the value it is being given.
8186 #
8187 # ac_d sets the value in "#define NAME VALUE" lines.
8188 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
8189 ac_dB='[        ].*$,\1#\2'
8190 ac_dC=' '
8191 ac_dD=',;t'
8192 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8193 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
8194 ac_uB='$,\1#\2define\3'
8195 ac_uC=' '
8196 ac_uD=',;t'
8197
8198 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
8199   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8200   case $ac_file in
8201   - | *:- | *:-:* ) # input from stdin
8202         cat >$tmp/stdin
8203         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8204         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8205   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8206         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8207   * )   ac_file_in=$ac_file.in ;;
8208   esac
8209
8210   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
8211 echo "$as_me: creating $ac_file" >&6;}
8212
8213   # First look for the input files in the build tree, otherwise in the
8214   # src tree.
8215   ac_file_inputs=`IFS=:
8216     for f in $ac_file_in; do
8217       case $f in
8218       -) echo $tmp/stdin ;;
8219       [\\/$]*)
8220          # Absolute (can't be DOS-style, as IFS=:)
8221          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8222 echo "$as_me: error: cannot find input file: $f" >&2;}
8223    { (exit 1); exit 1; }; }
8224          echo $f;;
8225       *) # Relative
8226          if test -f "$f"; then
8227            # Build tree
8228            echo $f
8229          elif test -f "$srcdir/$f"; then
8230            # Source tree
8231            echo $srcdir/$f
8232          else
8233            # /dev/null tree
8234            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8235 echo "$as_me: error: cannot find input file: $f" >&2;}
8236    { (exit 1); exit 1; }; }
8237          fi;;
8238       esac
8239     done` || { (exit 1); exit 1; }
8240   # Remove the trailing spaces.
8241   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
8242
8243 _ACEOF
8244
8245 # Transform confdefs.h into two sed scripts, `conftest.defines' and
8246 # `conftest.undefs', that substitutes the proper values into
8247 # config.h.in to produce config.h.  The first handles `#define'
8248 # templates, and the second `#undef' templates.
8249 # And first: Protect against being on the right side of a sed subst in
8250 # config.status.  Protect against being in an unquoted here document
8251 # in config.status.
8252 rm -f conftest.defines conftest.undefs
8253 # Using a here document instead of a string reduces the quoting nightmare.
8254 # Putting comments in sed scripts is not portable.
8255 #
8256 # `end' is used to avoid that the second main sed command (meant for
8257 # 0-ary CPP macros) applies to n-ary macro definitions.
8258 # See the Autoconf documentation for `clear'.
8259 cat >confdef2sed.sed <<\_ACEOF
8260 s/[\\&,]/\\&/g
8261 s,[\\$`],\\&,g
8262 t clear
8263 : clear
8264 s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
8265 t end
8266 s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
8267 : end
8268 _ACEOF
8269 # If some macros were called several times there might be several times
8270 # the same #defines, which is useless.  Nevertheless, we may not want to
8271 # sort them, since we want the *last* AC-DEFINE to be honored.
8272 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
8273 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
8274 rm -f confdef2sed.sed
8275
8276 # This sed command replaces #undef with comments.  This is necessary, for
8277 # example, in the case of _POSIX_SOURCE, which is predefined and required
8278 # on some systems where configure will not decide to define it.
8279 cat >>conftest.undefs <<\_ACEOF
8280 s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
8281 _ACEOF
8282
8283 # Break up conftest.defines because some shells have a limit on the size
8284 # of here documents, and old seds have small limits too (100 cmds).
8285 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
8286 echo '  if grep "^[     ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
8287 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
8288 echo '  :' >>$CONFIG_STATUS
8289 rm -f conftest.tail
8290 while grep . conftest.defines >/dev/null
8291 do
8292   # Write a limited-size here document to $tmp/defines.sed.
8293   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
8294   # Speed up: don't consider the non `#define' lines.
8295   echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
8296   # Work around the forget-to-reset-the-flag bug.
8297   echo 't clr' >>$CONFIG_STATUS
8298   echo ': clr' >>$CONFIG_STATUS
8299   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
8300   echo 'CEOF
8301   sed -f $tmp/defines.sed $tmp/in >$tmp/out
8302   rm -f $tmp/in
8303   mv $tmp/out $tmp/in
8304 ' >>$CONFIG_STATUS
8305   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
8306   rm -f conftest.defines
8307   mv conftest.tail conftest.defines
8308 done
8309 rm -f conftest.defines
8310 echo '  fi # grep' >>$CONFIG_STATUS
8311 echo >>$CONFIG_STATUS
8312
8313 # Break up conftest.undefs because some shells have a limit on the size
8314 # of here documents, and old seds have small limits too (100 cmds).
8315 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
8316 rm -f conftest.tail
8317 while grep . conftest.undefs >/dev/null
8318 do
8319   # Write a limited-size here document to $tmp/undefs.sed.
8320   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
8321   # Speed up: don't consider the non `#undef'
8322   echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
8323   # Work around the forget-to-reset-the-flag bug.
8324   echo 't clr' >>$CONFIG_STATUS
8325   echo ': clr' >>$CONFIG_STATUS
8326   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
8327   echo 'CEOF
8328   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
8329   rm -f $tmp/in
8330   mv $tmp/out $tmp/in
8331 ' >>$CONFIG_STATUS
8332   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
8333   rm -f conftest.undefs
8334   mv conftest.tail conftest.undefs
8335 done
8336 rm -f conftest.undefs
8337
8338 cat >>$CONFIG_STATUS <<\_ACEOF
8339   # Let's still pretend it is `configure' which instantiates (i.e., don't
8340   # use $as_me), people would be surprised to read:
8341   #    /* config.h.  Generated by config.status.  */
8342   if test x"$ac_file" = x-; then
8343     echo "/* Generated by configure.  */" >$tmp/config.h
8344   else
8345     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
8346   fi
8347   cat $tmp/in >>$tmp/config.h
8348   rm -f $tmp/in
8349   if test x"$ac_file" != x-; then
8350     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
8351       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
8352 echo "$as_me: $ac_file is unchanged" >&6;}
8353     else
8354       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
8355 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8356          X"$ac_file" : 'X\(//\)[^/]' \| \
8357          X"$ac_file" : 'X\(//\)$' \| \
8358          X"$ac_file" : 'X\(/\)' \| \
8359          .     : '\(.\)' 2>/dev/null ||
8360 echo X"$ac_file" |
8361     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8362           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8363           /^X\(\/\/\)$/{ s//\1/; q; }
8364           /^X\(\/\).*/{ s//\1/; q; }
8365           s/.*/./; q'`
8366       { if $as_mkdir_p; then
8367     mkdir -p "$ac_dir"
8368   else
8369     as_dir="$ac_dir"
8370     as_dirs=
8371     while test ! -d "$as_dir"; do
8372       as_dirs="$as_dir $as_dirs"
8373       as_dir=`(dirname "$as_dir") 2>/dev/null ||
8374 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8375          X"$as_dir" : 'X\(//\)[^/]' \| \
8376          X"$as_dir" : 'X\(//\)$' \| \
8377          X"$as_dir" : 'X\(/\)' \| \
8378          .     : '\(.\)' 2>/dev/null ||
8379 echo X"$as_dir" |
8380     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8381           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8382           /^X\(\/\/\)$/{ s//\1/; q; }
8383           /^X\(\/\).*/{ s//\1/; q; }
8384           s/.*/./; q'`
8385     done
8386     test ! -n "$as_dirs" || mkdir $as_dirs
8387   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
8388 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
8389    { (exit 1); exit 1; }; }; }
8390
8391       rm -f $ac_file
8392       mv $tmp/config.h $ac_file
8393     fi
8394   else
8395     cat $tmp/config.h
8396     rm -f $tmp/config.h
8397   fi
8398 done
8399 _ACEOF
8400
8401 cat >>$CONFIG_STATUS <<\_ACEOF
8402
8403 { (exit 0); exit 0; }
8404 _ACEOF
8405 chmod +x $CONFIG_STATUS
8406 ac_clean_files=$ac_clean_files_save
8407
8408
8409 # configure is writing to config.log, and then calls config.status.
8410 # config.status does its own redirection, appending to config.log.
8411 # Unfortunately, on DOS this fails, as config.log is still kept open
8412 # by configure, so config.status won't be able to write to it; its
8413 # output is simply discarded.  So we exec the FD to /dev/null,
8414 # effectively closing config.log, so it can be properly (re)opened and
8415 # appended to by config.status.  When coming back to configure, we
8416 # need to make the FD available again.
8417 if test "$no_create" != yes; then
8418   ac_cs_success=:
8419   ac_config_status_args=
8420   test "$silent" = yes &&
8421     ac_config_status_args="$ac_config_status_args --quiet"
8422   exec 5>/dev/null
8423   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
8424   exec 5>>config.log
8425   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
8426   # would make configure fail if this is the last instruction.
8427   $ac_cs_success || { (exit 1); exit 1; }
8428 fi
8429
8430