]> granicus.if.org Git - postgresql/blob - configure
Adjust psql's new \ef command to present an empty CREATE FUNCTION template
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.61 for PostgreSQL 8.4devel.
4 #
5 # Report bugs to <pgsql-bugs@postgresql.org>.
6 #
7 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
8 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 #
12 # Copyright (c) 1996-2008, PostgreSQL Global Development Group
13 ## --------------------- ##
14 ## M4sh Initialization.  ##
15 ## --------------------- ##
16
17 # Be more Bourne compatible
18 DUALCASE=1; export DUALCASE # for MKS sh
19 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20   emulate sh
21   NULLCMD=:
22   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23   # is contrary to our usage.  Disable this feature.
24   alias -g '${1+"$@"}'='"$@"'
25   setopt NO_GLOB_SUBST
26 else
27   case `(set -o) 2>/dev/null` in
28   *posix*) set -o posix ;;
29 esac
30
31 fi
32
33
34
35
36 # PATH needs CR
37 # Avoid depending upon Character Ranges.
38 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
39 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
40 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
41 as_cr_digits='0123456789'
42 as_cr_alnum=$as_cr_Letters$as_cr_digits
43
44 # The user is always right.
45 if test "${PATH_SEPARATOR+set}" != set; then
46   echo "#! /bin/sh" >conf$$.sh
47   echo  "exit 0"   >>conf$$.sh
48   chmod +x conf$$.sh
49   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
50     PATH_SEPARATOR=';'
51   else
52     PATH_SEPARATOR=:
53   fi
54   rm -f conf$$.sh
55 fi
56
57 # Support unset when possible.
58 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
59   as_unset=unset
60 else
61   as_unset=false
62 fi
63
64
65 # IFS
66 # We need space, tab and new line, in precisely that order.  Quoting is
67 # there to prevent editors from complaining about space-tab.
68 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
69 # splitting by setting IFS to empty value.)
70 as_nl='
71 '
72 IFS=" ""        $as_nl"
73
74 # Find who we are.  Look in the path if we contain no directory separator.
75 case $0 in
76   *[\\/]* ) as_myself=$0 ;;
77   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
78 for as_dir in $PATH
79 do
80   IFS=$as_save_IFS
81   test -z "$as_dir" && as_dir=.
82   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
83 done
84 IFS=$as_save_IFS
85
86      ;;
87 esac
88 # We did not find ourselves, most probably we were run as `sh COMMAND'
89 # in which case we are not to be found in the path.
90 if test "x$as_myself" = x; then
91   as_myself=$0
92 fi
93 if test ! -f "$as_myself"; then
94   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
95   { (exit 1); exit 1; }
96 fi
97
98 # Work around bugs in pre-3.0 UWIN ksh.
99 for as_var in ENV MAIL MAILPATH
100 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
101 done
102 PS1='$ '
103 PS2='> '
104 PS4='+ '
105
106 # NLS nuisances.
107 for as_var in \
108   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
109   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
110   LC_TELEPHONE LC_TIME
111 do
112   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
113     eval $as_var=C; export $as_var
114   else
115     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
116   fi
117 done
118
119 # Required to use basename.
120 if expr a : '\(a\)' >/dev/null 2>&1 &&
121    test "X`expr 00001 : '.*\(...\)'`" = X001; then
122   as_expr=expr
123 else
124   as_expr=false
125 fi
126
127 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
128   as_basename=basename
129 else
130   as_basename=false
131 fi
132
133
134 # Name of the executable.
135 as_me=`$as_basename -- "$0" ||
136 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
137          X"$0" : 'X\(//\)$' \| \
138          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
139 echo X/"$0" |
140     sed '/^.*\/\([^/][^/]*\)\/*$/{
141             s//\1/
142             q
143           }
144           /^X\/\(\/\/\)$/{
145             s//\1/
146             q
147           }
148           /^X\/\(\/\).*/{
149             s//\1/
150             q
151           }
152           s/.*/./; q'`
153
154 # CDPATH.
155 $as_unset CDPATH
156
157
158 if test "x$CONFIG_SHELL" = x; then
159   if (eval ":") 2>/dev/null; then
160   as_have_required=yes
161 else
162   as_have_required=no
163 fi
164
165   if test $as_have_required = yes &&     (eval ":
166 (as_func_return () {
167   (exit \$1)
168 }
169 as_func_success () {
170   as_func_return 0
171 }
172 as_func_failure () {
173   as_func_return 1
174 }
175 as_func_ret_success () {
176   return 0
177 }
178 as_func_ret_failure () {
179   return 1
180 }
181
182 exitcode=0
183 if as_func_success; then
184   :
185 else
186   exitcode=1
187   echo as_func_success failed.
188 fi
189
190 if as_func_failure; then
191   exitcode=1
192   echo as_func_failure succeeded.
193 fi
194
195 if as_func_ret_success; then
196   :
197 else
198   exitcode=1
199   echo as_func_ret_success failed.
200 fi
201
202 if as_func_ret_failure; then
203   exitcode=1
204   echo as_func_ret_failure succeeded.
205 fi
206
207 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
208   :
209 else
210   exitcode=1
211   echo positional parameters were not saved.
212 fi
213
214 test \$exitcode = 0) || { (exit 1); exit 1; }
215
216 (
217   as_lineno_1=\$LINENO
218   as_lineno_2=\$LINENO
219   test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
220   test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
221 ") 2> /dev/null; then
222   :
223 else
224   as_candidate_shells=
225     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
226 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
227 do
228   IFS=$as_save_IFS
229   test -z "$as_dir" && as_dir=.
230   case $as_dir in
231          /*)
232            for as_base in sh bash ksh sh5; do
233              as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
234            done;;
235        esac
236 done
237 IFS=$as_save_IFS
238
239
240       for as_shell in $as_candidate_shells $SHELL; do
241          # Try only shells that exist, to save several forks.
242          if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
243                 { ("$as_shell") 2> /dev/null <<\_ASEOF
244 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
245   emulate sh
246   NULLCMD=:
247   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
248   # is contrary to our usage.  Disable this feature.
249   alias -g '${1+"$@"}'='"$@"'
250   setopt NO_GLOB_SUBST
251 else
252   case `(set -o) 2>/dev/null` in
253   *posix*) set -o posix ;;
254 esac
255
256 fi
257
258
259 :
260 _ASEOF
261 }; then
262   CONFIG_SHELL=$as_shell
263                as_have_required=yes
264                if { "$as_shell" 2> /dev/null <<\_ASEOF
265 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
266   emulate sh
267   NULLCMD=:
268   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
269   # is contrary to our usage.  Disable this feature.
270   alias -g '${1+"$@"}'='"$@"'
271   setopt NO_GLOB_SUBST
272 else
273   case `(set -o) 2>/dev/null` in
274   *posix*) set -o posix ;;
275 esac
276
277 fi
278
279
280 :
281 (as_func_return () {
282   (exit $1)
283 }
284 as_func_success () {
285   as_func_return 0
286 }
287 as_func_failure () {
288   as_func_return 1
289 }
290 as_func_ret_success () {
291   return 0
292 }
293 as_func_ret_failure () {
294   return 1
295 }
296
297 exitcode=0
298 if as_func_success; then
299   :
300 else
301   exitcode=1
302   echo as_func_success failed.
303 fi
304
305 if as_func_failure; then
306   exitcode=1
307   echo as_func_failure succeeded.
308 fi
309
310 if as_func_ret_success; then
311   :
312 else
313   exitcode=1
314   echo as_func_ret_success failed.
315 fi
316
317 if as_func_ret_failure; then
318   exitcode=1
319   echo as_func_ret_failure succeeded.
320 fi
321
322 if ( set x; as_func_ret_success y && test x = "$1" ); then
323   :
324 else
325   exitcode=1
326   echo positional parameters were not saved.
327 fi
328
329 test $exitcode = 0) || { (exit 1); exit 1; }
330
331 (
332   as_lineno_1=$LINENO
333   as_lineno_2=$LINENO
334   test "x$as_lineno_1" != "x$as_lineno_2" &&
335   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
336
337 _ASEOF
338 }; then
339   break
340 fi
341
342 fi
343
344       done
345
346       if test "x$CONFIG_SHELL" != x; then
347   for as_var in BASH_ENV ENV
348         do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
349         done
350         export CONFIG_SHELL
351         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
352 fi
353
354
355     if test $as_have_required = no; then
356   echo This script requires a shell more modern than all the
357       echo shells that I found on your system.  Please install a
358       echo modern shell, or manually run the script under such a
359       echo shell if you do have one.
360       { (exit 1); exit 1; }
361 fi
362
363
364 fi
365
366 fi
367
368
369
370 (eval "as_func_return () {
371   (exit \$1)
372 }
373 as_func_success () {
374   as_func_return 0
375 }
376 as_func_failure () {
377   as_func_return 1
378 }
379 as_func_ret_success () {
380   return 0
381 }
382 as_func_ret_failure () {
383   return 1
384 }
385
386 exitcode=0
387 if as_func_success; then
388   :
389 else
390   exitcode=1
391   echo as_func_success failed.
392 fi
393
394 if as_func_failure; then
395   exitcode=1
396   echo as_func_failure succeeded.
397 fi
398
399 if as_func_ret_success; then
400   :
401 else
402   exitcode=1
403   echo as_func_ret_success failed.
404 fi
405
406 if as_func_ret_failure; then
407   exitcode=1
408   echo as_func_ret_failure succeeded.
409 fi
410
411 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
412   :
413 else
414   exitcode=1
415   echo positional parameters were not saved.
416 fi
417
418 test \$exitcode = 0") || {
419   echo No shell found that supports shell functions.
420   echo Please tell autoconf@gnu.org about your system,
421   echo including any error possibly output before this
422   echo message
423 }
424
425
426
427   as_lineno_1=$LINENO
428   as_lineno_2=$LINENO
429   test "x$as_lineno_1" != "x$as_lineno_2" &&
430   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
431
432   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
433   # uniformly replaced by the line number.  The first 'sed' inserts a
434   # line-number line after each line using $LINENO; the second 'sed'
435   # does the real work.  The second script uses 'N' to pair each
436   # line-number line with the line containing $LINENO, and appends
437   # trailing '-' during substitution so that $LINENO is not a special
438   # case at line end.
439   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
440   # scripts with optimization help from Paolo Bonzini.  Blame Lee
441   # E. McMahon (1931-1989) for sed's syntax.  :-)
442   sed -n '
443     p
444     /[$]LINENO/=
445   ' <$as_myself |
446     sed '
447       s/[$]LINENO.*/&-/
448       t lineno
449       b
450       :lineno
451       N
452       :loop
453       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
454       t loop
455       s/-\n.*//
456     ' >$as_me.lineno &&
457   chmod +x "$as_me.lineno" ||
458     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
459    { (exit 1); exit 1; }; }
460
461   # Don't try to exec as it changes $[0], causing all sort of problems
462   # (the dirname of $[0] is not the place where we might find the
463   # original and so on.  Autoconf is especially sensitive to this).
464   . "./$as_me.lineno"
465   # Exit status is that of the last command.
466   exit
467 }
468
469
470 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
471   as_dirname=dirname
472 else
473   as_dirname=false
474 fi
475
476 ECHO_C= ECHO_N= ECHO_T=
477 case `echo -n x` in
478 -n*)
479   case `echo 'x\c'` in
480   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
481   *)   ECHO_C='\c';;
482   esac;;
483 *)
484   ECHO_N='-n';;
485 esac
486
487 if expr a : '\(a\)' >/dev/null 2>&1 &&
488    test "X`expr 00001 : '.*\(...\)'`" = X001; then
489   as_expr=expr
490 else
491   as_expr=false
492 fi
493
494 rm -f conf$$ conf$$.exe conf$$.file
495 if test -d conf$$.dir; then
496   rm -f conf$$.dir/conf$$.file
497 else
498   rm -f conf$$.dir
499   mkdir conf$$.dir
500 fi
501 echo >conf$$.file
502 if ln -s conf$$.file conf$$ 2>/dev/null; then
503   as_ln_s='ln -s'
504   # ... but there are two gotchas:
505   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
506   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
507   # In both cases, we have to default to `cp -p'.
508   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
509     as_ln_s='cp -p'
510 elif ln conf$$.file conf$$ 2>/dev/null; then
511   as_ln_s=ln
512 else
513   as_ln_s='cp -p'
514 fi
515 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
516 rmdir conf$$.dir 2>/dev/null
517
518 if mkdir -p . 2>/dev/null; then
519   as_mkdir_p=:
520 else
521   test -d ./-p && rmdir ./-p
522   as_mkdir_p=false
523 fi
524
525 if test -x / >/dev/null 2>&1; then
526   as_test_x='test -x'
527 else
528   if ls -dL / >/dev/null 2>&1; then
529     as_ls_L_option=L
530   else
531     as_ls_L_option=
532   fi
533   as_test_x='
534     eval sh -c '\''
535       if test -d "$1"; then
536         test -d "$1/.";
537       else
538         case $1 in
539         -*)set "./$1";;
540         esac;
541         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
542         ???[sx]*):;;*)false;;esac;fi
543     '\'' sh
544   '
545 fi
546 as_executable_p=$as_test_x
547
548 # Sed expression to map a string onto a valid CPP name.
549 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
550
551 # Sed expression to map a string onto a valid variable name.
552 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
553
554
555
556 exec 7<&0 </dev/null 6>&1
557
558 # Name of the host.
559 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
560 # so uname gets run too.
561 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
562
563 #
564 # Initializations.
565 #
566 ac_default_prefix=/usr/local
567 ac_clean_files=
568 ac_config_libobj_dir=.
569 LIBOBJS=
570 cross_compiling=no
571 subdirs=
572 MFLAGS=
573 MAKEFLAGS=
574 SHELL=${CONFIG_SHELL-/bin/sh}
575
576 # Identity of this package.
577 PACKAGE_NAME='PostgreSQL'
578 PACKAGE_TARNAME='postgresql'
579 PACKAGE_VERSION='8.4devel'
580 PACKAGE_STRING='PostgreSQL 8.4devel'
581 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
582
583 ac_unique_file="src/backend/access/common/heaptuple.c"
584 ac_default_prefix=/usr/local/pgsql
585 # Factoring default headers for most tests.
586 ac_includes_default="\
587 #include <stdio.h>
588 #ifdef HAVE_SYS_TYPES_H
589 # include <sys/types.h>
590 #endif
591 #ifdef HAVE_SYS_STAT_H
592 # include <sys/stat.h>
593 #endif
594 #ifdef STDC_HEADERS
595 # include <stdlib.h>
596 # include <stddef.h>
597 #else
598 # ifdef HAVE_STDLIB_H
599 #  include <stdlib.h>
600 # endif
601 #endif
602 #ifdef HAVE_STRING_H
603 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
604 #  include <memory.h>
605 # endif
606 # include <string.h>
607 #endif
608 #ifdef HAVE_STRINGS_H
609 # include <strings.h>
610 #endif
611 #ifdef HAVE_INTTYPES_H
612 # include <inttypes.h>
613 #endif
614 #ifdef HAVE_STDINT_H
615 # include <stdint.h>
616 #endif
617 #ifdef HAVE_UNISTD_H
618 # include <unistd.h>
619 #endif"
620
621 ac_subst_vars='SHELL
622 PATH_SEPARATOR
623 PACKAGE_NAME
624 PACKAGE_TARNAME
625 PACKAGE_VERSION
626 PACKAGE_STRING
627 PACKAGE_BUGREPORT
628 exec_prefix
629 prefix
630 program_transform_name
631 bindir
632 sbindir
633 libexecdir
634 datarootdir
635 datadir
636 sysconfdir
637 sharedstatedir
638 localstatedir
639 includedir
640 oldincludedir
641 docdir
642 infodir
643 htmldir
644 dvidir
645 pdfdir
646 psdir
647 libdir
648 localedir
649 mandir
650 DEFS
651 ECHO_C
652 ECHO_N
653 ECHO_T
654 LIBS
655 build_alias
656 host_alias
657 target_alias
658 configure_args
659 build
660 build_cpu
661 build_vendor
662 build_os
663 host
664 host_cpu
665 host_vendor
666 host_os
667 PORTNAME
668 enable_nls
669 WANTED_LANGUAGES
670 default_port
671 enable_shared
672 enable_rpath
673 enable_debug
674 enable_profiling
675 GCOV
676 LCOV
677 GENHTML
678 enable_coverage
679 DTRACE
680 DTRACEFLAGS
681 enable_dtrace
682 CC
683 CFLAGS
684 LDFLAGS
685 CPPFLAGS
686 ac_ct_CC
687 EXEEXT
688 OBJEXT
689 CPP
690 GCC
691 TAS
692 autodepend
693 INCLUDES
694 enable_thread_safety
695 with_tcl
696 with_perl
697 with_python
698 with_gssapi
699 with_krb5
700 krb_srvtab
701 with_pam
702 with_ldap
703 with_bonjour
704 with_openssl
705 with_ossp_uuid
706 XML2_CONFIG
707 with_libxml
708 with_libxslt
709 with_system_tzdata
710 with_zlib
711 GREP
712 EGREP
713 ELF_SYS
714 LDFLAGS_SL
715 LD
716 with_gnu_ld
717 ld_R_works
718 RANLIB
719 STRIP
720 STRIP_STATIC_LIB
721 STRIP_SHARED_LIB
722 TAR
723 LN_S
724 AWK
725 BISON
726 BISONFLAGS
727 FLEX
728 FLEXFLAGS
729 PERL
730 perl_archlibexp
731 perl_privlibexp
732 perl_useshrplib
733 perl_embed_ldflags
734 PYTHON
735 python_version
736 python_configdir
737 python_includespec
738 python_libdir
739 python_libspec
740 python_additional_libs
741 OSSP_UUID_LIBS
742 HAVE_IPV6
743 LIBOBJS
744 acx_pthread_config
745 PTHREAD_CC
746 PTHREAD_LIBS
747 PTHREAD_CFLAGS
748 LDAP_LIBS_FE
749 LDAP_LIBS_BE
750 HAVE_POSIX_SIGNALS
751 MSGFMT
752 MSGMERGE
753 XGETTEXT
754 TCLSH
755 TCL_CONFIG_SH
756 TCL_INCLUDE_SPEC
757 TCL_LIB_FILE
758 TCL_LIBS
759 TCL_LIB_SPEC
760 TCL_SHARED_BUILD
761 TCL_SHLIB_LD_LIBS
762 NSGMLS
763 JADE
764 have_docbook
765 DOCBOOKSTYLE
766 COLLATEINDEX
767 SGMLSPL
768 vpath_build
769 LTLIBOBJS'
770 ac_subst_files=''
771       ac_precious_vars='build_alias
772 host_alias
773 target_alias
774 CC
775 CFLAGS
776 LDFLAGS
777 LIBS
778 CPPFLAGS
779 CPP
780 LDFLAGS_SL
781 DOCBOOKSTYLE'
782
783
784 # Initialize some variables set by options.
785 ac_init_help=
786 ac_init_version=false
787 # The variables have the same names as the options, with
788 # dashes changed to underlines.
789 cache_file=/dev/null
790 exec_prefix=NONE
791 no_create=
792 no_recursion=
793 prefix=NONE
794 program_prefix=NONE
795 program_suffix=NONE
796 program_transform_name=s,x,x,
797 silent=
798 site=
799 srcdir=
800 verbose=
801 x_includes=NONE
802 x_libraries=NONE
803
804 # Installation directory options.
805 # These are left unexpanded so users can "make install exec_prefix=/foo"
806 # and all the variables that are supposed to be based on exec_prefix
807 # by default will actually change.
808 # Use braces instead of parens because sh, perl, etc. also accept them.
809 # (The list follows the same order as the GNU Coding Standards.)
810 bindir='${exec_prefix}/bin'
811 sbindir='${exec_prefix}/sbin'
812 libexecdir='${exec_prefix}/libexec'
813 datarootdir='${prefix}/share'
814 datadir='${datarootdir}'
815 sysconfdir='${prefix}/etc'
816 sharedstatedir='${prefix}/com'
817 localstatedir='${prefix}/var'
818 includedir='${prefix}/include'
819 oldincludedir='/usr/include'
820 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
821 infodir='${datarootdir}/info'
822 htmldir='${docdir}'
823 dvidir='${docdir}'
824 pdfdir='${docdir}'
825 psdir='${docdir}'
826 libdir='${exec_prefix}/lib'
827 localedir='${datarootdir}/locale'
828 mandir='${datarootdir}/man'
829
830 ac_prev=
831 ac_dashdash=
832 for ac_option
833 do
834   # If the previous option needs an argument, assign it.
835   if test -n "$ac_prev"; then
836     eval $ac_prev=\$ac_option
837     ac_prev=
838     continue
839   fi
840
841   case $ac_option in
842   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
843   *)    ac_optarg=yes ;;
844   esac
845
846   # Accept the important Cygnus configure options, so we can diagnose typos.
847
848   case $ac_dashdash$ac_option in
849   --)
850     ac_dashdash=yes ;;
851
852   -bindir | --bindir | --bindi | --bind | --bin | --bi)
853     ac_prev=bindir ;;
854   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
855     bindir=$ac_optarg ;;
856
857   -build | --build | --buil | --bui | --bu)
858     ac_prev=build_alias ;;
859   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
860     build_alias=$ac_optarg ;;
861
862   -cache-file | --cache-file | --cache-fil | --cache-fi \
863   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
864     ac_prev=cache_file ;;
865   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
866   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
867     cache_file=$ac_optarg ;;
868
869   --config-cache | -C)
870     cache_file=config.cache ;;
871
872   -datadir | --datadir | --datadi | --datad)
873     ac_prev=datadir ;;
874   -datadir=* | --datadir=* | --datadi=* | --datad=*)
875     datadir=$ac_optarg ;;
876
877   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
878   | --dataroo | --dataro | --datar)
879     ac_prev=datarootdir ;;
880   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
881   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
882     datarootdir=$ac_optarg ;;
883
884   -disable-* | --disable-*)
885     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
886     # Reject names that are not valid shell variable names.
887     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
888       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
889    { (exit 1); exit 1; }; }
890     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
891     eval enable_$ac_feature=no ;;
892
893   -docdir | --docdir | --docdi | --doc | --do)
894     ac_prev=docdir ;;
895   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
896     docdir=$ac_optarg ;;
897
898   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
899     ac_prev=dvidir ;;
900   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
901     dvidir=$ac_optarg ;;
902
903   -enable-* | --enable-*)
904     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
905     # Reject names that are not valid shell variable names.
906     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
907       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
908    { (exit 1); exit 1; }; }
909     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
910     eval enable_$ac_feature=\$ac_optarg ;;
911
912   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
913   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
914   | --exec | --exe | --ex)
915     ac_prev=exec_prefix ;;
916   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
917   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
918   | --exec=* | --exe=* | --ex=*)
919     exec_prefix=$ac_optarg ;;
920
921   -gas | --gas | --ga | --g)
922     # Obsolete; use --with-gas.
923     with_gas=yes ;;
924
925   -help | --help | --hel | --he | -h)
926     ac_init_help=long ;;
927   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
928     ac_init_help=recursive ;;
929   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
930     ac_init_help=short ;;
931
932   -host | --host | --hos | --ho)
933     ac_prev=host_alias ;;
934   -host=* | --host=* | --hos=* | --ho=*)
935     host_alias=$ac_optarg ;;
936
937   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
938     ac_prev=htmldir ;;
939   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
940   | --ht=*)
941     htmldir=$ac_optarg ;;
942
943   -includedir | --includedir | --includedi | --included | --include \
944   | --includ | --inclu | --incl | --inc)
945     ac_prev=includedir ;;
946   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
947   | --includ=* | --inclu=* | --incl=* | --inc=*)
948     includedir=$ac_optarg ;;
949
950   -infodir | --infodir | --infodi | --infod | --info | --inf)
951     ac_prev=infodir ;;
952   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
953     infodir=$ac_optarg ;;
954
955   -libdir | --libdir | --libdi | --libd)
956     ac_prev=libdir ;;
957   -libdir=* | --libdir=* | --libdi=* | --libd=*)
958     libdir=$ac_optarg ;;
959
960   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
961   | --libexe | --libex | --libe)
962     ac_prev=libexecdir ;;
963   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
964   | --libexe=* | --libex=* | --libe=*)
965     libexecdir=$ac_optarg ;;
966
967   -localedir | --localedir | --localedi | --localed | --locale)
968     ac_prev=localedir ;;
969   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
970     localedir=$ac_optarg ;;
971
972   -localstatedir | --localstatedir | --localstatedi | --localstated \
973   | --localstate | --localstat | --localsta | --localst | --locals)
974     ac_prev=localstatedir ;;
975   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
976   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
977     localstatedir=$ac_optarg ;;
978
979   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
980     ac_prev=mandir ;;
981   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
982     mandir=$ac_optarg ;;
983
984   -nfp | --nfp | --nf)
985     # Obsolete; use --without-fp.
986     with_fp=no ;;
987
988   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
989   | --no-cr | --no-c | -n)
990     no_create=yes ;;
991
992   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
993   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
994     no_recursion=yes ;;
995
996   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
997   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
998   | --oldin | --oldi | --old | --ol | --o)
999     ac_prev=oldincludedir ;;
1000   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1001   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1002   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1003     oldincludedir=$ac_optarg ;;
1004
1005   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1006     ac_prev=prefix ;;
1007   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1008     prefix=$ac_optarg ;;
1009
1010   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1011   | --program-pre | --program-pr | --program-p)
1012     ac_prev=program_prefix ;;
1013   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1014   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1015     program_prefix=$ac_optarg ;;
1016
1017   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1018   | --program-suf | --program-su | --program-s)
1019     ac_prev=program_suffix ;;
1020   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1021   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1022     program_suffix=$ac_optarg ;;
1023
1024   -program-transform-name | --program-transform-name \
1025   | --program-transform-nam | --program-transform-na \
1026   | --program-transform-n | --program-transform- \
1027   | --program-transform | --program-transfor \
1028   | --program-transfo | --program-transf \
1029   | --program-trans | --program-tran \
1030   | --progr-tra | --program-tr | --program-t)
1031     ac_prev=program_transform_name ;;
1032   -program-transform-name=* | --program-transform-name=* \
1033   | --program-transform-nam=* | --program-transform-na=* \
1034   | --program-transform-n=* | --program-transform-=* \
1035   | --program-transform=* | --program-transfor=* \
1036   | --program-transfo=* | --program-transf=* \
1037   | --program-trans=* | --program-tran=* \
1038   | --progr-tra=* | --program-tr=* | --program-t=*)
1039     program_transform_name=$ac_optarg ;;
1040
1041   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1042     ac_prev=pdfdir ;;
1043   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1044     pdfdir=$ac_optarg ;;
1045
1046   -psdir | --psdir | --psdi | --psd | --ps)
1047     ac_prev=psdir ;;
1048   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1049     psdir=$ac_optarg ;;
1050
1051   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1052   | -silent | --silent | --silen | --sile | --sil)
1053     silent=yes ;;
1054
1055   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1056     ac_prev=sbindir ;;
1057   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1058   | --sbi=* | --sb=*)
1059     sbindir=$ac_optarg ;;
1060
1061   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1062   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1063   | --sharedst | --shareds | --shared | --share | --shar \
1064   | --sha | --sh)
1065     ac_prev=sharedstatedir ;;
1066   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1067   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1068   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1069   | --sha=* | --sh=*)
1070     sharedstatedir=$ac_optarg ;;
1071
1072   -site | --site | --sit)
1073     ac_prev=site ;;
1074   -site=* | --site=* | --sit=*)
1075     site=$ac_optarg ;;
1076
1077   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1078     ac_prev=srcdir ;;
1079   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1080     srcdir=$ac_optarg ;;
1081
1082   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1083   | --syscon | --sysco | --sysc | --sys | --sy)
1084     ac_prev=sysconfdir ;;
1085   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1086   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1087     sysconfdir=$ac_optarg ;;
1088
1089   -target | --target | --targe | --targ | --tar | --ta | --t)
1090     ac_prev=target_alias ;;
1091   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1092     target_alias=$ac_optarg ;;
1093
1094   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1095     verbose=yes ;;
1096
1097   -version | --version | --versio | --versi | --vers | -V)
1098     ac_init_version=: ;;
1099
1100   -with-* | --with-*)
1101     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1102     # Reject names that are not valid shell variable names.
1103     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1104       { echo "$as_me: error: invalid package name: $ac_package" >&2
1105    { (exit 1); exit 1; }; }
1106     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1107     eval with_$ac_package=\$ac_optarg ;;
1108
1109   -without-* | --without-*)
1110     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1111     # Reject names that are not valid shell variable names.
1112     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1113       { echo "$as_me: error: invalid package name: $ac_package" >&2
1114    { (exit 1); exit 1; }; }
1115     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1116     eval with_$ac_package=no ;;
1117
1118   --x)
1119     # Obsolete; use --with-x.
1120     with_x=yes ;;
1121
1122   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1123   | --x-incl | --x-inc | --x-in | --x-i)
1124     ac_prev=x_includes ;;
1125   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1126   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1127     x_includes=$ac_optarg ;;
1128
1129   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1130   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1131     ac_prev=x_libraries ;;
1132   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1133   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1134     x_libraries=$ac_optarg ;;
1135
1136   -*) { echo "$as_me: error: unrecognized option: $ac_option
1137 Try \`$0 --help' for more information." >&2
1138    { (exit 1); exit 1; }; }
1139     ;;
1140
1141   *=*)
1142     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1143     # Reject names that are not valid shell variable names.
1144     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1145       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1146    { (exit 1); exit 1; }; }
1147     eval $ac_envvar=\$ac_optarg
1148     export $ac_envvar ;;
1149
1150   *)
1151     # FIXME: should be removed in autoconf 3.0.
1152     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1153     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1154       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1155     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1156     ;;
1157
1158   esac
1159 done
1160
1161 if test -n "$ac_prev"; then
1162   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1163   { echo "$as_me: error: missing argument to $ac_option" >&2
1164    { (exit 1); exit 1; }; }
1165 fi
1166
1167 # Be sure to have absolute directory names.
1168 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1169                 datadir sysconfdir sharedstatedir localstatedir includedir \
1170                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1171                 libdir localedir mandir
1172 do
1173   eval ac_val=\$$ac_var
1174   case $ac_val in
1175     [\\/$]* | ?:[\\/]* )  continue;;
1176     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1177   esac
1178   { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1179    { (exit 1); exit 1; }; }
1180 done
1181
1182 # There might be people who depend on the old broken behavior: `$host'
1183 # used to hold the argument of --host etc.
1184 # FIXME: To remove some day.
1185 build=$build_alias
1186 host=$host_alias
1187 target=$target_alias
1188
1189 # FIXME: To remove some day.
1190 if test "x$host_alias" != x; then
1191   if test "x$build_alias" = x; then
1192     cross_compiling=maybe
1193     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1194     If a cross compiler is detected then cross compile mode will be used." >&2
1195   elif test "x$build_alias" != "x$host_alias"; then
1196     cross_compiling=yes
1197   fi
1198 fi
1199
1200 ac_tool_prefix=
1201 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1202
1203 test "$silent" = yes && exec 6>/dev/null
1204
1205
1206 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1207 ac_ls_di=`ls -di .` &&
1208 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1209   { echo "$as_me: error: Working directory cannot be determined" >&2
1210    { (exit 1); exit 1; }; }
1211 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1212   { echo "$as_me: error: pwd does not report name of working directory" >&2
1213    { (exit 1); exit 1; }; }
1214
1215
1216 # Find the source files, if location was not specified.
1217 if test -z "$srcdir"; then
1218   ac_srcdir_defaulted=yes
1219   # Try the directory containing this script, then the parent directory.
1220   ac_confdir=`$as_dirname -- "$0" ||
1221 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1222          X"$0" : 'X\(//\)[^/]' \| \
1223          X"$0" : 'X\(//\)$' \| \
1224          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1225 echo X"$0" |
1226     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1227             s//\1/
1228             q
1229           }
1230           /^X\(\/\/\)[^/].*/{
1231             s//\1/
1232             q
1233           }
1234           /^X\(\/\/\)$/{
1235             s//\1/
1236             q
1237           }
1238           /^X\(\/\).*/{
1239             s//\1/
1240             q
1241           }
1242           s/.*/./; q'`
1243   srcdir=$ac_confdir
1244   if test ! -r "$srcdir/$ac_unique_file"; then
1245     srcdir=..
1246   fi
1247 else
1248   ac_srcdir_defaulted=no
1249 fi
1250 if test ! -r "$srcdir/$ac_unique_file"; then
1251   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1252   { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1253    { (exit 1); exit 1; }; }
1254 fi
1255 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1256 ac_abs_confdir=`(
1257         cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1258    { (exit 1); exit 1; }; }
1259         pwd)`
1260 # When building in place, set srcdir=.
1261 if test "$ac_abs_confdir" = "$ac_pwd"; then
1262   srcdir=.
1263 fi
1264 # Remove unnecessary trailing slashes from srcdir.
1265 # Double slashes in file names in object file debugging info
1266 # mess up M-x gdb in Emacs.
1267 case $srcdir in
1268 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1269 esac
1270 for ac_var in $ac_precious_vars; do
1271   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1272   eval ac_env_${ac_var}_value=\$${ac_var}
1273   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1274   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1275 done
1276
1277 #
1278 # Report the --help message.
1279 #
1280 if test "$ac_init_help" = "long"; then
1281   # Omit some internal or obsolete options to make the list less imposing.
1282   # This message is too long to be a string in the A/UX 3.1 sh.
1283   cat <<_ACEOF
1284 \`configure' configures PostgreSQL 8.4devel to adapt to many kinds of systems.
1285
1286 Usage: $0 [OPTION]... [VAR=VALUE]...
1287
1288 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1289 VAR=VALUE.  See below for descriptions of some of the useful variables.
1290
1291 Defaults for the options are specified in brackets.
1292
1293 Configuration:
1294   -h, --help              display this help and exit
1295       --help=short        display options specific to this package
1296       --help=recursive    display the short help of all the included packages
1297   -V, --version           display version information and exit
1298   -q, --quiet, --silent   do not print \`checking...' messages
1299       --cache-file=FILE   cache test results in FILE [disabled]
1300   -C, --config-cache      alias for \`--cache-file=config.cache'
1301   -n, --no-create         do not create output files
1302       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1303
1304 Installation directories:
1305   --prefix=PREFIX         install architecture-independent files in PREFIX
1306                           [$ac_default_prefix]
1307   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1308                           [PREFIX]
1309
1310 By default, \`make install' will install all the files in
1311 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1312 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1313 for instance \`--prefix=\$HOME'.
1314
1315 For better control, use the options below.
1316
1317 Fine tuning of the installation directories:
1318   --bindir=DIR           user executables [EPREFIX/bin]
1319   --sbindir=DIR          system admin executables [EPREFIX/sbin]
1320   --libexecdir=DIR       program executables [EPREFIX/libexec]
1321   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
1322   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
1323   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
1324   --libdir=DIR           object code libraries [EPREFIX/lib]
1325   --includedir=DIR       C header files [PREFIX/include]
1326   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
1327   --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1328   --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1329   --infodir=DIR          info documentation [DATAROOTDIR/info]
1330   --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1331   --mandir=DIR           man documentation [DATAROOTDIR/man]
1332   --docdir=DIR           documentation root [DATAROOTDIR/doc/postgresql]
1333   --htmldir=DIR          html documentation [DOCDIR]
1334   --dvidir=DIR           dvi documentation [DOCDIR]
1335   --pdfdir=DIR           pdf documentation [DOCDIR]
1336   --psdir=DIR            ps documentation [DOCDIR]
1337 _ACEOF
1338
1339   cat <<\_ACEOF
1340
1341 System types:
1342   --build=BUILD     configure for building on BUILD [guessed]
1343   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1344 _ACEOF
1345 fi
1346
1347 if test -n "$ac_init_help"; then
1348   case $ac_init_help in
1349      short | recursive ) echo "Configuration of PostgreSQL 8.4devel:";;
1350    esac
1351   cat <<\_ACEOF
1352
1353 Optional Features:
1354   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1355   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1356   --disable-integer-datetimes  disable 64-bit integer date/time support
1357   --enable-nls[=LANGUAGES]  enable Native Language Support
1358   --disable-shared        do not build shared libraries
1359   --disable-rpath         do not embed shared library search path in executables
1360   --disable-spinlocks     do not use spinlocks
1361   --enable-debug          build with debugging symbols (-g)
1362   --enable-profiling      build with profiling enabled
1363   --enable-coverage       build with coverage testing instrumentation
1364   --enable-dtrace         build with DTrace support
1365   --enable-depend         turn on automatic dependency tracking
1366   --enable-cassert        enable assertion checks (for debugging)
1367   --enable-thread-safety  make client libraries thread-safe
1368   --enable-thread-safety-force  force thread-safety despite thread test failure
1369   --disable-float4-byval  disable float4 passed by value
1370   --disable-float8-byval  disable float8 passed by value
1371   --disable-largefile     omit support for large files
1372
1373 Optional Packages:
1374   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1375   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1376
1377   --with-includes=DIRS    look for additional header files in DIRS
1378   --with-libraries=DIRS   look for additional libraries in DIRS
1379   --with-libs=DIRS        alternative spelling of --with-libraries
1380   --with-pgport=PORTNUM   set default port number [5432]
1381   --with-blocksize=BLOCKSIZE  set table block size in kB [8]
1382   --with-segsize=SEGSIZE  set table segment size in GB [1]
1383   --with-wal-blocksize=BLOCKSIZE  set WAL block size in kB [8]
1384   --with-wal-segsize=SEGSIZE  set WAL segment size in MB [16]
1385   --with-tcl              build Tcl modules (PL/Tcl)
1386   --with-tclconfig=DIR    tclConfig.sh is in DIR
1387   --with-perl             build Perl modules (PL/Perl)
1388   --with-python           build Python modules (PL/Python)
1389   --with-gssapi           build with GSSAPI support
1390   --with-krb5             build with Kerberos 5 support
1391   --with-krb-srvnam=NAME  default service principal name in Kerberos [postgres]
1392   --with-pam              build with PAM support
1393   --with-ldap             build with LDAP support
1394   --with-bonjour          build with Bonjour support
1395   --with-openssl          build with OpenSSL support
1396   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1397   --with-libedit-preferred  prefer BSD Libedit over GNU Readline
1398   --with-ossp-uuid        use OSSP UUID library when building contrib/uuid-ossp
1399   --with-libxml           build with XML support
1400   --with-libxslt          use XSLT support when building contrib/xml2
1401   --with-system-tzdata=DIR  use system time zone data in DIR
1402   --without-zlib          do not use Zlib
1403   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1404
1405 Some influential environment variables:
1406   CC          C compiler command
1407   CFLAGS      C compiler flags
1408   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1409               nonstandard directory <lib dir>
1410   LIBS        libraries to pass to the linker, e.g. -l<library>
1411   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1412               you have headers in a nonstandard directory <include dir>
1413   CPP         C preprocessor
1414   LDFLAGS_SL
1415   DOCBOOKSTYLE
1416               location of DocBook stylesheets
1417
1418 Use these variables to override the choices made by `configure' or to help
1419 it to find libraries and programs with nonstandard names/locations.
1420
1421 Report bugs to <pgsql-bugs@postgresql.org>.
1422 _ACEOF
1423 ac_status=$?
1424 fi
1425
1426 if test "$ac_init_help" = "recursive"; then
1427   # If there are subdirs, report their specific --help.
1428   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1429     test -d "$ac_dir" || continue
1430     ac_builddir=.
1431
1432 case "$ac_dir" in
1433 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1434 *)
1435   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1436   # A ".." for each directory in $ac_dir_suffix.
1437   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1438   case $ac_top_builddir_sub in
1439   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1440   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1441   esac ;;
1442 esac
1443 ac_abs_top_builddir=$ac_pwd
1444 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1445 # for backward compatibility:
1446 ac_top_builddir=$ac_top_build_prefix
1447
1448 case $srcdir in
1449   .)  # We are building in place.
1450     ac_srcdir=.
1451     ac_top_srcdir=$ac_top_builddir_sub
1452     ac_abs_top_srcdir=$ac_pwd ;;
1453   [\\/]* | ?:[\\/]* )  # Absolute name.
1454     ac_srcdir=$srcdir$ac_dir_suffix;
1455     ac_top_srcdir=$srcdir
1456     ac_abs_top_srcdir=$srcdir ;;
1457   *) # Relative name.
1458     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1459     ac_top_srcdir=$ac_top_build_prefix$srcdir
1460     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1461 esac
1462 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1463
1464     cd "$ac_dir" || { ac_status=$?; continue; }
1465     # Check for guested configure.
1466     if test -f "$ac_srcdir/configure.gnu"; then
1467       echo &&
1468       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1469     elif test -f "$ac_srcdir/configure"; then
1470       echo &&
1471       $SHELL "$ac_srcdir/configure" --help=recursive
1472     else
1473       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1474     fi || ac_status=$?
1475     cd "$ac_pwd" || { ac_status=$?; break; }
1476   done
1477 fi
1478
1479 test -n "$ac_init_help" && exit $ac_status
1480 if $ac_init_version; then
1481   cat <<\_ACEOF
1482 PostgreSQL configure 8.4devel
1483 generated by GNU Autoconf 2.61
1484
1485 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1486 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1487 This configure script is free software; the Free Software Foundation
1488 gives unlimited permission to copy, distribute and modify it.
1489
1490 Copyright (c) 1996-2008, PostgreSQL Global Development Group
1491 _ACEOF
1492   exit
1493 fi
1494 cat >config.log <<_ACEOF
1495 This file contains any messages produced by compilers while
1496 running configure, to aid debugging if configure makes a mistake.
1497
1498 It was created by PostgreSQL $as_me 8.4devel, which was
1499 generated by GNU Autoconf 2.61.  Invocation command line was
1500
1501   $ $0 $@
1502
1503 _ACEOF
1504 exec 5>>config.log
1505 {
1506 cat <<_ASUNAME
1507 ## --------- ##
1508 ## Platform. ##
1509 ## --------- ##
1510
1511 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1512 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1513 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1514 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1515 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1516
1517 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1518 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1519
1520 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1521 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1522 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1523 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1524 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1525 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1526 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1527
1528 _ASUNAME
1529
1530 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1531 for as_dir in $PATH
1532 do
1533   IFS=$as_save_IFS
1534   test -z "$as_dir" && as_dir=.
1535   echo "PATH: $as_dir"
1536 done
1537 IFS=$as_save_IFS
1538
1539 } >&5
1540
1541 cat >&5 <<_ACEOF
1542
1543
1544 ## ----------- ##
1545 ## Core tests. ##
1546 ## ----------- ##
1547
1548 _ACEOF
1549
1550
1551 # Keep a trace of the command line.
1552 # Strip out --no-create and --no-recursion so they do not pile up.
1553 # Strip out --silent because we don't want to record it for future runs.
1554 # Also quote any args containing shell meta-characters.
1555 # Make two passes to allow for proper duplicate-argument suppression.
1556 ac_configure_args=
1557 ac_configure_args0=
1558 ac_configure_args1=
1559 ac_must_keep_next=false
1560 for ac_pass in 1 2
1561 do
1562   for ac_arg
1563   do
1564     case $ac_arg in
1565     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1566     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1567     | -silent | --silent | --silen | --sile | --sil)
1568       continue ;;
1569     *\'*)
1570       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1571     esac
1572     case $ac_pass in
1573     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1574     2)
1575       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1576       if test $ac_must_keep_next = true; then
1577         ac_must_keep_next=false # Got value, back to normal.
1578       else
1579         case $ac_arg in
1580           *=* | --config-cache | -C | -disable-* | --disable-* \
1581           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1582           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1583           | -with-* | --with-* | -without-* | --without-* | --x)
1584             case "$ac_configure_args0 " in
1585               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1586             esac
1587             ;;
1588           -* ) ac_must_keep_next=true ;;
1589         esac
1590       fi
1591       ac_configure_args="$ac_configure_args '$ac_arg'"
1592       ;;
1593     esac
1594   done
1595 done
1596 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1597 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1598
1599 # When interrupted or exit'd, cleanup temporary files, and complete
1600 # config.log.  We remove comments because anyway the quotes in there
1601 # would cause problems or look ugly.
1602 # WARNING: Use '\'' to represent an apostrophe within the trap.
1603 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1604 trap 'exit_status=$?
1605   # Save into config.log some information that might help in debugging.
1606   {
1607     echo
1608
1609     cat <<\_ASBOX
1610 ## ---------------- ##
1611 ## Cache variables. ##
1612 ## ---------------- ##
1613 _ASBOX
1614     echo
1615     # The following way of writing the cache mishandles newlines in values,
1616 (
1617   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1618     eval ac_val=\$$ac_var
1619     case $ac_val in #(
1620     *${as_nl}*)
1621       case $ac_var in #(
1622       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1623 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1624       esac
1625       case $ac_var in #(
1626       _ | IFS | as_nl) ;; #(
1627       *) $as_unset $ac_var ;;
1628       esac ;;
1629     esac
1630   done
1631   (set) 2>&1 |
1632     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1633     *${as_nl}ac_space=\ *)
1634       sed -n \
1635         "s/'\''/'\''\\\\'\'''\''/g;
1636           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1637       ;; #(
1638     *)
1639       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1640       ;;
1641     esac |
1642     sort
1643 )
1644     echo
1645
1646     cat <<\_ASBOX
1647 ## ----------------- ##
1648 ## Output variables. ##
1649 ## ----------------- ##
1650 _ASBOX
1651     echo
1652     for ac_var in $ac_subst_vars
1653     do
1654       eval ac_val=\$$ac_var
1655       case $ac_val in
1656       *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1657       esac
1658       echo "$ac_var='\''$ac_val'\''"
1659     done | sort
1660     echo
1661
1662     if test -n "$ac_subst_files"; then
1663       cat <<\_ASBOX
1664 ## ------------------- ##
1665 ## File substitutions. ##
1666 ## ------------------- ##
1667 _ASBOX
1668       echo
1669       for ac_var in $ac_subst_files
1670       do
1671         eval ac_val=\$$ac_var
1672         case $ac_val in
1673         *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1674         esac
1675         echo "$ac_var='\''$ac_val'\''"
1676       done | sort
1677       echo
1678     fi
1679
1680     if test -s confdefs.h; then
1681       cat <<\_ASBOX
1682 ## ----------- ##
1683 ## confdefs.h. ##
1684 ## ----------- ##
1685 _ASBOX
1686       echo
1687       cat confdefs.h
1688       echo
1689     fi
1690     test "$ac_signal" != 0 &&
1691       echo "$as_me: caught signal $ac_signal"
1692     echo "$as_me: exit $exit_status"
1693   } >&5
1694   rm -f core *.core core.conftest.* &&
1695     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1696     exit $exit_status
1697 ' 0
1698 for ac_signal in 1 2 13 15; do
1699   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1700 done
1701 ac_signal=0
1702
1703 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1704 rm -f -r conftest* confdefs.h
1705
1706 # Predefined preprocessor variables.
1707
1708 cat >>confdefs.h <<_ACEOF
1709 #define PACKAGE_NAME "$PACKAGE_NAME"
1710 _ACEOF
1711
1712
1713 cat >>confdefs.h <<_ACEOF
1714 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1715 _ACEOF
1716
1717
1718 cat >>confdefs.h <<_ACEOF
1719 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1720 _ACEOF
1721
1722
1723 cat >>confdefs.h <<_ACEOF
1724 #define PACKAGE_STRING "$PACKAGE_STRING"
1725 _ACEOF
1726
1727
1728 cat >>confdefs.h <<_ACEOF
1729 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1730 _ACEOF
1731
1732
1733 # Let the site file select an alternate cache file if it wants to.
1734 # Prefer explicitly selected file to automatically selected ones.
1735 if test -n "$CONFIG_SITE"; then
1736   set x "$CONFIG_SITE"
1737 elif test "x$prefix" != xNONE; then
1738   set x "$prefix/share/config.site" "$prefix/etc/config.site"
1739 else
1740   set x "$ac_default_prefix/share/config.site" \
1741         "$ac_default_prefix/etc/config.site"
1742 fi
1743 shift
1744 for ac_site_file
1745 do
1746   if test -r "$ac_site_file"; then
1747     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1748 echo "$as_me: loading site script $ac_site_file" >&6;}
1749     sed 's/^/| /' "$ac_site_file" >&5
1750     . "$ac_site_file"
1751   fi
1752 done
1753
1754 if test -r "$cache_file"; then
1755   # Some versions of bash will fail to source /dev/null (special
1756   # files actually), so we avoid doing that.
1757   if test -f "$cache_file"; then
1758     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1759 echo "$as_me: loading cache $cache_file" >&6;}
1760     case $cache_file in
1761       [\\/]* | ?:[\\/]* ) . "$cache_file";;
1762       *)                      . "./$cache_file";;
1763     esac
1764   fi
1765 else
1766   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1767 echo "$as_me: creating cache $cache_file" >&6;}
1768   >$cache_file
1769 fi
1770
1771 # Check that the precious variables saved in the cache have kept the same
1772 # value.
1773 ac_cache_corrupted=false
1774 for ac_var in $ac_precious_vars; do
1775   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1776   eval ac_new_set=\$ac_env_${ac_var}_set
1777   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1778   eval ac_new_val=\$ac_env_${ac_var}_value
1779   case $ac_old_set,$ac_new_set in
1780     set,)
1781       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1782 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1783       ac_cache_corrupted=: ;;
1784     ,set)
1785       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1786 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1787       ac_cache_corrupted=: ;;
1788     ,);;
1789     *)
1790       if test "x$ac_old_val" != "x$ac_new_val"; then
1791         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1792 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1793         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1794 echo "$as_me:   former value:  $ac_old_val" >&2;}
1795         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1796 echo "$as_me:   current value: $ac_new_val" >&2;}
1797         ac_cache_corrupted=:
1798       fi;;
1799   esac
1800   # Pass precious variables to config.status.
1801   if test "$ac_new_set" = set; then
1802     case $ac_new_val in
1803     *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1804     *) ac_arg=$ac_var=$ac_new_val ;;
1805     esac
1806     case " $ac_configure_args " in
1807       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1808       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1809     esac
1810   fi
1811 done
1812 if $ac_cache_corrupted; then
1813   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1814 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1815   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1816 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1817    { (exit 1); exit 1; }; }
1818 fi
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844 ac_ext=c
1845 ac_cpp='$CPP $CPPFLAGS'
1846 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1847 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1848 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1849
1850
1851
1852
1853
1854
1855 ac_aux_dir=
1856 for ac_dir in config "$srcdir"/config; do
1857   if test -f "$ac_dir/install-sh"; then
1858     ac_aux_dir=$ac_dir
1859     ac_install_sh="$ac_aux_dir/install-sh -c"
1860     break
1861   elif test -f "$ac_dir/install.sh"; then
1862     ac_aux_dir=$ac_dir
1863     ac_install_sh="$ac_aux_dir/install.sh -c"
1864     break
1865   elif test -f "$ac_dir/shtool"; then
1866     ac_aux_dir=$ac_dir
1867     ac_install_sh="$ac_aux_dir/shtool install -c"
1868     break
1869   fi
1870 done
1871 if test -z "$ac_aux_dir"; then
1872   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5
1873 echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;}
1874    { (exit 1); exit 1; }; }
1875 fi
1876
1877 # These three variables are undocumented and unsupported,
1878 # and are intended to be withdrawn in a future Autoconf release.
1879 # They can cause serious problems if a builder's source tree is in a directory
1880 # whose full name contains unusual characters.
1881 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
1882 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
1883 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
1884
1885
1886
1887 configure_args=$ac_configure_args
1888
1889
1890
1891 cat >>confdefs.h <<_ACEOF
1892 #define PG_VERSION "$PACKAGE_VERSION"
1893 _ACEOF
1894
1895
1896 # Make sure we can run config.sub.
1897 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
1898   { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
1899 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
1900    { (exit 1); exit 1; }; }
1901
1902 { echo "$as_me:$LINENO: checking build system type" >&5
1903 echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
1904 if test "${ac_cv_build+set}" = set; then
1905   echo $ECHO_N "(cached) $ECHO_C" >&6
1906 else
1907   ac_build_alias=$build_alias
1908 test "x$ac_build_alias" = x &&
1909   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
1910 test "x$ac_build_alias" = x &&
1911   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1912 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1913    { (exit 1); exit 1; }; }
1914 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
1915   { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
1916 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
1917    { (exit 1); exit 1; }; }
1918
1919 fi
1920 { echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1921 echo "${ECHO_T}$ac_cv_build" >&6; }
1922 case $ac_cv_build in
1923 *-*-*) ;;
1924 *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
1925 echo "$as_me: error: invalid value of canonical build" >&2;}
1926    { (exit 1); exit 1; }; };;
1927 esac
1928 build=$ac_cv_build
1929 ac_save_IFS=$IFS; IFS='-'
1930 set x $ac_cv_build
1931 shift
1932 build_cpu=$1
1933 build_vendor=$2
1934 shift; shift
1935 # Remember, the first character of IFS is used to create $*,
1936 # except with old shells:
1937 build_os=$*
1938 IFS=$ac_save_IFS
1939 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
1940
1941
1942 { echo "$as_me:$LINENO: checking host system type" >&5
1943 echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
1944 if test "${ac_cv_host+set}" = set; then
1945   echo $ECHO_N "(cached) $ECHO_C" >&6
1946 else
1947   if test "x$host_alias" = x; then
1948   ac_cv_host=$ac_cv_build
1949 else
1950   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
1951     { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
1952 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
1953    { (exit 1); exit 1; }; }
1954 fi
1955
1956 fi
1957 { echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1958 echo "${ECHO_T}$ac_cv_host" >&6; }
1959 case $ac_cv_host in
1960 *-*-*) ;;
1961 *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
1962 echo "$as_me: error: invalid value of canonical host" >&2;}
1963    { (exit 1); exit 1; }; };;
1964 esac
1965 host=$ac_cv_host
1966 ac_save_IFS=$IFS; IFS='-'
1967 set x $ac_cv_host
1968 shift
1969 host_cpu=$1
1970 host_vendor=$2
1971 shift; shift
1972 # Remember, the first character of IFS is used to create $*,
1973 # except with old shells:
1974 host_os=$*
1975 IFS=$ac_save_IFS
1976 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
1977
1978
1979
1980 template=
1981 { echo "$as_me:$LINENO: checking which template to use" >&5
1982 echo $ECHO_N "checking which template to use... $ECHO_C" >&6; }
1983
1984
1985 pgac_args="$pgac_args with_template"
1986
1987
1988 # Check whether --with-template was given.
1989 if test "${with_template+set}" = set; then
1990   withval=$with_template;
1991   case $withval in
1992     yes)
1993       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1994 echo "$as_me: error: argument required for --with-template option" >&2;}
1995    { (exit 1); exit 1; }; }
1996       ;;
1997     no)
1998       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1999 echo "$as_me: error: argument required for --with-template option" >&2;}
2000    { (exit 1); exit 1; }; }
2001       ;;
2002     *)
2003
2004   case $withval in
2005     list)   echo; ls "$srcdir/src/template"; exit;;
2006     *)      if test -f "$srcdir/src/template/$with_template" ; then
2007               template=$withval
2008             else
2009               { { echo "$as_me:$LINENO: error: '$withval' is not a valid template name. Use 'list' for a list." >&5
2010 echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a list." >&2;}
2011    { (exit 1); exit 1; }; }
2012             fi;;
2013   esac
2014
2015       ;;
2016   esac
2017
2018 else
2019
2020 # --with-template not given
2021
2022 case $host_os in
2023      aix*) template=aix ;;
2024     bsdi*) template=bsdi ;;
2025   cygwin*) template=cygwin ;;
2026   darwin*) template=darwin ;;
2027     dgux*) template=dgux ;;
2028  freebsd*) template=freebsd ;;
2029     hpux*) template=hpux ;;
2030     irix*) template=irix ;;
2031  linux*|gnu*|k*bsd*-gnu)
2032            template=linux ;;
2033    mingw*) template=win32 ;;
2034   netbsd*) template=netbsd ;;
2035 nextstep*) template=nextstep ;;
2036  openbsd*) template=openbsd ;;
2037      osf*) template=osf ;;
2038      sco*) template=sco ;;
2039  solaris*) template=solaris ;;
2040    sunos*) template=sunos4 ;;
2041  sysv4.2*)
2042         case $host_vendor in
2043           univel) template=univel ;;
2044         esac ;;
2045    sysv4*) template=svr4 ;;
2046    sysv5*) template=unixware ;;
2047   ultrix*) template=ultrix4 ;;
2048 esac
2049
2050   if test x"$template" = x"" ; then
2051     { { echo "$as_me:$LINENO: error:
2052 *******************************************************************
2053 PostgreSQL has apparently not been ported to your platform yet.
2054 To try a manual configuration, look into the src/template directory
2055 for a similar platform and use the '--with-template=' option.
2056
2057 Please also contact <pgsql-ports@postgresql.org> to see about
2058 rectifying this.  Include the above 'checking host system type...'
2059 line.
2060 *******************************************************************
2061 " >&5
2062 echo "$as_me: error:
2063 *******************************************************************
2064 PostgreSQL has apparently not been ported to your platform yet.
2065 To try a manual configuration, look into the src/template directory
2066 for a similar platform and use the '--with-template=' option.
2067
2068 Please also contact <pgsql-ports@postgresql.org> to see about
2069 rectifying this.  Include the above 'checking host system type...'
2070 line.
2071 *******************************************************************
2072 " >&2;}
2073    { (exit 1); exit 1; }; }
2074   fi
2075
2076
2077 fi
2078
2079
2080
2081 { echo "$as_me:$LINENO: result: $template" >&5
2082 echo "${ECHO_T}$template" >&6; }
2083
2084 PORTNAME=$template
2085
2086
2087 # Initialize default assumption that we do not need separate assembly code
2088 # for TAS (test-and-set).  This can be overridden by the template file
2089 # when it's executed.
2090 need_tas=no
2091 tas_file=dummy.s
2092
2093
2094
2095 ##
2096 ## Command line options
2097 ##
2098
2099 #
2100 # Add non-standard directories to the include path
2101 #
2102
2103 pgac_args="$pgac_args with_includes"
2104
2105
2106 # Check whether --with-includes was given.
2107 if test "${with_includes+set}" = set; then
2108   withval=$with_includes;
2109   case $withval in
2110     yes)
2111       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
2112 echo "$as_me: error: argument required for --with-includes option" >&2;}
2113    { (exit 1); exit 1; }; }
2114       ;;
2115     no)
2116       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
2117 echo "$as_me: error: argument required for --with-includes option" >&2;}
2118    { (exit 1); exit 1; }; }
2119       ;;
2120     *)
2121
2122       ;;
2123   esac
2124
2125 fi
2126
2127
2128
2129
2130 #
2131 # Add non-standard directories to the library search path
2132 #
2133
2134 pgac_args="$pgac_args with_libraries"
2135
2136
2137 # Check whether --with-libraries was given.
2138 if test "${with_libraries+set}" = set; then
2139   withval=$with_libraries;
2140   case $withval in
2141     yes)
2142       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
2143 echo "$as_me: error: argument required for --with-libraries option" >&2;}
2144    { (exit 1); exit 1; }; }
2145       ;;
2146     no)
2147       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
2148 echo "$as_me: error: argument required for --with-libraries option" >&2;}
2149    { (exit 1); exit 1; }; }
2150       ;;
2151     *)
2152       LIBRARY_DIRS=$withval
2153       ;;
2154   esac
2155
2156 fi
2157
2158
2159
2160
2161 pgac_args="$pgac_args with_libs"
2162
2163
2164 # Check whether --with-libs was given.
2165 if test "${with_libs+set}" = set; then
2166   withval=$with_libs;
2167   case $withval in
2168     yes)
2169       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
2170 echo "$as_me: error: argument required for --with-libs option" >&2;}
2171    { (exit 1); exit 1; }; }
2172       ;;
2173     no)
2174       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
2175 echo "$as_me: error: argument required for --with-libs option" >&2;}
2176    { (exit 1); exit 1; }; }
2177       ;;
2178     *)
2179       LIBRARY_DIRS=$withval
2180       ;;
2181   esac
2182
2183 fi
2184
2185
2186
2187
2188 #
2189 # 64-bit integer date/time storage: enabled by default.
2190 #
2191 { echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time support" >&5
2192 echo $ECHO_N "checking whether to build with 64-bit integer date/time support... $ECHO_C" >&6; }
2193
2194 pgac_args="$pgac_args enable_integer_datetimes"
2195
2196 # Check whether --enable-integer-datetimes was given.
2197 if test "${enable_integer_datetimes+set}" = set; then
2198   enableval=$enable_integer_datetimes;
2199   case $enableval in
2200     yes)
2201
2202 cat >>confdefs.h <<\_ACEOF
2203 #define USE_INTEGER_DATETIMES 1
2204 _ACEOF
2205
2206       ;;
2207     no)
2208       :
2209       ;;
2210     *)
2211       { { echo "$as_me:$LINENO: error: no argument expected for --enable-integer-datetimes option" >&5
2212 echo "$as_me: error: no argument expected for --enable-integer-datetimes option" >&2;}
2213    { (exit 1); exit 1; }; }
2214       ;;
2215   esac
2216
2217 else
2218   enable_integer_datetimes=yes
2219
2220 cat >>confdefs.h <<\_ACEOF
2221 #define USE_INTEGER_DATETIMES 1
2222 _ACEOF
2223
2224 fi
2225
2226
2227 { echo "$as_me:$LINENO: result: $enable_integer_datetimes" >&5
2228 echo "${ECHO_T}$enable_integer_datetimes" >&6; }
2229
2230
2231 #
2232 # NLS
2233 #
2234 { echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
2235 echo $ECHO_N "checking whether NLS is wanted... $ECHO_C" >&6; }
2236
2237 pgac_args="$pgac_args enable_nls"
2238
2239 # Check whether --enable-nls was given.
2240 if test "${enable_nls+set}" = set; then
2241   enableval=$enable_nls;
2242   case $enableval in
2243     yes)
2244       :
2245       ;;
2246     no)
2247       :
2248       ;;
2249     *)
2250       enable_nls=yes
2251 WANTED_LANGUAGES=$enableval
2252       ;;
2253   esac
2254
2255 else
2256   enable_nls=no
2257 fi
2258
2259
2260
2261 if test "$enable_nls" = yes; then
2262
2263 cat >>confdefs.h <<\_ACEOF
2264 #define ENABLE_NLS 1
2265 _ACEOF
2266
2267 fi
2268
2269 { echo "$as_me:$LINENO: result: $enable_nls" >&5
2270 echo "${ECHO_T}$enable_nls" >&6; }
2271
2272
2273
2274 #
2275 # Default port number (--with-pgport), default 5432
2276 #
2277 { echo "$as_me:$LINENO: checking for default port number" >&5
2278 echo $ECHO_N "checking for default port number... $ECHO_C" >&6; }
2279
2280 pgac_args="$pgac_args with_pgport"
2281
2282
2283 # Check whether --with-pgport was given.
2284 if test "${with_pgport+set}" = set; then
2285   withval=$with_pgport;
2286   case $withval in
2287     yes)
2288       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
2289 echo "$as_me: error: argument required for --with-pgport option" >&2;}
2290    { (exit 1); exit 1; }; }
2291       ;;
2292     no)
2293       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
2294 echo "$as_me: error: argument required for --with-pgport option" >&2;}
2295    { (exit 1); exit 1; }; }
2296       ;;
2297     *)
2298       default_port=$withval
2299       ;;
2300   esac
2301
2302 else
2303   default_port=5432
2304 fi
2305
2306
2307 { echo "$as_me:$LINENO: result: $default_port" >&5
2308 echo "${ECHO_T}$default_port" >&6; }
2309 # Need both of these because some places want an integer and some a string
2310
2311 cat >>confdefs.h <<_ACEOF
2312 #define DEF_PGPORT ${default_port}
2313 _ACEOF
2314
2315
2316 cat >>confdefs.h <<_ACEOF
2317 #define DEF_PGPORT_STR "${default_port}"
2318 _ACEOF
2319
2320
2321
2322 #
2323 # Option to disable shared libraries
2324 #
2325
2326 pgac_args="$pgac_args enable_shared"
2327
2328 # Check whether --enable-shared was given.
2329 if test "${enable_shared+set}" = set; then
2330   enableval=$enable_shared;
2331   case $enableval in
2332     yes)
2333       :
2334       ;;
2335     no)
2336       :
2337       ;;
2338     *)
2339       { { echo "$as_me:$LINENO: error: no argument expected for --enable-shared option" >&5
2340 echo "$as_me: error: no argument expected for --enable-shared option" >&2;}
2341    { (exit 1); exit 1; }; }
2342       ;;
2343   esac
2344
2345 else
2346   enable_shared=yes
2347
2348 fi
2349
2350
2351
2352
2353 #
2354 # '-rpath'-like feature can be disabled
2355 #
2356
2357 pgac_args="$pgac_args enable_rpath"
2358
2359 # Check whether --enable-rpath was given.
2360 if test "${enable_rpath+set}" = set; then
2361   enableval=$enable_rpath;
2362   case $enableval in
2363     yes)
2364       :
2365       ;;
2366     no)
2367       :
2368       ;;
2369     *)
2370       { { echo "$as_me:$LINENO: error: no argument expected for --enable-rpath option" >&5
2371 echo "$as_me: error: no argument expected for --enable-rpath option" >&2;}
2372    { (exit 1); exit 1; }; }
2373       ;;
2374   esac
2375
2376 else
2377   enable_rpath=yes
2378
2379 fi
2380
2381
2382
2383
2384 #
2385 # Spinlocks
2386 #
2387
2388 pgac_args="$pgac_args enable_spinlocks"
2389
2390 # Check whether --enable-spinlocks was given.
2391 if test "${enable_spinlocks+set}" = set; then
2392   enableval=$enable_spinlocks;
2393   case $enableval in
2394     yes)
2395       :
2396       ;;
2397     no)
2398       :
2399       ;;
2400     *)
2401       { { echo "$as_me:$LINENO: error: no argument expected for --enable-spinlocks option" >&5
2402 echo "$as_me: error: no argument expected for --enable-spinlocks option" >&2;}
2403    { (exit 1); exit 1; }; }
2404       ;;
2405   esac
2406
2407 else
2408   enable_spinlocks=yes
2409
2410 fi
2411
2412
2413
2414 #
2415 # --enable-debug adds -g to compiler flags
2416 #
2417
2418 pgac_args="$pgac_args enable_debug"
2419
2420 # Check whether --enable-debug was given.
2421 if test "${enable_debug+set}" = set; then
2422   enableval=$enable_debug;
2423   case $enableval in
2424     yes)
2425       :
2426       ;;
2427     no)
2428       :
2429       ;;
2430     *)
2431       { { echo "$as_me:$LINENO: error: no argument expected for --enable-debug option" >&5
2432 echo "$as_me: error: no argument expected for --enable-debug option" >&2;}
2433    { (exit 1); exit 1; }; }
2434       ;;
2435   esac
2436
2437 else
2438   enable_debug=no
2439
2440 fi
2441
2442
2443
2444
2445 #
2446 # --enable-profiling enables gcc profiling
2447 #
2448
2449 pgac_args="$pgac_args enable_profiling"
2450
2451 # Check whether --enable-profiling was given.
2452 if test "${enable_profiling+set}" = set; then
2453   enableval=$enable_profiling;
2454   case $enableval in
2455     yes)
2456       :
2457       ;;
2458     no)
2459       :
2460       ;;
2461     *)
2462       { { echo "$as_me:$LINENO: error: no argument expected for --enable-profiling option" >&5
2463 echo "$as_me: error: no argument expected for --enable-profiling option" >&2;}
2464    { (exit 1); exit 1; }; }
2465       ;;
2466   esac
2467
2468 else
2469   enable_profiling=no
2470
2471 fi
2472
2473
2474
2475
2476 #
2477 # --enable-coverage enables generation of code coverage metrics with gcov
2478 #
2479
2480 pgac_args="$pgac_args enable_coverage"
2481
2482 # Check whether --enable-coverage was given.
2483 if test "${enable_coverage+set}" = set; then
2484   enableval=$enable_coverage;
2485   case $enableval in
2486     yes)
2487       for ac_prog in gcov
2488 do
2489   # Extract the first word of "$ac_prog", so it can be a program name with args.
2490 set dummy $ac_prog; ac_word=$2
2491 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2492 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2493 if test "${ac_cv_prog_GCOV+set}" = set; then
2494   echo $ECHO_N "(cached) $ECHO_C" >&6
2495 else
2496   if test -n "$GCOV"; then
2497   ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
2498 else
2499 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2500 for as_dir in $PATH
2501 do
2502   IFS=$as_save_IFS
2503   test -z "$as_dir" && as_dir=.
2504   for ac_exec_ext in '' $ac_executable_extensions; do
2505   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2506     ac_cv_prog_GCOV="$ac_prog"
2507     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2508     break 2
2509   fi
2510 done
2511 done
2512 IFS=$as_save_IFS
2513
2514 fi
2515 fi
2516 GCOV=$ac_cv_prog_GCOV
2517 if test -n "$GCOV"; then
2518   { echo "$as_me:$LINENO: result: $GCOV" >&5
2519 echo "${ECHO_T}$GCOV" >&6; }
2520 else
2521   { echo "$as_me:$LINENO: result: no" >&5
2522 echo "${ECHO_T}no" >&6; }
2523 fi
2524
2525
2526   test -n "$GCOV" && break
2527 done
2528
2529 if test -z "$GCOV"; then
2530   { { echo "$as_me:$LINENO: error: gcov not found" >&5
2531 echo "$as_me: error: gcov not found" >&2;}
2532    { (exit 1); exit 1; }; }
2533 fi
2534 for ac_prog in lcov
2535 do
2536   # Extract the first word of "$ac_prog", so it can be a program name with args.
2537 set dummy $ac_prog; ac_word=$2
2538 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2539 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2540 if test "${ac_cv_prog_LCOV+set}" = set; then
2541   echo $ECHO_N "(cached) $ECHO_C" >&6
2542 else
2543   if test -n "$LCOV"; then
2544   ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
2545 else
2546 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2547 for as_dir in $PATH
2548 do
2549   IFS=$as_save_IFS
2550   test -z "$as_dir" && as_dir=.
2551   for ac_exec_ext in '' $ac_executable_extensions; do
2552   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2553     ac_cv_prog_LCOV="$ac_prog"
2554     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2555     break 2
2556   fi
2557 done
2558 done
2559 IFS=$as_save_IFS
2560
2561 fi
2562 fi
2563 LCOV=$ac_cv_prog_LCOV
2564 if test -n "$LCOV"; then
2565   { echo "$as_me:$LINENO: result: $LCOV" >&5
2566 echo "${ECHO_T}$LCOV" >&6; }
2567 else
2568   { echo "$as_me:$LINENO: result: no" >&5
2569 echo "${ECHO_T}no" >&6; }
2570 fi
2571
2572
2573   test -n "$LCOV" && break
2574 done
2575
2576 if test -z "$LCOV"; then
2577   { { echo "$as_me:$LINENO: error: lcov not found" >&5
2578 echo "$as_me: error: lcov not found" >&2;}
2579    { (exit 1); exit 1; }; }
2580 fi
2581 for ac_prog in genhtml
2582 do
2583   # Extract the first word of "$ac_prog", so it can be a program name with args.
2584 set dummy $ac_prog; ac_word=$2
2585 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2586 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2587 if test "${ac_cv_prog_GENHTML+set}" = set; then
2588   echo $ECHO_N "(cached) $ECHO_C" >&6
2589 else
2590   if test -n "$GENHTML"; then
2591   ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
2592 else
2593 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2594 for as_dir in $PATH
2595 do
2596   IFS=$as_save_IFS
2597   test -z "$as_dir" && as_dir=.
2598   for ac_exec_ext in '' $ac_executable_extensions; do
2599   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2600     ac_cv_prog_GENHTML="$ac_prog"
2601     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2602     break 2
2603   fi
2604 done
2605 done
2606 IFS=$as_save_IFS
2607
2608 fi
2609 fi
2610 GENHTML=$ac_cv_prog_GENHTML
2611 if test -n "$GENHTML"; then
2612   { echo "$as_me:$LINENO: result: $GENHTML" >&5
2613 echo "${ECHO_T}$GENHTML" >&6; }
2614 else
2615   { echo "$as_me:$LINENO: result: no" >&5
2616 echo "${ECHO_T}no" >&6; }
2617 fi
2618
2619
2620   test -n "$GENHTML" && break
2621 done
2622
2623 if test -z "$GENHTML"; then
2624   { { echo "$as_me:$LINENO: error: genhtml not found" >&5
2625 echo "$as_me: error: genhtml not found" >&2;}
2626    { (exit 1); exit 1; }; }
2627 fi
2628       ;;
2629     no)
2630       :
2631       ;;
2632     *)
2633       { { echo "$as_me:$LINENO: error: no argument expected for --enable-coverage option" >&5
2634 echo "$as_me: error: no argument expected for --enable-coverage option" >&2;}
2635    { (exit 1); exit 1; }; }
2636       ;;
2637   esac
2638
2639 else
2640   enable_coverage=no
2641
2642 fi
2643
2644
2645
2646
2647 #
2648 # DTrace
2649 #
2650
2651 pgac_args="$pgac_args enable_dtrace"
2652
2653 # Check whether --enable-dtrace was given.
2654 if test "${enable_dtrace+set}" = set; then
2655   enableval=$enable_dtrace;
2656   case $enableval in
2657     yes)
2658
2659 cat >>confdefs.h <<\_ACEOF
2660 #define ENABLE_DTRACE 1
2661 _ACEOF
2662
2663 for ac_prog in dtrace
2664 do
2665   # Extract the first word of "$ac_prog", so it can be a program name with args.
2666 set dummy $ac_prog; ac_word=$2
2667 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2668 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2669 if test "${ac_cv_prog_DTRACE+set}" = set; then
2670   echo $ECHO_N "(cached) $ECHO_C" >&6
2671 else
2672   if test -n "$DTRACE"; then
2673   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
2674 else
2675 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2676 for as_dir in $PATH
2677 do
2678   IFS=$as_save_IFS
2679   test -z "$as_dir" && as_dir=.
2680   for ac_exec_ext in '' $ac_executable_extensions; do
2681   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2682     ac_cv_prog_DTRACE="$ac_prog"
2683     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2684     break 2
2685   fi
2686 done
2687 done
2688 IFS=$as_save_IFS
2689
2690 fi
2691 fi
2692 DTRACE=$ac_cv_prog_DTRACE
2693 if test -n "$DTRACE"; then
2694   { echo "$as_me:$LINENO: result: $DTRACE" >&5
2695 echo "${ECHO_T}$DTRACE" >&6; }
2696 else
2697   { echo "$as_me:$LINENO: result: no" >&5
2698 echo "${ECHO_T}no" >&6; }
2699 fi
2700
2701
2702   test -n "$DTRACE" && break
2703 done
2704
2705 if test -z "$DTRACE"; then
2706   { { echo "$as_me:$LINENO: error: dtrace not found" >&5
2707 echo "$as_me: error: dtrace not found" >&2;}
2708    { (exit 1); exit 1; }; }
2709 fi
2710
2711       ;;
2712     no)
2713       :
2714       ;;
2715     *)
2716       { { echo "$as_me:$LINENO: error: no argument expected for --enable-dtrace option" >&5
2717 echo "$as_me: error: no argument expected for --enable-dtrace option" >&2;}
2718    { (exit 1); exit 1; }; }
2719       ;;
2720   esac
2721
2722 else
2723   enable_dtrace=no
2724
2725 fi
2726
2727
2728
2729
2730 #
2731 # Block size
2732 #
2733 { echo "$as_me:$LINENO: checking for block size" >&5
2734 echo $ECHO_N "checking for block size... $ECHO_C" >&6; }
2735
2736 pgac_args="$pgac_args with_blocksize"
2737
2738
2739 # Check whether --with-blocksize was given.
2740 if test "${with_blocksize+set}" = set; then
2741   withval=$with_blocksize;
2742   case $withval in
2743     yes)
2744       { { echo "$as_me:$LINENO: error: argument required for --with-blocksize option" >&5
2745 echo "$as_me: error: argument required for --with-blocksize option" >&2;}
2746    { (exit 1); exit 1; }; }
2747       ;;
2748     no)
2749       { { echo "$as_me:$LINENO: error: argument required for --with-blocksize option" >&5
2750 echo "$as_me: error: argument required for --with-blocksize option" >&2;}
2751    { (exit 1); exit 1; }; }
2752       ;;
2753     *)
2754       blocksize=$withval
2755       ;;
2756   esac
2757
2758 else
2759   blocksize=8
2760 fi
2761
2762
2763 case ${blocksize} in
2764   1) BLCKSZ=1024;;
2765   2) BLCKSZ=2048;;
2766   4) BLCKSZ=4096;;
2767   8) BLCKSZ=8192;;
2768  16) BLCKSZ=16384;;
2769  32) BLCKSZ=32768;;
2770   *) { { echo "$as_me:$LINENO: error: Invalid block size. Allowed values are 1,2,4,8,16,32." >&5
2771 echo "$as_me: error: Invalid block size. Allowed values are 1,2,4,8,16,32." >&2;}
2772    { (exit 1); exit 1; }; }
2773 esac
2774 { echo "$as_me:$LINENO: result: ${blocksize}kB" >&5
2775 echo "${ECHO_T}${blocksize}kB" >&6; }
2776
2777
2778 cat >>confdefs.h <<_ACEOF
2779 #define BLCKSZ ${BLCKSZ}
2780 _ACEOF
2781
2782
2783 #
2784 # Relation segment size
2785 #
2786 { echo "$as_me:$LINENO: checking for segment size" >&5
2787 echo $ECHO_N "checking for segment size... $ECHO_C" >&6; }
2788
2789 pgac_args="$pgac_args with_segsize"
2790
2791
2792 # Check whether --with-segsize was given.
2793 if test "${with_segsize+set}" = set; then
2794   withval=$with_segsize;
2795   case $withval in
2796     yes)
2797       { { echo "$as_me:$LINENO: error: argument required for --with-segsize option" >&5
2798 echo "$as_me: error: argument required for --with-segsize option" >&2;}
2799    { (exit 1); exit 1; }; }
2800       ;;
2801     no)
2802       { { echo "$as_me:$LINENO: error: argument required for --with-segsize option" >&5
2803 echo "$as_me: error: argument required for --with-segsize option" >&2;}
2804    { (exit 1); exit 1; }; }
2805       ;;
2806     *)
2807       segsize=$withval
2808       ;;
2809   esac
2810
2811 else
2812   segsize=1
2813 fi
2814
2815
2816 # this expression is set up to avoid unnecessary integer overflow
2817 # blocksize is already guaranteed to be a factor of 1024
2818 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
2819 test $? -eq 0 || exit 1
2820 { echo "$as_me:$LINENO: result: ${segsize}GB" >&5
2821 echo "${ECHO_T}${segsize}GB" >&6; }
2822
2823
2824 cat >>confdefs.h <<_ACEOF
2825 #define RELSEG_SIZE ${RELSEG_SIZE}
2826 _ACEOF
2827
2828
2829 #
2830 # WAL block size
2831 #
2832 { echo "$as_me:$LINENO: checking for WAL block size" >&5
2833 echo $ECHO_N "checking for WAL block size... $ECHO_C" >&6; }
2834
2835 pgac_args="$pgac_args with_wal_blocksize"
2836
2837
2838 # Check whether --with-wal-blocksize was given.
2839 if test "${with_wal_blocksize+set}" = set; then
2840   withval=$with_wal_blocksize;
2841   case $withval in
2842     yes)
2843       { { echo "$as_me:$LINENO: error: argument required for --with-wal-blocksize option" >&5
2844 echo "$as_me: error: argument required for --with-wal-blocksize option" >&2;}
2845    { (exit 1); exit 1; }; }
2846       ;;
2847     no)
2848       { { echo "$as_me:$LINENO: error: argument required for --with-wal-blocksize option" >&5
2849 echo "$as_me: error: argument required for --with-wal-blocksize option" >&2;}
2850    { (exit 1); exit 1; }; }
2851       ;;
2852     *)
2853       wal_blocksize=$withval
2854       ;;
2855   esac
2856
2857 else
2858   wal_blocksize=8
2859 fi
2860
2861
2862 case ${wal_blocksize} in
2863   1) XLOG_BLCKSZ=1024;;
2864   2) XLOG_BLCKSZ=2048;;
2865   4) XLOG_BLCKSZ=4096;;
2866   8) XLOG_BLCKSZ=8192;;
2867  16) XLOG_BLCKSZ=16384;;
2868  32) XLOG_BLCKSZ=32768;;
2869  64) XLOG_BLCKSZ=65536;;
2870   *) { { echo "$as_me:$LINENO: error: Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." >&5
2871 echo "$as_me: error: Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." >&2;}
2872    { (exit 1); exit 1; }; }
2873 esac
2874 { echo "$as_me:$LINENO: result: ${wal_blocksize}kB" >&5
2875 echo "${ECHO_T}${wal_blocksize}kB" >&6; }
2876
2877
2878 cat >>confdefs.h <<_ACEOF
2879 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
2880 _ACEOF
2881
2882
2883 #
2884 # WAL segment size
2885 #
2886 { echo "$as_me:$LINENO: checking for WAL segment size" >&5
2887 echo $ECHO_N "checking for WAL segment size... $ECHO_C" >&6; }
2888
2889 pgac_args="$pgac_args with_wal_segsize"
2890
2891
2892 # Check whether --with-wal-segsize was given.
2893 if test "${with_wal_segsize+set}" = set; then
2894   withval=$with_wal_segsize;
2895   case $withval in
2896     yes)
2897       { { echo "$as_me:$LINENO: error: argument required for --with-wal-segsize option" >&5
2898 echo "$as_me: error: argument required for --with-wal-segsize option" >&2;}
2899    { (exit 1); exit 1; }; }
2900       ;;
2901     no)
2902       { { echo "$as_me:$LINENO: error: argument required for --with-wal-segsize option" >&5
2903 echo "$as_me: error: argument required for --with-wal-segsize option" >&2;}
2904    { (exit 1); exit 1; }; }
2905       ;;
2906     *)
2907       wal_segsize=$withval
2908       ;;
2909   esac
2910
2911 else
2912   wal_segsize=16
2913 fi
2914
2915
2916 case ${wal_segsize} in
2917   1) ;;
2918   2) ;;
2919   4) ;;
2920   8) ;;
2921  16) ;;
2922  32) ;;
2923  64) ;;
2924   *) { { echo "$as_me:$LINENO: error: Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." >&5
2925 echo "$as_me: error: Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." >&2;}
2926    { (exit 1); exit 1; }; }
2927 esac
2928 { echo "$as_me:$LINENO: result: ${wal_segsize}MB" >&5
2929 echo "${ECHO_T}${wal_segsize}MB" >&6; }
2930
2931
2932 cat >>confdefs.h <<_ACEOF
2933 #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
2934 _ACEOF
2935
2936
2937 #
2938 # C compiler
2939 #
2940
2941 # For historical reasons you can also use --with-CC to specify the C compiler
2942 # to use, although the standard way to do this is to set the CC environment
2943 # variable.
2944
2945 pgac_args="$pgac_args with_CC"
2946
2947
2948 # Check whether --with-CC was given.
2949 if test "${with_CC+set}" = set; then
2950   withval=$with_CC;
2951   case $withval in
2952     yes)
2953       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
2954 echo "$as_me: error: argument required for --with-CC option" >&2;}
2955    { (exit 1); exit 1; }; }
2956       ;;
2957     no)
2958       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
2959 echo "$as_me: error: argument required for --with-CC option" >&2;}
2960    { (exit 1); exit 1; }; }
2961       ;;
2962     *)
2963       CC=$with_CC
2964       ;;
2965   esac
2966
2967 fi
2968
2969
2970
2971 case $template in
2972   aix) pgac_cc_list="gcc xlc";;
2973  irix) pgac_cc_list="cc";; # no gcc
2974     *) pgac_cc_list="gcc cc";;
2975 esac
2976
2977 ac_ext=c
2978 ac_cpp='$CPP $CPPFLAGS'
2979 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2980 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2981 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2982 if test -n "$ac_tool_prefix"; then
2983   for ac_prog in $pgac_cc_list
2984   do
2985     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2986 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2987 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2988 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2989 if test "${ac_cv_prog_CC+set}" = set; then
2990   echo $ECHO_N "(cached) $ECHO_C" >&6
2991 else
2992   if test -n "$CC"; then
2993   ac_cv_prog_CC="$CC" # Let the user override the test.
2994 else
2995 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2996 for as_dir in $PATH
2997 do
2998   IFS=$as_save_IFS
2999   test -z "$as_dir" && as_dir=.
3000   for ac_exec_ext in '' $ac_executable_extensions; do
3001   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3002     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3003     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3004     break 2
3005   fi
3006 done
3007 done
3008 IFS=$as_save_IFS
3009
3010 fi
3011 fi
3012 CC=$ac_cv_prog_CC
3013 if test -n "$CC"; then
3014   { echo "$as_me:$LINENO: result: $CC" >&5
3015 echo "${ECHO_T}$CC" >&6; }
3016 else
3017   { echo "$as_me:$LINENO: result: no" >&5
3018 echo "${ECHO_T}no" >&6; }
3019 fi
3020
3021
3022     test -n "$CC" && break
3023   done
3024 fi
3025 if test -z "$CC"; then
3026   ac_ct_CC=$CC
3027   for ac_prog in $pgac_cc_list
3028 do
3029   # Extract the first word of "$ac_prog", so it can be a program name with args.
3030 set dummy $ac_prog; ac_word=$2
3031 { echo "$as_me:$LINENO: checking for $ac_word" >&5
3032 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3033 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3034   echo $ECHO_N "(cached) $ECHO_C" >&6
3035 else
3036   if test -n "$ac_ct_CC"; then
3037   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3038 else
3039 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3040 for as_dir in $PATH
3041 do
3042   IFS=$as_save_IFS
3043   test -z "$as_dir" && as_dir=.
3044   for ac_exec_ext in '' $ac_executable_extensions; do
3045   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3046     ac_cv_prog_ac_ct_CC="$ac_prog"
3047     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3048     break 2
3049   fi
3050 done
3051 done
3052 IFS=$as_save_IFS
3053
3054 fi
3055 fi
3056 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3057 if test -n "$ac_ct_CC"; then
3058   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3059 echo "${ECHO_T}$ac_ct_CC" >&6; }
3060 else
3061   { echo "$as_me:$LINENO: result: no" >&5
3062 echo "${ECHO_T}no" >&6; }
3063 fi
3064
3065
3066   test -n "$ac_ct_CC" && break
3067 done
3068
3069   if test "x$ac_ct_CC" = x; then
3070     CC=""
3071   else
3072     case $cross_compiling:$ac_tool_warned in
3073 yes:)
3074 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3075 whose name does not start with the host triplet.  If you think this
3076 configuration is useful to you, please write to autoconf@gnu.org." >&5
3077 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3078 whose name does not start with the host triplet.  If you think this
3079 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3080 ac_tool_warned=yes ;;
3081 esac
3082     CC=$ac_ct_CC
3083   fi
3084 fi
3085
3086
3087 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3088 See \`config.log' for more details." >&5
3089 echo "$as_me: error: no acceptable C compiler found in \$PATH
3090 See \`config.log' for more details." >&2;}
3091    { (exit 1); exit 1; }; }
3092
3093 # Provide some information about the compiler.
3094 echo "$as_me:$LINENO: checking for C compiler version" >&5
3095 ac_compiler=`set X $ac_compile; echo $2`
3096 { (ac_try="$ac_compiler --version >&5"
3097 case "(($ac_try" in
3098   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3099   *) ac_try_echo=$ac_try;;
3100 esac
3101 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3102   (eval "$ac_compiler --version >&5") 2>&5
3103   ac_status=$?
3104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3105   (exit $ac_status); }
3106 { (ac_try="$ac_compiler -v >&5"
3107 case "(($ac_try" in
3108   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3109   *) ac_try_echo=$ac_try;;
3110 esac
3111 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3112   (eval "$ac_compiler -v >&5") 2>&5
3113   ac_status=$?
3114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3115   (exit $ac_status); }
3116 { (ac_try="$ac_compiler -V >&5"
3117 case "(($ac_try" in
3118   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3119   *) ac_try_echo=$ac_try;;
3120 esac
3121 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3122   (eval "$ac_compiler -V >&5") 2>&5
3123   ac_status=$?
3124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3125   (exit $ac_status); }
3126
3127 cat >conftest.$ac_ext <<_ACEOF
3128 /* confdefs.h.  */
3129 _ACEOF
3130 cat confdefs.h >>conftest.$ac_ext
3131 cat >>conftest.$ac_ext <<_ACEOF
3132 /* end confdefs.h.  */
3133
3134 int
3135 main ()
3136 {
3137
3138   ;
3139   return 0;
3140 }
3141 _ACEOF
3142 ac_clean_files_save=$ac_clean_files
3143 ac_clean_files="$ac_clean_files a.out a.exe b.out"
3144 # Try to create an executable without -o first, disregard a.out.
3145 # It will help us diagnose broken compilers, and finding out an intuition
3146 # of exeext.
3147 { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3148 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
3149 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3150 #
3151 # List of possible output files, starting from the most likely.
3152 # The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
3153 # only as a last resort.  b.out is created by i960 compilers.
3154 ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
3155 #
3156 # The IRIX 6 linker writes into existing files which may not be
3157 # executable, retaining their permissions.  Remove them first so a
3158 # subsequent execution test works.
3159 ac_rmfiles=
3160 for ac_file in $ac_files
3161 do
3162   case $ac_file in
3163     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3164     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3165   esac
3166 done
3167 rm -f $ac_rmfiles
3168
3169 if { (ac_try="$ac_link_default"
3170 case "(($ac_try" in
3171   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3172   *) ac_try_echo=$ac_try;;
3173 esac
3174 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3175   (eval "$ac_link_default") 2>&5
3176   ac_status=$?
3177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3178   (exit $ac_status); }; then
3179   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3180 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3181 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3182 # so that the user can short-circuit this test for compilers unknown to
3183 # Autoconf.
3184 for ac_file in $ac_files ''
3185 do
3186   test -f "$ac_file" || continue
3187   case $ac_file in
3188     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
3189         ;;
3190     [ab].out )
3191         # We found the default executable, but exeext='' is most
3192         # certainly right.
3193         break;;
3194     *.* )
3195         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3196         then :; else
3197            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3198         fi
3199         # We set ac_cv_exeext here because the later test for it is not
3200         # safe: cross compilers may not add the suffix if given an `-o'
3201         # argument, so we may need to know it at that point already.
3202         # Even if this section looks crufty: it has the advantage of
3203         # actually working.
3204         break;;
3205     * )
3206         break;;
3207   esac
3208 done
3209 test "$ac_cv_exeext" = no && ac_cv_exeext=
3210
3211 else
3212   ac_file=''
3213 fi
3214
3215 { echo "$as_me:$LINENO: result: $ac_file" >&5
3216 echo "${ECHO_T}$ac_file" >&6; }
3217 if test -z "$ac_file"; then
3218   echo "$as_me: failed program was:" >&5
3219 sed 's/^/| /' conftest.$ac_ext >&5
3220
3221 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
3222 See \`config.log' for more details." >&5
3223 echo "$as_me: error: C compiler cannot create executables
3224 See \`config.log' for more details." >&2;}
3225    { (exit 77); exit 77; }; }
3226 fi
3227
3228 ac_exeext=$ac_cv_exeext
3229
3230 # Check that the compiler produces executables we can run.  If not, either
3231 # the compiler is broken, or we cross compile.
3232 { echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3233 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
3234 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3235 # If not cross compiling, check that we can run a simple program.
3236 if test "$cross_compiling" != yes; then
3237   if { ac_try='./$ac_file'
3238   { (case "(($ac_try" in
3239   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3240   *) ac_try_echo=$ac_try;;
3241 esac
3242 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3243   (eval "$ac_try") 2>&5
3244   ac_status=$?
3245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3246   (exit $ac_status); }; }; then
3247     cross_compiling=no
3248   else
3249     if test "$cross_compiling" = maybe; then
3250         cross_compiling=yes
3251     else
3252         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
3253 If you meant to cross compile, use \`--host'.
3254 See \`config.log' for more details." >&5
3255 echo "$as_me: error: cannot run C compiled programs.
3256 If you meant to cross compile, use \`--host'.
3257 See \`config.log' for more details." >&2;}
3258    { (exit 1); exit 1; }; }
3259     fi
3260   fi
3261 fi
3262 { echo "$as_me:$LINENO: result: yes" >&5
3263 echo "${ECHO_T}yes" >&6; }
3264
3265 rm -f a.out a.exe conftest$ac_cv_exeext b.out
3266 ac_clean_files=$ac_clean_files_save
3267 # Check that the compiler produces executables we can run.  If not, either
3268 # the compiler is broken, or we cross compile.
3269 { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3270 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3271 { echo "$as_me:$LINENO: result: $cross_compiling" >&5
3272 echo "${ECHO_T}$cross_compiling" >&6; }
3273
3274 { echo "$as_me:$LINENO: checking for suffix of executables" >&5
3275 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
3276 if { (ac_try="$ac_link"
3277 case "(($ac_try" in
3278   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3279   *) ac_try_echo=$ac_try;;
3280 esac
3281 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3282   (eval "$ac_link") 2>&5
3283   ac_status=$?
3284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3285   (exit $ac_status); }; then
3286   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3287 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3288 # work properly (i.e., refer to `conftest.exe'), while it won't with
3289 # `rm'.
3290 for ac_file in conftest.exe conftest conftest.*; do
3291   test -f "$ac_file" || continue
3292   case $ac_file in
3293     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3294     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3295           break;;
3296     * ) break;;
3297   esac
3298 done
3299 else
3300   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3301 See \`config.log' for more details." >&5
3302 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3303 See \`config.log' for more details." >&2;}
3304    { (exit 1); exit 1; }; }
3305 fi
3306
3307 rm -f conftest$ac_cv_exeext
3308 { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3309 echo "${ECHO_T}$ac_cv_exeext" >&6; }
3310
3311 rm -f conftest.$ac_ext
3312 EXEEXT=$ac_cv_exeext
3313 ac_exeext=$EXEEXT
3314 { echo "$as_me:$LINENO: checking for suffix of object files" >&5
3315 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
3316 if test "${ac_cv_objext+set}" = set; then
3317   echo $ECHO_N "(cached) $ECHO_C" >&6
3318 else
3319   cat >conftest.$ac_ext <<_ACEOF
3320 /* confdefs.h.  */
3321 _ACEOF
3322 cat confdefs.h >>conftest.$ac_ext
3323 cat >>conftest.$ac_ext <<_ACEOF
3324 /* end confdefs.h.  */
3325
3326 int
3327 main ()
3328 {
3329
3330   ;
3331   return 0;
3332 }
3333 _ACEOF
3334 rm -f conftest.o conftest.obj
3335 if { (ac_try="$ac_compile"
3336 case "(($ac_try" in
3337   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3338   *) ac_try_echo=$ac_try;;
3339 esac
3340 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3341   (eval "$ac_compile") 2>&5
3342   ac_status=$?
3343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3344   (exit $ac_status); }; then
3345   for ac_file in conftest.o conftest.obj conftest.*; do
3346   test -f "$ac_file" || continue;
3347   case $ac_file in
3348     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
3349     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3350        break;;
3351   esac
3352 done
3353 else
3354   echo "$as_me: failed program was:" >&5
3355 sed 's/^/| /' conftest.$ac_ext >&5
3356
3357 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3358 See \`config.log' for more details." >&5
3359 echo "$as_me: error: cannot compute suffix of object files: cannot compile
3360 See \`config.log' for more details." >&2;}
3361    { (exit 1); exit 1; }; }
3362 fi
3363
3364 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3365 fi
3366 { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3367 echo "${ECHO_T}$ac_cv_objext" >&6; }
3368 OBJEXT=$ac_cv_objext
3369 ac_objext=$OBJEXT
3370 { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3371 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
3372 if test "${ac_cv_c_compiler_gnu+set}" = set; then
3373   echo $ECHO_N "(cached) $ECHO_C" >&6
3374 else
3375   cat >conftest.$ac_ext <<_ACEOF
3376 /* confdefs.h.  */
3377 _ACEOF
3378 cat confdefs.h >>conftest.$ac_ext
3379 cat >>conftest.$ac_ext <<_ACEOF
3380 /* end confdefs.h.  */
3381
3382 int
3383 main ()
3384 {
3385 #ifndef __GNUC__
3386        choke me
3387 #endif
3388
3389   ;
3390   return 0;
3391 }
3392 _ACEOF
3393 rm -f conftest.$ac_objext
3394 if { (ac_try="$ac_compile"
3395 case "(($ac_try" in
3396   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3397   *) ac_try_echo=$ac_try;;
3398 esac
3399 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3400   (eval "$ac_compile") 2>conftest.er1
3401   ac_status=$?
3402   grep -v '^ *+' conftest.er1 >conftest.err
3403   rm -f conftest.er1
3404   cat conftest.err >&5
3405   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3406   (exit $ac_status); } && {
3407          test -z "$ac_c_werror_flag" ||
3408          test ! -s conftest.err
3409        } && test -s conftest.$ac_objext; then
3410   ac_compiler_gnu=yes
3411 else
3412   echo "$as_me: failed program was:" >&5
3413 sed 's/^/| /' conftest.$ac_ext >&5
3414
3415         ac_compiler_gnu=no
3416 fi
3417
3418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3419 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3420
3421 fi
3422 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3423 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3424 GCC=`test $ac_compiler_gnu = yes && echo yes`
3425 ac_test_CFLAGS=${CFLAGS+set}
3426 ac_save_CFLAGS=$CFLAGS
3427 { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3428 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
3429 if test "${ac_cv_prog_cc_g+set}" = set; then
3430   echo $ECHO_N "(cached) $ECHO_C" >&6
3431 else
3432   ac_save_c_werror_flag=$ac_c_werror_flag
3433    ac_c_werror_flag=yes
3434    ac_cv_prog_cc_g=no
3435    CFLAGS="-g"
3436    cat >conftest.$ac_ext <<_ACEOF
3437 /* confdefs.h.  */
3438 _ACEOF
3439 cat confdefs.h >>conftest.$ac_ext
3440 cat >>conftest.$ac_ext <<_ACEOF
3441 /* end confdefs.h.  */
3442
3443 int
3444 main ()
3445 {
3446
3447   ;
3448   return 0;
3449 }
3450 _ACEOF
3451 rm -f conftest.$ac_objext
3452 if { (ac_try="$ac_compile"
3453 case "(($ac_try" in
3454   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3455   *) ac_try_echo=$ac_try;;
3456 esac
3457 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3458   (eval "$ac_compile") 2>conftest.er1
3459   ac_status=$?
3460   grep -v '^ *+' conftest.er1 >conftest.err
3461   rm -f conftest.er1
3462   cat conftest.err >&5
3463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3464   (exit $ac_status); } && {
3465          test -z "$ac_c_werror_flag" ||
3466          test ! -s conftest.err
3467        } && test -s conftest.$ac_objext; then
3468   ac_cv_prog_cc_g=yes
3469 else
3470   echo "$as_me: failed program was:" >&5
3471 sed 's/^/| /' conftest.$ac_ext >&5
3472
3473         CFLAGS=""
3474       cat >conftest.$ac_ext <<_ACEOF
3475 /* confdefs.h.  */
3476 _ACEOF
3477 cat confdefs.h >>conftest.$ac_ext
3478 cat >>conftest.$ac_ext <<_ACEOF
3479 /* end confdefs.h.  */
3480
3481 int
3482 main ()
3483 {
3484
3485   ;
3486   return 0;
3487 }
3488 _ACEOF
3489 rm -f conftest.$ac_objext
3490 if { (ac_try="$ac_compile"
3491 case "(($ac_try" in
3492   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3493   *) ac_try_echo=$ac_try;;
3494 esac
3495 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3496   (eval "$ac_compile") 2>conftest.er1
3497   ac_status=$?
3498   grep -v '^ *+' conftest.er1 >conftest.err
3499   rm -f conftest.er1
3500   cat conftest.err >&5
3501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3502   (exit $ac_status); } && {
3503          test -z "$ac_c_werror_flag" ||
3504          test ! -s conftest.err
3505        } && test -s conftest.$ac_objext; then
3506   :
3507 else
3508   echo "$as_me: failed program was:" >&5
3509 sed 's/^/| /' conftest.$ac_ext >&5
3510
3511         ac_c_werror_flag=$ac_save_c_werror_flag
3512          CFLAGS="-g"
3513          cat >conftest.$ac_ext <<_ACEOF
3514 /* confdefs.h.  */
3515 _ACEOF
3516 cat confdefs.h >>conftest.$ac_ext
3517 cat >>conftest.$ac_ext <<_ACEOF
3518 /* end confdefs.h.  */
3519
3520 int
3521 main ()
3522 {
3523
3524   ;
3525   return 0;
3526 }
3527 _ACEOF
3528 rm -f conftest.$ac_objext
3529 if { (ac_try="$ac_compile"
3530 case "(($ac_try" in
3531   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3532   *) ac_try_echo=$ac_try;;
3533 esac
3534 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3535   (eval "$ac_compile") 2>conftest.er1
3536   ac_status=$?
3537   grep -v '^ *+' conftest.er1 >conftest.err
3538   rm -f conftest.er1
3539   cat conftest.err >&5
3540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3541   (exit $ac_status); } && {
3542          test -z "$ac_c_werror_flag" ||
3543          test ! -s conftest.err
3544        } && test -s conftest.$ac_objext; then
3545   ac_cv_prog_cc_g=yes
3546 else
3547   echo "$as_me: failed program was:" >&5
3548 sed 's/^/| /' conftest.$ac_ext >&5
3549
3550
3551 fi
3552
3553 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3554 fi
3555
3556 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3557 fi
3558
3559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3560    ac_c_werror_flag=$ac_save_c_werror_flag
3561 fi
3562 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3563 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3564 if test "$ac_test_CFLAGS" = set; then
3565   CFLAGS=$ac_save_CFLAGS
3566 elif test $ac_cv_prog_cc_g = yes; then
3567   if test "$GCC" = yes; then
3568     CFLAGS="-g -O2"
3569   else
3570     CFLAGS="-g"
3571   fi
3572 else
3573   if test "$GCC" = yes; then
3574     CFLAGS="-O2"
3575   else
3576     CFLAGS=
3577   fi
3578 fi
3579 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3580 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3581 if test "${ac_cv_prog_cc_c89+set}" = set; then
3582   echo $ECHO_N "(cached) $ECHO_C" >&6
3583 else
3584   ac_cv_prog_cc_c89=no
3585 ac_save_CC=$CC
3586 cat >conftest.$ac_ext <<_ACEOF
3587 /* confdefs.h.  */
3588 _ACEOF
3589 cat confdefs.h >>conftest.$ac_ext
3590 cat >>conftest.$ac_ext <<_ACEOF
3591 /* end confdefs.h.  */
3592 #include <stdarg.h>
3593 #include <stdio.h>
3594 #include <sys/types.h>
3595 #include <sys/stat.h>
3596 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3597 struct buf { int x; };
3598 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3599 static char *e (p, i)
3600      char **p;
3601      int i;
3602 {
3603   return p[i];
3604 }
3605 static char *f (char * (*g) (char **, int), char **p, ...)
3606 {
3607   char *s;
3608   va_list v;
3609   va_start (v,p);
3610   s = g (p, va_arg (v,int));
3611   va_end (v);
3612   return s;
3613 }
3614
3615 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3616    function prototypes and stuff, but not '\xHH' hex character constants.
3617    These don't provoke an error unfortunately, instead are silently treated
3618    as 'x'.  The following induces an error, until -std is added to get
3619    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3620    array size at least.  It's necessary to write '\x00'==0 to get something
3621    that's true only with -std.  */
3622 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3623
3624 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3625    inside strings and character constants.  */
3626 #define FOO(x) 'x'
3627 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3628
3629 int test (int i, double x);
3630 struct s1 {int (*f) (int a);};
3631 struct s2 {int (*f) (double a);};
3632 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3633 int argc;
3634 char **argv;
3635 int
3636 main ()
3637 {
3638 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3639   ;
3640   return 0;
3641 }
3642 _ACEOF
3643 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3644         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3645 do
3646   CC="$ac_save_CC $ac_arg"
3647   rm -f conftest.$ac_objext
3648 if { (ac_try="$ac_compile"
3649 case "(($ac_try" in
3650   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3651   *) ac_try_echo=$ac_try;;
3652 esac
3653 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3654   (eval "$ac_compile") 2>conftest.er1
3655   ac_status=$?
3656   grep -v '^ *+' conftest.er1 >conftest.err
3657   rm -f conftest.er1
3658   cat conftest.err >&5
3659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3660   (exit $ac_status); } && {
3661          test -z "$ac_c_werror_flag" ||
3662          test ! -s conftest.err
3663        } && test -s conftest.$ac_objext; then
3664   ac_cv_prog_cc_c89=$ac_arg
3665 else
3666   echo "$as_me: failed program was:" >&5
3667 sed 's/^/| /' conftest.$ac_ext >&5
3668
3669
3670 fi
3671
3672 rm -f core conftest.err conftest.$ac_objext
3673   test "x$ac_cv_prog_cc_c89" != "xno" && break
3674 done
3675 rm -f conftest.$ac_ext
3676 CC=$ac_save_CC
3677
3678 fi
3679 # AC_CACHE_VAL
3680 case "x$ac_cv_prog_cc_c89" in
3681   x)
3682     { echo "$as_me:$LINENO: result: none needed" >&5
3683 echo "${ECHO_T}none needed" >&6; } ;;
3684   xno)
3685     { echo "$as_me:$LINENO: result: unsupported" >&5
3686 echo "${ECHO_T}unsupported" >&6; } ;;
3687   *)
3688     CC="$CC $ac_cv_prog_cc_c89"
3689     { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3690 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3691 esac
3692
3693
3694 ac_ext=c
3695 ac_cpp='$CPP $CPPFLAGS'
3696 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3697 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3698 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3699
3700
3701 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
3702 # but has idiosyncrasies of its own.  We assume icc will define
3703 # __INTEL_COMPILER regardless of CFLAGS.
3704
3705 cat >conftest.$ac_ext <<_ACEOF
3706 /* confdefs.h.  */
3707 _ACEOF
3708 cat confdefs.h >>conftest.$ac_ext
3709 cat >>conftest.$ac_ext <<_ACEOF
3710 /* end confdefs.h.  */
3711
3712 int
3713 main ()
3714 {
3715 #ifndef __INTEL_COMPILER
3716 choke me
3717 #endif
3718   ;
3719   return 0;
3720 }
3721 _ACEOF
3722 rm -f conftest.$ac_objext
3723 if { (ac_try="$ac_compile"
3724 case "(($ac_try" in
3725   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3726   *) ac_try_echo=$ac_try;;
3727 esac
3728 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3729   (eval "$ac_compile") 2>conftest.er1
3730   ac_status=$?
3731   grep -v '^ *+' conftest.er1 >conftest.err
3732   rm -f conftest.er1
3733   cat conftest.err >&5
3734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3735   (exit $ac_status); } && {
3736          test -z "$ac_c_werror_flag" ||
3737          test ! -s conftest.err
3738        } && test -s conftest.$ac_objext; then
3739   ICC=yes
3740 else
3741   echo "$as_me: failed program was:" >&5
3742 sed 's/^/| /' conftest.$ac_ext >&5
3743
3744         ICC=no
3745 fi
3746
3747 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3748
3749 unset CFLAGS
3750
3751 #
3752 # Read the template
3753 #
3754 . "$srcdir/src/template/$template" || exit
3755
3756 # CFLAGS are selected so:
3757 # If the user specifies something in the environment, that is used.
3758 # else:  If the template file set something, that is used.
3759 # else:  If coverage was enabled, don't set anything.
3760 # else:  If the compiler is GCC, then we use -O2.
3761 # else:  If the compiler is something else, then we use -O.
3762
3763 if test "$ac_env_CFLAGS_set" = set; then
3764   CFLAGS=$ac_env_CFLAGS_value
3765 elif test "${CFLAGS+set}" = set; then
3766   : # (keep what template set)
3767 elif test "$enable_coverage" = yes; then
3768   : # no optimization by default
3769 elif test "$GCC" = yes; then
3770   CFLAGS="-O2"
3771 else
3772   # if the user selected debug mode, don't use -O
3773   if test "$enable_debug" != yes; then
3774     CFLAGS="-O"
3775   fi
3776 fi
3777
3778 # Some versions of GCC support some additional useful warning flags.
3779 # Check whether they are supported, and add them to CFLAGS if so.
3780 # ICC pretends to be GCC but it's lying; it doesn't support these options.
3781
3782 if test "$GCC" = yes -a "$ICC" = no; then
3783   CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith"
3784   # These work in some but not all gcc versions
3785   { echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5
3786 echo $ECHO_N "checking if $CC supports -Wdeclaration-after-statement... $ECHO_C" >&6; }
3787 pgac_save_CFLAGS=$CFLAGS
3788 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
3789 cat >conftest.$ac_ext <<_ACEOF
3790 /* confdefs.h.  */
3791 _ACEOF
3792 cat confdefs.h >>conftest.$ac_ext
3793 cat >>conftest.$ac_ext <<_ACEOF
3794 /* end confdefs.h.  */
3795
3796 int
3797 main ()
3798 {
3799
3800   ;
3801   return 0;
3802 }
3803 _ACEOF
3804 rm -f conftest.$ac_objext
3805 if { (ac_try="$ac_compile"
3806 case "(($ac_try" in
3807   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3808   *) ac_try_echo=$ac_try;;
3809 esac
3810 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3811   (eval "$ac_compile") 2>conftest.er1
3812   ac_status=$?
3813   grep -v '^ *+' conftest.er1 >conftest.err
3814   rm -f conftest.er1
3815   cat conftest.err >&5
3816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3817   (exit $ac_status); } && {
3818          test -z "$ac_c_werror_flag" ||
3819          test ! -s conftest.err
3820        } && test -s conftest.$ac_objext; then
3821   { echo "$as_me:$LINENO: result: yes" >&5
3822 echo "${ECHO_T}yes" >&6; }
3823 else
3824   echo "$as_me: failed program was:" >&5
3825 sed 's/^/| /' conftest.$ac_ext >&5
3826
3827         CFLAGS="$pgac_save_CFLAGS"
3828                     { echo "$as_me:$LINENO: result: no" >&5
3829 echo "${ECHO_T}no" >&6; }
3830 fi
3831
3832 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3833
3834   { echo "$as_me:$LINENO: checking if $CC supports -Wendif-labels" >&5
3835 echo $ECHO_N "checking if $CC supports -Wendif-labels... $ECHO_C" >&6; }
3836 pgac_save_CFLAGS=$CFLAGS
3837 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
3838 cat >conftest.$ac_ext <<_ACEOF
3839 /* confdefs.h.  */
3840 _ACEOF
3841 cat confdefs.h >>conftest.$ac_ext
3842 cat >>conftest.$ac_ext <<_ACEOF
3843 /* end confdefs.h.  */
3844
3845 int
3846 main ()
3847 {
3848
3849   ;
3850   return 0;
3851 }
3852 _ACEOF
3853 rm -f conftest.$ac_objext
3854 if { (ac_try="$ac_compile"
3855 case "(($ac_try" in
3856   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3857   *) ac_try_echo=$ac_try;;
3858 esac
3859 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3860   (eval "$ac_compile") 2>conftest.er1
3861   ac_status=$?
3862   grep -v '^ *+' conftest.er1 >conftest.err
3863   rm -f conftest.er1
3864   cat conftest.err >&5
3865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3866   (exit $ac_status); } && {
3867          test -z "$ac_c_werror_flag" ||
3868          test ! -s conftest.err
3869        } && test -s conftest.$ac_objext; then
3870   { echo "$as_me:$LINENO: result: yes" >&5
3871 echo "${ECHO_T}yes" >&6; }
3872 else
3873   echo "$as_me: failed program was:" >&5
3874 sed 's/^/| /' conftest.$ac_ext >&5
3875
3876         CFLAGS="$pgac_save_CFLAGS"
3877                     { echo "$as_me:$LINENO: result: no" >&5
3878 echo "${ECHO_T}no" >&6; }
3879 fi
3880
3881 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3882
3883   # Disable strict-aliasing rules; needed for gcc 3.3+
3884   { echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
3885 echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6; }
3886 pgac_save_CFLAGS=$CFLAGS
3887 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
3888 cat >conftest.$ac_ext <<_ACEOF
3889 /* confdefs.h.  */
3890 _ACEOF
3891 cat confdefs.h >>conftest.$ac_ext
3892 cat >>conftest.$ac_ext <<_ACEOF
3893 /* end confdefs.h.  */
3894
3895 int
3896 main ()
3897 {
3898
3899   ;
3900   return 0;
3901 }
3902 _ACEOF
3903 rm -f conftest.$ac_objext
3904 if { (ac_try="$ac_compile"
3905 case "(($ac_try" in
3906   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3907   *) ac_try_echo=$ac_try;;
3908 esac
3909 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3910   (eval "$ac_compile") 2>conftest.er1
3911   ac_status=$?
3912   grep -v '^ *+' conftest.er1 >conftest.err
3913   rm -f conftest.er1
3914   cat conftest.err >&5
3915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3916   (exit $ac_status); } && {
3917          test -z "$ac_c_werror_flag" ||
3918          test ! -s conftest.err
3919        } && test -s conftest.$ac_objext; then
3920   { echo "$as_me:$LINENO: result: yes" >&5
3921 echo "${ECHO_T}yes" >&6; }
3922 else
3923   echo "$as_me: failed program was:" >&5
3924 sed 's/^/| /' conftest.$ac_ext >&5
3925
3926         CFLAGS="$pgac_save_CFLAGS"
3927                     { echo "$as_me:$LINENO: result: no" >&5
3928 echo "${ECHO_T}no" >&6; }
3929 fi
3930
3931 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3932
3933   # Disable optimizations that assume no overflow; needed for gcc 4.3+
3934   { echo "$as_me:$LINENO: checking if $CC supports -fwrapv" >&5
3935 echo $ECHO_N "checking if $CC supports -fwrapv... $ECHO_C" >&6; }
3936 pgac_save_CFLAGS=$CFLAGS
3937 CFLAGS="$pgac_save_CFLAGS -fwrapv"
3938 cat >conftest.$ac_ext <<_ACEOF
3939 /* confdefs.h.  */
3940 _ACEOF
3941 cat confdefs.h >>conftest.$ac_ext
3942 cat >>conftest.$ac_ext <<_ACEOF
3943 /* end confdefs.h.  */
3944
3945 int
3946 main ()
3947 {
3948
3949   ;
3950   return 0;
3951 }
3952 _ACEOF
3953 rm -f conftest.$ac_objext
3954 if { (ac_try="$ac_compile"
3955 case "(($ac_try" in
3956   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3957   *) ac_try_echo=$ac_try;;
3958 esac
3959 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3960   (eval "$ac_compile") 2>conftest.er1
3961   ac_status=$?
3962   grep -v '^ *+' conftest.er1 >conftest.err
3963   rm -f conftest.er1
3964   cat conftest.err >&5
3965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3966   (exit $ac_status); } && {
3967          test -z "$ac_c_werror_flag" ||
3968          test ! -s conftest.err
3969        } && test -s conftest.$ac_objext; then
3970   { echo "$as_me:$LINENO: result: yes" >&5
3971 echo "${ECHO_T}yes" >&6; }
3972 else
3973   echo "$as_me: failed program was:" >&5
3974 sed 's/^/| /' conftest.$ac_ext >&5
3975
3976         CFLAGS="$pgac_save_CFLAGS"
3977                     { echo "$as_me:$LINENO: result: no" >&5
3978 echo "${ECHO_T}no" >&6; }
3979 fi
3980
3981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3982
3983 elif test "$ICC" = yes; then
3984   # Intel's compiler has a bug/misoptimization in checking for
3985   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
3986   { echo "$as_me:$LINENO: checking if $CC supports -mp1" >&5
3987 echo $ECHO_N "checking if $CC supports -mp1... $ECHO_C" >&6; }
3988 pgac_save_CFLAGS=$CFLAGS
3989 CFLAGS="$pgac_save_CFLAGS -mp1"
3990 cat >conftest.$ac_ext <<_ACEOF
3991 /* confdefs.h.  */
3992 _ACEOF
3993 cat confdefs.h >>conftest.$ac_ext
3994 cat >>conftest.$ac_ext <<_ACEOF
3995 /* end confdefs.h.  */
3996
3997 int
3998 main ()
3999 {
4000
4001   ;
4002   return 0;
4003 }
4004 _ACEOF
4005 rm -f conftest.$ac_objext
4006 if { (ac_try="$ac_compile"
4007 case "(($ac_try" in
4008   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4009   *) ac_try_echo=$ac_try;;
4010 esac
4011 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4012   (eval "$ac_compile") 2>conftest.er1
4013   ac_status=$?
4014   grep -v '^ *+' conftest.er1 >conftest.err
4015   rm -f conftest.er1
4016   cat conftest.err >&5
4017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4018   (exit $ac_status); } && {
4019          test -z "$ac_c_werror_flag" ||
4020          test ! -s conftest.err
4021        } && test -s conftest.$ac_objext; then
4022   { echo "$as_me:$LINENO: result: yes" >&5
4023 echo "${ECHO_T}yes" >&6; }
4024 else
4025   echo "$as_me: failed program was:" >&5
4026 sed 's/^/| /' conftest.$ac_ext >&5
4027
4028         CFLAGS="$pgac_save_CFLAGS"
4029                     { echo "$as_me:$LINENO: result: no" >&5
4030 echo "${ECHO_T}no" >&6; }
4031 fi
4032
4033 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4034
4035   # Make sure strict aliasing is off (though this is said to be the default)
4036   { echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
4037 echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6; }
4038 pgac_save_CFLAGS=$CFLAGS
4039 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4040 cat >conftest.$ac_ext <<_ACEOF
4041 /* confdefs.h.  */
4042 _ACEOF
4043 cat confdefs.h >>conftest.$ac_ext
4044 cat >>conftest.$ac_ext <<_ACEOF
4045 /* end confdefs.h.  */
4046
4047 int
4048 main ()
4049 {
4050
4051   ;
4052   return 0;
4053 }
4054 _ACEOF
4055 rm -f conftest.$ac_objext
4056 if { (ac_try="$ac_compile"
4057 case "(($ac_try" in
4058   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4059   *) ac_try_echo=$ac_try;;
4060 esac
4061 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4062   (eval "$ac_compile") 2>conftest.er1
4063   ac_status=$?
4064   grep -v '^ *+' conftest.er1 >conftest.err
4065   rm -f conftest.er1
4066   cat conftest.err >&5
4067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4068   (exit $ac_status); } && {
4069          test -z "$ac_c_werror_flag" ||
4070          test ! -s conftest.err
4071        } && test -s conftest.$ac_objext; then
4072   { echo "$as_me:$LINENO: result: yes" >&5
4073 echo "${ECHO_T}yes" >&6; }
4074 else
4075   echo "$as_me: failed program was:" >&5
4076 sed 's/^/| /' conftest.$ac_ext >&5
4077
4078         CFLAGS="$pgac_save_CFLAGS"
4079                     { echo "$as_me:$LINENO: result: no" >&5
4080 echo "${ECHO_T}no" >&6; }
4081 fi
4082
4083 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4084
4085 elif test x"${CC}" = x"xlc"; then
4086   # AIX xlc has to have strict aliasing turned off too
4087   { echo "$as_me:$LINENO: checking if $CC supports -qnoansialias" >&5
4088 echo $ECHO_N "checking if $CC supports -qnoansialias... $ECHO_C" >&6; }
4089 pgac_save_CFLAGS=$CFLAGS
4090 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4091 cat >conftest.$ac_ext <<_ACEOF
4092 /* confdefs.h.  */
4093 _ACEOF
4094 cat confdefs.h >>conftest.$ac_ext
4095 cat >>conftest.$ac_ext <<_ACEOF
4096 /* end confdefs.h.  */
4097
4098 int
4099 main ()
4100 {
4101
4102   ;
4103   return 0;
4104 }
4105 _ACEOF
4106 rm -f conftest.$ac_objext
4107 if { (ac_try="$ac_compile"
4108 case "(($ac_try" in
4109   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4110   *) ac_try_echo=$ac_try;;
4111 esac
4112 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4113   (eval "$ac_compile") 2>conftest.er1
4114   ac_status=$?
4115   grep -v '^ *+' conftest.er1 >conftest.err
4116   rm -f conftest.er1
4117   cat conftest.err >&5
4118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4119   (exit $ac_status); } && {
4120          test -z "$ac_c_werror_flag" ||
4121          test ! -s conftest.err
4122        } && test -s conftest.$ac_objext; then
4123   { echo "$as_me:$LINENO: result: yes" >&5
4124 echo "${ECHO_T}yes" >&6; }
4125 else
4126   echo "$as_me: failed program was:" >&5
4127 sed 's/^/| /' conftest.$ac_ext >&5
4128
4129         CFLAGS="$pgac_save_CFLAGS"
4130                     { echo "$as_me:$LINENO: result: no" >&5
4131 echo "${ECHO_T}no" >&6; }
4132 fi
4133
4134 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4135
4136 fi
4137
4138 # supply -g if --enable-debug
4139 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
4140   CFLAGS="$CFLAGS -g"
4141 fi
4142
4143 # enable code coverage if --enable-coverage
4144 if test "$enable_coverage" = yes; then
4145   if test "$GCC" = yes; then
4146     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
4147   else
4148     { { echo "$as_me:$LINENO: error: --enable-coverage is supported only when using GCC" >&5
4149 echo "$as_me: error: --enable-coverage is supported only when using GCC" >&2;}
4150    { (exit 1); exit 1; }; }
4151   fi
4152 fi
4153
4154 # enable profiling if --enable-profiling
4155 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
4156   if test "$GCC" = yes; then
4157
4158 cat >>confdefs.h <<\_ACEOF
4159 #define PROFILE_PID_DIR 1
4160 _ACEOF
4161
4162     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
4163   else
4164     { { echo "$as_me:$LINENO: error: --enable-profiling is supported only when using GCC" >&5
4165 echo "$as_me: error: --enable-profiling is supported only when using GCC" >&2;}
4166    { (exit 1); exit 1; }; }
4167   fi
4168 fi
4169
4170 # We already have this in Makefile.win32, but configure needs it too
4171 if test "$PORTNAME" = "win32"; then
4172   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
4173 fi
4174
4175 # Check if the compiler still works with the template settings
4176 { echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
4177 echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6; }
4178 cat >conftest.$ac_ext <<_ACEOF
4179 /* confdefs.h.  */
4180 _ACEOF
4181 cat confdefs.h >>conftest.$ac_ext
4182 cat >>conftest.$ac_ext <<_ACEOF
4183 /* end confdefs.h.  */
4184
4185 int
4186 main ()
4187 {
4188 return 0;
4189   ;
4190   return 0;
4191 }
4192 _ACEOF
4193 rm -f conftest.$ac_objext conftest$ac_exeext
4194 if { (ac_try="$ac_link"
4195 case "(($ac_try" in
4196   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4197   *) ac_try_echo=$ac_try;;
4198 esac
4199 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4200   (eval "$ac_link") 2>conftest.er1
4201   ac_status=$?
4202   grep -v '^ *+' conftest.er1 >conftest.err
4203   rm -f conftest.er1
4204   cat conftest.err >&5
4205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4206   (exit $ac_status); } && {
4207          test -z "$ac_c_werror_flag" ||
4208          test ! -s conftest.err
4209        } && test -s conftest$ac_exeext &&
4210        $as_test_x conftest$ac_exeext; then
4211   { echo "$as_me:$LINENO: result: yes" >&5
4212 echo "${ECHO_T}yes" >&6; }
4213 else
4214   echo "$as_me: failed program was:" >&5
4215 sed 's/^/| /' conftest.$ac_ext >&5
4216
4217         { echo "$as_me:$LINENO: result: no" >&5
4218 echo "${ECHO_T}no" >&6; }
4219    { { echo "$as_me:$LINENO: error: cannot proceed" >&5
4220 echo "$as_me: error: cannot proceed" >&2;}
4221    { (exit 1); exit 1; }; }
4222 fi
4223
4224 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4225       conftest$ac_exeext conftest.$ac_ext
4226
4227 # Defend against gcc -ffast-math
4228 if test "$GCC" = yes; then
4229 cat >conftest.$ac_ext <<_ACEOF
4230 /* confdefs.h.  */
4231 _ACEOF
4232 cat confdefs.h >>conftest.$ac_ext
4233 cat >>conftest.$ac_ext <<_ACEOF
4234 /* end confdefs.h.  */
4235
4236 int
4237 main ()
4238 {
4239 #ifdef __FAST_MATH__
4240 choke me
4241 #endif
4242   ;
4243   return 0;
4244 }
4245 _ACEOF
4246 rm -f conftest.$ac_objext
4247 if { (ac_try="$ac_compile"
4248 case "(($ac_try" in
4249   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4250   *) ac_try_echo=$ac_try;;
4251 esac
4252 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4253   (eval "$ac_compile") 2>conftest.er1
4254   ac_status=$?
4255   grep -v '^ *+' conftest.er1 >conftest.err
4256   rm -f conftest.er1
4257   cat conftest.err >&5
4258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4259   (exit $ac_status); } && {
4260          test -z "$ac_c_werror_flag" ||
4261          test ! -s conftest.err
4262        } && test -s conftest.$ac_objext; then
4263   :
4264 else
4265   echo "$as_me: failed program was:" >&5
4266 sed 's/^/| /' conftest.$ac_ext >&5
4267
4268         { { echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
4269 echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
4270    { (exit 1); exit 1; }; }
4271 fi
4272
4273 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4274 fi
4275
4276 ac_ext=c
4277 ac_cpp='$CPP $CPPFLAGS'
4278 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4279 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4280 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4281 { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4282 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
4283 # On Suns, sometimes $CPP names a directory.
4284 if test -n "$CPP" && test -d "$CPP"; then
4285   CPP=
4286 fi
4287 if test -z "$CPP"; then
4288   if test "${ac_cv_prog_CPP+set}" = set; then
4289   echo $ECHO_N "(cached) $ECHO_C" >&6
4290 else
4291       # Double quotes because CPP needs to be expanded
4292     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4293     do
4294       ac_preproc_ok=false
4295 for ac_c_preproc_warn_flag in '' yes
4296 do
4297   # Use a header file that comes with gcc, so configuring glibc
4298   # with a fresh cross-compiler works.
4299   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4300   # <limits.h> exists even on freestanding compilers.
4301   # On the NeXT, cc -E runs the code through the compiler's parser,
4302   # not just through cpp. "Syntax error" is here to catch this case.
4303   cat >conftest.$ac_ext <<_ACEOF
4304 /* confdefs.h.  */
4305 _ACEOF
4306 cat confdefs.h >>conftest.$ac_ext
4307 cat >>conftest.$ac_ext <<_ACEOF
4308 /* end confdefs.h.  */
4309 #ifdef __STDC__
4310 # include <limits.h>
4311 #else
4312 # include <assert.h>
4313 #endif
4314                      Syntax error
4315 _ACEOF
4316 if { (ac_try="$ac_cpp conftest.$ac_ext"
4317 case "(($ac_try" in
4318   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4319   *) ac_try_echo=$ac_try;;
4320 esac
4321 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4322   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4323   ac_status=$?
4324   grep -v '^ *+' conftest.er1 >conftest.err
4325   rm -f conftest.er1
4326   cat conftest.err >&5
4327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4328   (exit $ac_status); } >/dev/null && {
4329          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4330          test ! -s conftest.err
4331        }; then
4332   :
4333 else
4334   echo "$as_me: failed program was:" >&5
4335 sed 's/^/| /' conftest.$ac_ext >&5
4336
4337   # Broken: fails on valid input.
4338 continue
4339 fi
4340
4341 rm -f conftest.err conftest.$ac_ext
4342
4343   # OK, works on sane cases.  Now check whether nonexistent headers
4344   # can be detected and how.
4345   cat >conftest.$ac_ext <<_ACEOF
4346 /* confdefs.h.  */
4347 _ACEOF
4348 cat confdefs.h >>conftest.$ac_ext
4349 cat >>conftest.$ac_ext <<_ACEOF
4350 /* end confdefs.h.  */
4351 #include <ac_nonexistent.h>
4352 _ACEOF
4353 if { (ac_try="$ac_cpp conftest.$ac_ext"
4354 case "(($ac_try" in
4355   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4356   *) ac_try_echo=$ac_try;;
4357 esac
4358 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4359   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4360   ac_status=$?
4361   grep -v '^ *+' conftest.er1 >conftest.err
4362   rm -f conftest.er1
4363   cat conftest.err >&5
4364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4365   (exit $ac_status); } >/dev/null && {
4366          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4367          test ! -s conftest.err
4368        }; then
4369   # Broken: success on invalid input.
4370 continue
4371 else
4372   echo "$as_me: failed program was:" >&5
4373 sed 's/^/| /' conftest.$ac_ext >&5
4374
4375   # Passes both tests.
4376 ac_preproc_ok=:
4377 break
4378 fi
4379
4380 rm -f conftest.err conftest.$ac_ext
4381
4382 done
4383 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4384 rm -f conftest.err conftest.$ac_ext
4385 if $ac_preproc_ok; then
4386   break
4387 fi
4388
4389     done
4390     ac_cv_prog_CPP=$CPP
4391
4392 fi
4393   CPP=$ac_cv_prog_CPP
4394 else
4395   ac_cv_prog_CPP=$CPP
4396 fi
4397 { echo "$as_me:$LINENO: result: $CPP" >&5
4398 echo "${ECHO_T}$CPP" >&6; }
4399 ac_preproc_ok=false
4400 for ac_c_preproc_warn_flag in '' yes
4401 do
4402   # Use a header file that comes with gcc, so configuring glibc
4403   # with a fresh cross-compiler works.
4404   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4405   # <limits.h> exists even on freestanding compilers.
4406   # On the NeXT, cc -E runs the code through the compiler's parser,
4407   # not just through cpp. "Syntax error" is here to catch this case.
4408   cat >conftest.$ac_ext <<_ACEOF
4409 /* confdefs.h.  */
4410 _ACEOF
4411 cat confdefs.h >>conftest.$ac_ext
4412 cat >>conftest.$ac_ext <<_ACEOF
4413 /* end confdefs.h.  */
4414 #ifdef __STDC__
4415 # include <limits.h>
4416 #else
4417 # include <assert.h>
4418 #endif
4419                      Syntax error
4420 _ACEOF
4421 if { (ac_try="$ac_cpp conftest.$ac_ext"
4422 case "(($ac_try" in
4423   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4424   *) ac_try_echo=$ac_try;;
4425 esac
4426 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4427   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4428   ac_status=$?
4429   grep -v '^ *+' conftest.er1 >conftest.err
4430   rm -f conftest.er1
4431   cat conftest.err >&5
4432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4433   (exit $ac_status); } >/dev/null && {
4434          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4435          test ! -s conftest.err
4436        }; then
4437   :
4438 else
4439   echo "$as_me: failed program was:" >&5
4440 sed 's/^/| /' conftest.$ac_ext >&5
4441
4442   # Broken: fails on valid input.
4443 continue
4444 fi
4445
4446 rm -f conftest.err conftest.$ac_ext
4447
4448   # OK, works on sane cases.  Now check whether nonexistent headers
4449   # can be detected and how.
4450   cat >conftest.$ac_ext <<_ACEOF
4451 /* confdefs.h.  */
4452 _ACEOF
4453 cat confdefs.h >>conftest.$ac_ext
4454 cat >>conftest.$ac_ext <<_ACEOF
4455 /* end confdefs.h.  */
4456 #include <ac_nonexistent.h>
4457 _ACEOF
4458 if { (ac_try="$ac_cpp conftest.$ac_ext"
4459 case "(($ac_try" in
4460   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4461   *) ac_try_echo=$ac_try;;
4462 esac
4463 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4464   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4465   ac_status=$?
4466   grep -v '^ *+' conftest.er1 >conftest.err
4467   rm -f conftest.er1
4468   cat conftest.err >&5
4469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4470   (exit $ac_status); } >/dev/null && {
4471          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4472          test ! -s conftest.err
4473        }; then
4474   # Broken: success on invalid input.
4475 continue
4476 else
4477   echo "$as_me: failed program was:" >&5
4478 sed 's/^/| /' conftest.$ac_ext >&5
4479
4480   # Passes both tests.
4481 ac_preproc_ok=:
4482 break
4483 fi
4484
4485 rm -f conftest.err conftest.$ac_ext
4486
4487 done
4488 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4489 rm -f conftest.err conftest.$ac_ext
4490 if $ac_preproc_ok; then
4491   :
4492 else
4493   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4494 See \`config.log' for more details." >&5
4495 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4496 See \`config.log' for more details." >&2;}
4497    { (exit 1); exit 1; }; }
4498 fi
4499
4500 ac_ext=c
4501 ac_cpp='$CPP $CPPFLAGS'
4502 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4503 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4504 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4505
4506
4507
4508 # Create compiler version string
4509 if test x"$GCC" = x"yes" ; then
4510   cc_string="GCC `${CC} --version | sed q`"
4511 else
4512   cc_string=$CC
4513 fi
4514
4515 cat >>confdefs.h <<_ACEOF
4516 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string"
4517 _ACEOF
4518
4519
4520
4521 #
4522 # Set up TAS assembly code if needed; the template file has now had its
4523 # chance to request this.
4524 #
4525 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
4526
4527
4528 if test "$need_tas" = yes ; then
4529   TAS=tas.o
4530 else
4531   TAS=""
4532 fi
4533
4534
4535
4536 #
4537 # Automatic dependency tracking
4538 #
4539
4540 pgac_args="$pgac_args enable_depend"
4541
4542 # Check whether --enable-depend was given.
4543 if test "${enable_depend+set}" = set; then
4544   enableval=$enable_depend;
4545   case $enableval in
4546     yes)
4547       autodepend=yes
4548       ;;
4549     no)
4550       :
4551       ;;
4552     *)
4553       { { echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
4554 echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
4555    { (exit 1); exit 1; }; }
4556       ;;
4557   esac
4558
4559 else
4560   enable_depend=no
4561
4562 fi
4563
4564
4565
4566
4567
4568 #
4569 # Enable assert checks
4570 #
4571
4572 pgac_args="$pgac_args enable_cassert"
4573
4574 # Check whether --enable-cassert was given.
4575 if test "${enable_cassert+set}" = set; then
4576   enableval=$enable_cassert;
4577   case $enableval in
4578     yes)
4579
4580 cat >>confdefs.h <<\_ACEOF
4581 #define USE_ASSERT_CHECKING 1
4582 _ACEOF
4583
4584       ;;
4585     no)
4586       :
4587       ;;
4588     *)
4589       { { echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
4590 echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
4591    { (exit 1); exit 1; }; }
4592       ;;
4593   esac
4594
4595 else
4596   enable_cassert=no
4597
4598 fi
4599
4600
4601
4602
4603 #
4604 # Include directories
4605 #
4606 ac_save_IFS=$IFS
4607 IFS="${IFS}${PATH_SEPARATOR}"
4608 # SRCH_INC comes from the template file
4609 for dir in $with_includes $SRCH_INC; do
4610   if test -d "$dir"; then
4611     INCLUDES="$INCLUDES -I$dir"
4612   else
4613     { echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
4614 echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
4615   fi
4616 done
4617 IFS=$ac_save_IFS
4618
4619
4620
4621 #
4622 # Library directories
4623 #
4624 ac_save_IFS=$IFS
4625 IFS="${IFS}${PATH_SEPARATOR}"
4626 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
4627 for dir in $LIBRARY_DIRS $SRCH_LIB; do
4628   if test -d "$dir"; then
4629     LIBDIRS="$LIBDIRS -L$dir"
4630   else
4631     { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
4632 echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
4633   fi
4634 done
4635 IFS=$ac_save_IFS
4636
4637 #
4638 # Enable thread-safe client libraries
4639 #
4640 { echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
4641 echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6; }
4642 if test "$PORTNAME" != "win32"; then
4643
4644 pgac_args="$pgac_args enable_thread_safety"
4645
4646 # Check whether --enable-thread-safety was given.
4647 if test "${enable_thread_safety+set}" = set; then
4648   enableval=$enable_thread_safety;
4649   case $enableval in
4650     yes)
4651       :
4652       ;;
4653     no)
4654       :
4655       ;;
4656     *)
4657       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
4658 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
4659    { (exit 1); exit 1; }; }
4660       ;;
4661   esac
4662
4663 else
4664   enable_thread_safety=no
4665
4666 fi
4667
4668
4669 else
4670 # Win32 should always use threads
4671
4672 pgac_args="$pgac_args enable_thread_safety"
4673
4674 # Check whether --enable-thread-safety was given.
4675 if test "${enable_thread_safety+set}" = set; then
4676   enableval=$enable_thread_safety;
4677   case $enableval in
4678     yes)
4679       :
4680       ;;
4681     no)
4682       :
4683       ;;
4684     *)
4685       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
4686 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
4687    { (exit 1); exit 1; }; }
4688       ;;
4689   esac
4690
4691 else
4692   enable_thread_safety=yes
4693
4694 fi
4695
4696
4697 fi
4698
4699
4700 pgac_args="$pgac_args enable_thread_safety_force"
4701
4702 # Check whether --enable-thread-safety-force was given.
4703 if test "${enable_thread_safety_force+set}" = set; then
4704   enableval=$enable_thread_safety_force;
4705   case $enableval in
4706     yes)
4707       :
4708       ;;
4709     no)
4710       :
4711       ;;
4712     *)
4713       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety-force option" >&5
4714 echo "$as_me: error: no argument expected for --enable-thread-safety-force option" >&2;}
4715    { (exit 1); exit 1; }; }
4716       ;;
4717   esac
4718
4719 else
4720   enable_thread_safety_force=no
4721
4722 fi
4723
4724
4725 if test "$enable_thread_safety" = yes -o \
4726         "$enable_thread_safety_force" = yes; then
4727   enable_thread_safety="yes"    # for 'force'
4728
4729 cat >>confdefs.h <<\_ACEOF
4730 #define ENABLE_THREAD_SAFETY 1
4731 _ACEOF
4732
4733 fi
4734 { echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
4735 echo "${ECHO_T}$enable_thread_safety" >&6; }
4736
4737
4738 #
4739 # Optionally build Tcl modules (PL/Tcl)
4740 #
4741 { echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
4742 echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6; }
4743
4744 pgac_args="$pgac_args with_tcl"
4745
4746
4747 # Check whether --with-tcl was given.
4748 if test "${with_tcl+set}" = set; then
4749   withval=$with_tcl;
4750   case $withval in
4751     yes)
4752       :
4753       ;;
4754     no)
4755       :
4756       ;;
4757     *)
4758       { { echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
4759 echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
4760    { (exit 1); exit 1; }; }
4761       ;;
4762   esac
4763
4764 else
4765   with_tcl=no
4766
4767 fi
4768
4769
4770 { echo "$as_me:$LINENO: result: $with_tcl" >&5
4771 echo "${ECHO_T}$with_tcl" >&6; }
4772
4773
4774 # We see if the path to the Tcl/Tk configuration scripts is specified.
4775 # This will override the use of tclsh to find the paths to search.
4776
4777
4778 pgac_args="$pgac_args with_tclconfig"
4779
4780
4781 # Check whether --with-tclconfig was given.
4782 if test "${with_tclconfig+set}" = set; then
4783   withval=$with_tclconfig;
4784   case $withval in
4785     yes)
4786       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
4787 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
4788    { (exit 1); exit 1; }; }
4789       ;;
4790     no)
4791       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
4792 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
4793    { (exit 1); exit 1; }; }
4794       ;;
4795     *)
4796
4797       ;;
4798   esac
4799
4800 fi
4801
4802
4803
4804 #
4805 # Optionally build Perl modules (PL/Perl)
4806 #
4807 { echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
4808 echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6; }
4809
4810 pgac_args="$pgac_args with_perl"
4811
4812
4813 # Check whether --with-perl was given.
4814 if test "${with_perl+set}" = set; then
4815   withval=$with_perl;
4816   case $withval in
4817     yes)
4818       :
4819       ;;
4820     no)
4821       :
4822       ;;
4823     *)
4824       { { echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
4825 echo "$as_me: error: no argument expected for --with-perl option" >&2;}
4826    { (exit 1); exit 1; }; }
4827       ;;
4828   esac
4829
4830 else
4831   with_perl=no
4832
4833 fi
4834
4835
4836 { echo "$as_me:$LINENO: result: $with_perl" >&5
4837 echo "${ECHO_T}$with_perl" >&6; }
4838
4839
4840 #
4841 # Optionally build Python modules (PL/Python)
4842 #
4843 { echo "$as_me:$LINENO: checking whether to build Python modules" >&5
4844 echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6; }
4845
4846 pgac_args="$pgac_args with_python"
4847
4848
4849 # Check whether --with-python was given.
4850 if test "${with_python+set}" = set; then
4851   withval=$with_python;
4852   case $withval in
4853     yes)
4854       :
4855       ;;
4856     no)
4857       :
4858       ;;
4859     *)
4860       { { echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
4861 echo "$as_me: error: no argument expected for --with-python option" >&2;}
4862    { (exit 1); exit 1; }; }
4863       ;;
4864   esac
4865
4866 else
4867   with_python=no
4868
4869 fi
4870
4871
4872 { echo "$as_me:$LINENO: result: $with_python" >&5
4873 echo "${ECHO_T}$with_python" >&6; }
4874
4875
4876 #
4877 # GSSAPI
4878 #
4879 { echo "$as_me:$LINENO: checking whether to build with GSSAPI support" >&5
4880 echo $ECHO_N "checking whether to build with GSSAPI support... $ECHO_C" >&6; }
4881
4882 pgac_args="$pgac_args with_gssapi"
4883
4884
4885 # Check whether --with-gssapi was given.
4886 if test "${with_gssapi+set}" = set; then
4887   withval=$with_gssapi;
4888   case $withval in
4889     yes)
4890
4891
4892 cat >>confdefs.h <<\_ACEOF
4893 #define ENABLE_GSS 1
4894 _ACEOF
4895
4896   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
4897
4898       ;;
4899     no)
4900       :
4901       ;;
4902     *)
4903       { { echo "$as_me:$LINENO: error: no argument expected for --with-gssapi option" >&5
4904 echo "$as_me: error: no argument expected for --with-gssapi option" >&2;}
4905    { (exit 1); exit 1; }; }
4906       ;;
4907   esac
4908
4909 else
4910   with_gssapi=no
4911
4912 fi
4913
4914
4915 { echo "$as_me:$LINENO: result: $with_gssapi" >&5
4916 echo "${ECHO_T}$with_gssapi" >&6; }
4917
4918
4919 #
4920 # Kerberos 5
4921 #
4922 { echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
4923 echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6; }
4924
4925 pgac_args="$pgac_args with_krb5"
4926
4927
4928 # Check whether --with-krb5 was given.
4929 if test "${with_krb5+set}" = set; then
4930   withval=$with_krb5;
4931   case $withval in
4932     yes)
4933
4934
4935 cat >>confdefs.h <<\_ACEOF
4936 #define KRB5 1
4937 _ACEOF
4938
4939   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
4940
4941       ;;
4942     no)
4943       :
4944       ;;
4945     *)
4946       { { echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
4947 echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
4948    { (exit 1); exit 1; }; }
4949       ;;
4950   esac
4951
4952 else
4953   with_krb5=no
4954
4955 fi
4956
4957
4958 { echo "$as_me:$LINENO: result: $with_krb5" >&5
4959 echo "${ECHO_T}$with_krb5" >&6; }
4960
4961
4962
4963
4964
4965
4966 #
4967 # Kerberos configuration parameters
4968 #
4969
4970 pgac_args="$pgac_args with_krb_srvnam"
4971
4972
4973 # Check whether --with-krb-srvnam was given.
4974 if test "${with_krb_srvnam+set}" = set; then
4975   withval=$with_krb_srvnam;
4976   case $withval in
4977     yes)
4978       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
4979 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
4980    { (exit 1); exit 1; }; }
4981       ;;
4982     no)
4983       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
4984 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
4985    { (exit 1); exit 1; }; }
4986       ;;
4987     *)
4988
4989       ;;
4990   esac
4991
4992 else
4993   with_krb_srvnam="postgres"
4994 fi
4995
4996
4997
4998 cat >>confdefs.h <<_ACEOF
4999 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5000 _ACEOF
5001
5002
5003
5004 #
5005 # PAM
5006 #
5007 { echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
5008 echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6; }
5009
5010 pgac_args="$pgac_args with_pam"
5011
5012
5013 # Check whether --with-pam was given.
5014 if test "${with_pam+set}" = set; then
5015   withval=$with_pam;
5016   case $withval in
5017     yes)
5018
5019 cat >>confdefs.h <<\_ACEOF
5020 #define USE_PAM 1
5021 _ACEOF
5022
5023       ;;
5024     no)
5025       :
5026       ;;
5027     *)
5028       { { echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
5029 echo "$as_me: error: no argument expected for --with-pam option" >&2;}
5030    { (exit 1); exit 1; }; }
5031       ;;
5032   esac
5033
5034 else
5035   with_pam=no
5036
5037 fi
5038
5039
5040 { echo "$as_me:$LINENO: result: $with_pam" >&5
5041 echo "${ECHO_T}$with_pam" >&6; }
5042
5043
5044
5045 #
5046 # LDAP
5047 #
5048 { echo "$as_me:$LINENO: checking whether to build with LDAP support" >&5
5049 echo $ECHO_N "checking whether to build with LDAP support... $ECHO_C" >&6; }
5050
5051 pgac_args="$pgac_args with_ldap"
5052
5053
5054 # Check whether --with-ldap was given.
5055 if test "${with_ldap+set}" = set; then
5056   withval=$with_ldap;
5057   case $withval in
5058     yes)
5059
5060 cat >>confdefs.h <<\_ACEOF
5061 #define USE_LDAP 1
5062 _ACEOF
5063
5064       ;;
5065     no)
5066       :
5067       ;;
5068     *)
5069       { { echo "$as_me:$LINENO: error: no argument expected for --with-ldap option" >&5
5070 echo "$as_me: error: no argument expected for --with-ldap option" >&2;}
5071    { (exit 1); exit 1; }; }
5072       ;;
5073   esac
5074
5075 else
5076   with_ldap=no
5077
5078 fi
5079
5080
5081 { echo "$as_me:$LINENO: result: $with_ldap" >&5
5082 echo "${ECHO_T}$with_ldap" >&6; }
5083
5084
5085
5086 #
5087 # Bonjour
5088 #
5089 { echo "$as_me:$LINENO: checking whether to build with Bonjour support" >&5
5090 echo $ECHO_N "checking whether to build with Bonjour support... $ECHO_C" >&6; }
5091
5092 pgac_args="$pgac_args with_bonjour"
5093
5094
5095 # Check whether --with-bonjour was given.
5096 if test "${with_bonjour+set}" = set; then
5097   withval=$with_bonjour;
5098   case $withval in
5099     yes)
5100
5101 cat >>confdefs.h <<\_ACEOF
5102 #define USE_BONJOUR 1
5103 _ACEOF
5104
5105       ;;
5106     no)
5107       :
5108       ;;
5109     *)
5110       { { echo "$as_me:$LINENO: error: no argument expected for --with-bonjour option" >&5
5111 echo "$as_me: error: no argument expected for --with-bonjour option" >&2;}
5112    { (exit 1); exit 1; }; }
5113       ;;
5114   esac
5115
5116 else
5117   with_bonjour=no
5118
5119 fi
5120
5121
5122 { echo "$as_me:$LINENO: result: $with_bonjour" >&5
5123 echo "${ECHO_T}$with_bonjour" >&6; }
5124
5125
5126
5127 #
5128 # OpenSSL
5129 #
5130 { echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
5131 echo $ECHO_N "checking whether to build with OpenSSL support... $ECHO_C" >&6; }
5132
5133 pgac_args="$pgac_args with_openssl"
5134
5135
5136 # Check whether --with-openssl was given.
5137 if test "${with_openssl+set}" = set; then
5138   withval=$with_openssl;
5139   case $withval in
5140     yes)
5141
5142 cat >>confdefs.h <<\_ACEOF
5143 #define USE_SSL 1
5144 _ACEOF
5145
5146       ;;
5147     no)
5148       :
5149       ;;
5150     *)
5151       { { echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
5152 echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
5153    { (exit 1); exit 1; }; }
5154       ;;
5155   esac
5156
5157 else
5158   with_openssl=no
5159
5160 fi
5161
5162
5163 { echo "$as_me:$LINENO: result: $with_openssl" >&5
5164 echo "${ECHO_T}$with_openssl" >&6; }
5165
5166
5167
5168 #
5169 # Readline
5170 #
5171
5172 pgac_args="$pgac_args with_readline"
5173
5174
5175 # Check whether --with-readline was given.
5176 if test "${with_readline+set}" = set; then
5177   withval=$with_readline;
5178   case $withval in
5179     yes)
5180       :
5181       ;;
5182     no)
5183       :
5184       ;;
5185     *)
5186       { { echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
5187 echo "$as_me: error: no argument expected for --with-readline option" >&2;}
5188    { (exit 1); exit 1; }; }
5189       ;;
5190   esac
5191
5192 else
5193   with_readline=yes
5194
5195 fi
5196
5197
5198 # readline on MinGW has problems with backslashes in psql and other bugs.
5199 # This is particularly a problem with non-US code pages.
5200 # Therefore disable its use until we understand the cause. 2004-07-20
5201 if test "$PORTNAME" = "win32"; then
5202   if test "$with_readline" = yes; then
5203     { echo "$as_me:$LINENO: WARNING: *** Readline does not work on MinGW --- disabling" >&5
5204 echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
5205     with_readline=no
5206   fi
5207 fi
5208
5209
5210 #
5211 # Prefer libedit
5212 #
5213
5214 pgac_args="$pgac_args with_libedit_preferred"
5215
5216
5217 # Check whether --with-libedit-preferred was given.
5218 if test "${with_libedit_preferred+set}" = set; then
5219   withval=$with_libedit_preferred;
5220   case $withval in
5221     yes)
5222       :
5223       ;;
5224     no)
5225       :
5226       ;;
5227     *)
5228       { { echo "$as_me:$LINENO: error: no argument expected for --with-libedit-preferred option" >&5
5229 echo "$as_me: error: no argument expected for --with-libedit-preferred option" >&2;}
5230    { (exit 1); exit 1; }; }
5231       ;;
5232   esac
5233
5234 else
5235   with_libedit_preferred=no
5236
5237 fi
5238
5239
5240
5241
5242 #
5243 # OSSP UUID library
5244 #
5245
5246 pgac_args="$pgac_args with_ossp_uuid"
5247
5248
5249 # Check whether --with-ossp-uuid was given.
5250 if test "${with_ossp_uuid+set}" = set; then
5251   withval=$with_ossp_uuid;
5252   case $withval in
5253     yes)
5254       :
5255       ;;
5256     no)
5257       :
5258       ;;
5259     *)
5260       { { echo "$as_me:$LINENO: error: no argument expected for --with-ossp-uuid option" >&5
5261 echo "$as_me: error: no argument expected for --with-ossp-uuid option" >&2;}
5262    { (exit 1); exit 1; }; }
5263       ;;
5264   esac
5265
5266 else
5267   with_ossp_uuid=no
5268
5269 fi
5270
5271
5272
5273
5274
5275 #
5276 # XML
5277 #
5278
5279 pgac_args="$pgac_args with_libxml"
5280
5281
5282 # Check whether --with-libxml was given.
5283 if test "${with_libxml+set}" = set; then
5284   withval=$with_libxml;
5285   case $withval in
5286     yes)
5287
5288 cat >>confdefs.h <<\_ACEOF
5289 #define USE_LIBXML 1
5290 _ACEOF
5291
5292       ;;
5293     no)
5294       :
5295       ;;
5296     *)
5297       { { echo "$as_me:$LINENO: error: no argument expected for --with-libxml option" >&5
5298 echo "$as_me: error: no argument expected for --with-libxml option" >&2;}
5299    { (exit 1); exit 1; }; }
5300       ;;
5301   esac
5302
5303 else
5304   with_libxml=no
5305
5306 fi
5307
5308
5309
5310 if test "$with_libxml" = yes ; then
5311   for ac_prog in xml2-config
5312 do
5313   # Extract the first word of "$ac_prog", so it can be a program name with args.
5314 set dummy $ac_prog; ac_word=$2
5315 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5316 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5317 if test "${ac_cv_prog_XML2_CONFIG+set}" = set; then
5318   echo $ECHO_N "(cached) $ECHO_C" >&6
5319 else
5320   if test -n "$XML2_CONFIG"; then
5321   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
5322 else
5323 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5324 for as_dir in $PATH
5325 do
5326   IFS=$as_save_IFS
5327   test -z "$as_dir" && as_dir=.
5328   for ac_exec_ext in '' $ac_executable_extensions; do
5329   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5330     ac_cv_prog_XML2_CONFIG="$ac_prog"
5331     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5332     break 2
5333   fi
5334 done
5335 done
5336 IFS=$as_save_IFS
5337
5338 fi
5339 fi
5340 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
5341 if test -n "$XML2_CONFIG"; then
5342   { echo "$as_me:$LINENO: result: $XML2_CONFIG" >&5
5343 echo "${ECHO_T}$XML2_CONFIG" >&6; }
5344 else
5345   { echo "$as_me:$LINENO: result: no" >&5
5346 echo "${ECHO_T}no" >&6; }
5347 fi
5348
5349
5350   test -n "$XML2_CONFIG" && break
5351 done
5352
5353   if test -n "$XML2_CONFIG"; then
5354     for pgac_option in `$XML2_CONFIG --cflags`; do
5355       case $pgac_option in
5356         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
5357       esac
5358     done
5359     for pgac_option in `$XML2_CONFIG --libs`; do
5360       case $pgac_option in
5361         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5362       esac
5363     done
5364   fi
5365 fi
5366
5367
5368
5369 #
5370 # XSLT
5371 #
5372
5373 pgac_args="$pgac_args with_libxslt"
5374
5375
5376 # Check whether --with-libxslt was given.
5377 if test "${with_libxslt+set}" = set; then
5378   withval=$with_libxslt;
5379   case $withval in
5380     yes)
5381
5382 cat >>confdefs.h <<\_ACEOF
5383 #define USE_LIBXSLT 1
5384 _ACEOF
5385
5386       ;;
5387     no)
5388       :
5389       ;;
5390     *)
5391       { { echo "$as_me:$LINENO: error: no argument expected for --with-libxslt option" >&5
5392 echo "$as_me: error: no argument expected for --with-libxslt option" >&2;}
5393    { (exit 1); exit 1; }; }
5394       ;;
5395   esac
5396
5397 else
5398   with_libxslt=no
5399
5400 fi
5401
5402
5403
5404
5405
5406
5407 #
5408 # tzdata
5409 #
5410
5411 pgac_args="$pgac_args with_system_tzdata"
5412
5413
5414 # Check whether --with-system-tzdata was given.
5415 if test "${with_system_tzdata+set}" = set; then
5416   withval=$with_system_tzdata;
5417   case $withval in
5418     yes)
5419       { { echo "$as_me:$LINENO: error: argument required for --with-system-tzdata option" >&5
5420 echo "$as_me: error: argument required for --with-system-tzdata option" >&2;}
5421    { (exit 1); exit 1; }; }
5422       ;;
5423     no)
5424       { { echo "$as_me:$LINENO: error: argument required for --with-system-tzdata option" >&5
5425 echo "$as_me: error: argument required for --with-system-tzdata option" >&2;}
5426    { (exit 1); exit 1; }; }
5427       ;;
5428     *)
5429
5430       ;;
5431   esac
5432
5433 fi
5434
5435
5436
5437
5438 #
5439 # Zlib
5440 #
5441
5442 pgac_args="$pgac_args with_zlib"
5443
5444
5445 # Check whether --with-zlib was given.
5446 if test "${with_zlib+set}" = set; then
5447   withval=$with_zlib;
5448   case $withval in
5449     yes)
5450       :
5451       ;;
5452     no)
5453       :
5454       ;;
5455     *)
5456       { { echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
5457 echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
5458    { (exit 1); exit 1; }; }
5459       ;;
5460   esac
5461
5462 else
5463   with_zlib=yes
5464
5465 fi
5466
5467
5468
5469
5470 #
5471 # Elf
5472 #
5473
5474 # Assume system is ELF if it predefines __ELF__ as 1,
5475 # otherwise believe host_os based default.
5476 case $host_os in
5477     freebsd1*|freebsd2*) elf=no;;
5478     freebsd3*|freebsd4*) elf=yes;;
5479 esac
5480
5481
5482 { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
5483 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
5484 if test "${ac_cv_path_GREP+set}" = set; then
5485   echo $ECHO_N "(cached) $ECHO_C" >&6
5486 else
5487   # Extract the first word of "grep ggrep" to use in msg output
5488 if test -z "$GREP"; then
5489 set dummy grep ggrep; ac_prog_name=$2
5490 if test "${ac_cv_path_GREP+set}" = set; then
5491   echo $ECHO_N "(cached) $ECHO_C" >&6
5492 else
5493   ac_path_GREP_found=false
5494 # Loop through the user's path and test for each of PROGNAME-LIST
5495 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5496 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5497 do
5498   IFS=$as_save_IFS
5499   test -z "$as_dir" && as_dir=.
5500   for ac_prog in grep ggrep; do
5501   for ac_exec_ext in '' $ac_executable_extensions; do
5502     ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5503     { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5504     # Check for GNU ac_path_GREP and select it if it is found.
5505   # Check for GNU $ac_path_GREP
5506 case `"$ac_path_GREP" --version 2>&1` in
5507 *GNU*)
5508   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5509 *)
5510   ac_count=0
5511   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
5512   while :
5513   do
5514     cat "conftest.in" "conftest.in" >"conftest.tmp"
5515     mv "conftest.tmp" "conftest.in"
5516     cp "conftest.in" "conftest.nl"
5517     echo 'GREP' >> "conftest.nl"
5518     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5519     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5520     ac_count=`expr $ac_count + 1`
5521     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5522       # Best one so far, save it but keep looking for a better one
5523       ac_cv_path_GREP="$ac_path_GREP"
5524       ac_path_GREP_max=$ac_count
5525     fi
5526     # 10*(2^10) chars as input seems more than enough
5527     test $ac_count -gt 10 && break
5528   done
5529   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5530 esac
5531
5532
5533     $ac_path_GREP_found && break 3
5534   done
5535 done
5536
5537 done
5538 IFS=$as_save_IFS
5539
5540
5541 fi
5542
5543 GREP="$ac_cv_path_GREP"
5544 if test -z "$GREP"; then
5545   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
5546 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
5547    { (exit 1); exit 1; }; }
5548 fi
5549
5550 else
5551   ac_cv_path_GREP=$GREP
5552 fi
5553
5554
5555 fi
5556 { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
5557 echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
5558  GREP="$ac_cv_path_GREP"
5559
5560
5561 { echo "$as_me:$LINENO: checking for egrep" >&5
5562 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
5563 if test "${ac_cv_path_EGREP+set}" = set; then
5564   echo $ECHO_N "(cached) $ECHO_C" >&6
5565 else
5566   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5567    then ac_cv_path_EGREP="$GREP -E"
5568    else
5569      # Extract the first word of "egrep" to use in msg output
5570 if test -z "$EGREP"; then
5571 set dummy egrep; ac_prog_name=$2
5572 if test "${ac_cv_path_EGREP+set}" = set; then
5573   echo $ECHO_N "(cached) $ECHO_C" >&6
5574 else
5575   ac_path_EGREP_found=false
5576 # Loop through the user's path and test for each of PROGNAME-LIST
5577 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5578 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5579 do
5580   IFS=$as_save_IFS
5581   test -z "$as_dir" && as_dir=.
5582   for ac_prog in egrep; do
5583   for ac_exec_ext in '' $ac_executable_extensions; do
5584     ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5585     { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5586     # Check for GNU ac_path_EGREP and select it if it is found.
5587   # Check for GNU $ac_path_EGREP
5588 case `"$ac_path_EGREP" --version 2>&1` in
5589 *GNU*)
5590   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5591 *)
5592   ac_count=0
5593   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
5594   while :
5595   do
5596     cat "conftest.in" "conftest.in" >"conftest.tmp"
5597     mv "conftest.tmp" "conftest.in"
5598     cp "conftest.in" "conftest.nl"
5599     echo 'EGREP' >> "conftest.nl"
5600     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5601     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5602     ac_count=`expr $ac_count + 1`
5603     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5604       # Best one so far, save it but keep looking for a better one
5605       ac_cv_path_EGREP="$ac_path_EGREP"
5606       ac_path_EGREP_max=$ac_count
5607     fi
5608     # 10*(2^10) chars as input seems more than enough
5609     test $ac_count -gt 10 && break
5610   done
5611   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5612 esac
5613
5614
5615     $ac_path_EGREP_found && break 3
5616   done
5617 done
5618
5619 done
5620 IFS=$as_save_IFS
5621
5622
5623 fi
5624
5625 EGREP="$ac_cv_path_EGREP"
5626 if test -z "$EGREP"; then
5627   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
5628 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
5629    { (exit 1); exit 1; }; }
5630 fi
5631
5632 else
5633   ac_cv_path_EGREP=$EGREP
5634 fi
5635
5636
5637    fi
5638 fi
5639 { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
5640 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
5641  EGREP="$ac_cv_path_EGREP"
5642
5643
5644 cat >conftest.$ac_ext <<_ACEOF
5645 /* confdefs.h.  */
5646 _ACEOF
5647 cat confdefs.h >>conftest.$ac_ext
5648 cat >>conftest.$ac_ext <<_ACEOF
5649 /* end confdefs.h.  */
5650 #if __ELF__
5651   yes
5652 #endif
5653
5654 _ACEOF
5655 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5656   $EGREP "yes" >/dev/null 2>&1; then
5657   ELF_SYS=true
5658 else
5659   if test "X$elf" = "Xyes" ; then
5660   ELF_SYS=true
5661 else
5662   ELF_SYS=
5663 fi
5664 fi
5665 rm -f conftest*
5666
5667
5668
5669 #
5670 # Assignments
5671 #
5672
5673 CPPFLAGS="$CPPFLAGS $INCLUDES"
5674 LDFLAGS="$LDFLAGS $LIBDIRS"
5675
5676
5677
5678
5679 # Check whether --with-gnu-ld was given.
5680 if test "${with_gnu_ld+set}" = set; then
5681   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
5682 else
5683   with_gnu_ld=no
5684 fi
5685
5686 ac_prog=ld
5687 if test "$GCC" = yes; then
5688   # Check if gcc -print-prog-name=ld gives a path.
5689   { echo "$as_me:$LINENO: checking for ld used by GCC" >&5
5690 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6; }
5691   case $host in
5692   *-*-mingw*)
5693     # gcc leaves a trailing carriage return which upsets mingw
5694     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5695   *)
5696     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5697   esac
5698   case "$ac_prog" in
5699     # Accept absolute paths.
5700     [\\/]* | [A-Za-z]:[\\/]*)
5701       re_direlt='/[^/][^/]*/\.\./'
5702       # Canonicalize the path of ld
5703       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
5704       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
5705         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
5706       done
5707       test -z "$LD" && LD="$ac_prog"
5708       ;;
5709   "")
5710     # If it fails, then pretend we aren't using GCC.
5711     ac_prog=ld
5712     ;;
5713   *)
5714     # If it is relative, then search for the first ld in PATH.
5715     with_gnu_ld=unknown
5716     ;;
5717   esac
5718 elif test "$with_gnu_ld" = yes; then
5719   { echo "$as_me:$LINENO: checking for GNU ld" >&5
5720 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
5721 else
5722   { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
5723 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
5724 fi
5725 if test "${ac_cv_path_LD+set}" = set; then
5726   echo $ECHO_N "(cached) $ECHO_C" >&6
5727 else
5728   if test -z "$LD"; then
5729   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
5730   for ac_dir in $PATH; do
5731     test -z "$ac_dir" && ac_dir=.
5732     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5733       ac_cv_path_LD="$ac_dir/$ac_prog"
5734       # Check to see if the program is GNU ld.  I'd rather use --version,
5735       # but apparently some GNU ld's only accept -v.
5736       # Break only if it was the GNU/non-GNU ld that we prefer.
5737       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
5738         test "$with_gnu_ld" != no && break
5739       else
5740         test "$with_gnu_ld" != yes && break
5741       fi
5742     fi
5743   done
5744   IFS="$ac_save_ifs"
5745 else
5746   ac_cv_path_LD="$LD" # Let the user override the test with a path.
5747 fi
5748 fi
5749
5750 LD="$ac_cv_path_LD"
5751 if test -n "$LD"; then
5752   { echo "$as_me:$LINENO: result: $LD" >&5
5753 echo "${ECHO_T}$LD" >&6; }
5754 else
5755   { echo "$as_me:$LINENO: result: no" >&5
5756 echo "${ECHO_T}no" >&6; }
5757 fi
5758 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
5759 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
5760    { (exit 1); exit 1; }; }
5761 { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
5762 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
5763 if test "${ac_cv_prog_gnu_ld+set}" = set; then
5764   echo $ECHO_N "(cached) $ECHO_C" >&6
5765 else
5766   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
5767 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
5768   ac_cv_prog_gnu_ld=yes
5769 else
5770   ac_cv_prog_gnu_ld=no
5771 fi
5772 fi
5773 { echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
5774 echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6; }
5775 with_gnu_ld=$ac_cv_prog_gnu_ld
5776
5777
5778
5779
5780 case $host_os in sysv5*)
5781   { echo "$as_me:$LINENO: checking whether ld -R works" >&5
5782 echo $ECHO_N "checking whether ld -R works... $ECHO_C" >&6; }
5783 if test "${pgac_cv_prog_ld_R+set}" = set; then
5784   echo $ECHO_N "(cached) $ECHO_C" >&6
5785 else
5786
5787     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
5788     cat >conftest.$ac_ext <<_ACEOF
5789 /* confdefs.h.  */
5790 _ACEOF
5791 cat confdefs.h >>conftest.$ac_ext
5792 cat >>conftest.$ac_ext <<_ACEOF
5793 /* end confdefs.h.  */
5794
5795 int
5796 main ()
5797 {
5798
5799   ;
5800   return 0;
5801 }
5802 _ACEOF
5803 rm -f conftest.$ac_objext conftest$ac_exeext
5804 if { (ac_try="$ac_link"
5805 case "(($ac_try" in
5806   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5807   *) ac_try_echo=$ac_try;;
5808 esac
5809 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5810   (eval "$ac_link") 2>conftest.er1
5811   ac_status=$?
5812   grep -v '^ *+' conftest.er1 >conftest.err
5813   rm -f conftest.er1
5814   cat conftest.err >&5
5815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5816   (exit $ac_status); } && {
5817          test -z "$ac_c_werror_flag" ||
5818          test ! -s conftest.err
5819        } && test -s conftest$ac_exeext &&
5820        $as_test_x conftest$ac_exeext; then
5821   pgac_cv_prog_ld_R=yes
5822 else
5823   echo "$as_me: failed program was:" >&5
5824 sed 's/^/| /' conftest.$ac_ext >&5
5825
5826         pgac_cv_prog_ld_R=no
5827 fi
5828
5829 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5830       conftest$ac_exeext conftest.$ac_ext
5831     LDFLAGS=$pgac_save_LDFLAGS
5832
5833 fi
5834 { echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
5835 echo "${ECHO_T}$pgac_cv_prog_ld_R" >&6; }
5836   ld_R_works=$pgac_cv_prog_ld_R
5837
5838 esac
5839 if test -n "$ac_tool_prefix"; then
5840   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5841 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5842 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5843 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5844 if test "${ac_cv_prog_RANLIB+set}" = set; then
5845   echo $ECHO_N "(cached) $ECHO_C" >&6
5846 else
5847   if test -n "$RANLIB"; then
5848   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5849 else
5850 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5851 for as_dir in $PATH
5852 do
5853   IFS=$as_save_IFS
5854   test -z "$as_dir" && as_dir=.
5855   for ac_exec_ext in '' $ac_executable_extensions; do
5856   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5857     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5858     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5859     break 2
5860   fi
5861 done
5862 done
5863 IFS=$as_save_IFS
5864
5865 fi
5866 fi
5867 RANLIB=$ac_cv_prog_RANLIB
5868 if test -n "$RANLIB"; then
5869   { echo "$as_me:$LINENO: result: $RANLIB" >&5
5870 echo "${ECHO_T}$RANLIB" >&6; }
5871 else
5872   { echo "$as_me:$LINENO: result: no" >&5
5873 echo "${ECHO_T}no" >&6; }
5874 fi
5875
5876
5877 fi
5878 if test -z "$ac_cv_prog_RANLIB"; then
5879   ac_ct_RANLIB=$RANLIB
5880   # Extract the first word of "ranlib", so it can be a program name with args.
5881 set dummy ranlib; ac_word=$2
5882 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5883 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5884 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5885   echo $ECHO_N "(cached) $ECHO_C" >&6
5886 else
5887   if test -n "$ac_ct_RANLIB"; then
5888   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5889 else
5890 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5891 for as_dir in $PATH
5892 do
5893   IFS=$as_save_IFS
5894   test -z "$as_dir" && as_dir=.
5895   for ac_exec_ext in '' $ac_executable_extensions; do
5896   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5897     ac_cv_prog_ac_ct_RANLIB="ranlib"
5898     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5899     break 2
5900   fi
5901 done
5902 done
5903 IFS=$as_save_IFS
5904
5905 fi
5906 fi
5907 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5908 if test -n "$ac_ct_RANLIB"; then
5909   { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5910 echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
5911 else
5912   { echo "$as_me:$LINENO: result: no" >&5
5913 echo "${ECHO_T}no" >&6; }
5914 fi
5915
5916   if test "x$ac_ct_RANLIB" = x; then
5917     RANLIB=":"
5918   else
5919     case $cross_compiling:$ac_tool_warned in
5920 yes:)
5921 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5922 whose name does not start with the host triplet.  If you think this
5923 configuration is useful to you, please write to autoconf@gnu.org." >&5
5924 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5925 whose name does not start with the host triplet.  If you think this
5926 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5927 ac_tool_warned=yes ;;
5928 esac
5929     RANLIB=$ac_ct_RANLIB
5930   fi
5931 else
5932   RANLIB="$ac_cv_prog_RANLIB"
5933 fi
5934
5935
5936   if test -n "$ac_tool_prefix"; then
5937   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5938 set dummy ${ac_tool_prefix}strip; ac_word=$2
5939 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5940 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5941 if test "${ac_cv_prog_STRIP+set}" = set; then
5942   echo $ECHO_N "(cached) $ECHO_C" >&6
5943 else
5944   if test -n "$STRIP"; then
5945   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5946 else
5947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5948 for as_dir in $PATH
5949 do
5950   IFS=$as_save_IFS
5951   test -z "$as_dir" && as_dir=.
5952   for ac_exec_ext in '' $ac_executable_extensions; do
5953   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5954     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5955     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5956     break 2
5957   fi
5958 done
5959 done
5960 IFS=$as_save_IFS
5961
5962 fi
5963 fi
5964 STRIP=$ac_cv_prog_STRIP
5965 if test -n "$STRIP"; then
5966   { echo "$as_me:$LINENO: result: $STRIP" >&5
5967 echo "${ECHO_T}$STRIP" >&6; }
5968 else
5969   { echo "$as_me:$LINENO: result: no" >&5
5970 echo "${ECHO_T}no" >&6; }
5971 fi
5972
5973
5974 fi
5975 if test -z "$ac_cv_prog_STRIP"; then
5976   ac_ct_STRIP=$STRIP
5977   # Extract the first word of "strip", so it can be a program name with args.
5978 set dummy strip; ac_word=$2
5979 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5980 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5981 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
5982   echo $ECHO_N "(cached) $ECHO_C" >&6
5983 else
5984   if test -n "$ac_ct_STRIP"; then
5985   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5986 else
5987 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5988 for as_dir in $PATH
5989 do
5990   IFS=$as_save_IFS
5991   test -z "$as_dir" && as_dir=.
5992   for ac_exec_ext in '' $ac_executable_extensions; do
5993   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5994     ac_cv_prog_ac_ct_STRIP="strip"
5995     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5996     break 2
5997   fi
5998 done
5999 done
6000 IFS=$as_save_IFS
6001
6002 fi
6003 fi
6004 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6005 if test -n "$ac_ct_STRIP"; then
6006   { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
6007 echo "${ECHO_T}$ac_ct_STRIP" >&6; }
6008 else
6009   { echo "$as_me:$LINENO: result: no" >&5
6010 echo "${ECHO_T}no" >&6; }
6011 fi
6012
6013   if test "x$ac_ct_STRIP" = x; then
6014     STRIP=":"
6015   else
6016     case $cross_compiling:$ac_tool_warned in
6017 yes:)
6018 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
6019 whose name does not start with the host triplet.  If you think this
6020 configuration is useful to you, please write to autoconf@gnu.org." >&5
6021 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
6022 whose name does not start with the host triplet.  If you think this
6023 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
6024 ac_tool_warned=yes ;;
6025 esac
6026     STRIP=$ac_ct_STRIP
6027   fi
6028 else
6029   STRIP="$ac_cv_prog_STRIP"
6030 fi
6031
6032
6033   { echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
6034 echo $ECHO_N "checking whether it is possible to strip libraries... $ECHO_C" >&6; }
6035   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6036     STRIP_STATIC_LIB="$STRIP -x"
6037     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6038     { echo "$as_me:$LINENO: result: yes" >&5
6039 echo "${ECHO_T}yes" >&6; }
6040   else
6041     STRIP_STATIC_LIB=:
6042     STRIP_SHARED_LIB=:
6043     { echo "$as_me:$LINENO: result: no" >&5
6044 echo "${ECHO_T}no" >&6; }
6045   fi
6046
6047
6048
6049
6050 # Extract the first word of "tar", so it can be a program name with args.
6051 set dummy tar; ac_word=$2
6052 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6053 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6054 if test "${ac_cv_path_TAR+set}" = set; then
6055   echo $ECHO_N "(cached) $ECHO_C" >&6
6056 else
6057   case $TAR in
6058   [\\/]* | ?:[\\/]*)
6059   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
6060   ;;
6061   *)
6062   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6063 for as_dir in $PATH
6064 do
6065   IFS=$as_save_IFS
6066   test -z "$as_dir" && as_dir=.
6067   for ac_exec_ext in '' $ac_executable_extensions; do
6068   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6069     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
6070     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6071     break 2
6072   fi
6073 done
6074 done
6075 IFS=$as_save_IFS
6076
6077   ;;
6078 esac
6079 fi
6080 TAR=$ac_cv_path_TAR
6081 if test -n "$TAR"; then
6082   { echo "$as_me:$LINENO: result: $TAR" >&5
6083 echo "${ECHO_T}$TAR" >&6; }
6084 else
6085   { echo "$as_me:$LINENO: result: no" >&5
6086 echo "${ECHO_T}no" >&6; }
6087 fi
6088
6089
6090 { echo "$as_me:$LINENO: checking whether ln -s works" >&5
6091 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
6092 LN_S=$as_ln_s
6093 if test "$LN_S" = "ln -s"; then
6094   { echo "$as_me:$LINENO: result: yes" >&5
6095 echo "${ECHO_T}yes" >&6; }
6096 else
6097   { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
6098 echo "${ECHO_T}no, using $LN_S" >&6; }
6099 fi
6100
6101 for ac_prog in gawk mawk nawk awk
6102 do
6103   # Extract the first word of "$ac_prog", so it can be a program name with args.
6104 set dummy $ac_prog; ac_word=$2
6105 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6106 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6107 if test "${ac_cv_prog_AWK+set}" = set; then
6108   echo $ECHO_N "(cached) $ECHO_C" >&6
6109 else
6110   if test -n "$AWK"; then
6111   ac_cv_prog_AWK="$AWK" # Let the user override the test.
6112 else
6113 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6114 for as_dir in $PATH
6115 do
6116   IFS=$as_save_IFS
6117   test -z "$as_dir" && as_dir=.
6118   for ac_exec_ext in '' $ac_executable_extensions; do
6119   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6120     ac_cv_prog_AWK="$ac_prog"
6121     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6122     break 2
6123   fi
6124 done
6125 done
6126 IFS=$as_save_IFS
6127
6128 fi
6129 fi
6130 AWK=$ac_cv_prog_AWK
6131 if test -n "$AWK"; then
6132   { echo "$as_me:$LINENO: result: $AWK" >&5
6133 echo "${ECHO_T}$AWK" >&6; }
6134 else
6135   { echo "$as_me:$LINENO: result: no" >&5
6136 echo "${ECHO_T}no" >&6; }
6137 fi
6138
6139
6140   test -n "$AWK" && break
6141 done
6142
6143
6144 # Let the user override the search
6145 if test -z "$BISON"; then
6146   for ac_prog in bison
6147 do
6148   # Extract the first word of "$ac_prog", so it can be a program name with args.
6149 set dummy $ac_prog; ac_word=$2
6150 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6151 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6152 if test "${ac_cv_prog_BISON+set}" = set; then
6153   echo $ECHO_N "(cached) $ECHO_C" >&6
6154 else
6155   if test -n "$BISON"; then
6156   ac_cv_prog_BISON="$BISON" # Let the user override the test.
6157 else
6158 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6159 for as_dir in $PATH
6160 do
6161   IFS=$as_save_IFS
6162   test -z "$as_dir" && as_dir=.
6163   for ac_exec_ext in '' $ac_executable_extensions; do
6164   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6165     ac_cv_prog_BISON="$ac_prog"
6166     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6167     break 2
6168   fi
6169 done
6170 done
6171 IFS=$as_save_IFS
6172
6173 fi
6174 fi
6175 BISON=$ac_cv_prog_BISON
6176 if test -n "$BISON"; then
6177   { echo "$as_me:$LINENO: result: $BISON" >&5
6178 echo "${ECHO_T}$BISON" >&6; }
6179 else
6180   { echo "$as_me:$LINENO: result: no" >&5
6181 echo "${ECHO_T}no" >&6; }
6182 fi
6183
6184
6185   test -n "$BISON" && break
6186 done
6187
6188 fi
6189
6190 if test "$BISON"; then
6191   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
6192   { echo "$as_me:$LINENO: using $pgac_bison_version" >&5
6193 echo "$as_me: using $pgac_bison_version" >&6;}
6194   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
6195   then
6196     { echo "$as_me:$LINENO: WARNING:
6197 *** The installed version of Bison is too old to use with PostgreSQL.
6198 *** Bison version 1.875 or later is required." >&5
6199 echo "$as_me: WARNING:
6200 *** The installed version of Bison is too old to use with PostgreSQL.
6201 *** Bison version 1.875 or later is required." >&2;}
6202     BISON=""
6203   fi
6204 fi
6205
6206 if test -z "$BISON"; then
6207   { echo "$as_me:$LINENO: WARNING:
6208 *** Without Bison you will not be able to build PostgreSQL from CVS nor
6209 *** change any of the parser definition files.  You can obtain Bison from
6210 *** a GNU mirror site.  (If you are using the official distribution of
6211 *** PostgreSQL then you do not need to worry about this, because the Bison
6212 *** output is pre-generated.)" >&5
6213 echo "$as_me: WARNING:
6214 *** Without Bison you will not be able to build PostgreSQL from CVS nor
6215 *** change any of the parser definition files.  You can obtain Bison from
6216 *** a GNU mirror site.  (If you are using the official distribution of
6217 *** PostgreSQL then you do not need to worry about this, because the Bison
6218 *** output is pre-generated.)" >&2;}
6219 fi
6220 # We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
6221
6222
6223 { echo "$as_me:$LINENO: checking for flex" >&5
6224 echo $ECHO_N "checking for flex... $ECHO_C" >&6; }
6225 if test "${pgac_cv_path_flex+set}" = set; then
6226   echo $ECHO_N "(cached) $ECHO_C" >&6
6227 else
6228   # Let the user override the test
6229 if test -n "$FLEX"; then
6230   pgac_cv_path_flex=$FLEX
6231 else
6232   pgac_save_IFS=$IFS
6233   IFS=$PATH_SEPARATOR
6234   for pgac_dir in $PATH; do
6235     IFS=$pgac_save_IFS
6236     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
6237       pgac_dir=`pwd`
6238     fi
6239     for pgac_prog in flex lex; do
6240       pgac_candidate="$pgac_dir/$pgac_prog"
6241       if test -f "$pgac_candidate" \
6242         && $pgac_candidate --version </dev/null >/dev/null 2>&1
6243       then
6244         echo '%%'  > conftest.l
6245         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
6246           if $pgac_candidate --version | grep ' 2\.5\.3$' >/dev/null 2>&1; then
6247             pgac_broken_flex=$pgac_candidate
6248             continue
6249           fi
6250
6251           pgac_cv_path_flex=$pgac_candidate
6252           break 2
6253         fi
6254       fi
6255     done
6256   done
6257   rm -f conftest.l lex.yy.c
6258   : ${pgac_cv_path_flex=no}
6259 fi
6260
6261 fi
6262 { echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
6263 echo "${ECHO_T}$pgac_cv_path_flex" >&6; }
6264 if test x"$pgac_cv_path_flex" = x"no"; then
6265   if test -n "$pgac_broken_flex"; then
6266     { echo "$as_me:$LINENO: WARNING:
6267 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
6268 *** should get version 2.5.4 or later." >&5
6269 echo "$as_me: WARNING:
6270 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
6271 *** should get version 2.5.4 or later." >&2;}
6272   fi
6273
6274   { echo "$as_me:$LINENO: WARNING:
6275 *** Without Flex you will not be able to build PostgreSQL from CVS or
6276 *** change any of the scanner definition files.  You can obtain Flex from
6277 *** a GNU mirror site.  (If you are using the official distribution of
6278 *** PostgreSQL then you do not need to worry about this because the Flex
6279 *** output is pre-generated.)" >&5
6280 echo "$as_me: WARNING:
6281 *** Without Flex you will not be able to build PostgreSQL from CVS or
6282 *** change any of the scanner definition files.  You can obtain Flex from
6283 *** a GNU mirror site.  (If you are using the official distribution of
6284 *** PostgreSQL then you do not need to worry about this because the Flex
6285 *** output is pre-generated.)" >&2;}
6286
6287   FLEX=
6288 else
6289   FLEX=$pgac_cv_path_flex
6290   pgac_flex_version=`$FLEX -V 2>/dev/null`
6291   { echo "$as_me:$LINENO: using $pgac_flex_version" >&5
6292 echo "$as_me: using $pgac_flex_version" >&6;}
6293 fi
6294
6295
6296
6297
6298
6299 # Extract the first word of "perl", so it can be a program name with args.
6300 set dummy perl; ac_word=$2
6301 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6302 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6303 if test "${ac_cv_path_PERL+set}" = set; then
6304   echo $ECHO_N "(cached) $ECHO_C" >&6
6305 else
6306   case $PERL in
6307   [\\/]* | ?:[\\/]*)
6308   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
6309   ;;
6310   *)
6311   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6312 for as_dir in $PATH
6313 do
6314   IFS=$as_save_IFS
6315   test -z "$as_dir" && as_dir=.
6316   for ac_exec_ext in '' $ac_executable_extensions; do
6317   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6318     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
6319     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6320     break 2
6321   fi
6322 done
6323 done
6324 IFS=$as_save_IFS
6325
6326   ;;
6327 esac
6328 fi
6329 PERL=$ac_cv_path_PERL
6330 if test -n "$PERL"; then
6331   { echo "$as_me:$LINENO: result: $PERL" >&5
6332 echo "${ECHO_T}$PERL" >&6; }
6333 else
6334   { echo "$as_me:$LINENO: result: no" >&5
6335 echo "${ECHO_T}no" >&6; }
6336 fi
6337
6338
6339 if test "$with_perl" = yes; then
6340
6341 { echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
6342 echo $ECHO_N "checking for Perl archlibexp... $ECHO_C" >&6; }
6343 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
6344 { echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
6345 echo "${ECHO_T}$perl_archlibexp" >&6; }
6346 { echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
6347 echo $ECHO_N "checking for Perl privlibexp... $ECHO_C" >&6; }
6348 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
6349 { echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
6350 echo "${ECHO_T}$perl_privlibexp" >&6; }
6351 { echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
6352 echo $ECHO_N "checking for Perl useshrplib... $ECHO_C" >&6; }
6353 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
6354 { echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
6355 echo "${ECHO_T}$perl_useshrplib" >&6; }
6356
6357 { echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
6358 echo $ECHO_N "checking for flags to link embedded Perl... $ECHO_C" >&6; }
6359 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
6360 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
6361 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
6362 { echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
6363 echo "${ECHO_T}$perl_embed_ldflags" >&6; }
6364 fi
6365
6366 if test "$with_python" = yes; then
6367   # Extract the first word of "python", so it can be a program name with args.
6368 set dummy python; ac_word=$2
6369 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6370 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6371 if test "${ac_cv_path_PYTHON+set}" = set; then
6372   echo $ECHO_N "(cached) $ECHO_C" >&6
6373 else
6374   case $PYTHON in
6375   [\\/]* | ?:[\\/]*)
6376   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
6377   ;;
6378   *)
6379   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6380 for as_dir in $PATH
6381 do
6382   IFS=$as_save_IFS
6383   test -z "$as_dir" && as_dir=.
6384   for ac_exec_ext in '' $ac_executable_extensions; do
6385   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6386     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
6387     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6388     break 2
6389   fi
6390 done
6391 done
6392 IFS=$as_save_IFS
6393
6394   ;;
6395 esac
6396 fi
6397 PYTHON=$ac_cv_path_PYTHON
6398 if test -n "$PYTHON"; then
6399   { echo "$as_me:$LINENO: result: $PYTHON" >&5
6400 echo "${ECHO_T}$PYTHON" >&6; }
6401 else
6402   { echo "$as_me:$LINENO: result: no" >&5
6403 echo "${ECHO_T}no" >&6; }
6404 fi
6405
6406
6407 if test x"$PYTHON" = x""; then
6408   { { echo "$as_me:$LINENO: error: Python not found" >&5
6409 echo "$as_me: error: Python not found" >&2;}
6410    { (exit 1); exit 1; }; }
6411 fi
6412
6413
6414 { echo "$as_me:$LINENO: checking for Python distutils module" >&5
6415 echo $ECHO_N "checking for Python distutils module... $ECHO_C" >&6; }
6416 if "${PYTHON}" 2>&- -c 'import distutils'
6417 then
6418     { echo "$as_me:$LINENO: result: yes" >&5
6419 echo "${ECHO_T}yes" >&6; }
6420 else
6421     { echo "$as_me:$LINENO: result: no" >&5
6422 echo "${ECHO_T}no" >&6; }
6423     { { echo "$as_me:$LINENO: error: distutils module not found" >&5
6424 echo "$as_me: error: distutils module not found" >&2;}
6425    { (exit 1); exit 1; }; }
6426 fi
6427 { echo "$as_me:$LINENO: checking Python configuration directory" >&5
6428 echo $ECHO_N "checking Python configuration directory... $ECHO_C" >&6; }
6429 python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
6430 python_configdir=`${PYTHON} -c "from distutils.sysconfig import get_python_lib as f; import os; print os.path.join(f(plat_specific=1,standard_lib=1),'config')"`
6431 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print '-I'+distutils.sysconfig.get_python_inc()"`
6432
6433 # This should be enough of a message.
6434 { echo "$as_me:$LINENO: result: $python_configdir" >&5
6435 echo "${ECHO_T}$python_configdir" >&6; }
6436
6437
6438 { echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
6439 echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6; }
6440
6441 python_libdir=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR')))"`
6442 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY')))"`
6443 python_so=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('SO')))"`
6444 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
6445
6446 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
6447 then
6448         # New way: use the official shared library
6449         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
6450         python_libspec="-L${python_libdir} -l${ldlibrary}"
6451 else
6452         # Old way: use libpython from python_configdir
6453         python_libdir="${python_configdir}"
6454         python_libspec="-L${python_libdir} -lpython${python_version}"
6455 fi
6456
6457 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','LOCALMODLIBS','BASEMODLIBS')))"`
6458
6459 { echo "$as_me:$LINENO: result: ${python_libspec} ${python_additional_libs}" >&5
6460 echo "${ECHO_T}${python_libspec} ${python_additional_libs}" >&6; }
6461
6462
6463 # threaded python is not supported on bsd's
6464 { echo "$as_me:$LINENO: checking whether Python is compiled with thread support" >&5
6465 echo $ECHO_N "checking whether Python is compiled with thread support... $ECHO_C" >&6; }
6466 pythreads=`${PYTHON} -c "import sys; print int('thread' in sys.builtin_module_names)"`
6467 if test "$pythreads" = "1"; then
6468   { echo "$as_me:$LINENO: result: yes" >&5
6469 echo "${ECHO_T}yes" >&6; }
6470   case $host_os in
6471   openbsd*|freebsd*)
6472     { { echo "$as_me:$LINENO: error: threaded Python not supported on this platform" >&5
6473 echo "$as_me: error: threaded Python not supported on this platform" >&2;}
6474    { (exit 1); exit 1; }; }
6475     ;;
6476   esac
6477 else
6478   { echo "$as_me:$LINENO: result: no" >&5
6479 echo "${ECHO_T}no" >&6; }
6480 fi
6481
6482
6483 fi
6484
6485 # Supply a numeric version string for use by 3rd party add-ons
6486 # awk -F is a regex on some platforms, and not on others, so make "." a tab
6487 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
6488 tr '.' '        ' |
6489 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
6490
6491 cat >>confdefs.h <<_ACEOF
6492 #define PG_VERSION_NUM $PG_VERSION_NUM
6493 _ACEOF
6494
6495
6496 ##
6497 ## Libraries
6498 ##
6499 ## Most libraries are included only if they demonstrably provide a function
6500 ## we need, but libm is an exception: always include it, because there are
6501 ## too many compilers that play cute optimization games that will break
6502 ## probes for standard functions such as pow().
6503 ##
6504
6505
6506 { echo "$as_me:$LINENO: checking for main in -lm" >&5
6507 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6; }
6508 if test "${ac_cv_lib_m_main+set}" = set; then
6509   echo $ECHO_N "(cached) $ECHO_C" >&6
6510 else
6511   ac_check_lib_save_LIBS=$LIBS
6512 LIBS="-lm  $LIBS"
6513 cat >conftest.$ac_ext <<_ACEOF
6514 /* confdefs.h.  */
6515 _ACEOF
6516 cat confdefs.h >>conftest.$ac_ext
6517 cat >>conftest.$ac_ext <<_ACEOF
6518 /* end confdefs.h.  */
6519
6520
6521 int
6522 main ()
6523 {
6524 return main ();
6525   ;
6526   return 0;
6527 }
6528 _ACEOF
6529 rm -f conftest.$ac_objext conftest$ac_exeext
6530 if { (ac_try="$ac_link"
6531 case "(($ac_try" in
6532   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6533   *) ac_try_echo=$ac_try;;
6534 esac
6535 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6536   (eval "$ac_link") 2>conftest.er1
6537   ac_status=$?
6538   grep -v '^ *+' conftest.er1 >conftest.err
6539   rm -f conftest.er1
6540   cat conftest.err >&5
6541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6542   (exit $ac_status); } && {
6543          test -z "$ac_c_werror_flag" ||
6544          test ! -s conftest.err
6545        } && test -s conftest$ac_exeext &&
6546        $as_test_x conftest$ac_exeext; then
6547   ac_cv_lib_m_main=yes
6548 else
6549   echo "$as_me: failed program was:" >&5
6550 sed 's/^/| /' conftest.$ac_ext >&5
6551
6552         ac_cv_lib_m_main=no
6553 fi
6554
6555 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6556       conftest$ac_exeext conftest.$ac_ext
6557 LIBS=$ac_check_lib_save_LIBS
6558 fi
6559 { echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
6560 echo "${ECHO_T}$ac_cv_lib_m_main" >&6; }
6561 if test $ac_cv_lib_m_main = yes; then
6562   cat >>confdefs.h <<_ACEOF
6563 #define HAVE_LIBM 1
6564 _ACEOF
6565
6566   LIBS="-lm $LIBS"
6567
6568 fi
6569
6570 { echo "$as_me:$LINENO: checking for library containing setproctitle" >&5
6571 echo $ECHO_N "checking for library containing setproctitle... $ECHO_C" >&6; }
6572 if test "${ac_cv_search_setproctitle+set}" = set; then
6573   echo $ECHO_N "(cached) $ECHO_C" >&6
6574 else
6575   ac_func_search_save_LIBS=$LIBS
6576 cat >conftest.$ac_ext <<_ACEOF
6577 /* confdefs.h.  */
6578 _ACEOF
6579 cat confdefs.h >>conftest.$ac_ext
6580 cat >>conftest.$ac_ext <<_ACEOF
6581 /* end confdefs.h.  */
6582
6583 /* Override any GCC internal prototype to avoid an error.
6584    Use char because int might match the return type of a GCC
6585    builtin and then its argument prototype would still apply.  */
6586 #ifdef __cplusplus
6587 extern "C"
6588 #endif
6589 char setproctitle ();
6590 int
6591 main ()
6592 {
6593 return setproctitle ();
6594   ;
6595   return 0;
6596 }
6597 _ACEOF
6598 for ac_lib in '' util; do
6599   if test -z "$ac_lib"; then
6600     ac_res="none required"
6601   else
6602     ac_res=-l$ac_lib
6603     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6604   fi
6605   rm -f conftest.$ac_objext conftest$ac_exeext
6606 if { (ac_try="$ac_link"
6607 case "(($ac_try" in
6608   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6609   *) ac_try_echo=$ac_try;;
6610 esac
6611 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6612   (eval "$ac_link") 2>conftest.er1
6613   ac_status=$?
6614   grep -v '^ *+' conftest.er1 >conftest.err
6615   rm -f conftest.er1
6616   cat conftest.err >&5
6617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6618   (exit $ac_status); } && {
6619          test -z "$ac_c_werror_flag" ||
6620          test ! -s conftest.err
6621        } && test -s conftest$ac_exeext &&
6622        $as_test_x conftest$ac_exeext; then
6623   ac_cv_search_setproctitle=$ac_res
6624 else
6625   echo "$as_me: failed program was:" >&5
6626 sed 's/^/| /' conftest.$ac_ext >&5
6627
6628
6629 fi
6630
6631 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6632       conftest$ac_exeext
6633   if test "${ac_cv_search_setproctitle+set}" = set; then
6634   break
6635 fi
6636 done
6637 if test "${ac_cv_search_setproctitle+set}" = set; then
6638   :
6639 else
6640   ac_cv_search_setproctitle=no
6641 fi
6642 rm conftest.$ac_ext
6643 LIBS=$ac_func_search_save_LIBS
6644 fi
6645 { echo "$as_me:$LINENO: result: $ac_cv_search_setproctitle" >&5
6646 echo "${ECHO_T}$ac_cv_search_setproctitle" >&6; }
6647 ac_res=$ac_cv_search_setproctitle
6648 if test "$ac_res" != no; then
6649   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6650
6651 fi
6652
6653 { echo "$as_me:$LINENO: checking for library containing dlopen" >&5
6654 echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6; }
6655 if test "${ac_cv_search_dlopen+set}" = set; then
6656   echo $ECHO_N "(cached) $ECHO_C" >&6
6657 else
6658   ac_func_search_save_LIBS=$LIBS
6659 cat >conftest.$ac_ext <<_ACEOF
6660 /* confdefs.h.  */
6661 _ACEOF
6662 cat confdefs.h >>conftest.$ac_ext
6663 cat >>conftest.$ac_ext <<_ACEOF
6664 /* end confdefs.h.  */
6665
6666 /* Override any GCC internal prototype to avoid an error.
6667    Use char because int might match the return type of a GCC
6668    builtin and then its argument prototype would still apply.  */
6669 #ifdef __cplusplus
6670 extern "C"
6671 #endif
6672 char dlopen ();
6673 int
6674 main ()
6675 {
6676 return dlopen ();
6677   ;
6678   return 0;
6679 }
6680 _ACEOF
6681 for ac_lib in '' dl; do
6682   if test -z "$ac_lib"; then
6683     ac_res="none required"
6684   else
6685     ac_res=-l$ac_lib
6686     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6687   fi
6688   rm -f conftest.$ac_objext conftest$ac_exeext
6689 if { (ac_try="$ac_link"
6690 case "(($ac_try" in
6691   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6692   *) ac_try_echo=$ac_try;;
6693 esac
6694 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6695   (eval "$ac_link") 2>conftest.er1
6696   ac_status=$?
6697   grep -v '^ *+' conftest.er1 >conftest.err
6698   rm -f conftest.er1
6699   cat conftest.err >&5
6700   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6701   (exit $ac_status); } && {
6702          test -z "$ac_c_werror_flag" ||
6703          test ! -s conftest.err
6704        } && test -s conftest$ac_exeext &&
6705        $as_test_x conftest$ac_exeext; then
6706   ac_cv_search_dlopen=$ac_res
6707 else
6708   echo "$as_me: failed program was:" >&5
6709 sed 's/^/| /' conftest.$ac_ext >&5
6710
6711
6712 fi
6713
6714 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6715       conftest$ac_exeext
6716   if test "${ac_cv_search_dlopen+set}" = set; then
6717   break
6718 fi
6719 done
6720 if test "${ac_cv_search_dlopen+set}" = set; then
6721   :
6722 else
6723   ac_cv_search_dlopen=no
6724 fi
6725 rm conftest.$ac_ext
6726 LIBS=$ac_func_search_save_LIBS
6727 fi
6728 { echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
6729 echo "${ECHO_T}$ac_cv_search_dlopen" >&6; }
6730 ac_res=$ac_cv_search_dlopen
6731 if test "$ac_res" != no; then
6732   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6733
6734 fi
6735
6736 { echo "$as_me:$LINENO: checking for library containing socket" >&5
6737 echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6; }
6738 if test "${ac_cv_search_socket+set}" = set; then
6739   echo $ECHO_N "(cached) $ECHO_C" >&6
6740 else
6741   ac_func_search_save_LIBS=$LIBS
6742 cat >conftest.$ac_ext <<_ACEOF
6743 /* confdefs.h.  */
6744 _ACEOF
6745 cat confdefs.h >>conftest.$ac_ext
6746 cat >>conftest.$ac_ext <<_ACEOF
6747 /* end confdefs.h.  */
6748
6749 /* Override any GCC internal prototype to avoid an error.
6750    Use char because int might match the return type of a GCC
6751    builtin and then its argument prototype would still apply.  */
6752 #ifdef __cplusplus
6753 extern "C"
6754 #endif
6755 char socket ();
6756 int
6757 main ()
6758 {
6759 return socket ();
6760   ;
6761   return 0;
6762 }
6763 _ACEOF
6764 for ac_lib in '' socket wsock32; do
6765   if test -z "$ac_lib"; then
6766     ac_res="none required"
6767   else
6768     ac_res=-l$ac_lib
6769     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6770   fi
6771   rm -f conftest.$ac_objext conftest$ac_exeext
6772 if { (ac_try="$ac_link"
6773 case "(($ac_try" in
6774   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6775   *) ac_try_echo=$ac_try;;
6776 esac
6777 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6778   (eval "$ac_link") 2>conftest.er1
6779   ac_status=$?
6780   grep -v '^ *+' conftest.er1 >conftest.err
6781   rm -f conftest.er1
6782   cat conftest.err >&5
6783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6784   (exit $ac_status); } && {
6785          test -z "$ac_c_werror_flag" ||
6786          test ! -s conftest.err
6787        } && test -s conftest$ac_exeext &&
6788        $as_test_x conftest$ac_exeext; then
6789   ac_cv_search_socket=$ac_res
6790 else
6791   echo "$as_me: failed program was:" >&5
6792 sed 's/^/| /' conftest.$ac_ext >&5
6793
6794
6795 fi
6796
6797 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6798       conftest$ac_exeext
6799   if test "${ac_cv_search_socket+set}" = set; then
6800   break
6801 fi
6802 done
6803 if test "${ac_cv_search_socket+set}" = set; then
6804   :
6805 else
6806   ac_cv_search_socket=no
6807 fi
6808 rm conftest.$ac_ext
6809 LIBS=$ac_func_search_save_LIBS
6810 fi
6811 { echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
6812 echo "${ECHO_T}$ac_cv_search_socket" >&6; }
6813 ac_res=$ac_cv_search_socket
6814 if test "$ac_res" != no; then
6815   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6816
6817 fi
6818
6819 { echo "$as_me:$LINENO: checking for library containing shl_load" >&5
6820 echo $ECHO_N "checking for library containing shl_load... $ECHO_C" >&6; }
6821 if test "${ac_cv_search_shl_load+set}" = set; then
6822   echo $ECHO_N "(cached) $ECHO_C" >&6
6823 else
6824   ac_func_search_save_LIBS=$LIBS
6825 cat >conftest.$ac_ext <<_ACEOF
6826 /* confdefs.h.  */
6827 _ACEOF
6828 cat confdefs.h >>conftest.$ac_ext
6829 cat >>conftest.$ac_ext <<_ACEOF
6830 /* end confdefs.h.  */
6831
6832 /* Override any GCC internal prototype to avoid an error.
6833    Use char because int might match the return type of a GCC
6834    builtin and then its argument prototype would still apply.  */
6835 #ifdef __cplusplus
6836 extern "C"
6837 #endif
6838 char shl_load ();
6839 int
6840 main ()
6841 {
6842 return shl_load ();
6843   ;
6844   return 0;
6845 }
6846 _ACEOF
6847 for ac_lib in '' dld; do
6848   if test -z "$ac_lib"; then
6849     ac_res="none required"
6850   else
6851     ac_res=-l$ac_lib
6852     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6853   fi
6854   rm -f conftest.$ac_objext conftest$ac_exeext
6855 if { (ac_try="$ac_link"
6856 case "(($ac_try" in
6857   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6858   *) ac_try_echo=$ac_try;;
6859 esac
6860 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6861   (eval "$ac_link") 2>conftest.er1
6862   ac_status=$?
6863   grep -v '^ *+' conftest.er1 >conftest.err
6864   rm -f conftest.er1
6865   cat conftest.err >&5
6866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6867   (exit $ac_status); } && {
6868          test -z "$ac_c_werror_flag" ||
6869          test ! -s conftest.err
6870        } && test -s conftest$ac_exeext &&
6871        $as_test_x conftest$ac_exeext; then
6872   ac_cv_search_shl_load=$ac_res
6873 else
6874   echo "$as_me: failed program was:" >&5
6875 sed 's/^/| /' conftest.$ac_ext >&5
6876
6877
6878 fi
6879
6880 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6881       conftest$ac_exeext
6882   if test "${ac_cv_search_shl_load+set}" = set; then
6883   break
6884 fi
6885 done
6886 if test "${ac_cv_search_shl_load+set}" = set; then
6887   :
6888 else
6889   ac_cv_search_shl_load=no
6890 fi
6891 rm conftest.$ac_ext
6892 LIBS=$ac_func_search_save_LIBS
6893 fi
6894 { echo "$as_me:$LINENO: result: $ac_cv_search_shl_load" >&5
6895 echo "${ECHO_T}$ac_cv_search_shl_load" >&6; }
6896 ac_res=$ac_cv_search_shl_load
6897 if test "$ac_res" != no; then
6898   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6899
6900 fi
6901
6902 # We only use libld in port/dynloader/aix.c
6903 case $host_os in
6904      aix*)
6905         { echo "$as_me:$LINENO: checking for library containing ldopen" >&5
6906 echo $ECHO_N "checking for library containing ldopen... $ECHO_C" >&6; }
6907 if test "${ac_cv_search_ldopen+set}" = set; then
6908   echo $ECHO_N "(cached) $ECHO_C" >&6
6909 else
6910   ac_func_search_save_LIBS=$LIBS
6911 cat >conftest.$ac_ext <<_ACEOF
6912 /* confdefs.h.  */
6913 _ACEOF
6914 cat confdefs.h >>conftest.$ac_ext
6915 cat >>conftest.$ac_ext <<_ACEOF
6916 /* end confdefs.h.  */
6917
6918 /* Override any GCC internal prototype to avoid an error.
6919    Use char because int might match the return type of a GCC
6920    builtin and then its argument prototype would still apply.  */
6921 #ifdef __cplusplus
6922 extern "C"
6923 #endif
6924 char ldopen ();
6925 int
6926 main ()
6927 {
6928 return ldopen ();
6929   ;
6930   return 0;
6931 }
6932 _ACEOF
6933 for ac_lib in '' ld; do
6934   if test -z "$ac_lib"; then
6935     ac_res="none required"
6936   else
6937     ac_res=-l$ac_lib
6938     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6939   fi
6940   rm -f conftest.$ac_objext conftest$ac_exeext
6941 if { (ac_try="$ac_link"
6942 case "(($ac_try" in
6943   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6944   *) ac_try_echo=$ac_try;;
6945 esac
6946 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6947   (eval "$ac_link") 2>conftest.er1
6948   ac_status=$?
6949   grep -v '^ *+' conftest.er1 >conftest.err
6950   rm -f conftest.er1
6951   cat conftest.err >&5
6952   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6953   (exit $ac_status); } && {
6954          test -z "$ac_c_werror_flag" ||
6955          test ! -s conftest.err
6956        } && test -s conftest$ac_exeext &&
6957        $as_test_x conftest$ac_exeext; then
6958   ac_cv_search_ldopen=$ac_res
6959 else
6960   echo "$as_me: failed program was:" >&5
6961 sed 's/^/| /' conftest.$ac_ext >&5
6962
6963
6964 fi
6965
6966 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6967       conftest$ac_exeext
6968   if test "${ac_cv_search_ldopen+set}" = set; then
6969   break
6970 fi
6971 done
6972 if test "${ac_cv_search_ldopen+set}" = set; then
6973   :
6974 else
6975   ac_cv_search_ldopen=no
6976 fi
6977 rm conftest.$ac_ext
6978 LIBS=$ac_func_search_save_LIBS
6979 fi
6980 { echo "$as_me:$LINENO: result: $ac_cv_search_ldopen" >&5
6981 echo "${ECHO_T}$ac_cv_search_ldopen" >&6; }
6982 ac_res=$ac_cv_search_ldopen
6983 if test "$ac_res" != no; then
6984   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6985
6986 fi
6987
6988         ;;
6989 esac
6990 { echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
6991 echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6; }
6992 if test "${ac_cv_search_getopt_long+set}" = set; then
6993   echo $ECHO_N "(cached) $ECHO_C" >&6
6994 else
6995   ac_func_search_save_LIBS=$LIBS
6996 cat >conftest.$ac_ext <<_ACEOF
6997 /* confdefs.h.  */
6998 _ACEOF
6999 cat confdefs.h >>conftest.$ac_ext
7000 cat >>conftest.$ac_ext <<_ACEOF
7001 /* end confdefs.h.  */
7002
7003 /* Override any GCC internal prototype to avoid an error.
7004    Use char because int might match the return type of a GCC
7005    builtin and then its argument prototype would still apply.  */
7006 #ifdef __cplusplus
7007 extern "C"
7008 #endif
7009 char getopt_long ();
7010 int
7011 main ()
7012 {
7013 return getopt_long ();
7014   ;
7015   return 0;
7016 }
7017 _ACEOF
7018 for ac_lib in '' getopt gnugetopt; do
7019   if test -z "$ac_lib"; then
7020     ac_res="none required"
7021   else
7022     ac_res=-l$ac_lib
7023     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7024   fi
7025   rm -f conftest.$ac_objext conftest$ac_exeext
7026 if { (ac_try="$ac_link"
7027 case "(($ac_try" in
7028   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7029   *) ac_try_echo=$ac_try;;
7030 esac
7031 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7032   (eval "$ac_link") 2>conftest.er1
7033   ac_status=$?
7034   grep -v '^ *+' conftest.er1 >conftest.err
7035   rm -f conftest.er1
7036   cat conftest.err >&5
7037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7038   (exit $ac_status); } && {
7039          test -z "$ac_c_werror_flag" ||
7040          test ! -s conftest.err
7041        } && test -s conftest$ac_exeext &&
7042        $as_test_x conftest$ac_exeext; then
7043   ac_cv_search_getopt_long=$ac_res
7044 else
7045   echo "$as_me: failed program was:" >&5
7046 sed 's/^/| /' conftest.$ac_ext >&5
7047
7048
7049 fi
7050
7051 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7052       conftest$ac_exeext
7053   if test "${ac_cv_search_getopt_long+set}" = set; then
7054   break
7055 fi
7056 done
7057 if test "${ac_cv_search_getopt_long+set}" = set; then
7058   :
7059 else
7060   ac_cv_search_getopt_long=no
7061 fi
7062 rm conftest.$ac_ext
7063 LIBS=$ac_func_search_save_LIBS
7064 fi
7065 { echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
7066 echo "${ECHO_T}$ac_cv_search_getopt_long" >&6; }
7067 ac_res=$ac_cv_search_getopt_long
7068 if test "$ac_res" != no; then
7069   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7070
7071 fi
7072
7073 { echo "$as_me:$LINENO: checking for library containing crypt" >&5
7074 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6; }
7075 if test "${ac_cv_search_crypt+set}" = set; then
7076   echo $ECHO_N "(cached) $ECHO_C" >&6
7077 else
7078   ac_func_search_save_LIBS=$LIBS
7079 cat >conftest.$ac_ext <<_ACEOF
7080 /* confdefs.h.  */
7081 _ACEOF
7082 cat confdefs.h >>conftest.$ac_ext
7083 cat >>conftest.$ac_ext <<_ACEOF
7084 /* end confdefs.h.  */
7085
7086 /* Override any GCC internal prototype to avoid an error.
7087    Use char because int might match the return type of a GCC
7088    builtin and then its argument prototype would still apply.  */
7089 #ifdef __cplusplus
7090 extern "C"
7091 #endif
7092 char crypt ();
7093 int
7094 main ()
7095 {
7096 return crypt ();
7097   ;
7098   return 0;
7099 }
7100 _ACEOF
7101 for ac_lib in '' crypt; do
7102   if test -z "$ac_lib"; then
7103     ac_res="none required"
7104   else
7105     ac_res=-l$ac_lib
7106     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7107   fi
7108   rm -f conftest.$ac_objext conftest$ac_exeext
7109 if { (ac_try="$ac_link"
7110 case "(($ac_try" in
7111   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7112   *) ac_try_echo=$ac_try;;
7113 esac
7114 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7115   (eval "$ac_link") 2>conftest.er1
7116   ac_status=$?
7117   grep -v '^ *+' conftest.er1 >conftest.err
7118   rm -f conftest.er1
7119   cat conftest.err >&5
7120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7121   (exit $ac_status); } && {
7122          test -z "$ac_c_werror_flag" ||
7123          test ! -s conftest.err
7124        } && test -s conftest$ac_exeext &&
7125        $as_test_x conftest$ac_exeext; then
7126   ac_cv_search_crypt=$ac_res
7127 else
7128   echo "$as_me: failed program was:" >&5
7129 sed 's/^/| /' conftest.$ac_ext >&5
7130
7131
7132 fi
7133
7134 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7135       conftest$ac_exeext
7136   if test "${ac_cv_search_crypt+set}" = set; then
7137   break
7138 fi
7139 done
7140 if test "${ac_cv_search_crypt+set}" = set; then
7141   :
7142 else
7143   ac_cv_search_crypt=no
7144 fi
7145 rm conftest.$ac_ext
7146 LIBS=$ac_func_search_save_LIBS
7147 fi
7148 { echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
7149 echo "${ECHO_T}$ac_cv_search_crypt" >&6; }
7150 ac_res=$ac_cv_search_crypt
7151 if test "$ac_res" != no; then
7152   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7153
7154 fi
7155
7156 # Solaris:
7157 { echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
7158 echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6; }
7159 if test "${ac_cv_search_fdatasync+set}" = set; then
7160   echo $ECHO_N "(cached) $ECHO_C" >&6
7161 else
7162   ac_func_search_save_LIBS=$LIBS
7163 cat >conftest.$ac_ext <<_ACEOF
7164 /* confdefs.h.  */
7165 _ACEOF
7166 cat confdefs.h >>conftest.$ac_ext
7167 cat >>conftest.$ac_ext <<_ACEOF
7168 /* end confdefs.h.  */
7169
7170 /* Override any GCC internal prototype to avoid an error.
7171    Use char because int might match the return type of a GCC
7172    builtin and then its argument prototype would still apply.  */
7173 #ifdef __cplusplus
7174 extern "C"
7175 #endif
7176 char fdatasync ();
7177 int
7178 main ()
7179 {
7180 return fdatasync ();
7181   ;
7182   return 0;
7183 }
7184 _ACEOF
7185 for ac_lib in '' rt posix4; do
7186   if test -z "$ac_lib"; then
7187     ac_res="none required"
7188   else
7189     ac_res=-l$ac_lib
7190     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7191   fi
7192   rm -f conftest.$ac_objext conftest$ac_exeext
7193 if { (ac_try="$ac_link"
7194 case "(($ac_try" in
7195   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7196   *) ac_try_echo=$ac_try;;
7197 esac
7198 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7199   (eval "$ac_link") 2>conftest.er1
7200   ac_status=$?
7201   grep -v '^ *+' conftest.er1 >conftest.err
7202   rm -f conftest.er1
7203   cat conftest.err >&5
7204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7205   (exit $ac_status); } && {
7206          test -z "$ac_c_werror_flag" ||
7207          test ! -s conftest.err
7208        } && test -s conftest$ac_exeext &&
7209        $as_test_x conftest$ac_exeext; then
7210   ac_cv_search_fdatasync=$ac_res
7211 else
7212   echo "$as_me: failed program was:" >&5
7213 sed 's/^/| /' conftest.$ac_ext >&5
7214
7215
7216 fi
7217
7218 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7219       conftest$ac_exeext
7220   if test "${ac_cv_search_fdatasync+set}" = set; then
7221   break
7222 fi
7223 done
7224 if test "${ac_cv_search_fdatasync+set}" = set; then
7225   :
7226 else
7227   ac_cv_search_fdatasync=no
7228 fi
7229 rm conftest.$ac_ext
7230 LIBS=$ac_func_search_save_LIBS
7231 fi
7232 { echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
7233 echo "${ECHO_T}$ac_cv_search_fdatasync" >&6; }
7234 ac_res=$ac_cv_search_fdatasync
7235 if test "$ac_res" != no; then
7236   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7237
7238 fi
7239
7240 # Cygwin:
7241 { echo "$as_me:$LINENO: checking for library containing shmget" >&5
7242 echo $ECHO_N "checking for library containing shmget... $ECHO_C" >&6; }
7243 if test "${ac_cv_search_shmget+set}" = set; then
7244   echo $ECHO_N "(cached) $ECHO_C" >&6
7245 else
7246   ac_func_search_save_LIBS=$LIBS
7247 cat >conftest.$ac_ext <<_ACEOF
7248 /* confdefs.h.  */
7249 _ACEOF
7250 cat confdefs.h >>conftest.$ac_ext
7251 cat >>conftest.$ac_ext <<_ACEOF
7252 /* end confdefs.h.  */
7253
7254 /* Override any GCC internal prototype to avoid an error.
7255    Use char because int might match the return type of a GCC
7256    builtin and then its argument prototype would still apply.  */
7257 #ifdef __cplusplus
7258 extern "C"
7259 #endif
7260 char shmget ();
7261 int
7262 main ()
7263 {
7264 return shmget ();
7265   ;
7266   return 0;
7267 }
7268 _ACEOF
7269 for ac_lib in '' cygipc; do
7270   if test -z "$ac_lib"; then
7271     ac_res="none required"
7272   else
7273     ac_res=-l$ac_lib
7274     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7275   fi
7276   rm -f conftest.$ac_objext conftest$ac_exeext
7277 if { (ac_try="$ac_link"
7278 case "(($ac_try" in
7279   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7280   *) ac_try_echo=$ac_try;;
7281 esac
7282 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7283   (eval "$ac_link") 2>conftest.er1
7284   ac_status=$?
7285   grep -v '^ *+' conftest.er1 >conftest.err
7286   rm -f conftest.er1
7287   cat conftest.err >&5
7288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7289   (exit $ac_status); } && {
7290          test -z "$ac_c_werror_flag" ||
7291          test ! -s conftest.err
7292        } && test -s conftest$ac_exeext &&
7293        $as_test_x conftest$ac_exeext; then
7294   ac_cv_search_shmget=$ac_res
7295 else
7296   echo "$as_me: failed program was:" >&5
7297 sed 's/^/| /' conftest.$ac_ext >&5
7298
7299
7300 fi
7301
7302 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7303       conftest$ac_exeext
7304   if test "${ac_cv_search_shmget+set}" = set; then
7305   break
7306 fi
7307 done
7308 if test "${ac_cv_search_shmget+set}" = set; then
7309   :
7310 else
7311   ac_cv_search_shmget=no
7312 fi
7313 rm conftest.$ac_ext
7314 LIBS=$ac_func_search_save_LIBS
7315 fi
7316 { echo "$as_me:$LINENO: result: $ac_cv_search_shmget" >&5
7317 echo "${ECHO_T}$ac_cv_search_shmget" >&6; }
7318 ac_res=$ac_cv_search_shmget
7319 if test "$ac_res" != no; then
7320   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7321
7322 fi
7323
7324
7325 if test "$with_readline" = yes; then
7326
7327
7328 if test "${pgac_cv_check_readline+set}" = set; then
7329   echo $ECHO_N "(cached) $ECHO_C" >&6
7330 else
7331   pgac_cv_check_readline=no
7332 pgac_save_LIBS=$LIBS
7333 if test x"$with_libedit_preferred" != x"yes"
7334 then    READLINE_ORDER="-lreadline -ledit"
7335 else    READLINE_ORDER="-ledit -lreadline"
7336 fi
7337 for pgac_rllib in $READLINE_ORDER ; do
7338   { echo "$as_me:$LINENO: checking for ${pgac_rllib}" >&5
7339 echo $ECHO_N "checking for ${pgac_rllib}... $ECHO_C" >&6; }
7340   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
7341     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
7342     cat >conftest.$ac_ext <<_ACEOF
7343 /* confdefs.h.  */
7344 _ACEOF
7345 cat confdefs.h >>conftest.$ac_ext
7346 cat >>conftest.$ac_ext <<_ACEOF
7347 /* end confdefs.h.  */
7348
7349 /* Override any GCC internal prototype to avoid an error.
7350    Use char because int might match the return type of a GCC
7351    builtin and then its argument prototype would still apply.  */
7352 #ifdef __cplusplus
7353 extern "C"
7354 #endif
7355 char readline ();
7356 int
7357 main ()
7358 {
7359 return readline ();
7360   ;
7361   return 0;
7362 }
7363 _ACEOF
7364 rm -f conftest.$ac_objext conftest$ac_exeext
7365 if { (ac_try="$ac_link"
7366 case "(($ac_try" in
7367   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7368   *) ac_try_echo=$ac_try;;
7369 esac
7370 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7371   (eval "$ac_link") 2>conftest.er1
7372   ac_status=$?
7373   grep -v '^ *+' conftest.er1 >conftest.err
7374   rm -f conftest.er1
7375   cat conftest.err >&5
7376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7377   (exit $ac_status); } && {
7378          test -z "$ac_c_werror_flag" ||
7379          test ! -s conftest.err
7380        } && test -s conftest$ac_exeext &&
7381        $as_test_x conftest$ac_exeext; then
7382
7383       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
7384       # recognize dependent libraries; assume curses is needed if we didn't
7385       # find any dependency.
7386       case $host_os in
7387         netbsd* | openbsd* | irix*)
7388           if test x"$pgac_lib" = x"" ; then
7389             pgac_lib=" -lcurses"
7390           fi ;;
7391       esac
7392
7393       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
7394       break
7395
7396 else
7397   echo "$as_me: failed program was:" >&5
7398 sed 's/^/| /' conftest.$ac_ext >&5
7399
7400
7401 fi
7402
7403 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7404       conftest$ac_exeext conftest.$ac_ext
7405   done
7406   if test "$pgac_cv_check_readline" != no ; then
7407     { echo "$as_me:$LINENO: result: yes ($pgac_cv_check_readline)" >&5
7408 echo "${ECHO_T}yes ($pgac_cv_check_readline)" >&6; }
7409     break
7410   else
7411     { echo "$as_me:$LINENO: result: no" >&5
7412 echo "${ECHO_T}no" >&6; }
7413   fi
7414 done
7415 LIBS=$pgac_save_LIBS
7416
7417 fi
7418
7419 if test "$pgac_cv_check_readline" != no ; then
7420   LIBS="$pgac_cv_check_readline $LIBS"
7421
7422 cat >>confdefs.h <<\_ACEOF
7423 #define HAVE_LIBREADLINE 1
7424 _ACEOF
7425
7426 fi
7427
7428
7429   if test x"$pgac_cv_check_readline" = x"no"; then
7430     { { echo "$as_me:$LINENO: error: readline library not found
7431 If you have readline already installed, see config.log for details on the
7432 failure.  It is possible the compiler isn't looking in the proper directory.
7433 Use --without-readline to disable readline support." >&5
7434 echo "$as_me: error: readline library not found
7435 If you have readline already installed, see config.log for details on the
7436 failure.  It is possible the compiler isn't looking in the proper directory.
7437 Use --without-readline to disable readline support." >&2;}
7438    { (exit 1); exit 1; }; }
7439   fi
7440 fi
7441
7442 if test "$with_zlib" = yes; then
7443
7444 { echo "$as_me:$LINENO: checking for inflate in -lz" >&5
7445 echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6; }
7446 if test "${ac_cv_lib_z_inflate+set}" = set; then
7447   echo $ECHO_N "(cached) $ECHO_C" >&6
7448 else
7449   ac_check_lib_save_LIBS=$LIBS
7450 LIBS="-lz  $LIBS"
7451 cat >conftest.$ac_ext <<_ACEOF
7452 /* confdefs.h.  */
7453 _ACEOF
7454 cat confdefs.h >>conftest.$ac_ext
7455 cat >>conftest.$ac_ext <<_ACEOF
7456 /* end confdefs.h.  */
7457
7458 /* Override any GCC internal prototype to avoid an error.
7459    Use char because int might match the return type of a GCC
7460    builtin and then its argument prototype would still apply.  */
7461 #ifdef __cplusplus
7462 extern "C"
7463 #endif
7464 char inflate ();
7465 int
7466 main ()
7467 {
7468 return inflate ();
7469   ;
7470   return 0;
7471 }
7472 _ACEOF
7473 rm -f conftest.$ac_objext conftest$ac_exeext
7474 if { (ac_try="$ac_link"
7475 case "(($ac_try" in
7476   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7477   *) ac_try_echo=$ac_try;;
7478 esac
7479 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7480   (eval "$ac_link") 2>conftest.er1
7481   ac_status=$?
7482   grep -v '^ *+' conftest.er1 >conftest.err
7483   rm -f conftest.er1
7484   cat conftest.err >&5
7485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7486   (exit $ac_status); } && {
7487          test -z "$ac_c_werror_flag" ||
7488          test ! -s conftest.err
7489        } && test -s conftest$ac_exeext &&
7490        $as_test_x conftest$ac_exeext; then
7491   ac_cv_lib_z_inflate=yes
7492 else
7493   echo "$as_me: failed program was:" >&5
7494 sed 's/^/| /' conftest.$ac_ext >&5
7495
7496         ac_cv_lib_z_inflate=no
7497 fi
7498
7499 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7500       conftest$ac_exeext conftest.$ac_ext
7501 LIBS=$ac_check_lib_save_LIBS
7502 fi
7503 { echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
7504 echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6; }
7505 if test $ac_cv_lib_z_inflate = yes; then
7506   cat >>confdefs.h <<_ACEOF
7507 #define HAVE_LIBZ 1
7508 _ACEOF
7509
7510   LIBS="-lz $LIBS"
7511
7512 else
7513   { { echo "$as_me:$LINENO: error: zlib library not found
7514 If you have zlib already installed, see config.log for details on the
7515 failure.  It is possible the compiler isn't looking in the proper directory.
7516 Use --without-zlib to disable zlib support." >&5
7517 echo "$as_me: error: zlib library not found
7518 If you have zlib already installed, see config.log for details on the
7519 failure.  It is possible the compiler isn't looking in the proper directory.
7520 Use --without-zlib to disable zlib support." >&2;}
7521    { (exit 1); exit 1; }; }
7522 fi
7523
7524 fi
7525
7526 if test "$enable_spinlocks" = yes; then
7527
7528 cat >>confdefs.h <<\_ACEOF
7529 #define HAVE_SPINLOCKS 1
7530 _ACEOF
7531
7532 else
7533   { echo "$as_me:$LINENO: WARNING:
7534 *** Not using spinlocks will cause poor performance." >&5
7535 echo "$as_me: WARNING:
7536 *** Not using spinlocks will cause poor performance." >&2;}
7537 fi
7538
7539 if test "$with_gssapi" = yes ; then
7540   if test "$PORTNAME" != "win32"; then
7541     { echo "$as_me:$LINENO: checking for library containing gss_init_sec_context" >&5
7542 echo $ECHO_N "checking for library containing gss_init_sec_context... $ECHO_C" >&6; }
7543 if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
7544   echo $ECHO_N "(cached) $ECHO_C" >&6
7545 else
7546   ac_func_search_save_LIBS=$LIBS
7547 cat >conftest.$ac_ext <<_ACEOF
7548 /* confdefs.h.  */
7549 _ACEOF
7550 cat confdefs.h >>conftest.$ac_ext
7551 cat >>conftest.$ac_ext <<_ACEOF
7552 /* end confdefs.h.  */
7553
7554 /* Override any GCC internal prototype to avoid an error.
7555    Use char because int might match the return type of a GCC
7556    builtin and then its argument prototype would still apply.  */
7557 #ifdef __cplusplus
7558 extern "C"
7559 #endif
7560 char gss_init_sec_context ();
7561 int
7562 main ()
7563 {
7564 return gss_init_sec_context ();
7565   ;
7566   return 0;
7567 }
7568 _ACEOF
7569 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
7570   if test -z "$ac_lib"; then
7571     ac_res="none required"
7572   else
7573     ac_res=-l$ac_lib
7574     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7575   fi
7576   rm -f conftest.$ac_objext conftest$ac_exeext
7577 if { (ac_try="$ac_link"
7578 case "(($ac_try" in
7579   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7580   *) ac_try_echo=$ac_try;;
7581 esac
7582 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7583   (eval "$ac_link") 2>conftest.er1
7584   ac_status=$?
7585   grep -v '^ *+' conftest.er1 >conftest.err
7586   rm -f conftest.er1
7587   cat conftest.err >&5
7588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7589   (exit $ac_status); } && {
7590          test -z "$ac_c_werror_flag" ||
7591          test ! -s conftest.err
7592        } && test -s conftest$ac_exeext &&
7593        $as_test_x conftest$ac_exeext; then
7594   ac_cv_search_gss_init_sec_context=$ac_res
7595 else
7596   echo "$as_me: failed program was:" >&5
7597 sed 's/^/| /' conftest.$ac_ext >&5
7598
7599
7600 fi
7601
7602 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7603       conftest$ac_exeext
7604   if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
7605   break
7606 fi
7607 done
7608 if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
7609   :
7610 else
7611   ac_cv_search_gss_init_sec_context=no
7612 fi
7613 rm conftest.$ac_ext
7614 LIBS=$ac_func_search_save_LIBS
7615 fi
7616 { echo "$as_me:$LINENO: result: $ac_cv_search_gss_init_sec_context" >&5
7617 echo "${ECHO_T}$ac_cv_search_gss_init_sec_context" >&6; }
7618 ac_res=$ac_cv_search_gss_init_sec_context
7619 if test "$ac_res" != no; then
7620   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7621
7622 else
7623   { { echo "$as_me:$LINENO: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&5
7624 echo "$as_me: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&2;}
7625    { (exit 1); exit 1; }; }
7626 fi
7627
7628   else
7629     LIBS="$LIBS -lgssapi32"
7630   fi
7631 fi
7632
7633 if test "$with_krb5" = yes ; then
7634   if test "$PORTNAME" != "win32"; then
7635      { echo "$as_me:$LINENO: checking for library containing com_err" >&5
7636 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6; }
7637 if test "${ac_cv_search_com_err+set}" = set; then
7638   echo $ECHO_N "(cached) $ECHO_C" >&6
7639 else
7640   ac_func_search_save_LIBS=$LIBS
7641 cat >conftest.$ac_ext <<_ACEOF
7642 /* confdefs.h.  */
7643 _ACEOF
7644 cat confdefs.h >>conftest.$ac_ext
7645 cat >>conftest.$ac_ext <<_ACEOF
7646 /* end confdefs.h.  */
7647
7648 /* Override any GCC internal prototype to avoid an error.
7649    Use char because int might match the return type of a GCC
7650    builtin and then its argument prototype would still apply.  */
7651 #ifdef __cplusplus
7652 extern "C"
7653 #endif
7654 char com_err ();
7655 int
7656 main ()
7657 {
7658 return com_err ();
7659   ;
7660   return 0;
7661 }
7662 _ACEOF
7663 for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' com_err; do
7664   if test -z "$ac_lib"; then
7665     ac_res="none required"
7666   else
7667     ac_res=-l$ac_lib
7668     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7669   fi
7670   rm -f conftest.$ac_objext conftest$ac_exeext
7671 if { (ac_try="$ac_link"
7672 case "(($ac_try" in
7673   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7674   *) ac_try_echo=$ac_try;;
7675 esac
7676 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7677   (eval "$ac_link") 2>conftest.er1
7678   ac_status=$?
7679   grep -v '^ *+' conftest.er1 >conftest.err
7680   rm -f conftest.er1
7681   cat conftest.err >&5
7682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7683   (exit $ac_status); } && {
7684          test -z "$ac_c_werror_flag" ||
7685          test ! -s conftest.err
7686        } && test -s conftest$ac_exeext &&
7687        $as_test_x conftest$ac_exeext; then
7688   ac_cv_search_com_err=$ac_res
7689 else
7690   echo "$as_me: failed program was:" >&5
7691 sed 's/^/| /' conftest.$ac_ext >&5
7692
7693
7694 fi
7695
7696 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7697       conftest$ac_exeext
7698   if test "${ac_cv_search_com_err+set}" = set; then
7699   break
7700 fi
7701 done
7702 if test "${ac_cv_search_com_err+set}" = set; then
7703   :
7704 else
7705   ac_cv_search_com_err=no
7706 fi
7707 rm conftest.$ac_ext
7708 LIBS=$ac_func_search_save_LIBS
7709 fi
7710 { echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
7711 echo "${ECHO_T}$ac_cv_search_com_err" >&6; }
7712 ac_res=$ac_cv_search_com_err
7713 if test "$ac_res" != no; then
7714   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7715
7716 else
7717   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
7718 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
7719    { (exit 1); exit 1; }; }
7720 fi
7721
7722      { echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
7723 echo $ECHO_N "checking for library containing krb5_sendauth... $ECHO_C" >&6; }
7724 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
7725   echo $ECHO_N "(cached) $ECHO_C" >&6
7726 else
7727   ac_func_search_save_LIBS=$LIBS
7728 cat >conftest.$ac_ext <<_ACEOF
7729 /* confdefs.h.  */
7730 _ACEOF
7731 cat confdefs.h >>conftest.$ac_ext
7732 cat >>conftest.$ac_ext <<_ACEOF
7733 /* end confdefs.h.  */
7734
7735 /* Override any GCC internal prototype to avoid an error.
7736    Use char because int might match the return type of a GCC
7737    builtin and then its argument prototype would still apply.  */
7738 #ifdef __cplusplus
7739 extern "C"
7740 #endif
7741 char krb5_sendauth ();
7742 int
7743 main ()
7744 {
7745 return krb5_sendauth ();
7746   ;
7747   return 0;
7748 }
7749 _ACEOF
7750 for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'; do
7751   if test -z "$ac_lib"; then
7752     ac_res="none required"
7753   else
7754     ac_res=-l$ac_lib
7755     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7756   fi
7757   rm -f conftest.$ac_objext conftest$ac_exeext
7758 if { (ac_try="$ac_link"
7759 case "(($ac_try" in
7760   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7761   *) ac_try_echo=$ac_try;;
7762 esac
7763 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7764   (eval "$ac_link") 2>conftest.er1
7765   ac_status=$?
7766   grep -v '^ *+' conftest.er1 >conftest.err
7767   rm -f conftest.er1
7768   cat conftest.err >&5
7769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7770   (exit $ac_status); } && {
7771          test -z "$ac_c_werror_flag" ||
7772          test ! -s conftest.err
7773        } && test -s conftest$ac_exeext &&
7774        $as_test_x conftest$ac_exeext; then
7775   ac_cv_search_krb5_sendauth=$ac_res
7776 else
7777   echo "$as_me: failed program was:" >&5
7778 sed 's/^/| /' conftest.$ac_ext >&5
7779
7780
7781 fi
7782
7783 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7784       conftest$ac_exeext
7785   if test "${ac_cv_search_krb5_sendauth+set}" = set; then
7786   break
7787 fi
7788 done
7789 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
7790   :
7791 else
7792   ac_cv_search_krb5_sendauth=no
7793 fi
7794 rm conftest.$ac_ext
7795 LIBS=$ac_func_search_save_LIBS
7796 fi
7797 { echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
7798 echo "${ECHO_T}$ac_cv_search_krb5_sendauth" >&6; }
7799 ac_res=$ac_cv_search_krb5_sendauth
7800 if test "$ac_res" != no; then
7801   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7802
7803 else
7804   { { echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
7805 echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
7806    { (exit 1); exit 1; }; }
7807 fi
7808
7809   else
7810      { echo "$as_me:$LINENO: checking for library containing com_err" >&5
7811 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6; }
7812 if test "${ac_cv_search_com_err+set}" = set; then
7813   echo $ECHO_N "(cached) $ECHO_C" >&6
7814 else
7815   ac_func_search_save_LIBS=$LIBS
7816 cat >conftest.$ac_ext <<_ACEOF
7817 /* confdefs.h.  */
7818 _ACEOF
7819 cat confdefs.h >>conftest.$ac_ext
7820 cat >>conftest.$ac_ext <<_ACEOF
7821 /* end confdefs.h.  */
7822
7823 /* Override any GCC internal prototype to avoid an error.
7824    Use char because int might match the return type of a GCC
7825    builtin and then its argument prototype would still apply.  */
7826 #ifdef __cplusplus
7827 extern "C"
7828 #endif
7829 char com_err ();
7830 int
7831 main ()
7832 {
7833 return com_err ();
7834   ;
7835   return 0;
7836 }
7837 _ACEOF
7838 for ac_lib in '' 'comerr32 -lkrb5_32'; do
7839   if test -z "$ac_lib"; then
7840     ac_res="none required"
7841   else
7842     ac_res=-l$ac_lib
7843     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7844   fi
7845   rm -f conftest.$ac_objext conftest$ac_exeext
7846 if { (ac_try="$ac_link"
7847 case "(($ac_try" in
7848   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7849   *) ac_try_echo=$ac_try;;
7850 esac
7851 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7852   (eval "$ac_link") 2>conftest.er1
7853   ac_status=$?
7854   grep -v '^ *+' conftest.er1 >conftest.err
7855   rm -f conftest.er1
7856   cat conftest.err >&5
7857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7858   (exit $ac_status); } && {
7859          test -z "$ac_c_werror_flag" ||
7860          test ! -s conftest.err
7861        } && test -s conftest$ac_exeext &&
7862        $as_test_x conftest$ac_exeext; then
7863   ac_cv_search_com_err=$ac_res
7864 else
7865   echo "$as_me: failed program was:" >&5
7866 sed 's/^/| /' conftest.$ac_ext >&5
7867
7868
7869 fi
7870
7871 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7872       conftest$ac_exeext
7873   if test "${ac_cv_search_com_err+set}" = set; then
7874   break
7875 fi
7876 done
7877 if test "${ac_cv_search_com_err+set}" = set; then
7878   :
7879 else
7880   ac_cv_search_com_err=no
7881 fi
7882 rm conftest.$ac_ext
7883 LIBS=$ac_func_search_save_LIBS
7884 fi
7885 { echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
7886 echo "${ECHO_T}$ac_cv_search_com_err" >&6; }
7887 ac_res=$ac_cv_search_com_err
7888 if test "$ac_res" != no; then
7889   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7890
7891 else
7892   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
7893 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
7894    { (exit 1); exit 1; }; }
7895 fi
7896
7897   fi
7898 fi
7899
7900 if test "$with_openssl" = yes ; then
7901     if test "$PORTNAME" != "win32"; then
7902
7903 { echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
7904 echo $ECHO_N "checking for CRYPTO_new_ex_data in -lcrypto... $ECHO_C" >&6; }
7905 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
7906   echo $ECHO_N "(cached) $ECHO_C" >&6
7907 else
7908   ac_check_lib_save_LIBS=$LIBS
7909 LIBS="-lcrypto  $LIBS"
7910 cat >conftest.$ac_ext <<_ACEOF
7911 /* confdefs.h.  */
7912 _ACEOF
7913 cat confdefs.h >>conftest.$ac_ext
7914 cat >>conftest.$ac_ext <<_ACEOF
7915 /* end confdefs.h.  */
7916
7917 /* Override any GCC internal prototype to avoid an error.
7918    Use char because int might match the return type of a GCC
7919    builtin and then its argument prototype would still apply.  */
7920 #ifdef __cplusplus
7921 extern "C"
7922 #endif
7923 char CRYPTO_new_ex_data ();
7924 int
7925 main ()
7926 {
7927 return CRYPTO_new_ex_data ();
7928   ;
7929   return 0;
7930 }
7931 _ACEOF
7932 rm -f conftest.$ac_objext conftest$ac_exeext
7933 if { (ac_try="$ac_link"
7934 case "(($ac_try" in
7935   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7936   *) ac_try_echo=$ac_try;;
7937 esac
7938 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7939   (eval "$ac_link") 2>conftest.er1
7940   ac_status=$?
7941   grep -v '^ *+' conftest.er1 >conftest.err
7942   rm -f conftest.er1
7943   cat conftest.err >&5
7944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7945   (exit $ac_status); } && {
7946          test -z "$ac_c_werror_flag" ||
7947          test ! -s conftest.err
7948        } && test -s conftest$ac_exeext &&
7949        $as_test_x conftest$ac_exeext; then
7950   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
7951 else
7952   echo "$as_me: failed program was:" >&5
7953 sed 's/^/| /' conftest.$ac_ext >&5
7954
7955         ac_cv_lib_crypto_CRYPTO_new_ex_data=no
7956 fi
7957
7958 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7959       conftest$ac_exeext conftest.$ac_ext
7960 LIBS=$ac_check_lib_save_LIBS
7961 fi
7962 { echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
7963 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
7964 if test $ac_cv_lib_crypto_CRYPTO_new_ex_data = yes; then
7965   cat >>confdefs.h <<_ACEOF
7966 #define HAVE_LIBCRYPTO 1
7967 _ACEOF
7968
7969   LIBS="-lcrypto $LIBS"
7970
7971 else
7972   { { echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
7973 echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
7974    { (exit 1); exit 1; }; }
7975 fi
7976
7977
7978 { echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
7979 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6; }
7980 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
7981   echo $ECHO_N "(cached) $ECHO_C" >&6
7982 else
7983   ac_check_lib_save_LIBS=$LIBS
7984 LIBS="-lssl  $LIBS"
7985 cat >conftest.$ac_ext <<_ACEOF
7986 /* confdefs.h.  */
7987 _ACEOF
7988 cat confdefs.h >>conftest.$ac_ext
7989 cat >>conftest.$ac_ext <<_ACEOF
7990 /* end confdefs.h.  */
7991
7992 /* Override any GCC internal prototype to avoid an error.
7993    Use char because int might match the return type of a GCC
7994    builtin and then its argument prototype would still apply.  */
7995 #ifdef __cplusplus
7996 extern "C"
7997 #endif
7998 char SSL_library_init ();
7999 int
8000 main ()
8001 {
8002 return SSL_library_init ();
8003   ;
8004   return 0;
8005 }
8006 _ACEOF
8007 rm -f conftest.$ac_objext conftest$ac_exeext
8008 if { (ac_try="$ac_link"
8009 case "(($ac_try" in
8010   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8011   *) ac_try_echo=$ac_try;;
8012 esac
8013 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8014   (eval "$ac_link") 2>conftest.er1
8015   ac_status=$?
8016   grep -v '^ *+' conftest.er1 >conftest.err
8017   rm -f conftest.er1
8018   cat conftest.err >&5
8019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8020   (exit $ac_status); } && {
8021          test -z "$ac_c_werror_flag" ||
8022          test ! -s conftest.err
8023        } && test -s conftest$ac_exeext &&
8024        $as_test_x conftest$ac_exeext; then
8025   ac_cv_lib_ssl_SSL_library_init=yes
8026 else
8027   echo "$as_me: failed program was:" >&5
8028 sed 's/^/| /' conftest.$ac_ext >&5
8029
8030         ac_cv_lib_ssl_SSL_library_init=no
8031 fi
8032
8033 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8034       conftest$ac_exeext conftest.$ac_ext
8035 LIBS=$ac_check_lib_save_LIBS
8036 fi
8037 { echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
8038 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6; }
8039 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
8040   cat >>confdefs.h <<_ACEOF
8041 #define HAVE_LIBSSL 1
8042 _ACEOF
8043
8044   LIBS="-lssl $LIBS"
8045
8046 else
8047   { { echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
8048 echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
8049    { (exit 1); exit 1; }; }
8050 fi
8051
8052   else
8053
8054 { echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -leay32" >&5
8055 echo $ECHO_N "checking for CRYPTO_new_ex_data in -leay32... $ECHO_C" >&6; }
8056 if test "${ac_cv_lib_eay32_CRYPTO_new_ex_data+set}" = set; then
8057   echo $ECHO_N "(cached) $ECHO_C" >&6
8058 else
8059   ac_check_lib_save_LIBS=$LIBS
8060 LIBS="-leay32  $LIBS"
8061 cat >conftest.$ac_ext <<_ACEOF
8062 /* confdefs.h.  */
8063 _ACEOF
8064 cat confdefs.h >>conftest.$ac_ext
8065 cat >>conftest.$ac_ext <<_ACEOF
8066 /* end confdefs.h.  */
8067
8068 /* Override any GCC internal prototype to avoid an error.
8069    Use char because int might match the return type of a GCC
8070    builtin and then its argument prototype would still apply.  */
8071 #ifdef __cplusplus
8072 extern "C"
8073 #endif
8074 char CRYPTO_new_ex_data ();
8075 int
8076 main ()
8077 {
8078 return CRYPTO_new_ex_data ();
8079   ;
8080   return 0;
8081 }
8082 _ACEOF
8083 rm -f conftest.$ac_objext conftest$ac_exeext
8084 if { (ac_try="$ac_link"
8085 case "(($ac_try" in
8086   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8087   *) ac_try_echo=$ac_try;;
8088 esac
8089 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8090   (eval "$ac_link") 2>conftest.er1
8091   ac_status=$?
8092   grep -v '^ *+' conftest.er1 >conftest.err
8093   rm -f conftest.er1
8094   cat conftest.err >&5
8095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8096   (exit $ac_status); } && {
8097          test -z "$ac_c_werror_flag" ||
8098          test ! -s conftest.err
8099        } && test -s conftest$ac_exeext &&
8100        $as_test_x conftest$ac_exeext; then
8101   ac_cv_lib_eay32_CRYPTO_new_ex_data=yes
8102 else
8103   echo "$as_me: failed program was:" >&5
8104 sed 's/^/| /' conftest.$ac_ext >&5
8105
8106         ac_cv_lib_eay32_CRYPTO_new_ex_data=no
8107 fi
8108
8109 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8110       conftest$ac_exeext conftest.$ac_ext
8111 LIBS=$ac_check_lib_save_LIBS
8112 fi
8113 { echo "$as_me:$LINENO: result: $ac_cv_lib_eay32_CRYPTO_new_ex_data" >&5
8114 echo "${ECHO_T}$ac_cv_lib_eay32_CRYPTO_new_ex_data" >&6; }
8115 if test $ac_cv_lib_eay32_CRYPTO_new_ex_data = yes; then
8116   cat >>confdefs.h <<_ACEOF
8117 #define HAVE_LIBEAY32 1
8118 _ACEOF
8119
8120   LIBS="-leay32 $LIBS"
8121
8122 else
8123   { { echo "$as_me:$LINENO: error: library 'eay32' is required for OpenSSL" >&5
8124 echo "$as_me: error: library 'eay32' is required for OpenSSL" >&2;}
8125    { (exit 1); exit 1; }; }
8126 fi
8127
8128
8129 { echo "$as_me:$LINENO: checking for SSL_library_init in -lssleay32" >&5
8130 echo $ECHO_N "checking for SSL_library_init in -lssleay32... $ECHO_C" >&6; }
8131 if test "${ac_cv_lib_ssleay32_SSL_library_init+set}" = set; then
8132   echo $ECHO_N "(cached) $ECHO_C" >&6
8133 else
8134   ac_check_lib_save_LIBS=$LIBS
8135 LIBS="-lssleay32  $LIBS"
8136 cat >conftest.$ac_ext <<_ACEOF
8137 /* confdefs.h.  */
8138 _ACEOF
8139 cat confdefs.h >>conftest.$ac_ext
8140 cat >>conftest.$ac_ext <<_ACEOF
8141 /* end confdefs.h.  */
8142
8143 /* Override any GCC internal prototype to avoid an error.
8144    Use char because int might match the return type of a GCC
8145    builtin and then its argument prototype would still apply.  */
8146 #ifdef __cplusplus
8147 extern "C"
8148 #endif
8149 char SSL_library_init ();
8150 int
8151 main ()
8152 {
8153 return SSL_library_init ();
8154   ;
8155   return 0;
8156 }
8157 _ACEOF
8158 rm -f conftest.$ac_objext conftest$ac_exeext
8159 if { (ac_try="$ac_link"
8160 case "(($ac_try" in
8161   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8162   *) ac_try_echo=$ac_try;;
8163 esac
8164 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8165   (eval "$ac_link") 2>conftest.er1
8166   ac_status=$?
8167   grep -v '^ *+' conftest.er1 >conftest.err
8168   rm -f conftest.er1
8169   cat conftest.err >&5
8170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8171   (exit $ac_status); } && {
8172          test -z "$ac_c_werror_flag" ||
8173          test ! -s conftest.err
8174        } && test -s conftest$ac_exeext &&
8175        $as_test_x conftest$ac_exeext; then
8176   ac_cv_lib_ssleay32_SSL_library_init=yes
8177 else
8178   echo "$as_me: failed program was:" >&5
8179 sed 's/^/| /' conftest.$ac_ext >&5
8180
8181         ac_cv_lib_ssleay32_SSL_library_init=no
8182 fi
8183
8184 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8185       conftest$ac_exeext conftest.$ac_ext
8186 LIBS=$ac_check_lib_save_LIBS
8187 fi
8188 { echo "$as_me:$LINENO: result: $ac_cv_lib_ssleay32_SSL_library_init" >&5
8189 echo "${ECHO_T}$ac_cv_lib_ssleay32_SSL_library_init" >&6; }
8190 if test $ac_cv_lib_ssleay32_SSL_library_init = yes; then
8191   cat >>confdefs.h <<_ACEOF
8192 #define HAVE_LIBSSLEAY32 1
8193 _ACEOF
8194
8195   LIBS="-lssleay32 $LIBS"
8196
8197 else
8198   { { echo "$as_me:$LINENO: error: library 'ssleay32' is required for OpenSSL" >&5
8199 echo "$as_me: error: library 'ssleay32' is required for OpenSSL" >&2;}
8200    { (exit 1); exit 1; }; }
8201 fi
8202
8203   fi
8204 fi
8205
8206 if test "$with_pam" = yes ; then
8207
8208 { echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
8209 echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6; }
8210 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
8211   echo $ECHO_N "(cached) $ECHO_C" >&6
8212 else
8213   ac_check_lib_save_LIBS=$LIBS
8214 LIBS="-lpam  $LIBS"
8215 cat >conftest.$ac_ext <<_ACEOF
8216 /* confdefs.h.  */
8217 _ACEOF
8218 cat confdefs.h >>conftest.$ac_ext
8219 cat >>conftest.$ac_ext <<_ACEOF
8220 /* end confdefs.h.  */
8221
8222 /* Override any GCC internal prototype to avoid an error.
8223    Use char because int might match the return type of a GCC
8224    builtin and then its argument prototype would still apply.  */
8225 #ifdef __cplusplus
8226 extern "C"
8227 #endif
8228 char pam_start ();
8229 int
8230 main ()
8231 {
8232 return pam_start ();
8233   ;
8234   return 0;
8235 }
8236 _ACEOF
8237 rm -f conftest.$ac_objext conftest$ac_exeext
8238 if { (ac_try="$ac_link"
8239 case "(($ac_try" in
8240   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8241   *) ac_try_echo=$ac_try;;
8242 esac
8243 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8244   (eval "$ac_link") 2>conftest.er1
8245   ac_status=$?
8246   grep -v '^ *+' conftest.er1 >conftest.err
8247   rm -f conftest.er1
8248   cat conftest.err >&5
8249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8250   (exit $ac_status); } && {
8251          test -z "$ac_c_werror_flag" ||
8252          test ! -s conftest.err
8253        } && test -s conftest$ac_exeext &&
8254        $as_test_x conftest$ac_exeext; then
8255   ac_cv_lib_pam_pam_start=yes
8256 else
8257   echo "$as_me: failed program was:" >&5
8258 sed 's/^/| /' conftest.$ac_ext >&5
8259
8260         ac_cv_lib_pam_pam_start=no
8261 fi
8262
8263 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8264       conftest$ac_exeext conftest.$ac_ext
8265 LIBS=$ac_check_lib_save_LIBS
8266 fi
8267 { echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
8268 echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6; }
8269 if test $ac_cv_lib_pam_pam_start = yes; then
8270   cat >>confdefs.h <<_ACEOF
8271 #define HAVE_LIBPAM 1
8272 _ACEOF
8273
8274   LIBS="-lpam $LIBS"
8275
8276 else
8277   { { echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
8278 echo "$as_me: error: library 'pam' is required for PAM" >&2;}
8279    { (exit 1); exit 1; }; }
8280 fi
8281
8282 fi
8283
8284 if test "$with_libxml" = yes ; then
8285
8286 { echo "$as_me:$LINENO: checking for xmlSaveToBuffer in -lxml2" >&5
8287 echo $ECHO_N "checking for xmlSaveToBuffer in -lxml2... $ECHO_C" >&6; }
8288 if test "${ac_cv_lib_xml2_xmlSaveToBuffer+set}" = set; then
8289   echo $ECHO_N "(cached) $ECHO_C" >&6
8290 else
8291   ac_check_lib_save_LIBS=$LIBS
8292 LIBS="-lxml2  $LIBS"
8293 cat >conftest.$ac_ext <<_ACEOF
8294 /* confdefs.h.  */
8295 _ACEOF
8296 cat confdefs.h >>conftest.$ac_ext
8297 cat >>conftest.$ac_ext <<_ACEOF
8298 /* end confdefs.h.  */
8299
8300 /* Override any GCC internal prototype to avoid an error.
8301    Use char because int might match the return type of a GCC
8302    builtin and then its argument prototype would still apply.  */
8303 #ifdef __cplusplus
8304 extern "C"
8305 #endif
8306 char xmlSaveToBuffer ();
8307 int
8308 main ()
8309 {
8310 return xmlSaveToBuffer ();
8311   ;
8312   return 0;
8313 }
8314 _ACEOF
8315 rm -f conftest.$ac_objext conftest$ac_exeext
8316 if { (ac_try="$ac_link"
8317 case "(($ac_try" in
8318   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8319   *) ac_try_echo=$ac_try;;
8320 esac
8321 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8322   (eval "$ac_link") 2>conftest.er1
8323   ac_status=$?
8324   grep -v '^ *+' conftest.er1 >conftest.err
8325   rm -f conftest.er1
8326   cat conftest.err >&5
8327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8328   (exit $ac_status); } && {
8329          test -z "$ac_c_werror_flag" ||
8330          test ! -s conftest.err
8331        } && test -s conftest$ac_exeext &&
8332        $as_test_x conftest$ac_exeext; then
8333   ac_cv_lib_xml2_xmlSaveToBuffer=yes
8334 else
8335   echo "$as_me: failed program was:" >&5
8336 sed 's/^/| /' conftest.$ac_ext >&5
8337
8338         ac_cv_lib_xml2_xmlSaveToBuffer=no
8339 fi
8340
8341 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8342       conftest$ac_exeext conftest.$ac_ext
8343 LIBS=$ac_check_lib_save_LIBS
8344 fi
8345 { echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
8346 echo "${ECHO_T}$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
8347 if test $ac_cv_lib_xml2_xmlSaveToBuffer = yes; then
8348   cat >>confdefs.h <<_ACEOF
8349 #define HAVE_LIBXML2 1
8350 _ACEOF
8351
8352   LIBS="-lxml2 $LIBS"
8353
8354 else
8355   { { echo "$as_me:$LINENO: error: library 'xml2' (version >= 2.6.23) is required for XML support" >&5
8356 echo "$as_me: error: library 'xml2' (version >= 2.6.23) is required for XML support" >&2;}
8357    { (exit 1); exit 1; }; }
8358 fi
8359
8360 fi
8361
8362 if test "$with_libxslt" = yes ; then
8363
8364 { echo "$as_me:$LINENO: checking for xsltCleanupGlobals in -lxslt" >&5
8365 echo $ECHO_N "checking for xsltCleanupGlobals in -lxslt... $ECHO_C" >&6; }
8366 if test "${ac_cv_lib_xslt_xsltCleanupGlobals+set}" = set; then
8367   echo $ECHO_N "(cached) $ECHO_C" >&6
8368 else
8369   ac_check_lib_save_LIBS=$LIBS
8370 LIBS="-lxslt  $LIBS"
8371 cat >conftest.$ac_ext <<_ACEOF
8372 /* confdefs.h.  */
8373 _ACEOF
8374 cat confdefs.h >>conftest.$ac_ext
8375 cat >>conftest.$ac_ext <<_ACEOF
8376 /* end confdefs.h.  */
8377
8378 /* Override any GCC internal prototype to avoid an error.
8379    Use char because int might match the return type of a GCC
8380    builtin and then its argument prototype would still apply.  */
8381 #ifdef __cplusplus
8382 extern "C"
8383 #endif
8384 char xsltCleanupGlobals ();
8385 int
8386 main ()
8387 {
8388 return xsltCleanupGlobals ();
8389   ;
8390   return 0;
8391 }
8392 _ACEOF
8393 rm -f conftest.$ac_objext conftest$ac_exeext
8394 if { (ac_try="$ac_link"
8395 case "(($ac_try" in
8396   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8397   *) ac_try_echo=$ac_try;;
8398 esac
8399 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8400   (eval "$ac_link") 2>conftest.er1
8401   ac_status=$?
8402   grep -v '^ *+' conftest.er1 >conftest.err
8403   rm -f conftest.er1
8404   cat conftest.err >&5
8405   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8406   (exit $ac_status); } && {
8407          test -z "$ac_c_werror_flag" ||
8408          test ! -s conftest.err
8409        } && test -s conftest$ac_exeext &&
8410        $as_test_x conftest$ac_exeext; then
8411   ac_cv_lib_xslt_xsltCleanupGlobals=yes
8412 else
8413   echo "$as_me: failed program was:" >&5
8414 sed 's/^/| /' conftest.$ac_ext >&5
8415
8416         ac_cv_lib_xslt_xsltCleanupGlobals=no
8417 fi
8418
8419 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8420       conftest$ac_exeext conftest.$ac_ext
8421 LIBS=$ac_check_lib_save_LIBS
8422 fi
8423 { echo "$as_me:$LINENO: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
8424 echo "${ECHO_T}$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
8425 if test $ac_cv_lib_xslt_xsltCleanupGlobals = yes; then
8426   cat >>confdefs.h <<_ACEOF
8427 #define HAVE_LIBXSLT 1
8428 _ACEOF
8429
8430   LIBS="-lxslt $LIBS"
8431
8432 else
8433   { { echo "$as_me:$LINENO: error: library 'xslt' is required for XSLT support" >&5
8434 echo "$as_me: error: library 'xslt' is required for XSLT support" >&2;}
8435    { (exit 1); exit 1; }; }
8436 fi
8437
8438 fi
8439
8440 # for contrib/uuid-ossp
8441 if test "$with_ossp_uuid" = yes ; then
8442   { echo "$as_me:$LINENO: checking for uuid_export in -lossp-uuid" >&5
8443 echo $ECHO_N "checking for uuid_export in -lossp-uuid... $ECHO_C" >&6; }
8444 if test "${ac_cv_lib_ossp_uuid_uuid_export+set}" = set; then
8445   echo $ECHO_N "(cached) $ECHO_C" >&6
8446 else
8447   ac_check_lib_save_LIBS=$LIBS
8448 LIBS="-lossp-uuid  $LIBS"
8449 cat >conftest.$ac_ext <<_ACEOF
8450 /* confdefs.h.  */
8451 _ACEOF
8452 cat confdefs.h >>conftest.$ac_ext
8453 cat >>conftest.$ac_ext <<_ACEOF
8454 /* end confdefs.h.  */
8455
8456 /* Override any GCC internal prototype to avoid an error.
8457    Use char because int might match the return type of a GCC
8458    builtin and then its argument prototype would still apply.  */
8459 #ifdef __cplusplus
8460 extern "C"
8461 #endif
8462 char uuid_export ();
8463 int
8464 main ()
8465 {
8466 return uuid_export ();
8467   ;
8468   return 0;
8469 }
8470 _ACEOF
8471 rm -f conftest.$ac_objext conftest$ac_exeext
8472 if { (ac_try="$ac_link"
8473 case "(($ac_try" in
8474   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8475   *) ac_try_echo=$ac_try;;
8476 esac
8477 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8478   (eval "$ac_link") 2>conftest.er1
8479   ac_status=$?
8480   grep -v '^ *+' conftest.er1 >conftest.err
8481   rm -f conftest.er1
8482   cat conftest.err >&5
8483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8484   (exit $ac_status); } && {
8485          test -z "$ac_c_werror_flag" ||
8486          test ! -s conftest.err
8487        } && test -s conftest$ac_exeext &&
8488        $as_test_x conftest$ac_exeext; then
8489   ac_cv_lib_ossp_uuid_uuid_export=yes
8490 else
8491   echo "$as_me: failed program was:" >&5
8492 sed 's/^/| /' conftest.$ac_ext >&5
8493
8494         ac_cv_lib_ossp_uuid_uuid_export=no
8495 fi
8496
8497 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8498       conftest$ac_exeext conftest.$ac_ext
8499 LIBS=$ac_check_lib_save_LIBS
8500 fi
8501 { echo "$as_me:$LINENO: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
8502 echo "${ECHO_T}$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
8503 if test $ac_cv_lib_ossp_uuid_uuid_export = yes; then
8504   OSSP_UUID_LIBS="-lossp-uuid"
8505 else
8506   { echo "$as_me:$LINENO: checking for uuid_export in -luuid" >&5
8507 echo $ECHO_N "checking for uuid_export in -luuid... $ECHO_C" >&6; }
8508 if test "${ac_cv_lib_uuid_uuid_export+set}" = set; then
8509   echo $ECHO_N "(cached) $ECHO_C" >&6
8510 else
8511   ac_check_lib_save_LIBS=$LIBS
8512 LIBS="-luuid  $LIBS"
8513 cat >conftest.$ac_ext <<_ACEOF
8514 /* confdefs.h.  */
8515 _ACEOF
8516 cat confdefs.h >>conftest.$ac_ext
8517 cat >>conftest.$ac_ext <<_ACEOF
8518 /* end confdefs.h.  */
8519
8520 /* Override any GCC internal prototype to avoid an error.
8521    Use char because int might match the return type of a GCC
8522    builtin and then its argument prototype would still apply.  */
8523 #ifdef __cplusplus
8524 extern "C"
8525 #endif
8526 char uuid_export ();
8527 int
8528 main ()
8529 {
8530 return uuid_export ();
8531   ;
8532   return 0;
8533 }
8534 _ACEOF
8535 rm -f conftest.$ac_objext conftest$ac_exeext
8536 if { (ac_try="$ac_link"
8537 case "(($ac_try" in
8538   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8539   *) ac_try_echo=$ac_try;;
8540 esac
8541 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8542   (eval "$ac_link") 2>conftest.er1
8543   ac_status=$?
8544   grep -v '^ *+' conftest.er1 >conftest.err
8545   rm -f conftest.er1
8546   cat conftest.err >&5
8547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8548   (exit $ac_status); } && {
8549          test -z "$ac_c_werror_flag" ||
8550          test ! -s conftest.err
8551        } && test -s conftest$ac_exeext &&
8552        $as_test_x conftest$ac_exeext; then
8553   ac_cv_lib_uuid_uuid_export=yes
8554 else
8555   echo "$as_me: failed program was:" >&5
8556 sed 's/^/| /' conftest.$ac_ext >&5
8557
8558         ac_cv_lib_uuid_uuid_export=no
8559 fi
8560
8561 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8562       conftest$ac_exeext conftest.$ac_ext
8563 LIBS=$ac_check_lib_save_LIBS
8564 fi
8565 { echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_export" >&5
8566 echo "${ECHO_T}$ac_cv_lib_uuid_uuid_export" >&6; }
8567 if test $ac_cv_lib_uuid_uuid_export = yes; then
8568   OSSP_UUID_LIBS="-luuid"
8569 else
8570   { { echo "$as_me:$LINENO: error: library 'ossp-uuid' or 'uuid' is required for OSSP-UUID" >&5
8571 echo "$as_me: error: library 'ossp-uuid' or 'uuid' is required for OSSP-UUID" >&2;}
8572    { (exit 1); exit 1; }; }
8573 fi
8574
8575 fi
8576
8577 fi
8578
8579
8580
8581 ##
8582 ## Header files
8583 ##
8584
8585 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
8586 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
8587 if test "${ac_cv_header_stdc+set}" = set; then
8588   echo $ECHO_N "(cached) $ECHO_C" >&6
8589 else
8590   cat >conftest.$ac_ext <<_ACEOF
8591 /* confdefs.h.  */
8592 _ACEOF
8593 cat confdefs.h >>conftest.$ac_ext
8594 cat >>conftest.$ac_ext <<_ACEOF
8595 /* end confdefs.h.  */
8596 #include <stdlib.h>
8597 #include <stdarg.h>
8598 #include <string.h>
8599 #include <float.h>
8600
8601 int
8602 main ()
8603 {
8604
8605   ;
8606   return 0;
8607 }
8608 _ACEOF
8609 rm -f conftest.$ac_objext
8610 if { (ac_try="$ac_compile"
8611 case "(($ac_try" in
8612   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8613   *) ac_try_echo=$ac_try;;
8614 esac
8615 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8616   (eval "$ac_compile") 2>conftest.er1
8617   ac_status=$?
8618   grep -v '^ *+' conftest.er1 >conftest.err
8619   rm -f conftest.er1
8620   cat conftest.err >&5
8621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8622   (exit $ac_status); } && {
8623          test -z "$ac_c_werror_flag" ||
8624          test ! -s conftest.err
8625        } && test -s conftest.$ac_objext; then
8626   ac_cv_header_stdc=yes
8627 else
8628   echo "$as_me: failed program was:" >&5
8629 sed 's/^/| /' conftest.$ac_ext >&5
8630
8631         ac_cv_header_stdc=no
8632 fi
8633
8634 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8635
8636 if test $ac_cv_header_stdc = yes; then
8637   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8638   cat >conftest.$ac_ext <<_ACEOF
8639 /* confdefs.h.  */
8640 _ACEOF
8641 cat confdefs.h >>conftest.$ac_ext
8642 cat >>conftest.$ac_ext <<_ACEOF
8643 /* end confdefs.h.  */
8644 #include <string.h>
8645
8646 _ACEOF
8647 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8648   $EGREP "memchr" >/dev/null 2>&1; then
8649   :
8650 else
8651   ac_cv_header_stdc=no
8652 fi
8653 rm -f conftest*
8654
8655 fi
8656
8657 if test $ac_cv_header_stdc = yes; then
8658   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8659   cat >conftest.$ac_ext <<_ACEOF
8660 /* confdefs.h.  */
8661 _ACEOF
8662 cat confdefs.h >>conftest.$ac_ext
8663 cat >>conftest.$ac_ext <<_ACEOF
8664 /* end confdefs.h.  */
8665 #include <stdlib.h>
8666
8667 _ACEOF
8668 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8669   $EGREP "free" >/dev/null 2>&1; then
8670   :
8671 else
8672   ac_cv_header_stdc=no
8673 fi
8674 rm -f conftest*
8675
8676 fi
8677
8678 if test $ac_cv_header_stdc = yes; then
8679   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8680   if test "$cross_compiling" = yes; then
8681   :
8682 else
8683   cat >conftest.$ac_ext <<_ACEOF
8684 /* confdefs.h.  */
8685 _ACEOF
8686 cat confdefs.h >>conftest.$ac_ext
8687 cat >>conftest.$ac_ext <<_ACEOF
8688 /* end confdefs.h.  */
8689 #include <ctype.h>
8690 #include <stdlib.h>
8691 #if ((' ' & 0x0FF) == 0x020)
8692 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8693 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8694 #else
8695 # define ISLOWER(c) \
8696                    (('a' <= (c) && (c) <= 'i') \
8697                      || ('j' <= (c) && (c) <= 'r') \
8698                      || ('s' <= (c) && (c) <= 'z'))
8699 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8700 #endif
8701
8702 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8703 int
8704 main ()
8705 {
8706   int i;
8707   for (i = 0; i < 256; i++)
8708     if (XOR (islower (i), ISLOWER (i))
8709         || toupper (i) != TOUPPER (i))
8710       return 2;
8711   return 0;
8712 }
8713 _ACEOF
8714 rm -f conftest$ac_exeext
8715 if { (ac_try="$ac_link"
8716 case "(($ac_try" in
8717   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8718   *) ac_try_echo=$ac_try;;
8719 esac
8720 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8721   (eval "$ac_link") 2>&5
8722   ac_status=$?
8723   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8724   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8725   { (case "(($ac_try" in
8726   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8727   *) ac_try_echo=$ac_try;;
8728 esac
8729 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8730   (eval "$ac_try") 2>&5
8731   ac_status=$?
8732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8733   (exit $ac_status); }; }; then
8734   :
8735 else
8736   echo "$as_me: program exited with status $ac_status" >&5
8737 echo "$as_me: failed program was:" >&5
8738 sed 's/^/| /' conftest.$ac_ext >&5
8739
8740 ( exit $ac_status )
8741 ac_cv_header_stdc=no
8742 fi
8743 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8744 fi
8745
8746
8747 fi
8748 fi
8749 { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
8750 echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
8751 if test $ac_cv_header_stdc = yes; then
8752
8753 cat >>confdefs.h <<\_ACEOF
8754 #define STDC_HEADERS 1
8755 _ACEOF
8756
8757 fi
8758
8759 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8770                   inttypes.h stdint.h unistd.h
8771 do
8772 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8773 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8774 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8775 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8776   echo $ECHO_N "(cached) $ECHO_C" >&6
8777 else
8778   cat >conftest.$ac_ext <<_ACEOF
8779 /* confdefs.h.  */
8780 _ACEOF
8781 cat confdefs.h >>conftest.$ac_ext
8782 cat >>conftest.$ac_ext <<_ACEOF
8783 /* end confdefs.h.  */
8784 $ac_includes_default
8785
8786 #include <$ac_header>
8787 _ACEOF
8788 rm -f conftest.$ac_objext
8789 if { (ac_try="$ac_compile"
8790 case "(($ac_try" in
8791   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8792   *) ac_try_echo=$ac_try;;
8793 esac
8794 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8795   (eval "$ac_compile") 2>conftest.er1
8796   ac_status=$?
8797   grep -v '^ *+' conftest.er1 >conftest.err
8798   rm -f conftest.er1
8799   cat conftest.err >&5
8800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8801   (exit $ac_status); } && {
8802          test -z "$ac_c_werror_flag" ||
8803          test ! -s conftest.err
8804        } && test -s conftest.$ac_objext; then
8805   eval "$as_ac_Header=yes"
8806 else
8807   echo "$as_me: failed program was:" >&5
8808 sed 's/^/| /' conftest.$ac_ext >&5
8809
8810         eval "$as_ac_Header=no"
8811 fi
8812
8813 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8814 fi
8815 ac_res=`eval echo '${'$as_ac_Header'}'`
8816                { echo "$as_me:$LINENO: result: $ac_res" >&5
8817 echo "${ECHO_T}$ac_res" >&6; }
8818 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8819   cat >>confdefs.h <<_ACEOF
8820 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8821 _ACEOF
8822
8823 fi
8824
8825 done
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854 for ac_header in crypt.h dld.h fp_class.h getopt.h ieeefp.h langinfo.h poll.h pwd.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/socket.h sys/shm.h sys/tas.h sys/time.h sys/un.h termios.h utime.h wchar.h wctype.h kernel/OS.h kernel/image.h SupportDefs.h
8855 do
8856 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8857 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8858   { echo "$as_me:$LINENO: checking for $ac_header" >&5
8859 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8860 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8861   echo $ECHO_N "(cached) $ECHO_C" >&6
8862 fi
8863 ac_res=`eval echo '${'$as_ac_Header'}'`
8864                { echo "$as_me:$LINENO: result: $ac_res" >&5
8865 echo "${ECHO_T}$ac_res" >&6; }
8866 else
8867   # Is the header compilable?
8868 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
8869 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8870 cat >conftest.$ac_ext <<_ACEOF
8871 /* confdefs.h.  */
8872 _ACEOF
8873 cat confdefs.h >>conftest.$ac_ext
8874 cat >>conftest.$ac_ext <<_ACEOF
8875 /* end confdefs.h.  */
8876 $ac_includes_default
8877 #include <$ac_header>
8878 _ACEOF
8879 rm -f conftest.$ac_objext
8880 if { (ac_try="$ac_compile"
8881 case "(($ac_try" in
8882   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8883   *) ac_try_echo=$ac_try;;
8884 esac
8885 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8886   (eval "$ac_compile") 2>conftest.er1
8887   ac_status=$?
8888   grep -v '^ *+' conftest.er1 >conftest.err
8889   rm -f conftest.er1
8890   cat conftest.err >&5
8891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8892   (exit $ac_status); } && {
8893          test -z "$ac_c_werror_flag" ||
8894          test ! -s conftest.err
8895        } && test -s conftest.$ac_objext; then
8896   ac_header_compiler=yes
8897 else
8898   echo "$as_me: failed program was:" >&5
8899 sed 's/^/| /' conftest.$ac_ext >&5
8900
8901         ac_header_compiler=no
8902 fi
8903
8904 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8905 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8906 echo "${ECHO_T}$ac_header_compiler" >&6; }
8907
8908 # Is the header present?
8909 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
8910 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8911 cat >conftest.$ac_ext <<_ACEOF
8912 /* confdefs.h.  */
8913 _ACEOF
8914 cat confdefs.h >>conftest.$ac_ext
8915 cat >>conftest.$ac_ext <<_ACEOF
8916 /* end confdefs.h.  */
8917 #include <$ac_header>
8918 _ACEOF
8919 if { (ac_try="$ac_cpp conftest.$ac_ext"
8920 case "(($ac_try" in
8921   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8922   *) ac_try_echo=$ac_try;;
8923 esac
8924 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8925   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8926   ac_status=$?
8927   grep -v '^ *+' conftest.er1 >conftest.err
8928   rm -f conftest.er1
8929   cat conftest.err >&5
8930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8931   (exit $ac_status); } >/dev/null && {
8932          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8933          test ! -s conftest.err
8934        }; then
8935   ac_header_preproc=yes
8936 else
8937   echo "$as_me: failed program was:" >&5
8938 sed 's/^/| /' conftest.$ac_ext >&5
8939
8940   ac_header_preproc=no
8941 fi
8942
8943 rm -f conftest.err conftest.$ac_ext
8944 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8945 echo "${ECHO_T}$ac_header_preproc" >&6; }
8946
8947 # So?  What about this header?
8948 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8949   yes:no: )
8950     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8951 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8952     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8953 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8954     ac_header_preproc=yes
8955     ;;
8956   no:yes:* )
8957     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8958 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8959     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8960 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8961     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8962 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8963     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8964 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8965     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8966 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8967     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8968 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8969     ( cat <<\_ASBOX
8970 ## ---------------------------------------- ##
8971 ## Report this to pgsql-bugs@postgresql.org ##
8972 ## ---------------------------------------- ##
8973 _ASBOX
8974      ) | sed "s/^/$as_me: WARNING:     /" >&2
8975     ;;
8976 esac
8977 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8978 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8979 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8980   echo $ECHO_N "(cached) $ECHO_C" >&6
8981 else
8982   eval "$as_ac_Header=\$ac_header_preproc"
8983 fi
8984 ac_res=`eval echo '${'$as_ac_Header'}'`
8985                { echo "$as_me:$LINENO: result: $ac_res" >&5
8986 echo "${ECHO_T}$ac_res" >&6; }
8987
8988 fi
8989 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8990   cat >>confdefs.h <<_ACEOF
8991 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8992 _ACEOF
8993
8994 fi
8995
8996 done
8997
8998
8999 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
9000 # netinet/in.h is included first.
9001
9002 for ac_header in netinet/in.h
9003 do
9004 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9005 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9006   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9007 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9008 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9009   echo $ECHO_N "(cached) $ECHO_C" >&6
9010 fi
9011 ac_res=`eval echo '${'$as_ac_Header'}'`
9012                { echo "$as_me:$LINENO: result: $ac_res" >&5
9013 echo "${ECHO_T}$ac_res" >&6; }
9014 else
9015   # Is the header compilable?
9016 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9017 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9018 cat >conftest.$ac_ext <<_ACEOF
9019 /* confdefs.h.  */
9020 _ACEOF
9021 cat confdefs.h >>conftest.$ac_ext
9022 cat >>conftest.$ac_ext <<_ACEOF
9023 /* end confdefs.h.  */
9024 $ac_includes_default
9025 #include <$ac_header>
9026 _ACEOF
9027 rm -f conftest.$ac_objext
9028 if { (ac_try="$ac_compile"
9029 case "(($ac_try" in
9030   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9031   *) ac_try_echo=$ac_try;;
9032 esac
9033 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9034   (eval "$ac_compile") 2>conftest.er1
9035   ac_status=$?
9036   grep -v '^ *+' conftest.er1 >conftest.err
9037   rm -f conftest.er1
9038   cat conftest.err >&5
9039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9040   (exit $ac_status); } && {
9041          test -z "$ac_c_werror_flag" ||
9042          test ! -s conftest.err
9043        } && test -s conftest.$ac_objext; then
9044   ac_header_compiler=yes
9045 else
9046   echo "$as_me: failed program was:" >&5
9047 sed 's/^/| /' conftest.$ac_ext >&5
9048
9049         ac_header_compiler=no
9050 fi
9051
9052 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9053 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9054 echo "${ECHO_T}$ac_header_compiler" >&6; }
9055
9056 # Is the header present?
9057 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
9058 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
9059 cat >conftest.$ac_ext <<_ACEOF
9060 /* confdefs.h.  */
9061 _ACEOF
9062 cat confdefs.h >>conftest.$ac_ext
9063 cat >>conftest.$ac_ext <<_ACEOF
9064 /* end confdefs.h.  */
9065 #include <$ac_header>
9066 _ACEOF
9067 if { (ac_try="$ac_cpp conftest.$ac_ext"
9068 case "(($ac_try" in
9069   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9070   *) ac_try_echo=$ac_try;;
9071 esac
9072 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9073   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9074   ac_status=$?
9075   grep -v '^ *+' conftest.er1 >conftest.err
9076   rm -f conftest.er1
9077   cat conftest.err >&5
9078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9079   (exit $ac_status); } >/dev/null && {
9080          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9081          test ! -s conftest.err
9082        }; then
9083   ac_header_preproc=yes
9084 else
9085   echo "$as_me: failed program was:" >&5
9086 sed 's/^/| /' conftest.$ac_ext >&5
9087
9088   ac_header_preproc=no
9089 fi
9090
9091 rm -f conftest.err conftest.$ac_ext
9092 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9093 echo "${ECHO_T}$ac_header_preproc" >&6; }
9094
9095 # So?  What about this header?
9096 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9097   yes:no: )
9098     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9099 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9100     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9101 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9102     ac_header_preproc=yes
9103     ;;
9104   no:yes:* )
9105     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9106 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9107     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9108 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9109     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9110 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9111     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9112 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9113     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9114 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9115     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9116 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9117     ( cat <<\_ASBOX
9118 ## ---------------------------------------- ##
9119 ## Report this to pgsql-bugs@postgresql.org ##
9120 ## ---------------------------------------- ##
9121 _ASBOX
9122      ) | sed "s/^/$as_me: WARNING:     /" >&2
9123     ;;
9124 esac
9125 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9126 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9127 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9128   echo $ECHO_N "(cached) $ECHO_C" >&6
9129 else
9130   eval "$as_ac_Header=\$ac_header_preproc"
9131 fi
9132 ac_res=`eval echo '${'$as_ac_Header'}'`
9133                { echo "$as_me:$LINENO: result: $ac_res" >&5
9134 echo "${ECHO_T}$ac_res" >&6; }
9135
9136 fi
9137 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9138   cat >>confdefs.h <<_ACEOF
9139 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9140 _ACEOF
9141
9142 fi
9143
9144 done
9145
9146
9147 for ac_header in netinet/tcp.h
9148 do
9149 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9150 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9151 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9152 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9153   echo $ECHO_N "(cached) $ECHO_C" >&6
9154 else
9155   cat >conftest.$ac_ext <<_ACEOF
9156 /* confdefs.h.  */
9157 _ACEOF
9158 cat confdefs.h >>conftest.$ac_ext
9159 cat >>conftest.$ac_ext <<_ACEOF
9160 /* end confdefs.h.  */
9161 $ac_includes_default
9162 #ifdef HAVE_NETINET_IN_H
9163 #include <netinet/in.h>
9164 #endif
9165
9166
9167 #include <$ac_header>
9168 _ACEOF
9169 rm -f conftest.$ac_objext
9170 if { (ac_try="$ac_compile"
9171 case "(($ac_try" in
9172   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9173   *) ac_try_echo=$ac_try;;
9174 esac
9175 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9176   (eval "$ac_compile") 2>conftest.er1
9177   ac_status=$?
9178   grep -v '^ *+' conftest.er1 >conftest.err
9179   rm -f conftest.er1
9180   cat conftest.err >&5
9181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9182   (exit $ac_status); } && {
9183          test -z "$ac_c_werror_flag" ||
9184          test ! -s conftest.err
9185        } && test -s conftest.$ac_objext; then
9186   eval "$as_ac_Header=yes"
9187 else
9188   echo "$as_me: failed program was:" >&5
9189 sed 's/^/| /' conftest.$ac_ext >&5
9190
9191         eval "$as_ac_Header=no"
9192 fi
9193
9194 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9195 fi
9196 ac_res=`eval echo '${'$as_ac_Header'}'`
9197                { echo "$as_me:$LINENO: result: $ac_res" >&5
9198 echo "${ECHO_T}$ac_res" >&6; }
9199 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9200   cat >>confdefs.h <<_ACEOF
9201 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9202 _ACEOF
9203
9204 fi
9205
9206 done
9207
9208
9209 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
9210
9211 for ac_header in readline/readline.h
9212 do
9213 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9214 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9215   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9216 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9217 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9218   echo $ECHO_N "(cached) $ECHO_C" >&6
9219 fi
9220 ac_res=`eval echo '${'$as_ac_Header'}'`
9221                { echo "$as_me:$LINENO: result: $ac_res" >&5
9222 echo "${ECHO_T}$ac_res" >&6; }
9223 else
9224   # Is the header compilable?
9225 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9226 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9227 cat >conftest.$ac_ext <<_ACEOF
9228 /* confdefs.h.  */
9229 _ACEOF
9230 cat confdefs.h >>conftest.$ac_ext
9231 cat >>conftest.$ac_ext <<_ACEOF
9232 /* end confdefs.h.  */
9233 $ac_includes_default
9234 #include <$ac_header>
9235 _ACEOF
9236 rm -f conftest.$ac_objext
9237 if { (ac_try="$ac_compile"
9238 case "(($ac_try" in
9239   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9240   *) ac_try_echo=$ac_try;;
9241 esac
9242 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9243   (eval "$ac_compile") 2>conftest.er1
9244   ac_status=$?
9245   grep -v '^ *+' conftest.er1 >conftest.err
9246   rm -f conftest.er1
9247   cat conftest.err >&5
9248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9249   (exit $ac_status); } && {
9250          test -z "$ac_c_werror_flag" ||
9251          test ! -s conftest.err
9252        } && test -s conftest.$ac_objext; then
9253   ac_header_compiler=yes
9254 else
9255   echo "$as_me: failed program was:" >&5
9256 sed 's/^/| /' conftest.$ac_ext >&5
9257
9258         ac_header_compiler=no
9259 fi
9260
9261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9262 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9263 echo "${ECHO_T}$ac_header_compiler" >&6; }
9264
9265 # Is the header present?
9266 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
9267 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
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 #include <$ac_header>
9275 _ACEOF
9276 if { (ac_try="$ac_cpp conftest.$ac_ext"
9277 case "(($ac_try" in
9278   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9279   *) ac_try_echo=$ac_try;;
9280 esac
9281 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9282   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9283   ac_status=$?
9284   grep -v '^ *+' conftest.er1 >conftest.err
9285   rm -f conftest.er1
9286   cat conftest.err >&5
9287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9288   (exit $ac_status); } >/dev/null && {
9289          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9290          test ! -s conftest.err
9291        }; then
9292   ac_header_preproc=yes
9293 else
9294   echo "$as_me: failed program was:" >&5
9295 sed 's/^/| /' conftest.$ac_ext >&5
9296
9297   ac_header_preproc=no
9298 fi
9299
9300 rm -f conftest.err conftest.$ac_ext
9301 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9302 echo "${ECHO_T}$ac_header_preproc" >&6; }
9303
9304 # So?  What about this header?
9305 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9306   yes:no: )
9307     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9308 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9309     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9310 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9311     ac_header_preproc=yes
9312     ;;
9313   no:yes:* )
9314     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9315 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9316     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9317 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9318     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9319 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9320     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9321 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9322     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9323 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9324     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9325 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9326     ( cat <<\_ASBOX
9327 ## ---------------------------------------- ##
9328 ## Report this to pgsql-bugs@postgresql.org ##
9329 ## ---------------------------------------- ##
9330 _ASBOX
9331      ) | sed "s/^/$as_me: WARNING:     /" >&2
9332     ;;
9333 esac
9334 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9335 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9336 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9337   echo $ECHO_N "(cached) $ECHO_C" >&6
9338 else
9339   eval "$as_ac_Header=\$ac_header_preproc"
9340 fi
9341 ac_res=`eval echo '${'$as_ac_Header'}'`
9342                { echo "$as_me:$LINENO: result: $ac_res" >&5
9343 echo "${ECHO_T}$ac_res" >&6; }
9344
9345 fi
9346 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9347   cat >>confdefs.h <<_ACEOF
9348 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9349 _ACEOF
9350
9351 else
9352
9353 for ac_header in readline.h
9354 do
9355 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9356 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9357   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9358 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9359 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9360   echo $ECHO_N "(cached) $ECHO_C" >&6
9361 fi
9362 ac_res=`eval echo '${'$as_ac_Header'}'`
9363                { echo "$as_me:$LINENO: result: $ac_res" >&5
9364 echo "${ECHO_T}$ac_res" >&6; }
9365 else
9366   # Is the header compilable?
9367 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9368 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9369 cat >conftest.$ac_ext <<_ACEOF
9370 /* confdefs.h.  */
9371 _ACEOF
9372 cat confdefs.h >>conftest.$ac_ext
9373 cat >>conftest.$ac_ext <<_ACEOF
9374 /* end confdefs.h.  */
9375 $ac_includes_default
9376 #include <$ac_header>
9377 _ACEOF
9378 rm -f conftest.$ac_objext
9379 if { (ac_try="$ac_compile"
9380 case "(($ac_try" in
9381   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9382   *) ac_try_echo=$ac_try;;
9383 esac
9384 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9385   (eval "$ac_compile") 2>conftest.er1
9386   ac_status=$?
9387   grep -v '^ *+' conftest.er1 >conftest.err
9388   rm -f conftest.er1
9389   cat conftest.err >&5
9390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9391   (exit $ac_status); } && {
9392          test -z "$ac_c_werror_flag" ||
9393          test ! -s conftest.err
9394        } && test -s conftest.$ac_objext; then
9395   ac_header_compiler=yes
9396 else
9397   echo "$as_me: failed program was:" >&5
9398 sed 's/^/| /' conftest.$ac_ext >&5
9399
9400         ac_header_compiler=no
9401 fi
9402
9403 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9404 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9405 echo "${ECHO_T}$ac_header_compiler" >&6; }
9406
9407 # Is the header present?
9408 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
9409 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
9410 cat >conftest.$ac_ext <<_ACEOF
9411 /* confdefs.h.  */
9412 _ACEOF
9413 cat confdefs.h >>conftest.$ac_ext
9414 cat >>conftest.$ac_ext <<_ACEOF
9415 /* end confdefs.h.  */
9416 #include <$ac_header>
9417 _ACEOF
9418 if { (ac_try="$ac_cpp conftest.$ac_ext"
9419 case "(($ac_try" in
9420   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9421   *) ac_try_echo=$ac_try;;
9422 esac
9423 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9424   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9425   ac_status=$?
9426   grep -v '^ *+' conftest.er1 >conftest.err
9427   rm -f conftest.er1
9428   cat conftest.err >&5
9429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9430   (exit $ac_status); } >/dev/null && {
9431          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9432          test ! -s conftest.err
9433        }; then
9434   ac_header_preproc=yes
9435 else
9436   echo "$as_me: failed program was:" >&5
9437 sed 's/^/| /' conftest.$ac_ext >&5
9438
9439   ac_header_preproc=no
9440 fi
9441
9442 rm -f conftest.err conftest.$ac_ext
9443 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9444 echo "${ECHO_T}$ac_header_preproc" >&6; }
9445
9446 # So?  What about this header?
9447 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9448   yes:no: )
9449     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9450 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9451     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9452 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9453     ac_header_preproc=yes
9454     ;;
9455   no:yes:* )
9456     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9457 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9458     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9459 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9460     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9461 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9462     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9463 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9464     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9465 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9466     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9467 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9468     ( cat <<\_ASBOX
9469 ## ---------------------------------------- ##
9470 ## Report this to pgsql-bugs@postgresql.org ##
9471 ## ---------------------------------------- ##
9472 _ASBOX
9473      ) | sed "s/^/$as_me: WARNING:     /" >&2
9474     ;;
9475 esac
9476 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9477 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9478 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9479   echo $ECHO_N "(cached) $ECHO_C" >&6
9480 else
9481   eval "$as_ac_Header=\$ac_header_preproc"
9482 fi
9483 ac_res=`eval echo '${'$as_ac_Header'}'`
9484                { echo "$as_me:$LINENO: result: $ac_res" >&5
9485 echo "${ECHO_T}$ac_res" >&6; }
9486
9487 fi
9488 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9489   cat >>confdefs.h <<_ACEOF
9490 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9491 _ACEOF
9492
9493 else
9494   { { echo "$as_me:$LINENO: error: readline header not found
9495 If you have readline already installed, see config.log for details on the
9496 failure.  It is possible the compiler isn't looking in the proper directory.
9497 Use --without-readline to disable readline support." >&5
9498 echo "$as_me: error: readline header not found
9499 If you have readline already installed, see config.log for details on the
9500 failure.  It is possible the compiler isn't looking in the proper directory.
9501 Use --without-readline to disable readline support." >&2;}
9502    { (exit 1); exit 1; }; }
9503 fi
9504
9505 done
9506
9507 fi
9508
9509 done
9510
9511
9512 for ac_header in readline/history.h
9513 do
9514 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9515 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9516   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9517 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9518 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9519   echo $ECHO_N "(cached) $ECHO_C" >&6
9520 fi
9521 ac_res=`eval echo '${'$as_ac_Header'}'`
9522                { echo "$as_me:$LINENO: result: $ac_res" >&5
9523 echo "${ECHO_T}$ac_res" >&6; }
9524 else
9525   # Is the header compilable?
9526 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9527 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9528 cat >conftest.$ac_ext <<_ACEOF
9529 /* confdefs.h.  */
9530 _ACEOF
9531 cat confdefs.h >>conftest.$ac_ext
9532 cat >>conftest.$ac_ext <<_ACEOF
9533 /* end confdefs.h.  */
9534 $ac_includes_default
9535 #include <$ac_header>
9536 _ACEOF
9537 rm -f conftest.$ac_objext
9538 if { (ac_try="$ac_compile"
9539 case "(($ac_try" in
9540   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9541   *) ac_try_echo=$ac_try;;
9542 esac
9543 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9544   (eval "$ac_compile") 2>conftest.er1
9545   ac_status=$?
9546   grep -v '^ *+' conftest.er1 >conftest.err
9547   rm -f conftest.er1
9548   cat conftest.err >&5
9549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9550   (exit $ac_status); } && {
9551          test -z "$ac_c_werror_flag" ||
9552          test ! -s conftest.err
9553        } && test -s conftest.$ac_objext; then
9554   ac_header_compiler=yes
9555 else
9556   echo "$as_me: failed program was:" >&5
9557 sed 's/^/| /' conftest.$ac_ext >&5
9558
9559         ac_header_compiler=no
9560 fi
9561
9562 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9563 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9564 echo "${ECHO_T}$ac_header_compiler" >&6; }
9565
9566 # Is the header present?
9567 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
9568 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
9569 cat >conftest.$ac_ext <<_ACEOF
9570 /* confdefs.h.  */
9571 _ACEOF
9572 cat confdefs.h >>conftest.$ac_ext
9573 cat >>conftest.$ac_ext <<_ACEOF
9574 /* end confdefs.h.  */
9575 #include <$ac_header>
9576 _ACEOF
9577 if { (ac_try="$ac_cpp conftest.$ac_ext"
9578 case "(($ac_try" in
9579   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9580   *) ac_try_echo=$ac_try;;
9581 esac
9582 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9583   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9584   ac_status=$?
9585   grep -v '^ *+' conftest.er1 >conftest.err
9586   rm -f conftest.er1
9587   cat conftest.err >&5
9588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9589   (exit $ac_status); } >/dev/null && {
9590          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9591          test ! -s conftest.err
9592        }; then
9593   ac_header_preproc=yes
9594 else
9595   echo "$as_me: failed program was:" >&5
9596 sed 's/^/| /' conftest.$ac_ext >&5
9597
9598   ac_header_preproc=no
9599 fi
9600
9601 rm -f conftest.err conftest.$ac_ext
9602 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9603 echo "${ECHO_T}$ac_header_preproc" >&6; }
9604
9605 # So?  What about this header?
9606 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9607   yes:no: )
9608     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9609 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9610     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9611 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9612     ac_header_preproc=yes
9613     ;;
9614   no:yes:* )
9615     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9616 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9617     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9618 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9619     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9620 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9621     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9622 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9623     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9624 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9625     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9626 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9627     ( cat <<\_ASBOX
9628 ## ---------------------------------------- ##
9629 ## Report this to pgsql-bugs@postgresql.org ##
9630 ## ---------------------------------------- ##
9631 _ASBOX
9632      ) | sed "s/^/$as_me: WARNING:     /" >&2
9633     ;;
9634 esac
9635 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9636 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9637 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9638   echo $ECHO_N "(cached) $ECHO_C" >&6
9639 else
9640   eval "$as_ac_Header=\$ac_header_preproc"
9641 fi
9642 ac_res=`eval echo '${'$as_ac_Header'}'`
9643                { echo "$as_me:$LINENO: result: $ac_res" >&5
9644 echo "${ECHO_T}$ac_res" >&6; }
9645
9646 fi
9647 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9648   cat >>confdefs.h <<_ACEOF
9649 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9650 _ACEOF
9651
9652 else
9653
9654 for ac_header in history.h
9655 do
9656 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9657 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9658   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9659 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9660 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9661   echo $ECHO_N "(cached) $ECHO_C" >&6
9662 fi
9663 ac_res=`eval echo '${'$as_ac_Header'}'`
9664                { echo "$as_me:$LINENO: result: $ac_res" >&5
9665 echo "${ECHO_T}$ac_res" >&6; }
9666 else
9667   # Is the header compilable?
9668 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9669 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9670 cat >conftest.$ac_ext <<_ACEOF
9671 /* confdefs.h.  */
9672 _ACEOF
9673 cat confdefs.h >>conftest.$ac_ext
9674 cat >>conftest.$ac_ext <<_ACEOF
9675 /* end confdefs.h.  */
9676 $ac_includes_default
9677 #include <$ac_header>
9678 _ACEOF
9679 rm -f conftest.$ac_objext
9680 if { (ac_try="$ac_compile"
9681 case "(($ac_try" in
9682   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9683   *) ac_try_echo=$ac_try;;
9684 esac
9685 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9686   (eval "$ac_compile") 2>conftest.er1
9687   ac_status=$?
9688   grep -v '^ *+' conftest.er1 >conftest.err
9689   rm -f conftest.er1
9690   cat conftest.err >&5
9691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9692   (exit $ac_status); } && {
9693          test -z "$ac_c_werror_flag" ||
9694          test ! -s conftest.err
9695        } && test -s conftest.$ac_objext; then
9696   ac_header_compiler=yes
9697 else
9698   echo "$as_me: failed program was:" >&5
9699 sed 's/^/| /' conftest.$ac_ext >&5
9700
9701         ac_header_compiler=no
9702 fi
9703
9704 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9705 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9706 echo "${ECHO_T}$ac_header_compiler" >&6; }
9707
9708 # Is the header present?
9709 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
9710 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
9711 cat >conftest.$ac_ext <<_ACEOF
9712 /* confdefs.h.  */
9713 _ACEOF
9714 cat confdefs.h >>conftest.$ac_ext
9715 cat >>conftest.$ac_ext <<_ACEOF
9716 /* end confdefs.h.  */
9717 #include <$ac_header>
9718 _ACEOF
9719 if { (ac_try="$ac_cpp conftest.$ac_ext"
9720 case "(($ac_try" in
9721   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9722   *) ac_try_echo=$ac_try;;
9723 esac
9724 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9725   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9726   ac_status=$?
9727   grep -v '^ *+' conftest.er1 >conftest.err
9728   rm -f conftest.er1
9729   cat conftest.err >&5
9730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9731   (exit $ac_status); } >/dev/null && {
9732          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9733          test ! -s conftest.err
9734        }; then
9735   ac_header_preproc=yes
9736 else
9737   echo "$as_me: failed program was:" >&5
9738 sed 's/^/| /' conftest.$ac_ext >&5
9739
9740   ac_header_preproc=no
9741 fi
9742
9743 rm -f conftest.err conftest.$ac_ext
9744 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9745 echo "${ECHO_T}$ac_header_preproc" >&6; }
9746
9747 # So?  What about this header?
9748 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9749   yes:no: )
9750     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9751 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9752     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9753 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9754     ac_header_preproc=yes
9755     ;;
9756   no:yes:* )
9757     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9758 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9759     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9760 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9761     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9762 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9763     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9764 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9765     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9766 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9767     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9768 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9769     ( cat <<\_ASBOX
9770 ## ---------------------------------------- ##
9771 ## Report this to pgsql-bugs@postgresql.org ##
9772 ## ---------------------------------------- ##
9773 _ASBOX
9774      ) | sed "s/^/$as_me: WARNING:     /" >&2
9775     ;;
9776 esac
9777 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9778 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9779 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9780   echo $ECHO_N "(cached) $ECHO_C" >&6
9781 else
9782   eval "$as_ac_Header=\$ac_header_preproc"
9783 fi
9784 ac_res=`eval echo '${'$as_ac_Header'}'`
9785                { echo "$as_me:$LINENO: result: $ac_res" >&5
9786 echo "${ECHO_T}$ac_res" >&6; }
9787
9788 fi
9789 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9790   cat >>confdefs.h <<_ACEOF
9791 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9792 _ACEOF
9793
9794 else
9795   { { echo "$as_me:$LINENO: error: history header not found
9796 If you have readline already installed, see config.log for details on the
9797 failure.  It is possible the compiler isn't looking in the proper directory.
9798 Use --without-readline to disable readline support." >&5
9799 echo "$as_me: error: history header not found
9800 If you have readline already installed, see config.log for details on the
9801 failure.  It is possible the compiler isn't looking in the proper directory.
9802 Use --without-readline to disable readline support." >&2;}
9803    { (exit 1); exit 1; }; }
9804 fi
9805
9806 done
9807
9808 fi
9809
9810 done
9811
9812 fi
9813
9814 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
9815 # Some installations of libedit usurp /usr/include/readline/, which seems
9816 # bad practice, since in combined installations readline will have its headers
9817 # there.  We might have to resort to AC_EGREP checks to make sure we found
9818 # the proper header...
9819
9820 for ac_header in editline/readline.h
9821 do
9822 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9823 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9824   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9825 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9826 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9827   echo $ECHO_N "(cached) $ECHO_C" >&6
9828 fi
9829 ac_res=`eval echo '${'$as_ac_Header'}'`
9830                { echo "$as_me:$LINENO: result: $ac_res" >&5
9831 echo "${ECHO_T}$ac_res" >&6; }
9832 else
9833   # Is the header compilable?
9834 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9835 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9836 cat >conftest.$ac_ext <<_ACEOF
9837 /* confdefs.h.  */
9838 _ACEOF
9839 cat confdefs.h >>conftest.$ac_ext
9840 cat >>conftest.$ac_ext <<_ACEOF
9841 /* end confdefs.h.  */
9842 $ac_includes_default
9843 #include <$ac_header>
9844 _ACEOF
9845 rm -f conftest.$ac_objext
9846 if { (ac_try="$ac_compile"
9847 case "(($ac_try" in
9848   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9849   *) ac_try_echo=$ac_try;;
9850 esac
9851 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9852   (eval "$ac_compile") 2>conftest.er1
9853   ac_status=$?
9854   grep -v '^ *+' conftest.er1 >conftest.err
9855   rm -f conftest.er1
9856   cat conftest.err >&5
9857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9858   (exit $ac_status); } && {
9859          test -z "$ac_c_werror_flag" ||
9860          test ! -s conftest.err
9861        } && test -s conftest.$ac_objext; then
9862   ac_header_compiler=yes
9863 else
9864   echo "$as_me: failed program was:" >&5
9865 sed 's/^/| /' conftest.$ac_ext >&5
9866
9867         ac_header_compiler=no
9868 fi
9869
9870 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9871 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9872 echo "${ECHO_T}$ac_header_compiler" >&6; }
9873
9874 # Is the header present?
9875 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
9876 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
9877 cat >conftest.$ac_ext <<_ACEOF
9878 /* confdefs.h.  */
9879 _ACEOF
9880 cat confdefs.h >>conftest.$ac_ext
9881 cat >>conftest.$ac_ext <<_ACEOF
9882 /* end confdefs.h.  */
9883 #include <$ac_header>
9884 _ACEOF
9885 if { (ac_try="$ac_cpp conftest.$ac_ext"
9886 case "(($ac_try" in
9887   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9888   *) ac_try_echo=$ac_try;;
9889 esac
9890 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9891   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9892   ac_status=$?
9893   grep -v '^ *+' conftest.er1 >conftest.err
9894   rm -f conftest.er1
9895   cat conftest.err >&5
9896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9897   (exit $ac_status); } >/dev/null && {
9898          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9899          test ! -s conftest.err
9900        }; then
9901   ac_header_preproc=yes
9902 else
9903   echo "$as_me: failed program was:" >&5
9904 sed 's/^/| /' conftest.$ac_ext >&5
9905
9906   ac_header_preproc=no
9907 fi
9908
9909 rm -f conftest.err conftest.$ac_ext
9910 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9911 echo "${ECHO_T}$ac_header_preproc" >&6; }
9912
9913 # So?  What about this header?
9914 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9915   yes:no: )
9916     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9917 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9918     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9919 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9920     ac_header_preproc=yes
9921     ;;
9922   no:yes:* )
9923     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9924 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9925     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9926 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9927     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9928 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9929     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9930 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9931     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9932 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9933     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9934 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9935     ( cat <<\_ASBOX
9936 ## ---------------------------------------- ##
9937 ## Report this to pgsql-bugs@postgresql.org ##
9938 ## ---------------------------------------- ##
9939 _ASBOX
9940      ) | sed "s/^/$as_me: WARNING:     /" >&2
9941     ;;
9942 esac
9943 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9944 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9945 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9946   echo $ECHO_N "(cached) $ECHO_C" >&6
9947 else
9948   eval "$as_ac_Header=\$ac_header_preproc"
9949 fi
9950 ac_res=`eval echo '${'$as_ac_Header'}'`
9951                { echo "$as_me:$LINENO: result: $ac_res" >&5
9952 echo "${ECHO_T}$ac_res" >&6; }
9953
9954 fi
9955 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9956   cat >>confdefs.h <<_ACEOF
9957 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9958 _ACEOF
9959
9960 else
9961
9962 for ac_header in readline.h
9963 do
9964 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9965 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9966   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9967 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9968 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9969   echo $ECHO_N "(cached) $ECHO_C" >&6
9970 fi
9971 ac_res=`eval echo '${'$as_ac_Header'}'`
9972                { echo "$as_me:$LINENO: result: $ac_res" >&5
9973 echo "${ECHO_T}$ac_res" >&6; }
9974 else
9975   # Is the header compilable?
9976 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9977 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9978 cat >conftest.$ac_ext <<_ACEOF
9979 /* confdefs.h.  */
9980 _ACEOF
9981 cat confdefs.h >>conftest.$ac_ext
9982 cat >>conftest.$ac_ext <<_ACEOF
9983 /* end confdefs.h.  */
9984 $ac_includes_default
9985 #include <$ac_header>
9986 _ACEOF
9987 rm -f conftest.$ac_objext
9988 if { (ac_try="$ac_compile"
9989 case "(($ac_try" in
9990   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9991   *) ac_try_echo=$ac_try;;
9992 esac
9993 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9994   (eval "$ac_compile") 2>conftest.er1
9995   ac_status=$?
9996   grep -v '^ *+' conftest.er1 >conftest.err
9997   rm -f conftest.er1
9998   cat conftest.err >&5
9999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10000   (exit $ac_status); } && {
10001          test -z "$ac_c_werror_flag" ||
10002          test ! -s conftest.err
10003        } && test -s conftest.$ac_objext; then
10004   ac_header_compiler=yes
10005 else
10006   echo "$as_me: failed program was:" >&5
10007 sed 's/^/| /' conftest.$ac_ext >&5
10008
10009         ac_header_compiler=no
10010 fi
10011
10012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10013 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10014 echo "${ECHO_T}$ac_header_compiler" >&6; }
10015
10016 # Is the header present?
10017 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
10018 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10019 cat >conftest.$ac_ext <<_ACEOF
10020 /* confdefs.h.  */
10021 _ACEOF
10022 cat confdefs.h >>conftest.$ac_ext
10023 cat >>conftest.$ac_ext <<_ACEOF
10024 /* end confdefs.h.  */
10025 #include <$ac_header>
10026 _ACEOF
10027 if { (ac_try="$ac_cpp conftest.$ac_ext"
10028 case "(($ac_try" in
10029   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10030   *) ac_try_echo=$ac_try;;
10031 esac
10032 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10033   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10034   ac_status=$?
10035   grep -v '^ *+' conftest.er1 >conftest.err
10036   rm -f conftest.er1
10037   cat conftest.err >&5
10038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10039   (exit $ac_status); } >/dev/null && {
10040          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10041          test ! -s conftest.err
10042        }; then
10043   ac_header_preproc=yes
10044 else
10045   echo "$as_me: failed program was:" >&5
10046 sed 's/^/| /' conftest.$ac_ext >&5
10047
10048   ac_header_preproc=no
10049 fi
10050
10051 rm -f conftest.err conftest.$ac_ext
10052 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10053 echo "${ECHO_T}$ac_header_preproc" >&6; }
10054
10055 # So?  What about this header?
10056 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10057   yes:no: )
10058     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10059 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10060     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10061 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10062     ac_header_preproc=yes
10063     ;;
10064   no:yes:* )
10065     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10066 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10067     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10068 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10069     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10070 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10071     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10072 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10073     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10074 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10075     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10076 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10077     ( cat <<\_ASBOX
10078 ## ---------------------------------------- ##
10079 ## Report this to pgsql-bugs@postgresql.org ##
10080 ## ---------------------------------------- ##
10081 _ASBOX
10082      ) | sed "s/^/$as_me: WARNING:     /" >&2
10083     ;;
10084 esac
10085 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10086 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10087 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10088   echo $ECHO_N "(cached) $ECHO_C" >&6
10089 else
10090   eval "$as_ac_Header=\$ac_header_preproc"
10091 fi
10092 ac_res=`eval echo '${'$as_ac_Header'}'`
10093                { echo "$as_me:$LINENO: result: $ac_res" >&5
10094 echo "${ECHO_T}$ac_res" >&6; }
10095
10096 fi
10097 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10098   cat >>confdefs.h <<_ACEOF
10099 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10100 _ACEOF
10101
10102 else
10103
10104 for ac_header in readline/readline.h
10105 do
10106 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10107 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10108   { echo "$as_me:$LINENO: checking for $ac_header" >&5
10109 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10110 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10111   echo $ECHO_N "(cached) $ECHO_C" >&6
10112 fi
10113 ac_res=`eval echo '${'$as_ac_Header'}'`
10114                { echo "$as_me:$LINENO: result: $ac_res" >&5
10115 echo "${ECHO_T}$ac_res" >&6; }
10116 else
10117   # Is the header compilable?
10118 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
10119 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
10120 cat >conftest.$ac_ext <<_ACEOF
10121 /* confdefs.h.  */
10122 _ACEOF
10123 cat confdefs.h >>conftest.$ac_ext
10124 cat >>conftest.$ac_ext <<_ACEOF
10125 /* end confdefs.h.  */
10126 $ac_includes_default
10127 #include <$ac_header>
10128 _ACEOF
10129 rm -f conftest.$ac_objext
10130 if { (ac_try="$ac_compile"
10131 case "(($ac_try" in
10132   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10133   *) ac_try_echo=$ac_try;;
10134 esac
10135 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10136   (eval "$ac_compile") 2>conftest.er1
10137   ac_status=$?
10138   grep -v '^ *+' conftest.er1 >conftest.err
10139   rm -f conftest.er1
10140   cat conftest.err >&5
10141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10142   (exit $ac_status); } && {
10143          test -z "$ac_c_werror_flag" ||
10144          test ! -s conftest.err
10145        } && test -s conftest.$ac_objext; then
10146   ac_header_compiler=yes
10147 else
10148   echo "$as_me: failed program was:" >&5
10149 sed 's/^/| /' conftest.$ac_ext >&5
10150
10151         ac_header_compiler=no
10152 fi
10153
10154 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10155 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10156 echo "${ECHO_T}$ac_header_compiler" >&6; }
10157
10158 # Is the header present?
10159 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
10160 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10161 cat >conftest.$ac_ext <<_ACEOF
10162 /* confdefs.h.  */
10163 _ACEOF
10164 cat confdefs.h >>conftest.$ac_ext
10165 cat >>conftest.$ac_ext <<_ACEOF
10166 /* end confdefs.h.  */
10167 #include <$ac_header>
10168 _ACEOF
10169 if { (ac_try="$ac_cpp conftest.$ac_ext"
10170 case "(($ac_try" in
10171   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10172   *) ac_try_echo=$ac_try;;
10173 esac
10174 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10175   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10176   ac_status=$?
10177   grep -v '^ *+' conftest.er1 >conftest.err
10178   rm -f conftest.er1
10179   cat conftest.err >&5
10180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10181   (exit $ac_status); } >/dev/null && {
10182          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10183          test ! -s conftest.err
10184        }; then
10185   ac_header_preproc=yes
10186 else
10187   echo "$as_me: failed program was:" >&5
10188 sed 's/^/| /' conftest.$ac_ext >&5
10189
10190   ac_header_preproc=no
10191 fi
10192
10193 rm -f conftest.err conftest.$ac_ext
10194 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10195 echo "${ECHO_T}$ac_header_preproc" >&6; }
10196
10197 # So?  What about this header?
10198 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10199   yes:no: )
10200     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10201 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10202     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10203 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10204     ac_header_preproc=yes
10205     ;;
10206   no:yes:* )
10207     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10208 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10209     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10210 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10211     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10212 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10213     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10214 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10215     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10216 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10217     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10218 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10219     ( cat <<\_ASBOX
10220 ## ---------------------------------------- ##
10221 ## Report this to pgsql-bugs@postgresql.org ##
10222 ## ---------------------------------------- ##
10223 _ASBOX
10224      ) | sed "s/^/$as_me: WARNING:     /" >&2
10225     ;;
10226 esac
10227 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10228 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10229 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10230   echo $ECHO_N "(cached) $ECHO_C" >&6
10231 else
10232   eval "$as_ac_Header=\$ac_header_preproc"
10233 fi
10234 ac_res=`eval echo '${'$as_ac_Header'}'`
10235                { echo "$as_me:$LINENO: result: $ac_res" >&5
10236 echo "${ECHO_T}$ac_res" >&6; }
10237
10238 fi
10239 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10240   cat >>confdefs.h <<_ACEOF
10241 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10242 _ACEOF
10243
10244 else
10245   { { echo "$as_me:$LINENO: error: readline header not found
10246 If you have libedit already installed, see config.log for details on the
10247 failure.  It is possible the compiler isn't looking in the proper directory.
10248 Use --without-readline to disable libedit support." >&5
10249 echo "$as_me: error: readline header not found
10250 If you have libedit already installed, see config.log for details on the
10251 failure.  It is possible the compiler isn't looking in the proper directory.
10252 Use --without-readline to disable libedit support." >&2;}
10253    { (exit 1); exit 1; }; }
10254 fi
10255
10256 done
10257
10258 fi
10259
10260 done
10261
10262 fi
10263
10264 done
10265
10266 # Note: in a libedit installation, history.h is sometimes a dummy, and may
10267 # not be there at all.  Hence, don't complain if not found.  We must check
10268 # though, since in yet other versions it is an independent header.
10269
10270 for ac_header in editline/history.h
10271 do
10272 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10273 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10274   { echo "$as_me:$LINENO: checking for $ac_header" >&5
10275 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10276 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10277   echo $ECHO_N "(cached) $ECHO_C" >&6
10278 fi
10279 ac_res=`eval echo '${'$as_ac_Header'}'`
10280                { echo "$as_me:$LINENO: result: $ac_res" >&5
10281 echo "${ECHO_T}$ac_res" >&6; }
10282 else
10283   # Is the header compilable?
10284 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
10285 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
10286 cat >conftest.$ac_ext <<_ACEOF
10287 /* confdefs.h.  */
10288 _ACEOF
10289 cat confdefs.h >>conftest.$ac_ext
10290 cat >>conftest.$ac_ext <<_ACEOF
10291 /* end confdefs.h.  */
10292 $ac_includes_default
10293 #include <$ac_header>
10294 _ACEOF
10295 rm -f conftest.$ac_objext
10296 if { (ac_try="$ac_compile"
10297 case "(($ac_try" in
10298   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10299   *) ac_try_echo=$ac_try;;
10300 esac
10301 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10302   (eval "$ac_compile") 2>conftest.er1
10303   ac_status=$?
10304   grep -v '^ *+' conftest.er1 >conftest.err
10305   rm -f conftest.er1
10306   cat conftest.err >&5
10307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10308   (exit $ac_status); } && {
10309          test -z "$ac_c_werror_flag" ||
10310          test ! -s conftest.err
10311        } && test -s conftest.$ac_objext; then
10312   ac_header_compiler=yes
10313 else
10314   echo "$as_me: failed program was:" >&5
10315 sed 's/^/| /' conftest.$ac_ext >&5
10316
10317         ac_header_compiler=no
10318 fi
10319
10320 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10321 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10322 echo "${ECHO_T}$ac_header_compiler" >&6; }
10323
10324 # Is the header present?
10325 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
10326 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10327 cat >conftest.$ac_ext <<_ACEOF
10328 /* confdefs.h.  */
10329 _ACEOF
10330 cat confdefs.h >>conftest.$ac_ext
10331 cat >>conftest.$ac_ext <<_ACEOF
10332 /* end confdefs.h.  */
10333 #include <$ac_header>
10334 _ACEOF
10335 if { (ac_try="$ac_cpp conftest.$ac_ext"
10336 case "(($ac_try" in
10337   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10338   *) ac_try_echo=$ac_try;;
10339 esac
10340 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10341   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10342   ac_status=$?
10343   grep -v '^ *+' conftest.er1 >conftest.err
10344   rm -f conftest.er1
10345   cat conftest.err >&5
10346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10347   (exit $ac_status); } >/dev/null && {
10348          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10349          test ! -s conftest.err
10350        }; then
10351   ac_header_preproc=yes
10352 else
10353   echo "$as_me: failed program was:" >&5
10354 sed 's/^/| /' conftest.$ac_ext >&5
10355
10356   ac_header_preproc=no
10357 fi
10358
10359 rm -f conftest.err conftest.$ac_ext
10360 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10361 echo "${ECHO_T}$ac_header_preproc" >&6; }
10362
10363 # So?  What about this header?
10364 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10365   yes:no: )
10366     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10367 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10368     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10369 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10370     ac_header_preproc=yes
10371     ;;
10372   no:yes:* )
10373     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10374 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10375     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10376 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10377     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10378 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10379     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10380 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10381     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10382 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10383     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10384 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10385     ( cat <<\_ASBOX
10386 ## ---------------------------------------- ##
10387 ## Report this to pgsql-bugs@postgresql.org ##
10388 ## ---------------------------------------- ##
10389 _ASBOX
10390      ) | sed "s/^/$as_me: WARNING:     /" >&2
10391     ;;
10392 esac
10393 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10394 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10395 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10396   echo $ECHO_N "(cached) $ECHO_C" >&6
10397 else
10398   eval "$as_ac_Header=\$ac_header_preproc"
10399 fi
10400 ac_res=`eval echo '${'$as_ac_Header'}'`
10401                { echo "$as_me:$LINENO: result: $ac_res" >&5
10402 echo "${ECHO_T}$ac_res" >&6; }
10403
10404 fi
10405 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10406   cat >>confdefs.h <<_ACEOF
10407 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10408 _ACEOF
10409
10410 else
10411
10412 for ac_header in history.h
10413 do
10414 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10415 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10416   { echo "$as_me:$LINENO: checking for $ac_header" >&5
10417 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10418 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10419   echo $ECHO_N "(cached) $ECHO_C" >&6
10420 fi
10421 ac_res=`eval echo '${'$as_ac_Header'}'`
10422                { echo "$as_me:$LINENO: result: $ac_res" >&5
10423 echo "${ECHO_T}$ac_res" >&6; }
10424 else
10425   # Is the header compilable?
10426 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
10427 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
10428 cat >conftest.$ac_ext <<_ACEOF
10429 /* confdefs.h.  */
10430 _ACEOF
10431 cat confdefs.h >>conftest.$ac_ext
10432 cat >>conftest.$ac_ext <<_ACEOF
10433 /* end confdefs.h.  */
10434 $ac_includes_default
10435 #include <$ac_header>
10436 _ACEOF
10437 rm -f conftest.$ac_objext
10438 if { (ac_try="$ac_compile"
10439 case "(($ac_try" in
10440   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10441   *) ac_try_echo=$ac_try;;
10442 esac
10443 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10444   (eval "$ac_compile") 2>conftest.er1
10445   ac_status=$?
10446   grep -v '^ *+' conftest.er1 >conftest.err
10447   rm -f conftest.er1
10448   cat conftest.err >&5
10449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10450   (exit $ac_status); } && {
10451          test -z "$ac_c_werror_flag" ||
10452          test ! -s conftest.err
10453        } && test -s conftest.$ac_objext; then
10454   ac_header_compiler=yes
10455 else
10456   echo "$as_me: failed program was:" >&5
10457 sed 's/^/| /' conftest.$ac_ext >&5
10458
10459         ac_header_compiler=no
10460 fi
10461
10462 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10463 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10464 echo "${ECHO_T}$ac_header_compiler" >&6; }
10465
10466 # Is the header present?
10467 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
10468 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10469 cat >conftest.$ac_ext <<_ACEOF
10470 /* confdefs.h.  */
10471 _ACEOF
10472 cat confdefs.h >>conftest.$ac_ext
10473 cat >>conftest.$ac_ext <<_ACEOF
10474 /* end confdefs.h.  */
10475 #include <$ac_header>
10476 _ACEOF
10477 if { (ac_try="$ac_cpp conftest.$ac_ext"
10478 case "(($ac_try" in
10479   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10480   *) ac_try_echo=$ac_try;;
10481 esac
10482 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10483   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10484   ac_status=$?
10485   grep -v '^ *+' conftest.er1 >conftest.err
10486   rm -f conftest.er1
10487   cat conftest.err >&5
10488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10489   (exit $ac_status); } >/dev/null && {
10490          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10491          test ! -s conftest.err
10492        }; then
10493   ac_header_preproc=yes
10494 else
10495   echo "$as_me: failed program was:" >&5
10496 sed 's/^/| /' conftest.$ac_ext >&5
10497
10498   ac_header_preproc=no
10499 fi
10500
10501 rm -f conftest.err conftest.$ac_ext
10502 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10503 echo "${ECHO_T}$ac_header_preproc" >&6; }
10504
10505 # So?  What about this header?
10506 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10507   yes:no: )
10508     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10509 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10510     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10511 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10512     ac_header_preproc=yes
10513     ;;
10514   no:yes:* )
10515     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10516 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10517     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10518 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10519     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10520 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10521     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10522 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10523     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10524 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10525     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10526 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10527     ( cat <<\_ASBOX
10528 ## ---------------------------------------- ##
10529 ## Report this to pgsql-bugs@postgresql.org ##
10530 ## ---------------------------------------- ##
10531 _ASBOX
10532      ) | sed "s/^/$as_me: WARNING:     /" >&2
10533     ;;
10534 esac
10535 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10536 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10537 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10538   echo $ECHO_N "(cached) $ECHO_C" >&6
10539 else
10540   eval "$as_ac_Header=\$ac_header_preproc"
10541 fi
10542 ac_res=`eval echo '${'$as_ac_Header'}'`
10543                { echo "$as_me:$LINENO: result: $ac_res" >&5
10544 echo "${ECHO_T}$ac_res" >&6; }
10545
10546 fi
10547 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10548   cat >>confdefs.h <<_ACEOF
10549 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10550 _ACEOF
10551
10552 else
10553
10554 for ac_header in readline/history.h
10555 do
10556 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10557 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10558   { echo "$as_me:$LINENO: checking for $ac_header" >&5
10559 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10560 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10561   echo $ECHO_N "(cached) $ECHO_C" >&6
10562 fi
10563 ac_res=`eval echo '${'$as_ac_Header'}'`
10564                { echo "$as_me:$LINENO: result: $ac_res" >&5
10565 echo "${ECHO_T}$ac_res" >&6; }
10566 else
10567   # Is the header compilable?
10568 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
10569 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
10570 cat >conftest.$ac_ext <<_ACEOF
10571 /* confdefs.h.  */
10572 _ACEOF
10573 cat confdefs.h >>conftest.$ac_ext
10574 cat >>conftest.$ac_ext <<_ACEOF
10575 /* end confdefs.h.  */
10576 $ac_includes_default
10577 #include <$ac_header>
10578 _ACEOF
10579 rm -f conftest.$ac_objext
10580 if { (ac_try="$ac_compile"
10581 case "(($ac_try" in
10582   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10583   *) ac_try_echo=$ac_try;;
10584 esac
10585 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10586   (eval "$ac_compile") 2>conftest.er1
10587   ac_status=$?
10588   grep -v '^ *+' conftest.er1 >conftest.err
10589   rm -f conftest.er1
10590   cat conftest.err >&5
10591   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10592   (exit $ac_status); } && {
10593          test -z "$ac_c_werror_flag" ||
10594          test ! -s conftest.err
10595        } && test -s conftest.$ac_objext; then
10596   ac_header_compiler=yes
10597 else
10598   echo "$as_me: failed program was:" >&5
10599 sed 's/^/| /' conftest.$ac_ext >&5
10600
10601         ac_header_compiler=no
10602 fi
10603
10604 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10605 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10606 echo "${ECHO_T}$ac_header_compiler" >&6; }
10607
10608 # Is the header present?
10609 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
10610 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10611 cat >conftest.$ac_ext <<_ACEOF
10612 /* confdefs.h.  */
10613 _ACEOF
10614 cat confdefs.h >>conftest.$ac_ext
10615 cat >>conftest.$ac_ext <<_ACEOF
10616 /* end confdefs.h.  */
10617 #include <$ac_header>
10618 _ACEOF
10619 if { (ac_try="$ac_cpp conftest.$ac_ext"
10620 case "(($ac_try" in
10621   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10622   *) ac_try_echo=$ac_try;;
10623 esac
10624 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10625   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10626   ac_status=$?
10627   grep -v '^ *+' conftest.er1 >conftest.err
10628   rm -f conftest.er1
10629   cat conftest.err >&5
10630   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10631   (exit $ac_status); } >/dev/null && {
10632          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10633          test ! -s conftest.err
10634        }; then
10635   ac_header_preproc=yes
10636 else
10637   echo "$as_me: failed program was:" >&5
10638 sed 's/^/| /' conftest.$ac_ext >&5
10639
10640   ac_header_preproc=no
10641 fi
10642
10643 rm -f conftest.err conftest.$ac_ext
10644 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10645 echo "${ECHO_T}$ac_header_preproc" >&6; }
10646
10647 # So?  What about this header?
10648 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10649   yes:no: )
10650     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10651 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10652     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10653 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10654     ac_header_preproc=yes
10655     ;;
10656   no:yes:* )
10657     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10658 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10659     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10660 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10661     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10662 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10663     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10664 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10665     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10666 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10667     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10668 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10669     ( cat <<\_ASBOX
10670 ## ---------------------------------------- ##
10671 ## Report this to pgsql-bugs@postgresql.org ##
10672 ## ---------------------------------------- ##
10673 _ASBOX
10674      ) | sed "s/^/$as_me: WARNING:     /" >&2
10675     ;;
10676 esac
10677 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10678 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10679 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10680   echo $ECHO_N "(cached) $ECHO_C" >&6
10681 else
10682   eval "$as_ac_Header=\$ac_header_preproc"
10683 fi
10684 ac_res=`eval echo '${'$as_ac_Header'}'`
10685                { echo "$as_me:$LINENO: result: $ac_res" >&5
10686 echo "${ECHO_T}$ac_res" >&6; }
10687
10688 fi
10689 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10690   cat >>confdefs.h <<_ACEOF
10691 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10692 _ACEOF
10693
10694 fi
10695
10696 done
10697
10698 fi
10699
10700 done
10701
10702 fi
10703
10704 done
10705
10706 fi
10707
10708 if test "$with_zlib" = yes; then
10709   if test "${ac_cv_header_zlib_h+set}" = set; then
10710   { echo "$as_me:$LINENO: checking for zlib.h" >&5
10711 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; }
10712 if test "${ac_cv_header_zlib_h+set}" = set; then
10713   echo $ECHO_N "(cached) $ECHO_C" >&6
10714 fi
10715 { echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
10716 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }
10717 else
10718   # Is the header compilable?
10719 { echo "$as_me:$LINENO: checking zlib.h usability" >&5
10720 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; }
10721 cat >conftest.$ac_ext <<_ACEOF
10722 /* confdefs.h.  */
10723 _ACEOF
10724 cat confdefs.h >>conftest.$ac_ext
10725 cat >>conftest.$ac_ext <<_ACEOF
10726 /* end confdefs.h.  */
10727 $ac_includes_default
10728 #include <zlib.h>
10729 _ACEOF
10730 rm -f conftest.$ac_objext
10731 if { (ac_try="$ac_compile"
10732 case "(($ac_try" in
10733   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10734   *) ac_try_echo=$ac_try;;
10735 esac
10736 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10737   (eval "$ac_compile") 2>conftest.er1
10738   ac_status=$?
10739   grep -v '^ *+' conftest.er1 >conftest.err
10740   rm -f conftest.er1
10741   cat conftest.err >&5
10742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10743   (exit $ac_status); } && {
10744          test -z "$ac_c_werror_flag" ||
10745          test ! -s conftest.err
10746        } && test -s conftest.$ac_objext; then
10747   ac_header_compiler=yes
10748 else
10749   echo "$as_me: failed program was:" >&5
10750 sed 's/^/| /' conftest.$ac_ext >&5
10751
10752         ac_header_compiler=no
10753 fi
10754
10755 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10756 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10757 echo "${ECHO_T}$ac_header_compiler" >&6; }
10758
10759 # Is the header present?
10760 { echo "$as_me:$LINENO: checking zlib.h presence" >&5
10761 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; }
10762 cat >conftest.$ac_ext <<_ACEOF
10763 /* confdefs.h.  */
10764 _ACEOF
10765 cat confdefs.h >>conftest.$ac_ext
10766 cat >>conftest.$ac_ext <<_ACEOF
10767 /* end confdefs.h.  */
10768 #include <zlib.h>
10769 _ACEOF
10770 if { (ac_try="$ac_cpp conftest.$ac_ext"
10771 case "(($ac_try" in
10772   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10773   *) ac_try_echo=$ac_try;;
10774 esac
10775 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10776   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10777   ac_status=$?
10778   grep -v '^ *+' conftest.er1 >conftest.err
10779   rm -f conftest.er1
10780   cat conftest.err >&5
10781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10782   (exit $ac_status); } >/dev/null && {
10783          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10784          test ! -s conftest.err
10785        }; then
10786   ac_header_preproc=yes
10787 else
10788   echo "$as_me: failed program was:" >&5
10789 sed 's/^/| /' conftest.$ac_ext >&5
10790
10791   ac_header_preproc=no
10792 fi
10793
10794 rm -f conftest.err conftest.$ac_ext
10795 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10796 echo "${ECHO_T}$ac_header_preproc" >&6; }
10797
10798 # So?  What about this header?
10799 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10800   yes:no: )
10801     { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
10802 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10803     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
10804 echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
10805     ac_header_preproc=yes
10806     ;;
10807   no:yes:* )
10808     { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
10809 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
10810     { echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
10811 echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
10812     { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
10813 echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
10814     { echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
10815 echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10816     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
10817 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
10818     { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
10819 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
10820     ( cat <<\_ASBOX
10821 ## ---------------------------------------- ##
10822 ## Report this to pgsql-bugs@postgresql.org ##
10823 ## ---------------------------------------- ##
10824 _ASBOX
10825      ) | sed "s/^/$as_me: WARNING:     /" >&2
10826     ;;
10827 esac
10828 { echo "$as_me:$LINENO: checking for zlib.h" >&5
10829 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; }
10830 if test "${ac_cv_header_zlib_h+set}" = set; then
10831   echo $ECHO_N "(cached) $ECHO_C" >&6
10832 else
10833   ac_cv_header_zlib_h=$ac_header_preproc
10834 fi
10835 { echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
10836 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }
10837
10838 fi
10839 if test $ac_cv_header_zlib_h = yes; then
10840   :
10841 else
10842   { { echo "$as_me:$LINENO: error: zlib header not found
10843 If you have zlib already installed, see config.log for details on the
10844 failure.  It is possible the compiler isn't looking in the proper directory.
10845 Use --without-zlib to disable zlib support." >&5
10846 echo "$as_me: error: zlib header not found
10847 If you have zlib already installed, see config.log for details on the
10848 failure.  It is possible the compiler isn't looking in the proper directory.
10849 Use --without-zlib to disable zlib support." >&2;}
10850    { (exit 1); exit 1; }; }
10851 fi
10852
10853
10854 fi
10855
10856 if test "$with_gssapi" = yes ; then
10857
10858 for ac_header in gssapi/gssapi.h
10859 do
10860 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10861 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10862   { echo "$as_me:$LINENO: checking for $ac_header" >&5
10863 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10864 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10865   echo $ECHO_N "(cached) $ECHO_C" >&6
10866 fi
10867 ac_res=`eval echo '${'$as_ac_Header'}'`
10868                { echo "$as_me:$LINENO: result: $ac_res" >&5
10869 echo "${ECHO_T}$ac_res" >&6; }
10870 else
10871   # Is the header compilable?
10872 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
10873 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
10874 cat >conftest.$ac_ext <<_ACEOF
10875 /* confdefs.h.  */
10876 _ACEOF
10877 cat confdefs.h >>conftest.$ac_ext
10878 cat >>conftest.$ac_ext <<_ACEOF
10879 /* end confdefs.h.  */
10880 $ac_includes_default
10881 #include <$ac_header>
10882 _ACEOF
10883 rm -f conftest.$ac_objext
10884 if { (ac_try="$ac_compile"
10885 case "(($ac_try" in
10886   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10887   *) ac_try_echo=$ac_try;;
10888 esac
10889 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10890   (eval "$ac_compile") 2>conftest.er1
10891   ac_status=$?
10892   grep -v '^ *+' conftest.er1 >conftest.err
10893   rm -f conftest.er1
10894   cat conftest.err >&5
10895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10896   (exit $ac_status); } && {
10897          test -z "$ac_c_werror_flag" ||
10898          test ! -s conftest.err
10899        } && test -s conftest.$ac_objext; then
10900   ac_header_compiler=yes
10901 else
10902   echo "$as_me: failed program was:" >&5
10903 sed 's/^/| /' conftest.$ac_ext >&5
10904
10905         ac_header_compiler=no
10906 fi
10907
10908 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10909 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10910 echo "${ECHO_T}$ac_header_compiler" >&6; }
10911
10912 # Is the header present?
10913 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
10914 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10915 cat >conftest.$ac_ext <<_ACEOF
10916 /* confdefs.h.  */
10917 _ACEOF
10918 cat confdefs.h >>conftest.$ac_ext
10919 cat >>conftest.$ac_ext <<_ACEOF
10920 /* end confdefs.h.  */
10921 #include <$ac_header>
10922 _ACEOF
10923 if { (ac_try="$ac_cpp conftest.$ac_ext"
10924 case "(($ac_try" in
10925   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10926   *) ac_try_echo=$ac_try;;
10927 esac
10928 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10929   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10930   ac_status=$?
10931   grep -v '^ *+' conftest.er1 >conftest.err
10932   rm -f conftest.er1
10933   cat conftest.err >&5
10934   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10935   (exit $ac_status); } >/dev/null && {
10936          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10937          test ! -s conftest.err
10938        }; then
10939   ac_header_preproc=yes
10940 else
10941   echo "$as_me: failed program was:" >&5
10942 sed 's/^/| /' conftest.$ac_ext >&5
10943
10944   ac_header_preproc=no
10945 fi
10946
10947 rm -f conftest.err conftest.$ac_ext
10948 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10949 echo "${ECHO_T}$ac_header_preproc" >&6; }
10950
10951 # So?  What about this header?
10952 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10953   yes:no: )
10954     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10955 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10956     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10957 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10958     ac_header_preproc=yes
10959     ;;
10960   no:yes:* )
10961     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10962 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10963     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10964 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10965     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10966 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10967     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10968 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10969     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10970 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10971     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10972 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10973     ( cat <<\_ASBOX
10974 ## ---------------------------------------- ##
10975 ## Report this to pgsql-bugs@postgresql.org ##
10976 ## ---------------------------------------- ##
10977 _ASBOX
10978      ) | sed "s/^/$as_me: WARNING:     /" >&2
10979     ;;
10980 esac
10981 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10982 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10983 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10984   echo $ECHO_N "(cached) $ECHO_C" >&6
10985 else
10986   eval "$as_ac_Header=\$ac_header_preproc"
10987 fi
10988 ac_res=`eval echo '${'$as_ac_Header'}'`
10989                { echo "$as_me:$LINENO: result: $ac_res" >&5
10990 echo "${ECHO_T}$ac_res" >&6; }
10991
10992 fi
10993 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10994   cat >>confdefs.h <<_ACEOF
10995 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10996 _ACEOF
10997
10998 else
10999
11000 for ac_header in gssapi.h
11001 do
11002 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11003 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11004   { echo "$as_me:$LINENO: checking for $ac_header" >&5
11005 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11006 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11007   echo $ECHO_N "(cached) $ECHO_C" >&6
11008 fi
11009 ac_res=`eval echo '${'$as_ac_Header'}'`
11010                { echo "$as_me:$LINENO: result: $ac_res" >&5
11011 echo "${ECHO_T}$ac_res" >&6; }
11012 else
11013   # Is the header compilable?
11014 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
11015 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
11016 cat >conftest.$ac_ext <<_ACEOF
11017 /* confdefs.h.  */
11018 _ACEOF
11019 cat confdefs.h >>conftest.$ac_ext
11020 cat >>conftest.$ac_ext <<_ACEOF
11021 /* end confdefs.h.  */
11022 $ac_includes_default
11023 #include <$ac_header>
11024 _ACEOF
11025 rm -f conftest.$ac_objext
11026 if { (ac_try="$ac_compile"
11027 case "(($ac_try" in
11028   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11029   *) ac_try_echo=$ac_try;;
11030 esac
11031 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11032   (eval "$ac_compile") 2>conftest.er1
11033   ac_status=$?
11034   grep -v '^ *+' conftest.er1 >conftest.err
11035   rm -f conftest.er1
11036   cat conftest.err >&5
11037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11038   (exit $ac_status); } && {
11039          test -z "$ac_c_werror_flag" ||
11040          test ! -s conftest.err
11041        } && test -s conftest.$ac_objext; then
11042   ac_header_compiler=yes
11043 else
11044   echo "$as_me: failed program was:" >&5
11045 sed 's/^/| /' conftest.$ac_ext >&5
11046
11047         ac_header_compiler=no
11048 fi
11049
11050 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11051 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11052 echo "${ECHO_T}$ac_header_compiler" >&6; }
11053
11054 # Is the header present?
11055 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
11056 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
11057 cat >conftest.$ac_ext <<_ACEOF
11058 /* confdefs.h.  */
11059 _ACEOF
11060 cat confdefs.h >>conftest.$ac_ext
11061 cat >>conftest.$ac_ext <<_ACEOF
11062 /* end confdefs.h.  */
11063 #include <$ac_header>
11064 _ACEOF
11065 if { (ac_try="$ac_cpp conftest.$ac_ext"
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_cpp conftest.$ac_ext") 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); } >/dev/null && {
11078          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11079          test ! -s conftest.err
11080        }; then
11081   ac_header_preproc=yes
11082 else
11083   echo "$as_me: failed program was:" >&5
11084 sed 's/^/| /' conftest.$ac_ext >&5
11085
11086   ac_header_preproc=no
11087 fi
11088
11089 rm -f conftest.err conftest.$ac_ext
11090 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11091 echo "${ECHO_T}$ac_header_preproc" >&6; }
11092
11093 # So?  What about this header?
11094 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11095   yes:no: )
11096     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11097 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11098     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11099 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11100     ac_header_preproc=yes
11101     ;;
11102   no:yes:* )
11103     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11104 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11105     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11106 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11107     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11108 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11109     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11110 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11111     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11112 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11113     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11114 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11115     ( cat <<\_ASBOX
11116 ## ---------------------------------------- ##
11117 ## Report this to pgsql-bugs@postgresql.org ##
11118 ## ---------------------------------------- ##
11119 _ASBOX
11120      ) | sed "s/^/$as_me: WARNING:     /" >&2
11121     ;;
11122 esac
11123 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11124 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11125 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11126   echo $ECHO_N "(cached) $ECHO_C" >&6
11127 else
11128   eval "$as_ac_Header=\$ac_header_preproc"
11129 fi
11130 ac_res=`eval echo '${'$as_ac_Header'}'`
11131                { echo "$as_me:$LINENO: result: $ac_res" >&5
11132 echo "${ECHO_T}$ac_res" >&6; }
11133
11134 fi
11135 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11136   cat >>confdefs.h <<_ACEOF
11137 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11138 _ACEOF
11139
11140 else
11141   { { echo "$as_me:$LINENO: error: gssapi.h header file is required for GSSAPI" >&5
11142 echo "$as_me: error: gssapi.h header file is required for GSSAPI" >&2;}
11143    { (exit 1); exit 1; }; }
11144 fi
11145
11146 done
11147
11148 fi
11149
11150 done
11151
11152 fi
11153
11154 if test "$with_krb5" = yes ; then
11155   if test "${ac_cv_header_krb5_h+set}" = set; then
11156   { echo "$as_me:$LINENO: checking for krb5.h" >&5
11157 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6; }
11158 if test "${ac_cv_header_krb5_h+set}" = set; then
11159   echo $ECHO_N "(cached) $ECHO_C" >&6
11160 fi
11161 { echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
11162 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6; }
11163 else
11164   # Is the header compilable?
11165 { echo "$as_me:$LINENO: checking krb5.h usability" >&5
11166 echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6; }
11167 cat >conftest.$ac_ext <<_ACEOF
11168 /* confdefs.h.  */
11169 _ACEOF
11170 cat confdefs.h >>conftest.$ac_ext
11171 cat >>conftest.$ac_ext <<_ACEOF
11172 /* end confdefs.h.  */
11173 $ac_includes_default
11174 #include <krb5.h>
11175 _ACEOF
11176 rm -f conftest.$ac_objext
11177 if { (ac_try="$ac_compile"
11178 case "(($ac_try" in
11179   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11180   *) ac_try_echo=$ac_try;;
11181 esac
11182 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11183   (eval "$ac_compile") 2>conftest.er1
11184   ac_status=$?
11185   grep -v '^ *+' conftest.er1 >conftest.err
11186   rm -f conftest.er1
11187   cat conftest.err >&5
11188   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11189   (exit $ac_status); } && {
11190          test -z "$ac_c_werror_flag" ||
11191          test ! -s conftest.err
11192        } && test -s conftest.$ac_objext; then
11193   ac_header_compiler=yes
11194 else
11195   echo "$as_me: failed program was:" >&5
11196 sed 's/^/| /' conftest.$ac_ext >&5
11197
11198         ac_header_compiler=no
11199 fi
11200
11201 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11202 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11203 echo "${ECHO_T}$ac_header_compiler" >&6; }
11204
11205 # Is the header present?
11206 { echo "$as_me:$LINENO: checking krb5.h presence" >&5
11207 echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6; }
11208 cat >conftest.$ac_ext <<_ACEOF
11209 /* confdefs.h.  */
11210 _ACEOF
11211 cat confdefs.h >>conftest.$ac_ext
11212 cat >>conftest.$ac_ext <<_ACEOF
11213 /* end confdefs.h.  */
11214 #include <krb5.h>
11215 _ACEOF
11216 if { (ac_try="$ac_cpp conftest.$ac_ext"
11217 case "(($ac_try" in
11218   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11219   *) ac_try_echo=$ac_try;;
11220 esac
11221 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11222   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11223   ac_status=$?
11224   grep -v '^ *+' conftest.er1 >conftest.err
11225   rm -f conftest.er1
11226   cat conftest.err >&5
11227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11228   (exit $ac_status); } >/dev/null && {
11229          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11230          test ! -s conftest.err
11231        }; then
11232   ac_header_preproc=yes
11233 else
11234   echo "$as_me: failed program was:" >&5
11235 sed 's/^/| /' conftest.$ac_ext >&5
11236
11237   ac_header_preproc=no
11238 fi
11239
11240 rm -f conftest.err conftest.$ac_ext
11241 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11242 echo "${ECHO_T}$ac_header_preproc" >&6; }
11243
11244 # So?  What about this header?
11245 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11246   yes:no: )
11247     { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
11248 echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11249     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the compiler's result" >&5
11250 echo "$as_me: WARNING: krb5.h: proceeding with the compiler's result" >&2;}
11251     ac_header_preproc=yes
11252     ;;
11253   no:yes:* )
11254     { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
11255 echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
11256     { echo "$as_me:$LINENO: WARNING: krb5.h:     check for missing prerequisite headers?" >&5
11257 echo "$as_me: WARNING: krb5.h:     check for missing prerequisite headers?" >&2;}
11258     { echo "$as_me:$LINENO: WARNING: krb5.h: see the Autoconf documentation" >&5
11259 echo "$as_me: WARNING: krb5.h: see the Autoconf documentation" >&2;}
11260     { echo "$as_me:$LINENO: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
11261 echo "$as_me: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
11262     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
11263 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
11264     { echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
11265 echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
11266     ( cat <<\_ASBOX
11267 ## ---------------------------------------- ##
11268 ## Report this to pgsql-bugs@postgresql.org ##
11269 ## ---------------------------------------- ##
11270 _ASBOX
11271      ) | sed "s/^/$as_me: WARNING:     /" >&2
11272     ;;
11273 esac
11274 { echo "$as_me:$LINENO: checking for krb5.h" >&5
11275 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6; }
11276 if test "${ac_cv_header_krb5_h+set}" = set; then
11277   echo $ECHO_N "(cached) $ECHO_C" >&6
11278 else
11279   ac_cv_header_krb5_h=$ac_header_preproc
11280 fi
11281 { echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
11282 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6; }
11283
11284 fi
11285 if test $ac_cv_header_krb5_h = yes; then
11286   :
11287 else
11288   { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
11289 echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
11290    { (exit 1); exit 1; }; }
11291 fi
11292
11293
11294 fi
11295
11296 if test "$with_openssl" = yes ; then
11297   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
11298   { echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
11299 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6; }
11300 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
11301   echo $ECHO_N "(cached) $ECHO_C" >&6
11302 fi
11303 { echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
11304 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6; }
11305 else
11306   # Is the header compilable?
11307 { echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
11308 echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6; }
11309 cat >conftest.$ac_ext <<_ACEOF
11310 /* confdefs.h.  */
11311 _ACEOF
11312 cat confdefs.h >>conftest.$ac_ext
11313 cat >>conftest.$ac_ext <<_ACEOF
11314 /* end confdefs.h.  */
11315 $ac_includes_default
11316 #include <openssl/ssl.h>
11317 _ACEOF
11318 rm -f conftest.$ac_objext
11319 if { (ac_try="$ac_compile"
11320 case "(($ac_try" in
11321   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11322   *) ac_try_echo=$ac_try;;
11323 esac
11324 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11325   (eval "$ac_compile") 2>conftest.er1
11326   ac_status=$?
11327   grep -v '^ *+' conftest.er1 >conftest.err
11328   rm -f conftest.er1
11329   cat conftest.err >&5
11330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11331   (exit $ac_status); } && {
11332          test -z "$ac_c_werror_flag" ||
11333          test ! -s conftest.err
11334        } && test -s conftest.$ac_objext; then
11335   ac_header_compiler=yes
11336 else
11337   echo "$as_me: failed program was:" >&5
11338 sed 's/^/| /' conftest.$ac_ext >&5
11339
11340         ac_header_compiler=no
11341 fi
11342
11343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11344 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11345 echo "${ECHO_T}$ac_header_compiler" >&6; }
11346
11347 # Is the header present?
11348 { echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
11349 echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6; }
11350 cat >conftest.$ac_ext <<_ACEOF
11351 /* confdefs.h.  */
11352 _ACEOF
11353 cat confdefs.h >>conftest.$ac_ext
11354 cat >>conftest.$ac_ext <<_ACEOF
11355 /* end confdefs.h.  */
11356 #include <openssl/ssl.h>
11357 _ACEOF
11358 if { (ac_try="$ac_cpp conftest.$ac_ext"
11359 case "(($ac_try" in
11360   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11361   *) ac_try_echo=$ac_try;;
11362 esac
11363 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11364   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11365   ac_status=$?
11366   grep -v '^ *+' conftest.er1 >conftest.err
11367   rm -f conftest.er1
11368   cat conftest.err >&5
11369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11370   (exit $ac_status); } >/dev/null && {
11371          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11372          test ! -s conftest.err
11373        }; then
11374   ac_header_preproc=yes
11375 else
11376   echo "$as_me: failed program was:" >&5
11377 sed 's/^/| /' conftest.$ac_ext >&5
11378
11379   ac_header_preproc=no
11380 fi
11381
11382 rm -f conftest.err conftest.$ac_ext
11383 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11384 echo "${ECHO_T}$ac_header_preproc" >&6; }
11385
11386 # So?  What about this header?
11387 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11388   yes:no: )
11389     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
11390 echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11391     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
11392 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
11393     ac_header_preproc=yes
11394     ;;
11395   no:yes:* )
11396     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
11397 echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
11398     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
11399 echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
11400     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
11401 echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
11402     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
11403 echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
11404     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
11405 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
11406     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
11407 echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
11408     ( cat <<\_ASBOX
11409 ## ---------------------------------------- ##
11410 ## Report this to pgsql-bugs@postgresql.org ##
11411 ## ---------------------------------------- ##
11412 _ASBOX
11413      ) | sed "s/^/$as_me: WARNING:     /" >&2
11414     ;;
11415 esac
11416 { echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
11417 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6; }
11418 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
11419   echo $ECHO_N "(cached) $ECHO_C" >&6
11420 else
11421   ac_cv_header_openssl_ssl_h=$ac_header_preproc
11422 fi
11423 { echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
11424 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6; }
11425
11426 fi
11427 if test $ac_cv_header_openssl_ssl_h = yes; then
11428   :
11429 else
11430   { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
11431 echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
11432    { (exit 1); exit 1; }; }
11433 fi
11434
11435
11436   if test "${ac_cv_header_openssl_err_h+set}" = set; then
11437   { echo "$as_me:$LINENO: checking for openssl/err.h" >&5
11438 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6; }
11439 if test "${ac_cv_header_openssl_err_h+set}" = set; then
11440   echo $ECHO_N "(cached) $ECHO_C" >&6
11441 fi
11442 { echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
11443 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6; }
11444 else
11445   # Is the header compilable?
11446 { echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
11447 echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6; }
11448 cat >conftest.$ac_ext <<_ACEOF
11449 /* confdefs.h.  */
11450 _ACEOF
11451 cat confdefs.h >>conftest.$ac_ext
11452 cat >>conftest.$ac_ext <<_ACEOF
11453 /* end confdefs.h.  */
11454 $ac_includes_default
11455 #include <openssl/err.h>
11456 _ACEOF
11457 rm -f conftest.$ac_objext
11458 if { (ac_try="$ac_compile"
11459 case "(($ac_try" in
11460   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11461   *) ac_try_echo=$ac_try;;
11462 esac
11463 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11464   (eval "$ac_compile") 2>conftest.er1
11465   ac_status=$?
11466   grep -v '^ *+' conftest.er1 >conftest.err
11467   rm -f conftest.er1
11468   cat conftest.err >&5
11469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11470   (exit $ac_status); } && {
11471          test -z "$ac_c_werror_flag" ||
11472          test ! -s conftest.err
11473        } && test -s conftest.$ac_objext; then
11474   ac_header_compiler=yes
11475 else
11476   echo "$as_me: failed program was:" >&5
11477 sed 's/^/| /' conftest.$ac_ext >&5
11478
11479         ac_header_compiler=no
11480 fi
11481
11482 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11483 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11484 echo "${ECHO_T}$ac_header_compiler" >&6; }
11485
11486 # Is the header present?
11487 { echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
11488 echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6; }
11489 cat >conftest.$ac_ext <<_ACEOF
11490 /* confdefs.h.  */
11491 _ACEOF
11492 cat confdefs.h >>conftest.$ac_ext
11493 cat >>conftest.$ac_ext <<_ACEOF
11494 /* end confdefs.h.  */
11495 #include <openssl/err.h>
11496 _ACEOF
11497 if { (ac_try="$ac_cpp conftest.$ac_ext"
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_cpp conftest.$ac_ext") 2>conftest.er1
11504   ac_status=$?
11505   grep -v '^ *+' conftest.er1 >conftest.err
11506   rm -f conftest.er1
11507   cat conftest.err >&5
11508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11509   (exit $ac_status); } >/dev/null && {
11510          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11511          test ! -s conftest.err
11512        }; then
11513   ac_header_preproc=yes
11514 else
11515   echo "$as_me: failed program was:" >&5
11516 sed 's/^/| /' conftest.$ac_ext >&5
11517
11518   ac_header_preproc=no
11519 fi
11520
11521 rm -f conftest.err conftest.$ac_ext
11522 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11523 echo "${ECHO_T}$ac_header_preproc" >&6; }
11524
11525 # So?  What about this header?
11526 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11527   yes:no: )
11528     { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
11529 echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11530     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5
11531 echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;}
11532     ac_header_preproc=yes
11533     ;;
11534   no:yes:* )
11535     { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
11536 echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
11537     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&5
11538 echo "$as_me: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&2;}
11539     { echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5
11540 echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;}
11541     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&5
11542 echo "$as_me: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&2;}
11543     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
11544 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;}
11545     { echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5
11546 echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;}
11547     ( cat <<\_ASBOX
11548 ## ---------------------------------------- ##
11549 ## Report this to pgsql-bugs@postgresql.org ##
11550 ## ---------------------------------------- ##
11551 _ASBOX
11552      ) | sed "s/^/$as_me: WARNING:     /" >&2
11553     ;;
11554 esac
11555 { echo "$as_me:$LINENO: checking for openssl/err.h" >&5
11556 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6; }
11557 if test "${ac_cv_header_openssl_err_h+set}" = set; then
11558   echo $ECHO_N "(cached) $ECHO_C" >&6
11559 else
11560   ac_cv_header_openssl_err_h=$ac_header_preproc
11561 fi
11562 { echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
11563 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6; }
11564
11565 fi
11566 if test $ac_cv_header_openssl_err_h = yes; then
11567   :
11568 else
11569   { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
11570 echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
11571    { (exit 1); exit 1; }; }
11572 fi
11573
11574
11575
11576 for ac_func in ERR_set_mark
11577 do
11578 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11579 { echo "$as_me:$LINENO: checking for $ac_func" >&5
11580 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11581 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
11582   echo $ECHO_N "(cached) $ECHO_C" >&6
11583 else
11584   cat >conftest.$ac_ext <<_ACEOF
11585 /* confdefs.h.  */
11586 _ACEOF
11587 cat confdefs.h >>conftest.$ac_ext
11588 cat >>conftest.$ac_ext <<_ACEOF
11589 /* end confdefs.h.  */
11590 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11591    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11592 #define $ac_func innocuous_$ac_func
11593
11594 /* System header to define __stub macros and hopefully few prototypes,
11595     which can conflict with char $ac_func (); below.
11596     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11597     <limits.h> exists even on freestanding compilers.  */
11598
11599 #ifdef __STDC__
11600 # include <limits.h>
11601 #else
11602 # include <assert.h>
11603 #endif
11604
11605 #undef $ac_func
11606
11607 /* Override any GCC internal prototype to avoid an error.
11608    Use char because int might match the return type of a GCC
11609    builtin and then its argument prototype would still apply.  */
11610 #ifdef __cplusplus
11611 extern "C"
11612 #endif
11613 char $ac_func ();
11614 /* The GNU C library defines this for functions which it implements
11615     to always fail with ENOSYS.  Some functions are actually named
11616     something starting with __ and the normal name is an alias.  */
11617 #if defined __stub_$ac_func || defined __stub___$ac_func
11618 choke me
11619 #endif
11620
11621 int
11622 main ()
11623 {
11624 return $ac_func ();
11625   ;
11626   return 0;
11627 }
11628 _ACEOF
11629 rm -f conftest.$ac_objext conftest$ac_exeext
11630 if { (ac_try="$ac_link"
11631 case "(($ac_try" in
11632   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11633   *) ac_try_echo=$ac_try;;
11634 esac
11635 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11636   (eval "$ac_link") 2>conftest.er1
11637   ac_status=$?
11638   grep -v '^ *+' conftest.er1 >conftest.err
11639   rm -f conftest.er1
11640   cat conftest.err >&5
11641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11642   (exit $ac_status); } && {
11643          test -z "$ac_c_werror_flag" ||
11644          test ! -s conftest.err
11645        } && test -s conftest$ac_exeext &&
11646        $as_test_x conftest$ac_exeext; then
11647   eval "$as_ac_var=yes"
11648 else
11649   echo "$as_me: failed program was:" >&5
11650 sed 's/^/| /' conftest.$ac_ext >&5
11651
11652         eval "$as_ac_var=no"
11653 fi
11654
11655 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11656       conftest$ac_exeext conftest.$ac_ext
11657 fi
11658 ac_res=`eval echo '${'$as_ac_var'}'`
11659                { echo "$as_me:$LINENO: result: $ac_res" >&5
11660 echo "${ECHO_T}$ac_res" >&6; }
11661 if test `eval echo '${'$as_ac_var'}'` = yes; then
11662   cat >>confdefs.h <<_ACEOF
11663 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11664 _ACEOF
11665
11666 fi
11667 done
11668
11669 fi
11670
11671 if test "$with_pam" = yes ; then
11672
11673 for ac_header in security/pam_appl.h
11674 do
11675 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11676 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11677   { echo "$as_me:$LINENO: checking for $ac_header" >&5
11678 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11679 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11680   echo $ECHO_N "(cached) $ECHO_C" >&6
11681 fi
11682 ac_res=`eval echo '${'$as_ac_Header'}'`
11683                { echo "$as_me:$LINENO: result: $ac_res" >&5
11684 echo "${ECHO_T}$ac_res" >&6; }
11685 else
11686   # Is the header compilable?
11687 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
11688 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
11689 cat >conftest.$ac_ext <<_ACEOF
11690 /* confdefs.h.  */
11691 _ACEOF
11692 cat confdefs.h >>conftest.$ac_ext
11693 cat >>conftest.$ac_ext <<_ACEOF
11694 /* end confdefs.h.  */
11695 $ac_includes_default
11696 #include <$ac_header>
11697 _ACEOF
11698 rm -f conftest.$ac_objext
11699 if { (ac_try="$ac_compile"
11700 case "(($ac_try" in
11701   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11702   *) ac_try_echo=$ac_try;;
11703 esac
11704 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11705   (eval "$ac_compile") 2>conftest.er1
11706   ac_status=$?
11707   grep -v '^ *+' conftest.er1 >conftest.err
11708   rm -f conftest.er1
11709   cat conftest.err >&5
11710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11711   (exit $ac_status); } && {
11712          test -z "$ac_c_werror_flag" ||
11713          test ! -s conftest.err
11714        } && test -s conftest.$ac_objext; then
11715   ac_header_compiler=yes
11716 else
11717   echo "$as_me: failed program was:" >&5
11718 sed 's/^/| /' conftest.$ac_ext >&5
11719
11720         ac_header_compiler=no
11721 fi
11722
11723 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11724 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11725 echo "${ECHO_T}$ac_header_compiler" >&6; }
11726
11727 # Is the header present?
11728 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
11729 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
11730 cat >conftest.$ac_ext <<_ACEOF
11731 /* confdefs.h.  */
11732 _ACEOF
11733 cat confdefs.h >>conftest.$ac_ext
11734 cat >>conftest.$ac_ext <<_ACEOF
11735 /* end confdefs.h.  */
11736 #include <$ac_header>
11737 _ACEOF
11738 if { (ac_try="$ac_cpp conftest.$ac_ext"
11739 case "(($ac_try" in
11740   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11741   *) ac_try_echo=$ac_try;;
11742 esac
11743 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11744   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11745   ac_status=$?
11746   grep -v '^ *+' conftest.er1 >conftest.err
11747   rm -f conftest.er1
11748   cat conftest.err >&5
11749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11750   (exit $ac_status); } >/dev/null && {
11751          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11752          test ! -s conftest.err
11753        }; then
11754   ac_header_preproc=yes
11755 else
11756   echo "$as_me: failed program was:" >&5
11757 sed 's/^/| /' conftest.$ac_ext >&5
11758
11759   ac_header_preproc=no
11760 fi
11761
11762 rm -f conftest.err conftest.$ac_ext
11763 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11764 echo "${ECHO_T}$ac_header_preproc" >&6; }
11765
11766 # So?  What about this header?
11767 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11768   yes:no: )
11769     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11770 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11771     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11772 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11773     ac_header_preproc=yes
11774     ;;
11775   no:yes:* )
11776     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11777 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11778     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11779 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11780     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11781 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11782     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11783 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11784     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11785 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11786     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11787 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11788     ( cat <<\_ASBOX
11789 ## ---------------------------------------- ##
11790 ## Report this to pgsql-bugs@postgresql.org ##
11791 ## ---------------------------------------- ##
11792 _ASBOX
11793      ) | sed "s/^/$as_me: WARNING:     /" >&2
11794     ;;
11795 esac
11796 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11797 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11798 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11799   echo $ECHO_N "(cached) $ECHO_C" >&6
11800 else
11801   eval "$as_ac_Header=\$ac_header_preproc"
11802 fi
11803 ac_res=`eval echo '${'$as_ac_Header'}'`
11804                { echo "$as_me:$LINENO: result: $ac_res" >&5
11805 echo "${ECHO_T}$ac_res" >&6; }
11806
11807 fi
11808 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11809   cat >>confdefs.h <<_ACEOF
11810 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11811 _ACEOF
11812
11813 else
11814
11815 for ac_header in pam/pam_appl.h
11816 do
11817 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11818 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11819   { echo "$as_me:$LINENO: checking for $ac_header" >&5
11820 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11821 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11822   echo $ECHO_N "(cached) $ECHO_C" >&6
11823 fi
11824 ac_res=`eval echo '${'$as_ac_Header'}'`
11825                { echo "$as_me:$LINENO: result: $ac_res" >&5
11826 echo "${ECHO_T}$ac_res" >&6; }
11827 else
11828   # Is the header compilable?
11829 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
11830 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
11831 cat >conftest.$ac_ext <<_ACEOF
11832 /* confdefs.h.  */
11833 _ACEOF
11834 cat confdefs.h >>conftest.$ac_ext
11835 cat >>conftest.$ac_ext <<_ACEOF
11836 /* end confdefs.h.  */
11837 $ac_includes_default
11838 #include <$ac_header>
11839 _ACEOF
11840 rm -f conftest.$ac_objext
11841 if { (ac_try="$ac_compile"
11842 case "(($ac_try" in
11843   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11844   *) ac_try_echo=$ac_try;;
11845 esac
11846 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11847   (eval "$ac_compile") 2>conftest.er1
11848   ac_status=$?
11849   grep -v '^ *+' conftest.er1 >conftest.err
11850   rm -f conftest.er1
11851   cat conftest.err >&5
11852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11853   (exit $ac_status); } && {
11854          test -z "$ac_c_werror_flag" ||
11855          test ! -s conftest.err
11856        } && test -s conftest.$ac_objext; then
11857   ac_header_compiler=yes
11858 else
11859   echo "$as_me: failed program was:" >&5
11860 sed 's/^/| /' conftest.$ac_ext >&5
11861
11862         ac_header_compiler=no
11863 fi
11864
11865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11866 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11867 echo "${ECHO_T}$ac_header_compiler" >&6; }
11868
11869 # Is the header present?
11870 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
11871 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
11872 cat >conftest.$ac_ext <<_ACEOF
11873 /* confdefs.h.  */
11874 _ACEOF
11875 cat confdefs.h >>conftest.$ac_ext
11876 cat >>conftest.$ac_ext <<_ACEOF
11877 /* end confdefs.h.  */
11878 #include <$ac_header>
11879 _ACEOF
11880 if { (ac_try="$ac_cpp conftest.$ac_ext"
11881 case "(($ac_try" in
11882   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11883   *) ac_try_echo=$ac_try;;
11884 esac
11885 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11886   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11887   ac_status=$?
11888   grep -v '^ *+' conftest.er1 >conftest.err
11889   rm -f conftest.er1
11890   cat conftest.err >&5
11891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11892   (exit $ac_status); } >/dev/null && {
11893          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11894          test ! -s conftest.err
11895        }; then
11896   ac_header_preproc=yes
11897 else
11898   echo "$as_me: failed program was:" >&5
11899 sed 's/^/| /' conftest.$ac_ext >&5
11900
11901   ac_header_preproc=no
11902 fi
11903
11904 rm -f conftest.err conftest.$ac_ext
11905 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11906 echo "${ECHO_T}$ac_header_preproc" >&6; }
11907
11908 # So?  What about this header?
11909 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11910   yes:no: )
11911     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11912 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11913     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11914 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11915     ac_header_preproc=yes
11916     ;;
11917   no:yes:* )
11918     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11919 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11920     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11921 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11922     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11923 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11924     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11925 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11926     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11927 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11928     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11929 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11930     ( cat <<\_ASBOX
11931 ## ---------------------------------------- ##
11932 ## Report this to pgsql-bugs@postgresql.org ##
11933 ## ---------------------------------------- ##
11934 _ASBOX
11935      ) | sed "s/^/$as_me: WARNING:     /" >&2
11936     ;;
11937 esac
11938 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11939 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11940 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11941   echo $ECHO_N "(cached) $ECHO_C" >&6
11942 else
11943   eval "$as_ac_Header=\$ac_header_preproc"
11944 fi
11945 ac_res=`eval echo '${'$as_ac_Header'}'`
11946                { echo "$as_me:$LINENO: result: $ac_res" >&5
11947 echo "${ECHO_T}$ac_res" >&6; }
11948
11949 fi
11950 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11951   cat >>confdefs.h <<_ACEOF
11952 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11953 _ACEOF
11954
11955 else
11956   { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
11957 echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
11958    { (exit 1); exit 1; }; }
11959 fi
11960
11961 done
11962
11963 fi
11964
11965 done
11966
11967 fi
11968
11969 if test "$with_libxml" = yes ; then
11970   if test "${ac_cv_header_libxml_parser_h+set}" = set; then
11971   { echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
11972 echo $ECHO_N "checking for libxml/parser.h... $ECHO_C" >&6; }
11973 if test "${ac_cv_header_libxml_parser_h+set}" = set; then
11974   echo $ECHO_N "(cached) $ECHO_C" >&6
11975 fi
11976 { echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
11977 echo "${ECHO_T}$ac_cv_header_libxml_parser_h" >&6; }
11978 else
11979   # Is the header compilable?
11980 { echo "$as_me:$LINENO: checking libxml/parser.h usability" >&5
11981 echo $ECHO_N "checking libxml/parser.h usability... $ECHO_C" >&6; }
11982 cat >conftest.$ac_ext <<_ACEOF
11983 /* confdefs.h.  */
11984 _ACEOF
11985 cat confdefs.h >>conftest.$ac_ext
11986 cat >>conftest.$ac_ext <<_ACEOF
11987 /* end confdefs.h.  */
11988 $ac_includes_default
11989 #include <libxml/parser.h>
11990 _ACEOF
11991 rm -f conftest.$ac_objext
11992 if { (ac_try="$ac_compile"
11993 case "(($ac_try" in
11994   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11995   *) ac_try_echo=$ac_try;;
11996 esac
11997 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11998   (eval "$ac_compile") 2>conftest.er1
11999   ac_status=$?
12000   grep -v '^ *+' conftest.er1 >conftest.err
12001   rm -f conftest.er1
12002   cat conftest.err >&5
12003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12004   (exit $ac_status); } && {
12005          test -z "$ac_c_werror_flag" ||
12006          test ! -s conftest.err
12007        } && test -s conftest.$ac_objext; then
12008   ac_header_compiler=yes
12009 else
12010   echo "$as_me: failed program was:" >&5
12011 sed 's/^/| /' conftest.$ac_ext >&5
12012
12013         ac_header_compiler=no
12014 fi
12015
12016 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12017 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12018 echo "${ECHO_T}$ac_header_compiler" >&6; }
12019
12020 # Is the header present?
12021 { echo "$as_me:$LINENO: checking libxml/parser.h presence" >&5
12022 echo $ECHO_N "checking libxml/parser.h presence... $ECHO_C" >&6; }
12023 cat >conftest.$ac_ext <<_ACEOF
12024 /* confdefs.h.  */
12025 _ACEOF
12026 cat confdefs.h >>conftest.$ac_ext
12027 cat >>conftest.$ac_ext <<_ACEOF
12028 /* end confdefs.h.  */
12029 #include <libxml/parser.h>
12030 _ACEOF
12031 if { (ac_try="$ac_cpp conftest.$ac_ext"
12032 case "(($ac_try" in
12033   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12034   *) ac_try_echo=$ac_try;;
12035 esac
12036 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12037   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12038   ac_status=$?
12039   grep -v '^ *+' conftest.er1 >conftest.err
12040   rm -f conftest.er1
12041   cat conftest.err >&5
12042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12043   (exit $ac_status); } >/dev/null && {
12044          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12045          test ! -s conftest.err
12046        }; then
12047   ac_header_preproc=yes
12048 else
12049   echo "$as_me: failed program was:" >&5
12050 sed 's/^/| /' conftest.$ac_ext >&5
12051
12052   ac_header_preproc=no
12053 fi
12054
12055 rm -f conftest.err conftest.$ac_ext
12056 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12057 echo "${ECHO_T}$ac_header_preproc" >&6; }
12058
12059 # So?  What about this header?
12060 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12061   yes:no: )
12062     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&5
12063 echo "$as_me: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12064     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the compiler's result" >&5
12065 echo "$as_me: WARNING: libxml/parser.h: proceeding with the compiler's result" >&2;}
12066     ac_header_preproc=yes
12067     ;;
12068   no:yes:* )
12069     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: present but cannot be compiled" >&5
12070 echo "$as_me: WARNING: libxml/parser.h: present but cannot be compiled" >&2;}
12071     { echo "$as_me:$LINENO: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&5
12072 echo "$as_me: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&2;}
12073     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: see the Autoconf documentation" >&5
12074 echo "$as_me: WARNING: libxml/parser.h: see the Autoconf documentation" >&2;}
12075     { echo "$as_me:$LINENO: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&5
12076 echo "$as_me: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&2;}
12077     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&5
12078 echo "$as_me: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&2;}
12079     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&5
12080 echo "$as_me: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&2;}
12081     ( cat <<\_ASBOX
12082 ## ---------------------------------------- ##
12083 ## Report this to pgsql-bugs@postgresql.org ##
12084 ## ---------------------------------------- ##
12085 _ASBOX
12086      ) | sed "s/^/$as_me: WARNING:     /" >&2
12087     ;;
12088 esac
12089 { echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
12090 echo $ECHO_N "checking for libxml/parser.h... $ECHO_C" >&6; }
12091 if test "${ac_cv_header_libxml_parser_h+set}" = set; then
12092   echo $ECHO_N "(cached) $ECHO_C" >&6
12093 else
12094   ac_cv_header_libxml_parser_h=$ac_header_preproc
12095 fi
12096 { echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
12097 echo "${ECHO_T}$ac_cv_header_libxml_parser_h" >&6; }
12098
12099 fi
12100 if test $ac_cv_header_libxml_parser_h = yes; then
12101   :
12102 else
12103   { { echo "$as_me:$LINENO: error: header file <libxml/parser.h> is required for XML support" >&5
12104 echo "$as_me: error: header file <libxml/parser.h> is required for XML support" >&2;}
12105    { (exit 1); exit 1; }; }
12106 fi
12107
12108
12109 fi
12110
12111 if test "$with_libxslt" = yes ; then
12112   if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
12113   { echo "$as_me:$LINENO: checking for libxslt/xslt.h" >&5
12114 echo $ECHO_N "checking for libxslt/xslt.h... $ECHO_C" >&6; }
12115 if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
12116   echo $ECHO_N "(cached) $ECHO_C" >&6
12117 fi
12118 { echo "$as_me:$LINENO: result: $ac_cv_header_libxslt_xslt_h" >&5
12119 echo "${ECHO_T}$ac_cv_header_libxslt_xslt_h" >&6; }
12120 else
12121   # Is the header compilable?
12122 { echo "$as_me:$LINENO: checking libxslt/xslt.h usability" >&5
12123 echo $ECHO_N "checking libxslt/xslt.h usability... $ECHO_C" >&6; }
12124 cat >conftest.$ac_ext <<_ACEOF
12125 /* confdefs.h.  */
12126 _ACEOF
12127 cat confdefs.h >>conftest.$ac_ext
12128 cat >>conftest.$ac_ext <<_ACEOF
12129 /* end confdefs.h.  */
12130 $ac_includes_default
12131 #include <libxslt/xslt.h>
12132 _ACEOF
12133 rm -f conftest.$ac_objext
12134 if { (ac_try="$ac_compile"
12135 case "(($ac_try" in
12136   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12137   *) ac_try_echo=$ac_try;;
12138 esac
12139 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12140   (eval "$ac_compile") 2>conftest.er1
12141   ac_status=$?
12142   grep -v '^ *+' conftest.er1 >conftest.err
12143   rm -f conftest.er1
12144   cat conftest.err >&5
12145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12146   (exit $ac_status); } && {
12147          test -z "$ac_c_werror_flag" ||
12148          test ! -s conftest.err
12149        } && test -s conftest.$ac_objext; then
12150   ac_header_compiler=yes
12151 else
12152   echo "$as_me: failed program was:" >&5
12153 sed 's/^/| /' conftest.$ac_ext >&5
12154
12155         ac_header_compiler=no
12156 fi
12157
12158 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12159 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12160 echo "${ECHO_T}$ac_header_compiler" >&6; }
12161
12162 # Is the header present?
12163 { echo "$as_me:$LINENO: checking libxslt/xslt.h presence" >&5
12164 echo $ECHO_N "checking libxslt/xslt.h presence... $ECHO_C" >&6; }
12165 cat >conftest.$ac_ext <<_ACEOF
12166 /* confdefs.h.  */
12167 _ACEOF
12168 cat confdefs.h >>conftest.$ac_ext
12169 cat >>conftest.$ac_ext <<_ACEOF
12170 /* end confdefs.h.  */
12171 #include <libxslt/xslt.h>
12172 _ACEOF
12173 if { (ac_try="$ac_cpp conftest.$ac_ext"
12174 case "(($ac_try" in
12175   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12176   *) ac_try_echo=$ac_try;;
12177 esac
12178 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12179   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12180   ac_status=$?
12181   grep -v '^ *+' conftest.er1 >conftest.err
12182   rm -f conftest.er1
12183   cat conftest.err >&5
12184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12185   (exit $ac_status); } >/dev/null && {
12186          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12187          test ! -s conftest.err
12188        }; then
12189   ac_header_preproc=yes
12190 else
12191   echo "$as_me: failed program was:" >&5
12192 sed 's/^/| /' conftest.$ac_ext >&5
12193
12194   ac_header_preproc=no
12195 fi
12196
12197 rm -f conftest.err conftest.$ac_ext
12198 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12199 echo "${ECHO_T}$ac_header_preproc" >&6; }
12200
12201 # So?  What about this header?
12202 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12203   yes:no: )
12204     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: accepted by the compiler, rejected by the preprocessor!" >&5
12205 echo "$as_me: WARNING: libxslt/xslt.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12206     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: proceeding with the compiler's result" >&5
12207 echo "$as_me: WARNING: libxslt/xslt.h: proceeding with the compiler's result" >&2;}
12208     ac_header_preproc=yes
12209     ;;
12210   no:yes:* )
12211     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: present but cannot be compiled" >&5
12212 echo "$as_me: WARNING: libxslt/xslt.h: present but cannot be compiled" >&2;}
12213     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h:     check for missing prerequisite headers?" >&5
12214 echo "$as_me: WARNING: libxslt/xslt.h:     check for missing prerequisite headers?" >&2;}
12215     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: see the Autoconf documentation" >&5
12216 echo "$as_me: WARNING: libxslt/xslt.h: see the Autoconf documentation" >&2;}
12217     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h:     section \"Present But Cannot Be Compiled\"" >&5
12218 echo "$as_me: WARNING: libxslt/xslt.h:     section \"Present But Cannot Be Compiled\"" >&2;}
12219     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: proceeding with the preprocessor's result" >&5
12220 echo "$as_me: WARNING: libxslt/xslt.h: proceeding with the preprocessor's result" >&2;}
12221     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: in the future, the compiler will take precedence" >&5
12222 echo "$as_me: WARNING: libxslt/xslt.h: in the future, the compiler will take precedence" >&2;}
12223     ( cat <<\_ASBOX
12224 ## ---------------------------------------- ##
12225 ## Report this to pgsql-bugs@postgresql.org ##
12226 ## ---------------------------------------- ##
12227 _ASBOX
12228      ) | sed "s/^/$as_me: WARNING:     /" >&2
12229     ;;
12230 esac
12231 { echo "$as_me:$LINENO: checking for libxslt/xslt.h" >&5
12232 echo $ECHO_N "checking for libxslt/xslt.h... $ECHO_C" >&6; }
12233 if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
12234   echo $ECHO_N "(cached) $ECHO_C" >&6
12235 else
12236   ac_cv_header_libxslt_xslt_h=$ac_header_preproc
12237 fi
12238 { echo "$as_me:$LINENO: result: $ac_cv_header_libxslt_xslt_h" >&5
12239 echo "${ECHO_T}$ac_cv_header_libxslt_xslt_h" >&6; }
12240
12241 fi
12242 if test $ac_cv_header_libxslt_xslt_h = yes; then
12243   :
12244 else
12245   { { echo "$as_me:$LINENO: error: header file <libxslt/xslt.h> is required for XSLT support" >&5
12246 echo "$as_me: error: header file <libxslt/xslt.h> is required for XSLT support" >&2;}
12247    { (exit 1); exit 1; }; }
12248 fi
12249
12250
12251 fi
12252
12253 if test "$with_ldap" = yes ; then
12254   if test "$PORTNAME" != "win32"; then
12255
12256 for ac_header in ldap.h
12257 do
12258 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12259 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12260   { echo "$as_me:$LINENO: checking for $ac_header" >&5
12261 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12262 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12263   echo $ECHO_N "(cached) $ECHO_C" >&6
12264 fi
12265 ac_res=`eval echo '${'$as_ac_Header'}'`
12266                { echo "$as_me:$LINENO: result: $ac_res" >&5
12267 echo "${ECHO_T}$ac_res" >&6; }
12268 else
12269   # Is the header compilable?
12270 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
12271 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
12272 cat >conftest.$ac_ext <<_ACEOF
12273 /* confdefs.h.  */
12274 _ACEOF
12275 cat confdefs.h >>conftest.$ac_ext
12276 cat >>conftest.$ac_ext <<_ACEOF
12277 /* end confdefs.h.  */
12278 $ac_includes_default
12279 #include <$ac_header>
12280 _ACEOF
12281 rm -f conftest.$ac_objext
12282 if { (ac_try="$ac_compile"
12283 case "(($ac_try" in
12284   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12285   *) ac_try_echo=$ac_try;;
12286 esac
12287 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12288   (eval "$ac_compile") 2>conftest.er1
12289   ac_status=$?
12290   grep -v '^ *+' conftest.er1 >conftest.err
12291   rm -f conftest.er1
12292   cat conftest.err >&5
12293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12294   (exit $ac_status); } && {
12295          test -z "$ac_c_werror_flag" ||
12296          test ! -s conftest.err
12297        } && test -s conftest.$ac_objext; then
12298   ac_header_compiler=yes
12299 else
12300   echo "$as_me: failed program was:" >&5
12301 sed 's/^/| /' conftest.$ac_ext >&5
12302
12303         ac_header_compiler=no
12304 fi
12305
12306 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12307 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12308 echo "${ECHO_T}$ac_header_compiler" >&6; }
12309
12310 # Is the header present?
12311 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
12312 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
12313 cat >conftest.$ac_ext <<_ACEOF
12314 /* confdefs.h.  */
12315 _ACEOF
12316 cat confdefs.h >>conftest.$ac_ext
12317 cat >>conftest.$ac_ext <<_ACEOF
12318 /* end confdefs.h.  */
12319 #include <$ac_header>
12320 _ACEOF
12321 if { (ac_try="$ac_cpp conftest.$ac_ext"
12322 case "(($ac_try" in
12323   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12324   *) ac_try_echo=$ac_try;;
12325 esac
12326 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12327   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12328   ac_status=$?
12329   grep -v '^ *+' conftest.er1 >conftest.err
12330   rm -f conftest.er1
12331   cat conftest.err >&5
12332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12333   (exit $ac_status); } >/dev/null && {
12334          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12335          test ! -s conftest.err
12336        }; then
12337   ac_header_preproc=yes
12338 else
12339   echo "$as_me: failed program was:" >&5
12340 sed 's/^/| /' conftest.$ac_ext >&5
12341
12342   ac_header_preproc=no
12343 fi
12344
12345 rm -f conftest.err conftest.$ac_ext
12346 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12347 echo "${ECHO_T}$ac_header_preproc" >&6; }
12348
12349 # So?  What about this header?
12350 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12351   yes:no: )
12352     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12353 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12354     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12355 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12356     ac_header_preproc=yes
12357     ;;
12358   no:yes:* )
12359     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12360 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12361     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12362 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12363     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12364 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12365     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12366 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12367     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12368 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12369     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12370 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12371     ( cat <<\_ASBOX
12372 ## ---------------------------------------- ##
12373 ## Report this to pgsql-bugs@postgresql.org ##
12374 ## ---------------------------------------- ##
12375 _ASBOX
12376      ) | sed "s/^/$as_me: WARNING:     /" >&2
12377     ;;
12378 esac
12379 { echo "$as_me:$LINENO: checking for $ac_header" >&5
12380 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12381 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12382   echo $ECHO_N "(cached) $ECHO_C" >&6
12383 else
12384   eval "$as_ac_Header=\$ac_header_preproc"
12385 fi
12386 ac_res=`eval echo '${'$as_ac_Header'}'`
12387                { echo "$as_me:$LINENO: result: $ac_res" >&5
12388 echo "${ECHO_T}$ac_res" >&6; }
12389
12390 fi
12391 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12392   cat >>confdefs.h <<_ACEOF
12393 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12394 _ACEOF
12395
12396 else
12397   { { echo "$as_me:$LINENO: error: header file <ldap.h> is required for LDAP" >&5
12398 echo "$as_me: error: header file <ldap.h> is required for LDAP" >&2;}
12399    { (exit 1); exit 1; }; }
12400 fi
12401
12402 done
12403
12404   else
12405
12406 for ac_header in winldap.h
12407 do
12408 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12409 { echo "$as_me:$LINENO: checking for $ac_header" >&5
12410 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12411 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12412   echo $ECHO_N "(cached) $ECHO_C" >&6
12413 else
12414   cat >conftest.$ac_ext <<_ACEOF
12415 /* confdefs.h.  */
12416 _ACEOF
12417 cat confdefs.h >>conftest.$ac_ext
12418 cat >>conftest.$ac_ext <<_ACEOF
12419 /* end confdefs.h.  */
12420 $ac_includes_default
12421 #include <windows.h>
12422
12423
12424 #include <$ac_header>
12425 _ACEOF
12426 rm -f conftest.$ac_objext
12427 if { (ac_try="$ac_compile"
12428 case "(($ac_try" in
12429   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12430   *) ac_try_echo=$ac_try;;
12431 esac
12432 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12433   (eval "$ac_compile") 2>conftest.er1
12434   ac_status=$?
12435   grep -v '^ *+' conftest.er1 >conftest.err
12436   rm -f conftest.er1
12437   cat conftest.err >&5
12438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12439   (exit $ac_status); } && {
12440          test -z "$ac_c_werror_flag" ||
12441          test ! -s conftest.err
12442        } && test -s conftest.$ac_objext; then
12443   eval "$as_ac_Header=yes"
12444 else
12445   echo "$as_me: failed program was:" >&5
12446 sed 's/^/| /' conftest.$ac_ext >&5
12447
12448         eval "$as_ac_Header=no"
12449 fi
12450
12451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12452 fi
12453 ac_res=`eval echo '${'$as_ac_Header'}'`
12454                { echo "$as_me:$LINENO: result: $ac_res" >&5
12455 echo "${ECHO_T}$ac_res" >&6; }
12456 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12457   cat >>confdefs.h <<_ACEOF
12458 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12459 _ACEOF
12460
12461 else
12462   { { echo "$as_me:$LINENO: error: header file <winldap.h> is required for LDAP" >&5
12463 echo "$as_me: error: header file <winldap.h> is required for LDAP" >&2;}
12464    { (exit 1); exit 1; }; }
12465 fi
12466
12467 done
12468
12469   fi
12470 fi
12471
12472 if test "$with_bonjour" = yes ; then
12473   if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
12474   { echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
12475 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6; }
12476 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
12477   echo $ECHO_N "(cached) $ECHO_C" >&6
12478 fi
12479 { echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
12480 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6; }
12481 else
12482   # Is the header compilable?
12483 { echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h usability" >&5
12484 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h usability... $ECHO_C" >&6; }
12485 cat >conftest.$ac_ext <<_ACEOF
12486 /* confdefs.h.  */
12487 _ACEOF
12488 cat confdefs.h >>conftest.$ac_ext
12489 cat >>conftest.$ac_ext <<_ACEOF
12490 /* end confdefs.h.  */
12491 $ac_includes_default
12492 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
12493 _ACEOF
12494 rm -f conftest.$ac_objext
12495 if { (ac_try="$ac_compile"
12496 case "(($ac_try" in
12497   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12498   *) ac_try_echo=$ac_try;;
12499 esac
12500 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12501   (eval "$ac_compile") 2>conftest.er1
12502   ac_status=$?
12503   grep -v '^ *+' conftest.er1 >conftest.err
12504   rm -f conftest.er1
12505   cat conftest.err >&5
12506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12507   (exit $ac_status); } && {
12508          test -z "$ac_c_werror_flag" ||
12509          test ! -s conftest.err
12510        } && test -s conftest.$ac_objext; then
12511   ac_header_compiler=yes
12512 else
12513   echo "$as_me: failed program was:" >&5
12514 sed 's/^/| /' conftest.$ac_ext >&5
12515
12516         ac_header_compiler=no
12517 fi
12518
12519 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12520 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12521 echo "${ECHO_T}$ac_header_compiler" >&6; }
12522
12523 # Is the header present?
12524 { echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h presence" >&5
12525 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h presence... $ECHO_C" >&6; }
12526 cat >conftest.$ac_ext <<_ACEOF
12527 /* confdefs.h.  */
12528 _ACEOF
12529 cat confdefs.h >>conftest.$ac_ext
12530 cat >>conftest.$ac_ext <<_ACEOF
12531 /* end confdefs.h.  */
12532 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
12533 _ACEOF
12534 if { (ac_try="$ac_cpp conftest.$ac_ext"
12535 case "(($ac_try" in
12536   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12537   *) ac_try_echo=$ac_try;;
12538 esac
12539 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12540   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12541   ac_status=$?
12542   grep -v '^ *+' conftest.er1 >conftest.err
12543   rm -f conftest.er1
12544   cat conftest.err >&5
12545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12546   (exit $ac_status); } >/dev/null && {
12547          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12548          test ! -s conftest.err
12549        }; then
12550   ac_header_preproc=yes
12551 else
12552   echo "$as_me: failed program was:" >&5
12553 sed 's/^/| /' conftest.$ac_ext >&5
12554
12555   ac_header_preproc=no
12556 fi
12557
12558 rm -f conftest.err conftest.$ac_ext
12559 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12560 echo "${ECHO_T}$ac_header_preproc" >&6; }
12561
12562 # So?  What about this header?
12563 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12564   yes:no: )
12565     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&5
12566 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12567     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&5
12568 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&2;}
12569     ac_header_preproc=yes
12570     ;;
12571   no:yes:* )
12572     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&5
12573 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&2;}
12574     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&5
12575 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&2;}
12576     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&5
12577 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&2;}
12578     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&5
12579 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&2;}
12580     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
12581 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;}
12582     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&5
12583 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&2;}
12584     ( cat <<\_ASBOX
12585 ## ---------------------------------------- ##
12586 ## Report this to pgsql-bugs@postgresql.org ##
12587 ## ---------------------------------------- ##
12588 _ASBOX
12589      ) | sed "s/^/$as_me: WARNING:     /" >&2
12590     ;;
12591 esac
12592 { echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
12593 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6; }
12594 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
12595   echo $ECHO_N "(cached) $ECHO_C" >&6
12596 else
12597   ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h=$ac_header_preproc
12598 fi
12599 { echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
12600 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6; }
12601
12602 fi
12603 if test $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h = yes; then
12604   :
12605 else
12606   { { echo "$as_me:$LINENO: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&5
12607 echo "$as_me: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&2;}
12608    { (exit 1); exit 1; }; }
12609 fi
12610
12611
12612 fi
12613
12614 # for contrib/uuid-ossp
12615 if test "$with_ossp_uuid" = yes ; then
12616
12617 for ac_header in ossp/uuid.h
12618 do
12619 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12620 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12621   { echo "$as_me:$LINENO: checking for $ac_header" >&5
12622 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12623 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12624   echo $ECHO_N "(cached) $ECHO_C" >&6
12625 fi
12626 ac_res=`eval echo '${'$as_ac_Header'}'`
12627                { echo "$as_me:$LINENO: result: $ac_res" >&5
12628 echo "${ECHO_T}$ac_res" >&6; }
12629 else
12630   # Is the header compilable?
12631 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
12632 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
12633 cat >conftest.$ac_ext <<_ACEOF
12634 /* confdefs.h.  */
12635 _ACEOF
12636 cat confdefs.h >>conftest.$ac_ext
12637 cat >>conftest.$ac_ext <<_ACEOF
12638 /* end confdefs.h.  */
12639 $ac_includes_default
12640 #include <$ac_header>
12641 _ACEOF
12642 rm -f conftest.$ac_objext
12643 if { (ac_try="$ac_compile"
12644 case "(($ac_try" in
12645   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12646   *) ac_try_echo=$ac_try;;
12647 esac
12648 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12649   (eval "$ac_compile") 2>conftest.er1
12650   ac_status=$?
12651   grep -v '^ *+' conftest.er1 >conftest.err
12652   rm -f conftest.er1
12653   cat conftest.err >&5
12654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12655   (exit $ac_status); } && {
12656          test -z "$ac_c_werror_flag" ||
12657          test ! -s conftest.err
12658        } && test -s conftest.$ac_objext; then
12659   ac_header_compiler=yes
12660 else
12661   echo "$as_me: failed program was:" >&5
12662 sed 's/^/| /' conftest.$ac_ext >&5
12663
12664         ac_header_compiler=no
12665 fi
12666
12667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12668 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12669 echo "${ECHO_T}$ac_header_compiler" >&6; }
12670
12671 # Is the header present?
12672 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
12673 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
12674 cat >conftest.$ac_ext <<_ACEOF
12675 /* confdefs.h.  */
12676 _ACEOF
12677 cat confdefs.h >>conftest.$ac_ext
12678 cat >>conftest.$ac_ext <<_ACEOF
12679 /* end confdefs.h.  */
12680 #include <$ac_header>
12681 _ACEOF
12682 if { (ac_try="$ac_cpp conftest.$ac_ext"
12683 case "(($ac_try" in
12684   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12685   *) ac_try_echo=$ac_try;;
12686 esac
12687 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12688   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12689   ac_status=$?
12690   grep -v '^ *+' conftest.er1 >conftest.err
12691   rm -f conftest.er1
12692   cat conftest.err >&5
12693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12694   (exit $ac_status); } >/dev/null && {
12695          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12696          test ! -s conftest.err
12697        }; then
12698   ac_header_preproc=yes
12699 else
12700   echo "$as_me: failed program was:" >&5
12701 sed 's/^/| /' conftest.$ac_ext >&5
12702
12703   ac_header_preproc=no
12704 fi
12705
12706 rm -f conftest.err conftest.$ac_ext
12707 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12708 echo "${ECHO_T}$ac_header_preproc" >&6; }
12709
12710 # So?  What about this header?
12711 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12712   yes:no: )
12713     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12714 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12715     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12716 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12717     ac_header_preproc=yes
12718     ;;
12719   no:yes:* )
12720     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12721 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12722     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12723 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12724     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12725 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12726     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12727 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12728     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12729 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12730     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12731 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12732     ( cat <<\_ASBOX
12733 ## ---------------------------------------- ##
12734 ## Report this to pgsql-bugs@postgresql.org ##
12735 ## ---------------------------------------- ##
12736 _ASBOX
12737      ) | sed "s/^/$as_me: WARNING:     /" >&2
12738     ;;
12739 esac
12740 { echo "$as_me:$LINENO: checking for $ac_header" >&5
12741 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12742 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12743   echo $ECHO_N "(cached) $ECHO_C" >&6
12744 else
12745   eval "$as_ac_Header=\$ac_header_preproc"
12746 fi
12747 ac_res=`eval echo '${'$as_ac_Header'}'`
12748                { echo "$as_me:$LINENO: result: $ac_res" >&5
12749 echo "${ECHO_T}$ac_res" >&6; }
12750
12751 fi
12752 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12753   cat >>confdefs.h <<_ACEOF
12754 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12755 _ACEOF
12756
12757 else
12758
12759
12760 for ac_header in uuid.h
12761 do
12762 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12763 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12764   { echo "$as_me:$LINENO: checking for $ac_header" >&5
12765 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12766 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12767   echo $ECHO_N "(cached) $ECHO_C" >&6
12768 fi
12769 ac_res=`eval echo '${'$as_ac_Header'}'`
12770                { echo "$as_me:$LINENO: result: $ac_res" >&5
12771 echo "${ECHO_T}$ac_res" >&6; }
12772 else
12773   # Is the header compilable?
12774 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
12775 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
12776 cat >conftest.$ac_ext <<_ACEOF
12777 /* confdefs.h.  */
12778 _ACEOF
12779 cat confdefs.h >>conftest.$ac_ext
12780 cat >>conftest.$ac_ext <<_ACEOF
12781 /* end confdefs.h.  */
12782 $ac_includes_default
12783 #include <$ac_header>
12784 _ACEOF
12785 rm -f conftest.$ac_objext
12786 if { (ac_try="$ac_compile"
12787 case "(($ac_try" in
12788   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12789   *) ac_try_echo=$ac_try;;
12790 esac
12791 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12792   (eval "$ac_compile") 2>conftest.er1
12793   ac_status=$?
12794   grep -v '^ *+' conftest.er1 >conftest.err
12795   rm -f conftest.er1
12796   cat conftest.err >&5
12797   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12798   (exit $ac_status); } && {
12799          test -z "$ac_c_werror_flag" ||
12800          test ! -s conftest.err
12801        } && test -s conftest.$ac_objext; then
12802   ac_header_compiler=yes
12803 else
12804   echo "$as_me: failed program was:" >&5
12805 sed 's/^/| /' conftest.$ac_ext >&5
12806
12807         ac_header_compiler=no
12808 fi
12809
12810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12811 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12812 echo "${ECHO_T}$ac_header_compiler" >&6; }
12813
12814 # Is the header present?
12815 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
12816 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
12817 cat >conftest.$ac_ext <<_ACEOF
12818 /* confdefs.h.  */
12819 _ACEOF
12820 cat confdefs.h >>conftest.$ac_ext
12821 cat >>conftest.$ac_ext <<_ACEOF
12822 /* end confdefs.h.  */
12823 #include <$ac_header>
12824 _ACEOF
12825 if { (ac_try="$ac_cpp conftest.$ac_ext"
12826 case "(($ac_try" in
12827   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12828   *) ac_try_echo=$ac_try;;
12829 esac
12830 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12831   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12832   ac_status=$?
12833   grep -v '^ *+' conftest.er1 >conftest.err
12834   rm -f conftest.er1
12835   cat conftest.err >&5
12836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12837   (exit $ac_status); } >/dev/null && {
12838          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12839          test ! -s conftest.err
12840        }; then
12841   ac_header_preproc=yes
12842 else
12843   echo "$as_me: failed program was:" >&5
12844 sed 's/^/| /' conftest.$ac_ext >&5
12845
12846   ac_header_preproc=no
12847 fi
12848
12849 rm -f conftest.err conftest.$ac_ext
12850 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12851 echo "${ECHO_T}$ac_header_preproc" >&6; }
12852
12853 # So?  What about this header?
12854 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12855   yes:no: )
12856     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12857 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12858     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12859 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12860     ac_header_preproc=yes
12861     ;;
12862   no:yes:* )
12863     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12864 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12865     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12866 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12867     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12868 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12869     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12870 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12871     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12872 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12873     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12874 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12875     ( cat <<\_ASBOX
12876 ## ---------------------------------------- ##
12877 ## Report this to pgsql-bugs@postgresql.org ##
12878 ## ---------------------------------------- ##
12879 _ASBOX
12880      ) | sed "s/^/$as_me: WARNING:     /" >&2
12881     ;;
12882 esac
12883 { echo "$as_me:$LINENO: checking for $ac_header" >&5
12884 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12885 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12886   echo $ECHO_N "(cached) $ECHO_C" >&6
12887 else
12888   eval "$as_ac_Header=\$ac_header_preproc"
12889 fi
12890 ac_res=`eval echo '${'$as_ac_Header'}'`
12891                { echo "$as_me:$LINENO: result: $ac_res" >&5
12892 echo "${ECHO_T}$ac_res" >&6; }
12893
12894 fi
12895 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12896   cat >>confdefs.h <<_ACEOF
12897 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12898 _ACEOF
12899
12900 else
12901   { { echo "$as_me:$LINENO: error: header file <ossp/uuid.h> or <uuid.h> is required for OSSP-UUID" >&5
12902 echo "$as_me: error: header file <ossp/uuid.h> or <uuid.h> is required for OSSP-UUID" >&2;}
12903    { (exit 1); exit 1; }; }
12904 fi
12905
12906 done
12907
12908 fi
12909
12910 done
12911
12912 fi
12913
12914
12915 ##
12916 ## Types, structures, compiler characteristics
12917 ##
12918
12919  { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
12920 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
12921 if test "${ac_cv_c_bigendian+set}" = set; then
12922   echo $ECHO_N "(cached) $ECHO_C" >&6
12923 else
12924   # See if sys/param.h defines the BYTE_ORDER macro.
12925 cat >conftest.$ac_ext <<_ACEOF
12926 /* confdefs.h.  */
12927 _ACEOF
12928 cat confdefs.h >>conftest.$ac_ext
12929 cat >>conftest.$ac_ext <<_ACEOF
12930 /* end confdefs.h.  */
12931 #include <sys/types.h>
12932 #include <sys/param.h>
12933
12934 int
12935 main ()
12936 {
12937 #if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
12938         && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
12939  bogus endian macros
12940 #endif
12941
12942   ;
12943   return 0;
12944 }
12945 _ACEOF
12946 rm -f conftest.$ac_objext
12947 if { (ac_try="$ac_compile"
12948 case "(($ac_try" in
12949   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12950   *) ac_try_echo=$ac_try;;
12951 esac
12952 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12953   (eval "$ac_compile") 2>conftest.er1
12954   ac_status=$?
12955   grep -v '^ *+' conftest.er1 >conftest.err
12956   rm -f conftest.er1
12957   cat conftest.err >&5
12958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12959   (exit $ac_status); } && {
12960          test -z "$ac_c_werror_flag" ||
12961          test ! -s conftest.err
12962        } && test -s conftest.$ac_objext; then
12963   # It does; now see whether it defined to BIG_ENDIAN or not.
12964 cat >conftest.$ac_ext <<_ACEOF
12965 /* confdefs.h.  */
12966 _ACEOF
12967 cat confdefs.h >>conftest.$ac_ext
12968 cat >>conftest.$ac_ext <<_ACEOF
12969 /* end confdefs.h.  */
12970 #include <sys/types.h>
12971 #include <sys/param.h>
12972
12973 int
12974 main ()
12975 {
12976 #if BYTE_ORDER != BIG_ENDIAN
12977  not big endian
12978 #endif
12979
12980   ;
12981   return 0;
12982 }
12983 _ACEOF
12984 rm -f conftest.$ac_objext
12985 if { (ac_try="$ac_compile"
12986 case "(($ac_try" in
12987   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12988   *) ac_try_echo=$ac_try;;
12989 esac
12990 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12991   (eval "$ac_compile") 2>conftest.er1
12992   ac_status=$?
12993   grep -v '^ *+' conftest.er1 >conftest.err
12994   rm -f conftest.er1
12995   cat conftest.err >&5
12996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12997   (exit $ac_status); } && {
12998          test -z "$ac_c_werror_flag" ||
12999          test ! -s conftest.err
13000        } && test -s conftest.$ac_objext; then
13001   ac_cv_c_bigendian=yes
13002 else
13003   echo "$as_me: failed program was:" >&5
13004 sed 's/^/| /' conftest.$ac_ext >&5
13005
13006         ac_cv_c_bigendian=no
13007 fi
13008
13009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13010 else
13011   echo "$as_me: failed program was:" >&5
13012 sed 's/^/| /' conftest.$ac_ext >&5
13013
13014         # It does not; compile a test program.
13015 if test "$cross_compiling" = yes; then
13016   # try to guess the endianness by grepping values into an object file
13017   ac_cv_c_bigendian=unknown
13018   cat >conftest.$ac_ext <<_ACEOF
13019 /* confdefs.h.  */
13020 _ACEOF
13021 cat confdefs.h >>conftest.$ac_ext
13022 cat >>conftest.$ac_ext <<_ACEOF
13023 /* end confdefs.h.  */
13024 short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13025 short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13026 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
13027 short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13028 short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13029 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
13030 int
13031 main ()
13032 {
13033  _ascii (); _ebcdic ();
13034   ;
13035   return 0;
13036 }
13037 _ACEOF
13038 rm -f conftest.$ac_objext
13039 if { (ac_try="$ac_compile"
13040 case "(($ac_try" in
13041   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13042   *) ac_try_echo=$ac_try;;
13043 esac
13044 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13045   (eval "$ac_compile") 2>conftest.er1
13046   ac_status=$?
13047   grep -v '^ *+' conftest.er1 >conftest.err
13048   rm -f conftest.er1
13049   cat conftest.err >&5
13050   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13051   (exit $ac_status); } && {
13052          test -z "$ac_c_werror_flag" ||
13053          test ! -s conftest.err
13054        } && test -s conftest.$ac_objext; then
13055   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
13056   ac_cv_c_bigendian=yes
13057 fi
13058 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13059   if test "$ac_cv_c_bigendian" = unknown; then
13060     ac_cv_c_bigendian=no
13061   else
13062     # finding both strings is unlikely to happen, but who knows?
13063     ac_cv_c_bigendian=unknown
13064   fi
13065 fi
13066 else
13067   echo "$as_me: failed program was:" >&5
13068 sed 's/^/| /' conftest.$ac_ext >&5
13069
13070
13071 fi
13072
13073 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13074 else
13075   cat >conftest.$ac_ext <<_ACEOF
13076 /* confdefs.h.  */
13077 _ACEOF
13078 cat confdefs.h >>conftest.$ac_ext
13079 cat >>conftest.$ac_ext <<_ACEOF
13080 /* end confdefs.h.  */
13081 $ac_includes_default
13082 int
13083 main ()
13084 {
13085
13086   /* Are we little or big endian?  From Harbison&Steele.  */
13087   union
13088   {
13089     long int l;
13090     char c[sizeof (long int)];
13091   } u;
13092   u.l = 1;
13093   return u.c[sizeof (long int) - 1] == 1;
13094
13095   ;
13096   return 0;
13097 }
13098 _ACEOF
13099 rm -f conftest$ac_exeext
13100 if { (ac_try="$ac_link"
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_link") 2>&5
13107   ac_status=$?
13108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13109   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13110   { (case "(($ac_try" in
13111   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13112   *) ac_try_echo=$ac_try;;
13113 esac
13114 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13115   (eval "$ac_try") 2>&5
13116   ac_status=$?
13117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13118   (exit $ac_status); }; }; then
13119   ac_cv_c_bigendian=no
13120 else
13121   echo "$as_me: program exited with status $ac_status" >&5
13122 echo "$as_me: failed program was:" >&5
13123 sed 's/^/| /' conftest.$ac_ext >&5
13124
13125 ( exit $ac_status )
13126 ac_cv_c_bigendian=yes
13127 fi
13128 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13129 fi
13130
13131
13132 fi
13133
13134 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13135 fi
13136 { echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
13137 echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
13138 case $ac_cv_c_bigendian in
13139   yes)
13140
13141 cat >>confdefs.h <<\_ACEOF
13142 #define WORDS_BIGENDIAN 1
13143 _ACEOF
13144  ;;
13145   no)
13146      ;;
13147   *)
13148     { { echo "$as_me:$LINENO: error: unknown endianness
13149 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
13150 echo "$as_me: error: unknown endianness
13151 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
13152    { (exit 1); exit 1; }; } ;;
13153 esac
13154
13155 { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13156 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
13157 if test "${ac_cv_c_const+set}" = set; then
13158   echo $ECHO_N "(cached) $ECHO_C" >&6
13159 else
13160   cat >conftest.$ac_ext <<_ACEOF
13161 /* confdefs.h.  */
13162 _ACEOF
13163 cat confdefs.h >>conftest.$ac_ext
13164 cat >>conftest.$ac_ext <<_ACEOF
13165 /* end confdefs.h.  */
13166
13167 int
13168 main ()
13169 {
13170 /* FIXME: Include the comments suggested by Paul. */
13171 #ifndef __cplusplus
13172   /* Ultrix mips cc rejects this.  */
13173   typedef int charset[2];
13174   const charset cs;
13175   /* SunOS 4.1.1 cc rejects this.  */
13176   char const *const *pcpcc;
13177   char **ppc;
13178   /* NEC SVR4.0.2 mips cc rejects this.  */
13179   struct point {int x, y;};
13180   static struct point const zero = {0,0};
13181   /* AIX XL C 1.02.0.0 rejects this.
13182      It does not let you subtract one const X* pointer from another in
13183      an arm of an if-expression whose if-part is not a constant
13184      expression */
13185   const char *g = "string";
13186   pcpcc = &g + (g ? g-g : 0);
13187   /* HPUX 7.0 cc rejects these. */
13188   ++pcpcc;
13189   ppc = (char**) pcpcc;
13190   pcpcc = (char const *const *) ppc;
13191   { /* SCO 3.2v4 cc rejects this.  */
13192     char *t;
13193     char const *s = 0 ? (char *) 0 : (char const *) 0;
13194
13195     *t++ = 0;
13196     if (s) return 0;
13197   }
13198   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13199     int x[] = {25, 17};
13200     const int *foo = &x[0];
13201     ++foo;
13202   }
13203   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13204     typedef const int *iptr;
13205     iptr p = 0;
13206     ++p;
13207   }
13208   { /* AIX XL C 1.02.0.0 rejects this saying
13209        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13210     struct s { int j; const int *ap[3]; };
13211     struct s *b; b->j = 5;
13212   }
13213   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13214     const int foo = 10;
13215     if (!foo) return 0;
13216   }
13217   return !cs[0] && !zero.x;
13218 #endif
13219
13220   ;
13221   return 0;
13222 }
13223 _ACEOF
13224 rm -f conftest.$ac_objext
13225 if { (ac_try="$ac_compile"
13226 case "(($ac_try" in
13227   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13228   *) ac_try_echo=$ac_try;;
13229 esac
13230 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13231   (eval "$ac_compile") 2>conftest.er1
13232   ac_status=$?
13233   grep -v '^ *+' conftest.er1 >conftest.err
13234   rm -f conftest.er1
13235   cat conftest.err >&5
13236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13237   (exit $ac_status); } && {
13238          test -z "$ac_c_werror_flag" ||
13239          test ! -s conftest.err
13240        } && test -s conftest.$ac_objext; then
13241   ac_cv_c_const=yes
13242 else
13243   echo "$as_me: failed program was:" >&5
13244 sed 's/^/| /' conftest.$ac_ext >&5
13245
13246         ac_cv_c_const=no
13247 fi
13248
13249 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13250 fi
13251 { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13252 echo "${ECHO_T}$ac_cv_c_const" >&6; }
13253 if test $ac_cv_c_const = no; then
13254
13255 cat >>confdefs.h <<\_ACEOF
13256 #define const
13257 _ACEOF
13258
13259 fi
13260
13261 { echo "$as_me:$LINENO: checking for inline" >&5
13262 echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
13263 if test "${ac_cv_c_inline+set}" = set; then
13264   echo $ECHO_N "(cached) $ECHO_C" >&6
13265 else
13266   ac_cv_c_inline=no
13267 for ac_kw in inline __inline__ __inline; do
13268   cat >conftest.$ac_ext <<_ACEOF
13269 /* confdefs.h.  */
13270 _ACEOF
13271 cat confdefs.h >>conftest.$ac_ext
13272 cat >>conftest.$ac_ext <<_ACEOF
13273 /* end confdefs.h.  */
13274 #ifndef __cplusplus
13275 typedef int foo_t;
13276 static $ac_kw foo_t static_foo () {return 0; }
13277 $ac_kw foo_t foo () {return 0; }
13278 #endif
13279
13280 _ACEOF
13281 rm -f conftest.$ac_objext
13282 if { (ac_try="$ac_compile"
13283 case "(($ac_try" in
13284   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13285   *) ac_try_echo=$ac_try;;
13286 esac
13287 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13288   (eval "$ac_compile") 2>conftest.er1
13289   ac_status=$?
13290   grep -v '^ *+' conftest.er1 >conftest.err
13291   rm -f conftest.er1
13292   cat conftest.err >&5
13293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13294   (exit $ac_status); } && {
13295          test -z "$ac_c_werror_flag" ||
13296          test ! -s conftest.err
13297        } && test -s conftest.$ac_objext; then
13298   ac_cv_c_inline=$ac_kw
13299 else
13300   echo "$as_me: failed program was:" >&5
13301 sed 's/^/| /' conftest.$ac_ext >&5
13302
13303
13304 fi
13305
13306 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13307   test "$ac_cv_c_inline" != no && break
13308 done
13309
13310 fi
13311 { echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
13312 echo "${ECHO_T}$ac_cv_c_inline" >&6; }
13313
13314
13315 case $ac_cv_c_inline in
13316   inline | yes) ;;
13317   *)
13318     case $ac_cv_c_inline in
13319       no) ac_val=;;
13320       *) ac_val=$ac_cv_c_inline;;
13321     esac
13322     cat >>confdefs.h <<_ACEOF
13323 #ifndef __cplusplus
13324 #define inline $ac_val
13325 #endif
13326 _ACEOF
13327     ;;
13328 esac
13329
13330 { echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
13331 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6; }
13332 if test "${ac_cv_c_stringize+set}" = set; then
13333   echo $ECHO_N "(cached) $ECHO_C" >&6
13334 else
13335   cat >conftest.$ac_ext <<_ACEOF
13336 /* confdefs.h.  */
13337 _ACEOF
13338 cat confdefs.h >>conftest.$ac_ext
13339 cat >>conftest.$ac_ext <<_ACEOF
13340 /* end confdefs.h.  */
13341 #define x(y) #y
13342
13343 char *s = x(teststring);
13344 _ACEOF
13345 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13346   $EGREP "#teststring" >/dev/null 2>&1; then
13347   ac_cv_c_stringize=no
13348 else
13349   ac_cv_c_stringize=yes
13350 fi
13351 rm -f conftest*
13352
13353 fi
13354 { echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
13355 echo "${ECHO_T}$ac_cv_c_stringize" >&6; }
13356 if test $ac_cv_c_stringize = yes; then
13357
13358 cat >>confdefs.h <<\_ACEOF
13359 #define HAVE_STRINGIZE 1
13360 _ACEOF
13361
13362 fi
13363
13364 { echo "$as_me:$LINENO: checking for signed types" >&5
13365 echo $ECHO_N "checking for signed types... $ECHO_C" >&6; }
13366 if test "${pgac_cv_c_signed+set}" = set; then
13367   echo $ECHO_N "(cached) $ECHO_C" >&6
13368 else
13369   cat >conftest.$ac_ext <<_ACEOF
13370 /* confdefs.h.  */
13371 _ACEOF
13372 cat confdefs.h >>conftest.$ac_ext
13373 cat >>conftest.$ac_ext <<_ACEOF
13374 /* end confdefs.h.  */
13375
13376 int
13377 main ()
13378 {
13379 signed char c; signed short s; signed int i;
13380   ;
13381   return 0;
13382 }
13383 _ACEOF
13384 rm -f conftest.$ac_objext
13385 if { (ac_try="$ac_compile"
13386 case "(($ac_try" in
13387   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13388   *) ac_try_echo=$ac_try;;
13389 esac
13390 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13391   (eval "$ac_compile") 2>conftest.er1
13392   ac_status=$?
13393   grep -v '^ *+' conftest.er1 >conftest.err
13394   rm -f conftest.er1
13395   cat conftest.err >&5
13396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13397   (exit $ac_status); } && {
13398          test -z "$ac_c_werror_flag" ||
13399          test ! -s conftest.err
13400        } && test -s conftest.$ac_objext; then
13401   pgac_cv_c_signed=yes
13402 else
13403   echo "$as_me: failed program was:" >&5
13404 sed 's/^/| /' conftest.$ac_ext >&5
13405
13406         pgac_cv_c_signed=no
13407 fi
13408
13409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13410 fi
13411 { echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
13412 echo "${ECHO_T}$pgac_cv_c_signed" >&6; }
13413 if test x"$pgac_cv_c_signed" = xno ; then
13414
13415 cat >>confdefs.h <<\_ACEOF
13416 #define signed
13417 _ACEOF
13418
13419 fi
13420 { echo "$as_me:$LINENO: checking for working volatile" >&5
13421 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
13422 if test "${ac_cv_c_volatile+set}" = set; then
13423   echo $ECHO_N "(cached) $ECHO_C" >&6
13424 else
13425   cat >conftest.$ac_ext <<_ACEOF
13426 /* confdefs.h.  */
13427 _ACEOF
13428 cat confdefs.h >>conftest.$ac_ext
13429 cat >>conftest.$ac_ext <<_ACEOF
13430 /* end confdefs.h.  */
13431
13432 int
13433 main ()
13434 {
13435
13436 volatile int x;
13437 int * volatile y = (int *) 0;
13438 return !x && !y;
13439   ;
13440   return 0;
13441 }
13442 _ACEOF
13443 rm -f conftest.$ac_objext
13444 if { (ac_try="$ac_compile"
13445 case "(($ac_try" in
13446   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13447   *) ac_try_echo=$ac_try;;
13448 esac
13449 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13450   (eval "$ac_compile") 2>conftest.er1
13451   ac_status=$?
13452   grep -v '^ *+' conftest.er1 >conftest.err
13453   rm -f conftest.er1
13454   cat conftest.err >&5
13455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13456   (exit $ac_status); } && {
13457          test -z "$ac_c_werror_flag" ||
13458          test ! -s conftest.err
13459        } && test -s conftest.$ac_objext; then
13460   ac_cv_c_volatile=yes
13461 else
13462   echo "$as_me: failed program was:" >&5
13463 sed 's/^/| /' conftest.$ac_ext >&5
13464
13465         ac_cv_c_volatile=no
13466 fi
13467
13468 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13469 fi
13470 { echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
13471 echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
13472 if test $ac_cv_c_volatile = no; then
13473
13474 cat >>confdefs.h <<\_ACEOF
13475 #define volatile
13476 _ACEOF
13477
13478 fi
13479
13480 { echo "$as_me:$LINENO: checking for __func__" >&5
13481 echo $ECHO_N "checking for __func__... $ECHO_C" >&6; }
13482 if test "${pgac_cv_funcname_func_support+set}" = set; then
13483   echo $ECHO_N "(cached) $ECHO_C" >&6
13484 else
13485   cat >conftest.$ac_ext <<_ACEOF
13486 /* confdefs.h.  */
13487 _ACEOF
13488 cat confdefs.h >>conftest.$ac_ext
13489 cat >>conftest.$ac_ext <<_ACEOF
13490 /* end confdefs.h.  */
13491 #include <stdio.h>
13492 int
13493 main ()
13494 {
13495 printf("%s\n", __func__);
13496   ;
13497   return 0;
13498 }
13499 _ACEOF
13500 rm -f conftest.$ac_objext
13501 if { (ac_try="$ac_compile"
13502 case "(($ac_try" in
13503   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13504   *) ac_try_echo=$ac_try;;
13505 esac
13506 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13507   (eval "$ac_compile") 2>conftest.er1
13508   ac_status=$?
13509   grep -v '^ *+' conftest.er1 >conftest.err
13510   rm -f conftest.er1
13511   cat conftest.err >&5
13512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13513   (exit $ac_status); } && {
13514          test -z "$ac_c_werror_flag" ||
13515          test ! -s conftest.err
13516        } && test -s conftest.$ac_objext; then
13517   pgac_cv_funcname_func_support=yes
13518 else
13519   echo "$as_me: failed program was:" >&5
13520 sed 's/^/| /' conftest.$ac_ext >&5
13521
13522         pgac_cv_funcname_func_support=no
13523 fi
13524
13525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13526 fi
13527 { echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
13528 echo "${ECHO_T}$pgac_cv_funcname_func_support" >&6; }
13529 if test x"$pgac_cv_funcname_func_support" = xyes ; then
13530
13531 cat >>confdefs.h <<\_ACEOF
13532 #define HAVE_FUNCNAME__FUNC 1
13533 _ACEOF
13534
13535 else
13536 { echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
13537 echo $ECHO_N "checking for __FUNCTION__... $ECHO_C" >&6; }
13538 if test "${pgac_cv_funcname_function_support+set}" = set; then
13539   echo $ECHO_N "(cached) $ECHO_C" >&6
13540 else
13541   cat >conftest.$ac_ext <<_ACEOF
13542 /* confdefs.h.  */
13543 _ACEOF
13544 cat confdefs.h >>conftest.$ac_ext
13545 cat >>conftest.$ac_ext <<_ACEOF
13546 /* end confdefs.h.  */
13547 #include <stdio.h>
13548 int
13549 main ()
13550 {
13551 printf("%s\n", __FUNCTION__);
13552   ;
13553   return 0;
13554 }
13555 _ACEOF
13556 rm -f conftest.$ac_objext
13557 if { (ac_try="$ac_compile"
13558 case "(($ac_try" in
13559   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13560   *) ac_try_echo=$ac_try;;
13561 esac
13562 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13563   (eval "$ac_compile") 2>conftest.er1
13564   ac_status=$?
13565   grep -v '^ *+' conftest.er1 >conftest.err
13566   rm -f conftest.er1
13567   cat conftest.err >&5
13568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13569   (exit $ac_status); } && {
13570          test -z "$ac_c_werror_flag" ||
13571          test ! -s conftest.err
13572        } && test -s conftest.$ac_objext; then
13573   pgac_cv_funcname_function_support=yes
13574 else
13575   echo "$as_me: failed program was:" >&5
13576 sed 's/^/| /' conftest.$ac_ext >&5
13577
13578         pgac_cv_funcname_function_support=no
13579 fi
13580
13581 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13582 fi
13583 { echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
13584 echo "${ECHO_T}$pgac_cv_funcname_function_support" >&6; }
13585 if test x"$pgac_cv_funcname_function_support" = xyes ; then
13586
13587 cat >>confdefs.h <<\_ACEOF
13588 #define HAVE_FUNCNAME__FUNCTION 1
13589 _ACEOF
13590
13591 fi
13592 fi
13593 { echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
13594 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
13595 if test "${ac_cv_struct_tm+set}" = set; then
13596   echo $ECHO_N "(cached) $ECHO_C" >&6
13597 else
13598   cat >conftest.$ac_ext <<_ACEOF
13599 /* confdefs.h.  */
13600 _ACEOF
13601 cat confdefs.h >>conftest.$ac_ext
13602 cat >>conftest.$ac_ext <<_ACEOF
13603 /* end confdefs.h.  */
13604 #include <sys/types.h>
13605 #include <time.h>
13606
13607 int
13608 main ()
13609 {
13610 struct tm tm;
13611                                      int *p = &tm.tm_sec;
13612                                      return !p;
13613   ;
13614   return 0;
13615 }
13616 _ACEOF
13617 rm -f conftest.$ac_objext
13618 if { (ac_try="$ac_compile"
13619 case "(($ac_try" in
13620   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13621   *) ac_try_echo=$ac_try;;
13622 esac
13623 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13624   (eval "$ac_compile") 2>conftest.er1
13625   ac_status=$?
13626   grep -v '^ *+' conftest.er1 >conftest.err
13627   rm -f conftest.er1
13628   cat conftest.err >&5
13629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13630   (exit $ac_status); } && {
13631          test -z "$ac_c_werror_flag" ||
13632          test ! -s conftest.err
13633        } && test -s conftest.$ac_objext; then
13634   ac_cv_struct_tm=time.h
13635 else
13636   echo "$as_me: failed program was:" >&5
13637 sed 's/^/| /' conftest.$ac_ext >&5
13638
13639         ac_cv_struct_tm=sys/time.h
13640 fi
13641
13642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13643 fi
13644 { echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
13645 echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
13646 if test $ac_cv_struct_tm = sys/time.h; then
13647
13648 cat >>confdefs.h <<\_ACEOF
13649 #define TM_IN_SYS_TIME 1
13650 _ACEOF
13651
13652 fi
13653
13654 { echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
13655 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
13656 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
13657   echo $ECHO_N "(cached) $ECHO_C" >&6
13658 else
13659   cat >conftest.$ac_ext <<_ACEOF
13660 /* confdefs.h.  */
13661 _ACEOF
13662 cat confdefs.h >>conftest.$ac_ext
13663 cat >>conftest.$ac_ext <<_ACEOF
13664 /* end confdefs.h.  */
13665 #include <sys/types.h>
13666 #include <$ac_cv_struct_tm>
13667
13668
13669 int
13670 main ()
13671 {
13672 static struct tm ac_aggr;
13673 if (ac_aggr.tm_zone)
13674 return 0;
13675   ;
13676   return 0;
13677 }
13678 _ACEOF
13679 rm -f conftest.$ac_objext
13680 if { (ac_try="$ac_compile"
13681 case "(($ac_try" in
13682   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13683   *) ac_try_echo=$ac_try;;
13684 esac
13685 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13686   (eval "$ac_compile") 2>conftest.er1
13687   ac_status=$?
13688   grep -v '^ *+' conftest.er1 >conftest.err
13689   rm -f conftest.er1
13690   cat conftest.err >&5
13691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13692   (exit $ac_status); } && {
13693          test -z "$ac_c_werror_flag" ||
13694          test ! -s conftest.err
13695        } && test -s conftest.$ac_objext; then
13696   ac_cv_member_struct_tm_tm_zone=yes
13697 else
13698   echo "$as_me: failed program was:" >&5
13699 sed 's/^/| /' conftest.$ac_ext >&5
13700
13701         cat >conftest.$ac_ext <<_ACEOF
13702 /* confdefs.h.  */
13703 _ACEOF
13704 cat confdefs.h >>conftest.$ac_ext
13705 cat >>conftest.$ac_ext <<_ACEOF
13706 /* end confdefs.h.  */
13707 #include <sys/types.h>
13708 #include <$ac_cv_struct_tm>
13709
13710
13711 int
13712 main ()
13713 {
13714 static struct tm ac_aggr;
13715 if (sizeof ac_aggr.tm_zone)
13716 return 0;
13717   ;
13718   return 0;
13719 }
13720 _ACEOF
13721 rm -f conftest.$ac_objext
13722 if { (ac_try="$ac_compile"
13723 case "(($ac_try" in
13724   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13725   *) ac_try_echo=$ac_try;;
13726 esac
13727 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13728   (eval "$ac_compile") 2>conftest.er1
13729   ac_status=$?
13730   grep -v '^ *+' conftest.er1 >conftest.err
13731   rm -f conftest.er1
13732   cat conftest.err >&5
13733   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13734   (exit $ac_status); } && {
13735          test -z "$ac_c_werror_flag" ||
13736          test ! -s conftest.err
13737        } && test -s conftest.$ac_objext; then
13738   ac_cv_member_struct_tm_tm_zone=yes
13739 else
13740   echo "$as_me: failed program was:" >&5
13741 sed 's/^/| /' conftest.$ac_ext >&5
13742
13743         ac_cv_member_struct_tm_tm_zone=no
13744 fi
13745
13746 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13747 fi
13748
13749 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13750 fi
13751 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
13752 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
13753 if test $ac_cv_member_struct_tm_tm_zone = yes; then
13754
13755 cat >>confdefs.h <<_ACEOF
13756 #define HAVE_STRUCT_TM_TM_ZONE 1
13757 _ACEOF
13758
13759
13760 fi
13761
13762 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13763
13764 cat >>confdefs.h <<\_ACEOF
13765 #define HAVE_TM_ZONE 1
13766 _ACEOF
13767
13768 fi
13769 { echo "$as_me:$LINENO: checking for tzname" >&5
13770 echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
13771 if test "${ac_cv_var_tzname+set}" = set; then
13772   echo $ECHO_N "(cached) $ECHO_C" >&6
13773 else
13774   cat >conftest.$ac_ext <<_ACEOF
13775 /* confdefs.h.  */
13776 _ACEOF
13777 cat confdefs.h >>conftest.$ac_ext
13778 cat >>conftest.$ac_ext <<_ACEOF
13779 /* end confdefs.h.  */
13780 #include <time.h>
13781 #ifndef tzname /* For SGI.  */
13782 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
13783 #endif
13784
13785 int
13786 main ()
13787 {
13788 atoi(*tzname);
13789   ;
13790   return 0;
13791 }
13792 _ACEOF
13793 rm -f conftest.$ac_objext conftest$ac_exeext
13794 if { (ac_try="$ac_link"
13795 case "(($ac_try" in
13796   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13797   *) ac_try_echo=$ac_try;;
13798 esac
13799 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13800   (eval "$ac_link") 2>conftest.er1
13801   ac_status=$?
13802   grep -v '^ *+' conftest.er1 >conftest.err
13803   rm -f conftest.er1
13804   cat conftest.err >&5
13805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13806   (exit $ac_status); } && {
13807          test -z "$ac_c_werror_flag" ||
13808          test ! -s conftest.err
13809        } && test -s conftest$ac_exeext &&
13810        $as_test_x conftest$ac_exeext; then
13811   ac_cv_var_tzname=yes
13812 else
13813   echo "$as_me: failed program was:" >&5
13814 sed 's/^/| /' conftest.$ac_ext >&5
13815
13816         ac_cv_var_tzname=no
13817 fi
13818
13819 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13820       conftest$ac_exeext conftest.$ac_ext
13821 fi
13822 { echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
13823 echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
13824 if test $ac_cv_var_tzname = yes; then
13825
13826 cat >>confdefs.h <<\_ACEOF
13827 #define HAVE_TZNAME 1
13828 _ACEOF
13829
13830 fi
13831
13832 { echo "$as_me:$LINENO: checking for union semun" >&5
13833 echo $ECHO_N "checking for union semun... $ECHO_C" >&6; }
13834 if test "${ac_cv_type_union_semun+set}" = set; then
13835   echo $ECHO_N "(cached) $ECHO_C" >&6
13836 else
13837   cat >conftest.$ac_ext <<_ACEOF
13838 /* confdefs.h.  */
13839 _ACEOF
13840 cat confdefs.h >>conftest.$ac_ext
13841 cat >>conftest.$ac_ext <<_ACEOF
13842 /* end confdefs.h.  */
13843 #include <sys/types.h>
13844 #include <sys/ipc.h>
13845 #include <sys/sem.h>
13846
13847 typedef union semun ac__type_new_;
13848 int
13849 main ()
13850 {
13851 if ((ac__type_new_ *) 0)
13852   return 0;
13853 if (sizeof (ac__type_new_))
13854   return 0;
13855   ;
13856   return 0;
13857 }
13858 _ACEOF
13859 rm -f conftest.$ac_objext
13860 if { (ac_try="$ac_compile"
13861 case "(($ac_try" in
13862   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13863   *) ac_try_echo=$ac_try;;
13864 esac
13865 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13866   (eval "$ac_compile") 2>conftest.er1
13867   ac_status=$?
13868   grep -v '^ *+' conftest.er1 >conftest.err
13869   rm -f conftest.er1
13870   cat conftest.err >&5
13871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13872   (exit $ac_status); } && {
13873          test -z "$ac_c_werror_flag" ||
13874          test ! -s conftest.err
13875        } && test -s conftest.$ac_objext; then
13876   ac_cv_type_union_semun=yes
13877 else
13878   echo "$as_me: failed program was:" >&5
13879 sed 's/^/| /' conftest.$ac_ext >&5
13880
13881         ac_cv_type_union_semun=no
13882 fi
13883
13884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13885 fi
13886 { echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
13887 echo "${ECHO_T}$ac_cv_type_union_semun" >&6; }
13888 if test $ac_cv_type_union_semun = yes; then
13889
13890 cat >>confdefs.h <<_ACEOF
13891 #define HAVE_UNION_SEMUN 1
13892 _ACEOF
13893
13894
13895 fi
13896
13897 { echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
13898 echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6; }
13899 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
13900   echo $ECHO_N "(cached) $ECHO_C" >&6
13901 else
13902   cat >conftest.$ac_ext <<_ACEOF
13903 /* confdefs.h.  */
13904 _ACEOF
13905 cat confdefs.h >>conftest.$ac_ext
13906 cat >>conftest.$ac_ext <<_ACEOF
13907 /* end confdefs.h.  */
13908 #include <sys/types.h>
13909 #ifdef HAVE_SYS_UN_H
13910 #include <sys/un.h>
13911 #endif
13912
13913
13914 typedef struct sockaddr_un ac__type_new_;
13915 int
13916 main ()
13917 {
13918 if ((ac__type_new_ *) 0)
13919   return 0;
13920 if (sizeof (ac__type_new_))
13921   return 0;
13922   ;
13923   return 0;
13924 }
13925 _ACEOF
13926 rm -f conftest.$ac_objext
13927 if { (ac_try="$ac_compile"
13928 case "(($ac_try" in
13929   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13930   *) ac_try_echo=$ac_try;;
13931 esac
13932 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13933   (eval "$ac_compile") 2>conftest.er1
13934   ac_status=$?
13935   grep -v '^ *+' conftest.er1 >conftest.err
13936   rm -f conftest.er1
13937   cat conftest.err >&5
13938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13939   (exit $ac_status); } && {
13940          test -z "$ac_c_werror_flag" ||
13941          test ! -s conftest.err
13942        } && test -s conftest.$ac_objext; then
13943   ac_cv_type_struct_sockaddr_un=yes
13944 else
13945   echo "$as_me: failed program was:" >&5
13946 sed 's/^/| /' conftest.$ac_ext >&5
13947
13948         ac_cv_type_struct_sockaddr_un=no
13949 fi
13950
13951 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13952 fi
13953 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
13954 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6; }
13955 if test $ac_cv_type_struct_sockaddr_un = yes; then
13956
13957 cat >>confdefs.h <<_ACEOF
13958 #define HAVE_STRUCT_SOCKADDR_UN 1
13959 _ACEOF
13960
13961
13962 cat >>confdefs.h <<\_ACEOF
13963 #define HAVE_UNIX_SOCKETS 1
13964 _ACEOF
13965
13966 fi
13967
13968 { echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
13969 echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6; }
13970 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
13971   echo $ECHO_N "(cached) $ECHO_C" >&6
13972 else
13973   cat >conftest.$ac_ext <<_ACEOF
13974 /* confdefs.h.  */
13975 _ACEOF
13976 cat confdefs.h >>conftest.$ac_ext
13977 cat >>conftest.$ac_ext <<_ACEOF
13978 /* end confdefs.h.  */
13979 #include <sys/types.h>
13980 #ifdef HAVE_SYS_SOCKET_H
13981 #include <sys/socket.h>
13982 #endif
13983
13984
13985 typedef struct sockaddr_storage ac__type_new_;
13986 int
13987 main ()
13988 {
13989 if ((ac__type_new_ *) 0)
13990   return 0;
13991 if (sizeof (ac__type_new_))
13992   return 0;
13993   ;
13994   return 0;
13995 }
13996 _ACEOF
13997 rm -f conftest.$ac_objext
13998 if { (ac_try="$ac_compile"
13999 case "(($ac_try" in
14000   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14001   *) ac_try_echo=$ac_try;;
14002 esac
14003 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14004   (eval "$ac_compile") 2>conftest.er1
14005   ac_status=$?
14006   grep -v '^ *+' conftest.er1 >conftest.err
14007   rm -f conftest.er1
14008   cat conftest.err >&5
14009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14010   (exit $ac_status); } && {
14011          test -z "$ac_c_werror_flag" ||
14012          test ! -s conftest.err
14013        } && test -s conftest.$ac_objext; then
14014   ac_cv_type_struct_sockaddr_storage=yes
14015 else
14016   echo "$as_me: failed program was:" >&5
14017 sed 's/^/| /' conftest.$ac_ext >&5
14018
14019         ac_cv_type_struct_sockaddr_storage=no
14020 fi
14021
14022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14023 fi
14024 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
14025 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_storage" >&6; }
14026 if test $ac_cv_type_struct_sockaddr_storage = yes; then
14027
14028 cat >>confdefs.h <<_ACEOF
14029 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
14030 _ACEOF
14031
14032
14033 fi
14034
14035 { echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
14036 echo $ECHO_N "checking for struct sockaddr_storage.ss_family... $ECHO_C" >&6; }
14037 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
14038   echo $ECHO_N "(cached) $ECHO_C" >&6
14039 else
14040   cat >conftest.$ac_ext <<_ACEOF
14041 /* confdefs.h.  */
14042 _ACEOF
14043 cat confdefs.h >>conftest.$ac_ext
14044 cat >>conftest.$ac_ext <<_ACEOF
14045 /* end confdefs.h.  */
14046 #include <sys/types.h>
14047 #ifdef HAVE_SYS_SOCKET_H
14048 #include <sys/socket.h>
14049 #endif
14050
14051
14052 int
14053 main ()
14054 {
14055 static struct sockaddr_storage ac_aggr;
14056 if (ac_aggr.ss_family)
14057 return 0;
14058   ;
14059   return 0;
14060 }
14061 _ACEOF
14062 rm -f conftest.$ac_objext
14063 if { (ac_try="$ac_compile"
14064 case "(($ac_try" in
14065   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14066   *) ac_try_echo=$ac_try;;
14067 esac
14068 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14069   (eval "$ac_compile") 2>conftest.er1
14070   ac_status=$?
14071   grep -v '^ *+' conftest.er1 >conftest.err
14072   rm -f conftest.er1
14073   cat conftest.err >&5
14074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14075   (exit $ac_status); } && {
14076          test -z "$ac_c_werror_flag" ||
14077          test ! -s conftest.err
14078        } && test -s conftest.$ac_objext; then
14079   ac_cv_member_struct_sockaddr_storage_ss_family=yes
14080 else
14081   echo "$as_me: failed program was:" >&5
14082 sed 's/^/| /' conftest.$ac_ext >&5
14083
14084         cat >conftest.$ac_ext <<_ACEOF
14085 /* confdefs.h.  */
14086 _ACEOF
14087 cat confdefs.h >>conftest.$ac_ext
14088 cat >>conftest.$ac_ext <<_ACEOF
14089 /* end confdefs.h.  */
14090 #include <sys/types.h>
14091 #ifdef HAVE_SYS_SOCKET_H
14092 #include <sys/socket.h>
14093 #endif
14094
14095
14096 int
14097 main ()
14098 {
14099 static struct sockaddr_storage ac_aggr;
14100 if (sizeof ac_aggr.ss_family)
14101 return 0;
14102   ;
14103   return 0;
14104 }
14105 _ACEOF
14106 rm -f conftest.$ac_objext
14107 if { (ac_try="$ac_compile"
14108 case "(($ac_try" in
14109   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14110   *) ac_try_echo=$ac_try;;
14111 esac
14112 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14113   (eval "$ac_compile") 2>conftest.er1
14114   ac_status=$?
14115   grep -v '^ *+' conftest.er1 >conftest.err
14116   rm -f conftest.er1
14117   cat conftest.err >&5
14118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14119   (exit $ac_status); } && {
14120          test -z "$ac_c_werror_flag" ||
14121          test ! -s conftest.err
14122        } && test -s conftest.$ac_objext; then
14123   ac_cv_member_struct_sockaddr_storage_ss_family=yes
14124 else
14125   echo "$as_me: failed program was:" >&5
14126 sed 's/^/| /' conftest.$ac_ext >&5
14127
14128         ac_cv_member_struct_sockaddr_storage_ss_family=no
14129 fi
14130
14131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14132 fi
14133
14134 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14135 fi
14136 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
14137 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_family" >&6; }
14138 if test $ac_cv_member_struct_sockaddr_storage_ss_family = yes; then
14139
14140 cat >>confdefs.h <<_ACEOF
14141 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
14142 _ACEOF
14143
14144
14145 fi
14146 { echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
14147 echo $ECHO_N "checking for struct sockaddr_storage.__ss_family... $ECHO_C" >&6; }
14148 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
14149   echo $ECHO_N "(cached) $ECHO_C" >&6
14150 else
14151   cat >conftest.$ac_ext <<_ACEOF
14152 /* confdefs.h.  */
14153 _ACEOF
14154 cat confdefs.h >>conftest.$ac_ext
14155 cat >>conftest.$ac_ext <<_ACEOF
14156 /* end confdefs.h.  */
14157 #include <sys/types.h>
14158 #ifdef HAVE_SYS_SOCKET_H
14159 #include <sys/socket.h>
14160 #endif
14161
14162
14163 int
14164 main ()
14165 {
14166 static struct sockaddr_storage ac_aggr;
14167 if (ac_aggr.__ss_family)
14168 return 0;
14169   ;
14170   return 0;
14171 }
14172 _ACEOF
14173 rm -f conftest.$ac_objext
14174 if { (ac_try="$ac_compile"
14175 case "(($ac_try" in
14176   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14177   *) ac_try_echo=$ac_try;;
14178 esac
14179 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14180   (eval "$ac_compile") 2>conftest.er1
14181   ac_status=$?
14182   grep -v '^ *+' conftest.er1 >conftest.err
14183   rm -f conftest.er1
14184   cat conftest.err >&5
14185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14186   (exit $ac_status); } && {
14187          test -z "$ac_c_werror_flag" ||
14188          test ! -s conftest.err
14189        } && test -s conftest.$ac_objext; then
14190   ac_cv_member_struct_sockaddr_storage___ss_family=yes
14191 else
14192   echo "$as_me: failed program was:" >&5
14193 sed 's/^/| /' conftest.$ac_ext >&5
14194
14195         cat >conftest.$ac_ext <<_ACEOF
14196 /* confdefs.h.  */
14197 _ACEOF
14198 cat confdefs.h >>conftest.$ac_ext
14199 cat >>conftest.$ac_ext <<_ACEOF
14200 /* end confdefs.h.  */
14201 #include <sys/types.h>
14202 #ifdef HAVE_SYS_SOCKET_H
14203 #include <sys/socket.h>
14204 #endif
14205
14206
14207 int
14208 main ()
14209 {
14210 static struct sockaddr_storage ac_aggr;
14211 if (sizeof ac_aggr.__ss_family)
14212 return 0;
14213   ;
14214   return 0;
14215 }
14216 _ACEOF
14217 rm -f conftest.$ac_objext
14218 if { (ac_try="$ac_compile"
14219 case "(($ac_try" in
14220   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14221   *) ac_try_echo=$ac_try;;
14222 esac
14223 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14224   (eval "$ac_compile") 2>conftest.er1
14225   ac_status=$?
14226   grep -v '^ *+' conftest.er1 >conftest.err
14227   rm -f conftest.er1
14228   cat conftest.err >&5
14229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14230   (exit $ac_status); } && {
14231          test -z "$ac_c_werror_flag" ||
14232          test ! -s conftest.err
14233        } && test -s conftest.$ac_objext; then
14234   ac_cv_member_struct_sockaddr_storage___ss_family=yes
14235 else
14236   echo "$as_me: failed program was:" >&5
14237 sed 's/^/| /' conftest.$ac_ext >&5
14238
14239         ac_cv_member_struct_sockaddr_storage___ss_family=no
14240 fi
14241
14242 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14243 fi
14244
14245 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14246 fi
14247 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
14248 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_family" >&6; }
14249 if test $ac_cv_member_struct_sockaddr_storage___ss_family = yes; then
14250
14251 cat >>confdefs.h <<_ACEOF
14252 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
14253 _ACEOF
14254
14255
14256 fi
14257 { echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
14258 echo $ECHO_N "checking for struct sockaddr_storage.ss_len... $ECHO_C" >&6; }
14259 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
14260   echo $ECHO_N "(cached) $ECHO_C" >&6
14261 else
14262   cat >conftest.$ac_ext <<_ACEOF
14263 /* confdefs.h.  */
14264 _ACEOF
14265 cat confdefs.h >>conftest.$ac_ext
14266 cat >>conftest.$ac_ext <<_ACEOF
14267 /* end confdefs.h.  */
14268 #include <sys/types.h>
14269 #ifdef HAVE_SYS_SOCKET_H
14270 #include <sys/socket.h>
14271 #endif
14272
14273
14274 int
14275 main ()
14276 {
14277 static struct sockaddr_storage ac_aggr;
14278 if (ac_aggr.ss_len)
14279 return 0;
14280   ;
14281   return 0;
14282 }
14283 _ACEOF
14284 rm -f conftest.$ac_objext
14285 if { (ac_try="$ac_compile"
14286 case "(($ac_try" in
14287   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14288   *) ac_try_echo=$ac_try;;
14289 esac
14290 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14291   (eval "$ac_compile") 2>conftest.er1
14292   ac_status=$?
14293   grep -v '^ *+' conftest.er1 >conftest.err
14294   rm -f conftest.er1
14295   cat conftest.err >&5
14296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14297   (exit $ac_status); } && {
14298          test -z "$ac_c_werror_flag" ||
14299          test ! -s conftest.err
14300        } && test -s conftest.$ac_objext; then
14301   ac_cv_member_struct_sockaddr_storage_ss_len=yes
14302 else
14303   echo "$as_me: failed program was:" >&5
14304 sed 's/^/| /' conftest.$ac_ext >&5
14305
14306         cat >conftest.$ac_ext <<_ACEOF
14307 /* confdefs.h.  */
14308 _ACEOF
14309 cat confdefs.h >>conftest.$ac_ext
14310 cat >>conftest.$ac_ext <<_ACEOF
14311 /* end confdefs.h.  */
14312 #include <sys/types.h>
14313 #ifdef HAVE_SYS_SOCKET_H
14314 #include <sys/socket.h>
14315 #endif
14316
14317
14318 int
14319 main ()
14320 {
14321 static struct sockaddr_storage ac_aggr;
14322 if (sizeof ac_aggr.ss_len)
14323 return 0;
14324   ;
14325   return 0;
14326 }
14327 _ACEOF
14328 rm -f conftest.$ac_objext
14329 if { (ac_try="$ac_compile"
14330 case "(($ac_try" in
14331   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14332   *) ac_try_echo=$ac_try;;
14333 esac
14334 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14335   (eval "$ac_compile") 2>conftest.er1
14336   ac_status=$?
14337   grep -v '^ *+' conftest.er1 >conftest.err
14338   rm -f conftest.er1
14339   cat conftest.err >&5
14340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14341   (exit $ac_status); } && {
14342          test -z "$ac_c_werror_flag" ||
14343          test ! -s conftest.err
14344        } && test -s conftest.$ac_objext; then
14345   ac_cv_member_struct_sockaddr_storage_ss_len=yes
14346 else
14347   echo "$as_me: failed program was:" >&5
14348 sed 's/^/| /' conftest.$ac_ext >&5
14349
14350         ac_cv_member_struct_sockaddr_storage_ss_len=no
14351 fi
14352
14353 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14354 fi
14355
14356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14357 fi
14358 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
14359 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_len" >&6; }
14360 if test $ac_cv_member_struct_sockaddr_storage_ss_len = yes; then
14361
14362 cat >>confdefs.h <<_ACEOF
14363 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
14364 _ACEOF
14365
14366
14367 fi
14368 { echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
14369 echo $ECHO_N "checking for struct sockaddr_storage.__ss_len... $ECHO_C" >&6; }
14370 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
14371   echo $ECHO_N "(cached) $ECHO_C" >&6
14372 else
14373   cat >conftest.$ac_ext <<_ACEOF
14374 /* confdefs.h.  */
14375 _ACEOF
14376 cat confdefs.h >>conftest.$ac_ext
14377 cat >>conftest.$ac_ext <<_ACEOF
14378 /* end confdefs.h.  */
14379 #include <sys/types.h>
14380 #ifdef HAVE_SYS_SOCKET_H
14381 #include <sys/socket.h>
14382 #endif
14383
14384
14385 int
14386 main ()
14387 {
14388 static struct sockaddr_storage ac_aggr;
14389 if (ac_aggr.__ss_len)
14390 return 0;
14391   ;
14392   return 0;
14393 }
14394 _ACEOF
14395 rm -f conftest.$ac_objext
14396 if { (ac_try="$ac_compile"
14397 case "(($ac_try" in
14398   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14399   *) ac_try_echo=$ac_try;;
14400 esac
14401 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14402   (eval "$ac_compile") 2>conftest.er1
14403   ac_status=$?
14404   grep -v '^ *+' conftest.er1 >conftest.err
14405   rm -f conftest.er1
14406   cat conftest.err >&5
14407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14408   (exit $ac_status); } && {
14409          test -z "$ac_c_werror_flag" ||
14410          test ! -s conftest.err
14411        } && test -s conftest.$ac_objext; then
14412   ac_cv_member_struct_sockaddr_storage___ss_len=yes
14413 else
14414   echo "$as_me: failed program was:" >&5
14415 sed 's/^/| /' conftest.$ac_ext >&5
14416
14417         cat >conftest.$ac_ext <<_ACEOF
14418 /* confdefs.h.  */
14419 _ACEOF
14420 cat confdefs.h >>conftest.$ac_ext
14421 cat >>conftest.$ac_ext <<_ACEOF
14422 /* end confdefs.h.  */
14423 #include <sys/types.h>
14424 #ifdef HAVE_SYS_SOCKET_H
14425 #include <sys/socket.h>
14426 #endif
14427
14428
14429 int
14430 main ()
14431 {
14432 static struct sockaddr_storage ac_aggr;
14433 if (sizeof ac_aggr.__ss_len)
14434 return 0;
14435   ;
14436   return 0;
14437 }
14438 _ACEOF
14439 rm -f conftest.$ac_objext
14440 if { (ac_try="$ac_compile"
14441 case "(($ac_try" in
14442   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14443   *) ac_try_echo=$ac_try;;
14444 esac
14445 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14446   (eval "$ac_compile") 2>conftest.er1
14447   ac_status=$?
14448   grep -v '^ *+' conftest.er1 >conftest.err
14449   rm -f conftest.er1
14450   cat conftest.err >&5
14451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14452   (exit $ac_status); } && {
14453          test -z "$ac_c_werror_flag" ||
14454          test ! -s conftest.err
14455        } && test -s conftest.$ac_objext; then
14456   ac_cv_member_struct_sockaddr_storage___ss_len=yes
14457 else
14458   echo "$as_me: failed program was:" >&5
14459 sed 's/^/| /' conftest.$ac_ext >&5
14460
14461         ac_cv_member_struct_sockaddr_storage___ss_len=no
14462 fi
14463
14464 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14465 fi
14466
14467 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14468 fi
14469 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
14470 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_len" >&6; }
14471 if test $ac_cv_member_struct_sockaddr_storage___ss_len = yes; then
14472
14473 cat >>confdefs.h <<_ACEOF
14474 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14475 _ACEOF
14476
14477
14478 fi
14479 { echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
14480 echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6; }
14481 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
14482   echo $ECHO_N "(cached) $ECHO_C" >&6
14483 else
14484   cat >conftest.$ac_ext <<_ACEOF
14485 /* confdefs.h.  */
14486 _ACEOF
14487 cat confdefs.h >>conftest.$ac_ext
14488 cat >>conftest.$ac_ext <<_ACEOF
14489 /* end confdefs.h.  */
14490 #include <sys/types.h>
14491 #ifdef HAVE_SYS_SOCKET_H
14492 #include <sys/socket.h>
14493 #endif
14494
14495
14496 int
14497 main ()
14498 {
14499 static struct sockaddr ac_aggr;
14500 if (ac_aggr.sa_len)
14501 return 0;
14502   ;
14503   return 0;
14504 }
14505 _ACEOF
14506 rm -f conftest.$ac_objext
14507 if { (ac_try="$ac_compile"
14508 case "(($ac_try" in
14509   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14510   *) ac_try_echo=$ac_try;;
14511 esac
14512 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14513   (eval "$ac_compile") 2>conftest.er1
14514   ac_status=$?
14515   grep -v '^ *+' conftest.er1 >conftest.err
14516   rm -f conftest.er1
14517   cat conftest.err >&5
14518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14519   (exit $ac_status); } && {
14520          test -z "$ac_c_werror_flag" ||
14521          test ! -s conftest.err
14522        } && test -s conftest.$ac_objext; then
14523   ac_cv_member_struct_sockaddr_sa_len=yes
14524 else
14525   echo "$as_me: failed program was:" >&5
14526 sed 's/^/| /' conftest.$ac_ext >&5
14527
14528         cat >conftest.$ac_ext <<_ACEOF
14529 /* confdefs.h.  */
14530 _ACEOF
14531 cat confdefs.h >>conftest.$ac_ext
14532 cat >>conftest.$ac_ext <<_ACEOF
14533 /* end confdefs.h.  */
14534 #include <sys/types.h>
14535 #ifdef HAVE_SYS_SOCKET_H
14536 #include <sys/socket.h>
14537 #endif
14538
14539
14540 int
14541 main ()
14542 {
14543 static struct sockaddr ac_aggr;
14544 if (sizeof ac_aggr.sa_len)
14545 return 0;
14546   ;
14547   return 0;
14548 }
14549 _ACEOF
14550 rm -f conftest.$ac_objext
14551 if { (ac_try="$ac_compile"
14552 case "(($ac_try" in
14553   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14554   *) ac_try_echo=$ac_try;;
14555 esac
14556 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14557   (eval "$ac_compile") 2>conftest.er1
14558   ac_status=$?
14559   grep -v '^ *+' conftest.er1 >conftest.err
14560   rm -f conftest.er1
14561   cat conftest.err >&5
14562   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14563   (exit $ac_status); } && {
14564          test -z "$ac_c_werror_flag" ||
14565          test ! -s conftest.err
14566        } && test -s conftest.$ac_objext; then
14567   ac_cv_member_struct_sockaddr_sa_len=yes
14568 else
14569   echo "$as_me: failed program was:" >&5
14570 sed 's/^/| /' conftest.$ac_ext >&5
14571
14572         ac_cv_member_struct_sockaddr_sa_len=no
14573 fi
14574
14575 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14576 fi
14577
14578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14579 fi
14580 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
14581 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6; }
14582 if test $ac_cv_member_struct_sockaddr_sa_len = yes; then
14583
14584 cat >>confdefs.h <<_ACEOF
14585 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14586 _ACEOF
14587
14588
14589 fi
14590
14591 { echo "$as_me:$LINENO: checking for struct addrinfo" >&5
14592 echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6; }
14593 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
14594   echo $ECHO_N "(cached) $ECHO_C" >&6
14595 else
14596   cat >conftest.$ac_ext <<_ACEOF
14597 /* confdefs.h.  */
14598 _ACEOF
14599 cat confdefs.h >>conftest.$ac_ext
14600 cat >>conftest.$ac_ext <<_ACEOF
14601 /* end confdefs.h.  */
14602 #include <sys/types.h>
14603 #include <sys/socket.h>
14604 #include <netdb.h>
14605
14606
14607 typedef struct addrinfo ac__type_new_;
14608 int
14609 main ()
14610 {
14611 if ((ac__type_new_ *) 0)
14612   return 0;
14613 if (sizeof (ac__type_new_))
14614   return 0;
14615   ;
14616   return 0;
14617 }
14618 _ACEOF
14619 rm -f conftest.$ac_objext
14620 if { (ac_try="$ac_compile"
14621 case "(($ac_try" in
14622   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14623   *) ac_try_echo=$ac_try;;
14624 esac
14625 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14626   (eval "$ac_compile") 2>conftest.er1
14627   ac_status=$?
14628   grep -v '^ *+' conftest.er1 >conftest.err
14629   rm -f conftest.er1
14630   cat conftest.err >&5
14631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14632   (exit $ac_status); } && {
14633          test -z "$ac_c_werror_flag" ||
14634          test ! -s conftest.err
14635        } && test -s conftest.$ac_objext; then
14636   ac_cv_type_struct_addrinfo=yes
14637 else
14638   echo "$as_me: failed program was:" >&5
14639 sed 's/^/| /' conftest.$ac_ext >&5
14640
14641         ac_cv_type_struct_addrinfo=no
14642 fi
14643
14644 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14645 fi
14646 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
14647 echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6; }
14648 if test $ac_cv_type_struct_addrinfo = yes; then
14649
14650 cat >>confdefs.h <<_ACEOF
14651 #define HAVE_STRUCT_ADDRINFO 1
14652 _ACEOF
14653
14654
14655 fi
14656
14657
14658 { echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
14659 echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6; }
14660 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
14661   echo $ECHO_N "(cached) $ECHO_C" >&6
14662 else
14663   cat >conftest.$ac_ext <<_ACEOF
14664 /* confdefs.h.  */
14665 _ACEOF
14666 cat confdefs.h >>conftest.$ac_ext
14667 cat >>conftest.$ac_ext <<_ACEOF
14668 /* end confdefs.h.  */
14669 #include <sys/param.h>
14670 #include <sys/types.h>
14671 #include <sys/socket.h>
14672 #include <sys/ucred.h>
14673
14674 typedef struct cmsgcred ac__type_new_;
14675 int
14676 main ()
14677 {
14678 if ((ac__type_new_ *) 0)
14679   return 0;
14680 if (sizeof (ac__type_new_))
14681   return 0;
14682   ;
14683   return 0;
14684 }
14685 _ACEOF
14686 rm -f conftest.$ac_objext
14687 if { (ac_try="$ac_compile"
14688 case "(($ac_try" in
14689   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14690   *) ac_try_echo=$ac_try;;
14691 esac
14692 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14693   (eval "$ac_compile") 2>conftest.er1
14694   ac_status=$?
14695   grep -v '^ *+' conftest.er1 >conftest.err
14696   rm -f conftest.er1
14697   cat conftest.err >&5
14698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14699   (exit $ac_status); } && {
14700          test -z "$ac_c_werror_flag" ||
14701          test ! -s conftest.err
14702        } && test -s conftest.$ac_objext; then
14703   ac_cv_type_struct_cmsgcred=yes
14704 else
14705   echo "$as_me: failed program was:" >&5
14706 sed 's/^/| /' conftest.$ac_ext >&5
14707
14708         ac_cv_type_struct_cmsgcred=no
14709 fi
14710
14711 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14712 fi
14713 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
14714 echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6; }
14715 if test $ac_cv_type_struct_cmsgcred = yes; then
14716
14717 cat >>confdefs.h <<_ACEOF
14718 #define HAVE_STRUCT_CMSGCRED 1
14719 _ACEOF
14720
14721
14722 fi
14723 { echo "$as_me:$LINENO: checking for struct fcred" >&5
14724 echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6; }
14725 if test "${ac_cv_type_struct_fcred+set}" = set; then
14726   echo $ECHO_N "(cached) $ECHO_C" >&6
14727 else
14728   cat >conftest.$ac_ext <<_ACEOF
14729 /* confdefs.h.  */
14730 _ACEOF
14731 cat confdefs.h >>conftest.$ac_ext
14732 cat >>conftest.$ac_ext <<_ACEOF
14733 /* end confdefs.h.  */
14734 #include <sys/param.h>
14735 #include <sys/types.h>
14736 #include <sys/socket.h>
14737 #include <sys/ucred.h>
14738
14739 typedef struct fcred ac__type_new_;
14740 int
14741 main ()
14742 {
14743 if ((ac__type_new_ *) 0)
14744   return 0;
14745 if (sizeof (ac__type_new_))
14746   return 0;
14747   ;
14748   return 0;
14749 }
14750 _ACEOF
14751 rm -f conftest.$ac_objext
14752 if { (ac_try="$ac_compile"
14753 case "(($ac_try" in
14754   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14755   *) ac_try_echo=$ac_try;;
14756 esac
14757 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14758   (eval "$ac_compile") 2>conftest.er1
14759   ac_status=$?
14760   grep -v '^ *+' conftest.er1 >conftest.err
14761   rm -f conftest.er1
14762   cat conftest.err >&5
14763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14764   (exit $ac_status); } && {
14765          test -z "$ac_c_werror_flag" ||
14766          test ! -s conftest.err
14767        } && test -s conftest.$ac_objext; then
14768   ac_cv_type_struct_fcred=yes
14769 else
14770   echo "$as_me: failed program was:" >&5
14771 sed 's/^/| /' conftest.$ac_ext >&5
14772
14773         ac_cv_type_struct_fcred=no
14774 fi
14775
14776 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14777 fi
14778 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
14779 echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6; }
14780 if test $ac_cv_type_struct_fcred = yes; then
14781
14782 cat >>confdefs.h <<_ACEOF
14783 #define HAVE_STRUCT_FCRED 1
14784 _ACEOF
14785
14786
14787 fi
14788 { echo "$as_me:$LINENO: checking for struct sockcred" >&5
14789 echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6; }
14790 if test "${ac_cv_type_struct_sockcred+set}" = set; then
14791   echo $ECHO_N "(cached) $ECHO_C" >&6
14792 else
14793   cat >conftest.$ac_ext <<_ACEOF
14794 /* confdefs.h.  */
14795 _ACEOF
14796 cat confdefs.h >>conftest.$ac_ext
14797 cat >>conftest.$ac_ext <<_ACEOF
14798 /* end confdefs.h.  */
14799 #include <sys/param.h>
14800 #include <sys/types.h>
14801 #include <sys/socket.h>
14802 #include <sys/ucred.h>
14803
14804 typedef struct sockcred ac__type_new_;
14805 int
14806 main ()
14807 {
14808 if ((ac__type_new_ *) 0)
14809   return 0;
14810 if (sizeof (ac__type_new_))
14811   return 0;
14812   ;
14813   return 0;
14814 }
14815 _ACEOF
14816 rm -f conftest.$ac_objext
14817 if { (ac_try="$ac_compile"
14818 case "(($ac_try" in
14819   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14820   *) ac_try_echo=$ac_try;;
14821 esac
14822 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14823   (eval "$ac_compile") 2>conftest.er1
14824   ac_status=$?
14825   grep -v '^ *+' conftest.er1 >conftest.err
14826   rm -f conftest.er1
14827   cat conftest.err >&5
14828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14829   (exit $ac_status); } && {
14830          test -z "$ac_c_werror_flag" ||
14831          test ! -s conftest.err
14832        } && test -s conftest.$ac_objext; then
14833   ac_cv_type_struct_sockcred=yes
14834 else
14835   echo "$as_me: failed program was:" >&5
14836 sed 's/^/| /' conftest.$ac_ext >&5
14837
14838         ac_cv_type_struct_sockcred=no
14839 fi
14840
14841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14842 fi
14843 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
14844 echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6; }
14845 if test $ac_cv_type_struct_sockcred = yes; then
14846
14847 cat >>confdefs.h <<_ACEOF
14848 #define HAVE_STRUCT_SOCKCRED 1
14849 _ACEOF
14850
14851
14852 fi
14853
14854
14855 { echo "$as_me:$LINENO: checking for struct option" >&5
14856 echo $ECHO_N "checking for struct option... $ECHO_C" >&6; }
14857 if test "${ac_cv_type_struct_option+set}" = set; then
14858   echo $ECHO_N "(cached) $ECHO_C" >&6
14859 else
14860   cat >conftest.$ac_ext <<_ACEOF
14861 /* confdefs.h.  */
14862 _ACEOF
14863 cat confdefs.h >>conftest.$ac_ext
14864 cat >>conftest.$ac_ext <<_ACEOF
14865 /* end confdefs.h.  */
14866 #ifdef HAVE_GETOPT_H
14867 #include <getopt.h>
14868 #endif
14869
14870 typedef struct option ac__type_new_;
14871 int
14872 main ()
14873 {
14874 if ((ac__type_new_ *) 0)
14875   return 0;
14876 if (sizeof (ac__type_new_))
14877   return 0;
14878   ;
14879   return 0;
14880 }
14881 _ACEOF
14882 rm -f conftest.$ac_objext
14883 if { (ac_try="$ac_compile"
14884 case "(($ac_try" in
14885   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14886   *) ac_try_echo=$ac_try;;
14887 esac
14888 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14889   (eval "$ac_compile") 2>conftest.er1
14890   ac_status=$?
14891   grep -v '^ *+' conftest.er1 >conftest.err
14892   rm -f conftest.er1
14893   cat conftest.err >&5
14894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14895   (exit $ac_status); } && {
14896          test -z "$ac_c_werror_flag" ||
14897          test ! -s conftest.err
14898        } && test -s conftest.$ac_objext; then
14899   ac_cv_type_struct_option=yes
14900 else
14901   echo "$as_me: failed program was:" >&5
14902 sed 's/^/| /' conftest.$ac_ext >&5
14903
14904         ac_cv_type_struct_option=no
14905 fi
14906
14907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14908 fi
14909 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
14910 echo "${ECHO_T}$ac_cv_type_struct_option" >&6; }
14911 if test $ac_cv_type_struct_option = yes; then
14912
14913 cat >>confdefs.h <<_ACEOF
14914 #define HAVE_STRUCT_OPTION 1
14915 _ACEOF
14916
14917
14918 fi
14919
14920
14921 if test "$with_zlib" = yes; then
14922   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14923   # did not).  While we could work around the lack of z_streamp, it
14924   # seems unwise to encourage people to use such old zlib versions...
14925   { echo "$as_me:$LINENO: checking for z_streamp" >&5
14926 echo $ECHO_N "checking for z_streamp... $ECHO_C" >&6; }
14927 if test "${ac_cv_type_z_streamp+set}" = set; then
14928   echo $ECHO_N "(cached) $ECHO_C" >&6
14929 else
14930   cat >conftest.$ac_ext <<_ACEOF
14931 /* confdefs.h.  */
14932 _ACEOF
14933 cat confdefs.h >>conftest.$ac_ext
14934 cat >>conftest.$ac_ext <<_ACEOF
14935 /* end confdefs.h.  */
14936 #include <zlib.h>
14937
14938 typedef z_streamp ac__type_new_;
14939 int
14940 main ()
14941 {
14942 if ((ac__type_new_ *) 0)
14943   return 0;
14944 if (sizeof (ac__type_new_))
14945   return 0;
14946   ;
14947   return 0;
14948 }
14949 _ACEOF
14950 rm -f conftest.$ac_objext
14951 if { (ac_try="$ac_compile"
14952 case "(($ac_try" in
14953   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14954   *) ac_try_echo=$ac_try;;
14955 esac
14956 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14957   (eval "$ac_compile") 2>conftest.er1
14958   ac_status=$?
14959   grep -v '^ *+' conftest.er1 >conftest.err
14960   rm -f conftest.er1
14961   cat conftest.err >&5
14962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14963   (exit $ac_status); } && {
14964          test -z "$ac_c_werror_flag" ||
14965          test ! -s conftest.err
14966        } && test -s conftest.$ac_objext; then
14967   ac_cv_type_z_streamp=yes
14968 else
14969   echo "$as_me: failed program was:" >&5
14970 sed 's/^/| /' conftest.$ac_ext >&5
14971
14972         ac_cv_type_z_streamp=no
14973 fi
14974
14975 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14976 fi
14977 { echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
14978 echo "${ECHO_T}$ac_cv_type_z_streamp" >&6; }
14979 if test $ac_cv_type_z_streamp = yes; then
14980   :
14981 else
14982   { { echo "$as_me:$LINENO: error: zlib version is too old
14983 Use --without-zlib to disable zlib support." >&5
14984 echo "$as_me: error: zlib version is too old
14985 Use --without-zlib to disable zlib support." >&2;}
14986    { (exit 1); exit 1; }; }
14987 fi
14988
14989 fi
14990
14991 if test "$with_krb5" = yes; then
14992 # Check for differences between MIT and Heimdal (KTH) releases
14993   { echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
14994 echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6; }
14995 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
14996   echo $ECHO_N "(cached) $ECHO_C" >&6
14997 else
14998   cat >conftest.$ac_ext <<_ACEOF
14999 /* confdefs.h.  */
15000 _ACEOF
15001 cat confdefs.h >>conftest.$ac_ext
15002 cat >>conftest.$ac_ext <<_ACEOF
15003 /* end confdefs.h.  */
15004 #include <krb5.h>
15005
15006 int
15007 main ()
15008 {
15009 static krb5_ticket ac_aggr;
15010 if (ac_aggr.enc_part2)
15011 return 0;
15012   ;
15013   return 0;
15014 }
15015 _ACEOF
15016 rm -f conftest.$ac_objext
15017 if { (ac_try="$ac_compile"
15018 case "(($ac_try" in
15019   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15020   *) ac_try_echo=$ac_try;;
15021 esac
15022 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15023   (eval "$ac_compile") 2>conftest.er1
15024   ac_status=$?
15025   grep -v '^ *+' conftest.er1 >conftest.err
15026   rm -f conftest.er1
15027   cat conftest.err >&5
15028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15029   (exit $ac_status); } && {
15030          test -z "$ac_c_werror_flag" ||
15031          test ! -s conftest.err
15032        } && test -s conftest.$ac_objext; then
15033   ac_cv_member_krb5_ticket_enc_part2=yes
15034 else
15035   echo "$as_me: failed program was:" >&5
15036 sed 's/^/| /' conftest.$ac_ext >&5
15037
15038         cat >conftest.$ac_ext <<_ACEOF
15039 /* confdefs.h.  */
15040 _ACEOF
15041 cat confdefs.h >>conftest.$ac_ext
15042 cat >>conftest.$ac_ext <<_ACEOF
15043 /* end confdefs.h.  */
15044 #include <krb5.h>
15045
15046 int
15047 main ()
15048 {
15049 static krb5_ticket ac_aggr;
15050 if (sizeof ac_aggr.enc_part2)
15051 return 0;
15052   ;
15053   return 0;
15054 }
15055 _ACEOF
15056 rm -f conftest.$ac_objext
15057 if { (ac_try="$ac_compile"
15058 case "(($ac_try" in
15059   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15060   *) ac_try_echo=$ac_try;;
15061 esac
15062 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15063   (eval "$ac_compile") 2>conftest.er1
15064   ac_status=$?
15065   grep -v '^ *+' conftest.er1 >conftest.err
15066   rm -f conftest.er1
15067   cat conftest.err >&5
15068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15069   (exit $ac_status); } && {
15070          test -z "$ac_c_werror_flag" ||
15071          test ! -s conftest.err
15072        } && test -s conftest.$ac_objext; then
15073   ac_cv_member_krb5_ticket_enc_part2=yes
15074 else
15075   echo "$as_me: failed program was:" >&5
15076 sed 's/^/| /' conftest.$ac_ext >&5
15077
15078         ac_cv_member_krb5_ticket_enc_part2=no
15079 fi
15080
15081 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15082 fi
15083
15084 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15085 fi
15086 { echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
15087 echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6; }
15088 if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
15089
15090 cat >>confdefs.h <<_ACEOF
15091 #define HAVE_KRB5_TICKET_ENC_PART2 1
15092 _ACEOF
15093
15094
15095 else
15096   { echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
15097 echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6; }
15098 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
15099   echo $ECHO_N "(cached) $ECHO_C" >&6
15100 else
15101   cat >conftest.$ac_ext <<_ACEOF
15102 /* confdefs.h.  */
15103 _ACEOF
15104 cat confdefs.h >>conftest.$ac_ext
15105 cat >>conftest.$ac_ext <<_ACEOF
15106 /* end confdefs.h.  */
15107 #include <krb5.h>
15108
15109 int
15110 main ()
15111 {
15112 static krb5_ticket ac_aggr;
15113 if (ac_aggr.client)
15114 return 0;
15115   ;
15116   return 0;
15117 }
15118 _ACEOF
15119 rm -f conftest.$ac_objext
15120 if { (ac_try="$ac_compile"
15121 case "(($ac_try" in
15122   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15123   *) ac_try_echo=$ac_try;;
15124 esac
15125 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15126   (eval "$ac_compile") 2>conftest.er1
15127   ac_status=$?
15128   grep -v '^ *+' conftest.er1 >conftest.err
15129   rm -f conftest.er1
15130   cat conftest.err >&5
15131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15132   (exit $ac_status); } && {
15133          test -z "$ac_c_werror_flag" ||
15134          test ! -s conftest.err
15135        } && test -s conftest.$ac_objext; then
15136   ac_cv_member_krb5_ticket_client=yes
15137 else
15138   echo "$as_me: failed program was:" >&5
15139 sed 's/^/| /' conftest.$ac_ext >&5
15140
15141         cat >conftest.$ac_ext <<_ACEOF
15142 /* confdefs.h.  */
15143 _ACEOF
15144 cat confdefs.h >>conftest.$ac_ext
15145 cat >>conftest.$ac_ext <<_ACEOF
15146 /* end confdefs.h.  */
15147 #include <krb5.h>
15148
15149 int
15150 main ()
15151 {
15152 static krb5_ticket ac_aggr;
15153 if (sizeof ac_aggr.client)
15154 return 0;
15155   ;
15156   return 0;
15157 }
15158 _ACEOF
15159 rm -f conftest.$ac_objext
15160 if { (ac_try="$ac_compile"
15161 case "(($ac_try" in
15162   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15163   *) ac_try_echo=$ac_try;;
15164 esac
15165 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15166   (eval "$ac_compile") 2>conftest.er1
15167   ac_status=$?
15168   grep -v '^ *+' conftest.er1 >conftest.err
15169   rm -f conftest.er1
15170   cat conftest.err >&5
15171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15172   (exit $ac_status); } && {
15173          test -z "$ac_c_werror_flag" ||
15174          test ! -s conftest.err
15175        } && test -s conftest.$ac_objext; then
15176   ac_cv_member_krb5_ticket_client=yes
15177 else
15178   echo "$as_me: failed program was:" >&5
15179 sed 's/^/| /' conftest.$ac_ext >&5
15180
15181         ac_cv_member_krb5_ticket_client=no
15182 fi
15183
15184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15185 fi
15186
15187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15188 fi
15189 { echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
15190 echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6; }
15191 if test $ac_cv_member_krb5_ticket_client = yes; then
15192
15193 cat >>confdefs.h <<_ACEOF
15194 #define HAVE_KRB5_TICKET_CLIENT 1
15195 _ACEOF
15196
15197
15198 else
15199   { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
15200 echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
15201    { (exit 1); exit 1; }; }
15202 fi
15203
15204 fi
15205
15206   { echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
15207 echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6; }
15208 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
15209   echo $ECHO_N "(cached) $ECHO_C" >&6
15210 else
15211   cat >conftest.$ac_ext <<_ACEOF
15212 /* confdefs.h.  */
15213 _ACEOF
15214 cat confdefs.h >>conftest.$ac_ext
15215 cat >>conftest.$ac_ext <<_ACEOF
15216 /* end confdefs.h.  */
15217 #include <krb5.h>
15218
15219 int
15220 main ()
15221 {
15222 static krb5_error ac_aggr;
15223 if (ac_aggr.text.data)
15224 return 0;
15225   ;
15226   return 0;
15227 }
15228 _ACEOF
15229 rm -f conftest.$ac_objext
15230 if { (ac_try="$ac_compile"
15231 case "(($ac_try" in
15232   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15233   *) ac_try_echo=$ac_try;;
15234 esac
15235 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15236   (eval "$ac_compile") 2>conftest.er1
15237   ac_status=$?
15238   grep -v '^ *+' conftest.er1 >conftest.err
15239   rm -f conftest.er1
15240   cat conftest.err >&5
15241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15242   (exit $ac_status); } && {
15243          test -z "$ac_c_werror_flag" ||
15244          test ! -s conftest.err
15245        } && test -s conftest.$ac_objext; then
15246   ac_cv_member_krb5_error_text_data=yes
15247 else
15248   echo "$as_me: failed program was:" >&5
15249 sed 's/^/| /' conftest.$ac_ext >&5
15250
15251         cat >conftest.$ac_ext <<_ACEOF
15252 /* confdefs.h.  */
15253 _ACEOF
15254 cat confdefs.h >>conftest.$ac_ext
15255 cat >>conftest.$ac_ext <<_ACEOF
15256 /* end confdefs.h.  */
15257 #include <krb5.h>
15258
15259 int
15260 main ()
15261 {
15262 static krb5_error ac_aggr;
15263 if (sizeof ac_aggr.text.data)
15264 return 0;
15265   ;
15266   return 0;
15267 }
15268 _ACEOF
15269 rm -f conftest.$ac_objext
15270 if { (ac_try="$ac_compile"
15271 case "(($ac_try" in
15272   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15273   *) ac_try_echo=$ac_try;;
15274 esac
15275 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15276   (eval "$ac_compile") 2>conftest.er1
15277   ac_status=$?
15278   grep -v '^ *+' conftest.er1 >conftest.err
15279   rm -f conftest.er1
15280   cat conftest.err >&5
15281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15282   (exit $ac_status); } && {
15283          test -z "$ac_c_werror_flag" ||
15284          test ! -s conftest.err
15285        } && test -s conftest.$ac_objext; then
15286   ac_cv_member_krb5_error_text_data=yes
15287 else
15288   echo "$as_me: failed program was:" >&5
15289 sed 's/^/| /' conftest.$ac_ext >&5
15290
15291         ac_cv_member_krb5_error_text_data=no
15292 fi
15293
15294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15295 fi
15296
15297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15298 fi
15299 { echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
15300 echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6; }
15301 if test $ac_cv_member_krb5_error_text_data = yes; then
15302
15303 cat >>confdefs.h <<_ACEOF
15304 #define HAVE_KRB5_ERROR_TEXT_DATA 1
15305 _ACEOF
15306
15307
15308 else
15309   { echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
15310 echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6; }
15311 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
15312   echo $ECHO_N "(cached) $ECHO_C" >&6
15313 else
15314   cat >conftest.$ac_ext <<_ACEOF
15315 /* confdefs.h.  */
15316 _ACEOF
15317 cat confdefs.h >>conftest.$ac_ext
15318 cat >>conftest.$ac_ext <<_ACEOF
15319 /* end confdefs.h.  */
15320 #include <krb5.h>
15321
15322 int
15323 main ()
15324 {
15325 static krb5_error ac_aggr;
15326 if (ac_aggr.e_data)
15327 return 0;
15328   ;
15329   return 0;
15330 }
15331 _ACEOF
15332 rm -f conftest.$ac_objext
15333 if { (ac_try="$ac_compile"
15334 case "(($ac_try" in
15335   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15336   *) ac_try_echo=$ac_try;;
15337 esac
15338 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15339   (eval "$ac_compile") 2>conftest.er1
15340   ac_status=$?
15341   grep -v '^ *+' conftest.er1 >conftest.err
15342   rm -f conftest.er1
15343   cat conftest.err >&5
15344   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15345   (exit $ac_status); } && {
15346          test -z "$ac_c_werror_flag" ||
15347          test ! -s conftest.err
15348        } && test -s conftest.$ac_objext; then
15349   ac_cv_member_krb5_error_e_data=yes
15350 else
15351   echo "$as_me: failed program was:" >&5
15352 sed 's/^/| /' conftest.$ac_ext >&5
15353
15354         cat >conftest.$ac_ext <<_ACEOF
15355 /* confdefs.h.  */
15356 _ACEOF
15357 cat confdefs.h >>conftest.$ac_ext
15358 cat >>conftest.$ac_ext <<_ACEOF
15359 /* end confdefs.h.  */
15360 #include <krb5.h>
15361
15362 int
15363 main ()
15364 {
15365 static krb5_error ac_aggr;
15366 if (sizeof ac_aggr.e_data)
15367 return 0;
15368   ;
15369   return 0;
15370 }
15371 _ACEOF
15372 rm -f conftest.$ac_objext
15373 if { (ac_try="$ac_compile"
15374 case "(($ac_try" in
15375   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15376   *) ac_try_echo=$ac_try;;
15377 esac
15378 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15379   (eval "$ac_compile") 2>conftest.er1
15380   ac_status=$?
15381   grep -v '^ *+' conftest.er1 >conftest.err
15382   rm -f conftest.er1
15383   cat conftest.err >&5
15384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15385   (exit $ac_status); } && {
15386          test -z "$ac_c_werror_flag" ||
15387          test ! -s conftest.err
15388        } && test -s conftest.$ac_objext; then
15389   ac_cv_member_krb5_error_e_data=yes
15390 else
15391   echo "$as_me: failed program was:" >&5
15392 sed 's/^/| /' conftest.$ac_ext >&5
15393
15394         ac_cv_member_krb5_error_e_data=no
15395 fi
15396
15397 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15398 fi
15399
15400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15401 fi
15402 { echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
15403 echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6; }
15404 if test $ac_cv_member_krb5_error_e_data = yes; then
15405
15406 cat >>confdefs.h <<_ACEOF
15407 #define HAVE_KRB5_ERROR_E_DATA 1
15408 _ACEOF
15409
15410
15411 else
15412   { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
15413 echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
15414    { (exit 1); exit 1; }; }
15415 fi
15416
15417 fi
15418
15419
15420 # Win32 requires headers to be loaded for __stdcall, so can't use
15421 # AC_CHECK_FUNCS here.
15422   { echo "$as_me:$LINENO: checking for krb5_free_unparsed_name" >&5
15423 echo $ECHO_N "checking for krb5_free_unparsed_name... $ECHO_C" >&6; }
15424   cat >conftest.$ac_ext <<_ACEOF
15425 /* confdefs.h.  */
15426 _ACEOF
15427 cat confdefs.h >>conftest.$ac_ext
15428 cat >>conftest.$ac_ext <<_ACEOF
15429 /* end confdefs.h.  */
15430 #include <krb5.h>
15431 int
15432 main ()
15433 {
15434 krb5_free_unparsed_name(NULL,NULL);
15435   ;
15436   return 0;
15437 }
15438 _ACEOF
15439 rm -f conftest.$ac_objext conftest$ac_exeext
15440 if { (ac_try="$ac_link"
15441 case "(($ac_try" in
15442   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15443   *) ac_try_echo=$ac_try;;
15444 esac
15445 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15446   (eval "$ac_link") 2>conftest.er1
15447   ac_status=$?
15448   grep -v '^ *+' conftest.er1 >conftest.err
15449   rm -f conftest.er1
15450   cat conftest.err >&5
15451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15452   (exit $ac_status); } && {
15453          test -z "$ac_c_werror_flag" ||
15454          test ! -s conftest.err
15455        } && test -s conftest$ac_exeext &&
15456        $as_test_x conftest$ac_exeext; then
15457
15458 cat >>confdefs.h <<\_ACEOF
15459 #define HAVE_KRB5_FREE_UNPARSED_NAME 1
15460 _ACEOF
15461
15462 { echo "$as_me:$LINENO: result: yes" >&5
15463 echo "${ECHO_T}yes" >&6; }
15464 else
15465   echo "$as_me: failed program was:" >&5
15466 sed 's/^/| /' conftest.$ac_ext >&5
15467
15468         { echo "$as_me:$LINENO: result: no" >&5
15469 echo "${ECHO_T}no" >&6; }
15470 fi
15471
15472 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15473       conftest$ac_exeext conftest.$ac_ext
15474 fi
15475
15476
15477 ##
15478 ## Functions, global variables
15479 ##
15480
15481 { echo "$as_me:$LINENO: checking for int timezone" >&5
15482 echo $ECHO_N "checking for int timezone... $ECHO_C" >&6; }
15483 if test "${pgac_cv_var_int_timezone+set}" = set; then
15484   echo $ECHO_N "(cached) $ECHO_C" >&6
15485 else
15486   cat >conftest.$ac_ext <<_ACEOF
15487 /* confdefs.h.  */
15488 _ACEOF
15489 cat confdefs.h >>conftest.$ac_ext
15490 cat >>conftest.$ac_ext <<_ACEOF
15491 /* end confdefs.h.  */
15492 #include <time.h>
15493 int res;
15494 int
15495 main ()
15496 {
15497 #ifndef __CYGWIN__
15498 res = timezone / 60;
15499 #else
15500 res = _timezone / 60;
15501 #endif
15502   ;
15503   return 0;
15504 }
15505 _ACEOF
15506 rm -f conftest.$ac_objext conftest$ac_exeext
15507 if { (ac_try="$ac_link"
15508 case "(($ac_try" in
15509   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15510   *) ac_try_echo=$ac_try;;
15511 esac
15512 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15513   (eval "$ac_link") 2>conftest.er1
15514   ac_status=$?
15515   grep -v '^ *+' conftest.er1 >conftest.err
15516   rm -f conftest.er1
15517   cat conftest.err >&5
15518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15519   (exit $ac_status); } && {
15520          test -z "$ac_c_werror_flag" ||
15521          test ! -s conftest.err
15522        } && test -s conftest$ac_exeext &&
15523        $as_test_x conftest$ac_exeext; then
15524   pgac_cv_var_int_timezone=yes
15525 else
15526   echo "$as_me: failed program was:" >&5
15527 sed 's/^/| /' conftest.$ac_ext >&5
15528
15529         pgac_cv_var_int_timezone=no
15530 fi
15531
15532 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15533       conftest$ac_exeext conftest.$ac_ext
15534 fi
15535 { echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
15536 echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6; }
15537 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15538
15539 cat >>confdefs.h <<\_ACEOF
15540 #define HAVE_INT_TIMEZONE
15541 _ACEOF
15542
15543 fi
15544 { echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
15545 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6; }
15546  if test "${ac_cv_func_accept_return+set}" = set; then
15547   echo $ECHO_N "(cached) $ECHO_C" >&6
15548 else
15549    if test "${ac_cv_func_accept_arg1+set}" = set; then
15550   echo $ECHO_N "(cached) $ECHO_C" >&6
15551 else
15552     if test "${ac_cv_func_accept_arg2+set}" = set; then
15553   echo $ECHO_N "(cached) $ECHO_C" >&6
15554 else
15555      if test "${ac_cv_func_accept_arg3+set}" = set; then
15556   echo $ECHO_N "(cached) $ECHO_C" >&6
15557 else
15558       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
15559       for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
15560        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
15561         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
15562          cat >conftest.$ac_ext <<_ACEOF
15563 /* confdefs.h.  */
15564 _ACEOF
15565 cat confdefs.h >>conftest.$ac_ext
15566 cat >>conftest.$ac_ext <<_ACEOF
15567 /* end confdefs.h.  */
15568 #ifdef HAVE_SYS_TYPES_H
15569 #include <sys/types.h>
15570 #endif
15571 #ifdef HAVE_SYS_SOCKET_H
15572 #include <sys/socket.h>
15573 #endif
15574 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
15575 int
15576 main ()
15577 {
15578
15579   ;
15580   return 0;
15581 }
15582 _ACEOF
15583 rm -f conftest.$ac_objext
15584 if { (ac_try="$ac_compile"
15585 case "(($ac_try" in
15586   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15587   *) ac_try_echo=$ac_try;;
15588 esac
15589 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15590   (eval "$ac_compile") 2>conftest.er1
15591   ac_status=$?
15592   grep -v '^ *+' conftest.er1 >conftest.err
15593   rm -f conftest.er1
15594   cat conftest.err >&5
15595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15596   (exit $ac_status); } && {
15597          test -z "$ac_c_werror_flag" ||
15598          test ! -s conftest.err
15599        } && test -s conftest.$ac_objext; then
15600   ac_not_found=no; break 4
15601 else
15602   echo "$as_me: failed program was:" >&5
15603 sed 's/^/| /' conftest.$ac_ext >&5
15604
15605         ac_not_found=yes
15606 fi
15607
15608 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15609        done
15610       done
15611      done
15612     done
15613     if test "$ac_not_found" = yes; then
15614       { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
15615 echo "$as_me: error: could not determine argument types" >&2;}
15616    { (exit 1); exit 1; }; }
15617     fi
15618     if test "$ac_cv_func_accept_arg3" = "void"; then
15619       ac_cv_func_accept_arg3=int
15620     fi
15621
15622 fi
15623
15624 fi
15625
15626 fi
15627
15628 fi
15629  { echo "$as_me:$LINENO: result: $ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&5
15630 echo "${ECHO_T}$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
15631
15632 cat >>confdefs.h <<_ACEOF
15633 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
15634 _ACEOF
15635
15636
15637 cat >>confdefs.h <<_ACEOF
15638 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
15639 _ACEOF
15640
15641
15642 cat >>confdefs.h <<_ACEOF
15643 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
15644 _ACEOF
15645
15646
15647 cat >>confdefs.h <<_ACEOF
15648 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
15649 _ACEOF
15650
15651
15652 { echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
15653 echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6; }
15654 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
15655   echo $ECHO_N "(cached) $ECHO_C" >&6
15656 else
15657   cat >conftest.$ac_ext <<_ACEOF
15658 /* confdefs.h.  */
15659 _ACEOF
15660 cat confdefs.h >>conftest.$ac_ext
15661 cat >>conftest.$ac_ext <<_ACEOF
15662 /* end confdefs.h.  */
15663 #include <sys/time.h>
15664 int
15665 main ()
15666 {
15667 struct timeval *tp;
15668 struct timezone *tzp;
15669 gettimeofday(tp,tzp);
15670   ;
15671   return 0;
15672 }
15673 _ACEOF
15674 rm -f conftest.$ac_objext
15675 if { (ac_try="$ac_compile"
15676 case "(($ac_try" in
15677   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15678   *) ac_try_echo=$ac_try;;
15679 esac
15680 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15681   (eval "$ac_compile") 2>conftest.er1
15682   ac_status=$?
15683   grep -v '^ *+' conftest.er1 >conftest.err
15684   rm -f conftest.er1
15685   cat conftest.err >&5
15686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15687   (exit $ac_status); } && {
15688          test -z "$ac_c_werror_flag" ||
15689          test ! -s conftest.err
15690        } && test -s conftest.$ac_objext; then
15691   pgac_cv_func_gettimeofday_1arg=no
15692 else
15693   echo "$as_me: failed program was:" >&5
15694 sed 's/^/| /' conftest.$ac_ext >&5
15695
15696         pgac_cv_func_gettimeofday_1arg=yes
15697 fi
15698
15699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15700 fi
15701 { echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
15702 echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6; }
15703 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
15704
15705 cat >>confdefs.h <<\_ACEOF
15706 #define GETTIMEOFDAY_1ARG
15707 _ACEOF
15708
15709 fi
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733 for ac_func in cbrt dlopen fcvt fdatasync getpeereid getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
15734 do
15735 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15736 { echo "$as_me:$LINENO: checking for $ac_func" >&5
15737 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15738 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
15739   echo $ECHO_N "(cached) $ECHO_C" >&6
15740 else
15741   cat >conftest.$ac_ext <<_ACEOF
15742 /* confdefs.h.  */
15743 _ACEOF
15744 cat confdefs.h >>conftest.$ac_ext
15745 cat >>conftest.$ac_ext <<_ACEOF
15746 /* end confdefs.h.  */
15747 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15748    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15749 #define $ac_func innocuous_$ac_func
15750
15751 /* System header to define __stub macros and hopefully few prototypes,
15752     which can conflict with char $ac_func (); below.
15753     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15754     <limits.h> exists even on freestanding compilers.  */
15755
15756 #ifdef __STDC__
15757 # include <limits.h>
15758 #else
15759 # include <assert.h>
15760 #endif
15761
15762 #undef $ac_func
15763
15764 /* Override any GCC internal prototype to avoid an error.
15765    Use char because int might match the return type of a GCC
15766    builtin and then its argument prototype would still apply.  */
15767 #ifdef __cplusplus
15768 extern "C"
15769 #endif
15770 char $ac_func ();
15771 /* The GNU C library defines this for functions which it implements
15772     to always fail with ENOSYS.  Some functions are actually named
15773     something starting with __ and the normal name is an alias.  */
15774 #if defined __stub_$ac_func || defined __stub___$ac_func
15775 choke me
15776 #endif
15777
15778 int
15779 main ()
15780 {
15781 return $ac_func ();
15782   ;
15783   return 0;
15784 }
15785 _ACEOF
15786 rm -f conftest.$ac_objext conftest$ac_exeext
15787 if { (ac_try="$ac_link"
15788 case "(($ac_try" in
15789   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15790   *) ac_try_echo=$ac_try;;
15791 esac
15792 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15793   (eval "$ac_link") 2>conftest.er1
15794   ac_status=$?
15795   grep -v '^ *+' conftest.er1 >conftest.err
15796   rm -f conftest.er1
15797   cat conftest.err >&5
15798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15799   (exit $ac_status); } && {
15800          test -z "$ac_c_werror_flag" ||
15801          test ! -s conftest.err
15802        } && test -s conftest$ac_exeext &&
15803        $as_test_x conftest$ac_exeext; then
15804   eval "$as_ac_var=yes"
15805 else
15806   echo "$as_me: failed program was:" >&5
15807 sed 's/^/| /' conftest.$ac_ext >&5
15808
15809         eval "$as_ac_var=no"
15810 fi
15811
15812 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15813       conftest$ac_exeext conftest.$ac_ext
15814 fi
15815 ac_res=`eval echo '${'$as_ac_var'}'`
15816                { echo "$as_me:$LINENO: result: $ac_res" >&5
15817 echo "${ECHO_T}$ac_res" >&6; }
15818 if test `eval echo '${'$as_ac_var'}'` = yes; then
15819   cat >>confdefs.h <<_ACEOF
15820 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15821 _ACEOF
15822
15823 fi
15824 done
15825
15826
15827 { echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
15828 echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6; }
15829 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
15830   echo $ECHO_N "(cached) $ECHO_C" >&6
15831 else
15832   cat >conftest.$ac_ext <<_ACEOF
15833 /* confdefs.h.  */
15834 _ACEOF
15835 cat confdefs.h >>conftest.$ac_ext
15836 cat >>conftest.$ac_ext <<_ACEOF
15837 /* end confdefs.h.  */
15838 #include <unistd.h>
15839
15840 int
15841 main ()
15842 {
15843 #ifndef fdatasync
15844   (void) fdatasync;
15845 #endif
15846
15847   ;
15848   return 0;
15849 }
15850 _ACEOF
15851 rm -f conftest.$ac_objext
15852 if { (ac_try="$ac_compile"
15853 case "(($ac_try" in
15854   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15855   *) ac_try_echo=$ac_try;;
15856 esac
15857 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15858   (eval "$ac_compile") 2>conftest.er1
15859   ac_status=$?
15860   grep -v '^ *+' conftest.er1 >conftest.err
15861   rm -f conftest.er1
15862   cat conftest.err >&5
15863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15864   (exit $ac_status); } && {
15865          test -z "$ac_c_werror_flag" ||
15866          test ! -s conftest.err
15867        } && test -s conftest.$ac_objext; then
15868   ac_cv_have_decl_fdatasync=yes
15869 else
15870   echo "$as_me: failed program was:" >&5
15871 sed 's/^/| /' conftest.$ac_ext >&5
15872
15873         ac_cv_have_decl_fdatasync=no
15874 fi
15875
15876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15877 fi
15878 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
15879 echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6; }
15880 if test $ac_cv_have_decl_fdatasync = yes; then
15881
15882 cat >>confdefs.h <<_ACEOF
15883 #define HAVE_DECL_FDATASYNC 1
15884 _ACEOF
15885
15886
15887 else
15888   cat >>confdefs.h <<_ACEOF
15889 #define HAVE_DECL_FDATASYNC 0
15890 _ACEOF
15891
15892
15893 fi
15894
15895
15896 { echo "$as_me:$LINENO: checking whether posix_fadvise is declared" >&5
15897 echo $ECHO_N "checking whether posix_fadvise is declared... $ECHO_C" >&6; }
15898 if test "${ac_cv_have_decl_posix_fadvise+set}" = set; then
15899   echo $ECHO_N "(cached) $ECHO_C" >&6
15900 else
15901   cat >conftest.$ac_ext <<_ACEOF
15902 /* confdefs.h.  */
15903 _ACEOF
15904 cat confdefs.h >>conftest.$ac_ext
15905 cat >>conftest.$ac_ext <<_ACEOF
15906 /* end confdefs.h.  */
15907 #include <fcntl.h>
15908
15909 int
15910 main ()
15911 {
15912 #ifndef posix_fadvise
15913   (void) posix_fadvise;
15914 #endif
15915
15916   ;
15917   return 0;
15918 }
15919 _ACEOF
15920 rm -f conftest.$ac_objext
15921 if { (ac_try="$ac_compile"
15922 case "(($ac_try" in
15923   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15924   *) ac_try_echo=$ac_try;;
15925 esac
15926 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15927   (eval "$ac_compile") 2>conftest.er1
15928   ac_status=$?
15929   grep -v '^ *+' conftest.er1 >conftest.err
15930   rm -f conftest.er1
15931   cat conftest.err >&5
15932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15933   (exit $ac_status); } && {
15934          test -z "$ac_c_werror_flag" ||
15935          test ! -s conftest.err
15936        } && test -s conftest.$ac_objext; then
15937   ac_cv_have_decl_posix_fadvise=yes
15938 else
15939   echo "$as_me: failed program was:" >&5
15940 sed 's/^/| /' conftest.$ac_ext >&5
15941
15942         ac_cv_have_decl_posix_fadvise=no
15943 fi
15944
15945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15946 fi
15947 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix_fadvise" >&5
15948 echo "${ECHO_T}$ac_cv_have_decl_posix_fadvise" >&6; }
15949 if test $ac_cv_have_decl_posix_fadvise = yes; then
15950
15951 cat >>confdefs.h <<_ACEOF
15952 #define HAVE_DECL_POSIX_FADVISE 1
15953 _ACEOF
15954
15955
15956 else
15957   cat >>confdefs.h <<_ACEOF
15958 #define HAVE_DECL_POSIX_FADVISE 0
15959 _ACEOF
15960
15961
15962 fi
15963
15964
15965 { echo "$as_me:$LINENO: checking whether strlcat is declared" >&5
15966 echo $ECHO_N "checking whether strlcat is declared... $ECHO_C" >&6; }
15967 if test "${ac_cv_have_decl_strlcat+set}" = set; then
15968   echo $ECHO_N "(cached) $ECHO_C" >&6
15969 else
15970   cat >conftest.$ac_ext <<_ACEOF
15971 /* confdefs.h.  */
15972 _ACEOF
15973 cat confdefs.h >>conftest.$ac_ext
15974 cat >>conftest.$ac_ext <<_ACEOF
15975 /* end confdefs.h.  */
15976 $ac_includes_default
15977 int
15978 main ()
15979 {
15980 #ifndef strlcat
15981   (void) strlcat;
15982 #endif
15983
15984   ;
15985   return 0;
15986 }
15987 _ACEOF
15988 rm -f conftest.$ac_objext
15989 if { (ac_try="$ac_compile"
15990 case "(($ac_try" in
15991   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15992   *) ac_try_echo=$ac_try;;
15993 esac
15994 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15995   (eval "$ac_compile") 2>conftest.er1
15996   ac_status=$?
15997   grep -v '^ *+' conftest.er1 >conftest.err
15998   rm -f conftest.er1
15999   cat conftest.err >&5
16000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16001   (exit $ac_status); } && {
16002          test -z "$ac_c_werror_flag" ||
16003          test ! -s conftest.err
16004        } && test -s conftest.$ac_objext; then
16005   ac_cv_have_decl_strlcat=yes
16006 else
16007   echo "$as_me: failed program was:" >&5
16008 sed 's/^/| /' conftest.$ac_ext >&5
16009
16010         ac_cv_have_decl_strlcat=no
16011 fi
16012
16013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16014 fi
16015 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcat" >&5
16016 echo "${ECHO_T}$ac_cv_have_decl_strlcat" >&6; }
16017 if test $ac_cv_have_decl_strlcat = yes; then
16018
16019 cat >>confdefs.h <<_ACEOF
16020 #define HAVE_DECL_STRLCAT 1
16021 _ACEOF
16022
16023
16024 else
16025   cat >>confdefs.h <<_ACEOF
16026 #define HAVE_DECL_STRLCAT 0
16027 _ACEOF
16028
16029
16030 fi
16031 { echo "$as_me:$LINENO: checking whether strlcpy is declared" >&5
16032 echo $ECHO_N "checking whether strlcpy is declared... $ECHO_C" >&6; }
16033 if test "${ac_cv_have_decl_strlcpy+set}" = set; then
16034   echo $ECHO_N "(cached) $ECHO_C" >&6
16035 else
16036   cat >conftest.$ac_ext <<_ACEOF
16037 /* confdefs.h.  */
16038 _ACEOF
16039 cat confdefs.h >>conftest.$ac_ext
16040 cat >>conftest.$ac_ext <<_ACEOF
16041 /* end confdefs.h.  */
16042 $ac_includes_default
16043 int
16044 main ()
16045 {
16046 #ifndef strlcpy
16047   (void) strlcpy;
16048 #endif
16049
16050   ;
16051   return 0;
16052 }
16053 _ACEOF
16054 rm -f conftest.$ac_objext
16055 if { (ac_try="$ac_compile"
16056 case "(($ac_try" in
16057   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16058   *) ac_try_echo=$ac_try;;
16059 esac
16060 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16061   (eval "$ac_compile") 2>conftest.er1
16062   ac_status=$?
16063   grep -v '^ *+' conftest.er1 >conftest.err
16064   rm -f conftest.er1
16065   cat conftest.err >&5
16066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16067   (exit $ac_status); } && {
16068          test -z "$ac_c_werror_flag" ||
16069          test ! -s conftest.err
16070        } && test -s conftest.$ac_objext; then
16071   ac_cv_have_decl_strlcpy=yes
16072 else
16073   echo "$as_me: failed program was:" >&5
16074 sed 's/^/| /' conftest.$ac_ext >&5
16075
16076         ac_cv_have_decl_strlcpy=no
16077 fi
16078
16079 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16080 fi
16081 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcpy" >&5
16082 echo "${ECHO_T}$ac_cv_have_decl_strlcpy" >&6; }
16083 if test $ac_cv_have_decl_strlcpy = yes; then
16084
16085 cat >>confdefs.h <<_ACEOF
16086 #define HAVE_DECL_STRLCPY 1
16087 _ACEOF
16088
16089
16090 else
16091   cat >>confdefs.h <<_ACEOF
16092 #define HAVE_DECL_STRLCPY 0
16093 _ACEOF
16094
16095
16096 fi
16097
16098
16099 # This is probably only present on Darwin, but may as well check always
16100 { echo "$as_me:$LINENO: checking whether F_FULLFSYNC is declared" >&5
16101 echo $ECHO_N "checking whether F_FULLFSYNC is declared... $ECHO_C" >&6; }
16102 if test "${ac_cv_have_decl_F_FULLFSYNC+set}" = set; then
16103   echo $ECHO_N "(cached) $ECHO_C" >&6
16104 else
16105   cat >conftest.$ac_ext <<_ACEOF
16106 /* confdefs.h.  */
16107 _ACEOF
16108 cat confdefs.h >>conftest.$ac_ext
16109 cat >>conftest.$ac_ext <<_ACEOF
16110 /* end confdefs.h.  */
16111 #include <fcntl.h>
16112
16113 int
16114 main ()
16115 {
16116 #ifndef F_FULLFSYNC
16117   (void) F_FULLFSYNC;
16118 #endif
16119
16120   ;
16121   return 0;
16122 }
16123 _ACEOF
16124 rm -f conftest.$ac_objext
16125 if { (ac_try="$ac_compile"
16126 case "(($ac_try" in
16127   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16128   *) ac_try_echo=$ac_try;;
16129 esac
16130 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16131   (eval "$ac_compile") 2>conftest.er1
16132   ac_status=$?
16133   grep -v '^ *+' conftest.er1 >conftest.err
16134   rm -f conftest.er1
16135   cat conftest.err >&5
16136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16137   (exit $ac_status); } && {
16138          test -z "$ac_c_werror_flag" ||
16139          test ! -s conftest.err
16140        } && test -s conftest.$ac_objext; then
16141   ac_cv_have_decl_F_FULLFSYNC=yes
16142 else
16143   echo "$as_me: failed program was:" >&5
16144 sed 's/^/| /' conftest.$ac_ext >&5
16145
16146         ac_cv_have_decl_F_FULLFSYNC=no
16147 fi
16148
16149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16150 fi
16151 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_FULLFSYNC" >&5
16152 echo "${ECHO_T}$ac_cv_have_decl_F_FULLFSYNC" >&6; }
16153 if test $ac_cv_have_decl_F_FULLFSYNC = yes; then
16154
16155 cat >>confdefs.h <<_ACEOF
16156 #define HAVE_DECL_F_FULLFSYNC 1
16157 _ACEOF
16158
16159
16160 else
16161   cat >>confdefs.h <<_ACEOF
16162 #define HAVE_DECL_F_FULLFSYNC 0
16163 _ACEOF
16164
16165
16166 fi
16167
16168
16169
16170 HAVE_IPV6=no
16171 { echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
16172 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6; }
16173 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
16174   echo $ECHO_N "(cached) $ECHO_C" >&6
16175 else
16176   cat >conftest.$ac_ext <<_ACEOF
16177 /* confdefs.h.  */
16178 _ACEOF
16179 cat confdefs.h >>conftest.$ac_ext
16180 cat >>conftest.$ac_ext <<_ACEOF
16181 /* end confdefs.h.  */
16182 $ac_includes_default
16183 #include <netinet/in.h>
16184
16185 typedef struct sockaddr_in6 ac__type_new_;
16186 int
16187 main ()
16188 {
16189 if ((ac__type_new_ *) 0)
16190   return 0;
16191 if (sizeof (ac__type_new_))
16192   return 0;
16193   ;
16194   return 0;
16195 }
16196 _ACEOF
16197 rm -f conftest.$ac_objext
16198 if { (ac_try="$ac_compile"
16199 case "(($ac_try" in
16200   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16201   *) ac_try_echo=$ac_try;;
16202 esac
16203 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16204   (eval "$ac_compile") 2>conftest.er1
16205   ac_status=$?
16206   grep -v '^ *+' conftest.er1 >conftest.err
16207   rm -f conftest.er1
16208   cat conftest.err >&5
16209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16210   (exit $ac_status); } && {
16211          test -z "$ac_c_werror_flag" ||
16212          test ! -s conftest.err
16213        } && test -s conftest.$ac_objext; then
16214   ac_cv_type_struct_sockaddr_in6=yes
16215 else
16216   echo "$as_me: failed program was:" >&5
16217 sed 's/^/| /' conftest.$ac_ext >&5
16218
16219         ac_cv_type_struct_sockaddr_in6=no
16220 fi
16221
16222 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16223 fi
16224 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
16225 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6; }
16226 if test $ac_cv_type_struct_sockaddr_in6 = yes; then
16227
16228 cat >>confdefs.h <<\_ACEOF
16229 #define HAVE_IPV6 1
16230 _ACEOF
16231
16232          HAVE_IPV6=yes
16233 fi
16234
16235
16236
16237 { echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
16238 echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6; }
16239 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
16240   echo $ECHO_N "(cached) $ECHO_C" >&6
16241 else
16242   cat >conftest.$ac_ext <<_ACEOF
16243 /* confdefs.h.  */
16244 _ACEOF
16245 cat confdefs.h >>conftest.$ac_ext
16246 cat >>conftest.$ac_ext <<_ACEOF
16247 /* end confdefs.h.  */
16248 #include <machine/vmparam.h>
16249 #include <sys/exec.h>
16250
16251 int
16252 main ()
16253 {
16254 PS_STRINGS->ps_nargvstr = 1;
16255 PS_STRINGS->ps_argvstr = "foo";
16256   ;
16257   return 0;
16258 }
16259 _ACEOF
16260 rm -f conftest.$ac_objext conftest$ac_exeext
16261 if { (ac_try="$ac_link"
16262 case "(($ac_try" in
16263   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16264   *) ac_try_echo=$ac_try;;
16265 esac
16266 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16267   (eval "$ac_link") 2>conftest.er1
16268   ac_status=$?
16269   grep -v '^ *+' conftest.er1 >conftest.err
16270   rm -f conftest.er1
16271   cat conftest.err >&5
16272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16273   (exit $ac_status); } && {
16274          test -z "$ac_c_werror_flag" ||
16275          test ! -s conftest.err
16276        } && test -s conftest$ac_exeext &&
16277        $as_test_x conftest$ac_exeext; then
16278   pgac_cv_var_PS_STRINGS=yes
16279 else
16280   echo "$as_me: failed program was:" >&5
16281 sed 's/^/| /' conftest.$ac_ext >&5
16282
16283         pgac_cv_var_PS_STRINGS=no
16284 fi
16285
16286 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16287       conftest$ac_exeext conftest.$ac_ext
16288 fi
16289 { echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
16290 echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6; }
16291 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
16292
16293 cat >>confdefs.h <<\_ACEOF
16294 #define HAVE_PS_STRINGS
16295 _ACEOF
16296
16297 fi
16298
16299
16300 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
16301 # is missing.  Yes, there are machines that have only one.  We may
16302 # also decide to use snprintf.c if snprintf() is present but does not
16303 # have all the features we need --- see below.
16304
16305 if test "$PORTNAME" = "win32"; then
16306   # Win32 gets snprintf.c built unconditionally.
16307   #
16308   # To properly translate all NLS languages strings, we must support the
16309   # *printf() %$ format, which allows *printf() arguments to be selected
16310   # by position in the translated string.
16311   #
16312   # libintl versions < 0.13 use the native *printf() functions, and Win32
16313   # *printf() doesn't understand %$, so we must use our /port versions,
16314   # which do understand %$. libintl versions >= 0.13 include their own
16315   # *printf versions on Win32.  The libintl 0.13 release note text is:
16316   #
16317   #   C format strings with positions, as they arise when a translator
16318   #   needs to reorder a sentence, are now supported on all platforms.
16319   #   On those few platforms (NetBSD and Woe32) for which the native
16320   #   printf()/fprintf()/... functions don't support such format
16321   #   strings, replacements are provided through <libintl.h>.
16322   #
16323   # We could use libintl >= 0.13's *printf() if we were sure that we had
16324   # a litint >= 0.13 at runtime, but seeing that there is no clean way
16325   # to guarantee that, it is best to just use our own, so we are sure to
16326   # get %$ support. In include/port.h we disable the *printf() macros
16327   # that might have been defined by libintl.
16328   #
16329   # We do this unconditionally whether NLS is used or not so we are sure
16330   # that all Win32 libraries and binaries behave the same.
16331   pgac_need_repl_snprintf=yes
16332 else
16333   pgac_need_repl_snprintf=no
16334
16335 for ac_func in snprintf
16336 do
16337 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16338 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16339 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16340 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16341   echo $ECHO_N "(cached) $ECHO_C" >&6
16342 else
16343   cat >conftest.$ac_ext <<_ACEOF
16344 /* confdefs.h.  */
16345 _ACEOF
16346 cat confdefs.h >>conftest.$ac_ext
16347 cat >>conftest.$ac_ext <<_ACEOF
16348 /* end confdefs.h.  */
16349 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16350    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16351 #define $ac_func innocuous_$ac_func
16352
16353 /* System header to define __stub macros and hopefully few prototypes,
16354     which can conflict with char $ac_func (); below.
16355     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16356     <limits.h> exists even on freestanding compilers.  */
16357
16358 #ifdef __STDC__
16359 # include <limits.h>
16360 #else
16361 # include <assert.h>
16362 #endif
16363
16364 #undef $ac_func
16365
16366 /* Override any GCC internal prototype to avoid an error.
16367    Use char because int might match the return type of a GCC
16368    builtin and then its argument prototype would still apply.  */
16369 #ifdef __cplusplus
16370 extern "C"
16371 #endif
16372 char $ac_func ();
16373 /* The GNU C library defines this for functions which it implements
16374     to always fail with ENOSYS.  Some functions are actually named
16375     something starting with __ and the normal name is an alias.  */
16376 #if defined __stub_$ac_func || defined __stub___$ac_func
16377 choke me
16378 #endif
16379
16380 int
16381 main ()
16382 {
16383 return $ac_func ();
16384   ;
16385   return 0;
16386 }
16387 _ACEOF
16388 rm -f conftest.$ac_objext conftest$ac_exeext
16389 if { (ac_try="$ac_link"
16390 case "(($ac_try" in
16391   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16392   *) ac_try_echo=$ac_try;;
16393 esac
16394 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16395   (eval "$ac_link") 2>conftest.er1
16396   ac_status=$?
16397   grep -v '^ *+' conftest.er1 >conftest.err
16398   rm -f conftest.er1
16399   cat conftest.err >&5
16400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16401   (exit $ac_status); } && {
16402          test -z "$ac_c_werror_flag" ||
16403          test ! -s conftest.err
16404        } && test -s conftest$ac_exeext &&
16405        $as_test_x conftest$ac_exeext; then
16406   eval "$as_ac_var=yes"
16407 else
16408   echo "$as_me: failed program was:" >&5
16409 sed 's/^/| /' conftest.$ac_ext >&5
16410
16411         eval "$as_ac_var=no"
16412 fi
16413
16414 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16415       conftest$ac_exeext conftest.$ac_ext
16416 fi
16417 ac_res=`eval echo '${'$as_ac_var'}'`
16418                { echo "$as_me:$LINENO: result: $ac_res" >&5
16419 echo "${ECHO_T}$ac_res" >&6; }
16420 if test `eval echo '${'$as_ac_var'}'` = yes; then
16421   cat >>confdefs.h <<_ACEOF
16422 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16423 _ACEOF
16424
16425 else
16426   pgac_need_repl_snprintf=yes
16427 fi
16428 done
16429
16430
16431 for ac_func in vsnprintf
16432 do
16433 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16434 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16435 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16436 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16437   echo $ECHO_N "(cached) $ECHO_C" >&6
16438 else
16439   cat >conftest.$ac_ext <<_ACEOF
16440 /* confdefs.h.  */
16441 _ACEOF
16442 cat confdefs.h >>conftest.$ac_ext
16443 cat >>conftest.$ac_ext <<_ACEOF
16444 /* end confdefs.h.  */
16445 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16446    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16447 #define $ac_func innocuous_$ac_func
16448
16449 /* System header to define __stub macros and hopefully few prototypes,
16450     which can conflict with char $ac_func (); below.
16451     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16452     <limits.h> exists even on freestanding compilers.  */
16453
16454 #ifdef __STDC__
16455 # include <limits.h>
16456 #else
16457 # include <assert.h>
16458 #endif
16459
16460 #undef $ac_func
16461
16462 /* Override any GCC internal prototype to avoid an error.
16463    Use char because int might match the return type of a GCC
16464    builtin and then its argument prototype would still apply.  */
16465 #ifdef __cplusplus
16466 extern "C"
16467 #endif
16468 char $ac_func ();
16469 /* The GNU C library defines this for functions which it implements
16470     to always fail with ENOSYS.  Some functions are actually named
16471     something starting with __ and the normal name is an alias.  */
16472 #if defined __stub_$ac_func || defined __stub___$ac_func
16473 choke me
16474 #endif
16475
16476 int
16477 main ()
16478 {
16479 return $ac_func ();
16480   ;
16481   return 0;
16482 }
16483 _ACEOF
16484 rm -f conftest.$ac_objext conftest$ac_exeext
16485 if { (ac_try="$ac_link"
16486 case "(($ac_try" in
16487   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16488   *) ac_try_echo=$ac_try;;
16489 esac
16490 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16491   (eval "$ac_link") 2>conftest.er1
16492   ac_status=$?
16493   grep -v '^ *+' conftest.er1 >conftest.err
16494   rm -f conftest.er1
16495   cat conftest.err >&5
16496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16497   (exit $ac_status); } && {
16498          test -z "$ac_c_werror_flag" ||
16499          test ! -s conftest.err
16500        } && test -s conftest$ac_exeext &&
16501        $as_test_x conftest$ac_exeext; then
16502   eval "$as_ac_var=yes"
16503 else
16504   echo "$as_me: failed program was:" >&5
16505 sed 's/^/| /' conftest.$ac_ext >&5
16506
16507         eval "$as_ac_var=no"
16508 fi
16509
16510 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16511       conftest$ac_exeext conftest.$ac_ext
16512 fi
16513 ac_res=`eval echo '${'$as_ac_var'}'`
16514                { echo "$as_me:$LINENO: result: $ac_res" >&5
16515 echo "${ECHO_T}$ac_res" >&6; }
16516 if test `eval echo '${'$as_ac_var'}'` = yes; then
16517   cat >>confdefs.h <<_ACEOF
16518 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16519 _ACEOF
16520
16521 else
16522   pgac_need_repl_snprintf=yes
16523 fi
16524 done
16525
16526 fi
16527
16528
16529 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
16530 # include/c.h will provide declarations.  Note this is a separate test
16531 # from whether the functions exist in the C library --- there are
16532 # systems that have the functions but don't bother to declare them :-(
16533
16534 { echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
16535 echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6; }
16536 if test "${ac_cv_have_decl_snprintf+set}" = set; then
16537   echo $ECHO_N "(cached) $ECHO_C" >&6
16538 else
16539   cat >conftest.$ac_ext <<_ACEOF
16540 /* confdefs.h.  */
16541 _ACEOF
16542 cat confdefs.h >>conftest.$ac_ext
16543 cat >>conftest.$ac_ext <<_ACEOF
16544 /* end confdefs.h.  */
16545 $ac_includes_default
16546 int
16547 main ()
16548 {
16549 #ifndef snprintf
16550   (void) snprintf;
16551 #endif
16552
16553   ;
16554   return 0;
16555 }
16556 _ACEOF
16557 rm -f conftest.$ac_objext
16558 if { (ac_try="$ac_compile"
16559 case "(($ac_try" in
16560   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16561   *) ac_try_echo=$ac_try;;
16562 esac
16563 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16564   (eval "$ac_compile") 2>conftest.er1
16565   ac_status=$?
16566   grep -v '^ *+' conftest.er1 >conftest.err
16567   rm -f conftest.er1
16568   cat conftest.err >&5
16569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16570   (exit $ac_status); } && {
16571          test -z "$ac_c_werror_flag" ||
16572          test ! -s conftest.err
16573        } && test -s conftest.$ac_objext; then
16574   ac_cv_have_decl_snprintf=yes
16575 else
16576   echo "$as_me: failed program was:" >&5
16577 sed 's/^/| /' conftest.$ac_ext >&5
16578
16579         ac_cv_have_decl_snprintf=no
16580 fi
16581
16582 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16583 fi
16584 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
16585 echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6; }
16586 if test $ac_cv_have_decl_snprintf = yes; then
16587
16588 cat >>confdefs.h <<_ACEOF
16589 #define HAVE_DECL_SNPRINTF 1
16590 _ACEOF
16591
16592
16593 else
16594   cat >>confdefs.h <<_ACEOF
16595 #define HAVE_DECL_SNPRINTF 0
16596 _ACEOF
16597
16598
16599 fi
16600 { echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
16601 echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6; }
16602 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
16603   echo $ECHO_N "(cached) $ECHO_C" >&6
16604 else
16605   cat >conftest.$ac_ext <<_ACEOF
16606 /* confdefs.h.  */
16607 _ACEOF
16608 cat confdefs.h >>conftest.$ac_ext
16609 cat >>conftest.$ac_ext <<_ACEOF
16610 /* end confdefs.h.  */
16611 $ac_includes_default
16612 int
16613 main ()
16614 {
16615 #ifndef vsnprintf
16616   (void) vsnprintf;
16617 #endif
16618
16619   ;
16620   return 0;
16621 }
16622 _ACEOF
16623 rm -f conftest.$ac_objext
16624 if { (ac_try="$ac_compile"
16625 case "(($ac_try" in
16626   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16627   *) ac_try_echo=$ac_try;;
16628 esac
16629 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16630   (eval "$ac_compile") 2>conftest.er1
16631   ac_status=$?
16632   grep -v '^ *+' conftest.er1 >conftest.err
16633   rm -f conftest.er1
16634   cat conftest.err >&5
16635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16636   (exit $ac_status); } && {
16637          test -z "$ac_c_werror_flag" ||
16638          test ! -s conftest.err
16639        } && test -s conftest.$ac_objext; then
16640   ac_cv_have_decl_vsnprintf=yes
16641 else
16642   echo "$as_me: failed program was:" >&5
16643 sed 's/^/| /' conftest.$ac_ext >&5
16644
16645         ac_cv_have_decl_vsnprintf=no
16646 fi
16647
16648 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16649 fi
16650 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
16651 echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6; }
16652 if test $ac_cv_have_decl_vsnprintf = yes; then
16653
16654 cat >>confdefs.h <<_ACEOF
16655 #define HAVE_DECL_VSNPRINTF 1
16656 _ACEOF
16657
16658
16659 else
16660   cat >>confdefs.h <<_ACEOF
16661 #define HAVE_DECL_VSNPRINTF 0
16662 _ACEOF
16663
16664
16665 fi
16666
16667
16668
16669
16670 { echo "$as_me:$LINENO: checking for isinf" >&5
16671 echo $ECHO_N "checking for isinf... $ECHO_C" >&6; }
16672 if test "${ac_cv_func_isinf+set}" = set; then
16673   echo $ECHO_N "(cached) $ECHO_C" >&6
16674 else
16675   cat >conftest.$ac_ext <<_ACEOF
16676 /* confdefs.h.  */
16677 _ACEOF
16678 cat confdefs.h >>conftest.$ac_ext
16679 cat >>conftest.$ac_ext <<_ACEOF
16680 /* end confdefs.h.  */
16681
16682 #include <math.h>
16683 double glob_double;
16684
16685 int
16686 main ()
16687 {
16688 return isinf(glob_double) ? 0 : 1;
16689   ;
16690   return 0;
16691 }
16692 _ACEOF
16693 rm -f conftest.$ac_objext conftest$ac_exeext
16694 if { (ac_try="$ac_link"
16695 case "(($ac_try" in
16696   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16697   *) ac_try_echo=$ac_try;;
16698 esac
16699 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16700   (eval "$ac_link") 2>conftest.er1
16701   ac_status=$?
16702   grep -v '^ *+' conftest.er1 >conftest.err
16703   rm -f conftest.er1
16704   cat conftest.err >&5
16705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16706   (exit $ac_status); } && {
16707          test -z "$ac_c_werror_flag" ||
16708          test ! -s conftest.err
16709        } && test -s conftest$ac_exeext &&
16710        $as_test_x conftest$ac_exeext; then
16711   ac_cv_func_isinf=yes
16712 else
16713   echo "$as_me: failed program was:" >&5
16714 sed 's/^/| /' conftest.$ac_ext >&5
16715
16716         ac_cv_func_isinf=no
16717 fi
16718
16719 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16720       conftest$ac_exeext conftest.$ac_ext
16721 fi
16722 { echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
16723 echo "${ECHO_T}$ac_cv_func_isinf" >&6; }
16724
16725 if test $ac_cv_func_isinf = yes ; then
16726
16727 cat >>confdefs.h <<\_ACEOF
16728 #define HAVE_ISINF 1
16729 _ACEOF
16730
16731 else
16732   case " $LIBOBJS " in
16733   *" isinf.$ac_objext "* ) ;;
16734   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
16735  ;;
16736 esac
16737
16738   # Look for a way to implement a substitute for isinf()
16739
16740
16741
16742
16743 for ac_func in fpclass fp_class fp_class_d class
16744 do
16745 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16746 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16747 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16748 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16749   echo $ECHO_N "(cached) $ECHO_C" >&6
16750 else
16751   cat >conftest.$ac_ext <<_ACEOF
16752 /* confdefs.h.  */
16753 _ACEOF
16754 cat confdefs.h >>conftest.$ac_ext
16755 cat >>conftest.$ac_ext <<_ACEOF
16756 /* end confdefs.h.  */
16757 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16758    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16759 #define $ac_func innocuous_$ac_func
16760
16761 /* System header to define __stub macros and hopefully few prototypes,
16762     which can conflict with char $ac_func (); below.
16763     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16764     <limits.h> exists even on freestanding compilers.  */
16765
16766 #ifdef __STDC__
16767 # include <limits.h>
16768 #else
16769 # include <assert.h>
16770 #endif
16771
16772 #undef $ac_func
16773
16774 /* Override any GCC internal prototype to avoid an error.
16775    Use char because int might match the return type of a GCC
16776    builtin and then its argument prototype would still apply.  */
16777 #ifdef __cplusplus
16778 extern "C"
16779 #endif
16780 char $ac_func ();
16781 /* The GNU C library defines this for functions which it implements
16782     to always fail with ENOSYS.  Some functions are actually named
16783     something starting with __ and the normal name is an alias.  */
16784 #if defined __stub_$ac_func || defined __stub___$ac_func
16785 choke me
16786 #endif
16787
16788 int
16789 main ()
16790 {
16791 return $ac_func ();
16792   ;
16793   return 0;
16794 }
16795 _ACEOF
16796 rm -f conftest.$ac_objext conftest$ac_exeext
16797 if { (ac_try="$ac_link"
16798 case "(($ac_try" in
16799   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16800   *) ac_try_echo=$ac_try;;
16801 esac
16802 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16803   (eval "$ac_link") 2>conftest.er1
16804   ac_status=$?
16805   grep -v '^ *+' conftest.er1 >conftest.err
16806   rm -f conftest.er1
16807   cat conftest.err >&5
16808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16809   (exit $ac_status); } && {
16810          test -z "$ac_c_werror_flag" ||
16811          test ! -s conftest.err
16812        } && test -s conftest$ac_exeext &&
16813        $as_test_x conftest$ac_exeext; then
16814   eval "$as_ac_var=yes"
16815 else
16816   echo "$as_me: failed program was:" >&5
16817 sed 's/^/| /' conftest.$ac_ext >&5
16818
16819         eval "$as_ac_var=no"
16820 fi
16821
16822 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16823       conftest$ac_exeext conftest.$ac_ext
16824 fi
16825 ac_res=`eval echo '${'$as_ac_var'}'`
16826                { echo "$as_me:$LINENO: result: $ac_res" >&5
16827 echo "${ECHO_T}$ac_res" >&6; }
16828 if test `eval echo '${'$as_ac_var'}'` = yes; then
16829   cat >>confdefs.h <<_ACEOF
16830 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16831 _ACEOF
16832  break
16833 fi
16834 done
16835
16836 fi
16837
16838 # Some versions of libedit contain strlcpy(); so disregard that library while
16839 # checking for these standard libc functions.
16840 pgac_save_LIBS="$LIBS"
16841 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857 for ac_func in crypt getopt getrusage inet_aton random rint srandom strdup strerror strlcat strlcpy strtol strtoul unsetenv
16858 do
16859 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16860 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16861 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16862 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16863   echo $ECHO_N "(cached) $ECHO_C" >&6
16864 else
16865   cat >conftest.$ac_ext <<_ACEOF
16866 /* confdefs.h.  */
16867 _ACEOF
16868 cat confdefs.h >>conftest.$ac_ext
16869 cat >>conftest.$ac_ext <<_ACEOF
16870 /* end confdefs.h.  */
16871 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16872    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16873 #define $ac_func innocuous_$ac_func
16874
16875 /* System header to define __stub macros and hopefully few prototypes,
16876     which can conflict with char $ac_func (); below.
16877     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16878     <limits.h> exists even on freestanding compilers.  */
16879
16880 #ifdef __STDC__
16881 # include <limits.h>
16882 #else
16883 # include <assert.h>
16884 #endif
16885
16886 #undef $ac_func
16887
16888 /* Override any GCC internal prototype to avoid an error.
16889    Use char because int might match the return type of a GCC
16890    builtin and then its argument prototype would still apply.  */
16891 #ifdef __cplusplus
16892 extern "C"
16893 #endif
16894 char $ac_func ();
16895 /* The GNU C library defines this for functions which it implements
16896     to always fail with ENOSYS.  Some functions are actually named
16897     something starting with __ and the normal name is an alias.  */
16898 #if defined __stub_$ac_func || defined __stub___$ac_func
16899 choke me
16900 #endif
16901
16902 int
16903 main ()
16904 {
16905 return $ac_func ();
16906   ;
16907   return 0;
16908 }
16909 _ACEOF
16910 rm -f conftest.$ac_objext conftest$ac_exeext
16911 if { (ac_try="$ac_link"
16912 case "(($ac_try" in
16913   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16914   *) ac_try_echo=$ac_try;;
16915 esac
16916 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16917   (eval "$ac_link") 2>conftest.er1
16918   ac_status=$?
16919   grep -v '^ *+' conftest.er1 >conftest.err
16920   rm -f conftest.er1
16921   cat conftest.err >&5
16922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16923   (exit $ac_status); } && {
16924          test -z "$ac_c_werror_flag" ||
16925          test ! -s conftest.err
16926        } && test -s conftest$ac_exeext &&
16927        $as_test_x conftest$ac_exeext; then
16928   eval "$as_ac_var=yes"
16929 else
16930   echo "$as_me: failed program was:" >&5
16931 sed 's/^/| /' conftest.$ac_ext >&5
16932
16933         eval "$as_ac_var=no"
16934 fi
16935
16936 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16937       conftest$ac_exeext conftest.$ac_ext
16938 fi
16939 ac_res=`eval echo '${'$as_ac_var'}'`
16940                { echo "$as_me:$LINENO: result: $ac_res" >&5
16941 echo "${ECHO_T}$ac_res" >&6; }
16942 if test `eval echo '${'$as_ac_var'}'` = yes; then
16943   cat >>confdefs.h <<_ACEOF
16944 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16945 _ACEOF
16946
16947 else
16948   case " $LIBOBJS " in
16949   *" $ac_func.$ac_objext "* ) ;;
16950   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
16951  ;;
16952 esac
16953
16954 fi
16955 done
16956
16957
16958
16959 LIBS="$pgac_save_LIBS"
16960
16961 # System's version of getaddrinfo(), if any, may be used only if we found
16962 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
16963 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
16964 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
16965 # because we want to use our own getaddrinfo.c on Windows anyway.)
16966 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
16967
16968 for ac_func in getaddrinfo
16969 do
16970 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16971 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16972 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16973 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16974   echo $ECHO_N "(cached) $ECHO_C" >&6
16975 else
16976   cat >conftest.$ac_ext <<_ACEOF
16977 /* confdefs.h.  */
16978 _ACEOF
16979 cat confdefs.h >>conftest.$ac_ext
16980 cat >>conftest.$ac_ext <<_ACEOF
16981 /* end confdefs.h.  */
16982 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16983    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16984 #define $ac_func innocuous_$ac_func
16985
16986 /* System header to define __stub macros and hopefully few prototypes,
16987     which can conflict with char $ac_func (); below.
16988     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16989     <limits.h> exists even on freestanding compilers.  */
16990
16991 #ifdef __STDC__
16992 # include <limits.h>
16993 #else
16994 # include <assert.h>
16995 #endif
16996
16997 #undef $ac_func
16998
16999 /* Override any GCC internal prototype to avoid an error.
17000    Use char because int might match the return type of a GCC
17001    builtin and then its argument prototype would still apply.  */
17002 #ifdef __cplusplus
17003 extern "C"
17004 #endif
17005 char $ac_func ();
17006 /* The GNU C library defines this for functions which it implements
17007     to always fail with ENOSYS.  Some functions are actually named
17008     something starting with __ and the normal name is an alias.  */
17009 #if defined __stub_$ac_func || defined __stub___$ac_func
17010 choke me
17011 #endif
17012
17013 int
17014 main ()
17015 {
17016 return $ac_func ();
17017   ;
17018   return 0;
17019 }
17020 _ACEOF
17021 rm -f conftest.$ac_objext conftest$ac_exeext
17022 if { (ac_try="$ac_link"
17023 case "(($ac_try" in
17024   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17025   *) ac_try_echo=$ac_try;;
17026 esac
17027 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17028   (eval "$ac_link") 2>conftest.er1
17029   ac_status=$?
17030   grep -v '^ *+' conftest.er1 >conftest.err
17031   rm -f conftest.er1
17032   cat conftest.err >&5
17033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17034   (exit $ac_status); } && {
17035          test -z "$ac_c_werror_flag" ||
17036          test ! -s conftest.err
17037        } && test -s conftest$ac_exeext &&
17038        $as_test_x conftest$ac_exeext; then
17039   eval "$as_ac_var=yes"
17040 else
17041   echo "$as_me: failed program was:" >&5
17042 sed 's/^/| /' conftest.$ac_ext >&5
17043
17044         eval "$as_ac_var=no"
17045 fi
17046
17047 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17048       conftest$ac_exeext conftest.$ac_ext
17049 fi
17050 ac_res=`eval echo '${'$as_ac_var'}'`
17051                { echo "$as_me:$LINENO: result: $ac_res" >&5
17052 echo "${ECHO_T}$ac_res" >&6; }
17053 if test `eval echo '${'$as_ac_var'}'` = yes; then
17054   cat >>confdefs.h <<_ACEOF
17055 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17056 _ACEOF
17057
17058 else
17059   case " $LIBOBJS " in
17060   *" $ac_func.$ac_objext "* ) ;;
17061   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
17062  ;;
17063 esac
17064
17065 fi
17066 done
17067
17068
17069 else
17070   case " $LIBOBJS " in
17071   *" getaddrinfo.$ac_objext "* ) ;;
17072   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
17073  ;;
17074 esac
17075
17076 fi
17077
17078 # Similarly, use system's getopt_long() only if system provides struct option.
17079 # Solaris' getopt() doesn't do what we want for long options, so always use
17080 # our versions on that platform.
17081 if test "$PORTNAME" = "solaris"; then
17082   case " $LIBOBJS " in
17083   *" getopt.$ac_objext "* ) ;;
17084   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
17085  ;;
17086 esac
17087
17088   case " $LIBOBJS " in
17089   *" getopt_long.$ac_objext "* ) ;;
17090   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
17091  ;;
17092 esac
17093
17094 elif test x"$ac_cv_type_struct_option" = xyes ; then
17095
17096 for ac_func in getopt_long
17097 do
17098 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17099 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17100 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17101 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17102   echo $ECHO_N "(cached) $ECHO_C" >&6
17103 else
17104   cat >conftest.$ac_ext <<_ACEOF
17105 /* confdefs.h.  */
17106 _ACEOF
17107 cat confdefs.h >>conftest.$ac_ext
17108 cat >>conftest.$ac_ext <<_ACEOF
17109 /* end confdefs.h.  */
17110 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17111    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17112 #define $ac_func innocuous_$ac_func
17113
17114 /* System header to define __stub macros and hopefully few prototypes,
17115     which can conflict with char $ac_func (); below.
17116     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17117     <limits.h> exists even on freestanding compilers.  */
17118
17119 #ifdef __STDC__
17120 # include <limits.h>
17121 #else
17122 # include <assert.h>
17123 #endif
17124
17125 #undef $ac_func
17126
17127 /* Override any GCC internal prototype to avoid an error.
17128    Use char because int might match the return type of a GCC
17129    builtin and then its argument prototype would still apply.  */
17130 #ifdef __cplusplus
17131 extern "C"
17132 #endif
17133 char $ac_func ();
17134 /* The GNU C library defines this for functions which it implements
17135     to always fail with ENOSYS.  Some functions are actually named
17136     something starting with __ and the normal name is an alias.  */
17137 #if defined __stub_$ac_func || defined __stub___$ac_func
17138 choke me
17139 #endif
17140
17141 int
17142 main ()
17143 {
17144 return $ac_func ();
17145   ;
17146   return 0;
17147 }
17148 _ACEOF
17149 rm -f conftest.$ac_objext conftest$ac_exeext
17150 if { (ac_try="$ac_link"
17151 case "(($ac_try" in
17152   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17153   *) ac_try_echo=$ac_try;;
17154 esac
17155 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17156   (eval "$ac_link") 2>conftest.er1
17157   ac_status=$?
17158   grep -v '^ *+' conftest.er1 >conftest.err
17159   rm -f conftest.er1
17160   cat conftest.err >&5
17161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17162   (exit $ac_status); } && {
17163          test -z "$ac_c_werror_flag" ||
17164          test ! -s conftest.err
17165        } && test -s conftest$ac_exeext &&
17166        $as_test_x conftest$ac_exeext; then
17167   eval "$as_ac_var=yes"
17168 else
17169   echo "$as_me: failed program was:" >&5
17170 sed 's/^/| /' conftest.$ac_ext >&5
17171
17172         eval "$as_ac_var=no"
17173 fi
17174
17175 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17176       conftest$ac_exeext conftest.$ac_ext
17177 fi
17178 ac_res=`eval echo '${'$as_ac_var'}'`
17179                { echo "$as_me:$LINENO: result: $ac_res" >&5
17180 echo "${ECHO_T}$ac_res" >&6; }
17181 if test `eval echo '${'$as_ac_var'}'` = yes; then
17182   cat >>confdefs.h <<_ACEOF
17183 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17184 _ACEOF
17185
17186 else
17187   case " $LIBOBJS " in
17188   *" $ac_func.$ac_objext "* ) ;;
17189   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
17190  ;;
17191 esac
17192
17193 fi
17194 done
17195
17196
17197 else
17198   case " $LIBOBJS " in
17199   *" getopt_long.$ac_objext "* ) ;;
17200   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
17201  ;;
17202 esac
17203
17204 fi
17205
17206 # Win32 support
17207 if test "$PORTNAME" = "win32"; then
17208
17209 for ac_func in gettimeofday
17210 do
17211 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17212 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17213 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17214 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17215   echo $ECHO_N "(cached) $ECHO_C" >&6
17216 else
17217   cat >conftest.$ac_ext <<_ACEOF
17218 /* confdefs.h.  */
17219 _ACEOF
17220 cat confdefs.h >>conftest.$ac_ext
17221 cat >>conftest.$ac_ext <<_ACEOF
17222 /* end confdefs.h.  */
17223 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17224    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17225 #define $ac_func innocuous_$ac_func
17226
17227 /* System header to define __stub macros and hopefully few prototypes,
17228     which can conflict with char $ac_func (); below.
17229     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17230     <limits.h> exists even on freestanding compilers.  */
17231
17232 #ifdef __STDC__
17233 # include <limits.h>
17234 #else
17235 # include <assert.h>
17236 #endif
17237
17238 #undef $ac_func
17239
17240 /* Override any GCC internal prototype to avoid an error.
17241    Use char because int might match the return type of a GCC
17242    builtin and then its argument prototype would still apply.  */
17243 #ifdef __cplusplus
17244 extern "C"
17245 #endif
17246 char $ac_func ();
17247 /* The GNU C library defines this for functions which it implements
17248     to always fail with ENOSYS.  Some functions are actually named
17249     something starting with __ and the normal name is an alias.  */
17250 #if defined __stub_$ac_func || defined __stub___$ac_func
17251 choke me
17252 #endif
17253
17254 int
17255 main ()
17256 {
17257 return $ac_func ();
17258   ;
17259   return 0;
17260 }
17261 _ACEOF
17262 rm -f conftest.$ac_objext conftest$ac_exeext
17263 if { (ac_try="$ac_link"
17264 case "(($ac_try" in
17265   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17266   *) ac_try_echo=$ac_try;;
17267 esac
17268 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17269   (eval "$ac_link") 2>conftest.er1
17270   ac_status=$?
17271   grep -v '^ *+' conftest.er1 >conftest.err
17272   rm -f conftest.er1
17273   cat conftest.err >&5
17274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17275   (exit $ac_status); } && {
17276          test -z "$ac_c_werror_flag" ||
17277          test ! -s conftest.err
17278        } && test -s conftest$ac_exeext &&
17279        $as_test_x conftest$ac_exeext; then
17280   eval "$as_ac_var=yes"
17281 else
17282   echo "$as_me: failed program was:" >&5
17283 sed 's/^/| /' conftest.$ac_ext >&5
17284
17285         eval "$as_ac_var=no"
17286 fi
17287
17288 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17289       conftest$ac_exeext conftest.$ac_ext
17290 fi
17291 ac_res=`eval echo '${'$as_ac_var'}'`
17292                { echo "$as_me:$LINENO: result: $ac_res" >&5
17293 echo "${ECHO_T}$ac_res" >&6; }
17294 if test `eval echo '${'$as_ac_var'}'` = yes; then
17295   cat >>confdefs.h <<_ACEOF
17296 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17297 _ACEOF
17298
17299 else
17300   case " $LIBOBJS " in
17301   *" $ac_func.$ac_objext "* ) ;;
17302   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
17303  ;;
17304 esac
17305
17306 fi
17307 done
17308
17309
17310 case " $LIBOBJS " in
17311   *" kill.$ac_objext "* ) ;;
17312   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
17313  ;;
17314 esac
17315
17316 case " $LIBOBJS " in
17317   *" open.$ac_objext "* ) ;;
17318   *) LIBOBJS="$LIBOBJS open.$ac_objext"
17319  ;;
17320 esac
17321
17322 case " $LIBOBJS " in
17323   *" rand.$ac_objext "* ) ;;
17324   *) LIBOBJS="$LIBOBJS rand.$ac_objext"
17325  ;;
17326 esac
17327
17328 case " $LIBOBJS " in
17329   *" win32error.$ac_objext "* ) ;;
17330   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
17331  ;;
17332 esac
17333
17334
17335 cat >>confdefs.h <<\_ACEOF
17336 #define HAVE_SYMLINK 1
17337 _ACEOF
17338
17339 fi
17340
17341 if test "$with_readline" = yes; then
17342   { echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
17343 echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6; }
17344 cat >conftest.$ac_ext <<_ACEOF
17345 /* confdefs.h.  */
17346 _ACEOF
17347 cat confdefs.h >>conftest.$ac_ext
17348 cat >>conftest.$ac_ext <<_ACEOF
17349 /* end confdefs.h.  */
17350 #include <stdio.h>
17351 #ifdef HAVE_READLINE_READLINE_H
17352 # include <readline/readline.h>
17353 #elif defined(HAVE_READLINE_H)
17354 # include <readline.h>
17355 #endif
17356
17357 int
17358 main ()
17359 {
17360 rl_completion_append_character = 'x';
17361   ;
17362   return 0;
17363 }
17364 _ACEOF
17365 rm -f conftest.$ac_objext conftest$ac_exeext
17366 if { (ac_try="$ac_link"
17367 case "(($ac_try" in
17368   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17369   *) ac_try_echo=$ac_try;;
17370 esac
17371 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17372   (eval "$ac_link") 2>conftest.er1
17373   ac_status=$?
17374   grep -v '^ *+' conftest.er1 >conftest.err
17375   rm -f conftest.er1
17376   cat conftest.err >&5
17377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17378   (exit $ac_status); } && {
17379          test -z "$ac_c_werror_flag" ||
17380          test ! -s conftest.err
17381        } && test -s conftest$ac_exeext &&
17382        $as_test_x conftest$ac_exeext; then
17383   { echo "$as_me:$LINENO: result: yes" >&5
17384 echo "${ECHO_T}yes" >&6; }
17385
17386 cat >>confdefs.h <<\_ACEOF
17387 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
17388 _ACEOF
17389
17390 else
17391   echo "$as_me: failed program was:" >&5
17392 sed 's/^/| /' conftest.$ac_ext >&5
17393
17394         { echo "$as_me:$LINENO: result: no" >&5
17395 echo "${ECHO_T}no" >&6; }
17396 fi
17397
17398 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17399       conftest$ac_exeext conftest.$ac_ext
17400
17401
17402 for ac_func in rl_completion_matches rl_filename_completion_function
17403 do
17404 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17405 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17406 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17407 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17408   echo $ECHO_N "(cached) $ECHO_C" >&6
17409 else
17410   cat >conftest.$ac_ext <<_ACEOF
17411 /* confdefs.h.  */
17412 _ACEOF
17413 cat confdefs.h >>conftest.$ac_ext
17414 cat >>conftest.$ac_ext <<_ACEOF
17415 /* end confdefs.h.  */
17416 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17417    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17418 #define $ac_func innocuous_$ac_func
17419
17420 /* System header to define __stub macros and hopefully few prototypes,
17421     which can conflict with char $ac_func (); below.
17422     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17423     <limits.h> exists even on freestanding compilers.  */
17424
17425 #ifdef __STDC__
17426 # include <limits.h>
17427 #else
17428 # include <assert.h>
17429 #endif
17430
17431 #undef $ac_func
17432
17433 /* Override any GCC internal prototype to avoid an error.
17434    Use char because int might match the return type of a GCC
17435    builtin and then its argument prototype would still apply.  */
17436 #ifdef __cplusplus
17437 extern "C"
17438 #endif
17439 char $ac_func ();
17440 /* The GNU C library defines this for functions which it implements
17441     to always fail with ENOSYS.  Some functions are actually named
17442     something starting with __ and the normal name is an alias.  */
17443 #if defined __stub_$ac_func || defined __stub___$ac_func
17444 choke me
17445 #endif
17446
17447 int
17448 main ()
17449 {
17450 return $ac_func ();
17451   ;
17452   return 0;
17453 }
17454 _ACEOF
17455 rm -f conftest.$ac_objext conftest$ac_exeext
17456 if { (ac_try="$ac_link"
17457 case "(($ac_try" in
17458   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17459   *) ac_try_echo=$ac_try;;
17460 esac
17461 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17462   (eval "$ac_link") 2>conftest.er1
17463   ac_status=$?
17464   grep -v '^ *+' conftest.er1 >conftest.err
17465   rm -f conftest.er1
17466   cat conftest.err >&5
17467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17468   (exit $ac_status); } && {
17469          test -z "$ac_c_werror_flag" ||
17470          test ! -s conftest.err
17471        } && test -s conftest$ac_exeext &&
17472        $as_test_x conftest$ac_exeext; then
17473   eval "$as_ac_var=yes"
17474 else
17475   echo "$as_me: failed program was:" >&5
17476 sed 's/^/| /' conftest.$ac_ext >&5
17477
17478         eval "$as_ac_var=no"
17479 fi
17480
17481 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17482       conftest$ac_exeext conftest.$ac_ext
17483 fi
17484 ac_res=`eval echo '${'$as_ac_var'}'`
17485                { echo "$as_me:$LINENO: result: $ac_res" >&5
17486 echo "${ECHO_T}$ac_res" >&6; }
17487 if test `eval echo '${'$as_ac_var'}'` = yes; then
17488   cat >>confdefs.h <<_ACEOF
17489 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17490 _ACEOF
17491
17492 fi
17493 done
17494
17495
17496 for ac_func in replace_history_entry
17497 do
17498 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17499 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17500 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17501 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17502   echo $ECHO_N "(cached) $ECHO_C" >&6
17503 else
17504   cat >conftest.$ac_ext <<_ACEOF
17505 /* confdefs.h.  */
17506 _ACEOF
17507 cat confdefs.h >>conftest.$ac_ext
17508 cat >>conftest.$ac_ext <<_ACEOF
17509 /* end confdefs.h.  */
17510 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17511    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17512 #define $ac_func innocuous_$ac_func
17513
17514 /* System header to define __stub macros and hopefully few prototypes,
17515     which can conflict with char $ac_func (); below.
17516     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17517     <limits.h> exists even on freestanding compilers.  */
17518
17519 #ifdef __STDC__
17520 # include <limits.h>
17521 #else
17522 # include <assert.h>
17523 #endif
17524
17525 #undef $ac_func
17526
17527 /* Override any GCC internal prototype to avoid an error.
17528    Use char because int might match the return type of a GCC
17529    builtin and then its argument prototype would still apply.  */
17530 #ifdef __cplusplus
17531 extern "C"
17532 #endif
17533 char $ac_func ();
17534 /* The GNU C library defines this for functions which it implements
17535     to always fail with ENOSYS.  Some functions are actually named
17536     something starting with __ and the normal name is an alias.  */
17537 #if defined __stub_$ac_func || defined __stub___$ac_func
17538 choke me
17539 #endif
17540
17541 int
17542 main ()
17543 {
17544 return $ac_func ();
17545   ;
17546   return 0;
17547 }
17548 _ACEOF
17549 rm -f conftest.$ac_objext conftest$ac_exeext
17550 if { (ac_try="$ac_link"
17551 case "(($ac_try" in
17552   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17553   *) ac_try_echo=$ac_try;;
17554 esac
17555 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17556   (eval "$ac_link") 2>conftest.er1
17557   ac_status=$?
17558   grep -v '^ *+' conftest.er1 >conftest.err
17559   rm -f conftest.er1
17560   cat conftest.err >&5
17561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17562   (exit $ac_status); } && {
17563          test -z "$ac_c_werror_flag" ||
17564          test ! -s conftest.err
17565        } && test -s conftest$ac_exeext &&
17566        $as_test_x conftest$ac_exeext; then
17567   eval "$as_ac_var=yes"
17568 else
17569   echo "$as_me: failed program was:" >&5
17570 sed 's/^/| /' conftest.$ac_ext >&5
17571
17572         eval "$as_ac_var=no"
17573 fi
17574
17575 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17576       conftest$ac_exeext conftest.$ac_ext
17577 fi
17578 ac_res=`eval echo '${'$as_ac_var'}'`
17579                { echo "$as_me:$LINENO: result: $ac_res" >&5
17580 echo "${ECHO_T}$ac_res" >&6; }
17581 if test `eval echo '${'$as_ac_var'}'` = yes; then
17582   cat >>confdefs.h <<_ACEOF
17583 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17584 _ACEOF
17585
17586 fi
17587 done
17588
17589 fi
17590
17591
17592 { echo "$as_me:$LINENO: checking for sigsetjmp" >&5
17593 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6; }
17594 cat >conftest.$ac_ext <<_ACEOF
17595 /* confdefs.h.  */
17596 _ACEOF
17597 cat confdefs.h >>conftest.$ac_ext
17598 cat >>conftest.$ac_ext <<_ACEOF
17599 /* end confdefs.h.  */
17600 #include <setjmp.h>
17601 int
17602 main ()
17603 {
17604 sigjmp_buf x; sigsetjmp(x, 1);
17605   ;
17606   return 0;
17607 }
17608 _ACEOF
17609 rm -f conftest.$ac_objext conftest$ac_exeext
17610 if { (ac_try="$ac_link"
17611 case "(($ac_try" in
17612   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17613   *) ac_try_echo=$ac_try;;
17614 esac
17615 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17616   (eval "$ac_link") 2>conftest.er1
17617   ac_status=$?
17618   grep -v '^ *+' conftest.er1 >conftest.err
17619   rm -f conftest.er1
17620   cat conftest.err >&5
17621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17622   (exit $ac_status); } && {
17623          test -z "$ac_c_werror_flag" ||
17624          test ! -s conftest.err
17625        } && test -s conftest$ac_exeext &&
17626        $as_test_x conftest$ac_exeext; then
17627
17628 cat >>confdefs.h <<\_ACEOF
17629 #define HAVE_SIGSETJMP 1
17630 _ACEOF
17631
17632 { echo "$as_me:$LINENO: result: yes" >&5
17633 echo "${ECHO_T}yes" >&6; }
17634 else
17635   echo "$as_me: failed program was:" >&5
17636 sed 's/^/| /' conftest.$ac_ext >&5
17637
17638         { echo "$as_me:$LINENO: result: no" >&5
17639 echo "${ECHO_T}no" >&6; }
17640 fi
17641
17642 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17643       conftest$ac_exeext conftest.$ac_ext
17644
17645 { echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
17646 echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
17647 if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
17648   echo $ECHO_N "(cached) $ECHO_C" >&6
17649 else
17650   cat >conftest.$ac_ext <<_ACEOF
17651 /* confdefs.h.  */
17652 _ACEOF
17653 cat confdefs.h >>conftest.$ac_ext
17654 cat >>conftest.$ac_ext <<_ACEOF
17655 /* end confdefs.h.  */
17656 #include <signal.h>
17657 /* NetBSD declares sys_siglist in unistd.h.  */
17658 #ifdef HAVE_UNISTD_H
17659 # include <unistd.h>
17660 #endif
17661
17662
17663 int
17664 main ()
17665 {
17666 #ifndef sys_siglist
17667   (void) sys_siglist;
17668 #endif
17669
17670   ;
17671   return 0;
17672 }
17673 _ACEOF
17674 rm -f conftest.$ac_objext
17675 if { (ac_try="$ac_compile"
17676 case "(($ac_try" in
17677   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17678   *) ac_try_echo=$ac_try;;
17679 esac
17680 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17681   (eval "$ac_compile") 2>conftest.er1
17682   ac_status=$?
17683   grep -v '^ *+' conftest.er1 >conftest.err
17684   rm -f conftest.er1
17685   cat conftest.err >&5
17686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17687   (exit $ac_status); } && {
17688          test -z "$ac_c_werror_flag" ||
17689          test ! -s conftest.err
17690        } && test -s conftest.$ac_objext; then
17691   ac_cv_have_decl_sys_siglist=yes
17692 else
17693   echo "$as_me: failed program was:" >&5
17694 sed 's/^/| /' conftest.$ac_ext >&5
17695
17696         ac_cv_have_decl_sys_siglist=no
17697 fi
17698
17699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17700 fi
17701 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
17702 echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
17703 if test $ac_cv_have_decl_sys_siglist = yes; then
17704
17705 cat >>confdefs.h <<_ACEOF
17706 #define HAVE_DECL_SYS_SIGLIST 1
17707 _ACEOF
17708
17709
17710 else
17711   cat >>confdefs.h <<_ACEOF
17712 #define HAVE_DECL_SYS_SIGLIST 0
17713 _ACEOF
17714
17715
17716 fi
17717
17718
17719
17720
17721 { echo "$as_me:$LINENO: checking for syslog" >&5
17722 echo $ECHO_N "checking for syslog... $ECHO_C" >&6; }
17723 if test "${ac_cv_func_syslog+set}" = set; then
17724   echo $ECHO_N "(cached) $ECHO_C" >&6
17725 else
17726   cat >conftest.$ac_ext <<_ACEOF
17727 /* confdefs.h.  */
17728 _ACEOF
17729 cat confdefs.h >>conftest.$ac_ext
17730 cat >>conftest.$ac_ext <<_ACEOF
17731 /* end confdefs.h.  */
17732 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
17733    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17734 #define syslog innocuous_syslog
17735
17736 /* System header to define __stub macros and hopefully few prototypes,
17737     which can conflict with char syslog (); below.
17738     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17739     <limits.h> exists even on freestanding compilers.  */
17740
17741 #ifdef __STDC__
17742 # include <limits.h>
17743 #else
17744 # include <assert.h>
17745 #endif
17746
17747 #undef syslog
17748
17749 /* Override any GCC internal prototype to avoid an error.
17750    Use char because int might match the return type of a GCC
17751    builtin and then its argument prototype would still apply.  */
17752 #ifdef __cplusplus
17753 extern "C"
17754 #endif
17755 char syslog ();
17756 /* The GNU C library defines this for functions which it implements
17757     to always fail with ENOSYS.  Some functions are actually named
17758     something starting with __ and the normal name is an alias.  */
17759 #if defined __stub_syslog || defined __stub___syslog
17760 choke me
17761 #endif
17762
17763 int
17764 main ()
17765 {
17766 return syslog ();
17767   ;
17768   return 0;
17769 }
17770 _ACEOF
17771 rm -f conftest.$ac_objext conftest$ac_exeext
17772 if { (ac_try="$ac_link"
17773 case "(($ac_try" in
17774   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17775   *) ac_try_echo=$ac_try;;
17776 esac
17777 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17778   (eval "$ac_link") 2>conftest.er1
17779   ac_status=$?
17780   grep -v '^ *+' conftest.er1 >conftest.err
17781   rm -f conftest.er1
17782   cat conftest.err >&5
17783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17784   (exit $ac_status); } && {
17785          test -z "$ac_c_werror_flag" ||
17786          test ! -s conftest.err
17787        } && test -s conftest$ac_exeext &&
17788        $as_test_x conftest$ac_exeext; then
17789   ac_cv_func_syslog=yes
17790 else
17791   echo "$as_me: failed program was:" >&5
17792 sed 's/^/| /' conftest.$ac_ext >&5
17793
17794         ac_cv_func_syslog=no
17795 fi
17796
17797 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17798       conftest$ac_exeext conftest.$ac_ext
17799 fi
17800 { echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
17801 echo "${ECHO_T}$ac_cv_func_syslog" >&6; }
17802 if test $ac_cv_func_syslog = yes; then
17803   if test "${ac_cv_header_syslog_h+set}" = set; then
17804   { echo "$as_me:$LINENO: checking for syslog.h" >&5
17805 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6; }
17806 if test "${ac_cv_header_syslog_h+set}" = set; then
17807   echo $ECHO_N "(cached) $ECHO_C" >&6
17808 fi
17809 { echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
17810 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6; }
17811 else
17812   # Is the header compilable?
17813 { echo "$as_me:$LINENO: checking syslog.h usability" >&5
17814 echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6; }
17815 cat >conftest.$ac_ext <<_ACEOF
17816 /* confdefs.h.  */
17817 _ACEOF
17818 cat confdefs.h >>conftest.$ac_ext
17819 cat >>conftest.$ac_ext <<_ACEOF
17820 /* end confdefs.h.  */
17821 $ac_includes_default
17822 #include <syslog.h>
17823 _ACEOF
17824 rm -f conftest.$ac_objext
17825 if { (ac_try="$ac_compile"
17826 case "(($ac_try" in
17827   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17828   *) ac_try_echo=$ac_try;;
17829 esac
17830 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17831   (eval "$ac_compile") 2>conftest.er1
17832   ac_status=$?
17833   grep -v '^ *+' conftest.er1 >conftest.err
17834   rm -f conftest.er1
17835   cat conftest.err >&5
17836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17837   (exit $ac_status); } && {
17838          test -z "$ac_c_werror_flag" ||
17839          test ! -s conftest.err
17840        } && test -s conftest.$ac_objext; then
17841   ac_header_compiler=yes
17842 else
17843   echo "$as_me: failed program was:" >&5
17844 sed 's/^/| /' conftest.$ac_ext >&5
17845
17846         ac_header_compiler=no
17847 fi
17848
17849 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17850 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17851 echo "${ECHO_T}$ac_header_compiler" >&6; }
17852
17853 # Is the header present?
17854 { echo "$as_me:$LINENO: checking syslog.h presence" >&5
17855 echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6; }
17856 cat >conftest.$ac_ext <<_ACEOF
17857 /* confdefs.h.  */
17858 _ACEOF
17859 cat confdefs.h >>conftest.$ac_ext
17860 cat >>conftest.$ac_ext <<_ACEOF
17861 /* end confdefs.h.  */
17862 #include <syslog.h>
17863 _ACEOF
17864 if { (ac_try="$ac_cpp conftest.$ac_ext"
17865 case "(($ac_try" in
17866   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17867   *) ac_try_echo=$ac_try;;
17868 esac
17869 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17870   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17871   ac_status=$?
17872   grep -v '^ *+' conftest.er1 >conftest.err
17873   rm -f conftest.er1
17874   cat conftest.err >&5
17875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17876   (exit $ac_status); } >/dev/null && {
17877          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17878          test ! -s conftest.err
17879        }; then
17880   ac_header_preproc=yes
17881 else
17882   echo "$as_me: failed program was:" >&5
17883 sed 's/^/| /' conftest.$ac_ext >&5
17884
17885   ac_header_preproc=no
17886 fi
17887
17888 rm -f conftest.err conftest.$ac_ext
17889 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17890 echo "${ECHO_T}$ac_header_preproc" >&6; }
17891
17892 # So?  What about this header?
17893 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17894   yes:no: )
17895     { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
17896 echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17897     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
17898 echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
17899     ac_header_preproc=yes
17900     ;;
17901   no:yes:* )
17902     { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
17903 echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
17904     { echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
17905 echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
17906     { echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
17907 echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
17908     { echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
17909 echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17910     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
17911 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
17912     { echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
17913 echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
17914     ( cat <<\_ASBOX
17915 ## ---------------------------------------- ##
17916 ## Report this to pgsql-bugs@postgresql.org ##
17917 ## ---------------------------------------- ##
17918 _ASBOX
17919      ) | sed "s/^/$as_me: WARNING:     /" >&2
17920     ;;
17921 esac
17922 { echo "$as_me:$LINENO: checking for syslog.h" >&5
17923 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6; }
17924 if test "${ac_cv_header_syslog_h+set}" = set; then
17925   echo $ECHO_N "(cached) $ECHO_C" >&6
17926 else
17927   ac_cv_header_syslog_h=$ac_header_preproc
17928 fi
17929 { echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
17930 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6; }
17931
17932 fi
17933 if test $ac_cv_header_syslog_h = yes; then
17934
17935 cat >>confdefs.h <<\_ACEOF
17936 #define HAVE_SYSLOG 1
17937 _ACEOF
17938
17939 fi
17940
17941
17942 fi
17943
17944
17945 { echo "$as_me:$LINENO: checking for optreset" >&5
17946 echo $ECHO_N "checking for optreset... $ECHO_C" >&6; }
17947 if test "${pgac_cv_var_int_optreset+set}" = set; then
17948   echo $ECHO_N "(cached) $ECHO_C" >&6
17949 else
17950   cat >conftest.$ac_ext <<_ACEOF
17951 /* confdefs.h.  */
17952 _ACEOF
17953 cat confdefs.h >>conftest.$ac_ext
17954 cat >>conftest.$ac_ext <<_ACEOF
17955 /* end confdefs.h.  */
17956 #include <unistd.h>
17957 int
17958 main ()
17959 {
17960 extern int optreset; optreset = 1;
17961   ;
17962   return 0;
17963 }
17964 _ACEOF
17965 rm -f conftest.$ac_objext conftest$ac_exeext
17966 if { (ac_try="$ac_link"
17967 case "(($ac_try" in
17968   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17969   *) ac_try_echo=$ac_try;;
17970 esac
17971 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17972   (eval "$ac_link") 2>conftest.er1
17973   ac_status=$?
17974   grep -v '^ *+' conftest.er1 >conftest.err
17975   rm -f conftest.er1
17976   cat conftest.err >&5
17977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17978   (exit $ac_status); } && {
17979          test -z "$ac_c_werror_flag" ||
17980          test ! -s conftest.err
17981        } && test -s conftest$ac_exeext &&
17982        $as_test_x conftest$ac_exeext; then
17983   pgac_cv_var_int_optreset=yes
17984 else
17985   echo "$as_me: failed program was:" >&5
17986 sed 's/^/| /' conftest.$ac_ext >&5
17987
17988         pgac_cv_var_int_optreset=no
17989 fi
17990
17991 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17992       conftest$ac_exeext conftest.$ac_ext
17993 fi
17994 { echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
17995 echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6; }
17996 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
17997
17998 cat >>confdefs.h <<\_ACEOF
17999 #define HAVE_INT_OPTRESET 1
18000 _ACEOF
18001
18002 fi
18003
18004
18005
18006 for ac_func in strtoll strtoq
18007 do
18008 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18009 { echo "$as_me:$LINENO: checking for $ac_func" >&5
18010 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18011 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18012   echo $ECHO_N "(cached) $ECHO_C" >&6
18013 else
18014   cat >conftest.$ac_ext <<_ACEOF
18015 /* confdefs.h.  */
18016 _ACEOF
18017 cat confdefs.h >>conftest.$ac_ext
18018 cat >>conftest.$ac_ext <<_ACEOF
18019 /* end confdefs.h.  */
18020 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18021    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
18022 #define $ac_func innocuous_$ac_func
18023
18024 /* System header to define __stub macros and hopefully few prototypes,
18025     which can conflict with char $ac_func (); below.
18026     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18027     <limits.h> exists even on freestanding compilers.  */
18028
18029 #ifdef __STDC__
18030 # include <limits.h>
18031 #else
18032 # include <assert.h>
18033 #endif
18034
18035 #undef $ac_func
18036
18037 /* Override any GCC internal prototype to avoid an error.
18038    Use char because int might match the return type of a GCC
18039    builtin and then its argument prototype would still apply.  */
18040 #ifdef __cplusplus
18041 extern "C"
18042 #endif
18043 char $ac_func ();
18044 /* The GNU C library defines this for functions which it implements
18045     to always fail with ENOSYS.  Some functions are actually named
18046     something starting with __ and the normal name is an alias.  */
18047 #if defined __stub_$ac_func || defined __stub___$ac_func
18048 choke me
18049 #endif
18050
18051 int
18052 main ()
18053 {
18054 return $ac_func ();
18055   ;
18056   return 0;
18057 }
18058 _ACEOF
18059 rm -f conftest.$ac_objext conftest$ac_exeext
18060 if { (ac_try="$ac_link"
18061 case "(($ac_try" in
18062   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18063   *) ac_try_echo=$ac_try;;
18064 esac
18065 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18066   (eval "$ac_link") 2>conftest.er1
18067   ac_status=$?
18068   grep -v '^ *+' conftest.er1 >conftest.err
18069   rm -f conftest.er1
18070   cat conftest.err >&5
18071   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18072   (exit $ac_status); } && {
18073          test -z "$ac_c_werror_flag" ||
18074          test ! -s conftest.err
18075        } && test -s conftest$ac_exeext &&
18076        $as_test_x conftest$ac_exeext; then
18077   eval "$as_ac_var=yes"
18078 else
18079   echo "$as_me: failed program was:" >&5
18080 sed 's/^/| /' conftest.$ac_ext >&5
18081
18082         eval "$as_ac_var=no"
18083 fi
18084
18085 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18086       conftest$ac_exeext conftest.$ac_ext
18087 fi
18088 ac_res=`eval echo '${'$as_ac_var'}'`
18089                { echo "$as_me:$LINENO: result: $ac_res" >&5
18090 echo "${ECHO_T}$ac_res" >&6; }
18091 if test `eval echo '${'$as_ac_var'}'` = yes; then
18092   cat >>confdefs.h <<_ACEOF
18093 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18094 _ACEOF
18095  break
18096 fi
18097 done
18098
18099
18100
18101 for ac_func in strtoull strtouq
18102 do
18103 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18104 { echo "$as_me:$LINENO: checking for $ac_func" >&5
18105 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18106 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18107   echo $ECHO_N "(cached) $ECHO_C" >&6
18108 else
18109   cat >conftest.$ac_ext <<_ACEOF
18110 /* confdefs.h.  */
18111 _ACEOF
18112 cat confdefs.h >>conftest.$ac_ext
18113 cat >>conftest.$ac_ext <<_ACEOF
18114 /* end confdefs.h.  */
18115 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18116    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
18117 #define $ac_func innocuous_$ac_func
18118
18119 /* System header to define __stub macros and hopefully few prototypes,
18120     which can conflict with char $ac_func (); below.
18121     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18122     <limits.h> exists even on freestanding compilers.  */
18123
18124 #ifdef __STDC__
18125 # include <limits.h>
18126 #else
18127 # include <assert.h>
18128 #endif
18129
18130 #undef $ac_func
18131
18132 /* Override any GCC internal prototype to avoid an error.
18133    Use char because int might match the return type of a GCC
18134    builtin and then its argument prototype would still apply.  */
18135 #ifdef __cplusplus
18136 extern "C"
18137 #endif
18138 char $ac_func ();
18139 /* The GNU C library defines this for functions which it implements
18140     to always fail with ENOSYS.  Some functions are actually named
18141     something starting with __ and the normal name is an alias.  */
18142 #if defined __stub_$ac_func || defined __stub___$ac_func
18143 choke me
18144 #endif
18145
18146 int
18147 main ()
18148 {
18149 return $ac_func ();
18150   ;
18151   return 0;
18152 }
18153 _ACEOF
18154 rm -f conftest.$ac_objext conftest$ac_exeext
18155 if { (ac_try="$ac_link"
18156 case "(($ac_try" in
18157   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18158   *) ac_try_echo=$ac_try;;
18159 esac
18160 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18161   (eval "$ac_link") 2>conftest.er1
18162   ac_status=$?
18163   grep -v '^ *+' conftest.er1 >conftest.err
18164   rm -f conftest.er1
18165   cat conftest.err >&5
18166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18167   (exit $ac_status); } && {
18168          test -z "$ac_c_werror_flag" ||
18169          test ! -s conftest.err
18170        } && test -s conftest$ac_exeext &&
18171        $as_test_x conftest$ac_exeext; then
18172   eval "$as_ac_var=yes"
18173 else
18174   echo "$as_me: failed program was:" >&5
18175 sed 's/^/| /' conftest.$ac_ext >&5
18176
18177         eval "$as_ac_var=no"
18178 fi
18179
18180 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18181       conftest$ac_exeext conftest.$ac_ext
18182 fi
18183 ac_res=`eval echo '${'$as_ac_var'}'`
18184                { echo "$as_me:$LINENO: result: $ac_res" >&5
18185 echo "${ECHO_T}$ac_res" >&6; }
18186 if test `eval echo '${'$as_ac_var'}'` = yes; then
18187   cat >>confdefs.h <<_ACEOF
18188 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18189 _ACEOF
18190  break
18191 fi
18192 done
18193
18194
18195 # Check for one of atexit() or on_exit()
18196
18197 for ac_func in atexit
18198 do
18199 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18200 { echo "$as_me:$LINENO: checking for $ac_func" >&5
18201 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18202 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18203   echo $ECHO_N "(cached) $ECHO_C" >&6
18204 else
18205   cat >conftest.$ac_ext <<_ACEOF
18206 /* confdefs.h.  */
18207 _ACEOF
18208 cat confdefs.h >>conftest.$ac_ext
18209 cat >>conftest.$ac_ext <<_ACEOF
18210 /* end confdefs.h.  */
18211 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18212    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
18213 #define $ac_func innocuous_$ac_func
18214
18215 /* System header to define __stub macros and hopefully few prototypes,
18216     which can conflict with char $ac_func (); below.
18217     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18218     <limits.h> exists even on freestanding compilers.  */
18219
18220 #ifdef __STDC__
18221 # include <limits.h>
18222 #else
18223 # include <assert.h>
18224 #endif
18225
18226 #undef $ac_func
18227
18228 /* Override any GCC internal prototype to avoid an error.
18229    Use char because int might match the return type of a GCC
18230    builtin and then its argument prototype would still apply.  */
18231 #ifdef __cplusplus
18232 extern "C"
18233 #endif
18234 char $ac_func ();
18235 /* The GNU C library defines this for functions which it implements
18236     to always fail with ENOSYS.  Some functions are actually named
18237     something starting with __ and the normal name is an alias.  */
18238 #if defined __stub_$ac_func || defined __stub___$ac_func
18239 choke me
18240 #endif
18241
18242 int
18243 main ()
18244 {
18245 return $ac_func ();
18246   ;
18247   return 0;
18248 }
18249 _ACEOF
18250 rm -f conftest.$ac_objext conftest$ac_exeext
18251 if { (ac_try="$ac_link"
18252 case "(($ac_try" in
18253   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18254   *) ac_try_echo=$ac_try;;
18255 esac
18256 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18257   (eval "$ac_link") 2>conftest.er1
18258   ac_status=$?
18259   grep -v '^ *+' conftest.er1 >conftest.err
18260   rm -f conftest.er1
18261   cat conftest.err >&5
18262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18263   (exit $ac_status); } && {
18264          test -z "$ac_c_werror_flag" ||
18265          test ! -s conftest.err
18266        } && test -s conftest$ac_exeext &&
18267        $as_test_x conftest$ac_exeext; then
18268   eval "$as_ac_var=yes"
18269 else
18270   echo "$as_me: failed program was:" >&5
18271 sed 's/^/| /' conftest.$ac_ext >&5
18272
18273         eval "$as_ac_var=no"
18274 fi
18275
18276 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18277       conftest$ac_exeext conftest.$ac_ext
18278 fi
18279 ac_res=`eval echo '${'$as_ac_var'}'`
18280                { echo "$as_me:$LINENO: result: $ac_res" >&5
18281 echo "${ECHO_T}$ac_res" >&6; }
18282 if test `eval echo '${'$as_ac_var'}'` = yes; then
18283   cat >>confdefs.h <<_ACEOF
18284 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18285 _ACEOF
18286
18287 else
18288
18289 for ac_func in on_exit
18290 do
18291 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18292 { echo "$as_me:$LINENO: checking for $ac_func" >&5
18293 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18294 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18295   echo $ECHO_N "(cached) $ECHO_C" >&6
18296 else
18297   cat >conftest.$ac_ext <<_ACEOF
18298 /* confdefs.h.  */
18299 _ACEOF
18300 cat confdefs.h >>conftest.$ac_ext
18301 cat >>conftest.$ac_ext <<_ACEOF
18302 /* end confdefs.h.  */
18303 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18304    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
18305 #define $ac_func innocuous_$ac_func
18306
18307 /* System header to define __stub macros and hopefully few prototypes,
18308     which can conflict with char $ac_func (); below.
18309     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18310     <limits.h> exists even on freestanding compilers.  */
18311
18312 #ifdef __STDC__
18313 # include <limits.h>
18314 #else
18315 # include <assert.h>
18316 #endif
18317
18318 #undef $ac_func
18319
18320 /* Override any GCC internal prototype to avoid an error.
18321    Use char because int might match the return type of a GCC
18322    builtin and then its argument prototype would still apply.  */
18323 #ifdef __cplusplus
18324 extern "C"
18325 #endif
18326 char $ac_func ();
18327 /* The GNU C library defines this for functions which it implements
18328     to always fail with ENOSYS.  Some functions are actually named
18329     something starting with __ and the normal name is an alias.  */
18330 #if defined __stub_$ac_func || defined __stub___$ac_func
18331 choke me
18332 #endif
18333
18334 int
18335 main ()
18336 {
18337 return $ac_func ();
18338   ;
18339   return 0;
18340 }
18341 _ACEOF
18342 rm -f conftest.$ac_objext conftest$ac_exeext
18343 if { (ac_try="$ac_link"
18344 case "(($ac_try" in
18345   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18346   *) ac_try_echo=$ac_try;;
18347 esac
18348 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18349   (eval "$ac_link") 2>conftest.er1
18350   ac_status=$?
18351   grep -v '^ *+' conftest.er1 >conftest.err
18352   rm -f conftest.er1
18353   cat conftest.err >&5
18354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18355   (exit $ac_status); } && {
18356          test -z "$ac_c_werror_flag" ||
18357          test ! -s conftest.err
18358        } && test -s conftest$ac_exeext &&
18359        $as_test_x conftest$ac_exeext; then
18360   eval "$as_ac_var=yes"
18361 else
18362   echo "$as_me: failed program was:" >&5
18363 sed 's/^/| /' conftest.$ac_ext >&5
18364
18365         eval "$as_ac_var=no"
18366 fi
18367
18368 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18369       conftest$ac_exeext conftest.$ac_ext
18370 fi
18371 ac_res=`eval echo '${'$as_ac_var'}'`
18372                { echo "$as_me:$LINENO: result: $ac_res" >&5
18373 echo "${ECHO_T}$ac_res" >&6; }
18374 if test `eval echo '${'$as_ac_var'}'` = yes; then
18375   cat >>confdefs.h <<_ACEOF
18376 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18377 _ACEOF
18378
18379 else
18380   { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
18381 echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
18382    { (exit 1); exit 1; }; }
18383 fi
18384 done
18385
18386 fi
18387 done
18388
18389
18390
18391 for ac_func in fseeko
18392 do
18393 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18394 { echo "$as_me:$LINENO: checking for $ac_func" >&5
18395 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18396 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18397   echo $ECHO_N "(cached) $ECHO_C" >&6
18398 else
18399   cat >conftest.$ac_ext <<_ACEOF
18400 /* confdefs.h.  */
18401 _ACEOF
18402 cat confdefs.h >>conftest.$ac_ext
18403 cat >>conftest.$ac_ext <<_ACEOF
18404 /* end confdefs.h.  */
18405 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18406    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
18407 #define $ac_func innocuous_$ac_func
18408
18409 /* System header to define __stub macros and hopefully few prototypes,
18410     which can conflict with char $ac_func (); below.
18411     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18412     <limits.h> exists even on freestanding compilers.  */
18413
18414 #ifdef __STDC__
18415 # include <limits.h>
18416 #else
18417 # include <assert.h>
18418 #endif
18419
18420 #undef $ac_func
18421
18422 /* Override any GCC internal prototype to avoid an error.
18423    Use char because int might match the return type of a GCC
18424    builtin and then its argument prototype would still apply.  */
18425 #ifdef __cplusplus
18426 extern "C"
18427 #endif
18428 char $ac_func ();
18429 /* The GNU C library defines this for functions which it implements
18430     to always fail with ENOSYS.  Some functions are actually named
18431     something starting with __ and the normal name is an alias.  */
18432 #if defined __stub_$ac_func || defined __stub___$ac_func
18433 choke me
18434 #endif
18435
18436 int
18437 main ()
18438 {
18439 return $ac_func ();
18440   ;
18441   return 0;
18442 }
18443 _ACEOF
18444 rm -f conftest.$ac_objext conftest$ac_exeext
18445 if { (ac_try="$ac_link"
18446 case "(($ac_try" in
18447   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18448   *) ac_try_echo=$ac_try;;
18449 esac
18450 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18451   (eval "$ac_link") 2>conftest.er1
18452   ac_status=$?
18453   grep -v '^ *+' conftest.er1 >conftest.err
18454   rm -f conftest.er1
18455   cat conftest.err >&5
18456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18457   (exit $ac_status); } && {
18458          test -z "$ac_c_werror_flag" ||
18459          test ! -s conftest.err
18460        } && test -s conftest$ac_exeext &&
18461        $as_test_x conftest$ac_exeext; then
18462   eval "$as_ac_var=yes"
18463 else
18464   echo "$as_me: failed program was:" >&5
18465 sed 's/^/| /' conftest.$ac_ext >&5
18466
18467         eval "$as_ac_var=no"
18468 fi
18469
18470 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18471       conftest$ac_exeext conftest.$ac_ext
18472 fi
18473 ac_res=`eval echo '${'$as_ac_var'}'`
18474                { echo "$as_me:$LINENO: result: $ac_res" >&5
18475 echo "${ECHO_T}$ac_res" >&6; }
18476 if test `eval echo '${'$as_ac_var'}'` = yes; then
18477   cat >>confdefs.h <<_ACEOF
18478 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18479 _ACEOF
18480
18481 else
18482   case " $LIBOBJS " in
18483   *" $ac_func.$ac_objext "* ) ;;
18484   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18485  ;;
18486 esac
18487
18488 fi
18489 done
18490
18491
18492 case $host_os in
18493         # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
18494         bsdi*|netbsd*)
18495
18496 cat >>confdefs.h <<\_ACEOF
18497 #define HAVE_FSEEKO 1
18498 _ACEOF
18499
18500                 ac_cv_func_fseeko=yes;;
18501         *)
18502                 { echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
18503 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
18504 if test "${ac_cv_sys_largefile_source+set}" = set; then
18505   echo $ECHO_N "(cached) $ECHO_C" >&6
18506 else
18507   while :; do
18508   cat >conftest.$ac_ext <<_ACEOF
18509 /* confdefs.h.  */
18510 _ACEOF
18511 cat confdefs.h >>conftest.$ac_ext
18512 cat >>conftest.$ac_ext <<_ACEOF
18513 /* end confdefs.h.  */
18514 #include <sys/types.h> /* for off_t */
18515      #include <stdio.h>
18516 int
18517 main ()
18518 {
18519 int (*fp) (FILE *, off_t, int) = fseeko;
18520      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
18521   ;
18522   return 0;
18523 }
18524 _ACEOF
18525 rm -f conftest.$ac_objext conftest$ac_exeext
18526 if { (ac_try="$ac_link"
18527 case "(($ac_try" in
18528   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18529   *) ac_try_echo=$ac_try;;
18530 esac
18531 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18532   (eval "$ac_link") 2>conftest.er1
18533   ac_status=$?
18534   grep -v '^ *+' conftest.er1 >conftest.err
18535   rm -f conftest.er1
18536   cat conftest.err >&5
18537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18538   (exit $ac_status); } && {
18539          test -z "$ac_c_werror_flag" ||
18540          test ! -s conftest.err
18541        } && test -s conftest$ac_exeext &&
18542        $as_test_x conftest$ac_exeext; then
18543   ac_cv_sys_largefile_source=no; break
18544 else
18545   echo "$as_me: failed program was:" >&5
18546 sed 's/^/| /' conftest.$ac_ext >&5
18547
18548
18549 fi
18550
18551 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18552       conftest$ac_exeext conftest.$ac_ext
18553   cat >conftest.$ac_ext <<_ACEOF
18554 /* confdefs.h.  */
18555 _ACEOF
18556 cat confdefs.h >>conftest.$ac_ext
18557 cat >>conftest.$ac_ext <<_ACEOF
18558 /* end confdefs.h.  */
18559 #define _LARGEFILE_SOURCE 1
18560 #include <sys/types.h> /* for off_t */
18561      #include <stdio.h>
18562 int
18563 main ()
18564 {
18565 int (*fp) (FILE *, off_t, int) = fseeko;
18566      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
18567   ;
18568   return 0;
18569 }
18570 _ACEOF
18571 rm -f conftest.$ac_objext conftest$ac_exeext
18572 if { (ac_try="$ac_link"
18573 case "(($ac_try" in
18574   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18575   *) ac_try_echo=$ac_try;;
18576 esac
18577 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18578   (eval "$ac_link") 2>conftest.er1
18579   ac_status=$?
18580   grep -v '^ *+' conftest.er1 >conftest.err
18581   rm -f conftest.er1
18582   cat conftest.err >&5
18583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18584   (exit $ac_status); } && {
18585          test -z "$ac_c_werror_flag" ||
18586          test ! -s conftest.err
18587        } && test -s conftest$ac_exeext &&
18588        $as_test_x conftest$ac_exeext; then
18589   ac_cv_sys_largefile_source=1; break
18590 else
18591   echo "$as_me: failed program was:" >&5
18592 sed 's/^/| /' conftest.$ac_ext >&5
18593
18594
18595 fi
18596
18597 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18598       conftest$ac_exeext conftest.$ac_ext
18599   ac_cv_sys_largefile_source=unknown
18600   break
18601 done
18602 fi
18603 { echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
18604 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
18605 case $ac_cv_sys_largefile_source in #(
18606   no | unknown) ;;
18607   *)
18608 cat >>confdefs.h <<_ACEOF
18609 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
18610 _ACEOF
18611 ;;
18612 esac
18613 rm -f conftest*
18614
18615 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
18616 # in glibc 2.1.3, but that breaks too many other things.
18617 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
18618 if test $ac_cv_sys_largefile_source != unknown; then
18619
18620 cat >>confdefs.h <<\_ACEOF
18621 #define HAVE_FSEEKO 1
18622 _ACEOF
18623
18624 fi
18625 ;;
18626 esac
18627
18628
18629 #
18630 # Pthreads
18631 #
18632 # For each platform, we need to know about any special compile and link
18633 # libraries, and whether the normal C function names are thread-safe.
18634 # See the comment at the top of src/port/thread.c for more information.
18635 # WIN32 doesn't need the pthread tests;  it always uses threads
18636 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
18637
18638
18639
18640 ac_ext=c
18641 ac_cpp='$CPP $CPPFLAGS'
18642 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18643 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18644 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18645
18646 acx_pthread_ok=no
18647
18648 # We used to check for pthread.h first, but this fails if pthread.h
18649 # requires special compiler flags (e.g. on True64 or Sequent).
18650 # It gets checked for in the link test anyway.
18651
18652 # First of all, check if the user has set any of the PTHREAD_LIBS,
18653 # etcetera environment variables, and if threads linking works using
18654 # them:
18655 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
18656         save_CFLAGS="$CFLAGS"
18657         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18658         save_LIBS="$LIBS"
18659         LIBS="$PTHREAD_LIBS $LIBS"
18660         { echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
18661 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6; }
18662         cat >conftest.$ac_ext <<_ACEOF
18663 /* confdefs.h.  */
18664 _ACEOF
18665 cat confdefs.h >>conftest.$ac_ext
18666 cat >>conftest.$ac_ext <<_ACEOF
18667 /* end confdefs.h.  */
18668
18669 /* Override any GCC internal prototype to avoid an error.
18670    Use char because int might match the return type of a GCC
18671    builtin and then its argument prototype would still apply.  */
18672 #ifdef __cplusplus
18673 extern "C"
18674 #endif
18675 char pthread_join ();
18676 int
18677 main ()
18678 {
18679 return pthread_join ();
18680   ;
18681   return 0;
18682 }
18683 _ACEOF
18684 rm -f conftest.$ac_objext conftest$ac_exeext
18685 if { (ac_try="$ac_link"
18686 case "(($ac_try" in
18687   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18688   *) ac_try_echo=$ac_try;;
18689 esac
18690 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18691   (eval "$ac_link") 2>conftest.er1
18692   ac_status=$?
18693   grep -v '^ *+' conftest.er1 >conftest.err
18694   rm -f conftest.er1
18695   cat conftest.err >&5
18696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18697   (exit $ac_status); } && {
18698          test -z "$ac_c_werror_flag" ||
18699          test ! -s conftest.err
18700        } && test -s conftest$ac_exeext &&
18701        $as_test_x conftest$ac_exeext; then
18702   acx_pthread_ok=yes
18703 else
18704   echo "$as_me: failed program was:" >&5
18705 sed 's/^/| /' conftest.$ac_ext >&5
18706
18707
18708 fi
18709
18710 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18711       conftest$ac_exeext conftest.$ac_ext
18712         { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
18713 echo "${ECHO_T}$acx_pthread_ok" >&6; }
18714         if test x"$acx_pthread_ok" = xno; then
18715                 PTHREAD_LIBS=""
18716                 PTHREAD_CFLAGS=""
18717         fi
18718         LIBS="$save_LIBS"
18719         CFLAGS="$save_CFLAGS"
18720 fi
18721
18722 # We must check for the threads library under a number of different
18723 # names; the ordering is very important because some systems
18724 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
18725 # libraries is broken (non-POSIX).
18726
18727 # Create a list of thread flags to try.  Items starting with a "-" are
18728 # C compiler flags, and other items are library names, except for "none"
18729 # which indicates that we try without any flags at all, and "pthread-config"
18730 # which is a program returning the flags for the Pth emulation library.
18731
18732 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
18733
18734 # The ordering *is* (sometimes) important.  Some notes on the
18735 # individual items follow:
18736
18737 # pthreads: AIX (must check this before -lpthread)
18738 # none: in case threads are in libc; should be tried before -Kthread and
18739 #       other compiler flags to prevent continual compiler warnings
18740 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
18741 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
18742 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
18743 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
18744 # -pthreads: Solaris/gcc
18745 # -mthreads: Mingw32/gcc, Lynx/gcc
18746 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
18747 #      doesn't hurt to check since this sometimes defines pthreads too;
18748 #      also defines -D_REENTRANT)
18749 # pthread: Linux, etcetera
18750 # --thread-safe: KAI C++
18751 # pthread-config: use pthread-config program (for GNU Pth library)
18752
18753 case "${host_cpu}-${host_os}" in
18754         *solaris*)
18755
18756         # On Solaris (at least, for some versions), libc contains stubbed
18757         # (non-functional) versions of the pthreads routines, so link-based
18758         # tests will erroneously succeed.  (We need to link with -pthread or
18759         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
18760         # a function called by this macro, so we could check for that, but
18761         # who knows whether they'll stub that too in a future libc.)  So,
18762         # we'll just look for -pthreads and -lpthread first:
18763
18764         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
18765         ;;
18766 esac
18767
18768 if test x"$acx_pthread_ok" = xno; then
18769 for flag in $acx_pthread_flags; do
18770
18771         tryPTHREAD_CFLAGS=""
18772         tryPTHREAD_LIBS=""
18773         case $flag in
18774                 none)
18775                 { echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
18776 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6; }
18777                 ;;
18778
18779                 -*)
18780                 { echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
18781 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6; }
18782                 tryPTHREAD_CFLAGS="$flag"
18783                 ;;
18784
18785                 pthread-config)
18786                 # skip this if we already have flags defined, for PostgreSQL
18787                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
18788                 # Extract the first word of "pthread-config", so it can be a program name with args.
18789 set dummy pthread-config; ac_word=$2
18790 { echo "$as_me:$LINENO: checking for $ac_word" >&5
18791 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
18792 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
18793   echo $ECHO_N "(cached) $ECHO_C" >&6
18794 else
18795   if test -n "$acx_pthread_config"; then
18796   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
18797 else
18798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18799 for as_dir in $PATH
18800 do
18801   IFS=$as_save_IFS
18802   test -z "$as_dir" && as_dir=.
18803   for ac_exec_ext in '' $ac_executable_extensions; do
18804   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18805     ac_cv_prog_acx_pthread_config="yes"
18806     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18807     break 2
18808   fi
18809 done
18810 done
18811 IFS=$as_save_IFS
18812
18813   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
18814 fi
18815 fi
18816 acx_pthread_config=$ac_cv_prog_acx_pthread_config
18817 if test -n "$acx_pthread_config"; then
18818   { echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
18819 echo "${ECHO_T}$acx_pthread_config" >&6; }
18820 else
18821   { echo "$as_me:$LINENO: result: no" >&5
18822 echo "${ECHO_T}no" >&6; }
18823 fi
18824
18825
18826                 if test x"$acx_pthread_config" = xno; then continue; fi
18827                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
18828                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
18829                 ;;
18830
18831                 *)
18832                 { echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
18833 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6; }
18834                 tryPTHREAD_LIBS="-l$flag"
18835                 ;;
18836         esac
18837
18838         save_LIBS="$LIBS"
18839         save_CFLAGS="$CFLAGS"
18840         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
18841         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
18842
18843         # Check for various functions.  We must include pthread.h,
18844         # since some functions may be macros.  (On the Sequent, we
18845         # need a special flag -Kthread to make this header compile.)
18846         # We check for pthread_join because it is in -lpthread on IRIX
18847         # while pthread_create is in libc.  We check for pthread_attr_init
18848         # due to DEC craziness with -lpthreads.  We check for
18849         # pthread_cleanup_push because it is one of the few pthread
18850         # functions on Solaris that doesn't have a non-functional libc stub.
18851         # We try pthread_create on general principles.
18852         cat >conftest.$ac_ext <<_ACEOF
18853 /* confdefs.h.  */
18854 _ACEOF
18855 cat confdefs.h >>conftest.$ac_ext
18856 cat >>conftest.$ac_ext <<_ACEOF
18857 /* end confdefs.h.  */
18858 #include <pthread.h>
18859 int
18860 main ()
18861 {
18862 pthread_t th; pthread_join(th, 0);
18863                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
18864                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
18865   ;
18866   return 0;
18867 }
18868 _ACEOF
18869 rm -f conftest.$ac_objext conftest$ac_exeext
18870 if { (ac_try="$ac_link"
18871 case "(($ac_try" in
18872   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18873   *) ac_try_echo=$ac_try;;
18874 esac
18875 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18876   (eval "$ac_link") 2>conftest.er1
18877   ac_status=$?
18878   grep -v '^ *+' conftest.er1 >conftest.err
18879   rm -f conftest.er1
18880   cat conftest.err >&5
18881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18882   (exit $ac_status); } && {
18883          test -z "$ac_c_werror_flag" ||
18884          test ! -s conftest.err
18885        } && test -s conftest$ac_exeext &&
18886        $as_test_x conftest$ac_exeext; then
18887   acx_pthread_ok=yes
18888 else
18889   echo "$as_me: failed program was:" >&5
18890 sed 's/^/| /' conftest.$ac_ext >&5
18891
18892         acx_pthread_ok=no
18893 fi
18894
18895 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18896       conftest$ac_exeext conftest.$ac_ext
18897
18898         if test "x$acx_pthread_ok" = xyes; then
18899             # Don't use options that are ignored by the compiler.
18900             # We find them by checking stderror.
18901             cat >conftest.$ac_ext <<_ACEOF
18902 int
18903 main (int argc, char **argv)
18904 {
18905   (void) argc;
18906   (void) argv;
18907   return 0;
18908 }
18909 _ACEOF
18910             rm -f conftest.$ac_objext conftest$ac_exeext
18911             if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
18912                 # we continue with more flags because Linux needs -lpthread
18913                 # for libpq builds on PostgreSQL.  The test above only
18914                 # tests for building binaries, not shared libraries.
18915                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
18916                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
18917             else   acx_pthread_ok=no
18918             fi
18919         fi
18920
18921         LIBS="$save_LIBS"
18922         CFLAGS="$save_CFLAGS"
18923
18924         { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
18925 echo "${ECHO_T}$acx_pthread_ok" >&6; }
18926 done
18927 fi
18928
18929 # Various other checks:
18930 if test "x$acx_pthread_ok" = xyes; then
18931         save_LIBS="$LIBS"
18932         LIBS="$PTHREAD_LIBS $LIBS"
18933         save_CFLAGS="$CFLAGS"
18934         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18935
18936         # Detect AIX lossage: threads are created detached by default
18937         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
18938         { echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
18939 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6; }
18940         cat >conftest.$ac_ext <<_ACEOF
18941 /* confdefs.h.  */
18942 _ACEOF
18943 cat confdefs.h >>conftest.$ac_ext
18944 cat >>conftest.$ac_ext <<_ACEOF
18945 /* end confdefs.h.  */
18946 #include <pthread.h>
18947 int
18948 main ()
18949 {
18950 int attr=PTHREAD_CREATE_JOINABLE;
18951   ;
18952   return 0;
18953 }
18954 _ACEOF
18955 rm -f conftest.$ac_objext conftest$ac_exeext
18956 if { (ac_try="$ac_link"
18957 case "(($ac_try" in
18958   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18959   *) ac_try_echo=$ac_try;;
18960 esac
18961 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18962   (eval "$ac_link") 2>conftest.er1
18963   ac_status=$?
18964   grep -v '^ *+' conftest.er1 >conftest.err
18965   rm -f conftest.er1
18966   cat conftest.err >&5
18967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18968   (exit $ac_status); } && {
18969          test -z "$ac_c_werror_flag" ||
18970          test ! -s conftest.err
18971        } && test -s conftest$ac_exeext &&
18972        $as_test_x conftest$ac_exeext; then
18973   ok=PTHREAD_CREATE_JOINABLE
18974 else
18975   echo "$as_me: failed program was:" >&5
18976 sed 's/^/| /' conftest.$ac_ext >&5
18977
18978         ok=unknown
18979 fi
18980
18981 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18982       conftest$ac_exeext conftest.$ac_ext
18983         if test x"$ok" = xunknown; then
18984                 cat >conftest.$ac_ext <<_ACEOF
18985 /* confdefs.h.  */
18986 _ACEOF
18987 cat confdefs.h >>conftest.$ac_ext
18988 cat >>conftest.$ac_ext <<_ACEOF
18989 /* end confdefs.h.  */
18990 #include <pthread.h>
18991 int
18992 main ()
18993 {
18994 int attr=PTHREAD_CREATE_UNDETACHED;
18995   ;
18996   return 0;
18997 }
18998 _ACEOF
18999 rm -f conftest.$ac_objext conftest$ac_exeext
19000 if { (ac_try="$ac_link"
19001 case "(($ac_try" in
19002   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19003   *) ac_try_echo=$ac_try;;
19004 esac
19005 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19006   (eval "$ac_link") 2>conftest.er1
19007   ac_status=$?
19008   grep -v '^ *+' conftest.er1 >conftest.err
19009   rm -f conftest.er1
19010   cat conftest.err >&5
19011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19012   (exit $ac_status); } && {
19013          test -z "$ac_c_werror_flag" ||
19014          test ! -s conftest.err
19015        } && test -s conftest$ac_exeext &&
19016        $as_test_x conftest$ac_exeext; then
19017   ok=PTHREAD_CREATE_UNDETACHED
19018 else
19019   echo "$as_me: failed program was:" >&5
19020 sed 's/^/| /' conftest.$ac_ext >&5
19021
19022         ok=unknown
19023 fi
19024
19025 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19026       conftest$ac_exeext conftest.$ac_ext
19027         fi
19028         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
19029
19030 cat >>confdefs.h <<\_ACEOF
19031 #define PTHREAD_CREATE_JOINABLE $ok
19032 _ACEOF
19033
19034         fi
19035         { echo "$as_me:$LINENO: result: ${ok}" >&5
19036 echo "${ECHO_T}${ok}" >&6; }
19037         if test x"$ok" = xunknown; then
19038                 { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
19039 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
19040         fi
19041
19042         { echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
19043 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6; }
19044         flag=no
19045 # We always add these in PostgreSQL
19046 #       case "${host_cpu}-${host_os}" in
19047 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
19048 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
19049 #       esac
19050         { echo "$as_me:$LINENO: result: ${flag}" >&5
19051 echo "${ECHO_T}${flag}" >&6; }
19052         if test "x$flag" != xno; then
19053                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
19054         fi
19055
19056         LIBS="$save_LIBS"
19057         CFLAGS="$save_CFLAGS"
19058
19059 # Supporting cc_r would require a special CC in all places that
19060 # use libpq, and that is ugly, so we don't do it.  Users can still
19061 # define their compiler as cc_r to do thread builds of everything.
19062         # More AIX lossage: must compile with cc_r
19063         # Extract the first word of "cc_r", so it can be a program name with args.
19064 set dummy cc_r; ac_word=$2
19065 { echo "$as_me:$LINENO: checking for $ac_word" >&5
19066 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19067 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
19068   echo $ECHO_N "(cached) $ECHO_C" >&6
19069 else
19070   if test -n "$PTHREAD_CC"; then
19071   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
19072 else
19073 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19074 for as_dir in $PATH
19075 do
19076   IFS=$as_save_IFS
19077   test -z "$as_dir" && as_dir=.
19078   for ac_exec_ext in '' $ac_executable_extensions; do
19079   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19080     ac_cv_prog_PTHREAD_CC="cc_r"
19081     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19082     break 2
19083   fi
19084 done
19085 done
19086 IFS=$as_save_IFS
19087
19088   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
19089 fi
19090 fi
19091 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
19092 if test -n "$PTHREAD_CC"; then
19093   { echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
19094 echo "${ECHO_T}$PTHREAD_CC" >&6; }
19095 else
19096   { echo "$as_me:$LINENO: result: no" >&5
19097 echo "${ECHO_T}no" >&6; }
19098 fi
19099
19100
19101 else
19102         PTHREAD_CC="$CC"
19103 fi
19104
19105
19106
19107
19108
19109 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
19110 if test x"$acx_pthread_ok" = xyes; then
19111
19112 cat >>confdefs.h <<\_ACEOF
19113 #define HAVE_PTHREAD 1
19114 _ACEOF
19115
19116         :
19117 else
19118         acx_pthread_ok=no
19119
19120 fi
19121 ac_ext=c
19122 ac_cpp='$CPP $CPPFLAGS'
19123 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19124 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19125 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19126
19127         # set thread flags
19128
19129 # Some platforms use these, so just defineed them.  They can't hurt if they
19130 # are not supported.
19131 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
19132
19133
19134 # At this point, we don't want to muck with the compiler name for threading.
19135 # Let's see who fails, perhaps AIX.  2004-04-23
19136 if test "$PTHREAD_CC" != "$CC"; then
19137 { { echo "$as_me:$LINENO: error:
19138 PostgreSQL does not support platforms that require a special compiler
19139 for thread safety." >&5
19140 echo "$as_me: error:
19141 PostgreSQL does not support platforms that require a special compiler
19142 for thread safety." >&2;}
19143    { (exit 1); exit 1; }; }
19144 fi
19145
19146 if test "$THREAD_SUPPORT" = no; then
19147 { { echo "$as_me:$LINENO: error: cannot enable threads on this platform
19148 This platform is known to not support thread-safe programs.  For details,
19149 compile and run src/bin/pg_thread_test." >&5
19150 echo "$as_me: error: cannot enable threads on this platform
19151 This platform is known to not support thread-safe programs.  For details,
19152 compile and run src/bin/pg_thread_test." >&2;}
19153    { (exit 1); exit 1; }; }
19154 fi
19155
19156 # Check for *_r functions
19157 _CFLAGS="$CFLAGS"
19158 _LIBS="$LIBS"
19159 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
19160 LIBS="$LIBS $PTHREAD_LIBS"
19161
19162 if test "$PORTNAME" != "win32"; then
19163 if test "${ac_cv_header_pthread_h+set}" = set; then
19164   { echo "$as_me:$LINENO: checking for pthread.h" >&5
19165 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; }
19166 if test "${ac_cv_header_pthread_h+set}" = set; then
19167   echo $ECHO_N "(cached) $ECHO_C" >&6
19168 fi
19169 { echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
19170 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; }
19171 else
19172   # Is the header compilable?
19173 { echo "$as_me:$LINENO: checking pthread.h usability" >&5
19174 echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6; }
19175 cat >conftest.$ac_ext <<_ACEOF
19176 /* confdefs.h.  */
19177 _ACEOF
19178 cat confdefs.h >>conftest.$ac_ext
19179 cat >>conftest.$ac_ext <<_ACEOF
19180 /* end confdefs.h.  */
19181 $ac_includes_default
19182 #include <pthread.h>
19183 _ACEOF
19184 rm -f conftest.$ac_objext
19185 if { (ac_try="$ac_compile"
19186 case "(($ac_try" in
19187   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19188   *) ac_try_echo=$ac_try;;
19189 esac
19190 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19191   (eval "$ac_compile") 2>conftest.er1
19192   ac_status=$?
19193   grep -v '^ *+' conftest.er1 >conftest.err
19194   rm -f conftest.er1
19195   cat conftest.err >&5
19196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19197   (exit $ac_status); } && {
19198          test -z "$ac_c_werror_flag" ||
19199          test ! -s conftest.err
19200        } && test -s conftest.$ac_objext; then
19201   ac_header_compiler=yes
19202 else
19203   echo "$as_me: failed program was:" >&5
19204 sed 's/^/| /' conftest.$ac_ext >&5
19205
19206         ac_header_compiler=no
19207 fi
19208
19209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19210 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19211 echo "${ECHO_T}$ac_header_compiler" >&6; }
19212
19213 # Is the header present?
19214 { echo "$as_me:$LINENO: checking pthread.h presence" >&5
19215 echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6; }
19216 cat >conftest.$ac_ext <<_ACEOF
19217 /* confdefs.h.  */
19218 _ACEOF
19219 cat confdefs.h >>conftest.$ac_ext
19220 cat >>conftest.$ac_ext <<_ACEOF
19221 /* end confdefs.h.  */
19222 #include <pthread.h>
19223 _ACEOF
19224 if { (ac_try="$ac_cpp conftest.$ac_ext"
19225 case "(($ac_try" in
19226   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19227   *) ac_try_echo=$ac_try;;
19228 esac
19229 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19230   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19231   ac_status=$?
19232   grep -v '^ *+' conftest.er1 >conftest.err
19233   rm -f conftest.er1
19234   cat conftest.err >&5
19235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19236   (exit $ac_status); } >/dev/null && {
19237          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19238          test ! -s conftest.err
19239        }; then
19240   ac_header_preproc=yes
19241 else
19242   echo "$as_me: failed program was:" >&5
19243 sed 's/^/| /' conftest.$ac_ext >&5
19244
19245   ac_header_preproc=no
19246 fi
19247
19248 rm -f conftest.err conftest.$ac_ext
19249 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19250 echo "${ECHO_T}$ac_header_preproc" >&6; }
19251
19252 # So?  What about this header?
19253 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19254   yes:no: )
19255     { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
19256 echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19257     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
19258 echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
19259     ac_header_preproc=yes
19260     ;;
19261   no:yes:* )
19262     { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
19263 echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
19264     { echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
19265 echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
19266     { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
19267 echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
19268     { echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
19269 echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19270     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
19271 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
19272     { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
19273 echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
19274     ( cat <<\_ASBOX
19275 ## ---------------------------------------- ##
19276 ## Report this to pgsql-bugs@postgresql.org ##
19277 ## ---------------------------------------- ##
19278 _ASBOX
19279      ) | sed "s/^/$as_me: WARNING:     /" >&2
19280     ;;
19281 esac
19282 { echo "$as_me:$LINENO: checking for pthread.h" >&5
19283 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; }
19284 if test "${ac_cv_header_pthread_h+set}" = set; then
19285   echo $ECHO_N "(cached) $ECHO_C" >&6
19286 else
19287   ac_cv_header_pthread_h=$ac_header_preproc
19288 fi
19289 { echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
19290 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; }
19291
19292 fi
19293 if test $ac_cv_header_pthread_h = yes; then
19294   :
19295 else
19296   { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safety" >&5
19297 echo "$as_me: error: pthread.h not found, required for --enable-thread-safety" >&2;}
19298    { (exit 1); exit 1; }; }
19299 fi
19300
19301
19302 fi
19303
19304
19305
19306
19307 for ac_func in strerror_r getpwuid_r gethostbyname_r
19308 do
19309 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19310 { echo "$as_me:$LINENO: checking for $ac_func" >&5
19311 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19312 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
19313   echo $ECHO_N "(cached) $ECHO_C" >&6
19314 else
19315   cat >conftest.$ac_ext <<_ACEOF
19316 /* confdefs.h.  */
19317 _ACEOF
19318 cat confdefs.h >>conftest.$ac_ext
19319 cat >>conftest.$ac_ext <<_ACEOF
19320 /* end confdefs.h.  */
19321 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19322    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
19323 #define $ac_func innocuous_$ac_func
19324
19325 /* System header to define __stub macros and hopefully few prototypes,
19326     which can conflict with char $ac_func (); below.
19327     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19328     <limits.h> exists even on freestanding compilers.  */
19329
19330 #ifdef __STDC__
19331 # include <limits.h>
19332 #else
19333 # include <assert.h>
19334 #endif
19335
19336 #undef $ac_func
19337
19338 /* Override any GCC internal prototype to avoid an error.
19339    Use char because int might match the return type of a GCC
19340    builtin and then its argument prototype would still apply.  */
19341 #ifdef __cplusplus
19342 extern "C"
19343 #endif
19344 char $ac_func ();
19345 /* The GNU C library defines this for functions which it implements
19346     to always fail with ENOSYS.  Some functions are actually named
19347     something starting with __ and the normal name is an alias.  */
19348 #if defined __stub_$ac_func || defined __stub___$ac_func
19349 choke me
19350 #endif
19351
19352 int
19353 main ()
19354 {
19355 return $ac_func ();
19356   ;
19357   return 0;
19358 }
19359 _ACEOF
19360 rm -f conftest.$ac_objext conftest$ac_exeext
19361 if { (ac_try="$ac_link"
19362 case "(($ac_try" in
19363   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19364   *) ac_try_echo=$ac_try;;
19365 esac
19366 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19367   (eval "$ac_link") 2>conftest.er1
19368   ac_status=$?
19369   grep -v '^ *+' conftest.er1 >conftest.err
19370   rm -f conftest.er1
19371   cat conftest.err >&5
19372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19373   (exit $ac_status); } && {
19374          test -z "$ac_c_werror_flag" ||
19375          test ! -s conftest.err
19376        } && test -s conftest$ac_exeext &&
19377        $as_test_x conftest$ac_exeext; then
19378   eval "$as_ac_var=yes"
19379 else
19380   echo "$as_me: failed program was:" >&5
19381 sed 's/^/| /' conftest.$ac_ext >&5
19382
19383         eval "$as_ac_var=no"
19384 fi
19385
19386 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19387       conftest$ac_exeext conftest.$ac_ext
19388 fi
19389 ac_res=`eval echo '${'$as_ac_var'}'`
19390                { echo "$as_me:$LINENO: result: $ac_res" >&5
19391 echo "${ECHO_T}$ac_res" >&6; }
19392 if test `eval echo '${'$as_ac_var'}'` = yes; then
19393   cat >>confdefs.h <<_ACEOF
19394 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19395 _ACEOF
19396
19397 fi
19398 done
19399
19400
19401 # Do test here with the proper thread flags
19402 { echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
19403 echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6; }
19404 if test "${pgac_cv_func_getpwuid_r_5arg+set}" = set; then
19405   echo $ECHO_N "(cached) $ECHO_C" >&6
19406 else
19407   cat >conftest.$ac_ext <<_ACEOF
19408 /* confdefs.h.  */
19409 _ACEOF
19410 cat confdefs.h >>conftest.$ac_ext
19411 cat >>conftest.$ac_ext <<_ACEOF
19412 /* end confdefs.h.  */
19413 #include <sys/types.h>
19414 #include <pwd.h>
19415 int
19416 main ()
19417 {
19418 uid_t uid;
19419 struct passwd *space;
19420 char *buf;
19421 size_t bufsize;
19422 struct passwd **result;
19423 getpwuid_r(uid, space, buf, bufsize, result);
19424   ;
19425   return 0;
19426 }
19427 _ACEOF
19428 rm -f conftest.$ac_objext
19429 if { (ac_try="$ac_compile"
19430 case "(($ac_try" in
19431   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19432   *) ac_try_echo=$ac_try;;
19433 esac
19434 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19435   (eval "$ac_compile") 2>conftest.er1
19436   ac_status=$?
19437   grep -v '^ *+' conftest.er1 >conftest.err
19438   rm -f conftest.er1
19439   cat conftest.err >&5
19440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19441   (exit $ac_status); } && {
19442          test -z "$ac_c_werror_flag" ||
19443          test ! -s conftest.err
19444        } && test -s conftest.$ac_objext; then
19445   pgac_cv_func_getpwuid_r_5arg=yes
19446 else
19447   echo "$as_me: failed program was:" >&5
19448 sed 's/^/| /' conftest.$ac_ext >&5
19449
19450         pgac_cv_func_getpwuid_r_5arg=no
19451 fi
19452
19453 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19454 fi
19455 { echo "$as_me:$LINENO: result: $pgac_cv_func_getpwuid_r_5arg" >&5
19456 echo "${ECHO_T}$pgac_cv_func_getpwuid_r_5arg" >&6; }
19457 if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
19458
19459 cat >>confdefs.h <<\_ACEOF
19460 #define GETPWUID_R_5ARG
19461 _ACEOF
19462
19463 fi
19464
19465 { echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
19466 echo $ECHO_N "checking whether strerror_r returns int... $ECHO_C" >&6; }
19467 if test "${pgac_cv_func_strerror_r_int+set}" = set; then
19468   echo $ECHO_N "(cached) $ECHO_C" >&6
19469 else
19470   cat >conftest.$ac_ext <<_ACEOF
19471 /* confdefs.h.  */
19472 _ACEOF
19473 cat confdefs.h >>conftest.$ac_ext
19474 cat >>conftest.$ac_ext <<_ACEOF
19475 /* end confdefs.h.  */
19476 #include <string.h>
19477 int
19478 main ()
19479 {
19480 #ifndef _AIX
19481 int strerror_r(int, char *, size_t);
19482 #else
19483 /* Older AIX has 'int' for the third argument so we don't test the args. */
19484 int strerror_r();
19485 #endif
19486   ;
19487   return 0;
19488 }
19489 _ACEOF
19490 rm -f conftest.$ac_objext
19491 if { (ac_try="$ac_compile"
19492 case "(($ac_try" in
19493   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19494   *) ac_try_echo=$ac_try;;
19495 esac
19496 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19497   (eval "$ac_compile") 2>conftest.er1
19498   ac_status=$?
19499   grep -v '^ *+' conftest.er1 >conftest.err
19500   rm -f conftest.er1
19501   cat conftest.err >&5
19502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19503   (exit $ac_status); } && {
19504          test -z "$ac_c_werror_flag" ||
19505          test ! -s conftest.err
19506        } && test -s conftest.$ac_objext; then
19507   pgac_cv_func_strerror_r_int=yes
19508 else
19509   echo "$as_me: failed program was:" >&5
19510 sed 's/^/| /' conftest.$ac_ext >&5
19511
19512         pgac_cv_func_strerror_r_int=no
19513 fi
19514
19515 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19516 fi
19517 { echo "$as_me:$LINENO: result: $pgac_cv_func_strerror_r_int" >&5
19518 echo "${ECHO_T}$pgac_cv_func_strerror_r_int" >&6; }
19519 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
19520
19521 cat >>confdefs.h <<\_ACEOF
19522 #define STRERROR_R_INT
19523 _ACEOF
19524
19525 fi
19526
19527
19528 CFLAGS="$_CFLAGS"
19529 LIBS="$_LIBS"
19530
19531 else
19532 # do not use values from template file
19533 PTHREAD_CFLAGS=
19534 PTHREAD_LIBS=
19535 fi
19536
19537
19538
19539
19540
19541 # We can test for libldap_r only after we know PTHREAD_LIBS
19542 if test "$with_ldap" = yes ; then
19543   _LIBS="$LIBS"
19544   if test "$PORTNAME" != "win32"; then
19545
19546 { echo "$as_me:$LINENO: checking for ldap_bind in -lldap" >&5
19547 echo $ECHO_N "checking for ldap_bind in -lldap... $ECHO_C" >&6; }
19548 if test "${ac_cv_lib_ldap_ldap_bind+set}" = set; then
19549   echo $ECHO_N "(cached) $ECHO_C" >&6
19550 else
19551   ac_check_lib_save_LIBS=$LIBS
19552 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
19553 cat >conftest.$ac_ext <<_ACEOF
19554 /* confdefs.h.  */
19555 _ACEOF
19556 cat confdefs.h >>conftest.$ac_ext
19557 cat >>conftest.$ac_ext <<_ACEOF
19558 /* end confdefs.h.  */
19559
19560 /* Override any GCC internal prototype to avoid an error.
19561    Use char because int might match the return type of a GCC
19562    builtin and then its argument prototype would still apply.  */
19563 #ifdef __cplusplus
19564 extern "C"
19565 #endif
19566 char ldap_bind ();
19567 int
19568 main ()
19569 {
19570 return ldap_bind ();
19571   ;
19572   return 0;
19573 }
19574 _ACEOF
19575 rm -f conftest.$ac_objext conftest$ac_exeext
19576 if { (ac_try="$ac_link"
19577 case "(($ac_try" in
19578   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19579   *) ac_try_echo=$ac_try;;
19580 esac
19581 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19582   (eval "$ac_link") 2>conftest.er1
19583   ac_status=$?
19584   grep -v '^ *+' conftest.er1 >conftest.err
19585   rm -f conftest.er1
19586   cat conftest.err >&5
19587   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19588   (exit $ac_status); } && {
19589          test -z "$ac_c_werror_flag" ||
19590          test ! -s conftest.err
19591        } && test -s conftest$ac_exeext &&
19592        $as_test_x conftest$ac_exeext; then
19593   ac_cv_lib_ldap_ldap_bind=yes
19594 else
19595   echo "$as_me: failed program was:" >&5
19596 sed 's/^/| /' conftest.$ac_ext >&5
19597
19598         ac_cv_lib_ldap_ldap_bind=no
19599 fi
19600
19601 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19602       conftest$ac_exeext conftest.$ac_ext
19603 LIBS=$ac_check_lib_save_LIBS
19604 fi
19605 { echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_bind" >&5
19606 echo "${ECHO_T}$ac_cv_lib_ldap_ldap_bind" >&6; }
19607 if test $ac_cv_lib_ldap_ldap_bind = yes; then
19608   cat >>confdefs.h <<_ACEOF
19609 #define HAVE_LIBLDAP 1
19610 _ACEOF
19611
19612   LIBS="-lldap $LIBS"
19613
19614 else
19615   { { echo "$as_me:$LINENO: error: library 'ldap' is required for LDAP" >&5
19616 echo "$as_me: error: library 'ldap' is required for LDAP" >&2;}
19617    { (exit 1); exit 1; }; }
19618 fi
19619
19620     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
19621     if test "$enable_thread_safety" = yes; then
19622       # on some platforms ldap_r fails to link without PTHREAD_LIBS
19623
19624 { echo "$as_me:$LINENO: checking for ldap_simple_bind in -lldap_r" >&5
19625 echo $ECHO_N "checking for ldap_simple_bind in -lldap_r... $ECHO_C" >&6; }
19626 if test "${ac_cv_lib_ldap_r_ldap_simple_bind+set}" = set; then
19627   echo $ECHO_N "(cached) $ECHO_C" >&6
19628 else
19629   ac_check_lib_save_LIBS=$LIBS
19630 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
19631 cat >conftest.$ac_ext <<_ACEOF
19632 /* confdefs.h.  */
19633 _ACEOF
19634 cat confdefs.h >>conftest.$ac_ext
19635 cat >>conftest.$ac_ext <<_ACEOF
19636 /* end confdefs.h.  */
19637
19638 /* Override any GCC internal prototype to avoid an error.
19639    Use char because int might match the return type of a GCC
19640    builtin and then its argument prototype would still apply.  */
19641 #ifdef __cplusplus
19642 extern "C"
19643 #endif
19644 char ldap_simple_bind ();
19645 int
19646 main ()
19647 {
19648 return ldap_simple_bind ();
19649   ;
19650   return 0;
19651 }
19652 _ACEOF
19653 rm -f conftest.$ac_objext conftest$ac_exeext
19654 if { (ac_try="$ac_link"
19655 case "(($ac_try" in
19656   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19657   *) ac_try_echo=$ac_try;;
19658 esac
19659 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19660   (eval "$ac_link") 2>conftest.er1
19661   ac_status=$?
19662   grep -v '^ *+' conftest.er1 >conftest.err
19663   rm -f conftest.er1
19664   cat conftest.err >&5
19665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19666   (exit $ac_status); } && {
19667          test -z "$ac_c_werror_flag" ||
19668          test ! -s conftest.err
19669        } && test -s conftest$ac_exeext &&
19670        $as_test_x conftest$ac_exeext; then
19671   ac_cv_lib_ldap_r_ldap_simple_bind=yes
19672 else
19673   echo "$as_me: failed program was:" >&5
19674 sed 's/^/| /' conftest.$ac_ext >&5
19675
19676         ac_cv_lib_ldap_r_ldap_simple_bind=no
19677 fi
19678
19679 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19680       conftest$ac_exeext conftest.$ac_ext
19681 LIBS=$ac_check_lib_save_LIBS
19682 fi
19683 { echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
19684 echo "${ECHO_T}$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
19685 if test $ac_cv_lib_ldap_r_ldap_simple_bind = yes; then
19686   cat >>confdefs.h <<_ACEOF
19687 #define HAVE_LIBLDAP_R 1
19688 _ACEOF
19689
19690   LIBS="-lldap_r $LIBS"
19691
19692 else
19693   { { echo "$as_me:$LINENO: error: library 'ldap_r' is required for LDAP" >&5
19694 echo "$as_me: error: library 'ldap_r' is required for LDAP" >&2;}
19695    { (exit 1); exit 1; }; }
19696 fi
19697
19698       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
19699     else
19700       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
19701     fi
19702   else
19703
19704 { echo "$as_me:$LINENO: checking for ldap_bind in -lwldap32" >&5
19705 echo $ECHO_N "checking for ldap_bind in -lwldap32... $ECHO_C" >&6; }
19706 if test "${ac_cv_lib_wldap32_ldap_bind+set}" = set; then
19707   echo $ECHO_N "(cached) $ECHO_C" >&6
19708 else
19709   ac_check_lib_save_LIBS=$LIBS
19710 LIBS="-lwldap32  $LIBS"
19711 cat >conftest.$ac_ext <<_ACEOF
19712 /* confdefs.h.  */
19713 _ACEOF
19714 cat confdefs.h >>conftest.$ac_ext
19715 cat >>conftest.$ac_ext <<_ACEOF
19716 /* end confdefs.h.  */
19717
19718 /* Override any GCC internal prototype to avoid an error.
19719    Use char because int might match the return type of a GCC
19720    builtin and then its argument prototype would still apply.  */
19721 #ifdef __cplusplus
19722 extern "C"
19723 #endif
19724 char ldap_bind ();
19725 int
19726 main ()
19727 {
19728 return ldap_bind ();
19729   ;
19730   return 0;
19731 }
19732 _ACEOF
19733 rm -f conftest.$ac_objext conftest$ac_exeext
19734 if { (ac_try="$ac_link"
19735 case "(($ac_try" in
19736   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19737   *) ac_try_echo=$ac_try;;
19738 esac
19739 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19740   (eval "$ac_link") 2>conftest.er1
19741   ac_status=$?
19742   grep -v '^ *+' conftest.er1 >conftest.err
19743   rm -f conftest.er1
19744   cat conftest.err >&5
19745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19746   (exit $ac_status); } && {
19747          test -z "$ac_c_werror_flag" ||
19748          test ! -s conftest.err
19749        } && test -s conftest$ac_exeext &&
19750        $as_test_x conftest$ac_exeext; then
19751   ac_cv_lib_wldap32_ldap_bind=yes
19752 else
19753   echo "$as_me: failed program was:" >&5
19754 sed 's/^/| /' conftest.$ac_ext >&5
19755
19756         ac_cv_lib_wldap32_ldap_bind=no
19757 fi
19758
19759 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19760       conftest$ac_exeext conftest.$ac_ext
19761 LIBS=$ac_check_lib_save_LIBS
19762 fi
19763 { echo "$as_me:$LINENO: result: $ac_cv_lib_wldap32_ldap_bind" >&5
19764 echo "${ECHO_T}$ac_cv_lib_wldap32_ldap_bind" >&6; }
19765 if test $ac_cv_lib_wldap32_ldap_bind = yes; then
19766   cat >>confdefs.h <<_ACEOF
19767 #define HAVE_LIBWLDAP32 1
19768 _ACEOF
19769
19770   LIBS="-lwldap32 $LIBS"
19771
19772 else
19773   { { echo "$as_me:$LINENO: error: library 'wldap32' is required for LDAP" >&5
19774 echo "$as_me: error: library 'wldap32' is required for LDAP" >&2;}
19775    { (exit 1); exit 1; }; }
19776 fi
19777
19778     LDAP_LIBS_FE="-lwldap32"
19779     LDAP_LIBS_BE="-lwldap32"
19780   fi
19781   LIBS="$_LIBS"
19782 fi
19783
19784
19785
19786
19787 # This test makes sure that run tests work at all.  Sometimes a shared
19788 # library is found by the linker, but the runtime linker can't find it.
19789 # This check should come after all modifications of compiler or linker
19790 # variables, and before any other run tests.
19791 { echo "$as_me:$LINENO: checking test program" >&5
19792 echo $ECHO_N "checking test program... $ECHO_C" >&6; }
19793 if test "$cross_compiling" = yes; then
19794   { echo "$as_me:$LINENO: result: cross-compiling" >&5
19795 echo "${ECHO_T}cross-compiling" >&6; }
19796 else
19797   cat >conftest.$ac_ext <<_ACEOF
19798 /* confdefs.h.  */
19799 _ACEOF
19800 cat confdefs.h >>conftest.$ac_ext
19801 cat >>conftest.$ac_ext <<_ACEOF
19802 /* end confdefs.h.  */
19803 int main() { return 0; }
19804 _ACEOF
19805 rm -f conftest$ac_exeext
19806 if { (ac_try="$ac_link"
19807 case "(($ac_try" in
19808   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19809   *) ac_try_echo=$ac_try;;
19810 esac
19811 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19812   (eval "$ac_link") 2>&5
19813   ac_status=$?
19814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19815   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19816   { (case "(($ac_try" in
19817   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19818   *) ac_try_echo=$ac_try;;
19819 esac
19820 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19821   (eval "$ac_try") 2>&5
19822   ac_status=$?
19823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19824   (exit $ac_status); }; }; then
19825   { echo "$as_me:$LINENO: result: ok" >&5
19826 echo "${ECHO_T}ok" >&6; }
19827 else
19828   echo "$as_me: program exited with status $ac_status" >&5
19829 echo "$as_me: failed program was:" >&5
19830 sed 's/^/| /' conftest.$ac_ext >&5
19831
19832 ( exit $ac_status )
19833 { echo "$as_me:$LINENO: result: failed" >&5
19834 echo "${ECHO_T}failed" >&6; }
19835 { { echo "$as_me:$LINENO: error:
19836 Could not execute a simple test program.  This may be a problem
19837 related to locating shared libraries.  Check the file 'config.log'
19838 for the exact reason." >&5
19839 echo "$as_me: error:
19840 Could not execute a simple test program.  This may be a problem
19841 related to locating shared libraries.  Check the file 'config.log'
19842 for the exact reason." >&2;}
19843    { (exit 1); exit 1; }; }
19844 fi
19845 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19846 fi
19847
19848
19849
19850 # --------------------
19851 # Run tests below here
19852 # --------------------
19853
19854 # Force use of our snprintf if system's doesn't do arg control
19855 # See comment above at snprintf test for details.
19856 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
19857   { echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
19858 echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6; }
19859 if test "${pgac_cv_printf_arg_control+set}" = set; then
19860   echo $ECHO_N "(cached) $ECHO_C" >&6
19861 else
19862   if test "$cross_compiling" = yes; then
19863   pgac_cv_printf_arg_control=cross
19864 else
19865   cat >conftest.$ac_ext <<_ACEOF
19866 /* confdefs.h.  */
19867 _ACEOF
19868 cat confdefs.h >>conftest.$ac_ext
19869 cat >>conftest.$ac_ext <<_ACEOF
19870 /* end confdefs.h.  */
19871 #include <stdio.h>
19872 #include <string.h>
19873
19874 int main()
19875 {
19876   char buf[100];
19877
19878   /* can it swap arguments? */
19879   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
19880   if (strcmp(buf, "4 3") != 0)
19881     return 1;
19882   return 0;
19883 }
19884 _ACEOF
19885 rm -f conftest$ac_exeext
19886 if { (ac_try="$ac_link"
19887 case "(($ac_try" in
19888   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19889   *) ac_try_echo=$ac_try;;
19890 esac
19891 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19892   (eval "$ac_link") 2>&5
19893   ac_status=$?
19894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19895   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19896   { (case "(($ac_try" in
19897   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19898   *) ac_try_echo=$ac_try;;
19899 esac
19900 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19901   (eval "$ac_try") 2>&5
19902   ac_status=$?
19903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19904   (exit $ac_status); }; }; then
19905   pgac_cv_printf_arg_control=yes
19906 else
19907   echo "$as_me: program exited with status $ac_status" >&5
19908 echo "$as_me: failed program was:" >&5
19909 sed 's/^/| /' conftest.$ac_ext >&5
19910
19911 ( exit $ac_status )
19912 pgac_cv_printf_arg_control=no
19913 fi
19914 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19915 fi
19916
19917
19918
19919 fi
19920 { echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
19921 echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6; }
19922
19923   if test $pgac_cv_printf_arg_control != yes ; then
19924     pgac_need_repl_snprintf=yes
19925   fi
19926 fi
19927
19928
19929
19930 { echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
19931 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6; }
19932 if test "${pgac_cv_type_long_int_64+set}" = set; then
19933   echo $ECHO_N "(cached) $ECHO_C" >&6
19934 else
19935   if test "$cross_compiling" = yes; then
19936   # If cross-compiling, check the size reported by the compiler and
19937 # trust that the arithmetic works.
19938 cat >conftest.$ac_ext <<_ACEOF
19939 /* confdefs.h.  */
19940 _ACEOF
19941 cat confdefs.h >>conftest.$ac_ext
19942 cat >>conftest.$ac_ext <<_ACEOF
19943 /* end confdefs.h.  */
19944
19945 int
19946 main ()
19947 {
19948 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
19949 test_array [0] = 0
19950
19951   ;
19952   return 0;
19953 }
19954 _ACEOF
19955 rm -f conftest.$ac_objext
19956 if { (ac_try="$ac_compile"
19957 case "(($ac_try" in
19958   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19959   *) ac_try_echo=$ac_try;;
19960 esac
19961 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19962   (eval "$ac_compile") 2>conftest.er1
19963   ac_status=$?
19964   grep -v '^ *+' conftest.er1 >conftest.err
19965   rm -f conftest.er1
19966   cat conftest.err >&5
19967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19968   (exit $ac_status); } && {
19969          test -z "$ac_c_werror_flag" ||
19970          test ! -s conftest.err
19971        } && test -s conftest.$ac_objext; then
19972   pgac_cv_type_long_int_64=yes
19973 else
19974   echo "$as_me: failed program was:" >&5
19975 sed 's/^/| /' conftest.$ac_ext >&5
19976
19977         pgac_cv_type_long_int_64=no
19978 fi
19979
19980 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19981 else
19982   cat >conftest.$ac_ext <<_ACEOF
19983 /* confdefs.h.  */
19984 _ACEOF
19985 cat confdefs.h >>conftest.$ac_ext
19986 cat >>conftest.$ac_ext <<_ACEOF
19987 /* end confdefs.h.  */
19988 typedef long int ac_int64;
19989
19990 /*
19991  * These are globals to discourage the compiler from folding all the
19992  * arithmetic tests down to compile-time constants.
19993  */
19994 ac_int64 a = 20000001;
19995 ac_int64 b = 40000005;
19996
19997 int does_int64_work()
19998 {
19999   ac_int64 c,d;
20000
20001   if (sizeof(ac_int64) != 8)
20002     return 0;                   /* definitely not the right size */
20003
20004   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
20005   c = a * b;
20006   d = (c + b) / b;
20007   if (d != a+1)
20008     return 0;
20009   return 1;
20010 }
20011 main() {
20012   exit(! does_int64_work());
20013 }
20014 _ACEOF
20015 rm -f conftest$ac_exeext
20016 if { (ac_try="$ac_link"
20017 case "(($ac_try" in
20018   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20019   *) ac_try_echo=$ac_try;;
20020 esac
20021 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20022   (eval "$ac_link") 2>&5
20023   ac_status=$?
20024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20025   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20026   { (case "(($ac_try" in
20027   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20028   *) ac_try_echo=$ac_try;;
20029 esac
20030 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20031   (eval "$ac_try") 2>&5
20032   ac_status=$?
20033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20034   (exit $ac_status); }; }; then
20035   pgac_cv_type_long_int_64=yes
20036 else
20037   echo "$as_me: program exited with status $ac_status" >&5
20038 echo "$as_me: failed program was:" >&5
20039 sed 's/^/| /' conftest.$ac_ext >&5
20040
20041 ( exit $ac_status )
20042 pgac_cv_type_long_int_64=no
20043 fi
20044 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20045 fi
20046
20047
20048 fi
20049 { echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
20050 echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6; }
20051
20052 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
20053 if test x"$pgac_cv_type_long_int_64" = xyes ; then
20054
20055 cat >>confdefs.h <<\_ACEOF
20056 #define HAVE_LONG_INT_64 1
20057 _ACEOF
20058
20059 fi
20060
20061
20062 if test x"$HAVE_LONG_INT_64" = x"no" ; then
20063   { echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
20064 echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6; }
20065 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
20066   echo $ECHO_N "(cached) $ECHO_C" >&6
20067 else
20068   if test "$cross_compiling" = yes; then
20069   # If cross-compiling, check the size reported by the compiler and
20070 # trust that the arithmetic works.
20071 cat >conftest.$ac_ext <<_ACEOF
20072 /* confdefs.h.  */
20073 _ACEOF
20074 cat confdefs.h >>conftest.$ac_ext
20075 cat >>conftest.$ac_ext <<_ACEOF
20076 /* end confdefs.h.  */
20077
20078 int
20079 main ()
20080 {
20081 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
20082 test_array [0] = 0
20083
20084   ;
20085   return 0;
20086 }
20087 _ACEOF
20088 rm -f conftest.$ac_objext
20089 if { (ac_try="$ac_compile"
20090 case "(($ac_try" in
20091   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20092   *) ac_try_echo=$ac_try;;
20093 esac
20094 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20095   (eval "$ac_compile") 2>conftest.er1
20096   ac_status=$?
20097   grep -v '^ *+' conftest.er1 >conftest.err
20098   rm -f conftest.er1
20099   cat conftest.err >&5
20100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20101   (exit $ac_status); } && {
20102          test -z "$ac_c_werror_flag" ||
20103          test ! -s conftest.err
20104        } && test -s conftest.$ac_objext; then
20105   pgac_cv_type_long_long_int_64=yes
20106 else
20107   echo "$as_me: failed program was:" >&5
20108 sed 's/^/| /' conftest.$ac_ext >&5
20109
20110         pgac_cv_type_long_long_int_64=no
20111 fi
20112
20113 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20114 else
20115   cat >conftest.$ac_ext <<_ACEOF
20116 /* confdefs.h.  */
20117 _ACEOF
20118 cat confdefs.h >>conftest.$ac_ext
20119 cat >>conftest.$ac_ext <<_ACEOF
20120 /* end confdefs.h.  */
20121 typedef long long int ac_int64;
20122
20123 /*
20124  * These are globals to discourage the compiler from folding all the
20125  * arithmetic tests down to compile-time constants.
20126  */
20127 ac_int64 a = 20000001;
20128 ac_int64 b = 40000005;
20129
20130 int does_int64_work()
20131 {
20132   ac_int64 c,d;
20133
20134   if (sizeof(ac_int64) != 8)
20135     return 0;                   /* definitely not the right size */
20136
20137   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
20138   c = a * b;
20139   d = (c + b) / b;
20140   if (d != a+1)
20141     return 0;
20142   return 1;
20143 }
20144 main() {
20145   exit(! does_int64_work());
20146 }
20147 _ACEOF
20148 rm -f conftest$ac_exeext
20149 if { (ac_try="$ac_link"
20150 case "(($ac_try" in
20151   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20152   *) ac_try_echo=$ac_try;;
20153 esac
20154 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20155   (eval "$ac_link") 2>&5
20156   ac_status=$?
20157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20158   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20159   { (case "(($ac_try" in
20160   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20161   *) ac_try_echo=$ac_try;;
20162 esac
20163 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20164   (eval "$ac_try") 2>&5
20165   ac_status=$?
20166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20167   (exit $ac_status); }; }; then
20168   pgac_cv_type_long_long_int_64=yes
20169 else
20170   echo "$as_me: program exited with status $ac_status" >&5
20171 echo "$as_me: failed program was:" >&5
20172 sed 's/^/| /' conftest.$ac_ext >&5
20173
20174 ( exit $ac_status )
20175 pgac_cv_type_long_long_int_64=no
20176 fi
20177 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20178 fi
20179
20180
20181 fi
20182 { echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
20183 echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6; }
20184
20185 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
20186 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
20187
20188 cat >>confdefs.h <<\_ACEOF
20189 #define HAVE_LONG_LONG_INT_64 1
20190 _ACEOF
20191
20192 fi
20193
20194 fi
20195
20196
20197
20198 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
20199   cat >conftest.$ac_ext <<_ACEOF
20200 /* confdefs.h.  */
20201 _ACEOF
20202 cat confdefs.h >>conftest.$ac_ext
20203 cat >>conftest.$ac_ext <<_ACEOF
20204 /* end confdefs.h.  */
20205
20206 #define INT64CONST(x)  x##LL
20207 long long int foo = INT64CONST(0x1234567890123456);
20208
20209 int
20210 main ()
20211 {
20212
20213   ;
20214   return 0;
20215 }
20216 _ACEOF
20217 rm -f conftest.$ac_objext
20218 if { (ac_try="$ac_compile"
20219 case "(($ac_try" in
20220   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20221   *) ac_try_echo=$ac_try;;
20222 esac
20223 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20224   (eval "$ac_compile") 2>conftest.er1
20225   ac_status=$?
20226   grep -v '^ *+' conftest.er1 >conftest.err
20227   rm -f conftest.er1
20228   cat conftest.err >&5
20229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20230   (exit $ac_status); } && {
20231          test -z "$ac_c_werror_flag" ||
20232          test ! -s conftest.err
20233        } && test -s conftest.$ac_objext; then
20234
20235 cat >>confdefs.h <<\_ACEOF
20236 #define HAVE_LL_CONSTANTS 1
20237 _ACEOF
20238
20239 else
20240   echo "$as_me: failed program was:" >&5
20241 sed 's/^/| /' conftest.$ac_ext >&5
20242
20243
20244 fi
20245
20246 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20247 fi
20248
20249
20250 # If we found "long int" is 64 bits, assume snprintf handles it.  If
20251 # we found we need to use "long long int", better check.  We cope with
20252 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
20253 # work, fall back to our own snprintf emulation (which we know uses %lld).
20254
20255 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
20256   if test $pgac_need_repl_snprintf = no; then
20257     { echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
20258 echo $ECHO_N "checking snprintf format for long long int... $ECHO_C" >&6; }
20259 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
20260   echo $ECHO_N "(cached) $ECHO_C" >&6
20261 else
20262   for pgac_format in '%lld' '%qd' '%I64d'; do
20263 if test "$cross_compiling" = yes; then
20264   pgac_cv_snprintf_long_long_int_format=cross; break
20265 else
20266   cat >conftest.$ac_ext <<_ACEOF
20267 /* confdefs.h.  */
20268 _ACEOF
20269 cat confdefs.h >>conftest.$ac_ext
20270 cat >>conftest.$ac_ext <<_ACEOF
20271 /* end confdefs.h.  */
20272 #include <stdio.h>
20273 typedef long long int ac_int64;
20274 #define INT64_FORMAT "$pgac_format"
20275
20276 ac_int64 a = 20000001;
20277 ac_int64 b = 40000005;
20278
20279 int does_int64_snprintf_work()
20280 {
20281   ac_int64 c;
20282   char buf[100];
20283
20284   if (sizeof(ac_int64) != 8)
20285     return 0;                   /* doesn't look like the right size */
20286
20287   c = a * b;
20288   snprintf(buf, 100, INT64_FORMAT, c);
20289   if (strcmp(buf, "800000140000005") != 0)
20290     return 0;                   /* either multiply or snprintf is busted */
20291   return 1;
20292 }
20293 main() {
20294   exit(! does_int64_snprintf_work());
20295 }
20296 _ACEOF
20297 rm -f conftest$ac_exeext
20298 if { (ac_try="$ac_link"
20299 case "(($ac_try" in
20300   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20301   *) ac_try_echo=$ac_try;;
20302 esac
20303 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20304   (eval "$ac_link") 2>&5
20305   ac_status=$?
20306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20307   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20308   { (case "(($ac_try" in
20309   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20310   *) ac_try_echo=$ac_try;;
20311 esac
20312 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20313   (eval "$ac_try") 2>&5
20314   ac_status=$?
20315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20316   (exit $ac_status); }; }; then
20317   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
20318 else
20319   echo "$as_me: program exited with status $ac_status" >&5
20320 echo "$as_me: failed program was:" >&5
20321 sed 's/^/| /' conftest.$ac_ext >&5
20322
20323 fi
20324 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20325 fi
20326
20327
20328 done
20329 fi
20330
20331 LONG_LONG_INT_FORMAT=''
20332
20333 case $pgac_cv_snprintf_long_long_int_format in
20334   cross) { echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
20335 echo "${ECHO_T}cannot test (not on host machine)" >&6; };;
20336   ?*)    { echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
20337 echo "${ECHO_T}$pgac_cv_snprintf_long_long_int_format" >&6; }
20338          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
20339   *)     { echo "$as_me:$LINENO: result: none" >&5
20340 echo "${ECHO_T}none" >&6; };;
20341 esac
20342     if test "$LONG_LONG_INT_FORMAT" = ""; then
20343       # Force usage of our own snprintf, since system snprintf is broken
20344       pgac_need_repl_snprintf=yes
20345       LONG_LONG_INT_FORMAT='%lld'
20346     fi
20347   else
20348     # Here if we previously decided we needed to use our own snprintf
20349     LONG_LONG_INT_FORMAT='%lld'
20350   fi
20351   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
20352   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
20353   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
20354 else
20355   # Here if we are not using 'long long int' at all
20356   INT64_FORMAT='"%ld"'
20357   UINT64_FORMAT='"%lu"'
20358 fi
20359
20360
20361 cat >>confdefs.h <<_ACEOF
20362 #define INT64_FORMAT $INT64_FORMAT
20363 _ACEOF
20364
20365
20366
20367 cat >>confdefs.h <<_ACEOF
20368 #define UINT64_FORMAT $UINT64_FORMAT
20369 _ACEOF
20370
20371
20372 # Now we have checked all the reasons to replace snprintf
20373 if test $pgac_need_repl_snprintf = yes; then
20374
20375 cat >>confdefs.h <<\_ACEOF
20376 #define USE_REPL_SNPRINTF 1
20377 _ACEOF
20378
20379   case " $LIBOBJS " in
20380   *" snprintf.$ac_objext "* ) ;;
20381   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
20382  ;;
20383 esac
20384
20385 fi
20386
20387 # Need a #define for the size of Datum (unsigned long)
20388 { echo "$as_me:$LINENO: checking for unsigned long" >&5
20389 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6; }
20390 if test "${ac_cv_type_unsigned_long+set}" = set; then
20391   echo $ECHO_N "(cached) $ECHO_C" >&6
20392 else
20393   cat >conftest.$ac_ext <<_ACEOF
20394 /* confdefs.h.  */
20395 _ACEOF
20396 cat confdefs.h >>conftest.$ac_ext
20397 cat >>conftest.$ac_ext <<_ACEOF
20398 /* end confdefs.h.  */
20399 $ac_includes_default
20400 typedef unsigned long ac__type_new_;
20401 int
20402 main ()
20403 {
20404 if ((ac__type_new_ *) 0)
20405   return 0;
20406 if (sizeof (ac__type_new_))
20407   return 0;
20408   ;
20409   return 0;
20410 }
20411 _ACEOF
20412 rm -f conftest.$ac_objext
20413 if { (ac_try="$ac_compile"
20414 case "(($ac_try" in
20415   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20416   *) ac_try_echo=$ac_try;;
20417 esac
20418 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20419   (eval "$ac_compile") 2>conftest.er1
20420   ac_status=$?
20421   grep -v '^ *+' conftest.er1 >conftest.err
20422   rm -f conftest.er1
20423   cat conftest.err >&5
20424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20425   (exit $ac_status); } && {
20426          test -z "$ac_c_werror_flag" ||
20427          test ! -s conftest.err
20428        } && test -s conftest.$ac_objext; then
20429   ac_cv_type_unsigned_long=yes
20430 else
20431   echo "$as_me: failed program was:" >&5
20432 sed 's/^/| /' conftest.$ac_ext >&5
20433
20434         ac_cv_type_unsigned_long=no
20435 fi
20436
20437 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20438 fi
20439 { echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
20440 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6; }
20441
20442 # The cast to long int works around a bug in the HP C Compiler
20443 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
20444 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
20445 # This bug is HP SR number 8606223364.
20446 { echo "$as_me:$LINENO: checking size of unsigned long" >&5
20447 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6; }
20448 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
20449   echo $ECHO_N "(cached) $ECHO_C" >&6
20450 else
20451   if test "$cross_compiling" = yes; then
20452   # Depending upon the size, compute the lo and hi bounds.
20453 cat >conftest.$ac_ext <<_ACEOF
20454 /* confdefs.h.  */
20455 _ACEOF
20456 cat confdefs.h >>conftest.$ac_ext
20457 cat >>conftest.$ac_ext <<_ACEOF
20458 /* end confdefs.h.  */
20459 $ac_includes_default
20460    typedef unsigned long ac__type_sizeof_;
20461 int
20462 main ()
20463 {
20464 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
20465 test_array [0] = 0
20466
20467   ;
20468   return 0;
20469 }
20470 _ACEOF
20471 rm -f conftest.$ac_objext
20472 if { (ac_try="$ac_compile"
20473 case "(($ac_try" in
20474   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20475   *) ac_try_echo=$ac_try;;
20476 esac
20477 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20478   (eval "$ac_compile") 2>conftest.er1
20479   ac_status=$?
20480   grep -v '^ *+' conftest.er1 >conftest.err
20481   rm -f conftest.er1
20482   cat conftest.err >&5
20483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20484   (exit $ac_status); } && {
20485          test -z "$ac_c_werror_flag" ||
20486          test ! -s conftest.err
20487        } && test -s conftest.$ac_objext; then
20488   ac_lo=0 ac_mid=0
20489   while :; do
20490     cat >conftest.$ac_ext <<_ACEOF
20491 /* confdefs.h.  */
20492 _ACEOF
20493 cat confdefs.h >>conftest.$ac_ext
20494 cat >>conftest.$ac_ext <<_ACEOF
20495 /* end confdefs.h.  */
20496 $ac_includes_default
20497    typedef unsigned long ac__type_sizeof_;
20498 int
20499 main ()
20500 {
20501 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
20502 test_array [0] = 0
20503
20504   ;
20505   return 0;
20506 }
20507 _ACEOF
20508 rm -f conftest.$ac_objext
20509 if { (ac_try="$ac_compile"
20510 case "(($ac_try" in
20511   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20512   *) ac_try_echo=$ac_try;;
20513 esac
20514 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20515   (eval "$ac_compile") 2>conftest.er1
20516   ac_status=$?
20517   grep -v '^ *+' conftest.er1 >conftest.err
20518   rm -f conftest.er1
20519   cat conftest.err >&5
20520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20521   (exit $ac_status); } && {
20522          test -z "$ac_c_werror_flag" ||
20523          test ! -s conftest.err
20524        } && test -s conftest.$ac_objext; then
20525   ac_hi=$ac_mid; break
20526 else
20527   echo "$as_me: failed program was:" >&5
20528 sed 's/^/| /' conftest.$ac_ext >&5
20529
20530         ac_lo=`expr $ac_mid + 1`
20531                         if test $ac_lo -le $ac_mid; then
20532                           ac_lo= ac_hi=
20533                           break
20534                         fi
20535                         ac_mid=`expr 2 '*' $ac_mid + 1`
20536 fi
20537
20538 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20539   done
20540 else
20541   echo "$as_me: failed program was:" >&5
20542 sed 's/^/| /' conftest.$ac_ext >&5
20543
20544         cat >conftest.$ac_ext <<_ACEOF
20545 /* confdefs.h.  */
20546 _ACEOF
20547 cat confdefs.h >>conftest.$ac_ext
20548 cat >>conftest.$ac_ext <<_ACEOF
20549 /* end confdefs.h.  */
20550 $ac_includes_default
20551    typedef unsigned long ac__type_sizeof_;
20552 int
20553 main ()
20554 {
20555 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
20556 test_array [0] = 0
20557
20558   ;
20559   return 0;
20560 }
20561 _ACEOF
20562 rm -f conftest.$ac_objext
20563 if { (ac_try="$ac_compile"
20564 case "(($ac_try" in
20565   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20566   *) ac_try_echo=$ac_try;;
20567 esac
20568 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20569   (eval "$ac_compile") 2>conftest.er1
20570   ac_status=$?
20571   grep -v '^ *+' conftest.er1 >conftest.err
20572   rm -f conftest.er1
20573   cat conftest.err >&5
20574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20575   (exit $ac_status); } && {
20576          test -z "$ac_c_werror_flag" ||
20577          test ! -s conftest.err
20578        } && test -s conftest.$ac_objext; then
20579   ac_hi=-1 ac_mid=-1
20580   while :; do
20581     cat >conftest.$ac_ext <<_ACEOF
20582 /* confdefs.h.  */
20583 _ACEOF
20584 cat confdefs.h >>conftest.$ac_ext
20585 cat >>conftest.$ac_ext <<_ACEOF
20586 /* end confdefs.h.  */
20587 $ac_includes_default
20588    typedef unsigned long ac__type_sizeof_;
20589 int
20590 main ()
20591 {
20592 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
20593 test_array [0] = 0
20594
20595   ;
20596   return 0;
20597 }
20598 _ACEOF
20599 rm -f conftest.$ac_objext
20600 if { (ac_try="$ac_compile"
20601 case "(($ac_try" in
20602   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20603   *) ac_try_echo=$ac_try;;
20604 esac
20605 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20606   (eval "$ac_compile") 2>conftest.er1
20607   ac_status=$?
20608   grep -v '^ *+' conftest.er1 >conftest.err
20609   rm -f conftest.er1
20610   cat conftest.err >&5
20611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20612   (exit $ac_status); } && {
20613          test -z "$ac_c_werror_flag" ||
20614          test ! -s conftest.err
20615        } && test -s conftest.$ac_objext; then
20616   ac_lo=$ac_mid; break
20617 else
20618   echo "$as_me: failed program was:" >&5
20619 sed 's/^/| /' conftest.$ac_ext >&5
20620
20621         ac_hi=`expr '(' $ac_mid ')' - 1`
20622                         if test $ac_mid -le $ac_hi; then
20623                           ac_lo= ac_hi=
20624                           break
20625                         fi
20626                         ac_mid=`expr 2 '*' $ac_mid`
20627 fi
20628
20629 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20630   done
20631 else
20632   echo "$as_me: failed program was:" >&5
20633 sed 's/^/| /' conftest.$ac_ext >&5
20634
20635         ac_lo= ac_hi=
20636 fi
20637
20638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20639 fi
20640
20641 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20642 # Binary search between lo and hi bounds.
20643 while test "x$ac_lo" != "x$ac_hi"; do
20644   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20645   cat >conftest.$ac_ext <<_ACEOF
20646 /* confdefs.h.  */
20647 _ACEOF
20648 cat confdefs.h >>conftest.$ac_ext
20649 cat >>conftest.$ac_ext <<_ACEOF
20650 /* end confdefs.h.  */
20651 $ac_includes_default
20652    typedef unsigned long ac__type_sizeof_;
20653 int
20654 main ()
20655 {
20656 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
20657 test_array [0] = 0
20658
20659   ;
20660   return 0;
20661 }
20662 _ACEOF
20663 rm -f conftest.$ac_objext
20664 if { (ac_try="$ac_compile"
20665 case "(($ac_try" in
20666   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20667   *) ac_try_echo=$ac_try;;
20668 esac
20669 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20670   (eval "$ac_compile") 2>conftest.er1
20671   ac_status=$?
20672   grep -v '^ *+' conftest.er1 >conftest.err
20673   rm -f conftest.er1
20674   cat conftest.err >&5
20675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20676   (exit $ac_status); } && {
20677          test -z "$ac_c_werror_flag" ||
20678          test ! -s conftest.err
20679        } && test -s conftest.$ac_objext; then
20680   ac_hi=$ac_mid
20681 else
20682   echo "$as_me: failed program was:" >&5
20683 sed 's/^/| /' conftest.$ac_ext >&5
20684
20685         ac_lo=`expr '(' $ac_mid ')' + 1`
20686 fi
20687
20688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20689 done
20690 case $ac_lo in
20691 ?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
20692 '') if test "$ac_cv_type_unsigned_long" = yes; then
20693      { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long)
20694 See \`config.log' for more details." >&5
20695 echo "$as_me: error: cannot compute sizeof (unsigned long)
20696 See \`config.log' for more details." >&2;}
20697    { (exit 77); exit 77; }; }
20698    else
20699      ac_cv_sizeof_unsigned_long=0
20700    fi ;;
20701 esac
20702 else
20703   cat >conftest.$ac_ext <<_ACEOF
20704 /* confdefs.h.  */
20705 _ACEOF
20706 cat confdefs.h >>conftest.$ac_ext
20707 cat >>conftest.$ac_ext <<_ACEOF
20708 /* end confdefs.h.  */
20709 $ac_includes_default
20710    typedef unsigned long ac__type_sizeof_;
20711 static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
20712 static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
20713 #include <stdio.h>
20714 #include <stdlib.h>
20715 int
20716 main ()
20717 {
20718
20719   FILE *f = fopen ("conftest.val", "w");
20720   if (! f)
20721     return 1;
20722   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
20723     {
20724       long int i = longval ();
20725       if (i != ((long int) (sizeof (ac__type_sizeof_))))
20726         return 1;
20727       fprintf (f, "%ld\n", i);
20728     }
20729   else
20730     {
20731       unsigned long int i = ulongval ();
20732       if (i != ((long int) (sizeof (ac__type_sizeof_))))
20733         return 1;
20734       fprintf (f, "%lu\n", i);
20735     }
20736   return ferror (f) || fclose (f) != 0;
20737
20738   ;
20739   return 0;
20740 }
20741 _ACEOF
20742 rm -f conftest$ac_exeext
20743 if { (ac_try="$ac_link"
20744 case "(($ac_try" in
20745   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20746   *) ac_try_echo=$ac_try;;
20747 esac
20748 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20749   (eval "$ac_link") 2>&5
20750   ac_status=$?
20751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20752   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20753   { (case "(($ac_try" in
20754   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20755   *) ac_try_echo=$ac_try;;
20756 esac
20757 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20758   (eval "$ac_try") 2>&5
20759   ac_status=$?
20760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20761   (exit $ac_status); }; }; then
20762   ac_cv_sizeof_unsigned_long=`cat conftest.val`
20763 else
20764   echo "$as_me: program exited with status $ac_status" >&5
20765 echo "$as_me: failed program was:" >&5
20766 sed 's/^/| /' conftest.$ac_ext >&5
20767
20768 ( exit $ac_status )
20769 if test "$ac_cv_type_unsigned_long" = yes; then
20770      { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long)
20771 See \`config.log' for more details." >&5
20772 echo "$as_me: error: cannot compute sizeof (unsigned long)
20773 See \`config.log' for more details." >&2;}
20774    { (exit 77); exit 77; }; }
20775    else
20776      ac_cv_sizeof_unsigned_long=0
20777    fi
20778 fi
20779 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20780 fi
20781 rm -f conftest.val
20782 fi
20783 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
20784 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6; }
20785
20786
20787
20788 cat >>confdefs.h <<_ACEOF
20789 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
20790 _ACEOF
20791
20792
20793
20794 # And one for the size of size_t (enables tweaks for > 32bit address space)
20795 { echo "$as_me:$LINENO: checking for size_t" >&5
20796 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
20797 if test "${ac_cv_type_size_t+set}" = set; then
20798   echo $ECHO_N "(cached) $ECHO_C" >&6
20799 else
20800   cat >conftest.$ac_ext <<_ACEOF
20801 /* confdefs.h.  */
20802 _ACEOF
20803 cat confdefs.h >>conftest.$ac_ext
20804 cat >>conftest.$ac_ext <<_ACEOF
20805 /* end confdefs.h.  */
20806 $ac_includes_default
20807 typedef size_t ac__type_new_;
20808 int
20809 main ()
20810 {
20811 if ((ac__type_new_ *) 0)
20812   return 0;
20813 if (sizeof (ac__type_new_))
20814   return 0;
20815   ;
20816   return 0;
20817 }
20818 _ACEOF
20819 rm -f conftest.$ac_objext
20820 if { (ac_try="$ac_compile"
20821 case "(($ac_try" in
20822   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20823   *) ac_try_echo=$ac_try;;
20824 esac
20825 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20826   (eval "$ac_compile") 2>conftest.er1
20827   ac_status=$?
20828   grep -v '^ *+' conftest.er1 >conftest.err
20829   rm -f conftest.er1
20830   cat conftest.err >&5
20831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20832   (exit $ac_status); } && {
20833          test -z "$ac_c_werror_flag" ||
20834          test ! -s conftest.err
20835        } && test -s conftest.$ac_objext; then
20836   ac_cv_type_size_t=yes
20837 else
20838   echo "$as_me: failed program was:" >&5
20839 sed 's/^/| /' conftest.$ac_ext >&5
20840
20841         ac_cv_type_size_t=no
20842 fi
20843
20844 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20845 fi
20846 { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
20847 echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
20848
20849 # The cast to long int works around a bug in the HP C Compiler
20850 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
20851 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
20852 # This bug is HP SR number 8606223364.
20853 { echo "$as_me:$LINENO: checking size of size_t" >&5
20854 echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
20855 if test "${ac_cv_sizeof_size_t+set}" = set; then
20856   echo $ECHO_N "(cached) $ECHO_C" >&6
20857 else
20858   if test "$cross_compiling" = yes; then
20859   # Depending upon the size, compute the lo and hi bounds.
20860 cat >conftest.$ac_ext <<_ACEOF
20861 /* confdefs.h.  */
20862 _ACEOF
20863 cat confdefs.h >>conftest.$ac_ext
20864 cat >>conftest.$ac_ext <<_ACEOF
20865 /* end confdefs.h.  */
20866 $ac_includes_default
20867    typedef size_t ac__type_sizeof_;
20868 int
20869 main ()
20870 {
20871 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
20872 test_array [0] = 0
20873
20874   ;
20875   return 0;
20876 }
20877 _ACEOF
20878 rm -f conftest.$ac_objext
20879 if { (ac_try="$ac_compile"
20880 case "(($ac_try" in
20881   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20882   *) ac_try_echo=$ac_try;;
20883 esac
20884 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20885   (eval "$ac_compile") 2>conftest.er1
20886   ac_status=$?
20887   grep -v '^ *+' conftest.er1 >conftest.err
20888   rm -f conftest.er1
20889   cat conftest.err >&5
20890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20891   (exit $ac_status); } && {
20892          test -z "$ac_c_werror_flag" ||
20893          test ! -s conftest.err
20894        } && test -s conftest.$ac_objext; then
20895   ac_lo=0 ac_mid=0
20896   while :; do
20897     cat >conftest.$ac_ext <<_ACEOF
20898 /* confdefs.h.  */
20899 _ACEOF
20900 cat confdefs.h >>conftest.$ac_ext
20901 cat >>conftest.$ac_ext <<_ACEOF
20902 /* end confdefs.h.  */
20903 $ac_includes_default
20904    typedef size_t ac__type_sizeof_;
20905 int
20906 main ()
20907 {
20908 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
20909 test_array [0] = 0
20910
20911   ;
20912   return 0;
20913 }
20914 _ACEOF
20915 rm -f conftest.$ac_objext
20916 if { (ac_try="$ac_compile"
20917 case "(($ac_try" in
20918   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20919   *) ac_try_echo=$ac_try;;
20920 esac
20921 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20922   (eval "$ac_compile") 2>conftest.er1
20923   ac_status=$?
20924   grep -v '^ *+' conftest.er1 >conftest.err
20925   rm -f conftest.er1
20926   cat conftest.err >&5
20927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20928   (exit $ac_status); } && {
20929          test -z "$ac_c_werror_flag" ||
20930          test ! -s conftest.err
20931        } && test -s conftest.$ac_objext; then
20932   ac_hi=$ac_mid; break
20933 else
20934   echo "$as_me: failed program was:" >&5
20935 sed 's/^/| /' conftest.$ac_ext >&5
20936
20937         ac_lo=`expr $ac_mid + 1`
20938                         if test $ac_lo -le $ac_mid; then
20939                           ac_lo= ac_hi=
20940                           break
20941                         fi
20942                         ac_mid=`expr 2 '*' $ac_mid + 1`
20943 fi
20944
20945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20946   done
20947 else
20948   echo "$as_me: failed program was:" >&5
20949 sed 's/^/| /' conftest.$ac_ext >&5
20950
20951         cat >conftest.$ac_ext <<_ACEOF
20952 /* confdefs.h.  */
20953 _ACEOF
20954 cat confdefs.h >>conftest.$ac_ext
20955 cat >>conftest.$ac_ext <<_ACEOF
20956 /* end confdefs.h.  */
20957 $ac_includes_default
20958    typedef size_t ac__type_sizeof_;
20959 int
20960 main ()
20961 {
20962 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
20963 test_array [0] = 0
20964
20965   ;
20966   return 0;
20967 }
20968 _ACEOF
20969 rm -f conftest.$ac_objext
20970 if { (ac_try="$ac_compile"
20971 case "(($ac_try" in
20972   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20973   *) ac_try_echo=$ac_try;;
20974 esac
20975 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20976   (eval "$ac_compile") 2>conftest.er1
20977   ac_status=$?
20978   grep -v '^ *+' conftest.er1 >conftest.err
20979   rm -f conftest.er1
20980   cat conftest.err >&5
20981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20982   (exit $ac_status); } && {
20983          test -z "$ac_c_werror_flag" ||
20984          test ! -s conftest.err
20985        } && test -s conftest.$ac_objext; then
20986   ac_hi=-1 ac_mid=-1
20987   while :; do
20988     cat >conftest.$ac_ext <<_ACEOF
20989 /* confdefs.h.  */
20990 _ACEOF
20991 cat confdefs.h >>conftest.$ac_ext
20992 cat >>conftest.$ac_ext <<_ACEOF
20993 /* end confdefs.h.  */
20994 $ac_includes_default
20995    typedef size_t ac__type_sizeof_;
20996 int
20997 main ()
20998 {
20999 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
21000 test_array [0] = 0
21001
21002   ;
21003   return 0;
21004 }
21005 _ACEOF
21006 rm -f conftest.$ac_objext
21007 if { (ac_try="$ac_compile"
21008 case "(($ac_try" in
21009   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21010   *) ac_try_echo=$ac_try;;
21011 esac
21012 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21013   (eval "$ac_compile") 2>conftest.er1
21014   ac_status=$?
21015   grep -v '^ *+' conftest.er1 >conftest.err
21016   rm -f conftest.er1
21017   cat conftest.err >&5
21018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21019   (exit $ac_status); } && {
21020          test -z "$ac_c_werror_flag" ||
21021          test ! -s conftest.err
21022        } && test -s conftest.$ac_objext; then
21023   ac_lo=$ac_mid; break
21024 else
21025   echo "$as_me: failed program was:" >&5
21026 sed 's/^/| /' conftest.$ac_ext >&5
21027
21028         ac_hi=`expr '(' $ac_mid ')' - 1`
21029                         if test $ac_mid -le $ac_hi; then
21030                           ac_lo= ac_hi=
21031                           break
21032                         fi
21033                         ac_mid=`expr 2 '*' $ac_mid`
21034 fi
21035
21036 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21037   done
21038 else
21039   echo "$as_me: failed program was:" >&5
21040 sed 's/^/| /' conftest.$ac_ext >&5
21041
21042         ac_lo= ac_hi=
21043 fi
21044
21045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21046 fi
21047
21048 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21049 # Binary search between lo and hi bounds.
21050 while test "x$ac_lo" != "x$ac_hi"; do
21051   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21052   cat >conftest.$ac_ext <<_ACEOF
21053 /* confdefs.h.  */
21054 _ACEOF
21055 cat confdefs.h >>conftest.$ac_ext
21056 cat >>conftest.$ac_ext <<_ACEOF
21057 /* end confdefs.h.  */
21058 $ac_includes_default
21059    typedef size_t ac__type_sizeof_;
21060 int
21061 main ()
21062 {
21063 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
21064 test_array [0] = 0
21065
21066   ;
21067   return 0;
21068 }
21069 _ACEOF
21070 rm -f conftest.$ac_objext
21071 if { (ac_try="$ac_compile"
21072 case "(($ac_try" in
21073   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21074   *) ac_try_echo=$ac_try;;
21075 esac
21076 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21077   (eval "$ac_compile") 2>conftest.er1
21078   ac_status=$?
21079   grep -v '^ *+' conftest.er1 >conftest.err
21080   rm -f conftest.er1
21081   cat conftest.err >&5
21082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21083   (exit $ac_status); } && {
21084          test -z "$ac_c_werror_flag" ||
21085          test ! -s conftest.err
21086        } && test -s conftest.$ac_objext; then
21087   ac_hi=$ac_mid
21088 else
21089   echo "$as_me: failed program was:" >&5
21090 sed 's/^/| /' conftest.$ac_ext >&5
21091
21092         ac_lo=`expr '(' $ac_mid ')' + 1`
21093 fi
21094
21095 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21096 done
21097 case $ac_lo in
21098 ?*) ac_cv_sizeof_size_t=$ac_lo;;
21099 '') if test "$ac_cv_type_size_t" = yes; then
21100      { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
21101 See \`config.log' for more details." >&5
21102 echo "$as_me: error: cannot compute sizeof (size_t)
21103 See \`config.log' for more details." >&2;}
21104    { (exit 77); exit 77; }; }
21105    else
21106      ac_cv_sizeof_size_t=0
21107    fi ;;
21108 esac
21109 else
21110   cat >conftest.$ac_ext <<_ACEOF
21111 /* confdefs.h.  */
21112 _ACEOF
21113 cat confdefs.h >>conftest.$ac_ext
21114 cat >>conftest.$ac_ext <<_ACEOF
21115 /* end confdefs.h.  */
21116 $ac_includes_default
21117    typedef size_t ac__type_sizeof_;
21118 static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
21119 static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
21120 #include <stdio.h>
21121 #include <stdlib.h>
21122 int
21123 main ()
21124 {
21125
21126   FILE *f = fopen ("conftest.val", "w");
21127   if (! f)
21128     return 1;
21129   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
21130     {
21131       long int i = longval ();
21132       if (i != ((long int) (sizeof (ac__type_sizeof_))))
21133         return 1;
21134       fprintf (f, "%ld\n", i);
21135     }
21136   else
21137     {
21138       unsigned long int i = ulongval ();
21139       if (i != ((long int) (sizeof (ac__type_sizeof_))))
21140         return 1;
21141       fprintf (f, "%lu\n", i);
21142     }
21143   return ferror (f) || fclose (f) != 0;
21144
21145   ;
21146   return 0;
21147 }
21148 _ACEOF
21149 rm -f conftest$ac_exeext
21150 if { (ac_try="$ac_link"
21151 case "(($ac_try" in
21152   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21153   *) ac_try_echo=$ac_try;;
21154 esac
21155 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21156   (eval "$ac_link") 2>&5
21157   ac_status=$?
21158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21159   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21160   { (case "(($ac_try" in
21161   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21162   *) ac_try_echo=$ac_try;;
21163 esac
21164 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21165   (eval "$ac_try") 2>&5
21166   ac_status=$?
21167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21168   (exit $ac_status); }; }; then
21169   ac_cv_sizeof_size_t=`cat conftest.val`
21170 else
21171   echo "$as_me: program exited with status $ac_status" >&5
21172 echo "$as_me: failed program was:" >&5
21173 sed 's/^/| /' conftest.$ac_ext >&5
21174
21175 ( exit $ac_status )
21176 if test "$ac_cv_type_size_t" = yes; then
21177      { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
21178 See \`config.log' for more details." >&5
21179 echo "$as_me: error: cannot compute sizeof (size_t)
21180 See \`config.log' for more details." >&2;}
21181    { (exit 77); exit 77; }; }
21182    else
21183      ac_cv_sizeof_size_t=0
21184    fi
21185 fi
21186 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21187 fi
21188 rm -f conftest.val
21189 fi
21190 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
21191 echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
21192
21193
21194
21195 cat >>confdefs.h <<_ACEOF
21196 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
21197 _ACEOF
21198
21199
21200
21201 # Decide whether float4 is passed by value: user-selectable, enabled by default
21202 { echo "$as_me:$LINENO: checking whether to build with float4 passed by value" >&5
21203 echo $ECHO_N "checking whether to build with float4 passed by value... $ECHO_C" >&6; }
21204
21205 pgac_args="$pgac_args enable_float4_byval"
21206
21207 # Check whether --enable-float4-byval was given.
21208 if test "${enable_float4_byval+set}" = set; then
21209   enableval=$enable_float4_byval;
21210   case $enableval in
21211     yes)
21212
21213 cat >>confdefs.h <<\_ACEOF
21214 #define USE_FLOAT4_BYVAL 1
21215 _ACEOF
21216
21217                float4passbyval=true
21218       ;;
21219     no)
21220       float4passbyval=false
21221       ;;
21222     *)
21223       { { echo "$as_me:$LINENO: error: no argument expected for --enable-float4-byval option" >&5
21224 echo "$as_me: error: no argument expected for --enable-float4-byval option" >&2;}
21225    { (exit 1); exit 1; }; }
21226       ;;
21227   esac
21228
21229 else
21230   enable_float4_byval=yes
21231
21232 cat >>confdefs.h <<\_ACEOF
21233 #define USE_FLOAT4_BYVAL 1
21234 _ACEOF
21235
21236                float4passbyval=true
21237 fi
21238
21239
21240 { echo "$as_me:$LINENO: result: $enable_float4_byval" >&5
21241 echo "${ECHO_T}$enable_float4_byval" >&6; }
21242
21243 cat >>confdefs.h <<_ACEOF
21244 #define FLOAT4PASSBYVAL $float4passbyval
21245 _ACEOF
21246
21247
21248 # Decide whether float8 is passed by value.
21249 # Note: this setting also controls int8 and related types such as timestamp.
21250 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
21251 # If not, trying to select it is an error.
21252 { echo "$as_me:$LINENO: checking whether to build with float8 passed by value" >&5
21253 echo $ECHO_N "checking whether to build with float8 passed by value... $ECHO_C" >&6; }
21254 if test $ac_cv_sizeof_unsigned_long -ge 8 ; then
21255
21256 pgac_args="$pgac_args enable_float8_byval"
21257
21258 # Check whether --enable-float8-byval was given.
21259 if test "${enable_float8_byval+set}" = set; then
21260   enableval=$enable_float8_byval;
21261   case $enableval in
21262     yes)
21263       :
21264       ;;
21265     no)
21266       :
21267       ;;
21268     *)
21269       { { echo "$as_me:$LINENO: error: no argument expected for --enable-float8-byval option" >&5
21270 echo "$as_me: error: no argument expected for --enable-float8-byval option" >&2;}
21271    { (exit 1); exit 1; }; }
21272       ;;
21273   esac
21274
21275 else
21276   enable_float8_byval=yes
21277
21278 fi
21279
21280
21281 else
21282
21283 pgac_args="$pgac_args enable_float8_byval"
21284
21285 # Check whether --enable-float8-byval was given.
21286 if test "${enable_float8_byval+set}" = set; then
21287   enableval=$enable_float8_byval;
21288   case $enableval in
21289     yes)
21290       :
21291       ;;
21292     no)
21293       :
21294       ;;
21295     *)
21296       { { echo "$as_me:$LINENO: error: no argument expected for --enable-float8-byval option" >&5
21297 echo "$as_me: error: no argument expected for --enable-float8-byval option" >&2;}
21298    { (exit 1); exit 1; }; }
21299       ;;
21300   esac
21301
21302 else
21303   enable_float8_byval=no
21304
21305 fi
21306
21307
21308   if test "$enable_float8_byval" = yes ; then
21309     { { echo "$as_me:$LINENO: error: --enable-float8-byval is not supported on 32-bit platforms." >&5
21310 echo "$as_me: error: --enable-float8-byval is not supported on 32-bit platforms." >&2;}
21311    { (exit 1); exit 1; }; }
21312   fi
21313 fi
21314 if test "$enable_float8_byval" = yes ; then
21315
21316 cat >>confdefs.h <<\_ACEOF
21317 #define USE_FLOAT8_BYVAL 1
21318 _ACEOF
21319
21320   float8passbyval=true
21321 else
21322   float8passbyval=false
21323 fi
21324 { echo "$as_me:$LINENO: result: $enable_float8_byval" >&5
21325 echo "${ECHO_T}$enable_float8_byval" >&6; }
21326
21327 cat >>confdefs.h <<_ACEOF
21328 #define FLOAT8PASSBYVAL $float8passbyval
21329 _ACEOF
21330
21331
21332 # Determine memory alignment requirements for the basic C data types.
21333
21334 { echo "$as_me:$LINENO: checking for short" >&5
21335 echo $ECHO_N "checking for short... $ECHO_C" >&6; }
21336 if test "${ac_cv_type_short+set}" = set; then
21337   echo $ECHO_N "(cached) $ECHO_C" >&6
21338 else
21339   cat >conftest.$ac_ext <<_ACEOF
21340 /* confdefs.h.  */
21341 _ACEOF
21342 cat confdefs.h >>conftest.$ac_ext
21343 cat >>conftest.$ac_ext <<_ACEOF
21344 /* end confdefs.h.  */
21345 $ac_includes_default
21346 typedef short ac__type_new_;
21347 int
21348 main ()
21349 {
21350 if ((ac__type_new_ *) 0)
21351   return 0;
21352 if (sizeof (ac__type_new_))
21353   return 0;
21354   ;
21355   return 0;
21356 }
21357 _ACEOF
21358 rm -f conftest.$ac_objext
21359 if { (ac_try="$ac_compile"
21360 case "(($ac_try" in
21361   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21362   *) ac_try_echo=$ac_try;;
21363 esac
21364 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21365   (eval "$ac_compile") 2>conftest.er1
21366   ac_status=$?
21367   grep -v '^ *+' conftest.er1 >conftest.err
21368   rm -f conftest.er1
21369   cat conftest.err >&5
21370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21371   (exit $ac_status); } && {
21372          test -z "$ac_c_werror_flag" ||
21373          test ! -s conftest.err
21374        } && test -s conftest.$ac_objext; then
21375   ac_cv_type_short=yes
21376 else
21377   echo "$as_me: failed program was:" >&5
21378 sed 's/^/| /' conftest.$ac_ext >&5
21379
21380         ac_cv_type_short=no
21381 fi
21382
21383 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21384 fi
21385 { echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
21386 echo "${ECHO_T}$ac_cv_type_short" >&6; }
21387
21388 # The cast to long int works around a bug in the HP C Compiler,
21389 # see AC_CHECK_SIZEOF for more information.
21390 { echo "$as_me:$LINENO: checking alignment of short" >&5
21391 echo $ECHO_N "checking alignment of short... $ECHO_C" >&6; }
21392 if test "${ac_cv_alignof_short+set}" = set; then
21393   echo $ECHO_N "(cached) $ECHO_C" >&6
21394 else
21395   if test "$cross_compiling" = yes; then
21396   # Depending upon the size, compute the lo and hi bounds.
21397 cat >conftest.$ac_ext <<_ACEOF
21398 /* confdefs.h.  */
21399 _ACEOF
21400 cat confdefs.h >>conftest.$ac_ext
21401 cat >>conftest.$ac_ext <<_ACEOF
21402 /* end confdefs.h.  */
21403 $ac_includes_default
21404 #ifndef offsetof
21405 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21406 #endif
21407 typedef struct { char x; short y; } ac__type_alignof_;
21408 int
21409 main ()
21410 {
21411 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
21412 test_array [0] = 0
21413
21414   ;
21415   return 0;
21416 }
21417 _ACEOF
21418 rm -f conftest.$ac_objext
21419 if { (ac_try="$ac_compile"
21420 case "(($ac_try" in
21421   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21422   *) ac_try_echo=$ac_try;;
21423 esac
21424 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21425   (eval "$ac_compile") 2>conftest.er1
21426   ac_status=$?
21427   grep -v '^ *+' conftest.er1 >conftest.err
21428   rm -f conftest.er1
21429   cat conftest.err >&5
21430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21431   (exit $ac_status); } && {
21432          test -z "$ac_c_werror_flag" ||
21433          test ! -s conftest.err
21434        } && test -s conftest.$ac_objext; then
21435   ac_lo=0 ac_mid=0
21436   while :; do
21437     cat >conftest.$ac_ext <<_ACEOF
21438 /* confdefs.h.  */
21439 _ACEOF
21440 cat confdefs.h >>conftest.$ac_ext
21441 cat >>conftest.$ac_ext <<_ACEOF
21442 /* end confdefs.h.  */
21443 $ac_includes_default
21444 #ifndef offsetof
21445 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21446 #endif
21447 typedef struct { char x; short y; } ac__type_alignof_;
21448 int
21449 main ()
21450 {
21451 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
21452 test_array [0] = 0
21453
21454   ;
21455   return 0;
21456 }
21457 _ACEOF
21458 rm -f conftest.$ac_objext
21459 if { (ac_try="$ac_compile"
21460 case "(($ac_try" in
21461   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21462   *) ac_try_echo=$ac_try;;
21463 esac
21464 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21465   (eval "$ac_compile") 2>conftest.er1
21466   ac_status=$?
21467   grep -v '^ *+' conftest.er1 >conftest.err
21468   rm -f conftest.er1
21469   cat conftest.err >&5
21470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21471   (exit $ac_status); } && {
21472          test -z "$ac_c_werror_flag" ||
21473          test ! -s conftest.err
21474        } && test -s conftest.$ac_objext; then
21475   ac_hi=$ac_mid; break
21476 else
21477   echo "$as_me: failed program was:" >&5
21478 sed 's/^/| /' conftest.$ac_ext >&5
21479
21480         ac_lo=`expr $ac_mid + 1`
21481                         if test $ac_lo -le $ac_mid; then
21482                           ac_lo= ac_hi=
21483                           break
21484                         fi
21485                         ac_mid=`expr 2 '*' $ac_mid + 1`
21486 fi
21487
21488 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21489   done
21490 else
21491   echo "$as_me: failed program was:" >&5
21492 sed 's/^/| /' conftest.$ac_ext >&5
21493
21494         cat >conftest.$ac_ext <<_ACEOF
21495 /* confdefs.h.  */
21496 _ACEOF
21497 cat confdefs.h >>conftest.$ac_ext
21498 cat >>conftest.$ac_ext <<_ACEOF
21499 /* end confdefs.h.  */
21500 $ac_includes_default
21501 #ifndef offsetof
21502 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21503 #endif
21504 typedef struct { char x; short y; } ac__type_alignof_;
21505 int
21506 main ()
21507 {
21508 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
21509 test_array [0] = 0
21510
21511   ;
21512   return 0;
21513 }
21514 _ACEOF
21515 rm -f conftest.$ac_objext
21516 if { (ac_try="$ac_compile"
21517 case "(($ac_try" in
21518   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21519   *) ac_try_echo=$ac_try;;
21520 esac
21521 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21522   (eval "$ac_compile") 2>conftest.er1
21523   ac_status=$?
21524   grep -v '^ *+' conftest.er1 >conftest.err
21525   rm -f conftest.er1
21526   cat conftest.err >&5
21527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21528   (exit $ac_status); } && {
21529          test -z "$ac_c_werror_flag" ||
21530          test ! -s conftest.err
21531        } && test -s conftest.$ac_objext; then
21532   ac_hi=-1 ac_mid=-1
21533   while :; do
21534     cat >conftest.$ac_ext <<_ACEOF
21535 /* confdefs.h.  */
21536 _ACEOF
21537 cat confdefs.h >>conftest.$ac_ext
21538 cat >>conftest.$ac_ext <<_ACEOF
21539 /* end confdefs.h.  */
21540 $ac_includes_default
21541 #ifndef offsetof
21542 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21543 #endif
21544 typedef struct { char x; short y; } ac__type_alignof_;
21545 int
21546 main ()
21547 {
21548 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
21549 test_array [0] = 0
21550
21551   ;
21552   return 0;
21553 }
21554 _ACEOF
21555 rm -f conftest.$ac_objext
21556 if { (ac_try="$ac_compile"
21557 case "(($ac_try" in
21558   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21559   *) ac_try_echo=$ac_try;;
21560 esac
21561 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21562   (eval "$ac_compile") 2>conftest.er1
21563   ac_status=$?
21564   grep -v '^ *+' conftest.er1 >conftest.err
21565   rm -f conftest.er1
21566   cat conftest.err >&5
21567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21568   (exit $ac_status); } && {
21569          test -z "$ac_c_werror_flag" ||
21570          test ! -s conftest.err
21571        } && test -s conftest.$ac_objext; then
21572   ac_lo=$ac_mid; break
21573 else
21574   echo "$as_me: failed program was:" >&5
21575 sed 's/^/| /' conftest.$ac_ext >&5
21576
21577         ac_hi=`expr '(' $ac_mid ')' - 1`
21578                         if test $ac_mid -le $ac_hi; then
21579                           ac_lo= ac_hi=
21580                           break
21581                         fi
21582                         ac_mid=`expr 2 '*' $ac_mid`
21583 fi
21584
21585 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21586   done
21587 else
21588   echo "$as_me: failed program was:" >&5
21589 sed 's/^/| /' conftest.$ac_ext >&5
21590
21591         ac_lo= ac_hi=
21592 fi
21593
21594 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21595 fi
21596
21597 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21598 # Binary search between lo and hi bounds.
21599 while test "x$ac_lo" != "x$ac_hi"; do
21600   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21601   cat >conftest.$ac_ext <<_ACEOF
21602 /* confdefs.h.  */
21603 _ACEOF
21604 cat confdefs.h >>conftest.$ac_ext
21605 cat >>conftest.$ac_ext <<_ACEOF
21606 /* end confdefs.h.  */
21607 $ac_includes_default
21608 #ifndef offsetof
21609 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21610 #endif
21611 typedef struct { char x; short y; } ac__type_alignof_;
21612 int
21613 main ()
21614 {
21615 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
21616 test_array [0] = 0
21617
21618   ;
21619   return 0;
21620 }
21621 _ACEOF
21622 rm -f conftest.$ac_objext
21623 if { (ac_try="$ac_compile"
21624 case "(($ac_try" in
21625   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21626   *) ac_try_echo=$ac_try;;
21627 esac
21628 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21629   (eval "$ac_compile") 2>conftest.er1
21630   ac_status=$?
21631   grep -v '^ *+' conftest.er1 >conftest.err
21632   rm -f conftest.er1
21633   cat conftest.err >&5
21634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21635   (exit $ac_status); } && {
21636          test -z "$ac_c_werror_flag" ||
21637          test ! -s conftest.err
21638        } && test -s conftest.$ac_objext; then
21639   ac_hi=$ac_mid
21640 else
21641   echo "$as_me: failed program was:" >&5
21642 sed 's/^/| /' conftest.$ac_ext >&5
21643
21644         ac_lo=`expr '(' $ac_mid ')' + 1`
21645 fi
21646
21647 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21648 done
21649 case $ac_lo in
21650 ?*) ac_cv_alignof_short=$ac_lo;;
21651 '') if test "$ac_cv_type_short" = yes; then
21652      { { echo "$as_me:$LINENO: error: cannot compute alignment of short
21653 See \`config.log' for more details." >&5
21654 echo "$as_me: error: cannot compute alignment of short
21655 See \`config.log' for more details." >&2;}
21656    { (exit 77); exit 77; }; }
21657    else
21658      ac_cv_alignof_short=0
21659    fi ;;
21660 esac
21661 else
21662   cat >conftest.$ac_ext <<_ACEOF
21663 /* confdefs.h.  */
21664 _ACEOF
21665 cat confdefs.h >>conftest.$ac_ext
21666 cat >>conftest.$ac_ext <<_ACEOF
21667 /* end confdefs.h.  */
21668 $ac_includes_default
21669 #ifndef offsetof
21670 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21671 #endif
21672 typedef struct { char x; short y; } ac__type_alignof_;
21673 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
21674 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
21675 #include <stdio.h>
21676 #include <stdlib.h>
21677 int
21678 main ()
21679 {
21680
21681   FILE *f = fopen ("conftest.val", "w");
21682   if (! f)
21683     return 1;
21684   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
21685     {
21686       long int i = longval ();
21687       if (i != ((long int) offsetof (ac__type_alignof_, y)))
21688         return 1;
21689       fprintf (f, "%ld\n", i);
21690     }
21691   else
21692     {
21693       unsigned long int i = ulongval ();
21694       if (i != ((long int) offsetof (ac__type_alignof_, y)))
21695         return 1;
21696       fprintf (f, "%lu\n", i);
21697     }
21698   return ferror (f) || fclose (f) != 0;
21699
21700   ;
21701   return 0;
21702 }
21703 _ACEOF
21704 rm -f conftest$ac_exeext
21705 if { (ac_try="$ac_link"
21706 case "(($ac_try" in
21707   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21708   *) ac_try_echo=$ac_try;;
21709 esac
21710 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21711   (eval "$ac_link") 2>&5
21712   ac_status=$?
21713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21714   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21715   { (case "(($ac_try" in
21716   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21717   *) ac_try_echo=$ac_try;;
21718 esac
21719 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21720   (eval "$ac_try") 2>&5
21721   ac_status=$?
21722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21723   (exit $ac_status); }; }; then
21724   ac_cv_alignof_short=`cat conftest.val`
21725 else
21726   echo "$as_me: program exited with status $ac_status" >&5
21727 echo "$as_me: failed program was:" >&5
21728 sed 's/^/| /' conftest.$ac_ext >&5
21729
21730 ( exit $ac_status )
21731 if test "$ac_cv_type_short" = yes; then
21732      { { echo "$as_me:$LINENO: error: cannot compute alignment of short
21733 See \`config.log' for more details." >&5
21734 echo "$as_me: error: cannot compute alignment of short
21735 See \`config.log' for more details." >&2;}
21736    { (exit 77); exit 77; }; }
21737    else
21738      ac_cv_alignof_short=0
21739    fi
21740 fi
21741 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21742 fi
21743 rm -f conftest.val
21744 fi
21745 { echo "$as_me:$LINENO: result: $ac_cv_alignof_short" >&5
21746 echo "${ECHO_T}$ac_cv_alignof_short" >&6; }
21747
21748
21749
21750 cat >>confdefs.h <<_ACEOF
21751 #define ALIGNOF_SHORT $ac_cv_alignof_short
21752 _ACEOF
21753
21754
21755 { echo "$as_me:$LINENO: checking for int" >&5
21756 echo $ECHO_N "checking for int... $ECHO_C" >&6; }
21757 if test "${ac_cv_type_int+set}" = set; then
21758   echo $ECHO_N "(cached) $ECHO_C" >&6
21759 else
21760   cat >conftest.$ac_ext <<_ACEOF
21761 /* confdefs.h.  */
21762 _ACEOF
21763 cat confdefs.h >>conftest.$ac_ext
21764 cat >>conftest.$ac_ext <<_ACEOF
21765 /* end confdefs.h.  */
21766 $ac_includes_default
21767 typedef int ac__type_new_;
21768 int
21769 main ()
21770 {
21771 if ((ac__type_new_ *) 0)
21772   return 0;
21773 if (sizeof (ac__type_new_))
21774   return 0;
21775   ;
21776   return 0;
21777 }
21778 _ACEOF
21779 rm -f conftest.$ac_objext
21780 if { (ac_try="$ac_compile"
21781 case "(($ac_try" in
21782   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21783   *) ac_try_echo=$ac_try;;
21784 esac
21785 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21786   (eval "$ac_compile") 2>conftest.er1
21787   ac_status=$?
21788   grep -v '^ *+' conftest.er1 >conftest.err
21789   rm -f conftest.er1
21790   cat conftest.err >&5
21791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21792   (exit $ac_status); } && {
21793          test -z "$ac_c_werror_flag" ||
21794          test ! -s conftest.err
21795        } && test -s conftest.$ac_objext; then
21796   ac_cv_type_int=yes
21797 else
21798   echo "$as_me: failed program was:" >&5
21799 sed 's/^/| /' conftest.$ac_ext >&5
21800
21801         ac_cv_type_int=no
21802 fi
21803
21804 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21805 fi
21806 { echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
21807 echo "${ECHO_T}$ac_cv_type_int" >&6; }
21808
21809 # The cast to long int works around a bug in the HP C Compiler,
21810 # see AC_CHECK_SIZEOF for more information.
21811 { echo "$as_me:$LINENO: checking alignment of int" >&5
21812 echo $ECHO_N "checking alignment of int... $ECHO_C" >&6; }
21813 if test "${ac_cv_alignof_int+set}" = set; then
21814   echo $ECHO_N "(cached) $ECHO_C" >&6
21815 else
21816   if test "$cross_compiling" = yes; then
21817   # Depending upon the size, compute the lo and hi bounds.
21818 cat >conftest.$ac_ext <<_ACEOF
21819 /* confdefs.h.  */
21820 _ACEOF
21821 cat confdefs.h >>conftest.$ac_ext
21822 cat >>conftest.$ac_ext <<_ACEOF
21823 /* end confdefs.h.  */
21824 $ac_includes_default
21825 #ifndef offsetof
21826 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21827 #endif
21828 typedef struct { char x; int y; } ac__type_alignof_;
21829 int
21830 main ()
21831 {
21832 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
21833 test_array [0] = 0
21834
21835   ;
21836   return 0;
21837 }
21838 _ACEOF
21839 rm -f conftest.$ac_objext
21840 if { (ac_try="$ac_compile"
21841 case "(($ac_try" in
21842   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21843   *) ac_try_echo=$ac_try;;
21844 esac
21845 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21846   (eval "$ac_compile") 2>conftest.er1
21847   ac_status=$?
21848   grep -v '^ *+' conftest.er1 >conftest.err
21849   rm -f conftest.er1
21850   cat conftest.err >&5
21851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21852   (exit $ac_status); } && {
21853          test -z "$ac_c_werror_flag" ||
21854          test ! -s conftest.err
21855        } && test -s conftest.$ac_objext; then
21856   ac_lo=0 ac_mid=0
21857   while :; do
21858     cat >conftest.$ac_ext <<_ACEOF
21859 /* confdefs.h.  */
21860 _ACEOF
21861 cat confdefs.h >>conftest.$ac_ext
21862 cat >>conftest.$ac_ext <<_ACEOF
21863 /* end confdefs.h.  */
21864 $ac_includes_default
21865 #ifndef offsetof
21866 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21867 #endif
21868 typedef struct { char x; int y; } ac__type_alignof_;
21869 int
21870 main ()
21871 {
21872 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
21873 test_array [0] = 0
21874
21875   ;
21876   return 0;
21877 }
21878 _ACEOF
21879 rm -f conftest.$ac_objext
21880 if { (ac_try="$ac_compile"
21881 case "(($ac_try" in
21882   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21883   *) ac_try_echo=$ac_try;;
21884 esac
21885 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21886   (eval "$ac_compile") 2>conftest.er1
21887   ac_status=$?
21888   grep -v '^ *+' conftest.er1 >conftest.err
21889   rm -f conftest.er1
21890   cat conftest.err >&5
21891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21892   (exit $ac_status); } && {
21893          test -z "$ac_c_werror_flag" ||
21894          test ! -s conftest.err
21895        } && test -s conftest.$ac_objext; then
21896   ac_hi=$ac_mid; break
21897 else
21898   echo "$as_me: failed program was:" >&5
21899 sed 's/^/| /' conftest.$ac_ext >&5
21900
21901         ac_lo=`expr $ac_mid + 1`
21902                         if test $ac_lo -le $ac_mid; then
21903                           ac_lo= ac_hi=
21904                           break
21905                         fi
21906                         ac_mid=`expr 2 '*' $ac_mid + 1`
21907 fi
21908
21909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21910   done
21911 else
21912   echo "$as_me: failed program was:" >&5
21913 sed 's/^/| /' conftest.$ac_ext >&5
21914
21915         cat >conftest.$ac_ext <<_ACEOF
21916 /* confdefs.h.  */
21917 _ACEOF
21918 cat confdefs.h >>conftest.$ac_ext
21919 cat >>conftest.$ac_ext <<_ACEOF
21920 /* end confdefs.h.  */
21921 $ac_includes_default
21922 #ifndef offsetof
21923 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21924 #endif
21925 typedef struct { char x; int y; } ac__type_alignof_;
21926 int
21927 main ()
21928 {
21929 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
21930 test_array [0] = 0
21931
21932   ;
21933   return 0;
21934 }
21935 _ACEOF
21936 rm -f conftest.$ac_objext
21937 if { (ac_try="$ac_compile"
21938 case "(($ac_try" in
21939   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21940   *) ac_try_echo=$ac_try;;
21941 esac
21942 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21943   (eval "$ac_compile") 2>conftest.er1
21944   ac_status=$?
21945   grep -v '^ *+' conftest.er1 >conftest.err
21946   rm -f conftest.er1
21947   cat conftest.err >&5
21948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21949   (exit $ac_status); } && {
21950          test -z "$ac_c_werror_flag" ||
21951          test ! -s conftest.err
21952        } && test -s conftest.$ac_objext; then
21953   ac_hi=-1 ac_mid=-1
21954   while :; do
21955     cat >conftest.$ac_ext <<_ACEOF
21956 /* confdefs.h.  */
21957 _ACEOF
21958 cat confdefs.h >>conftest.$ac_ext
21959 cat >>conftest.$ac_ext <<_ACEOF
21960 /* end confdefs.h.  */
21961 $ac_includes_default
21962 #ifndef offsetof
21963 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21964 #endif
21965 typedef struct { char x; int y; } ac__type_alignof_;
21966 int
21967 main ()
21968 {
21969 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
21970 test_array [0] = 0
21971
21972   ;
21973   return 0;
21974 }
21975 _ACEOF
21976 rm -f conftest.$ac_objext
21977 if { (ac_try="$ac_compile"
21978 case "(($ac_try" in
21979   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21980   *) ac_try_echo=$ac_try;;
21981 esac
21982 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21983   (eval "$ac_compile") 2>conftest.er1
21984   ac_status=$?
21985   grep -v '^ *+' conftest.er1 >conftest.err
21986   rm -f conftest.er1
21987   cat conftest.err >&5
21988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21989   (exit $ac_status); } && {
21990          test -z "$ac_c_werror_flag" ||
21991          test ! -s conftest.err
21992        } && test -s conftest.$ac_objext; then
21993   ac_lo=$ac_mid; break
21994 else
21995   echo "$as_me: failed program was:" >&5
21996 sed 's/^/| /' conftest.$ac_ext >&5
21997
21998         ac_hi=`expr '(' $ac_mid ')' - 1`
21999                         if test $ac_mid -le $ac_hi; then
22000                           ac_lo= ac_hi=
22001                           break
22002                         fi
22003                         ac_mid=`expr 2 '*' $ac_mid`
22004 fi
22005
22006 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22007   done
22008 else
22009   echo "$as_me: failed program was:" >&5
22010 sed 's/^/| /' conftest.$ac_ext >&5
22011
22012         ac_lo= ac_hi=
22013 fi
22014
22015 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22016 fi
22017
22018 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22019 # Binary search between lo and hi bounds.
22020 while test "x$ac_lo" != "x$ac_hi"; do
22021   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22022   cat >conftest.$ac_ext <<_ACEOF
22023 /* confdefs.h.  */
22024 _ACEOF
22025 cat confdefs.h >>conftest.$ac_ext
22026 cat >>conftest.$ac_ext <<_ACEOF
22027 /* end confdefs.h.  */
22028 $ac_includes_default
22029 #ifndef offsetof
22030 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22031 #endif
22032 typedef struct { char x; int y; } ac__type_alignof_;
22033 int
22034 main ()
22035 {
22036 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
22037 test_array [0] = 0
22038
22039   ;
22040   return 0;
22041 }
22042 _ACEOF
22043 rm -f conftest.$ac_objext
22044 if { (ac_try="$ac_compile"
22045 case "(($ac_try" in
22046   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22047   *) ac_try_echo=$ac_try;;
22048 esac
22049 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22050   (eval "$ac_compile") 2>conftest.er1
22051   ac_status=$?
22052   grep -v '^ *+' conftest.er1 >conftest.err
22053   rm -f conftest.er1
22054   cat conftest.err >&5
22055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22056   (exit $ac_status); } && {
22057          test -z "$ac_c_werror_flag" ||
22058          test ! -s conftest.err
22059        } && test -s conftest.$ac_objext; then
22060   ac_hi=$ac_mid
22061 else
22062   echo "$as_me: failed program was:" >&5
22063 sed 's/^/| /' conftest.$ac_ext >&5
22064
22065         ac_lo=`expr '(' $ac_mid ')' + 1`
22066 fi
22067
22068 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22069 done
22070 case $ac_lo in
22071 ?*) ac_cv_alignof_int=$ac_lo;;
22072 '') if test "$ac_cv_type_int" = yes; then
22073      { { echo "$as_me:$LINENO: error: cannot compute alignment of int
22074 See \`config.log' for more details." >&5
22075 echo "$as_me: error: cannot compute alignment of int
22076 See \`config.log' for more details." >&2;}
22077    { (exit 77); exit 77; }; }
22078    else
22079      ac_cv_alignof_int=0
22080    fi ;;
22081 esac
22082 else
22083   cat >conftest.$ac_ext <<_ACEOF
22084 /* confdefs.h.  */
22085 _ACEOF
22086 cat confdefs.h >>conftest.$ac_ext
22087 cat >>conftest.$ac_ext <<_ACEOF
22088 /* end confdefs.h.  */
22089 $ac_includes_default
22090 #ifndef offsetof
22091 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22092 #endif
22093 typedef struct { char x; int y; } ac__type_alignof_;
22094 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
22095 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
22096 #include <stdio.h>
22097 #include <stdlib.h>
22098 int
22099 main ()
22100 {
22101
22102   FILE *f = fopen ("conftest.val", "w");
22103   if (! f)
22104     return 1;
22105   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
22106     {
22107       long int i = longval ();
22108       if (i != ((long int) offsetof (ac__type_alignof_, y)))
22109         return 1;
22110       fprintf (f, "%ld\n", i);
22111     }
22112   else
22113     {
22114       unsigned long int i = ulongval ();
22115       if (i != ((long int) offsetof (ac__type_alignof_, y)))
22116         return 1;
22117       fprintf (f, "%lu\n", i);
22118     }
22119   return ferror (f) || fclose (f) != 0;
22120
22121   ;
22122   return 0;
22123 }
22124 _ACEOF
22125 rm -f conftest$ac_exeext
22126 if { (ac_try="$ac_link"
22127 case "(($ac_try" in
22128   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22129   *) ac_try_echo=$ac_try;;
22130 esac
22131 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22132   (eval "$ac_link") 2>&5
22133   ac_status=$?
22134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22135   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22136   { (case "(($ac_try" in
22137   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22138   *) ac_try_echo=$ac_try;;
22139 esac
22140 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22141   (eval "$ac_try") 2>&5
22142   ac_status=$?
22143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22144   (exit $ac_status); }; }; then
22145   ac_cv_alignof_int=`cat conftest.val`
22146 else
22147   echo "$as_me: program exited with status $ac_status" >&5
22148 echo "$as_me: failed program was:" >&5
22149 sed 's/^/| /' conftest.$ac_ext >&5
22150
22151 ( exit $ac_status )
22152 if test "$ac_cv_type_int" = yes; then
22153      { { echo "$as_me:$LINENO: error: cannot compute alignment of int
22154 See \`config.log' for more details." >&5
22155 echo "$as_me: error: cannot compute alignment of int
22156 See \`config.log' for more details." >&2;}
22157    { (exit 77); exit 77; }; }
22158    else
22159      ac_cv_alignof_int=0
22160    fi
22161 fi
22162 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22163 fi
22164 rm -f conftest.val
22165 fi
22166 { echo "$as_me:$LINENO: result: $ac_cv_alignof_int" >&5
22167 echo "${ECHO_T}$ac_cv_alignof_int" >&6; }
22168
22169
22170
22171 cat >>confdefs.h <<_ACEOF
22172 #define ALIGNOF_INT $ac_cv_alignof_int
22173 _ACEOF
22174
22175
22176 { echo "$as_me:$LINENO: checking for long" >&5
22177 echo $ECHO_N "checking for long... $ECHO_C" >&6; }
22178 if test "${ac_cv_type_long+set}" = set; then
22179   echo $ECHO_N "(cached) $ECHO_C" >&6
22180 else
22181   cat >conftest.$ac_ext <<_ACEOF
22182 /* confdefs.h.  */
22183 _ACEOF
22184 cat confdefs.h >>conftest.$ac_ext
22185 cat >>conftest.$ac_ext <<_ACEOF
22186 /* end confdefs.h.  */
22187 $ac_includes_default
22188 typedef long ac__type_new_;
22189 int
22190 main ()
22191 {
22192 if ((ac__type_new_ *) 0)
22193   return 0;
22194 if (sizeof (ac__type_new_))
22195   return 0;
22196   ;
22197   return 0;
22198 }
22199 _ACEOF
22200 rm -f conftest.$ac_objext
22201 if { (ac_try="$ac_compile"
22202 case "(($ac_try" in
22203   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22204   *) ac_try_echo=$ac_try;;
22205 esac
22206 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22207   (eval "$ac_compile") 2>conftest.er1
22208   ac_status=$?
22209   grep -v '^ *+' conftest.er1 >conftest.err
22210   rm -f conftest.er1
22211   cat conftest.err >&5
22212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22213   (exit $ac_status); } && {
22214          test -z "$ac_c_werror_flag" ||
22215          test ! -s conftest.err
22216        } && test -s conftest.$ac_objext; then
22217   ac_cv_type_long=yes
22218 else
22219   echo "$as_me: failed program was:" >&5
22220 sed 's/^/| /' conftest.$ac_ext >&5
22221
22222         ac_cv_type_long=no
22223 fi
22224
22225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22226 fi
22227 { echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
22228 echo "${ECHO_T}$ac_cv_type_long" >&6; }
22229
22230 # The cast to long int works around a bug in the HP C Compiler,
22231 # see AC_CHECK_SIZEOF for more information.
22232 { echo "$as_me:$LINENO: checking alignment of long" >&5
22233 echo $ECHO_N "checking alignment of long... $ECHO_C" >&6; }
22234 if test "${ac_cv_alignof_long+set}" = set; then
22235   echo $ECHO_N "(cached) $ECHO_C" >&6
22236 else
22237   if test "$cross_compiling" = yes; then
22238   # Depending upon the size, compute the lo and hi bounds.
22239 cat >conftest.$ac_ext <<_ACEOF
22240 /* confdefs.h.  */
22241 _ACEOF
22242 cat confdefs.h >>conftest.$ac_ext
22243 cat >>conftest.$ac_ext <<_ACEOF
22244 /* end confdefs.h.  */
22245 $ac_includes_default
22246 #ifndef offsetof
22247 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22248 #endif
22249 typedef struct { char x; long y; } ac__type_alignof_;
22250 int
22251 main ()
22252 {
22253 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
22254 test_array [0] = 0
22255
22256   ;
22257   return 0;
22258 }
22259 _ACEOF
22260 rm -f conftest.$ac_objext
22261 if { (ac_try="$ac_compile"
22262 case "(($ac_try" in
22263   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22264   *) ac_try_echo=$ac_try;;
22265 esac
22266 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22267   (eval "$ac_compile") 2>conftest.er1
22268   ac_status=$?
22269   grep -v '^ *+' conftest.er1 >conftest.err
22270   rm -f conftest.er1
22271   cat conftest.err >&5
22272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22273   (exit $ac_status); } && {
22274          test -z "$ac_c_werror_flag" ||
22275          test ! -s conftest.err
22276        } && test -s conftest.$ac_objext; then
22277   ac_lo=0 ac_mid=0
22278   while :; do
22279     cat >conftest.$ac_ext <<_ACEOF
22280 /* confdefs.h.  */
22281 _ACEOF
22282 cat confdefs.h >>conftest.$ac_ext
22283 cat >>conftest.$ac_ext <<_ACEOF
22284 /* end confdefs.h.  */
22285 $ac_includes_default
22286 #ifndef offsetof
22287 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22288 #endif
22289 typedef struct { char x; long y; } ac__type_alignof_;
22290 int
22291 main ()
22292 {
22293 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
22294 test_array [0] = 0
22295
22296   ;
22297   return 0;
22298 }
22299 _ACEOF
22300 rm -f conftest.$ac_objext
22301 if { (ac_try="$ac_compile"
22302 case "(($ac_try" in
22303   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22304   *) ac_try_echo=$ac_try;;
22305 esac
22306 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22307   (eval "$ac_compile") 2>conftest.er1
22308   ac_status=$?
22309   grep -v '^ *+' conftest.er1 >conftest.err
22310   rm -f conftest.er1
22311   cat conftest.err >&5
22312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22313   (exit $ac_status); } && {
22314          test -z "$ac_c_werror_flag" ||
22315          test ! -s conftest.err
22316        } && test -s conftest.$ac_objext; then
22317   ac_hi=$ac_mid; break
22318 else
22319   echo "$as_me: failed program was:" >&5
22320 sed 's/^/| /' conftest.$ac_ext >&5
22321
22322         ac_lo=`expr $ac_mid + 1`
22323                         if test $ac_lo -le $ac_mid; then
22324                           ac_lo= ac_hi=
22325                           break
22326                         fi
22327                         ac_mid=`expr 2 '*' $ac_mid + 1`
22328 fi
22329
22330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22331   done
22332 else
22333   echo "$as_me: failed program was:" >&5
22334 sed 's/^/| /' conftest.$ac_ext >&5
22335
22336         cat >conftest.$ac_ext <<_ACEOF
22337 /* confdefs.h.  */
22338 _ACEOF
22339 cat confdefs.h >>conftest.$ac_ext
22340 cat >>conftest.$ac_ext <<_ACEOF
22341 /* end confdefs.h.  */
22342 $ac_includes_default
22343 #ifndef offsetof
22344 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22345 #endif
22346 typedef struct { char x; long y; } ac__type_alignof_;
22347 int
22348 main ()
22349 {
22350 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
22351 test_array [0] = 0
22352
22353   ;
22354   return 0;
22355 }
22356 _ACEOF
22357 rm -f conftest.$ac_objext
22358 if { (ac_try="$ac_compile"
22359 case "(($ac_try" in
22360   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22361   *) ac_try_echo=$ac_try;;
22362 esac
22363 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22364   (eval "$ac_compile") 2>conftest.er1
22365   ac_status=$?
22366   grep -v '^ *+' conftest.er1 >conftest.err
22367   rm -f conftest.er1
22368   cat conftest.err >&5
22369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22370   (exit $ac_status); } && {
22371          test -z "$ac_c_werror_flag" ||
22372          test ! -s conftest.err
22373        } && test -s conftest.$ac_objext; then
22374   ac_hi=-1 ac_mid=-1
22375   while :; do
22376     cat >conftest.$ac_ext <<_ACEOF
22377 /* confdefs.h.  */
22378 _ACEOF
22379 cat confdefs.h >>conftest.$ac_ext
22380 cat >>conftest.$ac_ext <<_ACEOF
22381 /* end confdefs.h.  */
22382 $ac_includes_default
22383 #ifndef offsetof
22384 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22385 #endif
22386 typedef struct { char x; long y; } ac__type_alignof_;
22387 int
22388 main ()
22389 {
22390 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
22391 test_array [0] = 0
22392
22393   ;
22394   return 0;
22395 }
22396 _ACEOF
22397 rm -f conftest.$ac_objext
22398 if { (ac_try="$ac_compile"
22399 case "(($ac_try" in
22400   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22401   *) ac_try_echo=$ac_try;;
22402 esac
22403 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22404   (eval "$ac_compile") 2>conftest.er1
22405   ac_status=$?
22406   grep -v '^ *+' conftest.er1 >conftest.err
22407   rm -f conftest.er1
22408   cat conftest.err >&5
22409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22410   (exit $ac_status); } && {
22411          test -z "$ac_c_werror_flag" ||
22412          test ! -s conftest.err
22413        } && test -s conftest.$ac_objext; then
22414   ac_lo=$ac_mid; break
22415 else
22416   echo "$as_me: failed program was:" >&5
22417 sed 's/^/| /' conftest.$ac_ext >&5
22418
22419         ac_hi=`expr '(' $ac_mid ')' - 1`
22420                         if test $ac_mid -le $ac_hi; then
22421                           ac_lo= ac_hi=
22422                           break
22423                         fi
22424                         ac_mid=`expr 2 '*' $ac_mid`
22425 fi
22426
22427 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22428   done
22429 else
22430   echo "$as_me: failed program was:" >&5
22431 sed 's/^/| /' conftest.$ac_ext >&5
22432
22433         ac_lo= ac_hi=
22434 fi
22435
22436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22437 fi
22438
22439 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22440 # Binary search between lo and hi bounds.
22441 while test "x$ac_lo" != "x$ac_hi"; do
22442   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22443   cat >conftest.$ac_ext <<_ACEOF
22444 /* confdefs.h.  */
22445 _ACEOF
22446 cat confdefs.h >>conftest.$ac_ext
22447 cat >>conftest.$ac_ext <<_ACEOF
22448 /* end confdefs.h.  */
22449 $ac_includes_default
22450 #ifndef offsetof
22451 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22452 #endif
22453 typedef struct { char x; long y; } ac__type_alignof_;
22454 int
22455 main ()
22456 {
22457 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
22458 test_array [0] = 0
22459
22460   ;
22461   return 0;
22462 }
22463 _ACEOF
22464 rm -f conftest.$ac_objext
22465 if { (ac_try="$ac_compile"
22466 case "(($ac_try" in
22467   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22468   *) ac_try_echo=$ac_try;;
22469 esac
22470 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22471   (eval "$ac_compile") 2>conftest.er1
22472   ac_status=$?
22473   grep -v '^ *+' conftest.er1 >conftest.err
22474   rm -f conftest.er1
22475   cat conftest.err >&5
22476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22477   (exit $ac_status); } && {
22478          test -z "$ac_c_werror_flag" ||
22479          test ! -s conftest.err
22480        } && test -s conftest.$ac_objext; then
22481   ac_hi=$ac_mid
22482 else
22483   echo "$as_me: failed program was:" >&5
22484 sed 's/^/| /' conftest.$ac_ext >&5
22485
22486         ac_lo=`expr '(' $ac_mid ')' + 1`
22487 fi
22488
22489 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22490 done
22491 case $ac_lo in
22492 ?*) ac_cv_alignof_long=$ac_lo;;
22493 '') if test "$ac_cv_type_long" = yes; then
22494      { { echo "$as_me:$LINENO: error: cannot compute alignment of long
22495 See \`config.log' for more details." >&5
22496 echo "$as_me: error: cannot compute alignment of long
22497 See \`config.log' for more details." >&2;}
22498    { (exit 77); exit 77; }; }
22499    else
22500      ac_cv_alignof_long=0
22501    fi ;;
22502 esac
22503 else
22504   cat >conftest.$ac_ext <<_ACEOF
22505 /* confdefs.h.  */
22506 _ACEOF
22507 cat confdefs.h >>conftest.$ac_ext
22508 cat >>conftest.$ac_ext <<_ACEOF
22509 /* end confdefs.h.  */
22510 $ac_includes_default
22511 #ifndef offsetof
22512 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22513 #endif
22514 typedef struct { char x; long y; } ac__type_alignof_;
22515 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
22516 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
22517 #include <stdio.h>
22518 #include <stdlib.h>
22519 int
22520 main ()
22521 {
22522
22523   FILE *f = fopen ("conftest.val", "w");
22524   if (! f)
22525     return 1;
22526   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
22527     {
22528       long int i = longval ();
22529       if (i != ((long int) offsetof (ac__type_alignof_, y)))
22530         return 1;
22531       fprintf (f, "%ld\n", i);
22532     }
22533   else
22534     {
22535       unsigned long int i = ulongval ();
22536       if (i != ((long int) offsetof (ac__type_alignof_, y)))
22537         return 1;
22538       fprintf (f, "%lu\n", i);
22539     }
22540   return ferror (f) || fclose (f) != 0;
22541
22542   ;
22543   return 0;
22544 }
22545 _ACEOF
22546 rm -f conftest$ac_exeext
22547 if { (ac_try="$ac_link"
22548 case "(($ac_try" in
22549   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22550   *) ac_try_echo=$ac_try;;
22551 esac
22552 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22553   (eval "$ac_link") 2>&5
22554   ac_status=$?
22555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22556   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22557   { (case "(($ac_try" in
22558   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22559   *) ac_try_echo=$ac_try;;
22560 esac
22561 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22562   (eval "$ac_try") 2>&5
22563   ac_status=$?
22564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22565   (exit $ac_status); }; }; then
22566   ac_cv_alignof_long=`cat conftest.val`
22567 else
22568   echo "$as_me: program exited with status $ac_status" >&5
22569 echo "$as_me: failed program was:" >&5
22570 sed 's/^/| /' conftest.$ac_ext >&5
22571
22572 ( exit $ac_status )
22573 if test "$ac_cv_type_long" = yes; then
22574      { { echo "$as_me:$LINENO: error: cannot compute alignment of long
22575 See \`config.log' for more details." >&5
22576 echo "$as_me: error: cannot compute alignment of long
22577 See \`config.log' for more details." >&2;}
22578    { (exit 77); exit 77; }; }
22579    else
22580      ac_cv_alignof_long=0
22581    fi
22582 fi
22583 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22584 fi
22585 rm -f conftest.val
22586 fi
22587 { echo "$as_me:$LINENO: result: $ac_cv_alignof_long" >&5
22588 echo "${ECHO_T}$ac_cv_alignof_long" >&6; }
22589
22590
22591
22592 cat >>confdefs.h <<_ACEOF
22593 #define ALIGNOF_LONG $ac_cv_alignof_long
22594 _ACEOF
22595
22596
22597 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
22598   { echo "$as_me:$LINENO: checking for long long int" >&5
22599 echo $ECHO_N "checking for long long int... $ECHO_C" >&6; }
22600 if test "${ac_cv_type_long_long_int+set}" = set; then
22601   echo $ECHO_N "(cached) $ECHO_C" >&6
22602 else
22603   cat >conftest.$ac_ext <<_ACEOF
22604 /* confdefs.h.  */
22605 _ACEOF
22606 cat confdefs.h >>conftest.$ac_ext
22607 cat >>conftest.$ac_ext <<_ACEOF
22608 /* end confdefs.h.  */
22609 $ac_includes_default
22610 typedef long long int ac__type_new_;
22611 int
22612 main ()
22613 {
22614 if ((ac__type_new_ *) 0)
22615   return 0;
22616 if (sizeof (ac__type_new_))
22617   return 0;
22618   ;
22619   return 0;
22620 }
22621 _ACEOF
22622 rm -f conftest.$ac_objext
22623 if { (ac_try="$ac_compile"
22624 case "(($ac_try" in
22625   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22626   *) ac_try_echo=$ac_try;;
22627 esac
22628 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22629   (eval "$ac_compile") 2>conftest.er1
22630   ac_status=$?
22631   grep -v '^ *+' conftest.er1 >conftest.err
22632   rm -f conftest.er1
22633   cat conftest.err >&5
22634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22635   (exit $ac_status); } && {
22636          test -z "$ac_c_werror_flag" ||
22637          test ! -s conftest.err
22638        } && test -s conftest.$ac_objext; then
22639   ac_cv_type_long_long_int=yes
22640 else
22641   echo "$as_me: failed program was:" >&5
22642 sed 's/^/| /' conftest.$ac_ext >&5
22643
22644         ac_cv_type_long_long_int=no
22645 fi
22646
22647 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22648 fi
22649 { echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
22650 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6; }
22651
22652 # The cast to long int works around a bug in the HP C Compiler,
22653 # see AC_CHECK_SIZEOF for more information.
22654 { echo "$as_me:$LINENO: checking alignment of long long int" >&5
22655 echo $ECHO_N "checking alignment of long long int... $ECHO_C" >&6; }
22656 if test "${ac_cv_alignof_long_long_int+set}" = set; then
22657   echo $ECHO_N "(cached) $ECHO_C" >&6
22658 else
22659   if test "$cross_compiling" = yes; then
22660   # Depending upon the size, compute the lo and hi bounds.
22661 cat >conftest.$ac_ext <<_ACEOF
22662 /* confdefs.h.  */
22663 _ACEOF
22664 cat confdefs.h >>conftest.$ac_ext
22665 cat >>conftest.$ac_ext <<_ACEOF
22666 /* end confdefs.h.  */
22667 $ac_includes_default
22668 #ifndef offsetof
22669 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22670 #endif
22671 typedef struct { char x; long long int y; } ac__type_alignof_;
22672 int
22673 main ()
22674 {
22675 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
22676 test_array [0] = 0
22677
22678   ;
22679   return 0;
22680 }
22681 _ACEOF
22682 rm -f conftest.$ac_objext
22683 if { (ac_try="$ac_compile"
22684 case "(($ac_try" in
22685   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22686   *) ac_try_echo=$ac_try;;
22687 esac
22688 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22689   (eval "$ac_compile") 2>conftest.er1
22690   ac_status=$?
22691   grep -v '^ *+' conftest.er1 >conftest.err
22692   rm -f conftest.er1
22693   cat conftest.err >&5
22694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22695   (exit $ac_status); } && {
22696          test -z "$ac_c_werror_flag" ||
22697          test ! -s conftest.err
22698        } && test -s conftest.$ac_objext; then
22699   ac_lo=0 ac_mid=0
22700   while :; do
22701     cat >conftest.$ac_ext <<_ACEOF
22702 /* confdefs.h.  */
22703 _ACEOF
22704 cat confdefs.h >>conftest.$ac_ext
22705 cat >>conftest.$ac_ext <<_ACEOF
22706 /* end confdefs.h.  */
22707 $ac_includes_default
22708 #ifndef offsetof
22709 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22710 #endif
22711 typedef struct { char x; long long int y; } ac__type_alignof_;
22712 int
22713 main ()
22714 {
22715 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
22716 test_array [0] = 0
22717
22718   ;
22719   return 0;
22720 }
22721 _ACEOF
22722 rm -f conftest.$ac_objext
22723 if { (ac_try="$ac_compile"
22724 case "(($ac_try" in
22725   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22726   *) ac_try_echo=$ac_try;;
22727 esac
22728 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22729   (eval "$ac_compile") 2>conftest.er1
22730   ac_status=$?
22731   grep -v '^ *+' conftest.er1 >conftest.err
22732   rm -f conftest.er1
22733   cat conftest.err >&5
22734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22735   (exit $ac_status); } && {
22736          test -z "$ac_c_werror_flag" ||
22737          test ! -s conftest.err
22738        } && test -s conftest.$ac_objext; then
22739   ac_hi=$ac_mid; break
22740 else
22741   echo "$as_me: failed program was:" >&5
22742 sed 's/^/| /' conftest.$ac_ext >&5
22743
22744         ac_lo=`expr $ac_mid + 1`
22745                         if test $ac_lo -le $ac_mid; then
22746                           ac_lo= ac_hi=
22747                           break
22748                         fi
22749                         ac_mid=`expr 2 '*' $ac_mid + 1`
22750 fi
22751
22752 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22753   done
22754 else
22755   echo "$as_me: failed program was:" >&5
22756 sed 's/^/| /' conftest.$ac_ext >&5
22757
22758         cat >conftest.$ac_ext <<_ACEOF
22759 /* confdefs.h.  */
22760 _ACEOF
22761 cat confdefs.h >>conftest.$ac_ext
22762 cat >>conftest.$ac_ext <<_ACEOF
22763 /* end confdefs.h.  */
22764 $ac_includes_default
22765 #ifndef offsetof
22766 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22767 #endif
22768 typedef struct { char x; long long int y; } ac__type_alignof_;
22769 int
22770 main ()
22771 {
22772 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
22773 test_array [0] = 0
22774
22775   ;
22776   return 0;
22777 }
22778 _ACEOF
22779 rm -f conftest.$ac_objext
22780 if { (ac_try="$ac_compile"
22781 case "(($ac_try" in
22782   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22783   *) ac_try_echo=$ac_try;;
22784 esac
22785 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22786   (eval "$ac_compile") 2>conftest.er1
22787   ac_status=$?
22788   grep -v '^ *+' conftest.er1 >conftest.err
22789   rm -f conftest.er1
22790   cat conftest.err >&5
22791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22792   (exit $ac_status); } && {
22793          test -z "$ac_c_werror_flag" ||
22794          test ! -s conftest.err
22795        } && test -s conftest.$ac_objext; then
22796   ac_hi=-1 ac_mid=-1
22797   while :; do
22798     cat >conftest.$ac_ext <<_ACEOF
22799 /* confdefs.h.  */
22800 _ACEOF
22801 cat confdefs.h >>conftest.$ac_ext
22802 cat >>conftest.$ac_ext <<_ACEOF
22803 /* end confdefs.h.  */
22804 $ac_includes_default
22805 #ifndef offsetof
22806 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22807 #endif
22808 typedef struct { char x; long long int y; } ac__type_alignof_;
22809 int
22810 main ()
22811 {
22812 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
22813 test_array [0] = 0
22814
22815   ;
22816   return 0;
22817 }
22818 _ACEOF
22819 rm -f conftest.$ac_objext
22820 if { (ac_try="$ac_compile"
22821 case "(($ac_try" in
22822   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22823   *) ac_try_echo=$ac_try;;
22824 esac
22825 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22826   (eval "$ac_compile") 2>conftest.er1
22827   ac_status=$?
22828   grep -v '^ *+' conftest.er1 >conftest.err
22829   rm -f conftest.er1
22830   cat conftest.err >&5
22831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22832   (exit $ac_status); } && {
22833          test -z "$ac_c_werror_flag" ||
22834          test ! -s conftest.err
22835        } && test -s conftest.$ac_objext; then
22836   ac_lo=$ac_mid; break
22837 else
22838   echo "$as_me: failed program was:" >&5
22839 sed 's/^/| /' conftest.$ac_ext >&5
22840
22841         ac_hi=`expr '(' $ac_mid ')' - 1`
22842                         if test $ac_mid -le $ac_hi; then
22843                           ac_lo= ac_hi=
22844                           break
22845                         fi
22846                         ac_mid=`expr 2 '*' $ac_mid`
22847 fi
22848
22849 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22850   done
22851 else
22852   echo "$as_me: failed program was:" >&5
22853 sed 's/^/| /' conftest.$ac_ext >&5
22854
22855         ac_lo= ac_hi=
22856 fi
22857
22858 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22859 fi
22860
22861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22862 # Binary search between lo and hi bounds.
22863 while test "x$ac_lo" != "x$ac_hi"; do
22864   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22865   cat >conftest.$ac_ext <<_ACEOF
22866 /* confdefs.h.  */
22867 _ACEOF
22868 cat confdefs.h >>conftest.$ac_ext
22869 cat >>conftest.$ac_ext <<_ACEOF
22870 /* end confdefs.h.  */
22871 $ac_includes_default
22872 #ifndef offsetof
22873 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22874 #endif
22875 typedef struct { char x; long long int y; } ac__type_alignof_;
22876 int
22877 main ()
22878 {
22879 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
22880 test_array [0] = 0
22881
22882   ;
22883   return 0;
22884 }
22885 _ACEOF
22886 rm -f conftest.$ac_objext
22887 if { (ac_try="$ac_compile"
22888 case "(($ac_try" in
22889   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22890   *) ac_try_echo=$ac_try;;
22891 esac
22892 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22893   (eval "$ac_compile") 2>conftest.er1
22894   ac_status=$?
22895   grep -v '^ *+' conftest.er1 >conftest.err
22896   rm -f conftest.er1
22897   cat conftest.err >&5
22898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22899   (exit $ac_status); } && {
22900          test -z "$ac_c_werror_flag" ||
22901          test ! -s conftest.err
22902        } && test -s conftest.$ac_objext; then
22903   ac_hi=$ac_mid
22904 else
22905   echo "$as_me: failed program was:" >&5
22906 sed 's/^/| /' conftest.$ac_ext >&5
22907
22908         ac_lo=`expr '(' $ac_mid ')' + 1`
22909 fi
22910
22911 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22912 done
22913 case $ac_lo in
22914 ?*) ac_cv_alignof_long_long_int=$ac_lo;;
22915 '') if test "$ac_cv_type_long_long_int" = yes; then
22916      { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int
22917 See \`config.log' for more details." >&5
22918 echo "$as_me: error: cannot compute alignment of long long int
22919 See \`config.log' for more details." >&2;}
22920    { (exit 77); exit 77; }; }
22921    else
22922      ac_cv_alignof_long_long_int=0
22923    fi ;;
22924 esac
22925 else
22926   cat >conftest.$ac_ext <<_ACEOF
22927 /* confdefs.h.  */
22928 _ACEOF
22929 cat confdefs.h >>conftest.$ac_ext
22930 cat >>conftest.$ac_ext <<_ACEOF
22931 /* end confdefs.h.  */
22932 $ac_includes_default
22933 #ifndef offsetof
22934 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22935 #endif
22936 typedef struct { char x; long long int y; } ac__type_alignof_;
22937 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
22938 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
22939 #include <stdio.h>
22940 #include <stdlib.h>
22941 int
22942 main ()
22943 {
22944
22945   FILE *f = fopen ("conftest.val", "w");
22946   if (! f)
22947     return 1;
22948   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
22949     {
22950       long int i = longval ();
22951       if (i != ((long int) offsetof (ac__type_alignof_, y)))
22952         return 1;
22953       fprintf (f, "%ld\n", i);
22954     }
22955   else
22956     {
22957       unsigned long int i = ulongval ();
22958       if (i != ((long int) offsetof (ac__type_alignof_, y)))
22959         return 1;
22960       fprintf (f, "%lu\n", i);
22961     }
22962   return ferror (f) || fclose (f) != 0;
22963
22964   ;
22965   return 0;
22966 }
22967 _ACEOF
22968 rm -f conftest$ac_exeext
22969 if { (ac_try="$ac_link"
22970 case "(($ac_try" in
22971   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22972   *) ac_try_echo=$ac_try;;
22973 esac
22974 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22975   (eval "$ac_link") 2>&5
22976   ac_status=$?
22977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22978   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22979   { (case "(($ac_try" in
22980   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22981   *) ac_try_echo=$ac_try;;
22982 esac
22983 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22984   (eval "$ac_try") 2>&5
22985   ac_status=$?
22986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22987   (exit $ac_status); }; }; then
22988   ac_cv_alignof_long_long_int=`cat conftest.val`
22989 else
22990   echo "$as_me: program exited with status $ac_status" >&5
22991 echo "$as_me: failed program was:" >&5
22992 sed 's/^/| /' conftest.$ac_ext >&5
22993
22994 ( exit $ac_status )
22995 if test "$ac_cv_type_long_long_int" = yes; then
22996      { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int
22997 See \`config.log' for more details." >&5
22998 echo "$as_me: error: cannot compute alignment of long long int
22999 See \`config.log' for more details." >&2;}
23000    { (exit 77); exit 77; }; }
23001    else
23002      ac_cv_alignof_long_long_int=0
23003    fi
23004 fi
23005 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23006 fi
23007 rm -f conftest.val
23008 fi
23009 { echo "$as_me:$LINENO: result: $ac_cv_alignof_long_long_int" >&5
23010 echo "${ECHO_T}$ac_cv_alignof_long_long_int" >&6; }
23011
23012
23013
23014 cat >>confdefs.h <<_ACEOF
23015 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
23016 _ACEOF
23017
23018
23019 fi
23020 { echo "$as_me:$LINENO: checking for double" >&5
23021 echo $ECHO_N "checking for double... $ECHO_C" >&6; }
23022 if test "${ac_cv_type_double+set}" = set; then
23023   echo $ECHO_N "(cached) $ECHO_C" >&6
23024 else
23025   cat >conftest.$ac_ext <<_ACEOF
23026 /* confdefs.h.  */
23027 _ACEOF
23028 cat confdefs.h >>conftest.$ac_ext
23029 cat >>conftest.$ac_ext <<_ACEOF
23030 /* end confdefs.h.  */
23031 $ac_includes_default
23032 typedef double ac__type_new_;
23033 int
23034 main ()
23035 {
23036 if ((ac__type_new_ *) 0)
23037   return 0;
23038 if (sizeof (ac__type_new_))
23039   return 0;
23040   ;
23041   return 0;
23042 }
23043 _ACEOF
23044 rm -f conftest.$ac_objext
23045 if { (ac_try="$ac_compile"
23046 case "(($ac_try" in
23047   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23048   *) ac_try_echo=$ac_try;;
23049 esac
23050 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23051   (eval "$ac_compile") 2>conftest.er1
23052   ac_status=$?
23053   grep -v '^ *+' conftest.er1 >conftest.err
23054   rm -f conftest.er1
23055   cat conftest.err >&5
23056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23057   (exit $ac_status); } && {
23058          test -z "$ac_c_werror_flag" ||
23059          test ! -s conftest.err
23060        } && test -s conftest.$ac_objext; then
23061   ac_cv_type_double=yes
23062 else
23063   echo "$as_me: failed program was:" >&5
23064 sed 's/^/| /' conftest.$ac_ext >&5
23065
23066         ac_cv_type_double=no
23067 fi
23068
23069 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23070 fi
23071 { echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
23072 echo "${ECHO_T}$ac_cv_type_double" >&6; }
23073
23074 # The cast to long int works around a bug in the HP C Compiler,
23075 # see AC_CHECK_SIZEOF for more information.
23076 { echo "$as_me:$LINENO: checking alignment of double" >&5
23077 echo $ECHO_N "checking alignment of double... $ECHO_C" >&6; }
23078 if test "${ac_cv_alignof_double+set}" = set; then
23079   echo $ECHO_N "(cached) $ECHO_C" >&6
23080 else
23081   if test "$cross_compiling" = yes; then
23082   # Depending upon the size, compute the lo and hi bounds.
23083 cat >conftest.$ac_ext <<_ACEOF
23084 /* confdefs.h.  */
23085 _ACEOF
23086 cat confdefs.h >>conftest.$ac_ext
23087 cat >>conftest.$ac_ext <<_ACEOF
23088 /* end confdefs.h.  */
23089 $ac_includes_default
23090 #ifndef offsetof
23091 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
23092 #endif
23093 typedef struct { char x; double y; } ac__type_alignof_;
23094 int
23095 main ()
23096 {
23097 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
23098 test_array [0] = 0
23099
23100   ;
23101   return 0;
23102 }
23103 _ACEOF
23104 rm -f conftest.$ac_objext
23105 if { (ac_try="$ac_compile"
23106 case "(($ac_try" in
23107   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23108   *) ac_try_echo=$ac_try;;
23109 esac
23110 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23111   (eval "$ac_compile") 2>conftest.er1
23112   ac_status=$?
23113   grep -v '^ *+' conftest.er1 >conftest.err
23114   rm -f conftest.er1
23115   cat conftest.err >&5
23116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23117   (exit $ac_status); } && {
23118          test -z "$ac_c_werror_flag" ||
23119          test ! -s conftest.err
23120        } && test -s conftest.$ac_objext; then
23121   ac_lo=0 ac_mid=0
23122   while :; do
23123     cat >conftest.$ac_ext <<_ACEOF
23124 /* confdefs.h.  */
23125 _ACEOF
23126 cat confdefs.h >>conftest.$ac_ext
23127 cat >>conftest.$ac_ext <<_ACEOF
23128 /* end confdefs.h.  */
23129 $ac_includes_default
23130 #ifndef offsetof
23131 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
23132 #endif
23133 typedef struct { char x; double y; } ac__type_alignof_;
23134 int
23135 main ()
23136 {
23137 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
23138 test_array [0] = 0
23139
23140   ;
23141   return 0;
23142 }
23143 _ACEOF
23144 rm -f conftest.$ac_objext
23145 if { (ac_try="$ac_compile"
23146 case "(($ac_try" in
23147   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23148   *) ac_try_echo=$ac_try;;
23149 esac
23150 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23151   (eval "$ac_compile") 2>conftest.er1
23152   ac_status=$?
23153   grep -v '^ *+' conftest.er1 >conftest.err
23154   rm -f conftest.er1
23155   cat conftest.err >&5
23156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23157   (exit $ac_status); } && {
23158          test -z "$ac_c_werror_flag" ||
23159          test ! -s conftest.err
23160        } && test -s conftest.$ac_objext; then
23161   ac_hi=$ac_mid; break
23162 else
23163   echo "$as_me: failed program was:" >&5
23164 sed 's/^/| /' conftest.$ac_ext >&5
23165
23166         ac_lo=`expr $ac_mid + 1`
23167                         if test $ac_lo -le $ac_mid; then
23168                           ac_lo= ac_hi=
23169                           break
23170                         fi
23171                         ac_mid=`expr 2 '*' $ac_mid + 1`
23172 fi
23173
23174 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23175   done
23176 else
23177   echo "$as_me: failed program was:" >&5
23178 sed 's/^/| /' conftest.$ac_ext >&5
23179
23180         cat >conftest.$ac_ext <<_ACEOF
23181 /* confdefs.h.  */
23182 _ACEOF
23183 cat confdefs.h >>conftest.$ac_ext
23184 cat >>conftest.$ac_ext <<_ACEOF
23185 /* end confdefs.h.  */
23186 $ac_includes_default
23187 #ifndef offsetof
23188 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
23189 #endif
23190 typedef struct { char x; double y; } ac__type_alignof_;
23191 int
23192 main ()
23193 {
23194 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
23195 test_array [0] = 0
23196
23197   ;
23198   return 0;
23199 }
23200 _ACEOF
23201 rm -f conftest.$ac_objext
23202 if { (ac_try="$ac_compile"
23203 case "(($ac_try" in
23204   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23205   *) ac_try_echo=$ac_try;;
23206 esac
23207 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23208   (eval "$ac_compile") 2>conftest.er1
23209   ac_status=$?
23210   grep -v '^ *+' conftest.er1 >conftest.err
23211   rm -f conftest.er1
23212   cat conftest.err >&5
23213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23214   (exit $ac_status); } && {
23215          test -z "$ac_c_werror_flag" ||
23216          test ! -s conftest.err
23217        } && test -s conftest.$ac_objext; then
23218   ac_hi=-1 ac_mid=-1
23219   while :; do
23220     cat >conftest.$ac_ext <<_ACEOF
23221 /* confdefs.h.  */
23222 _ACEOF
23223 cat confdefs.h >>conftest.$ac_ext
23224 cat >>conftest.$ac_ext <<_ACEOF
23225 /* end confdefs.h.  */
23226 $ac_includes_default
23227 #ifndef offsetof
23228 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
23229 #endif
23230 typedef struct { char x; double y; } ac__type_alignof_;
23231 int
23232 main ()
23233 {
23234 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
23235 test_array [0] = 0
23236
23237   ;
23238   return 0;
23239 }
23240 _ACEOF
23241 rm -f conftest.$ac_objext
23242 if { (ac_try="$ac_compile"
23243 case "(($ac_try" in
23244   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23245   *) ac_try_echo=$ac_try;;
23246 esac
23247 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23248   (eval "$ac_compile") 2>conftest.er1
23249   ac_status=$?
23250   grep -v '^ *+' conftest.er1 >conftest.err
23251   rm -f conftest.er1
23252   cat conftest.err >&5
23253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23254   (exit $ac_status); } && {
23255          test -z "$ac_c_werror_flag" ||
23256          test ! -s conftest.err
23257        } && test -s conftest.$ac_objext; then
23258   ac_lo=$ac_mid; break
23259 else
23260   echo "$as_me: failed program was:" >&5
23261 sed 's/^/| /' conftest.$ac_ext >&5
23262
23263         ac_hi=`expr '(' $ac_mid ')' - 1`
23264                         if test $ac_mid -le $ac_hi; then
23265                           ac_lo= ac_hi=
23266                           break
23267                         fi
23268                         ac_mid=`expr 2 '*' $ac_mid`
23269 fi
23270
23271 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23272   done
23273 else
23274   echo "$as_me: failed program was:" >&5
23275 sed 's/^/| /' conftest.$ac_ext >&5
23276
23277         ac_lo= ac_hi=
23278 fi
23279
23280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23281 fi
23282
23283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23284 # Binary search between lo and hi bounds.
23285 while test "x$ac_lo" != "x$ac_hi"; do
23286   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23287   cat >conftest.$ac_ext <<_ACEOF
23288 /* confdefs.h.  */
23289 _ACEOF
23290 cat confdefs.h >>conftest.$ac_ext
23291 cat >>conftest.$ac_ext <<_ACEOF
23292 /* end confdefs.h.  */
23293 $ac_includes_default
23294 #ifndef offsetof
23295 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
23296 #endif
23297 typedef struct { char x; double y; } ac__type_alignof_;
23298 int
23299 main ()
23300 {
23301 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
23302 test_array [0] = 0
23303
23304   ;
23305   return 0;
23306 }
23307 _ACEOF
23308 rm -f conftest.$ac_objext
23309 if { (ac_try="$ac_compile"
23310 case "(($ac_try" in
23311   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23312   *) ac_try_echo=$ac_try;;
23313 esac
23314 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23315   (eval "$ac_compile") 2>conftest.er1
23316   ac_status=$?
23317   grep -v '^ *+' conftest.er1 >conftest.err
23318   rm -f conftest.er1
23319   cat conftest.err >&5
23320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23321   (exit $ac_status); } && {
23322          test -z "$ac_c_werror_flag" ||
23323          test ! -s conftest.err
23324        } && test -s conftest.$ac_objext; then
23325   ac_hi=$ac_mid
23326 else
23327   echo "$as_me: failed program was:" >&5
23328 sed 's/^/| /' conftest.$ac_ext >&5
23329
23330         ac_lo=`expr '(' $ac_mid ')' + 1`
23331 fi
23332
23333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23334 done
23335 case $ac_lo in
23336 ?*) ac_cv_alignof_double=$ac_lo;;
23337 '') if test "$ac_cv_type_double" = yes; then
23338      { { echo "$as_me:$LINENO: error: cannot compute alignment of double
23339 See \`config.log' for more details." >&5
23340 echo "$as_me: error: cannot compute alignment of double
23341 See \`config.log' for more details." >&2;}
23342    { (exit 77); exit 77; }; }
23343    else
23344      ac_cv_alignof_double=0
23345    fi ;;
23346 esac
23347 else
23348   cat >conftest.$ac_ext <<_ACEOF
23349 /* confdefs.h.  */
23350 _ACEOF
23351 cat confdefs.h >>conftest.$ac_ext
23352 cat >>conftest.$ac_ext <<_ACEOF
23353 /* end confdefs.h.  */
23354 $ac_includes_default
23355 #ifndef offsetof
23356 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
23357 #endif
23358 typedef struct { char x; double y; } ac__type_alignof_;
23359 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
23360 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
23361 #include <stdio.h>
23362 #include <stdlib.h>
23363 int
23364 main ()
23365 {
23366
23367   FILE *f = fopen ("conftest.val", "w");
23368   if (! f)
23369     return 1;
23370   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
23371     {
23372       long int i = longval ();
23373       if (i != ((long int) offsetof (ac__type_alignof_, y)))
23374         return 1;
23375       fprintf (f, "%ld\n", i);
23376     }
23377   else
23378     {
23379       unsigned long int i = ulongval ();
23380       if (i != ((long int) offsetof (ac__type_alignof_, y)))
23381         return 1;
23382       fprintf (f, "%lu\n", i);
23383     }
23384   return ferror (f) || fclose (f) != 0;
23385
23386   ;
23387   return 0;
23388 }
23389 _ACEOF
23390 rm -f conftest$ac_exeext
23391 if { (ac_try="$ac_link"
23392 case "(($ac_try" in
23393   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23394   *) ac_try_echo=$ac_try;;
23395 esac
23396 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23397   (eval "$ac_link") 2>&5
23398   ac_status=$?
23399   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23400   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23401   { (case "(($ac_try" in
23402   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23403   *) ac_try_echo=$ac_try;;
23404 esac
23405 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23406   (eval "$ac_try") 2>&5
23407   ac_status=$?
23408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23409   (exit $ac_status); }; }; then
23410   ac_cv_alignof_double=`cat conftest.val`
23411 else
23412   echo "$as_me: program exited with status $ac_status" >&5
23413 echo "$as_me: failed program was:" >&5
23414 sed 's/^/| /' conftest.$ac_ext >&5
23415
23416 ( exit $ac_status )
23417 if test "$ac_cv_type_double" = yes; then
23418      { { echo "$as_me:$LINENO: error: cannot compute alignment of double
23419 See \`config.log' for more details." >&5
23420 echo "$as_me: error: cannot compute alignment of double
23421 See \`config.log' for more details." >&2;}
23422    { (exit 77); exit 77; }; }
23423    else
23424      ac_cv_alignof_double=0
23425    fi
23426 fi
23427 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23428 fi
23429 rm -f conftest.val
23430 fi
23431 { echo "$as_me:$LINENO: result: $ac_cv_alignof_double" >&5
23432 echo "${ECHO_T}$ac_cv_alignof_double" >&6; }
23433
23434
23435
23436 cat >>confdefs.h <<_ACEOF
23437 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
23438 _ACEOF
23439
23440
23441
23442 # Compute maximum alignment of any basic type.
23443 # We assume long's alignment is at least as strong as char, short, or int;
23444 # but we must check long long (if it exists) and double.
23445
23446 MAX_ALIGNOF=$ac_cv_alignof_long
23447 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
23448   MAX_ALIGNOF=$ac_cv_alignof_double
23449 fi
23450 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
23451   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
23452 fi
23453
23454 cat >>confdefs.h <<_ACEOF
23455 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
23456 _ACEOF
23457
23458
23459
23460 # Some platforms predefine the types int8, int16, etc.  Only check
23461 # a (hopefully) representative subset.
23462 { echo "$as_me:$LINENO: checking for int8" >&5
23463 echo $ECHO_N "checking for int8... $ECHO_C" >&6; }
23464 if test "${ac_cv_type_int8+set}" = set; then
23465   echo $ECHO_N "(cached) $ECHO_C" >&6
23466 else
23467   cat >conftest.$ac_ext <<_ACEOF
23468 /* confdefs.h.  */
23469 _ACEOF
23470 cat confdefs.h >>conftest.$ac_ext
23471 cat >>conftest.$ac_ext <<_ACEOF
23472 /* end confdefs.h.  */
23473 #include <stdio.h>
23474 #ifdef HAVE_SUPPORTDEFS_H
23475 #include <SupportDefs.h>
23476 #endif
23477
23478 typedef int8 ac__type_new_;
23479 int
23480 main ()
23481 {
23482 if ((ac__type_new_ *) 0)
23483   return 0;
23484 if (sizeof (ac__type_new_))
23485   return 0;
23486   ;
23487   return 0;
23488 }
23489 _ACEOF
23490 rm -f conftest.$ac_objext
23491 if { (ac_try="$ac_compile"
23492 case "(($ac_try" in
23493   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23494   *) ac_try_echo=$ac_try;;
23495 esac
23496 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23497   (eval "$ac_compile") 2>conftest.er1
23498   ac_status=$?
23499   grep -v '^ *+' conftest.er1 >conftest.err
23500   rm -f conftest.er1
23501   cat conftest.err >&5
23502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23503   (exit $ac_status); } && {
23504          test -z "$ac_c_werror_flag" ||
23505          test ! -s conftest.err
23506        } && test -s conftest.$ac_objext; then
23507   ac_cv_type_int8=yes
23508 else
23509   echo "$as_me: failed program was:" >&5
23510 sed 's/^/| /' conftest.$ac_ext >&5
23511
23512         ac_cv_type_int8=no
23513 fi
23514
23515 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23516 fi
23517 { echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
23518 echo "${ECHO_T}$ac_cv_type_int8" >&6; }
23519 if test $ac_cv_type_int8 = yes; then
23520
23521 cat >>confdefs.h <<_ACEOF
23522 #define HAVE_INT8 1
23523 _ACEOF
23524
23525
23526 fi
23527 { echo "$as_me:$LINENO: checking for uint8" >&5
23528 echo $ECHO_N "checking for uint8... $ECHO_C" >&6; }
23529 if test "${ac_cv_type_uint8+set}" = set; then
23530   echo $ECHO_N "(cached) $ECHO_C" >&6
23531 else
23532   cat >conftest.$ac_ext <<_ACEOF
23533 /* confdefs.h.  */
23534 _ACEOF
23535 cat confdefs.h >>conftest.$ac_ext
23536 cat >>conftest.$ac_ext <<_ACEOF
23537 /* end confdefs.h.  */
23538 #include <stdio.h>
23539 #ifdef HAVE_SUPPORTDEFS_H
23540 #include <SupportDefs.h>
23541 #endif
23542
23543 typedef uint8 ac__type_new_;
23544 int
23545 main ()
23546 {
23547 if ((ac__type_new_ *) 0)
23548   return 0;
23549 if (sizeof (ac__type_new_))
23550   return 0;
23551   ;
23552   return 0;
23553 }
23554 _ACEOF
23555 rm -f conftest.$ac_objext
23556 if { (ac_try="$ac_compile"
23557 case "(($ac_try" in
23558   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23559   *) ac_try_echo=$ac_try;;
23560 esac
23561 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23562   (eval "$ac_compile") 2>conftest.er1
23563   ac_status=$?
23564   grep -v '^ *+' conftest.er1 >conftest.err
23565   rm -f conftest.er1
23566   cat conftest.err >&5
23567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23568   (exit $ac_status); } && {
23569          test -z "$ac_c_werror_flag" ||
23570          test ! -s conftest.err
23571        } && test -s conftest.$ac_objext; then
23572   ac_cv_type_uint8=yes
23573 else
23574   echo "$as_me: failed program was:" >&5
23575 sed 's/^/| /' conftest.$ac_ext >&5
23576
23577         ac_cv_type_uint8=no
23578 fi
23579
23580 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23581 fi
23582 { echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
23583 echo "${ECHO_T}$ac_cv_type_uint8" >&6; }
23584 if test $ac_cv_type_uint8 = yes; then
23585
23586 cat >>confdefs.h <<_ACEOF
23587 #define HAVE_UINT8 1
23588 _ACEOF
23589
23590
23591 fi
23592 { echo "$as_me:$LINENO: checking for int64" >&5
23593 echo $ECHO_N "checking for int64... $ECHO_C" >&6; }
23594 if test "${ac_cv_type_int64+set}" = set; then
23595   echo $ECHO_N "(cached) $ECHO_C" >&6
23596 else
23597   cat >conftest.$ac_ext <<_ACEOF
23598 /* confdefs.h.  */
23599 _ACEOF
23600 cat confdefs.h >>conftest.$ac_ext
23601 cat >>conftest.$ac_ext <<_ACEOF
23602 /* end confdefs.h.  */
23603 #include <stdio.h>
23604 #ifdef HAVE_SUPPORTDEFS_H
23605 #include <SupportDefs.h>
23606 #endif
23607
23608 typedef int64 ac__type_new_;
23609 int
23610 main ()
23611 {
23612 if ((ac__type_new_ *) 0)
23613   return 0;
23614 if (sizeof (ac__type_new_))
23615   return 0;
23616   ;
23617   return 0;
23618 }
23619 _ACEOF
23620 rm -f conftest.$ac_objext
23621 if { (ac_try="$ac_compile"
23622 case "(($ac_try" in
23623   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23624   *) ac_try_echo=$ac_try;;
23625 esac
23626 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23627   (eval "$ac_compile") 2>conftest.er1
23628   ac_status=$?
23629   grep -v '^ *+' conftest.er1 >conftest.err
23630   rm -f conftest.er1
23631   cat conftest.err >&5
23632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23633   (exit $ac_status); } && {
23634          test -z "$ac_c_werror_flag" ||
23635          test ! -s conftest.err
23636        } && test -s conftest.$ac_objext; then
23637   ac_cv_type_int64=yes
23638 else
23639   echo "$as_me: failed program was:" >&5
23640 sed 's/^/| /' conftest.$ac_ext >&5
23641
23642         ac_cv_type_int64=no
23643 fi
23644
23645 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23646 fi
23647 { echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
23648 echo "${ECHO_T}$ac_cv_type_int64" >&6; }
23649 if test $ac_cv_type_int64 = yes; then
23650
23651 cat >>confdefs.h <<_ACEOF
23652 #define HAVE_INT64 1
23653 _ACEOF
23654
23655
23656 fi
23657 { echo "$as_me:$LINENO: checking for uint64" >&5
23658 echo $ECHO_N "checking for uint64... $ECHO_C" >&6; }
23659 if test "${ac_cv_type_uint64+set}" = set; then
23660   echo $ECHO_N "(cached) $ECHO_C" >&6
23661 else
23662   cat >conftest.$ac_ext <<_ACEOF
23663 /* confdefs.h.  */
23664 _ACEOF
23665 cat confdefs.h >>conftest.$ac_ext
23666 cat >>conftest.$ac_ext <<_ACEOF
23667 /* end confdefs.h.  */
23668 #include <stdio.h>
23669 #ifdef HAVE_SUPPORTDEFS_H
23670 #include <SupportDefs.h>
23671 #endif
23672
23673 typedef uint64 ac__type_new_;
23674 int
23675 main ()
23676 {
23677 if ((ac__type_new_ *) 0)
23678   return 0;
23679 if (sizeof (ac__type_new_))
23680   return 0;
23681   ;
23682   return 0;
23683 }
23684 _ACEOF
23685 rm -f conftest.$ac_objext
23686 if { (ac_try="$ac_compile"
23687 case "(($ac_try" in
23688   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23689   *) ac_try_echo=$ac_try;;
23690 esac
23691 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23692   (eval "$ac_compile") 2>conftest.er1
23693   ac_status=$?
23694   grep -v '^ *+' conftest.er1 >conftest.err
23695   rm -f conftest.er1
23696   cat conftest.err >&5
23697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23698   (exit $ac_status); } && {
23699          test -z "$ac_c_werror_flag" ||
23700          test ! -s conftest.err
23701        } && test -s conftest.$ac_objext; then
23702   ac_cv_type_uint64=yes
23703 else
23704   echo "$as_me: failed program was:" >&5
23705 sed 's/^/| /' conftest.$ac_ext >&5
23706
23707         ac_cv_type_uint64=no
23708 fi
23709
23710 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23711 fi
23712 { echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
23713 echo "${ECHO_T}$ac_cv_type_uint64" >&6; }
23714 if test $ac_cv_type_uint64 = yes; then
23715
23716 cat >>confdefs.h <<_ACEOF
23717 #define HAVE_UINT64 1
23718 _ACEOF
23719
23720
23721 fi
23722
23723
23724 # We also check for sig_atomic_t, which *should* be defined per ANSI
23725 # C, but is missing on some old platforms.
23726 { echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
23727 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6; }
23728 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
23729   echo $ECHO_N "(cached) $ECHO_C" >&6
23730 else
23731   cat >conftest.$ac_ext <<_ACEOF
23732 /* confdefs.h.  */
23733 _ACEOF
23734 cat confdefs.h >>conftest.$ac_ext
23735 cat >>conftest.$ac_ext <<_ACEOF
23736 /* end confdefs.h.  */
23737 #include <signal.h>
23738
23739 typedef sig_atomic_t ac__type_new_;
23740 int
23741 main ()
23742 {
23743 if ((ac__type_new_ *) 0)
23744   return 0;
23745 if (sizeof (ac__type_new_))
23746   return 0;
23747   ;
23748   return 0;
23749 }
23750 _ACEOF
23751 rm -f conftest.$ac_objext
23752 if { (ac_try="$ac_compile"
23753 case "(($ac_try" in
23754   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23755   *) ac_try_echo=$ac_try;;
23756 esac
23757 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23758   (eval "$ac_compile") 2>conftest.er1
23759   ac_status=$?
23760   grep -v '^ *+' conftest.er1 >conftest.err
23761   rm -f conftest.er1
23762   cat conftest.err >&5
23763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23764   (exit $ac_status); } && {
23765          test -z "$ac_c_werror_flag" ||
23766          test ! -s conftest.err
23767        } && test -s conftest.$ac_objext; then
23768   ac_cv_type_sig_atomic_t=yes
23769 else
23770   echo "$as_me: failed program was:" >&5
23771 sed 's/^/| /' conftest.$ac_ext >&5
23772
23773         ac_cv_type_sig_atomic_t=no
23774 fi
23775
23776 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23777 fi
23778 { echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
23779 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6; }
23780 if test $ac_cv_type_sig_atomic_t = yes; then
23781
23782 cat >>confdefs.h <<_ACEOF
23783 #define HAVE_SIG_ATOMIC_T 1
23784 _ACEOF
23785
23786
23787 fi
23788
23789
23790
23791 # If the user did not disable integer datetimes, check that
23792 # there is a working 64-bit integral type to use.
23793 if test x"$USE_INTEGER_DATETIMES" = x"yes" &&
23794    test x"$HAVE_LONG_INT_64" = x"no" &&
23795    test x"$HAVE_LONG_LONG_INT_64" = x"no" &&
23796    test x"$HAVE_INT64" = x"no" ; then
23797   { { echo "$as_me:$LINENO: error:
23798 Integer-based datetime support requires a 64-bit integer type,
23799 but no such type could be found. The --disable-integer-datetimes
23800 configure option can be used to disable integer-based storage
23801 of datetime values." >&5
23802 echo "$as_me: error:
23803 Integer-based datetime support requires a 64-bit integer type,
23804 but no such type could be found. The --disable-integer-datetimes
23805 configure option can be used to disable integer-based storage
23806 of datetime values." >&2;}
23807    { (exit 1); exit 1; }; }
23808 fi
23809
23810
23811 if test "$PORTNAME" != "win32"
23812 then
23813 { echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
23814 echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6; }
23815 if test "${pgac_cv_func_posix_signals+set}" = set; then
23816   echo $ECHO_N "(cached) $ECHO_C" >&6
23817 else
23818   cat >conftest.$ac_ext <<_ACEOF
23819 /* confdefs.h.  */
23820 _ACEOF
23821 cat confdefs.h >>conftest.$ac_ext
23822 cat >>conftest.$ac_ext <<_ACEOF
23823 /* end confdefs.h.  */
23824 #include <signal.h>
23825
23826 int
23827 main ()
23828 {
23829 struct sigaction act, oact;
23830 sigemptyset(&act.sa_mask);
23831 act.sa_flags = SA_RESTART;
23832 sigaction(0, &act, &oact);
23833   ;
23834   return 0;
23835 }
23836 _ACEOF
23837 rm -f conftest.$ac_objext conftest$ac_exeext
23838 if { (ac_try="$ac_link"
23839 case "(($ac_try" in
23840   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23841   *) ac_try_echo=$ac_try;;
23842 esac
23843 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23844   (eval "$ac_link") 2>conftest.er1
23845   ac_status=$?
23846   grep -v '^ *+' conftest.er1 >conftest.err
23847   rm -f conftest.er1
23848   cat conftest.err >&5
23849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23850   (exit $ac_status); } && {
23851          test -z "$ac_c_werror_flag" ||
23852          test ! -s conftest.err
23853        } && test -s conftest$ac_exeext &&
23854        $as_test_x conftest$ac_exeext; then
23855   pgac_cv_func_posix_signals=yes
23856 else
23857   echo "$as_me: failed program was:" >&5
23858 sed 's/^/| /' conftest.$ac_ext >&5
23859
23860         pgac_cv_func_posix_signals=no
23861 fi
23862
23863 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23864       conftest$ac_exeext conftest.$ac_ext
23865 fi
23866 { echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
23867 echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6; }
23868 if test x"$pgac_cv_func_posix_signals" = xyes ; then
23869
23870 cat >>confdefs.h <<\_ACEOF
23871 #define HAVE_POSIX_SIGNALS
23872 _ACEOF
23873
23874 fi
23875 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
23876
23877 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
23878   { { echo "$as_me:$LINENO: error:
23879 Thread-safety requires POSIX signals, which are not supported by this
23880 operating system." >&5
23881 echo "$as_me: error:
23882 Thread-safety requires POSIX signals, which are not supported by this
23883 operating system." >&2;}
23884    { (exit 1); exit 1; }; }
23885 fi
23886 fi
23887
23888 if test $ac_cv_func_fseeko = yes; then
23889 # Check whether --enable-largefile was given.
23890 if test "${enable_largefile+set}" = set; then
23891   enableval=$enable_largefile;
23892 fi
23893
23894 if test "$enable_largefile" != no; then
23895
23896   { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
23897 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
23898 if test "${ac_cv_sys_largefile_CC+set}" = set; then
23899   echo $ECHO_N "(cached) $ECHO_C" >&6
23900 else
23901   ac_cv_sys_largefile_CC=no
23902      if test "$GCC" != yes; then
23903        ac_save_CC=$CC
23904        while :; do
23905          # IRIX 6.2 and later do not support large files by default,
23906          # so use the C compiler's -n32 option if that helps.
23907          cat >conftest.$ac_ext <<_ACEOF
23908 /* confdefs.h.  */
23909 _ACEOF
23910 cat confdefs.h >>conftest.$ac_ext
23911 cat >>conftest.$ac_ext <<_ACEOF
23912 /* end confdefs.h.  */
23913 #include <sys/types.h>
23914  /* Check that off_t can represent 2**63 - 1 correctly.
23915     We can't simply define LARGE_OFF_T to be 9223372036854775807,
23916     since some C++ compilers masquerading as C compilers
23917     incorrectly reject 9223372036854775807.  */
23918 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
23919   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
23920                        && LARGE_OFF_T % 2147483647 == 1)
23921                       ? 1 : -1];
23922 int
23923 main ()
23924 {
23925
23926   ;
23927   return 0;
23928 }
23929 _ACEOF
23930          rm -f conftest.$ac_objext
23931 if { (ac_try="$ac_compile"
23932 case "(($ac_try" in
23933   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23934   *) ac_try_echo=$ac_try;;
23935 esac
23936 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23937   (eval "$ac_compile") 2>conftest.er1
23938   ac_status=$?
23939   grep -v '^ *+' conftest.er1 >conftest.err
23940   rm -f conftest.er1
23941   cat conftest.err >&5
23942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23943   (exit $ac_status); } && {
23944          test -z "$ac_c_werror_flag" ||
23945          test ! -s conftest.err
23946        } && test -s conftest.$ac_objext; then
23947   break
23948 else
23949   echo "$as_me: failed program was:" >&5
23950 sed 's/^/| /' conftest.$ac_ext >&5
23951
23952
23953 fi
23954
23955 rm -f core conftest.err conftest.$ac_objext
23956          CC="$CC -n32"
23957          rm -f conftest.$ac_objext
23958 if { (ac_try="$ac_compile"
23959 case "(($ac_try" in
23960   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23961   *) ac_try_echo=$ac_try;;
23962 esac
23963 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23964   (eval "$ac_compile") 2>conftest.er1
23965   ac_status=$?
23966   grep -v '^ *+' conftest.er1 >conftest.err
23967   rm -f conftest.er1
23968   cat conftest.err >&5
23969   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23970   (exit $ac_status); } && {
23971          test -z "$ac_c_werror_flag" ||
23972          test ! -s conftest.err
23973        } && test -s conftest.$ac_objext; then
23974   ac_cv_sys_largefile_CC=' -n32'; break
23975 else
23976   echo "$as_me: failed program was:" >&5
23977 sed 's/^/| /' conftest.$ac_ext >&5
23978
23979
23980 fi
23981
23982 rm -f core conftest.err conftest.$ac_objext
23983          break
23984        done
23985        CC=$ac_save_CC
23986        rm -f conftest.$ac_ext
23987     fi
23988 fi
23989 { echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
23990 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
23991   if test "$ac_cv_sys_largefile_CC" != no; then
23992     CC=$CC$ac_cv_sys_largefile_CC
23993   fi
23994
23995   { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
23996 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
23997 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
23998   echo $ECHO_N "(cached) $ECHO_C" >&6
23999 else
24000   while :; do
24001   cat >conftest.$ac_ext <<_ACEOF
24002 /* confdefs.h.  */
24003 _ACEOF
24004 cat confdefs.h >>conftest.$ac_ext
24005 cat >>conftest.$ac_ext <<_ACEOF
24006 /* end confdefs.h.  */
24007 #include <sys/types.h>
24008  /* Check that off_t can represent 2**63 - 1 correctly.
24009     We can't simply define LARGE_OFF_T to be 9223372036854775807,
24010     since some C++ compilers masquerading as C compilers
24011     incorrectly reject 9223372036854775807.  */
24012 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
24013   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
24014                        && LARGE_OFF_T % 2147483647 == 1)
24015                       ? 1 : -1];
24016 int
24017 main ()
24018 {
24019
24020   ;
24021   return 0;
24022 }
24023 _ACEOF
24024 rm -f conftest.$ac_objext
24025 if { (ac_try="$ac_compile"
24026 case "(($ac_try" in
24027   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24028   *) ac_try_echo=$ac_try;;
24029 esac
24030 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24031   (eval "$ac_compile") 2>conftest.er1
24032   ac_status=$?
24033   grep -v '^ *+' conftest.er1 >conftest.err
24034   rm -f conftest.er1
24035   cat conftest.err >&5
24036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24037   (exit $ac_status); } && {
24038          test -z "$ac_c_werror_flag" ||
24039          test ! -s conftest.err
24040        } && test -s conftest.$ac_objext; then
24041   ac_cv_sys_file_offset_bits=no; break
24042 else
24043   echo "$as_me: failed program was:" >&5
24044 sed 's/^/| /' conftest.$ac_ext >&5
24045
24046
24047 fi
24048
24049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24050   cat >conftest.$ac_ext <<_ACEOF
24051 /* confdefs.h.  */
24052 _ACEOF
24053 cat confdefs.h >>conftest.$ac_ext
24054 cat >>conftest.$ac_ext <<_ACEOF
24055 /* end confdefs.h.  */
24056 #define _FILE_OFFSET_BITS 64
24057 #include <sys/types.h>
24058  /* Check that off_t can represent 2**63 - 1 correctly.
24059     We can't simply define LARGE_OFF_T to be 9223372036854775807,
24060     since some C++ compilers masquerading as C compilers
24061     incorrectly reject 9223372036854775807.  */
24062 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
24063   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
24064                        && LARGE_OFF_T % 2147483647 == 1)
24065                       ? 1 : -1];
24066 int
24067 main ()
24068 {
24069
24070   ;
24071   return 0;
24072 }
24073 _ACEOF
24074 rm -f conftest.$ac_objext
24075 if { (ac_try="$ac_compile"
24076 case "(($ac_try" in
24077   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24078   *) ac_try_echo=$ac_try;;
24079 esac
24080 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24081   (eval "$ac_compile") 2>conftest.er1
24082   ac_status=$?
24083   grep -v '^ *+' conftest.er1 >conftest.err
24084   rm -f conftest.er1
24085   cat conftest.err >&5
24086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24087   (exit $ac_status); } && {
24088          test -z "$ac_c_werror_flag" ||
24089          test ! -s conftest.err
24090        } && test -s conftest.$ac_objext; then
24091   ac_cv_sys_file_offset_bits=64; break
24092 else
24093   echo "$as_me: failed program was:" >&5
24094 sed 's/^/| /' conftest.$ac_ext >&5
24095
24096
24097 fi
24098
24099 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24100   ac_cv_sys_file_offset_bits=unknown
24101   break
24102 done
24103 fi
24104 { echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
24105 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
24106 case $ac_cv_sys_file_offset_bits in #(
24107   no | unknown) ;;
24108   *)
24109 cat >>confdefs.h <<_ACEOF
24110 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
24111 _ACEOF
24112 ;;
24113 esac
24114 rm -f conftest*
24115   if test $ac_cv_sys_file_offset_bits = unknown; then
24116     { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
24117 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
24118 if test "${ac_cv_sys_large_files+set}" = set; then
24119   echo $ECHO_N "(cached) $ECHO_C" >&6
24120 else
24121   while :; do
24122   cat >conftest.$ac_ext <<_ACEOF
24123 /* confdefs.h.  */
24124 _ACEOF
24125 cat confdefs.h >>conftest.$ac_ext
24126 cat >>conftest.$ac_ext <<_ACEOF
24127 /* end confdefs.h.  */
24128 #include <sys/types.h>
24129  /* Check that off_t can represent 2**63 - 1 correctly.
24130     We can't simply define LARGE_OFF_T to be 9223372036854775807,
24131     since some C++ compilers masquerading as C compilers
24132     incorrectly reject 9223372036854775807.  */
24133 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
24134   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
24135                        && LARGE_OFF_T % 2147483647 == 1)
24136                       ? 1 : -1];
24137 int
24138 main ()
24139 {
24140
24141   ;
24142   return 0;
24143 }
24144 _ACEOF
24145 rm -f conftest.$ac_objext
24146 if { (ac_try="$ac_compile"
24147 case "(($ac_try" in
24148   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24149   *) ac_try_echo=$ac_try;;
24150 esac
24151 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24152   (eval "$ac_compile") 2>conftest.er1
24153   ac_status=$?
24154   grep -v '^ *+' conftest.er1 >conftest.err
24155   rm -f conftest.er1
24156   cat conftest.err >&5
24157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24158   (exit $ac_status); } && {
24159          test -z "$ac_c_werror_flag" ||
24160          test ! -s conftest.err
24161        } && test -s conftest.$ac_objext; then
24162   ac_cv_sys_large_files=no; break
24163 else
24164   echo "$as_me: failed program was:" >&5
24165 sed 's/^/| /' conftest.$ac_ext >&5
24166
24167
24168 fi
24169
24170 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24171   cat >conftest.$ac_ext <<_ACEOF
24172 /* confdefs.h.  */
24173 _ACEOF
24174 cat confdefs.h >>conftest.$ac_ext
24175 cat >>conftest.$ac_ext <<_ACEOF
24176 /* end confdefs.h.  */
24177 #define _LARGE_FILES 1
24178 #include <sys/types.h>
24179  /* Check that off_t can represent 2**63 - 1 correctly.
24180     We can't simply define LARGE_OFF_T to be 9223372036854775807,
24181     since some C++ compilers masquerading as C compilers
24182     incorrectly reject 9223372036854775807.  */
24183 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
24184   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
24185                        && LARGE_OFF_T % 2147483647 == 1)
24186                       ? 1 : -1];
24187 int
24188 main ()
24189 {
24190
24191   ;
24192   return 0;
24193 }
24194 _ACEOF
24195 rm -f conftest.$ac_objext
24196 if { (ac_try="$ac_compile"
24197 case "(($ac_try" in
24198   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24199   *) ac_try_echo=$ac_try;;
24200 esac
24201 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24202   (eval "$ac_compile") 2>conftest.er1
24203   ac_status=$?
24204   grep -v '^ *+' conftest.er1 >conftest.err
24205   rm -f conftest.er1
24206   cat conftest.err >&5
24207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24208   (exit $ac_status); } && {
24209          test -z "$ac_c_werror_flag" ||
24210          test ! -s conftest.err
24211        } && test -s conftest.$ac_objext; then
24212   ac_cv_sys_large_files=1; break
24213 else
24214   echo "$as_me: failed program was:" >&5
24215 sed 's/^/| /' conftest.$ac_ext >&5
24216
24217
24218 fi
24219
24220 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24221   ac_cv_sys_large_files=unknown
24222   break
24223 done
24224 fi
24225 { echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
24226 echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
24227 case $ac_cv_sys_large_files in #(
24228   no | unknown) ;;
24229   *)
24230 cat >>confdefs.h <<_ACEOF
24231 #define _LARGE_FILES $ac_cv_sys_large_files
24232 _ACEOF
24233 ;;
24234 esac
24235 rm -f conftest*
24236   fi
24237 fi
24238
24239 fi
24240
24241 # Check for largefile support (must be after AC_SYS_LARGEFILE)
24242 { echo "$as_me:$LINENO: checking for off_t" >&5
24243 echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
24244 if test "${ac_cv_type_off_t+set}" = set; then
24245   echo $ECHO_N "(cached) $ECHO_C" >&6
24246 else
24247   cat >conftest.$ac_ext <<_ACEOF
24248 /* confdefs.h.  */
24249 _ACEOF
24250 cat confdefs.h >>conftest.$ac_ext
24251 cat >>conftest.$ac_ext <<_ACEOF
24252 /* end confdefs.h.  */
24253 $ac_includes_default
24254 typedef off_t ac__type_new_;
24255 int
24256 main ()
24257 {
24258 if ((ac__type_new_ *) 0)
24259   return 0;
24260 if (sizeof (ac__type_new_))
24261   return 0;
24262   ;
24263   return 0;
24264 }
24265 _ACEOF
24266 rm -f conftest.$ac_objext
24267 if { (ac_try="$ac_compile"
24268 case "(($ac_try" in
24269   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24270   *) ac_try_echo=$ac_try;;
24271 esac
24272 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24273   (eval "$ac_compile") 2>conftest.er1
24274   ac_status=$?
24275   grep -v '^ *+' conftest.er1 >conftest.err
24276   rm -f conftest.er1
24277   cat conftest.err >&5
24278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24279   (exit $ac_status); } && {
24280          test -z "$ac_c_werror_flag" ||
24281          test ! -s conftest.err
24282        } && test -s conftest.$ac_objext; then
24283   ac_cv_type_off_t=yes
24284 else
24285   echo "$as_me: failed program was:" >&5
24286 sed 's/^/| /' conftest.$ac_ext >&5
24287
24288         ac_cv_type_off_t=no
24289 fi
24290
24291 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24292 fi
24293 { echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
24294 echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
24295
24296 # The cast to long int works around a bug in the HP C Compiler
24297 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24298 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24299 # This bug is HP SR number 8606223364.
24300 { echo "$as_me:$LINENO: checking size of off_t" >&5
24301 echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
24302 if test "${ac_cv_sizeof_off_t+set}" = set; then
24303   echo $ECHO_N "(cached) $ECHO_C" >&6
24304 else
24305   if test "$cross_compiling" = yes; then
24306   # Depending upon the size, compute the lo and hi bounds.
24307 cat >conftest.$ac_ext <<_ACEOF
24308 /* confdefs.h.  */
24309 _ACEOF
24310 cat confdefs.h >>conftest.$ac_ext
24311 cat >>conftest.$ac_ext <<_ACEOF
24312 /* end confdefs.h.  */
24313 $ac_includes_default
24314    typedef off_t ac__type_sizeof_;
24315 int
24316 main ()
24317 {
24318 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
24319 test_array [0] = 0
24320
24321   ;
24322   return 0;
24323 }
24324 _ACEOF
24325 rm -f conftest.$ac_objext
24326 if { (ac_try="$ac_compile"
24327 case "(($ac_try" in
24328   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24329   *) ac_try_echo=$ac_try;;
24330 esac
24331 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24332   (eval "$ac_compile") 2>conftest.er1
24333   ac_status=$?
24334   grep -v '^ *+' conftest.er1 >conftest.err
24335   rm -f conftest.er1
24336   cat conftest.err >&5
24337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24338   (exit $ac_status); } && {
24339          test -z "$ac_c_werror_flag" ||
24340          test ! -s conftest.err
24341        } && test -s conftest.$ac_objext; then
24342   ac_lo=0 ac_mid=0
24343   while :; do
24344     cat >conftest.$ac_ext <<_ACEOF
24345 /* confdefs.h.  */
24346 _ACEOF
24347 cat confdefs.h >>conftest.$ac_ext
24348 cat >>conftest.$ac_ext <<_ACEOF
24349 /* end confdefs.h.  */
24350 $ac_includes_default
24351    typedef off_t ac__type_sizeof_;
24352 int
24353 main ()
24354 {
24355 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
24356 test_array [0] = 0
24357
24358   ;
24359   return 0;
24360 }
24361 _ACEOF
24362 rm -f conftest.$ac_objext
24363 if { (ac_try="$ac_compile"
24364 case "(($ac_try" in
24365   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24366   *) ac_try_echo=$ac_try;;
24367 esac
24368 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24369   (eval "$ac_compile") 2>conftest.er1
24370   ac_status=$?
24371   grep -v '^ *+' conftest.er1 >conftest.err
24372   rm -f conftest.er1
24373   cat conftest.err >&5
24374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24375   (exit $ac_status); } && {
24376          test -z "$ac_c_werror_flag" ||
24377          test ! -s conftest.err
24378        } && test -s conftest.$ac_objext; then
24379   ac_hi=$ac_mid; break
24380 else
24381   echo "$as_me: failed program was:" >&5
24382 sed 's/^/| /' conftest.$ac_ext >&5
24383
24384         ac_lo=`expr $ac_mid + 1`
24385                         if test $ac_lo -le $ac_mid; then
24386                           ac_lo= ac_hi=
24387                           break
24388                         fi
24389                         ac_mid=`expr 2 '*' $ac_mid + 1`
24390 fi
24391
24392 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24393   done
24394 else
24395   echo "$as_me: failed program was:" >&5
24396 sed 's/^/| /' conftest.$ac_ext >&5
24397
24398         cat >conftest.$ac_ext <<_ACEOF
24399 /* confdefs.h.  */
24400 _ACEOF
24401 cat confdefs.h >>conftest.$ac_ext
24402 cat >>conftest.$ac_ext <<_ACEOF
24403 /* end confdefs.h.  */
24404 $ac_includes_default
24405    typedef off_t ac__type_sizeof_;
24406 int
24407 main ()
24408 {
24409 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
24410 test_array [0] = 0
24411
24412   ;
24413   return 0;
24414 }
24415 _ACEOF
24416 rm -f conftest.$ac_objext
24417 if { (ac_try="$ac_compile"
24418 case "(($ac_try" in
24419   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24420   *) ac_try_echo=$ac_try;;
24421 esac
24422 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24423   (eval "$ac_compile") 2>conftest.er1
24424   ac_status=$?
24425   grep -v '^ *+' conftest.er1 >conftest.err
24426   rm -f conftest.er1
24427   cat conftest.err >&5
24428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24429   (exit $ac_status); } && {
24430          test -z "$ac_c_werror_flag" ||
24431          test ! -s conftest.err
24432        } && test -s conftest.$ac_objext; then
24433   ac_hi=-1 ac_mid=-1
24434   while :; do
24435     cat >conftest.$ac_ext <<_ACEOF
24436 /* confdefs.h.  */
24437 _ACEOF
24438 cat confdefs.h >>conftest.$ac_ext
24439 cat >>conftest.$ac_ext <<_ACEOF
24440 /* end confdefs.h.  */
24441 $ac_includes_default
24442    typedef off_t ac__type_sizeof_;
24443 int
24444 main ()
24445 {
24446 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
24447 test_array [0] = 0
24448
24449   ;
24450   return 0;
24451 }
24452 _ACEOF
24453 rm -f conftest.$ac_objext
24454 if { (ac_try="$ac_compile"
24455 case "(($ac_try" in
24456   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24457   *) ac_try_echo=$ac_try;;
24458 esac
24459 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24460   (eval "$ac_compile") 2>conftest.er1
24461   ac_status=$?
24462   grep -v '^ *+' conftest.er1 >conftest.err
24463   rm -f conftest.er1
24464   cat conftest.err >&5
24465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24466   (exit $ac_status); } && {
24467          test -z "$ac_c_werror_flag" ||
24468          test ! -s conftest.err
24469        } && test -s conftest.$ac_objext; then
24470   ac_lo=$ac_mid; break
24471 else
24472   echo "$as_me: failed program was:" >&5
24473 sed 's/^/| /' conftest.$ac_ext >&5
24474
24475         ac_hi=`expr '(' $ac_mid ')' - 1`
24476                         if test $ac_mid -le $ac_hi; then
24477                           ac_lo= ac_hi=
24478                           break
24479                         fi
24480                         ac_mid=`expr 2 '*' $ac_mid`
24481 fi
24482
24483 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24484   done
24485 else
24486   echo "$as_me: failed program was:" >&5
24487 sed 's/^/| /' conftest.$ac_ext >&5
24488
24489         ac_lo= ac_hi=
24490 fi
24491
24492 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24493 fi
24494
24495 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24496 # Binary search between lo and hi bounds.
24497 while test "x$ac_lo" != "x$ac_hi"; do
24498   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24499   cat >conftest.$ac_ext <<_ACEOF
24500 /* confdefs.h.  */
24501 _ACEOF
24502 cat confdefs.h >>conftest.$ac_ext
24503 cat >>conftest.$ac_ext <<_ACEOF
24504 /* end confdefs.h.  */
24505 $ac_includes_default
24506    typedef off_t ac__type_sizeof_;
24507 int
24508 main ()
24509 {
24510 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
24511 test_array [0] = 0
24512
24513   ;
24514   return 0;
24515 }
24516 _ACEOF
24517 rm -f conftest.$ac_objext
24518 if { (ac_try="$ac_compile"
24519 case "(($ac_try" in
24520   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24521   *) ac_try_echo=$ac_try;;
24522 esac
24523 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24524   (eval "$ac_compile") 2>conftest.er1
24525   ac_status=$?
24526   grep -v '^ *+' conftest.er1 >conftest.err
24527   rm -f conftest.er1
24528   cat conftest.err >&5
24529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24530   (exit $ac_status); } && {
24531          test -z "$ac_c_werror_flag" ||
24532          test ! -s conftest.err
24533        } && test -s conftest.$ac_objext; then
24534   ac_hi=$ac_mid
24535 else
24536   echo "$as_me: failed program was:" >&5
24537 sed 's/^/| /' conftest.$ac_ext >&5
24538
24539         ac_lo=`expr '(' $ac_mid ')' + 1`
24540 fi
24541
24542 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24543 done
24544 case $ac_lo in
24545 ?*) ac_cv_sizeof_off_t=$ac_lo;;
24546 '') if test "$ac_cv_type_off_t" = yes; then
24547      { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
24548 See \`config.log' for more details." >&5
24549 echo "$as_me: error: cannot compute sizeof (off_t)
24550 See \`config.log' for more details." >&2;}
24551    { (exit 77); exit 77; }; }
24552    else
24553      ac_cv_sizeof_off_t=0
24554    fi ;;
24555 esac
24556 else
24557   cat >conftest.$ac_ext <<_ACEOF
24558 /* confdefs.h.  */
24559 _ACEOF
24560 cat confdefs.h >>conftest.$ac_ext
24561 cat >>conftest.$ac_ext <<_ACEOF
24562 /* end confdefs.h.  */
24563 $ac_includes_default
24564    typedef off_t ac__type_sizeof_;
24565 static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24566 static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
24567 #include <stdio.h>
24568 #include <stdlib.h>
24569 int
24570 main ()
24571 {
24572
24573   FILE *f = fopen ("conftest.val", "w");
24574   if (! f)
24575     return 1;
24576   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
24577     {
24578       long int i = longval ();
24579       if (i != ((long int) (sizeof (ac__type_sizeof_))))
24580         return 1;
24581       fprintf (f, "%ld\n", i);
24582     }
24583   else
24584     {
24585       unsigned long int i = ulongval ();
24586       if (i != ((long int) (sizeof (ac__type_sizeof_))))
24587         return 1;
24588       fprintf (f, "%lu\n", i);
24589     }
24590   return ferror (f) || fclose (f) != 0;
24591
24592   ;
24593   return 0;
24594 }
24595 _ACEOF
24596 rm -f conftest$ac_exeext
24597 if { (ac_try="$ac_link"
24598 case "(($ac_try" in
24599   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24600   *) ac_try_echo=$ac_try;;
24601 esac
24602 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24603   (eval "$ac_link") 2>&5
24604   ac_status=$?
24605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24606   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24607   { (case "(($ac_try" in
24608   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24609   *) ac_try_echo=$ac_try;;
24610 esac
24611 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24612   (eval "$ac_try") 2>&5
24613   ac_status=$?
24614   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24615   (exit $ac_status); }; }; then
24616   ac_cv_sizeof_off_t=`cat conftest.val`
24617 else
24618   echo "$as_me: program exited with status $ac_status" >&5
24619 echo "$as_me: failed program was:" >&5
24620 sed 's/^/| /' conftest.$ac_ext >&5
24621
24622 ( exit $ac_status )
24623 if test "$ac_cv_type_off_t" = yes; then
24624      { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
24625 See \`config.log' for more details." >&5
24626 echo "$as_me: error: cannot compute sizeof (off_t)
24627 See \`config.log' for more details." >&2;}
24628    { (exit 77); exit 77; }; }
24629    else
24630      ac_cv_sizeof_off_t=0
24631    fi
24632 fi
24633 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24634 fi
24635 rm -f conftest.val
24636 fi
24637 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
24638 echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
24639
24640
24641
24642 cat >>confdefs.h <<_ACEOF
24643 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
24644 _ACEOF
24645
24646
24647
24648 # If we don't have largefile support, can't handle segsize >= 2GB.
24649 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
24650    { { echo "$as_me:$LINENO: error: Large file support is not enabled. Segment size cannot be larger than 1GB." >&5
24651 echo "$as_me: error: Large file support is not enabled. Segment size cannot be larger than 1GB." >&2;}
24652    { (exit 1); exit 1; }; }
24653 fi
24654
24655 # SunOS doesn't handle negative byte comparisons properly with +/- return
24656 { echo "$as_me:$LINENO: checking for working memcmp" >&5
24657 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; }
24658 if test "${ac_cv_func_memcmp_working+set}" = set; then
24659   echo $ECHO_N "(cached) $ECHO_C" >&6
24660 else
24661   if test "$cross_compiling" = yes; then
24662   ac_cv_func_memcmp_working=no
24663 else
24664   cat >conftest.$ac_ext <<_ACEOF
24665 /* confdefs.h.  */
24666 _ACEOF
24667 cat confdefs.h >>conftest.$ac_ext
24668 cat >>conftest.$ac_ext <<_ACEOF
24669 /* end confdefs.h.  */
24670 $ac_includes_default
24671 int
24672 main ()
24673 {
24674
24675   /* Some versions of memcmp are not 8-bit clean.  */
24676   char c0 = '\100', c1 = '\200', c2 = '\201';
24677   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
24678     return 1;
24679
24680   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
24681      or more and with at least one buffer not starting on a 4-byte boundary.
24682      William Lewis provided this test program.   */
24683   {
24684     char foo[21];
24685     char bar[21];
24686     int i;
24687     for (i = 0; i < 4; i++)
24688       {
24689         char *a = foo + i;
24690         char *b = bar + i;
24691         strcpy (a, "--------01111111");
24692         strcpy (b, "--------10000000");
24693         if (memcmp (a, b, 16) >= 0)
24694           return 1;
24695       }
24696     return 0;
24697   }
24698
24699   ;
24700   return 0;
24701 }
24702 _ACEOF
24703 rm -f conftest$ac_exeext
24704 if { (ac_try="$ac_link"
24705 case "(($ac_try" in
24706   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24707   *) ac_try_echo=$ac_try;;
24708 esac
24709 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24710   (eval "$ac_link") 2>&5
24711   ac_status=$?
24712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24713   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24714   { (case "(($ac_try" in
24715   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24716   *) ac_try_echo=$ac_try;;
24717 esac
24718 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24719   (eval "$ac_try") 2>&5
24720   ac_status=$?
24721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24722   (exit $ac_status); }; }; then
24723   ac_cv_func_memcmp_working=yes
24724 else
24725   echo "$as_me: program exited with status $ac_status" >&5
24726 echo "$as_me: failed program was:" >&5
24727 sed 's/^/| /' conftest.$ac_ext >&5
24728
24729 ( exit $ac_status )
24730 ac_cv_func_memcmp_working=no
24731 fi
24732 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24733 fi
24734
24735
24736 fi
24737 { echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
24738 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; }
24739 test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
24740   *" memcmp.$ac_objext "* ) ;;
24741   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
24742  ;;
24743 esac
24744
24745
24746
24747
24748 # Select semaphore implementation type.
24749 if test "$PORTNAME" != "win32"; then
24750   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
24751
24752 cat >>confdefs.h <<\_ACEOF
24753 #define USE_NAMED_POSIX_SEMAPHORES 1
24754 _ACEOF
24755
24756     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
24757   else
24758     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
24759
24760 cat >>confdefs.h <<\_ACEOF
24761 #define USE_UNNAMED_POSIX_SEMAPHORES 1
24762 _ACEOF
24763
24764       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
24765     else
24766
24767 cat >>confdefs.h <<\_ACEOF
24768 #define USE_SYSV_SEMAPHORES 1
24769 _ACEOF
24770
24771       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
24772     fi
24773   fi
24774 else
24775
24776 cat >>confdefs.h <<\_ACEOF
24777 #define USE_WIN32_SEMAPHORES 1
24778 _ACEOF
24779
24780   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
24781 fi
24782
24783
24784 # Select shared-memory implementation type.
24785 if test "$PORTNAME" != "win32"; then
24786
24787 cat >>confdefs.h <<\_ACEOF
24788 #define USE_SYSV_SHARED_MEMORY 1
24789 _ACEOF
24790
24791   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
24792 else
24793
24794 cat >>confdefs.h <<\_ACEOF
24795 #define USE_WIN32_SHARED_MEMORY 1
24796 _ACEOF
24797
24798   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
24799 fi
24800
24801 # If not set in template file, set bytes to use libc memset()
24802 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
24803   MEMSET_LOOP_LIMIT=1024
24804 fi
24805
24806 cat >>confdefs.h <<_ACEOF
24807 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
24808 _ACEOF
24809
24810
24811
24812 if test "$enable_nls" = yes ; then
24813
24814   { echo "$as_me:$LINENO: checking for library containing bind_textdomain_codeset" >&5
24815 echo $ECHO_N "checking for library containing bind_textdomain_codeset... $ECHO_C" >&6; }
24816 if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then
24817   echo $ECHO_N "(cached) $ECHO_C" >&6
24818 else
24819   ac_func_search_save_LIBS=$LIBS
24820 cat >conftest.$ac_ext <<_ACEOF
24821 /* confdefs.h.  */
24822 _ACEOF
24823 cat confdefs.h >>conftest.$ac_ext
24824 cat >>conftest.$ac_ext <<_ACEOF
24825 /* end confdefs.h.  */
24826
24827 /* Override any GCC internal prototype to avoid an error.
24828    Use char because int might match the return type of a GCC
24829    builtin and then its argument prototype would still apply.  */
24830 #ifdef __cplusplus
24831 extern "C"
24832 #endif
24833 char bind_textdomain_codeset ();
24834 int
24835 main ()
24836 {
24837 return bind_textdomain_codeset ();
24838   ;
24839   return 0;
24840 }
24841 _ACEOF
24842 for ac_lib in '' intl; do
24843   if test -z "$ac_lib"; then
24844     ac_res="none required"
24845   else
24846     ac_res=-l$ac_lib
24847     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24848   fi
24849   rm -f conftest.$ac_objext conftest$ac_exeext
24850 if { (ac_try="$ac_link"
24851 case "(($ac_try" in
24852   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24853   *) ac_try_echo=$ac_try;;
24854 esac
24855 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24856   (eval "$ac_link") 2>conftest.er1
24857   ac_status=$?
24858   grep -v '^ *+' conftest.er1 >conftest.err
24859   rm -f conftest.er1
24860   cat conftest.err >&5
24861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24862   (exit $ac_status); } && {
24863          test -z "$ac_c_werror_flag" ||
24864          test ! -s conftest.err
24865        } && test -s conftest$ac_exeext &&
24866        $as_test_x conftest$ac_exeext; then
24867   ac_cv_search_bind_textdomain_codeset=$ac_res
24868 else
24869   echo "$as_me: failed program was:" >&5
24870 sed 's/^/| /' conftest.$ac_ext >&5
24871
24872
24873 fi
24874
24875 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24876       conftest$ac_exeext
24877   if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then
24878   break
24879 fi
24880 done
24881 if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then
24882   :
24883 else
24884   ac_cv_search_bind_textdomain_codeset=no
24885 fi
24886 rm conftest.$ac_ext
24887 LIBS=$ac_func_search_save_LIBS
24888 fi
24889 { echo "$as_me:$LINENO: result: $ac_cv_search_bind_textdomain_codeset" >&5
24890 echo "${ECHO_T}$ac_cv_search_bind_textdomain_codeset" >&6; }
24891 ac_res=$ac_cv_search_bind_textdomain_codeset
24892 if test "$ac_res" != no; then
24893   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24894
24895 else
24896   { { echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
24897 echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
24898    { (exit 1); exit 1; }; }
24899 fi
24900
24901   if test "${ac_cv_header_libintl_h+set}" = set; then
24902   { echo "$as_me:$LINENO: checking for libintl.h" >&5
24903 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
24904 if test "${ac_cv_header_libintl_h+set}" = set; then
24905   echo $ECHO_N "(cached) $ECHO_C" >&6
24906 fi
24907 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
24908 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
24909 else
24910   # Is the header compilable?
24911 { echo "$as_me:$LINENO: checking libintl.h usability" >&5
24912 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6; }
24913 cat >conftest.$ac_ext <<_ACEOF
24914 /* confdefs.h.  */
24915 _ACEOF
24916 cat confdefs.h >>conftest.$ac_ext
24917 cat >>conftest.$ac_ext <<_ACEOF
24918 /* end confdefs.h.  */
24919 $ac_includes_default
24920 #include <libintl.h>
24921 _ACEOF
24922 rm -f conftest.$ac_objext
24923 if { (ac_try="$ac_compile"
24924 case "(($ac_try" in
24925   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24926   *) ac_try_echo=$ac_try;;
24927 esac
24928 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24929   (eval "$ac_compile") 2>conftest.er1
24930   ac_status=$?
24931   grep -v '^ *+' conftest.er1 >conftest.err
24932   rm -f conftest.er1
24933   cat conftest.err >&5
24934   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24935   (exit $ac_status); } && {
24936          test -z "$ac_c_werror_flag" ||
24937          test ! -s conftest.err
24938        } && test -s conftest.$ac_objext; then
24939   ac_header_compiler=yes
24940 else
24941   echo "$as_me: failed program was:" >&5
24942 sed 's/^/| /' conftest.$ac_ext >&5
24943
24944         ac_header_compiler=no
24945 fi
24946
24947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24948 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24949 echo "${ECHO_T}$ac_header_compiler" >&6; }
24950
24951 # Is the header present?
24952 { echo "$as_me:$LINENO: checking libintl.h presence" >&5
24953 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6; }
24954 cat >conftest.$ac_ext <<_ACEOF
24955 /* confdefs.h.  */
24956 _ACEOF
24957 cat confdefs.h >>conftest.$ac_ext
24958 cat >>conftest.$ac_ext <<_ACEOF
24959 /* end confdefs.h.  */
24960 #include <libintl.h>
24961 _ACEOF
24962 if { (ac_try="$ac_cpp conftest.$ac_ext"
24963 case "(($ac_try" in
24964   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24965   *) ac_try_echo=$ac_try;;
24966 esac
24967 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24968   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
24969   ac_status=$?
24970   grep -v '^ *+' conftest.er1 >conftest.err
24971   rm -f conftest.er1
24972   cat conftest.err >&5
24973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24974   (exit $ac_status); } >/dev/null && {
24975          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24976          test ! -s conftest.err
24977        }; then
24978   ac_header_preproc=yes
24979 else
24980   echo "$as_me: failed program was:" >&5
24981 sed 's/^/| /' conftest.$ac_ext >&5
24982
24983   ac_header_preproc=no
24984 fi
24985
24986 rm -f conftest.err conftest.$ac_ext
24987 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24988 echo "${ECHO_T}$ac_header_preproc" >&6; }
24989
24990 # So?  What about this header?
24991 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24992   yes:no: )
24993     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
24994 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24995     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
24996 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
24997     ac_header_preproc=yes
24998     ;;
24999   no:yes:* )
25000     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
25001 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
25002     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
25003 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
25004     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
25005 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
25006     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
25007 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
25008     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
25009 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
25010     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
25011 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
25012     ( cat <<\_ASBOX
25013 ## ---------------------------------------- ##
25014 ## Report this to pgsql-bugs@postgresql.org ##
25015 ## ---------------------------------------- ##
25016 _ASBOX
25017      ) | sed "s/^/$as_me: WARNING:     /" >&2
25018     ;;
25019 esac
25020 { echo "$as_me:$LINENO: checking for libintl.h" >&5
25021 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
25022 if test "${ac_cv_header_libintl_h+set}" = set; then
25023   echo $ECHO_N "(cached) $ECHO_C" >&6
25024 else
25025   ac_cv_header_libintl_h=$ac_header_preproc
25026 fi
25027 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
25028 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
25029
25030 fi
25031 if test $ac_cv_header_libintl_h = yes; then
25032   :
25033 else
25034   { { echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
25035 echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
25036    { (exit 1); exit 1; }; }
25037 fi
25038
25039
25040   for ac_prog in msgfmt
25041 do
25042   # Extract the first word of "$ac_prog", so it can be a program name with args.
25043 set dummy $ac_prog; ac_word=$2
25044 { echo "$as_me:$LINENO: checking for $ac_word" >&5
25045 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
25046 if test "${ac_cv_prog_MSGFMT+set}" = set; then
25047   echo $ECHO_N "(cached) $ECHO_C" >&6
25048 else
25049   if test -n "$MSGFMT"; then
25050   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
25051 else
25052 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25053 for as_dir in $PATH
25054 do
25055   IFS=$as_save_IFS
25056   test -z "$as_dir" && as_dir=.
25057   for ac_exec_ext in '' $ac_executable_extensions; do
25058   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25059     ac_cv_prog_MSGFMT="$ac_prog"
25060     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25061     break 2
25062   fi
25063 done
25064 done
25065 IFS=$as_save_IFS
25066
25067 fi
25068 fi
25069 MSGFMT=$ac_cv_prog_MSGFMT
25070 if test -n "$MSGFMT"; then
25071   { echo "$as_me:$LINENO: result: $MSGFMT" >&5
25072 echo "${ECHO_T}$MSGFMT" >&6; }
25073 else
25074   { echo "$as_me:$LINENO: result: no" >&5
25075 echo "${ECHO_T}no" >&6; }
25076 fi
25077
25078
25079   test -n "$MSGFMT" && break
25080 done
25081
25082   if test -z "$MSGFMT"; then
25083     { { echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
25084 echo "$as_me: error: msgfmt is required for NLS" >&2;}
25085    { (exit 1); exit 1; }; }
25086   fi
25087   for ac_prog in msgmerge
25088 do
25089   # Extract the first word of "$ac_prog", so it can be a program name with args.
25090 set dummy $ac_prog; ac_word=$2
25091 { echo "$as_me:$LINENO: checking for $ac_word" >&5
25092 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
25093 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
25094   echo $ECHO_N "(cached) $ECHO_C" >&6
25095 else
25096   if test -n "$MSGMERGE"; then
25097   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
25098 else
25099 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25100 for as_dir in $PATH
25101 do
25102   IFS=$as_save_IFS
25103   test -z "$as_dir" && as_dir=.
25104   for ac_exec_ext in '' $ac_executable_extensions; do
25105   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25106     ac_cv_prog_MSGMERGE="$ac_prog"
25107     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25108     break 2
25109   fi
25110 done
25111 done
25112 IFS=$as_save_IFS
25113
25114 fi
25115 fi
25116 MSGMERGE=$ac_cv_prog_MSGMERGE
25117 if test -n "$MSGMERGE"; then
25118   { echo "$as_me:$LINENO: result: $MSGMERGE" >&5
25119 echo "${ECHO_T}$MSGMERGE" >&6; }
25120 else
25121   { echo "$as_me:$LINENO: result: no" >&5
25122 echo "${ECHO_T}no" >&6; }
25123 fi
25124
25125
25126   test -n "$MSGMERGE" && break
25127 done
25128
25129   for ac_prog in xgettext
25130 do
25131   # Extract the first word of "$ac_prog", so it can be a program name with args.
25132 set dummy $ac_prog; ac_word=$2
25133 { echo "$as_me:$LINENO: checking for $ac_word" >&5
25134 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
25135 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
25136   echo $ECHO_N "(cached) $ECHO_C" >&6
25137 else
25138   if test -n "$XGETTEXT"; then
25139   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
25140 else
25141 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25142 for as_dir in $PATH
25143 do
25144   IFS=$as_save_IFS
25145   test -z "$as_dir" && as_dir=.
25146   for ac_exec_ext in '' $ac_executable_extensions; do
25147   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25148     ac_cv_prog_XGETTEXT="$ac_prog"
25149     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25150     break 2
25151   fi
25152 done
25153 done
25154 IFS=$as_save_IFS
25155
25156 fi
25157 fi
25158 XGETTEXT=$ac_cv_prog_XGETTEXT
25159 if test -n "$XGETTEXT"; then
25160   { echo "$as_me:$LINENO: result: $XGETTEXT" >&5
25161 echo "${ECHO_T}$XGETTEXT" >&6; }
25162 else
25163   { echo "$as_me:$LINENO: result: no" >&5
25164 echo "${ECHO_T}no" >&6; }
25165 fi
25166
25167
25168   test -n "$XGETTEXT" && break
25169 done
25170
25171
25172 fi
25173
25174 # Check for Tcl configuration script tclConfig.sh
25175 if test "$with_tcl" = yes; then
25176     for ac_prog in tclsh tcl tclsh8.5 tclsh8.4 tclsh8.3
25177 do
25178   # Extract the first word of "$ac_prog", so it can be a program name with args.
25179 set dummy $ac_prog; ac_word=$2
25180 { echo "$as_me:$LINENO: checking for $ac_word" >&5
25181 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
25182 if test "${ac_cv_path_TCLSH+set}" = set; then
25183   echo $ECHO_N "(cached) $ECHO_C" >&6
25184 else
25185   case $TCLSH in
25186   [\\/]* | ?:[\\/]*)
25187   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
25188   ;;
25189   *)
25190   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25191 for as_dir in $PATH
25192 do
25193   IFS=$as_save_IFS
25194   test -z "$as_dir" && as_dir=.
25195   for ac_exec_ext in '' $ac_executable_extensions; do
25196   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25197     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
25198     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25199     break 2
25200   fi
25201 done
25202 done
25203 IFS=$as_save_IFS
25204
25205   ;;
25206 esac
25207 fi
25208 TCLSH=$ac_cv_path_TCLSH
25209 if test -n "$TCLSH"; then
25210   { echo "$as_me:$LINENO: result: $TCLSH" >&5
25211 echo "${ECHO_T}$TCLSH" >&6; }
25212 else
25213   { echo "$as_me:$LINENO: result: no" >&5
25214 echo "${ECHO_T}no" >&6; }
25215 fi
25216
25217
25218   test -n "$TCLSH" && break
25219 done
25220
25221 if test x"$TCLSH" = x""; then
25222   { { echo "$as_me:$LINENO: error: Tcl shell not found" >&5
25223 echo "$as_me: error: Tcl shell not found" >&2;}
25224    { (exit 1); exit 1; }; }
25225 fi
25226
25227 { echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
25228 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6; }
25229 # Let user override test
25230 if test -z "$TCL_CONFIG_SH"; then
25231     pgac_test_dirs="$with_tclconfig"
25232
25233     set X $pgac_test_dirs; shift
25234     if test $# -eq 0; then
25235         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
25236 echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
25237    { (exit 1); exit 1; }; }
25238         set X `echo 'puts $auto_path' | $TCLSH`; shift
25239     fi
25240
25241     for pgac_dir do
25242         if test -r "$pgac_dir/tclConfig.sh"; then
25243             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
25244             break
25245         fi
25246     done
25247 fi
25248
25249 if test -z "$TCL_CONFIG_SH"; then
25250     { echo "$as_me:$LINENO: result: no" >&5
25251 echo "${ECHO_T}no" >&6; }
25252     { { echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
25253 echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
25254    { (exit 1); exit 1; }; }
25255 else
25256     { echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
25257 echo "${ECHO_T}$TCL_CONFIG_SH" >&6; }
25258 fi
25259
25260
25261
25262     . "$TCL_CONFIG_SH"
25263 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
25264 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
25265 eval TCL_LIBS=\"$TCL_LIBS\"
25266 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
25267 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
25268
25269         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
25270     ac_save_CPPFLAGS=$CPPFLAGS
25271     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
25272     if test "${ac_cv_header_tcl_h+set}" = set; then
25273   { echo "$as_me:$LINENO: checking for tcl.h" >&5
25274 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6; }
25275 if test "${ac_cv_header_tcl_h+set}" = set; then
25276   echo $ECHO_N "(cached) $ECHO_C" >&6
25277 fi
25278 { echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
25279 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6; }
25280 else
25281   # Is the header compilable?
25282 { echo "$as_me:$LINENO: checking tcl.h usability" >&5
25283 echo $ECHO_N "checking tcl.h usability... $ECHO_C" >&6; }
25284 cat >conftest.$ac_ext <<_ACEOF
25285 /* confdefs.h.  */
25286 _ACEOF
25287 cat confdefs.h >>conftest.$ac_ext
25288 cat >>conftest.$ac_ext <<_ACEOF
25289 /* end confdefs.h.  */
25290 $ac_includes_default
25291 #include <tcl.h>
25292 _ACEOF
25293 rm -f conftest.$ac_objext
25294 if { (ac_try="$ac_compile"
25295 case "(($ac_try" in
25296   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25297   *) ac_try_echo=$ac_try;;
25298 esac
25299 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25300   (eval "$ac_compile") 2>conftest.er1
25301   ac_status=$?
25302   grep -v '^ *+' conftest.er1 >conftest.err
25303   rm -f conftest.er1
25304   cat conftest.err >&5
25305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25306   (exit $ac_status); } && {
25307          test -z "$ac_c_werror_flag" ||
25308          test ! -s conftest.err
25309        } && test -s conftest.$ac_objext; then
25310   ac_header_compiler=yes
25311 else
25312   echo "$as_me: failed program was:" >&5
25313 sed 's/^/| /' conftest.$ac_ext >&5
25314
25315         ac_header_compiler=no
25316 fi
25317
25318 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25319 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25320 echo "${ECHO_T}$ac_header_compiler" >&6; }
25321
25322 # Is the header present?
25323 { echo "$as_me:$LINENO: checking tcl.h presence" >&5
25324 echo $ECHO_N "checking tcl.h presence... $ECHO_C" >&6; }
25325 cat >conftest.$ac_ext <<_ACEOF
25326 /* confdefs.h.  */
25327 _ACEOF
25328 cat confdefs.h >>conftest.$ac_ext
25329 cat >>conftest.$ac_ext <<_ACEOF
25330 /* end confdefs.h.  */
25331 #include <tcl.h>
25332 _ACEOF
25333 if { (ac_try="$ac_cpp conftest.$ac_ext"
25334 case "(($ac_try" in
25335   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25336   *) ac_try_echo=$ac_try;;
25337 esac
25338 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25339   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
25340   ac_status=$?
25341   grep -v '^ *+' conftest.er1 >conftest.err
25342   rm -f conftest.er1
25343   cat conftest.err >&5
25344   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25345   (exit $ac_status); } >/dev/null && {
25346          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25347          test ! -s conftest.err
25348        }; then
25349   ac_header_preproc=yes
25350 else
25351   echo "$as_me: failed program was:" >&5
25352 sed 's/^/| /' conftest.$ac_ext >&5
25353
25354   ac_header_preproc=no
25355 fi
25356
25357 rm -f conftest.err conftest.$ac_ext
25358 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25359 echo "${ECHO_T}$ac_header_preproc" >&6; }
25360
25361 # So?  What about this header?
25362 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25363   yes:no: )
25364     { echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
25365 echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
25366     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
25367 echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
25368     ac_header_preproc=yes
25369     ;;
25370   no:yes:* )
25371     { echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
25372 echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
25373     { echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
25374 echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
25375     { echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
25376 echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
25377     { echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
25378 echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
25379     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
25380 echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
25381     { echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
25382 echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
25383     ( cat <<\_ASBOX
25384 ## ---------------------------------------- ##
25385 ## Report this to pgsql-bugs@postgresql.org ##
25386 ## ---------------------------------------- ##
25387 _ASBOX
25388      ) | sed "s/^/$as_me: WARNING:     /" >&2
25389     ;;
25390 esac
25391 { echo "$as_me:$LINENO: checking for tcl.h" >&5
25392 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6; }
25393 if test "${ac_cv_header_tcl_h+set}" = set; then
25394   echo $ECHO_N "(cached) $ECHO_C" >&6
25395 else
25396   ac_cv_header_tcl_h=$ac_header_preproc
25397 fi
25398 { echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
25399 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6; }
25400
25401 fi
25402 if test $ac_cv_header_tcl_h = yes; then
25403   :
25404 else
25405   { { echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
25406 echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
25407    { (exit 1); exit 1; }; }
25408 fi
25409
25410
25411     CPPFLAGS=$ac_save_CPPFLAGS
25412 fi
25413
25414 #
25415 # Check for DocBook and tools
25416 #
25417 for ac_prog in onsgmls nsgmls
25418 do
25419   # Extract the first word of "$ac_prog", so it can be a program name with args.
25420 set dummy $ac_prog; ac_word=$2
25421 { echo "$as_me:$LINENO: checking for $ac_word" >&5
25422 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
25423 if test "${ac_cv_prog_NSGMLS+set}" = set; then
25424   echo $ECHO_N "(cached) $ECHO_C" >&6
25425 else
25426   if test -n "$NSGMLS"; then
25427   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
25428 else
25429 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25430 for as_dir in $PATH
25431 do
25432   IFS=$as_save_IFS
25433   test -z "$as_dir" && as_dir=.
25434   for ac_exec_ext in '' $ac_executable_extensions; do
25435   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25436     ac_cv_prog_NSGMLS="$ac_prog"
25437     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25438     break 2
25439   fi
25440 done
25441 done
25442 IFS=$as_save_IFS
25443
25444 fi
25445 fi
25446 NSGMLS=$ac_cv_prog_NSGMLS
25447 if test -n "$NSGMLS"; then
25448   { echo "$as_me:$LINENO: result: $NSGMLS" >&5
25449 echo "${ECHO_T}$NSGMLS" >&6; }
25450 else
25451   { echo "$as_me:$LINENO: result: no" >&5
25452 echo "${ECHO_T}no" >&6; }
25453 fi
25454
25455
25456   test -n "$NSGMLS" && break
25457 done
25458
25459 for ac_prog in openjade jade
25460 do
25461   # Extract the first word of "$ac_prog", so it can be a program name with args.
25462 set dummy $ac_prog; ac_word=$2
25463 { echo "$as_me:$LINENO: checking for $ac_word" >&5
25464 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
25465 if test "${ac_cv_prog_JADE+set}" = set; then
25466   echo $ECHO_N "(cached) $ECHO_C" >&6
25467 else
25468   if test -n "$JADE"; then
25469   ac_cv_prog_JADE="$JADE" # Let the user override the test.
25470 else
25471 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25472 for as_dir in $PATH
25473 do
25474   IFS=$as_save_IFS
25475   test -z "$as_dir" && as_dir=.
25476   for ac_exec_ext in '' $ac_executable_extensions; do
25477   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25478     ac_cv_prog_JADE="$ac_prog"
25479     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25480     break 2
25481   fi
25482 done
25483 done
25484 IFS=$as_save_IFS
25485
25486 fi
25487 fi
25488 JADE=$ac_cv_prog_JADE
25489 if test -n "$JADE"; then
25490   { echo "$as_me:$LINENO: result: $JADE" >&5
25491 echo "${ECHO_T}$JADE" >&6; }
25492 else
25493   { echo "$as_me:$LINENO: result: no" >&5
25494 echo "${ECHO_T}no" >&6; }
25495 fi
25496
25497
25498   test -n "$JADE" && break
25499 done
25500
25501
25502 { echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
25503 echo $ECHO_N "checking for DocBook V4.2... $ECHO_C" >&6; }
25504 if test "${pgac_cv_check_docbook+set}" = set; then
25505   echo $ECHO_N "(cached) $ECHO_C" >&6
25506 else
25507   cat >conftest.sgml <<EOF
25508 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
25509 <book>
25510  <title>test</title>
25511  <chapter>
25512   <title>random</title>
25513    <sect1>
25514     <title>testsect</title>
25515     <para>text</para>
25516   </sect1>
25517  </chapter>
25518 </book>
25519 EOF
25520
25521 pgac_cv_check_docbook=no
25522
25523 if test -n "$NSGMLS"; then
25524   $NSGMLS -s conftest.sgml 1>&5 2>&1
25525   if test $? -eq 0; then
25526     pgac_cv_check_docbook=yes
25527   fi
25528 fi
25529 rm -f conftest.sgml
25530 fi
25531 { echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
25532 echo "${ECHO_T}$pgac_cv_check_docbook" >&6; }
25533
25534 have_docbook=$pgac_cv_check_docbook
25535
25536
25537 { echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
25538 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6; }
25539 if test "${pgac_cv_path_stylesheets+set}" = set; then
25540   echo $ECHO_N "(cached) $ECHO_C" >&6
25541 else
25542   if test -n "$DOCBOOKSTYLE"; then
25543   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
25544 else
25545   for pgac_prefix in /usr /usr/local /opt /sw; do
25546     for pgac_infix in share lib; do
25547       for pgac_postfix in \
25548         sgml/stylesheets/nwalsh-modular \
25549         sgml/stylesheets/docbook \
25550         sgml/stylesheets/dsssl/docbook \
25551         sgml/docbook-dsssl \
25552         sgml/docbook/dsssl/modular \
25553         sgml/docbook/stylesheet/dsssl/modular \
25554         sgml/docbook/dsssl-stylesheets \
25555         sgml/dsssl/docbook-dsssl-nwalsh
25556       do
25557         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
25558         if test -r "$pgac_candidate/html/docbook.dsl" \
25559            && test -r "$pgac_candidate/print/docbook.dsl"
25560         then
25561           pgac_cv_path_stylesheets=$pgac_candidate
25562           break 3
25563         fi
25564       done
25565     done
25566   done
25567 fi
25568 fi
25569
25570 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
25571
25572 if test -n "$DOCBOOKSTYLE"; then
25573   { echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
25574 echo "${ECHO_T}$DOCBOOKSTYLE" >&6; }
25575 else
25576   { echo "$as_me:$LINENO: result: no" >&5
25577 echo "${ECHO_T}no" >&6; }
25578 fi
25579 if test -n "$DOCBOOKSTYLE"; then
25580   for ac_prog in collateindex.pl
25581 do
25582   # Extract the first word of "$ac_prog", so it can be a program name with args.
25583 set dummy $ac_prog; ac_word=$2
25584 { echo "$as_me:$LINENO: checking for $ac_word" >&5
25585 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
25586 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
25587   echo $ECHO_N "(cached) $ECHO_C" >&6
25588 else
25589   case $COLLATEINDEX in
25590   [\\/]* | ?:[\\/]*)
25591   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
25592   ;;
25593   *)
25594   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25595 for as_dir in $DOCBOOKSTYLE/bin $PATH
25596 do
25597   IFS=$as_save_IFS
25598   test -z "$as_dir" && as_dir=.
25599   for ac_exec_ext in '' $ac_executable_extensions; do
25600   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25601     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
25602     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25603     break 2
25604   fi
25605 done
25606 done
25607 IFS=$as_save_IFS
25608
25609   ;;
25610 esac
25611 fi
25612 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
25613 if test -n "$COLLATEINDEX"; then
25614   { echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
25615 echo "${ECHO_T}$COLLATEINDEX" >&6; }
25616 else
25617   { echo "$as_me:$LINENO: result: no" >&5
25618 echo "${ECHO_T}no" >&6; }
25619 fi
25620
25621
25622   test -n "$COLLATEINDEX" && break
25623 done
25624
25625 else
25626   for ac_prog in collateindex.pl
25627 do
25628   # Extract the first word of "$ac_prog", so it can be a program name with args.
25629 set dummy $ac_prog; ac_word=$2
25630 { echo "$as_me:$LINENO: checking for $ac_word" >&5
25631 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
25632 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
25633   echo $ECHO_N "(cached) $ECHO_C" >&6
25634 else
25635   case $COLLATEINDEX in
25636   [\\/]* | ?:[\\/]*)
25637   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
25638   ;;
25639   *)
25640   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25641 for as_dir in $PATH
25642 do
25643   IFS=$as_save_IFS
25644   test -z "$as_dir" && as_dir=.
25645   for ac_exec_ext in '' $ac_executable_extensions; do
25646   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25647     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
25648     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25649     break 2
25650   fi
25651 done
25652 done
25653 IFS=$as_save_IFS
25654
25655   ;;
25656 esac
25657 fi
25658 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
25659 if test -n "$COLLATEINDEX"; then
25660   { echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
25661 echo "${ECHO_T}$COLLATEINDEX" >&6; }
25662 else
25663   { echo "$as_me:$LINENO: result: no" >&5
25664 echo "${ECHO_T}no" >&6; }
25665 fi
25666
25667
25668   test -n "$COLLATEINDEX" && break
25669 done
25670
25671 fi
25672 for ac_prog in sgmlspl
25673 do
25674   # Extract the first word of "$ac_prog", so it can be a program name with args.
25675 set dummy $ac_prog; ac_word=$2
25676 { echo "$as_me:$LINENO: checking for $ac_word" >&5
25677 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
25678 if test "${ac_cv_prog_SGMLSPL+set}" = set; then
25679   echo $ECHO_N "(cached) $ECHO_C" >&6
25680 else
25681   if test -n "$SGMLSPL"; then
25682   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
25683 else
25684 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25685 for as_dir in $PATH
25686 do
25687   IFS=$as_save_IFS
25688   test -z "$as_dir" && as_dir=.
25689   for ac_exec_ext in '' $ac_executable_extensions; do
25690   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25691     ac_cv_prog_SGMLSPL="$ac_prog"
25692     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25693     break 2
25694   fi
25695 done
25696 done
25697 IFS=$as_save_IFS
25698
25699 fi
25700 fi
25701 SGMLSPL=$ac_cv_prog_SGMLSPL
25702 if test -n "$SGMLSPL"; then
25703   { echo "$as_me:$LINENO: result: $SGMLSPL" >&5
25704 echo "${ECHO_T}$SGMLSPL" >&6; }
25705 else
25706   { echo "$as_me:$LINENO: result: no" >&5
25707 echo "${ECHO_T}no" >&6; }
25708 fi
25709
25710
25711   test -n "$SGMLSPL" && break
25712 done
25713
25714
25715 # Thread testing
25716
25717 # We have to run the thread test near the end so we have all our symbols
25718 # defined.  Cross compiling throws a warning.
25719 #
25720 if test "$enable_thread_safety_force" = yes; then
25721 if test "$PORTNAME" != "win32"
25722 then
25723   { echo "$as_me:$LINENO: WARNING:
25724 *** Skipping thread test program.  --enable-thread-safety-force was used.
25725 *** Run the program in src/test/thread on the your machine and add proper
25726 *** locking function calls to your applications to guarantee thread safety.
25727 " >&5
25728 echo "$as_me: WARNING:
25729 *** Skipping thread test program.  --enable-thread-safety-force was used.
25730 *** Run the program in src/test/thread on the your machine and add proper
25731 *** locking function calls to your applications to guarantee thread safety.
25732 " >&2;}
25733 else
25734 { echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
25735 echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
25736 fi
25737 elif test "$enable_thread_safety" = yes; then
25738 if test "$PORTNAME" != "win32"
25739 then
25740 { echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
25741 echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6; }
25742
25743 _CFLAGS="$CFLAGS"
25744 _LIBS="$LIBS"
25745 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
25746 LIBS="$LIBS $PTHREAD_LIBS"
25747 if test "$cross_compiling" = yes; then
25748   { echo "$as_me:$LINENO: result: maybe" >&5
25749 echo "${ECHO_T}maybe" >&6; }
25750   { echo "$as_me:$LINENO: WARNING:
25751 *** Skipping thread test program because of cross-compile build.
25752 *** Run the program in src/test/thread on the target machine.
25753 " >&5
25754 echo "$as_me: WARNING:
25755 *** Skipping thread test program because of cross-compile build.
25756 *** Run the program in src/test/thread on the target machine.
25757 " >&2;}
25758 else
25759   cat >conftest.$ac_ext <<_ACEOF
25760 /* confdefs.h.  */
25761 _ACEOF
25762 cat confdefs.h >>conftest.$ac_ext
25763 cat >>conftest.$ac_ext <<_ACEOF
25764 /* end confdefs.h.  */
25765 #include "$srcdir/src/test/thread/thread_test.c"
25766 _ACEOF
25767 rm -f conftest$ac_exeext
25768 if { (ac_try="$ac_link"
25769 case "(($ac_try" in
25770   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25771   *) ac_try_echo=$ac_try;;
25772 esac
25773 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25774   (eval "$ac_link") 2>&5
25775   ac_status=$?
25776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25777   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25778   { (case "(($ac_try" in
25779   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25780   *) ac_try_echo=$ac_try;;
25781 esac
25782 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25783   (eval "$ac_try") 2>&5
25784   ac_status=$?
25785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25786   (exit $ac_status); }; }; then
25787   { echo "$as_me:$LINENO: result: yes" >&5
25788 echo "${ECHO_T}yes" >&6; }
25789 else
25790   echo "$as_me: program exited with status $ac_status" >&5
25791 echo "$as_me: failed program was:" >&5
25792 sed 's/^/| /' conftest.$ac_ext >&5
25793
25794 ( exit $ac_status )
25795 { echo "$as_me:$LINENO: result: no" >&5
25796 echo "${ECHO_T}no" >&6; }
25797   { { echo "$as_me:$LINENO: error: thread test program failed
25798 This platform is not thread-safe.  Check the file 'config.log'for the
25799 exact reason.
25800
25801 You can use the configure option --enable-thread-safety-force to force
25802 threads to be enabled.  But you must then run the program in
25803 src/test/thread and add locking function calls to your applications to
25804 guarantee thread safety." >&5
25805 echo "$as_me: error: thread test program failed
25806 This platform is not thread-safe.  Check the file 'config.log'for the
25807 exact reason.
25808
25809 You can use the configure option --enable-thread-safety-force to force
25810 threads to be enabled.  But you must then run the program in
25811 src/test/thread and add locking function calls to your applications to
25812 guarantee thread safety." >&2;}
25813    { (exit 1); exit 1; }; }
25814 fi
25815 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25816 fi
25817
25818
25819 CFLAGS="$_CFLAGS"
25820 LIBS="$_LIBS"
25821 else
25822 { echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
25823 echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
25824 fi
25825 fi
25826
25827 # If compiler will take -Wl,--as-needed then add that to LDFLAGS.
25828 # This is much easier than trying to filter LIBS to the minimum for each
25829 # executable.  (Note that shared library links won't use this switch, though.)
25830 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
25831 # libreadline; therefore we postpone testing it until we know what library
25832 # dependencies readline has.  The test code will try to link with $LIBS.
25833 if test "$with_readline" = yes; then
25834   link_test_func=readline
25835 else
25836   link_test_func=exit
25837 fi
25838 if test "$PORTNAME" != "darwin"; then
25839   { echo "$as_me:$LINENO: checking if $CC supports -Wl,--as-needed" >&5
25840 echo $ECHO_N "checking if $CC supports -Wl,--as-needed... $ECHO_C" >&6; }
25841 pgac_save_LDFLAGS=$LDFLAGS
25842 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
25843 if test "$cross_compiling" = yes; then
25844   LDFLAGS="$pgac_save_LDFLAGS"
25845                { echo "$as_me:$LINENO: result: assuming no" >&5
25846 echo "${ECHO_T}assuming no" >&6; }
25847 else
25848   cat >conftest.$ac_ext <<_ACEOF
25849 /* confdefs.h.  */
25850 _ACEOF
25851 cat confdefs.h >>conftest.$ac_ext
25852 cat >>conftest.$ac_ext <<_ACEOF
25853 /* end confdefs.h.  */
25854 extern void $link_test_func (); void (*fptr) () = $link_test_func;
25855 int
25856 main ()
25857 {
25858
25859   ;
25860   return 0;
25861 }
25862 _ACEOF
25863 rm -f conftest$ac_exeext
25864 if { (ac_try="$ac_link"
25865 case "(($ac_try" in
25866   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25867   *) ac_try_echo=$ac_try;;
25868 esac
25869 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25870   (eval "$ac_link") 2>&5
25871   ac_status=$?
25872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25873   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25874   { (case "(($ac_try" in
25875   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25876   *) ac_try_echo=$ac_try;;
25877 esac
25878 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25879   (eval "$ac_try") 2>&5
25880   ac_status=$?
25881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25882   (exit $ac_status); }; }; then
25883   { echo "$as_me:$LINENO: result: yes" >&5
25884 echo "${ECHO_T}yes" >&6; }
25885 else
25886   echo "$as_me: program exited with status $ac_status" >&5
25887 echo "$as_me: failed program was:" >&5
25888 sed 's/^/| /' conftest.$ac_ext >&5
25889
25890 ( exit $ac_status )
25891 LDFLAGS="$pgac_save_LDFLAGS"
25892                { echo "$as_me:$LINENO: result: no" >&5
25893 echo "${ECHO_T}no" >&6; }
25894 fi
25895 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25896 fi
25897
25898
25899
25900 else
25901   # On Darwin it's spelled -Wl,-dead_strip_dylibs, but don't try that elsewhere
25902   { echo "$as_me:$LINENO: checking if $CC supports -Wl,-dead_strip_dylibs" >&5
25903 echo $ECHO_N "checking if $CC supports -Wl,-dead_strip_dylibs... $ECHO_C" >&6; }
25904 pgac_save_LDFLAGS=$LDFLAGS
25905 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
25906 if test "$cross_compiling" = yes; then
25907   LDFLAGS="$pgac_save_LDFLAGS"
25908                { echo "$as_me:$LINENO: result: assuming no" >&5
25909 echo "${ECHO_T}assuming no" >&6; }
25910 else
25911   cat >conftest.$ac_ext <<_ACEOF
25912 /* confdefs.h.  */
25913 _ACEOF
25914 cat confdefs.h >>conftest.$ac_ext
25915 cat >>conftest.$ac_ext <<_ACEOF
25916 /* end confdefs.h.  */
25917 extern void $link_test_func (); void (*fptr) () = $link_test_func;
25918 int
25919 main ()
25920 {
25921
25922   ;
25923   return 0;
25924 }
25925 _ACEOF
25926 rm -f conftest$ac_exeext
25927 if { (ac_try="$ac_link"
25928 case "(($ac_try" in
25929   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25930   *) ac_try_echo=$ac_try;;
25931 esac
25932 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25933   (eval "$ac_link") 2>&5
25934   ac_status=$?
25935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25936   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25937   { (case "(($ac_try" in
25938   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25939   *) ac_try_echo=$ac_try;;
25940 esac
25941 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25942   (eval "$ac_try") 2>&5
25943   ac_status=$?
25944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25945   (exit $ac_status); }; }; then
25946   { echo "$as_me:$LINENO: result: yes" >&5
25947 echo "${ECHO_T}yes" >&6; }
25948 else
25949   echo "$as_me: program exited with status $ac_status" >&5
25950 echo "$as_me: failed program was:" >&5
25951 sed 's/^/| /' conftest.$ac_ext >&5
25952
25953 ( exit $ac_status )
25954 LDFLAGS="$pgac_save_LDFLAGS"
25955                { echo "$as_me:$LINENO: result: no" >&5
25956 echo "${ECHO_T}no" >&6; }
25957 fi
25958 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25959 fi
25960
25961
25962
25963 fi
25964
25965
25966 # Begin output steps
25967
25968 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
25969 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
25970 { echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
25971 echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
25972 { echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
25973 echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
25974
25975 # prepare build tree if outside source tree
25976 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
25977 # Note 2: /bin/pwd might be better than shell's built-in at getting
25978 #         a symlink-free name.
25979 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
25980   vpath_build=no
25981 else
25982   vpath_build=yes
25983   if test "$no_create" != yes; then
25984     echo $ECHO_N "preparing build tree... $ECHO_C" >&6
25985     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
25986     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
25987       || { { echo "$as_me:$LINENO: error: failed" >&5
25988 echo "$as_me: error: failed" >&2;}
25989    { (exit 1); exit 1; }; }
25990     { echo "$as_me:$LINENO: result: done" >&5
25991 echo "${ECHO_T}done" >&6; }
25992   fi
25993 fi
25994
25995
25996
25997 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
25998
25999
26000 ac_config_links="$ac_config_links src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION} src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION} src/include/dynloader.h:src/backend/port/dynloader/${template}.h src/include/pg_config_os.h:src/include/port/${template}.h src/Makefile.port:src/makefiles/Makefile.${template}"
26001
26002
26003 if test "$PORTNAME" = "win32"; then
26004 ac_config_commands="$ac_config_commands check_win32_symlinks"
26005
26006 fi
26007
26008 ac_config_headers="$ac_config_headers src/include/pg_config.h"
26009
26010
26011 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
26012
26013
26014 cat >confcache <<\_ACEOF
26015 # This file is a shell script that caches the results of configure
26016 # tests run on this system so they can be shared between configure
26017 # scripts and configure runs, see configure's option --config-cache.
26018 # It is not useful on other systems.  If it contains results you don't
26019 # want to keep, you may remove or edit it.
26020 #
26021 # config.status only pays attention to the cache file if you give it
26022 # the --recheck option to rerun configure.
26023 #
26024 # `ac_cv_env_foo' variables (set or unset) will be overridden when
26025 # loading this file, other *unset* `ac_cv_foo' will be assigned the
26026 # following values.
26027
26028 _ACEOF
26029
26030 # The following way of writing the cache mishandles newlines in values,
26031 # but we know of no workaround that is simple, portable, and efficient.
26032 # So, we kill variables containing newlines.
26033 # Ultrix sh set writes to stderr and can't be redirected directly,
26034 # and sets the high bit in the cache file unless we assign to the vars.
26035 (
26036   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26037     eval ac_val=\$$ac_var
26038     case $ac_val in #(
26039     *${as_nl}*)
26040       case $ac_var in #(
26041       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
26042 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
26043       esac
26044       case $ac_var in #(
26045       _ | IFS | as_nl) ;; #(
26046       *) $as_unset $ac_var ;;
26047       esac ;;
26048     esac
26049   done
26050
26051   (set) 2>&1 |
26052     case $as_nl`(ac_space=' '; set) 2>&1` in #(
26053     *${as_nl}ac_space=\ *)
26054       # `set' does not quote correctly, so add quotes (double-quote
26055       # substitution turns \\\\ into \\, and sed turns \\ into \).
26056       sed -n \
26057         "s/'/'\\\\''/g;
26058           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26059       ;; #(
26060     *)
26061       # `set' quotes correctly as required by POSIX, so do not add quotes.
26062       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
26063       ;;
26064     esac |
26065     sort
26066 ) |
26067   sed '
26068      /^ac_cv_env_/b end
26069      t clear
26070      :clear
26071      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26072      t end
26073      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26074      :end' >>confcache
26075 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26076   if test -w "$cache_file"; then
26077     test "x$cache_file" != "x/dev/null" &&
26078       { echo "$as_me:$LINENO: updating cache $cache_file" >&5
26079 echo "$as_me: updating cache $cache_file" >&6;}
26080     cat confcache >$cache_file
26081   else
26082     { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
26083 echo "$as_me: not updating unwritable cache $cache_file" >&6;}
26084   fi
26085 fi
26086 rm -f confcache
26087
26088 test "x$prefix" = xNONE && prefix=$ac_default_prefix
26089 # Let make expand exec_prefix.
26090 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26091
26092 DEFS=-DHAVE_CONFIG_H
26093
26094 ac_libobjs=
26095 ac_ltlibobjs=
26096 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26097   # 1. Remove the extension, and $U if already installed.
26098   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
26099   ac_i=`echo "$ac_i" | sed "$ac_script"`
26100   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
26101   #    will be set to the directory where LIBOBJS objects are built.
26102   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26103   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
26104 done
26105 LIBOBJS=$ac_libobjs
26106
26107 LTLIBOBJS=$ac_ltlibobjs
26108
26109
26110
26111 : ${CONFIG_STATUS=./config.status}
26112 ac_clean_files_save=$ac_clean_files
26113 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26114 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
26115 echo "$as_me: creating $CONFIG_STATUS" >&6;}
26116 cat >$CONFIG_STATUS <<_ACEOF
26117 #! $SHELL
26118 # Generated by $as_me.
26119 # Run this file to recreate the current configuration.
26120 # Compiler output produced by configure, useful for debugging
26121 # configure, is in config.log if it exists.
26122
26123 debug=false
26124 ac_cs_recheck=false
26125 ac_cs_silent=false
26126 SHELL=\${CONFIG_SHELL-$SHELL}
26127 _ACEOF
26128
26129 cat >>$CONFIG_STATUS <<\_ACEOF
26130 ## --------------------- ##
26131 ## M4sh Initialization.  ##
26132 ## --------------------- ##
26133
26134 # Be more Bourne compatible
26135 DUALCASE=1; export DUALCASE # for MKS sh
26136 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26137   emulate sh
26138   NULLCMD=:
26139   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
26140   # is contrary to our usage.  Disable this feature.
26141   alias -g '${1+"$@"}'='"$@"'
26142   setopt NO_GLOB_SUBST
26143 else
26144   case `(set -o) 2>/dev/null` in
26145   *posix*) set -o posix ;;
26146 esac
26147
26148 fi
26149
26150
26151
26152
26153 # PATH needs CR
26154 # Avoid depending upon Character Ranges.
26155 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26156 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26157 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26158 as_cr_digits='0123456789'
26159 as_cr_alnum=$as_cr_Letters$as_cr_digits
26160
26161 # The user is always right.
26162 if test "${PATH_SEPARATOR+set}" != set; then
26163   echo "#! /bin/sh" >conf$$.sh
26164   echo  "exit 0"   >>conf$$.sh
26165   chmod +x conf$$.sh
26166   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
26167     PATH_SEPARATOR=';'
26168   else
26169     PATH_SEPARATOR=:
26170   fi
26171   rm -f conf$$.sh
26172 fi
26173
26174 # Support unset when possible.
26175 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26176   as_unset=unset
26177 else
26178   as_unset=false
26179 fi
26180
26181
26182 # IFS
26183 # We need space, tab and new line, in precisely that order.  Quoting is
26184 # there to prevent editors from complaining about space-tab.
26185 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
26186 # splitting by setting IFS to empty value.)
26187 as_nl='
26188 '
26189 IFS=" ""        $as_nl"
26190
26191 # Find who we are.  Look in the path if we contain no directory separator.
26192 case $0 in
26193   *[\\/]* ) as_myself=$0 ;;
26194   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26195 for as_dir in $PATH
26196 do
26197   IFS=$as_save_IFS
26198   test -z "$as_dir" && as_dir=.
26199   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26200 done
26201 IFS=$as_save_IFS
26202
26203      ;;
26204 esac
26205 # We did not find ourselves, most probably we were run as `sh COMMAND'
26206 # in which case we are not to be found in the path.
26207 if test "x$as_myself" = x; then
26208   as_myself=$0
26209 fi
26210 if test ! -f "$as_myself"; then
26211   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
26212   { (exit 1); exit 1; }
26213 fi
26214
26215 # Work around bugs in pre-3.0 UWIN ksh.
26216 for as_var in ENV MAIL MAILPATH
26217 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26218 done
26219 PS1='$ '
26220 PS2='> '
26221 PS4='+ '
26222
26223 # NLS nuisances.
26224 for as_var in \
26225   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
26226   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
26227   LC_TELEPHONE LC_TIME
26228 do
26229   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
26230     eval $as_var=C; export $as_var
26231   else
26232     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26233   fi
26234 done
26235
26236 # Required to use basename.
26237 if expr a : '\(a\)' >/dev/null 2>&1 &&
26238    test "X`expr 00001 : '.*\(...\)'`" = X001; then
26239   as_expr=expr
26240 else
26241   as_expr=false
26242 fi
26243
26244 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26245   as_basename=basename
26246 else
26247   as_basename=false
26248 fi
26249
26250
26251 # Name of the executable.
26252 as_me=`$as_basename -- "$0" ||
26253 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26254          X"$0" : 'X\(//\)$' \| \
26255          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
26256 echo X/"$0" |
26257     sed '/^.*\/\([^/][^/]*\)\/*$/{
26258             s//\1/
26259             q
26260           }
26261           /^X\/\(\/\/\)$/{
26262             s//\1/
26263             q
26264           }
26265           /^X\/\(\/\).*/{
26266             s//\1/
26267             q
26268           }
26269           s/.*/./; q'`
26270
26271 # CDPATH.
26272 $as_unset CDPATH
26273
26274
26275
26276   as_lineno_1=$LINENO
26277   as_lineno_2=$LINENO
26278   test "x$as_lineno_1" != "x$as_lineno_2" &&
26279   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
26280
26281   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
26282   # uniformly replaced by the line number.  The first 'sed' inserts a
26283   # line-number line after each line using $LINENO; the second 'sed'
26284   # does the real work.  The second script uses 'N' to pair each
26285   # line-number line with the line containing $LINENO, and appends
26286   # trailing '-' during substitution so that $LINENO is not a special
26287   # case at line end.
26288   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
26289   # scripts with optimization help from Paolo Bonzini.  Blame Lee
26290   # E. McMahon (1931-1989) for sed's syntax.  :-)
26291   sed -n '
26292     p
26293     /[$]LINENO/=
26294   ' <$as_myself |
26295     sed '
26296       s/[$]LINENO.*/&-/
26297       t lineno
26298       b
26299       :lineno
26300       N
26301       :loop
26302       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
26303       t loop
26304       s/-\n.*//
26305     ' >$as_me.lineno &&
26306   chmod +x "$as_me.lineno" ||
26307     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
26308    { (exit 1); exit 1; }; }
26309
26310   # Don't try to exec as it changes $[0], causing all sort of problems
26311   # (the dirname of $[0] is not the place where we might find the
26312   # original and so on.  Autoconf is especially sensitive to this).
26313   . "./$as_me.lineno"
26314   # Exit status is that of the last command.
26315   exit
26316 }
26317
26318
26319 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26320   as_dirname=dirname
26321 else
26322   as_dirname=false
26323 fi
26324
26325 ECHO_C= ECHO_N= ECHO_T=
26326 case `echo -n x` in
26327 -n*)
26328   case `echo 'x\c'` in
26329   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
26330   *)   ECHO_C='\c';;
26331   esac;;
26332 *)
26333   ECHO_N='-n';;
26334 esac
26335
26336 if expr a : '\(a\)' >/dev/null 2>&1 &&
26337    test "X`expr 00001 : '.*\(...\)'`" = X001; then
26338   as_expr=expr
26339 else
26340   as_expr=false
26341 fi
26342
26343 rm -f conf$$ conf$$.exe conf$$.file
26344 if test -d conf$$.dir; then
26345   rm -f conf$$.dir/conf$$.file
26346 else
26347   rm -f conf$$.dir
26348   mkdir conf$$.dir
26349 fi
26350 echo >conf$$.file
26351 if ln -s conf$$.file conf$$ 2>/dev/null; then
26352   as_ln_s='ln -s'
26353   # ... but there are two gotchas:
26354   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26355   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
26356   # In both cases, we have to default to `cp -p'.
26357   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
26358     as_ln_s='cp -p'
26359 elif ln conf$$.file conf$$ 2>/dev/null; then
26360   as_ln_s=ln
26361 else
26362   as_ln_s='cp -p'
26363 fi
26364 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26365 rmdir conf$$.dir 2>/dev/null
26366
26367 if mkdir -p . 2>/dev/null; then
26368   as_mkdir_p=:
26369 else
26370   test -d ./-p && rmdir ./-p
26371   as_mkdir_p=false
26372 fi
26373
26374 if test -x / >/dev/null 2>&1; then
26375   as_test_x='test -x'
26376 else
26377   if ls -dL / >/dev/null 2>&1; then
26378     as_ls_L_option=L
26379   else
26380     as_ls_L_option=
26381   fi
26382   as_test_x='
26383     eval sh -c '\''
26384       if test -d "$1"; then
26385         test -d "$1/.";
26386       else
26387         case $1 in
26388         -*)set "./$1";;
26389         esac;
26390         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
26391         ???[sx]*):;;*)false;;esac;fi
26392     '\'' sh
26393   '
26394 fi
26395 as_executable_p=$as_test_x
26396
26397 # Sed expression to map a string onto a valid CPP name.
26398 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
26399
26400 # Sed expression to map a string onto a valid variable name.
26401 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
26402
26403
26404 exec 6>&1
26405
26406 # Save the log message, to keep $[0] and so on meaningful, and to
26407 # report actual input values of CONFIG_FILES etc. instead of their
26408 # values after options handling.
26409 ac_log="
26410 This file was extended by PostgreSQL $as_me 8.4devel, which was
26411 generated by GNU Autoconf 2.61.  Invocation command line was
26412
26413   CONFIG_FILES    = $CONFIG_FILES
26414   CONFIG_HEADERS  = $CONFIG_HEADERS
26415   CONFIG_LINKS    = $CONFIG_LINKS
26416   CONFIG_COMMANDS = $CONFIG_COMMANDS
26417   $ $0 $@
26418
26419 on `(hostname || uname -n) 2>/dev/null | sed 1q`
26420 "
26421
26422 _ACEOF
26423
26424 cat >>$CONFIG_STATUS <<_ACEOF
26425 # Files that config.status was made for.
26426 config_files="$ac_config_files"
26427 config_headers="$ac_config_headers"
26428 config_links="$ac_config_links"
26429 config_commands="$ac_config_commands"
26430
26431 _ACEOF
26432
26433 cat >>$CONFIG_STATUS <<\_ACEOF
26434 ac_cs_usage="\
26435 \`$as_me' instantiates files from templates according to the
26436 current configuration.
26437
26438 Usage: $0 [OPTIONS] [FILE]...
26439
26440   -h, --help       print this help, then exit
26441   -V, --version    print version number and configuration settings, then exit
26442   -q, --quiet      do not print progress messages
26443   -d, --debug      don't remove temporary files
26444       --recheck    update $as_me by reconfiguring in the same conditions
26445   --file=FILE[:TEMPLATE]
26446                    instantiate the configuration file FILE
26447   --header=FILE[:TEMPLATE]
26448                    instantiate the configuration header FILE
26449
26450 Configuration files:
26451 $config_files
26452
26453 Configuration headers:
26454 $config_headers
26455
26456 Configuration links:
26457 $config_links
26458
26459 Configuration commands:
26460 $config_commands
26461
26462 Report bugs to <bug-autoconf@gnu.org>."
26463
26464 _ACEOF
26465 cat >>$CONFIG_STATUS <<_ACEOF
26466 ac_cs_version="\\
26467 PostgreSQL config.status 8.4devel
26468 configured by $0, generated by GNU Autoconf 2.61,
26469   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
26470
26471 Copyright (C) 2006 Free Software Foundation, Inc.
26472 This config.status script is free software; the Free Software Foundation
26473 gives unlimited permission to copy, distribute and modify it."
26474
26475 ac_pwd='$ac_pwd'
26476 srcdir='$srcdir'
26477 _ACEOF
26478
26479 cat >>$CONFIG_STATUS <<\_ACEOF
26480 # If no file are specified by the user, then we need to provide default
26481 # value.  By we need to know if files were specified by the user.
26482 ac_need_defaults=:
26483 while test $# != 0
26484 do
26485   case $1 in
26486   --*=*)
26487     ac_option=`expr "X$1" : 'X\([^=]*\)='`
26488     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
26489     ac_shift=:
26490     ;;
26491   *)
26492     ac_option=$1
26493     ac_optarg=$2
26494     ac_shift=shift
26495     ;;
26496   esac
26497
26498   case $ac_option in
26499   # Handling of the options.
26500   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26501     ac_cs_recheck=: ;;
26502   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
26503     echo "$ac_cs_version"; exit ;;
26504   --debug | --debu | --deb | --de | --d | -d )
26505     debug=: ;;
26506   --file | --fil | --fi | --f )
26507     $ac_shift
26508     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
26509     ac_need_defaults=false;;
26510   --header | --heade | --head | --hea )
26511     $ac_shift
26512     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
26513     ac_need_defaults=false;;
26514   --he | --h)
26515     # Conflict between --help and --header
26516     { echo "$as_me: error: ambiguous option: $1
26517 Try \`$0 --help' for more information." >&2
26518    { (exit 1); exit 1; }; };;
26519   --help | --hel | -h )
26520     echo "$ac_cs_usage"; exit ;;
26521   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26522   | -silent | --silent | --silen | --sile | --sil | --si | --s)
26523     ac_cs_silent=: ;;
26524
26525   # This is an error.
26526   -*) { echo "$as_me: error: unrecognized option: $1
26527 Try \`$0 --help' for more information." >&2
26528    { (exit 1); exit 1; }; } ;;
26529
26530   *) ac_config_targets="$ac_config_targets $1"
26531      ac_need_defaults=false ;;
26532
26533   esac
26534   shift
26535 done
26536
26537 ac_configure_extra_args=
26538
26539 if $ac_cs_silent; then
26540   exec 6>/dev/null
26541   ac_configure_extra_args="$ac_configure_extra_args --silent"
26542 fi
26543
26544 _ACEOF
26545 cat >>$CONFIG_STATUS <<_ACEOF
26546 if \$ac_cs_recheck; then
26547   echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
26548   CONFIG_SHELL=$SHELL
26549   export CONFIG_SHELL
26550   exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
26551 fi
26552
26553 _ACEOF
26554 cat >>$CONFIG_STATUS <<\_ACEOF
26555 exec 5>>config.log
26556 {
26557   echo
26558   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26559 ## Running $as_me. ##
26560 _ASBOX
26561   echo "$ac_log"
26562 } >&5
26563
26564 _ACEOF
26565 cat >>$CONFIG_STATUS <<_ACEOF
26566 _ACEOF
26567
26568 cat >>$CONFIG_STATUS <<\_ACEOF
26569
26570 # Handling of arguments.
26571 for ac_config_target in $ac_config_targets
26572 do
26573   case $ac_config_target in
26574     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
26575     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
26576     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
26577     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
26578     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
26579     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
26580     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
26581     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
26582     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
26583     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
26584     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
26585     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
26586
26587   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
26588 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
26589    { (exit 1); exit 1; }; };;
26590   esac
26591 done
26592
26593
26594 # If the user did not use the arguments to specify the items to instantiate,
26595 # then the envvar interface is used.  Set only those that are not.
26596 # We use the long form for the default assignment because of an extremely
26597 # bizarre bug on SunOS 4.1.3.
26598 if $ac_need_defaults; then
26599   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26600   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26601   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
26602   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
26603 fi
26604
26605 # Have a temporary directory for convenience.  Make it in the build tree
26606 # simply because there is no reason against having it here, and in addition,
26607 # creating and moving files from /tmp can sometimes cause problems.
26608 # Hook for its removal unless debugging.
26609 # Note that there is a small window in which the directory will not be cleaned:
26610 # after its creation but before its name has been assigned to `$tmp'.
26611 $debug ||
26612 {
26613   tmp=
26614   trap 'exit_status=$?
26615   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
26616 ' 0
26617   trap '{ (exit 1); exit 1; }' 1 2 13 15
26618 }
26619 # Create a (secure) tmp directory for tmp files.
26620
26621 {
26622   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
26623   test -n "$tmp" && test -d "$tmp"
26624 }  ||
26625 {
26626   tmp=./conf$$-$RANDOM
26627   (umask 077 && mkdir "$tmp")
26628 } ||
26629 {
26630    echo "$me: cannot create a temporary directory in ." >&2
26631    { (exit 1); exit 1; }
26632 }
26633
26634 #
26635 # Set up the sed scripts for CONFIG_FILES section.
26636 #
26637
26638 # No need to generate the scripts if there are no CONFIG_FILES.
26639 # This happens for instance when ./config.status config.h
26640 if test -n "$CONFIG_FILES"; then
26641
26642 _ACEOF
26643
26644
26645
26646 ac_delim='%!_!# '
26647 for ac_last_try in false false false false false :; do
26648   cat >conf$$subs.sed <<_ACEOF
26649 SHELL!$SHELL$ac_delim
26650 PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
26651 PACKAGE_NAME!$PACKAGE_NAME$ac_delim
26652 PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
26653 PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
26654 PACKAGE_STRING!$PACKAGE_STRING$ac_delim
26655 PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
26656 exec_prefix!$exec_prefix$ac_delim
26657 prefix!$prefix$ac_delim
26658 program_transform_name!$program_transform_name$ac_delim
26659 bindir!$bindir$ac_delim
26660 sbindir!$sbindir$ac_delim
26661 libexecdir!$libexecdir$ac_delim
26662 datarootdir!$datarootdir$ac_delim
26663 datadir!$datadir$ac_delim
26664 sysconfdir!$sysconfdir$ac_delim
26665 sharedstatedir!$sharedstatedir$ac_delim
26666 localstatedir!$localstatedir$ac_delim
26667 includedir!$includedir$ac_delim
26668 oldincludedir!$oldincludedir$ac_delim
26669 docdir!$docdir$ac_delim
26670 infodir!$infodir$ac_delim
26671 htmldir!$htmldir$ac_delim
26672 dvidir!$dvidir$ac_delim
26673 pdfdir!$pdfdir$ac_delim
26674 psdir!$psdir$ac_delim
26675 libdir!$libdir$ac_delim
26676 localedir!$localedir$ac_delim
26677 mandir!$mandir$ac_delim
26678 DEFS!$DEFS$ac_delim
26679 ECHO_C!$ECHO_C$ac_delim
26680 ECHO_N!$ECHO_N$ac_delim
26681 ECHO_T!$ECHO_T$ac_delim
26682 LIBS!$LIBS$ac_delim
26683 build_alias!$build_alias$ac_delim
26684 host_alias!$host_alias$ac_delim
26685 target_alias!$target_alias$ac_delim
26686 configure_args!$configure_args$ac_delim
26687 build!$build$ac_delim
26688 build_cpu!$build_cpu$ac_delim
26689 build_vendor!$build_vendor$ac_delim
26690 build_os!$build_os$ac_delim
26691 host!$host$ac_delim
26692 host_cpu!$host_cpu$ac_delim
26693 host_vendor!$host_vendor$ac_delim
26694 host_os!$host_os$ac_delim
26695 PORTNAME!$PORTNAME$ac_delim
26696 enable_nls!$enable_nls$ac_delim
26697 WANTED_LANGUAGES!$WANTED_LANGUAGES$ac_delim
26698 default_port!$default_port$ac_delim
26699 enable_shared!$enable_shared$ac_delim
26700 enable_rpath!$enable_rpath$ac_delim
26701 enable_debug!$enable_debug$ac_delim
26702 enable_profiling!$enable_profiling$ac_delim
26703 GCOV!$GCOV$ac_delim
26704 LCOV!$LCOV$ac_delim
26705 GENHTML!$GENHTML$ac_delim
26706 enable_coverage!$enable_coverage$ac_delim
26707 DTRACE!$DTRACE$ac_delim
26708 DTRACEFLAGS!$DTRACEFLAGS$ac_delim
26709 enable_dtrace!$enable_dtrace$ac_delim
26710 CC!$CC$ac_delim
26711 CFLAGS!$CFLAGS$ac_delim
26712 LDFLAGS!$LDFLAGS$ac_delim
26713 CPPFLAGS!$CPPFLAGS$ac_delim
26714 ac_ct_CC!$ac_ct_CC$ac_delim
26715 EXEEXT!$EXEEXT$ac_delim
26716 OBJEXT!$OBJEXT$ac_delim
26717 CPP!$CPP$ac_delim
26718 GCC!$GCC$ac_delim
26719 TAS!$TAS$ac_delim
26720 autodepend!$autodepend$ac_delim
26721 INCLUDES!$INCLUDES$ac_delim
26722 enable_thread_safety!$enable_thread_safety$ac_delim
26723 with_tcl!$with_tcl$ac_delim
26724 with_perl!$with_perl$ac_delim
26725 with_python!$with_python$ac_delim
26726 with_gssapi!$with_gssapi$ac_delim
26727 with_krb5!$with_krb5$ac_delim
26728 krb_srvtab!$krb_srvtab$ac_delim
26729 with_pam!$with_pam$ac_delim
26730 with_ldap!$with_ldap$ac_delim
26731 with_bonjour!$with_bonjour$ac_delim
26732 with_openssl!$with_openssl$ac_delim
26733 with_ossp_uuid!$with_ossp_uuid$ac_delim
26734 XML2_CONFIG!$XML2_CONFIG$ac_delim
26735 with_libxml!$with_libxml$ac_delim
26736 with_libxslt!$with_libxslt$ac_delim
26737 with_system_tzdata!$with_system_tzdata$ac_delim
26738 with_zlib!$with_zlib$ac_delim
26739 GREP!$GREP$ac_delim
26740 EGREP!$EGREP$ac_delim
26741 ELF_SYS!$ELF_SYS$ac_delim
26742 LDFLAGS_SL!$LDFLAGS_SL$ac_delim
26743 LD!$LD$ac_delim
26744 with_gnu_ld!$with_gnu_ld$ac_delim
26745 ld_R_works!$ld_R_works$ac_delim
26746 _ACEOF
26747
26748   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
26749     break
26750   elif $ac_last_try; then
26751     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26752 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26753    { (exit 1); exit 1; }; }
26754   else
26755     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26756   fi
26757 done
26758
26759 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26760 if test -n "$ac_eof"; then
26761   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26762   ac_eof=`expr $ac_eof + 1`
26763 fi
26764
26765 cat >>$CONFIG_STATUS <<_ACEOF
26766 cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
26767 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26768 _ACEOF
26769 sed '
26770 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26771 s/^/s,@/; s/!/@,|#_!!_#|/
26772 :n
26773 t n
26774 s/'"$ac_delim"'$/,g/; t
26775 s/$/\\/; p
26776 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26777 ' >>$CONFIG_STATUS <conf$$subs.sed
26778 rm -f conf$$subs.sed
26779 cat >>$CONFIG_STATUS <<_ACEOF
26780 CEOF$ac_eof
26781 _ACEOF
26782
26783
26784 ac_delim='%!_!# '
26785 for ac_last_try in false false false false false :; do
26786   cat >conf$$subs.sed <<_ACEOF
26787 RANLIB!$RANLIB$ac_delim
26788 STRIP!$STRIP$ac_delim
26789 STRIP_STATIC_LIB!$STRIP_STATIC_LIB$ac_delim
26790 STRIP_SHARED_LIB!$STRIP_SHARED_LIB$ac_delim
26791 TAR!$TAR$ac_delim
26792 LN_S!$LN_S$ac_delim
26793 AWK!$AWK$ac_delim
26794 BISON!$BISON$ac_delim
26795 BISONFLAGS!$BISONFLAGS$ac_delim
26796 FLEX!$FLEX$ac_delim
26797 FLEXFLAGS!$FLEXFLAGS$ac_delim
26798 PERL!$PERL$ac_delim
26799 perl_archlibexp!$perl_archlibexp$ac_delim
26800 perl_privlibexp!$perl_privlibexp$ac_delim
26801 perl_useshrplib!$perl_useshrplib$ac_delim
26802 perl_embed_ldflags!$perl_embed_ldflags$ac_delim
26803 PYTHON!$PYTHON$ac_delim
26804 python_version!$python_version$ac_delim
26805 python_configdir!$python_configdir$ac_delim
26806 python_includespec!$python_includespec$ac_delim
26807 python_libdir!$python_libdir$ac_delim
26808 python_libspec!$python_libspec$ac_delim
26809 python_additional_libs!$python_additional_libs$ac_delim
26810 OSSP_UUID_LIBS!$OSSP_UUID_LIBS$ac_delim
26811 HAVE_IPV6!$HAVE_IPV6$ac_delim
26812 LIBOBJS!$LIBOBJS$ac_delim
26813 acx_pthread_config!$acx_pthread_config$ac_delim
26814 PTHREAD_CC!$PTHREAD_CC$ac_delim
26815 PTHREAD_LIBS!$PTHREAD_LIBS$ac_delim
26816 PTHREAD_CFLAGS!$PTHREAD_CFLAGS$ac_delim
26817 LDAP_LIBS_FE!$LDAP_LIBS_FE$ac_delim
26818 LDAP_LIBS_BE!$LDAP_LIBS_BE$ac_delim
26819 HAVE_POSIX_SIGNALS!$HAVE_POSIX_SIGNALS$ac_delim
26820 MSGFMT!$MSGFMT$ac_delim
26821 MSGMERGE!$MSGMERGE$ac_delim
26822 XGETTEXT!$XGETTEXT$ac_delim
26823 TCLSH!$TCLSH$ac_delim
26824 TCL_CONFIG_SH!$TCL_CONFIG_SH$ac_delim
26825 TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim
26826 TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim
26827 TCL_LIBS!$TCL_LIBS$ac_delim
26828 TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim
26829 TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim
26830 TCL_SHLIB_LD_LIBS!$TCL_SHLIB_LD_LIBS$ac_delim
26831 NSGMLS!$NSGMLS$ac_delim
26832 JADE!$JADE$ac_delim
26833 have_docbook!$have_docbook$ac_delim
26834 DOCBOOKSTYLE!$DOCBOOKSTYLE$ac_delim
26835 COLLATEINDEX!$COLLATEINDEX$ac_delim
26836 SGMLSPL!$SGMLSPL$ac_delim
26837 vpath_build!$vpath_build$ac_delim
26838 LTLIBOBJS!$LTLIBOBJS$ac_delim
26839 _ACEOF
26840
26841   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 52; then
26842     break
26843   elif $ac_last_try; then
26844     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26845 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26846    { (exit 1); exit 1; }; }
26847   else
26848     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26849   fi
26850 done
26851
26852 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26853 if test -n "$ac_eof"; then
26854   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26855   ac_eof=`expr $ac_eof + 1`
26856 fi
26857
26858 cat >>$CONFIG_STATUS <<_ACEOF
26859 cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
26860 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
26861 _ACEOF
26862 sed '
26863 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26864 s/^/s,@/; s/!/@,|#_!!_#|/
26865 :n
26866 t n
26867 s/'"$ac_delim"'$/,g/; t
26868 s/$/\\/; p
26869 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26870 ' >>$CONFIG_STATUS <conf$$subs.sed
26871 rm -f conf$$subs.sed
26872 cat >>$CONFIG_STATUS <<_ACEOF
26873 :end
26874 s/|#_!!_#|//g
26875 CEOF$ac_eof
26876 _ACEOF
26877
26878
26879 # VPATH may cause trouble with some makes, so we remove $(srcdir),
26880 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26881 # trailing colons and then remove the whole line if VPATH becomes empty
26882 # (actually we leave an empty line to preserve line numbers).
26883 if test "x$srcdir" = x.; then
26884   ac_vpsub='/^[  ]*VPATH[        ]*=/{
26885 s/:*\$(srcdir):*/:/
26886 s/:*\${srcdir}:*/:/
26887 s/:*@srcdir@:*/:/
26888 s/^\([^=]*=[     ]*\):*/\1/
26889 s/:*$//
26890 s/^[^=]*=[       ]*$//
26891 }'
26892 fi
26893
26894 cat >>$CONFIG_STATUS <<\_ACEOF
26895 fi # test -n "$CONFIG_FILES"
26896
26897
26898 for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS
26899 do
26900   case $ac_tag in
26901   :[FHLC]) ac_mode=$ac_tag; continue;;
26902   esac
26903   case $ac_mode$ac_tag in
26904   :[FHL]*:*);;
26905   :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
26906 echo "$as_me: error: Invalid tag $ac_tag." >&2;}
26907    { (exit 1); exit 1; }; };;
26908   :[FH]-) ac_tag=-:-;;
26909   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26910   esac
26911   ac_save_IFS=$IFS
26912   IFS=:
26913   set x $ac_tag
26914   IFS=$ac_save_IFS
26915   shift
26916   ac_file=$1
26917   shift
26918
26919   case $ac_mode in
26920   :L) ac_source=$1;;
26921   :[FH])
26922     ac_file_inputs=
26923     for ac_f
26924     do
26925       case $ac_f in
26926       -) ac_f="$tmp/stdin";;
26927       *) # Look for the file first in the build tree, then in the source tree
26928          # (if the path is not absolute).  The absolute path cannot be DOS-style,
26929          # because $ac_f cannot contain `:'.
26930          test -f "$ac_f" ||
26931            case $ac_f in
26932            [\\/$]*) false;;
26933            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26934            esac ||
26935            { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
26936 echo "$as_me: error: cannot find input file: $ac_f" >&2;}
26937    { (exit 1); exit 1; }; };;
26938       esac
26939       ac_file_inputs="$ac_file_inputs $ac_f"
26940     done
26941
26942     # Let's still pretend it is `configure' which instantiates (i.e., don't
26943     # use $as_me), people would be surprised to read:
26944     #    /* config.h.  Generated by config.status.  */
26945     configure_input="Generated from "`IFS=:
26946           echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
26947     if test x"$ac_file" != x-; then
26948       configure_input="$ac_file.  $configure_input"
26949       { echo "$as_me:$LINENO: creating $ac_file" >&5
26950 echo "$as_me: creating $ac_file" >&6;}
26951     fi
26952
26953     case $ac_tag in
26954     *:-:* | *:-) cat >"$tmp/stdin";;
26955     esac
26956     ;;
26957   esac
26958
26959   ac_dir=`$as_dirname -- "$ac_file" ||
26960 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26961          X"$ac_file" : 'X\(//\)[^/]' \| \
26962          X"$ac_file" : 'X\(//\)$' \| \
26963          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26964 echo X"$ac_file" |
26965     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26966             s//\1/
26967             q
26968           }
26969           /^X\(\/\/\)[^/].*/{
26970             s//\1/
26971             q
26972           }
26973           /^X\(\/\/\)$/{
26974             s//\1/
26975             q
26976           }
26977           /^X\(\/\).*/{
26978             s//\1/
26979             q
26980           }
26981           s/.*/./; q'`
26982   { as_dir="$ac_dir"
26983   case $as_dir in #(
26984   -*) as_dir=./$as_dir;;
26985   esac
26986   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
26987     as_dirs=
26988     while :; do
26989       case $as_dir in #(
26990       *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
26991       *) as_qdir=$as_dir;;
26992       esac
26993       as_dirs="'$as_qdir' $as_dirs"
26994       as_dir=`$as_dirname -- "$as_dir" ||
26995 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26996          X"$as_dir" : 'X\(//\)[^/]' \| \
26997          X"$as_dir" : 'X\(//\)$' \| \
26998          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
26999 echo X"$as_dir" |
27000     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27001             s//\1/
27002             q
27003           }
27004           /^X\(\/\/\)[^/].*/{
27005             s//\1/
27006             q
27007           }
27008           /^X\(\/\/\)$/{
27009             s//\1/
27010             q
27011           }
27012           /^X\(\/\).*/{
27013             s//\1/
27014             q
27015           }
27016           s/.*/./; q'`
27017       test -d "$as_dir" && break
27018     done
27019     test -z "$as_dirs" || eval "mkdir $as_dirs"
27020   } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27021 echo "$as_me: error: cannot create directory $as_dir" >&2;}
27022    { (exit 1); exit 1; }; }; }
27023   ac_builddir=.
27024
27025 case "$ac_dir" in
27026 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27027 *)
27028   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
27029   # A ".." for each directory in $ac_dir_suffix.
27030   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
27031   case $ac_top_builddir_sub in
27032   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27033   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27034   esac ;;
27035 esac
27036 ac_abs_top_builddir=$ac_pwd
27037 ac_abs_builddir=$ac_pwd$ac_dir_suffix
27038 # for backward compatibility:
27039 ac_top_builddir=$ac_top_build_prefix
27040
27041 case $srcdir in
27042   .)  # We are building in place.
27043     ac_srcdir=.
27044     ac_top_srcdir=$ac_top_builddir_sub
27045     ac_abs_top_srcdir=$ac_pwd ;;
27046   [\\/]* | ?:[\\/]* )  # Absolute name.
27047     ac_srcdir=$srcdir$ac_dir_suffix;
27048     ac_top_srcdir=$srcdir
27049     ac_abs_top_srcdir=$srcdir ;;
27050   *) # Relative name.
27051     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27052     ac_top_srcdir=$ac_top_build_prefix$srcdir
27053     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
27054 esac
27055 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
27056
27057
27058   case $ac_mode in
27059   :F)
27060   #
27061   # CONFIG_FILE
27062   #
27063
27064 _ACEOF
27065
27066 cat >>$CONFIG_STATUS <<\_ACEOF
27067 # If the template does not know about datarootdir, expand it.
27068 # FIXME: This hack should be removed a few years after 2.60.
27069 ac_datarootdir_hack=; ac_datarootdir_seen=
27070
27071 case `sed -n '/datarootdir/ {
27072   p
27073   q
27074 }
27075 /@datadir@/p
27076 /@docdir@/p
27077 /@infodir@/p
27078 /@localedir@/p
27079 /@mandir@/p
27080 ' $ac_file_inputs` in
27081 *datarootdir*) ac_datarootdir_seen=yes;;
27082 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
27083   { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27084 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
27085 _ACEOF
27086 cat >>$CONFIG_STATUS <<_ACEOF
27087   ac_datarootdir_hack='
27088   s&@datadir@&$datadir&g
27089   s&@docdir@&$docdir&g
27090   s&@infodir@&$infodir&g
27091   s&@localedir@&$localedir&g
27092   s&@mandir@&$mandir&g
27093     s&\\\${datarootdir}&$datarootdir&g' ;;
27094 esac
27095 _ACEOF
27096
27097 # Neutralize VPATH when `$srcdir' = `.'.
27098 # Shell code in configure.ac might set extrasub.
27099 # FIXME: do we really want to maintain this feature?
27100 cat >>$CONFIG_STATUS <<_ACEOF
27101   sed "$ac_vpsub
27102 $extrasub
27103 _ACEOF
27104 cat >>$CONFIG_STATUS <<\_ACEOF
27105 :t
27106 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27107 s&@configure_input@&$configure_input&;t t
27108 s&@top_builddir@&$ac_top_builddir_sub&;t t
27109 s&@srcdir@&$ac_srcdir&;t t
27110 s&@abs_srcdir@&$ac_abs_srcdir&;t t
27111 s&@top_srcdir@&$ac_top_srcdir&;t t
27112 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27113 s&@builddir@&$ac_builddir&;t t
27114 s&@abs_builddir@&$ac_abs_builddir&;t t
27115 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27116 $ac_datarootdir_hack
27117 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
27118
27119 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27120   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27121   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
27122   { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
27123 which seems to be undefined.  Please make sure it is defined." >&5
27124 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
27125 which seems to be undefined.  Please make sure it is defined." >&2;}
27126
27127   rm -f "$tmp/stdin"
27128   case $ac_file in
27129   -) cat "$tmp/out"; rm -f "$tmp/out";;
27130   *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
27131   esac
27132  ;;
27133   :H)
27134   #
27135   # CONFIG_HEADER
27136   #
27137 _ACEOF
27138
27139 # Transform confdefs.h into a sed script `conftest.defines', that
27140 # substitutes the proper values into config.h.in to produce config.h.
27141 rm -f conftest.defines conftest.tail
27142 # First, append a space to every undef/define line, to ease matching.
27143 echo 's/$/ /' >conftest.defines
27144 # Then, protect against being on the right side of a sed subst, or in
27145 # an unquoted here document, in config.status.  If some macros were
27146 # called several times there might be several #defines for the same
27147 # symbol, which is useless.  But do not sort them, since the last
27148 # AC_DEFINE must be honored.
27149 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27150 # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
27151 # NAME is the cpp macro being defined, VALUE is the value it is being given.
27152 # PARAMS is the parameter list in the macro definition--in most cases, it's
27153 # just an empty string.
27154 ac_dA='s,^\\([   #]*\\)[^        ]*\\([  ]*'
27155 ac_dB='\\)[      (].*,\\1define\\2'
27156 ac_dC=' '
27157 ac_dD=' ,'
27158
27159 uniq confdefs.h |
27160   sed -n '
27161         t rset
27162         :rset
27163         s/^[     ]*#[    ]*define[       ][      ]*//
27164         t ok
27165         d
27166         :ok
27167         s/[\\&,]/\\&/g
27168         s/^\('"$ac_word_re"'\)\(([^()]*)\)[      ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
27169         s/^\('"$ac_word_re"'\)[  ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
27170   ' >>conftest.defines
27171
27172 # Remove the space that was appended to ease matching.
27173 # Then replace #undef with comments.  This is necessary, for
27174 # example, in the case of _POSIX_SOURCE, which is predefined and required
27175 # on some systems where configure will not decide to define it.
27176 # (The regexp can be short, since the line contains either #define or #undef.)
27177 echo 's/ $//
27178 s,^[     #]*u.*,/* & */,' >>conftest.defines
27179
27180 # Break up conftest.defines:
27181 ac_max_sed_lines=50
27182
27183 # First sed command is:  sed -f defines.sed $ac_file_inputs >"$tmp/out1"
27184 # Second one is:         sed -f defines.sed "$tmp/out1" >"$tmp/out2"
27185 # Third one will be:     sed -f defines.sed "$tmp/out2" >"$tmp/out1"
27186 # et cetera.
27187 ac_in='$ac_file_inputs'
27188 ac_out='"$tmp/out1"'
27189 ac_nxt='"$tmp/out2"'
27190
27191 while :
27192 do
27193   # Write a here document:
27194     cat >>$CONFIG_STATUS <<_ACEOF
27195     # First, check the format of the line:
27196     cat >"\$tmp/defines.sed" <<\\CEOF
27197 /^[      ]*#[    ]*undef[        ][      ]*$ac_word_re[  ]*\$/b def
27198 /^[      ]*#[    ]*define[       ][      ]*$ac_word_re[(         ]/b def
27199 b
27200 :def
27201 _ACEOF
27202   sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
27203   echo 'CEOF
27204     sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
27205   ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
27206   sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
27207   grep . conftest.tail >/dev/null || break
27208   rm -f conftest.defines
27209   mv conftest.tail conftest.defines
27210 done
27211 rm -f conftest.defines conftest.tail
27212
27213 echo "ac_result=$ac_in" >>$CONFIG_STATUS
27214 cat >>$CONFIG_STATUS <<\_ACEOF
27215   if test x"$ac_file" != x-; then
27216     echo "/* $configure_input  */" >"$tmp/config.h"
27217     cat "$ac_result" >>"$tmp/config.h"
27218     if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
27219       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27220 echo "$as_me: $ac_file is unchanged" >&6;}
27221     else
27222       rm -f $ac_file
27223       mv "$tmp/config.h" $ac_file
27224     fi
27225   else
27226     echo "/* $configure_input  */"
27227     cat "$ac_result"
27228   fi
27229   rm -f "$tmp/out12"
27230  ;;
27231   :L)
27232   #
27233   # CONFIG_LINK
27234   #
27235
27236   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_file" >&5
27237 echo "$as_me: linking $srcdir/$ac_source to $ac_file" >&6;}
27238
27239   if test ! -r "$srcdir/$ac_source"; then
27240     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
27241 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
27242    { (exit 1); exit 1; }; }
27243   fi
27244   rm -f "$ac_file"
27245
27246   # Try a relative symlink, then a hard link, then a copy.
27247   case $srcdir in
27248   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
27249       *) ac_rel_source=$ac_top_build_prefix$srcdir/$ac_source ;;
27250   esac
27251   ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
27252     ln "$srcdir/$ac_source" "$ac_file" 2>/dev/null ||
27253     cp -p "$srcdir/$ac_source" "$ac_file" ||
27254     { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_file" >&5
27255 echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_file" >&2;}
27256    { (exit 1); exit 1; }; }
27257  ;;
27258   :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
27259 echo "$as_me: executing $ac_file commands" >&6;}
27260  ;;
27261   esac
27262
27263
27264   case $ac_file$ac_mode in
27265     "check_win32_symlinks":C)
27266 # Links sometimes fail undetected on Mingw -
27267 # so here we detect it and warn the user
27268 for FILE in $CONFIG_LINKS
27269  do
27270         # test -e works for symlinks in the MinGW console
27271         test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE -- please fix by hand" >&5
27272 echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
27273  done
27274  ;;
27275     "src/include/pg_config.h":H)
27276 # Update timestamp for pg_config.h (see Makefile.global)
27277 echo >src/include/stamp-h
27278  ;;
27279
27280   esac
27281 done # for ac_tag
27282
27283
27284 { (exit 0); exit 0; }
27285 _ACEOF
27286 chmod +x $CONFIG_STATUS
27287 ac_clean_files=$ac_clean_files_save
27288
27289
27290 # configure is writing to config.log, and then calls config.status.
27291 # config.status does its own redirection, appending to config.log.
27292 # Unfortunately, on DOS this fails, as config.log is still kept open
27293 # by configure, so config.status won't be able to write to it; its
27294 # output is simply discarded.  So we exec the FD to /dev/null,
27295 # effectively closing config.log, so it can be properly (re)opened and
27296 # appended to by config.status.  When coming back to configure, we
27297 # need to make the FD available again.
27298 if test "$no_create" != yes; then
27299   ac_cs_success=:
27300   ac_config_status_args=
27301   test "$silent" = yes &&
27302     ac_config_status_args="$ac_config_status_args --quiet"
27303   exec 5>/dev/null
27304   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
27305   exec 5>>config.log
27306   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27307   # would make configure fail if this is the last instruction.
27308   $ac_cs_success || { (exit 1); exit 1; }
27309 fi
27310
27311
27312 # Warn about unknown options
27313 for pgac_var in `set | sed 's/=.*//' | $EGREP 'with_|enable_'`; do
27314   for pgac_arg in $pgac_args with_gnu_ld; do
27315     if test "$pgac_var" = "$pgac_arg"; then
27316       continue 2
27317     fi
27318   done
27319   pgac_txt=`echo $pgac_var | sed 's/_/-/g'`
27320   { echo "$as_me:$LINENO: WARNING: option ignored: --$pgac_txt" >&5
27321 echo "$as_me: WARNING: option ignored: --$pgac_txt" >&2;}
27322 done