avoid -lrt, gettimeofday isn't that bad for our purposes
[dana/urxvt.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.61.
4 #
5 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9 ## --------------------- ##
10 ## M4sh Initialization.  ##
11 ## --------------------- ##
12
13 # Be more Bourne compatible
14 DUALCASE=1; export DUALCASE # for MKS sh
15 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16   emulate sh
17   NULLCMD=:
18   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19   # is contrary to our usage.  Disable this feature.
20   alias -g '${1+"$@"}'='"$@"'
21   setopt NO_GLOB_SUBST
22 else
23   case `(set -o) 2>/dev/null` in
24   *posix*) set -o posix ;;
25 esac
26
27 fi
28
29
30
31
32 # PATH needs CR
33 # Avoid depending upon Character Ranges.
34 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
35 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
37 as_cr_digits='0123456789'
38 as_cr_alnum=$as_cr_Letters$as_cr_digits
39
40 # The user is always right.
41 if test "${PATH_SEPARATOR+set}" != set; then
42   echo "#! /bin/sh" >conf$$.sh
43   echo  "exit 0"   >>conf$$.sh
44   chmod +x conf$$.sh
45   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
46     PATH_SEPARATOR=';'
47   else
48     PATH_SEPARATOR=:
49   fi
50   rm -f conf$$.sh
51 fi
52
53 # Support unset when possible.
54 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
55   as_unset=unset
56 else
57   as_unset=false
58 fi
59
60
61 # IFS
62 # We need space, tab and new line, in precisely that order.  Quoting is
63 # there to prevent editors from complaining about space-tab.
64 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
65 # splitting by setting IFS to empty value.)
66 as_nl='
67 '
68 IFS=" ""        $as_nl"
69
70 # Find who we are.  Look in the path if we contain no directory separator.
71 case $0 in
72   *[\\/]* ) as_myself=$0 ;;
73   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
74 for as_dir in $PATH
75 do
76   IFS=$as_save_IFS
77   test -z "$as_dir" && as_dir=.
78   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
79 done
80 IFS=$as_save_IFS
81
82      ;;
83 esac
84 # We did not find ourselves, most probably we were run as `sh COMMAND'
85 # in which case we are not to be found in the path.
86 if test "x$as_myself" = x; then
87   as_myself=$0
88 fi
89 if test ! -f "$as_myself"; then
90   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
91   { (exit 1); exit 1; }
92 fi
93
94 # Work around bugs in pre-3.0 UWIN ksh.
95 for as_var in ENV MAIL MAILPATH
96 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
97 done
98 PS1='$ '
99 PS2='> '
100 PS4='+ '
101
102 # NLS nuisances.
103 for as_var in \
104   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
105   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
106   LC_TELEPHONE LC_TIME
107 do
108   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
109     eval $as_var=C; export $as_var
110   else
111     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
112   fi
113 done
114
115 # Required to use basename.
116 if expr a : '\(a\)' >/dev/null 2>&1 &&
117    test "X`expr 00001 : '.*\(...\)'`" = X001; then
118   as_expr=expr
119 else
120   as_expr=false
121 fi
122
123 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
124   as_basename=basename
125 else
126   as_basename=false
127 fi
128
129
130 # Name of the executable.
131 as_me=`$as_basename -- "$0" ||
132 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
133          X"$0" : 'X\(//\)$' \| \
134          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
135 echo X/"$0" |
136     sed '/^.*\/\([^/][^/]*\)\/*$/{
137             s//\1/
138             q
139           }
140           /^X\/\(\/\/\)$/{
141             s//\1/
142             q
143           }
144           /^X\/\(\/\).*/{
145             s//\1/
146             q
147           }
148           s/.*/./; q'`
149
150 # CDPATH.
151 $as_unset CDPATH
152
153
154 if test "x$CONFIG_SHELL" = x; then
155   if (eval ":") 2>/dev/null; then
156   as_have_required=yes
157 else
158   as_have_required=no
159 fi
160
161   if test $as_have_required = yes &&     (eval ":
162 (as_func_return () {
163   (exit \$1)
164 }
165 as_func_success () {
166   as_func_return 0
167 }
168 as_func_failure () {
169   as_func_return 1
170 }
171 as_func_ret_success () {
172   return 0
173 }
174 as_func_ret_failure () {
175   return 1
176 }
177
178 exitcode=0
179 if as_func_success; then
180   :
181 else
182   exitcode=1
183   echo as_func_success failed.
184 fi
185
186 if as_func_failure; then
187   exitcode=1
188   echo as_func_failure succeeded.
189 fi
190
191 if as_func_ret_success; then
192   :
193 else
194   exitcode=1
195   echo as_func_ret_success failed.
196 fi
197
198 if as_func_ret_failure; then
199   exitcode=1
200   echo as_func_ret_failure succeeded.
201 fi
202
203 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
204   :
205 else
206   exitcode=1
207   echo positional parameters were not saved.
208 fi
209
210 test \$exitcode = 0) || { (exit 1); exit 1; }
211
212 (
213   as_lineno_1=\$LINENO
214   as_lineno_2=\$LINENO
215   test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
216   test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
217 ") 2> /dev/null; then
218   :
219 else
220   as_candidate_shells=
221     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
222 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
223 do
224   IFS=$as_save_IFS
225   test -z "$as_dir" && as_dir=.
226   case $as_dir in
227          /*)
228            for as_base in sh bash ksh sh5; do
229              as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
230            done;;
231        esac
232 done
233 IFS=$as_save_IFS
234
235
236       for as_shell in $as_candidate_shells $SHELL; do
237          # Try only shells that exist, to save several forks.
238          if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
239                 { ("$as_shell") 2> /dev/null <<\_ASEOF
240 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
241   emulate sh
242   NULLCMD=:
243   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
244   # is contrary to our usage.  Disable this feature.
245   alias -g '${1+"$@"}'='"$@"'
246   setopt NO_GLOB_SUBST
247 else
248   case `(set -o) 2>/dev/null` in
249   *posix*) set -o posix ;;
250 esac
251
252 fi
253
254
255 :
256 _ASEOF
257 }; then
258   CONFIG_SHELL=$as_shell
259                as_have_required=yes
260                if { "$as_shell" 2> /dev/null <<\_ASEOF
261 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
262   emulate sh
263   NULLCMD=:
264   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
265   # is contrary to our usage.  Disable this feature.
266   alias -g '${1+"$@"}'='"$@"'
267   setopt NO_GLOB_SUBST
268 else
269   case `(set -o) 2>/dev/null` in
270   *posix*) set -o posix ;;
271 esac
272
273 fi
274
275
276 :
277 (as_func_return () {
278   (exit $1)
279 }
280 as_func_success () {
281   as_func_return 0
282 }
283 as_func_failure () {
284   as_func_return 1
285 }
286 as_func_ret_success () {
287   return 0
288 }
289 as_func_ret_failure () {
290   return 1
291 }
292
293 exitcode=0
294 if as_func_success; then
295   :
296 else
297   exitcode=1
298   echo as_func_success failed.
299 fi
300
301 if as_func_failure; then
302   exitcode=1
303   echo as_func_failure succeeded.
304 fi
305
306 if as_func_ret_success; then
307   :
308 else
309   exitcode=1
310   echo as_func_ret_success failed.
311 fi
312
313 if as_func_ret_failure; then
314   exitcode=1
315   echo as_func_ret_failure succeeded.
316 fi
317
318 if ( set x; as_func_ret_success y && test x = "$1" ); then
319   :
320 else
321   exitcode=1
322   echo positional parameters were not saved.
323 fi
324
325 test $exitcode = 0) || { (exit 1); exit 1; }
326
327 (
328   as_lineno_1=$LINENO
329   as_lineno_2=$LINENO
330   test "x$as_lineno_1" != "x$as_lineno_2" &&
331   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
332
333 _ASEOF
334 }; then
335   break
336 fi
337
338 fi
339
340       done
341
342       if test "x$CONFIG_SHELL" != x; then
343   for as_var in BASH_ENV ENV
344         do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
345         done
346         export CONFIG_SHELL
347         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
348 fi
349
350
351     if test $as_have_required = no; then
352   echo This script requires a shell more modern than all the
353       echo shells that I found on your system.  Please install a
354       echo modern shell, or manually run the script under such a
355       echo shell if you do have one.
356       { (exit 1); exit 1; }
357 fi
358
359
360 fi
361
362 fi
363
364
365
366 (eval "as_func_return () {
367   (exit \$1)
368 }
369 as_func_success () {
370   as_func_return 0
371 }
372 as_func_failure () {
373   as_func_return 1
374 }
375 as_func_ret_success () {
376   return 0
377 }
378 as_func_ret_failure () {
379   return 1
380 }
381
382 exitcode=0
383 if as_func_success; then
384   :
385 else
386   exitcode=1
387   echo as_func_success failed.
388 fi
389
390 if as_func_failure; then
391   exitcode=1
392   echo as_func_failure succeeded.
393 fi
394
395 if as_func_ret_success; then
396   :
397 else
398   exitcode=1
399   echo as_func_ret_success failed.
400 fi
401
402 if as_func_ret_failure; then
403   exitcode=1
404   echo as_func_ret_failure succeeded.
405 fi
406
407 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
408   :
409 else
410   exitcode=1
411   echo positional parameters were not saved.
412 fi
413
414 test \$exitcode = 0") || {
415   echo No shell found that supports shell functions.
416   echo Please tell autoconf@gnu.org about your system,
417   echo including any error possibly output before this
418   echo message
419 }
420
421
422
423   as_lineno_1=$LINENO
424   as_lineno_2=$LINENO
425   test "x$as_lineno_1" != "x$as_lineno_2" &&
426   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
427
428   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
429   # uniformly replaced by the line number.  The first 'sed' inserts a
430   # line-number line after each line using $LINENO; the second 'sed'
431   # does the real work.  The second script uses 'N' to pair each
432   # line-number line with the line containing $LINENO, and appends
433   # trailing '-' during substitution so that $LINENO is not a special
434   # case at line end.
435   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
436   # scripts with optimization help from Paolo Bonzini.  Blame Lee
437   # E. McMahon (1931-1989) for sed's syntax.  :-)
438   sed -n '
439     p
440     /[$]LINENO/=
441   ' <$as_myself |
442     sed '
443       s/[$]LINENO.*/&-/
444       t lineno
445       b
446       :lineno
447       N
448       :loop
449       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
450       t loop
451       s/-\n.*//
452     ' >$as_me.lineno &&
453   chmod +x "$as_me.lineno" ||
454     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
455    { (exit 1); exit 1; }; }
456
457   # Don't try to exec as it changes $[0], causing all sort of problems
458   # (the dirname of $[0] is not the place where we might find the
459   # original and so on.  Autoconf is especially sensitive to this).
460   . "./$as_me.lineno"
461   # Exit status is that of the last command.
462   exit
463 }
464
465
466 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
467   as_dirname=dirname
468 else
469   as_dirname=false
470 fi
471
472 ECHO_C= ECHO_N= ECHO_T=
473 case `echo -n x` in
474 -n*)
475   case `echo 'x\c'` in
476   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
477   *)   ECHO_C='\c';;
478   esac;;
479 *)
480   ECHO_N='-n';;
481 esac
482
483 if expr a : '\(a\)' >/dev/null 2>&1 &&
484    test "X`expr 00001 : '.*\(...\)'`" = X001; then
485   as_expr=expr
486 else
487   as_expr=false
488 fi
489
490 rm -f conf$$ conf$$.exe conf$$.file
491 if test -d conf$$.dir; then
492   rm -f conf$$.dir/conf$$.file
493 else
494   rm -f conf$$.dir
495   mkdir conf$$.dir
496 fi
497 echo >conf$$.file
498 if ln -s conf$$.file conf$$ 2>/dev/null; then
499   as_ln_s='ln -s'
500   # ... but there are two gotchas:
501   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
502   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
503   # In both cases, we have to default to `cp -p'.
504   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
505     as_ln_s='cp -p'
506 elif ln conf$$.file conf$$ 2>/dev/null; then
507   as_ln_s=ln
508 else
509   as_ln_s='cp -p'
510 fi
511 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
512 rmdir conf$$.dir 2>/dev/null
513
514 if mkdir -p . 2>/dev/null; then
515   as_mkdir_p=:
516 else
517   test -d ./-p && rmdir ./-p
518   as_mkdir_p=false
519 fi
520
521 if test -x / >/dev/null 2>&1; then
522   as_test_x='test -x'
523 else
524   if ls -dL / >/dev/null 2>&1; then
525     as_ls_L_option=L
526   else
527     as_ls_L_option=
528   fi
529   as_test_x='
530     eval sh -c '\''
531       if test -d "$1"; then
532         test -d "$1/.";
533       else
534         case $1 in
535         -*)set "./$1";;
536         esac;
537         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
538         ???[sx]*):;;*)false;;esac;fi
539     '\'' sh
540   '
541 fi
542 as_executable_p=$as_test_x
543
544 # Sed expression to map a string onto a valid CPP name.
545 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
546
547 # Sed expression to map a string onto a valid variable name.
548 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
549
550
551
552 exec 7<&0 </dev/null 6>&1
553
554 # Name of the host.
555 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
556 # so uname gets run too.
557 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
558
559 #
560 # Initializations.
561 #
562 ac_default_prefix=/usr/local
563 ac_clean_files=
564 ac_config_libobj_dir=.
565 LIBOBJS=
566 cross_compiling=no
567 subdirs=
568 MFLAGS=
569 MAKEFLAGS=
570 SHELL=${CONFIG_SHELL-/bin/sh}
571
572 # Identity of this package.
573 PACKAGE_NAME=
574 PACKAGE_TARNAME=
575 PACKAGE_VERSION=
576 PACKAGE_STRING=
577 PACKAGE_BUGREPORT=
578
579 ac_unique_file="src/feature.h"
580 # Factoring default headers for most tests.
581 ac_includes_default="\
582 #include <stdio.h>
583 #ifdef HAVE_SYS_TYPES_H
584 # include <sys/types.h>
585 #endif
586 #ifdef HAVE_SYS_STAT_H
587 # include <sys/stat.h>
588 #endif
589 #ifdef STDC_HEADERS
590 # include <stdlib.h>
591 # include <stddef.h>
592 #else
593 # ifdef HAVE_STDLIB_H
594 #  include <stdlib.h>
595 # endif
596 #endif
597 #ifdef HAVE_STRING_H
598 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
599 #  include <memory.h>
600 # endif
601 # include <string.h>
602 #endif
603 #ifdef HAVE_STRINGS_H
604 # include <strings.h>
605 #endif
606 #ifdef HAVE_INTTYPES_H
607 # include <inttypes.h>
608 #endif
609 #ifdef HAVE_STDINT_H
610 # include <stdint.h>
611 #endif
612 #ifdef HAVE_UNISTD_H
613 # include <unistd.h>
614 #endif"
615
616 ac_subst_vars='SHELL
617 PATH_SEPARATOR
618 PACKAGE_NAME
619 PACKAGE_TARNAME
620 PACKAGE_VERSION
621 PACKAGE_STRING
622 PACKAGE_BUGREPORT
623 exec_prefix
624 prefix
625 program_transform_name
626 bindir
627 sbindir
628 libexecdir
629 datarootdir
630 datadir
631 sysconfdir
632 sharedstatedir
633 localstatedir
634 includedir
635 oldincludedir
636 docdir
637 infodir
638 htmldir
639 dvidir
640 pdfdir
641 psdir
642 libdir
643 localedir
644 mandir
645 DEFS
646 ECHO_C
647 ECHO_N
648 ECHO_T
649 LIBS
650 build_alias
651 host_alias
652 target_alias
653 build
654 build_cpu
655 build_vendor
656 build_os
657 host
658 host_cpu
659 host_vendor
660 host_os
661 VERSION
662 DATE
663 LSMDATE
664 LIBVERSION
665 CC
666 CFLAGS
667 LDFLAGS
668 CPPFLAGS
669 ac_ct_CC
670 EXEEXT
671 OBJEXT
672 CXX
673 CXXFLAGS
674 ac_ct_CXX
675 CPP
676 INSTALL_PROGRAM
677 INSTALL_SCRIPT
678 INSTALL_DATA
679 GREP
680 EGREP
681 LINKER
682 INSTALL_LIBRXVT
683 RXVTNAME
684 CXXCPP
685 TIC
686 XMKMF
687 X_CFLAGS
688 X_PRE_LIBS
689 X_LIBS
690 X_EXTRA_LIBS
691 afterimage_config
692 rxvt_int16_typedef
693 rxvt_uint16_typedef
694 rxvt_int32_typedef
695 rxvt_uint32_typedef
696 rxvt_intp_define
697 rxvt_u_intp_define
698 PKG_CONFIG
699 XFT_CONFIG
700 PERL
701 PERLLIB
702 PERLFLAGS
703 PERLPRIVLIBEXP
704 IF_PERL
705 PERL_O
706 AFTERIMAGE_CFLAGS
707 AFTERIMAGE_LIBS
708 include_stdint_h
709 include_stdarg_h
710 include_stdlib_h
711 include_unistd_h
712 include_string_h
713 include_fcntl_h
714 include_util_h
715 include_assert_h
716 include_sys_ioctl_h
717 include_sys_select_h
718 include_sys_strredir_h
719 include_sys_time_h
720 include_time_h
721 LIBOBJS
722 LTLIBOBJS'
723 ac_subst_files=''
724       ac_precious_vars='build_alias
725 host_alias
726 target_alias
727 CC
728 CFLAGS
729 LDFLAGS
730 LIBS
731 CPPFLAGS
732 CXX
733 CXXFLAGS
734 CCC
735 CPP
736 CXXCPP
737 XMKMF'
738
739
740 # Initialize some variables set by options.
741 ac_init_help=
742 ac_init_version=false
743 # The variables have the same names as the options, with
744 # dashes changed to underlines.
745 cache_file=/dev/null
746 exec_prefix=NONE
747 no_create=
748 no_recursion=
749 prefix=NONE
750 program_prefix=NONE
751 program_suffix=NONE
752 program_transform_name=s,x,x,
753 silent=
754 site=
755 srcdir=
756 verbose=
757 x_includes=NONE
758 x_libraries=NONE
759
760 # Installation directory options.
761 # These are left unexpanded so users can "make install exec_prefix=/foo"
762 # and all the variables that are supposed to be based on exec_prefix
763 # by default will actually change.
764 # Use braces instead of parens because sh, perl, etc. also accept them.
765 # (The list follows the same order as the GNU Coding Standards.)
766 bindir='${exec_prefix}/bin'
767 sbindir='${exec_prefix}/sbin'
768 libexecdir='${exec_prefix}/libexec'
769 datarootdir='${prefix}/share'
770 datadir='${datarootdir}'
771 sysconfdir='${prefix}/etc'
772 sharedstatedir='${prefix}/com'
773 localstatedir='${prefix}/var'
774 includedir='${prefix}/include'
775 oldincludedir='/usr/include'
776 docdir='${datarootdir}/doc/${PACKAGE}'
777 infodir='${datarootdir}/info'
778 htmldir='${docdir}'
779 dvidir='${docdir}'
780 pdfdir='${docdir}'
781 psdir='${docdir}'
782 libdir='${exec_prefix}/lib'
783 localedir='${datarootdir}/locale'
784 mandir='${datarootdir}/man'
785
786 ac_prev=
787 ac_dashdash=
788 for ac_option
789 do
790   # If the previous option needs an argument, assign it.
791   if test -n "$ac_prev"; then
792     eval $ac_prev=\$ac_option
793     ac_prev=
794     continue
795   fi
796
797   case $ac_option in
798   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
799   *)    ac_optarg=yes ;;
800   esac
801
802   # Accept the important Cygnus configure options, so we can diagnose typos.
803
804   case $ac_dashdash$ac_option in
805   --)
806     ac_dashdash=yes ;;
807
808   -bindir | --bindir | --bindi | --bind | --bin | --bi)
809     ac_prev=bindir ;;
810   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
811     bindir=$ac_optarg ;;
812
813   -build | --build | --buil | --bui | --bu)
814     ac_prev=build_alias ;;
815   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
816     build_alias=$ac_optarg ;;
817
818   -cache-file | --cache-file | --cache-fil | --cache-fi \
819   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
820     ac_prev=cache_file ;;
821   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
822   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
823     cache_file=$ac_optarg ;;
824
825   --config-cache | -C)
826     cache_file=config.cache ;;
827
828   -datadir | --datadir | --datadi | --datad)
829     ac_prev=datadir ;;
830   -datadir=* | --datadir=* | --datadi=* | --datad=*)
831     datadir=$ac_optarg ;;
832
833   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
834   | --dataroo | --dataro | --datar)
835     ac_prev=datarootdir ;;
836   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
837   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
838     datarootdir=$ac_optarg ;;
839
840   -disable-* | --disable-*)
841     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
842     # Reject names that are not valid shell variable names.
843     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
844       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
845    { (exit 1); exit 1; }; }
846     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
847     eval enable_$ac_feature=no ;;
848
849   -docdir | --docdir | --docdi | --doc | --do)
850     ac_prev=docdir ;;
851   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
852     docdir=$ac_optarg ;;
853
854   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
855     ac_prev=dvidir ;;
856   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
857     dvidir=$ac_optarg ;;
858
859   -enable-* | --enable-*)
860     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
861     # Reject names that are not valid shell variable names.
862     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
863       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
864    { (exit 1); exit 1; }; }
865     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
866     eval enable_$ac_feature=\$ac_optarg ;;
867
868   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
869   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
870   | --exec | --exe | --ex)
871     ac_prev=exec_prefix ;;
872   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
873   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
874   | --exec=* | --exe=* | --ex=*)
875     exec_prefix=$ac_optarg ;;
876
877   -gas | --gas | --ga | --g)
878     # Obsolete; use --with-gas.
879     with_gas=yes ;;
880
881   -help | --help | --hel | --he | -h)
882     ac_init_help=long ;;
883   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
884     ac_init_help=recursive ;;
885   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
886     ac_init_help=short ;;
887
888   -host | --host | --hos | --ho)
889     ac_prev=host_alias ;;
890   -host=* | --host=* | --hos=* | --ho=*)
891     host_alias=$ac_optarg ;;
892
893   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
894     ac_prev=htmldir ;;
895   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
896   | --ht=*)
897     htmldir=$ac_optarg ;;
898
899   -includedir | --includedir | --includedi | --included | --include \
900   | --includ | --inclu | --incl | --inc)
901     ac_prev=includedir ;;
902   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
903   | --includ=* | --inclu=* | --incl=* | --inc=*)
904     includedir=$ac_optarg ;;
905
906   -infodir | --infodir | --infodi | --infod | --info | --inf)
907     ac_prev=infodir ;;
908   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
909     infodir=$ac_optarg ;;
910
911   -libdir | --libdir | --libdi | --libd)
912     ac_prev=libdir ;;
913   -libdir=* | --libdir=* | --libdi=* | --libd=*)
914     libdir=$ac_optarg ;;
915
916   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
917   | --libexe | --libex | --libe)
918     ac_prev=libexecdir ;;
919   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
920   | --libexe=* | --libex=* | --libe=*)
921     libexecdir=$ac_optarg ;;
922
923   -localedir | --localedir | --localedi | --localed | --locale)
924     ac_prev=localedir ;;
925   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
926     localedir=$ac_optarg ;;
927
928   -localstatedir | --localstatedir | --localstatedi | --localstated \
929   | --localstate | --localstat | --localsta | --localst | --locals)
930     ac_prev=localstatedir ;;
931   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
932   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
933     localstatedir=$ac_optarg ;;
934
935   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
936     ac_prev=mandir ;;
937   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
938     mandir=$ac_optarg ;;
939
940   -nfp | --nfp | --nf)
941     # Obsolete; use --without-fp.
942     with_fp=no ;;
943
944   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
945   | --no-cr | --no-c | -n)
946     no_create=yes ;;
947
948   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
949   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
950     no_recursion=yes ;;
951
952   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
953   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
954   | --oldin | --oldi | --old | --ol | --o)
955     ac_prev=oldincludedir ;;
956   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
957   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
958   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
959     oldincludedir=$ac_optarg ;;
960
961   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
962     ac_prev=prefix ;;
963   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
964     prefix=$ac_optarg ;;
965
966   -program-prefix | --program-prefix | --program-prefi | --program-pref \
967   | --program-pre | --program-pr | --program-p)
968     ac_prev=program_prefix ;;
969   -program-prefix=* | --program-prefix=* | --program-prefi=* \
970   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
971     program_prefix=$ac_optarg ;;
972
973   -program-suffix | --program-suffix | --program-suffi | --program-suff \
974   | --program-suf | --program-su | --program-s)
975     ac_prev=program_suffix ;;
976   -program-suffix=* | --program-suffix=* | --program-suffi=* \
977   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
978     program_suffix=$ac_optarg ;;
979
980   -program-transform-name | --program-transform-name \
981   | --program-transform-nam | --program-transform-na \
982   | --program-transform-n | --program-transform- \
983   | --program-transform | --program-transfor \
984   | --program-transfo | --program-transf \
985   | --program-trans | --program-tran \
986   | --progr-tra | --program-tr | --program-t)
987     ac_prev=program_transform_name ;;
988   -program-transform-name=* | --program-transform-name=* \
989   | --program-transform-nam=* | --program-transform-na=* \
990   | --program-transform-n=* | --program-transform-=* \
991   | --program-transform=* | --program-transfor=* \
992   | --program-transfo=* | --program-transf=* \
993   | --program-trans=* | --program-tran=* \
994   | --progr-tra=* | --program-tr=* | --program-t=*)
995     program_transform_name=$ac_optarg ;;
996
997   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
998     ac_prev=pdfdir ;;
999   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1000     pdfdir=$ac_optarg ;;
1001
1002   -psdir | --psdir | --psdi | --psd | --ps)
1003     ac_prev=psdir ;;
1004   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1005     psdir=$ac_optarg ;;
1006
1007   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1008   | -silent | --silent | --silen | --sile | --sil)
1009     silent=yes ;;
1010
1011   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1012     ac_prev=sbindir ;;
1013   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1014   | --sbi=* | --sb=*)
1015     sbindir=$ac_optarg ;;
1016
1017   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1018   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1019   | --sharedst | --shareds | --shared | --share | --shar \
1020   | --sha | --sh)
1021     ac_prev=sharedstatedir ;;
1022   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1023   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1024   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1025   | --sha=* | --sh=*)
1026     sharedstatedir=$ac_optarg ;;
1027
1028   -site | --site | --sit)
1029     ac_prev=site ;;
1030   -site=* | --site=* | --sit=*)
1031     site=$ac_optarg ;;
1032
1033   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1034     ac_prev=srcdir ;;
1035   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1036     srcdir=$ac_optarg ;;
1037
1038   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1039   | --syscon | --sysco | --sysc | --sys | --sy)
1040     ac_prev=sysconfdir ;;
1041   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1042   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1043     sysconfdir=$ac_optarg ;;
1044
1045   -target | --target | --targe | --targ | --tar | --ta | --t)
1046     ac_prev=target_alias ;;
1047   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1048     target_alias=$ac_optarg ;;
1049
1050   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1051     verbose=yes ;;
1052
1053   -version | --version | --versio | --versi | --vers | -V)
1054     ac_init_version=: ;;
1055
1056   -with-* | --with-*)
1057     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1058     # Reject names that are not valid shell variable names.
1059     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1060       { echo "$as_me: error: invalid package name: $ac_package" >&2
1061    { (exit 1); exit 1; }; }
1062     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1063     eval with_$ac_package=\$ac_optarg ;;
1064
1065   -without-* | --without-*)
1066     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1067     # Reject names that are not valid shell variable names.
1068     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1069       { echo "$as_me: error: invalid package name: $ac_package" >&2
1070    { (exit 1); exit 1; }; }
1071     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1072     eval with_$ac_package=no ;;
1073
1074   --x)
1075     # Obsolete; use --with-x.
1076     with_x=yes ;;
1077
1078   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1079   | --x-incl | --x-inc | --x-in | --x-i)
1080     ac_prev=x_includes ;;
1081   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1082   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1083     x_includes=$ac_optarg ;;
1084
1085   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1086   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1087     ac_prev=x_libraries ;;
1088   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1089   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1090     x_libraries=$ac_optarg ;;
1091
1092   -*) { echo "$as_me: error: unrecognized option: $ac_option
1093 Try \`$0 --help' for more information." >&2
1094    { (exit 1); exit 1; }; }
1095     ;;
1096
1097   *=*)
1098     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1099     # Reject names that are not valid shell variable names.
1100     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1101       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1102    { (exit 1); exit 1; }; }
1103     eval $ac_envvar=\$ac_optarg
1104     export $ac_envvar ;;
1105
1106   *)
1107     # FIXME: should be removed in autoconf 3.0.
1108     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1109     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1110       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1111     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1112     ;;
1113
1114   esac
1115 done
1116
1117 if test -n "$ac_prev"; then
1118   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1119   { echo "$as_me: error: missing argument to $ac_option" >&2
1120    { (exit 1); exit 1; }; }
1121 fi
1122
1123 # Be sure to have absolute directory names.
1124 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1125                 datadir sysconfdir sharedstatedir localstatedir includedir \
1126                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1127                 libdir localedir mandir
1128 do
1129   eval ac_val=\$$ac_var
1130   case $ac_val in
1131     [\\/$]* | ?:[\\/]* )  continue;;
1132     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1133   esac
1134   { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1135    { (exit 1); exit 1; }; }
1136 done
1137
1138 # There might be people who depend on the old broken behavior: `$host'
1139 # used to hold the argument of --host etc.
1140 # FIXME: To remove some day.
1141 build=$build_alias
1142 host=$host_alias
1143 target=$target_alias
1144
1145 # FIXME: To remove some day.
1146 if test "x$host_alias" != x; then
1147   if test "x$build_alias" = x; then
1148     cross_compiling=maybe
1149     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1150     If a cross compiler is detected then cross compile mode will be used." >&2
1151   elif test "x$build_alias" != "x$host_alias"; then
1152     cross_compiling=yes
1153   fi
1154 fi
1155
1156 ac_tool_prefix=
1157 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1158
1159 test "$silent" = yes && exec 6>/dev/null
1160
1161
1162 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1163 ac_ls_di=`ls -di .` &&
1164 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1165   { echo "$as_me: error: Working directory cannot be determined" >&2
1166    { (exit 1); exit 1; }; }
1167 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1168   { echo "$as_me: error: pwd does not report name of working directory" >&2
1169    { (exit 1); exit 1; }; }
1170
1171
1172 # Find the source files, if location was not specified.
1173 if test -z "$srcdir"; then
1174   ac_srcdir_defaulted=yes
1175   # Try the directory containing this script, then the parent directory.
1176   ac_confdir=`$as_dirname -- "$0" ||
1177 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1178          X"$0" : 'X\(//\)[^/]' \| \
1179          X"$0" : 'X\(//\)$' \| \
1180          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1181 echo X"$0" |
1182     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1183             s//\1/
1184             q
1185           }
1186           /^X\(\/\/\)[^/].*/{
1187             s//\1/
1188             q
1189           }
1190           /^X\(\/\/\)$/{
1191             s//\1/
1192             q
1193           }
1194           /^X\(\/\).*/{
1195             s//\1/
1196             q
1197           }
1198           s/.*/./; q'`
1199   srcdir=$ac_confdir
1200   if test ! -r "$srcdir/$ac_unique_file"; then
1201     srcdir=..
1202   fi
1203 else
1204   ac_srcdir_defaulted=no
1205 fi
1206 if test ! -r "$srcdir/$ac_unique_file"; then
1207   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1208   { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1209    { (exit 1); exit 1; }; }
1210 fi
1211 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1212 ac_abs_confdir=`(
1213         cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1214    { (exit 1); exit 1; }; }
1215         pwd)`
1216 # When building in place, set srcdir=.
1217 if test "$ac_abs_confdir" = "$ac_pwd"; then
1218   srcdir=.
1219 fi
1220 # Remove unnecessary trailing slashes from srcdir.
1221 # Double slashes in file names in object file debugging info
1222 # mess up M-x gdb in Emacs.
1223 case $srcdir in
1224 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1225 esac
1226 for ac_var in $ac_precious_vars; do
1227   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1228   eval ac_env_${ac_var}_value=\$${ac_var}
1229   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1230   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1231 done
1232
1233 #
1234 # Report the --help message.
1235 #
1236 if test "$ac_init_help" = "long"; then
1237   # Omit some internal or obsolete options to make the list less imposing.
1238   # This message is too long to be a string in the A/UX 3.1 sh.
1239   cat <<_ACEOF
1240 \`configure' configures this package to adapt to many kinds of systems.
1241
1242 Usage: $0 [OPTION]... [VAR=VALUE]...
1243
1244 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1245 VAR=VALUE.  See below for descriptions of some of the useful variables.
1246
1247 Defaults for the options are specified in brackets.
1248
1249 Configuration:
1250   -h, --help              display this help and exit
1251       --help=short        display options specific to this package
1252       --help=recursive    display the short help of all the included packages
1253   -V, --version           display version information and exit
1254   -q, --quiet, --silent   do not print \`checking...' messages
1255       --cache-file=FILE   cache test results in FILE [disabled]
1256   -C, --config-cache      alias for \`--cache-file=config.cache'
1257   -n, --no-create         do not create output files
1258       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1259
1260 Installation directories:
1261   --prefix=PREFIX         install architecture-independent files in PREFIX
1262                           [$ac_default_prefix]
1263   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1264                           [PREFIX]
1265
1266 By default, \`make install' will install all the files in
1267 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1268 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1269 for instance \`--prefix=\$HOME'.
1270
1271 For better control, use the options below.
1272
1273 Fine tuning of the installation directories:
1274   --bindir=DIR           user executables [EPREFIX/bin]
1275   --sbindir=DIR          system admin executables [EPREFIX/sbin]
1276   --libexecdir=DIR       program executables [EPREFIX/libexec]
1277   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
1278   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
1279   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
1280   --libdir=DIR           object code libraries [EPREFIX/lib]
1281   --includedir=DIR       C header files [PREFIX/include]
1282   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
1283   --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1284   --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1285   --infodir=DIR          info documentation [DATAROOTDIR/info]
1286   --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1287   --mandir=DIR           man documentation [DATAROOTDIR/man]
1288   --docdir=DIR           documentation root [DATAROOTDIR/doc/PACKAGE]
1289   --htmldir=DIR          html documentation [DOCDIR]
1290   --dvidir=DIR           dvi documentation [DOCDIR]
1291   --pdfdir=DIR           pdf documentation [DOCDIR]
1292   --psdir=DIR            ps documentation [DOCDIR]
1293 _ACEOF
1294
1295   cat <<\_ACEOF
1296
1297 X features:
1298   --x-includes=DIR    X include files are in DIR
1299   --x-libraries=DIR   X library files are in DIR
1300
1301 Program names:
1302   --program-prefix=PREFIX            prepend PREFIX to installed program names
1303   --program-suffix=SUFFIX            append SUFFIX to installed program names
1304   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1305
1306 System types:
1307   --build=BUILD     configure for building on BUILD [guessed]
1308   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1309 _ACEOF
1310 fi
1311
1312 if test -n "$ac_init_help"; then
1313
1314   cat <<\_ACEOF
1315
1316 Optional Features:
1317   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1318   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1319   --enable-everything     enable standard non-multichoice features
1320                      NOTE: this option is order dependent
1321                      NOTE: automatically enabled with --enable-shared
1322   --enable-warnings       turn on g++ warnings
1323   --enable-unicode3       use 21 instead of 16 bits to represent unicode characters
1324   --enable-combining      enable composition of base and combining characters
1325   --enable-xft            enable xft support on systems that have it
1326   --enable-font-styles    enable bold and italic support
1327   --enable-afterimage enable integration with libAfterImage for background images
1328   --enable-transparency   enable transparent backgrounds
1329   --enable-fading         enable colors fading when off focus
1330   --enable-rxvt-scroll    enable rxvt style scrollbar
1331   --enable-next-scroll    enable NeXT style scrollbar
1332   --enable-xterm-scroll   enable Xterm style scrollbar
1333   --enable-perl           enable embedded perl interpreter
1334   --enable-plain-scroll   enable plain style scrollbar
1335   --enable-xim            XIM (X Input Method) protocol support
1336   --disable-backspace-key disable handling of the backspace key
1337   --disable-delete-key    disable handling of the delete key
1338   --disable-resources     disable all resource checking
1339   --enable-8bitctrls      enable 8 bit control sequences (not recommended)
1340   --enable-fallback[=CLASS] fall back on CLASS resources in addition to URxvt ones (default: Rxvt)
1341   --disable-swapscreen    disable swap screen support
1342   --enable-iso14755       enable support for extended ISO 14755 modes
1343   --enable-frills         enable support for rarely used features
1344   --enable-keepscrolling  enable continual scrolling on scrollbar arrow press
1345   --enable-selectionscrolling  enable scrolling during selections
1346   --enable-mousewheel     enable scrolling via mouse wheel or buttons 4 & 5
1347   --enable-slipwheeling   enable slip wheel scrolling (requires --enable-mousewheel)
1348   --enable-smart-resize   enable smart growth/shrink behaviour
1349   --enable-text-blink     enable blinking text
1350   --enable-pointer-blank  enable pointer blank when typing or inactive pointer
1351   --enable-utmp           enable utmp (utmpx) support
1352   --enable-wtmp           enable wtmp (wtmpx) support (requires --enable-utmp)
1353   --enable-lastlog        enable lastlog support (requires --enable-utmp)
1354
1355 Optional Packages:
1356   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1357   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1358   --with-afterimage-config=DIR  use libAfterImage config script in DIR
1359   --with-codesets=CS,...  compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)
1360   --with-res-name=NAME    use this as default resource name (default: urxvt)
1361   --with-res-class=CLASS  use this as the resource class (default: URxvt)
1362   --with-name=NAME        set the basename for the installed binaries (default: urxvt)
1363   --with-term=NAME        set the terminal to NAME (default: rxvt)
1364   --with-terminfo=PATH    set the path to the terminfo tree to PATH
1365   --with-x                use the X Window System
1366
1367 Some influential environment variables:
1368   CC          C compiler command
1369   CFLAGS      C compiler flags
1370   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1371               nonstandard directory <lib dir>
1372   LIBS        libraries to pass to the linker, e.g. -l<library>
1373   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1374               you have headers in a nonstandard directory <include dir>
1375   CXX         C++ compiler command
1376   CXXFLAGS    C++ compiler flags
1377   CPP         C preprocessor
1378   CXXCPP      C++ preprocessor
1379   XMKMF       Path to xmkmf, Makefile generator for X Window System
1380
1381 Use these variables to override the choices made by `configure' or to help
1382 it to find libraries and programs with nonstandard names/locations.
1383
1384 _ACEOF
1385 ac_status=$?
1386 fi
1387
1388 if test "$ac_init_help" = "recursive"; then
1389   # If there are subdirs, report their specific --help.
1390   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1391     test -d "$ac_dir" || continue
1392     ac_builddir=.
1393
1394 case "$ac_dir" in
1395 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1396 *)
1397   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1398   # A ".." for each directory in $ac_dir_suffix.
1399   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1400   case $ac_top_builddir_sub in
1401   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1402   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1403   esac ;;
1404 esac
1405 ac_abs_top_builddir=$ac_pwd
1406 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1407 # for backward compatibility:
1408 ac_top_builddir=$ac_top_build_prefix
1409
1410 case $srcdir in
1411   .)  # We are building in place.
1412     ac_srcdir=.
1413     ac_top_srcdir=$ac_top_builddir_sub
1414     ac_abs_top_srcdir=$ac_pwd ;;
1415   [\\/]* | ?:[\\/]* )  # Absolute name.
1416     ac_srcdir=$srcdir$ac_dir_suffix;
1417     ac_top_srcdir=$srcdir
1418     ac_abs_top_srcdir=$srcdir ;;
1419   *) # Relative name.
1420     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1421     ac_top_srcdir=$ac_top_build_prefix$srcdir
1422     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1423 esac
1424 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1425
1426     cd "$ac_dir" || { ac_status=$?; continue; }
1427     # Check for guested configure.
1428     if test -f "$ac_srcdir/configure.gnu"; then
1429       echo &&
1430       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1431     elif test -f "$ac_srcdir/configure"; then
1432       echo &&
1433       $SHELL "$ac_srcdir/configure" --help=recursive
1434     else
1435       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1436     fi || ac_status=$?
1437     cd "$ac_pwd" || { ac_status=$?; break; }
1438   done
1439 fi
1440
1441 test -n "$ac_init_help" && exit $ac_status
1442 if $ac_init_version; then
1443   cat <<\_ACEOF
1444 configure
1445 generated by GNU Autoconf 2.61
1446
1447 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1448 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1449 This configure script is free software; the Free Software Foundation
1450 gives unlimited permission to copy, distribute and modify it.
1451 _ACEOF
1452   exit
1453 fi
1454 cat >config.log <<_ACEOF
1455 This file contains any messages produced by compilers while
1456 running configure, to aid debugging if configure makes a mistake.
1457
1458 It was created by $as_me, which was
1459 generated by GNU Autoconf 2.61.  Invocation command line was
1460
1461   $ $0 $@
1462
1463 _ACEOF
1464 exec 5>>config.log
1465 {
1466 cat <<_ASUNAME
1467 ## --------- ##
1468 ## Platform. ##
1469 ## --------- ##
1470
1471 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1472 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1473 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1474 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1475 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1476
1477 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1478 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1479
1480 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1481 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1482 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1483 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1484 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1485 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1486 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1487
1488 _ASUNAME
1489
1490 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1491 for as_dir in $PATH
1492 do
1493   IFS=$as_save_IFS
1494   test -z "$as_dir" && as_dir=.
1495   echo "PATH: $as_dir"
1496 done
1497 IFS=$as_save_IFS
1498
1499 } >&5
1500
1501 cat >&5 <<_ACEOF
1502
1503
1504 ## ----------- ##
1505 ## Core tests. ##
1506 ## ----------- ##
1507
1508 _ACEOF
1509
1510
1511 # Keep a trace of the command line.
1512 # Strip out --no-create and --no-recursion so they do not pile up.
1513 # Strip out --silent because we don't want to record it for future runs.
1514 # Also quote any args containing shell meta-characters.
1515 # Make two passes to allow for proper duplicate-argument suppression.
1516 ac_configure_args=
1517 ac_configure_args0=
1518 ac_configure_args1=
1519 ac_must_keep_next=false
1520 for ac_pass in 1 2
1521 do
1522   for ac_arg
1523   do
1524     case $ac_arg in
1525     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1526     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1527     | -silent | --silent | --silen | --sile | --sil)
1528       continue ;;
1529     *\'*)
1530       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1531     esac
1532     case $ac_pass in
1533     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1534     2)
1535       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1536       if test $ac_must_keep_next = true; then
1537         ac_must_keep_next=false # Got value, back to normal.
1538       else
1539         case $ac_arg in
1540           *=* | --config-cache | -C | -disable-* | --disable-* \
1541           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1542           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1543           | -with-* | --with-* | -without-* | --without-* | --x)
1544             case "$ac_configure_args0 " in
1545               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1546             esac
1547             ;;
1548           -* ) ac_must_keep_next=true ;;
1549         esac
1550       fi
1551       ac_configure_args="$ac_configure_args '$ac_arg'"
1552       ;;
1553     esac
1554   done
1555 done
1556 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1557 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1558
1559 # When interrupted or exit'd, cleanup temporary files, and complete
1560 # config.log.  We remove comments because anyway the quotes in there
1561 # would cause problems or look ugly.
1562 # WARNING: Use '\'' to represent an apostrophe within the trap.
1563 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1564 trap 'exit_status=$?
1565   # Save into config.log some information that might help in debugging.
1566   {
1567     echo
1568
1569     cat <<\_ASBOX
1570 ## ---------------- ##
1571 ## Cache variables. ##
1572 ## ---------------- ##
1573 _ASBOX
1574     echo
1575     # The following way of writing the cache mishandles newlines in values,
1576 (
1577   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1578     eval ac_val=\$$ac_var
1579     case $ac_val in #(
1580     *${as_nl}*)
1581       case $ac_var in #(
1582       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1583 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1584       esac
1585       case $ac_var in #(
1586       _ | IFS | as_nl) ;; #(
1587       *) $as_unset $ac_var ;;
1588       esac ;;
1589     esac
1590   done
1591   (set) 2>&1 |
1592     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1593     *${as_nl}ac_space=\ *)
1594       sed -n \
1595         "s/'\''/'\''\\\\'\'''\''/g;
1596           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1597       ;; #(
1598     *)
1599       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1600       ;;
1601     esac |
1602     sort
1603 )
1604     echo
1605
1606     cat <<\_ASBOX
1607 ## ----------------- ##
1608 ## Output variables. ##
1609 ## ----------------- ##
1610 _ASBOX
1611     echo
1612     for ac_var in $ac_subst_vars
1613     do
1614       eval ac_val=\$$ac_var
1615       case $ac_val in
1616       *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1617       esac
1618       echo "$ac_var='\''$ac_val'\''"
1619     done | sort
1620     echo
1621
1622     if test -n "$ac_subst_files"; then
1623       cat <<\_ASBOX
1624 ## ------------------- ##
1625 ## File substitutions. ##
1626 ## ------------------- ##
1627 _ASBOX
1628       echo
1629       for ac_var in $ac_subst_files
1630       do
1631         eval ac_val=\$$ac_var
1632         case $ac_val in
1633         *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1634         esac
1635         echo "$ac_var='\''$ac_val'\''"
1636       done | sort
1637       echo
1638     fi
1639
1640     if test -s confdefs.h; then
1641       cat <<\_ASBOX
1642 ## ----------- ##
1643 ## confdefs.h. ##
1644 ## ----------- ##
1645 _ASBOX
1646       echo
1647       cat confdefs.h
1648       echo
1649     fi
1650     test "$ac_signal" != 0 &&
1651       echo "$as_me: caught signal $ac_signal"
1652     echo "$as_me: exit $exit_status"
1653   } >&5
1654   rm -f core *.core core.conftest.* &&
1655     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1656     exit $exit_status
1657 ' 0
1658 for ac_signal in 1 2 13 15; do
1659   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1660 done
1661 ac_signal=0
1662
1663 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1664 rm -f -r conftest* confdefs.h
1665
1666 # Predefined preprocessor variables.
1667
1668 cat >>confdefs.h <<_ACEOF
1669 #define PACKAGE_NAME "$PACKAGE_NAME"
1670 _ACEOF
1671
1672
1673 cat >>confdefs.h <<_ACEOF
1674 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1675 _ACEOF
1676
1677
1678 cat >>confdefs.h <<_ACEOF
1679 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1680 _ACEOF
1681
1682
1683 cat >>confdefs.h <<_ACEOF
1684 #define PACKAGE_STRING "$PACKAGE_STRING"
1685 _ACEOF
1686
1687
1688 cat >>confdefs.h <<_ACEOF
1689 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1690 _ACEOF
1691
1692
1693 # Let the site file select an alternate cache file if it wants to.
1694 # Prefer explicitly selected file to automatically selected ones.
1695 if test -n "$CONFIG_SITE"; then
1696   set x "$CONFIG_SITE"
1697 elif test "x$prefix" != xNONE; then
1698   set x "$prefix/share/config.site" "$prefix/etc/config.site"
1699 else
1700   set x "$ac_default_prefix/share/config.site" \
1701         "$ac_default_prefix/etc/config.site"
1702 fi
1703 shift
1704 for ac_site_file
1705 do
1706   if test -r "$ac_site_file"; then
1707     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1708 echo "$as_me: loading site script $ac_site_file" >&6;}
1709     sed 's/^/| /' "$ac_site_file" >&5
1710     . "$ac_site_file"
1711   fi
1712 done
1713
1714 if test -r "$cache_file"; then
1715   # Some versions of bash will fail to source /dev/null (special
1716   # files actually), so we avoid doing that.
1717   if test -f "$cache_file"; then
1718     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1719 echo "$as_me: loading cache $cache_file" >&6;}
1720     case $cache_file in
1721       [\\/]* | ?:[\\/]* ) . "$cache_file";;
1722       *)                      . "./$cache_file";;
1723     esac
1724   fi
1725 else
1726   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1727 echo "$as_me: creating cache $cache_file" >&6;}
1728   >$cache_file
1729 fi
1730
1731 # Check that the precious variables saved in the cache have kept the same
1732 # value.
1733 ac_cache_corrupted=false
1734 for ac_var in $ac_precious_vars; do
1735   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1736   eval ac_new_set=\$ac_env_${ac_var}_set
1737   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1738   eval ac_new_val=\$ac_env_${ac_var}_value
1739   case $ac_old_set,$ac_new_set in
1740     set,)
1741       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1742 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1743       ac_cache_corrupted=: ;;
1744     ,set)
1745       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1746 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1747       ac_cache_corrupted=: ;;
1748     ,);;
1749     *)
1750       if test "x$ac_old_val" != "x$ac_new_val"; then
1751         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1752 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1753         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1754 echo "$as_me:   former value:  $ac_old_val" >&2;}
1755         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1756 echo "$as_me:   current value: $ac_new_val" >&2;}
1757         ac_cache_corrupted=:
1758       fi;;
1759   esac
1760   # Pass precious variables to config.status.
1761   if test "$ac_new_set" = set; then
1762     case $ac_new_val in
1763     *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1764     *) ac_arg=$ac_var=$ac_new_val ;;
1765     esac
1766     case " $ac_configure_args " in
1767       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1768       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1769     esac
1770   fi
1771 done
1772 if $ac_cache_corrupted; then
1773   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1774 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1775   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1776 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1777    { (exit 1); exit 1; }; }
1778 fi
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796 ac_ext=c
1797 ac_cpp='$CPP $CPPFLAGS'
1798 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1799 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1800 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1801
1802
1803
1804
1805 ac_config_headers="$ac_config_headers config.h:config.h.in"
1806
1807
1808 ac_aux_dir=
1809 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
1810   if test -f "$ac_dir/install-sh"; then
1811     ac_aux_dir=$ac_dir
1812     ac_install_sh="$ac_aux_dir/install-sh -c"
1813     break
1814   elif test -f "$ac_dir/install.sh"; then
1815     ac_aux_dir=$ac_dir
1816     ac_install_sh="$ac_aux_dir/install.sh -c"
1817     break
1818   elif test -f "$ac_dir/shtool"; then
1819     ac_aux_dir=$ac_dir
1820     ac_install_sh="$ac_aux_dir/shtool install -c"
1821     break
1822   fi
1823 done
1824 if test -z "$ac_aux_dir"; then
1825   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
1826 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
1827    { (exit 1); exit 1; }; }
1828 fi
1829
1830 # These three variables are undocumented and unsupported,
1831 # and are intended to be withdrawn in a future Autoconf release.
1832 # They can cause serious problems if a builder's source tree is in a directory
1833 # whose full name contains unusual characters.
1834 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
1835 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
1836 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
1837
1838
1839 # Make sure we can run config.sub.
1840 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
1841   { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
1842 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
1843    { (exit 1); exit 1; }; }
1844
1845 { echo "$as_me:$LINENO: checking build system type" >&5
1846 echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
1847 if test "${ac_cv_build+set}" = set; then
1848   echo $ECHO_N "(cached) $ECHO_C" >&6
1849 else
1850   ac_build_alias=$build_alias
1851 test "x$ac_build_alias" = x &&
1852   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
1853 test "x$ac_build_alias" = x &&
1854   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1855 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1856    { (exit 1); exit 1; }; }
1857 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
1858   { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
1859 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
1860    { (exit 1); exit 1; }; }
1861
1862 fi
1863 { echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1864 echo "${ECHO_T}$ac_cv_build" >&6; }
1865 case $ac_cv_build in
1866 *-*-*) ;;
1867 *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
1868 echo "$as_me: error: invalid value of canonical build" >&2;}
1869    { (exit 1); exit 1; }; };;
1870 esac
1871 build=$ac_cv_build
1872 ac_save_IFS=$IFS; IFS='-'
1873 set x $ac_cv_build
1874 shift
1875 build_cpu=$1
1876 build_vendor=$2
1877 shift; shift
1878 # Remember, the first character of IFS is used to create $*,
1879 # except with old shells:
1880 build_os=$*
1881 IFS=$ac_save_IFS
1882 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
1883
1884
1885 { echo "$as_me:$LINENO: checking host system type" >&5
1886 echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
1887 if test "${ac_cv_host+set}" = set; then
1888   echo $ECHO_N "(cached) $ECHO_C" >&6
1889 else
1890   if test "x$host_alias" = x; then
1891   ac_cv_host=$ac_cv_build
1892 else
1893   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
1894     { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
1895 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
1896    { (exit 1); exit 1; }; }
1897 fi
1898
1899 fi
1900 { echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1901 echo "${ECHO_T}$ac_cv_host" >&6; }
1902 case $ac_cv_host in
1903 *-*-*) ;;
1904 *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
1905 echo "$as_me: error: invalid value of canonical host" >&2;}
1906    { (exit 1); exit 1; }; };;
1907 esac
1908 host=$ac_cv_host
1909 ac_save_IFS=$IFS; IFS='-'
1910 set x $ac_cv_host
1911 shift
1912 host_cpu=$1
1913 host_vendor=$2
1914 shift; shift
1915 # Remember, the first character of IFS is used to create $*,
1916 # except with old shells:
1917 host_os=$*
1918 IFS=$ac_save_IFS
1919 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
1920
1921
1922
1923 VERSION=`sed -n -e 's/^.*[ \t]VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
1924 DATE=`sed -n -e 's/^.*[ \t]DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
1925
1926 echo ""
1927 echo "configuring for rxvt $VERSION"
1928 echo ""
1929
1930 orig_CXXFLAGS="$CXXFLAGS"
1931
1932
1933 ac_ext=c
1934 ac_cpp='$CPP $CPPFLAGS'
1935 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1936 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1937 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1938 if test -n "$ac_tool_prefix"; then
1939   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1940 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1941 { echo "$as_me:$LINENO: checking for $ac_word" >&5
1942 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
1943 if test "${ac_cv_prog_CC+set}" = set; then
1944   echo $ECHO_N "(cached) $ECHO_C" >&6
1945 else
1946   if test -n "$CC"; then
1947   ac_cv_prog_CC="$CC" # Let the user override the test.
1948 else
1949 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1950 for as_dir in $PATH
1951 do
1952   IFS=$as_save_IFS
1953   test -z "$as_dir" && as_dir=.
1954   for ac_exec_ext in '' $ac_executable_extensions; do
1955   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1956     ac_cv_prog_CC="${ac_tool_prefix}gcc"
1957     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1958     break 2
1959   fi
1960 done
1961 done
1962 IFS=$as_save_IFS
1963
1964 fi
1965 fi
1966 CC=$ac_cv_prog_CC
1967 if test -n "$CC"; then
1968   { echo "$as_me:$LINENO: result: $CC" >&5
1969 echo "${ECHO_T}$CC" >&6; }
1970 else
1971   { echo "$as_me:$LINENO: result: no" >&5
1972 echo "${ECHO_T}no" >&6; }
1973 fi
1974
1975
1976 fi
1977 if test -z "$ac_cv_prog_CC"; then
1978   ac_ct_CC=$CC
1979   # Extract the first word of "gcc", so it can be a program name with args.
1980 set dummy gcc; ac_word=$2
1981 { echo "$as_me:$LINENO: checking for $ac_word" >&5
1982 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
1983 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1984   echo $ECHO_N "(cached) $ECHO_C" >&6
1985 else
1986   if test -n "$ac_ct_CC"; then
1987   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1988 else
1989 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1990 for as_dir in $PATH
1991 do
1992   IFS=$as_save_IFS
1993   test -z "$as_dir" && as_dir=.
1994   for ac_exec_ext in '' $ac_executable_extensions; do
1995   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1996     ac_cv_prog_ac_ct_CC="gcc"
1997     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1998     break 2
1999   fi
2000 done
2001 done
2002 IFS=$as_save_IFS
2003
2004 fi
2005 fi
2006 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2007 if test -n "$ac_ct_CC"; then
2008   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2009 echo "${ECHO_T}$ac_ct_CC" >&6; }
2010 else
2011   { echo "$as_me:$LINENO: result: no" >&5
2012 echo "${ECHO_T}no" >&6; }
2013 fi
2014
2015   if test "x$ac_ct_CC" = x; then
2016     CC=""
2017   else
2018     case $cross_compiling:$ac_tool_warned in
2019 yes:)
2020 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2021 whose name does not start with the host triplet.  If you think this
2022 configuration is useful to you, please write to autoconf@gnu.org." >&5
2023 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2024 whose name does not start with the host triplet.  If you think this
2025 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2026 ac_tool_warned=yes ;;
2027 esac
2028     CC=$ac_ct_CC
2029   fi
2030 else
2031   CC="$ac_cv_prog_CC"
2032 fi
2033
2034 if test -z "$CC"; then
2035           if test -n "$ac_tool_prefix"; then
2036     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2037 set dummy ${ac_tool_prefix}cc; ac_word=$2
2038 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2039 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2040 if test "${ac_cv_prog_CC+set}" = set; then
2041   echo $ECHO_N "(cached) $ECHO_C" >&6
2042 else
2043   if test -n "$CC"; then
2044   ac_cv_prog_CC="$CC" # Let the user override the test.
2045 else
2046 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2047 for as_dir in $PATH
2048 do
2049   IFS=$as_save_IFS
2050   test -z "$as_dir" && as_dir=.
2051   for ac_exec_ext in '' $ac_executable_extensions; do
2052   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2053     ac_cv_prog_CC="${ac_tool_prefix}cc"
2054     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2055     break 2
2056   fi
2057 done
2058 done
2059 IFS=$as_save_IFS
2060
2061 fi
2062 fi
2063 CC=$ac_cv_prog_CC
2064 if test -n "$CC"; then
2065   { echo "$as_me:$LINENO: result: $CC" >&5
2066 echo "${ECHO_T}$CC" >&6; }
2067 else
2068   { echo "$as_me:$LINENO: result: no" >&5
2069 echo "${ECHO_T}no" >&6; }
2070 fi
2071
2072
2073   fi
2074 fi
2075 if test -z "$CC"; then
2076   # Extract the first word of "cc", so it can be a program name with args.
2077 set dummy cc; ac_word=$2
2078 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2079 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2080 if test "${ac_cv_prog_CC+set}" = set; then
2081   echo $ECHO_N "(cached) $ECHO_C" >&6
2082 else
2083   if test -n "$CC"; then
2084   ac_cv_prog_CC="$CC" # Let the user override the test.
2085 else
2086   ac_prog_rejected=no
2087 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2088 for as_dir in $PATH
2089 do
2090   IFS=$as_save_IFS
2091   test -z "$as_dir" && as_dir=.
2092   for ac_exec_ext in '' $ac_executable_extensions; do
2093   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2094     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2095        ac_prog_rejected=yes
2096        continue
2097      fi
2098     ac_cv_prog_CC="cc"
2099     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2100     break 2
2101   fi
2102 done
2103 done
2104 IFS=$as_save_IFS
2105
2106 if test $ac_prog_rejected = yes; then
2107   # We found a bogon in the path, so make sure we never use it.
2108   set dummy $ac_cv_prog_CC
2109   shift
2110   if test $# != 0; then
2111     # We chose a different compiler from the bogus one.
2112     # However, it has the same basename, so the bogon will be chosen
2113     # first if we set CC to just the basename; use the full file name.
2114     shift
2115     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2116   fi
2117 fi
2118 fi
2119 fi
2120 CC=$ac_cv_prog_CC
2121 if test -n "$CC"; then
2122   { echo "$as_me:$LINENO: result: $CC" >&5
2123 echo "${ECHO_T}$CC" >&6; }
2124 else
2125   { echo "$as_me:$LINENO: result: no" >&5
2126 echo "${ECHO_T}no" >&6; }
2127 fi
2128
2129
2130 fi
2131 if test -z "$CC"; then
2132   if test -n "$ac_tool_prefix"; then
2133   for ac_prog in cl.exe
2134   do
2135     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2136 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2137 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2138 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2139 if test "${ac_cv_prog_CC+set}" = set; then
2140   echo $ECHO_N "(cached) $ECHO_C" >&6
2141 else
2142   if test -n "$CC"; then
2143   ac_cv_prog_CC="$CC" # Let the user override the test.
2144 else
2145 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2146 for as_dir in $PATH
2147 do
2148   IFS=$as_save_IFS
2149   test -z "$as_dir" && as_dir=.
2150   for ac_exec_ext in '' $ac_executable_extensions; do
2151   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2152     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2153     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2154     break 2
2155   fi
2156 done
2157 done
2158 IFS=$as_save_IFS
2159
2160 fi
2161 fi
2162 CC=$ac_cv_prog_CC
2163 if test -n "$CC"; then
2164   { echo "$as_me:$LINENO: result: $CC" >&5
2165 echo "${ECHO_T}$CC" >&6; }
2166 else
2167   { echo "$as_me:$LINENO: result: no" >&5
2168 echo "${ECHO_T}no" >&6; }
2169 fi
2170
2171
2172     test -n "$CC" && break
2173   done
2174 fi
2175 if test -z "$CC"; then
2176   ac_ct_CC=$CC
2177   for ac_prog in cl.exe
2178 do
2179   # Extract the first word of "$ac_prog", so it can be a program name with args.
2180 set dummy $ac_prog; ac_word=$2
2181 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2182 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2183 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2184   echo $ECHO_N "(cached) $ECHO_C" >&6
2185 else
2186   if test -n "$ac_ct_CC"; then
2187   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2188 else
2189 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2190 for as_dir in $PATH
2191 do
2192   IFS=$as_save_IFS
2193   test -z "$as_dir" && as_dir=.
2194   for ac_exec_ext in '' $ac_executable_extensions; do
2195   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2196     ac_cv_prog_ac_ct_CC="$ac_prog"
2197     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2198     break 2
2199   fi
2200 done
2201 done
2202 IFS=$as_save_IFS
2203
2204 fi
2205 fi
2206 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2207 if test -n "$ac_ct_CC"; then
2208   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2209 echo "${ECHO_T}$ac_ct_CC" >&6; }
2210 else
2211   { echo "$as_me:$LINENO: result: no" >&5
2212 echo "${ECHO_T}no" >&6; }
2213 fi
2214
2215
2216   test -n "$ac_ct_CC" && break
2217 done
2218
2219   if test "x$ac_ct_CC" = x; then
2220     CC=""
2221   else
2222     case $cross_compiling:$ac_tool_warned in
2223 yes:)
2224 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2225 whose name does not start with the host triplet.  If you think this
2226 configuration is useful to you, please write to autoconf@gnu.org." >&5
2227 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2228 whose name does not start with the host triplet.  If you think this
2229 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2230 ac_tool_warned=yes ;;
2231 esac
2232     CC=$ac_ct_CC
2233   fi
2234 fi
2235
2236 fi
2237
2238
2239 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2240 See \`config.log' for more details." >&5
2241 echo "$as_me: error: no acceptable C compiler found in \$PATH
2242 See \`config.log' for more details." >&2;}
2243    { (exit 1); exit 1; }; }
2244
2245 # Provide some information about the compiler.
2246 echo "$as_me:$LINENO: checking for C compiler version" >&5
2247 ac_compiler=`set X $ac_compile; echo $2`
2248 { (ac_try="$ac_compiler --version >&5"
2249 case "(($ac_try" in
2250   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2251   *) ac_try_echo=$ac_try;;
2252 esac
2253 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2254   (eval "$ac_compiler --version >&5") 2>&5
2255   ac_status=$?
2256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2257   (exit $ac_status); }
2258 { (ac_try="$ac_compiler -v >&5"
2259 case "(($ac_try" in
2260   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2261   *) ac_try_echo=$ac_try;;
2262 esac
2263 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2264   (eval "$ac_compiler -v >&5") 2>&5
2265   ac_status=$?
2266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2267   (exit $ac_status); }
2268 { (ac_try="$ac_compiler -V >&5"
2269 case "(($ac_try" in
2270   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2271   *) ac_try_echo=$ac_try;;
2272 esac
2273 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2274   (eval "$ac_compiler -V >&5") 2>&5
2275   ac_status=$?
2276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2277   (exit $ac_status); }
2278
2279 cat >conftest.$ac_ext <<_ACEOF
2280 /* confdefs.h.  */
2281 _ACEOF
2282 cat confdefs.h >>conftest.$ac_ext
2283 cat >>conftest.$ac_ext <<_ACEOF
2284 /* end confdefs.h.  */
2285
2286 int
2287 main ()
2288 {
2289
2290   ;
2291   return 0;
2292 }
2293 _ACEOF
2294 ac_clean_files_save=$ac_clean_files
2295 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2296 # Try to create an executable without -o first, disregard a.out.
2297 # It will help us diagnose broken compilers, and finding out an intuition
2298 # of exeext.
2299 { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2300 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2301 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2302 #
2303 # List of possible output files, starting from the most likely.
2304 # The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2305 # only as a last resort.  b.out is created by i960 compilers.
2306 ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2307 #
2308 # The IRIX 6 linker writes into existing files which may not be
2309 # executable, retaining their permissions.  Remove them first so a
2310 # subsequent execution test works.
2311 ac_rmfiles=
2312 for ac_file in $ac_files
2313 do
2314   case $ac_file in
2315     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2316     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2317   esac
2318 done
2319 rm -f $ac_rmfiles
2320
2321 if { (ac_try="$ac_link_default"
2322 case "(($ac_try" in
2323   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2324   *) ac_try_echo=$ac_try;;
2325 esac
2326 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2327   (eval "$ac_link_default") 2>&5
2328   ac_status=$?
2329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2330   (exit $ac_status); }; then
2331   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2332 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2333 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2334 # so that the user can short-circuit this test for compilers unknown to
2335 # Autoconf.
2336 for ac_file in $ac_files ''
2337 do
2338   test -f "$ac_file" || continue
2339   case $ac_file in
2340     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2341         ;;
2342     [ab].out )
2343         # We found the default executable, but exeext='' is most
2344         # certainly right.
2345         break;;
2346     *.* )
2347         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2348         then :; else
2349            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2350         fi
2351         # We set ac_cv_exeext here because the later test for it is not
2352         # safe: cross compilers may not add the suffix if given an `-o'
2353         # argument, so we may need to know it at that point already.
2354         # Even if this section looks crufty: it has the advantage of
2355         # actually working.
2356         break;;
2357     * )
2358         break;;
2359   esac
2360 done
2361 test "$ac_cv_exeext" = no && ac_cv_exeext=
2362
2363 else
2364   ac_file=''
2365 fi
2366
2367 { echo "$as_me:$LINENO: result: $ac_file" >&5
2368 echo "${ECHO_T}$ac_file" >&6; }
2369 if test -z "$ac_file"; then
2370   echo "$as_me: failed program was:" >&5
2371 sed 's/^/| /' conftest.$ac_ext >&5
2372
2373 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2374 See \`config.log' for more details." >&5
2375 echo "$as_me: error: C compiler cannot create executables
2376 See \`config.log' for more details." >&2;}
2377    { (exit 77); exit 77; }; }
2378 fi
2379
2380 ac_exeext=$ac_cv_exeext
2381
2382 # Check that the compiler produces executables we can run.  If not, either
2383 # the compiler is broken, or we cross compile.
2384 { echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2385 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2386 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2387 # If not cross compiling, check that we can run a simple program.
2388 if test "$cross_compiling" != yes; then
2389   if { ac_try='./$ac_file'
2390   { (case "(($ac_try" in
2391   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2392   *) ac_try_echo=$ac_try;;
2393 esac
2394 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2395   (eval "$ac_try") 2>&5
2396   ac_status=$?
2397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2398   (exit $ac_status); }; }; then
2399     cross_compiling=no
2400   else
2401     if test "$cross_compiling" = maybe; then
2402         cross_compiling=yes
2403     else
2404         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2405 If you meant to cross compile, use \`--host'.
2406 See \`config.log' for more details." >&5
2407 echo "$as_me: error: cannot run C compiled programs.
2408 If you meant to cross compile, use \`--host'.
2409 See \`config.log' for more details." >&2;}
2410    { (exit 1); exit 1; }; }
2411     fi
2412   fi
2413 fi
2414 { echo "$as_me:$LINENO: result: yes" >&5
2415 echo "${ECHO_T}yes" >&6; }
2416
2417 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2418 ac_clean_files=$ac_clean_files_save
2419 # Check that the compiler produces executables we can run.  If not, either
2420 # the compiler is broken, or we cross compile.
2421 { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2422 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2423 { echo "$as_me:$LINENO: result: $cross_compiling" >&5
2424 echo "${ECHO_T}$cross_compiling" >&6; }
2425
2426 { echo "$as_me:$LINENO: checking for suffix of executables" >&5
2427 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2428 if { (ac_try="$ac_link"
2429 case "(($ac_try" in
2430   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2431   *) ac_try_echo=$ac_try;;
2432 esac
2433 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2434   (eval "$ac_link") 2>&5
2435   ac_status=$?
2436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2437   (exit $ac_status); }; then
2438   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2439 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2440 # work properly (i.e., refer to `conftest.exe'), while it won't with
2441 # `rm'.
2442 for ac_file in conftest.exe conftest conftest.*; do
2443   test -f "$ac_file" || continue
2444   case $ac_file in
2445     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2446     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2447           break;;
2448     * ) break;;
2449   esac
2450 done
2451 else
2452   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2453 See \`config.log' for more details." >&5
2454 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2455 See \`config.log' for more details." >&2;}
2456    { (exit 1); exit 1; }; }
2457 fi
2458
2459 rm -f conftest$ac_cv_exeext
2460 { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2461 echo "${ECHO_T}$ac_cv_exeext" >&6; }
2462
2463 rm -f conftest.$ac_ext
2464 EXEEXT=$ac_cv_exeext
2465 ac_exeext=$EXEEXT
2466 { echo "$as_me:$LINENO: checking for suffix of object files" >&5
2467 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
2468 if test "${ac_cv_objext+set}" = set; then
2469   echo $ECHO_N "(cached) $ECHO_C" >&6
2470 else
2471   cat >conftest.$ac_ext <<_ACEOF
2472 /* confdefs.h.  */
2473 _ACEOF
2474 cat confdefs.h >>conftest.$ac_ext
2475 cat >>conftest.$ac_ext <<_ACEOF
2476 /* end confdefs.h.  */
2477
2478 int
2479 main ()
2480 {
2481
2482   ;
2483   return 0;
2484 }
2485 _ACEOF
2486 rm -f conftest.o conftest.obj
2487 if { (ac_try="$ac_compile"
2488 case "(($ac_try" in
2489   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2490   *) ac_try_echo=$ac_try;;
2491 esac
2492 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2493   (eval "$ac_compile") 2>&5
2494   ac_status=$?
2495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2496   (exit $ac_status); }; then
2497   for ac_file in conftest.o conftest.obj conftest.*; do
2498   test -f "$ac_file" || continue;
2499   case $ac_file in
2500     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
2501     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2502        break;;
2503   esac
2504 done
2505 else
2506   echo "$as_me: failed program was:" >&5
2507 sed 's/^/| /' conftest.$ac_ext >&5
2508
2509 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2510 See \`config.log' for more details." >&5
2511 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2512 See \`config.log' for more details." >&2;}
2513    { (exit 1); exit 1; }; }
2514 fi
2515
2516 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2517 fi
2518 { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2519 echo "${ECHO_T}$ac_cv_objext" >&6; }
2520 OBJEXT=$ac_cv_objext
2521 ac_objext=$OBJEXT
2522 { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2523 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
2524 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2525   echo $ECHO_N "(cached) $ECHO_C" >&6
2526 else
2527   cat >conftest.$ac_ext <<_ACEOF
2528 /* confdefs.h.  */
2529 _ACEOF
2530 cat confdefs.h >>conftest.$ac_ext
2531 cat >>conftest.$ac_ext <<_ACEOF
2532 /* end confdefs.h.  */
2533
2534 int
2535 main ()
2536 {
2537 #ifndef __GNUC__
2538        choke me
2539 #endif
2540
2541   ;
2542   return 0;
2543 }
2544 _ACEOF
2545 rm -f conftest.$ac_objext
2546 if { (ac_try="$ac_compile"
2547 case "(($ac_try" in
2548   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2549   *) ac_try_echo=$ac_try;;
2550 esac
2551 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2552   (eval "$ac_compile") 2>conftest.er1
2553   ac_status=$?
2554   grep -v '^ *+' conftest.er1 >conftest.err
2555   rm -f conftest.er1
2556   cat conftest.err >&5
2557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2558   (exit $ac_status); } && {
2559          test -z "$ac_c_werror_flag" ||
2560          test ! -s conftest.err
2561        } && test -s conftest.$ac_objext; then
2562   ac_compiler_gnu=yes
2563 else
2564   echo "$as_me: failed program was:" >&5
2565 sed 's/^/| /' conftest.$ac_ext >&5
2566
2567         ac_compiler_gnu=no
2568 fi
2569
2570 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2571 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2572
2573 fi
2574 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2575 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2576 GCC=`test $ac_compiler_gnu = yes && echo yes`
2577 ac_test_CFLAGS=${CFLAGS+set}
2578 ac_save_CFLAGS=$CFLAGS
2579 { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2580 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
2581 if test "${ac_cv_prog_cc_g+set}" = set; then
2582   echo $ECHO_N "(cached) $ECHO_C" >&6
2583 else
2584   ac_save_c_werror_flag=$ac_c_werror_flag
2585    ac_c_werror_flag=yes
2586    ac_cv_prog_cc_g=no
2587    CFLAGS="-g"
2588    cat >conftest.$ac_ext <<_ACEOF
2589 /* confdefs.h.  */
2590 _ACEOF
2591 cat confdefs.h >>conftest.$ac_ext
2592 cat >>conftest.$ac_ext <<_ACEOF
2593 /* end confdefs.h.  */
2594
2595 int
2596 main ()
2597 {
2598
2599   ;
2600   return 0;
2601 }
2602 _ACEOF
2603 rm -f conftest.$ac_objext
2604 if { (ac_try="$ac_compile"
2605 case "(($ac_try" in
2606   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2607   *) ac_try_echo=$ac_try;;
2608 esac
2609 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2610   (eval "$ac_compile") 2>conftest.er1
2611   ac_status=$?
2612   grep -v '^ *+' conftest.er1 >conftest.err
2613   rm -f conftest.er1
2614   cat conftest.err >&5
2615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2616   (exit $ac_status); } && {
2617          test -z "$ac_c_werror_flag" ||
2618          test ! -s conftest.err
2619        } && test -s conftest.$ac_objext; then
2620   ac_cv_prog_cc_g=yes
2621 else
2622   echo "$as_me: failed program was:" >&5
2623 sed 's/^/| /' conftest.$ac_ext >&5
2624
2625         CFLAGS=""
2626       cat >conftest.$ac_ext <<_ACEOF
2627 /* confdefs.h.  */
2628 _ACEOF
2629 cat confdefs.h >>conftest.$ac_ext
2630 cat >>conftest.$ac_ext <<_ACEOF
2631 /* end confdefs.h.  */
2632
2633 int
2634 main ()
2635 {
2636
2637   ;
2638   return 0;
2639 }
2640 _ACEOF
2641 rm -f conftest.$ac_objext
2642 if { (ac_try="$ac_compile"
2643 case "(($ac_try" in
2644   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2645   *) ac_try_echo=$ac_try;;
2646 esac
2647 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2648   (eval "$ac_compile") 2>conftest.er1
2649   ac_status=$?
2650   grep -v '^ *+' conftest.er1 >conftest.err
2651   rm -f conftest.er1
2652   cat conftest.err >&5
2653   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2654   (exit $ac_status); } && {
2655          test -z "$ac_c_werror_flag" ||
2656          test ! -s conftest.err
2657        } && test -s conftest.$ac_objext; then
2658   :
2659 else
2660   echo "$as_me: failed program was:" >&5
2661 sed 's/^/| /' conftest.$ac_ext >&5
2662
2663         ac_c_werror_flag=$ac_save_c_werror_flag
2664          CFLAGS="-g"
2665          cat >conftest.$ac_ext <<_ACEOF
2666 /* confdefs.h.  */
2667 _ACEOF
2668 cat confdefs.h >>conftest.$ac_ext
2669 cat >>conftest.$ac_ext <<_ACEOF
2670 /* end confdefs.h.  */
2671
2672 int
2673 main ()
2674 {
2675
2676   ;
2677   return 0;
2678 }
2679 _ACEOF
2680 rm -f conftest.$ac_objext
2681 if { (ac_try="$ac_compile"
2682 case "(($ac_try" in
2683   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2684   *) ac_try_echo=$ac_try;;
2685 esac
2686 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2687   (eval "$ac_compile") 2>conftest.er1
2688   ac_status=$?
2689   grep -v '^ *+' conftest.er1 >conftest.err
2690   rm -f conftest.er1
2691   cat conftest.err >&5
2692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2693   (exit $ac_status); } && {
2694          test -z "$ac_c_werror_flag" ||
2695          test ! -s conftest.err
2696        } && test -s conftest.$ac_objext; then
2697   ac_cv_prog_cc_g=yes
2698 else
2699   echo "$as_me: failed program was:" >&5
2700 sed 's/^/| /' conftest.$ac_ext >&5
2701
2702
2703 fi
2704
2705 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2706 fi
2707
2708 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2709 fi
2710
2711 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2712    ac_c_werror_flag=$ac_save_c_werror_flag
2713 fi
2714 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2715 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
2716 if test "$ac_test_CFLAGS" = set; then
2717   CFLAGS=$ac_save_CFLAGS
2718 elif test $ac_cv_prog_cc_g = yes; then
2719   if test "$GCC" = yes; then
2720     CFLAGS="-g -O2"
2721   else
2722     CFLAGS="-g"
2723   fi
2724 else
2725   if test "$GCC" = yes; then
2726     CFLAGS="-O2"
2727   else
2728     CFLAGS=
2729   fi
2730 fi
2731 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
2732 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
2733 if test "${ac_cv_prog_cc_c89+set}" = set; then
2734   echo $ECHO_N "(cached) $ECHO_C" >&6
2735 else
2736   ac_cv_prog_cc_c89=no
2737 ac_save_CC=$CC
2738 cat >conftest.$ac_ext <<_ACEOF
2739 /* confdefs.h.  */
2740 _ACEOF
2741 cat confdefs.h >>conftest.$ac_ext
2742 cat >>conftest.$ac_ext <<_ACEOF
2743 /* end confdefs.h.  */
2744 #include <stdarg.h>
2745 #include <stdio.h>
2746 #include <sys/types.h>
2747 #include <sys/stat.h>
2748 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2749 struct buf { int x; };
2750 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2751 static char *e (p, i)
2752      char **p;
2753      int i;
2754 {
2755   return p[i];
2756 }
2757 static char *f (char * (*g) (char **, int), char **p, ...)
2758 {
2759   char *s;
2760   va_list v;
2761   va_start (v,p);
2762   s = g (p, va_arg (v,int));
2763   va_end (v);
2764   return s;
2765 }
2766
2767 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2768    function prototypes and stuff, but not '\xHH' hex character constants.
2769    These don't provoke an error unfortunately, instead are silently treated
2770    as 'x'.  The following induces an error, until -std is added to get
2771    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2772    array size at least.  It's necessary to write '\x00'==0 to get something
2773    that's true only with -std.  */
2774 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2775
2776 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2777    inside strings and character constants.  */
2778 #define FOO(x) 'x'
2779 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
2780
2781 int test (int i, double x);
2782 struct s1 {int (*f) (int a);};
2783 struct s2 {int (*f) (double a);};
2784 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2785 int argc;
2786 char **argv;
2787 int
2788 main ()
2789 {
2790 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2791   ;
2792   return 0;
2793 }
2794 _ACEOF
2795 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
2796         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2797 do
2798   CC="$ac_save_CC $ac_arg"
2799   rm -f conftest.$ac_objext
2800 if { (ac_try="$ac_compile"
2801 case "(($ac_try" in
2802   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2803   *) ac_try_echo=$ac_try;;
2804 esac
2805 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2806   (eval "$ac_compile") 2>conftest.er1
2807   ac_status=$?
2808   grep -v '^ *+' conftest.er1 >conftest.err
2809   rm -f conftest.er1
2810   cat conftest.err >&5
2811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2812   (exit $ac_status); } && {
2813          test -z "$ac_c_werror_flag" ||
2814          test ! -s conftest.err
2815        } && test -s conftest.$ac_objext; then
2816   ac_cv_prog_cc_c89=$ac_arg
2817 else
2818   echo "$as_me: failed program was:" >&5
2819 sed 's/^/| /' conftest.$ac_ext >&5
2820
2821
2822 fi
2823
2824 rm -f core conftest.err conftest.$ac_objext
2825   test "x$ac_cv_prog_cc_c89" != "xno" && break
2826 done
2827 rm -f conftest.$ac_ext
2828 CC=$ac_save_CC
2829
2830 fi
2831 # AC_CACHE_VAL
2832 case "x$ac_cv_prog_cc_c89" in
2833   x)
2834     { echo "$as_me:$LINENO: result: none needed" >&5
2835 echo "${ECHO_T}none needed" >&6; } ;;
2836   xno)
2837     { echo "$as_me:$LINENO: result: unsupported" >&5
2838 echo "${ECHO_T}unsupported" >&6; } ;;
2839   *)
2840     CC="$CC $ac_cv_prog_cc_c89"
2841     { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
2842 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
2843 esac
2844
2845
2846 ac_ext=c
2847 ac_cpp='$CPP $CPPFLAGS'
2848 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2849 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2850 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2851
2852 ac_ext=cpp
2853 ac_cpp='$CXXCPP $CPPFLAGS'
2854 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2855 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2856 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2857 if test -z "$CXX"; then
2858   if test -n "$CCC"; then
2859     CXX=$CCC
2860   else
2861     if test -n "$ac_tool_prefix"; then
2862   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
2863   do
2864     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2865 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2866 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2867 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2868 if test "${ac_cv_prog_CXX+set}" = set; then
2869   echo $ECHO_N "(cached) $ECHO_C" >&6
2870 else
2871   if test -n "$CXX"; then
2872   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2873 else
2874 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2875 for as_dir in $PATH
2876 do
2877   IFS=$as_save_IFS
2878   test -z "$as_dir" && as_dir=.
2879   for ac_exec_ext in '' $ac_executable_extensions; do
2880   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2881     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2882     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2883     break 2
2884   fi
2885 done
2886 done
2887 IFS=$as_save_IFS
2888
2889 fi
2890 fi
2891 CXX=$ac_cv_prog_CXX
2892 if test -n "$CXX"; then
2893   { echo "$as_me:$LINENO: result: $CXX" >&5
2894 echo "${ECHO_T}$CXX" >&6; }
2895 else
2896   { echo "$as_me:$LINENO: result: no" >&5
2897 echo "${ECHO_T}no" >&6; }
2898 fi
2899
2900
2901     test -n "$CXX" && break
2902   done
2903 fi
2904 if test -z "$CXX"; then
2905   ac_ct_CXX=$CXX
2906   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
2907 do
2908   # Extract the first word of "$ac_prog", so it can be a program name with args.
2909 set dummy $ac_prog; ac_word=$2
2910 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2911 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2912 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2913   echo $ECHO_N "(cached) $ECHO_C" >&6
2914 else
2915   if test -n "$ac_ct_CXX"; then
2916   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2917 else
2918 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2919 for as_dir in $PATH
2920 do
2921   IFS=$as_save_IFS
2922   test -z "$as_dir" && as_dir=.
2923   for ac_exec_ext in '' $ac_executable_extensions; do
2924   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2925     ac_cv_prog_ac_ct_CXX="$ac_prog"
2926     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2927     break 2
2928   fi
2929 done
2930 done
2931 IFS=$as_save_IFS
2932
2933 fi
2934 fi
2935 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2936 if test -n "$ac_ct_CXX"; then
2937   { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
2938 echo "${ECHO_T}$ac_ct_CXX" >&6; }
2939 else
2940   { echo "$as_me:$LINENO: result: no" >&5
2941 echo "${ECHO_T}no" >&6; }
2942 fi
2943
2944
2945   test -n "$ac_ct_CXX" && break
2946 done
2947
2948   if test "x$ac_ct_CXX" = x; then
2949     CXX="g++"
2950   else
2951     case $cross_compiling:$ac_tool_warned in
2952 yes:)
2953 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2954 whose name does not start with the host triplet.  If you think this
2955 configuration is useful to you, please write to autoconf@gnu.org." >&5
2956 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2957 whose name does not start with the host triplet.  If you think this
2958 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2959 ac_tool_warned=yes ;;
2960 esac
2961     CXX=$ac_ct_CXX
2962   fi
2963 fi
2964
2965   fi
2966 fi
2967 # Provide some information about the compiler.
2968 echo "$as_me:$LINENO: checking for C++ compiler version" >&5
2969 ac_compiler=`set X $ac_compile; echo $2`
2970 { (ac_try="$ac_compiler --version >&5"
2971 case "(($ac_try" in
2972   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2973   *) ac_try_echo=$ac_try;;
2974 esac
2975 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2976   (eval "$ac_compiler --version >&5") 2>&5
2977   ac_status=$?
2978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2979   (exit $ac_status); }
2980 { (ac_try="$ac_compiler -v >&5"
2981 case "(($ac_try" in
2982   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2983   *) ac_try_echo=$ac_try;;
2984 esac
2985 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2986   (eval "$ac_compiler -v >&5") 2>&5
2987   ac_status=$?
2988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2989   (exit $ac_status); }
2990 { (ac_try="$ac_compiler -V >&5"
2991 case "(($ac_try" in
2992   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2993   *) ac_try_echo=$ac_try;;
2994 esac
2995 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2996   (eval "$ac_compiler -V >&5") 2>&5
2997   ac_status=$?
2998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2999   (exit $ac_status); }
3000
3001 { echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
3002 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; }
3003 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3004   echo $ECHO_N "(cached) $ECHO_C" >&6
3005 else
3006   cat >conftest.$ac_ext <<_ACEOF
3007 /* confdefs.h.  */
3008 _ACEOF
3009 cat confdefs.h >>conftest.$ac_ext
3010 cat >>conftest.$ac_ext <<_ACEOF
3011 /* end confdefs.h.  */
3012
3013 int
3014 main ()
3015 {
3016 #ifndef __GNUC__
3017        choke me
3018 #endif
3019
3020   ;
3021   return 0;
3022 }
3023 _ACEOF
3024 rm -f conftest.$ac_objext
3025 if { (ac_try="$ac_compile"
3026 case "(($ac_try" in
3027   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3028   *) ac_try_echo=$ac_try;;
3029 esac
3030 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3031   (eval "$ac_compile") 2>conftest.er1
3032   ac_status=$?
3033   grep -v '^ *+' conftest.er1 >conftest.err
3034   rm -f conftest.er1
3035   cat conftest.err >&5
3036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3037   (exit $ac_status); } && {
3038          test -z "$ac_cxx_werror_flag" ||
3039          test ! -s conftest.err
3040        } && test -s conftest.$ac_objext; then
3041   ac_compiler_gnu=yes
3042 else
3043   echo "$as_me: failed program was:" >&5
3044 sed 's/^/| /' conftest.$ac_ext >&5
3045
3046         ac_compiler_gnu=no
3047 fi
3048
3049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3050 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3051
3052 fi
3053 { echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
3054 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; }
3055 GXX=`test $ac_compiler_gnu = yes && echo yes`
3056 ac_test_CXXFLAGS=${CXXFLAGS+set}
3057 ac_save_CXXFLAGS=$CXXFLAGS
3058 { echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
3059 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; }
3060 if test "${ac_cv_prog_cxx_g+set}" = set; then
3061   echo $ECHO_N "(cached) $ECHO_C" >&6
3062 else
3063   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3064    ac_cxx_werror_flag=yes
3065    ac_cv_prog_cxx_g=no
3066    CXXFLAGS="-g"
3067    cat >conftest.$ac_ext <<_ACEOF
3068 /* confdefs.h.  */
3069 _ACEOF
3070 cat confdefs.h >>conftest.$ac_ext
3071 cat >>conftest.$ac_ext <<_ACEOF
3072 /* end confdefs.h.  */
3073
3074 int
3075 main ()
3076 {
3077
3078   ;
3079   return 0;
3080 }
3081 _ACEOF
3082 rm -f conftest.$ac_objext
3083 if { (ac_try="$ac_compile"
3084 case "(($ac_try" in
3085   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3086   *) ac_try_echo=$ac_try;;
3087 esac
3088 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3089   (eval "$ac_compile") 2>conftest.er1
3090   ac_status=$?
3091   grep -v '^ *+' conftest.er1 >conftest.err
3092   rm -f conftest.er1
3093   cat conftest.err >&5
3094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3095   (exit $ac_status); } && {
3096          test -z "$ac_cxx_werror_flag" ||
3097          test ! -s conftest.err
3098        } && test -s conftest.$ac_objext; then
3099   ac_cv_prog_cxx_g=yes
3100 else
3101   echo "$as_me: failed program was:" >&5
3102 sed 's/^/| /' conftest.$ac_ext >&5
3103
3104         CXXFLAGS=""
3105       cat >conftest.$ac_ext <<_ACEOF
3106 /* confdefs.h.  */
3107 _ACEOF
3108 cat confdefs.h >>conftest.$ac_ext
3109 cat >>conftest.$ac_ext <<_ACEOF
3110 /* end confdefs.h.  */
3111
3112 int
3113 main ()
3114 {
3115
3116   ;
3117   return 0;
3118 }
3119 _ACEOF
3120 rm -f conftest.$ac_objext
3121 if { (ac_try="$ac_compile"
3122 case "(($ac_try" in
3123   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3124   *) ac_try_echo=$ac_try;;
3125 esac
3126 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3127   (eval "$ac_compile") 2>conftest.er1
3128   ac_status=$?
3129   grep -v '^ *+' conftest.er1 >conftest.err
3130   rm -f conftest.er1
3131   cat conftest.err >&5
3132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3133   (exit $ac_status); } && {
3134          test -z "$ac_cxx_werror_flag" ||
3135          test ! -s conftest.err
3136        } && test -s conftest.$ac_objext; then
3137   :
3138 else
3139   echo "$as_me: failed program was:" >&5
3140 sed 's/^/| /' conftest.$ac_ext >&5
3141
3142         ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3143          CXXFLAGS="-g"
3144          cat >conftest.$ac_ext <<_ACEOF
3145 /* confdefs.h.  */
3146 _ACEOF
3147 cat confdefs.h >>conftest.$ac_ext
3148 cat >>conftest.$ac_ext <<_ACEOF
3149 /* end confdefs.h.  */
3150
3151 int
3152 main ()
3153 {
3154
3155   ;
3156   return 0;
3157 }
3158 _ACEOF
3159 rm -f conftest.$ac_objext
3160 if { (ac_try="$ac_compile"
3161 case "(($ac_try" in
3162   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3163   *) ac_try_echo=$ac_try;;
3164 esac
3165 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3166   (eval "$ac_compile") 2>conftest.er1
3167   ac_status=$?
3168   grep -v '^ *+' conftest.er1 >conftest.err
3169   rm -f conftest.er1
3170   cat conftest.err >&5
3171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3172   (exit $ac_status); } && {
3173          test -z "$ac_cxx_werror_flag" ||
3174          test ! -s conftest.err
3175        } && test -s conftest.$ac_objext; then
3176   ac_cv_prog_cxx_g=yes
3177 else
3178   echo "$as_me: failed program was:" >&5
3179 sed 's/^/| /' conftest.$ac_ext >&5
3180
3181
3182 fi
3183
3184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3185 fi
3186
3187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3188 fi
3189
3190 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3191    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3192 fi
3193 { echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
3194 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; }
3195 if test "$ac_test_CXXFLAGS" = set; then
3196   CXXFLAGS=$ac_save_CXXFLAGS
3197 elif test $ac_cv_prog_cxx_g = yes; then
3198   if test "$GXX" = yes; then
3199     CXXFLAGS="-g -O2"
3200   else
3201     CXXFLAGS="-g"
3202   fi
3203 else
3204   if test "$GXX" = yes; then
3205     CXXFLAGS="-O2"
3206   else
3207     CXXFLAGS=
3208   fi
3209 fi
3210 ac_ext=c
3211 ac_cpp='$CPP $CPPFLAGS'
3212 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3213 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3214 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3215
3216 ac_ext=c
3217 ac_cpp='$CPP $CPPFLAGS'
3218 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3219 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3220 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3221 { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3222 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3223 # On Suns, sometimes $CPP names a directory.
3224 if test -n "$CPP" && test -d "$CPP"; then
3225   CPP=
3226 fi
3227 if test -z "$CPP"; then
3228   if test "${ac_cv_prog_CPP+set}" = set; then
3229   echo $ECHO_N "(cached) $ECHO_C" >&6
3230 else
3231       # Double quotes because CPP needs to be expanded
3232     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3233     do
3234       ac_preproc_ok=false
3235 for ac_c_preproc_warn_flag in '' yes
3236 do
3237   # Use a header file that comes with gcc, so configuring glibc
3238   # with a fresh cross-compiler works.
3239   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3240   # <limits.h> exists even on freestanding compilers.
3241   # On the NeXT, cc -E runs the code through the compiler's parser,
3242   # not just through cpp. "Syntax error" is here to catch this case.
3243   cat >conftest.$ac_ext <<_ACEOF
3244 /* confdefs.h.  */
3245 _ACEOF
3246 cat confdefs.h >>conftest.$ac_ext
3247 cat >>conftest.$ac_ext <<_ACEOF
3248 /* end confdefs.h.  */
3249 #ifdef __STDC__
3250 # include <limits.h>
3251 #else
3252 # include <assert.h>
3253 #endif
3254                      Syntax error
3255 _ACEOF
3256 if { (ac_try="$ac_cpp conftest.$ac_ext"
3257 case "(($ac_try" in
3258   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3259   *) ac_try_echo=$ac_try;;
3260 esac
3261 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3262   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3263   ac_status=$?
3264   grep -v '^ *+' conftest.er1 >conftest.err
3265   rm -f conftest.er1
3266   cat conftest.err >&5
3267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3268   (exit $ac_status); } >/dev/null && {
3269          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3270          test ! -s conftest.err
3271        }; then
3272   :
3273 else
3274   echo "$as_me: failed program was:" >&5
3275 sed 's/^/| /' conftest.$ac_ext >&5
3276
3277   # Broken: fails on valid input.
3278 continue
3279 fi
3280
3281 rm -f conftest.err conftest.$ac_ext
3282
3283   # OK, works on sane cases.  Now check whether nonexistent headers
3284   # can be detected and how.
3285   cat >conftest.$ac_ext <<_ACEOF
3286 /* confdefs.h.  */
3287 _ACEOF
3288 cat confdefs.h >>conftest.$ac_ext
3289 cat >>conftest.$ac_ext <<_ACEOF
3290 /* end confdefs.h.  */
3291 #include <ac_nonexistent.h>
3292 _ACEOF
3293 if { (ac_try="$ac_cpp conftest.$ac_ext"
3294 case "(($ac_try" in
3295   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3296   *) ac_try_echo=$ac_try;;
3297 esac
3298 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3299   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3300   ac_status=$?
3301   grep -v '^ *+' conftest.er1 >conftest.err
3302   rm -f conftest.er1
3303   cat conftest.err >&5
3304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3305   (exit $ac_status); } >/dev/null && {
3306          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3307          test ! -s conftest.err
3308        }; then
3309   # Broken: success on invalid input.
3310 continue
3311 else
3312   echo "$as_me: failed program was:" >&5
3313 sed 's/^/| /' conftest.$ac_ext >&5
3314
3315   # Passes both tests.
3316 ac_preproc_ok=:
3317 break
3318 fi
3319
3320 rm -f conftest.err conftest.$ac_ext
3321
3322 done
3323 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3324 rm -f conftest.err conftest.$ac_ext
3325 if $ac_preproc_ok; then
3326   break
3327 fi
3328
3329     done
3330     ac_cv_prog_CPP=$CPP
3331
3332 fi
3333   CPP=$ac_cv_prog_CPP
3334 else
3335   ac_cv_prog_CPP=$CPP
3336 fi
3337 { echo "$as_me:$LINENO: result: $CPP" >&5
3338 echo "${ECHO_T}$CPP" >&6; }
3339 ac_preproc_ok=false
3340 for ac_c_preproc_warn_flag in '' yes
3341 do
3342   # Use a header file that comes with gcc, so configuring glibc
3343   # with a fresh cross-compiler works.
3344   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3345   # <limits.h> exists even on freestanding compilers.
3346   # On the NeXT, cc -E runs the code through the compiler's parser,
3347   # not just through cpp. "Syntax error" is here to catch this case.
3348   cat >conftest.$ac_ext <<_ACEOF
3349 /* confdefs.h.  */
3350 _ACEOF
3351 cat confdefs.h >>conftest.$ac_ext
3352 cat >>conftest.$ac_ext <<_ACEOF
3353 /* end confdefs.h.  */
3354 #ifdef __STDC__
3355 # include <limits.h>
3356 #else
3357 # include <assert.h>
3358 #endif
3359                      Syntax error
3360 _ACEOF
3361 if { (ac_try="$ac_cpp conftest.$ac_ext"
3362 case "(($ac_try" in
3363   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3364   *) ac_try_echo=$ac_try;;
3365 esac
3366 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3367   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3368   ac_status=$?
3369   grep -v '^ *+' conftest.er1 >conftest.err
3370   rm -f conftest.er1
3371   cat conftest.err >&5
3372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3373   (exit $ac_status); } >/dev/null && {
3374          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3375          test ! -s conftest.err
3376        }; then
3377   :
3378 else
3379   echo "$as_me: failed program was:" >&5
3380 sed 's/^/| /' conftest.$ac_ext >&5
3381
3382   # Broken: fails on valid input.
3383 continue
3384 fi
3385
3386 rm -f conftest.err conftest.$ac_ext
3387
3388   # OK, works on sane cases.  Now check whether nonexistent headers
3389   # can be detected and how.
3390   cat >conftest.$ac_ext <<_ACEOF
3391 /* confdefs.h.  */
3392 _ACEOF
3393 cat confdefs.h >>conftest.$ac_ext
3394 cat >>conftest.$ac_ext <<_ACEOF
3395 /* end confdefs.h.  */
3396 #include <ac_nonexistent.h>
3397 _ACEOF
3398 if { (ac_try="$ac_cpp conftest.$ac_ext"
3399 case "(($ac_try" in
3400   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3401   *) ac_try_echo=$ac_try;;
3402 esac
3403 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3404   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3405   ac_status=$?
3406   grep -v '^ *+' conftest.er1 >conftest.err
3407   rm -f conftest.er1
3408   cat conftest.err >&5
3409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3410   (exit $ac_status); } >/dev/null && {
3411          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3412          test ! -s conftest.err
3413        }; then
3414   # Broken: success on invalid input.
3415 continue
3416 else
3417   echo "$as_me: failed program was:" >&5
3418 sed 's/^/| /' conftest.$ac_ext >&5
3419
3420   # Passes both tests.
3421 ac_preproc_ok=:
3422 break
3423 fi
3424
3425 rm -f conftest.err conftest.$ac_ext
3426
3427 done
3428 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3429 rm -f conftest.err conftest.$ac_ext
3430 if $ac_preproc_ok; then
3431   :
3432 else
3433   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3434 See \`config.log' for more details." >&5
3435 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3436 See \`config.log' for more details." >&2;}
3437    { (exit 1); exit 1; }; }
3438 fi
3439
3440 ac_ext=c
3441 ac_cpp='$CPP $CPPFLAGS'
3442 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3443 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3444 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3445
3446 # Find a good install program.  We prefer a C program (faster),
3447 # so one script is as good as another.  But avoid the broken or
3448 # incompatible versions:
3449 # SysV /etc/install, /usr/sbin/install
3450 # SunOS /usr/etc/install
3451 # IRIX /sbin/install
3452 # AIX /bin/install
3453 # AmigaOS /C/install, which installs bootblocks on floppy discs
3454 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3455 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3456 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3457 # OS/2's system install, which has a completely different semantic
3458 # ./install, which can be erroneously created by make from ./install.sh.
3459 { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3460 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
3461 if test -z "$INSTALL"; then
3462 if test "${ac_cv_path_install+set}" = set; then
3463   echo $ECHO_N "(cached) $ECHO_C" >&6
3464 else
3465   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3466 for as_dir in $PATH
3467 do
3468   IFS=$as_save_IFS
3469   test -z "$as_dir" && as_dir=.
3470   # Account for people who put trailing slashes in PATH elements.
3471 case $as_dir/ in
3472   ./ | .// | /cC/* | \
3473   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3474   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3475   /usr/ucb/* ) ;;
3476   *)
3477     # OSF1 and SCO ODT 3.0 have their own names for install.
3478     # Don't use installbsd from OSF since it installs stuff as root
3479     # by default.
3480     for ac_prog in ginstall scoinst install; do
3481       for ac_exec_ext in '' $ac_executable_extensions; do
3482         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3483           if test $ac_prog = install &&
3484             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3485             # AIX install.  It has an incompatible calling convention.
3486             :
3487           elif test $ac_prog = install &&
3488             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3489             # program-specific install script used by HP pwplus--don't use.
3490             :
3491           else
3492             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3493             break 3
3494           fi
3495         fi
3496       done
3497     done
3498     ;;
3499 esac
3500 done
3501 IFS=$as_save_IFS
3502
3503
3504 fi
3505   if test "${ac_cv_path_install+set}" = set; then
3506     INSTALL=$ac_cv_path_install
3507   else
3508     # As a last resort, use the slow shell script.  Don't cache a
3509     # value for INSTALL within a source directory, because that will
3510     # break other packages using the cache if that directory is
3511     # removed, or if the value is a relative name.
3512     INSTALL=$ac_install_sh
3513   fi
3514 fi
3515 { echo "$as_me:$LINENO: result: $INSTALL" >&5
3516 echo "${ECHO_T}$INSTALL" >&6; }
3517
3518 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3519 # It thinks the first close brace ends the variable substitution.
3520 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3521
3522 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3523
3524 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3525
3526
3527
3528
3529 { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3530 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3531 if test "${ac_cv_path_GREP+set}" = set; then
3532   echo $ECHO_N "(cached) $ECHO_C" >&6
3533 else
3534   # Extract the first word of "grep ggrep" to use in msg output
3535 if test -z "$GREP"; then
3536 set dummy grep ggrep; ac_prog_name=$2
3537 if test "${ac_cv_path_GREP+set}" = set; then
3538   echo $ECHO_N "(cached) $ECHO_C" >&6
3539 else
3540   ac_path_GREP_found=false
3541 # Loop through the user's path and test for each of PROGNAME-LIST
3542 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3543 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3544 do
3545   IFS=$as_save_IFS
3546   test -z "$as_dir" && as_dir=.
3547   for ac_prog in grep ggrep; do
3548   for ac_exec_ext in '' $ac_executable_extensions; do
3549     ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3550     { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3551     # Check for GNU ac_path_GREP and select it if it is found.
3552   # Check for GNU $ac_path_GREP
3553 case `"$ac_path_GREP" --version 2>&1` in
3554 *GNU*)
3555   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3556 *)
3557   ac_count=0
3558   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3559   while :
3560   do
3561     cat "conftest.in" "conftest.in" >"conftest.tmp"
3562     mv "conftest.tmp" "conftest.in"
3563     cp "conftest.in" "conftest.nl"
3564     echo 'GREP' >> "conftest.nl"
3565     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3566     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3567     ac_count=`expr $ac_count + 1`
3568     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3569       # Best one so far, save it but keep looking for a better one
3570       ac_cv_path_GREP="$ac_path_GREP"
3571       ac_path_GREP_max=$ac_count
3572     fi
3573     # 10*(2^10) chars as input seems more than enough
3574     test $ac_count -gt 10 && break
3575   done
3576   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3577 esac
3578
3579
3580     $ac_path_GREP_found && break 3
3581   done
3582 done
3583
3584 done
3585 IFS=$as_save_IFS
3586
3587
3588 fi
3589
3590 GREP="$ac_cv_path_GREP"
3591 if test -z "$GREP"; then
3592   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3593 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3594    { (exit 1); exit 1; }; }
3595 fi
3596
3597 else
3598   ac_cv_path_GREP=$GREP
3599 fi
3600
3601
3602 fi
3603 { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3604 echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3605  GREP="$ac_cv_path_GREP"
3606
3607
3608 { echo "$as_me:$LINENO: checking for egrep" >&5
3609 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3610 if test "${ac_cv_path_EGREP+set}" = set; then
3611   echo $ECHO_N "(cached) $ECHO_C" >&6
3612 else
3613   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3614    then ac_cv_path_EGREP="$GREP -E"
3615    else
3616      # Extract the first word of "egrep" to use in msg output
3617 if test -z "$EGREP"; then
3618 set dummy egrep; ac_prog_name=$2
3619 if test "${ac_cv_path_EGREP+set}" = set; then
3620   echo $ECHO_N "(cached) $ECHO_C" >&6
3621 else
3622   ac_path_EGREP_found=false
3623 # Loop through the user's path and test for each of PROGNAME-LIST
3624 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3625 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3626 do
3627   IFS=$as_save_IFS
3628   test -z "$as_dir" && as_dir=.
3629   for ac_prog in egrep; do
3630   for ac_exec_ext in '' $ac_executable_extensions; do
3631     ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3632     { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3633     # Check for GNU ac_path_EGREP and select it if it is found.
3634   # Check for GNU $ac_path_EGREP
3635 case `"$ac_path_EGREP" --version 2>&1` in
3636 *GNU*)
3637   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3638 *)
3639   ac_count=0
3640   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3641   while :
3642   do
3643     cat "conftest.in" "conftest.in" >"conftest.tmp"
3644     mv "conftest.tmp" "conftest.in"
3645     cp "conftest.in" "conftest.nl"
3646     echo 'EGREP' >> "conftest.nl"
3647     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3648     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3649     ac_count=`expr $ac_count + 1`
3650     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3651       # Best one so far, save it but keep looking for a better one
3652       ac_cv_path_EGREP="$ac_path_EGREP"
3653       ac_path_EGREP_max=$ac_count
3654     fi
3655     # 10*(2^10) chars as input seems more than enough
3656     test $ac_count -gt 10 && break
3657   done
3658   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3659 esac
3660
3661
3662     $ac_path_EGREP_found && break 3
3663   done
3664 done
3665
3666 done
3667 IFS=$as_save_IFS
3668
3669
3670 fi
3671
3672 EGREP="$ac_cv_path_EGREP"
3673 if test -z "$EGREP"; then
3674   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3675 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3676    { (exit 1); exit 1; }; }
3677 fi
3678
3679 else
3680   ac_cv_path_EGREP=$EGREP
3681 fi
3682
3683
3684    fi
3685 fi
3686 { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3687 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3688  EGREP="$ac_cv_path_EGREP"
3689
3690
3691
3692 { echo "$as_me:$LINENO: checking for AIX" >&5
3693 echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3694 cat >conftest.$ac_ext <<_ACEOF
3695 /* confdefs.h.  */
3696 _ACEOF
3697 cat confdefs.h >>conftest.$ac_ext
3698 cat >>conftest.$ac_ext <<_ACEOF
3699 /* end confdefs.h.  */
3700 #ifdef _AIX
3701   yes
3702 #endif
3703
3704 _ACEOF
3705 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3706   $EGREP "yes" >/dev/null 2>&1; then
3707   { echo "$as_me:$LINENO: result: yes" >&5
3708 echo "${ECHO_T}yes" >&6; }
3709 cat >>confdefs.h <<\_ACEOF
3710 #define _ALL_SOURCE 1
3711 _ACEOF
3712
3713 else
3714   { echo "$as_me:$LINENO: result: no" >&5
3715 echo "${ECHO_T}no" >&6; }
3716 fi
3717 rm -f conftest*
3718
3719
3720 { echo "$as_me:$LINENO: checking for library containing strerror" >&5
3721 echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6; }
3722 if test "${ac_cv_search_strerror+set}" = set; then
3723   echo $ECHO_N "(cached) $ECHO_C" >&6
3724 else
3725   ac_func_search_save_LIBS=$LIBS
3726 cat >conftest.$ac_ext <<_ACEOF
3727 /* confdefs.h.  */
3728 _ACEOF
3729 cat confdefs.h >>conftest.$ac_ext
3730 cat >>conftest.$ac_ext <<_ACEOF
3731 /* end confdefs.h.  */
3732
3733 /* Override any GCC internal prototype to avoid an error.
3734    Use char because int might match the return type of a GCC
3735    builtin and then its argument prototype would still apply.  */
3736 #ifdef __cplusplus
3737 extern "C"
3738 #endif
3739 char strerror ();
3740 int
3741 main ()
3742 {
3743 return strerror ();
3744   ;
3745   return 0;
3746 }
3747 _ACEOF
3748 for ac_lib in '' cposix; do
3749   if test -z "$ac_lib"; then
3750     ac_res="none required"
3751   else
3752     ac_res=-l$ac_lib
3753     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
3754   fi
3755   rm -f conftest.$ac_objext conftest$ac_exeext
3756 if { (ac_try="$ac_link"
3757 case "(($ac_try" in
3758   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3759   *) ac_try_echo=$ac_try;;
3760 esac
3761 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3762   (eval "$ac_link") 2>conftest.er1
3763   ac_status=$?
3764   grep -v '^ *+' conftest.er1 >conftest.err
3765   rm -f conftest.er1
3766   cat conftest.err >&5
3767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3768   (exit $ac_status); } && {
3769          test -z "$ac_c_werror_flag" ||
3770          test ! -s conftest.err
3771        } && test -s conftest$ac_exeext &&
3772        $as_test_x conftest$ac_exeext; then
3773   ac_cv_search_strerror=$ac_res
3774 else
3775   echo "$as_me: failed program was:" >&5
3776 sed 's/^/| /' conftest.$ac_ext >&5
3777
3778
3779 fi
3780
3781 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
3782       conftest$ac_exeext
3783   if test "${ac_cv_search_strerror+set}" = set; then
3784   break
3785 fi
3786 done
3787 if test "${ac_cv_search_strerror+set}" = set; then
3788   :
3789 else
3790   ac_cv_search_strerror=no
3791 fi
3792 rm conftest.$ac_ext
3793 LIBS=$ac_func_search_save_LIBS
3794 fi
3795 { echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
3796 echo "${ECHO_T}$ac_cv_search_strerror" >&6; }
3797 ac_res=$ac_cv_search_strerror
3798 if test "$ac_res" != no; then
3799   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
3800
3801 fi
3802
3803 ac_ext=cpp
3804 ac_cpp='$CXXCPP $CPPFLAGS'
3805 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3806 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3807 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3808
3809
3810 if test x$GCC = xyes && test x$GXX = xyes; then
3811       { echo "$as_me:$LINENO: checking for working libsupc++" >&5
3812 echo $ECHO_N "checking for working libsupc++... $ECHO_C" >&6; }
3813    save_CXX="$CXX"
3814    save_LIBS="$LIBS"
3815    CXX="$CC"
3816    LIBS="$LIBS -lsupc++"
3817    LINKER="$CC"
3818
3819 cat >conftest.$ac_ext <<_ACEOF
3820 /* confdefs.h.  */
3821 _ACEOF
3822 cat confdefs.h >>conftest.$ac_ext
3823 cat >>conftest.$ac_ext <<_ACEOF
3824 /* end confdefs.h.  */
3825 struct test { }; void f() try { throw new test; } catch (...) { throw; }
3826 int
3827 main ()
3828 {
3829
3830   ;
3831   return 0;
3832 }
3833 _ACEOF
3834 rm -f conftest.$ac_objext conftest$ac_exeext
3835 if { (ac_try="$ac_link"
3836 case "(($ac_try" in
3837   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3838   *) ac_try_echo=$ac_try;;
3839 esac
3840 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3841   (eval "$ac_link") 2>conftest.er1
3842   ac_status=$?
3843   grep -v '^ *+' conftest.er1 >conftest.err
3844   rm -f conftest.er1
3845   cat conftest.err >&5
3846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3847   (exit $ac_status); } && {
3848          test -z "$ac_cxx_werror_flag" ||
3849          test ! -s conftest.err
3850        } && test -s conftest$ac_exeext &&
3851        $as_test_x conftest$ac_exeext; then
3852   { echo "$as_me:$LINENO: result: ok" >&5
3853 echo "${ECHO_T}ok" >&6; }
3854 else
3855   echo "$as_me: failed program was:" >&5
3856 sed 's/^/| /' conftest.$ac_ext >&5
3857
3858
3859          { echo "$as_me:$LINENO: result: no, making everything bigger and slower" >&5
3860 echo "${ECHO_T}no, making everything bigger and slower" >&6; }
3861          LIBS="$save_LIBS"
3862          LINKER="$save_CXX"
3863
3864
3865 fi
3866
3867 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
3868       conftest$ac_exeext conftest.$ac_ext
3869    CXX="$save_CXX"
3870 fi
3871 LINKER=$LINKER
3872
3873
3874 if test -z "$orig_CXXFLAGS"; then
3875   if test x$GCC = xyes && test "x$GXX" = xyes; then
3876     CXXFLAGS="-g -O3 -fno-threadsafe-statics -fno-enforce-eh-specs"
3877     cat >conftest.$ac_ext <<_ACEOF
3878 /* confdefs.h.  */
3879 _ACEOF
3880 cat confdefs.h >>conftest.$ac_ext
3881 cat >>conftest.$ac_ext <<_ACEOF
3882 /* end confdefs.h.  */
3883
3884 int
3885 main ()
3886 {
3887
3888   ;
3889   return 0;
3890 }
3891 _ACEOF
3892 rm -f conftest.$ac_objext
3893 if { (ac_try="$ac_compile"
3894 case "(($ac_try" in
3895   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3896   *) ac_try_echo=$ac_try;;
3897 esac
3898 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3899   (eval "$ac_compile") 2>conftest.er1
3900   ac_status=$?
3901   grep -v '^ *+' conftest.er1 >conftest.err
3902   rm -f conftest.er1
3903   cat conftest.err >&5
3904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3905   (exit $ac_status); } && {
3906          test -z "$ac_cxx_werror_flag" ||
3907          test ! -s conftest.err
3908        } && test -s conftest.$ac_objext; then
3909   :
3910 else
3911   echo "$as_me: failed program was:" >&5
3912 sed 's/^/| /' conftest.$ac_ext >&5
3913
3914         CXXFLAGS="-g -O3"
3915 fi
3916
3917 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3918   else
3919     CXXFLAGS="-O"
3920   fi
3921   CFLAGS="$CXXFLAGS"
3922 fi
3923
3924
3925 cat >>confdefs.h <<\_ACEOF
3926 #define _GNU_SOURCE 1
3927 _ACEOF
3928
3929
3930 case $host in
3931    *-*-solaris* )
3932
3933 cat >>confdefs.h <<\_ACEOF
3934 #define _XOPEN_SOURCE 500
3935 _ACEOF
3936
3937       ;;
3938 esac
3939
3940
3941 { echo "$as_me:$LINENO: checking for setlocale" >&5
3942 echo $ECHO_N "checking for setlocale... $ECHO_C" >&6; }
3943 if test "${ac_cv_func_setlocale+set}" = set; then
3944   echo $ECHO_N "(cached) $ECHO_C" >&6
3945 else
3946   cat >conftest.$ac_ext <<_ACEOF
3947 /* confdefs.h.  */
3948 _ACEOF
3949 cat confdefs.h >>conftest.$ac_ext
3950 cat >>conftest.$ac_ext <<_ACEOF
3951 /* end confdefs.h.  */
3952 /* Define setlocale to an innocuous variant, in case <limits.h> declares setlocale.
3953    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3954 #define setlocale innocuous_setlocale
3955
3956 /* System header to define __stub macros and hopefully few prototypes,
3957     which can conflict with char setlocale (); below.
3958     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3959     <limits.h> exists even on freestanding compilers.  */
3960
3961 #ifdef __STDC__
3962 # include <limits.h>
3963 #else
3964 # include <assert.h>
3965 #endif
3966
3967 #undef setlocale
3968
3969 /* Override any GCC internal prototype to avoid an error.
3970    Use char because int might match the return type of a GCC
3971    builtin and then its argument prototype would still apply.  */
3972 #ifdef __cplusplus
3973 extern "C"
3974 #endif
3975 char setlocale ();
3976 /* The GNU C library defines this for functions which it implements
3977     to always fail with ENOSYS.  Some functions are actually named
3978     something starting with __ and the normal name is an alias.  */
3979 #if defined __stub_setlocale || defined __stub___setlocale
3980 choke me
3981 #endif
3982
3983 int
3984 main ()
3985 {
3986 return setlocale ();
3987   ;
3988   return 0;
3989 }
3990 _ACEOF
3991 rm -f conftest.$ac_objext conftest$ac_exeext
3992 if { (ac_try="$ac_link"
3993 case "(($ac_try" in
3994   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3995   *) ac_try_echo=$ac_try;;
3996 esac
3997 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3998   (eval "$ac_link") 2>conftest.er1
3999   ac_status=$?
4000   grep -v '^ *+' conftest.er1 >conftest.err
4001   rm -f conftest.er1
4002   cat conftest.err >&5
4003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4004   (exit $ac_status); } && {
4005          test -z "$ac_cxx_werror_flag" ||
4006          test ! -s conftest.err
4007        } && test -s conftest$ac_exeext &&
4008        $as_test_x conftest$ac_exeext; then
4009   ac_cv_func_setlocale=yes
4010 else
4011   echo "$as_me: failed program was:" >&5
4012 sed 's/^/| /' conftest.$ac_ext >&5
4013
4014         ac_cv_func_setlocale=no
4015 fi
4016
4017 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4018       conftest$ac_exeext conftest.$ac_ext
4019 fi
4020 { echo "$as_me:$LINENO: result: $ac_cv_func_setlocale" >&5
4021 echo "${ECHO_T}$ac_cv_func_setlocale" >&6; }
4022 if test $ac_cv_func_setlocale = yes; then
4023   :
4024 else
4025   { echo "$as_me:$LINENO: checking for setlocale in -lxpg4" >&5
4026 echo $ECHO_N "checking for setlocale in -lxpg4... $ECHO_C" >&6; }
4027 if test "${ac_cv_lib_xpg4_setlocale+set}" = set; then
4028   echo $ECHO_N "(cached) $ECHO_C" >&6
4029 else
4030   ac_check_lib_save_LIBS=$LIBS
4031 LIBS="-lxpg4  $LIBS"
4032 cat >conftest.$ac_ext <<_ACEOF
4033 /* confdefs.h.  */
4034 _ACEOF
4035 cat confdefs.h >>conftest.$ac_ext
4036 cat >>conftest.$ac_ext <<_ACEOF
4037 /* end confdefs.h.  */
4038
4039 /* Override any GCC internal prototype to avoid an error.
4040    Use char because int might match the return type of a GCC
4041    builtin and then its argument prototype would still apply.  */
4042 #ifdef __cplusplus
4043 extern "C"
4044 #endif
4045 char setlocale ();
4046 int
4047 main ()
4048 {
4049 return setlocale ();
4050   ;
4051   return 0;
4052 }
4053 _ACEOF
4054 rm -f conftest.$ac_objext conftest$ac_exeext
4055 if { (ac_try="$ac_link"
4056 case "(($ac_try" in
4057   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4058   *) ac_try_echo=$ac_try;;
4059 esac
4060 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4061   (eval "$ac_link") 2>conftest.er1
4062   ac_status=$?
4063   grep -v '^ *+' conftest.er1 >conftest.err
4064   rm -f conftest.er1
4065   cat conftest.err >&5
4066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4067   (exit $ac_status); } && {
4068          test -z "$ac_cxx_werror_flag" ||
4069          test ! -s conftest.err
4070        } && test -s conftest$ac_exeext &&
4071        $as_test_x conftest$ac_exeext; then
4072   ac_cv_lib_xpg4_setlocale=yes
4073 else
4074   echo "$as_me: failed program was:" >&5
4075 sed 's/^/| /' conftest.$ac_ext >&5
4076
4077         ac_cv_lib_xpg4_setlocale=no
4078 fi
4079
4080 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4081       conftest$ac_exeext conftest.$ac_ext
4082 LIBS=$ac_check_lib_save_LIBS
4083 fi
4084 { echo "$as_me:$LINENO: result: $ac_cv_lib_xpg4_setlocale" >&5
4085 echo "${ECHO_T}$ac_cv_lib_xpg4_setlocale" >&6; }
4086 if test $ac_cv_lib_xpg4_setlocale = yes; then
4087   LIBS="$LIBS -lxpg4"
4088 fi
4089
4090 fi
4091
4092
4093 { echo "$as_me:$LINENO: checking for gethostbyname" >&5
4094 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; }
4095 if test "${ac_cv_func_gethostbyname+set}" = set; then
4096   echo $ECHO_N "(cached) $ECHO_C" >&6
4097 else
4098   cat >conftest.$ac_ext <<_ACEOF
4099 /* confdefs.h.  */
4100 _ACEOF
4101 cat confdefs.h >>conftest.$ac_ext
4102 cat >>conftest.$ac_ext <<_ACEOF
4103 /* end confdefs.h.  */
4104 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
4105    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4106 #define gethostbyname innocuous_gethostbyname
4107
4108 /* System header to define __stub macros and hopefully few prototypes,
4109     which can conflict with char gethostbyname (); below.
4110     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4111     <limits.h> exists even on freestanding compilers.  */
4112
4113 #ifdef __STDC__
4114 # include <limits.h>
4115 #else
4116 # include <assert.h>
4117 #endif
4118
4119 #undef gethostbyname
4120
4121 /* Override any GCC internal prototype to avoid an error.
4122    Use char because int might match the return type of a GCC
4123    builtin and then its argument prototype would still apply.  */
4124 #ifdef __cplusplus
4125 extern "C"
4126 #endif
4127 char gethostbyname ();
4128 /* The GNU C library defines this for functions which it implements
4129     to always fail with ENOSYS.  Some functions are actually named
4130     something starting with __ and the normal name is an alias.  */
4131 #if defined __stub_gethostbyname || defined __stub___gethostbyname
4132 choke me
4133 #endif
4134
4135 int
4136 main ()
4137 {
4138 return gethostbyname ();
4139   ;
4140   return 0;
4141 }
4142 _ACEOF
4143 rm -f conftest.$ac_objext conftest$ac_exeext
4144 if { (ac_try="$ac_link"
4145 case "(($ac_try" in
4146   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4147   *) ac_try_echo=$ac_try;;
4148 esac
4149 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4150   (eval "$ac_link") 2>conftest.er1
4151   ac_status=$?
4152   grep -v '^ *+' conftest.er1 >conftest.err
4153   rm -f conftest.er1
4154   cat conftest.err >&5
4155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4156   (exit $ac_status); } && {
4157          test -z "$ac_cxx_werror_flag" ||
4158          test ! -s conftest.err
4159        } && test -s conftest$ac_exeext &&
4160        $as_test_x conftest$ac_exeext; then
4161   ac_cv_func_gethostbyname=yes
4162 else
4163   echo "$as_me: failed program was:" >&5
4164 sed 's/^/| /' conftest.$ac_ext >&5
4165
4166         ac_cv_func_gethostbyname=no
4167 fi
4168
4169 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4170       conftest$ac_exeext conftest.$ac_ext
4171 fi
4172 { echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
4173 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; }
4174 if test $ac_cv_func_gethostbyname = yes; then
4175   :
4176 else
4177   { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
4178 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
4179 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
4180   echo $ECHO_N "(cached) $ECHO_C" >&6
4181 else
4182   ac_check_lib_save_LIBS=$LIBS
4183 LIBS="-lnsl  $LIBS"
4184 cat >conftest.$ac_ext <<_ACEOF
4185 /* confdefs.h.  */
4186 _ACEOF
4187 cat confdefs.h >>conftest.$ac_ext
4188 cat >>conftest.$ac_ext <<_ACEOF
4189 /* end confdefs.h.  */
4190
4191 /* Override any GCC internal prototype to avoid an error.
4192    Use char because int might match the return type of a GCC
4193    builtin and then its argument prototype would still apply.  */
4194 #ifdef __cplusplus
4195 extern "C"
4196 #endif
4197 char gethostbyname ();
4198 int
4199 main ()
4200 {
4201 return gethostbyname ();
4202   ;
4203   return 0;
4204 }
4205 _ACEOF
4206 rm -f conftest.$ac_objext conftest$ac_exeext
4207 if { (ac_try="$ac_link"
4208 case "(($ac_try" in
4209   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4210   *) ac_try_echo=$ac_try;;
4211 esac
4212 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4213   (eval "$ac_link") 2>conftest.er1
4214   ac_status=$?
4215   grep -v '^ *+' conftest.er1 >conftest.err
4216   rm -f conftest.er1
4217   cat conftest.err >&5
4218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4219   (exit $ac_status); } && {
4220          test -z "$ac_cxx_werror_flag" ||
4221          test ! -s conftest.err
4222        } && test -s conftest$ac_exeext &&
4223        $as_test_x conftest$ac_exeext; then
4224   ac_cv_lib_nsl_gethostbyname=yes
4225 else
4226   echo "$as_me: failed program was:" >&5
4227 sed 's/^/| /' conftest.$ac_ext >&5
4228
4229         ac_cv_lib_nsl_gethostbyname=no
4230 fi
4231
4232 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4233       conftest$ac_exeext conftest.$ac_ext
4234 LIBS=$ac_check_lib_save_LIBS
4235 fi
4236 { echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
4237 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
4238 if test $ac_cv_lib_nsl_gethostbyname = yes; then
4239   LIBS="$LIBS -lnsl"
4240 fi
4241
4242 fi
4243
4244 { echo "$as_me:$LINENO: checking for socket" >&5
4245 echo $ECHO_N "checking for socket... $ECHO_C" >&6; }
4246 if test "${ac_cv_func_socket+set}" = set; then
4247   echo $ECHO_N "(cached) $ECHO_C" >&6
4248 else
4249   cat >conftest.$ac_ext <<_ACEOF
4250 /* confdefs.h.  */
4251 _ACEOF
4252 cat confdefs.h >>conftest.$ac_ext
4253 cat >>conftest.$ac_ext <<_ACEOF
4254 /* end confdefs.h.  */
4255 /* Define socket to an innocuous variant, in case <limits.h> declares socket.
4256    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4257 #define socket innocuous_socket
4258
4259 /* System header to define __stub macros and hopefully few prototypes,
4260     which can conflict with char socket (); below.
4261     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4262     <limits.h> exists even on freestanding compilers.  */
4263
4264 #ifdef __STDC__
4265 # include <limits.h>
4266 #else
4267 # include <assert.h>
4268 #endif
4269
4270 #undef socket
4271
4272 /* Override any GCC internal prototype to avoid an error.
4273    Use char because int might match the return type of a GCC
4274    builtin and then its argument prototype would still apply.  */
4275 #ifdef __cplusplus
4276 extern "C"
4277 #endif
4278 char socket ();
4279 /* The GNU C library defines this for functions which it implements
4280     to always fail with ENOSYS.  Some functions are actually named
4281     something starting with __ and the normal name is an alias.  */
4282 #if defined __stub_socket || defined __stub___socket
4283 choke me
4284 #endif
4285
4286 int
4287 main ()
4288 {
4289 return socket ();
4290   ;
4291   return 0;
4292 }
4293 _ACEOF
4294 rm -f conftest.$ac_objext conftest$ac_exeext
4295 if { (ac_try="$ac_link"
4296 case "(($ac_try" in
4297   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4298   *) ac_try_echo=$ac_try;;
4299 esac
4300 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4301   (eval "$ac_link") 2>conftest.er1
4302   ac_status=$?
4303   grep -v '^ *+' conftest.er1 >conftest.err
4304   rm -f conftest.er1
4305   cat conftest.err >&5
4306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4307   (exit $ac_status); } && {
4308          test -z "$ac_cxx_werror_flag" ||
4309          test ! -s conftest.err
4310        } && test -s conftest$ac_exeext &&
4311        $as_test_x conftest$ac_exeext; then
4312   ac_cv_func_socket=yes
4313 else
4314   echo "$as_me: failed program was:" >&5
4315 sed 's/^/| /' conftest.$ac_ext >&5
4316
4317         ac_cv_func_socket=no
4318 fi
4319
4320 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4321       conftest$ac_exeext conftest.$ac_ext
4322 fi
4323 { echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
4324 echo "${ECHO_T}$ac_cv_func_socket" >&6; }
4325 if test $ac_cv_func_socket = yes; then
4326   :
4327 else
4328   { echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
4329 echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
4330 if test "${ac_cv_lib_socket_socket+set}" = set; then
4331   echo $ECHO_N "(cached) $ECHO_C" >&6
4332 else
4333   ac_check_lib_save_LIBS=$LIBS
4334 LIBS="-lsocket  $LIBS"
4335 cat >conftest.$ac_ext <<_ACEOF
4336 /* confdefs.h.  */
4337 _ACEOF
4338 cat confdefs.h >>conftest.$ac_ext
4339 cat >>conftest.$ac_ext <<_ACEOF
4340 /* end confdefs.h.  */
4341
4342 /* Override any GCC internal prototype to avoid an error.
4343    Use char because int might match the return type of a GCC
4344    builtin and then its argument prototype would still apply.  */
4345 #ifdef __cplusplus
4346 extern "C"
4347 #endif
4348 char socket ();
4349 int
4350 main ()
4351 {
4352 return socket ();
4353   ;
4354   return 0;
4355 }
4356 _ACEOF
4357 rm -f conftest.$ac_objext conftest$ac_exeext
4358 if { (ac_try="$ac_link"
4359 case "(($ac_try" in
4360   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4361   *) ac_try_echo=$ac_try;;
4362 esac
4363 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4364   (eval "$ac_link") 2>conftest.er1
4365   ac_status=$?
4366   grep -v '^ *+' conftest.er1 >conftest.err
4367   rm -f conftest.er1
4368   cat conftest.err >&5
4369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4370   (exit $ac_status); } && {
4371          test -z "$ac_cxx_werror_flag" ||
4372          test ! -s conftest.err
4373        } && test -s conftest$ac_exeext &&
4374        $as_test_x conftest$ac_exeext; then
4375   ac_cv_lib_socket_socket=yes
4376 else
4377   echo "$as_me: failed program was:" >&5
4378 sed 's/^/| /' conftest.$ac_ext >&5
4379
4380         ac_cv_lib_socket_socket=no
4381 fi
4382
4383 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4384       conftest$ac_exeext conftest.$ac_ext
4385 LIBS=$ac_check_lib_save_LIBS
4386 fi
4387 { echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
4388 echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
4389 if test $ac_cv_lib_socket_socket = yes; then
4390   LIBS="$LIBS -lsocket"
4391 fi
4392
4393 fi
4394
4395
4396
4397 support_frills=yes
4398 support_inheritpixmap=yes
4399 support_fading=yes
4400 support_keepscrolling=yes
4401 support_selectionscrolling=yes
4402 support_mousewheel=yes
4403 support_mouseslipwheel=yes
4404 support_text_blink=yes
4405 support_pointer_blank=yes
4406 support_scroll_rxvt=yes
4407 support_scroll_next=yes
4408 support_scroll_xterm=yes
4409 support_scroll_plain=yes
4410 support_xim=yes
4411 support_afterimage=yes
4412 support_afterstep=yes
4413 support_xft=yes
4414 support_unicode3=no
4415 support_combining=yes
4416 support_8bitctrls=no
4417 support_iso14755=yes
4418 support_styles=yes
4419 support_perl=yes
4420 codesets=all
4421
4422
4423 if test "x$enable_shared" = xyes; then
4424
4425 cat >>confdefs.h <<\_ACEOF
4426 #define LIBRXVT 1
4427 _ACEOF
4428
4429     INSTALL_LIBRXVT=yes
4430 fi
4431
4432
4433 # Check whether --enable-everything was given.
4434 if test "${enable_everything+set}" = set; then
4435   enableval=$enable_everything;
4436     if test x$enableval = xno; then
4437        support_frills=no
4438        support_inheritpixmap=no
4439        support_fading=no
4440        support_keepscrolling=no
4441        support_selectionscrolling=no
4442        support_lastlog=no
4443        support_mousewheel=no
4444        support_mouseslipwheel=no
4445        support_text_blink=no
4446        support_pointer_blank=no
4447        support_scroll_rxvt=no
4448        support_scroll_next=no
4449        support_scroll_xterm=no
4450        support_scroll_plain=no
4451        support_utmp=no
4452        support_wtmp=no
4453        support_xim=no
4454        support_afterimage=no
4455        support_afterstep=no
4456        support_xft=no
4457        support_unicode3=no
4458        support_combining=no
4459        support_8bitctrls=no
4460        support_iso14755=no
4461        support_styles=no
4462        support_perl=no
4463        codesets=
4464     fi
4465     if test x$enableval = xyes; then
4466        support_frills=yes
4467        support_inheritpixmap=yes
4468        support_fading=yes
4469        support_keepscrolling=yes
4470        support_selectionscrolling=yes
4471        support_lastlog=yes
4472        support_mousewheel=yes
4473        support_mouseslipwheel=yes
4474        support_text_blink=yes
4475        support_pointer_blank=yes
4476        support_scroll_rxvt=yes
4477        support_scroll_next=yes
4478        support_scroll_xterm=yes
4479        support_scroll_plain=yes
4480        support_utmp=yes
4481        support_wtmp=yes
4482        support_xim=yes
4483        support_afterimage=yes
4484        support_afterstep=yes
4485        support_xft=yes
4486        support_unicode3=yes
4487        support_combining=yes
4488        #support_8bitctrls=yes
4489        support_iso14755=yes
4490        support_styles=yes
4491        support_perl=yes
4492        codesets=all
4493     fi
4494
4495 fi
4496
4497
4498 WARNINGS=no
4499 # Check whether --enable-warnings was given.
4500 if test "${enable_warnings+set}" = set; then
4501   enableval=$enable_warnings; if test x$enableval = xyes; then
4502     WARNINGS=yes
4503   fi
4504 fi
4505
4506 if test x$GXX = xyes; then
4507   if test $WARNINGS = yes; then
4508     save_CXXFLAGS="$CXXFLAGS"
4509     CXXFLAGS="$CXXFLAGS -Wall -Wno-sign-compare -Wno-reorder -Wno-non-virtual-dtor"
4510     cat >conftest.$ac_ext <<_ACEOF
4511 /* confdefs.h.  */
4512 _ACEOF
4513 cat confdefs.h >>conftest.$ac_ext
4514 cat >>conftest.$ac_ext <<_ACEOF
4515 /* end confdefs.h.  */
4516
4517 int
4518 main ()
4519 {
4520
4521   ;
4522   return 0;
4523 }
4524 _ACEOF
4525 rm -f conftest.$ac_objext
4526 if { (ac_try="$ac_compile"
4527 case "(($ac_try" in
4528   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4529   *) ac_try_echo=$ac_try;;
4530 esac
4531 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4532   (eval "$ac_compile") 2>conftest.er1
4533   ac_status=$?
4534   grep -v '^ *+' conftest.er1 >conftest.err
4535   rm -f conftest.er1
4536   cat conftest.err >&5
4537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4538   (exit $ac_status); } && {
4539          test -z "$ac_cxx_werror_flag" ||
4540          test ! -s conftest.err
4541        } && test -s conftest.$ac_objext; then
4542   :
4543 else
4544   echo "$as_me: failed program was:" >&5
4545 sed 's/^/| /' conftest.$ac_ext >&5
4546
4547         CXXFLAGS="$save_CXXFLAGS"
4548 fi
4549
4550 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4551   else
4552     CXXFLAGS="$CXXFLAGS -w"
4553   fi
4554 fi
4555
4556 # Check whether --enable-unicode3 was given.
4557 if test "${enable_unicode3+set}" = set; then
4558   enableval=$enable_unicode3; if test x$enableval = xyes -o x$enableval = xno; then
4559     support_unicode3=$enableval
4560   fi
4561 fi
4562
4563
4564 # Check whether --enable-combining was given.
4565 if test "${enable_combining+set}" = set; then
4566   enableval=$enable_combining; if test x$enableval = xyes -o x$enableval = xno; then
4567     support_combining=$enableval
4568   fi
4569 fi
4570
4571
4572 # Check whether --enable-xft was given.
4573 if test "${enable_xft+set}" = set; then
4574   enableval=$enable_xft; if test x$enableval = xyes -o x$enableval = xno; then
4575     support_xft=$enableval
4576   fi
4577 fi
4578
4579
4580 # Check whether --enable-font-styles was given.
4581 if test "${enable_font_styles+set}" = set; then
4582   enableval=$enable_font_styles; if test x$enableval = xyes -o x$enableval = xno; then
4583     support_styles=$enableval
4584   fi
4585 fi
4586
4587
4588 # Check whether --enable-afterimage was given.
4589 if test "${enable_afterimage+set}" = set; then
4590   enableval=$enable_afterimage; if test x$enableval = xyes -o x$enableval = xno; then
4591     support_afterimage=$enableval
4592   fi
4593 fi
4594
4595
4596
4597 # Check whether --with-afterimage_config was given.
4598 if test "${with_afterimage_config+set}" = set; then
4599   withval=$with_afterimage_config; if test "x$withval" != x; then
4600     afterimage_config=$withval/afterimage-config
4601   fi
4602 fi
4603
4604
4605
4606 # Check whether --enable-transparency was given.
4607 if test "${enable_transparency+set}" = set; then
4608   enableval=$enable_transparency; if test x$enableval = xyes -o x$enableval = xno; then
4609     support_inheritpixmap=$enableval
4610   fi
4611 fi
4612
4613
4614 # Check whether --enable-fading was given.
4615 if test "${enable_fading+set}" = set; then
4616   enableval=$enable_fading; if test x$enableval = xyes -o x$enableval = xno; then
4617     support_fading=$enableval
4618   fi
4619 fi
4620
4621
4622 # Check whether --enable-rxvt-scroll was given.
4623 if test "${enable_rxvt_scroll+set}" = set; then
4624   enableval=$enable_rxvt_scroll; if test x$enableval = xyes -o x$enableval = xno; then
4625     support_scroll_rxvt=$enableval
4626   fi
4627 fi
4628
4629
4630 # Check whether --enable-next-scroll was given.
4631 if test "${enable_next_scroll+set}" = set; then
4632   enableval=$enable_next_scroll; if test x$enableval = xyes -o x$enableval = xno; then
4633     support_scroll_next=$enableval
4634   fi
4635 fi
4636
4637
4638 # Check whether --enable-xterm-scroll was given.
4639 if test "${enable_xterm_scroll+set}" = set; then
4640   enableval=$enable_xterm_scroll; if test x$enableval = xyes -o x$enableval = xno; then
4641     support_scroll_xterm=$enableval
4642   fi
4643 fi
4644
4645
4646 # Check whether --enable-perl was given.
4647 if test "${enable_perl+set}" = set; then
4648   enableval=$enable_perl; if test x$enableval = xyes -o x$enableval = xno; then
4649     support_perl=$enableval
4650   fi
4651 fi
4652
4653
4654 # Check whether --enable-plain-scroll was given.
4655 if test "${enable_plain_scroll+set}" = set; then
4656   enableval=$enable_plain_scroll; if test x$enableval = xyes -o x$enableval = xno; then
4657     support_scroll_plain=$enableval
4658   fi
4659 fi
4660
4661
4662
4663 # Check whether --with-codesets was given.
4664 if test "${with_codesets+set}" = set; then
4665   withval=$with_codesets; codesets="$withval"
4666 fi
4667
4668
4669 # Check whether --enable-xim was given.
4670 if test "${enable_xim+set}" = set; then
4671   enableval=$enable_xim; if test x$enableval = xyes -o x$enableval = xno; then
4672     support_xim=$enableval
4673   fi
4674 fi
4675
4676
4677 # Check whether --enable-backspace-key was given.
4678 if test "${enable_backspace_key+set}" = set; then
4679   enableval=$enable_backspace_key; if test x$enableval = xno; then
4680
4681 cat >>confdefs.h <<\_ACEOF
4682 #define NO_BACKSPACE_KEY 1
4683 _ACEOF
4684
4685   fi
4686 fi
4687
4688
4689 # Check whether --enable-delete-key was given.
4690 if test "${enable_delete_key+set}" = set; then
4691   enableval=$enable_delete_key; if test x$enableval = xno; then
4692
4693 cat >>confdefs.h <<\_ACEOF
4694 #define NO_DELETE_KEY 1
4695 _ACEOF
4696
4697   fi
4698 fi
4699
4700
4701 # Check whether --enable-resources was given.
4702 if test "${enable_resources+set}" = set; then
4703   enableval=$enable_resources; if test x$enableval = xno; then
4704
4705 cat >>confdefs.h <<\_ACEOF
4706 #define NO_RESOURCES 1
4707 _ACEOF
4708
4709   fi
4710 fi
4711
4712
4713 # Check whether --enable-8bitctrls was given.
4714 if test "${enable_8bitctrls+set}" = set; then
4715   enableval=$enable_8bitctrls; if test x$enableval = xyes -o x$enableval = xno; then
4716     support_8bitctrls=$enableval
4717   fi
4718 fi
4719
4720
4721 RESFALLBACK=Rxvt
4722 # Check whether --enable-fallback was given.
4723 if test "${enable_fallback+set}" = set; then
4724   enableval=$enable_fallback;
4725    test x$enableval = xyes && enableval=Rxvt
4726    test x$enableval = xno  && enableval=
4727    RESFALLBACK="$enableval"
4728
4729 fi
4730
4731
4732 if test x$RESFALLBACK != x; then
4733
4734 cat >>confdefs.h <<_ACEOF
4735 #define RESFALLBACK "$RESFALLBACK"
4736 _ACEOF
4737
4738 fi
4739
4740 RESNAME=urxvt
4741
4742 # Check whether --with-res-name was given.
4743 if test "${with_res_name+set}" = set; then
4744   withval=$with_res_name; RESNAME="$withval"
4745 fi
4746
4747
4748 cat >>confdefs.h <<_ACEOF
4749 #define RESNAME "$RESNAME"
4750 _ACEOF
4751
4752
4753 RESCLASS=URxvt
4754
4755 # Check whether --with-res-class was given.
4756 if test "${with_res_class+set}" = set; then
4757   withval=$with_res_class; RESCLASS="$withval"
4758 fi
4759
4760
4761 cat >>confdefs.h <<_ACEOF
4762 #define RESCLASS "$RESCLASS"
4763 _ACEOF
4764
4765
4766 RXVTNAME=urxvt
4767
4768 # Check whether --with-name was given.
4769 if test "${with_name+set}" = set; then
4770   withval=$with_name; RXVTNAME="$withval"
4771 fi
4772
4773
4774 cat >>confdefs.h <<_ACEOF
4775 #define RXVTNAME "$RXVTNAME"
4776 _ACEOF
4777
4778
4779 RXVTNAME=`echo "$RXVTNAME"|sed "$program_transform_name"`
4780
4781
4782 # Check whether --enable-swapscreen was given.
4783 if test "${enable_swapscreen+set}" = set; then
4784   enableval=$enable_swapscreen; if test x$enableval = xno; then
4785
4786 cat >>confdefs.h <<\_ACEOF
4787 #define NO_SECONDARY_SCREEN 1
4788 _ACEOF
4789
4790   fi
4791 fi
4792
4793
4794 # Check whether --enable-iso14755 was given.
4795 if test "${enable_iso14755+set}" = set; then
4796   enableval=$enable_iso14755; if test x$enableval = xyes -o x$enableval = xno; then
4797     support_iso14755=$enableval
4798   fi
4799 fi
4800
4801
4802 # Check whether --enable-frills was given.
4803 if test "${enable_frills+set}" = set; then
4804   enableval=$enable_frills; if test x$enableval = xyes -o x$enableval = xno; then
4805     support_frills=$enableval
4806   fi
4807 fi
4808
4809
4810 # Check whether --enable-keepscrolling was given.
4811 if test "${enable_keepscrolling+set}" = set; then
4812   enableval=$enable_keepscrolling; if test x$enableval = xyes -o x$enableval = xno; then
4813     support_keepscrolling=$enableval
4814   fi
4815 fi
4816
4817
4818 # Check whether --enable-selectionscrolling was given.
4819 if test "${enable_selectionscrolling+set}" = set; then
4820   enableval=$enable_selectionscrolling; if test x$enableval = xyes -o x$enableval = xno; then
4821     support_selectionscrolling=$enableval
4822   fi
4823 fi
4824
4825
4826 # Check whether --enable-mousewheel was given.
4827 if test "${enable_mousewheel+set}" = set; then
4828   enableval=$enable_mousewheel; if test x$enableval = xyes -o x$enableval = xno; then
4829     support_mousewheel=$enableval
4830   fi
4831 fi
4832
4833
4834 # Check whether --enable-slipwheeling was given.
4835 if test "${enable_slipwheeling+set}" = set; then
4836   enableval=$enable_slipwheeling; if test x$enableval = xyes -o x$enableval = xno; then
4837     support_mouseslipwheel=$enableval
4838   fi
4839 fi
4840
4841
4842 # Check whether --enable-smart-resize was given.
4843 if test "${enable_smart_resize+set}" = set; then
4844   enableval=$enable_smart_resize; if test x$enableval = xyes; then
4845
4846 cat >>confdefs.h <<\_ACEOF
4847 #define SMART_RESIZE 1
4848 _ACEOF
4849
4850   fi
4851 fi
4852
4853
4854 # Check whether --enable-text-blink was given.
4855 if test "${enable_text_blink+set}" = set; then
4856   enableval=$enable_text_blink; if test x$enableval = xyes -o x$enableval = xno; then
4857     support_text_blink=$enableval
4858   fi
4859 fi
4860
4861
4862 # Check whether --enable-pointer-blank was given.
4863 if test "${enable_pointer_blank+set}" = set; then
4864   enableval=$enable_pointer_blank; if test x$enableval = xyes -o x$enableval = xno; then
4865     support_pointer_blank=$enableval
4866   fi
4867 fi
4868
4869
4870
4871 # Check whether --with-term was given.
4872 if test "${with_term+set}" = set; then
4873   withval=$with_term; if test x$withval != x; then
4874
4875 cat >>confdefs.h <<_ACEOF
4876 #define TERMENV "$withval"
4877 _ACEOF
4878  term="$withval"
4879   fi
4880 fi
4881
4882
4883
4884 # Check whether --with-terminfo was given.
4885 if test "${with_terminfo+set}" = set; then
4886   withval=$with_terminfo; if test x$withval != x; then
4887
4888 cat >>confdefs.h <<_ACEOF
4889 #define RXVT_TERMINFO "$withval"
4890 _ACEOF
4891  terminfo="$withval"
4892   fi
4893 fi
4894
4895
4896
4897 LIBEV_M4_AVOID_LIBRT=1
4898
4899 ac_ext=cpp
4900 ac_cpp='$CXXCPP $CPPFLAGS'
4901 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4902 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4903 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4904 { echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
4905 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; }
4906 if test -z "$CXXCPP"; then
4907   if test "${ac_cv_prog_CXXCPP+set}" = set; then
4908   echo $ECHO_N "(cached) $ECHO_C" >&6
4909 else
4910       # Double quotes because CXXCPP needs to be expanded
4911     for CXXCPP in "$CXX -E" "/lib/cpp"
4912     do
4913       ac_preproc_ok=false
4914 for ac_cxx_preproc_warn_flag in '' yes
4915 do
4916   # Use a header file that comes with gcc, so configuring glibc
4917   # with a fresh cross-compiler works.
4918   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4919   # <limits.h> exists even on freestanding compilers.
4920   # On the NeXT, cc -E runs the code through the compiler's parser,
4921   # not just through cpp. "Syntax error" is here to catch this case.
4922   cat >conftest.$ac_ext <<_ACEOF
4923 /* confdefs.h.  */
4924 _ACEOF
4925 cat confdefs.h >>conftest.$ac_ext
4926 cat >>conftest.$ac_ext <<_ACEOF
4927 /* end confdefs.h.  */
4928 #ifdef __STDC__
4929 # include <limits.h>
4930 #else
4931 # include <assert.h>
4932 #endif
4933                      Syntax error
4934 _ACEOF
4935 if { (ac_try="$ac_cpp conftest.$ac_ext"
4936 case "(($ac_try" in
4937   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4938   *) ac_try_echo=$ac_try;;
4939 esac
4940 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4941   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4942   ac_status=$?
4943   grep -v '^ *+' conftest.er1 >conftest.err
4944   rm -f conftest.er1
4945   cat conftest.err >&5
4946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4947   (exit $ac_status); } >/dev/null && {
4948          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
4949          test ! -s conftest.err
4950        }; then
4951   :
4952 else
4953   echo "$as_me: failed program was:" >&5
4954 sed 's/^/| /' conftest.$ac_ext >&5
4955
4956   # Broken: fails on valid input.
4957 continue
4958 fi
4959
4960 rm -f conftest.err conftest.$ac_ext
4961
4962   # OK, works on sane cases.  Now check whether nonexistent headers
4963   # can be detected and how.
4964   cat >conftest.$ac_ext <<_ACEOF
4965 /* confdefs.h.  */
4966 _ACEOF
4967 cat confdefs.h >>conftest.$ac_ext
4968 cat >>conftest.$ac_ext <<_ACEOF
4969 /* end confdefs.h.  */
4970 #include <ac_nonexistent.h>
4971 _ACEOF
4972 if { (ac_try="$ac_cpp conftest.$ac_ext"
4973 case "(($ac_try" in
4974   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4975   *) ac_try_echo=$ac_try;;
4976 esac
4977 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4978   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4979   ac_status=$?
4980   grep -v '^ *+' conftest.er1 >conftest.err
4981   rm -f conftest.er1
4982   cat conftest.err >&5
4983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4984   (exit $ac_status); } >/dev/null && {
4985          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
4986          test ! -s conftest.err
4987        }; then
4988   # Broken: success on invalid input.
4989 continue
4990 else
4991   echo "$as_me: failed program was:" >&5
4992 sed 's/^/| /' conftest.$ac_ext >&5
4993
4994   # Passes both tests.
4995 ac_preproc_ok=:
4996 break
4997 fi
4998
4999 rm -f conftest.err conftest.$ac_ext
5000
5001 done
5002 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5003 rm -f conftest.err conftest.$ac_ext
5004 if $ac_preproc_ok; then
5005   break
5006 fi
5007
5008     done
5009     ac_cv_prog_CXXCPP=$CXXCPP
5010
5011 fi
5012   CXXCPP=$ac_cv_prog_CXXCPP
5013 else
5014   ac_cv_prog_CXXCPP=$CXXCPP
5015 fi
5016 { echo "$as_me:$LINENO: result: $CXXCPP" >&5
5017 echo "${ECHO_T}$CXXCPP" >&6; }
5018 ac_preproc_ok=false
5019 for ac_cxx_preproc_warn_flag in '' yes
5020 do
5021   # Use a header file that comes with gcc, so configuring glibc
5022   # with a fresh cross-compiler works.
5023   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5024   # <limits.h> exists even on freestanding compilers.
5025   # On the NeXT, cc -E runs the code through the compiler's parser,
5026   # not just through cpp. "Syntax error" is here to catch this case.
5027   cat >conftest.$ac_ext <<_ACEOF
5028 /* confdefs.h.  */
5029 _ACEOF
5030 cat confdefs.h >>conftest.$ac_ext
5031 cat >>conftest.$ac_ext <<_ACEOF
5032 /* end confdefs.h.  */
5033 #ifdef __STDC__
5034 # include <limits.h>
5035 #else
5036 # include <assert.h>
5037 #endif
5038                      Syntax error
5039 _ACEOF
5040 if { (ac_try="$ac_cpp conftest.$ac_ext"
5041 case "(($ac_try" in
5042   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5043   *) ac_try_echo=$ac_try;;
5044 esac
5045 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5046   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5047   ac_status=$?
5048   grep -v '^ *+' conftest.er1 >conftest.err
5049   rm -f conftest.er1
5050   cat conftest.err >&5
5051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5052   (exit $ac_status); } >/dev/null && {
5053          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
5054          test ! -s conftest.err
5055        }; then
5056   :
5057 else
5058   echo "$as_me: failed program was:" >&5
5059 sed 's/^/| /' conftest.$ac_ext >&5
5060
5061   # Broken: fails on valid input.
5062 continue
5063 fi
5064
5065 rm -f conftest.err conftest.$ac_ext
5066
5067   # OK, works on sane cases.  Now check whether nonexistent headers
5068   # can be detected and how.
5069   cat >conftest.$ac_ext <<_ACEOF
5070 /* confdefs.h.  */
5071 _ACEOF
5072 cat confdefs.h >>conftest.$ac_ext
5073 cat >>conftest.$ac_ext <<_ACEOF
5074 /* end confdefs.h.  */
5075 #include <ac_nonexistent.h>
5076 _ACEOF
5077 if { (ac_try="$ac_cpp conftest.$ac_ext"
5078 case "(($ac_try" in
5079   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5080   *) ac_try_echo=$ac_try;;
5081 esac
5082 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5083   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5084   ac_status=$?
5085   grep -v '^ *+' conftest.er1 >conftest.err
5086   rm -f conftest.er1
5087   cat conftest.err >&5
5088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5089   (exit $ac_status); } >/dev/null && {
5090          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
5091          test ! -s conftest.err
5092        }; then
5093   # Broken: success on invalid input.
5094 continue
5095 else
5096   echo "$as_me: failed program was:" >&5
5097 sed 's/^/| /' conftest.$ac_ext >&5
5098
5099   # Passes both tests.
5100 ac_preproc_ok=:
5101 break
5102 fi
5103
5104 rm -f conftest.err conftest.$ac_ext
5105
5106 done
5107 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5108 rm -f conftest.err conftest.$ac_ext
5109 if $ac_preproc_ok; then
5110   :
5111 else
5112   { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
5113 See \`config.log' for more details." >&5
5114 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
5115 See \`config.log' for more details." >&2;}
5116    { (exit 1); exit 1; }; }
5117 fi
5118
5119 ac_ext=cpp
5120 ac_cpp='$CXXCPP $CPPFLAGS'
5121 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5122 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5123 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5124
5125
5126 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5127 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
5128 if test "${ac_cv_header_stdc+set}" = set; then
5129   echo $ECHO_N "(cached) $ECHO_C" >&6
5130 else
5131   cat >conftest.$ac_ext <<_ACEOF
5132 /* confdefs.h.  */
5133 _ACEOF
5134 cat confdefs.h >>conftest.$ac_ext
5135 cat >>conftest.$ac_ext <<_ACEOF
5136 /* end confdefs.h.  */
5137 #include <stdlib.h>
5138 #include <stdarg.h>
5139 #include <string.h>
5140 #include <float.h>
5141
5142 int
5143 main ()
5144 {
5145
5146   ;
5147   return 0;
5148 }
5149 _ACEOF
5150 rm -f conftest.$ac_objext
5151 if { (ac_try="$ac_compile"
5152 case "(($ac_try" in
5153   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5154   *) ac_try_echo=$ac_try;;
5155 esac
5156 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5157   (eval "$ac_compile") 2>conftest.er1
5158   ac_status=$?
5159   grep -v '^ *+' conftest.er1 >conftest.err
5160   rm -f conftest.er1
5161   cat conftest.err >&5
5162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5163   (exit $ac_status); } && {
5164          test -z "$ac_cxx_werror_flag" ||
5165          test ! -s conftest.err
5166        } && test -s conftest.$ac_objext; then
5167   ac_cv_header_stdc=yes
5168 else
5169   echo "$as_me: failed program was:" >&5
5170 sed 's/^/| /' conftest.$ac_ext >&5
5171
5172         ac_cv_header_stdc=no
5173 fi
5174
5175 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5176
5177 if test $ac_cv_header_stdc = yes; then
5178   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5179   cat >conftest.$ac_ext <<_ACEOF
5180 /* confdefs.h.  */
5181 _ACEOF
5182 cat confdefs.h >>conftest.$ac_ext
5183 cat >>conftest.$ac_ext <<_ACEOF
5184 /* end confdefs.h.  */
5185 #include <string.h>
5186
5187 _ACEOF
5188 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5189   $EGREP "memchr" >/dev/null 2>&1; then
5190   :
5191 else
5192   ac_cv_header_stdc=no
5193 fi
5194 rm -f conftest*
5195
5196 fi
5197
5198 if test $ac_cv_header_stdc = yes; then
5199   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5200   cat >conftest.$ac_ext <<_ACEOF
5201 /* confdefs.h.  */
5202 _ACEOF
5203 cat confdefs.h >>conftest.$ac_ext
5204 cat >>conftest.$ac_ext <<_ACEOF
5205 /* end confdefs.h.  */
5206 #include <stdlib.h>
5207
5208 _ACEOF
5209 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5210   $EGREP "free" >/dev/null 2>&1; then
5211   :
5212 else
5213   ac_cv_header_stdc=no
5214 fi
5215 rm -f conftest*
5216
5217 fi
5218
5219 if test $ac_cv_header_stdc = yes; then
5220   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5221   if test "$cross_compiling" = yes; then
5222   :
5223 else
5224   cat >conftest.$ac_ext <<_ACEOF
5225 /* confdefs.h.  */
5226 _ACEOF
5227 cat confdefs.h >>conftest.$ac_ext
5228 cat >>conftest.$ac_ext <<_ACEOF
5229 /* end confdefs.h.  */
5230 #include <ctype.h>
5231 #include <stdlib.h>
5232 #if ((' ' & 0x0FF) == 0x020)
5233 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5234 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5235 #else
5236 # define ISLOWER(c) \
5237                    (('a' <= (c) && (c) <= 'i') \
5238                      || ('j' <= (c) && (c) <= 'r') \
5239                      || ('s' <= (c) && (c) <= 'z'))
5240 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5241 #endif
5242
5243 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5244 int
5245 main ()
5246 {
5247   int i;
5248   for (i = 0; i < 256; i++)
5249     if (XOR (islower (i), ISLOWER (i))
5250         || toupper (i) != TOUPPER (i))
5251       return 2;
5252   return 0;
5253 }
5254 _ACEOF
5255 rm -f conftest$ac_exeext
5256 if { (ac_try="$ac_link"
5257 case "(($ac_try" in
5258   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5259   *) ac_try_echo=$ac_try;;
5260 esac
5261 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5262   (eval "$ac_link") 2>&5
5263   ac_status=$?
5264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5265   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5266   { (case "(($ac_try" in
5267   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5268   *) ac_try_echo=$ac_try;;
5269 esac
5270 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5271   (eval "$ac_try") 2>&5
5272   ac_status=$?
5273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5274   (exit $ac_status); }; }; then
5275   :
5276 else
5277   echo "$as_me: program exited with status $ac_status" >&5
5278 echo "$as_me: failed program was:" >&5
5279 sed 's/^/| /' conftest.$ac_ext >&5
5280
5281 ( exit $ac_status )
5282 ac_cv_header_stdc=no
5283 fi
5284 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5285 fi
5286
5287
5288 fi
5289 fi
5290 { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5291 echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
5292 if test $ac_cv_header_stdc = yes; then
5293
5294 cat >>confdefs.h <<\_ACEOF
5295 #define STDC_HEADERS 1
5296 _ACEOF
5297
5298 fi
5299
5300 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5311                   inttypes.h stdint.h unistd.h
5312 do
5313 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5314 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5315 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5316 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5317   echo $ECHO_N "(cached) $ECHO_C" >&6
5318 else
5319   cat >conftest.$ac_ext <<_ACEOF
5320 /* confdefs.h.  */
5321 _ACEOF
5322 cat confdefs.h >>conftest.$ac_ext
5323 cat >>conftest.$ac_ext <<_ACEOF
5324 /* end confdefs.h.  */
5325 $ac_includes_default
5326
5327 #include <$ac_header>
5328 _ACEOF
5329 rm -f conftest.$ac_objext
5330 if { (ac_try="$ac_compile"
5331 case "(($ac_try" in
5332   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5333   *) ac_try_echo=$ac_try;;
5334 esac
5335 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5336   (eval "$ac_compile") 2>conftest.er1
5337   ac_status=$?
5338   grep -v '^ *+' conftest.er1 >conftest.err
5339   rm -f conftest.er1
5340   cat conftest.err >&5
5341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5342   (exit $ac_status); } && {
5343          test -z "$ac_cxx_werror_flag" ||
5344          test ! -s conftest.err
5345        } && test -s conftest.$ac_objext; then
5346   eval "$as_ac_Header=yes"
5347 else
5348   echo "$as_me: failed program was:" >&5
5349 sed 's/^/| /' conftest.$ac_ext >&5
5350
5351         eval "$as_ac_Header=no"
5352 fi
5353
5354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5355 fi
5356 ac_res=`eval echo '${'$as_ac_Header'}'`
5357                { echo "$as_me:$LINENO: result: $ac_res" >&5
5358 echo "${ECHO_T}$ac_res" >&6; }
5359 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5360   cat >>confdefs.h <<_ACEOF
5361 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5362 _ACEOF
5363
5364 fi
5365
5366 done
5367
5368
5369
5370
5371
5372
5373 for ac_header in sys/epoll.h sys/event.h sys/queue.h port.h
5374 do
5375 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5376 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5377   { echo "$as_me:$LINENO: checking for $ac_header" >&5
5378 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5379 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5380   echo $ECHO_N "(cached) $ECHO_C" >&6
5381 fi
5382 ac_res=`eval echo '${'$as_ac_Header'}'`
5383                { echo "$as_me:$LINENO: result: $ac_res" >&5
5384 echo "${ECHO_T}$ac_res" >&6; }
5385 else
5386   # Is the header compilable?
5387 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
5388 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
5389 cat >conftest.$ac_ext <<_ACEOF
5390 /* confdefs.h.  */
5391 _ACEOF
5392 cat confdefs.h >>conftest.$ac_ext
5393 cat >>conftest.$ac_ext <<_ACEOF
5394 /* end confdefs.h.  */
5395 $ac_includes_default
5396 #include <$ac_header>
5397 _ACEOF
5398 rm -f conftest.$ac_objext
5399 if { (ac_try="$ac_compile"
5400 case "(($ac_try" in
5401   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5402   *) ac_try_echo=$ac_try;;
5403 esac
5404 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5405   (eval "$ac_compile") 2>conftest.er1
5406   ac_status=$?
5407   grep -v '^ *+' conftest.er1 >conftest.err
5408   rm -f conftest.er1
5409   cat conftest.err >&5
5410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5411   (exit $ac_status); } && {
5412          test -z "$ac_cxx_werror_flag" ||
5413          test ! -s conftest.err
5414        } && test -s conftest.$ac_objext; then
5415   ac_header_compiler=yes
5416 else
5417   echo "$as_me: failed program was:" >&5
5418 sed 's/^/| /' conftest.$ac_ext >&5
5419
5420         ac_header_compiler=no
5421 fi
5422
5423 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5424 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5425 echo "${ECHO_T}$ac_header_compiler" >&6; }
5426
5427 # Is the header present?
5428 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
5429 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
5430 cat >conftest.$ac_ext <<_ACEOF
5431 /* confdefs.h.  */
5432 _ACEOF
5433 cat confdefs.h >>conftest.$ac_ext
5434 cat >>conftest.$ac_ext <<_ACEOF
5435 /* end confdefs.h.  */
5436 #include <$ac_header>
5437 _ACEOF
5438 if { (ac_try="$ac_cpp conftest.$ac_ext"
5439 case "(($ac_try" in
5440   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5441   *) ac_try_echo=$ac_try;;
5442 esac
5443 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5444   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5445   ac_status=$?
5446   grep -v '^ *+' conftest.er1 >conftest.err
5447   rm -f conftest.er1
5448   cat conftest.err >&5
5449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5450   (exit $ac_status); } >/dev/null && {
5451          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
5452          test ! -s conftest.err
5453        }; then
5454   ac_header_preproc=yes
5455 else
5456   echo "$as_me: failed program was:" >&5
5457 sed 's/^/| /' conftest.$ac_ext >&5
5458
5459   ac_header_preproc=no
5460 fi
5461
5462 rm -f conftest.err conftest.$ac_ext
5463 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5464 echo "${ECHO_T}$ac_header_preproc" >&6; }
5465
5466 # So?  What about this header?
5467 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
5468   yes:no: )
5469     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5470 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5471     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5472 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5473     ac_header_preproc=yes
5474     ;;
5475   no:yes:* )
5476     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5477 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5478     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
5479 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
5480     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5481 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5482     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
5483 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
5484     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5485 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5486     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5487 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5488
5489     ;;
5490 esac
5491 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5492 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5493 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5494   echo $ECHO_N "(cached) $ECHO_C" >&6
5495 else
5496   eval "$as_ac_Header=\$ac_header_preproc"
5497 fi
5498 ac_res=`eval echo '${'$as_ac_Header'}'`
5499                { echo "$as_me:$LINENO: result: $ac_res" >&5
5500 echo "${ECHO_T}$ac_res" >&6; }
5501
5502 fi
5503 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5504   cat >>confdefs.h <<_ACEOF
5505 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5506 _ACEOF
5507
5508 fi
5509
5510 done
5511
5512
5513
5514
5515
5516 for ac_func in epoll_ctl kqueue port_create
5517 do
5518 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5519 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5520 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5521 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5522   echo $ECHO_N "(cached) $ECHO_C" >&6
5523 else
5524   cat >conftest.$ac_ext <<_ACEOF
5525 /* confdefs.h.  */
5526 _ACEOF
5527 cat confdefs.h >>conftest.$ac_ext
5528 cat >>conftest.$ac_ext <<_ACEOF
5529 /* end confdefs.h.  */
5530 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5531    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5532 #define $ac_func innocuous_$ac_func
5533
5534 /* System header to define __stub macros and hopefully few prototypes,
5535     which can conflict with char $ac_func (); below.
5536     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5537     <limits.h> exists even on freestanding compilers.  */
5538
5539 #ifdef __STDC__
5540 # include <limits.h>
5541 #else
5542 # include <assert.h>
5543 #endif
5544
5545 #undef $ac_func
5546
5547 /* Override any GCC internal prototype to avoid an error.
5548    Use char because int might match the return type of a GCC
5549    builtin and then its argument prototype would still apply.  */
5550 #ifdef __cplusplus
5551 extern "C"
5552 #endif
5553 char $ac_func ();
5554 /* The GNU C library defines this for functions which it implements
5555     to always fail with ENOSYS.  Some functions are actually named
5556     something starting with __ and the normal name is an alias.  */
5557 #if defined __stub_$ac_func || defined __stub___$ac_func
5558 choke me
5559 #endif
5560
5561 int
5562 main ()
5563 {
5564 return $ac_func ();
5565   ;
5566   return 0;
5567 }
5568 _ACEOF
5569 rm -f conftest.$ac_objext conftest$ac_exeext
5570 if { (ac_try="$ac_link"
5571 case "(($ac_try" in
5572   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5573   *) ac_try_echo=$ac_try;;
5574 esac
5575 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5576   (eval "$ac_link") 2>conftest.er1
5577   ac_status=$?
5578   grep -v '^ *+' conftest.er1 >conftest.err
5579   rm -f conftest.er1
5580   cat conftest.err >&5
5581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5582   (exit $ac_status); } && {
5583          test -z "$ac_cxx_werror_flag" ||
5584          test ! -s conftest.err
5585        } && test -s conftest$ac_exeext &&
5586        $as_test_x conftest$ac_exeext; then
5587   eval "$as_ac_var=yes"
5588 else
5589   echo "$as_me: failed program was:" >&5
5590 sed 's/^/| /' conftest.$ac_ext >&5
5591
5592         eval "$as_ac_var=no"
5593 fi
5594
5595 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5596       conftest$ac_exeext conftest.$ac_ext
5597 fi
5598 ac_res=`eval echo '${'$as_ac_var'}'`
5599                { echo "$as_me:$LINENO: result: $ac_res" >&5
5600 echo "${ECHO_T}$ac_res" >&6; }
5601 if test `eval echo '${'$as_ac_var'}'` = yes; then
5602   cat >>confdefs.h <<_ACEOF
5603 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5604 _ACEOF
5605
5606 fi
5607 done
5608
5609
5610 { echo "$as_me:$LINENO: checking for clock_gettime" >&5
5611 echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6; }
5612 if test "${ac_cv_func_clock_gettime+set}" = set; then
5613   echo $ECHO_N "(cached) $ECHO_C" >&6
5614 else
5615   cat >conftest.$ac_ext <<_ACEOF
5616 /* confdefs.h.  */
5617 _ACEOF
5618 cat confdefs.h >>conftest.$ac_ext
5619 cat >>conftest.$ac_ext <<_ACEOF
5620 /* end confdefs.h.  */
5621 /* Define clock_gettime to an innocuous variant, in case <limits.h> declares clock_gettime.
5622    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5623 #define clock_gettime innocuous_clock_gettime
5624
5625 /* System header to define __stub macros and hopefully few prototypes,
5626     which can conflict with char clock_gettime (); below.
5627     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5628     <limits.h> exists even on freestanding compilers.  */
5629
5630 #ifdef __STDC__
5631 # include <limits.h>
5632 #else
5633 # include <assert.h>
5634 #endif
5635
5636 #undef clock_gettime
5637
5638 /* Override any GCC internal prototype to avoid an error.
5639    Use char because int might match the return type of a GCC
5640    builtin and then its argument prototype would still apply.  */
5641 #ifdef __cplusplus
5642 extern "C"
5643 #endif
5644 char clock_gettime ();
5645 /* The GNU C library defines this for functions which it implements
5646     to always fail with ENOSYS.  Some functions are actually named
5647     something starting with __ and the normal name is an alias.  */
5648 #if defined __stub_clock_gettime || defined __stub___clock_gettime
5649 choke me
5650 #endif
5651
5652 int
5653 main ()
5654 {
5655 return clock_gettime ();
5656   ;
5657   return 0;
5658 }
5659 _ACEOF
5660 rm -f conftest.$ac_objext conftest$ac_exeext
5661 if { (ac_try="$ac_link"
5662 case "(($ac_try" in
5663   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5664   *) ac_try_echo=$ac_try;;
5665 esac
5666 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5667   (eval "$ac_link") 2>conftest.er1
5668   ac_status=$?
5669   grep -v '^ *+' conftest.er1 >conftest.err
5670   rm -f conftest.er1
5671   cat conftest.err >&5
5672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5673   (exit $ac_status); } && {
5674          test -z "$ac_cxx_werror_flag" ||
5675          test ! -s conftest.err
5676        } && test -s conftest$ac_exeext &&
5677        $as_test_x conftest$ac_exeext; then
5678   ac_cv_func_clock_gettime=yes
5679 else
5680   echo "$as_me: failed program was:" >&5
5681 sed 's/^/| /' conftest.$ac_ext >&5
5682
5683         ac_cv_func_clock_gettime=no
5684 fi
5685
5686 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5687       conftest$ac_exeext conftest.$ac_ext
5688 fi
5689 { echo "$as_me:$LINENO: result: $ac_cv_func_clock_gettime" >&5
5690 echo "${ECHO_T}$ac_cv_func_clock_gettime" >&6; }
5691 if test $ac_cv_func_clock_gettime = yes; then
5692   :
5693 else
5694
5695    if test -z "$LIBEV_M4_AVOID_LIBRT"; then
5696
5697 { echo "$as_me:$LINENO: checking for clock_gettime in -lrt" >&5
5698 echo $ECHO_N "checking for clock_gettime in -lrt... $ECHO_C" >&6; }
5699 if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then
5700   echo $ECHO_N "(cached) $ECHO_C" >&6
5701 else
5702   ac_check_lib_save_LIBS=$LIBS
5703 LIBS="-lrt  $LIBS"
5704 cat >conftest.$ac_ext <<_ACEOF
5705 /* confdefs.h.  */
5706 _ACEOF
5707 cat confdefs.h >>conftest.$ac_ext
5708 cat >>conftest.$ac_ext <<_ACEOF
5709 /* end confdefs.h.  */
5710
5711 /* Override any GCC internal prototype to avoid an error.
5712    Use char because int might match the return type of a GCC
5713    builtin and then its argument prototype would still apply.  */
5714 #ifdef __cplusplus
5715 extern "C"
5716 #endif
5717 char clock_gettime ();
5718 int
5719 main ()
5720 {
5721 return clock_gettime ();
5722   ;
5723   return 0;
5724 }
5725 _ACEOF
5726 rm -f conftest.$ac_objext conftest$ac_exeext
5727 if { (ac_try="$ac_link"
5728 case "(($ac_try" in
5729   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5730   *) ac_try_echo=$ac_try;;
5731 esac
5732 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5733   (eval "$ac_link") 2>conftest.er1
5734   ac_status=$?
5735   grep -v '^ *+' conftest.er1 >conftest.err
5736   rm -f conftest.er1
5737   cat conftest.err >&5
5738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5739   (exit $ac_status); } && {
5740          test -z "$ac_cxx_werror_flag" ||
5741          test ! -s conftest.err
5742        } && test -s conftest$ac_exeext &&
5743        $as_test_x conftest$ac_exeext; then
5744   ac_cv_lib_rt_clock_gettime=yes
5745 else
5746   echo "$as_me: failed program was:" >&5
5747 sed 's/^/| /' conftest.$ac_ext >&5
5748
5749         ac_cv_lib_rt_clock_gettime=no
5750 fi
5751
5752 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5753       conftest$ac_exeext conftest.$ac_ext
5754 LIBS=$ac_check_lib_save_LIBS
5755 fi
5756 { echo "$as_me:$LINENO: result: $ac_cv_lib_rt_clock_gettime" >&5
5757 echo "${ECHO_T}$ac_cv_lib_rt_clock_gettime" >&6; }
5758 if test $ac_cv_lib_rt_clock_gettime = yes; then
5759   cat >>confdefs.h <<_ACEOF
5760 #define HAVE_LIBRT 1
5761 _ACEOF
5762
5763   LIBS="-lrt $LIBS"
5764
5765 fi
5766
5767
5768 for ac_func in clock_gettime
5769 do
5770 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5771 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5772 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5773 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5774   echo $ECHO_N "(cached) $ECHO_C" >&6
5775 else
5776   cat >conftest.$ac_ext <<_ACEOF
5777 /* confdefs.h.  */
5778 _ACEOF
5779 cat confdefs.h >>conftest.$ac_ext
5780 cat >>conftest.$ac_ext <<_ACEOF
5781 /* end confdefs.h.  */
5782 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5783    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5784 #define $ac_func innocuous_$ac_func
5785
5786 /* System header to define __stub macros and hopefully few prototypes,
5787     which can conflict with char $ac_func (); below.
5788     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5789     <limits.h> exists even on freestanding compilers.  */
5790
5791 #ifdef __STDC__
5792 # include <limits.h>
5793 #else
5794 # include <assert.h>
5795 #endif
5796
5797 #undef $ac_func
5798
5799 /* Override any GCC internal prototype to avoid an error.
5800    Use char because int might match the return type of a GCC
5801    builtin and then its argument prototype would still apply.  */
5802 #ifdef __cplusplus
5803 extern "C"
5804 #endif
5805 char $ac_func ();
5806 /* The GNU C library defines this for functions which it implements
5807     to always fail with ENOSYS.  Some functions are actually named
5808     something starting with __ and the normal name is an alias.  */
5809 #if defined __stub_$ac_func || defined __stub___$ac_func
5810 choke me
5811 #endif
5812
5813 int
5814 main ()
5815 {
5816 return $ac_func ();
5817   ;
5818   return 0;
5819 }
5820 _ACEOF
5821 rm -f conftest.$ac_objext conftest$ac_exeext
5822 if { (ac_try="$ac_link"
5823 case "(($ac_try" in
5824   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5825   *) ac_try_echo=$ac_try;;
5826 esac
5827 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5828   (eval "$ac_link") 2>conftest.er1
5829   ac_status=$?
5830   grep -v '^ *+' conftest.er1 >conftest.err
5831   rm -f conftest.er1
5832   cat conftest.err >&5
5833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5834   (exit $ac_status); } && {
5835          test -z "$ac_cxx_werror_flag" ||
5836          test ! -s conftest.err
5837        } && test -s conftest$ac_exeext &&
5838        $as_test_x conftest$ac_exeext; then
5839   eval "$as_ac_var=yes"
5840 else
5841   echo "$as_me: failed program was:" >&5
5842 sed 's/^/| /' conftest.$ac_ext >&5
5843
5844         eval "$as_ac_var=no"
5845 fi
5846
5847 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5848       conftest$ac_exeext conftest.$ac_ext
5849 fi
5850 ac_res=`eval echo '${'$as_ac_var'}'`
5851                { echo "$as_me:$LINENO: result: $ac_res" >&5
5852 echo "${ECHO_T}$ac_res" >&6; }
5853 if test `eval echo '${'$as_ac_var'}'` = yes; then
5854   cat >>confdefs.h <<_ACEOF
5855 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5856 _ACEOF
5857
5858 fi
5859 done
5860
5861    fi
5862
5863 fi
5864
5865
5866
5867 { echo "$as_me:$LINENO: checking for ceil in -lm" >&5
5868 echo $ECHO_N "checking for ceil in -lm... $ECHO_C" >&6; }
5869 if test "${ac_cv_lib_m_ceil+set}" = set; then
5870   echo $ECHO_N "(cached) $ECHO_C" >&6
5871 else
5872   ac_check_lib_save_LIBS=$LIBS
5873 LIBS="-lm  $LIBS"
5874 cat >conftest.$ac_ext <<_ACEOF
5875 /* confdefs.h.  */
5876 _ACEOF
5877 cat confdefs.h >>conftest.$ac_ext
5878 cat >>conftest.$ac_ext <<_ACEOF
5879 /* end confdefs.h.  */
5880
5881 /* Override any GCC internal prototype to avoid an error.
5882    Use char because int might match the return type of a GCC
5883    builtin and then its argument prototype would still apply.  */
5884 #ifdef __cplusplus
5885 extern "C"
5886 #endif
5887 char ceil ();
5888 int
5889 main ()
5890 {
5891 return ceil ();
5892   ;
5893   return 0;
5894 }
5895 _ACEOF
5896 rm -f conftest.$ac_objext conftest$ac_exeext
5897 if { (ac_try="$ac_link"
5898 case "(($ac_try" in
5899   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5900   *) ac_try_echo=$ac_try;;
5901 esac
5902 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5903   (eval "$ac_link") 2>conftest.er1
5904   ac_status=$?
5905   grep -v '^ *+' conftest.er1 >conftest.err
5906   rm -f conftest.er1
5907   cat conftest.err >&5
5908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5909   (exit $ac_status); } && {
5910          test -z "$ac_cxx_werror_flag" ||
5911          test ! -s conftest.err
5912        } && test -s conftest$ac_exeext &&
5913        $as_test_x conftest$ac_exeext; then
5914   ac_cv_lib_m_ceil=yes
5915 else
5916   echo "$as_me: failed program was:" >&5
5917 sed 's/^/| /' conftest.$ac_ext >&5
5918
5919         ac_cv_lib_m_ceil=no
5920 fi
5921
5922 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5923       conftest$ac_exeext conftest.$ac_ext
5924 LIBS=$ac_check_lib_save_LIBS
5925 fi
5926 { echo "$as_me:$LINENO: result: $ac_cv_lib_m_ceil" >&5
5927 echo "${ECHO_T}$ac_cv_lib_m_ceil" >&6; }
5928 if test $ac_cv_lib_m_ceil = yes; then
5929   cat >>confdefs.h <<_ACEOF
5930 #define HAVE_LIBM 1
5931 _ACEOF
5932
5933   LIBS="-lm $LIBS"
5934
5935 fi
5936
5937
5938
5939
5940
5941
5942
5943 # Extract the first word of "tic", so it can be a program name with args.
5944 set dummy tic; ac_word=$2
5945 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5946 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5947 if test "${ac_cv_path_TIC+set}" = set; then
5948   echo $ECHO_N "(cached) $ECHO_C" >&6
5949 else
5950   case $TIC in
5951   [\\/]* | ?:[\\/]*)
5952   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
5953   ;;
5954   *)
5955   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5956 for as_dir in $PATH
5957 do
5958   IFS=$as_save_IFS
5959   test -z "$as_dir" && as_dir=.
5960   for ac_exec_ext in '' $ac_executable_extensions; do
5961   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5962     ac_cv_path_TIC="$as_dir/$ac_word$ac_exec_ext"
5963     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5964     break 2
5965   fi
5966 done
5967 done
5968 IFS=$as_save_IFS
5969
5970   test -z "$ac_cv_path_TIC" && ac_cv_path_TIC=":"
5971   ;;
5972 esac
5973 fi
5974 TIC=$ac_cv_path_TIC
5975 if test -n "$TIC"; then
5976   { echo "$as_me:$LINENO: result: $TIC" >&5
5977 echo "${ECHO_T}$TIC" >&6; }
5978 else
5979   { echo "$as_me:$LINENO: result: no" >&5
5980 echo "${ECHO_T}no" >&6; }
5981 fi
5982
5983
5984
5985
5986
5987 { echo "$as_me:$LINENO: checking for X" >&5
5988 echo $ECHO_N "checking for X... $ECHO_C" >&6; }
5989
5990
5991 # Check whether --with-x was given.
5992 if test "${with_x+set}" = set; then
5993   withval=$with_x;
5994 fi
5995
5996 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5997 if test "x$with_x" = xno; then
5998   # The user explicitly disabled X.
5999   have_x=disabled
6000 else
6001   case $x_includes,$x_libraries in #(
6002     *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
6003 echo "$as_me: error: Cannot use X directory names containing '" >&2;}
6004    { (exit 1); exit 1; }; };; #(
6005     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
6006   echo $ECHO_N "(cached) $ECHO_C" >&6
6007 else
6008   # One or both of the vars are not set, and there is no cached value.
6009 ac_x_includes=no ac_x_libraries=no
6010 rm -f -r conftest.dir
6011 if mkdir conftest.dir; then
6012   cd conftest.dir
6013   cat >Imakefile <<'_ACEOF'
6014 incroot:
6015         @echo incroot='${INCROOT}'
6016 usrlibdir:
6017         @echo usrlibdir='${USRLIBDIR}'
6018 libdir:
6019         @echo libdir='${LIBDIR}'
6020 _ACEOF
6021   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
6022     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6023     for ac_var in incroot usrlibdir libdir; do
6024       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
6025     done
6026     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6027     for ac_extension in a so sl; do
6028       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6029          test -f "$ac_im_libdir/libX11.$ac_extension"; then
6030         ac_im_usrlibdir=$ac_im_libdir; break
6031       fi
6032     done
6033     # Screen out bogus values from the imake configuration.  They are
6034     # bogus both because they are the default anyway, and because
6035     # using them would break gcc on systems where it needs fixed includes.
6036     case $ac_im_incroot in
6037         /usr/include) ac_x_includes= ;;
6038         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6039     esac
6040     case $ac_im_usrlibdir in
6041         /usr/lib | /lib) ;;
6042         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6043     esac
6044   fi
6045   cd ..
6046   rm -f -r conftest.dir
6047 fi
6048
6049 # Standard set of common directories for X headers.
6050 # Check X11 before X11Rn because it is often a symlink to the current release.
6051 ac_x_header_dirs='
6052 /usr/X11/include
6053 /usr/X11R6/include
6054 /usr/X11R5/include
6055 /usr/X11R4/include
6056
6057 /usr/include/X11
6058 /usr/include/X11R6
6059 /usr/include/X11R5
6060 /usr/include/X11R4
6061
6062 /usr/local/X11/include
6063 /usr/local/X11R6/include
6064 /usr/local/X11R5/include
6065 /usr/local/X11R4/include
6066
6067 /usr/local/include/X11
6068 /usr/local/include/X11R6
6069 /usr/local/include/X11R5
6070 /usr/local/include/X11R4
6071
6072 /usr/X386/include
6073 /usr/x386/include
6074 /usr/XFree86/include/X11
6075
6076 /usr/include
6077 /usr/local/include
6078 /usr/unsupported/include
6079 /usr/athena/include
6080 /usr/local/x11r5/include
6081 /usr/lpp/Xamples/include
6082
6083 /usr/openwin/include
6084 /usr/openwin/share/include'
6085
6086 if test "$ac_x_includes" = no; then
6087   # Guess where to find include files, by looking for Xlib.h.
6088   # First, try using that file with no special directory specified.
6089   cat >conftest.$ac_ext <<_ACEOF
6090 /* confdefs.h.  */
6091 _ACEOF
6092 cat confdefs.h >>conftest.$ac_ext
6093 cat >>conftest.$ac_ext <<_ACEOF
6094 /* end confdefs.h.  */
6095 #include <X11/Xlib.h>
6096 _ACEOF
6097 if { (ac_try="$ac_cpp conftest.$ac_ext"
6098 case "(($ac_try" in
6099   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6100   *) ac_try_echo=$ac_try;;
6101 esac
6102 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6103   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6104   ac_status=$?
6105   grep -v '^ *+' conftest.er1 >conftest.err
6106   rm -f conftest.er1
6107   cat conftest.err >&5
6108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6109   (exit $ac_status); } >/dev/null && {
6110          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
6111          test ! -s conftest.err
6112        }; then
6113   # We can compile using X headers with no special include directory.
6114 ac_x_includes=
6115 else
6116   echo "$as_me: failed program was:" >&5
6117 sed 's/^/| /' conftest.$ac_ext >&5
6118
6119   for ac_dir in $ac_x_header_dirs; do
6120   if test -r "$ac_dir/X11/Xlib.h"; then
6121     ac_x_includes=$ac_dir
6122     break
6123   fi
6124 done
6125 fi
6126
6127 rm -f conftest.err conftest.$ac_ext
6128 fi # $ac_x_includes = no
6129
6130 if test "$ac_x_libraries" = no; then
6131   # Check for the libraries.
6132   # See if we find them without any special options.
6133   # Don't add to $LIBS permanently.
6134   ac_save_LIBS=$LIBS
6135   LIBS="-lX11 $LIBS"
6136   cat >conftest.$ac_ext <<_ACEOF
6137 /* confdefs.h.  */
6138 _ACEOF
6139 cat confdefs.h >>conftest.$ac_ext
6140 cat >>conftest.$ac_ext <<_ACEOF
6141 /* end confdefs.h.  */
6142 #include <X11/Xlib.h>
6143 int
6144 main ()
6145 {
6146 XrmInitialize ()
6147   ;
6148   return 0;
6149 }
6150 _ACEOF
6151 rm -f conftest.$ac_objext conftest$ac_exeext
6152 if { (ac_try="$ac_link"
6153 case "(($ac_try" in
6154   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6155   *) ac_try_echo=$ac_try;;
6156 esac
6157 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6158   (eval "$ac_link") 2>conftest.er1
6159   ac_status=$?
6160   grep -v '^ *+' conftest.er1 >conftest.err
6161   rm -f conftest.er1
6162   cat conftest.err >&5
6163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6164   (exit $ac_status); } && {
6165          test -z "$ac_cxx_werror_flag" ||
6166          test ! -s conftest.err
6167        } && test -s conftest$ac_exeext &&
6168        $as_test_x conftest$ac_exeext; then
6169   LIBS=$ac_save_LIBS
6170 # We can link X programs with no special library path.
6171 ac_x_libraries=
6172 else
6173   echo "$as_me: failed program was:" >&5
6174 sed 's/^/| /' conftest.$ac_ext >&5
6175
6176         LIBS=$ac_save_LIBS
6177 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6178 do
6179   # Don't even attempt the hair of trying to link an X program!
6180   for ac_extension in a so sl; do
6181     if test -r "$ac_dir/libX11.$ac_extension"; then
6182       ac_x_libraries=$ac_dir
6183       break 2
6184     fi
6185   done
6186 done
6187 fi
6188
6189 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6190       conftest$ac_exeext conftest.$ac_ext
6191 fi # $ac_x_libraries = no
6192
6193 case $ac_x_includes,$ac_x_libraries in #(
6194   no,* | *,no | *\'*)
6195     # Didn't find X, or a directory has "'" in its name.
6196     ac_cv_have_x="have_x=no";; #(
6197   *)
6198     # Record where we found X for the cache.
6199     ac_cv_have_x="have_x=yes\
6200         ac_x_includes='$ac_x_includes'\
6201         ac_x_libraries='$ac_x_libraries'"
6202 esac
6203 fi
6204 ;; #(
6205     *) have_x=yes;;
6206   esac
6207   eval "$ac_cv_have_x"
6208 fi # $with_x != no
6209
6210 if test "$have_x" != yes; then
6211   { echo "$as_me:$LINENO: result: $have_x" >&5
6212 echo "${ECHO_T}$have_x" >&6; }
6213   no_x=yes
6214 else
6215   # If each of the values was on the command line, it overrides each guess.
6216   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6217   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6218   # Update the cache value to reflect the command line values.
6219   ac_cv_have_x="have_x=yes\
6220         ac_x_includes='$x_includes'\
6221         ac_x_libraries='$x_libraries'"
6222   { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
6223 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
6224 fi
6225
6226 if test "$no_x" = yes; then
6227   # Not all programs may use this symbol, but it does not hurt to define it.
6228
6229 cat >>confdefs.h <<\_ACEOF
6230 #define X_DISPLAY_MISSING 1
6231 _ACEOF
6232
6233   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6234 else
6235   if test -n "$x_includes"; then
6236     X_CFLAGS="$X_CFLAGS -I$x_includes"
6237   fi
6238
6239   # It would also be nice to do this for all -L options, not just this one.
6240   if test -n "$x_libraries"; then
6241     X_LIBS="$X_LIBS -L$x_libraries"
6242     # For Solaris; some versions of Sun CC require a space after -R and
6243     # others require no space.  Words are not sufficient . . . .
6244     { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
6245 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; }
6246     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
6247     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
6248     ac_cxx_werror_flag=yes
6249     cat >conftest.$ac_ext <<_ACEOF
6250 /* confdefs.h.  */
6251 _ACEOF
6252 cat confdefs.h >>conftest.$ac_ext
6253 cat >>conftest.$ac_ext <<_ACEOF
6254 /* end confdefs.h.  */
6255
6256 int
6257 main ()
6258 {
6259
6260   ;
6261   return 0;
6262 }
6263 _ACEOF
6264 rm -f conftest.$ac_objext conftest$ac_exeext
6265 if { (ac_try="$ac_link"
6266 case "(($ac_try" in
6267   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6268   *) ac_try_echo=$ac_try;;
6269 esac
6270 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6271   (eval "$ac_link") 2>conftest.er1
6272   ac_status=$?
6273   grep -v '^ *+' conftest.er1 >conftest.err
6274   rm -f conftest.er1
6275   cat conftest.err >&5
6276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6277   (exit $ac_status); } && {
6278          test -z "$ac_cxx_werror_flag" ||
6279          test ! -s conftest.err
6280        } && test -s conftest$ac_exeext &&
6281        $as_test_x conftest$ac_exeext; then
6282   { echo "$as_me:$LINENO: result: no" >&5
6283 echo "${ECHO_T}no" >&6; }
6284        X_LIBS="$X_LIBS -R$x_libraries"
6285 else
6286   echo "$as_me: failed program was:" >&5
6287 sed 's/^/| /' conftest.$ac_ext >&5
6288
6289         LIBS="$ac_xsave_LIBS -R $x_libraries"
6290        cat >conftest.$ac_ext <<_ACEOF
6291 /* confdefs.h.  */
6292 _ACEOF
6293 cat confdefs.h >>conftest.$ac_ext
6294 cat >>conftest.$ac_ext <<_ACEOF
6295 /* end confdefs.h.  */
6296
6297 int
6298 main ()
6299 {
6300
6301   ;
6302   return 0;
6303 }
6304 _ACEOF
6305 rm -f conftest.$ac_objext conftest$ac_exeext
6306 if { (ac_try="$ac_link"
6307 case "(($ac_try" in
6308   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6309   *) ac_try_echo=$ac_try;;
6310 esac
6311 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6312   (eval "$ac_link") 2>conftest.er1
6313   ac_status=$?
6314   grep -v '^ *+' conftest.er1 >conftest.err
6315   rm -f conftest.er1
6316   cat conftest.err >&5
6317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6318   (exit $ac_status); } && {
6319          test -z "$ac_cxx_werror_flag" ||
6320          test ! -s conftest.err
6321        } && test -s conftest$ac_exeext &&
6322        $as_test_x conftest$ac_exeext; then
6323   { echo "$as_me:$LINENO: result: yes" >&5
6324 echo "${ECHO_T}yes" >&6; }
6325           X_LIBS="$X_LIBS -R $x_libraries"
6326 else
6327   echo "$as_me: failed program was:" >&5
6328 sed 's/^/| /' conftest.$ac_ext >&5
6329
6330         { echo "$as_me:$LINENO: result: neither works" >&5
6331 echo "${ECHO_T}neither works" >&6; }
6332 fi
6333
6334 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6335       conftest$ac_exeext conftest.$ac_ext
6336 fi
6337
6338 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6339       conftest$ac_exeext conftest.$ac_ext
6340     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
6341     LIBS=$ac_xsave_LIBS
6342   fi
6343
6344   # Check for system-dependent libraries X programs must link with.
6345   # Do this before checking for the system-independent R6 libraries
6346   # (-lICE), since we may need -lsocket or whatever for X linking.
6347
6348   if test "$ISC" = yes; then
6349     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6350   else
6351     # Martyn Johnson says this is needed for Ultrix, if the X
6352     # libraries were built with DECnet support.  And Karl Berry says
6353     # the Alpha needs dnet_stub (dnet does not exist).
6354     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
6355     cat >conftest.$ac_ext <<_ACEOF
6356 /* confdefs.h.  */
6357 _ACEOF
6358 cat confdefs.h >>conftest.$ac_ext
6359 cat >>conftest.$ac_ext <<_ACEOF
6360 /* end confdefs.h.  */
6361
6362 /* Override any GCC internal prototype to avoid an error.
6363    Use char because int might match the return type of a GCC
6364    builtin and then its argument prototype would still apply.  */
6365 #ifdef __cplusplus
6366 extern "C"
6367 #endif
6368 char XOpenDisplay ();
6369 int
6370 main ()
6371 {
6372 return XOpenDisplay ();
6373   ;
6374   return 0;
6375 }
6376 _ACEOF
6377 rm -f conftest.$ac_objext conftest$ac_exeext
6378 if { (ac_try="$ac_link"
6379 case "(($ac_try" in
6380   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6381   *) ac_try_echo=$ac_try;;
6382 esac
6383 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6384   (eval "$ac_link") 2>conftest.er1
6385   ac_status=$?
6386   grep -v '^ *+' conftest.er1 >conftest.err
6387   rm -f conftest.er1
6388   cat conftest.err >&5
6389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6390   (exit $ac_status); } && {
6391          test -z "$ac_cxx_werror_flag" ||
6392          test ! -s conftest.err
6393        } && test -s conftest$ac_exeext &&
6394        $as_test_x conftest$ac_exeext; then
6395   :
6396 else
6397   echo "$as_me: failed program was:" >&5
6398 sed 's/^/| /' conftest.$ac_ext >&5
6399
6400         { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
6401 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
6402 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
6403   echo $ECHO_N "(cached) $ECHO_C" >&6
6404 else
6405   ac_check_lib_save_LIBS=$LIBS
6406 LIBS="-ldnet  $LIBS"
6407 cat >conftest.$ac_ext <<_ACEOF
6408 /* confdefs.h.  */
6409 _ACEOF
6410 cat confdefs.h >>conftest.$ac_ext
6411 cat >>conftest.$ac_ext <<_ACEOF
6412 /* end confdefs.h.  */
6413
6414 /* Override any GCC internal prototype to avoid an error.
6415    Use char because int might match the return type of a GCC
6416    builtin and then its argument prototype would still apply.  */
6417 #ifdef __cplusplus
6418 extern "C"
6419 #endif
6420 char dnet_ntoa ();
6421 int
6422 main ()
6423 {
6424 return dnet_ntoa ();
6425   ;
6426   return 0;
6427 }
6428 _ACEOF
6429 rm -f conftest.$ac_objext conftest$ac_exeext
6430 if { (ac_try="$ac_link"
6431 case "(($ac_try" in
6432   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6433   *) ac_try_echo=$ac_try;;
6434 esac
6435 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6436   (eval "$ac_link") 2>conftest.er1
6437   ac_status=$?
6438   grep -v '^ *+' conftest.er1 >conftest.err
6439   rm -f conftest.er1
6440   cat conftest.err >&5
6441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6442   (exit $ac_status); } && {
6443          test -z "$ac_cxx_werror_flag" ||
6444          test ! -s conftest.err
6445        } && test -s conftest$ac_exeext &&
6446        $as_test_x conftest$ac_exeext; then
6447   ac_cv_lib_dnet_dnet_ntoa=yes
6448 else
6449   echo "$as_me: failed program was:" >&5
6450 sed 's/^/| /' conftest.$ac_ext >&5
6451
6452         ac_cv_lib_dnet_dnet_ntoa=no
6453 fi
6454
6455 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6456       conftest$ac_exeext conftest.$ac_ext
6457 LIBS=$ac_check_lib_save_LIBS
6458 fi
6459 { echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6460 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
6461 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
6462   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6463 fi
6464
6465     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6466       { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
6467 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6; }
6468 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
6469   echo $ECHO_N "(cached) $ECHO_C" >&6
6470 else
6471   ac_check_lib_save_LIBS=$LIBS
6472 LIBS="-ldnet_stub  $LIBS"
6473 cat >conftest.$ac_ext <<_ACEOF
6474 /* confdefs.h.  */
6475 _ACEOF
6476 cat confdefs.h >>conftest.$ac_ext
6477 cat >>conftest.$ac_ext <<_ACEOF
6478 /* end confdefs.h.  */
6479
6480 /* Override any GCC internal prototype to avoid an error.
6481    Use char because int might match the return type of a GCC
6482    builtin and then its argument prototype would still apply.  */
6483 #ifdef __cplusplus
6484 extern "C"
6485 #endif
6486 char dnet_ntoa ();
6487 int
6488 main ()
6489 {
6490 return dnet_ntoa ();
6491   ;
6492   return 0;
6493 }
6494 _ACEOF
6495 rm -f conftest.$ac_objext conftest$ac_exeext
6496 if { (ac_try="$ac_link"
6497 case "(($ac_try" in
6498   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6499   *) ac_try_echo=$ac_try;;
6500 esac
6501 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6502   (eval "$ac_link") 2>conftest.er1
6503   ac_status=$?
6504   grep -v '^ *+' conftest.er1 >conftest.err
6505   rm -f conftest.er1
6506   cat conftest.err >&5
6507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6508   (exit $ac_status); } && {
6509          test -z "$ac_cxx_werror_flag" ||
6510          test ! -s conftest.err
6511        } && test -s conftest$ac_exeext &&
6512        $as_test_x conftest$ac_exeext; then
6513   ac_cv_lib_dnet_stub_dnet_ntoa=yes
6514 else
6515   echo "$as_me: failed program was:" >&5
6516 sed 's/^/| /' conftest.$ac_ext >&5
6517
6518         ac_cv_lib_dnet_stub_dnet_ntoa=no
6519 fi
6520
6521 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6522       conftest$ac_exeext conftest.$ac_ext
6523 LIBS=$ac_check_lib_save_LIBS
6524 fi
6525 { echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
6526 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
6527 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
6528   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6529 fi
6530
6531     fi
6532 fi
6533
6534 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6535       conftest$ac_exeext conftest.$ac_ext
6536     LIBS="$ac_xsave_LIBS"
6537
6538     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6539     # to get the SysV transport functions.
6540     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
6541     # needs -lnsl.
6542     # The nsl library prevents programs from opening the X display
6543     # on Irix 5.2, according to T.E. Dickey.
6544     # The functions gethostbyname, getservbyname, and inet_addr are
6545     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
6546     { echo "$as_me:$LINENO: checking for gethostbyname" >&5
6547 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; }
6548 if test "${ac_cv_func_gethostbyname+set}" = set; then
6549   echo $ECHO_N "(cached) $ECHO_C" >&6
6550 else
6551   cat >conftest.$ac_ext <<_ACEOF
6552 /* confdefs.h.  */
6553 _ACEOF
6554 cat confdefs.h >>conftest.$ac_ext
6555 cat >>conftest.$ac_ext <<_ACEOF
6556 /* end confdefs.h.  */
6557 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
6558    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6559 #define gethostbyname innocuous_gethostbyname
6560
6561 /* System header to define __stub macros and hopefully few prototypes,
6562     which can conflict with char gethostbyname (); below.
6563     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6564     <limits.h> exists even on freestanding compilers.  */
6565
6566 #ifdef __STDC__
6567 # include <limits.h>
6568 #else
6569 # include <assert.h>
6570 #endif
6571
6572 #undef gethostbyname
6573
6574 /* Override any GCC internal prototype to avoid an error.
6575    Use char because int might match the return type of a GCC
6576    builtin and then its argument prototype would still apply.  */
6577 #ifdef __cplusplus
6578 extern "C"
6579 #endif
6580 char gethostbyname ();
6581 /* The GNU C library defines this for functions which it implements
6582     to always fail with ENOSYS.  Some functions are actually named
6583     something starting with __ and the normal name is an alias.  */
6584 #if defined __stub_gethostbyname || defined __stub___gethostbyname
6585 choke me
6586 #endif
6587
6588 int
6589 main ()
6590 {
6591 return gethostbyname ();
6592   ;
6593   return 0;
6594 }
6595 _ACEOF
6596 rm -f conftest.$ac_objext conftest$ac_exeext
6597 if { (ac_try="$ac_link"
6598 case "(($ac_try" in
6599   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6600   *) ac_try_echo=$ac_try;;
6601 esac
6602 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6603   (eval "$ac_link") 2>conftest.er1
6604   ac_status=$?
6605   grep -v '^ *+' conftest.er1 >conftest.err
6606   rm -f conftest.er1
6607   cat conftest.err >&5
6608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6609   (exit $ac_status); } && {
6610          test -z "$ac_cxx_werror_flag" ||
6611          test ! -s conftest.err
6612        } && test -s conftest$ac_exeext &&
6613        $as_test_x conftest$ac_exeext; then
6614   ac_cv_func_gethostbyname=yes
6615 else
6616   echo "$as_me: failed program was:" >&5
6617 sed 's/^/| /' conftest.$ac_ext >&5
6618
6619         ac_cv_func_gethostbyname=no
6620 fi
6621
6622 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6623       conftest$ac_exeext conftest.$ac_ext
6624 fi
6625 { echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
6626 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; }
6627
6628     if test $ac_cv_func_gethostbyname = no; then
6629       { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
6630 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
6631 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
6632   echo $ECHO_N "(cached) $ECHO_C" >&6
6633 else
6634   ac_check_lib_save_LIBS=$LIBS
6635 LIBS="-lnsl  $LIBS"
6636 cat >conftest.$ac_ext <<_ACEOF
6637 /* confdefs.h.  */
6638 _ACEOF
6639 cat confdefs.h >>conftest.$ac_ext
6640 cat >>conftest.$ac_ext <<_ACEOF
6641 /* end confdefs.h.  */
6642
6643 /* Override any GCC internal prototype to avoid an error.
6644    Use char because int might match the return type of a GCC
6645    builtin and then its argument prototype would still apply.  */
6646 #ifdef __cplusplus
6647 extern "C"
6648 #endif
6649 char gethostbyname ();
6650 int
6651 main ()
6652 {
6653 return gethostbyname ();
6654   ;
6655   return 0;
6656 }
6657 _ACEOF
6658 rm -f conftest.$ac_objext conftest$ac_exeext
6659 if { (ac_try="$ac_link"
6660 case "(($ac_try" in
6661   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6662   *) ac_try_echo=$ac_try;;
6663 esac
6664 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6665   (eval "$ac_link") 2>conftest.er1
6666   ac_status=$?
6667   grep -v '^ *+' conftest.er1 >conftest.err
6668   rm -f conftest.er1
6669   cat conftest.err >&5
6670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6671   (exit $ac_status); } && {
6672          test -z "$ac_cxx_werror_flag" ||
6673          test ! -s conftest.err
6674        } && test -s conftest$ac_exeext &&
6675        $as_test_x conftest$ac_exeext; then
6676   ac_cv_lib_nsl_gethostbyname=yes
6677 else
6678   echo "$as_me: failed program was:" >&5
6679 sed 's/^/| /' conftest.$ac_ext >&5
6680
6681         ac_cv_lib_nsl_gethostbyname=no
6682 fi
6683
6684 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6685       conftest$ac_exeext conftest.$ac_ext
6686 LIBS=$ac_check_lib_save_LIBS
6687 fi
6688 { echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
6689 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
6690 if test $ac_cv_lib_nsl_gethostbyname = yes; then
6691   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6692 fi
6693
6694       if test $ac_cv_lib_nsl_gethostbyname = no; then
6695         { echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
6696 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6; }
6697 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
6698   echo $ECHO_N "(cached) $ECHO_C" >&6
6699 else
6700   ac_check_lib_save_LIBS=$LIBS
6701 LIBS="-lbsd  $LIBS"
6702 cat >conftest.$ac_ext <<_ACEOF
6703 /* confdefs.h.  */
6704 _ACEOF
6705 cat confdefs.h >>conftest.$ac_ext
6706 cat >>conftest.$ac_ext <<_ACEOF
6707 /* end confdefs.h.  */
6708
6709 /* Override any GCC internal prototype to avoid an error.
6710    Use char because int might match the return type of a GCC
6711    builtin and then its argument prototype would still apply.  */
6712 #ifdef __cplusplus
6713 extern "C"
6714 #endif
6715 char gethostbyname ();
6716 int
6717 main ()
6718 {
6719 return gethostbyname ();
6720   ;
6721   return 0;
6722 }
6723 _ACEOF
6724 rm -f conftest.$ac_objext conftest$ac_exeext
6725 if { (ac_try="$ac_link"
6726 case "(($ac_try" in
6727   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6728   *) ac_try_echo=$ac_try;;
6729 esac
6730 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6731   (eval "$ac_link") 2>conftest.er1
6732   ac_status=$?
6733   grep -v '^ *+' conftest.er1 >conftest.err
6734   rm -f conftest.er1
6735   cat conftest.err >&5
6736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6737   (exit $ac_status); } && {
6738          test -z "$ac_cxx_werror_flag" ||
6739          test ! -s conftest.err
6740        } && test -s conftest$ac_exeext &&
6741        $as_test_x conftest$ac_exeext; then
6742   ac_cv_lib_bsd_gethostbyname=yes
6743 else
6744   echo "$as_me: failed program was:" >&5
6745 sed 's/^/| /' conftest.$ac_ext >&5
6746
6747         ac_cv_lib_bsd_gethostbyname=no
6748 fi
6749
6750 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6751       conftest$ac_exeext conftest.$ac_ext
6752 LIBS=$ac_check_lib_save_LIBS
6753 fi
6754 { echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
6755 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6; }
6756 if test $ac_cv_lib_bsd_gethostbyname = yes; then
6757   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
6758 fi
6759
6760       fi
6761     fi
6762
6763     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6764     # socket/setsockopt and other routines are undefined under SCO ODT
6765     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6766     # on later versions), says Simon Leinen: it contains gethostby*
6767     # variants that don't use the name server (or something).  -lsocket
6768     # must be given before -lnsl if both are needed.  We assume that
6769     # if connect needs -lnsl, so does gethostbyname.
6770     { echo "$as_me:$LINENO: checking for connect" >&5
6771 echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
6772 if test "${ac_cv_func_connect+set}" = set; then
6773   echo $ECHO_N "(cached) $ECHO_C" >&6
6774 else
6775   cat >conftest.$ac_ext <<_ACEOF
6776 /* confdefs.h.  */
6777 _ACEOF
6778 cat confdefs.h >>conftest.$ac_ext
6779 cat >>conftest.$ac_ext <<_ACEOF
6780 /* end confdefs.h.  */
6781 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
6782    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6783 #define connect innocuous_connect
6784
6785 /* System header to define __stub macros and hopefully few prototypes,
6786     which can conflict with char connect (); below.
6787     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6788     <limits.h> exists even on freestanding compilers.  */
6789
6790 #ifdef __STDC__
6791 # include <limits.h>
6792 #else
6793 # include <assert.h>
6794 #endif
6795
6796 #undef connect
6797
6798 /* Override any GCC internal prototype to avoid an error.
6799    Use char because int might match the return type of a GCC
6800    builtin and then its argument prototype would still apply.  */
6801 #ifdef __cplusplus
6802 extern "C"
6803 #endif
6804 char connect ();
6805 /* The GNU C library defines this for functions which it implements
6806     to always fail with ENOSYS.  Some functions are actually named
6807     something starting with __ and the normal name is an alias.  */
6808 #if defined __stub_connect || defined __stub___connect
6809 choke me
6810 #endif
6811
6812 int
6813 main ()
6814 {
6815 return connect ();
6816   ;
6817   return 0;
6818 }
6819 _ACEOF
6820 rm -f conftest.$ac_objext conftest$ac_exeext
6821 if { (ac_try="$ac_link"
6822 case "(($ac_try" in
6823   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6824   *) ac_try_echo=$ac_try;;
6825 esac
6826 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6827   (eval "$ac_link") 2>conftest.er1
6828   ac_status=$?
6829   grep -v '^ *+' conftest.er1 >conftest.err
6830   rm -f conftest.er1
6831   cat conftest.err >&5
6832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6833   (exit $ac_status); } && {
6834          test -z "$ac_cxx_werror_flag" ||
6835          test ! -s conftest.err
6836        } && test -s conftest$ac_exeext &&
6837        $as_test_x conftest$ac_exeext; then
6838   ac_cv_func_connect=yes
6839 else
6840   echo "$as_me: failed program was:" >&5
6841 sed 's/^/| /' conftest.$ac_ext >&5
6842
6843         ac_cv_func_connect=no
6844 fi
6845
6846 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6847       conftest$ac_exeext conftest.$ac_ext
6848 fi
6849 { echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
6850 echo "${ECHO_T}$ac_cv_func_connect" >&6; }
6851
6852     if test $ac_cv_func_connect = no; then
6853       { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
6854 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; }
6855 if test "${ac_cv_lib_socket_connect+set}" = set; then
6856   echo $ECHO_N "(cached) $ECHO_C" >&6
6857 else
6858   ac_check_lib_save_LIBS=$LIBS
6859 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6860 cat >conftest.$ac_ext <<_ACEOF
6861 /* confdefs.h.  */
6862 _ACEOF
6863 cat confdefs.h >>conftest.$ac_ext
6864 cat >>conftest.$ac_ext <<_ACEOF
6865 /* end confdefs.h.  */
6866
6867 /* Override any GCC internal prototype to avoid an error.
6868    Use char because int might match the return type of a GCC
6869    builtin and then its argument prototype would still apply.  */
6870 #ifdef __cplusplus
6871 extern "C"
6872 #endif
6873 char connect ();
6874 int
6875 main ()
6876 {
6877 return connect ();
6878   ;
6879   return 0;
6880 }
6881 _ACEOF
6882 rm -f conftest.$ac_objext conftest$ac_exeext
6883 if { (ac_try="$ac_link"
6884 case "(($ac_try" in
6885   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6886   *) ac_try_echo=$ac_try;;
6887 esac
6888 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6889   (eval "$ac_link") 2>conftest.er1
6890   ac_status=$?
6891   grep -v '^ *+' conftest.er1 >conftest.err
6892   rm -f conftest.er1
6893   cat conftest.err >&5
6894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6895   (exit $ac_status); } && {
6896          test -z "$ac_cxx_werror_flag" ||
6897          test ! -s conftest.err
6898        } && test -s conftest$ac_exeext &&
6899        $as_test_x conftest$ac_exeext; then
6900   ac_cv_lib_socket_connect=yes
6901 else
6902   echo "$as_me: failed program was:" >&5
6903 sed 's/^/| /' conftest.$ac_ext >&5
6904
6905         ac_cv_lib_socket_connect=no
6906 fi
6907
6908 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6909       conftest$ac_exeext conftest.$ac_ext
6910 LIBS=$ac_check_lib_save_LIBS
6911 fi
6912 { echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
6913 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; }
6914 if test $ac_cv_lib_socket_connect = yes; then
6915   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6916 fi
6917
6918     fi
6919
6920     # Guillermo Gomez says -lposix is necessary on A/UX.
6921     { echo "$as_me:$LINENO: checking for remove" >&5
6922 echo $ECHO_N "checking for remove... $ECHO_C" >&6; }
6923 if test "${ac_cv_func_remove+set}" = set; then
6924   echo $ECHO_N "(cached) $ECHO_C" >&6
6925 else
6926   cat >conftest.$ac_ext <<_ACEOF
6927 /* confdefs.h.  */
6928 _ACEOF
6929 cat confdefs.h >>conftest.$ac_ext
6930 cat >>conftest.$ac_ext <<_ACEOF
6931 /* end confdefs.h.  */
6932 /* Define remove to an innocuous variant, in case <limits.h> declares remove.
6933    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6934 #define remove innocuous_remove
6935
6936 /* System header to define __stub macros and hopefully few prototypes,
6937     which can conflict with char remove (); below.
6938     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6939     <limits.h> exists even on freestanding compilers.  */
6940
6941 #ifdef __STDC__
6942 # include <limits.h>
6943 #else
6944 # include <assert.h>
6945 #endif
6946
6947 #undef remove
6948
6949 /* Override any GCC internal prototype to avoid an error.
6950    Use char because int might match the return type of a GCC
6951    builtin and then its argument prototype would still apply.  */
6952 #ifdef __cplusplus
6953 extern "C"
6954 #endif
6955 char remove ();
6956 /* The GNU C library defines this for functions which it implements
6957     to always fail with ENOSYS.  Some functions are actually named
6958     something starting with __ and the normal name is an alias.  */
6959 #if defined __stub_remove || defined __stub___remove
6960 choke me
6961 #endif
6962
6963 int
6964 main ()
6965 {
6966 return remove ();
6967   ;
6968   return 0;
6969 }
6970 _ACEOF
6971 rm -f conftest.$ac_objext conftest$ac_exeext
6972 if { (ac_try="$ac_link"
6973 case "(($ac_try" in
6974   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6975   *) ac_try_echo=$ac_try;;
6976 esac
6977 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6978   (eval "$ac_link") 2>conftest.er1
6979   ac_status=$?
6980   grep -v '^ *+' conftest.er1 >conftest.err
6981   rm -f conftest.er1
6982   cat conftest.err >&5
6983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6984   (exit $ac_status); } && {
6985          test -z "$ac_cxx_werror_flag" ||
6986          test ! -s conftest.err
6987        } && test -s conftest$ac_exeext &&
6988        $as_test_x conftest$ac_exeext; then
6989   ac_cv_func_remove=yes
6990 else
6991   echo "$as_me: failed program was:" >&5
6992 sed 's/^/| /' conftest.$ac_ext >&5
6993
6994         ac_cv_func_remove=no
6995 fi
6996
6997 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6998       conftest$ac_exeext conftest.$ac_ext
6999 fi
7000 { echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
7001 echo "${ECHO_T}$ac_cv_func_remove" >&6; }
7002
7003     if test $ac_cv_func_remove = no; then
7004       { echo "$as_me:$LINENO: checking for remove in -lposix" >&5
7005 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6; }
7006 if test "${ac_cv_lib_posix_remove+set}" = set; then
7007   echo $ECHO_N "(cached) $ECHO_C" >&6
7008 else
7009   ac_check_lib_save_LIBS=$LIBS
7010 LIBS="-lposix  $LIBS"
7011 cat >conftest.$ac_ext <<_ACEOF
7012 /* confdefs.h.  */
7013 _ACEOF
7014 cat confdefs.h >>conftest.$ac_ext
7015 cat >>conftest.$ac_ext <<_ACEOF
7016 /* end confdefs.h.  */
7017
7018 /* Override any GCC internal prototype to avoid an error.
7019    Use char because int might match the return type of a GCC
7020    builtin and then its argument prototype would still apply.  */
7021 #ifdef __cplusplus
7022 extern "C"
7023 #endif
7024 char remove ();
7025 int
7026 main ()
7027 {
7028 return remove ();
7029   ;
7030   return 0;
7031 }
7032 _ACEOF
7033 rm -f conftest.$ac_objext conftest$ac_exeext
7034 if { (ac_try="$ac_link"
7035 case "(($ac_try" in
7036   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7037   *) ac_try_echo=$ac_try;;
7038 esac
7039 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7040   (eval "$ac_link") 2>conftest.er1
7041   ac_status=$?
7042   grep -v '^ *+' conftest.er1 >conftest.err
7043   rm -f conftest.er1
7044   cat conftest.err >&5
7045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7046   (exit $ac_status); } && {
7047          test -z "$ac_cxx_werror_flag" ||
7048          test ! -s conftest.err
7049        } && test -s conftest$ac_exeext &&
7050        $as_test_x conftest$ac_exeext; then
7051   ac_cv_lib_posix_remove=yes
7052 else
7053   echo "$as_me: failed program was:" >&5
7054 sed 's/^/| /' conftest.$ac_ext >&5
7055
7056         ac_cv_lib_posix_remove=no
7057 fi
7058
7059 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7060       conftest$ac_exeext conftest.$ac_ext
7061 LIBS=$ac_check_lib_save_LIBS
7062 fi
7063 { echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
7064 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6; }
7065 if test $ac_cv_lib_posix_remove = yes; then
7066   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7067 fi
7068
7069     fi
7070
7071     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7072     { echo "$as_me:$LINENO: checking for shmat" >&5
7073 echo $ECHO_N "checking for shmat... $ECHO_C" >&6; }
7074 if test "${ac_cv_func_shmat+set}" = set; then
7075   echo $ECHO_N "(cached) $ECHO_C" >&6
7076 else
7077   cat >conftest.$ac_ext <<_ACEOF
7078 /* confdefs.h.  */
7079 _ACEOF
7080 cat confdefs.h >>conftest.$ac_ext
7081 cat >>conftest.$ac_ext <<_ACEOF
7082 /* end confdefs.h.  */
7083 /* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
7084    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7085 #define shmat innocuous_shmat
7086
7087 /* System header to define __stub macros and hopefully few prototypes,
7088     which can conflict with char shmat (); below.
7089     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7090     <limits.h> exists even on freestanding compilers.  */
7091
7092 #ifdef __STDC__
7093 # include <limits.h>
7094 #else
7095 # include <assert.h>
7096 #endif
7097
7098 #undef shmat
7099
7100 /* Override any GCC internal prototype to avoid an error.
7101    Use char because int might match the return type of a GCC
7102    builtin and then its argument prototype would still apply.  */
7103 #ifdef __cplusplus
7104 extern "C"
7105 #endif
7106 char shmat ();
7107 /* The GNU C library defines this for functions which it implements
7108     to always fail with ENOSYS.  Some functions are actually named
7109     something starting with __ and the normal name is an alias.  */
7110 #if defined __stub_shmat || defined __stub___shmat
7111 choke me
7112 #endif
7113
7114 int
7115 main ()
7116 {
7117 return shmat ();
7118   ;
7119   return 0;
7120 }
7121 _ACEOF
7122 rm -f conftest.$ac_objext conftest$ac_exeext
7123 if { (ac_try="$ac_link"
7124 case "(($ac_try" in
7125   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7126   *) ac_try_echo=$ac_try;;
7127 esac
7128 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7129   (eval "$ac_link") 2>conftest.er1
7130   ac_status=$?
7131   grep -v '^ *+' conftest.er1 >conftest.err
7132   rm -f conftest.er1
7133   cat conftest.err >&5
7134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7135   (exit $ac_status); } && {
7136          test -z "$ac_cxx_werror_flag" ||
7137          test ! -s conftest.err
7138        } && test -s conftest$ac_exeext &&
7139        $as_test_x conftest$ac_exeext; then
7140   ac_cv_func_shmat=yes
7141 else
7142   echo "$as_me: failed program was:" >&5
7143 sed 's/^/| /' conftest.$ac_ext >&5
7144
7145         ac_cv_func_shmat=no
7146 fi
7147
7148 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7149       conftest$ac_exeext conftest.$ac_ext
7150 fi
7151 { echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
7152 echo "${ECHO_T}$ac_cv_func_shmat" >&6; }
7153
7154     if test $ac_cv_func_shmat = no; then
7155       { echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
7156 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6; }
7157 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
7158   echo $ECHO_N "(cached) $ECHO_C" >&6
7159 else
7160   ac_check_lib_save_LIBS=$LIBS
7161 LIBS="-lipc  $LIBS"
7162 cat >conftest.$ac_ext <<_ACEOF
7163 /* confdefs.h.  */
7164 _ACEOF
7165 cat confdefs.h >>conftest.$ac_ext
7166 cat >>conftest.$ac_ext <<_ACEOF
7167 /* end confdefs.h.  */
7168
7169 /* Override any GCC internal prototype to avoid an error.
7170    Use char because int might match the return type of a GCC
7171    builtin and then its argument prototype would still apply.  */
7172 #ifdef __cplusplus
7173 extern "C"
7174 #endif
7175 char shmat ();
7176 int
7177 main ()
7178 {
7179 return shmat ();
7180   ;
7181   return 0;
7182 }
7183 _ACEOF
7184 rm -f conftest.$ac_objext conftest$ac_exeext
7185 if { (ac_try="$ac_link"
7186 case "(($ac_try" in
7187   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7188   *) ac_try_echo=$ac_try;;
7189 esac
7190 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7191   (eval "$ac_link") 2>conftest.er1
7192   ac_status=$?
7193   grep -v '^ *+' conftest.er1 >conftest.err
7194   rm -f conftest.er1
7195   cat conftest.err >&5
7196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7197   (exit $ac_status); } && {
7198          test -z "$ac_cxx_werror_flag" ||
7199          test ! -s conftest.err
7200        } && test -s conftest$ac_exeext &&
7201        $as_test_x conftest$ac_exeext; then
7202   ac_cv_lib_ipc_shmat=yes
7203 else
7204   echo "$as_me: failed program was:" >&5
7205 sed 's/^/| /' conftest.$ac_ext >&5
7206
7207         ac_cv_lib_ipc_shmat=no
7208 fi
7209
7210 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7211       conftest$ac_exeext conftest.$ac_ext
7212 LIBS=$ac_check_lib_save_LIBS
7213 fi
7214 { echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
7215 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6; }
7216 if test $ac_cv_lib_ipc_shmat = yes; then
7217   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
7218 fi
7219
7220     fi
7221   fi
7222
7223   # Check for libraries that X11R6 Xt/Xaw programs need.
7224   ac_save_LDFLAGS=$LDFLAGS
7225   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
7226   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
7227   # check for ICE first), but we must link in the order -lSM -lICE or
7228   # we get undefined symbols.  So assume we have SM if we have ICE.
7229   # These have to be linked with before -lX11, unlike the other
7230   # libraries we check for below, so use a different variable.
7231   # John Interrante, Karl Berry
7232   { echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
7233 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6; }
7234 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
7235   echo $ECHO_N "(cached) $ECHO_C" >&6
7236 else
7237   ac_check_lib_save_LIBS=$LIBS
7238 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7239 cat >conftest.$ac_ext <<_ACEOF
7240 /* confdefs.h.  */
7241 _ACEOF
7242 cat confdefs.h >>conftest.$ac_ext
7243 cat >>conftest.$ac_ext <<_ACEOF
7244 /* end confdefs.h.  */
7245
7246 /* Override any GCC internal prototype to avoid an error.
7247    Use char because int might match the return type of a GCC
7248    builtin and then its argument prototype would still apply.  */
7249 #ifdef __cplusplus
7250 extern "C"
7251 #endif
7252 char IceConnectionNumber ();
7253 int
7254 main ()
7255 {
7256 return IceConnectionNumber ();
7257   ;
7258   return 0;
7259 }
7260 _ACEOF
7261 rm -f conftest.$ac_objext conftest$ac_exeext
7262 if { (ac_try="$ac_link"
7263 case "(($ac_try" in
7264   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7265   *) ac_try_echo=$ac_try;;
7266 esac
7267 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7268   (eval "$ac_link") 2>conftest.er1
7269   ac_status=$?
7270   grep -v '^ *+' conftest.er1 >conftest.err
7271   rm -f conftest.er1
7272   cat conftest.err >&5
7273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7274   (exit $ac_status); } && {
7275          test -z "$ac_cxx_werror_flag" ||
7276          test ! -s conftest.err
7277        } && test -s conftest$ac_exeext &&
7278        $as_test_x conftest$ac_exeext; then
7279   ac_cv_lib_ICE_IceConnectionNumber=yes
7280 else
7281   echo "$as_me: failed program was:" >&5
7282 sed 's/^/| /' conftest.$ac_ext >&5
7283
7284         ac_cv_lib_ICE_IceConnectionNumber=no
7285 fi
7286
7287 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7288       conftest$ac_exeext conftest.$ac_ext
7289 LIBS=$ac_check_lib_save_LIBS
7290 fi
7291 { echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
7292 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
7293 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
7294   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7295 fi
7296
7297   LDFLAGS=$ac_save_LDFLAGS
7298
7299 fi
7300
7301
7302 AFTERIMAGE_CFLAGS=
7303 AFTERIMAGE_LIBS=
7304 AFTERIMAGE_VERSION=
7305
7306 if test x$support_afterimage = xyes; then
7307   support_afterimage=no
7308
7309   if test "x$afterimage_config" = "x" ; then
7310     # Extract the first word of "afterimage-config", so it can be a program name with args.
7311 set dummy afterimage-config; ac_word=$2
7312 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7313 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7314 if test "${ac_cv_path_afterimage_config+set}" = set; then
7315   echo $ECHO_N "(cached) $ECHO_C" >&6
7316 else
7317   case $afterimage_config in
7318   [\\/]* | ?:[\\/]*)
7319   ac_cv_path_afterimage_config="$afterimage_config" # Let the user override the test with a path.
7320   ;;
7321   *)
7322   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7323 for as_dir in $PATH
7324 do
7325   IFS=$as_save_IFS
7326   test -z "$as_dir" && as_dir=.
7327   for ac_exec_ext in '' $ac_executable_extensions; do
7328   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7329     ac_cv_path_afterimage_config="$as_dir/$ac_word$ac_exec_ext"
7330     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7331     break 2
7332   fi
7333 done
7334 done
7335 IFS=$as_save_IFS
7336
7337   test -z "$ac_cv_path_afterimage_config" && ac_cv_path_afterimage_config="no"
7338   ;;
7339 esac
7340 fi
7341 afterimage_config=$ac_cv_path_afterimage_config
7342 if test -n "$afterimage_config"; then
7343   { echo "$as_me:$LINENO: result: $afterimage_config" >&5
7344 echo "${ECHO_T}$afterimage_config" >&6; }
7345 else
7346   { echo "$as_me:$LINENO: result: no" >&5
7347 echo "${ECHO_T}no" >&6; }
7348 fi
7349
7350
7351   fi
7352   if test "x$afterimage_config" != "xno" ; then
7353     { echo "$as_me:$LINENO: checking for libAfterImage version >= 1.15" >&5
7354 echo $ECHO_N "checking for libAfterImage version >= 1.15... $ECHO_C" >&6; }
7355     xAFTERIMAGE_VERSION=`$afterimage_config --version`
7356     if test -n "$xAFTERIMAGE_VERSION" ; then
7357       xAFTERIMAGE_CFLAGS=`$afterimage_config --cflags`
7358       xAFTERIMAGE_LIBS=`$afterimage_config --libs`
7359       if test "x$xAFTERIMAGE_LIBS" != "x"; then
7360         libai_ver_major=`echo $xAFTERIMAGE_VERSION | cut -f 1 -d .`
7361         libai_ver_minor=`echo $xAFTERIMAGE_VERSION | cut -f 2 -d .`
7362         if test $libai_ver_major -gt 1 -o \( $libai_ver_major -eq 1 -a $libai_ver_minor -ge 15 \); then
7363           support_afterimage=yes
7364           AFTERIMAGE_CFLAGS="$xAFTERIMAGE_CFLAGS"
7365           AFTERIMAGE_LIBS="$xAFTERIMAGE_LIBS"
7366           AFTERIMAGE_VERSION="$xAFTERIMAGE_VERSION"
7367         fi
7368       fi
7369     fi
7370     if test "x$support_afterimage" = "xyes"; then
7371       { echo "$as_me:$LINENO: result: $AFTERIMAGE_LIBS" >&5
7372 echo "${ECHO_T}$AFTERIMAGE_LIBS" >&6; }
7373     else
7374       { echo "$as_me:$LINENO: result: no" >&5
7375 echo "${ECHO_T}no" >&6; }
7376     fi
7377   fi
7378 fi
7379
7380 { echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
7381 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
7382 if test "${ac_cv_header_sys_wait_h+set}" = set; then
7383   echo $ECHO_N "(cached) $ECHO_C" >&6
7384 else
7385   cat >conftest.$ac_ext <<_ACEOF
7386 /* confdefs.h.  */
7387 _ACEOF
7388 cat confdefs.h >>conftest.$ac_ext
7389 cat >>conftest.$ac_ext <<_ACEOF
7390 /* end confdefs.h.  */
7391 #include <sys/types.h>
7392 #include <sys/wait.h>
7393 #ifndef WEXITSTATUS
7394 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
7395 #endif
7396 #ifndef WIFEXITED
7397 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
7398 #endif
7399
7400 int
7401 main ()
7402 {
7403   int s;
7404   wait (&s);
7405   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
7406   ;
7407   return 0;
7408 }
7409 _ACEOF
7410 rm -f conftest.$ac_objext
7411 if { (ac_try="$ac_compile"
7412 case "(($ac_try" in
7413   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7414   *) ac_try_echo=$ac_try;;
7415 esac
7416 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7417   (eval "$ac_compile") 2>conftest.er1
7418   ac_status=$?
7419   grep -v '^ *+' conftest.er1 >conftest.err
7420   rm -f conftest.er1
7421   cat conftest.err >&5
7422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7423   (exit $ac_status); } && {
7424          test -z "$ac_cxx_werror_flag" ||
7425          test ! -s conftest.err
7426        } && test -s conftest.$ac_objext; then
7427   ac_cv_header_sys_wait_h=yes
7428 else
7429   echo "$as_me: failed program was:" >&5
7430 sed 's/^/| /' conftest.$ac_ext >&5
7431
7432         ac_cv_header_sys_wait_h=no
7433 fi
7434
7435 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7436 fi
7437 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
7438 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
7439 if test $ac_cv_header_sys_wait_h = yes; then
7440
7441 cat >>confdefs.h <<\_ACEOF
7442 #define HAVE_SYS_WAIT_H 1
7443 _ACEOF
7444
7445 fi
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464 for ac_header in \
7465         assert.h \
7466         fcntl.h \
7467         stdarg.h \
7468         stdlib.h \
7469         string.h \
7470         termios.h \
7471         unistd.h \
7472         sys/byteorder.h \
7473         sys/ioctl.h \
7474         sys/select.h \
7475         sys/sockio.h \
7476         sys/strredir.h \
7477         sys/time.h \
7478         stdint.h \
7479         wchar.h \
7480         cwchar \
7481         clocale \
7482
7483 do
7484 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7485 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7486   { echo "$as_me:$LINENO: checking for $ac_header" >&5
7487 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7488 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7489   echo $ECHO_N "(cached) $ECHO_C" >&6
7490 fi
7491 ac_res=`eval echo '${'$as_ac_Header'}'`
7492                { echo "$as_me:$LINENO: result: $ac_res" >&5
7493 echo "${ECHO_T}$ac_res" >&6; }
7494 else
7495   # Is the header compilable?
7496 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
7497 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
7498 cat >conftest.$ac_ext <<_ACEOF
7499 /* confdefs.h.  */
7500 _ACEOF
7501 cat confdefs.h >>conftest.$ac_ext
7502 cat >>conftest.$ac_ext <<_ACEOF
7503 /* end confdefs.h.  */
7504 $ac_includes_default
7505 #include <$ac_header>
7506 _ACEOF
7507 rm -f conftest.$ac_objext
7508 if { (ac_try="$ac_compile"
7509 case "(($ac_try" in
7510   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7511   *) ac_try_echo=$ac_try;;
7512 esac
7513 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7514   (eval "$ac_compile") 2>conftest.er1
7515   ac_status=$?
7516   grep -v '^ *+' conftest.er1 >conftest.err
7517   rm -f conftest.er1
7518   cat conftest.err >&5
7519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7520   (exit $ac_status); } && {
7521          test -z "$ac_cxx_werror_flag" ||
7522          test ! -s conftest.err
7523        } && test -s conftest.$ac_objext; then
7524   ac_header_compiler=yes
7525 else
7526   echo "$as_me: failed program was:" >&5
7527 sed 's/^/| /' conftest.$ac_ext >&5
7528
7529         ac_header_compiler=no
7530 fi
7531
7532 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7533 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7534 echo "${ECHO_T}$ac_header_compiler" >&6; }
7535
7536 # Is the header present?
7537 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
7538 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
7539 cat >conftest.$ac_ext <<_ACEOF
7540 /* confdefs.h.  */
7541 _ACEOF
7542 cat confdefs.h >>conftest.$ac_ext
7543 cat >>conftest.$ac_ext <<_ACEOF
7544 /* end confdefs.h.  */
7545 #include <$ac_header>
7546 _ACEOF
7547 if { (ac_try="$ac_cpp conftest.$ac_ext"
7548 case "(($ac_try" in
7549   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7550   *) ac_try_echo=$ac_try;;
7551 esac
7552 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7553   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7554   ac_status=$?
7555   grep -v '^ *+' conftest.er1 >conftest.err
7556   rm -f conftest.er1
7557   cat conftest.err >&5
7558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7559   (exit $ac_status); } >/dev/null && {
7560          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
7561          test ! -s conftest.err
7562        }; then
7563   ac_header_preproc=yes
7564 else
7565   echo "$as_me: failed program was:" >&5
7566 sed 's/^/| /' conftest.$ac_ext >&5
7567
7568   ac_header_preproc=no
7569 fi
7570
7571 rm -f conftest.err conftest.$ac_ext
7572 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7573 echo "${ECHO_T}$ac_header_preproc" >&6; }
7574
7575 # So?  What about this header?
7576 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
7577   yes:no: )
7578     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7579 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7580     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7581 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7582     ac_header_preproc=yes
7583     ;;
7584   no:yes:* )
7585     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7586 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7587     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7588 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7589     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7590 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7591     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7592 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7593     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7594 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7595     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7596 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7597
7598     ;;
7599 esac
7600 { echo "$as_me:$LINENO: checking for $ac_header" >&5
7601 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7602 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7603   echo $ECHO_N "(cached) $ECHO_C" >&6
7604 else
7605   eval "$as_ac_Header=\$ac_header_preproc"
7606 fi
7607 ac_res=`eval echo '${'$as_ac_Header'}'`
7608                { echo "$as_me:$LINENO: result: $ac_res" >&5
7609 echo "${ECHO_T}$ac_res" >&6; }
7610
7611 fi
7612 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7613   cat >>confdefs.h <<_ACEOF
7614 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7615 _ACEOF
7616
7617 fi
7618
7619 done
7620
7621
7622 { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
7623 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
7624 if test "${ac_cv_header_time+set}" = set; then
7625   echo $ECHO_N "(cached) $ECHO_C" >&6
7626 else
7627   cat >conftest.$ac_ext <<_ACEOF
7628 /* confdefs.h.  */
7629 _ACEOF
7630 cat confdefs.h >>conftest.$ac_ext
7631 cat >>conftest.$ac_ext <<_ACEOF
7632 /* end confdefs.h.  */
7633 #include <sys/types.h>
7634 #include <sys/time.h>
7635 #include <time.h>
7636
7637 int
7638 main ()
7639 {
7640 if ((struct tm *) 0)
7641 return 0;
7642   ;
7643   return 0;
7644 }
7645 _ACEOF
7646 rm -f conftest.$ac_objext
7647 if { (ac_try="$ac_compile"
7648 case "(($ac_try" in
7649   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7650   *) ac_try_echo=$ac_try;;
7651 esac
7652 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7653   (eval "$ac_compile") 2>conftest.er1
7654   ac_status=$?
7655   grep -v '^ *+' conftest.er1 >conftest.err
7656   rm -f conftest.er1
7657   cat conftest.err >&5
7658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7659   (exit $ac_status); } && {
7660          test -z "$ac_cxx_werror_flag" ||
7661          test ! -s conftest.err
7662        } && test -s conftest.$ac_objext; then
7663   ac_cv_header_time=yes
7664 else
7665   echo "$as_me: failed program was:" >&5
7666 sed 's/^/| /' conftest.$ac_ext >&5
7667
7668         ac_cv_header_time=no
7669 fi
7670
7671 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7672 fi
7673 { echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
7674 echo "${ECHO_T}$ac_cv_header_time" >&6; }
7675 if test $ac_cv_header_time = yes; then
7676
7677 cat >>confdefs.h <<\_ACEOF
7678 #define TIME_WITH_SYS_TIME 1
7679 _ACEOF
7680
7681 fi
7682
7683
7684 { echo "$as_me:$LINENO: checking whether termios.h and sys/ioctl.h may both be included" >&5
7685 echo $ECHO_N "checking whether termios.h and sys/ioctl.h may both be included... $ECHO_C" >&6; }
7686 if test "${rxvt_cv_header_sysioctl+set}" = set; then
7687   echo $ECHO_N "(cached) $ECHO_C" >&6
7688 else
7689   cat >conftest.$ac_ext <<_ACEOF
7690 /* confdefs.h.  */
7691 _ACEOF
7692 cat confdefs.h >>conftest.$ac_ext
7693 cat >>conftest.$ac_ext <<_ACEOF
7694 /* end confdefs.h.  */
7695 #include <stdio.h>
7696 #include <sys/ioctl.h>
7697 #ifdef HAVE_TERMIOS_H
7698 #include <termios.h>
7699 #endif
7700 int
7701 main ()
7702 {
7703 int a = ECHO;
7704   ;
7705   return 0;
7706 }
7707 _ACEOF
7708 rm -f conftest.$ac_objext
7709 if { (ac_try="$ac_compile"
7710 case "(($ac_try" in
7711   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7712   *) ac_try_echo=$ac_try;;
7713 esac
7714 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7715   (eval "$ac_compile") 2>conftest.er1
7716   ac_status=$?
7717   grep -v '^ *+' conftest.er1 >conftest.err
7718   rm -f conftest.er1
7719   cat conftest.err >&5
7720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7721   (exit $ac_status); } && {
7722          test -z "$ac_cxx_werror_flag" ||
7723          test ! -s conftest.err
7724        } && test -s conftest.$ac_objext; then
7725   rxvt_cv_header_sysioctl=yes
7726 else
7727   echo "$as_me: failed program was:" >&5
7728 sed 's/^/| /' conftest.$ac_ext >&5
7729
7730         rxvt_cv_header_sysioctl=no
7731 fi
7732
7733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7734 fi
7735 { echo "$as_me:$LINENO: result: $rxvt_cv_header_sysioctl" >&5
7736 echo "${ECHO_T}$rxvt_cv_header_sysioctl" >&6; }
7737
7738 { echo "$as_me:$LINENO: checking for XPointer" >&5
7739 echo $ECHO_N "checking for XPointer... $ECHO_C" >&6; }
7740 if test "${rxvt_cv_xpointer+set}" = set; then
7741   echo $ECHO_N "(cached) $ECHO_C" >&6
7742 else
7743   cat >conftest.$ac_ext <<_ACEOF
7744 /* confdefs.h.  */
7745 _ACEOF
7746 cat confdefs.h >>conftest.$ac_ext
7747 cat >>conftest.$ac_ext <<_ACEOF
7748 /* end confdefs.h.  */
7749 #include <X11/Xlib.h>
7750 int
7751 main ()
7752 {
7753 XPointer dummy;
7754   ;
7755   return 0;
7756 }
7757 _ACEOF
7758 rm -f conftest.$ac_objext
7759 if { (ac_try="$ac_compile"
7760 case "(($ac_try" in
7761   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7762   *) ac_try_echo=$ac_try;;
7763 esac
7764 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7765   (eval "$ac_compile") 2>conftest.er1
7766   ac_status=$?
7767   grep -v '^ *+' conftest.er1 >conftest.err
7768   rm -f conftest.er1
7769   cat conftest.err >&5
7770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7771   (exit $ac_status); } && {
7772          test -z "$ac_cxx_werror_flag" ||
7773          test ! -s conftest.err
7774        } && test -s conftest.$ac_objext; then
7775   rxvt_cv_xpointer=yes
7776 else
7777   echo "$as_me: failed program was:" >&5
7778 sed 's/^/| /' conftest.$ac_ext >&5
7779
7780         rxvt_cv_xpointer=no
7781 fi
7782
7783 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7784 fi
7785 { echo "$as_me:$LINENO: result: $rxvt_cv_xpointer" >&5
7786 echo "${ECHO_T}$rxvt_cv_xpointer" >&6; }
7787 if test x$rxvt_cv_xpointer = xyes; then
7788
7789 cat >>confdefs.h <<\_ACEOF
7790 #define HAVE_XPOINTER 1
7791 _ACEOF
7792
7793 fi
7794
7795 { echo "$as_me:$LINENO: checking for XLIB_ILLEGAL_ACCESS" >&5
7796 echo $ECHO_N "checking for XLIB_ILLEGAL_ACCESS... $ECHO_C" >&6; }
7797 if test "${rxvt_xlib_illegal_access+set}" = set; then
7798   echo $ECHO_N "(cached) $ECHO_C" >&6
7799 else
7800   cat >conftest.$ac_ext <<_ACEOF
7801 /* confdefs.h.  */
7802 _ACEOF
7803 cat confdefs.h >>conftest.$ac_ext
7804 cat >>conftest.$ac_ext <<_ACEOF
7805 /* end confdefs.h.  */
7806
7807 #define XLIB_ILLEGAL_ACCESS
7808 #include <X11/Xlib.h>
7809
7810 int
7811 main ()
7812 {
7813
7814       Display *dpy;
7815       dpy->xdefaults = (char *)0;
7816
7817   ;
7818   return 0;
7819 }
7820 _ACEOF
7821 rm -f conftest.$ac_objext
7822 if { (ac_try="$ac_compile"
7823 case "(($ac_try" in
7824   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7825   *) ac_try_echo=$ac_try;;
7826 esac
7827 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7828   (eval "$ac_compile") 2>conftest.er1
7829   ac_status=$?
7830   grep -v '^ *+' conftest.er1 >conftest.err
7831   rm -f conftest.er1
7832   cat conftest.err >&5
7833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7834   (exit $ac_status); } && {
7835          test -z "$ac_cxx_werror_flag" ||
7836          test ! -s conftest.err
7837        } && test -s conftest.$ac_objext; then
7838   rxvt_xlib_illegal_access=yes
7839 else
7840   echo "$as_me: failed program was:" >&5
7841 sed 's/^/| /' conftest.$ac_ext >&5
7842
7843         rxvt_xlib_illegal_access=no
7844
7845 fi
7846
7847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7848 fi
7849 { echo "$as_me:$LINENO: result: $rxvt_xlib_illegal_access" >&5
7850 echo "${ECHO_T}$rxvt_xlib_illegal_access" >&6; }
7851 if test x$rxvt_xlib_illegal_access = xyes; then
7852
7853 cat >>confdefs.h <<\_ACEOF
7854 #define XLIB_ILLEGAL_ACCESS 1
7855 _ACEOF
7856
7857 fi
7858
7859 { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
7860 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
7861 if test "${ac_cv_c_const+set}" = set; then
7862   echo $ECHO_N "(cached) $ECHO_C" >&6
7863 else
7864   cat >conftest.$ac_ext <<_ACEOF
7865 /* confdefs.h.  */
7866 _ACEOF
7867 cat confdefs.h >>conftest.$ac_ext
7868 cat >>conftest.$ac_ext <<_ACEOF
7869 /* end confdefs.h.  */
7870
7871 int
7872 main ()
7873 {
7874 /* FIXME: Include the comments suggested by Paul. */
7875 #ifndef __cplusplus
7876   /* Ultrix mips cc rejects this.  */
7877   typedef int charset[2];
7878   const charset cs;
7879   /* SunOS 4.1.1 cc rejects this.  */
7880   char const *const *pcpcc;
7881   char **ppc;
7882   /* NEC SVR4.0.2 mips cc rejects this.  */
7883   struct point {int x, y;};
7884   static struct point const zero = {0,0};
7885   /* AIX XL C 1.02.0.0 rejects this.
7886      It does not let you subtract one const X* pointer from another in
7887      an arm of an if-expression whose if-part is not a constant
7888      expression */
7889   const char *g = "string";
7890   pcpcc = &g + (g ? g-g : 0);
7891   /* HPUX 7.0 cc rejects these. */
7892   ++pcpcc;
7893   ppc = (char**) pcpcc;
7894   pcpcc = (char const *const *) ppc;
7895   { /* SCO 3.2v4 cc rejects this.  */
7896     char *t;
7897     char const *s = 0 ? (char *) 0 : (char const *) 0;
7898
7899     *t++ = 0;
7900     if (s) return 0;
7901   }
7902   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
7903     int x[] = {25, 17};
7904     const int *foo = &x[0];
7905     ++foo;
7906   }
7907   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
7908     typedef const int *iptr;
7909     iptr p = 0;
7910     ++p;
7911   }
7912   { /* AIX XL C 1.02.0.0 rejects this saying
7913        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
7914     struct s { int j; const int *ap[3]; };
7915     struct s *b; b->j = 5;
7916   }
7917   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
7918     const int foo = 10;
7919     if (!foo) return 0;
7920   }
7921   return !cs[0] && !zero.x;
7922 #endif
7923
7924   ;
7925   return 0;
7926 }
7927 _ACEOF
7928 rm -f conftest.$ac_objext
7929 if { (ac_try="$ac_compile"
7930 case "(($ac_try" in
7931   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7932   *) ac_try_echo=$ac_try;;
7933 esac
7934 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7935   (eval "$ac_compile") 2>conftest.er1
7936   ac_status=$?
7937   grep -v '^ *+' conftest.er1 >conftest.err
7938   rm -f conftest.er1
7939   cat conftest.err >&5
7940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7941   (exit $ac_status); } && {
7942          test -z "$ac_cxx_werror_flag" ||
7943          test ! -s conftest.err
7944        } && test -s conftest.$ac_objext; then
7945   ac_cv_c_const=yes
7946 else
7947   echo "$as_me: failed program was:" >&5
7948 sed 's/^/| /' conftest.$ac_ext >&5
7949
7950         ac_cv_c_const=no
7951 fi
7952
7953 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7954 fi
7955 { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
7956 echo "${ECHO_T}$ac_cv_c_const" >&6; }
7957 if test $ac_cv_c_const = no; then
7958
7959 cat >>confdefs.h <<\_ACEOF
7960 #define const
7961 _ACEOF
7962
7963 fi
7964
7965 { echo "$as_me:$LINENO: checking for inline" >&5
7966 echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
7967 if test "${ac_cv_c_inline+set}" = set; then
7968   echo $ECHO_N "(cached) $ECHO_C" >&6
7969 else
7970   ac_cv_c_inline=no
7971 for ac_kw in inline __inline__ __inline; do
7972   cat >conftest.$ac_ext <<_ACEOF
7973 /* confdefs.h.  */
7974 _ACEOF
7975 cat confdefs.h >>conftest.$ac_ext
7976 cat >>conftest.$ac_ext <<_ACEOF
7977 /* end confdefs.h.  */
7978 #ifndef __cplusplus
7979 typedef int foo_t;
7980 static $ac_kw foo_t static_foo () {return 0; }
7981 $ac_kw foo_t foo () {return 0; }
7982 #endif
7983
7984 _ACEOF
7985 rm -f conftest.$ac_objext
7986 if { (ac_try="$ac_compile"
7987 case "(($ac_try" in
7988   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7989   *) ac_try_echo=$ac_try;;
7990 esac
7991 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7992   (eval "$ac_compile") 2>conftest.er1
7993   ac_status=$?
7994   grep -v '^ *+' conftest.er1 >conftest.err
7995   rm -f conftest.er1
7996   cat conftest.err >&5
7997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7998   (exit $ac_status); } && {
7999          test -z "$ac_cxx_werror_flag" ||
8000          test ! -s conftest.err
8001        } && test -s conftest.$ac_objext; then
8002   ac_cv_c_inline=$ac_kw
8003 else
8004   echo "$as_me: failed program was:" >&5
8005 sed 's/^/| /' conftest.$ac_ext >&5
8006
8007
8008 fi
8009
8010 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8011   test "$ac_cv_c_inline" != no && break
8012 done
8013
8014 fi
8015 { echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
8016 echo "${ECHO_T}$ac_cv_c_inline" >&6; }
8017
8018
8019 case $ac_cv_c_inline in
8020   inline | yes) ;;
8021   *)
8022     case $ac_cv_c_inline in
8023       no) ac_val=;;
8024       *) ac_val=$ac_cv_c_inline;;
8025     esac
8026     cat >>confdefs.h <<_ACEOF
8027 #ifndef __cplusplus
8028 #define inline $ac_val
8029 #endif
8030 _ACEOF
8031     ;;
8032 esac
8033
8034
8035
8036 { echo "$as_me:$LINENO: checking for mode_t" >&5
8037 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
8038 if test "${ac_cv_type_mode_t+set}" = set; then
8039   echo $ECHO_N "(cached) $ECHO_C" >&6
8040 else
8041   cat >conftest.$ac_ext <<_ACEOF
8042 /* confdefs.h.  */
8043 _ACEOF
8044 cat confdefs.h >>conftest.$ac_ext
8045 cat >>conftest.$ac_ext <<_ACEOF
8046 /* end confdefs.h.  */
8047 $ac_includes_default
8048 typedef mode_t ac__type_new_;
8049 int
8050 main ()
8051 {
8052 if ((ac__type_new_ *) 0)
8053   return 0;
8054 if (sizeof (ac__type_new_))
8055   return 0;
8056   ;
8057   return 0;
8058 }
8059 _ACEOF
8060 rm -f conftest.$ac_objext
8061 if { (ac_try="$ac_compile"
8062 case "(($ac_try" in
8063   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8064   *) ac_try_echo=$ac_try;;
8065 esac
8066 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8067   (eval "$ac_compile") 2>conftest.er1
8068   ac_status=$?
8069   grep -v '^ *+' conftest.er1 >conftest.err
8070   rm -f conftest.er1
8071   cat conftest.err >&5
8072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8073   (exit $ac_status); } && {
8074          test -z "$ac_cxx_werror_flag" ||
8075          test ! -s conftest.err
8076        } && test -s conftest.$ac_objext; then
8077   ac_cv_type_mode_t=yes
8078 else
8079   echo "$as_me: failed program was:" >&5
8080 sed 's/^/| /' conftest.$ac_ext >&5
8081
8082         ac_cv_type_mode_t=no
8083 fi
8084
8085 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8086 fi
8087 { echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
8088 echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
8089 if test $ac_cv_type_mode_t = yes; then
8090   :
8091 else
8092
8093 cat >>confdefs.h <<_ACEOF
8094 #define mode_t int
8095 _ACEOF
8096
8097 fi
8098
8099 { echo "$as_me:$LINENO: checking for pid_t" >&5
8100 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
8101 if test "${ac_cv_type_pid_t+set}" = set; then
8102   echo $ECHO_N "(cached) $ECHO_C" >&6
8103 else
8104   cat >conftest.$ac_ext <<_ACEOF
8105 /* confdefs.h.  */
8106 _ACEOF
8107 cat confdefs.h >>conftest.$ac_ext
8108 cat >>conftest.$ac_ext <<_ACEOF
8109 /* end confdefs.h.  */
8110 $ac_includes_default
8111 typedef pid_t ac__type_new_;
8112 int
8113 main ()
8114 {
8115 if ((ac__type_new_ *) 0)
8116   return 0;
8117 if (sizeof (ac__type_new_))
8118   return 0;
8119   ;
8120   return 0;
8121 }
8122 _ACEOF
8123 rm -f conftest.$ac_objext
8124 if { (ac_try="$ac_compile"
8125 case "(($ac_try" in
8126   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8127   *) ac_try_echo=$ac_try;;
8128 esac
8129 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8130   (eval "$ac_compile") 2>conftest.er1
8131   ac_status=$?
8132   grep -v '^ *+' conftest.er1 >conftest.err
8133   rm -f conftest.er1
8134   cat conftest.err >&5
8135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8136   (exit $ac_status); } && {
8137          test -z "$ac_cxx_werror_flag" ||
8138          test ! -s conftest.err
8139        } && test -s conftest.$ac_objext; then
8140   ac_cv_type_pid_t=yes
8141 else
8142   echo "$as_me: failed program was:" >&5
8143 sed 's/^/| /' conftest.$ac_ext >&5
8144
8145         ac_cv_type_pid_t=no
8146 fi
8147
8148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8149 fi
8150 { echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
8151 echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
8152 if test $ac_cv_type_pid_t = yes; then
8153   :
8154 else
8155
8156 cat >>confdefs.h <<_ACEOF
8157 #define pid_t int
8158 _ACEOF
8159
8160 fi
8161
8162 { echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
8163 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
8164 if test "${ac_cv_type_uid_t+set}" = set; then
8165   echo $ECHO_N "(cached) $ECHO_C" >&6
8166 else
8167   cat >conftest.$ac_ext <<_ACEOF
8168 /* confdefs.h.  */
8169 _ACEOF
8170 cat confdefs.h >>conftest.$ac_ext
8171 cat >>conftest.$ac_ext <<_ACEOF
8172 /* end confdefs.h.  */
8173 #include <sys/types.h>
8174
8175 _ACEOF
8176 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8177   $EGREP "uid_t" >/dev/null 2>&1; then
8178   ac_cv_type_uid_t=yes
8179 else
8180   ac_cv_type_uid_t=no
8181 fi
8182 rm -f conftest*
8183
8184 fi
8185 { echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
8186 echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
8187 if test $ac_cv_type_uid_t = no; then
8188
8189 cat >>confdefs.h <<\_ACEOF
8190 #define uid_t int
8191 _ACEOF
8192
8193
8194 cat >>confdefs.h <<\_ACEOF
8195 #define gid_t int
8196 _ACEOF
8197
8198 fi
8199
8200
8201 { echo "$as_me:$LINENO: checking for short" >&5
8202 echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8203 if test "${ac_cv_type_short+set}" = set; then
8204   echo $ECHO_N "(cached) $ECHO_C" >&6
8205 else
8206   cat >conftest.$ac_ext <<_ACEOF
8207 /* confdefs.h.  */
8208 _ACEOF
8209 cat confdefs.h >>conftest.$ac_ext
8210 cat >>conftest.$ac_ext <<_ACEOF
8211 /* end confdefs.h.  */
8212 $ac_includes_default
8213 typedef short ac__type_new_;
8214 int
8215 main ()
8216 {
8217 if ((ac__type_new_ *) 0)
8218   return 0;
8219 if (sizeof (ac__type_new_))
8220   return 0;
8221   ;
8222   return 0;
8223 }
8224 _ACEOF
8225 rm -f conftest.$ac_objext
8226 if { (ac_try="$ac_compile"
8227 case "(($ac_try" in
8228   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8229   *) ac_try_echo=$ac_try;;
8230 esac
8231 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8232   (eval "$ac_compile") 2>conftest.er1
8233   ac_status=$?
8234   grep -v '^ *+' conftest.er1 >conftest.err
8235   rm -f conftest.er1
8236   cat conftest.err >&5
8237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8238   (exit $ac_status); } && {
8239          test -z "$ac_cxx_werror_flag" ||
8240          test ! -s conftest.err
8241        } && test -s conftest.$ac_objext; then
8242   ac_cv_type_short=yes
8243 else
8244   echo "$as_me: failed program was:" >&5
8245 sed 's/^/| /' conftest.$ac_ext >&5
8246
8247         ac_cv_type_short=no
8248 fi
8249
8250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8251 fi
8252 { echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8253 echo "${ECHO_T}$ac_cv_type_short" >&6; }
8254
8255 # The cast to long int works around a bug in the HP C Compiler
8256 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8257 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8258 # This bug is HP SR number 8606223364.
8259 { echo "$as_me:$LINENO: checking size of short" >&5
8260 echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
8261 if test "${ac_cv_sizeof_short+set}" = set; then
8262   echo $ECHO_N "(cached) $ECHO_C" >&6
8263 else
8264   if test "$cross_compiling" = yes; then
8265   # Depending upon the size, compute the lo and hi bounds.
8266 cat >conftest.$ac_ext <<_ACEOF
8267 /* confdefs.h.  */
8268 _ACEOF
8269 cat confdefs.h >>conftest.$ac_ext
8270 cat >>conftest.$ac_ext <<_ACEOF
8271 /* end confdefs.h.  */
8272 $ac_includes_default
8273    typedef short ac__type_sizeof_;
8274 int
8275 main ()
8276 {
8277 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
8278 test_array [0] = 0
8279
8280   ;
8281   return 0;
8282 }
8283 _ACEOF
8284 rm -f conftest.$ac_objext
8285 if { (ac_try="$ac_compile"
8286 case "(($ac_try" in
8287   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8288   *) ac_try_echo=$ac_try;;
8289 esac
8290 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8291   (eval "$ac_compile") 2>conftest.er1
8292   ac_status=$?
8293   grep -v '^ *+' conftest.er1 >conftest.err
8294   rm -f conftest.er1
8295   cat conftest.err >&5
8296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8297   (exit $ac_status); } && {
8298          test -z "$ac_cxx_werror_flag" ||
8299          test ! -s conftest.err
8300        } && test -s conftest.$ac_objext; then
8301   ac_lo=0 ac_mid=0
8302   while :; do
8303     cat >conftest.$ac_ext <<_ACEOF
8304 /* confdefs.h.  */
8305 _ACEOF
8306 cat confdefs.h >>conftest.$ac_ext
8307 cat >>conftest.$ac_ext <<_ACEOF
8308 /* end confdefs.h.  */
8309 $ac_includes_default
8310    typedef short ac__type_sizeof_;
8311 int
8312 main ()
8313 {
8314 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
8315 test_array [0] = 0
8316
8317   ;
8318   return 0;
8319 }
8320 _ACEOF
8321 rm -f conftest.$ac_objext
8322 if { (ac_try="$ac_compile"
8323 case "(($ac_try" in
8324   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8325   *) ac_try_echo=$ac_try;;
8326 esac
8327 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8328   (eval "$ac_compile") 2>conftest.er1
8329   ac_status=$?
8330   grep -v '^ *+' conftest.er1 >conftest.err
8331   rm -f conftest.er1
8332   cat conftest.err >&5
8333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8334   (exit $ac_status); } && {
8335          test -z "$ac_cxx_werror_flag" ||
8336          test ! -s conftest.err
8337        } && test -s conftest.$ac_objext; then
8338   ac_hi=$ac_mid; break
8339 else
8340   echo "$as_me: failed program was:" >&5
8341 sed 's/^/| /' conftest.$ac_ext >&5
8342
8343         ac_lo=`expr $ac_mid + 1`
8344                         if test $ac_lo -le $ac_mid; then
8345                           ac_lo= ac_hi=
8346                           break
8347                         fi
8348                         ac_mid=`expr 2 '*' $ac_mid + 1`
8349 fi
8350
8351 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8352   done
8353 else
8354   echo "$as_me: failed program was:" >&5
8355 sed 's/^/| /' conftest.$ac_ext >&5
8356
8357         cat >conftest.$ac_ext <<_ACEOF
8358 /* confdefs.h.  */
8359 _ACEOF
8360 cat confdefs.h >>conftest.$ac_ext
8361 cat >>conftest.$ac_ext <<_ACEOF
8362 /* end confdefs.h.  */
8363 $ac_includes_default
8364    typedef short ac__type_sizeof_;
8365 int
8366 main ()
8367 {
8368 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
8369 test_array [0] = 0
8370
8371   ;
8372   return 0;
8373 }
8374 _ACEOF
8375 rm -f conftest.$ac_objext
8376 if { (ac_try="$ac_compile"
8377 case "(($ac_try" in
8378   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8379   *) ac_try_echo=$ac_try;;
8380 esac
8381 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8382   (eval "$ac_compile") 2>conftest.er1
8383   ac_status=$?
8384   grep -v '^ *+' conftest.er1 >conftest.err
8385   rm -f conftest.er1
8386   cat conftest.err >&5
8387   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8388   (exit $ac_status); } && {
8389          test -z "$ac_cxx_werror_flag" ||
8390          test ! -s conftest.err
8391        } && test -s conftest.$ac_objext; then
8392   ac_hi=-1 ac_mid=-1
8393   while :; do
8394     cat >conftest.$ac_ext <<_ACEOF
8395 /* confdefs.h.  */
8396 _ACEOF
8397 cat confdefs.h >>conftest.$ac_ext
8398 cat >>conftest.$ac_ext <<_ACEOF
8399 /* end confdefs.h.  */
8400 $ac_includes_default
8401    typedef short ac__type_sizeof_;
8402 int
8403 main ()
8404 {
8405 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
8406 test_array [0] = 0
8407
8408   ;
8409   return 0;
8410 }
8411 _ACEOF
8412 rm -f conftest.$ac_objext
8413 if { (ac_try="$ac_compile"
8414 case "(($ac_try" in
8415   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8416   *) ac_try_echo=$ac_try;;
8417 esac
8418 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8419   (eval "$ac_compile") 2>conftest.er1
8420   ac_status=$?
8421   grep -v '^ *+' conftest.er1 >conftest.err
8422   rm -f conftest.er1
8423   cat conftest.err >&5
8424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8425   (exit $ac_status); } && {
8426          test -z "$ac_cxx_werror_flag" ||
8427          test ! -s conftest.err
8428        } && test -s conftest.$ac_objext; then
8429   ac_lo=$ac_mid; break
8430 else
8431   echo "$as_me: failed program was:" >&5
8432 sed 's/^/| /' conftest.$ac_ext >&5
8433
8434         ac_hi=`expr '(' $ac_mid ')' - 1`
8435                         if test $ac_mid -le $ac_hi; then
8436                           ac_lo= ac_hi=
8437                           break
8438                         fi
8439                         ac_mid=`expr 2 '*' $ac_mid`
8440 fi
8441
8442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8443   done
8444 else
8445   echo "$as_me: failed program was:" >&5
8446 sed 's/^/| /' conftest.$ac_ext >&5
8447
8448         ac_lo= ac_hi=
8449 fi
8450
8451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8452 fi
8453
8454 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8455 # Binary search between lo and hi bounds.
8456 while test "x$ac_lo" != "x$ac_hi"; do
8457   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8458   cat >conftest.$ac_ext <<_ACEOF
8459 /* confdefs.h.  */
8460 _ACEOF
8461 cat confdefs.h >>conftest.$ac_ext
8462 cat >>conftest.$ac_ext <<_ACEOF
8463 /* end confdefs.h.  */
8464 $ac_includes_default
8465    typedef short ac__type_sizeof_;
8466 int
8467 main ()
8468 {
8469 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
8470 test_array [0] = 0
8471
8472   ;
8473   return 0;
8474 }
8475 _ACEOF
8476 rm -f conftest.$ac_objext
8477 if { (ac_try="$ac_compile"
8478 case "(($ac_try" in
8479   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8480   *) ac_try_echo=$ac_try;;
8481 esac
8482 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8483   (eval "$ac_compile") 2>conftest.er1
8484   ac_status=$?
8485   grep -v '^ *+' conftest.er1 >conftest.err
8486   rm -f conftest.er1
8487   cat conftest.err >&5
8488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8489   (exit $ac_status); } && {
8490          test -z "$ac_cxx_werror_flag" ||
8491          test ! -s conftest.err
8492        } && test -s conftest.$ac_objext; then
8493   ac_hi=$ac_mid
8494 else
8495   echo "$as_me: failed program was:" >&5
8496 sed 's/^/| /' conftest.$ac_ext >&5
8497
8498         ac_lo=`expr '(' $ac_mid ')' + 1`
8499 fi
8500
8501 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8502 done
8503 case $ac_lo in
8504 ?*) ac_cv_sizeof_short=$ac_lo;;
8505 '') if test "$ac_cv_type_short" = yes; then
8506      { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
8507 See \`config.log' for more details." >&5
8508 echo "$as_me: error: cannot compute sizeof (short)
8509 See \`config.log' for more details." >&2;}
8510    { (exit 77); exit 77; }; }
8511    else
8512      ac_cv_sizeof_short=0
8513    fi ;;
8514 esac
8515 else
8516   cat >conftest.$ac_ext <<_ACEOF
8517 /* confdefs.h.  */
8518 _ACEOF
8519 cat confdefs.h >>conftest.$ac_ext
8520 cat >>conftest.$ac_ext <<_ACEOF
8521 /* end confdefs.h.  */
8522 $ac_includes_default
8523    typedef short ac__type_sizeof_;
8524 static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8525 static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
8526 #include <stdio.h>
8527 #include <stdlib.h>
8528 int
8529 main ()
8530 {
8531
8532   FILE *f = fopen ("conftest.val", "w");
8533   if (! f)
8534     return 1;
8535   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
8536     {
8537       long int i = longval ();
8538       if (i != ((long int) (sizeof (ac__type_sizeof_))))
8539         return 1;
8540       fprintf (f, "%ld\n", i);
8541     }
8542   else
8543     {
8544       unsigned long int i = ulongval ();
8545       if (i != ((long int) (sizeof (ac__type_sizeof_))))
8546         return 1;
8547       fprintf (f, "%lu\n", i);
8548     }
8549   return ferror (f) || fclose (f) != 0;
8550
8551   ;
8552   return 0;
8553 }
8554 _ACEOF
8555 rm -f conftest$ac_exeext
8556 if { (ac_try="$ac_link"
8557 case "(($ac_try" in
8558   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8559   *) ac_try_echo=$ac_try;;
8560 esac
8561 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8562   (eval "$ac_link") 2>&5
8563   ac_status=$?
8564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8565   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8566   { (case "(($ac_try" in
8567   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8568   *) ac_try_echo=$ac_try;;
8569 esac
8570 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8571   (eval "$ac_try") 2>&5
8572   ac_status=$?
8573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8574   (exit $ac_status); }; }; then
8575   ac_cv_sizeof_short=`cat conftest.val`
8576 else
8577   echo "$as_me: program exited with status $ac_status" >&5
8578 echo "$as_me: failed program was:" >&5
8579 sed 's/^/| /' conftest.$ac_ext >&5
8580
8581 ( exit $ac_status )
8582 if test "$ac_cv_type_short" = yes; then
8583      { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
8584 See \`config.log' for more details." >&5
8585 echo "$as_me: error: cannot compute sizeof (short)
8586 See \`config.log' for more details." >&2;}
8587    { (exit 77); exit 77; }; }
8588    else
8589      ac_cv_sizeof_short=0
8590    fi
8591 fi
8592 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8593 fi
8594 rm -f conftest.val
8595 fi
8596 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
8597 echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
8598
8599
8600
8601 cat >>confdefs.h <<_ACEOF
8602 #define SIZEOF_SHORT $ac_cv_sizeof_short
8603 _ACEOF
8604
8605
8606 { echo "$as_me:$LINENO: checking for int" >&5
8607 echo $ECHO_N "checking for int... $ECHO_C" >&6; }
8608 if test "${ac_cv_type_int+set}" = set; then
8609   echo $ECHO_N "(cached) $ECHO_C" >&6
8610 else
8611   cat >conftest.$ac_ext <<_ACEOF
8612 /* confdefs.h.  */
8613 _ACEOF
8614 cat confdefs.h >>conftest.$ac_ext
8615 cat >>conftest.$ac_ext <<_ACEOF
8616 /* end confdefs.h.  */
8617 $ac_includes_default
8618 typedef int ac__type_new_;
8619 int
8620 main ()
8621 {
8622 if ((ac__type_new_ *) 0)
8623   return 0;
8624 if (sizeof (ac__type_new_))
8625   return 0;
8626   ;
8627   return 0;
8628 }
8629 _ACEOF
8630 rm -f conftest.$ac_objext
8631 if { (ac_try="$ac_compile"
8632 case "(($ac_try" in
8633   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8634   *) ac_try_echo=$ac_try;;
8635 esac
8636 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8637   (eval "$ac_compile") 2>conftest.er1
8638   ac_status=$?
8639   grep -v '^ *+' conftest.er1 >conftest.err
8640   rm -f conftest.er1
8641   cat conftest.err >&5
8642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8643   (exit $ac_status); } && {
8644          test -z "$ac_cxx_werror_flag" ||
8645          test ! -s conftest.err
8646        } && test -s conftest.$ac_objext; then
8647   ac_cv_type_int=yes
8648 else
8649   echo "$as_me: failed program was:" >&5
8650 sed 's/^/| /' conftest.$ac_ext >&5
8651
8652         ac_cv_type_int=no
8653 fi
8654
8655 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8656 fi
8657 { echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
8658 echo "${ECHO_T}$ac_cv_type_int" >&6; }
8659
8660 # The cast to long int works around a bug in the HP C Compiler
8661 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8662 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8663 # This bug is HP SR number 8606223364.
8664 { echo "$as_me:$LINENO: checking size of int" >&5
8665 echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
8666 if test "${ac_cv_sizeof_int+set}" = set; then
8667   echo $ECHO_N "(cached) $ECHO_C" >&6
8668 else
8669   if test "$cross_compiling" = yes; then
8670   # Depending upon the size, compute the lo and hi bounds.
8671 cat >conftest.$ac_ext <<_ACEOF
8672 /* confdefs.h.  */
8673 _ACEOF
8674 cat confdefs.h >>conftest.$ac_ext
8675 cat >>conftest.$ac_ext <<_ACEOF
8676 /* end confdefs.h.  */
8677 $ac_includes_default
8678    typedef int ac__type_sizeof_;
8679 int
8680 main ()
8681 {
8682 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
8683 test_array [0] = 0
8684
8685   ;
8686   return 0;
8687 }
8688 _ACEOF
8689 rm -f conftest.$ac_objext
8690 if { (ac_try="$ac_compile"
8691 case "(($ac_try" in
8692   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8693   *) ac_try_echo=$ac_try;;
8694 esac
8695 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8696   (eval "$ac_compile") 2>conftest.er1
8697   ac_status=$?
8698   grep -v '^ *+' conftest.er1 >conftest.err
8699   rm -f conftest.er1
8700   cat conftest.err >&5
8701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8702   (exit $ac_status); } && {
8703          test -z "$ac_cxx_werror_flag" ||
8704          test ! -s conftest.err
8705        } && test -s conftest.$ac_objext; then
8706   ac_lo=0 ac_mid=0
8707   while :; do
8708     cat >conftest.$ac_ext <<_ACEOF
8709 /* confdefs.h.  */
8710 _ACEOF
8711 cat confdefs.h >>conftest.$ac_ext
8712 cat >>conftest.$ac_ext <<_ACEOF
8713 /* end confdefs.h.  */
8714 $ac_includes_default
8715    typedef int ac__type_sizeof_;
8716 int
8717 main ()
8718 {
8719 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
8720 test_array [0] = 0
8721
8722   ;
8723   return 0;
8724 }
8725 _ACEOF
8726 rm -f conftest.$ac_objext
8727 if { (ac_try="$ac_compile"
8728 case "(($ac_try" in
8729   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8730   *) ac_try_echo=$ac_try;;
8731 esac
8732 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8733   (eval "$ac_compile") 2>conftest.er1
8734   ac_status=$?
8735   grep -v '^ *+' conftest.er1 >conftest.err
8736   rm -f conftest.er1
8737   cat conftest.err >&5
8738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8739   (exit $ac_status); } && {
8740          test -z "$ac_cxx_werror_flag" ||
8741          test ! -s conftest.err
8742        } && test -s conftest.$ac_objext; then
8743   ac_hi=$ac_mid; break
8744 else
8745   echo "$as_me: failed program was:" >&5
8746 sed 's/^/| /' conftest.$ac_ext >&5
8747
8748         ac_lo=`expr $ac_mid + 1`
8749                         if test $ac_lo -le $ac_mid; then
8750                           ac_lo= ac_hi=
8751                           break
8752                         fi
8753                         ac_mid=`expr 2 '*' $ac_mid + 1`
8754 fi
8755
8756 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8757   done
8758 else
8759   echo "$as_me: failed program was:" >&5
8760 sed 's/^/| /' conftest.$ac_ext >&5
8761
8762         cat >conftest.$ac_ext <<_ACEOF
8763 /* confdefs.h.  */
8764 _ACEOF
8765 cat confdefs.h >>conftest.$ac_ext
8766 cat >>conftest.$ac_ext <<_ACEOF
8767 /* end confdefs.h.  */
8768 $ac_includes_default
8769    typedef int ac__type_sizeof_;
8770 int
8771 main ()
8772 {
8773 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
8774 test_array [0] = 0
8775
8776   ;
8777   return 0;
8778 }
8779 _ACEOF
8780 rm -f conftest.$ac_objext
8781 if { (ac_try="$ac_compile"
8782 case "(($ac_try" in
8783   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8784   *) ac_try_echo=$ac_try;;
8785 esac
8786 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8787   (eval "$ac_compile") 2>conftest.er1
8788   ac_status=$?
8789   grep -v '^ *+' conftest.er1 >conftest.err
8790   rm -f conftest.er1
8791   cat conftest.err >&5
8792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8793   (exit $ac_status); } && {
8794          test -z "$ac_cxx_werror_flag" ||
8795          test ! -s conftest.err
8796        } && test -s conftest.$ac_objext; then
8797   ac_hi=-1 ac_mid=-1
8798   while :; do
8799     cat >conftest.$ac_ext <<_ACEOF
8800 /* confdefs.h.  */
8801 _ACEOF
8802 cat confdefs.h >>conftest.$ac_ext
8803 cat >>conftest.$ac_ext <<_ACEOF
8804 /* end confdefs.h.  */
8805 $ac_includes_default
8806    typedef int ac__type_sizeof_;
8807 int
8808 main ()
8809 {
8810 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
8811 test_array [0] = 0
8812
8813   ;
8814   return 0;
8815 }
8816 _ACEOF
8817 rm -f conftest.$ac_objext
8818 if { (ac_try="$ac_compile"
8819 case "(($ac_try" in
8820   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8821   *) ac_try_echo=$ac_try;;
8822 esac
8823 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8824   (eval "$ac_compile") 2>conftest.er1
8825   ac_status=$?
8826   grep -v '^ *+' conftest.er1 >conftest.err
8827   rm -f conftest.er1
8828   cat conftest.err >&5
8829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8830   (exit $ac_status); } && {
8831          test -z "$ac_cxx_werror_flag" ||
8832          test ! -s conftest.err
8833        } && test -s conftest.$ac_objext; then
8834   ac_lo=$ac_mid; break
8835 else
8836   echo "$as_me: failed program was:" >&5
8837 sed 's/^/| /' conftest.$ac_ext >&5
8838
8839         ac_hi=`expr '(' $ac_mid ')' - 1`
8840                         if test $ac_mid -le $ac_hi; then
8841                           ac_lo= ac_hi=
8842                           break
8843                         fi
8844                         ac_mid=`expr 2 '*' $ac_mid`
8845 fi
8846
8847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8848   done
8849 else
8850   echo "$as_me: failed program was:" >&5
8851 sed 's/^/| /' conftest.$ac_ext >&5
8852
8853         ac_lo= ac_hi=
8854 fi
8855
8856 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8857 fi
8858
8859 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8860 # Binary search between lo and hi bounds.
8861 while test "x$ac_lo" != "x$ac_hi"; do
8862   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8863   cat >conftest.$ac_ext <<_ACEOF
8864 /* confdefs.h.  */
8865 _ACEOF
8866 cat confdefs.h >>conftest.$ac_ext
8867 cat >>conftest.$ac_ext <<_ACEOF
8868 /* end confdefs.h.  */
8869 $ac_includes_default
8870    typedef int ac__type_sizeof_;
8871 int
8872 main ()
8873 {
8874 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
8875 test_array [0] = 0
8876
8877   ;
8878   return 0;
8879 }
8880 _ACEOF
8881 rm -f conftest.$ac_objext
8882 if { (ac_try="$ac_compile"
8883 case "(($ac_try" in
8884   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8885   *) ac_try_echo=$ac_try;;
8886 esac
8887 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8888   (eval "$ac_compile") 2>conftest.er1
8889   ac_status=$?
8890   grep -v '^ *+' conftest.er1 >conftest.err
8891   rm -f conftest.er1
8892   cat conftest.err >&5
8893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8894   (exit $ac_status); } && {
8895          test -z "$ac_cxx_werror_flag" ||
8896          test ! -s conftest.err
8897        } && test -s conftest.$ac_objext; then
8898   ac_hi=$ac_mid
8899 else
8900   echo "$as_me: failed program was:" >&5
8901 sed 's/^/| /' conftest.$ac_ext >&5
8902
8903         ac_lo=`expr '(' $ac_mid ')' + 1`
8904 fi
8905
8906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8907 done
8908 case $ac_lo in
8909 ?*) ac_cv_sizeof_int=$ac_lo;;
8910 '') if test "$ac_cv_type_int" = yes; then
8911      { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
8912 See \`config.log' for more details." >&5
8913 echo "$as_me: error: cannot compute sizeof (int)
8914 See \`config.log' for more details." >&2;}
8915    { (exit 77); exit 77; }; }
8916    else
8917      ac_cv_sizeof_int=0
8918    fi ;;
8919 esac
8920 else
8921   cat >conftest.$ac_ext <<_ACEOF
8922 /* confdefs.h.  */
8923 _ACEOF
8924 cat confdefs.h >>conftest.$ac_ext
8925 cat >>conftest.$ac_ext <<_ACEOF
8926 /* end confdefs.h.  */
8927 $ac_includes_default
8928    typedef int ac__type_sizeof_;
8929 static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8930 static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
8931 #include <stdio.h>
8932 #include <stdlib.h>
8933 int
8934 main ()
8935 {
8936
8937   FILE *f = fopen ("conftest.val", "w");
8938   if (! f)
8939     return 1;
8940   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
8941     {
8942       long int i = longval ();
8943       if (i != ((long int) (sizeof (ac__type_sizeof_))))
8944         return 1;
8945       fprintf (f, "%ld\n", i);
8946     }
8947   else
8948     {
8949       unsigned long int i = ulongval ();
8950       if (i != ((long int) (sizeof (ac__type_sizeof_))))
8951         return 1;
8952       fprintf (f, "%lu\n", i);
8953     }
8954   return ferror (f) || fclose (f) != 0;
8955
8956   ;
8957   return 0;
8958 }
8959 _ACEOF
8960 rm -f conftest$ac_exeext
8961 if { (ac_try="$ac_link"
8962 case "(($ac_try" in
8963   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8964   *) ac_try_echo=$ac_try;;
8965 esac
8966 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8967   (eval "$ac_link") 2>&5
8968   ac_status=$?
8969   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8970   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8971   { (case "(($ac_try" in
8972   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8973   *) ac_try_echo=$ac_try;;
8974 esac
8975 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8976   (eval "$ac_try") 2>&5
8977   ac_status=$?
8978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8979   (exit $ac_status); }; }; then
8980   ac_cv_sizeof_int=`cat conftest.val`
8981 else
8982   echo "$as_me: program exited with status $ac_status" >&5
8983 echo "$as_me: failed program was:" >&5
8984 sed 's/^/| /' conftest.$ac_ext >&5
8985
8986 ( exit $ac_status )
8987 if test "$ac_cv_type_int" = yes; then
8988      { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
8989 See \`config.log' for more details." >&5
8990 echo "$as_me: error: cannot compute sizeof (int)
8991 See \`config.log' for more details." >&2;}
8992    { (exit 77); exit 77; }; }
8993    else
8994      ac_cv_sizeof_int=0
8995    fi
8996 fi
8997 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8998 fi
8999 rm -f conftest.val
9000 fi
9001 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
9002 echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
9003
9004
9005
9006 cat >>confdefs.h <<_ACEOF
9007 #define SIZEOF_INT $ac_cv_sizeof_int
9008 _ACEOF
9009
9010
9011 { echo "$as_me:$LINENO: checking for long long" >&5
9012 echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
9013 if test "${ac_cv_type_long_long+set}" = set; then
9014   echo $ECHO_N "(cached) $ECHO_C" >&6
9015 else
9016   cat >conftest.$ac_ext <<_ACEOF
9017 /* confdefs.h.  */
9018 _ACEOF
9019 cat confdefs.h >>conftest.$ac_ext
9020 cat >>conftest.$ac_ext <<_ACEOF
9021 /* end confdefs.h.  */
9022 $ac_includes_default
9023 typedef long long ac__type_new_;
9024 int
9025 main ()
9026 {
9027 if ((ac__type_new_ *) 0)
9028   return 0;
9029 if (sizeof (ac__type_new_))
9030   return 0;
9031   ;
9032   return 0;
9033 }
9034 _ACEOF
9035 rm -f conftest.$ac_objext
9036 if { (ac_try="$ac_compile"
9037 case "(($ac_try" in
9038   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9039   *) ac_try_echo=$ac_try;;
9040 esac
9041 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9042   (eval "$ac_compile") 2>conftest.er1
9043   ac_status=$?
9044   grep -v '^ *+' conftest.er1 >conftest.err
9045   rm -f conftest.er1
9046   cat conftest.err >&5
9047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9048   (exit $ac_status); } && {
9049          test -z "$ac_cxx_werror_flag" ||
9050          test ! -s conftest.err
9051        } && test -s conftest.$ac_objext; then
9052   ac_cv_type_long_long=yes
9053 else
9054   echo "$as_me: failed program was:" >&5
9055 sed 's/^/| /' conftest.$ac_ext >&5
9056
9057         ac_cv_type_long_long=no
9058 fi
9059
9060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9061 fi
9062 { echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
9063 echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
9064
9065 # The cast to long int works around a bug in the HP C Compiler
9066 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9067 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9068 # This bug is HP SR number 8606223364.
9069 { echo "$as_me:$LINENO: checking size of long long" >&5
9070 echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
9071 if test "${ac_cv_sizeof_long_long+set}" = set; then
9072   echo $ECHO_N "(cached) $ECHO_C" >&6
9073 else
9074   if test "$cross_compiling" = yes; then
9075   # Depending upon the size, compute the lo and hi bounds.
9076 cat >conftest.$ac_ext <<_ACEOF
9077 /* confdefs.h.  */
9078 _ACEOF
9079 cat confdefs.h >>conftest.$ac_ext
9080 cat >>conftest.$ac_ext <<_ACEOF
9081 /* end confdefs.h.  */
9082 $ac_includes_default
9083    typedef long long ac__type_sizeof_;
9084 int
9085 main ()
9086 {
9087 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
9088 test_array [0] = 0
9089
9090   ;
9091   return 0;
9092 }
9093 _ACEOF
9094 rm -f conftest.$ac_objext
9095 if { (ac_try="$ac_compile"
9096 case "(($ac_try" in
9097   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9098   *) ac_try_echo=$ac_try;;
9099 esac
9100 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9101   (eval "$ac_compile") 2>conftest.er1
9102   ac_status=$?
9103   grep -v '^ *+' conftest.er1 >conftest.err
9104   rm -f conftest.er1
9105   cat conftest.err >&5
9106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9107   (exit $ac_status); } && {
9108          test -z "$ac_cxx_werror_flag" ||
9109          test ! -s conftest.err
9110        } && test -s conftest.$ac_objext; then
9111   ac_lo=0 ac_mid=0
9112   while :; do
9113     cat >conftest.$ac_ext <<_ACEOF
9114 /* confdefs.h.  */
9115 _ACEOF
9116 cat confdefs.h >>conftest.$ac_ext
9117 cat >>conftest.$ac_ext <<_ACEOF
9118 /* end confdefs.h.  */
9119 $ac_includes_default
9120    typedef long long ac__type_sizeof_;
9121 int
9122 main ()
9123 {
9124 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
9125 test_array [0] = 0
9126
9127   ;
9128   return 0;
9129 }
9130 _ACEOF
9131 rm -f conftest.$ac_objext
9132 if { (ac_try="$ac_compile"
9133 case "(($ac_try" in
9134   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9135   *) ac_try_echo=$ac_try;;
9136 esac
9137 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9138   (eval "$ac_compile") 2>conftest.er1
9139   ac_status=$?
9140   grep -v '^ *+' conftest.er1 >conftest.err
9141   rm -f conftest.er1
9142   cat conftest.err >&5
9143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9144   (exit $ac_status); } && {
9145          test -z "$ac_cxx_werror_flag" ||
9146          test ! -s conftest.err
9147        } && test -s conftest.$ac_objext; then
9148   ac_hi=$ac_mid; break
9149 else
9150   echo "$as_me: failed program was:" >&5
9151 sed 's/^/| /' conftest.$ac_ext >&5
9152
9153         ac_lo=`expr $ac_mid + 1`
9154                         if test $ac_lo -le $ac_mid; then
9155                           ac_lo= ac_hi=
9156                           break
9157                         fi
9158                         ac_mid=`expr 2 '*' $ac_mid + 1`
9159 fi
9160
9161 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9162   done
9163 else
9164   echo "$as_me: failed program was:" >&5
9165 sed 's/^/| /' conftest.$ac_ext >&5
9166
9167         cat >conftest.$ac_ext <<_ACEOF
9168 /* confdefs.h.  */
9169 _ACEOF
9170 cat confdefs.h >>conftest.$ac_ext
9171 cat >>conftest.$ac_ext <<_ACEOF
9172 /* end confdefs.h.  */
9173 $ac_includes_default
9174    typedef long long ac__type_sizeof_;
9175 int
9176 main ()
9177 {
9178 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
9179 test_array [0] = 0
9180
9181   ;
9182   return 0;
9183 }
9184 _ACEOF
9185 rm -f conftest.$ac_objext
9186 if { (ac_try="$ac_compile"
9187 case "(($ac_try" in
9188   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9189   *) ac_try_echo=$ac_try;;
9190 esac
9191 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9192   (eval "$ac_compile") 2>conftest.er1
9193   ac_status=$?
9194   grep -v '^ *+' conftest.er1 >conftest.err
9195   rm -f conftest.er1
9196   cat conftest.err >&5
9197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9198   (exit $ac_status); } && {
9199          test -z "$ac_cxx_werror_flag" ||
9200          test ! -s conftest.err
9201        } && test -s conftest.$ac_objext; then
9202   ac_hi=-1 ac_mid=-1
9203   while :; do
9204     cat >conftest.$ac_ext <<_ACEOF
9205 /* confdefs.h.  */
9206 _ACEOF
9207 cat confdefs.h >>conftest.$ac_ext
9208 cat >>conftest.$ac_ext <<_ACEOF
9209 /* end confdefs.h.  */
9210 $ac_includes_default
9211    typedef long long ac__type_sizeof_;
9212 int
9213 main ()
9214 {
9215 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
9216 test_array [0] = 0
9217
9218   ;
9219   return 0;
9220 }
9221 _ACEOF
9222 rm -f conftest.$ac_objext
9223 if { (ac_try="$ac_compile"
9224 case "(($ac_try" in
9225   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9226   *) ac_try_echo=$ac_try;;
9227 esac
9228 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9229   (eval "$ac_compile") 2>conftest.er1
9230   ac_status=$?
9231   grep -v '^ *+' conftest.er1 >conftest.err
9232   rm -f conftest.er1
9233   cat conftest.err >&5
9234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9235   (exit $ac_status); } && {
9236          test -z "$ac_cxx_werror_flag" ||
9237          test ! -s conftest.err
9238        } && test -s conftest.$ac_objext; then
9239   ac_lo=$ac_mid; break
9240 else
9241   echo "$as_me: failed program was:" >&5
9242 sed 's/^/| /' conftest.$ac_ext >&5
9243
9244         ac_hi=`expr '(' $ac_mid ')' - 1`
9245                         if test $ac_mid -le $ac_hi; then
9246                           ac_lo= ac_hi=
9247                           break
9248                         fi
9249                         ac_mid=`expr 2 '*' $ac_mid`
9250 fi
9251
9252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9253   done
9254 else
9255   echo "$as_me: failed program was:" >&5
9256 sed 's/^/| /' conftest.$ac_ext >&5
9257
9258         ac_lo= ac_hi=
9259 fi
9260
9261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9262 fi
9263
9264 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9265 # Binary search between lo and hi bounds.
9266 while test "x$ac_lo" != "x$ac_hi"; do
9267   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9268   cat >conftest.$ac_ext <<_ACEOF
9269 /* confdefs.h.  */
9270 _ACEOF
9271 cat confdefs.h >>conftest.$ac_ext
9272 cat >>conftest.$ac_ext <<_ACEOF
9273 /* end confdefs.h.  */
9274 $ac_includes_default
9275    typedef long long ac__type_sizeof_;
9276 int
9277 main ()
9278 {
9279 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
9280 test_array [0] = 0
9281
9282   ;
9283   return 0;
9284 }
9285 _ACEOF
9286 rm -f conftest.$ac_objext
9287 if { (ac_try="$ac_compile"
9288 case "(($ac_try" in
9289   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9290   *) ac_try_echo=$ac_try;;
9291 esac
9292 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9293   (eval "$ac_compile") 2>conftest.er1
9294   ac_status=$?
9295   grep -v '^ *+' conftest.er1 >conftest.err
9296   rm -f conftest.er1
9297   cat conftest.err >&5
9298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9299   (exit $ac_status); } && {
9300          test -z "$ac_cxx_werror_flag" ||
9301          test ! -s conftest.err
9302        } && test -s conftest.$ac_objext; then
9303   ac_hi=$ac_mid
9304 else
9305   echo "$as_me: failed program was:" >&5
9306 sed 's/^/| /' conftest.$ac_ext >&5
9307
9308         ac_lo=`expr '(' $ac_mid ')' + 1`
9309 fi
9310
9311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9312 done
9313 case $ac_lo in
9314 ?*) ac_cv_sizeof_long_long=$ac_lo;;
9315 '') if test "$ac_cv_type_long_long" = yes; then
9316      { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
9317 See \`config.log' for more details." >&5
9318 echo "$as_me: error: cannot compute sizeof (long long)
9319 See \`config.log' for more details." >&2;}
9320    { (exit 77); exit 77; }; }
9321    else
9322      ac_cv_sizeof_long_long=0
9323    fi ;;
9324 esac
9325 else
9326   cat >conftest.$ac_ext <<_ACEOF
9327 /* confdefs.h.  */
9328 _ACEOF
9329 cat confdefs.h >>conftest.$ac_ext
9330 cat >>conftest.$ac_ext <<_ACEOF
9331 /* end confdefs.h.  */
9332 $ac_includes_default
9333    typedef long long ac__type_sizeof_;
9334 static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9335 static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
9336 #include <stdio.h>
9337 #include <stdlib.h>
9338 int
9339 main ()
9340 {
9341
9342   FILE *f = fopen ("conftest.val", "w");
9343   if (! f)
9344     return 1;
9345   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
9346     {
9347       long int i = longval ();
9348       if (i != ((long int) (sizeof (ac__type_sizeof_))))
9349         return 1;
9350       fprintf (f, "%ld\n", i);
9351     }
9352   else
9353     {
9354       unsigned long int i = ulongval ();
9355       if (i != ((long int) (sizeof (ac__type_sizeof_))))
9356         return 1;
9357       fprintf (f, "%lu\n", i);
9358     }
9359   return ferror (f) || fclose (f) != 0;
9360
9361   ;
9362   return 0;
9363 }
9364 _ACEOF
9365 rm -f conftest$ac_exeext
9366 if { (ac_try="$ac_link"
9367 case "(($ac_try" in
9368   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9369   *) ac_try_echo=$ac_try;;
9370 esac
9371 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9372   (eval "$ac_link") 2>&5
9373   ac_status=$?
9374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9375   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9376   { (case "(($ac_try" in
9377   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9378   *) ac_try_echo=$ac_try;;
9379 esac
9380 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9381   (eval "$ac_try") 2>&5
9382   ac_status=$?
9383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9384   (exit $ac_status); }; }; then
9385   ac_cv_sizeof_long_long=`cat conftest.val`
9386 else
9387   echo "$as_me: program exited with status $ac_status" >&5
9388 echo "$as_me: failed program was:" >&5
9389 sed 's/^/| /' conftest.$ac_ext >&5
9390
9391 ( exit $ac_status )
9392 if test "$ac_cv_type_long_long" = yes; then
9393      { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
9394 See \`config.log' for more details." >&5
9395 echo "$as_me: error: cannot compute sizeof (long long)
9396 See \`config.log' for more details." >&2;}
9397    { (exit 77); exit 77; }; }
9398    else
9399      ac_cv_sizeof_long_long=0
9400    fi
9401 fi
9402 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9403 fi
9404 rm -f conftest.val
9405 fi
9406 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
9407 echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
9408
9409
9410
9411 cat >>confdefs.h <<_ACEOF
9412 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
9413 _ACEOF
9414
9415
9416 { echo "$as_me:$LINENO: checking for int *" >&5
9417 echo $ECHO_N "checking for int *... $ECHO_C" >&6; }
9418 if test "${ac_cv_type_int_p+set}" = set; then
9419   echo $ECHO_N "(cached) $ECHO_C" >&6
9420 else
9421   cat >conftest.$ac_ext <<_ACEOF
9422 /* confdefs.h.  */
9423 _ACEOF
9424 cat confdefs.h >>conftest.$ac_ext
9425 cat >>conftest.$ac_ext <<_ACEOF
9426 /* end confdefs.h.  */
9427 $ac_includes_default
9428 typedef int * ac__type_new_;
9429 int
9430 main ()
9431 {
9432 if ((ac__type_new_ *) 0)
9433   return 0;
9434 if (sizeof (ac__type_new_))
9435   return 0;
9436   ;
9437   return 0;
9438 }
9439 _ACEOF
9440 rm -f conftest.$ac_objext
9441 if { (ac_try="$ac_compile"
9442 case "(($ac_try" in
9443   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9444   *) ac_try_echo=$ac_try;;
9445 esac
9446 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9447   (eval "$ac_compile") 2>conftest.er1
9448   ac_status=$?
9449   grep -v '^ *+' conftest.er1 >conftest.err
9450   rm -f conftest.er1
9451   cat conftest.err >&5
9452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9453   (exit $ac_status); } && {
9454          test -z "$ac_cxx_werror_flag" ||
9455          test ! -s conftest.err
9456        } && test -s conftest.$ac_objext; then
9457   ac_cv_type_int_p=yes
9458 else
9459   echo "$as_me: failed program was:" >&5
9460 sed 's/^/| /' conftest.$ac_ext >&5
9461
9462         ac_cv_type_int_p=no
9463 fi
9464
9465 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9466 fi
9467 { echo "$as_me:$LINENO: result: $ac_cv_type_int_p" >&5
9468 echo "${ECHO_T}$ac_cv_type_int_p" >&6; }
9469
9470 # The cast to long int works around a bug in the HP C Compiler
9471 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9472 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9473 # This bug is HP SR number 8606223364.
9474 { echo "$as_me:$LINENO: checking size of int *" >&5
9475 echo $ECHO_N "checking size of int *... $ECHO_C" >&6; }
9476 if test "${ac_cv_sizeof_int_p+set}" = set; then
9477   echo $ECHO_N "(cached) $ECHO_C" >&6
9478 else
9479   if test "$cross_compiling" = yes; then
9480   # Depending upon the size, compute the lo and hi bounds.
9481 cat >conftest.$ac_ext <<_ACEOF
9482 /* confdefs.h.  */
9483 _ACEOF
9484 cat confdefs.h >>conftest.$ac_ext
9485 cat >>conftest.$ac_ext <<_ACEOF
9486 /* end confdefs.h.  */
9487 $ac_includes_default
9488    typedef int * ac__type_sizeof_;
9489 int
9490 main ()
9491 {
9492 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
9493 test_array [0] = 0
9494
9495   ;
9496   return 0;
9497 }
9498 _ACEOF
9499 rm -f conftest.$ac_objext
9500 if { (ac_try="$ac_compile"
9501 case "(($ac_try" in
9502   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9503   *) ac_try_echo=$ac_try;;
9504 esac
9505 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9506   (eval "$ac_compile") 2>conftest.er1
9507   ac_status=$?
9508   grep -v '^ *+' conftest.er1 >conftest.err
9509   rm -f conftest.er1
9510   cat conftest.err >&5
9511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9512   (exit $ac_status); } && {
9513          test -z "$ac_cxx_werror_flag" ||
9514          test ! -s conftest.err
9515        } && test -s conftest.$ac_objext; then
9516   ac_lo=0 ac_mid=0
9517   while :; do
9518     cat >conftest.$ac_ext <<_ACEOF
9519 /* confdefs.h.  */
9520 _ACEOF
9521 cat confdefs.h >>conftest.$ac_ext
9522 cat >>conftest.$ac_ext <<_ACEOF
9523 /* end confdefs.h.  */
9524 $ac_includes_default
9525    typedef int * ac__type_sizeof_;
9526 int
9527 main ()
9528 {
9529 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
9530 test_array [0] = 0
9531
9532   ;
9533   return 0;
9534 }
9535 _ACEOF
9536 rm -f conftest.$ac_objext
9537 if { (ac_try="$ac_compile"
9538 case "(($ac_try" in
9539   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9540   *) ac_try_echo=$ac_try;;
9541 esac
9542 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9543   (eval "$ac_compile") 2>conftest.er1
9544   ac_status=$?
9545   grep -v '^ *+' conftest.er1 >conftest.err
9546   rm -f conftest.er1
9547   cat conftest.err >&5
9548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9549   (exit $ac_status); } && {
9550          test -z "$ac_cxx_werror_flag" ||
9551          test ! -s conftest.err
9552        } && test -s conftest.$ac_objext; then
9553   ac_hi=$ac_mid; break
9554 else
9555   echo "$as_me: failed program was:" >&5
9556 sed 's/^/| /' conftest.$ac_ext >&5
9557
9558         ac_lo=`expr $ac_mid + 1`
9559                         if test $ac_lo -le $ac_mid; then
9560                           ac_lo= ac_hi=
9561                           break
9562                         fi
9563                         ac_mid=`expr 2 '*' $ac_mid + 1`
9564 fi
9565
9566 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9567   done
9568 else
9569   echo "$as_me: failed program was:" >&5
9570 sed 's/^/| /' conftest.$ac_ext >&5
9571
9572         cat >conftest.$ac_ext <<_ACEOF
9573 /* confdefs.h.  */
9574 _ACEOF
9575 cat confdefs.h >>conftest.$ac_ext
9576 cat >>conftest.$ac_ext <<_ACEOF
9577 /* end confdefs.h.  */
9578 $ac_includes_default
9579    typedef int * ac__type_sizeof_;
9580 int
9581 main ()
9582 {
9583 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
9584 test_array [0] = 0
9585
9586   ;
9587   return 0;
9588 }
9589 _ACEOF
9590 rm -f conftest.$ac_objext
9591 if { (ac_try="$ac_compile"
9592 case "(($ac_try" in
9593   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9594   *) ac_try_echo=$ac_try;;
9595 esac
9596 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9597   (eval "$ac_compile") 2>conftest.er1
9598   ac_status=$?
9599   grep -v '^ *+' conftest.er1 >conftest.err
9600   rm -f conftest.er1
9601   cat conftest.err >&5
9602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9603   (exit $ac_status); } && {
9604          test -z "$ac_cxx_werror_flag" ||
9605          test ! -s conftest.err
9606        } && test -s conftest.$ac_objext; then
9607   ac_hi=-1 ac_mid=-1
9608   while :; do
9609     cat >conftest.$ac_ext <<_ACEOF
9610 /* confdefs.h.  */
9611 _ACEOF
9612 cat confdefs.h >>conftest.$ac_ext
9613 cat >>conftest.$ac_ext <<_ACEOF
9614 /* end confdefs.h.  */
9615 $ac_includes_default
9616    typedef int * ac__type_sizeof_;
9617 int
9618 main ()
9619 {
9620 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
9621 test_array [0] = 0
9622
9623   ;
9624   return 0;
9625 }
9626 _ACEOF
9627 rm -f conftest.$ac_objext
9628 if { (ac_try="$ac_compile"
9629 case "(($ac_try" in
9630   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9631   *) ac_try_echo=$ac_try;;
9632 esac
9633 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9634   (eval "$ac_compile") 2>conftest.er1
9635   ac_status=$?
9636   grep -v '^ *+' conftest.er1 >conftest.err
9637   rm -f conftest.er1
9638   cat conftest.err >&5
9639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9640   (exit $ac_status); } && {
9641          test -z "$ac_cxx_werror_flag" ||
9642          test ! -s conftest.err
9643        } && test -s conftest.$ac_objext; then
9644   ac_lo=$ac_mid; break
9645 else
9646   echo "$as_me: failed program was:" >&5
9647 sed 's/^/| /' conftest.$ac_ext >&5
9648
9649         ac_hi=`expr '(' $ac_mid ')' - 1`
9650                         if test $ac_mid -le $ac_hi; then
9651                           ac_lo= ac_hi=
9652                           break
9653                         fi
9654                         ac_mid=`expr 2 '*' $ac_mid`
9655 fi
9656
9657 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9658   done
9659 else
9660   echo "$as_me: failed program was:" >&5
9661 sed 's/^/| /' conftest.$ac_ext >&5
9662
9663         ac_lo= ac_hi=
9664 fi
9665
9666 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9667 fi
9668
9669 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9670 # Binary search between lo and hi bounds.
9671 while test "x$ac_lo" != "x$ac_hi"; do
9672   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9673   cat >conftest.$ac_ext <<_ACEOF
9674 /* confdefs.h.  */
9675 _ACEOF
9676 cat confdefs.h >>conftest.$ac_ext
9677 cat >>conftest.$ac_ext <<_ACEOF
9678 /* end confdefs.h.  */
9679 $ac_includes_default
9680    typedef int * ac__type_sizeof_;
9681 int
9682 main ()
9683 {
9684 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
9685 test_array [0] = 0
9686
9687   ;
9688   return 0;
9689 }
9690 _ACEOF
9691 rm -f conftest.$ac_objext
9692 if { (ac_try="$ac_compile"
9693 case "(($ac_try" in
9694   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9695   *) ac_try_echo=$ac_try;;
9696 esac
9697 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9698   (eval "$ac_compile") 2>conftest.er1
9699   ac_status=$?
9700   grep -v '^ *+' conftest.er1 >conftest.err
9701   rm -f conftest.er1
9702   cat conftest.err >&5
9703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9704   (exit $ac_status); } && {
9705          test -z "$ac_cxx_werror_flag" ||
9706          test ! -s conftest.err
9707        } && test -s conftest.$ac_objext; then
9708   ac_hi=$ac_mid
9709 else
9710   echo "$as_me: failed program was:" >&5
9711 sed 's/^/| /' conftest.$ac_ext >&5
9712
9713         ac_lo=`expr '(' $ac_mid ')' + 1`
9714 fi
9715
9716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9717 done
9718 case $ac_lo in
9719 ?*) ac_cv_sizeof_int_p=$ac_lo;;
9720 '') if test "$ac_cv_type_int_p" = yes; then
9721      { { echo "$as_me:$LINENO: error: cannot compute sizeof (int *)
9722 See \`config.log' for more details." >&5
9723 echo "$as_me: error: cannot compute sizeof (int *)
9724 See \`config.log' for more details." >&2;}
9725    { (exit 77); exit 77; }; }
9726    else
9727      ac_cv_sizeof_int_p=0
9728    fi ;;
9729 esac
9730 else
9731   cat >conftest.$ac_ext <<_ACEOF
9732 /* confdefs.h.  */
9733 _ACEOF
9734 cat confdefs.h >>conftest.$ac_ext
9735 cat >>conftest.$ac_ext <<_ACEOF
9736 /* end confdefs.h.  */
9737 $ac_includes_default
9738    typedef int * ac__type_sizeof_;
9739 static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9740 static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
9741 #include <stdio.h>
9742 #include <stdlib.h>
9743 int
9744 main ()
9745 {
9746
9747   FILE *f = fopen ("conftest.val", "w");
9748   if (! f)
9749     return 1;
9750   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
9751     {
9752       long int i = longval ();
9753       if (i != ((long int) (sizeof (ac__type_sizeof_))))
9754         return 1;
9755       fprintf (f, "%ld\n", i);
9756     }
9757   else
9758     {
9759       unsigned long int i = ulongval ();
9760       if (i != ((long int) (sizeof (ac__type_sizeof_))))
9761         return 1;
9762       fprintf (f, "%lu\n", i);
9763     }
9764   return ferror (f) || fclose (f) != 0;
9765
9766   ;
9767   return 0;
9768 }
9769 _ACEOF
9770 rm -f conftest$ac_exeext
9771 if { (ac_try="$ac_link"
9772 case "(($ac_try" in
9773   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9774   *) ac_try_echo=$ac_try;;
9775 esac
9776 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9777   (eval "$ac_link") 2>&5
9778   ac_status=$?
9779   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9780   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9781   { (case "(($ac_try" in
9782   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9783   *) ac_try_echo=$ac_try;;
9784 esac
9785 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9786   (eval "$ac_try") 2>&5
9787   ac_status=$?
9788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9789   (exit $ac_status); }; }; then
9790   ac_cv_sizeof_int_p=`cat conftest.val`
9791 else
9792   echo "$as_me: program exited with status $ac_status" >&5
9793 echo "$as_me: failed program was:" >&5
9794 sed 's/^/| /' conftest.$ac_ext >&5
9795
9796 ( exit $ac_status )
9797 if test "$ac_cv_type_int_p" = yes; then
9798      { { echo "$as_me:$LINENO: error: cannot compute sizeof (int *)
9799 See \`config.log' for more details." >&5
9800 echo "$as_me: error: cannot compute sizeof (int *)
9801 See \`config.log' for more details." >&2;}
9802    { (exit 77); exit 77; }; }
9803    else
9804      ac_cv_sizeof_int_p=0
9805    fi
9806 fi
9807 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9808 fi
9809 rm -f conftest.val
9810 fi
9811 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_int_p" >&5
9812 echo "${ECHO_T}$ac_cv_sizeof_int_p" >&6; }
9813
9814
9815
9816 cat >>confdefs.h <<_ACEOF
9817 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
9818 _ACEOF
9819
9820
9821
9822
9823 { echo "$as_me:$LINENO: checking for int16_t" >&5
9824 echo $ECHO_N "checking for int16_t... $ECHO_C" >&6; }
9825 if test "${rxvt_cv_int16_t+set}" = set; then
9826   echo $ECHO_N "(cached) $ECHO_C" >&6
9827 else
9828   cat >conftest.$ac_ext <<_ACEOF
9829 /* confdefs.h.  */
9830 _ACEOF
9831 cat confdefs.h >>conftest.$ac_ext
9832 cat >>conftest.$ac_ext <<_ACEOF
9833 /* end confdefs.h.  */
9834 #include <stdint.h>
9835 int
9836 main ()
9837 {
9838 int16_t dummy;
9839   ;
9840   return 0;
9841 }
9842 _ACEOF
9843 rm -f conftest.$ac_objext
9844 if { (ac_try="$ac_compile"
9845 case "(($ac_try" in
9846   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9847   *) ac_try_echo=$ac_try;;
9848 esac
9849 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9850   (eval "$ac_compile") 2>conftest.er1
9851   ac_status=$?
9852   grep -v '^ *+' conftest.er1 >conftest.err
9853   rm -f conftest.er1
9854   cat conftest.err >&5
9855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9856   (exit $ac_status); } && {
9857          test -z "$ac_cxx_werror_flag" ||
9858          test ! -s conftest.err
9859        } && test -s conftest.$ac_objext; then
9860   rxvt_cv_int16_t=yes
9861 else
9862   echo "$as_me: failed program was:" >&5
9863 sed 's/^/| /' conftest.$ac_ext >&5
9864
9865         if test "$ac_cv_sizeof_char" -ge 2; then
9866   rxvt_cv_int16_t=" char"
9867 else
9868   if test "$ac_cv_sizeof_short" -ge 2; then
9869     rxvt_cv_int16_t=" short"
9870   else
9871     if test "$ac_cv_sizeof_int" -ge 2; then
9872       rxvt_cv_int16_t=" int"
9873     else
9874       if test "$ac_cv_sizeof_long" -ge 2; then
9875         rxvt_cv_int16_t=" long"
9876       else
9877         if test "$ac_cv_sizeof_long_long" -ge 2; then
9878           rxvt_cv_int16_t=" long long"
9879         else
9880           rxvt_cv_int16_t=" short" # we _must_ have a (possibly wrong) default
9881         fi
9882       fi
9883     fi
9884   fi
9885 fi
9886 fi
9887
9888 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9889 fi
9890 { echo "$as_me:$LINENO: result: $rxvt_cv_int16_t" >&5
9891 echo "${ECHO_T}$rxvt_cv_int16_t" >&6; }
9892 if test x"$rxvt_cv_int16_t" != xyes; then
9893   rxvt_int16_typedef="typedef $rxvt_cv_int16_t int16_t;"
9894 else
9895   if test x"" = x; then
9896     rxvt_int16_typedef="/* typedef short int16_t; */"
9897   else
9898     rxvt_int16_typedef="/* typedef  short int16_t; */"
9899   fi
9900 fi
9901
9902 { echo "$as_me:$LINENO: checking for uint16_t" >&5
9903 echo $ECHO_N "checking for uint16_t... $ECHO_C" >&6; }
9904 if test "${rxvt_cv_uint16_t+set}" = set; then
9905   echo $ECHO_N "(cached) $ECHO_C" >&6
9906 else
9907   cat >conftest.$ac_ext <<_ACEOF
9908 /* confdefs.h.  */
9909 _ACEOF
9910 cat confdefs.h >>conftest.$ac_ext
9911 cat >>conftest.$ac_ext <<_ACEOF
9912 /* end confdefs.h.  */
9913 #include <stdint.h>
9914 int
9915 main ()
9916 {
9917 uint16_t dummy;
9918   ;
9919   return 0;
9920 }
9921 _ACEOF
9922 rm -f conftest.$ac_objext
9923 if { (ac_try="$ac_compile"
9924 case "(($ac_try" in
9925   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9926   *) ac_try_echo=$ac_try;;
9927 esac
9928 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9929   (eval "$ac_compile") 2>conftest.er1
9930   ac_status=$?
9931   grep -v '^ *+' conftest.er1 >conftest.err
9932   rm -f conftest.er1
9933   cat conftest.err >&5
9934   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9935   (exit $ac_status); } && {
9936          test -z "$ac_cxx_werror_flag" ||
9937          test ! -s conftest.err
9938        } && test -s conftest.$ac_objext; then
9939   rxvt_cv_uint16_t=yes
9940 else
9941   echo "$as_me: failed program was:" >&5
9942 sed 's/^/| /' conftest.$ac_ext >&5
9943
9944         if test "$ac_cv_sizeof_char" -ge 2; then
9945   rxvt_cv_uint16_t="unsigned char"
9946 else
9947   if test "$ac_cv_sizeof_short" -ge 2; then
9948     rxvt_cv_uint16_t="unsigned short"
9949   else
9950     if test "$ac_cv_sizeof_int" -ge 2; then
9951       rxvt_cv_uint16_t="unsigned int"
9952     else
9953       if test "$ac_cv_sizeof_long" -ge 2; then
9954         rxvt_cv_uint16_t="unsigned long"
9955       else
9956         if test "$ac_cv_sizeof_long_long" -ge 2; then
9957           rxvt_cv_uint16_t="unsigned long long"
9958         else
9959           rxvt_cv_uint16_t="unsigned short" # we _must_ have a (possibly wrong) default
9960         fi
9961       fi
9962     fi
9963   fi
9964 fi
9965 fi
9966
9967 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9968 fi
9969 { echo "$as_me:$LINENO: result: $rxvt_cv_uint16_t" >&5
9970 echo "${ECHO_T}$rxvt_cv_uint16_t" >&6; }
9971 if test x"$rxvt_cv_uint16_t" != xyes; then
9972   rxvt_uint16_typedef="typedef $rxvt_cv_uint16_t uint16_t;"
9973 else
9974   if test x"unsigned" = x; then
9975     rxvt_uint16_typedef="/* typedef short uint16_t; */"
9976   else
9977     rxvt_uint16_typedef="/* typedef unsigned short uint16_t; */"
9978   fi
9979 fi
9980
9981 { echo "$as_me:$LINENO: checking for int32_t" >&5
9982 echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
9983 if test "${rxvt_cv_int32_t+set}" = set; then
9984   echo $ECHO_N "(cached) $ECHO_C" >&6
9985 else
9986   cat >conftest.$ac_ext <<_ACEOF
9987 /* confdefs.h.  */
9988 _ACEOF
9989 cat confdefs.h >>conftest.$ac_ext
9990 cat >>conftest.$ac_ext <<_ACEOF
9991 /* end confdefs.h.  */
9992 #include <stdint.h>
9993 int
9994 main ()
9995 {
9996 int32_t dummy;
9997   ;
9998   return 0;
9999 }
10000 _ACEOF
10001 rm -f conftest.$ac_objext
10002 if { (ac_try="$ac_compile"
10003 case "(($ac_try" in
10004   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10005   *) ac_try_echo=$ac_try;;
10006 esac
10007 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10008   (eval "$ac_compile") 2>conftest.er1
10009   ac_status=$?
10010   grep -v '^ *+' conftest.er1 >conftest.err
10011   rm -f conftest.er1
10012   cat conftest.err >&5
10013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10014   (exit $ac_status); } && {
10015          test -z "$ac_cxx_werror_flag" ||
10016          test ! -s conftest.err
10017        } && test -s conftest.$ac_objext; then
10018   rxvt_cv_int32_t=yes
10019 else
10020   echo "$as_me: failed program was:" >&5
10021 sed 's/^/| /' conftest.$ac_ext >&5
10022
10023         if test "$ac_cv_sizeof_char" -ge 4; then
10024   rxvt_cv_int32_t=" char"
10025 else
10026   if test "$ac_cv_sizeof_short" -ge 4; then
10027     rxvt_cv_int32_t=" short"
10028   else
10029     if test "$ac_cv_sizeof_int" -ge 4; then
10030       rxvt_cv_int32_t=" int"
10031     else
10032       if test "$ac_cv_sizeof_long" -ge 4; then
10033         rxvt_cv_int32_t=" long"
10034       else
10035         if test "$ac_cv_sizeof_long_long" -ge 4; then
10036           rxvt_cv_int32_t=" long long"
10037         else
10038           rxvt_cv_int32_t=" int" # we _must_ have a (possibly wrong) default
10039         fi
10040       fi
10041     fi
10042   fi
10043 fi
10044 fi
10045
10046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10047 fi
10048 { echo "$as_me:$LINENO: result: $rxvt_cv_int32_t" >&5
10049 echo "${ECHO_T}$rxvt_cv_int32_t" >&6; }
10050 if test x"$rxvt_cv_int32_t" != xyes; then
10051   rxvt_int32_typedef="typedef $rxvt_cv_int32_t int32_t;"
10052 else
10053   if test x"" = x; then
10054     rxvt_int32_typedef="/* typedef int int32_t; */"
10055   else
10056     rxvt_int32_typedef="/* typedef  int int32_t; */"
10057   fi
10058 fi
10059
10060 { echo "$as_me:$LINENO: checking for uint32_t" >&5
10061 echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
10062 if test "${rxvt_cv_uint32_t+set}" = set; then
10063   echo $ECHO_N "(cached) $ECHO_C" >&6
10064 else
10065   cat >conftest.$ac_ext <<_ACEOF
10066 /* confdefs.h.  */
10067 _ACEOF
10068 cat confdefs.h >>conftest.$ac_ext
10069 cat >>conftest.$ac_ext <<_ACEOF
10070 /* end confdefs.h.  */
10071 #include <stdint.h>
10072 int
10073 main ()
10074 {
10075 uint32_t dummy;
10076   ;
10077   return 0;
10078 }
10079 _ACEOF
10080 rm -f conftest.$ac_objext
10081 if { (ac_try="$ac_compile"
10082 case "(($ac_try" in
10083   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10084   *) ac_try_echo=$ac_try;;
10085 esac
10086 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10087   (eval "$ac_compile") 2>conftest.er1
10088   ac_status=$?
10089   grep -v '^ *+' conftest.er1 >conftest.err
10090   rm -f conftest.er1
10091   cat conftest.err >&5
10092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10093   (exit $ac_status); } && {
10094          test -z "$ac_cxx_werror_flag" ||
10095          test ! -s conftest.err
10096        } && test -s conftest.$ac_objext; then
10097   rxvt_cv_uint32_t=yes
10098 else
10099   echo "$as_me: failed program was:" >&5
10100 sed 's/^/| /' conftest.$ac_ext >&5
10101
10102         if test "$ac_cv_sizeof_char" -ge 4; then
10103   rxvt_cv_uint32_t="unsigned char"
10104 else
10105   if test "$ac_cv_sizeof_short" -ge 4; then
10106     rxvt_cv_uint32_t="unsigned short"
10107   else
10108     if test "$ac_cv_sizeof_int" -ge 4; then
10109       rxvt_cv_uint32_t="unsigned int"
10110     else
10111       if test "$ac_cv_sizeof_long" -ge 4; then
10112         rxvt_cv_uint32_t="unsigned long"
10113       else
10114         if test "$ac_cv_sizeof_long_long" -ge 4; then
10115           rxvt_cv_uint32_t="unsigned long long"
10116         else
10117           rxvt_cv_uint32_t="unsigned int" # we _must_ have a (possibly wrong) default
10118         fi
10119       fi
10120     fi
10121   fi
10122 fi
10123 fi
10124
10125 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10126 fi
10127 { echo "$as_me:$LINENO: result: $rxvt_cv_uint32_t" >&5
10128 echo "${ECHO_T}$rxvt_cv_uint32_t" >&6; }
10129 if test x"$rxvt_cv_uint32_t" != xyes; then
10130   rxvt_uint32_typedef="typedef $rxvt_cv_uint32_t uint32_t;"
10131 else
10132   if test x"unsigned" = x; then
10133     rxvt_uint32_typedef="/* typedef int uint32_t; */"
10134   else
10135     rxvt_uint32_typedef="/* typedef unsigned int uint32_t; */"
10136   fi
10137 fi
10138
10139 if test "$ac_cv_sizeof_int_p" -eq 8; then
10140   rxvt_intp_define="#define intp_t int64_t"
10141   rxvt_u_intp_define="#define u_intp_t u_int64_t"
10142 else
10143   if test "$ac_cv_sizeof_int_p" -eq 4; then
10144     rxvt_intp_define="#define intp_t int32_t"
10145     rxvt_u_intp_define="#define u_intp_t u_int32_t"
10146   else
10147     if test "$ac_cv_sizeof_int_p" -eq 2; then
10148       rxvt_intp_define="#define intp_t int16_t"
10149       rxvt_u_intp_define="#define u_intp_t u_int16_t"
10150     else
10151       rxvt_intp_define="#error set intp_t"
10152       rxvt_u_intp_define="#error set u_intp_t"
10153     fi
10154   fi
10155 fi
10156
10157
10158
10159 { echo "$as_me:$LINENO: checking return type of signal handlers" >&5
10160 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
10161 if test "${ac_cv_type_signal+set}" = set; then
10162   echo $ECHO_N "(cached) $ECHO_C" >&6
10163 else
10164   cat >conftest.$ac_ext <<_ACEOF
10165 /* confdefs.h.  */
10166 _ACEOF
10167 cat confdefs.h >>conftest.$ac_ext
10168 cat >>conftest.$ac_ext <<_ACEOF
10169 /* end confdefs.h.  */
10170 #include <sys/types.h>
10171 #include <signal.h>
10172
10173 int
10174 main ()
10175 {
10176 return *(signal (0, 0)) (0) == 1;
10177   ;
10178   return 0;
10179 }
10180 _ACEOF
10181 rm -f conftest.$ac_objext
10182 if { (ac_try="$ac_compile"
10183 case "(($ac_try" in
10184   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10185   *) ac_try_echo=$ac_try;;
10186 esac
10187 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10188   (eval "$ac_compile") 2>conftest.er1
10189   ac_status=$?
10190   grep -v '^ *+' conftest.er1 >conftest.err
10191   rm -f conftest.er1
10192   cat conftest.err >&5
10193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10194   (exit $ac_status); } && {
10195          test -z "$ac_cxx_werror_flag" ||
10196          test ! -s conftest.err
10197        } && test -s conftest.$ac_objext; then
10198   ac_cv_type_signal=int
10199 else
10200   echo "$as_me: failed program was:" >&5
10201 sed 's/^/| /' conftest.$ac_ext >&5
10202
10203         ac_cv_type_signal=void
10204 fi
10205
10206 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10207 fi
10208 { echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
10209 echo "${ECHO_T}$ac_cv_type_signal" >&6; }
10210
10211 cat >>confdefs.h <<_ACEOF
10212 #define RETSIGTYPE $ac_cv_type_signal
10213 _ACEOF
10214
10215
10216
10217
10218 for ac_func in unsetenv
10219 do
10220 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10221 { echo "$as_me:$LINENO: checking for $ac_func" >&5
10222 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10223 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
10224   echo $ECHO_N "(cached) $ECHO_C" >&6
10225 else
10226   cat >conftest.$ac_ext <<_ACEOF
10227 /* confdefs.h.  */
10228 _ACEOF
10229 cat confdefs.h >>conftest.$ac_ext
10230 cat >>conftest.$ac_ext <<_ACEOF
10231 /* end confdefs.h.  */
10232 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10233    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10234 #define $ac_func innocuous_$ac_func
10235
10236 /* System header to define __stub macros and hopefully few prototypes,
10237     which can conflict with char $ac_func (); below.
10238     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10239     <limits.h> exists even on freestanding compilers.  */
10240
10241 #ifdef __STDC__
10242 # include <limits.h>
10243 #else
10244 # include <assert.h>
10245 #endif
10246
10247 #undef $ac_func
10248
10249 /* Override any GCC internal prototype to avoid an error.
10250    Use char because int might match the return type of a GCC
10251    builtin and then its argument prototype would still apply.  */
10252 #ifdef __cplusplus
10253 extern "C"
10254 #endif
10255 char $ac_func ();
10256 /* The GNU C library defines this for functions which it implements
10257     to always fail with ENOSYS.  Some functions are actually named
10258     something starting with __ and the normal name is an alias.  */
10259 #if defined __stub_$ac_func || defined __stub___$ac_func
10260 choke me
10261 #endif
10262
10263 int
10264 main ()
10265 {
10266 return $ac_func ();
10267   ;
10268   return 0;
10269 }
10270 _ACEOF
10271 rm -f conftest.$ac_objext conftest$ac_exeext
10272 if { (ac_try="$ac_link"
10273 case "(($ac_try" in
10274   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10275   *) ac_try_echo=$ac_try;;
10276 esac
10277 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10278   (eval "$ac_link") 2>conftest.er1
10279   ac_status=$?
10280   grep -v '^ *+' conftest.er1 >conftest.err
10281   rm -f conftest.er1
10282   cat conftest.err >&5
10283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10284   (exit $ac_status); } && {
10285          test -z "$ac_cxx_werror_flag" ||
10286          test ! -s conftest.err
10287        } && test -s conftest$ac_exeext &&
10288        $as_test_x conftest$ac_exeext; then
10289   eval "$as_ac_var=yes"
10290 else
10291   echo "$as_me: failed program was:" >&5
10292 sed 's/^/| /' conftest.$ac_ext >&5
10293
10294         eval "$as_ac_var=no"
10295 fi
10296
10297 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10298       conftest$ac_exeext conftest.$ac_ext
10299 fi
10300 ac_res=`eval echo '${'$as_ac_var'}'`
10301                { echo "$as_me:$LINENO: result: $ac_res" >&5
10302 echo "${ECHO_T}$ac_res" >&6; }
10303 if test `eval echo '${'$as_ac_var'}'` = yes; then
10304   cat >>confdefs.h <<_ACEOF
10305 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10306 _ACEOF
10307
10308 fi
10309 done
10310
10311
10312
10313 support_utmp=yes
10314 support_wtmp=yes
10315 support_lastlog=yes
10316
10317 # Check whether --enable-utmp was given.
10318 if test "${enable_utmp+set}" = set; then
10319   enableval=$enable_utmp; if test x$enableval = xyes -o x$enableval = xno; then
10320     support_utmp=$enableval
10321   fi
10322 fi
10323
10324
10325 # Check whether --enable-wtmp was given.
10326 if test "${enable_wtmp+set}" = set; then
10327   enableval=$enable_wtmp; if test x$enableval = xyes -o x$enableval = xno; then
10328     support_wtmp=$enableval
10329   fi
10330 fi
10331
10332
10333 # Check whether --enable-lastlog was given.
10334 if test "${enable_lastlog+set}" = set; then
10335   enableval=$enable_lastlog; if test x$enableval = xyes -o x$enableval = xno; then
10336     support_lastlog=$enableval
10337   fi
10338 fi
10339
10340
10341 if test x$support_utmp = xyes; then
10342
10343 cat >>confdefs.h <<\_ACEOF
10344 #define UTMP_SUPPORT 1
10345 _ACEOF
10346
10347 fi
10348 if test x$support_wtmp = xyes; then
10349
10350 cat >>confdefs.h <<\_ACEOF
10351 #define WTMP_SUPPORT 1
10352 _ACEOF
10353
10354 fi
10355 if test x$support_lastlog = xyes; then
10356
10357 cat >>confdefs.h <<\_ACEOF
10358 #define LASTLOG_SUPPORT 1
10359 _ACEOF
10360
10361 fi
10362
10363
10364
10365
10366 for ac_func in \
10367         updwtmp \
10368         updwtmpx \
10369         updlastlogx \
10370
10371 do
10372 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10373 { echo "$as_me:$LINENO: checking for $ac_func" >&5
10374 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10375 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
10376   echo $ECHO_N "(cached) $ECHO_C" >&6
10377 else
10378   cat >conftest.$ac_ext <<_ACEOF
10379 /* confdefs.h.  */
10380 _ACEOF
10381 cat confdefs.h >>conftest.$ac_ext
10382 cat >>conftest.$ac_ext <<_ACEOF
10383 /* end confdefs.h.  */
10384 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10385    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10386 #define $ac_func innocuous_$ac_func
10387
10388 /* System header to define __stub macros and hopefully few prototypes,
10389     which can conflict with char $ac_func (); below.
10390     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10391     <limits.h> exists even on freestanding compilers.  */
10392
10393 #ifdef __STDC__
10394 # include <limits.h>
10395 #else
10396 # include <assert.h>
10397 #endif
10398
10399 #undef $ac_func
10400
10401 /* Override any GCC internal prototype to avoid an error.
10402    Use char because int might match the return type of a GCC
10403    builtin and then its argument prototype would still apply.  */
10404 #ifdef __cplusplus
10405 extern "C"
10406 #endif
10407 char $ac_func ();
10408 /* The GNU C library defines this for functions which it implements
10409     to always fail with ENOSYS.  Some functions are actually named
10410     something starting with __ and the normal name is an alias.  */
10411 #if defined __stub_$ac_func || defined __stub___$ac_func
10412 choke me
10413 #endif
10414
10415 int
10416 main ()
10417 {
10418 return $ac_func ();
10419   ;
10420   return 0;
10421 }
10422 _ACEOF
10423 rm -f conftest.$ac_objext conftest$ac_exeext
10424 if { (ac_try="$ac_link"
10425 case "(($ac_try" in
10426   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10427   *) ac_try_echo=$ac_try;;
10428 esac
10429 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10430   (eval "$ac_link") 2>conftest.er1
10431   ac_status=$?
10432   grep -v '^ *+' conftest.er1 >conftest.err
10433   rm -f conftest.er1
10434   cat conftest.err >&5
10435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10436   (exit $ac_status); } && {
10437          test -z "$ac_cxx_werror_flag" ||
10438          test ! -s conftest.err
10439        } && test -s conftest$ac_exeext &&
10440        $as_test_x conftest$ac_exeext; then
10441   eval "$as_ac_var=yes"
10442 else
10443   echo "$as_me: failed program was:" >&5
10444 sed 's/^/| /' conftest.$ac_ext >&5
10445
10446         eval "$as_ac_var=no"
10447 fi
10448
10449 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10450       conftest$ac_exeext conftest.$ac_ext
10451 fi
10452 ac_res=`eval echo '${'$as_ac_var'}'`
10453                { echo "$as_me:$LINENO: result: $ac_res" >&5
10454 echo "${ECHO_T}$ac_res" >&6; }
10455 if test `eval echo '${'$as_ac_var'}'` = yes; then
10456   cat >>confdefs.h <<_ACEOF
10457 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10458 _ACEOF
10459
10460 fi
10461 done
10462
10463
10464
10465
10466
10467 for ac_header in \
10468         utmp.h \
10469         utmpx.h \
10470         lastlog.h \
10471
10472 do
10473 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10474 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10475   { echo "$as_me:$LINENO: checking for $ac_header" >&5
10476 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10477 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10478   echo $ECHO_N "(cached) $ECHO_C" >&6
10479 fi
10480 ac_res=`eval echo '${'$as_ac_Header'}'`
10481                { echo "$as_me:$LINENO: result: $ac_res" >&5
10482 echo "${ECHO_T}$ac_res" >&6; }
10483 else
10484   # Is the header compilable?
10485 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
10486 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
10487 cat >conftest.$ac_ext <<_ACEOF
10488 /* confdefs.h.  */
10489 _ACEOF
10490 cat confdefs.h >>conftest.$ac_ext
10491 cat >>conftest.$ac_ext <<_ACEOF
10492 /* end confdefs.h.  */
10493 $ac_includes_default
10494 #include <$ac_header>
10495 _ACEOF
10496 rm -f conftest.$ac_objext
10497 if { (ac_try="$ac_compile"
10498 case "(($ac_try" in
10499   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10500   *) ac_try_echo=$ac_try;;
10501 esac
10502 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10503   (eval "$ac_compile") 2>conftest.er1
10504   ac_status=$?
10505   grep -v '^ *+' conftest.er1 >conftest.err
10506   rm -f conftest.er1
10507   cat conftest.err >&5
10508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10509   (exit $ac_status); } && {
10510          test -z "$ac_cxx_werror_flag" ||
10511          test ! -s conftest.err
10512        } && test -s conftest.$ac_objext; then
10513   ac_header_compiler=yes
10514 else
10515   echo "$as_me: failed program was:" >&5
10516 sed 's/^/| /' conftest.$ac_ext >&5
10517
10518         ac_header_compiler=no
10519 fi
10520
10521 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10522 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10523 echo "${ECHO_T}$ac_header_compiler" >&6; }
10524
10525 # Is the header present?
10526 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
10527 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10528 cat >conftest.$ac_ext <<_ACEOF
10529 /* confdefs.h.  */
10530 _ACEOF
10531 cat confdefs.h >>conftest.$ac_ext
10532 cat >>conftest.$ac_ext <<_ACEOF
10533 /* end confdefs.h.  */
10534 #include <$ac_header>
10535 _ACEOF
10536 if { (ac_try="$ac_cpp conftest.$ac_ext"
10537 case "(($ac_try" in
10538   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10539   *) ac_try_echo=$ac_try;;
10540 esac
10541 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10542   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10543   ac_status=$?
10544   grep -v '^ *+' conftest.er1 >conftest.err
10545   rm -f conftest.er1
10546   cat conftest.err >&5
10547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10548   (exit $ac_status); } >/dev/null && {
10549          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
10550          test ! -s conftest.err
10551        }; then
10552   ac_header_preproc=yes
10553 else
10554   echo "$as_me: failed program was:" >&5
10555 sed 's/^/| /' conftest.$ac_ext >&5
10556
10557   ac_header_preproc=no
10558 fi
10559
10560 rm -f conftest.err conftest.$ac_ext
10561 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10562 echo "${ECHO_T}$ac_header_preproc" >&6; }
10563
10564 # So?  What about this header?
10565 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
10566   yes:no: )
10567     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10568 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10569     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10570 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10571     ac_header_preproc=yes
10572     ;;
10573   no:yes:* )
10574     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10575 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10576     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10577 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10578     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10579 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10580     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10581 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10582     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10583 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10584     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10585 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10586
10587     ;;
10588 esac
10589 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10590 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10591 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10592   echo $ECHO_N "(cached) $ECHO_C" >&6
10593 else
10594   eval "$as_ac_Header=\$ac_header_preproc"
10595 fi
10596 ac_res=`eval echo '${'$as_ac_Header'}'`
10597                { echo "$as_me:$LINENO: result: $ac_res" >&5
10598 echo "${ECHO_T}$ac_res" >&6; }
10599
10600 fi
10601 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10602   cat >>confdefs.h <<_ACEOF
10603 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10604 _ACEOF
10605
10606 fi
10607
10608 done
10609
10610
10611
10612 if test "${ac_cv_header_utmp_h+set}" = set; then
10613   { echo "$as_me:$LINENO: checking for utmp.h" >&5
10614 echo $ECHO_N "checking for utmp.h... $ECHO_C" >&6; }
10615 if test "${ac_cv_header_utmp_h+set}" = set; then
10616   echo $ECHO_N "(cached) $ECHO_C" >&6
10617 fi
10618 { echo "$as_me:$LINENO: result: $ac_cv_header_utmp_h" >&5
10619 echo "${ECHO_T}$ac_cv_header_utmp_h" >&6; }
10620 else
10621   # Is the header compilable?
10622 { echo "$as_me:$LINENO: checking utmp.h usability" >&5
10623 echo $ECHO_N "checking utmp.h usability... $ECHO_C" >&6; }
10624 cat >conftest.$ac_ext <<_ACEOF
10625 /* confdefs.h.  */
10626 _ACEOF
10627 cat confdefs.h >>conftest.$ac_ext
10628 cat >>conftest.$ac_ext <<_ACEOF
10629 /* end confdefs.h.  */
10630 $ac_includes_default
10631 #include <utmp.h>
10632 _ACEOF
10633 rm -f conftest.$ac_objext
10634 if { (ac_try="$ac_compile"
10635 case "(($ac_try" in
10636   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10637   *) ac_try_echo=$ac_try;;
10638 esac
10639 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10640   (eval "$ac_compile") 2>conftest.er1
10641   ac_status=$?
10642   grep -v '^ *+' conftest.er1 >conftest.err
10643   rm -f conftest.er1
10644   cat conftest.err >&5
10645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10646   (exit $ac_status); } && {
10647          test -z "$ac_cxx_werror_flag" ||
10648          test ! -s conftest.err
10649        } && test -s conftest.$ac_objext; then
10650   ac_header_compiler=yes
10651 else
10652   echo "$as_me: failed program was:" >&5
10653 sed 's/^/| /' conftest.$ac_ext >&5
10654
10655         ac_header_compiler=no
10656 fi
10657
10658 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10659 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10660 echo "${ECHO_T}$ac_header_compiler" >&6; }
10661
10662 # Is the header present?
10663 { echo "$as_me:$LINENO: checking utmp.h presence" >&5
10664 echo $ECHO_N "checking utmp.h presence... $ECHO_C" >&6; }
10665 cat >conftest.$ac_ext <<_ACEOF
10666 /* confdefs.h.  */
10667 _ACEOF
10668 cat confdefs.h >>conftest.$ac_ext
10669 cat >>conftest.$ac_ext <<_ACEOF
10670 /* end confdefs.h.  */
10671 #include <utmp.h>
10672 _ACEOF
10673 if { (ac_try="$ac_cpp conftest.$ac_ext"
10674 case "(($ac_try" in
10675   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10676   *) ac_try_echo=$ac_try;;
10677 esac
10678 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10679   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10680   ac_status=$?
10681   grep -v '^ *+' conftest.er1 >conftest.err
10682   rm -f conftest.er1
10683   cat conftest.err >&5
10684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10685   (exit $ac_status); } >/dev/null && {
10686          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
10687          test ! -s conftest.err
10688        }; then
10689   ac_header_preproc=yes
10690 else
10691   echo "$as_me: failed program was:" >&5
10692 sed 's/^/| /' conftest.$ac_ext >&5
10693
10694   ac_header_preproc=no
10695 fi
10696
10697 rm -f conftest.err conftest.$ac_ext
10698 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10699 echo "${ECHO_T}$ac_header_preproc" >&6; }
10700
10701 # So?  What about this header?
10702 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
10703   yes:no: )
10704     { echo "$as_me:$LINENO: WARNING: utmp.h: accepted by the compiler, rejected by the preprocessor!" >&5
10705 echo "$as_me: WARNING: utmp.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10706     { echo "$as_me:$LINENO: WARNING: utmp.h: proceeding with the compiler's result" >&5
10707 echo "$as_me: WARNING: utmp.h: proceeding with the compiler's result" >&2;}
10708     ac_header_preproc=yes
10709     ;;
10710   no:yes:* )
10711     { echo "$as_me:$LINENO: WARNING: utmp.h: present but cannot be compiled" >&5
10712 echo "$as_me: WARNING: utmp.h: present but cannot be compiled" >&2;}
10713     { echo "$as_me:$LINENO: WARNING: utmp.h:     check for missing prerequisite headers?" >&5
10714 echo "$as_me: WARNING: utmp.h:     check for missing prerequisite headers?" >&2;}
10715     { echo "$as_me:$LINENO: WARNING: utmp.h: see the Autoconf documentation" >&5
10716 echo "$as_me: WARNING: utmp.h: see the Autoconf documentation" >&2;}
10717     { echo "$as_me:$LINENO: WARNING: utmp.h:     section \"Present But Cannot Be Compiled\"" >&5
10718 echo "$as_me: WARNING: utmp.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10719     { echo "$as_me:$LINENO: WARNING: utmp.h: proceeding with the preprocessor's result" >&5
10720 echo "$as_me: WARNING: utmp.h: proceeding with the preprocessor's result" >&2;}
10721     { echo "$as_me:$LINENO: WARNING: utmp.h: in the future, the compiler will take precedence" >&5
10722 echo "$as_me: WARNING: utmp.h: in the future, the compiler will take precedence" >&2;}
10723
10724     ;;
10725 esac
10726 { echo "$as_me:$LINENO: checking for utmp.h" >&5
10727 echo $ECHO_N "checking for utmp.h... $ECHO_C" >&6; }
10728 if test "${ac_cv_header_utmp_h+set}" = set; then
10729   echo $ECHO_N "(cached) $ECHO_C" >&6
10730 else
10731   ac_cv_header_utmp_h=$ac_header_preproc
10732 fi
10733 { echo "$as_me:$LINENO: result: $ac_cv_header_utmp_h" >&5
10734 echo "${ECHO_T}$ac_cv_header_utmp_h" >&6; }
10735
10736 fi
10737 if test $ac_cv_header_utmp_h = yes; then
10738   { echo "$as_me:$LINENO: checking for struct utmp" >&5
10739 echo $ECHO_N "checking for struct utmp... $ECHO_C" >&6; }
10740 if test "${struct_utmp+set}" = set; then
10741   echo $ECHO_N "(cached) $ECHO_C" >&6
10742 else
10743   cat >conftest.$ac_ext <<_ACEOF
10744 /* confdefs.h.  */
10745 _ACEOF
10746 cat confdefs.h >>conftest.$ac_ext
10747 cat >>conftest.$ac_ext <<_ACEOF
10748 /* end confdefs.h.  */
10749 #include <sys/types.h>
10750 #include <utmp.h>
10751 int
10752 main ()
10753 {
10754 struct utmp ut;
10755   ;
10756   return 0;
10757 }
10758 _ACEOF
10759 rm -f conftest.$ac_objext
10760 if { (ac_try="$ac_compile"
10761 case "(($ac_try" in
10762   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10763   *) ac_try_echo=$ac_try;;
10764 esac
10765 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10766   (eval "$ac_compile") 2>conftest.er1
10767   ac_status=$?
10768   grep -v '^ *+' conftest.er1 >conftest.err
10769   rm -f conftest.er1
10770   cat conftest.err >&5
10771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10772   (exit $ac_status); } && {
10773          test -z "$ac_cxx_werror_flag" ||
10774          test ! -s conftest.err
10775        } && test -s conftest.$ac_objext; then
10776   struct_utmp=yes
10777 else
10778   echo "$as_me: failed program was:" >&5
10779 sed 's/^/| /' conftest.$ac_ext >&5
10780
10781         struct_utmp=no
10782 fi
10783
10784 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10785 fi
10786 { echo "$as_me:$LINENO: result: $struct_utmp" >&5
10787 echo "${ECHO_T}$struct_utmp" >&6; }
10788 if test x$struct_utmp = xyes; then
10789
10790 cat >>confdefs.h <<\_ACEOF
10791 #define HAVE_STRUCT_UTMP 1
10792 _ACEOF
10793
10794 fi
10795
10796
10797 { echo "$as_me:$LINENO: checking for ut_host in utmp struct" >&5
10798 echo $ECHO_N "checking for ut_host in utmp struct... $ECHO_C" >&6; }
10799 if test "${struct_utmp_host+set}" = set; then
10800   echo $ECHO_N "(cached) $ECHO_C" >&6
10801 else
10802   cat >conftest.$ac_ext <<_ACEOF
10803 /* confdefs.h.  */
10804 _ACEOF
10805 cat confdefs.h >>conftest.$ac_ext
10806 cat >>conftest.$ac_ext <<_ACEOF
10807 /* end confdefs.h.  */
10808 #include <sys/types.h>
10809 #include <utmp.h>
10810 int
10811 main ()
10812 {
10813 struct utmp ut; ut.ut_host;
10814   ;
10815   return 0;
10816 }
10817 _ACEOF
10818 rm -f conftest.$ac_objext
10819 if { (ac_try="$ac_compile"
10820 case "(($ac_try" in
10821   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10822   *) ac_try_echo=$ac_try;;
10823 esac
10824 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10825   (eval "$ac_compile") 2>conftest.er1
10826   ac_status=$?
10827   grep -v '^ *+' conftest.er1 >conftest.err
10828   rm -f conftest.er1
10829   cat conftest.err >&5
10830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10831   (exit $ac_status); } && {
10832          test -z "$ac_cxx_werror_flag" ||
10833          test ! -s conftest.err
10834        } && test -s conftest.$ac_objext; then
10835   struct_utmp_host=yes
10836 else
10837   echo "$as_me: failed program was:" >&5
10838 sed 's/^/| /' conftest.$ac_ext >&5
10839
10840         struct_utmp_host=no
10841 fi
10842
10843 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10844 fi
10845 { echo "$as_me:$LINENO: result: $struct_utmp_host" >&5
10846 echo "${ECHO_T}$struct_utmp_host" >&6; }
10847 if test x$struct_utmp_host = xyes; then
10848
10849 cat >>confdefs.h <<\_ACEOF
10850 #define HAVE_UTMP_HOST 1
10851 _ACEOF
10852
10853 fi
10854
10855 { echo "$as_me:$LINENO: checking for ut_pid in utmp struct" >&5
10856 echo $ECHO_N "checking for ut_pid in utmp struct... $ECHO_C" >&6; }
10857 if test "${struct_utmp_pid+set}" = set; then
10858   echo $ECHO_N "(cached) $ECHO_C" >&6
10859 else
10860   cat >conftest.$ac_ext <<_ACEOF
10861 /* confdefs.h.  */
10862 _ACEOF
10863 cat confdefs.h >>conftest.$ac_ext
10864 cat >>conftest.$ac_ext <<_ACEOF
10865 /* end confdefs.h.  */
10866 #include <sys/types.h>
10867 #include <utmp.h>
10868 int
10869 main ()
10870 {
10871 struct utmp ut; ut.ut_pid;
10872   ;
10873   return 0;
10874 }
10875 _ACEOF
10876 rm -f conftest.$ac_objext
10877 if { (ac_try="$ac_compile"
10878 case "(($ac_try" in
10879   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10880   *) ac_try_echo=$ac_try;;
10881 esac
10882 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10883   (eval "$ac_compile") 2>conftest.er1
10884   ac_status=$?
10885   grep -v '^ *+' conftest.er1 >conftest.err
10886   rm -f conftest.er1
10887   cat conftest.err >&5
10888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10889   (exit $ac_status); } && {
10890          test -z "$ac_cxx_werror_flag" ||
10891          test ! -s conftest.err
10892        } && test -s conftest.$ac_objext; then
10893   struct_utmp_pid=yes
10894 else
10895   echo "$as_me: failed program was:" >&5
10896 sed 's/^/| /' conftest.$ac_ext >&5
10897
10898         struct_utmp_pid=no
10899 fi
10900
10901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10902 fi
10903 { echo "$as_me:$LINENO: result: $struct_utmp_pid" >&5
10904 echo "${ECHO_T}$struct_utmp_pid" >&6; }
10905 if test x$struct_utmp_pid = xyes; then
10906
10907 cat >>confdefs.h <<\_ACEOF
10908 #define HAVE_UTMP_PID 1
10909 _ACEOF
10910
10911 fi
10912
10913 fi
10914
10915
10916
10917 if test "${ac_cv_header_utmpx_h+set}" = set; then
10918   { echo "$as_me:$LINENO: checking for utmpx.h" >&5
10919 echo $ECHO_N "checking for utmpx.h... $ECHO_C" >&6; }
10920 if test "${ac_cv_header_utmpx_h+set}" = set; then
10921   echo $ECHO_N "(cached) $ECHO_C" >&6
10922 fi
10923 { echo "$as_me:$LINENO: result: $ac_cv_header_utmpx_h" >&5
10924 echo "${ECHO_T}$ac_cv_header_utmpx_h" >&6; }
10925 else
10926   # Is the header compilable?
10927 { echo "$as_me:$LINENO: checking utmpx.h usability" >&5
10928 echo $ECHO_N "checking utmpx.h usability... $ECHO_C" >&6; }
10929 cat >conftest.$ac_ext <<_ACEOF
10930 /* confdefs.h.  */
10931 _ACEOF
10932 cat confdefs.h >>conftest.$ac_ext
10933 cat >>conftest.$ac_ext <<_ACEOF
10934 /* end confdefs.h.  */
10935 $ac_includes_default
10936 #include <utmpx.h>
10937 _ACEOF
10938 rm -f conftest.$ac_objext
10939 if { (ac_try="$ac_compile"
10940 case "(($ac_try" in
10941   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10942   *) ac_try_echo=$ac_try;;
10943 esac
10944 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10945   (eval "$ac_compile") 2>conftest.er1
10946   ac_status=$?
10947   grep -v '^ *+' conftest.er1 >conftest.err
10948   rm -f conftest.er1
10949   cat conftest.err >&5
10950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10951   (exit $ac_status); } && {
10952          test -z "$ac_cxx_werror_flag" ||
10953          test ! -s conftest.err
10954        } && test -s conftest.$ac_objext; then
10955   ac_header_compiler=yes
10956 else
10957   echo "$as_me: failed program was:" >&5
10958 sed 's/^/| /' conftest.$ac_ext >&5
10959
10960         ac_header_compiler=no
10961 fi
10962
10963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10964 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10965 echo "${ECHO_T}$ac_header_compiler" >&6; }
10966
10967 # Is the header present?
10968 { echo "$as_me:$LINENO: checking utmpx.h presence" >&5
10969 echo $ECHO_N "checking utmpx.h presence... $ECHO_C" >&6; }
10970 cat >conftest.$ac_ext <<_ACEOF
10971 /* confdefs.h.  */
10972 _ACEOF
10973 cat confdefs.h >>conftest.$ac_ext
10974 cat >>conftest.$ac_ext <<_ACEOF
10975 /* end confdefs.h.  */
10976 #include <utmpx.h>
10977 _ACEOF
10978 if { (ac_try="$ac_cpp conftest.$ac_ext"
10979 case "(($ac_try" in
10980   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10981   *) ac_try_echo=$ac_try;;
10982 esac
10983 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10984   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10985   ac_status=$?
10986   grep -v '^ *+' conftest.er1 >conftest.err
10987   rm -f conftest.er1
10988   cat conftest.err >&5
10989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10990   (exit $ac_status); } >/dev/null && {
10991          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
10992          test ! -s conftest.err
10993        }; then
10994   ac_header_preproc=yes
10995 else
10996   echo "$as_me: failed program was:" >&5
10997 sed 's/^/| /' conftest.$ac_ext >&5
10998
10999   ac_header_preproc=no
11000 fi
11001
11002 rm -f conftest.err conftest.$ac_ext
11003 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11004 echo "${ECHO_T}$ac_header_preproc" >&6; }
11005
11006 # So?  What about this header?
11007 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
11008   yes:no: )
11009     { echo "$as_me:$LINENO: WARNING: utmpx.h: accepted by the compiler, rejected by the preprocessor!" >&5
11010 echo "$as_me: WARNING: utmpx.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11011     { echo "$as_me:$LINENO: WARNING: utmpx.h: proceeding with the compiler's result" >&5
11012 echo "$as_me: WARNING: utmpx.h: proceeding with the compiler's result" >&2;}
11013     ac_header_preproc=yes
11014     ;;
11015   no:yes:* )
11016     { echo "$as_me:$LINENO: WARNING: utmpx.h: present but cannot be compiled" >&5
11017 echo "$as_me: WARNING: utmpx.h: present but cannot be compiled" >&2;}
11018     { echo "$as_me:$LINENO: WARNING: utmpx.h:     check for missing prerequisite headers?" >&5
11019 echo "$as_me: WARNING: utmpx.h:     check for missing prerequisite headers?" >&2;}
11020     { echo "$as_me:$LINENO: WARNING: utmpx.h: see the Autoconf documentation" >&5
11021 echo "$as_me: WARNING: utmpx.h: see the Autoconf documentation" >&2;}
11022     { echo "$as_me:$LINENO: WARNING: utmpx.h:     section \"Present But Cannot Be Compiled\"" >&5
11023 echo "$as_me: WARNING: utmpx.h:     section \"Present But Cannot Be Compiled\"" >&2;}
11024     { echo "$as_me:$LINENO: WARNING: utmpx.h: proceeding with the preprocessor's result" >&5
11025 echo "$as_me: WARNING: utmpx.h: proceeding with the preprocessor's result" >&2;}
11026     { echo "$as_me:$LINENO: WARNING: utmpx.h: in the future, the compiler will take precedence" >&5
11027 echo "$as_me: WARNING: utmpx.h: in the future, the compiler will take precedence" >&2;}
11028
11029     ;;
11030 esac
11031 { echo "$as_me:$LINENO: checking for utmpx.h" >&5
11032 echo $ECHO_N "checking for utmpx.h... $ECHO_C" >&6; }
11033 if test "${ac_cv_header_utmpx_h+set}" = set; then
11034   echo $ECHO_N "(cached) $ECHO_C" >&6
11035 else
11036   ac_cv_header_utmpx_h=$ac_header_preproc
11037 fi
11038 { echo "$as_me:$LINENO: result: $ac_cv_header_utmpx_h" >&5
11039 echo "${ECHO_T}$ac_cv_header_utmpx_h" >&6; }
11040
11041 fi
11042 if test $ac_cv_header_utmpx_h = yes; then
11043   { echo "$as_me:$LINENO: checking for struct utmpx" >&5
11044 echo $ECHO_N "checking for struct utmpx... $ECHO_C" >&6; }
11045 if test "${struct_utmpx+set}" = set; then
11046   echo $ECHO_N "(cached) $ECHO_C" >&6
11047 else
11048   cat >conftest.$ac_ext <<_ACEOF
11049 /* confdefs.h.  */
11050 _ACEOF
11051 cat confdefs.h >>conftest.$ac_ext
11052 cat >>conftest.$ac_ext <<_ACEOF
11053 /* end confdefs.h.  */
11054 #include <sys/types.h>
11055 #include <utmpx.h>
11056 int
11057 main ()
11058 {
11059 struct utmpx ut;
11060   ;
11061   return 0;
11062 }
11063 _ACEOF
11064 rm -f conftest.$ac_objext
11065 if { (ac_try="$ac_compile"
11066 case "(($ac_try" in
11067   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11068   *) ac_try_echo=$ac_try;;
11069 esac
11070 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11071   (eval "$ac_compile") 2>conftest.er1
11072   ac_status=$?
11073   grep -v '^ *+' conftest.er1 >conftest.err
11074   rm -f conftest.er1
11075   cat conftest.err >&5
11076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11077   (exit $ac_status); } && {
11078          test -z "$ac_cxx_werror_flag" ||
11079          test ! -s conftest.err
11080        } && test -s conftest.$ac_objext; then
11081   struct_utmpx=yes
11082 else
11083   echo "$as_me: failed program was:" >&5
11084 sed 's/^/| /' conftest.$ac_ext >&5
11085
11086         struct_utmpx=no
11087 fi
11088
11089 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11090 fi
11091 { echo "$as_me:$LINENO: result: $struct_utmpx" >&5
11092 echo "${ECHO_T}$struct_utmpx" >&6; }
11093 if test x$struct_utmpx = xyes; then
11094
11095 cat >>confdefs.h <<\_ACEOF
11096 #define HAVE_STRUCT_UTMPX 1
11097 _ACEOF
11098
11099 fi
11100
11101
11102 { echo "$as_me:$LINENO: checking for host in utmpx struct" >&5
11103 echo $ECHO_N "checking for host in utmpx struct... $ECHO_C" >&6; }
11104 if test "${struct_utmpx_host+set}" = set; then
11105   echo $ECHO_N "(cached) $ECHO_C" >&6
11106 else
11107   cat >conftest.$ac_ext <<_ACEOF
11108 /* confdefs.h.  */
11109 _ACEOF
11110 cat confdefs.h >>conftest.$ac_ext
11111 cat >>conftest.$ac_ext <<_ACEOF
11112 /* end confdefs.h.  */
11113 #include <sys/types.h>
11114 #include <utmpx.h>
11115 int
11116 main ()
11117 {
11118 struct utmpx utx; utx.ut_host;
11119   ;
11120   return 0;
11121 }
11122 _ACEOF
11123 rm -f conftest.$ac_objext
11124 if { (ac_try="$ac_compile"
11125 case "(($ac_try" in
11126   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11127   *) ac_try_echo=$ac_try;;
11128 esac
11129 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11130   (eval "$ac_compile") 2>conftest.er1
11131   ac_status=$?
11132   grep -v '^ *+' conftest.er1 >conftest.err
11133   rm -f conftest.er1
11134   cat conftest.err >&5
11135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11136   (exit $ac_status); } && {
11137          test -z "$ac_cxx_werror_flag" ||
11138          test ! -s conftest.err
11139        } && test -s conftest.$ac_objext; then
11140   struct_utmpx_host=yes
11141 else
11142   echo "$as_me: failed program was:" >&5
11143 sed 's/^/| /' conftest.$ac_ext >&5
11144
11145         struct_utmpx_host=no
11146 fi
11147
11148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11149 fi
11150 { echo "$as_me:$LINENO: result: $struct_utmpx_host" >&5
11151 echo "${ECHO_T}$struct_utmpx_host" >&6; }
11152 if test x$struct_utmpx_host = xyes; then
11153
11154 cat >>confdefs.h <<\_ACEOF
11155 #define HAVE_UTMPX_HOST 1
11156 _ACEOF
11157
11158 fi
11159
11160 { echo "$as_me:$LINENO: checking for session in utmpx struct" >&5
11161 echo $ECHO_N "checking for session in utmpx struct... $ECHO_C" >&6; }
11162 if test "${struct_utmpx_session+set}" = set; then
11163   echo $ECHO_N "(cached) $ECHO_C" >&6
11164 else
11165   cat >conftest.$ac_ext <<_ACEOF
11166 /* confdefs.h.  */
11167 _ACEOF
11168 cat confdefs.h >>conftest.$ac_ext
11169 cat >>conftest.$ac_ext <<_ACEOF
11170 /* end confdefs.h.  */
11171 #include <sys/types.h>
11172 #include <utmpx.h>
11173 int
11174 main ()
11175 {
11176 struct utmpx utx; utx.ut_session;
11177   ;
11178   return 0;
11179 }
11180 _ACEOF
11181 rm -f conftest.$ac_objext
11182 if { (ac_try="$ac_compile"
11183 case "(($ac_try" in
11184   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11185   *) ac_try_echo=$ac_try;;
11186 esac
11187 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11188   (eval "$ac_compile") 2>conftest.er1
11189   ac_status=$?
11190   grep -v '^ *+' conftest.er1 >conftest.err
11191   rm -f conftest.er1
11192   cat conftest.err >&5
11193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11194   (exit $ac_status); } && {
11195          test -z "$ac_cxx_werror_flag" ||
11196          test ! -s conftest.err
11197        } && test -s conftest.$ac_objext; then
11198   struct_utmpx_session=yes
11199 else
11200   echo "$as_me: failed program was:" >&5
11201 sed 's/^/| /' conftest.$ac_ext >&5
11202
11203         struct_utmpx_session=no
11204 fi
11205
11206 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11207 fi
11208 { echo "$as_me:$LINENO: result: $struct_utmpx_session" >&5
11209 echo "${ECHO_T}$struct_utmpx_session" >&6; }
11210 if test x$struct_utmpx_session = xyes; then
11211
11212 cat >>confdefs.h <<\_ACEOF
11213 #define HAVE_UTMPX_SESSION 1
11214 _ACEOF
11215
11216 fi
11217
11218 fi
11219
11220
11221 { echo "$as_me:$LINENO: checking for struct lastlog" >&5
11222 echo $ECHO_N "checking for struct lastlog... $ECHO_C" >&6; }
11223 if test "${struct_lastlog+set}" = set; then
11224   echo $ECHO_N "(cached) $ECHO_C" >&6
11225 else
11226   cat >conftest.$ac_ext <<_ACEOF
11227 /* confdefs.h.  */
11228 _ACEOF
11229 cat confdefs.h >>conftest.$ac_ext
11230 cat >>conftest.$ac_ext <<_ACEOF
11231 /* end confdefs.h.  */
11232 #include <sys/types.h>
11233 #include <utmp.h>
11234 #ifdef HAVE_LASTLOG_H
11235 #include <lastlog.h>
11236 #endif
11237
11238 int
11239 main ()
11240 {
11241 struct lastlog ll;
11242   ;
11243   return 0;
11244 }
11245 _ACEOF
11246 rm -f conftest.$ac_objext
11247 if { (ac_try="$ac_compile"
11248 case "(($ac_try" in
11249   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11250   *) ac_try_echo=$ac_try;;
11251 esac
11252 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11253   (eval "$ac_compile") 2>conftest.er1
11254   ac_status=$?
11255   grep -v '^ *+' conftest.er1 >conftest.err
11256   rm -f conftest.er1
11257   cat conftest.err >&5
11258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11259   (exit $ac_status); } && {
11260          test -z "$ac_cxx_werror_flag" ||
11261          test ! -s conftest.err
11262        } && test -s conftest.$ac_objext; then
11263   struct_lastlog=yes
11264 else
11265   echo "$as_me: failed program was:" >&5
11266 sed 's/^/| /' conftest.$ac_ext >&5
11267
11268         struct_lastlog=no
11269 fi
11270
11271 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11272 fi
11273 { echo "$as_me:$LINENO: result: $struct_lastlog" >&5
11274 echo "${ECHO_T}$struct_lastlog" >&6; }
11275 if test x$struct_lastlog = xyes; then
11276
11277 cat >>confdefs.h <<\_ACEOF
11278 #define HAVE_STRUCT_LASTLOG 1
11279 _ACEOF
11280
11281 fi
11282
11283 { echo "$as_me:$LINENO: checking for struct lastlogx" >&5
11284 echo $ECHO_N "checking for struct lastlogx... $ECHO_C" >&6; }
11285 if test "${struct_lastlogx+set}" = set; then
11286   echo $ECHO_N "(cached) $ECHO_C" >&6
11287 else
11288   cat >conftest.$ac_ext <<_ACEOF
11289 /* confdefs.h.  */
11290 _ACEOF
11291 cat confdefs.h >>conftest.$ac_ext
11292 cat >>conftest.$ac_ext <<_ACEOF
11293 /* end confdefs.h.  */
11294 #include <sys/types.h>
11295 #include <utmpx.h>
11296 #ifdef HAVE_LASTLOG_H
11297 #include <lastlog.h>
11298 #endif
11299
11300 int
11301 main ()
11302 {
11303 struct lastlogx ll;
11304   ;
11305   return 0;
11306 }
11307 _ACEOF
11308 rm -f conftest.$ac_objext
11309 if { (ac_try="$ac_compile"
11310 case "(($ac_try" in
11311   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11312   *) ac_try_echo=$ac_try;;
11313 esac
11314 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11315   (eval "$ac_compile") 2>conftest.er1
11316   ac_status=$?
11317   grep -v '^ *+' conftest.er1 >conftest.err
11318   rm -f conftest.er1
11319   cat conftest.err >&5
11320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11321   (exit $ac_status); } && {
11322          test -z "$ac_cxx_werror_flag" ||
11323          test ! -s conftest.err
11324        } && test -s conftest.$ac_objext; then
11325   struct_lastlogx=yes
11326 else
11327   echo "$as_me: failed program was:" >&5
11328 sed 's/^/| /' conftest.$ac_ext >&5
11329
11330         struct_lastlogx=no
11331 fi
11332
11333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11334 fi
11335 { echo "$as_me:$LINENO: result: $struct_lastlogx" >&5
11336 echo "${ECHO_T}$struct_lastlogx" >&6; }
11337 if test x$struct_lastlogx = xyes; then
11338
11339 cat >>confdefs.h <<\_ACEOF
11340 #define HAVE_STRUCT_LASTLOGX 1
11341 _ACEOF
11342
11343 fi
11344
11345
11346 { echo "$as_me:$LINENO: checking where utmp is located" >&5
11347 echo $ECHO_N "checking where utmp is located... $ECHO_C" >&6; }
11348 if test "${path_utmp+set}" = set; then
11349   echo $ECHO_N "(cached) $ECHO_C" >&6
11350 else
11351   if test "$cross_compiling" = yes; then
11352     { echo "$as_me:$LINENO: WARNING: Define UTMP_FILE in config.h manually" >&5
11353 echo "$as_me: WARNING: Define UTMP_FILE in config.h manually" >&2;}
11354 else
11355   cat >conftest.$ac_ext <<_ACEOF
11356 /* confdefs.h.  */
11357 _ACEOF
11358 cat confdefs.h >>conftest.$ac_ext
11359 cat >>conftest.$ac_ext <<_ACEOF
11360 /* end confdefs.h.  */
11361 #include <stdio.h>
11362 #include <stdlib.h>
11363 #include <sys/types.h>
11364 #include <utmp.h>
11365 #include <errno.h>
11366 main()
11367 {
11368     char **u, *utmplist[] = {
11369     "/var/run/utmp", "/var/adm/utmp", "/etc/utmp", "/usr/etc/utmp", "/usr/adm/utmp", NULL };
11370     FILE *a, *f=fopen("conftestval", "w");
11371     if (!f) exit(1);
11372 #ifdef UTMP_FILE
11373     fprintf(f, "%s\n", UTMP_FILE);
11374     exit(0);
11375 #endif
11376 #ifdef _PATH_UTMP
11377     fprintf(f, "%s\n", _PATH_UTMP);
11378     exit(0);
11379 #endif
11380     for (u = utmplist; *u; u++) {
11381         if ((a = fopen(*u, "r")) != NULL || errno == EACCES) {
11382             fprintf(f, "%s\n", *u);
11383             exit(0);
11384         }
11385     }
11386     exit(0);
11387 }
11388 _ACEOF
11389 rm -f conftest$ac_exeext
11390 if { (ac_try="$ac_link"
11391 case "(($ac_try" in
11392   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11393   *) ac_try_echo=$ac_try;;
11394 esac
11395 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11396   (eval "$ac_link") 2>&5
11397   ac_status=$?
11398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11399   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11400   { (case "(($ac_try" in
11401   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11402   *) ac_try_echo=$ac_try;;
11403 esac
11404 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11405   (eval "$ac_try") 2>&5
11406   ac_status=$?
11407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11408   (exit $ac_status); }; }; then
11409   path_utmp=`cat conftestval`
11410 else
11411   echo "$as_me: program exited with status $ac_status" >&5
11412 echo "$as_me: failed program was:" >&5
11413 sed 's/^/| /' conftest.$ac_ext >&5
11414
11415 ( exit $ac_status )
11416 path_utmp=
11417 fi
11418 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11419 fi
11420
11421
11422 fi
11423 { echo "$as_me:$LINENO: result: $path_utmp" >&5
11424 echo "${ECHO_T}$path_utmp" >&6; }
11425 if test x$path_utmp != x; then
11426
11427 cat >>confdefs.h <<_ACEOF
11428 #define UTMP_FILE "$path_utmp"
11429 _ACEOF
11430
11431 fi
11432
11433
11434 { echo "$as_me:$LINENO: checking where utmpx is located" >&5
11435 echo $ECHO_N "checking where utmpx is located... $ECHO_C" >&6; }
11436 if test "${path_utmpx+set}" = set; then
11437   echo $ECHO_N "(cached) $ECHO_C" >&6
11438 else
11439   if test "$cross_compiling" = yes; then
11440     { echo "$as_me:$LINENO: WARNING: Define UTMPX_FILE in config.h manually" >&5
11441 echo "$as_me: WARNING: Define UTMPX_FILE in config.h manually" >&2;}
11442 else
11443   cat >conftest.$ac_ext <<_ACEOF
11444 /* confdefs.h.  */
11445 _ACEOF
11446 cat confdefs.h >>conftest.$ac_ext
11447 cat >>conftest.$ac_ext <<_ACEOF
11448 /* end confdefs.h.  */
11449 #include <stdio.h>
11450 #include <stdlib.h>
11451 #include <sys/types.h>
11452 #include <utmpx.h>
11453 #include <errno.h>
11454 #include <sys/stat.h>
11455 #ifdef HAVE_STRING_H
11456 #include <string.h>
11457 #endif
11458 main()
11459 {
11460     char **u, *p, *utmplist[] = {
11461 #ifdef UTMPX_FILE
11462         UTMPX_FILE,
11463 #endif
11464 #ifdef _PATH_UTMPX
11465         _PATH_UTMPX,
11466 #endif
11467     "/var/adm/utmpx", "/etc/utmpx", NULL };
11468     FILE *a, *f=fopen("conftestval", "w");
11469     struct stat statu, statux;
11470     if (!f) exit(1);
11471     for (u = utmplist; *u; u++) {
11472         if ((a = fopen(*u, "r")) != NULL || errno == EACCES) {
11473             if (stat(*u, &statux) < 0)
11474                 continue;
11475             p = strdup(*u);
11476             p[strlen(p) - 1] = '\0';
11477             if (stat(p, &statu) >= 0
11478                 && (statu.st_mtime - statux.st_mtime > 86400))
11479                 continue;
11480             fprintf(f, "%s\n", *u);
11481             exit(0);
11482         }
11483     }
11484     exit(0);
11485 }
11486 _ACEOF
11487 rm -f conftest$ac_exeext
11488 if { (ac_try="$ac_link"
11489 case "(($ac_try" in
11490   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11491   *) ac_try_echo=$ac_try;;
11492 esac
11493 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11494   (eval "$ac_link") 2>&5
11495   ac_status=$?
11496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11497   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11498   { (case "(($ac_try" in
11499   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11500   *) ac_try_echo=$ac_try;;
11501 esac
11502 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11503   (eval "$ac_try") 2>&5
11504   ac_status=$?
11505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11506   (exit $ac_status); }; }; then
11507   path_utmpx=`cat conftestval`
11508 else
11509   echo "$as_me: program exited with status $ac_status" >&5
11510 echo "$as_me: failed program was:" >&5
11511 sed 's/^/| /' conftest.$ac_ext >&5
11512
11513 ( exit $ac_status )
11514 path_utmpx=
11515 fi
11516 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11517 fi
11518
11519
11520 fi
11521 { echo "$as_me:$LINENO: result: $path_utmpx" >&5
11522 echo "${ECHO_T}$path_utmpx" >&6; }
11523 if test x$path_utmpx != x; then
11524
11525 cat >>confdefs.h <<_ACEOF
11526 #define UTMPX_FILE "$path_utmpx"
11527 _ACEOF
11528
11529 fi
11530
11531
11532 { echo "$as_me:$LINENO: checking where wtmp is located" >&5
11533 echo $ECHO_N "checking where wtmp is located... $ECHO_C" >&6; }
11534 if test "${path_wtmp+set}" = set; then
11535   echo $ECHO_N "(cached) $ECHO_C" >&6
11536 else
11537   if test "$cross_compiling" = yes; then
11538     { echo "$as_me:$LINENO: WARNING: Define WTMP_FILE in config.h manually" >&5
11539 echo "$as_me: WARNING: Define WTMP_FILE in config.h manually" >&2;}
11540 else
11541   cat >conftest.$ac_ext <<_ACEOF
11542 /* confdefs.h.  */
11543 _ACEOF
11544 cat confdefs.h >>conftest.$ac_ext
11545 cat >>conftest.$ac_ext <<_ACEOF
11546 /* end confdefs.h.  */
11547 #include <stdio.h>
11548 #include <stdlib.h>
11549 #include <sys/types.h>
11550 #ifdef HAVE_UTMP_H
11551 #include <utmp.h>
11552 #endif
11553 #include <errno.h>
11554 main()
11555 {
11556     char **w, *wtmplist[] = {
11557     "/var/log/wtmp", "/var/adm/wtmp", "/etc/wtmp", "/usr/etc/wtmp", "/usr/adm/wtmp", NULL };
11558     FILE *a, *f=fopen("conftestval", "w");
11559     if (!f) exit(1);
11560 #ifdef WTMP_FILE
11561     fprintf(f, "%s\n", WTMP_FILE);
11562     exit(0);
11563 #endif
11564 #ifdef _PATH_WTMP
11565     fprintf(f, "%s\n", _PATH_WTMP);
11566     exit(0);
11567 #endif
11568     for (w = wtmplist; *w; w++) {
11569         if ((a = fopen(*w, "r")) != NULL || errno == EACCES) {
11570             fprintf(f, "%s\n", *w);
11571             exit(0);
11572         }
11573     }
11574     exit(0);
11575 }
11576 _ACEOF
11577 rm -f conftest$ac_exeext
11578 if { (ac_try="$ac_link"
11579 case "(($ac_try" in
11580   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11581   *) ac_try_echo=$ac_try;;
11582 esac
11583 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11584   (eval "$ac_link") 2>&5
11585   ac_status=$?
11586   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11587   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11588   { (case "(($ac_try" in
11589   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11590   *) ac_try_echo=$ac_try;;
11591 esac
11592 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11593   (eval "$ac_try") 2>&5
11594   ac_status=$?
11595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11596   (exit $ac_status); }; }; then
11597   path_wtmp=`cat conftestval`
11598 else
11599   echo "$as_me: program exited with status $ac_status" >&5
11600 echo "$as_me: failed program was:" >&5
11601 sed 's/^/| /' conftest.$ac_ext >&5
11602
11603 ( exit $ac_status )
11604 path_wtmp=
11605 fi
11606 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11607 fi
11608
11609
11610 fi
11611 { echo "$as_me:$LINENO: result: $path_wtmp" >&5
11612 echo "${ECHO_T}$path_wtmp" >&6; }
11613 if test x$path_wtmp != x; then
11614
11615 cat >>confdefs.h <<_ACEOF
11616 #define WTMP_FILE "$path_wtmp"
11617 _ACEOF
11618
11619 fi
11620
11621 { echo "$as_me:$LINENO: checking where wtmpx is located" >&5
11622 echo $ECHO_N "checking where wtmpx is located... $ECHO_C" >&6; }
11623 if test "${path_wtmpx+set}" = set; then
11624   echo $ECHO_N "(cached) $ECHO_C" >&6
11625 else
11626   if test "$cross_compiling" = yes; then
11627     { echo "$as_me:$LINENO: WARNING: Define WTMPX_FILE in config.h manually" >&5
11628 echo "$as_me: WARNING: Define WTMPX_FILE in config.h manually" >&2;}
11629 else
11630   cat >conftest.$ac_ext <<_ACEOF
11631 /* confdefs.h.  */
11632 _ACEOF
11633 cat confdefs.h >>conftest.$ac_ext
11634 cat >>conftest.$ac_ext <<_ACEOF
11635 /* end confdefs.h.  */
11636 #include <stdio.h>
11637 #include <stdlib.h>
11638 #ifdef HAVE_UTMPX_H
11639 #include <utmpx.h>
11640 #endif
11641 #include <errno.h>
11642 main()
11643 {
11644     char **w, *wtmplist[] = {
11645     "/var/log/wtmpx", "/var/adm/wtmpx", NULL };
11646     FILE *a, *f=fopen("conftestval", "w");
11647     if (!f) exit(1);
11648 #ifdef WTMPX_FILE
11649     fprintf(f, "%s\n", WTMPX_FILE);
11650     exit(0);
11651 #endif
11652 #ifdef _PATH_WTMPX
11653     fprintf(f, "%s\n", _PATH_WTMPX);
11654     exit(0);
11655 #endif
11656     for (w = wtmplist; *w; w++) {
11657         if ((a = fopen(*w, "r")) != NULL || errno == EACCES) {
11658             fprintf(f, "%s\n", *w);
11659             exit(0);
11660         }
11661     }
11662     exit(0);
11663 }
11664 _ACEOF
11665 rm -f conftest$ac_exeext
11666 if { (ac_try="$ac_link"
11667 case "(($ac_try" in
11668   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11669   *) ac_try_echo=$ac_try;;
11670 esac
11671 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11672   (eval "$ac_link") 2>&5
11673   ac_status=$?
11674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11675   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11676   { (case "(($ac_try" in
11677   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11678   *) ac_try_echo=$ac_try;;
11679 esac
11680 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11681   (eval "$ac_try") 2>&5
11682   ac_status=$?
11683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11684   (exit $ac_status); }; }; then
11685   path_wtmpx=`cat conftestval`
11686 else
11687   echo "$as_me: program exited with status $ac_status" >&5
11688 echo "$as_me: failed program was:" >&5
11689 sed 's/^/| /' conftest.$ac_ext >&5
11690
11691 ( exit $ac_status )
11692 path_wtmpx=
11693 fi
11694 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11695 fi
11696
11697
11698 fi
11699 { echo "$as_me:$LINENO: result: $path_wtmpx" >&5
11700 echo "${ECHO_T}$path_wtmpx" >&6; }
11701 if test x$path_wtmpx != x; then
11702
11703 cat >>confdefs.h <<_ACEOF
11704 #define WTMPX_FILE "$path_wtmpx"
11705 _ACEOF
11706
11707 fi
11708
11709 { echo "$as_me:$LINENO: checking where lastlog is located" >&5
11710 echo $ECHO_N "checking where lastlog is located... $ECHO_C" >&6; }
11711 if test "${path_lastlog+set}" = set; then
11712   echo $ECHO_N "(cached) $ECHO_C" >&6
11713 else
11714   if test "$cross_compiling" = yes; then
11715     { echo "$as_me:$LINENO: WARNING: Define LASTLOG_FILE in config.h manually" >&5
11716 echo "$as_me: WARNING: Define LASTLOG_FILE in config.h manually" >&2;}
11717 else
11718   cat >conftest.$ac_ext <<_ACEOF
11719 /* confdefs.h.  */
11720 _ACEOF
11721 cat confdefs.h >>conftest.$ac_ext
11722 cat >>conftest.$ac_ext <<_ACEOF
11723 /* end confdefs.h.  */
11724 #include <stdio.h>
11725 #include <stdlib.h>
11726 #include <sys/types.h>
11727 #ifdef HAVE_UTMPX_H
11728 #include <utmpx.h>
11729 #elif defined(HAVE_UTMP_H)
11730 #include <utmp.h>
11731 #endif
11732 #ifdef HAVE_LASTLOG_H
11733 #include <lastlog.h>
11734 #endif
11735 #include <errno.h>
11736 main()
11737 {
11738     char **w, *lastloglist[] = { "/var/log/lastlog", NULL };
11739     FILE *a, *f=fopen("conftestval", "w");
11740     if (!f) exit(1);
11741 #ifdef LASTLOG_FILE
11742     fprintf(f, "%s\n", LASTLOG_FILE);
11743     exit(0);
11744 #endif
11745 #ifdef _PATH_LASTLOG
11746     fprintf(f, "%s\n", _PATH_LASTLOG);
11747     exit(0);
11748 #endif
11749     for (w = lastloglist; *w; w++) {
11750         if ((a = fopen(*w, "r")) != NULL || errno == EACCES) {
11751             fprintf(f, "%s\n", *w);
11752             exit(0);
11753         }
11754     }
11755     exit(0);
11756 }
11757 _ACEOF
11758 rm -f conftest$ac_exeext
11759 if { (ac_try="$ac_link"
11760 case "(($ac_try" in
11761   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11762   *) ac_try_echo=$ac_try;;
11763 esac
11764 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11765   (eval "$ac_link") 2>&5
11766   ac_status=$?
11767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11768   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11769   { (case "(($ac_try" in
11770   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11771   *) ac_try_echo=$ac_try;;
11772 esac
11773 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11774   (eval "$ac_try") 2>&5
11775   ac_status=$?
11776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11777   (exit $ac_status); }; }; then
11778   path_lastlog=`cat conftestval`
11779 else
11780   echo "$as_me: program exited with status $ac_status" >&5
11781 echo "$as_me: failed program was:" >&5
11782 sed 's/^/| /' conftest.$ac_ext >&5
11783
11784 ( exit $ac_status )
11785 path_lastlog=
11786 fi
11787 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11788 fi
11789
11790
11791 fi
11792 { echo "$as_me:$LINENO: result: $path_lastlog" >&5
11793 echo "${ECHO_T}$path_lastlog" >&6; }
11794 if test x$path_lastlog != x; then
11795
11796 cat >>confdefs.h <<_ACEOF
11797 #define LASTLOG_FILE "$path_lastlog"
11798 _ACEOF
11799
11800 fi
11801
11802 { echo "$as_me:$LINENO: checking where lastlogx is located" >&5
11803 echo $ECHO_N "checking where lastlogx is located... $ECHO_C" >&6; }
11804 if test "${path_lastlogx+set}" = set; then
11805   echo $ECHO_N "(cached) $ECHO_C" >&6
11806 else
11807   if test "$cross_compiling" = yes; then
11808     { echo "$as_me:$LINENO: WARNING: Define LASTLOGX_FILE in config.h manually" >&5
11809 echo "$as_me: WARNING: Define LASTLOGX_FILE in config.h manually" >&2;}
11810 else
11811   cat >conftest.$ac_ext <<_ACEOF
11812 /* confdefs.h.  */
11813 _ACEOF
11814 cat confdefs.h >>conftest.$ac_ext
11815 cat >>conftest.$ac_ext <<_ACEOF
11816 /* end confdefs.h.  */
11817 #include <stdio.h>
11818 #include <stdlib.h>
11819 #ifdef HAVE_UTMPX_H
11820 #include <utmpx.h>
11821 #endif
11822 #include <errno.h>
11823 main()
11824 {
11825     char **w, *wtmplist[] = { "/var/log/lastlogx", "/var/adm/lastlogx", NULL };
11826     FILE *a, *f=fopen("conftestval", "w");
11827     if (!f) exit(1);
11828 #ifdef LASTLOGX_FILE
11829     fprintf(f, "%s\n", LASTLOGX_FILE);
11830     exit(0);
11831 #endif
11832 #ifdef _PATH_LASTLOGX
11833     fprintf(f, "%s\n", _PATH_LASTLOGX);
11834     exit(0);
11835 #endif
11836     for (w = wtmplist; *w; w++) {
11837         if ((a = fopen(*w, "r")) != NULL || errno == EACCES) {
11838             fprintf(f, "%s\n", *w);
11839             exit(0);
11840         }
11841     }
11842     exit(0);
11843 }
11844 _ACEOF
11845 rm -f conftest$ac_exeext
11846 if { (ac_try="$ac_link"
11847 case "(($ac_try" in
11848   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11849   *) ac_try_echo=$ac_try;;
11850 esac
11851 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11852   (eval "$ac_link") 2>&5
11853   ac_status=$?
11854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11855   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11856   { (case "(($ac_try" in
11857   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11858   *) ac_try_echo=$ac_try;;
11859 esac
11860 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11861   (eval "$ac_try") 2>&5
11862   ac_status=$?
11863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11864   (exit $ac_status); }; }; then
11865   path_lastlogx=`cat conftestval`
11866 else
11867   echo "$as_me: program exited with status $ac_status" >&5
11868 echo "$as_me: failed program was:" >&5
11869 sed 's/^/| /' conftest.$ac_ext >&5
11870
11871 ( exit $ac_status )
11872 path_lastlogx=
11873 fi
11874 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11875 fi
11876
11877
11878 fi
11879 { echo "$as_me:$LINENO: result: $path_lastlogx" >&5
11880 echo "${ECHO_T}$path_lastlogx" >&6; }
11881 if test x$path_lastlogx != x; then
11882
11883 cat >>confdefs.h <<_ACEOF
11884 #define LASTLOGX_FILE "$path_lastlogx"
11885 _ACEOF
11886
11887 fi
11888
11889
11890
11891
11892 save_LIBS=$LIBS
11893 save_CFLAGS=$CFLAGS
11894 CFLAGS="$CFLAGS $X_CFLAGS"
11895 LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11"
11896 if test x$support_xim = xyes; then
11897   { echo "$as_me:$LINENO: checking for working Xlocale" >&5
11898 echo $ECHO_N "checking for working Xlocale... $ECHO_C" >&6; }
11899 if test "${rxvt_cv_func_xlocale+set}" = set; then
11900   echo $ECHO_N "(cached) $ECHO_C" >&6
11901 else
11902   if test "$cross_compiling" = yes; then
11903       :
11904 else
11905   cat >conftest.$ac_ext <<_ACEOF
11906 /* confdefs.h.  */
11907 _ACEOF
11908 cat confdefs.h >>conftest.$ac_ext
11909 cat >>conftest.$ac_ext <<_ACEOF
11910 /* end confdefs.h.  */
11911 #include <X11/Xlib.h>
11912   #include <stdlib.h>
11913   main() {
11914   char *p;
11915   if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p)
11916   exit (XSupportsLocale() ? 0 : 1);
11917   else
11918   exit (1);}
11919 _ACEOF
11920 rm -f conftest$ac_exeext
11921 if { (ac_try="$ac_link"
11922 case "(($ac_try" in
11923   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11924   *) ac_try_echo=$ac_try;;
11925 esac
11926 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11927   (eval "$ac_link") 2>&5
11928   ac_status=$?
11929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11930   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11931   { (case "(($ac_try" in
11932   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11933   *) ac_try_echo=$ac_try;;
11934 esac
11935 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11936   (eval "$ac_try") 2>&5
11937   ac_status=$?
11938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11939   (exit $ac_status); }; }; then
11940       rxvt_cv_func_xlocale=yes
11941 else
11942   echo "$as_me: program exited with status $ac_status" >&5
11943 echo "$as_me: failed program was:" >&5
11944 sed 's/^/| /' conftest.$ac_ext >&5
11945
11946 ( exit $ac_status )
11947 rxvt_cv_func_xlocale=no
11948 fi
11949 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11950 fi
11951
11952
11953 fi
11954 { echo "$as_me:$LINENO: result: $rxvt_cv_func_xlocale" >&5
11955 echo "${ECHO_T}$rxvt_cv_func_xlocale" >&6; }
11956   if test x$rxvt_cv_func_xlocale = xyes; then
11957
11958 cat >>confdefs.h <<\_ACEOF
11959 #define USE_XIM 1
11960 _ACEOF
11961
11962     { echo "$as_me:$LINENO: checking for broken XIM callback" >&5
11963 echo $ECHO_N "checking for broken XIM callback... $ECHO_C" >&6; }
11964 if test "${rxvt_broken_ximcb+set}" = set; then
11965   echo $ECHO_N "(cached) $ECHO_C" >&6
11966 else
11967   cat >conftest.$ac_ext <<_ACEOF
11968
11969     #include <X11/Xlib.h>
11970
11971     void im_destroy_cb (XIC unused1, XPointer client_data, XPointer unused3);
11972
11973     void f() {
11974       XIMCallback cb;
11975       cb.callback = im_destroy_cb;
11976     }
11977
11978 _ACEOF
11979 rm -f conftest.$ac_objext
11980 if { (ac_try="$ac_compile"
11981 case "(($ac_try" in
11982   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11983   *) ac_try_echo=$ac_try;;
11984 esac
11985 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11986   (eval "$ac_compile") 2>conftest.er1
11987   ac_status=$?
11988   grep -v '^ *+' conftest.er1 >conftest.err
11989   rm -f conftest.er1
11990   cat conftest.err >&5
11991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11992   (exit $ac_status); } && {
11993          test -z "$ac_cxx_werror_flag" ||
11994          test ! -s conftest.err
11995        } && test -s conftest.$ac_objext; then
11996   rxvt_broken_ximcb=yes
11997 else
11998   echo "$as_me: failed program was:" >&5
11999 sed 's/^/| /' conftest.$ac_ext >&5
12000
12001         rxvt_broken_ximcb=no
12002 fi
12003
12004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12005 fi
12006 { echo "$as_me:$LINENO: result: $rxvt_broken_ximcb" >&5
12007 echo "${ECHO_T}$rxvt_broken_ximcb" >&6; }
12008
12009     if test x$rxvt_broken_ximcb = xyes; then
12010
12011 cat >>confdefs.h <<\_ACEOF
12012 #define XIMCB_PROTO_BROKEN 1
12013 _ACEOF
12014
12015     fi
12016   fi
12017 fi
12018
12019 { echo "$as_me:$LINENO: checking for working X setlocale" >&5
12020 echo $ECHO_N "checking for working X setlocale... $ECHO_C" >&6; }
12021 if test "${rxvt_cv_func_xsetlocale+set}" = set; then
12022   echo $ECHO_N "(cached) $ECHO_C" >&6
12023 else
12024   cat >conftest.$ac_ext <<_ACEOF
12025 /* confdefs.h.  */
12026 _ACEOF
12027 cat confdefs.h >>conftest.$ac_ext
12028 cat >>conftest.$ac_ext <<_ACEOF
12029 /* end confdefs.h.  */
12030 #define X_LOCALE 1
12031 #include <X11/Xlocale.h>
12032 int
12033 main ()
12034 {
12035 setlocale(LC_CTYPE, "");
12036   ;
12037   return 0;
12038 }
12039 _ACEOF
12040 rm -f conftest.$ac_objext conftest$ac_exeext
12041 if { (ac_try="$ac_link"
12042 case "(($ac_try" in
12043   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12044   *) ac_try_echo=$ac_try;;
12045 esac
12046 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12047   (eval "$ac_link") 2>conftest.er1
12048   ac_status=$?
12049   grep -v '^ *+' conftest.er1 >conftest.err
12050   rm -f conftest.er1
12051   cat conftest.err >&5
12052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12053   (exit $ac_status); } && {
12054          test -z "$ac_cxx_werror_flag" ||
12055          test ! -s conftest.err
12056        } && test -s conftest$ac_exeext &&
12057        $as_test_x conftest$ac_exeext; then
12058   rxvt_cv_func_xsetlocale=yes
12059 else
12060   echo "$as_me: failed program was:" >&5
12061 sed 's/^/| /' conftest.$ac_ext >&5
12062
12063         rxvt_cv_func_xsetlocale=no
12064 fi
12065
12066 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12067       conftest$ac_exeext conftest.$ac_ext
12068 fi
12069 { echo "$as_me:$LINENO: result: $rxvt_cv_func_xsetlocale" >&5
12070 echo "${ECHO_T}$rxvt_cv_func_xsetlocale" >&6; }
12071 if test x$rxvt_cv_func_xsetlocale = xyes; then
12072
12073 cat >>confdefs.h <<\_ACEOF
12074 #define HAVE_XSETLOCALE 1
12075 _ACEOF
12076
12077 fi
12078 LIBS=$save_LIBS
12079 CFLAGS=$save_CFLAGS
12080
12081 { echo "$as_me:$LINENO: checking for working plain setlocale" >&5
12082 echo $ECHO_N "checking for working plain setlocale... $ECHO_C" >&6; }
12083 if test "${rxvt_cv_func_setlocale+set}" = set; then
12084   echo $ECHO_N "(cached) $ECHO_C" >&6
12085 else
12086   cat >conftest.$ac_ext <<_ACEOF
12087 /* confdefs.h.  */
12088 _ACEOF
12089 cat confdefs.h >>conftest.$ac_ext
12090 cat >>conftest.$ac_ext <<_ACEOF
12091 /* end confdefs.h.  */
12092 #include <clocale>
12093 int
12094 main ()
12095 {
12096 setlocale(LC_CTYPE, "");
12097   ;
12098   return 0;
12099 }
12100 _ACEOF
12101 rm -f conftest.$ac_objext conftest$ac_exeext
12102 if { (ac_try="$ac_link"
12103 case "(($ac_try" in
12104   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12105   *) ac_try_echo=$ac_try;;
12106 esac
12107 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12108   (eval "$ac_link") 2>conftest.er1
12109   ac_status=$?
12110   grep -v '^ *+' conftest.er1 >conftest.err
12111   rm -f conftest.er1
12112   cat conftest.err >&5
12113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12114   (exit $ac_status); } && {
12115          test -z "$ac_cxx_werror_flag" ||
12116          test ! -s conftest.err
12117        } && test -s conftest$ac_exeext &&
12118        $as_test_x conftest$ac_exeext; then
12119   rxvt_cv_func_setlocale=yes
12120 else
12121   echo "$as_me: failed program was:" >&5
12122 sed 's/^/| /' conftest.$ac_ext >&5
12123
12124         rxvt_cv_func_setlocale=no
12125 fi
12126
12127 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12128       conftest$ac_exeext conftest.$ac_ext
12129 fi
12130 { echo "$as_me:$LINENO: result: $rxvt_cv_func_setlocale" >&5
12131 echo "${ECHO_T}$rxvt_cv_func_setlocale" >&6; }
12132 if test x$rxvt_cv_func_setlocale = xyes; then
12133
12134 cat >>confdefs.h <<\_ACEOF
12135 #define HAVE_SETLOCALE 1
12136 _ACEOF
12137
12138 fi
12139
12140 { echo "$as_me:$LINENO: checking for working nl_langinfo" >&5
12141 echo $ECHO_N "checking for working nl_langinfo... $ECHO_C" >&6; }
12142 if test "${rxvt_cv_func_nl_langinfo+set}" = set; then
12143   echo $ECHO_N "(cached) $ECHO_C" >&6
12144 else
12145   cat >conftest.$ac_ext <<_ACEOF
12146 /* confdefs.h.  */
12147 _ACEOF
12148 cat confdefs.h >>conftest.$ac_ext
12149 cat >>conftest.$ac_ext <<_ACEOF
12150 /* end confdefs.h.  */
12151 #include <langinfo.h>
12152 int
12153 main ()
12154 {
12155 nl_langinfo(CODESET);
12156   ;
12157   return 0;
12158 }
12159 _ACEOF
12160 rm -f conftest.$ac_objext conftest$ac_exeext
12161 if { (ac_try="$ac_link"
12162 case "(($ac_try" in
12163   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12164   *) ac_try_echo=$ac_try;;
12165 esac
12166 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12167   (eval "$ac_link") 2>conftest.er1
12168   ac_status=$?
12169   grep -v '^ *+' conftest.er1 >conftest.err
12170   rm -f conftest.er1
12171   cat conftest.err >&5
12172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12173   (exit $ac_status); } && {
12174          test -z "$ac_cxx_werror_flag" ||
12175          test ! -s conftest.err
12176        } && test -s conftest$ac_exeext &&
12177        $as_test_x conftest$ac_exeext; then
12178   rxvt_cv_func_nl_langinfo=yes
12179 else
12180   echo "$as_me: failed program was:" >&5
12181 sed 's/^/| /' conftest.$ac_ext >&5
12182
12183         rxvt_cv_func_nl_langinfo=no
12184 fi
12185
12186 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12187       conftest$ac_exeext conftest.$ac_ext
12188 fi
12189 { echo "$as_me:$LINENO: result: $rxvt_cv_func_nl_langinfo" >&5
12190 echo "${ECHO_T}$rxvt_cv_func_nl_langinfo" >&6; }
12191 if test x$rxvt_cv_func_nl_langinfo = xyes; then
12192
12193 cat >>confdefs.h <<\_ACEOF
12194 #define HAVE_NL_LANGINFO 1
12195 _ACEOF
12196
12197 fi
12198
12199
12200 { echo "$as_me:$LINENO: checking for unix-compliant filehandle passing ability" >&5
12201 echo $ECHO_N "checking for unix-compliant filehandle passing ability... $ECHO_C" >&6; }
12202 if test "${can_pass_fds+set}" = set; then
12203   echo $ECHO_N "(cached) $ECHO_C" >&6
12204 else
12205   cat >conftest.$ac_ext <<_ACEOF
12206 /* confdefs.h.  */
12207 _ACEOF
12208 cat confdefs.h >>conftest.$ac_ext
12209 cat >>conftest.$ac_ext <<_ACEOF
12210 /* end confdefs.h.  */
12211
12212 #include <cstddef> // broken bsds (is that redundant?) need this
12213 #include <sys/types.h>
12214 #include <sys/socket.h>
12215 #include <sys/uio.h>
12216
12217 int
12218 main ()
12219 {
12220
12221 {
12222   msghdr msg;
12223   iovec iov;
12224   char buf [100];
12225   char data = 0;
12226
12227   iov.iov_base = &data;
12228   iov.iov_len  = 1;
12229
12230   msg.msg_iov        = &iov;
12231   msg.msg_iovlen     = 1;
12232   msg.msg_control    = buf;
12233   msg.msg_controllen = sizeof buf;
12234
12235   cmsghdr *cmsg = CMSG_FIRSTHDR (&msg);
12236   cmsg->cmsg_level = SOL_SOCKET;
12237   cmsg->cmsg_type  = SCM_RIGHTS;
12238   cmsg->cmsg_len   = 100;
12239
12240   *(int *)CMSG_DATA (cmsg) = 5;
12241
12242   return sendmsg (3, &msg, 0);
12243 }
12244
12245   ;
12246   return 0;
12247 }
12248 _ACEOF
12249 rm -f conftest.$ac_objext conftest$ac_exeext
12250 if { (ac_try="$ac_link"
12251 case "(($ac_try" in
12252   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12253   *) ac_try_echo=$ac_try;;
12254 esac
12255 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12256   (eval "$ac_link") 2>conftest.er1
12257   ac_status=$?
12258   grep -v '^ *+' conftest.er1 >conftest.err
12259   rm -f conftest.er1
12260   cat conftest.err >&5
12261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12262   (exit $ac_status); } && {
12263          test -z "$ac_cxx_werror_flag" ||
12264          test ! -s conftest.err
12265        } && test -s conftest$ac_exeext &&
12266        $as_test_x conftest$ac_exeext; then
12267   can_pass_fds=yes
12268 else
12269   echo "$as_me: failed program was:" >&5
12270 sed 's/^/| /' conftest.$ac_ext >&5
12271
12272         can_pass_fds=no
12273 fi
12274
12275 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12276       conftest$ac_exeext conftest.$ac_ext
12277 fi
12278 { echo "$as_me:$LINENO: result: $can_pass_fds" >&5
12279 echo "${ECHO_T}$can_pass_fds" >&6; }
12280 if test x$can_pass_fds = xyes; then
12281
12282 cat >>confdefs.h <<\_ACEOF
12283 #define HAVE_UNIX_FDPASS 1
12284 _ACEOF
12285
12286 else
12287    { { echo "$as_me:$LINENO: error: libptytty requires unix-compliant filehandle passing ability" >&5
12288 echo "$as_me: error: libptytty requires unix-compliant filehandle passing ability" >&2;}
12289    { (exit 1); exit 1; }; }
12290 fi
12291
12292
12293
12294
12295
12296
12297
12298
12299 for ac_header in \
12300   pty.h \
12301   util.h \
12302   libutil.h \
12303   sys/ioctl.h \
12304   sys/stropts.h \
12305
12306 do
12307 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12308 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12309   { echo "$as_me:$LINENO: checking for $ac_header" >&5
12310 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12311 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12312   echo $ECHO_N "(cached) $ECHO_C" >&6
12313 fi
12314 ac_res=`eval echo '${'$as_ac_Header'}'`
12315                { echo "$as_me:$LINENO: result: $ac_res" >&5
12316 echo "${ECHO_T}$ac_res" >&6; }
12317 else
12318   # Is the header compilable?
12319 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
12320 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
12321 cat >conftest.$ac_ext <<_ACEOF
12322 /* confdefs.h.  */
12323 _ACEOF
12324 cat confdefs.h >>conftest.$ac_ext
12325 cat >>conftest.$ac_ext <<_ACEOF
12326 /* end confdefs.h.  */
12327 $ac_includes_default
12328 #include <$ac_header>
12329 _ACEOF
12330 rm -f conftest.$ac_objext
12331 if { (ac_try="$ac_compile"
12332 case "(($ac_try" in
12333   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12334   *) ac_try_echo=$ac_try;;
12335 esac
12336 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12337   (eval "$ac_compile") 2>conftest.er1
12338   ac_status=$?
12339   grep -v '^ *+' conftest.er1 >conftest.err
12340   rm -f conftest.er1
12341   cat conftest.err >&5
12342   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12343   (exit $ac_status); } && {
12344          test -z "$ac_cxx_werror_flag" ||
12345          test ! -s conftest.err
12346        } && test -s conftest.$ac_objext; then
12347   ac_header_compiler=yes
12348 else
12349   echo "$as_me: failed program was:" >&5
12350 sed 's/^/| /' conftest.$ac_ext >&5
12351
12352         ac_header_compiler=no
12353 fi
12354
12355 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12356 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12357 echo "${ECHO_T}$ac_header_compiler" >&6; }
12358
12359 # Is the header present?
12360 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
12361 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
12362 cat >conftest.$ac_ext <<_ACEOF
12363 /* confdefs.h.  */
12364 _ACEOF
12365 cat confdefs.h >>conftest.$ac_ext
12366 cat >>conftest.$ac_ext <<_ACEOF
12367 /* end confdefs.h.  */
12368 #include <$ac_header>
12369 _ACEOF
12370 if { (ac_try="$ac_cpp conftest.$ac_ext"
12371 case "(($ac_try" in
12372   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12373   *) ac_try_echo=$ac_try;;
12374 esac
12375 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12376   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12377   ac_status=$?
12378   grep -v '^ *+' conftest.er1 >conftest.err
12379   rm -f conftest.er1
12380   cat conftest.err >&5
12381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12382   (exit $ac_status); } >/dev/null && {
12383          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
12384          test ! -s conftest.err
12385        }; then
12386   ac_header_preproc=yes
12387 else
12388   echo "$as_me: failed program was:" >&5
12389 sed 's/^/| /' conftest.$ac_ext >&5
12390
12391   ac_header_preproc=no
12392 fi
12393
12394 rm -f conftest.err conftest.$ac_ext
12395 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12396 echo "${ECHO_T}$ac_header_preproc" >&6; }
12397
12398 # So?  What about this header?
12399 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
12400   yes:no: )
12401     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12402 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12403     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12404 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12405     ac_header_preproc=yes
12406     ;;
12407   no:yes:* )
12408     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12409 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12410     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12411 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12412     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12413 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12414     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12415 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12416     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12417 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12418     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12419 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12420
12421     ;;
12422 esac
12423 { echo "$as_me:$LINENO: checking for $ac_header" >&5
12424 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12425 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12426   echo $ECHO_N "(cached) $ECHO_C" >&6
12427 else
12428   eval "$as_ac_Header=\$ac_header_preproc"
12429 fi
12430 ac_res=`eval echo '${'$as_ac_Header'}'`
12431                { echo "$as_me:$LINENO: result: $ac_res" >&5
12432 echo "${ECHO_T}$ac_res" >&6; }
12433
12434 fi
12435 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12436   cat >>confdefs.h <<_ACEOF
12437 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12438 _ACEOF
12439
12440 fi
12441
12442 done
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454 for ac_func in \
12455   revoke \
12456   _getpty \
12457   getpt \
12458   posix_openpt \
12459   isastream \
12460   setuid \
12461   seteuid \
12462   setreuid \
12463   setresuid \
12464
12465 do
12466 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12467 { echo "$as_me:$LINENO: checking for $ac_func" >&5
12468 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
12469 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
12470   echo $ECHO_N "(cached) $ECHO_C" >&6
12471 else
12472   cat >conftest.$ac_ext <<_ACEOF
12473 /* confdefs.h.  */
12474 _ACEOF
12475 cat confdefs.h >>conftest.$ac_ext
12476 cat >>conftest.$ac_ext <<_ACEOF
12477 /* end confdefs.h.  */
12478 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
12479    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
12480 #define $ac_func innocuous_$ac_func
12481
12482 /* System header to define __stub macros and hopefully few prototypes,
12483     which can conflict with char $ac_func (); below.
12484     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12485     <limits.h> exists even on freestanding compilers.  */
12486
12487 #ifdef __STDC__
12488 # include <limits.h>
12489 #else
12490 # include <assert.h>
12491 #endif
12492
12493 #undef $ac_func
12494
12495 /* Override any GCC internal prototype to avoid an error.
12496    Use char because int might match the return type of a GCC
12497    builtin and then its argument prototype would still apply.  */
12498 #ifdef __cplusplus
12499 extern "C"
12500 #endif
12501 char $ac_func ();
12502 /* The GNU C library defines this for functions which it implements
12503     to always fail with ENOSYS.  Some functions are actually named
12504     something starting with __ and the normal name is an alias.  */
12505 #if defined __stub_$ac_func || defined __stub___$ac_func
12506 choke me
12507 #endif
12508
12509 int
12510 main ()
12511 {
12512 return $ac_func ();
12513   ;
12514   return 0;
12515 }
12516 _ACEOF
12517 rm -f conftest.$ac_objext conftest$ac_exeext
12518 if { (ac_try="$ac_link"
12519 case "(($ac_try" in
12520   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12521   *) ac_try_echo=$ac_try;;
12522 esac
12523 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12524   (eval "$ac_link") 2>conftest.er1
12525   ac_status=$?
12526   grep -v '^ *+' conftest.er1 >conftest.err
12527   rm -f conftest.er1
12528   cat conftest.err >&5
12529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12530   (exit $ac_status); } && {
12531          test -z "$ac_cxx_werror_flag" ||
12532          test ! -s conftest.err
12533        } && test -s conftest$ac_exeext &&
12534        $as_test_x conftest$ac_exeext; then
12535   eval "$as_ac_var=yes"
12536 else
12537   echo "$as_me: failed program was:" >&5
12538 sed 's/^/| /' conftest.$ac_ext >&5
12539
12540         eval "$as_ac_var=no"
12541 fi
12542
12543 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12544       conftest$ac_exeext conftest.$ac_ext
12545 fi
12546 ac_res=`eval echo '${'$as_ac_var'}'`
12547                { echo "$as_me:$LINENO: result: $ac_res" >&5
12548 echo "${ECHO_T}$ac_res" >&6; }
12549 if test `eval echo '${'$as_ac_var'}'` = yes; then
12550   cat >>confdefs.h <<_ACEOF
12551 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12552 _ACEOF
12553
12554 fi
12555 done
12556
12557
12558 have_clone=no
12559
12560 { echo "$as_me:$LINENO: checking for /dev/ptym/clone" >&5
12561 echo $ECHO_N "checking for /dev/ptym/clone... $ECHO_C" >&6; }
12562 if test -e /dev/ptym/clone; then
12563   { echo "$as_me:$LINENO: result: yes" >&5
12564 echo "${ECHO_T}yes" >&6; }
12565
12566 cat >>confdefs.h <<\_ACEOF
12567 #define HAVE_DEV_CLONE 1
12568 _ACEOF
12569
12570
12571 cat >>confdefs.h <<\_ACEOF
12572 #define CLONE_DEVICE "/dev/ptym/clone"
12573 _ACEOF
12574
12575   have_clone=yes
12576 else
12577   { echo "$as_me:$LINENO: result: no" >&5
12578 echo "${ECHO_T}no" >&6; }
12579 fi
12580
12581 { echo "$as_me:$LINENO: checking for /dev/ptc" >&5
12582 echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
12583 if test -e /dev/ptc; then
12584   { echo "$as_me:$LINENO: result: yes" >&5
12585 echo "${ECHO_T}yes" >&6; }
12586
12587 cat >>confdefs.h <<\_ACEOF
12588 #define HAVE_DEV_PTC 1
12589 _ACEOF
12590
12591
12592 cat >>confdefs.h <<\_ACEOF
12593 #define CLONE_DEVICE "/dev/ptc"
12594 _ACEOF
12595
12596   have_clone=yes
12597 else
12598   { echo "$as_me:$LINENO: result: no" >&5
12599 echo "${ECHO_T}no" >&6; }
12600 fi
12601
12602 case $host in
12603   *-*-cygwin*)
12604     have_clone=yes
12605
12606 cat >>confdefs.h <<\_ACEOF
12607 #define CLONE_DEVICE "/dev/ptmx"
12608 _ACEOF
12609
12610     ;;
12611   *)
12612     { echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
12613 echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
12614     if test -e /dev/ptmx; then
12615       { echo "$as_me:$LINENO: result: yes" >&5
12616 echo "${ECHO_T}yes" >&6; }
12617
12618 cat >>confdefs.h <<\_ACEOF
12619 #define HAVE_DEV_PTMX 1
12620 _ACEOF
12621
12622
12623 cat >>confdefs.h <<\_ACEOF
12624 #define CLONE_DEVICE "/dev/ptmx"
12625 _ACEOF
12626
12627       have_clone=yes
12628     else
12629       { echo "$as_me:$LINENO: result: no" >&5
12630 echo "${ECHO_T}no" >&6; }
12631     fi
12632     ;;
12633 esac
12634
12635 if test x$ac_cv_func_getpt = xyes -o x$ac_cv_func_posix_openpt = xyes -o x$have_clone = xyes; then
12636   { echo "$as_me:$LINENO: checking for UNIX98 ptys" >&5
12637 echo $ECHO_N "checking for UNIX98 ptys... $ECHO_C" >&6; }
12638   cat >conftest.$ac_ext <<_ACEOF
12639 /* confdefs.h.  */
12640 _ACEOF
12641 cat confdefs.h >>conftest.$ac_ext
12642 cat >>conftest.$ac_ext <<_ACEOF
12643 /* end confdefs.h.  */
12644 #include <stdlib.h>
12645 int
12646 main ()
12647 {
12648 grantpt(0);unlockpt(0);ptsname(0);
12649   ;
12650   return 0;
12651 }
12652 _ACEOF
12653 rm -f conftest.$ac_objext conftest$ac_exeext
12654 if { (ac_try="$ac_link"
12655 case "(($ac_try" in
12656   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12657   *) ac_try_echo=$ac_try;;
12658 esac
12659 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12660   (eval "$ac_link") 2>conftest.er1
12661   ac_status=$?
12662   grep -v '^ *+' conftest.er1 >conftest.err
12663   rm -f conftest.er1
12664   cat conftest.err >&5
12665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12666   (exit $ac_status); } && {
12667          test -z "$ac_cxx_werror_flag" ||
12668          test ! -s conftest.err
12669        } && test -s conftest$ac_exeext &&
12670        $as_test_x conftest$ac_exeext; then
12671   unix98_pty=yes
12672
12673 cat >>confdefs.h <<\_ACEOF
12674 #define UNIX98_PTY 1
12675 _ACEOF
12676
12677                { echo "$as_me:$LINENO: result: yes" >&5
12678 echo "${ECHO_T}yes" >&6; }
12679 else
12680   echo "$as_me: failed program was:" >&5
12681 sed 's/^/| /' conftest.$ac_ext >&5
12682
12683         { echo "$as_me:$LINENO: result: no" >&5
12684 echo "${ECHO_T}no" >&6; }
12685 fi
12686
12687 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12688       conftest$ac_exeext conftest.$ac_ext
12689 fi
12690
12691 if test -z "$unix98_pty"; then
12692
12693 for ac_func in openpty
12694 do
12695 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12696 { echo "$as_me:$LINENO: checking for $ac_func" >&5
12697 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
12698 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
12699   echo $ECHO_N "(cached) $ECHO_C" >&6
12700 else
12701   cat >conftest.$ac_ext <<_ACEOF
12702 /* confdefs.h.  */
12703 _ACEOF
12704 cat confdefs.h >>conftest.$ac_ext
12705 cat >>conftest.$ac_ext <<_ACEOF
12706 /* end confdefs.h.  */
12707 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
12708    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
12709 #define $ac_func innocuous_$ac_func
12710
12711 /* System header to define __stub macros and hopefully few prototypes,
12712     which can conflict with char $ac_func (); below.
12713     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12714     <limits.h> exists even on freestanding compilers.  */
12715
12716 #ifdef __STDC__
12717 # include <limits.h>
12718 #else
12719 # include <assert.h>
12720 #endif
12721
12722 #undef $ac_func
12723
12724 /* Override any GCC internal prototype to avoid an error.
12725    Use char because int might match the return type of a GCC
12726    builtin and then its argument prototype would still apply.  */
12727 #ifdef __cplusplus
12728 extern "C"
12729 #endif
12730 char $ac_func ();
12731 /* The GNU C library defines this for functions which it implements
12732     to always fail with ENOSYS.  Some functions are actually named
12733     something starting with __ and the normal name is an alias.  */
12734 #if defined __stub_$ac_func || defined __stub___$ac_func
12735 choke me
12736 #endif
12737
12738 int
12739 main ()
12740 {
12741 return $ac_func ();
12742   ;
12743   return 0;
12744 }
12745 _ACEOF
12746 rm -f conftest.$ac_objext conftest$ac_exeext
12747 if { (ac_try="$ac_link"
12748 case "(($ac_try" in
12749   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12750   *) ac_try_echo=$ac_try;;
12751 esac
12752 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12753   (eval "$ac_link") 2>conftest.er1
12754   ac_status=$?
12755   grep -v '^ *+' conftest.er1 >conftest.err
12756   rm -f conftest.er1
12757   cat conftest.err >&5
12758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12759   (exit $ac_status); } && {
12760          test -z "$ac_cxx_werror_flag" ||
12761          test ! -s conftest.err
12762        } && test -s conftest$ac_exeext &&
12763        $as_test_x conftest$ac_exeext; then
12764   eval "$as_ac_var=yes"
12765 else
12766   echo "$as_me: failed program was:" >&5
12767 sed 's/^/| /' conftest.$ac_ext >&5
12768
12769         eval "$as_ac_var=no"
12770 fi
12771
12772 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12773       conftest$ac_exeext conftest.$ac_ext
12774 fi
12775 ac_res=`eval echo '${'$as_ac_var'}'`
12776                { echo "$as_me:$LINENO: result: $ac_res" >&5
12777 echo "${ECHO_T}$ac_res" >&6; }
12778 if test `eval echo '${'$as_ac_var'}'` = yes; then
12779   cat >>confdefs.h <<_ACEOF
12780 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12781 _ACEOF
12782
12783 else
12784   { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
12785 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
12786 if test "${ac_cv_lib_util_openpty+set}" = set; then
12787   echo $ECHO_N "(cached) $ECHO_C" >&6
12788 else
12789   ac_check_lib_save_LIBS=$LIBS
12790 LIBS="-lutil  $LIBS"
12791 cat >conftest.$ac_ext <<_ACEOF
12792 /* confdefs.h.  */
12793 _ACEOF
12794 cat confdefs.h >>conftest.$ac_ext
12795 cat >>conftest.$ac_ext <<_ACEOF
12796 /* end confdefs.h.  */
12797
12798 /* Override any GCC internal prototype to avoid an error.
12799    Use char because int might match the return type of a GCC
12800    builtin and then its argument prototype would still apply.  */
12801 #ifdef __cplusplus
12802 extern "C"
12803 #endif
12804 char openpty ();
12805 int
12806 main ()
12807 {
12808 return openpty ();
12809   ;
12810   return 0;
12811 }
12812 _ACEOF
12813 rm -f conftest.$ac_objext conftest$ac_exeext
12814 if { (ac_try="$ac_link"
12815 case "(($ac_try" in
12816   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12817   *) ac_try_echo=$ac_try;;
12818 esac
12819 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12820   (eval "$ac_link") 2>conftest.er1
12821   ac_status=$?
12822   grep -v '^ *+' conftest.er1 >conftest.err
12823   rm -f conftest.er1
12824   cat conftest.err >&5
12825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12826   (exit $ac_status); } && {
12827          test -z "$ac_cxx_werror_flag" ||
12828          test ! -s conftest.err
12829        } && test -s conftest$ac_exeext &&
12830        $as_test_x conftest$ac_exeext; then
12831   ac_cv_lib_util_openpty=yes
12832 else
12833   echo "$as_me: failed program was:" >&5
12834 sed 's/^/| /' conftest.$ac_ext >&5
12835
12836         ac_cv_lib_util_openpty=no
12837 fi
12838
12839 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12840       conftest$ac_exeext conftest.$ac_ext
12841 LIBS=$ac_check_lib_save_LIBS
12842 fi
12843 { echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
12844 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
12845 if test $ac_cv_lib_util_openpty = yes; then
12846   cat >>confdefs.h <<\_ACEOF
12847 #define HAVE_OPENPTY 1
12848 _ACEOF
12849  LIBS="$LIBS -lutil"
12850 fi
12851
12852 fi
12853 done
12854
12855 fi
12856
12857
12858
12859 { echo "$as_me:$LINENO: checking for tty group" >&5
12860 echo $ECHO_N "checking for tty group... $ECHO_C" >&6; }
12861 if test "${tty_group+set}" = set; then
12862   echo $ECHO_N "(cached) $ECHO_C" >&6
12863 else
12864   if test "$cross_compiling" = yes; then
12865   tty_group=no
12866 else
12867   cat >conftest.$ac_ext <<_ACEOF
12868 /* confdefs.h.  */
12869 _ACEOF
12870 cat confdefs.h >>conftest.$ac_ext
12871 cat >>conftest.$ac_ext <<_ACEOF
12872 /* end confdefs.h.  */
12873
12874 #include <sys/types.h>
12875 #include <sys/stat.h>
12876 #include <unistd.h>
12877 #include <grp.h>
12878
12879 main()
12880 {
12881   struct stat st;
12882   struct group *gr;
12883   char *tty;
12884   gr = getgrnam("tty");
12885   tty = ttyname(0);
12886   if (gr != 0
12887       && tty != 0
12888       && (stat(tty, &st)) == 0
12889       && st.st_gid == gr->gr_gid)
12890     return 0;
12891   else
12892     return 1;
12893 }
12894 _ACEOF
12895 rm -f conftest$ac_exeext
12896 if { (ac_try="$ac_link"
12897 case "(($ac_try" in
12898   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12899   *) ac_try_echo=$ac_try;;
12900 esac
12901 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12902   (eval "$ac_link") 2>&5
12903   ac_status=$?
12904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12905   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12906   { (case "(($ac_try" in
12907   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12908   *) ac_try_echo=$ac_try;;
12909 esac
12910 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12911   (eval "$ac_try") 2>&5
12912   ac_status=$?
12913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12914   (exit $ac_status); }; }; then
12915   tty_group=yes
12916 else
12917   echo "$as_me: program exited with status $ac_status" >&5
12918 echo "$as_me: failed program was:" >&5
12919 sed 's/^/| /' conftest.$ac_ext >&5
12920
12921 ( exit $ac_status )
12922 tty_group=no
12923 fi
12924 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12925 fi
12926
12927
12928 fi
12929 { echo "$as_me:$LINENO: result: $tty_group" >&5
12930 echo "${ECHO_T}$tty_group" >&6; }
12931 if test x$tty_group = xyes; then
12932
12933 cat >>confdefs.h <<\_ACEOF
12934 #define TTY_GID_SUPPORT 1
12935 _ACEOF
12936
12937 fi
12938
12939 if test x$support_xft = xyes; then
12940   # Extract the first word of "pkg-config", so it can be a program name with args.
12941 set dummy pkg-config; ac_word=$2
12942 { echo "$as_me:$LINENO: checking for $ac_word" >&5
12943 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
12944 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12945   echo $ECHO_N "(cached) $ECHO_C" >&6
12946 else
12947   case $PKG_CONFIG in
12948   [\\/]* | ?:[\\/]*)
12949   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12950   ;;
12951   *)
12952   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12953 for as_dir in $PATH
12954 do
12955   IFS=$as_save_IFS
12956   test -z "$as_dir" && as_dir=.
12957   for ac_exec_ext in '' $ac_executable_extensions; do
12958   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12959     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12960     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12961     break 2
12962   fi
12963 done
12964 done
12965 IFS=$as_save_IFS
12966
12967   test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12968   ;;
12969 esac
12970 fi
12971 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12972 if test -n "$PKG_CONFIG"; then
12973   { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12974 echo "${ECHO_T}$PKG_CONFIG" >&6; }
12975 else
12976   { echo "$as_me:$LINENO: result: no" >&5
12977 echo "${ECHO_T}no" >&6; }
12978 fi
12979
12980
12981   if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then
12982     X_LIBS="`$PKG_CONFIG xft --libs` $X_LIBS"
12983     CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`"
12984   else
12985     # Extract the first word of "xft-config", so it can be a program name with args.
12986 set dummy xft-config; ac_word=$2
12987 { echo "$as_me:$LINENO: checking for $ac_word" >&5
12988 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
12989 if test "${ac_cv_path_XFT_CONFIG+set}" = set; then
12990   echo $ECHO_N "(cached) $ECHO_C" >&6
12991 else
12992   case $XFT_CONFIG in
12993   [\\/]* | ?:[\\/]*)
12994   ac_cv_path_XFT_CONFIG="$XFT_CONFIG" # Let the user override the test with a path.
12995   ;;
12996   *)
12997   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12998 for as_dir in $PATH
12999 do
13000   IFS=$as_save_IFS
13001   test -z "$as_dir" && as_dir=.
13002   for ac_exec_ext in '' $ac_executable_extensions; do
13003   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13004     ac_cv_path_XFT_CONFIG="$as_dir/$ac_word$ac_exec_ext"
13005     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13006     break 2
13007   fi
13008 done
13009 done
13010 IFS=$as_save_IFS
13011
13012   test -z "$ac_cv_path_XFT_CONFIG" && ac_cv_path_XFT_CONFIG="no"
13013   ;;
13014 esac
13015 fi
13016 XFT_CONFIG=$ac_cv_path_XFT_CONFIG
13017 if test -n "$XFT_CONFIG"; then
13018   { echo "$as_me:$LINENO: result: $XFT_CONFIG" >&5
13019 echo "${ECHO_T}$XFT_CONFIG" >&6; }
13020 else
13021   { echo "$as_me:$LINENO: result: no" >&5
13022 echo "${ECHO_T}no" >&6; }
13023 fi
13024
13025
13026     if test $XFT_CONFIG != no; then
13027       X_LIBS="`$XFT_CONFIG --libs` $X_LIBS"
13028       CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`"
13029     fi
13030   fi
13031
13032   save_LIBS="$LIBS"
13033   LIBS="$LIBS $X_LIBS"
13034
13035 for ac_header in X11/Xft/Xft.h
13036 do
13037 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13038 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13039   { echo "$as_me:$LINENO: checking for $ac_header" >&5
13040 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13041 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13042   echo $ECHO_N "(cached) $ECHO_C" >&6
13043 fi
13044 ac_res=`eval echo '${'$as_ac_Header'}'`
13045                { echo "$as_me:$LINENO: result: $ac_res" >&5
13046 echo "${ECHO_T}$ac_res" >&6; }
13047 else
13048   # Is the header compilable?
13049 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
13050 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
13051 cat >conftest.$ac_ext <<_ACEOF
13052 /* confdefs.h.  */
13053 _ACEOF
13054 cat confdefs.h >>conftest.$ac_ext
13055 cat >>conftest.$ac_ext <<_ACEOF
13056 /* end confdefs.h.  */
13057 $ac_includes_default
13058 #include <$ac_header>
13059 _ACEOF
13060 rm -f conftest.$ac_objext
13061 if { (ac_try="$ac_compile"
13062 case "(($ac_try" in
13063   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13064   *) ac_try_echo=$ac_try;;
13065 esac
13066 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13067   (eval "$ac_compile") 2>conftest.er1
13068   ac_status=$?
13069   grep -v '^ *+' conftest.er1 >conftest.err
13070   rm -f conftest.er1
13071   cat conftest.err >&5
13072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13073   (exit $ac_status); } && {
13074          test -z "$ac_cxx_werror_flag" ||
13075          test ! -s conftest.err
13076        } && test -s conftest.$ac_objext; then
13077   ac_header_compiler=yes
13078 else
13079   echo "$as_me: failed program was:" >&5
13080 sed 's/^/| /' conftest.$ac_ext >&5
13081
13082         ac_header_compiler=no
13083 fi
13084
13085 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13086 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13087 echo "${ECHO_T}$ac_header_compiler" >&6; }
13088
13089 # Is the header present?
13090 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
13091 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
13092 cat >conftest.$ac_ext <<_ACEOF
13093 /* confdefs.h.  */
13094 _ACEOF
13095 cat confdefs.h >>conftest.$ac_ext
13096 cat >>conftest.$ac_ext <<_ACEOF
13097 /* end confdefs.h.  */
13098 #include <$ac_header>
13099 _ACEOF
13100 if { (ac_try="$ac_cpp conftest.$ac_ext"
13101 case "(($ac_try" in
13102   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13103   *) ac_try_echo=$ac_try;;
13104 esac
13105 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13106   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13107   ac_status=$?
13108   grep -v '^ *+' conftest.er1 >conftest.err
13109   rm -f conftest.er1
13110   cat conftest.err >&5
13111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13112   (exit $ac_status); } >/dev/null && {
13113          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
13114          test ! -s conftest.err
13115        }; then
13116   ac_header_preproc=yes
13117 else
13118   echo "$as_me: failed program was:" >&5
13119 sed 's/^/| /' conftest.$ac_ext >&5
13120
13121   ac_header_preproc=no
13122 fi
13123
13124 rm -f conftest.err conftest.$ac_ext
13125 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13126 echo "${ECHO_T}$ac_header_preproc" >&6; }
13127
13128 # So?  What about this header?
13129 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
13130   yes:no: )
13131     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13132 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13133     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13134 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13135     ac_header_preproc=yes
13136     ;;
13137   no:yes:* )
13138     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13139 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13140     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13141 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13142     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13143 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13144     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13145 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13146     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13147 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13148     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13149 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13150
13151     ;;
13152 esac
13153 { echo "$as_me:$LINENO: checking for $ac_header" >&5
13154 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13155 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13156   echo $ECHO_N "(cached) $ECHO_C" >&6
13157 else
13158   eval "$as_ac_Header=\$ac_header_preproc"
13159 fi
13160 ac_res=`eval echo '${'$as_ac_Header'}'`
13161                { echo "$as_me:$LINENO: result: $ac_res" >&5
13162 echo "${ECHO_T}$ac_res" >&6; }
13163
13164 fi
13165 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13166   cat >>confdefs.h <<_ACEOF
13167 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13168 _ACEOF
13169
13170 else
13171   support_xft=no
13172 fi
13173
13174 done
13175
13176   { echo "$as_me:$LINENO: checking for XftDrawString32 in -lXft" >&5
13177 echo $ECHO_N "checking for XftDrawString32 in -lXft... $ECHO_C" >&6; }
13178 if test "${ac_cv_lib_Xft_XftDrawString32+set}" = set; then
13179   echo $ECHO_N "(cached) $ECHO_C" >&6
13180 else
13181   ac_check_lib_save_LIBS=$LIBS
13182 LIBS="-lXft  $LIBS"
13183 cat >conftest.$ac_ext <<_ACEOF
13184 /* confdefs.h.  */
13185 _ACEOF
13186 cat confdefs.h >>conftest.$ac_ext
13187 cat >>conftest.$ac_ext <<_ACEOF
13188 /* end confdefs.h.  */
13189
13190 /* Override any GCC internal prototype to avoid an error.
13191    Use char because int might match the return type of a GCC
13192    builtin and then its argument prototype would still apply.  */
13193 #ifdef __cplusplus
13194 extern "C"
13195 #endif
13196 char XftDrawString32 ();
13197 int
13198 main ()
13199 {
13200 return XftDrawString32 ();
13201   ;
13202   return 0;
13203 }
13204 _ACEOF
13205 rm -f conftest.$ac_objext conftest$ac_exeext
13206 if { (ac_try="$ac_link"
13207 case "(($ac_try" in
13208   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13209   *) ac_try_echo=$ac_try;;
13210 esac
13211 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13212   (eval "$ac_link") 2>conftest.er1
13213   ac_status=$?
13214   grep -v '^ *+' conftest.er1 >conftest.err
13215   rm -f conftest.er1
13216   cat conftest.err >&5
13217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13218   (exit $ac_status); } && {
13219          test -z "$ac_cxx_werror_flag" ||
13220          test ! -s conftest.err
13221        } && test -s conftest$ac_exeext &&
13222        $as_test_x conftest$ac_exeext; then
13223   ac_cv_lib_Xft_XftDrawString32=yes
13224 else
13225   echo "$as_me: failed program was:" >&5
13226 sed 's/^/| /' conftest.$ac_ext >&5
13227
13228         ac_cv_lib_Xft_XftDrawString32=no
13229 fi
13230
13231 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13232       conftest$ac_exeext conftest.$ac_ext
13233 LIBS=$ac_check_lib_save_LIBS
13234 fi
13235 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftDrawString32" >&5
13236 echo "${ECHO_T}$ac_cv_lib_Xft_XftDrawString32" >&6; }
13237 if test $ac_cv_lib_Xft_XftDrawString32 = yes; then
13238   :
13239 else
13240   support_xft=no
13241 fi
13242
13243   LIBS="$save_LIBS"
13244
13245   if test x$support_xft = xyes; then
13246
13247 cat >>confdefs.h <<\_ACEOF
13248 #define XFT 1
13249 _ACEOF
13250
13251   fi
13252 fi
13253 if test x$support_styles = xyes; then
13254
13255 cat >>confdefs.h <<\_ACEOF
13256 #define ENABLE_STYLES 1
13257 _ACEOF
13258
13259 fi
13260 if test x$support_iso14755 = xyes; then
13261
13262 cat >>confdefs.h <<\_ACEOF
13263 #define ISO_14755 1
13264 _ACEOF
13265
13266 fi
13267 if test x$support_8bitctrls = xyes; then
13268
13269 cat >>confdefs.h <<\_ACEOF
13270 #define EIGHT_BIT_CONTROLS 1
13271 _ACEOF
13272
13273 fi
13274 if test x$support_fading = xyes; then
13275
13276 cat >>confdefs.h <<\_ACEOF
13277 #define OFF_FOCUS_FADING 1
13278 _ACEOF
13279
13280 fi
13281 if test x$support_inheritpixmap = xyes; then
13282
13283 cat >>confdefs.h <<\_ACEOF
13284 #define ENABLE_TRANSPARENCY 1
13285 _ACEOF
13286
13287 fi
13288 if test x$support_keepscrolling = xno; then
13289
13290 cat >>confdefs.h <<\_ACEOF
13291 #define NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING 1
13292 _ACEOF
13293
13294 fi
13295 if test x$support_selectionscrolling = xyes; then
13296
13297 cat >>confdefs.h <<\_ACEOF
13298 #define SELECTION_SCROLLING 1
13299 _ACEOF
13300
13301 fi
13302 if test x$support_frills = xyes; then
13303
13304 cat >>confdefs.h <<\_ACEOF
13305 #define ENABLE_FRILLS 1
13306 _ACEOF
13307
13308 fi
13309 if test x$support_mousewheel = xyes; then
13310
13311 cat >>confdefs.h <<\_ACEOF
13312 #define MOUSE_WHEEL 1
13313 _ACEOF
13314
13315 fi
13316 if test x$support_mouseslipwheel = xyes; then
13317
13318 cat >>confdefs.h <<\_ACEOF
13319 #define MOUSE_SLIP_WHEELING 1
13320 _ACEOF
13321
13322 fi
13323 if test x$support_afterimage = xyes; then
13324
13325 cat >>confdefs.h <<\_ACEOF
13326 #define HAVE_AFTERIMAGE 1
13327 _ACEOF
13328
13329
13330 cat >>confdefs.h <<\_ACEOF
13331 #define BG_IMAGE_FROM_FILE 1
13332 _ACEOF
13333
13334 fi
13335
13336
13337 if test x$support_scroll_rxvt = xyes; then
13338
13339 cat >>confdefs.h <<\_ACEOF
13340 #define RXVT_SCROLLBAR 1
13341 _ACEOF
13342
13343   scrolltypes="rxvt"
13344 fi
13345 if test x$support_scroll_next = xyes; then
13346
13347 cat >>confdefs.h <<\_ACEOF
13348 #define NEXT_SCROLLBAR 1
13349 _ACEOF
13350
13351   scrolltypes="$scrolltypes next"
13352 fi
13353 if test x$support_scroll_xterm = xyes; then
13354
13355 cat >>confdefs.h <<\_ACEOF
13356 #define XTERM_SCROLLBAR 1
13357 _ACEOF
13358
13359   scrolltypes="$scrolltypes xterm"
13360 fi
13361 if test x$support_scroll_plain = xyes; then
13362
13363 cat >>confdefs.h <<\_ACEOF
13364 #define PLAIN_SCROLLBAR 1
13365 _ACEOF
13366
13367   scrolltypes="$scrolltypes plain"
13368 fi
13369 if test x$support_pointer_blank = xyes; then
13370
13371 cat >>confdefs.h <<\_ACEOF
13372 #define POINTER_BLANK 1
13373 _ACEOF
13374
13375 fi
13376 if test x$support_text_blink = xyes; then
13377
13378 cat >>confdefs.h <<\_ACEOF
13379 #define TEXT_BLINK 1
13380 _ACEOF
13381
13382 fi
13383 if test x$support_unicode3 = xyes; then
13384
13385 cat >>confdefs.h <<\_ACEOF
13386 #define UNICODE_3 1
13387 _ACEOF
13388
13389 fi
13390 if test x$support_combining = xyes; then
13391
13392 cat >>confdefs.h <<\_ACEOF
13393 #define ENABLE_COMBINING 1
13394 _ACEOF
13395
13396 fi
13397 if test x$codesets = xall; then
13398   codesets=jp,jp-ext,kr,zh,zh-ext
13399 fi
13400
13401 cat >>confdefs.h <<\_ACEOF
13402 #define ENCODING_EU 1
13403 _ACEOF
13404
13405
13406 cat >>confdefs.h <<\_ACEOF
13407 #define ENCODING_VN 1
13408 _ACEOF
13409
13410 for codeset in `echo $codesets | tr "a-z,\\-" "A-Z _"`; do
13411   case "$codeset" in
13412     JP     )
13413 cat >>confdefs.h <<\_ACEOF
13414 #define ENCODING_JP 1
13415 _ACEOF
13416  ;;
13417     JP_EXT )
13418 cat >>confdefs.h <<\_ACEOF
13419 #define ENCODING_JP_EXT 1
13420 _ACEOF
13421  ;;
13422     KR     )
13423 cat >>confdefs.h <<\_ACEOF
13424 #define ENCODING_KR 1
13425 _ACEOF
13426  ;;
13427     ZH     )
13428 cat >>confdefs.h <<\_ACEOF
13429 #define ENCODING_ZH 1
13430 _ACEOF
13431  ;;
13432     ZH_EXT )
13433 cat >>confdefs.h <<\_ACEOF
13434 #define ENCODING_ZH_EXT 1
13435 _ACEOF
13436  ;;
13437   esac
13438 done
13439
13440 IF_PERL=\#
13441 if test x$support_perl = xyes; then
13442   # Extract the first word of "perl5", so it can be a program name with args.
13443 set dummy perl5; ac_word=$2
13444 { echo "$as_me:$LINENO: checking for $ac_word" >&5
13445 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
13446 if test "${ac_cv_path_PERL+set}" = set; then
13447   echo $ECHO_N "(cached) $ECHO_C" >&6
13448 else
13449   case $PERL in
13450   [\\/]* | ?:[\\/]*)
13451   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
13452   ;;
13453   *)
13454   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13455 for as_dir in $PATH
13456 do
13457   IFS=$as_save_IFS
13458   test -z "$as_dir" && as_dir=.
13459   for ac_exec_ext in '' $ac_executable_extensions; do
13460   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13461     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
13462     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13463     break 2
13464   fi
13465 done
13466 done
13467 IFS=$as_save_IFS
13468
13469   ;;
13470 esac
13471 fi
13472 PERL=$ac_cv_path_PERL
13473 if test -n "$PERL"; then
13474   { echo "$as_me:$LINENO: result: $PERL" >&5
13475 echo "${ECHO_T}$PERL" >&6; }
13476 else
13477   { echo "$as_me:$LINENO: result: no" >&5
13478 echo "${ECHO_T}no" >&6; }
13479 fi
13480
13481
13482   # Extract the first word of "perl", so it can be a program name with args.
13483 set dummy perl; ac_word=$2
13484 { echo "$as_me:$LINENO: checking for $ac_word" >&5
13485 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
13486 if test "${ac_cv_path_PERL+set}" = set; then
13487   echo $ECHO_N "(cached) $ECHO_C" >&6
13488 else
13489   case $PERL in
13490   [\\/]* | ?:[\\/]*)
13491   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
13492   ;;
13493   *)
13494   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13495 for as_dir in $PATH
13496 do
13497   IFS=$as_save_IFS
13498   test -z "$as_dir" && as_dir=.
13499   for ac_exec_ext in '' $ac_executable_extensions; do
13500   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13501     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
13502     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13503     break 2
13504   fi
13505 done
13506 done
13507 IFS=$as_save_IFS
13508
13509   ;;
13510 esac
13511 fi
13512 PERL=$ac_cv_path_PERL
13513 if test -n "$PERL"; then
13514   { echo "$as_me:$LINENO: result: $PERL" >&5
13515 echo "${ECHO_T}$PERL" >&6; }
13516 else
13517   { echo "$as_me:$LINENO: result: no" >&5
13518 echo "${ECHO_T}no" >&6; }
13519 fi
13520
13521
13522
13523   { echo "$as_me:$LINENO: checking for $PERL suitability" >&5
13524 echo $ECHO_N "checking for $PERL suitability... $ECHO_C" >&6; }
13525   if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>/dev/null; then
13526
13527      save_CXXFLAGS="$CXXFLAGS"
13528      save_LIBS="$LIBS"
13529      CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts`"
13530      LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`"
13531      cat >conftest.$ac_ext <<_ACEOF
13532 /* confdefs.h.  */
13533 _ACEOF
13534 cat confdefs.h >>conftest.$ac_ext
13535 cat >>conftest.$ac_ext <<_ACEOF
13536 /* end confdefs.h.  */
13537
13538 #include <EXTERN.h>
13539 #include <perl.h>
13540 #include <XSUB.h>
13541
13542 int
13543 main ()
13544 {
13545
13546      PerlInterpreter *perl = perl_alloc ();
13547
13548   ;
13549   return 0;
13550 }
13551 _ACEOF
13552 rm -f conftest.$ac_objext conftest$ac_exeext
13553 if { (ac_try="$ac_link"
13554 case "(($ac_try" in
13555   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13556   *) ac_try_echo=$ac_try;;
13557 esac
13558 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13559   (eval "$ac_link") 2>conftest.er1
13560   ac_status=$?
13561   grep -v '^ *+' conftest.er1 >conftest.err
13562   rm -f conftest.er1
13563   cat conftest.err >&5
13564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13565   (exit $ac_status); } && {
13566          test -z "$ac_cxx_werror_flag" ||
13567          test ! -s conftest.err
13568        } && test -s conftest$ac_exeext &&
13569        $as_test_x conftest$ac_exeext; then
13570   rxvt_perl_link=yes
13571 else
13572   echo "$as_me: failed program was:" >&5
13573 sed 's/^/| /' conftest.$ac_ext >&5
13574
13575         rxvt_perl_link=no
13576 fi
13577
13578 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13579       conftest$ac_exeext conftest.$ac_ext
13580      CXXFLAGS="$save_CXXFLAGS"
13581      LIBS="$save_LIBS"
13582
13583      if test x$rxvt_perl_link = xyes; then
13584         { echo "$as_me:$LINENO: result: ok" >&5
13585 echo "${ECHO_T}ok" >&6; }
13586
13587 cat >>confdefs.h <<\_ACEOF
13588 #define ENABLE_PERL 1
13589 _ACEOF
13590
13591         IF_PERL=
13592         PERL_O=rxvtperl.o
13593         PERLFLAGS="`$PERL -MExtUtils::Embed -e ccopts`"
13594         PERLLIB="`$PERL -MExtUtils::Embed -e ldopts`"
13595         PERLPRIVLIBEXP="`$PERL -MConfig -e 'print $Config{privlibexp}'`"
13596      else
13597         { { echo "$as_me:$LINENO: error: no, unable to link" >&5
13598 echo "$as_me: error: no, unable to link" >&2;}
13599    { (exit 1); exit 1; }; }
13600      fi
13601   else
13602      { { echo "$as_me:$LINENO: error: no working perl found, or perl not version >= 5.8" >&5
13603 echo "$as_me: error: no working perl found, or perl not version >= 5.8" >&2;}
13604    { (exit 1); exit 1; }; }
13605   fi
13606 fi
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626 test "$program_prefix" != NONE &&
13627   program_transform_name="s&^&$program_prefix&;$program_transform_name"
13628 # Use a double $ so make ignores it.
13629 test "$program_suffix" != NONE &&
13630   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
13631 # Double any \ or $.  echo might interpret backslashes.
13632 # By default was `s,x,x', remove it if useless.
13633 cat <<\_ACEOF >conftest.sed
13634 s/[\\$]/&&/g;s/;s,x,x,$//
13635 _ACEOF
13636 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
13637 rm -f conftest.sed
13638
13639
13640
13641
13642
13643 if test "$ac_cv_header_stdint_h" = "yes" -o "$notset" = "dontmatch"; then
13644   include_stdint_h="#include <stdint.h>"
13645 else
13646   include_stdint_h="/* #include <stdint.h> */"
13647 fi
13648 if test "$ac_cv_header_stdarg_h" = "yes" -o "$notset" = "dontmatch"; then
13649   include_stdarg_h="#include <cstdarg>"
13650 else
13651   include_stdarg_h="/* #include <cstdarg> */"
13652 fi
13653 if test "$ac_cv_header_stdlib_h" = "yes" -o "$notset" = "dontmatch"; then
13654   include_stdlib_h="#include <cstdlib>"
13655 else
13656   include_stdlib_h="/* #include <cstdlib> */"
13657 fi
13658 if test "$ac_cv_header_unistd_h" = "yes" -o "$notset" = "dontmatch"; then
13659   include_unistd_h="#include <unistd.h>"
13660 else
13661   include_unistd_h="/* #include <unistd.h> */"
13662 fi
13663 if test "$ac_cv_header_string_h" = "yes" -o "$notset" = "dontmatch"; then
13664   include_string_h="#include <cstring>"
13665 else
13666   include_string_h="/* #include <cstring> */"
13667 fi
13668 if test "$ac_cv_header_fcntl_h" = "yes" -o "$notset" = "dontmatch"; then
13669   include_fcntl_h="#include <fcntl.h>"
13670 else
13671   include_fcntl_h="/* #include <fcntl.h> */"
13672 fi
13673 if test "$ac_cv_header_util_h" = "yes" -o "$notset" = "dontmatch"; then
13674   include_util_h="#include <util.h>"
13675 else
13676   include_util_h="/* #include <util.h> */"
13677 fi
13678 if test "$ac_cv_header_assert_h" = "yes" -o "$notset" = "dontmatch"; then
13679   include_assert_h="#include <assert.h>"
13680 else
13681   include_assert_h="/* #include <assert.h> */"
13682 fi
13683 if test "$rxvt_cv_header_sysioctl" = "yes" -o "$notset" = "dontmatch"; then
13684   include_sys_ioctl_h="#include <sys/ioctl.h>"
13685 else
13686   include_sys_ioctl_h="/* #include <sys/ioctl.h> */"
13687 fi
13688 if test "$ac_cv_header_sys_select_h" = "yes" -o "$notset" = "dontmatch"; then
13689   include_sys_select_h="#include <sys/select.h>"
13690 else
13691   include_sys_select_h="/* #include <sys/select.h> */"
13692 fi
13693 if test "$ac_cv_header_sys_strredir_h" = "yes" -o "$notset" = "dontmatch"; then
13694   include_sys_strredir_h="#include <sys/strredir.h>"
13695 else
13696   include_sys_strredir_h="/* #include <sys/strredir.h> */"
13697 fi
13698 if test "$ac_cv_header_sys_time_h" = "yes" -o "$notset" = "dontmatch"; then
13699   include_sys_time_h="#include <sys/time.h>"
13700 else
13701   include_sys_time_h="/* #include <sys/time.h> */"
13702 fi
13703 if test "$ac_cv_header_sys_time_h" = "no" -o "$ac_cv_header_time" = "yes"; then
13704   include_time_h="#include <time.h>"
13705 else
13706   include_time_h="/* #include <time.h> */"
13707 fi
13708
13709 ac_config_files="$ac_config_files Makefile doc/Makefile src/Makefile src/rxvtlib.h"
13710
13711 cat >confcache <<\_ACEOF
13712 # This file is a shell script that caches the results of configure
13713 # tests run on this system so they can be shared between configure
13714 # scripts and configure runs, see configure's option --config-cache.
13715 # It is not useful on other systems.  If it contains results you don't
13716 # want to keep, you may remove or edit it.
13717 #
13718 # config.status only pays attention to the cache file if you give it
13719 # the --recheck option to rerun configure.
13720 #
13721 # `ac_cv_env_foo' variables (set or unset) will be overridden when
13722 # loading this file, other *unset* `ac_cv_foo' will be assigned the
13723 # following values.
13724
13725 _ACEOF
13726
13727 # The following way of writing the cache mishandles newlines in values,
13728 # but we know of no workaround that is simple, portable, and efficient.
13729 # So, we kill variables containing newlines.
13730 # Ultrix sh set writes to stderr and can't be redirected directly,
13731 # and sets the high bit in the cache file unless we assign to the vars.
13732 (
13733   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13734     eval ac_val=\$$ac_var
13735     case $ac_val in #(
13736     *${as_nl}*)
13737       case $ac_var in #(
13738       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
13739 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
13740       esac
13741       case $ac_var in #(
13742       _ | IFS | as_nl) ;; #(
13743       *) $as_unset $ac_var ;;
13744       esac ;;
13745     esac
13746   done
13747
13748   (set) 2>&1 |
13749     case $as_nl`(ac_space=' '; set) 2>&1` in #(
13750     *${as_nl}ac_space=\ *)
13751       # `set' does not quote correctly, so add quotes (double-quote
13752       # substitution turns \\\\ into \\, and sed turns \\ into \).
13753       sed -n \
13754         "s/'/'\\\\''/g;
13755           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
13756       ;; #(
13757     *)
13758       # `set' quotes correctly as required by POSIX, so do not add quotes.
13759       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
13760       ;;
13761     esac |
13762     sort
13763 ) |
13764   sed '
13765      /^ac_cv_env_/b end
13766      t clear
13767      :clear
13768      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13769      t end
13770      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13771      :end' >>confcache
13772 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13773   if test -w "$cache_file"; then
13774     test "x$cache_file" != "x/dev/null" &&
13775       { echo "$as_me:$LINENO: updating cache $cache_file" >&5
13776 echo "$as_me: updating cache $cache_file" >&6;}
13777     cat confcache >$cache_file
13778   else
13779     { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
13780 echo "$as_me: not updating unwritable cache $cache_file" >&6;}
13781   fi
13782 fi
13783 rm -f confcache
13784
13785 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13786 # Let make expand exec_prefix.
13787 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13788
13789 DEFS=-DHAVE_CONFIG_H
13790
13791 ac_libobjs=
13792 ac_ltlibobjs=
13793 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13794   # 1. Remove the extension, and $U if already installed.
13795   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
13796   ac_i=`echo "$ac_i" | sed "$ac_script"`
13797   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
13798   #    will be set to the directory where LIBOBJS objects are built.
13799   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13800   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
13801 done
13802 LIBOBJS=$ac_libobjs
13803
13804 LTLIBOBJS=$ac_ltlibobjs
13805
13806
13807
13808 : ${CONFIG_STATUS=./config.status}
13809 ac_clean_files_save=$ac_clean_files
13810 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
13811 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
13812 echo "$as_me: creating $CONFIG_STATUS" >&6;}
13813 cat >$CONFIG_STATUS <<_ACEOF
13814 #! $SHELL
13815 # Generated by $as_me.
13816 # Run this file to recreate the current configuration.
13817 # Compiler output produced by configure, useful for debugging
13818 # configure, is in config.log if it exists.
13819
13820 debug=false
13821 ac_cs_recheck=false
13822 ac_cs_silent=false
13823 SHELL=\${CONFIG_SHELL-$SHELL}
13824 _ACEOF
13825
13826 cat >>$CONFIG_STATUS <<\_ACEOF
13827 ## --------------------- ##
13828 ## M4sh Initialization.  ##
13829 ## --------------------- ##
13830
13831 # Be more Bourne compatible
13832 DUALCASE=1; export DUALCASE # for MKS sh
13833 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
13834   emulate sh
13835   NULLCMD=:
13836   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
13837   # is contrary to our usage.  Disable this feature.
13838   alias -g '${1+"$@"}'='"$@"'
13839   setopt NO_GLOB_SUBST
13840 else
13841   case `(set -o) 2>/dev/null` in
13842   *posix*) set -o posix ;;
13843 esac
13844
13845 fi
13846
13847
13848
13849
13850 # PATH needs CR
13851 # Avoid depending upon Character Ranges.
13852 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13853 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13854 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13855 as_cr_digits='0123456789'
13856 as_cr_alnum=$as_cr_Letters$as_cr_digits
13857
13858 # The user is always right.
13859 if test "${PATH_SEPARATOR+set}" != set; then
13860   echo "#! /bin/sh" >conf$$.sh
13861   echo  "exit 0"   >>conf$$.sh
13862   chmod +x conf$$.sh
13863   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
13864     PATH_SEPARATOR=';'
13865   else
13866     PATH_SEPARATOR=:
13867   fi
13868   rm -f conf$$.sh
13869 fi
13870
13871 # Support unset when possible.
13872 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
13873   as_unset=unset
13874 else
13875   as_unset=false
13876 fi
13877
13878
13879 # IFS
13880 # We need space, tab and new line, in precisely that order.  Quoting is
13881 # there to prevent editors from complaining about space-tab.
13882 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
13883 # splitting by setting IFS to empty value.)
13884 as_nl='
13885 '
13886 IFS=" ""        $as_nl"
13887
13888 # Find who we are.  Look in the path if we contain no directory separator.
13889 case $0 in
13890   *[\\/]* ) as_myself=$0 ;;
13891   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13892 for as_dir in $PATH
13893 do
13894   IFS=$as_save_IFS
13895   test -z "$as_dir" && as_dir=.
13896   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13897 done
13898 IFS=$as_save_IFS
13899
13900      ;;
13901 esac
13902 # We did not find ourselves, most probably we were run as `sh COMMAND'
13903 # in which case we are not to be found in the path.
13904 if test "x$as_myself" = x; then
13905   as_myself=$0
13906 fi
13907 if test ! -f "$as_myself"; then
13908   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13909   { (exit 1); exit 1; }
13910 fi
13911
13912 # Work around bugs in pre-3.0 UWIN ksh.
13913 for as_var in ENV MAIL MAILPATH
13914 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
13915 done
13916 PS1='$ '
13917 PS2='> '
13918 PS4='+ '
13919
13920 # NLS nuisances.
13921 for as_var in \
13922   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
13923   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
13924   LC_TELEPHONE LC_TIME
13925 do
13926   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
13927     eval $as_var=C; export $as_var
13928   else
13929     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
13930   fi
13931 done
13932
13933 # Required to use basename.
13934 if expr a : '\(a\)' >/dev/null 2>&1 &&
13935    test "X`expr 00001 : '.*\(...\)'`" = X001; then
13936   as_expr=expr
13937 else
13938   as_expr=false
13939 fi
13940
13941 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
13942   as_basename=basename
13943 else
13944   as_basename=false
13945 fi
13946
13947
13948 # Name of the executable.
13949 as_me=`$as_basename -- "$0" ||
13950 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13951          X"$0" : 'X\(//\)$' \| \
13952          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
13953 echo X/"$0" |
13954     sed '/^.*\/\([^/][^/]*\)\/*$/{
13955             s//\1/
13956             q
13957           }
13958           /^X\/\(\/\/\)$/{
13959             s//\1/
13960             q
13961           }
13962           /^X\/\(\/\).*/{
13963             s//\1/
13964             q
13965           }
13966           s/.*/./; q'`
13967
13968 # CDPATH.
13969 $as_unset CDPATH
13970
13971
13972
13973   as_lineno_1=$LINENO
13974   as_lineno_2=$LINENO
13975   test "x$as_lineno_1" != "x$as_lineno_2" &&
13976   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
13977
13978   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
13979   # uniformly replaced by the line number.  The first 'sed' inserts a
13980   # line-number line after each line using $LINENO; the second 'sed'
13981   # does the real work.  The second script uses 'N' to pair each
13982   # line-number line with the line containing $LINENO, and appends
13983   # trailing '-' during substitution so that $LINENO is not a special
13984   # case at line end.
13985   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
13986   # scripts with optimization help from Paolo Bonzini.  Blame Lee
13987   # E. McMahon (1931-1989) for sed's syntax.  :-)
13988   sed -n '
13989     p
13990     /[$]LINENO/=
13991   ' <$as_myself |
13992     sed '
13993       s/[$]LINENO.*/&-/
13994       t lineno
13995       b
13996       :lineno
13997       N
13998       :loop
13999       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
14000       t loop
14001       s/-\n.*//
14002     ' >$as_me.lineno &&
14003   chmod +x "$as_me.lineno" ||
14004     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
14005    { (exit 1); exit 1; }; }
14006
14007   # Don't try to exec as it changes $[0], causing all sort of problems
14008   # (the dirname of $[0] is not the place where we might find the
14009   # original and so on.  Autoconf is especially sensitive to this).
14010   . "./$as_me.lineno"
14011   # Exit status is that of the last command.
14012   exit
14013 }
14014
14015
14016 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14017   as_dirname=dirname
14018 else
14019   as_dirname=false
14020 fi
14021
14022 ECHO_C= ECHO_N= ECHO_T=
14023 case `echo -n x` in
14024 -n*)
14025   case `echo 'x\c'` in
14026   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
14027   *)   ECHO_C='\c';;
14028   esac;;
14029 *)
14030   ECHO_N='-n';;
14031 esac
14032
14033 if expr a : '\(a\)' >/dev/null 2>&1 &&
14034    test "X`expr 00001 : '.*\(...\)'`" = X001; then
14035   as_expr=expr
14036 else
14037   as_expr=false
14038 fi
14039
14040 rm -f conf$$ conf$$.exe conf$$.file
14041 if test -d conf$$.dir; then
14042   rm -f conf$$.dir/conf$$.file
14043 else
14044   rm -f conf$$.dir
14045   mkdir conf$$.dir
14046 fi
14047 echo >conf$$.file
14048 if ln -s conf$$.file conf$$ 2>/dev/null; then
14049   as_ln_s='ln -s'
14050   # ... but there are two gotchas:
14051   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14052   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14053   # In both cases, we have to default to `cp -p'.
14054   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14055     as_ln_s='cp -p'
14056 elif ln conf$$.file conf$$ 2>/dev/null; then
14057   as_ln_s=ln
14058 else
14059   as_ln_s='cp -p'
14060 fi
14061 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14062 rmdir conf$$.dir 2>/dev/null
14063
14064 if mkdir -p . 2>/dev/null; then
14065   as_mkdir_p=:
14066 else
14067   test -d ./-p && rmdir ./-p
14068   as_mkdir_p=false
14069 fi
14070
14071 if test -x / >/dev/null 2>&1; then
14072   as_test_x='test -x'
14073 else
14074   if ls -dL / >/dev/null 2>&1; then
14075     as_ls_L_option=L
14076   else
14077     as_ls_L_option=
14078   fi
14079   as_test_x='
14080     eval sh -c '\''
14081       if test -d "$1"; then
14082         test -d "$1/.";
14083       else
14084         case $1 in
14085         -*)set "./$1";;
14086         esac;
14087         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
14088         ???[sx]*):;;*)false;;esac;fi
14089     '\'' sh
14090   '
14091 fi
14092 as_executable_p=$as_test_x
14093
14094 # Sed expression to map a string onto a valid CPP name.
14095 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
14096
14097 # Sed expression to map a string onto a valid variable name.
14098 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
14099
14100
14101 exec 6>&1
14102
14103 # Save the log message, to keep $[0] and so on meaningful, and to
14104 # report actual input values of CONFIG_FILES etc. instead of their
14105 # values after options handling.
14106 ac_log="
14107 This file was extended by $as_me, which was
14108 generated by GNU Autoconf 2.61.  Invocation command line was
14109
14110   CONFIG_FILES    = $CONFIG_FILES
14111   CONFIG_HEADERS  = $CONFIG_HEADERS
14112   CONFIG_LINKS    = $CONFIG_LINKS
14113   CONFIG_COMMANDS = $CONFIG_COMMANDS
14114   $ $0 $@
14115
14116 on `(hostname || uname -n) 2>/dev/null | sed 1q`
14117 "
14118
14119 _ACEOF
14120
14121 cat >>$CONFIG_STATUS <<_ACEOF
14122 # Files that config.status was made for.
14123 config_files="$ac_config_files"
14124 config_headers="$ac_config_headers"
14125
14126 _ACEOF
14127
14128 cat >>$CONFIG_STATUS <<\_ACEOF
14129 ac_cs_usage="\
14130 \`$as_me' instantiates files from templates according to the
14131 current configuration.
14132
14133 Usage: $0 [OPTIONS] [FILE]...
14134
14135   -h, --help       print this help, then exit
14136   -V, --version    print version number and configuration settings, then exit
14137   -q, --quiet      do not print progress messages
14138   -d, --debug      don't remove temporary files
14139       --recheck    update $as_me by reconfiguring in the same conditions
14140   --file=FILE[:TEMPLATE]
14141                    instantiate the configuration file FILE
14142   --header=FILE[:TEMPLATE]
14143                    instantiate the configuration header FILE
14144
14145 Configuration files:
14146 $config_files
14147
14148 Configuration headers:
14149 $config_headers
14150
14151 Report bugs to <bug-autoconf@gnu.org>."
14152
14153 _ACEOF
14154 cat >>$CONFIG_STATUS <<_ACEOF
14155 ac_cs_version="\\
14156 config.status
14157 configured by $0, generated by GNU Autoconf 2.61,
14158   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
14159
14160 Copyright (C) 2006 Free Software Foundation, Inc.
14161 This config.status script is free software; the Free Software Foundation
14162 gives unlimited permission to copy, distribute and modify it."
14163
14164 ac_pwd='$ac_pwd'
14165 srcdir='$srcdir'
14166 INSTALL='$INSTALL'
14167 _ACEOF
14168
14169 cat >>$CONFIG_STATUS <<\_ACEOF
14170 # If no file are specified by the user, then we need to provide default
14171 # value.  By we need to know if files were specified by the user.
14172 ac_need_defaults=:
14173 while test $# != 0
14174 do
14175   case $1 in
14176   --*=*)
14177     ac_option=`expr "X$1" : 'X\([^=]*\)='`
14178     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
14179     ac_shift=:
14180     ;;
14181   *)
14182     ac_option=$1
14183     ac_optarg=$2
14184     ac_shift=shift
14185     ;;
14186   esac
14187
14188   case $ac_option in
14189   # Handling of the options.
14190   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14191     ac_cs_recheck=: ;;
14192   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
14193     echo "$ac_cs_version"; exit ;;
14194   --debug | --debu | --deb | --de | --d | -d )
14195     debug=: ;;
14196   --file | --fil | --fi | --f )
14197     $ac_shift
14198     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
14199     ac_need_defaults=false;;
14200   --header | --heade | --head | --hea )
14201     $ac_shift
14202     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
14203     ac_need_defaults=false;;
14204   --he | --h)
14205     # Conflict between --help and --header
14206     { echo "$as_me: error: ambiguous option: $1
14207 Try \`$0 --help' for more information." >&2
14208    { (exit 1); exit 1; }; };;
14209   --help | --hel | -h )
14210     echo "$ac_cs_usage"; exit ;;
14211   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14212   | -silent | --silent | --silen | --sile | --sil | --si | --s)
14213     ac_cs_silent=: ;;
14214
14215   # This is an error.
14216   -*) { echo "$as_me: error: unrecognized option: $1
14217 Try \`$0 --help' for more information." >&2
14218    { (exit 1); exit 1; }; } ;;
14219
14220   *) ac_config_targets="$ac_config_targets $1"
14221      ac_need_defaults=false ;;
14222
14223   esac
14224   shift
14225 done
14226
14227 ac_configure_extra_args=
14228
14229 if $ac_cs_silent; then
14230   exec 6>/dev/null
14231   ac_configure_extra_args="$ac_configure_extra_args --silent"
14232 fi
14233
14234 _ACEOF
14235 cat >>$CONFIG_STATUS <<_ACEOF
14236 if \$ac_cs_recheck; then
14237   echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
14238   CONFIG_SHELL=$SHELL
14239   export CONFIG_SHELL
14240   exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14241 fi
14242
14243 _ACEOF
14244 cat >>$CONFIG_STATUS <<\_ACEOF
14245 exec 5>>config.log
14246 {
14247   echo
14248   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14249 ## Running $as_me. ##
14250 _ASBOX
14251   echo "$ac_log"
14252 } >&5
14253
14254 _ACEOF
14255 cat >>$CONFIG_STATUS <<_ACEOF
14256 _ACEOF
14257
14258 cat >>$CONFIG_STATUS <<\_ACEOF
14259
14260 # Handling of arguments.
14261 for ac_config_target in $ac_config_targets
14262 do
14263   case $ac_config_target in
14264     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.h.in" ;;
14265     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
14266     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
14267     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
14268     "src/rxvtlib.h") CONFIG_FILES="$CONFIG_FILES src/rxvtlib.h" ;;
14269
14270   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
14271 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
14272    { (exit 1); exit 1; }; };;
14273   esac
14274 done
14275
14276
14277 # If the user did not use the arguments to specify the items to instantiate,
14278 # then the envvar interface is used.  Set only those that are not.
14279 # We use the long form for the default assignment because of an extremely
14280 # bizarre bug on SunOS 4.1.3.
14281 if $ac_need_defaults; then
14282   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14283   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14284 fi
14285
14286 # Have a temporary directory for convenience.  Make it in the build tree
14287 # simply because there is no reason against having it here, and in addition,
14288 # creating and moving files from /tmp can sometimes cause problems.
14289 # Hook for its removal unless debugging.
14290 # Note that there is a small window in which the directory will not be cleaned:
14291 # after its creation but before its name has been assigned to `$tmp'.
14292 $debug ||
14293 {
14294   tmp=
14295   trap 'exit_status=$?
14296   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14297 ' 0
14298   trap '{ (exit 1); exit 1; }' 1 2 13 15
14299 }
14300 # Create a (secure) tmp directory for tmp files.
14301
14302 {
14303   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
14304   test -n "$tmp" && test -d "$tmp"
14305 }  ||
14306 {
14307   tmp=./conf$$-$RANDOM
14308   (umask 077 && mkdir "$tmp")
14309 } ||
14310 {
14311    echo "$me: cannot create a temporary directory in ." >&2
14312    { (exit 1); exit 1; }
14313 }
14314
14315 #
14316 # Set up the sed scripts for CONFIG_FILES section.
14317 #
14318
14319 # No need to generate the scripts if there are no CONFIG_FILES.
14320 # This happens for instance when ./config.status config.h
14321 if test -n "$CONFIG_FILES"; then
14322
14323 _ACEOF
14324
14325
14326
14327 ac_delim='%!_!# '
14328 for ac_last_try in false false false false false :; do
14329   cat >conf$$subs.sed <<_ACEOF
14330 SHELL!$SHELL$ac_delim
14331 PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
14332 PACKAGE_NAME!$PACKAGE_NAME$ac_delim
14333 PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
14334 PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
14335 PACKAGE_STRING!$PACKAGE_STRING$ac_delim
14336 PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
14337 exec_prefix!$exec_prefix$ac_delim
14338 prefix!$prefix$ac_delim
14339 program_transform_name!$program_transform_name$ac_delim
14340 bindir!$bindir$ac_delim
14341 sbindir!$sbindir$ac_delim
14342 libexecdir!$libexecdir$ac_delim
14343 datarootdir!$datarootdir$ac_delim
14344 datadir!$datadir$ac_delim
14345 sysconfdir!$sysconfdir$ac_delim
14346 sharedstatedir!$sharedstatedir$ac_delim
14347 localstatedir!$localstatedir$ac_delim
14348 includedir!$includedir$ac_delim
14349 oldincludedir!$oldincludedir$ac_delim
14350 docdir!$docdir$ac_delim
14351 infodir!$infodir$ac_delim
14352 htmldir!$htmldir$ac_delim
14353 dvidir!$dvidir$ac_delim
14354 pdfdir!$pdfdir$ac_delim
14355 psdir!$psdir$ac_delim
14356 libdir!$libdir$ac_delim
14357 localedir!$localedir$ac_delim
14358 mandir!$mandir$ac_delim
14359 DEFS!$DEFS$ac_delim
14360 ECHO_C!$ECHO_C$ac_delim
14361 ECHO_N!$ECHO_N$ac_delim
14362 ECHO_T!$ECHO_T$ac_delim
14363 LIBS!$LIBS$ac_delim
14364 build_alias!$build_alias$ac_delim
14365 host_alias!$host_alias$ac_delim
14366 target_alias!$target_alias$ac_delim
14367 build!$build$ac_delim
14368 build_cpu!$build_cpu$ac_delim
14369 build_vendor!$build_vendor$ac_delim
14370 build_os!$build_os$ac_delim
14371 host!$host$ac_delim
14372 host_cpu!$host_cpu$ac_delim
14373 host_vendor!$host_vendor$ac_delim
14374 host_os!$host_os$ac_delim
14375 VERSION!$VERSION$ac_delim
14376 DATE!$DATE$ac_delim
14377 LSMDATE!$LSMDATE$ac_delim
14378 LIBVERSION!$LIBVERSION$ac_delim
14379 CC!$CC$ac_delim
14380 CFLAGS!$CFLAGS$ac_delim
14381 LDFLAGS!$LDFLAGS$ac_delim
14382 CPPFLAGS!$CPPFLAGS$ac_delim
14383 ac_ct_CC!$ac_ct_CC$ac_delim
14384 EXEEXT!$EXEEXT$ac_delim
14385 OBJEXT!$OBJEXT$ac_delim
14386 CXX!$CXX$ac_delim
14387 CXXFLAGS!$CXXFLAGS$ac_delim
14388 ac_ct_CXX!$ac_ct_CXX$ac_delim
14389 CPP!$CPP$ac_delim
14390 INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
14391 INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
14392 INSTALL_DATA!$INSTALL_DATA$ac_delim
14393 GREP!$GREP$ac_delim
14394 EGREP!$EGREP$ac_delim
14395 LINKER!$LINKER$ac_delim
14396 INSTALL_LIBRXVT!$INSTALL_LIBRXVT$ac_delim
14397 RXVTNAME!$RXVTNAME$ac_delim
14398 CXXCPP!$CXXCPP$ac_delim
14399 TIC!$TIC$ac_delim
14400 XMKMF!$XMKMF$ac_delim
14401 X_CFLAGS!$X_CFLAGS$ac_delim
14402 X_PRE_LIBS!$X_PRE_LIBS$ac_delim
14403 X_LIBS!$X_LIBS$ac_delim
14404 X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim
14405 afterimage_config!$afterimage_config$ac_delim
14406 rxvt_int16_typedef!$rxvt_int16_typedef$ac_delim
14407 rxvt_uint16_typedef!$rxvt_uint16_typedef$ac_delim
14408 rxvt_int32_typedef!$rxvt_int32_typedef$ac_delim
14409 rxvt_uint32_typedef!$rxvt_uint32_typedef$ac_delim
14410 rxvt_intp_define!$rxvt_intp_define$ac_delim
14411 rxvt_u_intp_define!$rxvt_u_intp_define$ac_delim
14412 PKG_CONFIG!$PKG_CONFIG$ac_delim
14413 XFT_CONFIG!$XFT_CONFIG$ac_delim
14414 PERL!$PERL$ac_delim
14415 PERLLIB!$PERLLIB$ac_delim
14416 PERLFLAGS!$PERLFLAGS$ac_delim
14417 PERLPRIVLIBEXP!$PERLPRIVLIBEXP$ac_delim
14418 IF_PERL!$IF_PERL$ac_delim
14419 PERL_O!$PERL_O$ac_delim
14420 AFTERIMAGE_CFLAGS!$AFTERIMAGE_CFLAGS$ac_delim
14421 AFTERIMAGE_LIBS!$AFTERIMAGE_LIBS$ac_delim
14422 include_stdint_h!$include_stdint_h$ac_delim
14423 include_stdarg_h!$include_stdarg_h$ac_delim
14424 include_stdlib_h!$include_stdlib_h$ac_delim
14425 include_unistd_h!$include_unistd_h$ac_delim
14426 include_string_h!$include_string_h$ac_delim
14427 _ACEOF
14428
14429   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
14430     break
14431   elif $ac_last_try; then
14432     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
14433 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
14434    { (exit 1); exit 1; }; }
14435   else
14436     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14437   fi
14438 done
14439
14440 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
14441 if test -n "$ac_eof"; then
14442   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
14443   ac_eof=`expr $ac_eof + 1`
14444 fi
14445
14446 cat >>$CONFIG_STATUS <<_ACEOF
14447 cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
14448 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
14449 _ACEOF
14450 sed '
14451 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
14452 s/^/s,@/; s/!/@,|#_!!_#|/
14453 :n
14454 t n
14455 s/'"$ac_delim"'$/,g/; t
14456 s/$/\\/; p
14457 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
14458 ' >>$CONFIG_STATUS <conf$$subs.sed
14459 rm -f conf$$subs.sed
14460 cat >>$CONFIG_STATUS <<_ACEOF
14461 CEOF$ac_eof
14462 _ACEOF
14463
14464
14465 ac_delim='%!_!# '
14466 for ac_last_try in false false false false false :; do
14467   cat >conf$$subs.sed <<_ACEOF
14468 include_fcntl_h!$include_fcntl_h$ac_delim
14469 include_util_h!$include_util_h$ac_delim
14470 include_assert_h!$include_assert_h$ac_delim
14471 include_sys_ioctl_h!$include_sys_ioctl_h$ac_delim
14472 include_sys_select_h!$include_sys_select_h$ac_delim
14473 include_sys_strredir_h!$include_sys_strredir_h$ac_delim
14474 include_sys_time_h!$include_sys_time_h$ac_delim
14475 include_time_h!$include_time_h$ac_delim
14476 LIBOBJS!$LIBOBJS$ac_delim
14477 LTLIBOBJS!$LTLIBOBJS$ac_delim
14478 _ACEOF
14479
14480   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 10; then
14481     break
14482   elif $ac_last_try; then
14483     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
14484 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
14485    { (exit 1); exit 1; }; }
14486   else
14487     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14488   fi
14489 done
14490
14491 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
14492 if test -n "$ac_eof"; then
14493   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
14494   ac_eof=`expr $ac_eof + 1`
14495 fi
14496
14497 cat >>$CONFIG_STATUS <<_ACEOF
14498 cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
14499 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
14500 _ACEOF
14501 sed '
14502 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
14503 s/^/s,@/; s/!/@,|#_!!_#|/
14504 :n
14505 t n
14506 s/'"$ac_delim"'$/,g/; t
14507 s/$/\\/; p
14508 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
14509 ' >>$CONFIG_STATUS <conf$$subs.sed
14510 rm -f conf$$subs.sed
14511 cat >>$CONFIG_STATUS <<_ACEOF
14512 :end
14513 s/|#_!!_#|//g
14514 CEOF$ac_eof
14515 _ACEOF
14516
14517
14518 # VPATH may cause trouble with some makes, so we remove $(srcdir),
14519 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14520 # trailing colons and then remove the whole line if VPATH becomes empty
14521 # (actually we leave an empty line to preserve line numbers).
14522 if test "x$srcdir" = x.; then
14523   ac_vpsub='/^[  ]*VPATH[        ]*=/{
14524 s/:*\$(srcdir):*/:/
14525 s/:*\${srcdir}:*/:/
14526 s/:*@srcdir@:*/:/
14527 s/^\([^=]*=[     ]*\):*/\1/
14528 s/:*$//
14529 s/^[^=]*=[       ]*$//
14530 }'
14531 fi
14532
14533 cat >>$CONFIG_STATUS <<\_ACEOF
14534 fi # test -n "$CONFIG_FILES"
14535
14536
14537 for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS
14538 do
14539   case $ac_tag in
14540   :[FHLC]) ac_mode=$ac_tag; continue;;
14541   esac
14542   case $ac_mode$ac_tag in
14543   :[FHL]*:*);;
14544   :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
14545 echo "$as_me: error: Invalid tag $ac_tag." >&2;}
14546    { (exit 1); exit 1; }; };;
14547   :[FH]-) ac_tag=-:-;;
14548   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14549   esac
14550   ac_save_IFS=$IFS
14551   IFS=:
14552   set x $ac_tag
14553   IFS=$ac_save_IFS
14554   shift
14555   ac_file=$1
14556   shift
14557
14558   case $ac_mode in
14559   :L) ac_source=$1;;
14560   :[FH])
14561     ac_file_inputs=
14562     for ac_f
14563     do
14564       case $ac_f in
14565       -) ac_f="$tmp/stdin";;
14566       *) # Look for the file first in the build tree, then in the source tree
14567          # (if the path is not absolute).  The absolute path cannot be DOS-style,
14568          # because $ac_f cannot contain `:'.
14569          test -f "$ac_f" ||
14570            case $ac_f in
14571            [\\/$]*) false;;
14572            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14573            esac ||
14574            { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
14575 echo "$as_me: error: cannot find input file: $ac_f" >&2;}
14576    { (exit 1); exit 1; }; };;
14577       esac
14578       ac_file_inputs="$ac_file_inputs $ac_f"
14579     done
14580
14581     # Let's still pretend it is `configure' which instantiates (i.e., don't
14582     # use $as_me), people would be surprised to read:
14583     #    /* config.h.  Generated by config.status.  */
14584     configure_input="Generated from "`IFS=:
14585           echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
14586     if test x"$ac_file" != x-; then
14587       configure_input="$ac_file.  $configure_input"
14588       { echo "$as_me:$LINENO: creating $ac_file" >&5
14589 echo "$as_me: creating $ac_file" >&6;}
14590     fi
14591
14592     case $ac_tag in
14593     *:-:* | *:-) cat >"$tmp/stdin";;
14594     esac
14595     ;;
14596   esac
14597
14598   ac_dir=`$as_dirname -- "$ac_file" ||
14599 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14600          X"$ac_file" : 'X\(//\)[^/]' \| \
14601          X"$ac_file" : 'X\(//\)$' \| \
14602          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
14603 echo X"$ac_file" |
14604     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14605             s//\1/
14606             q
14607           }
14608           /^X\(\/\/\)[^/].*/{
14609             s//\1/
14610             q
14611           }
14612           /^X\(\/\/\)$/{
14613             s//\1/
14614             q
14615           }
14616           /^X\(\/\).*/{
14617             s//\1/
14618             q
14619           }
14620           s/.*/./; q'`
14621   { as_dir="$ac_dir"
14622   case $as_dir in #(
14623   -*) as_dir=./$as_dir;;
14624   esac
14625   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
14626     as_dirs=
14627     while :; do
14628       case $as_dir in #(
14629       *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
14630       *) as_qdir=$as_dir;;
14631       esac
14632       as_dirs="'$as_qdir' $as_dirs"
14633       as_dir=`$as_dirname -- "$as_dir" ||
14634 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14635          X"$as_dir" : 'X\(//\)[^/]' \| \
14636          X"$as_dir" : 'X\(//\)$' \| \
14637          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14638 echo X"$as_dir" |
14639     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14640             s//\1/
14641             q
14642           }
14643           /^X\(\/\/\)[^/].*/{
14644             s//\1/
14645             q
14646           }
14647           /^X\(\/\/\)$/{
14648             s//\1/
14649             q
14650           }
14651           /^X\(\/\).*/{
14652             s//\1/
14653             q
14654           }
14655           s/.*/./; q'`
14656       test -d "$as_dir" && break
14657     done
14658     test -z "$as_dirs" || eval "mkdir $as_dirs"
14659   } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
14660 echo "$as_me: error: cannot create directory $as_dir" >&2;}
14661    { (exit 1); exit 1; }; }; }
14662   ac_builddir=.
14663
14664 case "$ac_dir" in
14665 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14666 *)
14667   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
14668   # A ".." for each directory in $ac_dir_suffix.
14669   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
14670   case $ac_top_builddir_sub in
14671   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14672   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14673   esac ;;
14674 esac
14675 ac_abs_top_builddir=$ac_pwd
14676 ac_abs_builddir=$ac_pwd$ac_dir_suffix
14677 # for backward compatibility:
14678 ac_top_builddir=$ac_top_build_prefix
14679
14680 case $srcdir in
14681   .)  # We are building in place.
14682     ac_srcdir=.
14683     ac_top_srcdir=$ac_top_builddir_sub
14684     ac_abs_top_srcdir=$ac_pwd ;;
14685   [\\/]* | ?:[\\/]* )  # Absolute name.
14686     ac_srcdir=$srcdir$ac_dir_suffix;
14687     ac_top_srcdir=$srcdir
14688     ac_abs_top_srcdir=$srcdir ;;
14689   *) # Relative name.
14690     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14691     ac_top_srcdir=$ac_top_build_prefix$srcdir
14692     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
14693 esac
14694 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
14695
14696
14697   case $ac_mode in
14698   :F)
14699   #
14700   # CONFIG_FILE
14701   #
14702
14703   case $INSTALL in
14704   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
14705   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
14706   esac
14707 _ACEOF
14708
14709 cat >>$CONFIG_STATUS <<\_ACEOF
14710 # If the template does not know about datarootdir, expand it.
14711 # FIXME: This hack should be removed a few years after 2.60.
14712 ac_datarootdir_hack=; ac_datarootdir_seen=
14713
14714 case `sed -n '/datarootdir/ {
14715   p
14716   q
14717 }
14718 /@datadir@/p
14719 /@docdir@/p
14720 /@infodir@/p
14721 /@localedir@/p
14722 /@mandir@/p
14723 ' $ac_file_inputs` in
14724 *datarootdir*) ac_datarootdir_seen=yes;;
14725 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
14726   { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14727 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
14728 _ACEOF
14729 cat >>$CONFIG_STATUS <<_ACEOF
14730   ac_datarootdir_hack='
14731   s&@datadir@&$datadir&g
14732   s&@docdir@&$docdir&g
14733   s&@infodir@&$infodir&g
14734   s&@localedir@&$localedir&g
14735   s&@mandir@&$mandir&g
14736     s&\\\${datarootdir}&$datarootdir&g' ;;
14737 esac
14738 _ACEOF
14739
14740 # Neutralize VPATH when `$srcdir' = `.'.
14741 # Shell code in configure.ac might set extrasub.
14742 # FIXME: do we really want to maintain this feature?
14743 cat >>$CONFIG_STATUS <<_ACEOF
14744   sed "$ac_vpsub
14745 $extrasub
14746 _ACEOF
14747 cat >>$CONFIG_STATUS <<\_ACEOF
14748 :t
14749 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
14750 s&@configure_input@&$configure_input&;t t
14751 s&@top_builddir@&$ac_top_builddir_sub&;t t
14752 s&@srcdir@&$ac_srcdir&;t t
14753 s&@abs_srcdir@&$ac_abs_srcdir&;t t
14754 s&@top_srcdir@&$ac_top_srcdir&;t t
14755 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14756 s&@builddir@&$ac_builddir&;t t
14757 s&@abs_builddir@&$ac_abs_builddir&;t t
14758 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14759 s&@INSTALL@&$ac_INSTALL&;t t
14760 $ac_datarootdir_hack
14761 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
14762
14763 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14764   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14765   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
14766   { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
14767 which seems to be undefined.  Please make sure it is defined." >&5
14768 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
14769 which seems to be undefined.  Please make sure it is defined." >&2;}
14770
14771   rm -f "$tmp/stdin"
14772   case $ac_file in
14773   -) cat "$tmp/out"; rm -f "$tmp/out";;
14774   *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
14775   esac
14776  ;;
14777   :H)
14778   #
14779   # CONFIG_HEADER
14780   #
14781 _ACEOF
14782
14783 # Transform confdefs.h into a sed script `conftest.defines', that
14784 # substitutes the proper values into config.h.in to produce config.h.
14785 rm -f conftest.defines conftest.tail
14786 # First, append a space to every undef/define line, to ease matching.
14787 echo 's/$/ /' >conftest.defines
14788 # Then, protect against being on the right side of a sed subst, or in
14789 # an unquoted here document, in config.status.  If some macros were
14790 # called several times there might be several #defines for the same
14791 # symbol, which is useless.  But do not sort them, since the last
14792 # AC_DEFINE must be honored.
14793 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14794 # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
14795 # NAME is the cpp macro being defined, VALUE is the value it is being given.
14796 # PARAMS is the parameter list in the macro definition--in most cases, it's
14797 # just an empty string.
14798 ac_dA='s,^\\([   #]*\\)[^        ]*\\([  ]*'
14799 ac_dB='\\)[      (].*,\\1define\\2'
14800 ac_dC=' '
14801 ac_dD=' ,'
14802
14803 uniq confdefs.h |
14804   sed -n '
14805         t rset
14806         :rset
14807         s/^[     ]*#[    ]*define[       ][      ]*//
14808         t ok
14809         d
14810         :ok
14811         s/[\\&,]/\\&/g
14812         s/^\('"$ac_word_re"'\)\(([^()]*)\)[      ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
14813         s/^\('"$ac_word_re"'\)[  ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
14814   ' >>conftest.defines
14815
14816 # Remove the space that was appended to ease matching.
14817 # Then replace #undef with comments.  This is necessary, for
14818 # example, in the case of _POSIX_SOURCE, which is predefined and required
14819 # on some systems where configure will not decide to define it.
14820 # (The regexp can be short, since the line contains either #define or #undef.)
14821 echo 's/ $//
14822 s,^[     #]*u.*,/* & */,' >>conftest.defines
14823
14824 # Break up conftest.defines:
14825 ac_max_sed_lines=50
14826
14827 # First sed command is:  sed -f defines.sed $ac_file_inputs >"$tmp/out1"
14828 # Second one is:         sed -f defines.sed "$tmp/out1" >"$tmp/out2"
14829 # Third one will be:     sed -f defines.sed "$tmp/out2" >"$tmp/out1"
14830 # et cetera.
14831 ac_in='$ac_file_inputs'
14832 ac_out='"$tmp/out1"'
14833 ac_nxt='"$tmp/out2"'
14834
14835 while :
14836 do
14837   # Write a here document:
14838     cat >>$CONFIG_STATUS <<_ACEOF
14839     # First, check the format of the line:
14840     cat >"\$tmp/defines.sed" <<\\CEOF
14841 /^[      ]*#[    ]*undef[        ][      ]*$ac_word_re[  ]*\$/b def
14842 /^[      ]*#[    ]*define[       ][      ]*$ac_word_re[(         ]/b def
14843 b
14844 :def
14845 _ACEOF
14846   sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
14847   echo 'CEOF
14848     sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
14849   ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
14850   sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
14851   grep . conftest.tail >/dev/null || break
14852   rm -f conftest.defines
14853   mv conftest.tail conftest.defines
14854 done
14855 rm -f conftest.defines conftest.tail
14856
14857 echo "ac_result=$ac_in" >>$CONFIG_STATUS
14858 cat >>$CONFIG_STATUS <<\_ACEOF
14859   if test x"$ac_file" != x-; then
14860     echo "/* $configure_input  */" >"$tmp/config.h"
14861     cat "$ac_result" >>"$tmp/config.h"
14862     if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
14863       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
14864 echo "$as_me: $ac_file is unchanged" >&6;}
14865     else
14866       rm -f $ac_file
14867       mv "$tmp/config.h" $ac_file
14868     fi
14869   else
14870     echo "/* $configure_input  */"
14871     cat "$ac_result"
14872   fi
14873   rm -f "$tmp/out12"
14874  ;;
14875
14876
14877   esac
14878
14879 done # for ac_tag
14880
14881
14882 { (exit 0); exit 0; }
14883 _ACEOF
14884 chmod +x $CONFIG_STATUS
14885 ac_clean_files=$ac_clean_files_save
14886
14887
14888 # configure is writing to config.log, and then calls config.status.
14889 # config.status does its own redirection, appending to config.log.
14890 # Unfortunately, on DOS this fails, as config.log is still kept open
14891 # by configure, so config.status won't be able to write to it; its
14892 # output is simply discarded.  So we exec the FD to /dev/null,
14893 # effectively closing config.log, so it can be properly (re)opened and
14894 # appended to by config.status.  When coming back to configure, we
14895 # need to make the FD available again.
14896 if test "$no_create" != yes; then
14897   ac_cs_success=:
14898   ac_config_status_args=
14899   test "$silent" = yes &&
14900     ac_config_status_args="$ac_config_status_args --quiet"
14901   exec 5>/dev/null
14902   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
14903   exec 5>>config.log
14904   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14905   # would make configure fail if this is the last instruction.
14906   $ac_cs_success || { (exit 1); exit 1; }
14907 fi
14908
14909
14910 echo "Configuration:
14911
14912   Rxvt version:               $VERSION : $DATE
14913   Source code location:       $srcdir
14914   Install path:               ${prefix}/bin
14915   Compiler:                   $CXX
14916   Compiler flags:             $CXXFLAGS
14917   Linker:                     $LINKER"
14918
14919 if test x$term != x; then
14920   echo "  set TERM to:                $term"
14921 fi
14922 if test x$terminfo != x; then
14923   echo "  set TERMINFO to:            $terminfo"
14924 fi
14925 echo "  default resource name:      $RESNAME"
14926 echo "  resource class:             $RESCLASS"
14927 if test x$RESFALLBACK != x; then
14928    echo "  resource class fallback:    $RESFALLBACK"
14929 fi
14930 echo
14931 echo "  embedded perl:              $support_perl"
14932 echo "  libafterimage:              $support_afterimage"
14933 echo
14934 if test x$support_xim = xyes -a x$rxvt_cv_func_xlocale = xno; then
14935   echo ".----------------------------------------------------------------."
14936   echo ". WARNING: --enable-xim was specified however the locale support ."
14937   echo ".          functions could not be found.                         ."
14938   echo ".          XIM is now being DISABLED!                            ."
14939   echo ".----------------------------------------------------------------."
14940 fi
14941
14942 echo "*** Optionally check src/feature.h for further, rarely used options ***"
14943 echo
14944