]> granicus.if.org Git - postgresql/blob - configure
Remove postmaster.c's check that NBuffers is at least twice MaxBackends.
[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 DTRACE
676 DTRACEFLAGS
677 enable_dtrace
678 CC
679 CFLAGS
680 LDFLAGS
681 CPPFLAGS
682 ac_ct_CC
683 EXEEXT
684 OBJEXT
685 CPP
686 GCC
687 TAS
688 autodepend
689 INCLUDES
690 enable_thread_safety
691 with_tcl
692 with_perl
693 with_python
694 with_gssapi
695 with_krb5
696 krb_srvtab
697 with_pam
698 with_ldap
699 with_bonjour
700 with_openssl
701 with_ossp_uuid
702 XML2_CONFIG
703 with_libxml
704 with_libxslt
705 with_system_tzdata
706 with_zlib
707 GREP
708 EGREP
709 ELF_SYS
710 LDFLAGS_SL
711 LD
712 with_gnu_ld
713 ld_R_works
714 RANLIB
715 STRIP
716 STRIP_STATIC_LIB
717 STRIP_SHARED_LIB
718 TAR
719 LN_S
720 AWK
721 YACC
722 YFLAGS
723 FLEX
724 FLEXFLAGS
725 PERL
726 perl_archlibexp
727 perl_privlibexp
728 perl_useshrplib
729 perl_embed_ldflags
730 PYTHON
731 python_version
732 python_configdir
733 python_includespec
734 python_libdir
735 python_libspec
736 python_additional_libs
737 OSSP_UUID_LIBS
738 HAVE_IPV6
739 LIBOBJS
740 acx_pthread_config
741 PTHREAD_CC
742 PTHREAD_LIBS
743 PTHREAD_CFLAGS
744 LDAP_LIBS_FE
745 LDAP_LIBS_BE
746 HAVE_POSIX_SIGNALS
747 MSGFMT
748 MSGMERGE
749 XGETTEXT
750 TCLSH
751 TCL_CONFIG_SH
752 TCL_INCLUDE_SPEC
753 TCL_LIB_FILE
754 TCL_LIBS
755 TCL_LIB_SPEC
756 TCL_SHARED_BUILD
757 TCL_SHLIB_LD_LIBS
758 NSGMLS
759 JADE
760 have_docbook
761 DOCBOOKSTYLE
762 COLLATEINDEX
763 SGMLSPL
764 vpath_build
765 LTLIBOBJS'
766 ac_subst_files=''
767       ac_precious_vars='build_alias
768 host_alias
769 target_alias
770 CC
771 CFLAGS
772 LDFLAGS
773 LIBS
774 CPPFLAGS
775 CPP
776 LDFLAGS_SL
777 DOCBOOKSTYLE'
778
779
780 # Initialize some variables set by options.
781 ac_init_help=
782 ac_init_version=false
783 # The variables have the same names as the options, with
784 # dashes changed to underlines.
785 cache_file=/dev/null
786 exec_prefix=NONE
787 no_create=
788 no_recursion=
789 prefix=NONE
790 program_prefix=NONE
791 program_suffix=NONE
792 program_transform_name=s,x,x,
793 silent=
794 site=
795 srcdir=
796 verbose=
797 x_includes=NONE
798 x_libraries=NONE
799
800 # Installation directory options.
801 # These are left unexpanded so users can "make install exec_prefix=/foo"
802 # and all the variables that are supposed to be based on exec_prefix
803 # by default will actually change.
804 # Use braces instead of parens because sh, perl, etc. also accept them.
805 # (The list follows the same order as the GNU Coding Standards.)
806 bindir='${exec_prefix}/bin'
807 sbindir='${exec_prefix}/sbin'
808 libexecdir='${exec_prefix}/libexec'
809 datarootdir='${prefix}/share'
810 datadir='${datarootdir}'
811 sysconfdir='${prefix}/etc'
812 sharedstatedir='${prefix}/com'
813 localstatedir='${prefix}/var'
814 includedir='${prefix}/include'
815 oldincludedir='/usr/include'
816 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
817 infodir='${datarootdir}/info'
818 htmldir='${docdir}'
819 dvidir='${docdir}'
820 pdfdir='${docdir}'
821 psdir='${docdir}'
822 libdir='${exec_prefix}/lib'
823 localedir='${datarootdir}/locale'
824 mandir='${datarootdir}/man'
825
826 ac_prev=
827 ac_dashdash=
828 for ac_option
829 do
830   # If the previous option needs an argument, assign it.
831   if test -n "$ac_prev"; then
832     eval $ac_prev=\$ac_option
833     ac_prev=
834     continue
835   fi
836
837   case $ac_option in
838   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
839   *)    ac_optarg=yes ;;
840   esac
841
842   # Accept the important Cygnus configure options, so we can diagnose typos.
843
844   case $ac_dashdash$ac_option in
845   --)
846     ac_dashdash=yes ;;
847
848   -bindir | --bindir | --bindi | --bind | --bin | --bi)
849     ac_prev=bindir ;;
850   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
851     bindir=$ac_optarg ;;
852
853   -build | --build | --buil | --bui | --bu)
854     ac_prev=build_alias ;;
855   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
856     build_alias=$ac_optarg ;;
857
858   -cache-file | --cache-file | --cache-fil | --cache-fi \
859   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
860     ac_prev=cache_file ;;
861   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
862   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
863     cache_file=$ac_optarg ;;
864
865   --config-cache | -C)
866     cache_file=config.cache ;;
867
868   -datadir | --datadir | --datadi | --datad)
869     ac_prev=datadir ;;
870   -datadir=* | --datadir=* | --datadi=* | --datad=*)
871     datadir=$ac_optarg ;;
872
873   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
874   | --dataroo | --dataro | --datar)
875     ac_prev=datarootdir ;;
876   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
877   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
878     datarootdir=$ac_optarg ;;
879
880   -disable-* | --disable-*)
881     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
882     # Reject names that are not valid shell variable names.
883     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
884       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
885    { (exit 1); exit 1; }; }
886     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
887     eval enable_$ac_feature=no ;;
888
889   -docdir | --docdir | --docdi | --doc | --do)
890     ac_prev=docdir ;;
891   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
892     docdir=$ac_optarg ;;
893
894   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
895     ac_prev=dvidir ;;
896   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
897     dvidir=$ac_optarg ;;
898
899   -enable-* | --enable-*)
900     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
901     # Reject names that are not valid shell variable names.
902     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
903       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
904    { (exit 1); exit 1; }; }
905     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
906     eval enable_$ac_feature=\$ac_optarg ;;
907
908   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
909   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
910   | --exec | --exe | --ex)
911     ac_prev=exec_prefix ;;
912   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
913   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
914   | --exec=* | --exe=* | --ex=*)
915     exec_prefix=$ac_optarg ;;
916
917   -gas | --gas | --ga | --g)
918     # Obsolete; use --with-gas.
919     with_gas=yes ;;
920
921   -help | --help | --hel | --he | -h)
922     ac_init_help=long ;;
923   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
924     ac_init_help=recursive ;;
925   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
926     ac_init_help=short ;;
927
928   -host | --host | --hos | --ho)
929     ac_prev=host_alias ;;
930   -host=* | --host=* | --hos=* | --ho=*)
931     host_alias=$ac_optarg ;;
932
933   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
934     ac_prev=htmldir ;;
935   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
936   | --ht=*)
937     htmldir=$ac_optarg ;;
938
939   -includedir | --includedir | --includedi | --included | --include \
940   | --includ | --inclu | --incl | --inc)
941     ac_prev=includedir ;;
942   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
943   | --includ=* | --inclu=* | --incl=* | --inc=*)
944     includedir=$ac_optarg ;;
945
946   -infodir | --infodir | --infodi | --infod | --info | --inf)
947     ac_prev=infodir ;;
948   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
949     infodir=$ac_optarg ;;
950
951   -libdir | --libdir | --libdi | --libd)
952     ac_prev=libdir ;;
953   -libdir=* | --libdir=* | --libdi=* | --libd=*)
954     libdir=$ac_optarg ;;
955
956   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
957   | --libexe | --libex | --libe)
958     ac_prev=libexecdir ;;
959   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
960   | --libexe=* | --libex=* | --libe=*)
961     libexecdir=$ac_optarg ;;
962
963   -localedir | --localedir | --localedi | --localed | --locale)
964     ac_prev=localedir ;;
965   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
966     localedir=$ac_optarg ;;
967
968   -localstatedir | --localstatedir | --localstatedi | --localstated \
969   | --localstate | --localstat | --localsta | --localst | --locals)
970     ac_prev=localstatedir ;;
971   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
972   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
973     localstatedir=$ac_optarg ;;
974
975   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
976     ac_prev=mandir ;;
977   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
978     mandir=$ac_optarg ;;
979
980   -nfp | --nfp | --nf)
981     # Obsolete; use --without-fp.
982     with_fp=no ;;
983
984   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
985   | --no-cr | --no-c | -n)
986     no_create=yes ;;
987
988   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
989   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
990     no_recursion=yes ;;
991
992   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
993   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
994   | --oldin | --oldi | --old | --ol | --o)
995     ac_prev=oldincludedir ;;
996   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
997   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
998   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
999     oldincludedir=$ac_optarg ;;
1000
1001   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1002     ac_prev=prefix ;;
1003   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1004     prefix=$ac_optarg ;;
1005
1006   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1007   | --program-pre | --program-pr | --program-p)
1008     ac_prev=program_prefix ;;
1009   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1010   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1011     program_prefix=$ac_optarg ;;
1012
1013   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1014   | --program-suf | --program-su | --program-s)
1015     ac_prev=program_suffix ;;
1016   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1017   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1018     program_suffix=$ac_optarg ;;
1019
1020   -program-transform-name | --program-transform-name \
1021   | --program-transform-nam | --program-transform-na \
1022   | --program-transform-n | --program-transform- \
1023   | --program-transform | --program-transfor \
1024   | --program-transfo | --program-transf \
1025   | --program-trans | --program-tran \
1026   | --progr-tra | --program-tr | --program-t)
1027     ac_prev=program_transform_name ;;
1028   -program-transform-name=* | --program-transform-name=* \
1029   | --program-transform-nam=* | --program-transform-na=* \
1030   | --program-transform-n=* | --program-transform-=* \
1031   | --program-transform=* | --program-transfor=* \
1032   | --program-transfo=* | --program-transf=* \
1033   | --program-trans=* | --program-tran=* \
1034   | --progr-tra=* | --program-tr=* | --program-t=*)
1035     program_transform_name=$ac_optarg ;;
1036
1037   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1038     ac_prev=pdfdir ;;
1039   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1040     pdfdir=$ac_optarg ;;
1041
1042   -psdir | --psdir | --psdi | --psd | --ps)
1043     ac_prev=psdir ;;
1044   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1045     psdir=$ac_optarg ;;
1046
1047   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1048   | -silent | --silent | --silen | --sile | --sil)
1049     silent=yes ;;
1050
1051   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1052     ac_prev=sbindir ;;
1053   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1054   | --sbi=* | --sb=*)
1055     sbindir=$ac_optarg ;;
1056
1057   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1058   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1059   | --sharedst | --shareds | --shared | --share | --shar \
1060   | --sha | --sh)
1061     ac_prev=sharedstatedir ;;
1062   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1063   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1064   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1065   | --sha=* | --sh=*)
1066     sharedstatedir=$ac_optarg ;;
1067
1068   -site | --site | --sit)
1069     ac_prev=site ;;
1070   -site=* | --site=* | --sit=*)
1071     site=$ac_optarg ;;
1072
1073   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1074     ac_prev=srcdir ;;
1075   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1076     srcdir=$ac_optarg ;;
1077
1078   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1079   | --syscon | --sysco | --sysc | --sys | --sy)
1080     ac_prev=sysconfdir ;;
1081   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1082   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1083     sysconfdir=$ac_optarg ;;
1084
1085   -target | --target | --targe | --targ | --tar | --ta | --t)
1086     ac_prev=target_alias ;;
1087   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1088     target_alias=$ac_optarg ;;
1089
1090   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1091     verbose=yes ;;
1092
1093   -version | --version | --versio | --versi | --vers | -V)
1094     ac_init_version=: ;;
1095
1096   -with-* | --with-*)
1097     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1098     # Reject names that are not valid shell variable names.
1099     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1100       { echo "$as_me: error: invalid package name: $ac_package" >&2
1101    { (exit 1); exit 1; }; }
1102     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1103     eval with_$ac_package=\$ac_optarg ;;
1104
1105   -without-* | --without-*)
1106     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1107     # Reject names that are not valid shell variable names.
1108     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1109       { echo "$as_me: error: invalid package name: $ac_package" >&2
1110    { (exit 1); exit 1; }; }
1111     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1112     eval with_$ac_package=no ;;
1113
1114   --x)
1115     # Obsolete; use --with-x.
1116     with_x=yes ;;
1117
1118   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1119   | --x-incl | --x-inc | --x-in | --x-i)
1120     ac_prev=x_includes ;;
1121   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1122   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1123     x_includes=$ac_optarg ;;
1124
1125   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1126   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1127     ac_prev=x_libraries ;;
1128   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1129   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1130     x_libraries=$ac_optarg ;;
1131
1132   -*) { echo "$as_me: error: unrecognized option: $ac_option
1133 Try \`$0 --help' for more information." >&2
1134    { (exit 1); exit 1; }; }
1135     ;;
1136
1137   *=*)
1138     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1139     # Reject names that are not valid shell variable names.
1140     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1141       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1142    { (exit 1); exit 1; }; }
1143     eval $ac_envvar=\$ac_optarg
1144     export $ac_envvar ;;
1145
1146   *)
1147     # FIXME: should be removed in autoconf 3.0.
1148     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1149     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1150       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1151     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1152     ;;
1153
1154   esac
1155 done
1156
1157 if test -n "$ac_prev"; then
1158   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1159   { echo "$as_me: error: missing argument to $ac_option" >&2
1160    { (exit 1); exit 1; }; }
1161 fi
1162
1163 # Be sure to have absolute directory names.
1164 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1165                 datadir sysconfdir sharedstatedir localstatedir includedir \
1166                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1167                 libdir localedir mandir
1168 do
1169   eval ac_val=\$$ac_var
1170   case $ac_val in
1171     [\\/$]* | ?:[\\/]* )  continue;;
1172     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1173   esac
1174   { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1175    { (exit 1); exit 1; }; }
1176 done
1177
1178 # There might be people who depend on the old broken behavior: `$host'
1179 # used to hold the argument of --host etc.
1180 # FIXME: To remove some day.
1181 build=$build_alias
1182 host=$host_alias
1183 target=$target_alias
1184
1185 # FIXME: To remove some day.
1186 if test "x$host_alias" != x; then
1187   if test "x$build_alias" = x; then
1188     cross_compiling=maybe
1189     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1190     If a cross compiler is detected then cross compile mode will be used." >&2
1191   elif test "x$build_alias" != "x$host_alias"; then
1192     cross_compiling=yes
1193   fi
1194 fi
1195
1196 ac_tool_prefix=
1197 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1198
1199 test "$silent" = yes && exec 6>/dev/null
1200
1201
1202 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1203 ac_ls_di=`ls -di .` &&
1204 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1205   { echo "$as_me: error: Working directory cannot be determined" >&2
1206    { (exit 1); exit 1; }; }
1207 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1208   { echo "$as_me: error: pwd does not report name of working directory" >&2
1209    { (exit 1); exit 1; }; }
1210
1211
1212 # Find the source files, if location was not specified.
1213 if test -z "$srcdir"; then
1214   ac_srcdir_defaulted=yes
1215   # Try the directory containing this script, then the parent directory.
1216   ac_confdir=`$as_dirname -- "$0" ||
1217 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1218          X"$0" : 'X\(//\)[^/]' \| \
1219          X"$0" : 'X\(//\)$' \| \
1220          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1221 echo X"$0" |
1222     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1223             s//\1/
1224             q
1225           }
1226           /^X\(\/\/\)[^/].*/{
1227             s//\1/
1228             q
1229           }
1230           /^X\(\/\/\)$/{
1231             s//\1/
1232             q
1233           }
1234           /^X\(\/\).*/{
1235             s//\1/
1236             q
1237           }
1238           s/.*/./; q'`
1239   srcdir=$ac_confdir
1240   if test ! -r "$srcdir/$ac_unique_file"; then
1241     srcdir=..
1242   fi
1243 else
1244   ac_srcdir_defaulted=no
1245 fi
1246 if test ! -r "$srcdir/$ac_unique_file"; then
1247   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1248   { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1249    { (exit 1); exit 1; }; }
1250 fi
1251 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1252 ac_abs_confdir=`(
1253         cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1254    { (exit 1); exit 1; }; }
1255         pwd)`
1256 # When building in place, set srcdir=.
1257 if test "$ac_abs_confdir" = "$ac_pwd"; then
1258   srcdir=.
1259 fi
1260 # Remove unnecessary trailing slashes from srcdir.
1261 # Double slashes in file names in object file debugging info
1262 # mess up M-x gdb in Emacs.
1263 case $srcdir in
1264 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1265 esac
1266 for ac_var in $ac_precious_vars; do
1267   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1268   eval ac_env_${ac_var}_value=\$${ac_var}
1269   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1270   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1271 done
1272
1273 #
1274 # Report the --help message.
1275 #
1276 if test "$ac_init_help" = "long"; then
1277   # Omit some internal or obsolete options to make the list less imposing.
1278   # This message is too long to be a string in the A/UX 3.1 sh.
1279   cat <<_ACEOF
1280 \`configure' configures PostgreSQL 8.4devel to adapt to many kinds of systems.
1281
1282 Usage: $0 [OPTION]... [VAR=VALUE]...
1283
1284 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1285 VAR=VALUE.  See below for descriptions of some of the useful variables.
1286
1287 Defaults for the options are specified in brackets.
1288
1289 Configuration:
1290   -h, --help              display this help and exit
1291       --help=short        display options specific to this package
1292       --help=recursive    display the short help of all the included packages
1293   -V, --version           display version information and exit
1294   -q, --quiet, --silent   do not print \`checking...' messages
1295       --cache-file=FILE   cache test results in FILE [disabled]
1296   -C, --config-cache      alias for \`--cache-file=config.cache'
1297   -n, --no-create         do not create output files
1298       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1299
1300 Installation directories:
1301   --prefix=PREFIX         install architecture-independent files in PREFIX
1302                           [$ac_default_prefix]
1303   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1304                           [PREFIX]
1305
1306 By default, \`make install' will install all the files in
1307 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1308 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1309 for instance \`--prefix=\$HOME'.
1310
1311 For better control, use the options below.
1312
1313 Fine tuning of the installation directories:
1314   --bindir=DIR           user executables [EPREFIX/bin]
1315   --sbindir=DIR          system admin executables [EPREFIX/sbin]
1316   --libexecdir=DIR       program executables [EPREFIX/libexec]
1317   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
1318   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
1319   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
1320   --libdir=DIR           object code libraries [EPREFIX/lib]
1321   --includedir=DIR       C header files [PREFIX/include]
1322   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
1323   --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1324   --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1325   --infodir=DIR          info documentation [DATAROOTDIR/info]
1326   --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1327   --mandir=DIR           man documentation [DATAROOTDIR/man]
1328   --docdir=DIR           documentation root [DATAROOTDIR/doc/postgresql]
1329   --htmldir=DIR          html documentation [DOCDIR]
1330   --dvidir=DIR           dvi documentation [DOCDIR]
1331   --pdfdir=DIR           pdf documentation [DOCDIR]
1332   --psdir=DIR            ps documentation [DOCDIR]
1333 _ACEOF
1334
1335   cat <<\_ACEOF
1336
1337 System types:
1338   --build=BUILD     configure for building on BUILD [guessed]
1339   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1340 _ACEOF
1341 fi
1342
1343 if test -n "$ac_init_help"; then
1344   case $ac_init_help in
1345      short | recursive ) echo "Configuration of PostgreSQL 8.4devel:";;
1346    esac
1347   cat <<\_ACEOF
1348
1349 Optional Features:
1350   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1351   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1352   --enable-integer-datetimes  enable 64-bit integer date/time support
1353   --enable-nls[=LANGUAGES]  enable Native Language Support
1354   --disable-shared        do not build shared libraries
1355   --disable-rpath         do not embed shared library search path in executables
1356   --disable-spinlocks     do not use spinlocks
1357   --enable-debug          build with debugging symbols (-g)
1358   --enable-profiling      build with profiling enabled
1359   --enable-dtrace         build with DTrace support
1360   --enable-depend         turn on automatic dependency tracking
1361   --enable-cassert        enable assertion checks (for debugging)
1362   --enable-thread-safety  make client libraries thread-safe
1363   --enable-thread-safety-force  force thread-safety despite thread test failure
1364   --disable-largefile     omit support for large files
1365
1366 Optional Packages:
1367   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1368   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1369
1370   --with-includes=DIRS    look for additional header files in DIRS
1371   --with-libraries=DIRS   look for additional libraries in DIRS
1372   --with-libs=DIRS        alternative spelling of --with-libraries
1373   --with-pgport=PORTNUM   change default port number [5432]
1374   --with-tcl              build Tcl modules (PL/Tcl)
1375   --with-tclconfig=DIR    tclConfig.sh is in DIR
1376   --with-perl             build Perl modules (PL/Perl)
1377   --with-python           build Python modules (PL/Python)
1378   --with-gssapi           build with GSSAPI support
1379   --with-krb5             build with Kerberos 5 support
1380   --with-krb-srvnam=NAME  default service principal name in Kerberos [postgres]
1381   --with-pam              build with PAM support
1382   --with-ldap             build with LDAP support
1383   --with-bonjour          build with Bonjour support
1384   --with-openssl          build with OpenSSL support
1385   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1386   --with-libedit-preferred  prefer BSD Libedit over GNU Readline
1387   --with-ossp-uuid        use OSSP UUID library when building contrib/uuid-ossp
1388   --with-libxml           build with XML support
1389   --with-libxslt          use XSLT support when building contrib/xml2
1390   --with-system-tzdata=DIR  use system time zone data in DIR
1391   --without-zlib          do not use Zlib
1392   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1393
1394 Some influential environment variables:
1395   CC          C compiler command
1396   CFLAGS      C compiler flags
1397   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1398               nonstandard directory <lib dir>
1399   LIBS        libraries to pass to the linker, e.g. -l<library>
1400   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1401               you have headers in a nonstandard directory <include dir>
1402   CPP         C preprocessor
1403   LDFLAGS_SL
1404   DOCBOOKSTYLE
1405               location of DocBook stylesheets
1406
1407 Use these variables to override the choices made by `configure' or to help
1408 it to find libraries and programs with nonstandard names/locations.
1409
1410 Report bugs to <pgsql-bugs@postgresql.org>.
1411 _ACEOF
1412 ac_status=$?
1413 fi
1414
1415 if test "$ac_init_help" = "recursive"; then
1416   # If there are subdirs, report their specific --help.
1417   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1418     test -d "$ac_dir" || continue
1419     ac_builddir=.
1420
1421 case "$ac_dir" in
1422 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1423 *)
1424   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1425   # A ".." for each directory in $ac_dir_suffix.
1426   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1427   case $ac_top_builddir_sub in
1428   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1429   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1430   esac ;;
1431 esac
1432 ac_abs_top_builddir=$ac_pwd
1433 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1434 # for backward compatibility:
1435 ac_top_builddir=$ac_top_build_prefix
1436
1437 case $srcdir in
1438   .)  # We are building in place.
1439     ac_srcdir=.
1440     ac_top_srcdir=$ac_top_builddir_sub
1441     ac_abs_top_srcdir=$ac_pwd ;;
1442   [\\/]* | ?:[\\/]* )  # Absolute name.
1443     ac_srcdir=$srcdir$ac_dir_suffix;
1444     ac_top_srcdir=$srcdir
1445     ac_abs_top_srcdir=$srcdir ;;
1446   *) # Relative name.
1447     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1448     ac_top_srcdir=$ac_top_build_prefix$srcdir
1449     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1450 esac
1451 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1452
1453     cd "$ac_dir" || { ac_status=$?; continue; }
1454     # Check for guested configure.
1455     if test -f "$ac_srcdir/configure.gnu"; then
1456       echo &&
1457       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1458     elif test -f "$ac_srcdir/configure"; then
1459       echo &&
1460       $SHELL "$ac_srcdir/configure" --help=recursive
1461     else
1462       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1463     fi || ac_status=$?
1464     cd "$ac_pwd" || { ac_status=$?; break; }
1465   done
1466 fi
1467
1468 test -n "$ac_init_help" && exit $ac_status
1469 if $ac_init_version; then
1470   cat <<\_ACEOF
1471 PostgreSQL configure 8.4devel
1472 generated by GNU Autoconf 2.61
1473
1474 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1475 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1476 This configure script is free software; the Free Software Foundation
1477 gives unlimited permission to copy, distribute and modify it.
1478
1479 Copyright (c) 1996-2008, PostgreSQL Global Development Group
1480 _ACEOF
1481   exit
1482 fi
1483 cat >config.log <<_ACEOF
1484 This file contains any messages produced by compilers while
1485 running configure, to aid debugging if configure makes a mistake.
1486
1487 It was created by PostgreSQL $as_me 8.4devel, which was
1488 generated by GNU Autoconf 2.61.  Invocation command line was
1489
1490   $ $0 $@
1491
1492 _ACEOF
1493 exec 5>>config.log
1494 {
1495 cat <<_ASUNAME
1496 ## --------- ##
1497 ## Platform. ##
1498 ## --------- ##
1499
1500 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1501 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1502 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1503 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1504 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1505
1506 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1507 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1508
1509 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1510 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1511 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1512 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1513 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1514 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1515 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1516
1517 _ASUNAME
1518
1519 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1520 for as_dir in $PATH
1521 do
1522   IFS=$as_save_IFS
1523   test -z "$as_dir" && as_dir=.
1524   echo "PATH: $as_dir"
1525 done
1526 IFS=$as_save_IFS
1527
1528 } >&5
1529
1530 cat >&5 <<_ACEOF
1531
1532
1533 ## ----------- ##
1534 ## Core tests. ##
1535 ## ----------- ##
1536
1537 _ACEOF
1538
1539
1540 # Keep a trace of the command line.
1541 # Strip out --no-create and --no-recursion so they do not pile up.
1542 # Strip out --silent because we don't want to record it for future runs.
1543 # Also quote any args containing shell meta-characters.
1544 # Make two passes to allow for proper duplicate-argument suppression.
1545 ac_configure_args=
1546 ac_configure_args0=
1547 ac_configure_args1=
1548 ac_must_keep_next=false
1549 for ac_pass in 1 2
1550 do
1551   for ac_arg
1552   do
1553     case $ac_arg in
1554     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1555     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1556     | -silent | --silent | --silen | --sile | --sil)
1557       continue ;;
1558     *\'*)
1559       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1560     esac
1561     case $ac_pass in
1562     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1563     2)
1564       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1565       if test $ac_must_keep_next = true; then
1566         ac_must_keep_next=false # Got value, back to normal.
1567       else
1568         case $ac_arg in
1569           *=* | --config-cache | -C | -disable-* | --disable-* \
1570           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1571           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1572           | -with-* | --with-* | -without-* | --without-* | --x)
1573             case "$ac_configure_args0 " in
1574               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1575             esac
1576             ;;
1577           -* ) ac_must_keep_next=true ;;
1578         esac
1579       fi
1580       ac_configure_args="$ac_configure_args '$ac_arg'"
1581       ;;
1582     esac
1583   done
1584 done
1585 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1586 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1587
1588 # When interrupted or exit'd, cleanup temporary files, and complete
1589 # config.log.  We remove comments because anyway the quotes in there
1590 # would cause problems or look ugly.
1591 # WARNING: Use '\'' to represent an apostrophe within the trap.
1592 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1593 trap 'exit_status=$?
1594   # Save into config.log some information that might help in debugging.
1595   {
1596     echo
1597
1598     cat <<\_ASBOX
1599 ## ---------------- ##
1600 ## Cache variables. ##
1601 ## ---------------- ##
1602 _ASBOX
1603     echo
1604     # The following way of writing the cache mishandles newlines in values,
1605 (
1606   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1607     eval ac_val=\$$ac_var
1608     case $ac_val in #(
1609     *${as_nl}*)
1610       case $ac_var in #(
1611       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1612 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1613       esac
1614       case $ac_var in #(
1615       _ | IFS | as_nl) ;; #(
1616       *) $as_unset $ac_var ;;
1617       esac ;;
1618     esac
1619   done
1620   (set) 2>&1 |
1621     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1622     *${as_nl}ac_space=\ *)
1623       sed -n \
1624         "s/'\''/'\''\\\\'\'''\''/g;
1625           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1626       ;; #(
1627     *)
1628       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1629       ;;
1630     esac |
1631     sort
1632 )
1633     echo
1634
1635     cat <<\_ASBOX
1636 ## ----------------- ##
1637 ## Output variables. ##
1638 ## ----------------- ##
1639 _ASBOX
1640     echo
1641     for ac_var in $ac_subst_vars
1642     do
1643       eval ac_val=\$$ac_var
1644       case $ac_val in
1645       *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1646       esac
1647       echo "$ac_var='\''$ac_val'\''"
1648     done | sort
1649     echo
1650
1651     if test -n "$ac_subst_files"; then
1652       cat <<\_ASBOX
1653 ## ------------------- ##
1654 ## File substitutions. ##
1655 ## ------------------- ##
1656 _ASBOX
1657       echo
1658       for ac_var in $ac_subst_files
1659       do
1660         eval ac_val=\$$ac_var
1661         case $ac_val in
1662         *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1663         esac
1664         echo "$ac_var='\''$ac_val'\''"
1665       done | sort
1666       echo
1667     fi
1668
1669     if test -s confdefs.h; then
1670       cat <<\_ASBOX
1671 ## ----------- ##
1672 ## confdefs.h. ##
1673 ## ----------- ##
1674 _ASBOX
1675       echo
1676       cat confdefs.h
1677       echo
1678     fi
1679     test "$ac_signal" != 0 &&
1680       echo "$as_me: caught signal $ac_signal"
1681     echo "$as_me: exit $exit_status"
1682   } >&5
1683   rm -f core *.core core.conftest.* &&
1684     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1685     exit $exit_status
1686 ' 0
1687 for ac_signal in 1 2 13 15; do
1688   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1689 done
1690 ac_signal=0
1691
1692 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1693 rm -f -r conftest* confdefs.h
1694
1695 # Predefined preprocessor variables.
1696
1697 cat >>confdefs.h <<_ACEOF
1698 #define PACKAGE_NAME "$PACKAGE_NAME"
1699 _ACEOF
1700
1701
1702 cat >>confdefs.h <<_ACEOF
1703 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1704 _ACEOF
1705
1706
1707 cat >>confdefs.h <<_ACEOF
1708 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1709 _ACEOF
1710
1711
1712 cat >>confdefs.h <<_ACEOF
1713 #define PACKAGE_STRING "$PACKAGE_STRING"
1714 _ACEOF
1715
1716
1717 cat >>confdefs.h <<_ACEOF
1718 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1719 _ACEOF
1720
1721
1722 # Let the site file select an alternate cache file if it wants to.
1723 # Prefer explicitly selected file to automatically selected ones.
1724 if test -n "$CONFIG_SITE"; then
1725   set x "$CONFIG_SITE"
1726 elif test "x$prefix" != xNONE; then
1727   set x "$prefix/share/config.site" "$prefix/etc/config.site"
1728 else
1729   set x "$ac_default_prefix/share/config.site" \
1730         "$ac_default_prefix/etc/config.site"
1731 fi
1732 shift
1733 for ac_site_file
1734 do
1735   if test -r "$ac_site_file"; then
1736     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1737 echo "$as_me: loading site script $ac_site_file" >&6;}
1738     sed 's/^/| /' "$ac_site_file" >&5
1739     . "$ac_site_file"
1740   fi
1741 done
1742
1743 if test -r "$cache_file"; then
1744   # Some versions of bash will fail to source /dev/null (special
1745   # files actually), so we avoid doing that.
1746   if test -f "$cache_file"; then
1747     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1748 echo "$as_me: loading cache $cache_file" >&6;}
1749     case $cache_file in
1750       [\\/]* | ?:[\\/]* ) . "$cache_file";;
1751       *)                      . "./$cache_file";;
1752     esac
1753   fi
1754 else
1755   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1756 echo "$as_me: creating cache $cache_file" >&6;}
1757   >$cache_file
1758 fi
1759
1760 # Check that the precious variables saved in the cache have kept the same
1761 # value.
1762 ac_cache_corrupted=false
1763 for ac_var in $ac_precious_vars; do
1764   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1765   eval ac_new_set=\$ac_env_${ac_var}_set
1766   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1767   eval ac_new_val=\$ac_env_${ac_var}_value
1768   case $ac_old_set,$ac_new_set in
1769     set,)
1770       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1771 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1772       ac_cache_corrupted=: ;;
1773     ,set)
1774       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1775 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1776       ac_cache_corrupted=: ;;
1777     ,);;
1778     *)
1779       if test "x$ac_old_val" != "x$ac_new_val"; then
1780         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1781 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1782         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1783 echo "$as_me:   former value:  $ac_old_val" >&2;}
1784         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1785 echo "$as_me:   current value: $ac_new_val" >&2;}
1786         ac_cache_corrupted=:
1787       fi;;
1788   esac
1789   # Pass precious variables to config.status.
1790   if test "$ac_new_set" = set; then
1791     case $ac_new_val in
1792     *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1793     *) ac_arg=$ac_var=$ac_new_val ;;
1794     esac
1795     case " $ac_configure_args " in
1796       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1797       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1798     esac
1799   fi
1800 done
1801 if $ac_cache_corrupted; then
1802   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1803 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1804   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1805 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1806    { (exit 1); exit 1; }; }
1807 fi
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833 ac_ext=c
1834 ac_cpp='$CPP $CPPFLAGS'
1835 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1836 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1837 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1838
1839
1840
1841
1842
1843
1844 ac_aux_dir=
1845 for ac_dir in config "$srcdir"/config; do
1846   if test -f "$ac_dir/install-sh"; then
1847     ac_aux_dir=$ac_dir
1848     ac_install_sh="$ac_aux_dir/install-sh -c"
1849     break
1850   elif test -f "$ac_dir/install.sh"; then
1851     ac_aux_dir=$ac_dir
1852     ac_install_sh="$ac_aux_dir/install.sh -c"
1853     break
1854   elif test -f "$ac_dir/shtool"; then
1855     ac_aux_dir=$ac_dir
1856     ac_install_sh="$ac_aux_dir/shtool install -c"
1857     break
1858   fi
1859 done
1860 if test -z "$ac_aux_dir"; then
1861   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5
1862 echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;}
1863    { (exit 1); exit 1; }; }
1864 fi
1865
1866 # These three variables are undocumented and unsupported,
1867 # and are intended to be withdrawn in a future Autoconf release.
1868 # They can cause serious problems if a builder's source tree is in a directory
1869 # whose full name contains unusual characters.
1870 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
1871 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
1872 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
1873
1874
1875
1876 configure_args=$ac_configure_args
1877
1878
1879
1880 cat >>confdefs.h <<_ACEOF
1881 #define PG_VERSION "$PACKAGE_VERSION"
1882 _ACEOF
1883
1884
1885 # Make sure we can run config.sub.
1886 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
1887   { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
1888 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
1889    { (exit 1); exit 1; }; }
1890
1891 { echo "$as_me:$LINENO: checking build system type" >&5
1892 echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
1893 if test "${ac_cv_build+set}" = set; then
1894   echo $ECHO_N "(cached) $ECHO_C" >&6
1895 else
1896   ac_build_alias=$build_alias
1897 test "x$ac_build_alias" = x &&
1898   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
1899 test "x$ac_build_alias" = x &&
1900   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1901 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1902    { (exit 1); exit 1; }; }
1903 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
1904   { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
1905 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
1906    { (exit 1); exit 1; }; }
1907
1908 fi
1909 { echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1910 echo "${ECHO_T}$ac_cv_build" >&6; }
1911 case $ac_cv_build in
1912 *-*-*) ;;
1913 *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
1914 echo "$as_me: error: invalid value of canonical build" >&2;}
1915    { (exit 1); exit 1; }; };;
1916 esac
1917 build=$ac_cv_build
1918 ac_save_IFS=$IFS; IFS='-'
1919 set x $ac_cv_build
1920 shift
1921 build_cpu=$1
1922 build_vendor=$2
1923 shift; shift
1924 # Remember, the first character of IFS is used to create $*,
1925 # except with old shells:
1926 build_os=$*
1927 IFS=$ac_save_IFS
1928 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
1929
1930
1931 { echo "$as_me:$LINENO: checking host system type" >&5
1932 echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
1933 if test "${ac_cv_host+set}" = set; then
1934   echo $ECHO_N "(cached) $ECHO_C" >&6
1935 else
1936   if test "x$host_alias" = x; then
1937   ac_cv_host=$ac_cv_build
1938 else
1939   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
1940     { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
1941 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
1942    { (exit 1); exit 1; }; }
1943 fi
1944
1945 fi
1946 { echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1947 echo "${ECHO_T}$ac_cv_host" >&6; }
1948 case $ac_cv_host in
1949 *-*-*) ;;
1950 *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
1951 echo "$as_me: error: invalid value of canonical host" >&2;}
1952    { (exit 1); exit 1; }; };;
1953 esac
1954 host=$ac_cv_host
1955 ac_save_IFS=$IFS; IFS='-'
1956 set x $ac_cv_host
1957 shift
1958 host_cpu=$1
1959 host_vendor=$2
1960 shift; shift
1961 # Remember, the first character of IFS is used to create $*,
1962 # except with old shells:
1963 host_os=$*
1964 IFS=$ac_save_IFS
1965 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
1966
1967
1968
1969 template=
1970 { echo "$as_me:$LINENO: checking which template to use" >&5
1971 echo $ECHO_N "checking which template to use... $ECHO_C" >&6; }
1972
1973
1974 pgac_args="$pgac_args with_template"
1975
1976
1977 # Check whether --with-template was given.
1978 if test "${with_template+set}" = set; then
1979   withval=$with_template;
1980   case $withval in
1981     yes)
1982       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1983 echo "$as_me: error: argument required for --with-template option" >&2;}
1984    { (exit 1); exit 1; }; }
1985       ;;
1986     no)
1987       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1988 echo "$as_me: error: argument required for --with-template option" >&2;}
1989    { (exit 1); exit 1; }; }
1990       ;;
1991     *)
1992
1993   case $withval in
1994     list)   echo; ls "$srcdir/src/template"; exit;;
1995     *)      if test -f "$srcdir/src/template/$with_template" ; then
1996               template=$withval
1997             else
1998               { { echo "$as_me:$LINENO: error: '$withval' is not a valid template name. Use 'list' for a list." >&5
1999 echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a list." >&2;}
2000    { (exit 1); exit 1; }; }
2001             fi;;
2002   esac
2003
2004       ;;
2005   esac
2006
2007 else
2008
2009 # --with-template not given
2010
2011 case $host_os in
2012      aix*) template=aix ;;
2013     bsdi*) template=bsdi ;;
2014   cygwin*) template=cygwin ;;
2015   darwin*) template=darwin ;;
2016     dgux*) template=dgux ;;
2017  freebsd*) template=freebsd ;;
2018     hpux*) template=hpux ;;
2019     irix*) template=irix ;;
2020  linux*|gnu*|k*bsd*-gnu)
2021            template=linux ;;
2022    mingw*) template=win32 ;;
2023   netbsd*) template=netbsd ;;
2024 nextstep*) template=nextstep ;;
2025  openbsd*) template=openbsd ;;
2026      osf*) template=osf ;;
2027      sco*) template=sco ;;
2028  solaris*) template=solaris ;;
2029    sunos*) template=sunos4 ;;
2030  sysv4.2*)
2031         case $host_vendor in
2032           univel) template=univel ;;
2033         esac ;;
2034    sysv4*) template=svr4 ;;
2035    sysv5*) template=unixware ;;
2036   ultrix*) template=ultrix4 ;;
2037 esac
2038
2039   if test x"$template" = x"" ; then
2040     { { echo "$as_me:$LINENO: error:
2041 *******************************************************************
2042 PostgreSQL has apparently not been ported to your platform yet.
2043 To try a manual configuration, look into the src/template directory
2044 for a similar platform and use the '--with-template=' option.
2045
2046 Please also contact <pgsql-ports@postgresql.org> to see about
2047 rectifying this.  Include the above 'checking host system type...'
2048 line.
2049 *******************************************************************
2050 " >&5
2051 echo "$as_me: 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 " >&2;}
2062    { (exit 1); exit 1; }; }
2063   fi
2064
2065
2066 fi
2067
2068
2069
2070 { echo "$as_me:$LINENO: result: $template" >&5
2071 echo "${ECHO_T}$template" >&6; }
2072
2073 PORTNAME=$template
2074
2075
2076 # Initialize default assumption that we do not need separate assembly code
2077 # for TAS (test-and-set).  This can be overridden by the template file
2078 # when it's executed.
2079 need_tas=no
2080 tas_file=dummy.s
2081
2082
2083
2084 ##
2085 ## Command line options
2086 ##
2087
2088 #
2089 # Add non-standard directories to the include path
2090 #
2091
2092 pgac_args="$pgac_args with_includes"
2093
2094
2095 # Check whether --with-includes was given.
2096 if test "${with_includes+set}" = set; then
2097   withval=$with_includes;
2098   case $withval in
2099     yes)
2100       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
2101 echo "$as_me: error: argument required for --with-includes option" >&2;}
2102    { (exit 1); exit 1; }; }
2103       ;;
2104     no)
2105       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
2106 echo "$as_me: error: argument required for --with-includes option" >&2;}
2107    { (exit 1); exit 1; }; }
2108       ;;
2109     *)
2110
2111       ;;
2112   esac
2113
2114 fi
2115
2116
2117
2118
2119 #
2120 # Add non-standard directories to the library search path
2121 #
2122
2123 pgac_args="$pgac_args with_libraries"
2124
2125
2126 # Check whether --with-libraries was given.
2127 if test "${with_libraries+set}" = set; then
2128   withval=$with_libraries;
2129   case $withval in
2130     yes)
2131       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
2132 echo "$as_me: error: argument required for --with-libraries option" >&2;}
2133    { (exit 1); exit 1; }; }
2134       ;;
2135     no)
2136       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
2137 echo "$as_me: error: argument required for --with-libraries option" >&2;}
2138    { (exit 1); exit 1; }; }
2139       ;;
2140     *)
2141       LIBRARY_DIRS=$withval
2142       ;;
2143   esac
2144
2145 fi
2146
2147
2148
2149
2150 pgac_args="$pgac_args with_libs"
2151
2152
2153 # Check whether --with-libs was given.
2154 if test "${with_libs+set}" = set; then
2155   withval=$with_libs;
2156   case $withval in
2157     yes)
2158       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
2159 echo "$as_me: error: argument required for --with-libs option" >&2;}
2160    { (exit 1); exit 1; }; }
2161       ;;
2162     no)
2163       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
2164 echo "$as_me: error: argument required for --with-libs option" >&2;}
2165    { (exit 1); exit 1; }; }
2166       ;;
2167     *)
2168       LIBRARY_DIRS=$withval
2169       ;;
2170   esac
2171
2172 fi
2173
2174
2175
2176
2177 #
2178 # 64-bit integer date/time storage (--enable-integer-datetimes)
2179 #
2180 { echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time support" >&5
2181 echo $ECHO_N "checking whether to build with 64-bit integer date/time support... $ECHO_C" >&6; }
2182
2183 pgac_args="$pgac_args enable_integer_datetimes"
2184
2185 # Check whether --enable-integer-datetimes was given.
2186 if test "${enable_integer_datetimes+set}" = set; then
2187   enableval=$enable_integer_datetimes;
2188   case $enableval in
2189     yes)
2190
2191 cat >>confdefs.h <<\_ACEOF
2192 #define USE_INTEGER_DATETIMES 1
2193 _ACEOF
2194
2195       ;;
2196     no)
2197       :
2198       ;;
2199     *)
2200       { { echo "$as_me:$LINENO: error: no argument expected for --enable-integer-datetimes option" >&5
2201 echo "$as_me: error: no argument expected for --enable-integer-datetimes option" >&2;}
2202    { (exit 1); exit 1; }; }
2203       ;;
2204   esac
2205
2206 else
2207   enable_integer_datetimes=no
2208
2209 fi
2210
2211
2212 { echo "$as_me:$LINENO: result: $enable_integer_datetimes" >&5
2213 echo "${ECHO_T}$enable_integer_datetimes" >&6; }
2214
2215
2216 #
2217 # NLS
2218 #
2219 { echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
2220 echo $ECHO_N "checking whether NLS is wanted... $ECHO_C" >&6; }
2221
2222 pgac_args="$pgac_args enable_nls"
2223
2224 # Check whether --enable-nls was given.
2225 if test "${enable_nls+set}" = set; then
2226   enableval=$enable_nls;
2227   case $enableval in
2228     yes)
2229       :
2230       ;;
2231     no)
2232       :
2233       ;;
2234     *)
2235       enable_nls=yes
2236 WANTED_LANGUAGES=$enableval
2237       ;;
2238   esac
2239
2240 else
2241   enable_nls=no
2242 fi
2243
2244
2245
2246 if test "$enable_nls" = yes; then
2247
2248 cat >>confdefs.h <<\_ACEOF
2249 #define ENABLE_NLS 1
2250 _ACEOF
2251
2252 fi
2253
2254 { echo "$as_me:$LINENO: result: $enable_nls" >&5
2255 echo "${ECHO_T}$enable_nls" >&6; }
2256
2257
2258
2259 #
2260 # Default port number (--with-pgport), default 5432
2261 #
2262 { echo "$as_me:$LINENO: checking for default port number" >&5
2263 echo $ECHO_N "checking for default port number... $ECHO_C" >&6; }
2264
2265 pgac_args="$pgac_args with_pgport"
2266
2267
2268 # Check whether --with-pgport was given.
2269 if test "${with_pgport+set}" = set; then
2270   withval=$with_pgport;
2271   case $withval in
2272     yes)
2273       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
2274 echo "$as_me: error: argument required for --with-pgport option" >&2;}
2275    { (exit 1); exit 1; }; }
2276       ;;
2277     no)
2278       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
2279 echo "$as_me: error: argument required for --with-pgport option" >&2;}
2280    { (exit 1); exit 1; }; }
2281       ;;
2282     *)
2283       default_port=$withval
2284       ;;
2285   esac
2286
2287 else
2288   default_port=5432
2289 fi
2290
2291
2292 { echo "$as_me:$LINENO: result: $default_port" >&5
2293 echo "${ECHO_T}$default_port" >&6; }
2294 # Need both of these because some places want an integer and some a string
2295
2296 cat >>confdefs.h <<_ACEOF
2297 #define DEF_PGPORT ${default_port}
2298 _ACEOF
2299
2300
2301 cat >>confdefs.h <<_ACEOF
2302 #define DEF_PGPORT_STR "${default_port}"
2303 _ACEOF
2304
2305
2306
2307 #
2308 # Option to disable shared libraries
2309 #
2310
2311 pgac_args="$pgac_args enable_shared"
2312
2313 # Check whether --enable-shared was given.
2314 if test "${enable_shared+set}" = set; then
2315   enableval=$enable_shared;
2316   case $enableval in
2317     yes)
2318       :
2319       ;;
2320     no)
2321       :
2322       ;;
2323     *)
2324       { { echo "$as_me:$LINENO: error: no argument expected for --enable-shared option" >&5
2325 echo "$as_me: error: no argument expected for --enable-shared option" >&2;}
2326    { (exit 1); exit 1; }; }
2327       ;;
2328   esac
2329
2330 else
2331   enable_shared=yes
2332
2333 fi
2334
2335
2336
2337
2338 #
2339 # '-rpath'-like feature can be disabled
2340 #
2341
2342 pgac_args="$pgac_args enable_rpath"
2343
2344 # Check whether --enable-rpath was given.
2345 if test "${enable_rpath+set}" = set; then
2346   enableval=$enable_rpath;
2347   case $enableval in
2348     yes)
2349       :
2350       ;;
2351     no)
2352       :
2353       ;;
2354     *)
2355       { { echo "$as_me:$LINENO: error: no argument expected for --enable-rpath option" >&5
2356 echo "$as_me: error: no argument expected for --enable-rpath option" >&2;}
2357    { (exit 1); exit 1; }; }
2358       ;;
2359   esac
2360
2361 else
2362   enable_rpath=yes
2363
2364 fi
2365
2366
2367
2368
2369 #
2370 # Spinlocks
2371 #
2372
2373 pgac_args="$pgac_args enable_spinlocks"
2374
2375 # Check whether --enable-spinlocks was given.
2376 if test "${enable_spinlocks+set}" = set; then
2377   enableval=$enable_spinlocks;
2378   case $enableval in
2379     yes)
2380       :
2381       ;;
2382     no)
2383       :
2384       ;;
2385     *)
2386       { { echo "$as_me:$LINENO: error: no argument expected for --enable-spinlocks option" >&5
2387 echo "$as_me: error: no argument expected for --enable-spinlocks option" >&2;}
2388    { (exit 1); exit 1; }; }
2389       ;;
2390   esac
2391
2392 else
2393   enable_spinlocks=yes
2394
2395 fi
2396
2397
2398
2399 #
2400 # --enable-debug adds -g to compiler flags
2401 #
2402
2403 pgac_args="$pgac_args enable_debug"
2404
2405 # Check whether --enable-debug was given.
2406 if test "${enable_debug+set}" = set; then
2407   enableval=$enable_debug;
2408   case $enableval in
2409     yes)
2410       :
2411       ;;
2412     no)
2413       :
2414       ;;
2415     *)
2416       { { echo "$as_me:$LINENO: error: no argument expected for --enable-debug option" >&5
2417 echo "$as_me: error: no argument expected for --enable-debug option" >&2;}
2418    { (exit 1); exit 1; }; }
2419       ;;
2420   esac
2421
2422 else
2423   enable_debug=no
2424
2425 fi
2426
2427
2428
2429
2430 #
2431 # --enable-profiling enables gcc profiling
2432 #
2433
2434 pgac_args="$pgac_args enable_profiling"
2435
2436 # Check whether --enable-profiling was given.
2437 if test "${enable_profiling+set}" = set; then
2438   enableval=$enable_profiling;
2439   case $enableval in
2440     yes)
2441       :
2442       ;;
2443     no)
2444       :
2445       ;;
2446     *)
2447       { { echo "$as_me:$LINENO: error: no argument expected for --enable-profiling option" >&5
2448 echo "$as_me: error: no argument expected for --enable-profiling option" >&2;}
2449    { (exit 1); exit 1; }; }
2450       ;;
2451   esac
2452
2453 else
2454   enable_profiling=no
2455
2456 fi
2457
2458
2459
2460
2461 #
2462 # DTrace
2463 #
2464
2465 pgac_args="$pgac_args enable_dtrace"
2466
2467 # Check whether --enable-dtrace was given.
2468 if test "${enable_dtrace+set}" = set; then
2469   enableval=$enable_dtrace;
2470   case $enableval in
2471     yes)
2472
2473 cat >>confdefs.h <<\_ACEOF
2474 #define ENABLE_DTRACE 1
2475 _ACEOF
2476
2477 for ac_prog in dtrace
2478 do
2479   # Extract the first word of "$ac_prog", so it can be a program name with args.
2480 set dummy $ac_prog; ac_word=$2
2481 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2482 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2483 if test "${ac_cv_prog_DTRACE+set}" = set; then
2484   echo $ECHO_N "(cached) $ECHO_C" >&6
2485 else
2486   if test -n "$DTRACE"; then
2487   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
2488 else
2489 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2490 for as_dir in $PATH
2491 do
2492   IFS=$as_save_IFS
2493   test -z "$as_dir" && as_dir=.
2494   for ac_exec_ext in '' $ac_executable_extensions; do
2495   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2496     ac_cv_prog_DTRACE="$ac_prog"
2497     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2498     break 2
2499   fi
2500 done
2501 done
2502 IFS=$as_save_IFS
2503
2504 fi
2505 fi
2506 DTRACE=$ac_cv_prog_DTRACE
2507 if test -n "$DTRACE"; then
2508   { echo "$as_me:$LINENO: result: $DTRACE" >&5
2509 echo "${ECHO_T}$DTRACE" >&6; }
2510 else
2511   { echo "$as_me:$LINENO: result: no" >&5
2512 echo "${ECHO_T}no" >&6; }
2513 fi
2514
2515
2516   test -n "$DTRACE" && break
2517 done
2518
2519 if test -z "$DTRACE"; then
2520   { { echo "$as_me:$LINENO: error: dtrace not found" >&5
2521 echo "$as_me: error: dtrace not found" >&2;}
2522    { (exit 1); exit 1; }; }
2523 fi
2524
2525       ;;
2526     no)
2527       :
2528       ;;
2529     *)
2530       { { echo "$as_me:$LINENO: error: no argument expected for --enable-dtrace option" >&5
2531 echo "$as_me: error: no argument expected for --enable-dtrace option" >&2;}
2532    { (exit 1); exit 1; }; }
2533       ;;
2534   esac
2535
2536 else
2537   enable_dtrace=no
2538
2539 fi
2540
2541
2542
2543
2544 #
2545 # C compiler
2546 #
2547
2548 # For historical reasons you can also use --with-CC to specify the C compiler
2549 # to use, although the standard way to do this is to set the CC environment
2550 # variable.
2551
2552 pgac_args="$pgac_args with_CC"
2553
2554
2555 # Check whether --with-CC was given.
2556 if test "${with_CC+set}" = set; then
2557   withval=$with_CC;
2558   case $withval in
2559     yes)
2560       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
2561 echo "$as_me: error: argument required for --with-CC option" >&2;}
2562    { (exit 1); exit 1; }; }
2563       ;;
2564     no)
2565       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
2566 echo "$as_me: error: argument required for --with-CC option" >&2;}
2567    { (exit 1); exit 1; }; }
2568       ;;
2569     *)
2570       CC=$with_CC
2571       ;;
2572   esac
2573
2574 fi
2575
2576
2577
2578 case $template in
2579   aix) pgac_cc_list="gcc xlc";;
2580  irix) pgac_cc_list="cc";; # no gcc
2581     *) pgac_cc_list="gcc cc";;
2582 esac
2583
2584 ac_ext=c
2585 ac_cpp='$CPP $CPPFLAGS'
2586 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2587 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2588 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2589 if test -n "$ac_tool_prefix"; then
2590   for ac_prog in $pgac_cc_list
2591   do
2592     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2593 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2594 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2595 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2596 if test "${ac_cv_prog_CC+set}" = set; then
2597   echo $ECHO_N "(cached) $ECHO_C" >&6
2598 else
2599   if test -n "$CC"; then
2600   ac_cv_prog_CC="$CC" # Let the user override the test.
2601 else
2602 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2603 for as_dir in $PATH
2604 do
2605   IFS=$as_save_IFS
2606   test -z "$as_dir" && as_dir=.
2607   for ac_exec_ext in '' $ac_executable_extensions; do
2608   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2609     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2610     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2611     break 2
2612   fi
2613 done
2614 done
2615 IFS=$as_save_IFS
2616
2617 fi
2618 fi
2619 CC=$ac_cv_prog_CC
2620 if test -n "$CC"; then
2621   { echo "$as_me:$LINENO: result: $CC" >&5
2622 echo "${ECHO_T}$CC" >&6; }
2623 else
2624   { echo "$as_me:$LINENO: result: no" >&5
2625 echo "${ECHO_T}no" >&6; }
2626 fi
2627
2628
2629     test -n "$CC" && break
2630   done
2631 fi
2632 if test -z "$CC"; then
2633   ac_ct_CC=$CC
2634   for ac_prog in $pgac_cc_list
2635 do
2636   # Extract the first word of "$ac_prog", so it can be a program name with args.
2637 set dummy $ac_prog; ac_word=$2
2638 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2639 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2640 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2641   echo $ECHO_N "(cached) $ECHO_C" >&6
2642 else
2643   if test -n "$ac_ct_CC"; then
2644   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2645 else
2646 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2647 for as_dir in $PATH
2648 do
2649   IFS=$as_save_IFS
2650   test -z "$as_dir" && as_dir=.
2651   for ac_exec_ext in '' $ac_executable_extensions; do
2652   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2653     ac_cv_prog_ac_ct_CC="$ac_prog"
2654     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2655     break 2
2656   fi
2657 done
2658 done
2659 IFS=$as_save_IFS
2660
2661 fi
2662 fi
2663 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2664 if test -n "$ac_ct_CC"; then
2665   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2666 echo "${ECHO_T}$ac_ct_CC" >&6; }
2667 else
2668   { echo "$as_me:$LINENO: result: no" >&5
2669 echo "${ECHO_T}no" >&6; }
2670 fi
2671
2672
2673   test -n "$ac_ct_CC" && break
2674 done
2675
2676   if test "x$ac_ct_CC" = x; then
2677     CC=""
2678   else
2679     case $cross_compiling:$ac_tool_warned in
2680 yes:)
2681 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2682 whose name does not start with the host triplet.  If you think this
2683 configuration is useful to you, please write to autoconf@gnu.org." >&5
2684 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2685 whose name does not start with the host triplet.  If you think this
2686 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2687 ac_tool_warned=yes ;;
2688 esac
2689     CC=$ac_ct_CC
2690   fi
2691 fi
2692
2693
2694 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2695 See \`config.log' for more details." >&5
2696 echo "$as_me: error: no acceptable C compiler found in \$PATH
2697 See \`config.log' for more details." >&2;}
2698    { (exit 1); exit 1; }; }
2699
2700 # Provide some information about the compiler.
2701 echo "$as_me:$LINENO: checking for C compiler version" >&5
2702 ac_compiler=`set X $ac_compile; echo $2`
2703 { (ac_try="$ac_compiler --version >&5"
2704 case "(($ac_try" in
2705   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2706   *) ac_try_echo=$ac_try;;
2707 esac
2708 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2709   (eval "$ac_compiler --version >&5") 2>&5
2710   ac_status=$?
2711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2712   (exit $ac_status); }
2713 { (ac_try="$ac_compiler -v >&5"
2714 case "(($ac_try" in
2715   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2716   *) ac_try_echo=$ac_try;;
2717 esac
2718 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2719   (eval "$ac_compiler -v >&5") 2>&5
2720   ac_status=$?
2721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2722   (exit $ac_status); }
2723 { (ac_try="$ac_compiler -V >&5"
2724 case "(($ac_try" in
2725   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2726   *) ac_try_echo=$ac_try;;
2727 esac
2728 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2729   (eval "$ac_compiler -V >&5") 2>&5
2730   ac_status=$?
2731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2732   (exit $ac_status); }
2733
2734 cat >conftest.$ac_ext <<_ACEOF
2735 /* confdefs.h.  */
2736 _ACEOF
2737 cat confdefs.h >>conftest.$ac_ext
2738 cat >>conftest.$ac_ext <<_ACEOF
2739 /* end confdefs.h.  */
2740
2741 int
2742 main ()
2743 {
2744
2745   ;
2746   return 0;
2747 }
2748 _ACEOF
2749 ac_clean_files_save=$ac_clean_files
2750 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2751 # Try to create an executable without -o first, disregard a.out.
2752 # It will help us diagnose broken compilers, and finding out an intuition
2753 # of exeext.
2754 { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2755 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2756 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2757 #
2758 # List of possible output files, starting from the most likely.
2759 # The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2760 # only as a last resort.  b.out is created by i960 compilers.
2761 ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2762 #
2763 # The IRIX 6 linker writes into existing files which may not be
2764 # executable, retaining their permissions.  Remove them first so a
2765 # subsequent execution test works.
2766 ac_rmfiles=
2767 for ac_file in $ac_files
2768 do
2769   case $ac_file in
2770     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2771     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2772   esac
2773 done
2774 rm -f $ac_rmfiles
2775
2776 if { (ac_try="$ac_link_default"
2777 case "(($ac_try" in
2778   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2779   *) ac_try_echo=$ac_try;;
2780 esac
2781 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2782   (eval "$ac_link_default") 2>&5
2783   ac_status=$?
2784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2785   (exit $ac_status); }; then
2786   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2787 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2788 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2789 # so that the user can short-circuit this test for compilers unknown to
2790 # Autoconf.
2791 for ac_file in $ac_files ''
2792 do
2793   test -f "$ac_file" || continue
2794   case $ac_file in
2795     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2796         ;;
2797     [ab].out )
2798         # We found the default executable, but exeext='' is most
2799         # certainly right.
2800         break;;
2801     *.* )
2802         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2803         then :; else
2804            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2805         fi
2806         # We set ac_cv_exeext here because the later test for it is not
2807         # safe: cross compilers may not add the suffix if given an `-o'
2808         # argument, so we may need to know it at that point already.
2809         # Even if this section looks crufty: it has the advantage of
2810         # actually working.
2811         break;;
2812     * )
2813         break;;
2814   esac
2815 done
2816 test "$ac_cv_exeext" = no && ac_cv_exeext=
2817
2818 else
2819   ac_file=''
2820 fi
2821
2822 { echo "$as_me:$LINENO: result: $ac_file" >&5
2823 echo "${ECHO_T}$ac_file" >&6; }
2824 if test -z "$ac_file"; then
2825   echo "$as_me: failed program was:" >&5
2826 sed 's/^/| /' conftest.$ac_ext >&5
2827
2828 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2829 See \`config.log' for more details." >&5
2830 echo "$as_me: error: C compiler cannot create executables
2831 See \`config.log' for more details." >&2;}
2832    { (exit 77); exit 77; }; }
2833 fi
2834
2835 ac_exeext=$ac_cv_exeext
2836
2837 # Check that the compiler produces executables we can run.  If not, either
2838 # the compiler is broken, or we cross compile.
2839 { echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2840 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2841 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2842 # If not cross compiling, check that we can run a simple program.
2843 if test "$cross_compiling" != yes; then
2844   if { ac_try='./$ac_file'
2845   { (case "(($ac_try" in
2846   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2847   *) ac_try_echo=$ac_try;;
2848 esac
2849 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2850   (eval "$ac_try") 2>&5
2851   ac_status=$?
2852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2853   (exit $ac_status); }; }; then
2854     cross_compiling=no
2855   else
2856     if test "$cross_compiling" = maybe; then
2857         cross_compiling=yes
2858     else
2859         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2860 If you meant to cross compile, use \`--host'.
2861 See \`config.log' for more details." >&5
2862 echo "$as_me: error: cannot run C compiled programs.
2863 If you meant to cross compile, use \`--host'.
2864 See \`config.log' for more details." >&2;}
2865    { (exit 1); exit 1; }; }
2866     fi
2867   fi
2868 fi
2869 { echo "$as_me:$LINENO: result: yes" >&5
2870 echo "${ECHO_T}yes" >&6; }
2871
2872 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2873 ac_clean_files=$ac_clean_files_save
2874 # Check that the compiler produces executables we can run.  If not, either
2875 # the compiler is broken, or we cross compile.
2876 { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2877 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2878 { echo "$as_me:$LINENO: result: $cross_compiling" >&5
2879 echo "${ECHO_T}$cross_compiling" >&6; }
2880
2881 { echo "$as_me:$LINENO: checking for suffix of executables" >&5
2882 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2883 if { (ac_try="$ac_link"
2884 case "(($ac_try" in
2885   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2886   *) ac_try_echo=$ac_try;;
2887 esac
2888 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2889   (eval "$ac_link") 2>&5
2890   ac_status=$?
2891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2892   (exit $ac_status); }; then
2893   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2894 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2895 # work properly (i.e., refer to `conftest.exe'), while it won't with
2896 # `rm'.
2897 for ac_file in conftest.exe conftest conftest.*; do
2898   test -f "$ac_file" || continue
2899   case $ac_file in
2900     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2901     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2902           break;;
2903     * ) break;;
2904   esac
2905 done
2906 else
2907   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2908 See \`config.log' for more details." >&5
2909 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2910 See \`config.log' for more details." >&2;}
2911    { (exit 1); exit 1; }; }
2912 fi
2913
2914 rm -f conftest$ac_cv_exeext
2915 { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2916 echo "${ECHO_T}$ac_cv_exeext" >&6; }
2917
2918 rm -f conftest.$ac_ext
2919 EXEEXT=$ac_cv_exeext
2920 ac_exeext=$EXEEXT
2921 { echo "$as_me:$LINENO: checking for suffix of object files" >&5
2922 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
2923 if test "${ac_cv_objext+set}" = set; then
2924   echo $ECHO_N "(cached) $ECHO_C" >&6
2925 else
2926   cat >conftest.$ac_ext <<_ACEOF
2927 /* confdefs.h.  */
2928 _ACEOF
2929 cat confdefs.h >>conftest.$ac_ext
2930 cat >>conftest.$ac_ext <<_ACEOF
2931 /* end confdefs.h.  */
2932
2933 int
2934 main ()
2935 {
2936
2937   ;
2938   return 0;
2939 }
2940 _ACEOF
2941 rm -f conftest.o conftest.obj
2942 if { (ac_try="$ac_compile"
2943 case "(($ac_try" in
2944   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2945   *) ac_try_echo=$ac_try;;
2946 esac
2947 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2948   (eval "$ac_compile") 2>&5
2949   ac_status=$?
2950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2951   (exit $ac_status); }; then
2952   for ac_file in conftest.o conftest.obj conftest.*; do
2953   test -f "$ac_file" || continue;
2954   case $ac_file in
2955     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
2956     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2957        break;;
2958   esac
2959 done
2960 else
2961   echo "$as_me: failed program was:" >&5
2962 sed 's/^/| /' conftest.$ac_ext >&5
2963
2964 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2965 See \`config.log' for more details." >&5
2966 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2967 See \`config.log' for more details." >&2;}
2968    { (exit 1); exit 1; }; }
2969 fi
2970
2971 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2972 fi
2973 { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2974 echo "${ECHO_T}$ac_cv_objext" >&6; }
2975 OBJEXT=$ac_cv_objext
2976 ac_objext=$OBJEXT
2977 { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2978 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
2979 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2980   echo $ECHO_N "(cached) $ECHO_C" >&6
2981 else
2982   cat >conftest.$ac_ext <<_ACEOF
2983 /* confdefs.h.  */
2984 _ACEOF
2985 cat confdefs.h >>conftest.$ac_ext
2986 cat >>conftest.$ac_ext <<_ACEOF
2987 /* end confdefs.h.  */
2988
2989 int
2990 main ()
2991 {
2992 #ifndef __GNUC__
2993        choke me
2994 #endif
2995
2996   ;
2997   return 0;
2998 }
2999 _ACEOF
3000 rm -f conftest.$ac_objext
3001 if { (ac_try="$ac_compile"
3002 case "(($ac_try" in
3003   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3004   *) ac_try_echo=$ac_try;;
3005 esac
3006 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3007   (eval "$ac_compile") 2>conftest.er1
3008   ac_status=$?
3009   grep -v '^ *+' conftest.er1 >conftest.err
3010   rm -f conftest.er1
3011   cat conftest.err >&5
3012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3013   (exit $ac_status); } && {
3014          test -z "$ac_c_werror_flag" ||
3015          test ! -s conftest.err
3016        } && test -s conftest.$ac_objext; then
3017   ac_compiler_gnu=yes
3018 else
3019   echo "$as_me: failed program was:" >&5
3020 sed 's/^/| /' conftest.$ac_ext >&5
3021
3022         ac_compiler_gnu=no
3023 fi
3024
3025 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3026 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3027
3028 fi
3029 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3030 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3031 GCC=`test $ac_compiler_gnu = yes && echo yes`
3032 ac_test_CFLAGS=${CFLAGS+set}
3033 ac_save_CFLAGS=$CFLAGS
3034 { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3035 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
3036 if test "${ac_cv_prog_cc_g+set}" = set; then
3037   echo $ECHO_N "(cached) $ECHO_C" >&6
3038 else
3039   ac_save_c_werror_flag=$ac_c_werror_flag
3040    ac_c_werror_flag=yes
3041    ac_cv_prog_cc_g=no
3042    CFLAGS="-g"
3043    cat >conftest.$ac_ext <<_ACEOF
3044 /* confdefs.h.  */
3045 _ACEOF
3046 cat confdefs.h >>conftest.$ac_ext
3047 cat >>conftest.$ac_ext <<_ACEOF
3048 /* end confdefs.h.  */
3049
3050 int
3051 main ()
3052 {
3053
3054   ;
3055   return 0;
3056 }
3057 _ACEOF
3058 rm -f conftest.$ac_objext
3059 if { (ac_try="$ac_compile"
3060 case "(($ac_try" in
3061   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3062   *) ac_try_echo=$ac_try;;
3063 esac
3064 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3065   (eval "$ac_compile") 2>conftest.er1
3066   ac_status=$?
3067   grep -v '^ *+' conftest.er1 >conftest.err
3068   rm -f conftest.er1
3069   cat conftest.err >&5
3070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3071   (exit $ac_status); } && {
3072          test -z "$ac_c_werror_flag" ||
3073          test ! -s conftest.err
3074        } && test -s conftest.$ac_objext; then
3075   ac_cv_prog_cc_g=yes
3076 else
3077   echo "$as_me: failed program was:" >&5
3078 sed 's/^/| /' conftest.$ac_ext >&5
3079
3080         CFLAGS=""
3081       cat >conftest.$ac_ext <<_ACEOF
3082 /* confdefs.h.  */
3083 _ACEOF
3084 cat confdefs.h >>conftest.$ac_ext
3085 cat >>conftest.$ac_ext <<_ACEOF
3086 /* end confdefs.h.  */
3087
3088 int
3089 main ()
3090 {
3091
3092   ;
3093   return 0;
3094 }
3095 _ACEOF
3096 rm -f conftest.$ac_objext
3097 if { (ac_try="$ac_compile"
3098 case "(($ac_try" in
3099   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3100   *) ac_try_echo=$ac_try;;
3101 esac
3102 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3103   (eval "$ac_compile") 2>conftest.er1
3104   ac_status=$?
3105   grep -v '^ *+' conftest.er1 >conftest.err
3106   rm -f conftest.er1
3107   cat conftest.err >&5
3108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3109   (exit $ac_status); } && {
3110          test -z "$ac_c_werror_flag" ||
3111          test ! -s conftest.err
3112        } && test -s conftest.$ac_objext; then
3113   :
3114 else
3115   echo "$as_me: failed program was:" >&5
3116 sed 's/^/| /' conftest.$ac_ext >&5
3117
3118         ac_c_werror_flag=$ac_save_c_werror_flag
3119          CFLAGS="-g"
3120          cat >conftest.$ac_ext <<_ACEOF
3121 /* confdefs.h.  */
3122 _ACEOF
3123 cat confdefs.h >>conftest.$ac_ext
3124 cat >>conftest.$ac_ext <<_ACEOF
3125 /* end confdefs.h.  */
3126
3127 int
3128 main ()
3129 {
3130
3131   ;
3132   return 0;
3133 }
3134 _ACEOF
3135 rm -f conftest.$ac_objext
3136 if { (ac_try="$ac_compile"
3137 case "(($ac_try" in
3138   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3139   *) ac_try_echo=$ac_try;;
3140 esac
3141 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3142   (eval "$ac_compile") 2>conftest.er1
3143   ac_status=$?
3144   grep -v '^ *+' conftest.er1 >conftest.err
3145   rm -f conftest.er1
3146   cat conftest.err >&5
3147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3148   (exit $ac_status); } && {
3149          test -z "$ac_c_werror_flag" ||
3150          test ! -s conftest.err
3151        } && test -s conftest.$ac_objext; then
3152   ac_cv_prog_cc_g=yes
3153 else
3154   echo "$as_me: failed program was:" >&5
3155 sed 's/^/| /' conftest.$ac_ext >&5
3156
3157
3158 fi
3159
3160 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3161 fi
3162
3163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3164 fi
3165
3166 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3167    ac_c_werror_flag=$ac_save_c_werror_flag
3168 fi
3169 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3170 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3171 if test "$ac_test_CFLAGS" = set; then
3172   CFLAGS=$ac_save_CFLAGS
3173 elif test $ac_cv_prog_cc_g = yes; then
3174   if test "$GCC" = yes; then
3175     CFLAGS="-g -O2"
3176   else
3177     CFLAGS="-g"
3178   fi
3179 else
3180   if test "$GCC" = yes; then
3181     CFLAGS="-O2"
3182   else
3183     CFLAGS=
3184   fi
3185 fi
3186 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3187 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3188 if test "${ac_cv_prog_cc_c89+set}" = set; then
3189   echo $ECHO_N "(cached) $ECHO_C" >&6
3190 else
3191   ac_cv_prog_cc_c89=no
3192 ac_save_CC=$CC
3193 cat >conftest.$ac_ext <<_ACEOF
3194 /* confdefs.h.  */
3195 _ACEOF
3196 cat confdefs.h >>conftest.$ac_ext
3197 cat >>conftest.$ac_ext <<_ACEOF
3198 /* end confdefs.h.  */
3199 #include <stdarg.h>
3200 #include <stdio.h>
3201 #include <sys/types.h>
3202 #include <sys/stat.h>
3203 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3204 struct buf { int x; };
3205 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3206 static char *e (p, i)
3207      char **p;
3208      int i;
3209 {
3210   return p[i];
3211 }
3212 static char *f (char * (*g) (char **, int), char **p, ...)
3213 {
3214   char *s;
3215   va_list v;
3216   va_start (v,p);
3217   s = g (p, va_arg (v,int));
3218   va_end (v);
3219   return s;
3220 }
3221
3222 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3223    function prototypes and stuff, but not '\xHH' hex character constants.
3224    These don't provoke an error unfortunately, instead are silently treated
3225    as 'x'.  The following induces an error, until -std is added to get
3226    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3227    array size at least.  It's necessary to write '\x00'==0 to get something
3228    that's true only with -std.  */
3229 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3230
3231 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3232    inside strings and character constants.  */
3233 #define FOO(x) 'x'
3234 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3235
3236 int test (int i, double x);
3237 struct s1 {int (*f) (int a);};
3238 struct s2 {int (*f) (double a);};
3239 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3240 int argc;
3241 char **argv;
3242 int
3243 main ()
3244 {
3245 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3246   ;
3247   return 0;
3248 }
3249 _ACEOF
3250 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3251         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3252 do
3253   CC="$ac_save_CC $ac_arg"
3254   rm -f conftest.$ac_objext
3255 if { (ac_try="$ac_compile"
3256 case "(($ac_try" in
3257   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3258   *) ac_try_echo=$ac_try;;
3259 esac
3260 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3261   (eval "$ac_compile") 2>conftest.er1
3262   ac_status=$?
3263   grep -v '^ *+' conftest.er1 >conftest.err
3264   rm -f conftest.er1
3265   cat conftest.err >&5
3266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3267   (exit $ac_status); } && {
3268          test -z "$ac_c_werror_flag" ||
3269          test ! -s conftest.err
3270        } && test -s conftest.$ac_objext; then
3271   ac_cv_prog_cc_c89=$ac_arg
3272 else
3273   echo "$as_me: failed program was:" >&5
3274 sed 's/^/| /' conftest.$ac_ext >&5
3275
3276
3277 fi
3278
3279 rm -f core conftest.err conftest.$ac_objext
3280   test "x$ac_cv_prog_cc_c89" != "xno" && break
3281 done
3282 rm -f conftest.$ac_ext
3283 CC=$ac_save_CC
3284
3285 fi
3286 # AC_CACHE_VAL
3287 case "x$ac_cv_prog_cc_c89" in
3288   x)
3289     { echo "$as_me:$LINENO: result: none needed" >&5
3290 echo "${ECHO_T}none needed" >&6; } ;;
3291   xno)
3292     { echo "$as_me:$LINENO: result: unsupported" >&5
3293 echo "${ECHO_T}unsupported" >&6; } ;;
3294   *)
3295     CC="$CC $ac_cv_prog_cc_c89"
3296     { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3297 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3298 esac
3299
3300
3301 ac_ext=c
3302 ac_cpp='$CPP $CPPFLAGS'
3303 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3304 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3305 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3306
3307
3308 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
3309 # but has idiosyncrasies of its own.  We assume icc will define
3310 # __INTEL_COMPILER regardless of CFLAGS.
3311
3312 cat >conftest.$ac_ext <<_ACEOF
3313 /* confdefs.h.  */
3314 _ACEOF
3315 cat confdefs.h >>conftest.$ac_ext
3316 cat >>conftest.$ac_ext <<_ACEOF
3317 /* end confdefs.h.  */
3318
3319 int
3320 main ()
3321 {
3322 #ifndef __INTEL_COMPILER
3323 choke me
3324 #endif
3325   ;
3326   return 0;
3327 }
3328 _ACEOF
3329 rm -f conftest.$ac_objext
3330 if { (ac_try="$ac_compile"
3331 case "(($ac_try" in
3332   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3333   *) ac_try_echo=$ac_try;;
3334 esac
3335 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3336   (eval "$ac_compile") 2>conftest.er1
3337   ac_status=$?
3338   grep -v '^ *+' conftest.er1 >conftest.err
3339   rm -f conftest.er1
3340   cat conftest.err >&5
3341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3342   (exit $ac_status); } && {
3343          test -z "$ac_c_werror_flag" ||
3344          test ! -s conftest.err
3345        } && test -s conftest.$ac_objext; then
3346   ICC=yes
3347 else
3348   echo "$as_me: failed program was:" >&5
3349 sed 's/^/| /' conftest.$ac_ext >&5
3350
3351         ICC=no
3352 fi
3353
3354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3355
3356 unset CFLAGS
3357
3358 #
3359 # Read the template
3360 #
3361 . "$srcdir/src/template/$template" || exit
3362
3363 # CFLAGS are selected so:
3364 # If the user specifies something in the environment, that is used.
3365 # else:  If the template file set something, that is used.
3366 # else:  If the compiler is GCC, then we use -O2.
3367 # else:  If the compiler is something else, then we use -0.
3368
3369 if test "$ac_env_CFLAGS_set" = set; then
3370   CFLAGS=$ac_env_CFLAGS_value
3371 elif test "${CFLAGS+set}" = set; then
3372   : # (keep what template set)
3373 elif test "$GCC" = yes; then
3374   CFLAGS="-O2"
3375 else
3376   # if the user selected debug mode, don't use -O
3377   if test "$enable_debug" != yes; then
3378     CFLAGS="-O"
3379   fi
3380 fi
3381
3382 # Some versions of GCC support some additional useful warning flags.
3383 # Check whether they are supported, and add them to CFLAGS if so.
3384 # ICC pretends to be GCC but it's lying; it doesn't support these options.
3385
3386 if test "$GCC" = yes -a "$ICC" = no; then
3387   CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline"
3388   # These work in some but not all gcc versions
3389   { echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5
3390 echo $ECHO_N "checking if $CC supports -Wdeclaration-after-statement... $ECHO_C" >&6; }
3391 pgac_save_CFLAGS=$CFLAGS
3392 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
3393 cat >conftest.$ac_ext <<_ACEOF
3394 /* confdefs.h.  */
3395 _ACEOF
3396 cat confdefs.h >>conftest.$ac_ext
3397 cat >>conftest.$ac_ext <<_ACEOF
3398 /* end confdefs.h.  */
3399
3400 int
3401 main ()
3402 {
3403
3404   ;
3405   return 0;
3406 }
3407 _ACEOF
3408 rm -f conftest.$ac_objext
3409 if { (ac_try="$ac_compile"
3410 case "(($ac_try" in
3411   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3412   *) ac_try_echo=$ac_try;;
3413 esac
3414 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3415   (eval "$ac_compile") 2>conftest.er1
3416   ac_status=$?
3417   grep -v '^ *+' conftest.er1 >conftest.err
3418   rm -f conftest.er1
3419   cat conftest.err >&5
3420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3421   (exit $ac_status); } && {
3422          test -z "$ac_c_werror_flag" ||
3423          test ! -s conftest.err
3424        } && test -s conftest.$ac_objext; then
3425   { echo "$as_me:$LINENO: result: yes" >&5
3426 echo "${ECHO_T}yes" >&6; }
3427 else
3428   echo "$as_me: failed program was:" >&5
3429 sed 's/^/| /' conftest.$ac_ext >&5
3430
3431         CFLAGS="$pgac_save_CFLAGS"
3432                     { echo "$as_me:$LINENO: result: no" >&5
3433 echo "${ECHO_T}no" >&6; }
3434 fi
3435
3436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3437
3438   { echo "$as_me:$LINENO: checking if $CC supports -Wendif-labels" >&5
3439 echo $ECHO_N "checking if $CC supports -Wendif-labels... $ECHO_C" >&6; }
3440 pgac_save_CFLAGS=$CFLAGS
3441 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
3442 cat >conftest.$ac_ext <<_ACEOF
3443 /* confdefs.h.  */
3444 _ACEOF
3445 cat confdefs.h >>conftest.$ac_ext
3446 cat >>conftest.$ac_ext <<_ACEOF
3447 /* end confdefs.h.  */
3448
3449 int
3450 main ()
3451 {
3452
3453   ;
3454   return 0;
3455 }
3456 _ACEOF
3457 rm -f conftest.$ac_objext
3458 if { (ac_try="$ac_compile"
3459 case "(($ac_try" in
3460   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3461   *) ac_try_echo=$ac_try;;
3462 esac
3463 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3464   (eval "$ac_compile") 2>conftest.er1
3465   ac_status=$?
3466   grep -v '^ *+' conftest.er1 >conftest.err
3467   rm -f conftest.er1
3468   cat conftest.err >&5
3469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3470   (exit $ac_status); } && {
3471          test -z "$ac_c_werror_flag" ||
3472          test ! -s conftest.err
3473        } && test -s conftest.$ac_objext; then
3474   { echo "$as_me:$LINENO: result: yes" >&5
3475 echo "${ECHO_T}yes" >&6; }
3476 else
3477   echo "$as_me: failed program was:" >&5
3478 sed 's/^/| /' conftest.$ac_ext >&5
3479
3480         CFLAGS="$pgac_save_CFLAGS"
3481                     { echo "$as_me:$LINENO: result: no" >&5
3482 echo "${ECHO_T}no" >&6; }
3483 fi
3484
3485 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3486
3487   # Disable strict-aliasing rules; needed for gcc 3.3+
3488   { echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
3489 echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6; }
3490 pgac_save_CFLAGS=$CFLAGS
3491 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
3492 cat >conftest.$ac_ext <<_ACEOF
3493 /* confdefs.h.  */
3494 _ACEOF
3495 cat confdefs.h >>conftest.$ac_ext
3496 cat >>conftest.$ac_ext <<_ACEOF
3497 /* end confdefs.h.  */
3498
3499 int
3500 main ()
3501 {
3502
3503   ;
3504   return 0;
3505 }
3506 _ACEOF
3507 rm -f conftest.$ac_objext
3508 if { (ac_try="$ac_compile"
3509 case "(($ac_try" in
3510   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3511   *) ac_try_echo=$ac_try;;
3512 esac
3513 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3514   (eval "$ac_compile") 2>conftest.er1
3515   ac_status=$?
3516   grep -v '^ *+' conftest.er1 >conftest.err
3517   rm -f conftest.er1
3518   cat conftest.err >&5
3519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3520   (exit $ac_status); } && {
3521          test -z "$ac_c_werror_flag" ||
3522          test ! -s conftest.err
3523        } && test -s conftest.$ac_objext; then
3524   { echo "$as_me:$LINENO: result: yes" >&5
3525 echo "${ECHO_T}yes" >&6; }
3526 else
3527   echo "$as_me: failed program was:" >&5
3528 sed 's/^/| /' conftest.$ac_ext >&5
3529
3530         CFLAGS="$pgac_save_CFLAGS"
3531                     { echo "$as_me:$LINENO: result: no" >&5
3532 echo "${ECHO_T}no" >&6; }
3533 fi
3534
3535 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3536
3537 elif test "$ICC" = yes; then
3538   # Intel's compiler has a bug/misoptimization in checking for
3539   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
3540   { echo "$as_me:$LINENO: checking if $CC supports -mp1" >&5
3541 echo $ECHO_N "checking if $CC supports -mp1... $ECHO_C" >&6; }
3542 pgac_save_CFLAGS=$CFLAGS
3543 CFLAGS="$pgac_save_CFLAGS -mp1"
3544 cat >conftest.$ac_ext <<_ACEOF
3545 /* confdefs.h.  */
3546 _ACEOF
3547 cat confdefs.h >>conftest.$ac_ext
3548 cat >>conftest.$ac_ext <<_ACEOF
3549 /* end confdefs.h.  */
3550
3551 int
3552 main ()
3553 {
3554
3555   ;
3556   return 0;
3557 }
3558 _ACEOF
3559 rm -f conftest.$ac_objext
3560 if { (ac_try="$ac_compile"
3561 case "(($ac_try" in
3562   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3563   *) ac_try_echo=$ac_try;;
3564 esac
3565 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3566   (eval "$ac_compile") 2>conftest.er1
3567   ac_status=$?
3568   grep -v '^ *+' conftest.er1 >conftest.err
3569   rm -f conftest.er1
3570   cat conftest.err >&5
3571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3572   (exit $ac_status); } && {
3573          test -z "$ac_c_werror_flag" ||
3574          test ! -s conftest.err
3575        } && test -s conftest.$ac_objext; then
3576   { echo "$as_me:$LINENO: result: yes" >&5
3577 echo "${ECHO_T}yes" >&6; }
3578 else
3579   echo "$as_me: failed program was:" >&5
3580 sed 's/^/| /' conftest.$ac_ext >&5
3581
3582         CFLAGS="$pgac_save_CFLAGS"
3583                     { echo "$as_me:$LINENO: result: no" >&5
3584 echo "${ECHO_T}no" >&6; }
3585 fi
3586
3587 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3588
3589   # Make sure strict aliasing is off (though this is said to be the default)
3590   { echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
3591 echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6; }
3592 pgac_save_CFLAGS=$CFLAGS
3593 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
3594 cat >conftest.$ac_ext <<_ACEOF
3595 /* confdefs.h.  */
3596 _ACEOF
3597 cat confdefs.h >>conftest.$ac_ext
3598 cat >>conftest.$ac_ext <<_ACEOF
3599 /* end confdefs.h.  */
3600
3601 int
3602 main ()
3603 {
3604
3605   ;
3606   return 0;
3607 }
3608 _ACEOF
3609 rm -f conftest.$ac_objext
3610 if { (ac_try="$ac_compile"
3611 case "(($ac_try" in
3612   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3613   *) ac_try_echo=$ac_try;;
3614 esac
3615 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3616   (eval "$ac_compile") 2>conftest.er1
3617   ac_status=$?
3618   grep -v '^ *+' conftest.er1 >conftest.err
3619   rm -f conftest.er1
3620   cat conftest.err >&5
3621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3622   (exit $ac_status); } && {
3623          test -z "$ac_c_werror_flag" ||
3624          test ! -s conftest.err
3625        } && test -s conftest.$ac_objext; then
3626   { echo "$as_me:$LINENO: result: yes" >&5
3627 echo "${ECHO_T}yes" >&6; }
3628 else
3629   echo "$as_me: failed program was:" >&5
3630 sed 's/^/| /' conftest.$ac_ext >&5
3631
3632         CFLAGS="$pgac_save_CFLAGS"
3633                     { echo "$as_me:$LINENO: result: no" >&5
3634 echo "${ECHO_T}no" >&6; }
3635 fi
3636
3637 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3638
3639 elif test x"${CC}" = x"xlc"; then
3640   # AIX xlc has to have strict aliasing turned off too
3641   { echo "$as_me:$LINENO: checking if $CC supports -qnoansialias" >&5
3642 echo $ECHO_N "checking if $CC supports -qnoansialias... $ECHO_C" >&6; }
3643 pgac_save_CFLAGS=$CFLAGS
3644 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
3645 cat >conftest.$ac_ext <<_ACEOF
3646 /* confdefs.h.  */
3647 _ACEOF
3648 cat confdefs.h >>conftest.$ac_ext
3649 cat >>conftest.$ac_ext <<_ACEOF
3650 /* end confdefs.h.  */
3651
3652 int
3653 main ()
3654 {
3655
3656   ;
3657   return 0;
3658 }
3659 _ACEOF
3660 rm -f conftest.$ac_objext
3661 if { (ac_try="$ac_compile"
3662 case "(($ac_try" in
3663   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3664   *) ac_try_echo=$ac_try;;
3665 esac
3666 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3667   (eval "$ac_compile") 2>conftest.er1
3668   ac_status=$?
3669   grep -v '^ *+' conftest.er1 >conftest.err
3670   rm -f conftest.er1
3671   cat conftest.err >&5
3672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3673   (exit $ac_status); } && {
3674          test -z "$ac_c_werror_flag" ||
3675          test ! -s conftest.err
3676        } && test -s conftest.$ac_objext; then
3677   { echo "$as_me:$LINENO: result: yes" >&5
3678 echo "${ECHO_T}yes" >&6; }
3679 else
3680   echo "$as_me: failed program was:" >&5
3681 sed 's/^/| /' conftest.$ac_ext >&5
3682
3683         CFLAGS="$pgac_save_CFLAGS"
3684                     { echo "$as_me:$LINENO: result: no" >&5
3685 echo "${ECHO_T}no" >&6; }
3686 fi
3687
3688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3689
3690 fi
3691
3692 # supply -g if --enable-debug
3693 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
3694   CFLAGS="$CFLAGS -g"
3695 fi
3696
3697 # enable profiling if --enable-profiling
3698 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
3699   if test "$GCC" = yes; then
3700
3701 cat >>confdefs.h <<\_ACEOF
3702 #define PROFILE_PID_DIR 1
3703 _ACEOF
3704
3705     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
3706   else
3707     { { echo "$as_me:$LINENO: error: --enable-profiling is supported only when using GCC" >&5
3708 echo "$as_me: error: --enable-profiling is supported only when using GCC" >&2;}
3709    { (exit 1); exit 1; }; }
3710   fi
3711 fi
3712
3713 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
3714 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
3715
3716 # We already have this in Makefile.win32, but configure needs it too
3717 if test "$PORTNAME" = "win32"; then
3718   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
3719 fi
3720
3721 # Check if the compiler still works with the template settings
3722 { echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
3723 echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6; }
3724 cat >conftest.$ac_ext <<_ACEOF
3725 /* confdefs.h.  */
3726 _ACEOF
3727 cat confdefs.h >>conftest.$ac_ext
3728 cat >>conftest.$ac_ext <<_ACEOF
3729 /* end confdefs.h.  */
3730
3731 int
3732 main ()
3733 {
3734 return 0;
3735   ;
3736   return 0;
3737 }
3738 _ACEOF
3739 rm -f conftest.$ac_objext conftest$ac_exeext
3740 if { (ac_try="$ac_link"
3741 case "(($ac_try" in
3742   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3743   *) ac_try_echo=$ac_try;;
3744 esac
3745 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3746   (eval "$ac_link") 2>conftest.er1
3747   ac_status=$?
3748   grep -v '^ *+' conftest.er1 >conftest.err
3749   rm -f conftest.er1
3750   cat conftest.err >&5
3751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3752   (exit $ac_status); } && {
3753          test -z "$ac_c_werror_flag" ||
3754          test ! -s conftest.err
3755        } && test -s conftest$ac_exeext &&
3756        $as_test_x conftest$ac_exeext; then
3757   { echo "$as_me:$LINENO: result: yes" >&5
3758 echo "${ECHO_T}yes" >&6; }
3759 else
3760   echo "$as_me: failed program was:" >&5
3761 sed 's/^/| /' conftest.$ac_ext >&5
3762
3763         { echo "$as_me:$LINENO: result: no" >&5
3764 echo "${ECHO_T}no" >&6; }
3765    { { echo "$as_me:$LINENO: error: cannot proceed" >&5
3766 echo "$as_me: error: cannot proceed" >&2;}
3767    { (exit 1); exit 1; }; }
3768 fi
3769
3770 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
3771       conftest$ac_exeext conftest.$ac_ext
3772
3773 # Defend against gcc -ffast-math
3774 if test "$GCC" = yes; then
3775 cat >conftest.$ac_ext <<_ACEOF
3776 /* confdefs.h.  */
3777 _ACEOF
3778 cat confdefs.h >>conftest.$ac_ext
3779 cat >>conftest.$ac_ext <<_ACEOF
3780 /* end confdefs.h.  */
3781
3782 int
3783 main ()
3784 {
3785 #ifdef __FAST_MATH__
3786 choke me
3787 #endif
3788   ;
3789   return 0;
3790 }
3791 _ACEOF
3792 rm -f conftest.$ac_objext
3793 if { (ac_try="$ac_compile"
3794 case "(($ac_try" in
3795   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3796   *) ac_try_echo=$ac_try;;
3797 esac
3798 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3799   (eval "$ac_compile") 2>conftest.er1
3800   ac_status=$?
3801   grep -v '^ *+' conftest.er1 >conftest.err
3802   rm -f conftest.er1
3803   cat conftest.err >&5
3804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3805   (exit $ac_status); } && {
3806          test -z "$ac_c_werror_flag" ||
3807          test ! -s conftest.err
3808        } && test -s conftest.$ac_objext; then
3809   :
3810 else
3811   echo "$as_me: failed program was:" >&5
3812 sed 's/^/| /' conftest.$ac_ext >&5
3813
3814         { { echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
3815 echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
3816    { (exit 1); exit 1; }; }
3817 fi
3818
3819 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3820 fi
3821
3822 ac_ext=c
3823 ac_cpp='$CPP $CPPFLAGS'
3824 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3825 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3826 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3827 { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3828 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3829 # On Suns, sometimes $CPP names a directory.
3830 if test -n "$CPP" && test -d "$CPP"; then
3831   CPP=
3832 fi
3833 if test -z "$CPP"; then
3834   if test "${ac_cv_prog_CPP+set}" = set; then
3835   echo $ECHO_N "(cached) $ECHO_C" >&6
3836 else
3837       # Double quotes because CPP needs to be expanded
3838     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3839     do
3840       ac_preproc_ok=false
3841 for ac_c_preproc_warn_flag in '' yes
3842 do
3843   # Use a header file that comes with gcc, so configuring glibc
3844   # with a fresh cross-compiler works.
3845   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3846   # <limits.h> exists even on freestanding compilers.
3847   # On the NeXT, cc -E runs the code through the compiler's parser,
3848   # not just through cpp. "Syntax error" is here to catch this case.
3849   cat >conftest.$ac_ext <<_ACEOF
3850 /* confdefs.h.  */
3851 _ACEOF
3852 cat confdefs.h >>conftest.$ac_ext
3853 cat >>conftest.$ac_ext <<_ACEOF
3854 /* end confdefs.h.  */
3855 #ifdef __STDC__
3856 # include <limits.h>
3857 #else
3858 # include <assert.h>
3859 #endif
3860                      Syntax error
3861 _ACEOF
3862 if { (ac_try="$ac_cpp conftest.$ac_ext"
3863 case "(($ac_try" in
3864   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3865   *) ac_try_echo=$ac_try;;
3866 esac
3867 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3868   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3869   ac_status=$?
3870   grep -v '^ *+' conftest.er1 >conftest.err
3871   rm -f conftest.er1
3872   cat conftest.err >&5
3873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3874   (exit $ac_status); } >/dev/null && {
3875          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3876          test ! -s conftest.err
3877        }; then
3878   :
3879 else
3880   echo "$as_me: failed program was:" >&5
3881 sed 's/^/| /' conftest.$ac_ext >&5
3882
3883   # Broken: fails on valid input.
3884 continue
3885 fi
3886
3887 rm -f conftest.err conftest.$ac_ext
3888
3889   # OK, works on sane cases.  Now check whether nonexistent headers
3890   # can be detected and how.
3891   cat >conftest.$ac_ext <<_ACEOF
3892 /* confdefs.h.  */
3893 _ACEOF
3894 cat confdefs.h >>conftest.$ac_ext
3895 cat >>conftest.$ac_ext <<_ACEOF
3896 /* end confdefs.h.  */
3897 #include <ac_nonexistent.h>
3898 _ACEOF
3899 if { (ac_try="$ac_cpp conftest.$ac_ext"
3900 case "(($ac_try" in
3901   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3902   *) ac_try_echo=$ac_try;;
3903 esac
3904 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3905   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3906   ac_status=$?
3907   grep -v '^ *+' conftest.er1 >conftest.err
3908   rm -f conftest.er1
3909   cat conftest.err >&5
3910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3911   (exit $ac_status); } >/dev/null && {
3912          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3913          test ! -s conftest.err
3914        }; then
3915   # Broken: success on invalid input.
3916 continue
3917 else
3918   echo "$as_me: failed program was:" >&5
3919 sed 's/^/| /' conftest.$ac_ext >&5
3920
3921   # Passes both tests.
3922 ac_preproc_ok=:
3923 break
3924 fi
3925
3926 rm -f conftest.err conftest.$ac_ext
3927
3928 done
3929 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3930 rm -f conftest.err conftest.$ac_ext
3931 if $ac_preproc_ok; then
3932   break
3933 fi
3934
3935     done
3936     ac_cv_prog_CPP=$CPP
3937
3938 fi
3939   CPP=$ac_cv_prog_CPP
3940 else
3941   ac_cv_prog_CPP=$CPP
3942 fi
3943 { echo "$as_me:$LINENO: result: $CPP" >&5
3944 echo "${ECHO_T}$CPP" >&6; }
3945 ac_preproc_ok=false
3946 for ac_c_preproc_warn_flag in '' yes
3947 do
3948   # Use a header file that comes with gcc, so configuring glibc
3949   # with a fresh cross-compiler works.
3950   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3951   # <limits.h> exists even on freestanding compilers.
3952   # On the NeXT, cc -E runs the code through the compiler's parser,
3953   # not just through cpp. "Syntax error" is here to catch this case.
3954   cat >conftest.$ac_ext <<_ACEOF
3955 /* confdefs.h.  */
3956 _ACEOF
3957 cat confdefs.h >>conftest.$ac_ext
3958 cat >>conftest.$ac_ext <<_ACEOF
3959 /* end confdefs.h.  */
3960 #ifdef __STDC__
3961 # include <limits.h>
3962 #else
3963 # include <assert.h>
3964 #endif
3965                      Syntax error
3966 _ACEOF
3967 if { (ac_try="$ac_cpp conftest.$ac_ext"
3968 case "(($ac_try" in
3969   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3970   *) ac_try_echo=$ac_try;;
3971 esac
3972 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3973   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3974   ac_status=$?
3975   grep -v '^ *+' conftest.er1 >conftest.err
3976   rm -f conftest.er1
3977   cat conftest.err >&5
3978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3979   (exit $ac_status); } >/dev/null && {
3980          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3981          test ! -s conftest.err
3982        }; then
3983   :
3984 else
3985   echo "$as_me: failed program was:" >&5
3986 sed 's/^/| /' conftest.$ac_ext >&5
3987
3988   # Broken: fails on valid input.
3989 continue
3990 fi
3991
3992 rm -f conftest.err conftest.$ac_ext
3993
3994   # OK, works on sane cases.  Now check whether nonexistent headers
3995   # can be detected and how.
3996   cat >conftest.$ac_ext <<_ACEOF
3997 /* confdefs.h.  */
3998 _ACEOF
3999 cat confdefs.h >>conftest.$ac_ext
4000 cat >>conftest.$ac_ext <<_ACEOF
4001 /* end confdefs.h.  */
4002 #include <ac_nonexistent.h>
4003 _ACEOF
4004 if { (ac_try="$ac_cpp conftest.$ac_ext"
4005 case "(($ac_try" in
4006   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4007   *) ac_try_echo=$ac_try;;
4008 esac
4009 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4010   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4011   ac_status=$?
4012   grep -v '^ *+' conftest.er1 >conftest.err
4013   rm -f conftest.er1
4014   cat conftest.err >&5
4015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4016   (exit $ac_status); } >/dev/null && {
4017          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4018          test ! -s conftest.err
4019        }; then
4020   # Broken: success on invalid input.
4021 continue
4022 else
4023   echo "$as_me: failed program was:" >&5
4024 sed 's/^/| /' conftest.$ac_ext >&5
4025
4026   # Passes both tests.
4027 ac_preproc_ok=:
4028 break
4029 fi
4030
4031 rm -f conftest.err conftest.$ac_ext
4032
4033 done
4034 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4035 rm -f conftest.err conftest.$ac_ext
4036 if $ac_preproc_ok; then
4037   :
4038 else
4039   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4040 See \`config.log' for more details." >&5
4041 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4042 See \`config.log' for more details." >&2;}
4043    { (exit 1); exit 1; }; }
4044 fi
4045
4046 ac_ext=c
4047 ac_cpp='$CPP $CPPFLAGS'
4048 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4049 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4050 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4051
4052
4053
4054 # Create compiler version string
4055 if test x"$GCC" = x"yes" ; then
4056   cc_string="GCC `${CC} --version | sed q`"
4057 else
4058   cc_string=$CC
4059 fi
4060
4061 cat >>confdefs.h <<_ACEOF
4062 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string"
4063 _ACEOF
4064
4065
4066
4067 #
4068 # Set up TAS assembly code if needed; the template file has now had its
4069 # chance to request this.
4070 #
4071 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
4072
4073
4074 if test "$need_tas" = yes ; then
4075   TAS=tas.o
4076 else
4077   TAS=""
4078 fi
4079
4080
4081
4082 #
4083 # Automatic dependency tracking
4084 #
4085
4086 pgac_args="$pgac_args enable_depend"
4087
4088 # Check whether --enable-depend was given.
4089 if test "${enable_depend+set}" = set; then
4090   enableval=$enable_depend;
4091   case $enableval in
4092     yes)
4093       autodepend=yes
4094       ;;
4095     no)
4096       :
4097       ;;
4098     *)
4099       { { echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
4100 echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
4101    { (exit 1); exit 1; }; }
4102       ;;
4103   esac
4104
4105 else
4106   enable_depend=no
4107
4108 fi
4109
4110
4111
4112
4113
4114 #
4115 # Enable assert checks
4116 #
4117
4118 pgac_args="$pgac_args enable_cassert"
4119
4120 # Check whether --enable-cassert was given.
4121 if test "${enable_cassert+set}" = set; then
4122   enableval=$enable_cassert;
4123   case $enableval in
4124     yes)
4125
4126 cat >>confdefs.h <<\_ACEOF
4127 #define USE_ASSERT_CHECKING 1
4128 _ACEOF
4129
4130       ;;
4131     no)
4132       :
4133       ;;
4134     *)
4135       { { echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
4136 echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
4137    { (exit 1); exit 1; }; }
4138       ;;
4139   esac
4140
4141 else
4142   enable_cassert=no
4143
4144 fi
4145
4146
4147
4148
4149 #
4150 # Include directories
4151 #
4152 ac_save_IFS=$IFS
4153 IFS="${IFS}${PATH_SEPARATOR}"
4154 # SRCH_INC comes from the template file
4155 for dir in $with_includes $SRCH_INC; do
4156   if test -d "$dir"; then
4157     INCLUDES="$INCLUDES -I$dir"
4158   else
4159     { echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
4160 echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
4161   fi
4162 done
4163 IFS=$ac_save_IFS
4164
4165
4166
4167 #
4168 # Library directories
4169 #
4170 ac_save_IFS=$IFS
4171 IFS="${IFS}${PATH_SEPARATOR}"
4172 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
4173 for dir in $LIBRARY_DIRS $SRCH_LIB; do
4174   if test -d "$dir"; then
4175     LIBDIRS="$LIBDIRS -L$dir"
4176   else
4177     { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
4178 echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
4179   fi
4180 done
4181 IFS=$ac_save_IFS
4182
4183 #
4184 # Enable thread-safe client libraries
4185 #
4186 { echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
4187 echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6; }
4188 if test "$PORTNAME" != "win32"; then
4189
4190 pgac_args="$pgac_args enable_thread_safety"
4191
4192 # Check whether --enable-thread-safety was given.
4193 if test "${enable_thread_safety+set}" = set; then
4194   enableval=$enable_thread_safety;
4195   case $enableval in
4196     yes)
4197       :
4198       ;;
4199     no)
4200       :
4201       ;;
4202     *)
4203       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
4204 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
4205    { (exit 1); exit 1; }; }
4206       ;;
4207   esac
4208
4209 else
4210   enable_thread_safety=no
4211
4212 fi
4213
4214
4215 else
4216 # Win32 should always use threads
4217
4218 pgac_args="$pgac_args enable_thread_safety"
4219
4220 # Check whether --enable-thread-safety was given.
4221 if test "${enable_thread_safety+set}" = set; then
4222   enableval=$enable_thread_safety;
4223   case $enableval in
4224     yes)
4225       :
4226       ;;
4227     no)
4228       :
4229       ;;
4230     *)
4231       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
4232 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
4233    { (exit 1); exit 1; }; }
4234       ;;
4235   esac
4236
4237 else
4238   enable_thread_safety=yes
4239
4240 fi
4241
4242
4243 fi
4244
4245
4246 pgac_args="$pgac_args enable_thread_safety_force"
4247
4248 # Check whether --enable-thread-safety-force was given.
4249 if test "${enable_thread_safety_force+set}" = set; then
4250   enableval=$enable_thread_safety_force;
4251   case $enableval in
4252     yes)
4253       :
4254       ;;
4255     no)
4256       :
4257       ;;
4258     *)
4259       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety-force option" >&5
4260 echo "$as_me: error: no argument expected for --enable-thread-safety-force option" >&2;}
4261    { (exit 1); exit 1; }; }
4262       ;;
4263   esac
4264
4265 else
4266   enable_thread_safety_force=no
4267
4268 fi
4269
4270
4271 if test "$enable_thread_safety" = yes -o \
4272         "$enable_thread_safety_force" = yes; then
4273   enable_thread_safety="yes"    # for 'force'
4274
4275 cat >>confdefs.h <<\_ACEOF
4276 #define ENABLE_THREAD_SAFETY 1
4277 _ACEOF
4278
4279 fi
4280 { echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
4281 echo "${ECHO_T}$enable_thread_safety" >&6; }
4282
4283
4284 #
4285 # Optionally build Tcl modules (PL/Tcl)
4286 #
4287 { echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
4288 echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6; }
4289
4290 pgac_args="$pgac_args with_tcl"
4291
4292
4293 # Check whether --with-tcl was given.
4294 if test "${with_tcl+set}" = set; then
4295   withval=$with_tcl;
4296   case $withval in
4297     yes)
4298       :
4299       ;;
4300     no)
4301       :
4302       ;;
4303     *)
4304       { { echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
4305 echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
4306    { (exit 1); exit 1; }; }
4307       ;;
4308   esac
4309
4310 else
4311   with_tcl=no
4312
4313 fi
4314
4315
4316 { echo "$as_me:$LINENO: result: $with_tcl" >&5
4317 echo "${ECHO_T}$with_tcl" >&6; }
4318
4319
4320 # We see if the path to the Tcl/Tk configuration scripts is specified.
4321 # This will override the use of tclsh to find the paths to search.
4322
4323
4324 pgac_args="$pgac_args with_tclconfig"
4325
4326
4327 # Check whether --with-tclconfig was given.
4328 if test "${with_tclconfig+set}" = set; then
4329   withval=$with_tclconfig;
4330   case $withval in
4331     yes)
4332       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
4333 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
4334    { (exit 1); exit 1; }; }
4335       ;;
4336     no)
4337       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
4338 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
4339    { (exit 1); exit 1; }; }
4340       ;;
4341     *)
4342
4343       ;;
4344   esac
4345
4346 fi
4347
4348
4349
4350 #
4351 # Optionally build Perl modules (PL/Perl)
4352 #
4353 { echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
4354 echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6; }
4355
4356 pgac_args="$pgac_args with_perl"
4357
4358
4359 # Check whether --with-perl was given.
4360 if test "${with_perl+set}" = set; then
4361   withval=$with_perl;
4362   case $withval in
4363     yes)
4364       :
4365       ;;
4366     no)
4367       :
4368       ;;
4369     *)
4370       { { echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
4371 echo "$as_me: error: no argument expected for --with-perl option" >&2;}
4372    { (exit 1); exit 1; }; }
4373       ;;
4374   esac
4375
4376 else
4377   with_perl=no
4378
4379 fi
4380
4381
4382 { echo "$as_me:$LINENO: result: $with_perl" >&5
4383 echo "${ECHO_T}$with_perl" >&6; }
4384
4385
4386 #
4387 # Optionally build Python modules (PL/Python)
4388 #
4389 { echo "$as_me:$LINENO: checking whether to build Python modules" >&5
4390 echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6; }
4391
4392 pgac_args="$pgac_args with_python"
4393
4394
4395 # Check whether --with-python was given.
4396 if test "${with_python+set}" = set; then
4397   withval=$with_python;
4398   case $withval in
4399     yes)
4400       :
4401       ;;
4402     no)
4403       :
4404       ;;
4405     *)
4406       { { echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
4407 echo "$as_me: error: no argument expected for --with-python option" >&2;}
4408    { (exit 1); exit 1; }; }
4409       ;;
4410   esac
4411
4412 else
4413   with_python=no
4414
4415 fi
4416
4417
4418 { echo "$as_me:$LINENO: result: $with_python" >&5
4419 echo "${ECHO_T}$with_python" >&6; }
4420
4421
4422 #
4423 # GSSAPI
4424 #
4425 { echo "$as_me:$LINENO: checking whether to build with GSSAPI support" >&5
4426 echo $ECHO_N "checking whether to build with GSSAPI support... $ECHO_C" >&6; }
4427
4428 pgac_args="$pgac_args with_gssapi"
4429
4430
4431 # Check whether --with-gssapi was given.
4432 if test "${with_gssapi+set}" = set; then
4433   withval=$with_gssapi;
4434   case $withval in
4435     yes)
4436
4437
4438 cat >>confdefs.h <<\_ACEOF
4439 #define ENABLE_GSS 1
4440 _ACEOF
4441
4442   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
4443
4444       ;;
4445     no)
4446       :
4447       ;;
4448     *)
4449       { { echo "$as_me:$LINENO: error: no argument expected for --with-gssapi option" >&5
4450 echo "$as_me: error: no argument expected for --with-gssapi option" >&2;}
4451    { (exit 1); exit 1; }; }
4452       ;;
4453   esac
4454
4455 else
4456   with_gssapi=no
4457
4458 fi
4459
4460
4461 { echo "$as_me:$LINENO: result: $with_gssapi" >&5
4462 echo "${ECHO_T}$with_gssapi" >&6; }
4463
4464
4465 #
4466 # Kerberos 5
4467 #
4468 { echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
4469 echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6; }
4470
4471 pgac_args="$pgac_args with_krb5"
4472
4473
4474 # Check whether --with-krb5 was given.
4475 if test "${with_krb5+set}" = set; then
4476   withval=$with_krb5;
4477   case $withval in
4478     yes)
4479
4480
4481 cat >>confdefs.h <<\_ACEOF
4482 #define KRB5 1
4483 _ACEOF
4484
4485   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
4486
4487       ;;
4488     no)
4489       :
4490       ;;
4491     *)
4492       { { echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
4493 echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
4494    { (exit 1); exit 1; }; }
4495       ;;
4496   esac
4497
4498 else
4499   with_krb5=no
4500
4501 fi
4502
4503
4504 { echo "$as_me:$LINENO: result: $with_krb5" >&5
4505 echo "${ECHO_T}$with_krb5" >&6; }
4506
4507
4508
4509
4510
4511
4512 #
4513 # Kerberos configuration parameters
4514 #
4515
4516 pgac_args="$pgac_args with_krb_srvnam"
4517
4518
4519 # Check whether --with-krb-srvnam was given.
4520 if test "${with_krb_srvnam+set}" = set; then
4521   withval=$with_krb_srvnam;
4522   case $withval in
4523     yes)
4524       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
4525 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
4526    { (exit 1); exit 1; }; }
4527       ;;
4528     no)
4529       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
4530 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
4531    { (exit 1); exit 1; }; }
4532       ;;
4533     *)
4534
4535       ;;
4536   esac
4537
4538 else
4539   with_krb_srvnam="postgres"
4540 fi
4541
4542
4543
4544 cat >>confdefs.h <<_ACEOF
4545 #define PG_KRB_SRVNAM "$with_krb_srvnam"
4546 _ACEOF
4547
4548
4549
4550 #
4551 # PAM
4552 #
4553 { echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
4554 echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6; }
4555
4556 pgac_args="$pgac_args with_pam"
4557
4558
4559 # Check whether --with-pam was given.
4560 if test "${with_pam+set}" = set; then
4561   withval=$with_pam;
4562   case $withval in
4563     yes)
4564
4565 cat >>confdefs.h <<\_ACEOF
4566 #define USE_PAM 1
4567 _ACEOF
4568
4569       ;;
4570     no)
4571       :
4572       ;;
4573     *)
4574       { { echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
4575 echo "$as_me: error: no argument expected for --with-pam option" >&2;}
4576    { (exit 1); exit 1; }; }
4577       ;;
4578   esac
4579
4580 else
4581   with_pam=no
4582
4583 fi
4584
4585
4586 { echo "$as_me:$LINENO: result: $with_pam" >&5
4587 echo "${ECHO_T}$with_pam" >&6; }
4588
4589
4590
4591 #
4592 # LDAP
4593 #
4594 { echo "$as_me:$LINENO: checking whether to build with LDAP support" >&5
4595 echo $ECHO_N "checking whether to build with LDAP support... $ECHO_C" >&6; }
4596
4597 pgac_args="$pgac_args with_ldap"
4598
4599
4600 # Check whether --with-ldap was given.
4601 if test "${with_ldap+set}" = set; then
4602   withval=$with_ldap;
4603   case $withval in
4604     yes)
4605
4606 cat >>confdefs.h <<\_ACEOF
4607 #define USE_LDAP 1
4608 _ACEOF
4609
4610       ;;
4611     no)
4612       :
4613       ;;
4614     *)
4615       { { echo "$as_me:$LINENO: error: no argument expected for --with-ldap option" >&5
4616 echo "$as_me: error: no argument expected for --with-ldap option" >&2;}
4617    { (exit 1); exit 1; }; }
4618       ;;
4619   esac
4620
4621 else
4622   with_ldap=no
4623
4624 fi
4625
4626
4627 { echo "$as_me:$LINENO: result: $with_ldap" >&5
4628 echo "${ECHO_T}$with_ldap" >&6; }
4629
4630
4631
4632 #
4633 # Bonjour
4634 #
4635 { echo "$as_me:$LINENO: checking whether to build with Bonjour support" >&5
4636 echo $ECHO_N "checking whether to build with Bonjour support... $ECHO_C" >&6; }
4637
4638 pgac_args="$pgac_args with_bonjour"
4639
4640
4641 # Check whether --with-bonjour was given.
4642 if test "${with_bonjour+set}" = set; then
4643   withval=$with_bonjour;
4644   case $withval in
4645     yes)
4646
4647 cat >>confdefs.h <<\_ACEOF
4648 #define USE_BONJOUR 1
4649 _ACEOF
4650
4651       ;;
4652     no)
4653       :
4654       ;;
4655     *)
4656       { { echo "$as_me:$LINENO: error: no argument expected for --with-bonjour option" >&5
4657 echo "$as_me: error: no argument expected for --with-bonjour option" >&2;}
4658    { (exit 1); exit 1; }; }
4659       ;;
4660   esac
4661
4662 else
4663   with_bonjour=no
4664
4665 fi
4666
4667
4668 { echo "$as_me:$LINENO: result: $with_bonjour" >&5
4669 echo "${ECHO_T}$with_bonjour" >&6; }
4670
4671
4672
4673 #
4674 # OpenSSL
4675 #
4676 { echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
4677 echo $ECHO_N "checking whether to build with OpenSSL support... $ECHO_C" >&6; }
4678
4679 pgac_args="$pgac_args with_openssl"
4680
4681
4682 # Check whether --with-openssl was given.
4683 if test "${with_openssl+set}" = set; then
4684   withval=$with_openssl;
4685   case $withval in
4686     yes)
4687
4688 cat >>confdefs.h <<\_ACEOF
4689 #define USE_SSL 1
4690 _ACEOF
4691
4692       ;;
4693     no)
4694       :
4695       ;;
4696     *)
4697       { { echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
4698 echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
4699    { (exit 1); exit 1; }; }
4700       ;;
4701   esac
4702
4703 else
4704   with_openssl=no
4705
4706 fi
4707
4708
4709 { echo "$as_me:$LINENO: result: $with_openssl" >&5
4710 echo "${ECHO_T}$with_openssl" >&6; }
4711
4712
4713
4714 #
4715 # Readline
4716 #
4717
4718 pgac_args="$pgac_args with_readline"
4719
4720
4721 # Check whether --with-readline was given.
4722 if test "${with_readline+set}" = set; then
4723   withval=$with_readline;
4724   case $withval in
4725     yes)
4726       :
4727       ;;
4728     no)
4729       :
4730       ;;
4731     *)
4732       { { echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
4733 echo "$as_me: error: no argument expected for --with-readline option" >&2;}
4734    { (exit 1); exit 1; }; }
4735       ;;
4736   esac
4737
4738 else
4739   with_readline=yes
4740
4741 fi
4742
4743
4744 # readline on MinGW has problems with backslashes in psql and other bugs.
4745 # This is particularly a problem with non-US code pages.
4746 # Therefore disable its use until we understand the cause. 2004-07-20
4747 if test "$PORTNAME" = "win32"; then
4748   if test "$with_readline" = yes; then
4749     { echo "$as_me:$LINENO: WARNING: *** Readline does not work on MinGW --- disabling" >&5
4750 echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
4751     with_readline=no
4752   fi
4753 fi
4754
4755
4756 #
4757 # Prefer libedit
4758 #
4759
4760 pgac_args="$pgac_args with_libedit_preferred"
4761
4762
4763 # Check whether --with-libedit-preferred was given.
4764 if test "${with_libedit_preferred+set}" = set; then
4765   withval=$with_libedit_preferred;
4766   case $withval in
4767     yes)
4768       :
4769       ;;
4770     no)
4771       :
4772       ;;
4773     *)
4774       { { echo "$as_me:$LINENO: error: no argument expected for --with-libedit-preferred option" >&5
4775 echo "$as_me: error: no argument expected for --with-libedit-preferred option" >&2;}
4776    { (exit 1); exit 1; }; }
4777       ;;
4778   esac
4779
4780 else
4781   with_libedit_preferred=no
4782
4783 fi
4784
4785
4786
4787
4788 #
4789 # OSSP UUID library
4790 #
4791
4792 pgac_args="$pgac_args with_ossp_uuid"
4793
4794
4795 # Check whether --with-ossp-uuid was given.
4796 if test "${with_ossp_uuid+set}" = set; then
4797   withval=$with_ossp_uuid;
4798   case $withval in
4799     yes)
4800       :
4801       ;;
4802     no)
4803       :
4804       ;;
4805     *)
4806       { { echo "$as_me:$LINENO: error: no argument expected for --with-ossp-uuid option" >&5
4807 echo "$as_me: error: no argument expected for --with-ossp-uuid option" >&2;}
4808    { (exit 1); exit 1; }; }
4809       ;;
4810   esac
4811
4812 else
4813   with_ossp_uuid=no
4814
4815 fi
4816
4817
4818
4819
4820
4821 #
4822 # XML
4823 #
4824
4825 pgac_args="$pgac_args with_libxml"
4826
4827
4828 # Check whether --with-libxml was given.
4829 if test "${with_libxml+set}" = set; then
4830   withval=$with_libxml;
4831   case $withval in
4832     yes)
4833
4834 cat >>confdefs.h <<\_ACEOF
4835 #define USE_LIBXML 1
4836 _ACEOF
4837
4838       ;;
4839     no)
4840       :
4841       ;;
4842     *)
4843       { { echo "$as_me:$LINENO: error: no argument expected for --with-libxml option" >&5
4844 echo "$as_me: error: no argument expected for --with-libxml option" >&2;}
4845    { (exit 1); exit 1; }; }
4846       ;;
4847   esac
4848
4849 else
4850   with_libxml=no
4851
4852 fi
4853
4854
4855
4856 if test "$with_libxml" = yes ; then
4857   for ac_prog in xml2-config
4858 do
4859   # Extract the first word of "$ac_prog", so it can be a program name with args.
4860 set dummy $ac_prog; ac_word=$2
4861 { echo "$as_me:$LINENO: checking for $ac_word" >&5
4862 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4863 if test "${ac_cv_prog_XML2_CONFIG+set}" = set; then
4864   echo $ECHO_N "(cached) $ECHO_C" >&6
4865 else
4866   if test -n "$XML2_CONFIG"; then
4867   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
4868 else
4869 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4870 for as_dir in $PATH
4871 do
4872   IFS=$as_save_IFS
4873   test -z "$as_dir" && as_dir=.
4874   for ac_exec_ext in '' $ac_executable_extensions; do
4875   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4876     ac_cv_prog_XML2_CONFIG="$ac_prog"
4877     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4878     break 2
4879   fi
4880 done
4881 done
4882 IFS=$as_save_IFS
4883
4884 fi
4885 fi
4886 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
4887 if test -n "$XML2_CONFIG"; then
4888   { echo "$as_me:$LINENO: result: $XML2_CONFIG" >&5
4889 echo "${ECHO_T}$XML2_CONFIG" >&6; }
4890 else
4891   { echo "$as_me:$LINENO: result: no" >&5
4892 echo "${ECHO_T}no" >&6; }
4893 fi
4894
4895
4896   test -n "$XML2_CONFIG" && break
4897 done
4898
4899   if test -n "$XML2_CONFIG"; then
4900     for pgac_option in `$XML2_CONFIG --cflags`; do
4901       case $pgac_option in
4902         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
4903       esac
4904     done
4905     for pgac_option in `$XML2_CONFIG --libs`; do
4906       case $pgac_option in
4907         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
4908       esac
4909     done
4910   fi
4911 fi
4912
4913
4914
4915 #
4916 # XSLT
4917 #
4918
4919 pgac_args="$pgac_args with_libxslt"
4920
4921
4922 # Check whether --with-libxslt was given.
4923 if test "${with_libxslt+set}" = set; then
4924   withval=$with_libxslt;
4925   case $withval in
4926     yes)
4927
4928 cat >>confdefs.h <<\_ACEOF
4929 #define USE_LIBXSLT 1
4930 _ACEOF
4931
4932       ;;
4933     no)
4934       :
4935       ;;
4936     *)
4937       { { echo "$as_me:$LINENO: error: no argument expected for --with-libxslt option" >&5
4938 echo "$as_me: error: no argument expected for --with-libxslt option" >&2;}
4939    { (exit 1); exit 1; }; }
4940       ;;
4941   esac
4942
4943 else
4944   with_libxslt=no
4945
4946 fi
4947
4948
4949
4950
4951
4952
4953 #
4954 # tzdata
4955 #
4956
4957 pgac_args="$pgac_args with_system_tzdata"
4958
4959
4960 # Check whether --with-system-tzdata was given.
4961 if test "${with_system_tzdata+set}" = set; then
4962   withval=$with_system_tzdata;
4963   case $withval in
4964     yes)
4965       { { echo "$as_me:$LINENO: error: argument required for --with-system-tzdata option" >&5
4966 echo "$as_me: error: argument required for --with-system-tzdata option" >&2;}
4967    { (exit 1); exit 1; }; }
4968       ;;
4969     no)
4970       { { echo "$as_me:$LINENO: error: argument required for --with-system-tzdata option" >&5
4971 echo "$as_me: error: argument required for --with-system-tzdata option" >&2;}
4972    { (exit 1); exit 1; }; }
4973       ;;
4974     *)
4975
4976       ;;
4977   esac
4978
4979 fi
4980
4981
4982
4983
4984 #
4985 # Zlib
4986 #
4987
4988 pgac_args="$pgac_args with_zlib"
4989
4990
4991 # Check whether --with-zlib was given.
4992 if test "${with_zlib+set}" = set; then
4993   withval=$with_zlib;
4994   case $withval in
4995     yes)
4996       :
4997       ;;
4998     no)
4999       :
5000       ;;
5001     *)
5002       { { echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
5003 echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
5004    { (exit 1); exit 1; }; }
5005       ;;
5006   esac
5007
5008 else
5009   with_zlib=yes
5010
5011 fi
5012
5013
5014
5015
5016 #
5017 # Elf
5018 #
5019
5020 # Assume system is ELF if it predefines __ELF__ as 1,
5021 # otherwise believe host_os based default.
5022 case $host_os in
5023     freebsd1*|freebsd2*) elf=no;;
5024     freebsd3*|freebsd4*) elf=yes;;
5025 esac
5026
5027
5028 { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
5029 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
5030 if test "${ac_cv_path_GREP+set}" = set; then
5031   echo $ECHO_N "(cached) $ECHO_C" >&6
5032 else
5033   # Extract the first word of "grep ggrep" to use in msg output
5034 if test -z "$GREP"; then
5035 set dummy grep ggrep; ac_prog_name=$2
5036 if test "${ac_cv_path_GREP+set}" = set; then
5037   echo $ECHO_N "(cached) $ECHO_C" >&6
5038 else
5039   ac_path_GREP_found=false
5040 # Loop through the user's path and test for each of PROGNAME-LIST
5041 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5042 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5043 do
5044   IFS=$as_save_IFS
5045   test -z "$as_dir" && as_dir=.
5046   for ac_prog in grep ggrep; do
5047   for ac_exec_ext in '' $ac_executable_extensions; do
5048     ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5049     { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5050     # Check for GNU ac_path_GREP and select it if it is found.
5051   # Check for GNU $ac_path_GREP
5052 case `"$ac_path_GREP" --version 2>&1` in
5053 *GNU*)
5054   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5055 *)
5056   ac_count=0
5057   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
5058   while :
5059   do
5060     cat "conftest.in" "conftest.in" >"conftest.tmp"
5061     mv "conftest.tmp" "conftest.in"
5062     cp "conftest.in" "conftest.nl"
5063     echo 'GREP' >> "conftest.nl"
5064     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5065     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5066     ac_count=`expr $ac_count + 1`
5067     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5068       # Best one so far, save it but keep looking for a better one
5069       ac_cv_path_GREP="$ac_path_GREP"
5070       ac_path_GREP_max=$ac_count
5071     fi
5072     # 10*(2^10) chars as input seems more than enough
5073     test $ac_count -gt 10 && break
5074   done
5075   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5076 esac
5077
5078
5079     $ac_path_GREP_found && break 3
5080   done
5081 done
5082
5083 done
5084 IFS=$as_save_IFS
5085
5086
5087 fi
5088
5089 GREP="$ac_cv_path_GREP"
5090 if test -z "$GREP"; then
5091   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
5092 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
5093    { (exit 1); exit 1; }; }
5094 fi
5095
5096 else
5097   ac_cv_path_GREP=$GREP
5098 fi
5099
5100
5101 fi
5102 { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
5103 echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
5104  GREP="$ac_cv_path_GREP"
5105
5106
5107 { echo "$as_me:$LINENO: checking for egrep" >&5
5108 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
5109 if test "${ac_cv_path_EGREP+set}" = set; then
5110   echo $ECHO_N "(cached) $ECHO_C" >&6
5111 else
5112   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5113    then ac_cv_path_EGREP="$GREP -E"
5114    else
5115      # Extract the first word of "egrep" to use in msg output
5116 if test -z "$EGREP"; then
5117 set dummy egrep; ac_prog_name=$2
5118 if test "${ac_cv_path_EGREP+set}" = set; then
5119   echo $ECHO_N "(cached) $ECHO_C" >&6
5120 else
5121   ac_path_EGREP_found=false
5122 # Loop through the user's path and test for each of PROGNAME-LIST
5123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5124 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5125 do
5126   IFS=$as_save_IFS
5127   test -z "$as_dir" && as_dir=.
5128   for ac_prog in egrep; do
5129   for ac_exec_ext in '' $ac_executable_extensions; do
5130     ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5131     { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5132     # Check for GNU ac_path_EGREP and select it if it is found.
5133   # Check for GNU $ac_path_EGREP
5134 case `"$ac_path_EGREP" --version 2>&1` in
5135 *GNU*)
5136   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5137 *)
5138   ac_count=0
5139   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
5140   while :
5141   do
5142     cat "conftest.in" "conftest.in" >"conftest.tmp"
5143     mv "conftest.tmp" "conftest.in"
5144     cp "conftest.in" "conftest.nl"
5145     echo 'EGREP' >> "conftest.nl"
5146     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5147     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5148     ac_count=`expr $ac_count + 1`
5149     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5150       # Best one so far, save it but keep looking for a better one
5151       ac_cv_path_EGREP="$ac_path_EGREP"
5152       ac_path_EGREP_max=$ac_count
5153     fi
5154     # 10*(2^10) chars as input seems more than enough
5155     test $ac_count -gt 10 && break
5156   done
5157   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5158 esac
5159
5160
5161     $ac_path_EGREP_found && break 3
5162   done
5163 done
5164
5165 done
5166 IFS=$as_save_IFS
5167
5168
5169 fi
5170
5171 EGREP="$ac_cv_path_EGREP"
5172 if test -z "$EGREP"; then
5173   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
5174 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
5175    { (exit 1); exit 1; }; }
5176 fi
5177
5178 else
5179   ac_cv_path_EGREP=$EGREP
5180 fi
5181
5182
5183    fi
5184 fi
5185 { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
5186 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
5187  EGREP="$ac_cv_path_EGREP"
5188
5189
5190 cat >conftest.$ac_ext <<_ACEOF
5191 /* confdefs.h.  */
5192 _ACEOF
5193 cat confdefs.h >>conftest.$ac_ext
5194 cat >>conftest.$ac_ext <<_ACEOF
5195 /* end confdefs.h.  */
5196 #if __ELF__
5197   yes
5198 #endif
5199
5200 _ACEOF
5201 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5202   $EGREP "yes" >/dev/null 2>&1; then
5203   ELF_SYS=true
5204 else
5205   if test "X$elf" = "Xyes" ; then
5206   ELF_SYS=true
5207 else
5208   ELF_SYS=
5209 fi
5210 fi
5211 rm -f conftest*
5212
5213
5214
5215 #
5216 # Assignments
5217 #
5218
5219 CPPFLAGS="$CPPFLAGS $INCLUDES"
5220 LDFLAGS="$LDFLAGS $LIBDIRS"
5221
5222 { echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
5223 echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
5224 { echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
5225 echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
5226
5227
5228
5229
5230 # Check whether --with-gnu-ld was given.
5231 if test "${with_gnu_ld+set}" = set; then
5232   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
5233 else
5234   with_gnu_ld=no
5235 fi
5236
5237 ac_prog=ld
5238 if test "$GCC" = yes; then
5239   # Check if gcc -print-prog-name=ld gives a path.
5240   { echo "$as_me:$LINENO: checking for ld used by GCC" >&5
5241 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6; }
5242   case $host in
5243   *-*-mingw*)
5244     # gcc leaves a trailing carriage return which upsets mingw
5245     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5246   *)
5247     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5248   esac
5249   case "$ac_prog" in
5250     # Accept absolute paths.
5251     [\\/]* | [A-Za-z]:[\\/]*)
5252       re_direlt='/[^/][^/]*/\.\./'
5253       # Canonicalize the path of ld
5254       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
5255       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
5256         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
5257       done
5258       test -z "$LD" && LD="$ac_prog"
5259       ;;
5260   "")
5261     # If it fails, then pretend we aren't using GCC.
5262     ac_prog=ld
5263     ;;
5264   *)
5265     # If it is relative, then search for the first ld in PATH.
5266     with_gnu_ld=unknown
5267     ;;
5268   esac
5269 elif test "$with_gnu_ld" = yes; then
5270   { echo "$as_me:$LINENO: checking for GNU ld" >&5
5271 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
5272 else
5273   { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
5274 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
5275 fi
5276 if test "${ac_cv_path_LD+set}" = set; then
5277   echo $ECHO_N "(cached) $ECHO_C" >&6
5278 else
5279   if test -z "$LD"; then
5280   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
5281   for ac_dir in $PATH; do
5282     test -z "$ac_dir" && ac_dir=.
5283     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5284       ac_cv_path_LD="$ac_dir/$ac_prog"
5285       # Check to see if the program is GNU ld.  I'd rather use --version,
5286       # but apparently some GNU ld's only accept -v.
5287       # Break only if it was the GNU/non-GNU ld that we prefer.
5288       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
5289         test "$with_gnu_ld" != no && break
5290       else
5291         test "$with_gnu_ld" != yes && break
5292       fi
5293     fi
5294   done
5295   IFS="$ac_save_ifs"
5296 else
5297   ac_cv_path_LD="$LD" # Let the user override the test with a path.
5298 fi
5299 fi
5300
5301 LD="$ac_cv_path_LD"
5302 if test -n "$LD"; then
5303   { echo "$as_me:$LINENO: result: $LD" >&5
5304 echo "${ECHO_T}$LD" >&6; }
5305 else
5306   { echo "$as_me:$LINENO: result: no" >&5
5307 echo "${ECHO_T}no" >&6; }
5308 fi
5309 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
5310 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
5311    { (exit 1); exit 1; }; }
5312 { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
5313 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
5314 if test "${ac_cv_prog_gnu_ld+set}" = set; then
5315   echo $ECHO_N "(cached) $ECHO_C" >&6
5316 else
5317   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
5318 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
5319   ac_cv_prog_gnu_ld=yes
5320 else
5321   ac_cv_prog_gnu_ld=no
5322 fi
5323 fi
5324 { echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
5325 echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6; }
5326 with_gnu_ld=$ac_cv_prog_gnu_ld
5327
5328
5329
5330
5331 case $host_os in sysv5*)
5332   { echo "$as_me:$LINENO: checking whether ld -R works" >&5
5333 echo $ECHO_N "checking whether ld -R works... $ECHO_C" >&6; }
5334 if test "${pgac_cv_prog_ld_R+set}" = set; then
5335   echo $ECHO_N "(cached) $ECHO_C" >&6
5336 else
5337
5338     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
5339     cat >conftest.$ac_ext <<_ACEOF
5340 /* confdefs.h.  */
5341 _ACEOF
5342 cat confdefs.h >>conftest.$ac_ext
5343 cat >>conftest.$ac_ext <<_ACEOF
5344 /* end confdefs.h.  */
5345
5346 int
5347 main ()
5348 {
5349
5350   ;
5351   return 0;
5352 }
5353 _ACEOF
5354 rm -f conftest.$ac_objext conftest$ac_exeext
5355 if { (ac_try="$ac_link"
5356 case "(($ac_try" in
5357   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5358   *) ac_try_echo=$ac_try;;
5359 esac
5360 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5361   (eval "$ac_link") 2>conftest.er1
5362   ac_status=$?
5363   grep -v '^ *+' conftest.er1 >conftest.err
5364   rm -f conftest.er1
5365   cat conftest.err >&5
5366   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5367   (exit $ac_status); } && {
5368          test -z "$ac_c_werror_flag" ||
5369          test ! -s conftest.err
5370        } && test -s conftest$ac_exeext &&
5371        $as_test_x conftest$ac_exeext; then
5372   pgac_cv_prog_ld_R=yes
5373 else
5374   echo "$as_me: failed program was:" >&5
5375 sed 's/^/| /' conftest.$ac_ext >&5
5376
5377         pgac_cv_prog_ld_R=no
5378 fi
5379
5380 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5381       conftest$ac_exeext conftest.$ac_ext
5382     LDFLAGS=$pgac_save_LDFLAGS
5383
5384 fi
5385 { echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
5386 echo "${ECHO_T}$pgac_cv_prog_ld_R" >&6; }
5387   ld_R_works=$pgac_cv_prog_ld_R
5388
5389 esac
5390 if test -n "$ac_tool_prefix"; then
5391   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5392 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5393 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5394 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5395 if test "${ac_cv_prog_RANLIB+set}" = set; then
5396   echo $ECHO_N "(cached) $ECHO_C" >&6
5397 else
5398   if test -n "$RANLIB"; then
5399   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5400 else
5401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5402 for as_dir in $PATH
5403 do
5404   IFS=$as_save_IFS
5405   test -z "$as_dir" && as_dir=.
5406   for ac_exec_ext in '' $ac_executable_extensions; do
5407   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5408     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5409     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5410     break 2
5411   fi
5412 done
5413 done
5414 IFS=$as_save_IFS
5415
5416 fi
5417 fi
5418 RANLIB=$ac_cv_prog_RANLIB
5419 if test -n "$RANLIB"; then
5420   { echo "$as_me:$LINENO: result: $RANLIB" >&5
5421 echo "${ECHO_T}$RANLIB" >&6; }
5422 else
5423   { echo "$as_me:$LINENO: result: no" >&5
5424 echo "${ECHO_T}no" >&6; }
5425 fi
5426
5427
5428 fi
5429 if test -z "$ac_cv_prog_RANLIB"; then
5430   ac_ct_RANLIB=$RANLIB
5431   # Extract the first word of "ranlib", so it can be a program name with args.
5432 set dummy ranlib; ac_word=$2
5433 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5434 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5435 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5436   echo $ECHO_N "(cached) $ECHO_C" >&6
5437 else
5438   if test -n "$ac_ct_RANLIB"; then
5439   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5440 else
5441 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5442 for as_dir in $PATH
5443 do
5444   IFS=$as_save_IFS
5445   test -z "$as_dir" && as_dir=.
5446   for ac_exec_ext in '' $ac_executable_extensions; do
5447   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5448     ac_cv_prog_ac_ct_RANLIB="ranlib"
5449     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5450     break 2
5451   fi
5452 done
5453 done
5454 IFS=$as_save_IFS
5455
5456 fi
5457 fi
5458 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5459 if test -n "$ac_ct_RANLIB"; then
5460   { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5461 echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
5462 else
5463   { echo "$as_me:$LINENO: result: no" >&5
5464 echo "${ECHO_T}no" >&6; }
5465 fi
5466
5467   if test "x$ac_ct_RANLIB" = x; then
5468     RANLIB=":"
5469   else
5470     case $cross_compiling:$ac_tool_warned in
5471 yes:)
5472 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5473 whose name does not start with the host triplet.  If you think this
5474 configuration is useful to you, please write to autoconf@gnu.org." >&5
5475 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5476 whose name does not start with the host triplet.  If you think this
5477 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5478 ac_tool_warned=yes ;;
5479 esac
5480     RANLIB=$ac_ct_RANLIB
5481   fi
5482 else
5483   RANLIB="$ac_cv_prog_RANLIB"
5484 fi
5485
5486
5487   if test -n "$ac_tool_prefix"; then
5488   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5489 set dummy ${ac_tool_prefix}strip; ac_word=$2
5490 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5491 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5492 if test "${ac_cv_prog_STRIP+set}" = set; then
5493   echo $ECHO_N "(cached) $ECHO_C" >&6
5494 else
5495   if test -n "$STRIP"; then
5496   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5497 else
5498 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5499 for as_dir in $PATH
5500 do
5501   IFS=$as_save_IFS
5502   test -z "$as_dir" && as_dir=.
5503   for ac_exec_ext in '' $ac_executable_extensions; do
5504   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5505     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5506     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5507     break 2
5508   fi
5509 done
5510 done
5511 IFS=$as_save_IFS
5512
5513 fi
5514 fi
5515 STRIP=$ac_cv_prog_STRIP
5516 if test -n "$STRIP"; then
5517   { echo "$as_me:$LINENO: result: $STRIP" >&5
5518 echo "${ECHO_T}$STRIP" >&6; }
5519 else
5520   { echo "$as_me:$LINENO: result: no" >&5
5521 echo "${ECHO_T}no" >&6; }
5522 fi
5523
5524
5525 fi
5526 if test -z "$ac_cv_prog_STRIP"; then
5527   ac_ct_STRIP=$STRIP
5528   # Extract the first word of "strip", so it can be a program name with args.
5529 set dummy strip; ac_word=$2
5530 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5531 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5532 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
5533   echo $ECHO_N "(cached) $ECHO_C" >&6
5534 else
5535   if test -n "$ac_ct_STRIP"; then
5536   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5537 else
5538 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5539 for as_dir in $PATH
5540 do
5541   IFS=$as_save_IFS
5542   test -z "$as_dir" && as_dir=.
5543   for ac_exec_ext in '' $ac_executable_extensions; do
5544   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5545     ac_cv_prog_ac_ct_STRIP="strip"
5546     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5547     break 2
5548   fi
5549 done
5550 done
5551 IFS=$as_save_IFS
5552
5553 fi
5554 fi
5555 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5556 if test -n "$ac_ct_STRIP"; then
5557   { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
5558 echo "${ECHO_T}$ac_ct_STRIP" >&6; }
5559 else
5560   { echo "$as_me:$LINENO: result: no" >&5
5561 echo "${ECHO_T}no" >&6; }
5562 fi
5563
5564   if test "x$ac_ct_STRIP" = x; then
5565     STRIP=":"
5566   else
5567     case $cross_compiling:$ac_tool_warned in
5568 yes:)
5569 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5570 whose name does not start with the host triplet.  If you think this
5571 configuration is useful to you, please write to autoconf@gnu.org." >&5
5572 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5573 whose name does not start with the host triplet.  If you think this
5574 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5575 ac_tool_warned=yes ;;
5576 esac
5577     STRIP=$ac_ct_STRIP
5578   fi
5579 else
5580   STRIP="$ac_cv_prog_STRIP"
5581 fi
5582
5583
5584   { echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
5585 echo $ECHO_N "checking whether it is possible to strip libraries... $ECHO_C" >&6; }
5586   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
5587     STRIP_STATIC_LIB="$STRIP -x"
5588     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
5589     { echo "$as_me:$LINENO: result: yes" >&5
5590 echo "${ECHO_T}yes" >&6; }
5591   else
5592     STRIP_STATIC_LIB=:
5593     STRIP_SHARED_LIB=:
5594     { echo "$as_me:$LINENO: result: no" >&5
5595 echo "${ECHO_T}no" >&6; }
5596   fi
5597
5598
5599
5600
5601 # Extract the first word of "tar", so it can be a program name with args.
5602 set dummy tar; ac_word=$2
5603 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5604 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5605 if test "${ac_cv_path_TAR+set}" = set; then
5606   echo $ECHO_N "(cached) $ECHO_C" >&6
5607 else
5608   case $TAR in
5609   [\\/]* | ?:[\\/]*)
5610   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5611   ;;
5612   *)
5613   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5614 for as_dir in $PATH
5615 do
5616   IFS=$as_save_IFS
5617   test -z "$as_dir" && as_dir=.
5618   for ac_exec_ext in '' $ac_executable_extensions; do
5619   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5620     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5621     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5622     break 2
5623   fi
5624 done
5625 done
5626 IFS=$as_save_IFS
5627
5628   ;;
5629 esac
5630 fi
5631 TAR=$ac_cv_path_TAR
5632 if test -n "$TAR"; then
5633   { echo "$as_me:$LINENO: result: $TAR" >&5
5634 echo "${ECHO_T}$TAR" >&6; }
5635 else
5636   { echo "$as_me:$LINENO: result: no" >&5
5637 echo "${ECHO_T}no" >&6; }
5638 fi
5639
5640
5641 { echo "$as_me:$LINENO: checking whether ln -s works" >&5
5642 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
5643 LN_S=$as_ln_s
5644 if test "$LN_S" = "ln -s"; then
5645   { echo "$as_me:$LINENO: result: yes" >&5
5646 echo "${ECHO_T}yes" >&6; }
5647 else
5648   { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
5649 echo "${ECHO_T}no, using $LN_S" >&6; }
5650 fi
5651
5652 for ac_prog in gawk mawk nawk awk
5653 do
5654   # Extract the first word of "$ac_prog", so it can be a program name with args.
5655 set dummy $ac_prog; ac_word=$2
5656 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5657 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5658 if test "${ac_cv_prog_AWK+set}" = set; then
5659   echo $ECHO_N "(cached) $ECHO_C" >&6
5660 else
5661   if test -n "$AWK"; then
5662   ac_cv_prog_AWK="$AWK" # Let the user override the test.
5663 else
5664 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5665 for as_dir in $PATH
5666 do
5667   IFS=$as_save_IFS
5668   test -z "$as_dir" && as_dir=.
5669   for ac_exec_ext in '' $ac_executable_extensions; do
5670   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5671     ac_cv_prog_AWK="$ac_prog"
5672     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5673     break 2
5674   fi
5675 done
5676 done
5677 IFS=$as_save_IFS
5678
5679 fi
5680 fi
5681 AWK=$ac_cv_prog_AWK
5682 if test -n "$AWK"; then
5683   { echo "$as_me:$LINENO: result: $AWK" >&5
5684 echo "${ECHO_T}$AWK" >&6; }
5685 else
5686   { echo "$as_me:$LINENO: result: no" >&5
5687 echo "${ECHO_T}no" >&6; }
5688 fi
5689
5690
5691   test -n "$AWK" && break
5692 done
5693
5694
5695 # Let the user override the search
5696 if test -z "$YACC"; then
5697   for ac_prog in 'bison -y'
5698 do
5699   # Extract the first word of "$ac_prog", so it can be a program name with args.
5700 set dummy $ac_prog; ac_word=$2
5701 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5702 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5703 if test "${ac_cv_prog_YACC+set}" = set; then
5704   echo $ECHO_N "(cached) $ECHO_C" >&6
5705 else
5706   if test -n "$YACC"; then
5707   ac_cv_prog_YACC="$YACC" # Let the user override the test.
5708 else
5709 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5710 for as_dir in $PATH
5711 do
5712   IFS=$as_save_IFS
5713   test -z "$as_dir" && as_dir=.
5714   for ac_exec_ext in '' $ac_executable_extensions; do
5715   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5716     ac_cv_prog_YACC="$ac_prog"
5717     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5718     break 2
5719   fi
5720 done
5721 done
5722 IFS=$as_save_IFS
5723
5724 fi
5725 fi
5726 YACC=$ac_cv_prog_YACC
5727 if test -n "$YACC"; then
5728   { echo "$as_me:$LINENO: result: $YACC" >&5
5729 echo "${ECHO_T}$YACC" >&6; }
5730 else
5731   { echo "$as_me:$LINENO: result: no" >&5
5732 echo "${ECHO_T}no" >&6; }
5733 fi
5734
5735
5736   test -n "$YACC" && break
5737 done
5738
5739 fi
5740
5741 if test "$YACC"; then
5742   pgac_yacc_version=`$YACC --version 2>/dev/null | sed q`
5743   { echo "$as_me:$LINENO: using $pgac_yacc_version" >&5
5744 echo "$as_me: using $pgac_yacc_version" >&6;}
5745   if echo "$pgac_yacc_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
5746   then
5747     { echo "$as_me:$LINENO: WARNING:
5748 *** The installed version of Bison is too old to use with PostgreSQL.
5749 *** Bison version 1.875 or later is required." >&5
5750 echo "$as_me: WARNING:
5751 *** The installed version of Bison is too old to use with PostgreSQL.
5752 *** Bison version 1.875 or later is required." >&2;}
5753     YACC=""
5754   fi
5755 fi
5756
5757 if test -z "$YACC"; then
5758   { echo "$as_me:$LINENO: WARNING:
5759 *** Without Bison you will not be able to build PostgreSQL from CVS nor
5760 *** change any of the parser definition files.  You can obtain Bison from
5761 *** a GNU mirror site.  (If you are using the official distribution of
5762 *** PostgreSQL then you do not need to worry about this, because the Bison
5763 *** output is pre-generated.)  To use a different yacc program (possible,
5764 *** but not recommended), set the environment variable YACC before running
5765 *** 'configure'." >&5
5766 echo "$as_me: WARNING:
5767 *** Without Bison you will not be able to build PostgreSQL from CVS nor
5768 *** change any of the parser definition files.  You can obtain Bison from
5769 *** a GNU mirror site.  (If you are using the official distribution of
5770 *** PostgreSQL then you do not need to worry about this, because the Bison
5771 *** output is pre-generated.)  To use a different yacc program (possible,
5772 *** but not recommended), set the environment variable YACC before running
5773 *** 'configure'." >&2;}
5774 fi
5775 # We don't need AC_SUBST(YACC) because AC_PATH_PROG did it
5776
5777
5778 { echo "$as_me:$LINENO: checking for flex" >&5
5779 echo $ECHO_N "checking for flex... $ECHO_C" >&6; }
5780 if test "${pgac_cv_path_flex+set}" = set; then
5781   echo $ECHO_N "(cached) $ECHO_C" >&6
5782 else
5783   # Let the user override the test
5784 if test -n "$FLEX"; then
5785   pgac_cv_path_flex=$FLEX
5786 else
5787   pgac_save_IFS=$IFS
5788   IFS=$PATH_SEPARATOR
5789   for pgac_dir in $PATH; do
5790     IFS=$pgac_save_IFS
5791     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
5792       pgac_dir=`pwd`
5793     fi
5794     for pgac_prog in flex lex; do
5795       pgac_candidate="$pgac_dir/$pgac_prog"
5796       if test -f "$pgac_candidate" \
5797         && $pgac_candidate --version </dev/null >/dev/null 2>&1
5798       then
5799         echo '%%'  > conftest.l
5800         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
5801           if $pgac_candidate --version | grep ' 2\.5\.3$' >/dev/null 2>&1; then
5802             pgac_broken_flex=$pgac_candidate
5803             continue
5804           fi
5805
5806           pgac_cv_path_flex=$pgac_candidate
5807           break 2
5808         fi
5809       fi
5810     done
5811   done
5812   rm -f conftest.l lex.yy.c
5813   : ${pgac_cv_path_flex=no}
5814 fi
5815
5816 fi
5817 { echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
5818 echo "${ECHO_T}$pgac_cv_path_flex" >&6; }
5819 if test x"$pgac_cv_path_flex" = x"no"; then
5820   if test -n "$pgac_broken_flex"; then
5821     { echo "$as_me:$LINENO: WARNING:
5822 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
5823 *** should get version 2.5.4 or later." >&5
5824 echo "$as_me: WARNING:
5825 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
5826 *** should get version 2.5.4 or later." >&2;}
5827   fi
5828
5829   { echo "$as_me:$LINENO: WARNING:
5830 *** Without Flex you will not be able to build PostgreSQL from CVS or
5831 *** change any of the scanner definition files.  You can obtain Flex from
5832 *** a GNU mirror site.  (If you are using the official distribution of
5833 *** PostgreSQL then you do not need to worry about this because the Flex
5834 *** output is pre-generated.)" >&5
5835 echo "$as_me: WARNING:
5836 *** Without Flex you will not be able to build PostgreSQL from CVS or
5837 *** change any of the scanner definition files.  You can obtain Flex from
5838 *** a GNU mirror site.  (If you are using the official distribution of
5839 *** PostgreSQL then you do not need to worry about this because the Flex
5840 *** output is pre-generated.)" >&2;}
5841
5842   FLEX=
5843 else
5844   FLEX=$pgac_cv_path_flex
5845   pgac_flex_version=`$FLEX -V 2>/dev/null`
5846   { echo "$as_me:$LINENO: using $pgac_flex_version" >&5
5847 echo "$as_me: using $pgac_flex_version" >&6;}
5848 fi
5849
5850
5851
5852
5853
5854 # Extract the first word of "perl", so it can be a program name with args.
5855 set dummy perl; ac_word=$2
5856 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5857 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5858 if test "${ac_cv_path_PERL+set}" = set; then
5859   echo $ECHO_N "(cached) $ECHO_C" >&6
5860 else
5861   case $PERL in
5862   [\\/]* | ?:[\\/]*)
5863   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
5864   ;;
5865   *)
5866   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5867 for as_dir in $PATH
5868 do
5869   IFS=$as_save_IFS
5870   test -z "$as_dir" && as_dir=.
5871   for ac_exec_ext in '' $ac_executable_extensions; do
5872   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5873     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
5874     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5875     break 2
5876   fi
5877 done
5878 done
5879 IFS=$as_save_IFS
5880
5881   ;;
5882 esac
5883 fi
5884 PERL=$ac_cv_path_PERL
5885 if test -n "$PERL"; then
5886   { echo "$as_me:$LINENO: result: $PERL" >&5
5887 echo "${ECHO_T}$PERL" >&6; }
5888 else
5889   { echo "$as_me:$LINENO: result: no" >&5
5890 echo "${ECHO_T}no" >&6; }
5891 fi
5892
5893
5894 if test "$with_perl" = yes; then
5895
5896 { echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
5897 echo $ECHO_N "checking for Perl archlibexp... $ECHO_C" >&6; }
5898 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
5899 { echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
5900 echo "${ECHO_T}$perl_archlibexp" >&6; }
5901 { echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
5902 echo $ECHO_N "checking for Perl privlibexp... $ECHO_C" >&6; }
5903 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
5904 { echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
5905 echo "${ECHO_T}$perl_privlibexp" >&6; }
5906 { echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
5907 echo $ECHO_N "checking for Perl useshrplib... $ECHO_C" >&6; }
5908 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
5909 { echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
5910 echo "${ECHO_T}$perl_useshrplib" >&6; }
5911
5912 { echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
5913 echo $ECHO_N "checking for flags to link embedded Perl... $ECHO_C" >&6; }
5914 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
5915 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
5916 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
5917 { echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
5918 echo "${ECHO_T}$perl_embed_ldflags" >&6; }
5919 fi
5920
5921 if test "$with_python" = yes; then
5922   # Extract the first word of "python", so it can be a program name with args.
5923 set dummy python; ac_word=$2
5924 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5925 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5926 if test "${ac_cv_path_PYTHON+set}" = set; then
5927   echo $ECHO_N "(cached) $ECHO_C" >&6
5928 else
5929   case $PYTHON in
5930   [\\/]* | ?:[\\/]*)
5931   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
5932   ;;
5933   *)
5934   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5935 for as_dir in $PATH
5936 do
5937   IFS=$as_save_IFS
5938   test -z "$as_dir" && as_dir=.
5939   for ac_exec_ext in '' $ac_executable_extensions; do
5940   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5941     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
5942     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5943     break 2
5944   fi
5945 done
5946 done
5947 IFS=$as_save_IFS
5948
5949   ;;
5950 esac
5951 fi
5952 PYTHON=$ac_cv_path_PYTHON
5953 if test -n "$PYTHON"; then
5954   { echo "$as_me:$LINENO: result: $PYTHON" >&5
5955 echo "${ECHO_T}$PYTHON" >&6; }
5956 else
5957   { echo "$as_me:$LINENO: result: no" >&5
5958 echo "${ECHO_T}no" >&6; }
5959 fi
5960
5961
5962 if test x"$PYTHON" = x""; then
5963   { { echo "$as_me:$LINENO: error: Python not found" >&5
5964 echo "$as_me: error: Python not found" >&2;}
5965    { (exit 1); exit 1; }; }
5966 fi
5967
5968
5969 { echo "$as_me:$LINENO: checking for Python distutils module" >&5
5970 echo $ECHO_N "checking for Python distutils module... $ECHO_C" >&6; }
5971 if "${PYTHON}" 2>&- -c 'import distutils'
5972 then
5973     { echo "$as_me:$LINENO: result: yes" >&5
5974 echo "${ECHO_T}yes" >&6; }
5975 else
5976     { echo "$as_me:$LINENO: result: no" >&5
5977 echo "${ECHO_T}no" >&6; }
5978     { { echo "$as_me:$LINENO: error: distutils module not found" >&5
5979 echo "$as_me: error: distutils module not found" >&2;}
5980    { (exit 1); exit 1; }; }
5981 fi
5982 { echo "$as_me:$LINENO: checking Python configuration directory" >&5
5983 echo $ECHO_N "checking Python configuration directory... $ECHO_C" >&6; }
5984 python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
5985 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')"`
5986 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print '-I'+distutils.sysconfig.get_python_inc()"`
5987
5988 # This should be enough of a message.
5989 { echo "$as_me:$LINENO: result: $python_configdir" >&5
5990 echo "${ECHO_T}$python_configdir" >&6; }
5991
5992
5993 { echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
5994 echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6; }
5995
5996 python_libdir=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR')))"`
5997 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY')))"`
5998 python_so=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('SO')))"`
5999 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
6000
6001 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
6002 then
6003         # New way: use the official shared library
6004         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
6005         python_libspec="-L${python_libdir} -l${ldlibrary}"
6006 else
6007         # Old way: use libpython from python_configdir
6008         python_libdir="${python_configdir}"
6009         python_libspec="-L${python_libdir} -lpython${python_version}"
6010 fi
6011
6012 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','LOCALMODLIBS','BASEMODLIBS')))"`
6013
6014 { echo "$as_me:$LINENO: result: ${python_libspec} ${python_additional_libs}" >&5
6015 echo "${ECHO_T}${python_libspec} ${python_additional_libs}" >&6; }
6016
6017
6018 # threaded python is not supported on bsd's
6019 { echo "$as_me:$LINENO: checking whether Python is compiled with thread support" >&5
6020 echo $ECHO_N "checking whether Python is compiled with thread support... $ECHO_C" >&6; }
6021 pythreads=`${PYTHON} -c "import sys; print int('thread' in sys.builtin_module_names)"`
6022 if test "$pythreads" = "1"; then
6023   { echo "$as_me:$LINENO: result: yes" >&5
6024 echo "${ECHO_T}yes" >&6; }
6025   case $host_os in
6026   openbsd*|freebsd*)
6027     { { echo "$as_me:$LINENO: error: threaded Python not supported on this platform" >&5
6028 echo "$as_me: error: threaded Python not supported on this platform" >&2;}
6029    { (exit 1); exit 1; }; }
6030     ;;
6031   esac
6032 else
6033   { echo "$as_me:$LINENO: result: no" >&5
6034 echo "${ECHO_T}no" >&6; }
6035 fi
6036
6037
6038 fi
6039
6040 # Supply a numeric version string for use by 3rd party add-ons
6041 # awk -F is a regex on some platforms, and not on others, so make "." a tab
6042 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
6043 tr '.' '        ' |
6044 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
6045
6046 cat >>confdefs.h <<_ACEOF
6047 #define PG_VERSION_NUM $PG_VERSION_NUM
6048 _ACEOF
6049
6050
6051 ##
6052 ## Libraries
6053 ##
6054 ## Most libraries are included only if they demonstrably provide a function
6055 ## we need, but libm is an exception: always include it, because there are
6056 ## too many compilers that play cute optimization games that will break
6057 ## probes for standard functions such as pow().
6058 ##
6059
6060
6061 { echo "$as_me:$LINENO: checking for main in -lm" >&5
6062 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6; }
6063 if test "${ac_cv_lib_m_main+set}" = set; then
6064   echo $ECHO_N "(cached) $ECHO_C" >&6
6065 else
6066   ac_check_lib_save_LIBS=$LIBS
6067 LIBS="-lm  $LIBS"
6068 cat >conftest.$ac_ext <<_ACEOF
6069 /* confdefs.h.  */
6070 _ACEOF
6071 cat confdefs.h >>conftest.$ac_ext
6072 cat >>conftest.$ac_ext <<_ACEOF
6073 /* end confdefs.h.  */
6074
6075
6076 int
6077 main ()
6078 {
6079 return main ();
6080   ;
6081   return 0;
6082 }
6083 _ACEOF
6084 rm -f conftest.$ac_objext conftest$ac_exeext
6085 if { (ac_try="$ac_link"
6086 case "(($ac_try" in
6087   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6088   *) ac_try_echo=$ac_try;;
6089 esac
6090 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6091   (eval "$ac_link") 2>conftest.er1
6092   ac_status=$?
6093   grep -v '^ *+' conftest.er1 >conftest.err
6094   rm -f conftest.er1
6095   cat conftest.err >&5
6096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6097   (exit $ac_status); } && {
6098          test -z "$ac_c_werror_flag" ||
6099          test ! -s conftest.err
6100        } && test -s conftest$ac_exeext &&
6101        $as_test_x conftest$ac_exeext; then
6102   ac_cv_lib_m_main=yes
6103 else
6104   echo "$as_me: failed program was:" >&5
6105 sed 's/^/| /' conftest.$ac_ext >&5
6106
6107         ac_cv_lib_m_main=no
6108 fi
6109
6110 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6111       conftest$ac_exeext conftest.$ac_ext
6112 LIBS=$ac_check_lib_save_LIBS
6113 fi
6114 { echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
6115 echo "${ECHO_T}$ac_cv_lib_m_main" >&6; }
6116 if test $ac_cv_lib_m_main = yes; then
6117   cat >>confdefs.h <<_ACEOF
6118 #define HAVE_LIBM 1
6119 _ACEOF
6120
6121   LIBS="-lm $LIBS"
6122
6123 fi
6124
6125 { echo "$as_me:$LINENO: checking for library containing setproctitle" >&5
6126 echo $ECHO_N "checking for library containing setproctitle... $ECHO_C" >&6; }
6127 if test "${ac_cv_search_setproctitle+set}" = set; then
6128   echo $ECHO_N "(cached) $ECHO_C" >&6
6129 else
6130   ac_func_search_save_LIBS=$LIBS
6131 cat >conftest.$ac_ext <<_ACEOF
6132 /* confdefs.h.  */
6133 _ACEOF
6134 cat confdefs.h >>conftest.$ac_ext
6135 cat >>conftest.$ac_ext <<_ACEOF
6136 /* end confdefs.h.  */
6137
6138 /* Override any GCC internal prototype to avoid an error.
6139    Use char because int might match the return type of a GCC
6140    builtin and then its argument prototype would still apply.  */
6141 #ifdef __cplusplus
6142 extern "C"
6143 #endif
6144 char setproctitle ();
6145 int
6146 main ()
6147 {
6148 return setproctitle ();
6149   ;
6150   return 0;
6151 }
6152 _ACEOF
6153 for ac_lib in '' util; do
6154   if test -z "$ac_lib"; then
6155     ac_res="none required"
6156   else
6157     ac_res=-l$ac_lib
6158     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6159   fi
6160   rm -f conftest.$ac_objext conftest$ac_exeext
6161 if { (ac_try="$ac_link"
6162 case "(($ac_try" in
6163   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6164   *) ac_try_echo=$ac_try;;
6165 esac
6166 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6167   (eval "$ac_link") 2>conftest.er1
6168   ac_status=$?
6169   grep -v '^ *+' conftest.er1 >conftest.err
6170   rm -f conftest.er1
6171   cat conftest.err >&5
6172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6173   (exit $ac_status); } && {
6174          test -z "$ac_c_werror_flag" ||
6175          test ! -s conftest.err
6176        } && test -s conftest$ac_exeext &&
6177        $as_test_x conftest$ac_exeext; then
6178   ac_cv_search_setproctitle=$ac_res
6179 else
6180   echo "$as_me: failed program was:" >&5
6181 sed 's/^/| /' conftest.$ac_ext >&5
6182
6183
6184 fi
6185
6186 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6187       conftest$ac_exeext
6188   if test "${ac_cv_search_setproctitle+set}" = set; then
6189   break
6190 fi
6191 done
6192 if test "${ac_cv_search_setproctitle+set}" = set; then
6193   :
6194 else
6195   ac_cv_search_setproctitle=no
6196 fi
6197 rm conftest.$ac_ext
6198 LIBS=$ac_func_search_save_LIBS
6199 fi
6200 { echo "$as_me:$LINENO: result: $ac_cv_search_setproctitle" >&5
6201 echo "${ECHO_T}$ac_cv_search_setproctitle" >&6; }
6202 ac_res=$ac_cv_search_setproctitle
6203 if test "$ac_res" != no; then
6204   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6205
6206 fi
6207
6208 { echo "$as_me:$LINENO: checking for library containing dlopen" >&5
6209 echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6; }
6210 if test "${ac_cv_search_dlopen+set}" = set; then
6211   echo $ECHO_N "(cached) $ECHO_C" >&6
6212 else
6213   ac_func_search_save_LIBS=$LIBS
6214 cat >conftest.$ac_ext <<_ACEOF
6215 /* confdefs.h.  */
6216 _ACEOF
6217 cat confdefs.h >>conftest.$ac_ext
6218 cat >>conftest.$ac_ext <<_ACEOF
6219 /* end confdefs.h.  */
6220
6221 /* Override any GCC internal prototype to avoid an error.
6222    Use char because int might match the return type of a GCC
6223    builtin and then its argument prototype would still apply.  */
6224 #ifdef __cplusplus
6225 extern "C"
6226 #endif
6227 char dlopen ();
6228 int
6229 main ()
6230 {
6231 return dlopen ();
6232   ;
6233   return 0;
6234 }
6235 _ACEOF
6236 for ac_lib in '' dl; do
6237   if test -z "$ac_lib"; then
6238     ac_res="none required"
6239   else
6240     ac_res=-l$ac_lib
6241     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6242   fi
6243   rm -f conftest.$ac_objext conftest$ac_exeext
6244 if { (ac_try="$ac_link"
6245 case "(($ac_try" in
6246   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6247   *) ac_try_echo=$ac_try;;
6248 esac
6249 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6250   (eval "$ac_link") 2>conftest.er1
6251   ac_status=$?
6252   grep -v '^ *+' conftest.er1 >conftest.err
6253   rm -f conftest.er1
6254   cat conftest.err >&5
6255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6256   (exit $ac_status); } && {
6257          test -z "$ac_c_werror_flag" ||
6258          test ! -s conftest.err
6259        } && test -s conftest$ac_exeext &&
6260        $as_test_x conftest$ac_exeext; then
6261   ac_cv_search_dlopen=$ac_res
6262 else
6263   echo "$as_me: failed program was:" >&5
6264 sed 's/^/| /' conftest.$ac_ext >&5
6265
6266
6267 fi
6268
6269 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6270       conftest$ac_exeext
6271   if test "${ac_cv_search_dlopen+set}" = set; then
6272   break
6273 fi
6274 done
6275 if test "${ac_cv_search_dlopen+set}" = set; then
6276   :
6277 else
6278   ac_cv_search_dlopen=no
6279 fi
6280 rm conftest.$ac_ext
6281 LIBS=$ac_func_search_save_LIBS
6282 fi
6283 { echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
6284 echo "${ECHO_T}$ac_cv_search_dlopen" >&6; }
6285 ac_res=$ac_cv_search_dlopen
6286 if test "$ac_res" != no; then
6287   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6288
6289 fi
6290
6291 { echo "$as_me:$LINENO: checking for library containing socket" >&5
6292 echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6; }
6293 if test "${ac_cv_search_socket+set}" = set; then
6294   echo $ECHO_N "(cached) $ECHO_C" >&6
6295 else
6296   ac_func_search_save_LIBS=$LIBS
6297 cat >conftest.$ac_ext <<_ACEOF
6298 /* confdefs.h.  */
6299 _ACEOF
6300 cat confdefs.h >>conftest.$ac_ext
6301 cat >>conftest.$ac_ext <<_ACEOF
6302 /* end confdefs.h.  */
6303
6304 /* Override any GCC internal prototype to avoid an error.
6305    Use char because int might match the return type of a GCC
6306    builtin and then its argument prototype would still apply.  */
6307 #ifdef __cplusplus
6308 extern "C"
6309 #endif
6310 char socket ();
6311 int
6312 main ()
6313 {
6314 return socket ();
6315   ;
6316   return 0;
6317 }
6318 _ACEOF
6319 for ac_lib in '' socket wsock32; do
6320   if test -z "$ac_lib"; then
6321     ac_res="none required"
6322   else
6323     ac_res=-l$ac_lib
6324     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6325   fi
6326   rm -f conftest.$ac_objext conftest$ac_exeext
6327 if { (ac_try="$ac_link"
6328 case "(($ac_try" in
6329   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6330   *) ac_try_echo=$ac_try;;
6331 esac
6332 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6333   (eval "$ac_link") 2>conftest.er1
6334   ac_status=$?
6335   grep -v '^ *+' conftest.er1 >conftest.err
6336   rm -f conftest.er1
6337   cat conftest.err >&5
6338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6339   (exit $ac_status); } && {
6340          test -z "$ac_c_werror_flag" ||
6341          test ! -s conftest.err
6342        } && test -s conftest$ac_exeext &&
6343        $as_test_x conftest$ac_exeext; then
6344   ac_cv_search_socket=$ac_res
6345 else
6346   echo "$as_me: failed program was:" >&5
6347 sed 's/^/| /' conftest.$ac_ext >&5
6348
6349
6350 fi
6351
6352 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6353       conftest$ac_exeext
6354   if test "${ac_cv_search_socket+set}" = set; then
6355   break
6356 fi
6357 done
6358 if test "${ac_cv_search_socket+set}" = set; then
6359   :
6360 else
6361   ac_cv_search_socket=no
6362 fi
6363 rm conftest.$ac_ext
6364 LIBS=$ac_func_search_save_LIBS
6365 fi
6366 { echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
6367 echo "${ECHO_T}$ac_cv_search_socket" >&6; }
6368 ac_res=$ac_cv_search_socket
6369 if test "$ac_res" != no; then
6370   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6371
6372 fi
6373
6374 { echo "$as_me:$LINENO: checking for library containing shl_load" >&5
6375 echo $ECHO_N "checking for library containing shl_load... $ECHO_C" >&6; }
6376 if test "${ac_cv_search_shl_load+set}" = set; then
6377   echo $ECHO_N "(cached) $ECHO_C" >&6
6378 else
6379   ac_func_search_save_LIBS=$LIBS
6380 cat >conftest.$ac_ext <<_ACEOF
6381 /* confdefs.h.  */
6382 _ACEOF
6383 cat confdefs.h >>conftest.$ac_ext
6384 cat >>conftest.$ac_ext <<_ACEOF
6385 /* end confdefs.h.  */
6386
6387 /* Override any GCC internal prototype to avoid an error.
6388    Use char because int might match the return type of a GCC
6389    builtin and then its argument prototype would still apply.  */
6390 #ifdef __cplusplus
6391 extern "C"
6392 #endif
6393 char shl_load ();
6394 int
6395 main ()
6396 {
6397 return shl_load ();
6398   ;
6399   return 0;
6400 }
6401 _ACEOF
6402 for ac_lib in '' dld; do
6403   if test -z "$ac_lib"; then
6404     ac_res="none required"
6405   else
6406     ac_res=-l$ac_lib
6407     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6408   fi
6409   rm -f conftest.$ac_objext conftest$ac_exeext
6410 if { (ac_try="$ac_link"
6411 case "(($ac_try" in
6412   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6413   *) ac_try_echo=$ac_try;;
6414 esac
6415 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6416   (eval "$ac_link") 2>conftest.er1
6417   ac_status=$?
6418   grep -v '^ *+' conftest.er1 >conftest.err
6419   rm -f conftest.er1
6420   cat conftest.err >&5
6421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6422   (exit $ac_status); } && {
6423          test -z "$ac_c_werror_flag" ||
6424          test ! -s conftest.err
6425        } && test -s conftest$ac_exeext &&
6426        $as_test_x conftest$ac_exeext; then
6427   ac_cv_search_shl_load=$ac_res
6428 else
6429   echo "$as_me: failed program was:" >&5
6430 sed 's/^/| /' conftest.$ac_ext >&5
6431
6432
6433 fi
6434
6435 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6436       conftest$ac_exeext
6437   if test "${ac_cv_search_shl_load+set}" = set; then
6438   break
6439 fi
6440 done
6441 if test "${ac_cv_search_shl_load+set}" = set; then
6442   :
6443 else
6444   ac_cv_search_shl_load=no
6445 fi
6446 rm conftest.$ac_ext
6447 LIBS=$ac_func_search_save_LIBS
6448 fi
6449 { echo "$as_me:$LINENO: result: $ac_cv_search_shl_load" >&5
6450 echo "${ECHO_T}$ac_cv_search_shl_load" >&6; }
6451 ac_res=$ac_cv_search_shl_load
6452 if test "$ac_res" != no; then
6453   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6454
6455 fi
6456
6457 # We only use libld in port/dynloader/aix.c
6458 case $host_os in
6459      aix*)
6460         { echo "$as_me:$LINENO: checking for library containing ldopen" >&5
6461 echo $ECHO_N "checking for library containing ldopen... $ECHO_C" >&6; }
6462 if test "${ac_cv_search_ldopen+set}" = set; then
6463   echo $ECHO_N "(cached) $ECHO_C" >&6
6464 else
6465   ac_func_search_save_LIBS=$LIBS
6466 cat >conftest.$ac_ext <<_ACEOF
6467 /* confdefs.h.  */
6468 _ACEOF
6469 cat confdefs.h >>conftest.$ac_ext
6470 cat >>conftest.$ac_ext <<_ACEOF
6471 /* end confdefs.h.  */
6472
6473 /* Override any GCC internal prototype to avoid an error.
6474    Use char because int might match the return type of a GCC
6475    builtin and then its argument prototype would still apply.  */
6476 #ifdef __cplusplus
6477 extern "C"
6478 #endif
6479 char ldopen ();
6480 int
6481 main ()
6482 {
6483 return ldopen ();
6484   ;
6485   return 0;
6486 }
6487 _ACEOF
6488 for ac_lib in '' ld; do
6489   if test -z "$ac_lib"; then
6490     ac_res="none required"
6491   else
6492     ac_res=-l$ac_lib
6493     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6494   fi
6495   rm -f conftest.$ac_objext conftest$ac_exeext
6496 if { (ac_try="$ac_link"
6497 case "(($ac_try" in
6498   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6499   *) ac_try_echo=$ac_try;;
6500 esac
6501 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6502   (eval "$ac_link") 2>conftest.er1
6503   ac_status=$?
6504   grep -v '^ *+' conftest.er1 >conftest.err
6505   rm -f conftest.er1
6506   cat conftest.err >&5
6507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6508   (exit $ac_status); } && {
6509          test -z "$ac_c_werror_flag" ||
6510          test ! -s conftest.err
6511        } && test -s conftest$ac_exeext &&
6512        $as_test_x conftest$ac_exeext; then
6513   ac_cv_search_ldopen=$ac_res
6514 else
6515   echo "$as_me: failed program was:" >&5
6516 sed 's/^/| /' conftest.$ac_ext >&5
6517
6518
6519 fi
6520
6521 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6522       conftest$ac_exeext
6523   if test "${ac_cv_search_ldopen+set}" = set; then
6524   break
6525 fi
6526 done
6527 if test "${ac_cv_search_ldopen+set}" = set; then
6528   :
6529 else
6530   ac_cv_search_ldopen=no
6531 fi
6532 rm conftest.$ac_ext
6533 LIBS=$ac_func_search_save_LIBS
6534 fi
6535 { echo "$as_me:$LINENO: result: $ac_cv_search_ldopen" >&5
6536 echo "${ECHO_T}$ac_cv_search_ldopen" >&6; }
6537 ac_res=$ac_cv_search_ldopen
6538 if test "$ac_res" != no; then
6539   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6540
6541 fi
6542
6543         ;;
6544 esac
6545 { echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
6546 echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6; }
6547 if test "${ac_cv_search_getopt_long+set}" = set; then
6548   echo $ECHO_N "(cached) $ECHO_C" >&6
6549 else
6550   ac_func_search_save_LIBS=$LIBS
6551 cat >conftest.$ac_ext <<_ACEOF
6552 /* confdefs.h.  */
6553 _ACEOF
6554 cat confdefs.h >>conftest.$ac_ext
6555 cat >>conftest.$ac_ext <<_ACEOF
6556 /* end confdefs.h.  */
6557
6558 /* Override any GCC internal prototype to avoid an error.
6559    Use char because int might match the return type of a GCC
6560    builtin and then its argument prototype would still apply.  */
6561 #ifdef __cplusplus
6562 extern "C"
6563 #endif
6564 char getopt_long ();
6565 int
6566 main ()
6567 {
6568 return getopt_long ();
6569   ;
6570   return 0;
6571 }
6572 _ACEOF
6573 for ac_lib in '' getopt gnugetopt; do
6574   if test -z "$ac_lib"; then
6575     ac_res="none required"
6576   else
6577     ac_res=-l$ac_lib
6578     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6579   fi
6580   rm -f conftest.$ac_objext conftest$ac_exeext
6581 if { (ac_try="$ac_link"
6582 case "(($ac_try" in
6583   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6584   *) ac_try_echo=$ac_try;;
6585 esac
6586 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6587   (eval "$ac_link") 2>conftest.er1
6588   ac_status=$?
6589   grep -v '^ *+' conftest.er1 >conftest.err
6590   rm -f conftest.er1
6591   cat conftest.err >&5
6592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6593   (exit $ac_status); } && {
6594          test -z "$ac_c_werror_flag" ||
6595          test ! -s conftest.err
6596        } && test -s conftest$ac_exeext &&
6597        $as_test_x conftest$ac_exeext; then
6598   ac_cv_search_getopt_long=$ac_res
6599 else
6600   echo "$as_me: failed program was:" >&5
6601 sed 's/^/| /' conftest.$ac_ext >&5
6602
6603
6604 fi
6605
6606 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6607       conftest$ac_exeext
6608   if test "${ac_cv_search_getopt_long+set}" = set; then
6609   break
6610 fi
6611 done
6612 if test "${ac_cv_search_getopt_long+set}" = set; then
6613   :
6614 else
6615   ac_cv_search_getopt_long=no
6616 fi
6617 rm conftest.$ac_ext
6618 LIBS=$ac_func_search_save_LIBS
6619 fi
6620 { echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
6621 echo "${ECHO_T}$ac_cv_search_getopt_long" >&6; }
6622 ac_res=$ac_cv_search_getopt_long
6623 if test "$ac_res" != no; then
6624   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6625
6626 fi
6627
6628 { echo "$as_me:$LINENO: checking for library containing crypt" >&5
6629 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6; }
6630 if test "${ac_cv_search_crypt+set}" = set; then
6631   echo $ECHO_N "(cached) $ECHO_C" >&6
6632 else
6633   ac_func_search_save_LIBS=$LIBS
6634 cat >conftest.$ac_ext <<_ACEOF
6635 /* confdefs.h.  */
6636 _ACEOF
6637 cat confdefs.h >>conftest.$ac_ext
6638 cat >>conftest.$ac_ext <<_ACEOF
6639 /* end confdefs.h.  */
6640
6641 /* Override any GCC internal prototype to avoid an error.
6642    Use char because int might match the return type of a GCC
6643    builtin and then its argument prototype would still apply.  */
6644 #ifdef __cplusplus
6645 extern "C"
6646 #endif
6647 char crypt ();
6648 int
6649 main ()
6650 {
6651 return crypt ();
6652   ;
6653   return 0;
6654 }
6655 _ACEOF
6656 for ac_lib in '' crypt; do
6657   if test -z "$ac_lib"; then
6658     ac_res="none required"
6659   else
6660     ac_res=-l$ac_lib
6661     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6662   fi
6663   rm -f conftest.$ac_objext conftest$ac_exeext
6664 if { (ac_try="$ac_link"
6665 case "(($ac_try" in
6666   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6667   *) ac_try_echo=$ac_try;;
6668 esac
6669 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6670   (eval "$ac_link") 2>conftest.er1
6671   ac_status=$?
6672   grep -v '^ *+' conftest.er1 >conftest.err
6673   rm -f conftest.er1
6674   cat conftest.err >&5
6675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6676   (exit $ac_status); } && {
6677          test -z "$ac_c_werror_flag" ||
6678          test ! -s conftest.err
6679        } && test -s conftest$ac_exeext &&
6680        $as_test_x conftest$ac_exeext; then
6681   ac_cv_search_crypt=$ac_res
6682 else
6683   echo "$as_me: failed program was:" >&5
6684 sed 's/^/| /' conftest.$ac_ext >&5
6685
6686
6687 fi
6688
6689 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6690       conftest$ac_exeext
6691   if test "${ac_cv_search_crypt+set}" = set; then
6692   break
6693 fi
6694 done
6695 if test "${ac_cv_search_crypt+set}" = set; then
6696   :
6697 else
6698   ac_cv_search_crypt=no
6699 fi
6700 rm conftest.$ac_ext
6701 LIBS=$ac_func_search_save_LIBS
6702 fi
6703 { echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
6704 echo "${ECHO_T}$ac_cv_search_crypt" >&6; }
6705 ac_res=$ac_cv_search_crypt
6706 if test "$ac_res" != no; then
6707   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6708
6709 fi
6710
6711 # Solaris:
6712 { echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
6713 echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6; }
6714 if test "${ac_cv_search_fdatasync+set}" = set; then
6715   echo $ECHO_N "(cached) $ECHO_C" >&6
6716 else
6717   ac_func_search_save_LIBS=$LIBS
6718 cat >conftest.$ac_ext <<_ACEOF
6719 /* confdefs.h.  */
6720 _ACEOF
6721 cat confdefs.h >>conftest.$ac_ext
6722 cat >>conftest.$ac_ext <<_ACEOF
6723 /* end confdefs.h.  */
6724
6725 /* Override any GCC internal prototype to avoid an error.
6726    Use char because int might match the return type of a GCC
6727    builtin and then its argument prototype would still apply.  */
6728 #ifdef __cplusplus
6729 extern "C"
6730 #endif
6731 char fdatasync ();
6732 int
6733 main ()
6734 {
6735 return fdatasync ();
6736   ;
6737   return 0;
6738 }
6739 _ACEOF
6740 for ac_lib in '' rt posix4; do
6741   if test -z "$ac_lib"; then
6742     ac_res="none required"
6743   else
6744     ac_res=-l$ac_lib
6745     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6746   fi
6747   rm -f conftest.$ac_objext conftest$ac_exeext
6748 if { (ac_try="$ac_link"
6749 case "(($ac_try" in
6750   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6751   *) ac_try_echo=$ac_try;;
6752 esac
6753 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6754   (eval "$ac_link") 2>conftest.er1
6755   ac_status=$?
6756   grep -v '^ *+' conftest.er1 >conftest.err
6757   rm -f conftest.er1
6758   cat conftest.err >&5
6759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6760   (exit $ac_status); } && {
6761          test -z "$ac_c_werror_flag" ||
6762          test ! -s conftest.err
6763        } && test -s conftest$ac_exeext &&
6764        $as_test_x conftest$ac_exeext; then
6765   ac_cv_search_fdatasync=$ac_res
6766 else
6767   echo "$as_me: failed program was:" >&5
6768 sed 's/^/| /' conftest.$ac_ext >&5
6769
6770
6771 fi
6772
6773 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6774       conftest$ac_exeext
6775   if test "${ac_cv_search_fdatasync+set}" = set; then
6776   break
6777 fi
6778 done
6779 if test "${ac_cv_search_fdatasync+set}" = set; then
6780   :
6781 else
6782   ac_cv_search_fdatasync=no
6783 fi
6784 rm conftest.$ac_ext
6785 LIBS=$ac_func_search_save_LIBS
6786 fi
6787 { echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
6788 echo "${ECHO_T}$ac_cv_search_fdatasync" >&6; }
6789 ac_res=$ac_cv_search_fdatasync
6790 if test "$ac_res" != no; then
6791   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6792
6793 fi
6794
6795 # Cygwin:
6796 { echo "$as_me:$LINENO: checking for library containing shmget" >&5
6797 echo $ECHO_N "checking for library containing shmget... $ECHO_C" >&6; }
6798 if test "${ac_cv_search_shmget+set}" = set; then
6799   echo $ECHO_N "(cached) $ECHO_C" >&6
6800 else
6801   ac_func_search_save_LIBS=$LIBS
6802 cat >conftest.$ac_ext <<_ACEOF
6803 /* confdefs.h.  */
6804 _ACEOF
6805 cat confdefs.h >>conftest.$ac_ext
6806 cat >>conftest.$ac_ext <<_ACEOF
6807 /* end confdefs.h.  */
6808
6809 /* Override any GCC internal prototype to avoid an error.
6810    Use char because int might match the return type of a GCC
6811    builtin and then its argument prototype would still apply.  */
6812 #ifdef __cplusplus
6813 extern "C"
6814 #endif
6815 char shmget ();
6816 int
6817 main ()
6818 {
6819 return shmget ();
6820   ;
6821   return 0;
6822 }
6823 _ACEOF
6824 for ac_lib in '' cygipc; do
6825   if test -z "$ac_lib"; then
6826     ac_res="none required"
6827   else
6828     ac_res=-l$ac_lib
6829     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6830   fi
6831   rm -f conftest.$ac_objext conftest$ac_exeext
6832 if { (ac_try="$ac_link"
6833 case "(($ac_try" in
6834   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6835   *) ac_try_echo=$ac_try;;
6836 esac
6837 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6838   (eval "$ac_link") 2>conftest.er1
6839   ac_status=$?
6840   grep -v '^ *+' conftest.er1 >conftest.err
6841   rm -f conftest.er1
6842   cat conftest.err >&5
6843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6844   (exit $ac_status); } && {
6845          test -z "$ac_c_werror_flag" ||
6846          test ! -s conftest.err
6847        } && test -s conftest$ac_exeext &&
6848        $as_test_x conftest$ac_exeext; then
6849   ac_cv_search_shmget=$ac_res
6850 else
6851   echo "$as_me: failed program was:" >&5
6852 sed 's/^/| /' conftest.$ac_ext >&5
6853
6854
6855 fi
6856
6857 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6858       conftest$ac_exeext
6859   if test "${ac_cv_search_shmget+set}" = set; then
6860   break
6861 fi
6862 done
6863 if test "${ac_cv_search_shmget+set}" = set; then
6864   :
6865 else
6866   ac_cv_search_shmget=no
6867 fi
6868 rm conftest.$ac_ext
6869 LIBS=$ac_func_search_save_LIBS
6870 fi
6871 { echo "$as_me:$LINENO: result: $ac_cv_search_shmget" >&5
6872 echo "${ECHO_T}$ac_cv_search_shmget" >&6; }
6873 ac_res=$ac_cv_search_shmget
6874 if test "$ac_res" != no; then
6875   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6876
6877 fi
6878
6879
6880 if test "$with_readline" = yes; then
6881
6882
6883 if test "${pgac_cv_check_readline+set}" = set; then
6884   echo $ECHO_N "(cached) $ECHO_C" >&6
6885 else
6886   pgac_cv_check_readline=no
6887 pgac_save_LIBS=$LIBS
6888 if test x"$with_libedit_preferred" != x"yes"
6889 then    READLINE_ORDER="-lreadline -ledit"
6890 else    READLINE_ORDER="-ledit -lreadline"
6891 fi
6892 for pgac_rllib in $READLINE_ORDER ; do
6893   { echo "$as_me:$LINENO: checking for ${pgac_rllib}" >&5
6894 echo $ECHO_N "checking for ${pgac_rllib}... $ECHO_C" >&6; }
6895   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
6896     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
6897     cat >conftest.$ac_ext <<_ACEOF
6898 /* confdefs.h.  */
6899 _ACEOF
6900 cat confdefs.h >>conftest.$ac_ext
6901 cat >>conftest.$ac_ext <<_ACEOF
6902 /* end confdefs.h.  */
6903
6904 /* Override any GCC internal prototype to avoid an error.
6905    Use char because int might match the return type of a GCC
6906    builtin and then its argument prototype would still apply.  */
6907 #ifdef __cplusplus
6908 extern "C"
6909 #endif
6910 char readline ();
6911 int
6912 main ()
6913 {
6914 return readline ();
6915   ;
6916   return 0;
6917 }
6918 _ACEOF
6919 rm -f conftest.$ac_objext conftest$ac_exeext
6920 if { (ac_try="$ac_link"
6921 case "(($ac_try" in
6922   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6923   *) ac_try_echo=$ac_try;;
6924 esac
6925 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6926   (eval "$ac_link") 2>conftest.er1
6927   ac_status=$?
6928   grep -v '^ *+' conftest.er1 >conftest.err
6929   rm -f conftest.er1
6930   cat conftest.err >&5
6931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6932   (exit $ac_status); } && {
6933          test -z "$ac_c_werror_flag" ||
6934          test ! -s conftest.err
6935        } && test -s conftest$ac_exeext &&
6936        $as_test_x conftest$ac_exeext; then
6937
6938       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
6939       # recognize dependent libraries; assume curses is needed if we didn't
6940       # find any dependency.
6941       case $host_os in
6942         netbsd* | openbsd* | irix*)
6943           if test x"$pgac_lib" = x"" ; then
6944             pgac_lib=" -lcurses"
6945           fi ;;
6946       esac
6947
6948       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
6949       break
6950
6951 else
6952   echo "$as_me: failed program was:" >&5
6953 sed 's/^/| /' conftest.$ac_ext >&5
6954
6955
6956 fi
6957
6958 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6959       conftest$ac_exeext conftest.$ac_ext
6960   done
6961   if test "$pgac_cv_check_readline" != no ; then
6962     { echo "$as_me:$LINENO: result: yes ($pgac_cv_check_readline)" >&5
6963 echo "${ECHO_T}yes ($pgac_cv_check_readline)" >&6; }
6964     break
6965   else
6966     { echo "$as_me:$LINENO: result: no" >&5
6967 echo "${ECHO_T}no" >&6; }
6968   fi
6969 done
6970 LIBS=$pgac_save_LIBS
6971
6972 fi
6973
6974 if test "$pgac_cv_check_readline" != no ; then
6975   LIBS="$pgac_cv_check_readline $LIBS"
6976
6977 cat >>confdefs.h <<\_ACEOF
6978 #define HAVE_LIBREADLINE 1
6979 _ACEOF
6980
6981 fi
6982
6983
6984   if test x"$pgac_cv_check_readline" = x"no"; then
6985     { { echo "$as_me:$LINENO: error: readline library not found
6986 If you have readline already installed, see config.log for details on the
6987 failure.  It is possible the compiler isn't looking in the proper directory.
6988 Use --without-readline to disable readline support." >&5
6989 echo "$as_me: error: readline library not found
6990 If you have readline already installed, see config.log for details on the
6991 failure.  It is possible the compiler isn't looking in the proper directory.
6992 Use --without-readline to disable readline support." >&2;}
6993    { (exit 1); exit 1; }; }
6994   fi
6995 fi
6996
6997 if test "$with_zlib" = yes; then
6998
6999 { echo "$as_me:$LINENO: checking for inflate in -lz" >&5
7000 echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6; }
7001 if test "${ac_cv_lib_z_inflate+set}" = set; then
7002   echo $ECHO_N "(cached) $ECHO_C" >&6
7003 else
7004   ac_check_lib_save_LIBS=$LIBS
7005 LIBS="-lz  $LIBS"
7006 cat >conftest.$ac_ext <<_ACEOF
7007 /* confdefs.h.  */
7008 _ACEOF
7009 cat confdefs.h >>conftest.$ac_ext
7010 cat >>conftest.$ac_ext <<_ACEOF
7011 /* end confdefs.h.  */
7012
7013 /* Override any GCC internal prototype to avoid an error.
7014    Use char because int might match the return type of a GCC
7015    builtin and then its argument prototype would still apply.  */
7016 #ifdef __cplusplus
7017 extern "C"
7018 #endif
7019 char inflate ();
7020 int
7021 main ()
7022 {
7023 return inflate ();
7024   ;
7025   return 0;
7026 }
7027 _ACEOF
7028 rm -f conftest.$ac_objext conftest$ac_exeext
7029 if { (ac_try="$ac_link"
7030 case "(($ac_try" in
7031   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7032   *) ac_try_echo=$ac_try;;
7033 esac
7034 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7035   (eval "$ac_link") 2>conftest.er1
7036   ac_status=$?
7037   grep -v '^ *+' conftest.er1 >conftest.err
7038   rm -f conftest.er1
7039   cat conftest.err >&5
7040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7041   (exit $ac_status); } && {
7042          test -z "$ac_c_werror_flag" ||
7043          test ! -s conftest.err
7044        } && test -s conftest$ac_exeext &&
7045        $as_test_x conftest$ac_exeext; then
7046   ac_cv_lib_z_inflate=yes
7047 else
7048   echo "$as_me: failed program was:" >&5
7049 sed 's/^/| /' conftest.$ac_ext >&5
7050
7051         ac_cv_lib_z_inflate=no
7052 fi
7053
7054 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7055       conftest$ac_exeext conftest.$ac_ext
7056 LIBS=$ac_check_lib_save_LIBS
7057 fi
7058 { echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
7059 echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6; }
7060 if test $ac_cv_lib_z_inflate = yes; then
7061   cat >>confdefs.h <<_ACEOF
7062 #define HAVE_LIBZ 1
7063 _ACEOF
7064
7065   LIBS="-lz $LIBS"
7066
7067 else
7068   { { echo "$as_me:$LINENO: error: zlib library not found
7069 If you have zlib already installed, see config.log for details on the
7070 failure.  It is possible the compiler isn't looking in the proper directory.
7071 Use --without-zlib to disable zlib support." >&5
7072 echo "$as_me: error: zlib library not found
7073 If you have zlib already installed, see config.log for details on the
7074 failure.  It is possible the compiler isn't looking in the proper directory.
7075 Use --without-zlib to disable zlib support." >&2;}
7076    { (exit 1); exit 1; }; }
7077 fi
7078
7079 fi
7080
7081 if test "$enable_spinlocks" = yes; then
7082
7083 cat >>confdefs.h <<\_ACEOF
7084 #define HAVE_SPINLOCKS 1
7085 _ACEOF
7086
7087 else
7088   { echo "$as_me:$LINENO: WARNING:
7089 *** Not using spinlocks will cause poor performance." >&5
7090 echo "$as_me: WARNING:
7091 *** Not using spinlocks will cause poor performance." >&2;}
7092 fi
7093
7094 if test "$with_gssapi" = yes ; then
7095   if test "$PORTNAME" != "win32"; then
7096     { echo "$as_me:$LINENO: checking for library containing gss_init_sec_context" >&5
7097 echo $ECHO_N "checking for library containing gss_init_sec_context... $ECHO_C" >&6; }
7098 if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
7099   echo $ECHO_N "(cached) $ECHO_C" >&6
7100 else
7101   ac_func_search_save_LIBS=$LIBS
7102 cat >conftest.$ac_ext <<_ACEOF
7103 /* confdefs.h.  */
7104 _ACEOF
7105 cat confdefs.h >>conftest.$ac_ext
7106 cat >>conftest.$ac_ext <<_ACEOF
7107 /* end confdefs.h.  */
7108
7109 /* Override any GCC internal prototype to avoid an error.
7110    Use char because int might match the return type of a GCC
7111    builtin and then its argument prototype would still apply.  */
7112 #ifdef __cplusplus
7113 extern "C"
7114 #endif
7115 char gss_init_sec_context ();
7116 int
7117 main ()
7118 {
7119 return gss_init_sec_context ();
7120   ;
7121   return 0;
7122 }
7123 _ACEOF
7124 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
7125   if test -z "$ac_lib"; then
7126     ac_res="none required"
7127   else
7128     ac_res=-l$ac_lib
7129     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7130   fi
7131   rm -f conftest.$ac_objext conftest$ac_exeext
7132 if { (ac_try="$ac_link"
7133 case "(($ac_try" in
7134   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7135   *) ac_try_echo=$ac_try;;
7136 esac
7137 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7138   (eval "$ac_link") 2>conftest.er1
7139   ac_status=$?
7140   grep -v '^ *+' conftest.er1 >conftest.err
7141   rm -f conftest.er1
7142   cat conftest.err >&5
7143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7144   (exit $ac_status); } && {
7145          test -z "$ac_c_werror_flag" ||
7146          test ! -s conftest.err
7147        } && test -s conftest$ac_exeext &&
7148        $as_test_x conftest$ac_exeext; then
7149   ac_cv_search_gss_init_sec_context=$ac_res
7150 else
7151   echo "$as_me: failed program was:" >&5
7152 sed 's/^/| /' conftest.$ac_ext >&5
7153
7154
7155 fi
7156
7157 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7158       conftest$ac_exeext
7159   if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
7160   break
7161 fi
7162 done
7163 if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
7164   :
7165 else
7166   ac_cv_search_gss_init_sec_context=no
7167 fi
7168 rm conftest.$ac_ext
7169 LIBS=$ac_func_search_save_LIBS
7170 fi
7171 { echo "$as_me:$LINENO: result: $ac_cv_search_gss_init_sec_context" >&5
7172 echo "${ECHO_T}$ac_cv_search_gss_init_sec_context" >&6; }
7173 ac_res=$ac_cv_search_gss_init_sec_context
7174 if test "$ac_res" != no; then
7175   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7176
7177 else
7178   { { echo "$as_me:$LINENO: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&5
7179 echo "$as_me: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&2;}
7180    { (exit 1); exit 1; }; }
7181 fi
7182
7183   else
7184     LIBS="$LIBS -lgssapi32"
7185   fi
7186 fi
7187
7188 if test "$with_krb5" = yes ; then
7189   if test "$PORTNAME" != "win32"; then
7190      { echo "$as_me:$LINENO: checking for library containing com_err" >&5
7191 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6; }
7192 if test "${ac_cv_search_com_err+set}" = set; then
7193   echo $ECHO_N "(cached) $ECHO_C" >&6
7194 else
7195   ac_func_search_save_LIBS=$LIBS
7196 cat >conftest.$ac_ext <<_ACEOF
7197 /* confdefs.h.  */
7198 _ACEOF
7199 cat confdefs.h >>conftest.$ac_ext
7200 cat >>conftest.$ac_ext <<_ACEOF
7201 /* end confdefs.h.  */
7202
7203 /* Override any GCC internal prototype to avoid an error.
7204    Use char because int might match the return type of a GCC
7205    builtin and then its argument prototype would still apply.  */
7206 #ifdef __cplusplus
7207 extern "C"
7208 #endif
7209 char com_err ();
7210 int
7211 main ()
7212 {
7213 return com_err ();
7214   ;
7215   return 0;
7216 }
7217 _ACEOF
7218 for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' com_err; do
7219   if test -z "$ac_lib"; then
7220     ac_res="none required"
7221   else
7222     ac_res=-l$ac_lib
7223     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7224   fi
7225   rm -f conftest.$ac_objext conftest$ac_exeext
7226 if { (ac_try="$ac_link"
7227 case "(($ac_try" in
7228   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7229   *) ac_try_echo=$ac_try;;
7230 esac
7231 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7232   (eval "$ac_link") 2>conftest.er1
7233   ac_status=$?
7234   grep -v '^ *+' conftest.er1 >conftest.err
7235   rm -f conftest.er1
7236   cat conftest.err >&5
7237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7238   (exit $ac_status); } && {
7239          test -z "$ac_c_werror_flag" ||
7240          test ! -s conftest.err
7241        } && test -s conftest$ac_exeext &&
7242        $as_test_x conftest$ac_exeext; then
7243   ac_cv_search_com_err=$ac_res
7244 else
7245   echo "$as_me: failed program was:" >&5
7246 sed 's/^/| /' conftest.$ac_ext >&5
7247
7248
7249 fi
7250
7251 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7252       conftest$ac_exeext
7253   if test "${ac_cv_search_com_err+set}" = set; then
7254   break
7255 fi
7256 done
7257 if test "${ac_cv_search_com_err+set}" = set; then
7258   :
7259 else
7260   ac_cv_search_com_err=no
7261 fi
7262 rm conftest.$ac_ext
7263 LIBS=$ac_func_search_save_LIBS
7264 fi
7265 { echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
7266 echo "${ECHO_T}$ac_cv_search_com_err" >&6; }
7267 ac_res=$ac_cv_search_com_err
7268 if test "$ac_res" != no; then
7269   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7270
7271 else
7272   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
7273 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
7274    { (exit 1); exit 1; }; }
7275 fi
7276
7277      { echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
7278 echo $ECHO_N "checking for library containing krb5_sendauth... $ECHO_C" >&6; }
7279 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
7280   echo $ECHO_N "(cached) $ECHO_C" >&6
7281 else
7282   ac_func_search_save_LIBS=$LIBS
7283 cat >conftest.$ac_ext <<_ACEOF
7284 /* confdefs.h.  */
7285 _ACEOF
7286 cat confdefs.h >>conftest.$ac_ext
7287 cat >>conftest.$ac_ext <<_ACEOF
7288 /* end confdefs.h.  */
7289
7290 /* Override any GCC internal prototype to avoid an error.
7291    Use char because int might match the return type of a GCC
7292    builtin and then its argument prototype would still apply.  */
7293 #ifdef __cplusplus
7294 extern "C"
7295 #endif
7296 char krb5_sendauth ();
7297 int
7298 main ()
7299 {
7300 return krb5_sendauth ();
7301   ;
7302   return 0;
7303 }
7304 _ACEOF
7305 for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'; do
7306   if test -z "$ac_lib"; then
7307     ac_res="none required"
7308   else
7309     ac_res=-l$ac_lib
7310     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7311   fi
7312   rm -f conftest.$ac_objext conftest$ac_exeext
7313 if { (ac_try="$ac_link"
7314 case "(($ac_try" in
7315   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7316   *) ac_try_echo=$ac_try;;
7317 esac
7318 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7319   (eval "$ac_link") 2>conftest.er1
7320   ac_status=$?
7321   grep -v '^ *+' conftest.er1 >conftest.err
7322   rm -f conftest.er1
7323   cat conftest.err >&5
7324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7325   (exit $ac_status); } && {
7326          test -z "$ac_c_werror_flag" ||
7327          test ! -s conftest.err
7328        } && test -s conftest$ac_exeext &&
7329        $as_test_x conftest$ac_exeext; then
7330   ac_cv_search_krb5_sendauth=$ac_res
7331 else
7332   echo "$as_me: failed program was:" >&5
7333 sed 's/^/| /' conftest.$ac_ext >&5
7334
7335
7336 fi
7337
7338 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7339       conftest$ac_exeext
7340   if test "${ac_cv_search_krb5_sendauth+set}" = set; then
7341   break
7342 fi
7343 done
7344 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
7345   :
7346 else
7347   ac_cv_search_krb5_sendauth=no
7348 fi
7349 rm conftest.$ac_ext
7350 LIBS=$ac_func_search_save_LIBS
7351 fi
7352 { echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
7353 echo "${ECHO_T}$ac_cv_search_krb5_sendauth" >&6; }
7354 ac_res=$ac_cv_search_krb5_sendauth
7355 if test "$ac_res" != no; then
7356   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7357
7358 else
7359   { { echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
7360 echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
7361    { (exit 1); exit 1; }; }
7362 fi
7363
7364   else
7365      { echo "$as_me:$LINENO: checking for library containing com_err" >&5
7366 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6; }
7367 if test "${ac_cv_search_com_err+set}" = set; then
7368   echo $ECHO_N "(cached) $ECHO_C" >&6
7369 else
7370   ac_func_search_save_LIBS=$LIBS
7371 cat >conftest.$ac_ext <<_ACEOF
7372 /* confdefs.h.  */
7373 _ACEOF
7374 cat confdefs.h >>conftest.$ac_ext
7375 cat >>conftest.$ac_ext <<_ACEOF
7376 /* end confdefs.h.  */
7377
7378 /* Override any GCC internal prototype to avoid an error.
7379    Use char because int might match the return type of a GCC
7380    builtin and then its argument prototype would still apply.  */
7381 #ifdef __cplusplus
7382 extern "C"
7383 #endif
7384 char com_err ();
7385 int
7386 main ()
7387 {
7388 return com_err ();
7389   ;
7390   return 0;
7391 }
7392 _ACEOF
7393 for ac_lib in '' 'comerr32 -lkrb5_32'; do
7394   if test -z "$ac_lib"; then
7395     ac_res="none required"
7396   else
7397     ac_res=-l$ac_lib
7398     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7399   fi
7400   rm -f conftest.$ac_objext conftest$ac_exeext
7401 if { (ac_try="$ac_link"
7402 case "(($ac_try" in
7403   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7404   *) ac_try_echo=$ac_try;;
7405 esac
7406 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7407   (eval "$ac_link") 2>conftest.er1
7408   ac_status=$?
7409   grep -v '^ *+' conftest.er1 >conftest.err
7410   rm -f conftest.er1
7411   cat conftest.err >&5
7412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7413   (exit $ac_status); } && {
7414          test -z "$ac_c_werror_flag" ||
7415          test ! -s conftest.err
7416        } && test -s conftest$ac_exeext &&
7417        $as_test_x conftest$ac_exeext; then
7418   ac_cv_search_com_err=$ac_res
7419 else
7420   echo "$as_me: failed program was:" >&5
7421 sed 's/^/| /' conftest.$ac_ext >&5
7422
7423
7424 fi
7425
7426 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7427       conftest$ac_exeext
7428   if test "${ac_cv_search_com_err+set}" = set; then
7429   break
7430 fi
7431 done
7432 if test "${ac_cv_search_com_err+set}" = set; then
7433   :
7434 else
7435   ac_cv_search_com_err=no
7436 fi
7437 rm conftest.$ac_ext
7438 LIBS=$ac_func_search_save_LIBS
7439 fi
7440 { echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
7441 echo "${ECHO_T}$ac_cv_search_com_err" >&6; }
7442 ac_res=$ac_cv_search_com_err
7443 if test "$ac_res" != no; then
7444   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7445
7446 else
7447   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
7448 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
7449    { (exit 1); exit 1; }; }
7450 fi
7451
7452   fi
7453 fi
7454
7455 if test "$with_openssl" = yes ; then
7456     if test "$PORTNAME" != "win32"; then
7457
7458 { echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
7459 echo $ECHO_N "checking for CRYPTO_new_ex_data in -lcrypto... $ECHO_C" >&6; }
7460 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
7461   echo $ECHO_N "(cached) $ECHO_C" >&6
7462 else
7463   ac_check_lib_save_LIBS=$LIBS
7464 LIBS="-lcrypto  $LIBS"
7465 cat >conftest.$ac_ext <<_ACEOF
7466 /* confdefs.h.  */
7467 _ACEOF
7468 cat confdefs.h >>conftest.$ac_ext
7469 cat >>conftest.$ac_ext <<_ACEOF
7470 /* end confdefs.h.  */
7471
7472 /* Override any GCC internal prototype to avoid an error.
7473    Use char because int might match the return type of a GCC
7474    builtin and then its argument prototype would still apply.  */
7475 #ifdef __cplusplus
7476 extern "C"
7477 #endif
7478 char CRYPTO_new_ex_data ();
7479 int
7480 main ()
7481 {
7482 return CRYPTO_new_ex_data ();
7483   ;
7484   return 0;
7485 }
7486 _ACEOF
7487 rm -f conftest.$ac_objext conftest$ac_exeext
7488 if { (ac_try="$ac_link"
7489 case "(($ac_try" in
7490   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7491   *) ac_try_echo=$ac_try;;
7492 esac
7493 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7494   (eval "$ac_link") 2>conftest.er1
7495   ac_status=$?
7496   grep -v '^ *+' conftest.er1 >conftest.err
7497   rm -f conftest.er1
7498   cat conftest.err >&5
7499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7500   (exit $ac_status); } && {
7501          test -z "$ac_c_werror_flag" ||
7502          test ! -s conftest.err
7503        } && test -s conftest$ac_exeext &&
7504        $as_test_x conftest$ac_exeext; then
7505   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
7506 else
7507   echo "$as_me: failed program was:" >&5
7508 sed 's/^/| /' conftest.$ac_ext >&5
7509
7510         ac_cv_lib_crypto_CRYPTO_new_ex_data=no
7511 fi
7512
7513 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7514       conftest$ac_exeext conftest.$ac_ext
7515 LIBS=$ac_check_lib_save_LIBS
7516 fi
7517 { echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
7518 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
7519 if test $ac_cv_lib_crypto_CRYPTO_new_ex_data = yes; then
7520   cat >>confdefs.h <<_ACEOF
7521 #define HAVE_LIBCRYPTO 1
7522 _ACEOF
7523
7524   LIBS="-lcrypto $LIBS"
7525
7526 else
7527   { { echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
7528 echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
7529    { (exit 1); exit 1; }; }
7530 fi
7531
7532
7533 { echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
7534 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6; }
7535 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
7536   echo $ECHO_N "(cached) $ECHO_C" >&6
7537 else
7538   ac_check_lib_save_LIBS=$LIBS
7539 LIBS="-lssl  $LIBS"
7540 cat >conftest.$ac_ext <<_ACEOF
7541 /* confdefs.h.  */
7542 _ACEOF
7543 cat confdefs.h >>conftest.$ac_ext
7544 cat >>conftest.$ac_ext <<_ACEOF
7545 /* end confdefs.h.  */
7546
7547 /* Override any GCC internal prototype to avoid an error.
7548    Use char because int might match the return type of a GCC
7549    builtin and then its argument prototype would still apply.  */
7550 #ifdef __cplusplus
7551 extern "C"
7552 #endif
7553 char SSL_library_init ();
7554 int
7555 main ()
7556 {
7557 return SSL_library_init ();
7558   ;
7559   return 0;
7560 }
7561 _ACEOF
7562 rm -f conftest.$ac_objext conftest$ac_exeext
7563 if { (ac_try="$ac_link"
7564 case "(($ac_try" in
7565   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7566   *) ac_try_echo=$ac_try;;
7567 esac
7568 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7569   (eval "$ac_link") 2>conftest.er1
7570   ac_status=$?
7571   grep -v '^ *+' conftest.er1 >conftest.err
7572   rm -f conftest.er1
7573   cat conftest.err >&5
7574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7575   (exit $ac_status); } && {
7576          test -z "$ac_c_werror_flag" ||
7577          test ! -s conftest.err
7578        } && test -s conftest$ac_exeext &&
7579        $as_test_x conftest$ac_exeext; then
7580   ac_cv_lib_ssl_SSL_library_init=yes
7581 else
7582   echo "$as_me: failed program was:" >&5
7583 sed 's/^/| /' conftest.$ac_ext >&5
7584
7585         ac_cv_lib_ssl_SSL_library_init=no
7586 fi
7587
7588 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7589       conftest$ac_exeext conftest.$ac_ext
7590 LIBS=$ac_check_lib_save_LIBS
7591 fi
7592 { echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
7593 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6; }
7594 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
7595   cat >>confdefs.h <<_ACEOF
7596 #define HAVE_LIBSSL 1
7597 _ACEOF
7598
7599   LIBS="-lssl $LIBS"
7600
7601 else
7602   { { echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
7603 echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
7604    { (exit 1); exit 1; }; }
7605 fi
7606
7607   else
7608
7609 { echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -leay32" >&5
7610 echo $ECHO_N "checking for CRYPTO_new_ex_data in -leay32... $ECHO_C" >&6; }
7611 if test "${ac_cv_lib_eay32_CRYPTO_new_ex_data+set}" = set; then
7612   echo $ECHO_N "(cached) $ECHO_C" >&6
7613 else
7614   ac_check_lib_save_LIBS=$LIBS
7615 LIBS="-leay32  $LIBS"
7616 cat >conftest.$ac_ext <<_ACEOF
7617 /* confdefs.h.  */
7618 _ACEOF
7619 cat confdefs.h >>conftest.$ac_ext
7620 cat >>conftest.$ac_ext <<_ACEOF
7621 /* end confdefs.h.  */
7622
7623 /* Override any GCC internal prototype to avoid an error.
7624    Use char because int might match the return type of a GCC
7625    builtin and then its argument prototype would still apply.  */
7626 #ifdef __cplusplus
7627 extern "C"
7628 #endif
7629 char CRYPTO_new_ex_data ();
7630 int
7631 main ()
7632 {
7633 return CRYPTO_new_ex_data ();
7634   ;
7635   return 0;
7636 }
7637 _ACEOF
7638 rm -f conftest.$ac_objext conftest$ac_exeext
7639 if { (ac_try="$ac_link"
7640 case "(($ac_try" in
7641   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7642   *) ac_try_echo=$ac_try;;
7643 esac
7644 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7645   (eval "$ac_link") 2>conftest.er1
7646   ac_status=$?
7647   grep -v '^ *+' conftest.er1 >conftest.err
7648   rm -f conftest.er1
7649   cat conftest.err >&5
7650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7651   (exit $ac_status); } && {
7652          test -z "$ac_c_werror_flag" ||
7653          test ! -s conftest.err
7654        } && test -s conftest$ac_exeext &&
7655        $as_test_x conftest$ac_exeext; then
7656   ac_cv_lib_eay32_CRYPTO_new_ex_data=yes
7657 else
7658   echo "$as_me: failed program was:" >&5
7659 sed 's/^/| /' conftest.$ac_ext >&5
7660
7661         ac_cv_lib_eay32_CRYPTO_new_ex_data=no
7662 fi
7663
7664 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7665       conftest$ac_exeext conftest.$ac_ext
7666 LIBS=$ac_check_lib_save_LIBS
7667 fi
7668 { echo "$as_me:$LINENO: result: $ac_cv_lib_eay32_CRYPTO_new_ex_data" >&5
7669 echo "${ECHO_T}$ac_cv_lib_eay32_CRYPTO_new_ex_data" >&6; }
7670 if test $ac_cv_lib_eay32_CRYPTO_new_ex_data = yes; then
7671   cat >>confdefs.h <<_ACEOF
7672 #define HAVE_LIBEAY32 1
7673 _ACEOF
7674
7675   LIBS="-leay32 $LIBS"
7676
7677 else
7678   { { echo "$as_me:$LINENO: error: library 'eay32' is required for OpenSSL" >&5
7679 echo "$as_me: error: library 'eay32' is required for OpenSSL" >&2;}
7680    { (exit 1); exit 1; }; }
7681 fi
7682
7683
7684 { echo "$as_me:$LINENO: checking for SSL_library_init in -lssleay32" >&5
7685 echo $ECHO_N "checking for SSL_library_init in -lssleay32... $ECHO_C" >&6; }
7686 if test "${ac_cv_lib_ssleay32_SSL_library_init+set}" = set; then
7687   echo $ECHO_N "(cached) $ECHO_C" >&6
7688 else
7689   ac_check_lib_save_LIBS=$LIBS
7690 LIBS="-lssleay32  $LIBS"
7691 cat >conftest.$ac_ext <<_ACEOF
7692 /* confdefs.h.  */
7693 _ACEOF
7694 cat confdefs.h >>conftest.$ac_ext
7695 cat >>conftest.$ac_ext <<_ACEOF
7696 /* end confdefs.h.  */
7697
7698 /* Override any GCC internal prototype to avoid an error.
7699    Use char because int might match the return type of a GCC
7700    builtin and then its argument prototype would still apply.  */
7701 #ifdef __cplusplus
7702 extern "C"
7703 #endif
7704 char SSL_library_init ();
7705 int
7706 main ()
7707 {
7708 return SSL_library_init ();
7709   ;
7710   return 0;
7711 }
7712 _ACEOF
7713 rm -f conftest.$ac_objext conftest$ac_exeext
7714 if { (ac_try="$ac_link"
7715 case "(($ac_try" in
7716   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7717   *) ac_try_echo=$ac_try;;
7718 esac
7719 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7720   (eval "$ac_link") 2>conftest.er1
7721   ac_status=$?
7722   grep -v '^ *+' conftest.er1 >conftest.err
7723   rm -f conftest.er1
7724   cat conftest.err >&5
7725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7726   (exit $ac_status); } && {
7727          test -z "$ac_c_werror_flag" ||
7728          test ! -s conftest.err
7729        } && test -s conftest$ac_exeext &&
7730        $as_test_x conftest$ac_exeext; then
7731   ac_cv_lib_ssleay32_SSL_library_init=yes
7732 else
7733   echo "$as_me: failed program was:" >&5
7734 sed 's/^/| /' conftest.$ac_ext >&5
7735
7736         ac_cv_lib_ssleay32_SSL_library_init=no
7737 fi
7738
7739 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7740       conftest$ac_exeext conftest.$ac_ext
7741 LIBS=$ac_check_lib_save_LIBS
7742 fi
7743 { echo "$as_me:$LINENO: result: $ac_cv_lib_ssleay32_SSL_library_init" >&5
7744 echo "${ECHO_T}$ac_cv_lib_ssleay32_SSL_library_init" >&6; }
7745 if test $ac_cv_lib_ssleay32_SSL_library_init = yes; then
7746   cat >>confdefs.h <<_ACEOF
7747 #define HAVE_LIBSSLEAY32 1
7748 _ACEOF
7749
7750   LIBS="-lssleay32 $LIBS"
7751
7752 else
7753   { { echo "$as_me:$LINENO: error: library 'ssleay32' is required for OpenSSL" >&5
7754 echo "$as_me: error: library 'ssleay32' is required for OpenSSL" >&2;}
7755    { (exit 1); exit 1; }; }
7756 fi
7757
7758   fi
7759 fi
7760
7761 if test "$with_pam" = yes ; then
7762
7763 { echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
7764 echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6; }
7765 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
7766   echo $ECHO_N "(cached) $ECHO_C" >&6
7767 else
7768   ac_check_lib_save_LIBS=$LIBS
7769 LIBS="-lpam  $LIBS"
7770 cat >conftest.$ac_ext <<_ACEOF
7771 /* confdefs.h.  */
7772 _ACEOF
7773 cat confdefs.h >>conftest.$ac_ext
7774 cat >>conftest.$ac_ext <<_ACEOF
7775 /* end confdefs.h.  */
7776
7777 /* Override any GCC internal prototype to avoid an error.
7778    Use char because int might match the return type of a GCC
7779    builtin and then its argument prototype would still apply.  */
7780 #ifdef __cplusplus
7781 extern "C"
7782 #endif
7783 char pam_start ();
7784 int
7785 main ()
7786 {
7787 return pam_start ();
7788   ;
7789   return 0;
7790 }
7791 _ACEOF
7792 rm -f conftest.$ac_objext conftest$ac_exeext
7793 if { (ac_try="$ac_link"
7794 case "(($ac_try" in
7795   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7796   *) ac_try_echo=$ac_try;;
7797 esac
7798 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7799   (eval "$ac_link") 2>conftest.er1
7800   ac_status=$?
7801   grep -v '^ *+' conftest.er1 >conftest.err
7802   rm -f conftest.er1
7803   cat conftest.err >&5
7804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7805   (exit $ac_status); } && {
7806          test -z "$ac_c_werror_flag" ||
7807          test ! -s conftest.err
7808        } && test -s conftest$ac_exeext &&
7809        $as_test_x conftest$ac_exeext; then
7810   ac_cv_lib_pam_pam_start=yes
7811 else
7812   echo "$as_me: failed program was:" >&5
7813 sed 's/^/| /' conftest.$ac_ext >&5
7814
7815         ac_cv_lib_pam_pam_start=no
7816 fi
7817
7818 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7819       conftest$ac_exeext conftest.$ac_ext
7820 LIBS=$ac_check_lib_save_LIBS
7821 fi
7822 { echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
7823 echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6; }
7824 if test $ac_cv_lib_pam_pam_start = yes; then
7825   cat >>confdefs.h <<_ACEOF
7826 #define HAVE_LIBPAM 1
7827 _ACEOF
7828
7829   LIBS="-lpam $LIBS"
7830
7831 else
7832   { { echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
7833 echo "$as_me: error: library 'pam' is required for PAM" >&2;}
7834    { (exit 1); exit 1; }; }
7835 fi
7836
7837 fi
7838
7839 if test "$with_libxml" = yes ; then
7840
7841 { echo "$as_me:$LINENO: checking for xmlSaveToBuffer in -lxml2" >&5
7842 echo $ECHO_N "checking for xmlSaveToBuffer in -lxml2... $ECHO_C" >&6; }
7843 if test "${ac_cv_lib_xml2_xmlSaveToBuffer+set}" = set; then
7844   echo $ECHO_N "(cached) $ECHO_C" >&6
7845 else
7846   ac_check_lib_save_LIBS=$LIBS
7847 LIBS="-lxml2  $LIBS"
7848 cat >conftest.$ac_ext <<_ACEOF
7849 /* confdefs.h.  */
7850 _ACEOF
7851 cat confdefs.h >>conftest.$ac_ext
7852 cat >>conftest.$ac_ext <<_ACEOF
7853 /* end confdefs.h.  */
7854
7855 /* Override any GCC internal prototype to avoid an error.
7856    Use char because int might match the return type of a GCC
7857    builtin and then its argument prototype would still apply.  */
7858 #ifdef __cplusplus
7859 extern "C"
7860 #endif
7861 char xmlSaveToBuffer ();
7862 int
7863 main ()
7864 {
7865 return xmlSaveToBuffer ();
7866   ;
7867   return 0;
7868 }
7869 _ACEOF
7870 rm -f conftest.$ac_objext conftest$ac_exeext
7871 if { (ac_try="$ac_link"
7872 case "(($ac_try" in
7873   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7874   *) ac_try_echo=$ac_try;;
7875 esac
7876 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7877   (eval "$ac_link") 2>conftest.er1
7878   ac_status=$?
7879   grep -v '^ *+' conftest.er1 >conftest.err
7880   rm -f conftest.er1
7881   cat conftest.err >&5
7882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7883   (exit $ac_status); } && {
7884          test -z "$ac_c_werror_flag" ||
7885          test ! -s conftest.err
7886        } && test -s conftest$ac_exeext &&
7887        $as_test_x conftest$ac_exeext; then
7888   ac_cv_lib_xml2_xmlSaveToBuffer=yes
7889 else
7890   echo "$as_me: failed program was:" >&5
7891 sed 's/^/| /' conftest.$ac_ext >&5
7892
7893         ac_cv_lib_xml2_xmlSaveToBuffer=no
7894 fi
7895
7896 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7897       conftest$ac_exeext conftest.$ac_ext
7898 LIBS=$ac_check_lib_save_LIBS
7899 fi
7900 { echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
7901 echo "${ECHO_T}$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
7902 if test $ac_cv_lib_xml2_xmlSaveToBuffer = yes; then
7903   cat >>confdefs.h <<_ACEOF
7904 #define HAVE_LIBXML2 1
7905 _ACEOF
7906
7907   LIBS="-lxml2 $LIBS"
7908
7909 else
7910   { { echo "$as_me:$LINENO: error: library 'xml2' (version >= 2.6.23) is required for XML support" >&5
7911 echo "$as_me: error: library 'xml2' (version >= 2.6.23) is required for XML support" >&2;}
7912    { (exit 1); exit 1; }; }
7913 fi
7914
7915 fi
7916
7917 if test "$with_libxslt" = yes ; then
7918
7919 { echo "$as_me:$LINENO: checking for xsltLibxmlVersion in -lxslt" >&5
7920 echo $ECHO_N "checking for xsltLibxmlVersion in -lxslt... $ECHO_C" >&6; }
7921 if test "${ac_cv_lib_xslt_xsltLibxmlVersion+set}" = set; then
7922   echo $ECHO_N "(cached) $ECHO_C" >&6
7923 else
7924   ac_check_lib_save_LIBS=$LIBS
7925 LIBS="-lxslt  $LIBS"
7926 cat >conftest.$ac_ext <<_ACEOF
7927 /* confdefs.h.  */
7928 _ACEOF
7929 cat confdefs.h >>conftest.$ac_ext
7930 cat >>conftest.$ac_ext <<_ACEOF
7931 /* end confdefs.h.  */
7932
7933 /* Override any GCC internal prototype to avoid an error.
7934    Use char because int might match the return type of a GCC
7935    builtin and then its argument prototype would still apply.  */
7936 #ifdef __cplusplus
7937 extern "C"
7938 #endif
7939 char xsltLibxmlVersion ();
7940 int
7941 main ()
7942 {
7943 return xsltLibxmlVersion ();
7944   ;
7945   return 0;
7946 }
7947 _ACEOF
7948 rm -f conftest.$ac_objext conftest$ac_exeext
7949 if { (ac_try="$ac_link"
7950 case "(($ac_try" in
7951   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7952   *) ac_try_echo=$ac_try;;
7953 esac
7954 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7955   (eval "$ac_link") 2>conftest.er1
7956   ac_status=$?
7957   grep -v '^ *+' conftest.er1 >conftest.err
7958   rm -f conftest.er1
7959   cat conftest.err >&5
7960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7961   (exit $ac_status); } && {
7962          test -z "$ac_c_werror_flag" ||
7963          test ! -s conftest.err
7964        } && test -s conftest$ac_exeext &&
7965        $as_test_x conftest$ac_exeext; then
7966   ac_cv_lib_xslt_xsltLibxmlVersion=yes
7967 else
7968   echo "$as_me: failed program was:" >&5
7969 sed 's/^/| /' conftest.$ac_ext >&5
7970
7971         ac_cv_lib_xslt_xsltLibxmlVersion=no
7972 fi
7973
7974 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7975       conftest$ac_exeext conftest.$ac_ext
7976 LIBS=$ac_check_lib_save_LIBS
7977 fi
7978 { echo "$as_me:$LINENO: result: $ac_cv_lib_xslt_xsltLibxmlVersion" >&5
7979 echo "${ECHO_T}$ac_cv_lib_xslt_xsltLibxmlVersion" >&6; }
7980 if test $ac_cv_lib_xslt_xsltLibxmlVersion = yes; then
7981   cat >>confdefs.h <<_ACEOF
7982 #define HAVE_LIBXSLT 1
7983 _ACEOF
7984
7985   LIBS="-lxslt $LIBS"
7986
7987 else
7988   { { echo "$as_me:$LINENO: error: library 'xslt' is required for XSLT support" >&5
7989 echo "$as_me: error: library 'xslt' is required for XSLT support" >&2;}
7990    { (exit 1); exit 1; }; }
7991 fi
7992
7993 fi
7994
7995 # for contrib/uuid-ossp
7996 if test "$with_ossp_uuid" = yes ; then
7997   { echo "$as_me:$LINENO: checking for uuid_export in -lossp-uuid" >&5
7998 echo $ECHO_N "checking for uuid_export in -lossp-uuid... $ECHO_C" >&6; }
7999 if test "${ac_cv_lib_ossp_uuid_uuid_export+set}" = set; then
8000   echo $ECHO_N "(cached) $ECHO_C" >&6
8001 else
8002   ac_check_lib_save_LIBS=$LIBS
8003 LIBS="-lossp-uuid  $LIBS"
8004 cat >conftest.$ac_ext <<_ACEOF
8005 /* confdefs.h.  */
8006 _ACEOF
8007 cat confdefs.h >>conftest.$ac_ext
8008 cat >>conftest.$ac_ext <<_ACEOF
8009 /* end confdefs.h.  */
8010
8011 /* Override any GCC internal prototype to avoid an error.
8012    Use char because int might match the return type of a GCC
8013    builtin and then its argument prototype would still apply.  */
8014 #ifdef __cplusplus
8015 extern "C"
8016 #endif
8017 char uuid_export ();
8018 int
8019 main ()
8020 {
8021 return uuid_export ();
8022   ;
8023   return 0;
8024 }
8025 _ACEOF
8026 rm -f conftest.$ac_objext conftest$ac_exeext
8027 if { (ac_try="$ac_link"
8028 case "(($ac_try" in
8029   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8030   *) ac_try_echo=$ac_try;;
8031 esac
8032 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8033   (eval "$ac_link") 2>conftest.er1
8034   ac_status=$?
8035   grep -v '^ *+' conftest.er1 >conftest.err
8036   rm -f conftest.er1
8037   cat conftest.err >&5
8038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8039   (exit $ac_status); } && {
8040          test -z "$ac_c_werror_flag" ||
8041          test ! -s conftest.err
8042        } && test -s conftest$ac_exeext &&
8043        $as_test_x conftest$ac_exeext; then
8044   ac_cv_lib_ossp_uuid_uuid_export=yes
8045 else
8046   echo "$as_me: failed program was:" >&5
8047 sed 's/^/| /' conftest.$ac_ext >&5
8048
8049         ac_cv_lib_ossp_uuid_uuid_export=no
8050 fi
8051
8052 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8053       conftest$ac_exeext conftest.$ac_ext
8054 LIBS=$ac_check_lib_save_LIBS
8055 fi
8056 { echo "$as_me:$LINENO: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
8057 echo "${ECHO_T}$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
8058 if test $ac_cv_lib_ossp_uuid_uuid_export = yes; then
8059   OSSP_UUID_LIBS="-lossp-uuid"
8060 else
8061   { echo "$as_me:$LINENO: checking for uuid_export in -luuid" >&5
8062 echo $ECHO_N "checking for uuid_export in -luuid... $ECHO_C" >&6; }
8063 if test "${ac_cv_lib_uuid_uuid_export+set}" = set; then
8064   echo $ECHO_N "(cached) $ECHO_C" >&6
8065 else
8066   ac_check_lib_save_LIBS=$LIBS
8067 LIBS="-luuid  $LIBS"
8068 cat >conftest.$ac_ext <<_ACEOF
8069 /* confdefs.h.  */
8070 _ACEOF
8071 cat confdefs.h >>conftest.$ac_ext
8072 cat >>conftest.$ac_ext <<_ACEOF
8073 /* end confdefs.h.  */
8074
8075 /* Override any GCC internal prototype to avoid an error.
8076    Use char because int might match the return type of a GCC
8077    builtin and then its argument prototype would still apply.  */
8078 #ifdef __cplusplus
8079 extern "C"
8080 #endif
8081 char uuid_export ();
8082 int
8083 main ()
8084 {
8085 return uuid_export ();
8086   ;
8087   return 0;
8088 }
8089 _ACEOF
8090 rm -f conftest.$ac_objext conftest$ac_exeext
8091 if { (ac_try="$ac_link"
8092 case "(($ac_try" in
8093   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8094   *) ac_try_echo=$ac_try;;
8095 esac
8096 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8097   (eval "$ac_link") 2>conftest.er1
8098   ac_status=$?
8099   grep -v '^ *+' conftest.er1 >conftest.err
8100   rm -f conftest.er1
8101   cat conftest.err >&5
8102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8103   (exit $ac_status); } && {
8104          test -z "$ac_c_werror_flag" ||
8105          test ! -s conftest.err
8106        } && test -s conftest$ac_exeext &&
8107        $as_test_x conftest$ac_exeext; then
8108   ac_cv_lib_uuid_uuid_export=yes
8109 else
8110   echo "$as_me: failed program was:" >&5
8111 sed 's/^/| /' conftest.$ac_ext >&5
8112
8113         ac_cv_lib_uuid_uuid_export=no
8114 fi
8115
8116 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8117       conftest$ac_exeext conftest.$ac_ext
8118 LIBS=$ac_check_lib_save_LIBS
8119 fi
8120 { echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_export" >&5
8121 echo "${ECHO_T}$ac_cv_lib_uuid_uuid_export" >&6; }
8122 if test $ac_cv_lib_uuid_uuid_export = yes; then
8123   OSSP_UUID_LIBS="-luuid"
8124 else
8125   { { echo "$as_me:$LINENO: error: library 'ossp-uuid' or 'uuid' is required for OSSP-UUID" >&5
8126 echo "$as_me: error: library 'ossp-uuid' or 'uuid' is required for OSSP-UUID" >&2;}
8127    { (exit 1); exit 1; }; }
8128 fi
8129
8130 fi
8131
8132 fi
8133
8134
8135
8136 ##
8137 ## Header files
8138 ##
8139
8140 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
8141 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
8142 if test "${ac_cv_header_stdc+set}" = set; then
8143   echo $ECHO_N "(cached) $ECHO_C" >&6
8144 else
8145   cat >conftest.$ac_ext <<_ACEOF
8146 /* confdefs.h.  */
8147 _ACEOF
8148 cat confdefs.h >>conftest.$ac_ext
8149 cat >>conftest.$ac_ext <<_ACEOF
8150 /* end confdefs.h.  */
8151 #include <stdlib.h>
8152 #include <stdarg.h>
8153 #include <string.h>
8154 #include <float.h>
8155
8156 int
8157 main ()
8158 {
8159
8160   ;
8161   return 0;
8162 }
8163 _ACEOF
8164 rm -f conftest.$ac_objext
8165 if { (ac_try="$ac_compile"
8166 case "(($ac_try" in
8167   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8168   *) ac_try_echo=$ac_try;;
8169 esac
8170 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8171   (eval "$ac_compile") 2>conftest.er1
8172   ac_status=$?
8173   grep -v '^ *+' conftest.er1 >conftest.err
8174   rm -f conftest.er1
8175   cat conftest.err >&5
8176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8177   (exit $ac_status); } && {
8178          test -z "$ac_c_werror_flag" ||
8179          test ! -s conftest.err
8180        } && test -s conftest.$ac_objext; then
8181   ac_cv_header_stdc=yes
8182 else
8183   echo "$as_me: failed program was:" >&5
8184 sed 's/^/| /' conftest.$ac_ext >&5
8185
8186         ac_cv_header_stdc=no
8187 fi
8188
8189 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8190
8191 if test $ac_cv_header_stdc = yes; then
8192   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8193   cat >conftest.$ac_ext <<_ACEOF
8194 /* confdefs.h.  */
8195 _ACEOF
8196 cat confdefs.h >>conftest.$ac_ext
8197 cat >>conftest.$ac_ext <<_ACEOF
8198 /* end confdefs.h.  */
8199 #include <string.h>
8200
8201 _ACEOF
8202 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8203   $EGREP "memchr" >/dev/null 2>&1; then
8204   :
8205 else
8206   ac_cv_header_stdc=no
8207 fi
8208 rm -f conftest*
8209
8210 fi
8211
8212 if test $ac_cv_header_stdc = yes; then
8213   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8214   cat >conftest.$ac_ext <<_ACEOF
8215 /* confdefs.h.  */
8216 _ACEOF
8217 cat confdefs.h >>conftest.$ac_ext
8218 cat >>conftest.$ac_ext <<_ACEOF
8219 /* end confdefs.h.  */
8220 #include <stdlib.h>
8221
8222 _ACEOF
8223 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8224   $EGREP "free" >/dev/null 2>&1; then
8225   :
8226 else
8227   ac_cv_header_stdc=no
8228 fi
8229 rm -f conftest*
8230
8231 fi
8232
8233 if test $ac_cv_header_stdc = yes; then
8234   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8235   if test "$cross_compiling" = yes; then
8236   :
8237 else
8238   cat >conftest.$ac_ext <<_ACEOF
8239 /* confdefs.h.  */
8240 _ACEOF
8241 cat confdefs.h >>conftest.$ac_ext
8242 cat >>conftest.$ac_ext <<_ACEOF
8243 /* end confdefs.h.  */
8244 #include <ctype.h>
8245 #include <stdlib.h>
8246 #if ((' ' & 0x0FF) == 0x020)
8247 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8248 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8249 #else
8250 # define ISLOWER(c) \
8251                    (('a' <= (c) && (c) <= 'i') \
8252                      || ('j' <= (c) && (c) <= 'r') \
8253                      || ('s' <= (c) && (c) <= 'z'))
8254 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8255 #endif
8256
8257 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8258 int
8259 main ()
8260 {
8261   int i;
8262   for (i = 0; i < 256; i++)
8263     if (XOR (islower (i), ISLOWER (i))
8264         || toupper (i) != TOUPPER (i))
8265       return 2;
8266   return 0;
8267 }
8268 _ACEOF
8269 rm -f conftest$ac_exeext
8270 if { (ac_try="$ac_link"
8271 case "(($ac_try" in
8272   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8273   *) ac_try_echo=$ac_try;;
8274 esac
8275 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8276   (eval "$ac_link") 2>&5
8277   ac_status=$?
8278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8279   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8280   { (case "(($ac_try" in
8281   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8282   *) ac_try_echo=$ac_try;;
8283 esac
8284 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8285   (eval "$ac_try") 2>&5
8286   ac_status=$?
8287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8288   (exit $ac_status); }; }; then
8289   :
8290 else
8291   echo "$as_me: program exited with status $ac_status" >&5
8292 echo "$as_me: failed program was:" >&5
8293 sed 's/^/| /' conftest.$ac_ext >&5
8294
8295 ( exit $ac_status )
8296 ac_cv_header_stdc=no
8297 fi
8298 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8299 fi
8300
8301
8302 fi
8303 fi
8304 { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
8305 echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
8306 if test $ac_cv_header_stdc = yes; then
8307
8308 cat >>confdefs.h <<\_ACEOF
8309 #define STDC_HEADERS 1
8310 _ACEOF
8311
8312 fi
8313
8314 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8325                   inttypes.h stdint.h unistd.h
8326 do
8327 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8328 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8329 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8330 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8331   echo $ECHO_N "(cached) $ECHO_C" >&6
8332 else
8333   cat >conftest.$ac_ext <<_ACEOF
8334 /* confdefs.h.  */
8335 _ACEOF
8336 cat confdefs.h >>conftest.$ac_ext
8337 cat >>conftest.$ac_ext <<_ACEOF
8338 /* end confdefs.h.  */
8339 $ac_includes_default
8340
8341 #include <$ac_header>
8342 _ACEOF
8343 rm -f conftest.$ac_objext
8344 if { (ac_try="$ac_compile"
8345 case "(($ac_try" in
8346   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8347   *) ac_try_echo=$ac_try;;
8348 esac
8349 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8350   (eval "$ac_compile") 2>conftest.er1
8351   ac_status=$?
8352   grep -v '^ *+' conftest.er1 >conftest.err
8353   rm -f conftest.er1
8354   cat conftest.err >&5
8355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8356   (exit $ac_status); } && {
8357          test -z "$ac_c_werror_flag" ||
8358          test ! -s conftest.err
8359        } && test -s conftest.$ac_objext; then
8360   eval "$as_ac_Header=yes"
8361 else
8362   echo "$as_me: failed program was:" >&5
8363 sed 's/^/| /' conftest.$ac_ext >&5
8364
8365         eval "$as_ac_Header=no"
8366 fi
8367
8368 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8369 fi
8370 ac_res=`eval echo '${'$as_ac_Header'}'`
8371                { echo "$as_me:$LINENO: result: $ac_res" >&5
8372 echo "${ECHO_T}$ac_res" >&6; }
8373 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8374   cat >>confdefs.h <<_ACEOF
8375 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8376 _ACEOF
8377
8378 fi
8379
8380 done
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409 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
8410 do
8411 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8412 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8413   { echo "$as_me:$LINENO: checking for $ac_header" >&5
8414 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8415 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8416   echo $ECHO_N "(cached) $ECHO_C" >&6
8417 fi
8418 ac_res=`eval echo '${'$as_ac_Header'}'`
8419                { echo "$as_me:$LINENO: result: $ac_res" >&5
8420 echo "${ECHO_T}$ac_res" >&6; }
8421 else
8422   # Is the header compilable?
8423 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
8424 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8425 cat >conftest.$ac_ext <<_ACEOF
8426 /* confdefs.h.  */
8427 _ACEOF
8428 cat confdefs.h >>conftest.$ac_ext
8429 cat >>conftest.$ac_ext <<_ACEOF
8430 /* end confdefs.h.  */
8431 $ac_includes_default
8432 #include <$ac_header>
8433 _ACEOF
8434 rm -f conftest.$ac_objext
8435 if { (ac_try="$ac_compile"
8436 case "(($ac_try" in
8437   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8438   *) ac_try_echo=$ac_try;;
8439 esac
8440 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8441   (eval "$ac_compile") 2>conftest.er1
8442   ac_status=$?
8443   grep -v '^ *+' conftest.er1 >conftest.err
8444   rm -f conftest.er1
8445   cat conftest.err >&5
8446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8447   (exit $ac_status); } && {
8448          test -z "$ac_c_werror_flag" ||
8449          test ! -s conftest.err
8450        } && test -s conftest.$ac_objext; then
8451   ac_header_compiler=yes
8452 else
8453   echo "$as_me: failed program was:" >&5
8454 sed 's/^/| /' conftest.$ac_ext >&5
8455
8456         ac_header_compiler=no
8457 fi
8458
8459 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8460 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8461 echo "${ECHO_T}$ac_header_compiler" >&6; }
8462
8463 # Is the header present?
8464 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
8465 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8466 cat >conftest.$ac_ext <<_ACEOF
8467 /* confdefs.h.  */
8468 _ACEOF
8469 cat confdefs.h >>conftest.$ac_ext
8470 cat >>conftest.$ac_ext <<_ACEOF
8471 /* end confdefs.h.  */
8472 #include <$ac_header>
8473 _ACEOF
8474 if { (ac_try="$ac_cpp conftest.$ac_ext"
8475 case "(($ac_try" in
8476   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8477   *) ac_try_echo=$ac_try;;
8478 esac
8479 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8480   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8481   ac_status=$?
8482   grep -v '^ *+' conftest.er1 >conftest.err
8483   rm -f conftest.er1
8484   cat conftest.err >&5
8485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8486   (exit $ac_status); } >/dev/null && {
8487          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8488          test ! -s conftest.err
8489        }; then
8490   ac_header_preproc=yes
8491 else
8492   echo "$as_me: failed program was:" >&5
8493 sed 's/^/| /' conftest.$ac_ext >&5
8494
8495   ac_header_preproc=no
8496 fi
8497
8498 rm -f conftest.err conftest.$ac_ext
8499 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8500 echo "${ECHO_T}$ac_header_preproc" >&6; }
8501
8502 # So?  What about this header?
8503 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8504   yes:no: )
8505     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8506 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8507     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8508 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8509     ac_header_preproc=yes
8510     ;;
8511   no:yes:* )
8512     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8513 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8514     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8515 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8516     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8517 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8518     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8519 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8520     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8521 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8522     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8523 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8524     ( cat <<\_ASBOX
8525 ## ---------------------------------------- ##
8526 ## Report this to pgsql-bugs@postgresql.org ##
8527 ## ---------------------------------------- ##
8528 _ASBOX
8529      ) | sed "s/^/$as_me: WARNING:     /" >&2
8530     ;;
8531 esac
8532 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8533 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8534 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8535   echo $ECHO_N "(cached) $ECHO_C" >&6
8536 else
8537   eval "$as_ac_Header=\$ac_header_preproc"
8538 fi
8539 ac_res=`eval echo '${'$as_ac_Header'}'`
8540                { echo "$as_me:$LINENO: result: $ac_res" >&5
8541 echo "${ECHO_T}$ac_res" >&6; }
8542
8543 fi
8544 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8545   cat >>confdefs.h <<_ACEOF
8546 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8547 _ACEOF
8548
8549 fi
8550
8551 done
8552
8553
8554 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
8555 # netinet/in.h is included first.
8556
8557 for ac_header in netinet/in.h
8558 do
8559 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8560 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8561   { echo "$as_me:$LINENO: checking for $ac_header" >&5
8562 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8563 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8564   echo $ECHO_N "(cached) $ECHO_C" >&6
8565 fi
8566 ac_res=`eval echo '${'$as_ac_Header'}'`
8567                { echo "$as_me:$LINENO: result: $ac_res" >&5
8568 echo "${ECHO_T}$ac_res" >&6; }
8569 else
8570   # Is the header compilable?
8571 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
8572 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8573 cat >conftest.$ac_ext <<_ACEOF
8574 /* confdefs.h.  */
8575 _ACEOF
8576 cat confdefs.h >>conftest.$ac_ext
8577 cat >>conftest.$ac_ext <<_ACEOF
8578 /* end confdefs.h.  */
8579 $ac_includes_default
8580 #include <$ac_header>
8581 _ACEOF
8582 rm -f conftest.$ac_objext
8583 if { (ac_try="$ac_compile"
8584 case "(($ac_try" in
8585   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8586   *) ac_try_echo=$ac_try;;
8587 esac
8588 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8589   (eval "$ac_compile") 2>conftest.er1
8590   ac_status=$?
8591   grep -v '^ *+' conftest.er1 >conftest.err
8592   rm -f conftest.er1
8593   cat conftest.err >&5
8594   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8595   (exit $ac_status); } && {
8596          test -z "$ac_c_werror_flag" ||
8597          test ! -s conftest.err
8598        } && test -s conftest.$ac_objext; then
8599   ac_header_compiler=yes
8600 else
8601   echo "$as_me: failed program was:" >&5
8602 sed 's/^/| /' conftest.$ac_ext >&5
8603
8604         ac_header_compiler=no
8605 fi
8606
8607 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8608 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8609 echo "${ECHO_T}$ac_header_compiler" >&6; }
8610
8611 # Is the header present?
8612 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
8613 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8614 cat >conftest.$ac_ext <<_ACEOF
8615 /* confdefs.h.  */
8616 _ACEOF
8617 cat confdefs.h >>conftest.$ac_ext
8618 cat >>conftest.$ac_ext <<_ACEOF
8619 /* end confdefs.h.  */
8620 #include <$ac_header>
8621 _ACEOF
8622 if { (ac_try="$ac_cpp conftest.$ac_ext"
8623 case "(($ac_try" in
8624   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8625   *) ac_try_echo=$ac_try;;
8626 esac
8627 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8628   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8629   ac_status=$?
8630   grep -v '^ *+' conftest.er1 >conftest.err
8631   rm -f conftest.er1
8632   cat conftest.err >&5
8633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8634   (exit $ac_status); } >/dev/null && {
8635          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8636          test ! -s conftest.err
8637        }; then
8638   ac_header_preproc=yes
8639 else
8640   echo "$as_me: failed program was:" >&5
8641 sed 's/^/| /' conftest.$ac_ext >&5
8642
8643   ac_header_preproc=no
8644 fi
8645
8646 rm -f conftest.err conftest.$ac_ext
8647 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8648 echo "${ECHO_T}$ac_header_preproc" >&6; }
8649
8650 # So?  What about this header?
8651 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8652   yes:no: )
8653     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8654 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8655     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8656 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8657     ac_header_preproc=yes
8658     ;;
8659   no:yes:* )
8660     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8661 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8662     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8663 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8664     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8665 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8666     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8667 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8668     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8669 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8670     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8671 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8672     ( cat <<\_ASBOX
8673 ## ---------------------------------------- ##
8674 ## Report this to pgsql-bugs@postgresql.org ##
8675 ## ---------------------------------------- ##
8676 _ASBOX
8677      ) | sed "s/^/$as_me: WARNING:     /" >&2
8678     ;;
8679 esac
8680 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8681 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8682 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8683   echo $ECHO_N "(cached) $ECHO_C" >&6
8684 else
8685   eval "$as_ac_Header=\$ac_header_preproc"
8686 fi
8687 ac_res=`eval echo '${'$as_ac_Header'}'`
8688                { echo "$as_me:$LINENO: result: $ac_res" >&5
8689 echo "${ECHO_T}$ac_res" >&6; }
8690
8691 fi
8692 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8693   cat >>confdefs.h <<_ACEOF
8694 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8695 _ACEOF
8696
8697 fi
8698
8699 done
8700
8701
8702 for ac_header in netinet/tcp.h
8703 do
8704 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8705 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8706 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8707 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8708   echo $ECHO_N "(cached) $ECHO_C" >&6
8709 else
8710   cat >conftest.$ac_ext <<_ACEOF
8711 /* confdefs.h.  */
8712 _ACEOF
8713 cat confdefs.h >>conftest.$ac_ext
8714 cat >>conftest.$ac_ext <<_ACEOF
8715 /* end confdefs.h.  */
8716 $ac_includes_default
8717 #ifdef HAVE_NETINET_IN_H
8718 #include <netinet/in.h>
8719 #endif
8720
8721
8722 #include <$ac_header>
8723 _ACEOF
8724 rm -f conftest.$ac_objext
8725 if { (ac_try="$ac_compile"
8726 case "(($ac_try" in
8727   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8728   *) ac_try_echo=$ac_try;;
8729 esac
8730 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8731   (eval "$ac_compile") 2>conftest.er1
8732   ac_status=$?
8733   grep -v '^ *+' conftest.er1 >conftest.err
8734   rm -f conftest.er1
8735   cat conftest.err >&5
8736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8737   (exit $ac_status); } && {
8738          test -z "$ac_c_werror_flag" ||
8739          test ! -s conftest.err
8740        } && test -s conftest.$ac_objext; then
8741   eval "$as_ac_Header=yes"
8742 else
8743   echo "$as_me: failed program was:" >&5
8744 sed 's/^/| /' conftest.$ac_ext >&5
8745
8746         eval "$as_ac_Header=no"
8747 fi
8748
8749 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8750 fi
8751 ac_res=`eval echo '${'$as_ac_Header'}'`
8752                { echo "$as_me:$LINENO: result: $ac_res" >&5
8753 echo "${ECHO_T}$ac_res" >&6; }
8754 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8755   cat >>confdefs.h <<_ACEOF
8756 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8757 _ACEOF
8758
8759 fi
8760
8761 done
8762
8763
8764 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
8765
8766 for ac_header in readline/readline.h
8767 do
8768 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8769 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8770   { echo "$as_me:$LINENO: checking for $ac_header" >&5
8771 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8772 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8773   echo $ECHO_N "(cached) $ECHO_C" >&6
8774 fi
8775 ac_res=`eval echo '${'$as_ac_Header'}'`
8776                { echo "$as_me:$LINENO: result: $ac_res" >&5
8777 echo "${ECHO_T}$ac_res" >&6; }
8778 else
8779   # Is the header compilable?
8780 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
8781 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8782 cat >conftest.$ac_ext <<_ACEOF
8783 /* confdefs.h.  */
8784 _ACEOF
8785 cat confdefs.h >>conftest.$ac_ext
8786 cat >>conftest.$ac_ext <<_ACEOF
8787 /* end confdefs.h.  */
8788 $ac_includes_default
8789 #include <$ac_header>
8790 _ACEOF
8791 rm -f conftest.$ac_objext
8792 if { (ac_try="$ac_compile"
8793 case "(($ac_try" in
8794   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8795   *) ac_try_echo=$ac_try;;
8796 esac
8797 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8798   (eval "$ac_compile") 2>conftest.er1
8799   ac_status=$?
8800   grep -v '^ *+' conftest.er1 >conftest.err
8801   rm -f conftest.er1
8802   cat conftest.err >&5
8803   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8804   (exit $ac_status); } && {
8805          test -z "$ac_c_werror_flag" ||
8806          test ! -s conftest.err
8807        } && test -s conftest.$ac_objext; then
8808   ac_header_compiler=yes
8809 else
8810   echo "$as_me: failed program was:" >&5
8811 sed 's/^/| /' conftest.$ac_ext >&5
8812
8813         ac_header_compiler=no
8814 fi
8815
8816 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8817 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8818 echo "${ECHO_T}$ac_header_compiler" >&6; }
8819
8820 # Is the header present?
8821 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
8822 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8823 cat >conftest.$ac_ext <<_ACEOF
8824 /* confdefs.h.  */
8825 _ACEOF
8826 cat confdefs.h >>conftest.$ac_ext
8827 cat >>conftest.$ac_ext <<_ACEOF
8828 /* end confdefs.h.  */
8829 #include <$ac_header>
8830 _ACEOF
8831 if { (ac_try="$ac_cpp conftest.$ac_ext"
8832 case "(($ac_try" in
8833   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8834   *) ac_try_echo=$ac_try;;
8835 esac
8836 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8837   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8838   ac_status=$?
8839   grep -v '^ *+' conftest.er1 >conftest.err
8840   rm -f conftest.er1
8841   cat conftest.err >&5
8842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8843   (exit $ac_status); } >/dev/null && {
8844          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8845          test ! -s conftest.err
8846        }; then
8847   ac_header_preproc=yes
8848 else
8849   echo "$as_me: failed program was:" >&5
8850 sed 's/^/| /' conftest.$ac_ext >&5
8851
8852   ac_header_preproc=no
8853 fi
8854
8855 rm -f conftest.err conftest.$ac_ext
8856 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8857 echo "${ECHO_T}$ac_header_preproc" >&6; }
8858
8859 # So?  What about this header?
8860 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8861   yes:no: )
8862     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8863 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8864     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8865 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8866     ac_header_preproc=yes
8867     ;;
8868   no:yes:* )
8869     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8870 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8871     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8872 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8873     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8874 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8875     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8876 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8877     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8878 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8879     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8880 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8881     ( cat <<\_ASBOX
8882 ## ---------------------------------------- ##
8883 ## Report this to pgsql-bugs@postgresql.org ##
8884 ## ---------------------------------------- ##
8885 _ASBOX
8886      ) | sed "s/^/$as_me: WARNING:     /" >&2
8887     ;;
8888 esac
8889 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8890 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8891 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8892   echo $ECHO_N "(cached) $ECHO_C" >&6
8893 else
8894   eval "$as_ac_Header=\$ac_header_preproc"
8895 fi
8896 ac_res=`eval echo '${'$as_ac_Header'}'`
8897                { echo "$as_me:$LINENO: result: $ac_res" >&5
8898 echo "${ECHO_T}$ac_res" >&6; }
8899
8900 fi
8901 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8902   cat >>confdefs.h <<_ACEOF
8903 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8904 _ACEOF
8905
8906 else
8907
8908 for ac_header in readline.h
8909 do
8910 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8911 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8912   { echo "$as_me:$LINENO: checking for $ac_header" >&5
8913 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8914 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8915   echo $ECHO_N "(cached) $ECHO_C" >&6
8916 fi
8917 ac_res=`eval echo '${'$as_ac_Header'}'`
8918                { echo "$as_me:$LINENO: result: $ac_res" >&5
8919 echo "${ECHO_T}$ac_res" >&6; }
8920 else
8921   # Is the header compilable?
8922 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
8923 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8924 cat >conftest.$ac_ext <<_ACEOF
8925 /* confdefs.h.  */
8926 _ACEOF
8927 cat confdefs.h >>conftest.$ac_ext
8928 cat >>conftest.$ac_ext <<_ACEOF
8929 /* end confdefs.h.  */
8930 $ac_includes_default
8931 #include <$ac_header>
8932 _ACEOF
8933 rm -f conftest.$ac_objext
8934 if { (ac_try="$ac_compile"
8935 case "(($ac_try" in
8936   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8937   *) ac_try_echo=$ac_try;;
8938 esac
8939 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8940   (eval "$ac_compile") 2>conftest.er1
8941   ac_status=$?
8942   grep -v '^ *+' conftest.er1 >conftest.err
8943   rm -f conftest.er1
8944   cat conftest.err >&5
8945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8946   (exit $ac_status); } && {
8947          test -z "$ac_c_werror_flag" ||
8948          test ! -s conftest.err
8949        } && test -s conftest.$ac_objext; then
8950   ac_header_compiler=yes
8951 else
8952   echo "$as_me: failed program was:" >&5
8953 sed 's/^/| /' conftest.$ac_ext >&5
8954
8955         ac_header_compiler=no
8956 fi
8957
8958 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8959 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8960 echo "${ECHO_T}$ac_header_compiler" >&6; }
8961
8962 # Is the header present?
8963 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
8964 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8965 cat >conftest.$ac_ext <<_ACEOF
8966 /* confdefs.h.  */
8967 _ACEOF
8968 cat confdefs.h >>conftest.$ac_ext
8969 cat >>conftest.$ac_ext <<_ACEOF
8970 /* end confdefs.h.  */
8971 #include <$ac_header>
8972 _ACEOF
8973 if { (ac_try="$ac_cpp conftest.$ac_ext"
8974 case "(($ac_try" in
8975   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8976   *) ac_try_echo=$ac_try;;
8977 esac
8978 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8979   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8980   ac_status=$?
8981   grep -v '^ *+' conftest.er1 >conftest.err
8982   rm -f conftest.er1
8983   cat conftest.err >&5
8984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8985   (exit $ac_status); } >/dev/null && {
8986          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8987          test ! -s conftest.err
8988        }; then
8989   ac_header_preproc=yes
8990 else
8991   echo "$as_me: failed program was:" >&5
8992 sed 's/^/| /' conftest.$ac_ext >&5
8993
8994   ac_header_preproc=no
8995 fi
8996
8997 rm -f conftest.err conftest.$ac_ext
8998 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8999 echo "${ECHO_T}$ac_header_preproc" >&6; }
9000
9001 # So?  What about this header?
9002 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9003   yes:no: )
9004     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9005 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9006     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9007 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9008     ac_header_preproc=yes
9009     ;;
9010   no:yes:* )
9011     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9012 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9013     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9014 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9015     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9016 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9017     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9018 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9019     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9020 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9021     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9022 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9023     ( cat <<\_ASBOX
9024 ## ---------------------------------------- ##
9025 ## Report this to pgsql-bugs@postgresql.org ##
9026 ## ---------------------------------------- ##
9027 _ASBOX
9028      ) | sed "s/^/$as_me: WARNING:     /" >&2
9029     ;;
9030 esac
9031 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9032 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9033 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9034   echo $ECHO_N "(cached) $ECHO_C" >&6
9035 else
9036   eval "$as_ac_Header=\$ac_header_preproc"
9037 fi
9038 ac_res=`eval echo '${'$as_ac_Header'}'`
9039                { echo "$as_me:$LINENO: result: $ac_res" >&5
9040 echo "${ECHO_T}$ac_res" >&6; }
9041
9042 fi
9043 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9044   cat >>confdefs.h <<_ACEOF
9045 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9046 _ACEOF
9047
9048 else
9049   { { echo "$as_me:$LINENO: error: readline header not found
9050 If you have readline already installed, see config.log for details on the
9051 failure.  It is possible the compiler isn't looking in the proper directory.
9052 Use --without-readline to disable readline support." >&5
9053 echo "$as_me: error: readline header not found
9054 If you have readline already installed, see config.log for details on the
9055 failure.  It is possible the compiler isn't looking in the proper directory.
9056 Use --without-readline to disable readline support." >&2;}
9057    { (exit 1); exit 1; }; }
9058 fi
9059
9060 done
9061
9062 fi
9063
9064 done
9065
9066
9067 for ac_header in readline/history.h
9068 do
9069 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9070 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9071   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9072 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9073 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9074   echo $ECHO_N "(cached) $ECHO_C" >&6
9075 fi
9076 ac_res=`eval echo '${'$as_ac_Header'}'`
9077                { echo "$as_me:$LINENO: result: $ac_res" >&5
9078 echo "${ECHO_T}$ac_res" >&6; }
9079 else
9080   # Is the header compilable?
9081 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9082 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9083 cat >conftest.$ac_ext <<_ACEOF
9084 /* confdefs.h.  */
9085 _ACEOF
9086 cat confdefs.h >>conftest.$ac_ext
9087 cat >>conftest.$ac_ext <<_ACEOF
9088 /* end confdefs.h.  */
9089 $ac_includes_default
9090 #include <$ac_header>
9091 _ACEOF
9092 rm -f conftest.$ac_objext
9093 if { (ac_try="$ac_compile"
9094 case "(($ac_try" in
9095   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9096   *) ac_try_echo=$ac_try;;
9097 esac
9098 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9099   (eval "$ac_compile") 2>conftest.er1
9100   ac_status=$?
9101   grep -v '^ *+' conftest.er1 >conftest.err
9102   rm -f conftest.er1
9103   cat conftest.err >&5
9104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9105   (exit $ac_status); } && {
9106          test -z "$ac_c_werror_flag" ||
9107          test ! -s conftest.err
9108        } && test -s conftest.$ac_objext; then
9109   ac_header_compiler=yes
9110 else
9111   echo "$as_me: failed program was:" >&5
9112 sed 's/^/| /' conftest.$ac_ext >&5
9113
9114         ac_header_compiler=no
9115 fi
9116
9117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9118 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9119 echo "${ECHO_T}$ac_header_compiler" >&6; }
9120
9121 # Is the header present?
9122 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
9123 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
9124 cat >conftest.$ac_ext <<_ACEOF
9125 /* confdefs.h.  */
9126 _ACEOF
9127 cat confdefs.h >>conftest.$ac_ext
9128 cat >>conftest.$ac_ext <<_ACEOF
9129 /* end confdefs.h.  */
9130 #include <$ac_header>
9131 _ACEOF
9132 if { (ac_try="$ac_cpp conftest.$ac_ext"
9133 case "(($ac_try" in
9134   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9135   *) ac_try_echo=$ac_try;;
9136 esac
9137 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9138   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9139   ac_status=$?
9140   grep -v '^ *+' conftest.er1 >conftest.err
9141   rm -f conftest.er1
9142   cat conftest.err >&5
9143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9144   (exit $ac_status); } >/dev/null && {
9145          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9146          test ! -s conftest.err
9147        }; then
9148   ac_header_preproc=yes
9149 else
9150   echo "$as_me: failed program was:" >&5
9151 sed 's/^/| /' conftest.$ac_ext >&5
9152
9153   ac_header_preproc=no
9154 fi
9155
9156 rm -f conftest.err conftest.$ac_ext
9157 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9158 echo "${ECHO_T}$ac_header_preproc" >&6; }
9159
9160 # So?  What about this header?
9161 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9162   yes:no: )
9163     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9164 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9165     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9166 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9167     ac_header_preproc=yes
9168     ;;
9169   no:yes:* )
9170     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9171 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9172     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9173 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9174     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9175 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9176     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9177 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9178     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9179 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9180     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9181 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9182     ( cat <<\_ASBOX
9183 ## ---------------------------------------- ##
9184 ## Report this to pgsql-bugs@postgresql.org ##
9185 ## ---------------------------------------- ##
9186 _ASBOX
9187      ) | sed "s/^/$as_me: WARNING:     /" >&2
9188     ;;
9189 esac
9190 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9191 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9192 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9193   echo $ECHO_N "(cached) $ECHO_C" >&6
9194 else
9195   eval "$as_ac_Header=\$ac_header_preproc"
9196 fi
9197 ac_res=`eval echo '${'$as_ac_Header'}'`
9198                { echo "$as_me:$LINENO: result: $ac_res" >&5
9199 echo "${ECHO_T}$ac_res" >&6; }
9200
9201 fi
9202 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9203   cat >>confdefs.h <<_ACEOF
9204 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9205 _ACEOF
9206
9207 else
9208
9209 for ac_header in history.h
9210 do
9211 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9212 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9213   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9214 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9215 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9216   echo $ECHO_N "(cached) $ECHO_C" >&6
9217 fi
9218 ac_res=`eval echo '${'$as_ac_Header'}'`
9219                { echo "$as_me:$LINENO: result: $ac_res" >&5
9220 echo "${ECHO_T}$ac_res" >&6; }
9221 else
9222   # Is the header compilable?
9223 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9224 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9225 cat >conftest.$ac_ext <<_ACEOF
9226 /* confdefs.h.  */
9227 _ACEOF
9228 cat confdefs.h >>conftest.$ac_ext
9229 cat >>conftest.$ac_ext <<_ACEOF
9230 /* end confdefs.h.  */
9231 $ac_includes_default
9232 #include <$ac_header>
9233 _ACEOF
9234 rm -f conftest.$ac_objext
9235 if { (ac_try="$ac_compile"
9236 case "(($ac_try" in
9237   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9238   *) ac_try_echo=$ac_try;;
9239 esac
9240 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9241   (eval "$ac_compile") 2>conftest.er1
9242   ac_status=$?
9243   grep -v '^ *+' conftest.er1 >conftest.err
9244   rm -f conftest.er1
9245   cat conftest.err >&5
9246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9247   (exit $ac_status); } && {
9248          test -z "$ac_c_werror_flag" ||
9249          test ! -s conftest.err
9250        } && test -s conftest.$ac_objext; then
9251   ac_header_compiler=yes
9252 else
9253   echo "$as_me: failed program was:" >&5
9254 sed 's/^/| /' conftest.$ac_ext >&5
9255
9256         ac_header_compiler=no
9257 fi
9258
9259 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9260 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9261 echo "${ECHO_T}$ac_header_compiler" >&6; }
9262
9263 # Is the header present?
9264 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
9265 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
9266 cat >conftest.$ac_ext <<_ACEOF
9267 /* confdefs.h.  */
9268 _ACEOF
9269 cat confdefs.h >>conftest.$ac_ext
9270 cat >>conftest.$ac_ext <<_ACEOF
9271 /* end confdefs.h.  */
9272 #include <$ac_header>
9273 _ACEOF
9274 if { (ac_try="$ac_cpp conftest.$ac_ext"
9275 case "(($ac_try" in
9276   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9277   *) ac_try_echo=$ac_try;;
9278 esac
9279 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9280   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9281   ac_status=$?
9282   grep -v '^ *+' conftest.er1 >conftest.err
9283   rm -f conftest.er1
9284   cat conftest.err >&5
9285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9286   (exit $ac_status); } >/dev/null && {
9287          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9288          test ! -s conftest.err
9289        }; then
9290   ac_header_preproc=yes
9291 else
9292   echo "$as_me: failed program was:" >&5
9293 sed 's/^/| /' conftest.$ac_ext >&5
9294
9295   ac_header_preproc=no
9296 fi
9297
9298 rm -f conftest.err conftest.$ac_ext
9299 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9300 echo "${ECHO_T}$ac_header_preproc" >&6; }
9301
9302 # So?  What about this header?
9303 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9304   yes:no: )
9305     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9306 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9307     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9308 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9309     ac_header_preproc=yes
9310     ;;
9311   no:yes:* )
9312     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9313 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9314     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9315 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9316     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9317 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9318     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9319 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9320     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9321 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9322     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9323 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9324     ( cat <<\_ASBOX
9325 ## ---------------------------------------- ##
9326 ## Report this to pgsql-bugs@postgresql.org ##
9327 ## ---------------------------------------- ##
9328 _ASBOX
9329      ) | sed "s/^/$as_me: WARNING:     /" >&2
9330     ;;
9331 esac
9332 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9333 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9334 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9335   echo $ECHO_N "(cached) $ECHO_C" >&6
9336 else
9337   eval "$as_ac_Header=\$ac_header_preproc"
9338 fi
9339 ac_res=`eval echo '${'$as_ac_Header'}'`
9340                { echo "$as_me:$LINENO: result: $ac_res" >&5
9341 echo "${ECHO_T}$ac_res" >&6; }
9342
9343 fi
9344 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9345   cat >>confdefs.h <<_ACEOF
9346 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9347 _ACEOF
9348
9349 else
9350   { { echo "$as_me:$LINENO: error: history header not found
9351 If you have readline already installed, see config.log for details on the
9352 failure.  It is possible the compiler isn't looking in the proper directory.
9353 Use --without-readline to disable readline support." >&5
9354 echo "$as_me: error: history header not found
9355 If you have readline already installed, see config.log for details on the
9356 failure.  It is possible the compiler isn't looking in the proper directory.
9357 Use --without-readline to disable readline support." >&2;}
9358    { (exit 1); exit 1; }; }
9359 fi
9360
9361 done
9362
9363 fi
9364
9365 done
9366
9367 fi
9368
9369 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
9370 # Some installations of libedit usurp /usr/include/readline/, which seems
9371 # bad practice, since in combined installations readline will have its headers
9372 # there.  We might have to resort to AC_EGREP checks to make sure we found
9373 # the proper header...
9374
9375 for ac_header in editline/readline.h
9376 do
9377 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9378 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9379   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9380 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9381 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9382   echo $ECHO_N "(cached) $ECHO_C" >&6
9383 fi
9384 ac_res=`eval echo '${'$as_ac_Header'}'`
9385                { echo "$as_me:$LINENO: result: $ac_res" >&5
9386 echo "${ECHO_T}$ac_res" >&6; }
9387 else
9388   # Is the header compilable?
9389 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9390 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9391 cat >conftest.$ac_ext <<_ACEOF
9392 /* confdefs.h.  */
9393 _ACEOF
9394 cat confdefs.h >>conftest.$ac_ext
9395 cat >>conftest.$ac_ext <<_ACEOF
9396 /* end confdefs.h.  */
9397 $ac_includes_default
9398 #include <$ac_header>
9399 _ACEOF
9400 rm -f conftest.$ac_objext
9401 if { (ac_try="$ac_compile"
9402 case "(($ac_try" in
9403   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9404   *) ac_try_echo=$ac_try;;
9405 esac
9406 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9407   (eval "$ac_compile") 2>conftest.er1
9408   ac_status=$?
9409   grep -v '^ *+' conftest.er1 >conftest.err
9410   rm -f conftest.er1
9411   cat conftest.err >&5
9412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9413   (exit $ac_status); } && {
9414          test -z "$ac_c_werror_flag" ||
9415          test ! -s conftest.err
9416        } && test -s conftest.$ac_objext; then
9417   ac_header_compiler=yes
9418 else
9419   echo "$as_me: failed program was:" >&5
9420 sed 's/^/| /' conftest.$ac_ext >&5
9421
9422         ac_header_compiler=no
9423 fi
9424
9425 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9426 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9427 echo "${ECHO_T}$ac_header_compiler" >&6; }
9428
9429 # Is the header present?
9430 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
9431 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
9432 cat >conftest.$ac_ext <<_ACEOF
9433 /* confdefs.h.  */
9434 _ACEOF
9435 cat confdefs.h >>conftest.$ac_ext
9436 cat >>conftest.$ac_ext <<_ACEOF
9437 /* end confdefs.h.  */
9438 #include <$ac_header>
9439 _ACEOF
9440 if { (ac_try="$ac_cpp conftest.$ac_ext"
9441 case "(($ac_try" in
9442   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9443   *) ac_try_echo=$ac_try;;
9444 esac
9445 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9446   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9447   ac_status=$?
9448   grep -v '^ *+' conftest.er1 >conftest.err
9449   rm -f conftest.er1
9450   cat conftest.err >&5
9451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9452   (exit $ac_status); } >/dev/null && {
9453          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9454          test ! -s conftest.err
9455        }; then
9456   ac_header_preproc=yes
9457 else
9458   echo "$as_me: failed program was:" >&5
9459 sed 's/^/| /' conftest.$ac_ext >&5
9460
9461   ac_header_preproc=no
9462 fi
9463
9464 rm -f conftest.err conftest.$ac_ext
9465 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9466 echo "${ECHO_T}$ac_header_preproc" >&6; }
9467
9468 # So?  What about this header?
9469 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9470   yes:no: )
9471     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9472 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9473     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9474 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9475     ac_header_preproc=yes
9476     ;;
9477   no:yes:* )
9478     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9479 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9480     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9481 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9482     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9483 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9484     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9485 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9486     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9487 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9488     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9489 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9490     ( cat <<\_ASBOX
9491 ## ---------------------------------------- ##
9492 ## Report this to pgsql-bugs@postgresql.org ##
9493 ## ---------------------------------------- ##
9494 _ASBOX
9495      ) | sed "s/^/$as_me: WARNING:     /" >&2
9496     ;;
9497 esac
9498 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9499 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9500 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9501   echo $ECHO_N "(cached) $ECHO_C" >&6
9502 else
9503   eval "$as_ac_Header=\$ac_header_preproc"
9504 fi
9505 ac_res=`eval echo '${'$as_ac_Header'}'`
9506                { echo "$as_me:$LINENO: result: $ac_res" >&5
9507 echo "${ECHO_T}$ac_res" >&6; }
9508
9509 fi
9510 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9511   cat >>confdefs.h <<_ACEOF
9512 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9513 _ACEOF
9514
9515 else
9516
9517 for ac_header in readline.h
9518 do
9519 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9520 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9521   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9522 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9523 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9524   echo $ECHO_N "(cached) $ECHO_C" >&6
9525 fi
9526 ac_res=`eval echo '${'$as_ac_Header'}'`
9527                { echo "$as_me:$LINENO: result: $ac_res" >&5
9528 echo "${ECHO_T}$ac_res" >&6; }
9529 else
9530   # Is the header compilable?
9531 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9532 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9533 cat >conftest.$ac_ext <<_ACEOF
9534 /* confdefs.h.  */
9535 _ACEOF
9536 cat confdefs.h >>conftest.$ac_ext
9537 cat >>conftest.$ac_ext <<_ACEOF
9538 /* end confdefs.h.  */
9539 $ac_includes_default
9540 #include <$ac_header>
9541 _ACEOF
9542 rm -f conftest.$ac_objext
9543 if { (ac_try="$ac_compile"
9544 case "(($ac_try" in
9545   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9546   *) ac_try_echo=$ac_try;;
9547 esac
9548 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9549   (eval "$ac_compile") 2>conftest.er1
9550   ac_status=$?
9551   grep -v '^ *+' conftest.er1 >conftest.err
9552   rm -f conftest.er1
9553   cat conftest.err >&5
9554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9555   (exit $ac_status); } && {
9556          test -z "$ac_c_werror_flag" ||
9557          test ! -s conftest.err
9558        } && test -s conftest.$ac_objext; then
9559   ac_header_compiler=yes
9560 else
9561   echo "$as_me: failed program was:" >&5
9562 sed 's/^/| /' conftest.$ac_ext >&5
9563
9564         ac_header_compiler=no
9565 fi
9566
9567 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9568 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9569 echo "${ECHO_T}$ac_header_compiler" >&6; }
9570
9571 # Is the header present?
9572 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
9573 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
9574 cat >conftest.$ac_ext <<_ACEOF
9575 /* confdefs.h.  */
9576 _ACEOF
9577 cat confdefs.h >>conftest.$ac_ext
9578 cat >>conftest.$ac_ext <<_ACEOF
9579 /* end confdefs.h.  */
9580 #include <$ac_header>
9581 _ACEOF
9582 if { (ac_try="$ac_cpp conftest.$ac_ext"
9583 case "(($ac_try" in
9584   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9585   *) ac_try_echo=$ac_try;;
9586 esac
9587 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9588   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9589   ac_status=$?
9590   grep -v '^ *+' conftest.er1 >conftest.err
9591   rm -f conftest.er1
9592   cat conftest.err >&5
9593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9594   (exit $ac_status); } >/dev/null && {
9595          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9596          test ! -s conftest.err
9597        }; then
9598   ac_header_preproc=yes
9599 else
9600   echo "$as_me: failed program was:" >&5
9601 sed 's/^/| /' conftest.$ac_ext >&5
9602
9603   ac_header_preproc=no
9604 fi
9605
9606 rm -f conftest.err conftest.$ac_ext
9607 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9608 echo "${ECHO_T}$ac_header_preproc" >&6; }
9609
9610 # So?  What about this header?
9611 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9612   yes:no: )
9613     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9614 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9615     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9616 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9617     ac_header_preproc=yes
9618     ;;
9619   no:yes:* )
9620     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9621 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9622     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9623 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9624     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9625 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9626     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9627 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9628     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9629 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9630     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9631 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9632     ( cat <<\_ASBOX
9633 ## ---------------------------------------- ##
9634 ## Report this to pgsql-bugs@postgresql.org ##
9635 ## ---------------------------------------- ##
9636 _ASBOX
9637      ) | sed "s/^/$as_me: WARNING:     /" >&2
9638     ;;
9639 esac
9640 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9641 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9642 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9643   echo $ECHO_N "(cached) $ECHO_C" >&6
9644 else
9645   eval "$as_ac_Header=\$ac_header_preproc"
9646 fi
9647 ac_res=`eval echo '${'$as_ac_Header'}'`
9648                { echo "$as_me:$LINENO: result: $ac_res" >&5
9649 echo "${ECHO_T}$ac_res" >&6; }
9650
9651 fi
9652 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9653   cat >>confdefs.h <<_ACEOF
9654 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9655 _ACEOF
9656
9657 else
9658
9659 for ac_header in readline/readline.h
9660 do
9661 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9662 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9663   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9664 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9665 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9666   echo $ECHO_N "(cached) $ECHO_C" >&6
9667 fi
9668 ac_res=`eval echo '${'$as_ac_Header'}'`
9669                { echo "$as_me:$LINENO: result: $ac_res" >&5
9670 echo "${ECHO_T}$ac_res" >&6; }
9671 else
9672   # Is the header compilable?
9673 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9674 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9675 cat >conftest.$ac_ext <<_ACEOF
9676 /* confdefs.h.  */
9677 _ACEOF
9678 cat confdefs.h >>conftest.$ac_ext
9679 cat >>conftest.$ac_ext <<_ACEOF
9680 /* end confdefs.h.  */
9681 $ac_includes_default
9682 #include <$ac_header>
9683 _ACEOF
9684 rm -f conftest.$ac_objext
9685 if { (ac_try="$ac_compile"
9686 case "(($ac_try" in
9687   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9688   *) ac_try_echo=$ac_try;;
9689 esac
9690 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9691   (eval "$ac_compile") 2>conftest.er1
9692   ac_status=$?
9693   grep -v '^ *+' conftest.er1 >conftest.err
9694   rm -f conftest.er1
9695   cat conftest.err >&5
9696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9697   (exit $ac_status); } && {
9698          test -z "$ac_c_werror_flag" ||
9699          test ! -s conftest.err
9700        } && test -s conftest.$ac_objext; then
9701   ac_header_compiler=yes
9702 else
9703   echo "$as_me: failed program was:" >&5
9704 sed 's/^/| /' conftest.$ac_ext >&5
9705
9706         ac_header_compiler=no
9707 fi
9708
9709 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9710 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9711 echo "${ECHO_T}$ac_header_compiler" >&6; }
9712
9713 # Is the header present?
9714 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
9715 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
9716 cat >conftest.$ac_ext <<_ACEOF
9717 /* confdefs.h.  */
9718 _ACEOF
9719 cat confdefs.h >>conftest.$ac_ext
9720 cat >>conftest.$ac_ext <<_ACEOF
9721 /* end confdefs.h.  */
9722 #include <$ac_header>
9723 _ACEOF
9724 if { (ac_try="$ac_cpp conftest.$ac_ext"
9725 case "(($ac_try" in
9726   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9727   *) ac_try_echo=$ac_try;;
9728 esac
9729 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9730   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9731   ac_status=$?
9732   grep -v '^ *+' conftest.er1 >conftest.err
9733   rm -f conftest.er1
9734   cat conftest.err >&5
9735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9736   (exit $ac_status); } >/dev/null && {
9737          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9738          test ! -s conftest.err
9739        }; then
9740   ac_header_preproc=yes
9741 else
9742   echo "$as_me: failed program was:" >&5
9743 sed 's/^/| /' conftest.$ac_ext >&5
9744
9745   ac_header_preproc=no
9746 fi
9747
9748 rm -f conftest.err conftest.$ac_ext
9749 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9750 echo "${ECHO_T}$ac_header_preproc" >&6; }
9751
9752 # So?  What about this header?
9753 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9754   yes:no: )
9755     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9756 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9757     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9758 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9759     ac_header_preproc=yes
9760     ;;
9761   no:yes:* )
9762     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9763 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9764     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9765 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9766     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9767 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9768     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9769 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9770     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9771 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9772     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9773 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9774     ( cat <<\_ASBOX
9775 ## ---------------------------------------- ##
9776 ## Report this to pgsql-bugs@postgresql.org ##
9777 ## ---------------------------------------- ##
9778 _ASBOX
9779      ) | sed "s/^/$as_me: WARNING:     /" >&2
9780     ;;
9781 esac
9782 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9783 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9784 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9785   echo $ECHO_N "(cached) $ECHO_C" >&6
9786 else
9787   eval "$as_ac_Header=\$ac_header_preproc"
9788 fi
9789 ac_res=`eval echo '${'$as_ac_Header'}'`
9790                { echo "$as_me:$LINENO: result: $ac_res" >&5
9791 echo "${ECHO_T}$ac_res" >&6; }
9792
9793 fi
9794 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9795   cat >>confdefs.h <<_ACEOF
9796 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9797 _ACEOF
9798
9799 else
9800   { { echo "$as_me:$LINENO: error: readline header not found
9801 If you have libedit already installed, see config.log for details on the
9802 failure.  It is possible the compiler isn't looking in the proper directory.
9803 Use --without-readline to disable libedit support." >&5
9804 echo "$as_me: error: readline header not found
9805 If you have libedit already installed, see config.log for details on the
9806 failure.  It is possible the compiler isn't looking in the proper directory.
9807 Use --without-readline to disable libedit support." >&2;}
9808    { (exit 1); exit 1; }; }
9809 fi
9810
9811 done
9812
9813 fi
9814
9815 done
9816
9817 fi
9818
9819 done
9820
9821 # Note: in a libedit installation, history.h is sometimes a dummy, and may
9822 # not be there at all.  Hence, don't complain if not found.  We must check
9823 # though, since in yet other versions it is an independent header.
9824
9825 for ac_header in editline/history.h
9826 do
9827 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9828 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9829   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9830 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9831 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9832   echo $ECHO_N "(cached) $ECHO_C" >&6
9833 fi
9834 ac_res=`eval echo '${'$as_ac_Header'}'`
9835                { echo "$as_me:$LINENO: result: $ac_res" >&5
9836 echo "${ECHO_T}$ac_res" >&6; }
9837 else
9838   # Is the header compilable?
9839 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9840 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9841 cat >conftest.$ac_ext <<_ACEOF
9842 /* confdefs.h.  */
9843 _ACEOF
9844 cat confdefs.h >>conftest.$ac_ext
9845 cat >>conftest.$ac_ext <<_ACEOF
9846 /* end confdefs.h.  */
9847 $ac_includes_default
9848 #include <$ac_header>
9849 _ACEOF
9850 rm -f conftest.$ac_objext
9851 if { (ac_try="$ac_compile"
9852 case "(($ac_try" in
9853   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9854   *) ac_try_echo=$ac_try;;
9855 esac
9856 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9857   (eval "$ac_compile") 2>conftest.er1
9858   ac_status=$?
9859   grep -v '^ *+' conftest.er1 >conftest.err
9860   rm -f conftest.er1
9861   cat conftest.err >&5
9862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9863   (exit $ac_status); } && {
9864          test -z "$ac_c_werror_flag" ||
9865          test ! -s conftest.err
9866        } && test -s conftest.$ac_objext; then
9867   ac_header_compiler=yes
9868 else
9869   echo "$as_me: failed program was:" >&5
9870 sed 's/^/| /' conftest.$ac_ext >&5
9871
9872         ac_header_compiler=no
9873 fi
9874
9875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9876 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9877 echo "${ECHO_T}$ac_header_compiler" >&6; }
9878
9879 # Is the header present?
9880 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
9881 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
9882 cat >conftest.$ac_ext <<_ACEOF
9883 /* confdefs.h.  */
9884 _ACEOF
9885 cat confdefs.h >>conftest.$ac_ext
9886 cat >>conftest.$ac_ext <<_ACEOF
9887 /* end confdefs.h.  */
9888 #include <$ac_header>
9889 _ACEOF
9890 if { (ac_try="$ac_cpp conftest.$ac_ext"
9891 case "(($ac_try" in
9892   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9893   *) ac_try_echo=$ac_try;;
9894 esac
9895 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9896   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9897   ac_status=$?
9898   grep -v '^ *+' conftest.er1 >conftest.err
9899   rm -f conftest.er1
9900   cat conftest.err >&5
9901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9902   (exit $ac_status); } >/dev/null && {
9903          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9904          test ! -s conftest.err
9905        }; then
9906   ac_header_preproc=yes
9907 else
9908   echo "$as_me: failed program was:" >&5
9909 sed 's/^/| /' conftest.$ac_ext >&5
9910
9911   ac_header_preproc=no
9912 fi
9913
9914 rm -f conftest.err conftest.$ac_ext
9915 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9916 echo "${ECHO_T}$ac_header_preproc" >&6; }
9917
9918 # So?  What about this header?
9919 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9920   yes:no: )
9921     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9922 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9923     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9924 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9925     ac_header_preproc=yes
9926     ;;
9927   no:yes:* )
9928     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9929 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9930     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9931 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9932     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9933 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9934     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9935 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9936     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9937 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9938     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9939 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9940     ( cat <<\_ASBOX
9941 ## ---------------------------------------- ##
9942 ## Report this to pgsql-bugs@postgresql.org ##
9943 ## ---------------------------------------- ##
9944 _ASBOX
9945      ) | sed "s/^/$as_me: WARNING:     /" >&2
9946     ;;
9947 esac
9948 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9949 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9950 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9951   echo $ECHO_N "(cached) $ECHO_C" >&6
9952 else
9953   eval "$as_ac_Header=\$ac_header_preproc"
9954 fi
9955 ac_res=`eval echo '${'$as_ac_Header'}'`
9956                { echo "$as_me:$LINENO: result: $ac_res" >&5
9957 echo "${ECHO_T}$ac_res" >&6; }
9958
9959 fi
9960 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9961   cat >>confdefs.h <<_ACEOF
9962 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9963 _ACEOF
9964
9965 else
9966
9967 for ac_header in history.h
9968 do
9969 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9970 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9971   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9972 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9973 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9974   echo $ECHO_N "(cached) $ECHO_C" >&6
9975 fi
9976 ac_res=`eval echo '${'$as_ac_Header'}'`
9977                { echo "$as_me:$LINENO: result: $ac_res" >&5
9978 echo "${ECHO_T}$ac_res" >&6; }
9979 else
9980   # Is the header compilable?
9981 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9982 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9983 cat >conftest.$ac_ext <<_ACEOF
9984 /* confdefs.h.  */
9985 _ACEOF
9986 cat confdefs.h >>conftest.$ac_ext
9987 cat >>conftest.$ac_ext <<_ACEOF
9988 /* end confdefs.h.  */
9989 $ac_includes_default
9990 #include <$ac_header>
9991 _ACEOF
9992 rm -f conftest.$ac_objext
9993 if { (ac_try="$ac_compile"
9994 case "(($ac_try" in
9995   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9996   *) ac_try_echo=$ac_try;;
9997 esac
9998 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9999   (eval "$ac_compile") 2>conftest.er1
10000   ac_status=$?
10001   grep -v '^ *+' conftest.er1 >conftest.err
10002   rm -f conftest.er1
10003   cat conftest.err >&5
10004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10005   (exit $ac_status); } && {
10006          test -z "$ac_c_werror_flag" ||
10007          test ! -s conftest.err
10008        } && test -s conftest.$ac_objext; then
10009   ac_header_compiler=yes
10010 else
10011   echo "$as_me: failed program was:" >&5
10012 sed 's/^/| /' conftest.$ac_ext >&5
10013
10014         ac_header_compiler=no
10015 fi
10016
10017 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10018 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10019 echo "${ECHO_T}$ac_header_compiler" >&6; }
10020
10021 # Is the header present?
10022 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
10023 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10024 cat >conftest.$ac_ext <<_ACEOF
10025 /* confdefs.h.  */
10026 _ACEOF
10027 cat confdefs.h >>conftest.$ac_ext
10028 cat >>conftest.$ac_ext <<_ACEOF
10029 /* end confdefs.h.  */
10030 #include <$ac_header>
10031 _ACEOF
10032 if { (ac_try="$ac_cpp conftest.$ac_ext"
10033 case "(($ac_try" in
10034   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10035   *) ac_try_echo=$ac_try;;
10036 esac
10037 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10038   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10039   ac_status=$?
10040   grep -v '^ *+' conftest.er1 >conftest.err
10041   rm -f conftest.er1
10042   cat conftest.err >&5
10043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10044   (exit $ac_status); } >/dev/null && {
10045          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10046          test ! -s conftest.err
10047        }; then
10048   ac_header_preproc=yes
10049 else
10050   echo "$as_me: failed program was:" >&5
10051 sed 's/^/| /' conftest.$ac_ext >&5
10052
10053   ac_header_preproc=no
10054 fi
10055
10056 rm -f conftest.err conftest.$ac_ext
10057 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10058 echo "${ECHO_T}$ac_header_preproc" >&6; }
10059
10060 # So?  What about this header?
10061 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10062   yes:no: )
10063     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10064 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10065     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10066 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10067     ac_header_preproc=yes
10068     ;;
10069   no:yes:* )
10070     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10071 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10072     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10073 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10074     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10075 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10076     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10077 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10078     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10079 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10080     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10081 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10082     ( cat <<\_ASBOX
10083 ## ---------------------------------------- ##
10084 ## Report this to pgsql-bugs@postgresql.org ##
10085 ## ---------------------------------------- ##
10086 _ASBOX
10087      ) | sed "s/^/$as_me: WARNING:     /" >&2
10088     ;;
10089 esac
10090 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10091 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10092 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10093   echo $ECHO_N "(cached) $ECHO_C" >&6
10094 else
10095   eval "$as_ac_Header=\$ac_header_preproc"
10096 fi
10097 ac_res=`eval echo '${'$as_ac_Header'}'`
10098                { echo "$as_me:$LINENO: result: $ac_res" >&5
10099 echo "${ECHO_T}$ac_res" >&6; }
10100
10101 fi
10102 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10103   cat >>confdefs.h <<_ACEOF
10104 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10105 _ACEOF
10106
10107 else
10108
10109 for ac_header in readline/history.h
10110 do
10111 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10112 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10113   { echo "$as_me:$LINENO: checking for $ac_header" >&5
10114 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10115 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10116   echo $ECHO_N "(cached) $ECHO_C" >&6
10117 fi
10118 ac_res=`eval echo '${'$as_ac_Header'}'`
10119                { echo "$as_me:$LINENO: result: $ac_res" >&5
10120 echo "${ECHO_T}$ac_res" >&6; }
10121 else
10122   # Is the header compilable?
10123 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
10124 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
10125 cat >conftest.$ac_ext <<_ACEOF
10126 /* confdefs.h.  */
10127 _ACEOF
10128 cat confdefs.h >>conftest.$ac_ext
10129 cat >>conftest.$ac_ext <<_ACEOF
10130 /* end confdefs.h.  */
10131 $ac_includes_default
10132 #include <$ac_header>
10133 _ACEOF
10134 rm -f conftest.$ac_objext
10135 if { (ac_try="$ac_compile"
10136 case "(($ac_try" in
10137   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10138   *) ac_try_echo=$ac_try;;
10139 esac
10140 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10141   (eval "$ac_compile") 2>conftest.er1
10142   ac_status=$?
10143   grep -v '^ *+' conftest.er1 >conftest.err
10144   rm -f conftest.er1
10145   cat conftest.err >&5
10146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10147   (exit $ac_status); } && {
10148          test -z "$ac_c_werror_flag" ||
10149          test ! -s conftest.err
10150        } && test -s conftest.$ac_objext; then
10151   ac_header_compiler=yes
10152 else
10153   echo "$as_me: failed program was:" >&5
10154 sed 's/^/| /' conftest.$ac_ext >&5
10155
10156         ac_header_compiler=no
10157 fi
10158
10159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10160 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10161 echo "${ECHO_T}$ac_header_compiler" >&6; }
10162
10163 # Is the header present?
10164 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
10165 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10166 cat >conftest.$ac_ext <<_ACEOF
10167 /* confdefs.h.  */
10168 _ACEOF
10169 cat confdefs.h >>conftest.$ac_ext
10170 cat >>conftest.$ac_ext <<_ACEOF
10171 /* end confdefs.h.  */
10172 #include <$ac_header>
10173 _ACEOF
10174 if { (ac_try="$ac_cpp conftest.$ac_ext"
10175 case "(($ac_try" in
10176   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10177   *) ac_try_echo=$ac_try;;
10178 esac
10179 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10180   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10181   ac_status=$?
10182   grep -v '^ *+' conftest.er1 >conftest.err
10183   rm -f conftest.er1
10184   cat conftest.err >&5
10185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10186   (exit $ac_status); } >/dev/null && {
10187          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10188          test ! -s conftest.err
10189        }; then
10190   ac_header_preproc=yes
10191 else
10192   echo "$as_me: failed program was:" >&5
10193 sed 's/^/| /' conftest.$ac_ext >&5
10194
10195   ac_header_preproc=no
10196 fi
10197
10198 rm -f conftest.err conftest.$ac_ext
10199 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10200 echo "${ECHO_T}$ac_header_preproc" >&6; }
10201
10202 # So?  What about this header?
10203 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10204   yes:no: )
10205     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10206 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10207     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10208 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10209     ac_header_preproc=yes
10210     ;;
10211   no:yes:* )
10212     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10213 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10214     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10215 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10216     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10217 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10218     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10219 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10220     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10221 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10222     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10223 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10224     ( cat <<\_ASBOX
10225 ## ---------------------------------------- ##
10226 ## Report this to pgsql-bugs@postgresql.org ##
10227 ## ---------------------------------------- ##
10228 _ASBOX
10229      ) | sed "s/^/$as_me: WARNING:     /" >&2
10230     ;;
10231 esac
10232 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10233 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10234 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10235   echo $ECHO_N "(cached) $ECHO_C" >&6
10236 else
10237   eval "$as_ac_Header=\$ac_header_preproc"
10238 fi
10239 ac_res=`eval echo '${'$as_ac_Header'}'`
10240                { echo "$as_me:$LINENO: result: $ac_res" >&5
10241 echo "${ECHO_T}$ac_res" >&6; }
10242
10243 fi
10244 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10245   cat >>confdefs.h <<_ACEOF
10246 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10247 _ACEOF
10248
10249 fi
10250
10251 done
10252
10253 fi
10254
10255 done
10256
10257 fi
10258
10259 done
10260
10261 fi
10262
10263 if test "$with_zlib" = yes; then
10264   if test "${ac_cv_header_zlib_h+set}" = set; then
10265   { echo "$as_me:$LINENO: checking for zlib.h" >&5
10266 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; }
10267 if test "${ac_cv_header_zlib_h+set}" = set; then
10268   echo $ECHO_N "(cached) $ECHO_C" >&6
10269 fi
10270 { echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
10271 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }
10272 else
10273   # Is the header compilable?
10274 { echo "$as_me:$LINENO: checking zlib.h usability" >&5
10275 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; }
10276 cat >conftest.$ac_ext <<_ACEOF
10277 /* confdefs.h.  */
10278 _ACEOF
10279 cat confdefs.h >>conftest.$ac_ext
10280 cat >>conftest.$ac_ext <<_ACEOF
10281 /* end confdefs.h.  */
10282 $ac_includes_default
10283 #include <zlib.h>
10284 _ACEOF
10285 rm -f conftest.$ac_objext
10286 if { (ac_try="$ac_compile"
10287 case "(($ac_try" in
10288   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10289   *) ac_try_echo=$ac_try;;
10290 esac
10291 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10292   (eval "$ac_compile") 2>conftest.er1
10293   ac_status=$?
10294   grep -v '^ *+' conftest.er1 >conftest.err
10295   rm -f conftest.er1
10296   cat conftest.err >&5
10297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10298   (exit $ac_status); } && {
10299          test -z "$ac_c_werror_flag" ||
10300          test ! -s conftest.err
10301        } && test -s conftest.$ac_objext; then
10302   ac_header_compiler=yes
10303 else
10304   echo "$as_me: failed program was:" >&5
10305 sed 's/^/| /' conftest.$ac_ext >&5
10306
10307         ac_header_compiler=no
10308 fi
10309
10310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10311 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10312 echo "${ECHO_T}$ac_header_compiler" >&6; }
10313
10314 # Is the header present?
10315 { echo "$as_me:$LINENO: checking zlib.h presence" >&5
10316 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; }
10317 cat >conftest.$ac_ext <<_ACEOF
10318 /* confdefs.h.  */
10319 _ACEOF
10320 cat confdefs.h >>conftest.$ac_ext
10321 cat >>conftest.$ac_ext <<_ACEOF
10322 /* end confdefs.h.  */
10323 #include <zlib.h>
10324 _ACEOF
10325 if { (ac_try="$ac_cpp conftest.$ac_ext"
10326 case "(($ac_try" in
10327   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10328   *) ac_try_echo=$ac_try;;
10329 esac
10330 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10331   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10332   ac_status=$?
10333   grep -v '^ *+' conftest.er1 >conftest.err
10334   rm -f conftest.er1
10335   cat conftest.err >&5
10336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10337   (exit $ac_status); } >/dev/null && {
10338          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10339          test ! -s conftest.err
10340        }; then
10341   ac_header_preproc=yes
10342 else
10343   echo "$as_me: failed program was:" >&5
10344 sed 's/^/| /' conftest.$ac_ext >&5
10345
10346   ac_header_preproc=no
10347 fi
10348
10349 rm -f conftest.err conftest.$ac_ext
10350 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10351 echo "${ECHO_T}$ac_header_preproc" >&6; }
10352
10353 # So?  What about this header?
10354 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10355   yes:no: )
10356     { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
10357 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10358     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
10359 echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
10360     ac_header_preproc=yes
10361     ;;
10362   no:yes:* )
10363     { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
10364 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
10365     { echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
10366 echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
10367     { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
10368 echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
10369     { echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
10370 echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10371     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
10372 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
10373     { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
10374 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
10375     ( cat <<\_ASBOX
10376 ## ---------------------------------------- ##
10377 ## Report this to pgsql-bugs@postgresql.org ##
10378 ## ---------------------------------------- ##
10379 _ASBOX
10380      ) | sed "s/^/$as_me: WARNING:     /" >&2
10381     ;;
10382 esac
10383 { echo "$as_me:$LINENO: checking for zlib.h" >&5
10384 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; }
10385 if test "${ac_cv_header_zlib_h+set}" = set; then
10386   echo $ECHO_N "(cached) $ECHO_C" >&6
10387 else
10388   ac_cv_header_zlib_h=$ac_header_preproc
10389 fi
10390 { echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
10391 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }
10392
10393 fi
10394 if test $ac_cv_header_zlib_h = yes; then
10395   :
10396 else
10397   { { echo "$as_me:$LINENO: error: zlib header not found
10398 If you have zlib already installed, see config.log for details on the
10399 failure.  It is possible the compiler isn't looking in the proper directory.
10400 Use --without-zlib to disable zlib support." >&5
10401 echo "$as_me: error: zlib header not found
10402 If you have zlib already installed, see config.log for details on the
10403 failure.  It is possible the compiler isn't looking in the proper directory.
10404 Use --without-zlib to disable zlib support." >&2;}
10405    { (exit 1); exit 1; }; }
10406 fi
10407
10408
10409 fi
10410
10411 if test "$with_gssapi" = yes ; then
10412
10413 for ac_header in gssapi/gssapi.h
10414 do
10415 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10416 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10417   { echo "$as_me:$LINENO: checking for $ac_header" >&5
10418 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10419 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10420   echo $ECHO_N "(cached) $ECHO_C" >&6
10421 fi
10422 ac_res=`eval echo '${'$as_ac_Header'}'`
10423                { echo "$as_me:$LINENO: result: $ac_res" >&5
10424 echo "${ECHO_T}$ac_res" >&6; }
10425 else
10426   # Is the header compilable?
10427 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
10428 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
10429 cat >conftest.$ac_ext <<_ACEOF
10430 /* confdefs.h.  */
10431 _ACEOF
10432 cat confdefs.h >>conftest.$ac_ext
10433 cat >>conftest.$ac_ext <<_ACEOF
10434 /* end confdefs.h.  */
10435 $ac_includes_default
10436 #include <$ac_header>
10437 _ACEOF
10438 rm -f conftest.$ac_objext
10439 if { (ac_try="$ac_compile"
10440 case "(($ac_try" in
10441   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10442   *) ac_try_echo=$ac_try;;
10443 esac
10444 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10445   (eval "$ac_compile") 2>conftest.er1
10446   ac_status=$?
10447   grep -v '^ *+' conftest.er1 >conftest.err
10448   rm -f conftest.er1
10449   cat conftest.err >&5
10450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10451   (exit $ac_status); } && {
10452          test -z "$ac_c_werror_flag" ||
10453          test ! -s conftest.err
10454        } && test -s conftest.$ac_objext; then
10455   ac_header_compiler=yes
10456 else
10457   echo "$as_me: failed program was:" >&5
10458 sed 's/^/| /' conftest.$ac_ext >&5
10459
10460         ac_header_compiler=no
10461 fi
10462
10463 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10464 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10465 echo "${ECHO_T}$ac_header_compiler" >&6; }
10466
10467 # Is the header present?
10468 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
10469 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10470 cat >conftest.$ac_ext <<_ACEOF
10471 /* confdefs.h.  */
10472 _ACEOF
10473 cat confdefs.h >>conftest.$ac_ext
10474 cat >>conftest.$ac_ext <<_ACEOF
10475 /* end confdefs.h.  */
10476 #include <$ac_header>
10477 _ACEOF
10478 if { (ac_try="$ac_cpp conftest.$ac_ext"
10479 case "(($ac_try" in
10480   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10481   *) ac_try_echo=$ac_try;;
10482 esac
10483 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10484   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10485   ac_status=$?
10486   grep -v '^ *+' conftest.er1 >conftest.err
10487   rm -f conftest.er1
10488   cat conftest.err >&5
10489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10490   (exit $ac_status); } >/dev/null && {
10491          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10492          test ! -s conftest.err
10493        }; then
10494   ac_header_preproc=yes
10495 else
10496   echo "$as_me: failed program was:" >&5
10497 sed 's/^/| /' conftest.$ac_ext >&5
10498
10499   ac_header_preproc=no
10500 fi
10501
10502 rm -f conftest.err conftest.$ac_ext
10503 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10504 echo "${ECHO_T}$ac_header_preproc" >&6; }
10505
10506 # So?  What about this header?
10507 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10508   yes:no: )
10509     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10510 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10511     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10512 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10513     ac_header_preproc=yes
10514     ;;
10515   no:yes:* )
10516     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10517 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10518     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10519 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10520     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10521 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10522     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10523 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10524     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10525 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10526     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10527 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10528     ( cat <<\_ASBOX
10529 ## ---------------------------------------- ##
10530 ## Report this to pgsql-bugs@postgresql.org ##
10531 ## ---------------------------------------- ##
10532 _ASBOX
10533      ) | sed "s/^/$as_me: WARNING:     /" >&2
10534     ;;
10535 esac
10536 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10537 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10538 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10539   echo $ECHO_N "(cached) $ECHO_C" >&6
10540 else
10541   eval "$as_ac_Header=\$ac_header_preproc"
10542 fi
10543 ac_res=`eval echo '${'$as_ac_Header'}'`
10544                { echo "$as_me:$LINENO: result: $ac_res" >&5
10545 echo "${ECHO_T}$ac_res" >&6; }
10546
10547 fi
10548 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10549   cat >>confdefs.h <<_ACEOF
10550 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10551 _ACEOF
10552
10553 else
10554
10555 for ac_header in gssapi.h
10556 do
10557 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10558 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10559   { echo "$as_me:$LINENO: checking for $ac_header" >&5
10560 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10561 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10562   echo $ECHO_N "(cached) $ECHO_C" >&6
10563 fi
10564 ac_res=`eval echo '${'$as_ac_Header'}'`
10565                { echo "$as_me:$LINENO: result: $ac_res" >&5
10566 echo "${ECHO_T}$ac_res" >&6; }
10567 else
10568   # Is the header compilable?
10569 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
10570 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
10571 cat >conftest.$ac_ext <<_ACEOF
10572 /* confdefs.h.  */
10573 _ACEOF
10574 cat confdefs.h >>conftest.$ac_ext
10575 cat >>conftest.$ac_ext <<_ACEOF
10576 /* end confdefs.h.  */
10577 $ac_includes_default
10578 #include <$ac_header>
10579 _ACEOF
10580 rm -f conftest.$ac_objext
10581 if { (ac_try="$ac_compile"
10582 case "(($ac_try" in
10583   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10584   *) ac_try_echo=$ac_try;;
10585 esac
10586 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10587   (eval "$ac_compile") 2>conftest.er1
10588   ac_status=$?
10589   grep -v '^ *+' conftest.er1 >conftest.err
10590   rm -f conftest.er1
10591   cat conftest.err >&5
10592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10593   (exit $ac_status); } && {
10594          test -z "$ac_c_werror_flag" ||
10595          test ! -s conftest.err
10596        } && test -s conftest.$ac_objext; then
10597   ac_header_compiler=yes
10598 else
10599   echo "$as_me: failed program was:" >&5
10600 sed 's/^/| /' conftest.$ac_ext >&5
10601
10602         ac_header_compiler=no
10603 fi
10604
10605 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10606 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10607 echo "${ECHO_T}$ac_header_compiler" >&6; }
10608
10609 # Is the header present?
10610 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
10611 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10612 cat >conftest.$ac_ext <<_ACEOF
10613 /* confdefs.h.  */
10614 _ACEOF
10615 cat confdefs.h >>conftest.$ac_ext
10616 cat >>conftest.$ac_ext <<_ACEOF
10617 /* end confdefs.h.  */
10618 #include <$ac_header>
10619 _ACEOF
10620 if { (ac_try="$ac_cpp conftest.$ac_ext"
10621 case "(($ac_try" in
10622   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10623   *) ac_try_echo=$ac_try;;
10624 esac
10625 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10626   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10627   ac_status=$?
10628   grep -v '^ *+' conftest.er1 >conftest.err
10629   rm -f conftest.er1
10630   cat conftest.err >&5
10631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10632   (exit $ac_status); } >/dev/null && {
10633          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10634          test ! -s conftest.err
10635        }; then
10636   ac_header_preproc=yes
10637 else
10638   echo "$as_me: failed program was:" >&5
10639 sed 's/^/| /' conftest.$ac_ext >&5
10640
10641   ac_header_preproc=no
10642 fi
10643
10644 rm -f conftest.err conftest.$ac_ext
10645 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10646 echo "${ECHO_T}$ac_header_preproc" >&6; }
10647
10648 # So?  What about this header?
10649 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10650   yes:no: )
10651     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10652 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10653     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10654 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10655     ac_header_preproc=yes
10656     ;;
10657   no:yes:* )
10658     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10659 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10660     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10661 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10662     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10663 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10664     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10665 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10666     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10667 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10668     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10669 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10670     ( cat <<\_ASBOX
10671 ## ---------------------------------------- ##
10672 ## Report this to pgsql-bugs@postgresql.org ##
10673 ## ---------------------------------------- ##
10674 _ASBOX
10675      ) | sed "s/^/$as_me: WARNING:     /" >&2
10676     ;;
10677 esac
10678 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10679 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10680 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10681   echo $ECHO_N "(cached) $ECHO_C" >&6
10682 else
10683   eval "$as_ac_Header=\$ac_header_preproc"
10684 fi
10685 ac_res=`eval echo '${'$as_ac_Header'}'`
10686                { echo "$as_me:$LINENO: result: $ac_res" >&5
10687 echo "${ECHO_T}$ac_res" >&6; }
10688
10689 fi
10690 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10691   cat >>confdefs.h <<_ACEOF
10692 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10693 _ACEOF
10694
10695 else
10696   { { echo "$as_me:$LINENO: error: gssapi.h header file is required for GSSAPI" >&5
10697 echo "$as_me: error: gssapi.h header file is required for GSSAPI" >&2;}
10698    { (exit 1); exit 1; }; }
10699 fi
10700
10701 done
10702
10703 fi
10704
10705 done
10706
10707 fi
10708
10709 if test "$with_krb5" = yes ; then
10710   if test "${ac_cv_header_krb5_h+set}" = set; then
10711   { echo "$as_me:$LINENO: checking for krb5.h" >&5
10712 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6; }
10713 if test "${ac_cv_header_krb5_h+set}" = set; then
10714   echo $ECHO_N "(cached) $ECHO_C" >&6
10715 fi
10716 { echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
10717 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6; }
10718 else
10719   # Is the header compilable?
10720 { echo "$as_me:$LINENO: checking krb5.h usability" >&5
10721 echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6; }
10722 cat >conftest.$ac_ext <<_ACEOF
10723 /* confdefs.h.  */
10724 _ACEOF
10725 cat confdefs.h >>conftest.$ac_ext
10726 cat >>conftest.$ac_ext <<_ACEOF
10727 /* end confdefs.h.  */
10728 $ac_includes_default
10729 #include <krb5.h>
10730 _ACEOF
10731 rm -f conftest.$ac_objext
10732 if { (ac_try="$ac_compile"
10733 case "(($ac_try" in
10734   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10735   *) ac_try_echo=$ac_try;;
10736 esac
10737 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10738   (eval "$ac_compile") 2>conftest.er1
10739   ac_status=$?
10740   grep -v '^ *+' conftest.er1 >conftest.err
10741   rm -f conftest.er1
10742   cat conftest.err >&5
10743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10744   (exit $ac_status); } && {
10745          test -z "$ac_c_werror_flag" ||
10746          test ! -s conftest.err
10747        } && test -s conftest.$ac_objext; then
10748   ac_header_compiler=yes
10749 else
10750   echo "$as_me: failed program was:" >&5
10751 sed 's/^/| /' conftest.$ac_ext >&5
10752
10753         ac_header_compiler=no
10754 fi
10755
10756 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10757 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10758 echo "${ECHO_T}$ac_header_compiler" >&6; }
10759
10760 # Is the header present?
10761 { echo "$as_me:$LINENO: checking krb5.h presence" >&5
10762 echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6; }
10763 cat >conftest.$ac_ext <<_ACEOF
10764 /* confdefs.h.  */
10765 _ACEOF
10766 cat confdefs.h >>conftest.$ac_ext
10767 cat >>conftest.$ac_ext <<_ACEOF
10768 /* end confdefs.h.  */
10769 #include <krb5.h>
10770 _ACEOF
10771 if { (ac_try="$ac_cpp conftest.$ac_ext"
10772 case "(($ac_try" in
10773   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10774   *) ac_try_echo=$ac_try;;
10775 esac
10776 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10777   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10778   ac_status=$?
10779   grep -v '^ *+' conftest.er1 >conftest.err
10780   rm -f conftest.er1
10781   cat conftest.err >&5
10782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10783   (exit $ac_status); } >/dev/null && {
10784          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10785          test ! -s conftest.err
10786        }; then
10787   ac_header_preproc=yes
10788 else
10789   echo "$as_me: failed program was:" >&5
10790 sed 's/^/| /' conftest.$ac_ext >&5
10791
10792   ac_header_preproc=no
10793 fi
10794
10795 rm -f conftest.err conftest.$ac_ext
10796 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10797 echo "${ECHO_T}$ac_header_preproc" >&6; }
10798
10799 # So?  What about this header?
10800 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10801   yes:no: )
10802     { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
10803 echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10804     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the compiler's result" >&5
10805 echo "$as_me: WARNING: krb5.h: proceeding with the compiler's result" >&2;}
10806     ac_header_preproc=yes
10807     ;;
10808   no:yes:* )
10809     { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
10810 echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
10811     { echo "$as_me:$LINENO: WARNING: krb5.h:     check for missing prerequisite headers?" >&5
10812 echo "$as_me: WARNING: krb5.h:     check for missing prerequisite headers?" >&2;}
10813     { echo "$as_me:$LINENO: WARNING: krb5.h: see the Autoconf documentation" >&5
10814 echo "$as_me: WARNING: krb5.h: see the Autoconf documentation" >&2;}
10815     { echo "$as_me:$LINENO: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
10816 echo "$as_me: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10817     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
10818 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
10819     { echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
10820 echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
10821     ( cat <<\_ASBOX
10822 ## ---------------------------------------- ##
10823 ## Report this to pgsql-bugs@postgresql.org ##
10824 ## ---------------------------------------- ##
10825 _ASBOX
10826      ) | sed "s/^/$as_me: WARNING:     /" >&2
10827     ;;
10828 esac
10829 { echo "$as_me:$LINENO: checking for krb5.h" >&5
10830 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6; }
10831 if test "${ac_cv_header_krb5_h+set}" = set; then
10832   echo $ECHO_N "(cached) $ECHO_C" >&6
10833 else
10834   ac_cv_header_krb5_h=$ac_header_preproc
10835 fi
10836 { echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
10837 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6; }
10838
10839 fi
10840 if test $ac_cv_header_krb5_h = yes; then
10841   :
10842 else
10843   { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
10844 echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
10845    { (exit 1); exit 1; }; }
10846 fi
10847
10848
10849 fi
10850
10851 if test "$with_openssl" = yes ; then
10852   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10853   { echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
10854 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6; }
10855 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10856   echo $ECHO_N "(cached) $ECHO_C" >&6
10857 fi
10858 { echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
10859 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6; }
10860 else
10861   # Is the header compilable?
10862 { echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
10863 echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6; }
10864 cat >conftest.$ac_ext <<_ACEOF
10865 /* confdefs.h.  */
10866 _ACEOF
10867 cat confdefs.h >>conftest.$ac_ext
10868 cat >>conftest.$ac_ext <<_ACEOF
10869 /* end confdefs.h.  */
10870 $ac_includes_default
10871 #include <openssl/ssl.h>
10872 _ACEOF
10873 rm -f conftest.$ac_objext
10874 if { (ac_try="$ac_compile"
10875 case "(($ac_try" in
10876   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10877   *) ac_try_echo=$ac_try;;
10878 esac
10879 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10880   (eval "$ac_compile") 2>conftest.er1
10881   ac_status=$?
10882   grep -v '^ *+' conftest.er1 >conftest.err
10883   rm -f conftest.er1
10884   cat conftest.err >&5
10885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10886   (exit $ac_status); } && {
10887          test -z "$ac_c_werror_flag" ||
10888          test ! -s conftest.err
10889        } && test -s conftest.$ac_objext; then
10890   ac_header_compiler=yes
10891 else
10892   echo "$as_me: failed program was:" >&5
10893 sed 's/^/| /' conftest.$ac_ext >&5
10894
10895         ac_header_compiler=no
10896 fi
10897
10898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10899 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10900 echo "${ECHO_T}$ac_header_compiler" >&6; }
10901
10902 # Is the header present?
10903 { echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
10904 echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6; }
10905 cat >conftest.$ac_ext <<_ACEOF
10906 /* confdefs.h.  */
10907 _ACEOF
10908 cat confdefs.h >>conftest.$ac_ext
10909 cat >>conftest.$ac_ext <<_ACEOF
10910 /* end confdefs.h.  */
10911 #include <openssl/ssl.h>
10912 _ACEOF
10913 if { (ac_try="$ac_cpp conftest.$ac_ext"
10914 case "(($ac_try" in
10915   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10916   *) ac_try_echo=$ac_try;;
10917 esac
10918 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10919   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10920   ac_status=$?
10921   grep -v '^ *+' conftest.er1 >conftest.err
10922   rm -f conftest.er1
10923   cat conftest.err >&5
10924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10925   (exit $ac_status); } >/dev/null && {
10926          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10927          test ! -s conftest.err
10928        }; then
10929   ac_header_preproc=yes
10930 else
10931   echo "$as_me: failed program was:" >&5
10932 sed 's/^/| /' conftest.$ac_ext >&5
10933
10934   ac_header_preproc=no
10935 fi
10936
10937 rm -f conftest.err conftest.$ac_ext
10938 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10939 echo "${ECHO_T}$ac_header_preproc" >&6; }
10940
10941 # So?  What about this header?
10942 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10943   yes:no: )
10944     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
10945 echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10946     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
10947 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
10948     ac_header_preproc=yes
10949     ;;
10950   no:yes:* )
10951     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
10952 echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
10953     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
10954 echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
10955     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
10956 echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
10957     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
10958 echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10959     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
10960 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
10961     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
10962 echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
10963     ( cat <<\_ASBOX
10964 ## ---------------------------------------- ##
10965 ## Report this to pgsql-bugs@postgresql.org ##
10966 ## ---------------------------------------- ##
10967 _ASBOX
10968      ) | sed "s/^/$as_me: WARNING:     /" >&2
10969     ;;
10970 esac
10971 { echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
10972 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6; }
10973 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10974   echo $ECHO_N "(cached) $ECHO_C" >&6
10975 else
10976   ac_cv_header_openssl_ssl_h=$ac_header_preproc
10977 fi
10978 { echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
10979 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6; }
10980
10981 fi
10982 if test $ac_cv_header_openssl_ssl_h = yes; then
10983   :
10984 else
10985   { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
10986 echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
10987    { (exit 1); exit 1; }; }
10988 fi
10989
10990
10991   if test "${ac_cv_header_openssl_err_h+set}" = set; then
10992   { echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10993 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6; }
10994 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10995   echo $ECHO_N "(cached) $ECHO_C" >&6
10996 fi
10997 { echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10998 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6; }
10999 else
11000   # Is the header compilable?
11001 { echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
11002 echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6; }
11003 cat >conftest.$ac_ext <<_ACEOF
11004 /* confdefs.h.  */
11005 _ACEOF
11006 cat confdefs.h >>conftest.$ac_ext
11007 cat >>conftest.$ac_ext <<_ACEOF
11008 /* end confdefs.h.  */
11009 $ac_includes_default
11010 #include <openssl/err.h>
11011 _ACEOF
11012 rm -f conftest.$ac_objext
11013 if { (ac_try="$ac_compile"
11014 case "(($ac_try" in
11015   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11016   *) ac_try_echo=$ac_try;;
11017 esac
11018 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11019   (eval "$ac_compile") 2>conftest.er1
11020   ac_status=$?
11021   grep -v '^ *+' conftest.er1 >conftest.err
11022   rm -f conftest.er1
11023   cat conftest.err >&5
11024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11025   (exit $ac_status); } && {
11026          test -z "$ac_c_werror_flag" ||
11027          test ! -s conftest.err
11028        } && test -s conftest.$ac_objext; then
11029   ac_header_compiler=yes
11030 else
11031   echo "$as_me: failed program was:" >&5
11032 sed 's/^/| /' conftest.$ac_ext >&5
11033
11034         ac_header_compiler=no
11035 fi
11036
11037 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11038 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11039 echo "${ECHO_T}$ac_header_compiler" >&6; }
11040
11041 # Is the header present?
11042 { echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
11043 echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6; }
11044 cat >conftest.$ac_ext <<_ACEOF
11045 /* confdefs.h.  */
11046 _ACEOF
11047 cat confdefs.h >>conftest.$ac_ext
11048 cat >>conftest.$ac_ext <<_ACEOF
11049 /* end confdefs.h.  */
11050 #include <openssl/err.h>
11051 _ACEOF
11052 if { (ac_try="$ac_cpp conftest.$ac_ext"
11053 case "(($ac_try" in
11054   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11055   *) ac_try_echo=$ac_try;;
11056 esac
11057 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11058   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11059   ac_status=$?
11060   grep -v '^ *+' conftest.er1 >conftest.err
11061   rm -f conftest.er1
11062   cat conftest.err >&5
11063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11064   (exit $ac_status); } >/dev/null && {
11065          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11066          test ! -s conftest.err
11067        }; then
11068   ac_header_preproc=yes
11069 else
11070   echo "$as_me: failed program was:" >&5
11071 sed 's/^/| /' conftest.$ac_ext >&5
11072
11073   ac_header_preproc=no
11074 fi
11075
11076 rm -f conftest.err conftest.$ac_ext
11077 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11078 echo "${ECHO_T}$ac_header_preproc" >&6; }
11079
11080 # So?  What about this header?
11081 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11082   yes:no: )
11083     { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
11084 echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11085     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5
11086 echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;}
11087     ac_header_preproc=yes
11088     ;;
11089   no:yes:* )
11090     { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
11091 echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
11092     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&5
11093 echo "$as_me: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&2;}
11094     { echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5
11095 echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;}
11096     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&5
11097 echo "$as_me: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&2;}
11098     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
11099 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;}
11100     { echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5
11101 echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;}
11102     ( cat <<\_ASBOX
11103 ## ---------------------------------------- ##
11104 ## Report this to pgsql-bugs@postgresql.org ##
11105 ## ---------------------------------------- ##
11106 _ASBOX
11107      ) | sed "s/^/$as_me: WARNING:     /" >&2
11108     ;;
11109 esac
11110 { echo "$as_me:$LINENO: checking for openssl/err.h" >&5
11111 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6; }
11112 if test "${ac_cv_header_openssl_err_h+set}" = set; then
11113   echo $ECHO_N "(cached) $ECHO_C" >&6
11114 else
11115   ac_cv_header_openssl_err_h=$ac_header_preproc
11116 fi
11117 { echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
11118 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6; }
11119
11120 fi
11121 if test $ac_cv_header_openssl_err_h = yes; then
11122   :
11123 else
11124   { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
11125 echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
11126    { (exit 1); exit 1; }; }
11127 fi
11128
11129
11130
11131 for ac_func in ERR_set_mark
11132 do
11133 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11134 { echo "$as_me:$LINENO: checking for $ac_func" >&5
11135 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11136 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
11137   echo $ECHO_N "(cached) $ECHO_C" >&6
11138 else
11139   cat >conftest.$ac_ext <<_ACEOF
11140 /* confdefs.h.  */
11141 _ACEOF
11142 cat confdefs.h >>conftest.$ac_ext
11143 cat >>conftest.$ac_ext <<_ACEOF
11144 /* end confdefs.h.  */
11145 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11146    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11147 #define $ac_func innocuous_$ac_func
11148
11149 /* System header to define __stub macros and hopefully few prototypes,
11150     which can conflict with char $ac_func (); below.
11151     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11152     <limits.h> exists even on freestanding compilers.  */
11153
11154 #ifdef __STDC__
11155 # include <limits.h>
11156 #else
11157 # include <assert.h>
11158 #endif
11159
11160 #undef $ac_func
11161
11162 /* Override any GCC internal prototype to avoid an error.
11163    Use char because int might match the return type of a GCC
11164    builtin and then its argument prototype would still apply.  */
11165 #ifdef __cplusplus
11166 extern "C"
11167 #endif
11168 char $ac_func ();
11169 /* The GNU C library defines this for functions which it implements
11170     to always fail with ENOSYS.  Some functions are actually named
11171     something starting with __ and the normal name is an alias.  */
11172 #if defined __stub_$ac_func || defined __stub___$ac_func
11173 choke me
11174 #endif
11175
11176 int
11177 main ()
11178 {
11179 return $ac_func ();
11180   ;
11181   return 0;
11182 }
11183 _ACEOF
11184 rm -f conftest.$ac_objext conftest$ac_exeext
11185 if { (ac_try="$ac_link"
11186 case "(($ac_try" in
11187   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11188   *) ac_try_echo=$ac_try;;
11189 esac
11190 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11191   (eval "$ac_link") 2>conftest.er1
11192   ac_status=$?
11193   grep -v '^ *+' conftest.er1 >conftest.err
11194   rm -f conftest.er1
11195   cat conftest.err >&5
11196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11197   (exit $ac_status); } && {
11198          test -z "$ac_c_werror_flag" ||
11199          test ! -s conftest.err
11200        } && test -s conftest$ac_exeext &&
11201        $as_test_x conftest$ac_exeext; then
11202   eval "$as_ac_var=yes"
11203 else
11204   echo "$as_me: failed program was:" >&5
11205 sed 's/^/| /' conftest.$ac_ext >&5
11206
11207         eval "$as_ac_var=no"
11208 fi
11209
11210 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11211       conftest$ac_exeext conftest.$ac_ext
11212 fi
11213 ac_res=`eval echo '${'$as_ac_var'}'`
11214                { echo "$as_me:$LINENO: result: $ac_res" >&5
11215 echo "${ECHO_T}$ac_res" >&6; }
11216 if test `eval echo '${'$as_ac_var'}'` = yes; then
11217   cat >>confdefs.h <<_ACEOF
11218 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11219 _ACEOF
11220
11221 fi
11222 done
11223
11224 fi
11225
11226 if test "$with_pam" = yes ; then
11227
11228 for ac_header in security/pam_appl.h
11229 do
11230 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11231 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11232   { echo "$as_me:$LINENO: checking for $ac_header" >&5
11233 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11234 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11235   echo $ECHO_N "(cached) $ECHO_C" >&6
11236 fi
11237 ac_res=`eval echo '${'$as_ac_Header'}'`
11238                { echo "$as_me:$LINENO: result: $ac_res" >&5
11239 echo "${ECHO_T}$ac_res" >&6; }
11240 else
11241   # Is the header compilable?
11242 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
11243 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
11244 cat >conftest.$ac_ext <<_ACEOF
11245 /* confdefs.h.  */
11246 _ACEOF
11247 cat confdefs.h >>conftest.$ac_ext
11248 cat >>conftest.$ac_ext <<_ACEOF
11249 /* end confdefs.h.  */
11250 $ac_includes_default
11251 #include <$ac_header>
11252 _ACEOF
11253 rm -f conftest.$ac_objext
11254 if { (ac_try="$ac_compile"
11255 case "(($ac_try" in
11256   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11257   *) ac_try_echo=$ac_try;;
11258 esac
11259 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11260   (eval "$ac_compile") 2>conftest.er1
11261   ac_status=$?
11262   grep -v '^ *+' conftest.er1 >conftest.err
11263   rm -f conftest.er1
11264   cat conftest.err >&5
11265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11266   (exit $ac_status); } && {
11267          test -z "$ac_c_werror_flag" ||
11268          test ! -s conftest.err
11269        } && test -s conftest.$ac_objext; then
11270   ac_header_compiler=yes
11271 else
11272   echo "$as_me: failed program was:" >&5
11273 sed 's/^/| /' conftest.$ac_ext >&5
11274
11275         ac_header_compiler=no
11276 fi
11277
11278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11279 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11280 echo "${ECHO_T}$ac_header_compiler" >&6; }
11281
11282 # Is the header present?
11283 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
11284 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
11285 cat >conftest.$ac_ext <<_ACEOF
11286 /* confdefs.h.  */
11287 _ACEOF
11288 cat confdefs.h >>conftest.$ac_ext
11289 cat >>conftest.$ac_ext <<_ACEOF
11290 /* end confdefs.h.  */
11291 #include <$ac_header>
11292 _ACEOF
11293 if { (ac_try="$ac_cpp conftest.$ac_ext"
11294 case "(($ac_try" in
11295   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11296   *) ac_try_echo=$ac_try;;
11297 esac
11298 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11299   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11300   ac_status=$?
11301   grep -v '^ *+' conftest.er1 >conftest.err
11302   rm -f conftest.er1
11303   cat conftest.err >&5
11304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11305   (exit $ac_status); } >/dev/null && {
11306          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11307          test ! -s conftest.err
11308        }; then
11309   ac_header_preproc=yes
11310 else
11311   echo "$as_me: failed program was:" >&5
11312 sed 's/^/| /' conftest.$ac_ext >&5
11313
11314   ac_header_preproc=no
11315 fi
11316
11317 rm -f conftest.err conftest.$ac_ext
11318 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11319 echo "${ECHO_T}$ac_header_preproc" >&6; }
11320
11321 # So?  What about this header?
11322 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11323   yes:no: )
11324     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11325 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11326     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11327 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11328     ac_header_preproc=yes
11329     ;;
11330   no:yes:* )
11331     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11332 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11333     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11334 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11335     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11336 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11337     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11338 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11339     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11340 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11341     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11342 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11343     ( cat <<\_ASBOX
11344 ## ---------------------------------------- ##
11345 ## Report this to pgsql-bugs@postgresql.org ##
11346 ## ---------------------------------------- ##
11347 _ASBOX
11348      ) | sed "s/^/$as_me: WARNING:     /" >&2
11349     ;;
11350 esac
11351 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11352 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11353 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11354   echo $ECHO_N "(cached) $ECHO_C" >&6
11355 else
11356   eval "$as_ac_Header=\$ac_header_preproc"
11357 fi
11358 ac_res=`eval echo '${'$as_ac_Header'}'`
11359                { echo "$as_me:$LINENO: result: $ac_res" >&5
11360 echo "${ECHO_T}$ac_res" >&6; }
11361
11362 fi
11363 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11364   cat >>confdefs.h <<_ACEOF
11365 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11366 _ACEOF
11367
11368 else
11369
11370 for ac_header in pam/pam_appl.h
11371 do
11372 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11373 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11374   { echo "$as_me:$LINENO: checking for $ac_header" >&5
11375 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11376 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11377   echo $ECHO_N "(cached) $ECHO_C" >&6
11378 fi
11379 ac_res=`eval echo '${'$as_ac_Header'}'`
11380                { echo "$as_me:$LINENO: result: $ac_res" >&5
11381 echo "${ECHO_T}$ac_res" >&6; }
11382 else
11383   # Is the header compilable?
11384 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
11385 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
11386 cat >conftest.$ac_ext <<_ACEOF
11387 /* confdefs.h.  */
11388 _ACEOF
11389 cat confdefs.h >>conftest.$ac_ext
11390 cat >>conftest.$ac_ext <<_ACEOF
11391 /* end confdefs.h.  */
11392 $ac_includes_default
11393 #include <$ac_header>
11394 _ACEOF
11395 rm -f conftest.$ac_objext
11396 if { (ac_try="$ac_compile"
11397 case "(($ac_try" in
11398   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11399   *) ac_try_echo=$ac_try;;
11400 esac
11401 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11402   (eval "$ac_compile") 2>conftest.er1
11403   ac_status=$?
11404   grep -v '^ *+' conftest.er1 >conftest.err
11405   rm -f conftest.er1
11406   cat conftest.err >&5
11407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11408   (exit $ac_status); } && {
11409          test -z "$ac_c_werror_flag" ||
11410          test ! -s conftest.err
11411        } && test -s conftest.$ac_objext; then
11412   ac_header_compiler=yes
11413 else
11414   echo "$as_me: failed program was:" >&5
11415 sed 's/^/| /' conftest.$ac_ext >&5
11416
11417         ac_header_compiler=no
11418 fi
11419
11420 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11421 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11422 echo "${ECHO_T}$ac_header_compiler" >&6; }
11423
11424 # Is the header present?
11425 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
11426 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
11427 cat >conftest.$ac_ext <<_ACEOF
11428 /* confdefs.h.  */
11429 _ACEOF
11430 cat confdefs.h >>conftest.$ac_ext
11431 cat >>conftest.$ac_ext <<_ACEOF
11432 /* end confdefs.h.  */
11433 #include <$ac_header>
11434 _ACEOF
11435 if { (ac_try="$ac_cpp conftest.$ac_ext"
11436 case "(($ac_try" in
11437   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11438   *) ac_try_echo=$ac_try;;
11439 esac
11440 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11441   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11442   ac_status=$?
11443   grep -v '^ *+' conftest.er1 >conftest.err
11444   rm -f conftest.er1
11445   cat conftest.err >&5
11446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11447   (exit $ac_status); } >/dev/null && {
11448          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11449          test ! -s conftest.err
11450        }; then
11451   ac_header_preproc=yes
11452 else
11453   echo "$as_me: failed program was:" >&5
11454 sed 's/^/| /' conftest.$ac_ext >&5
11455
11456   ac_header_preproc=no
11457 fi
11458
11459 rm -f conftest.err conftest.$ac_ext
11460 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11461 echo "${ECHO_T}$ac_header_preproc" >&6; }
11462
11463 # So?  What about this header?
11464 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11465   yes:no: )
11466     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11467 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11468     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11469 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11470     ac_header_preproc=yes
11471     ;;
11472   no:yes:* )
11473     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11474 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11475     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11476 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11477     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11478 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11479     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11480 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11481     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11482 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11483     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11484 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11485     ( cat <<\_ASBOX
11486 ## ---------------------------------------- ##
11487 ## Report this to pgsql-bugs@postgresql.org ##
11488 ## ---------------------------------------- ##
11489 _ASBOX
11490      ) | sed "s/^/$as_me: WARNING:     /" >&2
11491     ;;
11492 esac
11493 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11494 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11495 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11496   echo $ECHO_N "(cached) $ECHO_C" >&6
11497 else
11498   eval "$as_ac_Header=\$ac_header_preproc"
11499 fi
11500 ac_res=`eval echo '${'$as_ac_Header'}'`
11501                { echo "$as_me:$LINENO: result: $ac_res" >&5
11502 echo "${ECHO_T}$ac_res" >&6; }
11503
11504 fi
11505 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11506   cat >>confdefs.h <<_ACEOF
11507 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11508 _ACEOF
11509
11510 else
11511   { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
11512 echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
11513    { (exit 1); exit 1; }; }
11514 fi
11515
11516 done
11517
11518 fi
11519
11520 done
11521
11522 fi
11523
11524 if test "$with_libxml" = yes ; then
11525   if test "${ac_cv_header_libxml_parser_h+set}" = set; then
11526   { echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
11527 echo $ECHO_N "checking for libxml/parser.h... $ECHO_C" >&6; }
11528 if test "${ac_cv_header_libxml_parser_h+set}" = set; then
11529   echo $ECHO_N "(cached) $ECHO_C" >&6
11530 fi
11531 { echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
11532 echo "${ECHO_T}$ac_cv_header_libxml_parser_h" >&6; }
11533 else
11534   # Is the header compilable?
11535 { echo "$as_me:$LINENO: checking libxml/parser.h usability" >&5
11536 echo $ECHO_N "checking libxml/parser.h usability... $ECHO_C" >&6; }
11537 cat >conftest.$ac_ext <<_ACEOF
11538 /* confdefs.h.  */
11539 _ACEOF
11540 cat confdefs.h >>conftest.$ac_ext
11541 cat >>conftest.$ac_ext <<_ACEOF
11542 /* end confdefs.h.  */
11543 $ac_includes_default
11544 #include <libxml/parser.h>
11545 _ACEOF
11546 rm -f conftest.$ac_objext
11547 if { (ac_try="$ac_compile"
11548 case "(($ac_try" in
11549   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11550   *) ac_try_echo=$ac_try;;
11551 esac
11552 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11553   (eval "$ac_compile") 2>conftest.er1
11554   ac_status=$?
11555   grep -v '^ *+' conftest.er1 >conftest.err
11556   rm -f conftest.er1
11557   cat conftest.err >&5
11558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11559   (exit $ac_status); } && {
11560          test -z "$ac_c_werror_flag" ||
11561          test ! -s conftest.err
11562        } && test -s conftest.$ac_objext; then
11563   ac_header_compiler=yes
11564 else
11565   echo "$as_me: failed program was:" >&5
11566 sed 's/^/| /' conftest.$ac_ext >&5
11567
11568         ac_header_compiler=no
11569 fi
11570
11571 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11572 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11573 echo "${ECHO_T}$ac_header_compiler" >&6; }
11574
11575 # Is the header present?
11576 { echo "$as_me:$LINENO: checking libxml/parser.h presence" >&5
11577 echo $ECHO_N "checking libxml/parser.h presence... $ECHO_C" >&6; }
11578 cat >conftest.$ac_ext <<_ACEOF
11579 /* confdefs.h.  */
11580 _ACEOF
11581 cat confdefs.h >>conftest.$ac_ext
11582 cat >>conftest.$ac_ext <<_ACEOF
11583 /* end confdefs.h.  */
11584 #include <libxml/parser.h>
11585 _ACEOF
11586 if { (ac_try="$ac_cpp conftest.$ac_ext"
11587 case "(($ac_try" in
11588   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11589   *) ac_try_echo=$ac_try;;
11590 esac
11591 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11592   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11593   ac_status=$?
11594   grep -v '^ *+' conftest.er1 >conftest.err
11595   rm -f conftest.er1
11596   cat conftest.err >&5
11597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11598   (exit $ac_status); } >/dev/null && {
11599          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11600          test ! -s conftest.err
11601        }; then
11602   ac_header_preproc=yes
11603 else
11604   echo "$as_me: failed program was:" >&5
11605 sed 's/^/| /' conftest.$ac_ext >&5
11606
11607   ac_header_preproc=no
11608 fi
11609
11610 rm -f conftest.err conftest.$ac_ext
11611 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11612 echo "${ECHO_T}$ac_header_preproc" >&6; }
11613
11614 # So?  What about this header?
11615 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11616   yes:no: )
11617     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&5
11618 echo "$as_me: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11619     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the compiler's result" >&5
11620 echo "$as_me: WARNING: libxml/parser.h: proceeding with the compiler's result" >&2;}
11621     ac_header_preproc=yes
11622     ;;
11623   no:yes:* )
11624     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: present but cannot be compiled" >&5
11625 echo "$as_me: WARNING: libxml/parser.h: present but cannot be compiled" >&2;}
11626     { echo "$as_me:$LINENO: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&5
11627 echo "$as_me: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&2;}
11628     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: see the Autoconf documentation" >&5
11629 echo "$as_me: WARNING: libxml/parser.h: see the Autoconf documentation" >&2;}
11630     { echo "$as_me:$LINENO: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&5
11631 echo "$as_me: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&2;}
11632     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&5
11633 echo "$as_me: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&2;}
11634     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&5
11635 echo "$as_me: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&2;}
11636     ( cat <<\_ASBOX
11637 ## ---------------------------------------- ##
11638 ## Report this to pgsql-bugs@postgresql.org ##
11639 ## ---------------------------------------- ##
11640 _ASBOX
11641      ) | sed "s/^/$as_me: WARNING:     /" >&2
11642     ;;
11643 esac
11644 { echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
11645 echo $ECHO_N "checking for libxml/parser.h... $ECHO_C" >&6; }
11646 if test "${ac_cv_header_libxml_parser_h+set}" = set; then
11647   echo $ECHO_N "(cached) $ECHO_C" >&6
11648 else
11649   ac_cv_header_libxml_parser_h=$ac_header_preproc
11650 fi
11651 { echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
11652 echo "${ECHO_T}$ac_cv_header_libxml_parser_h" >&6; }
11653
11654 fi
11655 if test $ac_cv_header_libxml_parser_h = yes; then
11656   :
11657 else
11658   { { echo "$as_me:$LINENO: error: header file <libxml/parser.h> is required for XML support" >&5
11659 echo "$as_me: error: header file <libxml/parser.h> is required for XML support" >&2;}
11660    { (exit 1); exit 1; }; }
11661 fi
11662
11663
11664 fi
11665
11666 if test "$with_libxslt" = yes ; then
11667   if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
11668   { echo "$as_me:$LINENO: checking for libxslt/xslt.h" >&5
11669 echo $ECHO_N "checking for libxslt/xslt.h... $ECHO_C" >&6; }
11670 if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
11671   echo $ECHO_N "(cached) $ECHO_C" >&6
11672 fi
11673 { echo "$as_me:$LINENO: result: $ac_cv_header_libxslt_xslt_h" >&5
11674 echo "${ECHO_T}$ac_cv_header_libxslt_xslt_h" >&6; }
11675 else
11676   # Is the header compilable?
11677 { echo "$as_me:$LINENO: checking libxslt/xslt.h usability" >&5
11678 echo $ECHO_N "checking libxslt/xslt.h usability... $ECHO_C" >&6; }
11679 cat >conftest.$ac_ext <<_ACEOF
11680 /* confdefs.h.  */
11681 _ACEOF
11682 cat confdefs.h >>conftest.$ac_ext
11683 cat >>conftest.$ac_ext <<_ACEOF
11684 /* end confdefs.h.  */
11685 $ac_includes_default
11686 #include <libxslt/xslt.h>
11687 _ACEOF
11688 rm -f conftest.$ac_objext
11689 if { (ac_try="$ac_compile"
11690 case "(($ac_try" in
11691   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11692   *) ac_try_echo=$ac_try;;
11693 esac
11694 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11695   (eval "$ac_compile") 2>conftest.er1
11696   ac_status=$?
11697   grep -v '^ *+' conftest.er1 >conftest.err
11698   rm -f conftest.er1
11699   cat conftest.err >&5
11700   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11701   (exit $ac_status); } && {
11702          test -z "$ac_c_werror_flag" ||
11703          test ! -s conftest.err
11704        } && test -s conftest.$ac_objext; then
11705   ac_header_compiler=yes
11706 else
11707   echo "$as_me: failed program was:" >&5
11708 sed 's/^/| /' conftest.$ac_ext >&5
11709
11710         ac_header_compiler=no
11711 fi
11712
11713 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11714 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11715 echo "${ECHO_T}$ac_header_compiler" >&6; }
11716
11717 # Is the header present?
11718 { echo "$as_me:$LINENO: checking libxslt/xslt.h presence" >&5
11719 echo $ECHO_N "checking libxslt/xslt.h presence... $ECHO_C" >&6; }
11720 cat >conftest.$ac_ext <<_ACEOF
11721 /* confdefs.h.  */
11722 _ACEOF
11723 cat confdefs.h >>conftest.$ac_ext
11724 cat >>conftest.$ac_ext <<_ACEOF
11725 /* end confdefs.h.  */
11726 #include <libxslt/xslt.h>
11727 _ACEOF
11728 if { (ac_try="$ac_cpp conftest.$ac_ext"
11729 case "(($ac_try" in
11730   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11731   *) ac_try_echo=$ac_try;;
11732 esac
11733 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11734   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11735   ac_status=$?
11736   grep -v '^ *+' conftest.er1 >conftest.err
11737   rm -f conftest.er1
11738   cat conftest.err >&5
11739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11740   (exit $ac_status); } >/dev/null && {
11741          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11742          test ! -s conftest.err
11743        }; then
11744   ac_header_preproc=yes
11745 else
11746   echo "$as_me: failed program was:" >&5
11747 sed 's/^/| /' conftest.$ac_ext >&5
11748
11749   ac_header_preproc=no
11750 fi
11751
11752 rm -f conftest.err conftest.$ac_ext
11753 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11754 echo "${ECHO_T}$ac_header_preproc" >&6; }
11755
11756 # So?  What about this header?
11757 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11758   yes:no: )
11759     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: accepted by the compiler, rejected by the preprocessor!" >&5
11760 echo "$as_me: WARNING: libxslt/xslt.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11761     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: proceeding with the compiler's result" >&5
11762 echo "$as_me: WARNING: libxslt/xslt.h: proceeding with the compiler's result" >&2;}
11763     ac_header_preproc=yes
11764     ;;
11765   no:yes:* )
11766     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: present but cannot be compiled" >&5
11767 echo "$as_me: WARNING: libxslt/xslt.h: present but cannot be compiled" >&2;}
11768     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h:     check for missing prerequisite headers?" >&5
11769 echo "$as_me: WARNING: libxslt/xslt.h:     check for missing prerequisite headers?" >&2;}
11770     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: see the Autoconf documentation" >&5
11771 echo "$as_me: WARNING: libxslt/xslt.h: see the Autoconf documentation" >&2;}
11772     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h:     section \"Present But Cannot Be Compiled\"" >&5
11773 echo "$as_me: WARNING: libxslt/xslt.h:     section \"Present But Cannot Be Compiled\"" >&2;}
11774     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: proceeding with the preprocessor's result" >&5
11775 echo "$as_me: WARNING: libxslt/xslt.h: proceeding with the preprocessor's result" >&2;}
11776     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: in the future, the compiler will take precedence" >&5
11777 echo "$as_me: WARNING: libxslt/xslt.h: in the future, the compiler will take precedence" >&2;}
11778     ( cat <<\_ASBOX
11779 ## ---------------------------------------- ##
11780 ## Report this to pgsql-bugs@postgresql.org ##
11781 ## ---------------------------------------- ##
11782 _ASBOX
11783      ) | sed "s/^/$as_me: WARNING:     /" >&2
11784     ;;
11785 esac
11786 { echo "$as_me:$LINENO: checking for libxslt/xslt.h" >&5
11787 echo $ECHO_N "checking for libxslt/xslt.h... $ECHO_C" >&6; }
11788 if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
11789   echo $ECHO_N "(cached) $ECHO_C" >&6
11790 else
11791   ac_cv_header_libxslt_xslt_h=$ac_header_preproc
11792 fi
11793 { echo "$as_me:$LINENO: result: $ac_cv_header_libxslt_xslt_h" >&5
11794 echo "${ECHO_T}$ac_cv_header_libxslt_xslt_h" >&6; }
11795
11796 fi
11797 if test $ac_cv_header_libxslt_xslt_h = yes; then
11798   :
11799 else
11800   { { echo "$as_me:$LINENO: error: header file <libxslt/xslt.h> is required for XSLT support" >&5
11801 echo "$as_me: error: header file <libxslt/xslt.h> is required for XSLT support" >&2;}
11802    { (exit 1); exit 1; }; }
11803 fi
11804
11805
11806 fi
11807
11808 if test "$with_ldap" = yes ; then
11809   if test "$PORTNAME" != "win32"; then
11810
11811 for ac_header in ldap.h
11812 do
11813 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11814 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11815   { echo "$as_me:$LINENO: checking for $ac_header" >&5
11816 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11817 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11818   echo $ECHO_N "(cached) $ECHO_C" >&6
11819 fi
11820 ac_res=`eval echo '${'$as_ac_Header'}'`
11821                { echo "$as_me:$LINENO: result: $ac_res" >&5
11822 echo "${ECHO_T}$ac_res" >&6; }
11823 else
11824   # Is the header compilable?
11825 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
11826 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
11827 cat >conftest.$ac_ext <<_ACEOF
11828 /* confdefs.h.  */
11829 _ACEOF
11830 cat confdefs.h >>conftest.$ac_ext
11831 cat >>conftest.$ac_ext <<_ACEOF
11832 /* end confdefs.h.  */
11833 $ac_includes_default
11834 #include <$ac_header>
11835 _ACEOF
11836 rm -f conftest.$ac_objext
11837 if { (ac_try="$ac_compile"
11838 case "(($ac_try" in
11839   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11840   *) ac_try_echo=$ac_try;;
11841 esac
11842 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11843   (eval "$ac_compile") 2>conftest.er1
11844   ac_status=$?
11845   grep -v '^ *+' conftest.er1 >conftest.err
11846   rm -f conftest.er1
11847   cat conftest.err >&5
11848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11849   (exit $ac_status); } && {
11850          test -z "$ac_c_werror_flag" ||
11851          test ! -s conftest.err
11852        } && test -s conftest.$ac_objext; then
11853   ac_header_compiler=yes
11854 else
11855   echo "$as_me: failed program was:" >&5
11856 sed 's/^/| /' conftest.$ac_ext >&5
11857
11858         ac_header_compiler=no
11859 fi
11860
11861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11862 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11863 echo "${ECHO_T}$ac_header_compiler" >&6; }
11864
11865 # Is the header present?
11866 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
11867 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
11868 cat >conftest.$ac_ext <<_ACEOF
11869 /* confdefs.h.  */
11870 _ACEOF
11871 cat confdefs.h >>conftest.$ac_ext
11872 cat >>conftest.$ac_ext <<_ACEOF
11873 /* end confdefs.h.  */
11874 #include <$ac_header>
11875 _ACEOF
11876 if { (ac_try="$ac_cpp conftest.$ac_ext"
11877 case "(($ac_try" in
11878   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11879   *) ac_try_echo=$ac_try;;
11880 esac
11881 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11882   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11883   ac_status=$?
11884   grep -v '^ *+' conftest.er1 >conftest.err
11885   rm -f conftest.er1
11886   cat conftest.err >&5
11887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11888   (exit $ac_status); } >/dev/null && {
11889          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11890          test ! -s conftest.err
11891        }; then
11892   ac_header_preproc=yes
11893 else
11894   echo "$as_me: failed program was:" >&5
11895 sed 's/^/| /' conftest.$ac_ext >&5
11896
11897   ac_header_preproc=no
11898 fi
11899
11900 rm -f conftest.err conftest.$ac_ext
11901 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11902 echo "${ECHO_T}$ac_header_preproc" >&6; }
11903
11904 # So?  What about this header?
11905 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11906   yes:no: )
11907     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11908 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11909     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11910 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11911     ac_header_preproc=yes
11912     ;;
11913   no:yes:* )
11914     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11915 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11916     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11917 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11918     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11919 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11920     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11921 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11922     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11923 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11924     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11925 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11926     ( cat <<\_ASBOX
11927 ## ---------------------------------------- ##
11928 ## Report this to pgsql-bugs@postgresql.org ##
11929 ## ---------------------------------------- ##
11930 _ASBOX
11931      ) | sed "s/^/$as_me: WARNING:     /" >&2
11932     ;;
11933 esac
11934 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11935 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11936 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11937   echo $ECHO_N "(cached) $ECHO_C" >&6
11938 else
11939   eval "$as_ac_Header=\$ac_header_preproc"
11940 fi
11941 ac_res=`eval echo '${'$as_ac_Header'}'`
11942                { echo "$as_me:$LINENO: result: $ac_res" >&5
11943 echo "${ECHO_T}$ac_res" >&6; }
11944
11945 fi
11946 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11947   cat >>confdefs.h <<_ACEOF
11948 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11949 _ACEOF
11950
11951 else
11952   { { echo "$as_me:$LINENO: error: header file <ldap.h> is required for LDAP" >&5
11953 echo "$as_me: error: header file <ldap.h> is required for LDAP" >&2;}
11954    { (exit 1); exit 1; }; }
11955 fi
11956
11957 done
11958
11959   else
11960
11961 for ac_header in winldap.h
11962 do
11963 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11964 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11965 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11966 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11967   echo $ECHO_N "(cached) $ECHO_C" >&6
11968 else
11969   cat >conftest.$ac_ext <<_ACEOF
11970 /* confdefs.h.  */
11971 _ACEOF
11972 cat confdefs.h >>conftest.$ac_ext
11973 cat >>conftest.$ac_ext <<_ACEOF
11974 /* end confdefs.h.  */
11975 $ac_includes_default
11976 #include <windows.h>
11977
11978
11979 #include <$ac_header>
11980 _ACEOF
11981 rm -f conftest.$ac_objext
11982 if { (ac_try="$ac_compile"
11983 case "(($ac_try" in
11984   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11985   *) ac_try_echo=$ac_try;;
11986 esac
11987 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11988   (eval "$ac_compile") 2>conftest.er1
11989   ac_status=$?
11990   grep -v '^ *+' conftest.er1 >conftest.err
11991   rm -f conftest.er1
11992   cat conftest.err >&5
11993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11994   (exit $ac_status); } && {
11995          test -z "$ac_c_werror_flag" ||
11996          test ! -s conftest.err
11997        } && test -s conftest.$ac_objext; then
11998   eval "$as_ac_Header=yes"
11999 else
12000   echo "$as_me: failed program was:" >&5
12001 sed 's/^/| /' conftest.$ac_ext >&5
12002
12003         eval "$as_ac_Header=no"
12004 fi
12005
12006 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12007 fi
12008 ac_res=`eval echo '${'$as_ac_Header'}'`
12009                { echo "$as_me:$LINENO: result: $ac_res" >&5
12010 echo "${ECHO_T}$ac_res" >&6; }
12011 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12012   cat >>confdefs.h <<_ACEOF
12013 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12014 _ACEOF
12015
12016 else
12017   { { echo "$as_me:$LINENO: error: header file <winldap.h> is required for LDAP" >&5
12018 echo "$as_me: error: header file <winldap.h> is required for LDAP" >&2;}
12019    { (exit 1); exit 1; }; }
12020 fi
12021
12022 done
12023
12024   fi
12025 fi
12026
12027 if test "$with_bonjour" = yes ; then
12028   if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
12029   { echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
12030 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6; }
12031 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
12032   echo $ECHO_N "(cached) $ECHO_C" >&6
12033 fi
12034 { echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
12035 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6; }
12036 else
12037   # Is the header compilable?
12038 { echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h usability" >&5
12039 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h usability... $ECHO_C" >&6; }
12040 cat >conftest.$ac_ext <<_ACEOF
12041 /* confdefs.h.  */
12042 _ACEOF
12043 cat confdefs.h >>conftest.$ac_ext
12044 cat >>conftest.$ac_ext <<_ACEOF
12045 /* end confdefs.h.  */
12046 $ac_includes_default
12047 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
12048 _ACEOF
12049 rm -f conftest.$ac_objext
12050 if { (ac_try="$ac_compile"
12051 case "(($ac_try" in
12052   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12053   *) ac_try_echo=$ac_try;;
12054 esac
12055 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12056   (eval "$ac_compile") 2>conftest.er1
12057   ac_status=$?
12058   grep -v '^ *+' conftest.er1 >conftest.err
12059   rm -f conftest.er1
12060   cat conftest.err >&5
12061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12062   (exit $ac_status); } && {
12063          test -z "$ac_c_werror_flag" ||
12064          test ! -s conftest.err
12065        } && test -s conftest.$ac_objext; then
12066   ac_header_compiler=yes
12067 else
12068   echo "$as_me: failed program was:" >&5
12069 sed 's/^/| /' conftest.$ac_ext >&5
12070
12071         ac_header_compiler=no
12072 fi
12073
12074 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12075 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12076 echo "${ECHO_T}$ac_header_compiler" >&6; }
12077
12078 # Is the header present?
12079 { echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h presence" >&5
12080 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h presence... $ECHO_C" >&6; }
12081 cat >conftest.$ac_ext <<_ACEOF
12082 /* confdefs.h.  */
12083 _ACEOF
12084 cat confdefs.h >>conftest.$ac_ext
12085 cat >>conftest.$ac_ext <<_ACEOF
12086 /* end confdefs.h.  */
12087 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
12088 _ACEOF
12089 if { (ac_try="$ac_cpp conftest.$ac_ext"
12090 case "(($ac_try" in
12091   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12092   *) ac_try_echo=$ac_try;;
12093 esac
12094 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12095   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12096   ac_status=$?
12097   grep -v '^ *+' conftest.er1 >conftest.err
12098   rm -f conftest.er1
12099   cat conftest.err >&5
12100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12101   (exit $ac_status); } >/dev/null && {
12102          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12103          test ! -s conftest.err
12104        }; then
12105   ac_header_preproc=yes
12106 else
12107   echo "$as_me: failed program was:" >&5
12108 sed 's/^/| /' conftest.$ac_ext >&5
12109
12110   ac_header_preproc=no
12111 fi
12112
12113 rm -f conftest.err conftest.$ac_ext
12114 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12115 echo "${ECHO_T}$ac_header_preproc" >&6; }
12116
12117 # So?  What about this header?
12118 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12119   yes:no: )
12120     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&5
12121 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12122     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&5
12123 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&2;}
12124     ac_header_preproc=yes
12125     ;;
12126   no:yes:* )
12127     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&5
12128 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&2;}
12129     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&5
12130 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&2;}
12131     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&5
12132 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&2;}
12133     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&5
12134 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&2;}
12135     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
12136 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;}
12137     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&5
12138 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&2;}
12139     ( cat <<\_ASBOX
12140 ## ---------------------------------------- ##
12141 ## Report this to pgsql-bugs@postgresql.org ##
12142 ## ---------------------------------------- ##
12143 _ASBOX
12144      ) | sed "s/^/$as_me: WARNING:     /" >&2
12145     ;;
12146 esac
12147 { echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
12148 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6; }
12149 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
12150   echo $ECHO_N "(cached) $ECHO_C" >&6
12151 else
12152   ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h=$ac_header_preproc
12153 fi
12154 { echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
12155 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6; }
12156
12157 fi
12158 if test $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h = yes; then
12159   :
12160 else
12161   { { echo "$as_me:$LINENO: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&5
12162 echo "$as_me: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&2;}
12163    { (exit 1); exit 1; }; }
12164 fi
12165
12166
12167 fi
12168
12169 # for contrib/uuid-ossp
12170 if test "$with_ossp_uuid" = yes ; then
12171
12172 for ac_header in ossp/uuid.h
12173 do
12174 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12175 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12176   { echo "$as_me:$LINENO: checking for $ac_header" >&5
12177 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12178 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12179   echo $ECHO_N "(cached) $ECHO_C" >&6
12180 fi
12181 ac_res=`eval echo '${'$as_ac_Header'}'`
12182                { echo "$as_me:$LINENO: result: $ac_res" >&5
12183 echo "${ECHO_T}$ac_res" >&6; }
12184 else
12185   # Is the header compilable?
12186 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
12187 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
12188 cat >conftest.$ac_ext <<_ACEOF
12189 /* confdefs.h.  */
12190 _ACEOF
12191 cat confdefs.h >>conftest.$ac_ext
12192 cat >>conftest.$ac_ext <<_ACEOF
12193 /* end confdefs.h.  */
12194 $ac_includes_default
12195 #include <$ac_header>
12196 _ACEOF
12197 rm -f conftest.$ac_objext
12198 if { (ac_try="$ac_compile"
12199 case "(($ac_try" in
12200   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12201   *) ac_try_echo=$ac_try;;
12202 esac
12203 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12204   (eval "$ac_compile") 2>conftest.er1
12205   ac_status=$?
12206   grep -v '^ *+' conftest.er1 >conftest.err
12207   rm -f conftest.er1
12208   cat conftest.err >&5
12209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12210   (exit $ac_status); } && {
12211          test -z "$ac_c_werror_flag" ||
12212          test ! -s conftest.err
12213        } && test -s conftest.$ac_objext; then
12214   ac_header_compiler=yes
12215 else
12216   echo "$as_me: failed program was:" >&5
12217 sed 's/^/| /' conftest.$ac_ext >&5
12218
12219         ac_header_compiler=no
12220 fi
12221
12222 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12223 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12224 echo "${ECHO_T}$ac_header_compiler" >&6; }
12225
12226 # Is the header present?
12227 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
12228 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
12229 cat >conftest.$ac_ext <<_ACEOF
12230 /* confdefs.h.  */
12231 _ACEOF
12232 cat confdefs.h >>conftest.$ac_ext
12233 cat >>conftest.$ac_ext <<_ACEOF
12234 /* end confdefs.h.  */
12235 #include <$ac_header>
12236 _ACEOF
12237 if { (ac_try="$ac_cpp conftest.$ac_ext"
12238 case "(($ac_try" in
12239   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12240   *) ac_try_echo=$ac_try;;
12241 esac
12242 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12243   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12244   ac_status=$?
12245   grep -v '^ *+' conftest.er1 >conftest.err
12246   rm -f conftest.er1
12247   cat conftest.err >&5
12248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12249   (exit $ac_status); } >/dev/null && {
12250          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12251          test ! -s conftest.err
12252        }; then
12253   ac_header_preproc=yes
12254 else
12255   echo "$as_me: failed program was:" >&5
12256 sed 's/^/| /' conftest.$ac_ext >&5
12257
12258   ac_header_preproc=no
12259 fi
12260
12261 rm -f conftest.err conftest.$ac_ext
12262 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12263 echo "${ECHO_T}$ac_header_preproc" >&6; }
12264
12265 # So?  What about this header?
12266 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12267   yes:no: )
12268     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12269 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12270     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12271 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12272     ac_header_preproc=yes
12273     ;;
12274   no:yes:* )
12275     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12276 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12277     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12278 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12279     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12280 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12281     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12282 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12283     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12284 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12285     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12286 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12287     ( cat <<\_ASBOX
12288 ## ---------------------------------------- ##
12289 ## Report this to pgsql-bugs@postgresql.org ##
12290 ## ---------------------------------------- ##
12291 _ASBOX
12292      ) | sed "s/^/$as_me: WARNING:     /" >&2
12293     ;;
12294 esac
12295 { echo "$as_me:$LINENO: checking for $ac_header" >&5
12296 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12297 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12298   echo $ECHO_N "(cached) $ECHO_C" >&6
12299 else
12300   eval "$as_ac_Header=\$ac_header_preproc"
12301 fi
12302 ac_res=`eval echo '${'$as_ac_Header'}'`
12303                { echo "$as_me:$LINENO: result: $ac_res" >&5
12304 echo "${ECHO_T}$ac_res" >&6; }
12305
12306 fi
12307 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12308   cat >>confdefs.h <<_ACEOF
12309 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12310 _ACEOF
12311
12312 else
12313
12314
12315 for ac_header in uuid.h
12316 do
12317 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12318 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12319   { echo "$as_me:$LINENO: checking for $ac_header" >&5
12320 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12321 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12322   echo $ECHO_N "(cached) $ECHO_C" >&6
12323 fi
12324 ac_res=`eval echo '${'$as_ac_Header'}'`
12325                { echo "$as_me:$LINENO: result: $ac_res" >&5
12326 echo "${ECHO_T}$ac_res" >&6; }
12327 else
12328   # Is the header compilable?
12329 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
12330 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
12331 cat >conftest.$ac_ext <<_ACEOF
12332 /* confdefs.h.  */
12333 _ACEOF
12334 cat confdefs.h >>conftest.$ac_ext
12335 cat >>conftest.$ac_ext <<_ACEOF
12336 /* end confdefs.h.  */
12337 $ac_includes_default
12338 #include <$ac_header>
12339 _ACEOF
12340 rm -f conftest.$ac_objext
12341 if { (ac_try="$ac_compile"
12342 case "(($ac_try" in
12343   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12344   *) ac_try_echo=$ac_try;;
12345 esac
12346 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12347   (eval "$ac_compile") 2>conftest.er1
12348   ac_status=$?
12349   grep -v '^ *+' conftest.er1 >conftest.err
12350   rm -f conftest.er1
12351   cat conftest.err >&5
12352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12353   (exit $ac_status); } && {
12354          test -z "$ac_c_werror_flag" ||
12355          test ! -s conftest.err
12356        } && test -s conftest.$ac_objext; then
12357   ac_header_compiler=yes
12358 else
12359   echo "$as_me: failed program was:" >&5
12360 sed 's/^/| /' conftest.$ac_ext >&5
12361
12362         ac_header_compiler=no
12363 fi
12364
12365 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12366 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12367 echo "${ECHO_T}$ac_header_compiler" >&6; }
12368
12369 # Is the header present?
12370 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
12371 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
12372 cat >conftest.$ac_ext <<_ACEOF
12373 /* confdefs.h.  */
12374 _ACEOF
12375 cat confdefs.h >>conftest.$ac_ext
12376 cat >>conftest.$ac_ext <<_ACEOF
12377 /* end confdefs.h.  */
12378 #include <$ac_header>
12379 _ACEOF
12380 if { (ac_try="$ac_cpp conftest.$ac_ext"
12381 case "(($ac_try" in
12382   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12383   *) ac_try_echo=$ac_try;;
12384 esac
12385 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12386   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12387   ac_status=$?
12388   grep -v '^ *+' conftest.er1 >conftest.err
12389   rm -f conftest.er1
12390   cat conftest.err >&5
12391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12392   (exit $ac_status); } >/dev/null && {
12393          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12394          test ! -s conftest.err
12395        }; then
12396   ac_header_preproc=yes
12397 else
12398   echo "$as_me: failed program was:" >&5
12399 sed 's/^/| /' conftest.$ac_ext >&5
12400
12401   ac_header_preproc=no
12402 fi
12403
12404 rm -f conftest.err conftest.$ac_ext
12405 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12406 echo "${ECHO_T}$ac_header_preproc" >&6; }
12407
12408 # So?  What about this header?
12409 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12410   yes:no: )
12411     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12412 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12413     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12414 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12415     ac_header_preproc=yes
12416     ;;
12417   no:yes:* )
12418     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12419 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12420     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12421 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12422     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12423 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12424     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12425 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12426     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12427 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12428     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12429 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12430     ( cat <<\_ASBOX
12431 ## ---------------------------------------- ##
12432 ## Report this to pgsql-bugs@postgresql.org ##
12433 ## ---------------------------------------- ##
12434 _ASBOX
12435      ) | sed "s/^/$as_me: WARNING:     /" >&2
12436     ;;
12437 esac
12438 { echo "$as_me:$LINENO: checking for $ac_header" >&5
12439 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12440 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12441   echo $ECHO_N "(cached) $ECHO_C" >&6
12442 else
12443   eval "$as_ac_Header=\$ac_header_preproc"
12444 fi
12445 ac_res=`eval echo '${'$as_ac_Header'}'`
12446                { echo "$as_me:$LINENO: result: $ac_res" >&5
12447 echo "${ECHO_T}$ac_res" >&6; }
12448
12449 fi
12450 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12451   cat >>confdefs.h <<_ACEOF
12452 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12453 _ACEOF
12454
12455 else
12456   { { echo "$as_me:$LINENO: error: header file <ossp/uuid.h> or <uuid.h> is required for OSSP-UUID" >&5
12457 echo "$as_me: error: header file <ossp/uuid.h> or <uuid.h> is required for OSSP-UUID" >&2;}
12458    { (exit 1); exit 1; }; }
12459 fi
12460
12461 done
12462
12463 fi
12464
12465 done
12466
12467 fi
12468
12469
12470 ##
12471 ## Types, structures, compiler characteristics
12472 ##
12473
12474  { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
12475 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
12476 if test "${ac_cv_c_bigendian+set}" = set; then
12477   echo $ECHO_N "(cached) $ECHO_C" >&6
12478 else
12479   # See if sys/param.h defines the BYTE_ORDER macro.
12480 cat >conftest.$ac_ext <<_ACEOF
12481 /* confdefs.h.  */
12482 _ACEOF
12483 cat confdefs.h >>conftest.$ac_ext
12484 cat >>conftest.$ac_ext <<_ACEOF
12485 /* end confdefs.h.  */
12486 #include <sys/types.h>
12487 #include <sys/param.h>
12488
12489 int
12490 main ()
12491 {
12492 #if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
12493         && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
12494  bogus endian macros
12495 #endif
12496
12497   ;
12498   return 0;
12499 }
12500 _ACEOF
12501 rm -f conftest.$ac_objext
12502 if { (ac_try="$ac_compile"
12503 case "(($ac_try" in
12504   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12505   *) ac_try_echo=$ac_try;;
12506 esac
12507 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12508   (eval "$ac_compile") 2>conftest.er1
12509   ac_status=$?
12510   grep -v '^ *+' conftest.er1 >conftest.err
12511   rm -f conftest.er1
12512   cat conftest.err >&5
12513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12514   (exit $ac_status); } && {
12515          test -z "$ac_c_werror_flag" ||
12516          test ! -s conftest.err
12517        } && test -s conftest.$ac_objext; then
12518   # It does; now see whether it defined to BIG_ENDIAN or not.
12519 cat >conftest.$ac_ext <<_ACEOF
12520 /* confdefs.h.  */
12521 _ACEOF
12522 cat confdefs.h >>conftest.$ac_ext
12523 cat >>conftest.$ac_ext <<_ACEOF
12524 /* end confdefs.h.  */
12525 #include <sys/types.h>
12526 #include <sys/param.h>
12527
12528 int
12529 main ()
12530 {
12531 #if BYTE_ORDER != BIG_ENDIAN
12532  not big endian
12533 #endif
12534
12535   ;
12536   return 0;
12537 }
12538 _ACEOF
12539 rm -f conftest.$ac_objext
12540 if { (ac_try="$ac_compile"
12541 case "(($ac_try" in
12542   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12543   *) ac_try_echo=$ac_try;;
12544 esac
12545 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12546   (eval "$ac_compile") 2>conftest.er1
12547   ac_status=$?
12548   grep -v '^ *+' conftest.er1 >conftest.err
12549   rm -f conftest.er1
12550   cat conftest.err >&5
12551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12552   (exit $ac_status); } && {
12553          test -z "$ac_c_werror_flag" ||
12554          test ! -s conftest.err
12555        } && test -s conftest.$ac_objext; then
12556   ac_cv_c_bigendian=yes
12557 else
12558   echo "$as_me: failed program was:" >&5
12559 sed 's/^/| /' conftest.$ac_ext >&5
12560
12561         ac_cv_c_bigendian=no
12562 fi
12563
12564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12565 else
12566   echo "$as_me: failed program was:" >&5
12567 sed 's/^/| /' conftest.$ac_ext >&5
12568
12569         # It does not; compile a test program.
12570 if test "$cross_compiling" = yes; then
12571   # try to guess the endianness by grepping values into an object file
12572   ac_cv_c_bigendian=unknown
12573   cat >conftest.$ac_ext <<_ACEOF
12574 /* confdefs.h.  */
12575 _ACEOF
12576 cat confdefs.h >>conftest.$ac_ext
12577 cat >>conftest.$ac_ext <<_ACEOF
12578 /* end confdefs.h.  */
12579 short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12580 short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12581 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
12582 short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12583 short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12584 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
12585 int
12586 main ()
12587 {
12588  _ascii (); _ebcdic ();
12589   ;
12590   return 0;
12591 }
12592 _ACEOF
12593 rm -f conftest.$ac_objext
12594 if { (ac_try="$ac_compile"
12595 case "(($ac_try" in
12596   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12597   *) ac_try_echo=$ac_try;;
12598 esac
12599 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12600   (eval "$ac_compile") 2>conftest.er1
12601   ac_status=$?
12602   grep -v '^ *+' conftest.er1 >conftest.err
12603   rm -f conftest.er1
12604   cat conftest.err >&5
12605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12606   (exit $ac_status); } && {
12607          test -z "$ac_c_werror_flag" ||
12608          test ! -s conftest.err
12609        } && test -s conftest.$ac_objext; then
12610   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
12611   ac_cv_c_bigendian=yes
12612 fi
12613 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12614   if test "$ac_cv_c_bigendian" = unknown; then
12615     ac_cv_c_bigendian=no
12616   else
12617     # finding both strings is unlikely to happen, but who knows?
12618     ac_cv_c_bigendian=unknown
12619   fi
12620 fi
12621 else
12622   echo "$as_me: failed program was:" >&5
12623 sed 's/^/| /' conftest.$ac_ext >&5
12624
12625
12626 fi
12627
12628 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12629 else
12630   cat >conftest.$ac_ext <<_ACEOF
12631 /* confdefs.h.  */
12632 _ACEOF
12633 cat confdefs.h >>conftest.$ac_ext
12634 cat >>conftest.$ac_ext <<_ACEOF
12635 /* end confdefs.h.  */
12636 $ac_includes_default
12637 int
12638 main ()
12639 {
12640
12641   /* Are we little or big endian?  From Harbison&Steele.  */
12642   union
12643   {
12644     long int l;
12645     char c[sizeof (long int)];
12646   } u;
12647   u.l = 1;
12648   return u.c[sizeof (long int) - 1] == 1;
12649
12650   ;
12651   return 0;
12652 }
12653 _ACEOF
12654 rm -f conftest$ac_exeext
12655 if { (ac_try="$ac_link"
12656 case "(($ac_try" in
12657   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12658   *) ac_try_echo=$ac_try;;
12659 esac
12660 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12661   (eval "$ac_link") 2>&5
12662   ac_status=$?
12663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12664   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12665   { (case "(($ac_try" in
12666   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12667   *) ac_try_echo=$ac_try;;
12668 esac
12669 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12670   (eval "$ac_try") 2>&5
12671   ac_status=$?
12672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12673   (exit $ac_status); }; }; then
12674   ac_cv_c_bigendian=no
12675 else
12676   echo "$as_me: program exited with status $ac_status" >&5
12677 echo "$as_me: failed program was:" >&5
12678 sed 's/^/| /' conftest.$ac_ext >&5
12679
12680 ( exit $ac_status )
12681 ac_cv_c_bigendian=yes
12682 fi
12683 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12684 fi
12685
12686
12687 fi
12688
12689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12690 fi
12691 { echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
12692 echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
12693 case $ac_cv_c_bigendian in
12694   yes)
12695
12696 cat >>confdefs.h <<\_ACEOF
12697 #define WORDS_BIGENDIAN 1
12698 _ACEOF
12699  ;;
12700   no)
12701      ;;
12702   *)
12703     { { echo "$as_me:$LINENO: error: unknown endianness
12704 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
12705 echo "$as_me: error: unknown endianness
12706 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
12707    { (exit 1); exit 1; }; } ;;
12708 esac
12709
12710 { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
12711 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
12712 if test "${ac_cv_c_const+set}" = set; then
12713   echo $ECHO_N "(cached) $ECHO_C" >&6
12714 else
12715   cat >conftest.$ac_ext <<_ACEOF
12716 /* confdefs.h.  */
12717 _ACEOF
12718 cat confdefs.h >>conftest.$ac_ext
12719 cat >>conftest.$ac_ext <<_ACEOF
12720 /* end confdefs.h.  */
12721
12722 int
12723 main ()
12724 {
12725 /* FIXME: Include the comments suggested by Paul. */
12726 #ifndef __cplusplus
12727   /* Ultrix mips cc rejects this.  */
12728   typedef int charset[2];
12729   const charset cs;
12730   /* SunOS 4.1.1 cc rejects this.  */
12731   char const *const *pcpcc;
12732   char **ppc;
12733   /* NEC SVR4.0.2 mips cc rejects this.  */
12734   struct point {int x, y;};
12735   static struct point const zero = {0,0};
12736   /* AIX XL C 1.02.0.0 rejects this.
12737      It does not let you subtract one const X* pointer from another in
12738      an arm of an if-expression whose if-part is not a constant
12739      expression */
12740   const char *g = "string";
12741   pcpcc = &g + (g ? g-g : 0);
12742   /* HPUX 7.0 cc rejects these. */
12743   ++pcpcc;
12744   ppc = (char**) pcpcc;
12745   pcpcc = (char const *const *) ppc;
12746   { /* SCO 3.2v4 cc rejects this.  */
12747     char *t;
12748     char const *s = 0 ? (char *) 0 : (char const *) 0;
12749
12750     *t++ = 0;
12751     if (s) return 0;
12752   }
12753   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
12754     int x[] = {25, 17};
12755     const int *foo = &x[0];
12756     ++foo;
12757   }
12758   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12759     typedef const int *iptr;
12760     iptr p = 0;
12761     ++p;
12762   }
12763   { /* AIX XL C 1.02.0.0 rejects this saying
12764        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12765     struct s { int j; const int *ap[3]; };
12766     struct s *b; b->j = 5;
12767   }
12768   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12769     const int foo = 10;
12770     if (!foo) return 0;
12771   }
12772   return !cs[0] && !zero.x;
12773 #endif
12774
12775   ;
12776   return 0;
12777 }
12778 _ACEOF
12779 rm -f conftest.$ac_objext
12780 if { (ac_try="$ac_compile"
12781 case "(($ac_try" in
12782   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12783   *) ac_try_echo=$ac_try;;
12784 esac
12785 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12786   (eval "$ac_compile") 2>conftest.er1
12787   ac_status=$?
12788   grep -v '^ *+' conftest.er1 >conftest.err
12789   rm -f conftest.er1
12790   cat conftest.err >&5
12791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12792   (exit $ac_status); } && {
12793          test -z "$ac_c_werror_flag" ||
12794          test ! -s conftest.err
12795        } && test -s conftest.$ac_objext; then
12796   ac_cv_c_const=yes
12797 else
12798   echo "$as_me: failed program was:" >&5
12799 sed 's/^/| /' conftest.$ac_ext >&5
12800
12801         ac_cv_c_const=no
12802 fi
12803
12804 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12805 fi
12806 { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
12807 echo "${ECHO_T}$ac_cv_c_const" >&6; }
12808 if test $ac_cv_c_const = no; then
12809
12810 cat >>confdefs.h <<\_ACEOF
12811 #define const
12812 _ACEOF
12813
12814 fi
12815
12816 { echo "$as_me:$LINENO: checking for inline" >&5
12817 echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
12818 if test "${ac_cv_c_inline+set}" = set; then
12819   echo $ECHO_N "(cached) $ECHO_C" >&6
12820 else
12821   ac_cv_c_inline=no
12822 for ac_kw in inline __inline__ __inline; do
12823   cat >conftest.$ac_ext <<_ACEOF
12824 /* confdefs.h.  */
12825 _ACEOF
12826 cat confdefs.h >>conftest.$ac_ext
12827 cat >>conftest.$ac_ext <<_ACEOF
12828 /* end confdefs.h.  */
12829 #ifndef __cplusplus
12830 typedef int foo_t;
12831 static $ac_kw foo_t static_foo () {return 0; }
12832 $ac_kw foo_t foo () {return 0; }
12833 #endif
12834
12835 _ACEOF
12836 rm -f conftest.$ac_objext
12837 if { (ac_try="$ac_compile"
12838 case "(($ac_try" in
12839   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12840   *) ac_try_echo=$ac_try;;
12841 esac
12842 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12843   (eval "$ac_compile") 2>conftest.er1
12844   ac_status=$?
12845   grep -v '^ *+' conftest.er1 >conftest.err
12846   rm -f conftest.er1
12847   cat conftest.err >&5
12848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12849   (exit $ac_status); } && {
12850          test -z "$ac_c_werror_flag" ||
12851          test ! -s conftest.err
12852        } && test -s conftest.$ac_objext; then
12853   ac_cv_c_inline=$ac_kw
12854 else
12855   echo "$as_me: failed program was:" >&5
12856 sed 's/^/| /' conftest.$ac_ext >&5
12857
12858
12859 fi
12860
12861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12862   test "$ac_cv_c_inline" != no && break
12863 done
12864
12865 fi
12866 { echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
12867 echo "${ECHO_T}$ac_cv_c_inline" >&6; }
12868
12869
12870 case $ac_cv_c_inline in
12871   inline | yes) ;;
12872   *)
12873     case $ac_cv_c_inline in
12874       no) ac_val=;;
12875       *) ac_val=$ac_cv_c_inline;;
12876     esac
12877     cat >>confdefs.h <<_ACEOF
12878 #ifndef __cplusplus
12879 #define inline $ac_val
12880 #endif
12881 _ACEOF
12882     ;;
12883 esac
12884
12885 { echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
12886 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6; }
12887 if test "${ac_cv_c_stringize+set}" = set; then
12888   echo $ECHO_N "(cached) $ECHO_C" >&6
12889 else
12890   cat >conftest.$ac_ext <<_ACEOF
12891 /* confdefs.h.  */
12892 _ACEOF
12893 cat confdefs.h >>conftest.$ac_ext
12894 cat >>conftest.$ac_ext <<_ACEOF
12895 /* end confdefs.h.  */
12896 #define x(y) #y
12897
12898 char *s = x(teststring);
12899 _ACEOF
12900 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12901   $EGREP "#teststring" >/dev/null 2>&1; then
12902   ac_cv_c_stringize=no
12903 else
12904   ac_cv_c_stringize=yes
12905 fi
12906 rm -f conftest*
12907
12908 fi
12909 { echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
12910 echo "${ECHO_T}$ac_cv_c_stringize" >&6; }
12911 if test $ac_cv_c_stringize = yes; then
12912
12913 cat >>confdefs.h <<\_ACEOF
12914 #define HAVE_STRINGIZE 1
12915 _ACEOF
12916
12917 fi
12918
12919 { echo "$as_me:$LINENO: checking for signed types" >&5
12920 echo $ECHO_N "checking for signed types... $ECHO_C" >&6; }
12921 if test "${pgac_cv_c_signed+set}" = set; then
12922   echo $ECHO_N "(cached) $ECHO_C" >&6
12923 else
12924   cat >conftest.$ac_ext <<_ACEOF
12925 /* confdefs.h.  */
12926 _ACEOF
12927 cat confdefs.h >>conftest.$ac_ext
12928 cat >>conftest.$ac_ext <<_ACEOF
12929 /* end confdefs.h.  */
12930
12931 int
12932 main ()
12933 {
12934 signed char c; signed short s; signed int i;
12935   ;
12936   return 0;
12937 }
12938 _ACEOF
12939 rm -f conftest.$ac_objext
12940 if { (ac_try="$ac_compile"
12941 case "(($ac_try" in
12942   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12943   *) ac_try_echo=$ac_try;;
12944 esac
12945 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12946   (eval "$ac_compile") 2>conftest.er1
12947   ac_status=$?
12948   grep -v '^ *+' conftest.er1 >conftest.err
12949   rm -f conftest.er1
12950   cat conftest.err >&5
12951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12952   (exit $ac_status); } && {
12953          test -z "$ac_c_werror_flag" ||
12954          test ! -s conftest.err
12955        } && test -s conftest.$ac_objext; then
12956   pgac_cv_c_signed=yes
12957 else
12958   echo "$as_me: failed program was:" >&5
12959 sed 's/^/| /' conftest.$ac_ext >&5
12960
12961         pgac_cv_c_signed=no
12962 fi
12963
12964 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12965 fi
12966 { echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
12967 echo "${ECHO_T}$pgac_cv_c_signed" >&6; }
12968 if test x"$pgac_cv_c_signed" = xno ; then
12969
12970 cat >>confdefs.h <<\_ACEOF
12971 #define signed
12972 _ACEOF
12973
12974 fi
12975 { echo "$as_me:$LINENO: checking for working volatile" >&5
12976 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
12977 if test "${ac_cv_c_volatile+set}" = set; then
12978   echo $ECHO_N "(cached) $ECHO_C" >&6
12979 else
12980   cat >conftest.$ac_ext <<_ACEOF
12981 /* confdefs.h.  */
12982 _ACEOF
12983 cat confdefs.h >>conftest.$ac_ext
12984 cat >>conftest.$ac_ext <<_ACEOF
12985 /* end confdefs.h.  */
12986
12987 int
12988 main ()
12989 {
12990
12991 volatile int x;
12992 int * volatile y = (int *) 0;
12993 return !x && !y;
12994   ;
12995   return 0;
12996 }
12997 _ACEOF
12998 rm -f conftest.$ac_objext
12999 if { (ac_try="$ac_compile"
13000 case "(($ac_try" in
13001   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13002   *) ac_try_echo=$ac_try;;
13003 esac
13004 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13005   (eval "$ac_compile") 2>conftest.er1
13006   ac_status=$?
13007   grep -v '^ *+' conftest.er1 >conftest.err
13008   rm -f conftest.er1
13009   cat conftest.err >&5
13010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13011   (exit $ac_status); } && {
13012          test -z "$ac_c_werror_flag" ||
13013          test ! -s conftest.err
13014        } && test -s conftest.$ac_objext; then
13015   ac_cv_c_volatile=yes
13016 else
13017   echo "$as_me: failed program was:" >&5
13018 sed 's/^/| /' conftest.$ac_ext >&5
13019
13020         ac_cv_c_volatile=no
13021 fi
13022
13023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13024 fi
13025 { echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
13026 echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
13027 if test $ac_cv_c_volatile = no; then
13028
13029 cat >>confdefs.h <<\_ACEOF
13030 #define volatile
13031 _ACEOF
13032
13033 fi
13034
13035 { echo "$as_me:$LINENO: checking for __func__" >&5
13036 echo $ECHO_N "checking for __func__... $ECHO_C" >&6; }
13037 if test "${pgac_cv_funcname_func_support+set}" = set; then
13038   echo $ECHO_N "(cached) $ECHO_C" >&6
13039 else
13040   cat >conftest.$ac_ext <<_ACEOF
13041 /* confdefs.h.  */
13042 _ACEOF
13043 cat confdefs.h >>conftest.$ac_ext
13044 cat >>conftest.$ac_ext <<_ACEOF
13045 /* end confdefs.h.  */
13046 #include <stdio.h>
13047 int
13048 main ()
13049 {
13050 printf("%s\n", __func__);
13051   ;
13052   return 0;
13053 }
13054 _ACEOF
13055 rm -f conftest.$ac_objext
13056 if { (ac_try="$ac_compile"
13057 case "(($ac_try" in
13058   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13059   *) ac_try_echo=$ac_try;;
13060 esac
13061 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13062   (eval "$ac_compile") 2>conftest.er1
13063   ac_status=$?
13064   grep -v '^ *+' conftest.er1 >conftest.err
13065   rm -f conftest.er1
13066   cat conftest.err >&5
13067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13068   (exit $ac_status); } && {
13069          test -z "$ac_c_werror_flag" ||
13070          test ! -s conftest.err
13071        } && test -s conftest.$ac_objext; then
13072   pgac_cv_funcname_func_support=yes
13073 else
13074   echo "$as_me: failed program was:" >&5
13075 sed 's/^/| /' conftest.$ac_ext >&5
13076
13077         pgac_cv_funcname_func_support=no
13078 fi
13079
13080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13081 fi
13082 { echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
13083 echo "${ECHO_T}$pgac_cv_funcname_func_support" >&6; }
13084 if test x"$pgac_cv_funcname_func_support" = xyes ; then
13085
13086 cat >>confdefs.h <<\_ACEOF
13087 #define HAVE_FUNCNAME__FUNC 1
13088 _ACEOF
13089
13090 else
13091 { echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
13092 echo $ECHO_N "checking for __FUNCTION__... $ECHO_C" >&6; }
13093 if test "${pgac_cv_funcname_function_support+set}" = set; then
13094   echo $ECHO_N "(cached) $ECHO_C" >&6
13095 else
13096   cat >conftest.$ac_ext <<_ACEOF
13097 /* confdefs.h.  */
13098 _ACEOF
13099 cat confdefs.h >>conftest.$ac_ext
13100 cat >>conftest.$ac_ext <<_ACEOF
13101 /* end confdefs.h.  */
13102 #include <stdio.h>
13103 int
13104 main ()
13105 {
13106 printf("%s\n", __FUNCTION__);
13107   ;
13108   return 0;
13109 }
13110 _ACEOF
13111 rm -f conftest.$ac_objext
13112 if { (ac_try="$ac_compile"
13113 case "(($ac_try" in
13114   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13115   *) ac_try_echo=$ac_try;;
13116 esac
13117 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13118   (eval "$ac_compile") 2>conftest.er1
13119   ac_status=$?
13120   grep -v '^ *+' conftest.er1 >conftest.err
13121   rm -f conftest.er1
13122   cat conftest.err >&5
13123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13124   (exit $ac_status); } && {
13125          test -z "$ac_c_werror_flag" ||
13126          test ! -s conftest.err
13127        } && test -s conftest.$ac_objext; then
13128   pgac_cv_funcname_function_support=yes
13129 else
13130   echo "$as_me: failed program was:" >&5
13131 sed 's/^/| /' conftest.$ac_ext >&5
13132
13133         pgac_cv_funcname_function_support=no
13134 fi
13135
13136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13137 fi
13138 { echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
13139 echo "${ECHO_T}$pgac_cv_funcname_function_support" >&6; }
13140 if test x"$pgac_cv_funcname_function_support" = xyes ; then
13141
13142 cat >>confdefs.h <<\_ACEOF
13143 #define HAVE_FUNCNAME__FUNCTION 1
13144 _ACEOF
13145
13146 fi
13147 fi
13148 { echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
13149 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
13150 if test "${ac_cv_struct_tm+set}" = set; then
13151   echo $ECHO_N "(cached) $ECHO_C" >&6
13152 else
13153   cat >conftest.$ac_ext <<_ACEOF
13154 /* confdefs.h.  */
13155 _ACEOF
13156 cat confdefs.h >>conftest.$ac_ext
13157 cat >>conftest.$ac_ext <<_ACEOF
13158 /* end confdefs.h.  */
13159 #include <sys/types.h>
13160 #include <time.h>
13161
13162 int
13163 main ()
13164 {
13165 struct tm tm;
13166                                      int *p = &tm.tm_sec;
13167                                      return !p;
13168   ;
13169   return 0;
13170 }
13171 _ACEOF
13172 rm -f conftest.$ac_objext
13173 if { (ac_try="$ac_compile"
13174 case "(($ac_try" in
13175   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13176   *) ac_try_echo=$ac_try;;
13177 esac
13178 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13179   (eval "$ac_compile") 2>conftest.er1
13180   ac_status=$?
13181   grep -v '^ *+' conftest.er1 >conftest.err
13182   rm -f conftest.er1
13183   cat conftest.err >&5
13184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13185   (exit $ac_status); } && {
13186          test -z "$ac_c_werror_flag" ||
13187          test ! -s conftest.err
13188        } && test -s conftest.$ac_objext; then
13189   ac_cv_struct_tm=time.h
13190 else
13191   echo "$as_me: failed program was:" >&5
13192 sed 's/^/| /' conftest.$ac_ext >&5
13193
13194         ac_cv_struct_tm=sys/time.h
13195 fi
13196
13197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13198 fi
13199 { echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
13200 echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
13201 if test $ac_cv_struct_tm = sys/time.h; then
13202
13203 cat >>confdefs.h <<\_ACEOF
13204 #define TM_IN_SYS_TIME 1
13205 _ACEOF
13206
13207 fi
13208
13209 { echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
13210 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
13211 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
13212   echo $ECHO_N "(cached) $ECHO_C" >&6
13213 else
13214   cat >conftest.$ac_ext <<_ACEOF
13215 /* confdefs.h.  */
13216 _ACEOF
13217 cat confdefs.h >>conftest.$ac_ext
13218 cat >>conftest.$ac_ext <<_ACEOF
13219 /* end confdefs.h.  */
13220 #include <sys/types.h>
13221 #include <$ac_cv_struct_tm>
13222
13223
13224 int
13225 main ()
13226 {
13227 static struct tm ac_aggr;
13228 if (ac_aggr.tm_zone)
13229 return 0;
13230   ;
13231   return 0;
13232 }
13233 _ACEOF
13234 rm -f conftest.$ac_objext
13235 if { (ac_try="$ac_compile"
13236 case "(($ac_try" in
13237   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13238   *) ac_try_echo=$ac_try;;
13239 esac
13240 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13241   (eval "$ac_compile") 2>conftest.er1
13242   ac_status=$?
13243   grep -v '^ *+' conftest.er1 >conftest.err
13244   rm -f conftest.er1
13245   cat conftest.err >&5
13246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13247   (exit $ac_status); } && {
13248          test -z "$ac_c_werror_flag" ||
13249          test ! -s conftest.err
13250        } && test -s conftest.$ac_objext; then
13251   ac_cv_member_struct_tm_tm_zone=yes
13252 else
13253   echo "$as_me: failed program was:" >&5
13254 sed 's/^/| /' conftest.$ac_ext >&5
13255
13256         cat >conftest.$ac_ext <<_ACEOF
13257 /* confdefs.h.  */
13258 _ACEOF
13259 cat confdefs.h >>conftest.$ac_ext
13260 cat >>conftest.$ac_ext <<_ACEOF
13261 /* end confdefs.h.  */
13262 #include <sys/types.h>
13263 #include <$ac_cv_struct_tm>
13264
13265
13266 int
13267 main ()
13268 {
13269 static struct tm ac_aggr;
13270 if (sizeof ac_aggr.tm_zone)
13271 return 0;
13272   ;
13273   return 0;
13274 }
13275 _ACEOF
13276 rm -f conftest.$ac_objext
13277 if { (ac_try="$ac_compile"
13278 case "(($ac_try" in
13279   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13280   *) ac_try_echo=$ac_try;;
13281 esac
13282 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13283   (eval "$ac_compile") 2>conftest.er1
13284   ac_status=$?
13285   grep -v '^ *+' conftest.er1 >conftest.err
13286   rm -f conftest.er1
13287   cat conftest.err >&5
13288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13289   (exit $ac_status); } && {
13290          test -z "$ac_c_werror_flag" ||
13291          test ! -s conftest.err
13292        } && test -s conftest.$ac_objext; then
13293   ac_cv_member_struct_tm_tm_zone=yes
13294 else
13295   echo "$as_me: failed program was:" >&5
13296 sed 's/^/| /' conftest.$ac_ext >&5
13297
13298         ac_cv_member_struct_tm_tm_zone=no
13299 fi
13300
13301 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13302 fi
13303
13304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13305 fi
13306 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
13307 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
13308 if test $ac_cv_member_struct_tm_tm_zone = yes; then
13309
13310 cat >>confdefs.h <<_ACEOF
13311 #define HAVE_STRUCT_TM_TM_ZONE 1
13312 _ACEOF
13313
13314
13315 fi
13316
13317 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13318
13319 cat >>confdefs.h <<\_ACEOF
13320 #define HAVE_TM_ZONE 1
13321 _ACEOF
13322
13323 fi
13324 { echo "$as_me:$LINENO: checking for tzname" >&5
13325 echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
13326 if test "${ac_cv_var_tzname+set}" = set; then
13327   echo $ECHO_N "(cached) $ECHO_C" >&6
13328 else
13329   cat >conftest.$ac_ext <<_ACEOF
13330 /* confdefs.h.  */
13331 _ACEOF
13332 cat confdefs.h >>conftest.$ac_ext
13333 cat >>conftest.$ac_ext <<_ACEOF
13334 /* end confdefs.h.  */
13335 #include <time.h>
13336 #ifndef tzname /* For SGI.  */
13337 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
13338 #endif
13339
13340 int
13341 main ()
13342 {
13343 atoi(*tzname);
13344   ;
13345   return 0;
13346 }
13347 _ACEOF
13348 rm -f conftest.$ac_objext conftest$ac_exeext
13349 if { (ac_try="$ac_link"
13350 case "(($ac_try" in
13351   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13352   *) ac_try_echo=$ac_try;;
13353 esac
13354 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13355   (eval "$ac_link") 2>conftest.er1
13356   ac_status=$?
13357   grep -v '^ *+' conftest.er1 >conftest.err
13358   rm -f conftest.er1
13359   cat conftest.err >&5
13360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13361   (exit $ac_status); } && {
13362          test -z "$ac_c_werror_flag" ||
13363          test ! -s conftest.err
13364        } && test -s conftest$ac_exeext &&
13365        $as_test_x conftest$ac_exeext; then
13366   ac_cv_var_tzname=yes
13367 else
13368   echo "$as_me: failed program was:" >&5
13369 sed 's/^/| /' conftest.$ac_ext >&5
13370
13371         ac_cv_var_tzname=no
13372 fi
13373
13374 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13375       conftest$ac_exeext conftest.$ac_ext
13376 fi
13377 { echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
13378 echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
13379 if test $ac_cv_var_tzname = yes; then
13380
13381 cat >>confdefs.h <<\_ACEOF
13382 #define HAVE_TZNAME 1
13383 _ACEOF
13384
13385 fi
13386
13387 { echo "$as_me:$LINENO: checking for union semun" >&5
13388 echo $ECHO_N "checking for union semun... $ECHO_C" >&6; }
13389 if test "${ac_cv_type_union_semun+set}" = set; then
13390   echo $ECHO_N "(cached) $ECHO_C" >&6
13391 else
13392   cat >conftest.$ac_ext <<_ACEOF
13393 /* confdefs.h.  */
13394 _ACEOF
13395 cat confdefs.h >>conftest.$ac_ext
13396 cat >>conftest.$ac_ext <<_ACEOF
13397 /* end confdefs.h.  */
13398 #include <sys/types.h>
13399 #include <sys/ipc.h>
13400 #include <sys/sem.h>
13401
13402 typedef union semun ac__type_new_;
13403 int
13404 main ()
13405 {
13406 if ((ac__type_new_ *) 0)
13407   return 0;
13408 if (sizeof (ac__type_new_))
13409   return 0;
13410   ;
13411   return 0;
13412 }
13413 _ACEOF
13414 rm -f conftest.$ac_objext
13415 if { (ac_try="$ac_compile"
13416 case "(($ac_try" in
13417   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13418   *) ac_try_echo=$ac_try;;
13419 esac
13420 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13421   (eval "$ac_compile") 2>conftest.er1
13422   ac_status=$?
13423   grep -v '^ *+' conftest.er1 >conftest.err
13424   rm -f conftest.er1
13425   cat conftest.err >&5
13426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13427   (exit $ac_status); } && {
13428          test -z "$ac_c_werror_flag" ||
13429          test ! -s conftest.err
13430        } && test -s conftest.$ac_objext; then
13431   ac_cv_type_union_semun=yes
13432 else
13433   echo "$as_me: failed program was:" >&5
13434 sed 's/^/| /' conftest.$ac_ext >&5
13435
13436         ac_cv_type_union_semun=no
13437 fi
13438
13439 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13440 fi
13441 { echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
13442 echo "${ECHO_T}$ac_cv_type_union_semun" >&6; }
13443 if test $ac_cv_type_union_semun = yes; then
13444
13445 cat >>confdefs.h <<_ACEOF
13446 #define HAVE_UNION_SEMUN 1
13447 _ACEOF
13448
13449
13450 fi
13451
13452 { echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
13453 echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6; }
13454 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
13455   echo $ECHO_N "(cached) $ECHO_C" >&6
13456 else
13457   cat >conftest.$ac_ext <<_ACEOF
13458 /* confdefs.h.  */
13459 _ACEOF
13460 cat confdefs.h >>conftest.$ac_ext
13461 cat >>conftest.$ac_ext <<_ACEOF
13462 /* end confdefs.h.  */
13463 #include <sys/types.h>
13464 #ifdef HAVE_SYS_UN_H
13465 #include <sys/un.h>
13466 #endif
13467
13468
13469 typedef struct sockaddr_un ac__type_new_;
13470 int
13471 main ()
13472 {
13473 if ((ac__type_new_ *) 0)
13474   return 0;
13475 if (sizeof (ac__type_new_))
13476   return 0;
13477   ;
13478   return 0;
13479 }
13480 _ACEOF
13481 rm -f conftest.$ac_objext
13482 if { (ac_try="$ac_compile"
13483 case "(($ac_try" in
13484   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13485   *) ac_try_echo=$ac_try;;
13486 esac
13487 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13488   (eval "$ac_compile") 2>conftest.er1
13489   ac_status=$?
13490   grep -v '^ *+' conftest.er1 >conftest.err
13491   rm -f conftest.er1
13492   cat conftest.err >&5
13493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13494   (exit $ac_status); } && {
13495          test -z "$ac_c_werror_flag" ||
13496          test ! -s conftest.err
13497        } && test -s conftest.$ac_objext; then
13498   ac_cv_type_struct_sockaddr_un=yes
13499 else
13500   echo "$as_me: failed program was:" >&5
13501 sed 's/^/| /' conftest.$ac_ext >&5
13502
13503         ac_cv_type_struct_sockaddr_un=no
13504 fi
13505
13506 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13507 fi
13508 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
13509 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6; }
13510 if test $ac_cv_type_struct_sockaddr_un = yes; then
13511
13512 cat >>confdefs.h <<_ACEOF
13513 #define HAVE_STRUCT_SOCKADDR_UN 1
13514 _ACEOF
13515
13516
13517 cat >>confdefs.h <<\_ACEOF
13518 #define HAVE_UNIX_SOCKETS 1
13519 _ACEOF
13520
13521 fi
13522
13523 { echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
13524 echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6; }
13525 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
13526   echo $ECHO_N "(cached) $ECHO_C" >&6
13527 else
13528   cat >conftest.$ac_ext <<_ACEOF
13529 /* confdefs.h.  */
13530 _ACEOF
13531 cat confdefs.h >>conftest.$ac_ext
13532 cat >>conftest.$ac_ext <<_ACEOF
13533 /* end confdefs.h.  */
13534 #include <sys/types.h>
13535 #ifdef HAVE_SYS_SOCKET_H
13536 #include <sys/socket.h>
13537 #endif
13538
13539
13540 typedef struct sockaddr_storage ac__type_new_;
13541 int
13542 main ()
13543 {
13544 if ((ac__type_new_ *) 0)
13545   return 0;
13546 if (sizeof (ac__type_new_))
13547   return 0;
13548   ;
13549   return 0;
13550 }
13551 _ACEOF
13552 rm -f conftest.$ac_objext
13553 if { (ac_try="$ac_compile"
13554 case "(($ac_try" in
13555   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13556   *) ac_try_echo=$ac_try;;
13557 esac
13558 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13559   (eval "$ac_compile") 2>conftest.er1
13560   ac_status=$?
13561   grep -v '^ *+' conftest.er1 >conftest.err
13562   rm -f conftest.er1
13563   cat conftest.err >&5
13564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13565   (exit $ac_status); } && {
13566          test -z "$ac_c_werror_flag" ||
13567          test ! -s conftest.err
13568        } && test -s conftest.$ac_objext; then
13569   ac_cv_type_struct_sockaddr_storage=yes
13570 else
13571   echo "$as_me: failed program was:" >&5
13572 sed 's/^/| /' conftest.$ac_ext >&5
13573
13574         ac_cv_type_struct_sockaddr_storage=no
13575 fi
13576
13577 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13578 fi
13579 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
13580 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_storage" >&6; }
13581 if test $ac_cv_type_struct_sockaddr_storage = yes; then
13582
13583 cat >>confdefs.h <<_ACEOF
13584 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
13585 _ACEOF
13586
13587
13588 fi
13589
13590 { echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
13591 echo $ECHO_N "checking for struct sockaddr_storage.ss_family... $ECHO_C" >&6; }
13592 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
13593   echo $ECHO_N "(cached) $ECHO_C" >&6
13594 else
13595   cat >conftest.$ac_ext <<_ACEOF
13596 /* confdefs.h.  */
13597 _ACEOF
13598 cat confdefs.h >>conftest.$ac_ext
13599 cat >>conftest.$ac_ext <<_ACEOF
13600 /* end confdefs.h.  */
13601 #include <sys/types.h>
13602 #ifdef HAVE_SYS_SOCKET_H
13603 #include <sys/socket.h>
13604 #endif
13605
13606
13607 int
13608 main ()
13609 {
13610 static struct sockaddr_storage ac_aggr;
13611 if (ac_aggr.ss_family)
13612 return 0;
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_member_struct_sockaddr_storage_ss_family=yes
13635 else
13636   echo "$as_me: failed program was:" >&5
13637 sed 's/^/| /' conftest.$ac_ext >&5
13638
13639         cat >conftest.$ac_ext <<_ACEOF
13640 /* confdefs.h.  */
13641 _ACEOF
13642 cat confdefs.h >>conftest.$ac_ext
13643 cat >>conftest.$ac_ext <<_ACEOF
13644 /* end confdefs.h.  */
13645 #include <sys/types.h>
13646 #ifdef HAVE_SYS_SOCKET_H
13647 #include <sys/socket.h>
13648 #endif
13649
13650
13651 int
13652 main ()
13653 {
13654 static struct sockaddr_storage ac_aggr;
13655 if (sizeof ac_aggr.ss_family)
13656 return 0;
13657   ;
13658   return 0;
13659 }
13660 _ACEOF
13661 rm -f conftest.$ac_objext
13662 if { (ac_try="$ac_compile"
13663 case "(($ac_try" in
13664   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13665   *) ac_try_echo=$ac_try;;
13666 esac
13667 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13668   (eval "$ac_compile") 2>conftest.er1
13669   ac_status=$?
13670   grep -v '^ *+' conftest.er1 >conftest.err
13671   rm -f conftest.er1
13672   cat conftest.err >&5
13673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13674   (exit $ac_status); } && {
13675          test -z "$ac_c_werror_flag" ||
13676          test ! -s conftest.err
13677        } && test -s conftest.$ac_objext; then
13678   ac_cv_member_struct_sockaddr_storage_ss_family=yes
13679 else
13680   echo "$as_me: failed program was:" >&5
13681 sed 's/^/| /' conftest.$ac_ext >&5
13682
13683         ac_cv_member_struct_sockaddr_storage_ss_family=no
13684 fi
13685
13686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13687 fi
13688
13689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13690 fi
13691 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
13692 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_family" >&6; }
13693 if test $ac_cv_member_struct_sockaddr_storage_ss_family = yes; then
13694
13695 cat >>confdefs.h <<_ACEOF
13696 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
13697 _ACEOF
13698
13699
13700 fi
13701 { echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
13702 echo $ECHO_N "checking for struct sockaddr_storage.__ss_family... $ECHO_C" >&6; }
13703 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
13704   echo $ECHO_N "(cached) $ECHO_C" >&6
13705 else
13706   cat >conftest.$ac_ext <<_ACEOF
13707 /* confdefs.h.  */
13708 _ACEOF
13709 cat confdefs.h >>conftest.$ac_ext
13710 cat >>conftest.$ac_ext <<_ACEOF
13711 /* end confdefs.h.  */
13712 #include <sys/types.h>
13713 #ifdef HAVE_SYS_SOCKET_H
13714 #include <sys/socket.h>
13715 #endif
13716
13717
13718 int
13719 main ()
13720 {
13721 static struct sockaddr_storage ac_aggr;
13722 if (ac_aggr.__ss_family)
13723 return 0;
13724   ;
13725   return 0;
13726 }
13727 _ACEOF
13728 rm -f conftest.$ac_objext
13729 if { (ac_try="$ac_compile"
13730 case "(($ac_try" in
13731   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13732   *) ac_try_echo=$ac_try;;
13733 esac
13734 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13735   (eval "$ac_compile") 2>conftest.er1
13736   ac_status=$?
13737   grep -v '^ *+' conftest.er1 >conftest.err
13738   rm -f conftest.er1
13739   cat conftest.err >&5
13740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13741   (exit $ac_status); } && {
13742          test -z "$ac_c_werror_flag" ||
13743          test ! -s conftest.err
13744        } && test -s conftest.$ac_objext; then
13745   ac_cv_member_struct_sockaddr_storage___ss_family=yes
13746 else
13747   echo "$as_me: failed program was:" >&5
13748 sed 's/^/| /' conftest.$ac_ext >&5
13749
13750         cat >conftest.$ac_ext <<_ACEOF
13751 /* confdefs.h.  */
13752 _ACEOF
13753 cat confdefs.h >>conftest.$ac_ext
13754 cat >>conftest.$ac_ext <<_ACEOF
13755 /* end confdefs.h.  */
13756 #include <sys/types.h>
13757 #ifdef HAVE_SYS_SOCKET_H
13758 #include <sys/socket.h>
13759 #endif
13760
13761
13762 int
13763 main ()
13764 {
13765 static struct sockaddr_storage ac_aggr;
13766 if (sizeof ac_aggr.__ss_family)
13767 return 0;
13768   ;
13769   return 0;
13770 }
13771 _ACEOF
13772 rm -f conftest.$ac_objext
13773 if { (ac_try="$ac_compile"
13774 case "(($ac_try" in
13775   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13776   *) ac_try_echo=$ac_try;;
13777 esac
13778 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13779   (eval "$ac_compile") 2>conftest.er1
13780   ac_status=$?
13781   grep -v '^ *+' conftest.er1 >conftest.err
13782   rm -f conftest.er1
13783   cat conftest.err >&5
13784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13785   (exit $ac_status); } && {
13786          test -z "$ac_c_werror_flag" ||
13787          test ! -s conftest.err
13788        } && test -s conftest.$ac_objext; then
13789   ac_cv_member_struct_sockaddr_storage___ss_family=yes
13790 else
13791   echo "$as_me: failed program was:" >&5
13792 sed 's/^/| /' conftest.$ac_ext >&5
13793
13794         ac_cv_member_struct_sockaddr_storage___ss_family=no
13795 fi
13796
13797 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13798 fi
13799
13800 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13801 fi
13802 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
13803 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_family" >&6; }
13804 if test $ac_cv_member_struct_sockaddr_storage___ss_family = yes; then
13805
13806 cat >>confdefs.h <<_ACEOF
13807 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
13808 _ACEOF
13809
13810
13811 fi
13812 { echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
13813 echo $ECHO_N "checking for struct sockaddr_storage.ss_len... $ECHO_C" >&6; }
13814 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
13815   echo $ECHO_N "(cached) $ECHO_C" >&6
13816 else
13817   cat >conftest.$ac_ext <<_ACEOF
13818 /* confdefs.h.  */
13819 _ACEOF
13820 cat confdefs.h >>conftest.$ac_ext
13821 cat >>conftest.$ac_ext <<_ACEOF
13822 /* end confdefs.h.  */
13823 #include <sys/types.h>
13824 #ifdef HAVE_SYS_SOCKET_H
13825 #include <sys/socket.h>
13826 #endif
13827
13828
13829 int
13830 main ()
13831 {
13832 static struct sockaddr_storage ac_aggr;
13833 if (ac_aggr.ss_len)
13834 return 0;
13835   ;
13836   return 0;
13837 }
13838 _ACEOF
13839 rm -f conftest.$ac_objext
13840 if { (ac_try="$ac_compile"
13841 case "(($ac_try" in
13842   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13843   *) ac_try_echo=$ac_try;;
13844 esac
13845 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13846   (eval "$ac_compile") 2>conftest.er1
13847   ac_status=$?
13848   grep -v '^ *+' conftest.er1 >conftest.err
13849   rm -f conftest.er1
13850   cat conftest.err >&5
13851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13852   (exit $ac_status); } && {
13853          test -z "$ac_c_werror_flag" ||
13854          test ! -s conftest.err
13855        } && test -s conftest.$ac_objext; then
13856   ac_cv_member_struct_sockaddr_storage_ss_len=yes
13857 else
13858   echo "$as_me: failed program was:" >&5
13859 sed 's/^/| /' conftest.$ac_ext >&5
13860
13861         cat >conftest.$ac_ext <<_ACEOF
13862 /* confdefs.h.  */
13863 _ACEOF
13864 cat confdefs.h >>conftest.$ac_ext
13865 cat >>conftest.$ac_ext <<_ACEOF
13866 /* end confdefs.h.  */
13867 #include <sys/types.h>
13868 #ifdef HAVE_SYS_SOCKET_H
13869 #include <sys/socket.h>
13870 #endif
13871
13872
13873 int
13874 main ()
13875 {
13876 static struct sockaddr_storage ac_aggr;
13877 if (sizeof ac_aggr.ss_len)
13878 return 0;
13879   ;
13880   return 0;
13881 }
13882 _ACEOF
13883 rm -f conftest.$ac_objext
13884 if { (ac_try="$ac_compile"
13885 case "(($ac_try" in
13886   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13887   *) ac_try_echo=$ac_try;;
13888 esac
13889 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13890   (eval "$ac_compile") 2>conftest.er1
13891   ac_status=$?
13892   grep -v '^ *+' conftest.er1 >conftest.err
13893   rm -f conftest.er1
13894   cat conftest.err >&5
13895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13896   (exit $ac_status); } && {
13897          test -z "$ac_c_werror_flag" ||
13898          test ! -s conftest.err
13899        } && test -s conftest.$ac_objext; then
13900   ac_cv_member_struct_sockaddr_storage_ss_len=yes
13901 else
13902   echo "$as_me: failed program was:" >&5
13903 sed 's/^/| /' conftest.$ac_ext >&5
13904
13905         ac_cv_member_struct_sockaddr_storage_ss_len=no
13906 fi
13907
13908 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13909 fi
13910
13911 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13912 fi
13913 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
13914 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_len" >&6; }
13915 if test $ac_cv_member_struct_sockaddr_storage_ss_len = yes; then
13916
13917 cat >>confdefs.h <<_ACEOF
13918 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
13919 _ACEOF
13920
13921
13922 fi
13923 { echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
13924 echo $ECHO_N "checking for struct sockaddr_storage.__ss_len... $ECHO_C" >&6; }
13925 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
13926   echo $ECHO_N "(cached) $ECHO_C" >&6
13927 else
13928   cat >conftest.$ac_ext <<_ACEOF
13929 /* confdefs.h.  */
13930 _ACEOF
13931 cat confdefs.h >>conftest.$ac_ext
13932 cat >>conftest.$ac_ext <<_ACEOF
13933 /* end confdefs.h.  */
13934 #include <sys/types.h>
13935 #ifdef HAVE_SYS_SOCKET_H
13936 #include <sys/socket.h>
13937 #endif
13938
13939
13940 int
13941 main ()
13942 {
13943 static struct sockaddr_storage ac_aggr;
13944 if (ac_aggr.__ss_len)
13945 return 0;
13946   ;
13947   return 0;
13948 }
13949 _ACEOF
13950 rm -f conftest.$ac_objext
13951 if { (ac_try="$ac_compile"
13952 case "(($ac_try" in
13953   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13954   *) ac_try_echo=$ac_try;;
13955 esac
13956 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13957   (eval "$ac_compile") 2>conftest.er1
13958   ac_status=$?
13959   grep -v '^ *+' conftest.er1 >conftest.err
13960   rm -f conftest.er1
13961   cat conftest.err >&5
13962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13963   (exit $ac_status); } && {
13964          test -z "$ac_c_werror_flag" ||
13965          test ! -s conftest.err
13966        } && test -s conftest.$ac_objext; then
13967   ac_cv_member_struct_sockaddr_storage___ss_len=yes
13968 else
13969   echo "$as_me: failed program was:" >&5
13970 sed 's/^/| /' conftest.$ac_ext >&5
13971
13972         cat >conftest.$ac_ext <<_ACEOF
13973 /* confdefs.h.  */
13974 _ACEOF
13975 cat confdefs.h >>conftest.$ac_ext
13976 cat >>conftest.$ac_ext <<_ACEOF
13977 /* end confdefs.h.  */
13978 #include <sys/types.h>
13979 #ifdef HAVE_SYS_SOCKET_H
13980 #include <sys/socket.h>
13981 #endif
13982
13983
13984 int
13985 main ()
13986 {
13987 static struct sockaddr_storage ac_aggr;
13988 if (sizeof ac_aggr.__ss_len)
13989 return 0;
13990   ;
13991   return 0;
13992 }
13993 _ACEOF
13994 rm -f conftest.$ac_objext
13995 if { (ac_try="$ac_compile"
13996 case "(($ac_try" in
13997   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13998   *) ac_try_echo=$ac_try;;
13999 esac
14000 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14001   (eval "$ac_compile") 2>conftest.er1
14002   ac_status=$?
14003   grep -v '^ *+' conftest.er1 >conftest.err
14004   rm -f conftest.er1
14005   cat conftest.err >&5
14006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14007   (exit $ac_status); } && {
14008          test -z "$ac_c_werror_flag" ||
14009          test ! -s conftest.err
14010        } && test -s conftest.$ac_objext; then
14011   ac_cv_member_struct_sockaddr_storage___ss_len=yes
14012 else
14013   echo "$as_me: failed program was:" >&5
14014 sed 's/^/| /' conftest.$ac_ext >&5
14015
14016         ac_cv_member_struct_sockaddr_storage___ss_len=no
14017 fi
14018
14019 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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_member_struct_sockaddr_storage___ss_len" >&5
14025 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_len" >&6; }
14026 if test $ac_cv_member_struct_sockaddr_storage___ss_len = yes; then
14027
14028 cat >>confdefs.h <<_ACEOF
14029 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14030 _ACEOF
14031
14032
14033 fi
14034 { echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
14035 echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6; }
14036 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
14037   echo $ECHO_N "(cached) $ECHO_C" >&6
14038 else
14039   cat >conftest.$ac_ext <<_ACEOF
14040 /* confdefs.h.  */
14041 _ACEOF
14042 cat confdefs.h >>conftest.$ac_ext
14043 cat >>conftest.$ac_ext <<_ACEOF
14044 /* end confdefs.h.  */
14045 #include <sys/types.h>
14046 #ifdef HAVE_SYS_SOCKET_H
14047 #include <sys/socket.h>
14048 #endif
14049
14050
14051 int
14052 main ()
14053 {
14054 static struct sockaddr ac_aggr;
14055 if (ac_aggr.sa_len)
14056 return 0;
14057   ;
14058   return 0;
14059 }
14060 _ACEOF
14061 rm -f conftest.$ac_objext
14062 if { (ac_try="$ac_compile"
14063 case "(($ac_try" in
14064   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14065   *) ac_try_echo=$ac_try;;
14066 esac
14067 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14068   (eval "$ac_compile") 2>conftest.er1
14069   ac_status=$?
14070   grep -v '^ *+' conftest.er1 >conftest.err
14071   rm -f conftest.er1
14072   cat conftest.err >&5
14073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14074   (exit $ac_status); } && {
14075          test -z "$ac_c_werror_flag" ||
14076          test ! -s conftest.err
14077        } && test -s conftest.$ac_objext; then
14078   ac_cv_member_struct_sockaddr_sa_len=yes
14079 else
14080   echo "$as_me: failed program was:" >&5
14081 sed 's/^/| /' conftest.$ac_ext >&5
14082
14083         cat >conftest.$ac_ext <<_ACEOF
14084 /* confdefs.h.  */
14085 _ACEOF
14086 cat confdefs.h >>conftest.$ac_ext
14087 cat >>conftest.$ac_ext <<_ACEOF
14088 /* end confdefs.h.  */
14089 #include <sys/types.h>
14090 #ifdef HAVE_SYS_SOCKET_H
14091 #include <sys/socket.h>
14092 #endif
14093
14094
14095 int
14096 main ()
14097 {
14098 static struct sockaddr ac_aggr;
14099 if (sizeof ac_aggr.sa_len)
14100 return 0;
14101   ;
14102   return 0;
14103 }
14104 _ACEOF
14105 rm -f conftest.$ac_objext
14106 if { (ac_try="$ac_compile"
14107 case "(($ac_try" in
14108   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14109   *) ac_try_echo=$ac_try;;
14110 esac
14111 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14112   (eval "$ac_compile") 2>conftest.er1
14113   ac_status=$?
14114   grep -v '^ *+' conftest.er1 >conftest.err
14115   rm -f conftest.er1
14116   cat conftest.err >&5
14117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14118   (exit $ac_status); } && {
14119          test -z "$ac_c_werror_flag" ||
14120          test ! -s conftest.err
14121        } && test -s conftest.$ac_objext; then
14122   ac_cv_member_struct_sockaddr_sa_len=yes
14123 else
14124   echo "$as_me: failed program was:" >&5
14125 sed 's/^/| /' conftest.$ac_ext >&5
14126
14127         ac_cv_member_struct_sockaddr_sa_len=no
14128 fi
14129
14130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14131 fi
14132
14133 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14134 fi
14135 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
14136 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6; }
14137 if test $ac_cv_member_struct_sockaddr_sa_len = yes; then
14138
14139 cat >>confdefs.h <<_ACEOF
14140 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14141 _ACEOF
14142
14143
14144 fi
14145
14146 { echo "$as_me:$LINENO: checking for struct addrinfo" >&5
14147 echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6; }
14148 if test "${ac_cv_type_struct_addrinfo+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 #include <sys/socket.h>
14159 #include <netdb.h>
14160
14161
14162 typedef struct addrinfo ac__type_new_;
14163 int
14164 main ()
14165 {
14166 if ((ac__type_new_ *) 0)
14167   return 0;
14168 if (sizeof (ac__type_new_))
14169   return 0;
14170   ;
14171   return 0;
14172 }
14173 _ACEOF
14174 rm -f conftest.$ac_objext
14175 if { (ac_try="$ac_compile"
14176 case "(($ac_try" in
14177   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14178   *) ac_try_echo=$ac_try;;
14179 esac
14180 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14181   (eval "$ac_compile") 2>conftest.er1
14182   ac_status=$?
14183   grep -v '^ *+' conftest.er1 >conftest.err
14184   rm -f conftest.er1
14185   cat conftest.err >&5
14186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14187   (exit $ac_status); } && {
14188          test -z "$ac_c_werror_flag" ||
14189          test ! -s conftest.err
14190        } && test -s conftest.$ac_objext; then
14191   ac_cv_type_struct_addrinfo=yes
14192 else
14193   echo "$as_me: failed program was:" >&5
14194 sed 's/^/| /' conftest.$ac_ext >&5
14195
14196         ac_cv_type_struct_addrinfo=no
14197 fi
14198
14199 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14200 fi
14201 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
14202 echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6; }
14203 if test $ac_cv_type_struct_addrinfo = yes; then
14204
14205 cat >>confdefs.h <<_ACEOF
14206 #define HAVE_STRUCT_ADDRINFO 1
14207 _ACEOF
14208
14209
14210 fi
14211
14212
14213 { echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
14214 echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6; }
14215 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
14216   echo $ECHO_N "(cached) $ECHO_C" >&6
14217 else
14218   cat >conftest.$ac_ext <<_ACEOF
14219 /* confdefs.h.  */
14220 _ACEOF
14221 cat confdefs.h >>conftest.$ac_ext
14222 cat >>conftest.$ac_ext <<_ACEOF
14223 /* end confdefs.h.  */
14224 #include <sys/param.h>
14225 #include <sys/types.h>
14226 #include <sys/socket.h>
14227 #include <sys/ucred.h>
14228
14229 typedef struct cmsgcred ac__type_new_;
14230 int
14231 main ()
14232 {
14233 if ((ac__type_new_ *) 0)
14234   return 0;
14235 if (sizeof (ac__type_new_))
14236   return 0;
14237   ;
14238   return 0;
14239 }
14240 _ACEOF
14241 rm -f conftest.$ac_objext
14242 if { (ac_try="$ac_compile"
14243 case "(($ac_try" in
14244   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14245   *) ac_try_echo=$ac_try;;
14246 esac
14247 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14248   (eval "$ac_compile") 2>conftest.er1
14249   ac_status=$?
14250   grep -v '^ *+' conftest.er1 >conftest.err
14251   rm -f conftest.er1
14252   cat conftest.err >&5
14253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14254   (exit $ac_status); } && {
14255          test -z "$ac_c_werror_flag" ||
14256          test ! -s conftest.err
14257        } && test -s conftest.$ac_objext; then
14258   ac_cv_type_struct_cmsgcred=yes
14259 else
14260   echo "$as_me: failed program was:" >&5
14261 sed 's/^/| /' conftest.$ac_ext >&5
14262
14263         ac_cv_type_struct_cmsgcred=no
14264 fi
14265
14266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14267 fi
14268 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
14269 echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6; }
14270 if test $ac_cv_type_struct_cmsgcred = yes; then
14271
14272 cat >>confdefs.h <<_ACEOF
14273 #define HAVE_STRUCT_CMSGCRED 1
14274 _ACEOF
14275
14276
14277 fi
14278 { echo "$as_me:$LINENO: checking for struct fcred" >&5
14279 echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6; }
14280 if test "${ac_cv_type_struct_fcred+set}" = set; then
14281   echo $ECHO_N "(cached) $ECHO_C" >&6
14282 else
14283   cat >conftest.$ac_ext <<_ACEOF
14284 /* confdefs.h.  */
14285 _ACEOF
14286 cat confdefs.h >>conftest.$ac_ext
14287 cat >>conftest.$ac_ext <<_ACEOF
14288 /* end confdefs.h.  */
14289 #include <sys/param.h>
14290 #include <sys/types.h>
14291 #include <sys/socket.h>
14292 #include <sys/ucred.h>
14293
14294 typedef struct fcred ac__type_new_;
14295 int
14296 main ()
14297 {
14298 if ((ac__type_new_ *) 0)
14299   return 0;
14300 if (sizeof (ac__type_new_))
14301   return 0;
14302   ;
14303   return 0;
14304 }
14305 _ACEOF
14306 rm -f conftest.$ac_objext
14307 if { (ac_try="$ac_compile"
14308 case "(($ac_try" in
14309   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14310   *) ac_try_echo=$ac_try;;
14311 esac
14312 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14313   (eval "$ac_compile") 2>conftest.er1
14314   ac_status=$?
14315   grep -v '^ *+' conftest.er1 >conftest.err
14316   rm -f conftest.er1
14317   cat conftest.err >&5
14318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14319   (exit $ac_status); } && {
14320          test -z "$ac_c_werror_flag" ||
14321          test ! -s conftest.err
14322        } && test -s conftest.$ac_objext; then
14323   ac_cv_type_struct_fcred=yes
14324 else
14325   echo "$as_me: failed program was:" >&5
14326 sed 's/^/| /' conftest.$ac_ext >&5
14327
14328         ac_cv_type_struct_fcred=no
14329 fi
14330
14331 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14332 fi
14333 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
14334 echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6; }
14335 if test $ac_cv_type_struct_fcred = yes; then
14336
14337 cat >>confdefs.h <<_ACEOF
14338 #define HAVE_STRUCT_FCRED 1
14339 _ACEOF
14340
14341
14342 fi
14343 { echo "$as_me:$LINENO: checking for struct sockcred" >&5
14344 echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6; }
14345 if test "${ac_cv_type_struct_sockcred+set}" = set; then
14346   echo $ECHO_N "(cached) $ECHO_C" >&6
14347 else
14348   cat >conftest.$ac_ext <<_ACEOF
14349 /* confdefs.h.  */
14350 _ACEOF
14351 cat confdefs.h >>conftest.$ac_ext
14352 cat >>conftest.$ac_ext <<_ACEOF
14353 /* end confdefs.h.  */
14354 #include <sys/param.h>
14355 #include <sys/types.h>
14356 #include <sys/socket.h>
14357 #include <sys/ucred.h>
14358
14359 typedef struct sockcred ac__type_new_;
14360 int
14361 main ()
14362 {
14363 if ((ac__type_new_ *) 0)
14364   return 0;
14365 if (sizeof (ac__type_new_))
14366   return 0;
14367   ;
14368   return 0;
14369 }
14370 _ACEOF
14371 rm -f conftest.$ac_objext
14372 if { (ac_try="$ac_compile"
14373 case "(($ac_try" in
14374   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14375   *) ac_try_echo=$ac_try;;
14376 esac
14377 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14378   (eval "$ac_compile") 2>conftest.er1
14379   ac_status=$?
14380   grep -v '^ *+' conftest.er1 >conftest.err
14381   rm -f conftest.er1
14382   cat conftest.err >&5
14383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14384   (exit $ac_status); } && {
14385          test -z "$ac_c_werror_flag" ||
14386          test ! -s conftest.err
14387        } && test -s conftest.$ac_objext; then
14388   ac_cv_type_struct_sockcred=yes
14389 else
14390   echo "$as_me: failed program was:" >&5
14391 sed 's/^/| /' conftest.$ac_ext >&5
14392
14393         ac_cv_type_struct_sockcred=no
14394 fi
14395
14396 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14397 fi
14398 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
14399 echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6; }
14400 if test $ac_cv_type_struct_sockcred = yes; then
14401
14402 cat >>confdefs.h <<_ACEOF
14403 #define HAVE_STRUCT_SOCKCRED 1
14404 _ACEOF
14405
14406
14407 fi
14408
14409
14410 { echo "$as_me:$LINENO: checking for struct option" >&5
14411 echo $ECHO_N "checking for struct option... $ECHO_C" >&6; }
14412 if test "${ac_cv_type_struct_option+set}" = set; then
14413   echo $ECHO_N "(cached) $ECHO_C" >&6
14414 else
14415   cat >conftest.$ac_ext <<_ACEOF
14416 /* confdefs.h.  */
14417 _ACEOF
14418 cat confdefs.h >>conftest.$ac_ext
14419 cat >>conftest.$ac_ext <<_ACEOF
14420 /* end confdefs.h.  */
14421 #ifdef HAVE_GETOPT_H
14422 #include <getopt.h>
14423 #endif
14424
14425 typedef struct option ac__type_new_;
14426 int
14427 main ()
14428 {
14429 if ((ac__type_new_ *) 0)
14430   return 0;
14431 if (sizeof (ac__type_new_))
14432   return 0;
14433   ;
14434   return 0;
14435 }
14436 _ACEOF
14437 rm -f conftest.$ac_objext
14438 if { (ac_try="$ac_compile"
14439 case "(($ac_try" in
14440   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14441   *) ac_try_echo=$ac_try;;
14442 esac
14443 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14444   (eval "$ac_compile") 2>conftest.er1
14445   ac_status=$?
14446   grep -v '^ *+' conftest.er1 >conftest.err
14447   rm -f conftest.er1
14448   cat conftest.err >&5
14449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14450   (exit $ac_status); } && {
14451          test -z "$ac_c_werror_flag" ||
14452          test ! -s conftest.err
14453        } && test -s conftest.$ac_objext; then
14454   ac_cv_type_struct_option=yes
14455 else
14456   echo "$as_me: failed program was:" >&5
14457 sed 's/^/| /' conftest.$ac_ext >&5
14458
14459         ac_cv_type_struct_option=no
14460 fi
14461
14462 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14463 fi
14464 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
14465 echo "${ECHO_T}$ac_cv_type_struct_option" >&6; }
14466 if test $ac_cv_type_struct_option = yes; then
14467
14468 cat >>confdefs.h <<_ACEOF
14469 #define HAVE_STRUCT_OPTION 1
14470 _ACEOF
14471
14472
14473 fi
14474
14475
14476 if test "$with_zlib" = yes; then
14477   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14478   # did not).  While we could work around the lack of z_streamp, it
14479   # seems unwise to encourage people to use such old zlib versions...
14480   { echo "$as_me:$LINENO: checking for z_streamp" >&5
14481 echo $ECHO_N "checking for z_streamp... $ECHO_C" >&6; }
14482 if test "${ac_cv_type_z_streamp+set}" = set; then
14483   echo $ECHO_N "(cached) $ECHO_C" >&6
14484 else
14485   cat >conftest.$ac_ext <<_ACEOF
14486 /* confdefs.h.  */
14487 _ACEOF
14488 cat confdefs.h >>conftest.$ac_ext
14489 cat >>conftest.$ac_ext <<_ACEOF
14490 /* end confdefs.h.  */
14491 #include <zlib.h>
14492
14493 typedef z_streamp ac__type_new_;
14494 int
14495 main ()
14496 {
14497 if ((ac__type_new_ *) 0)
14498   return 0;
14499 if (sizeof (ac__type_new_))
14500   return 0;
14501   ;
14502   return 0;
14503 }
14504 _ACEOF
14505 rm -f conftest.$ac_objext
14506 if { (ac_try="$ac_compile"
14507 case "(($ac_try" in
14508   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14509   *) ac_try_echo=$ac_try;;
14510 esac
14511 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14512   (eval "$ac_compile") 2>conftest.er1
14513   ac_status=$?
14514   grep -v '^ *+' conftest.er1 >conftest.err
14515   rm -f conftest.er1
14516   cat conftest.err >&5
14517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14518   (exit $ac_status); } && {
14519          test -z "$ac_c_werror_flag" ||
14520          test ! -s conftest.err
14521        } && test -s conftest.$ac_objext; then
14522   ac_cv_type_z_streamp=yes
14523 else
14524   echo "$as_me: failed program was:" >&5
14525 sed 's/^/| /' conftest.$ac_ext >&5
14526
14527         ac_cv_type_z_streamp=no
14528 fi
14529
14530 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14531 fi
14532 { echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
14533 echo "${ECHO_T}$ac_cv_type_z_streamp" >&6; }
14534 if test $ac_cv_type_z_streamp = yes; then
14535   :
14536 else
14537   { { echo "$as_me:$LINENO: error: zlib version is too old
14538 Use --without-zlib to disable zlib support." >&5
14539 echo "$as_me: error: zlib version is too old
14540 Use --without-zlib to disable zlib support." >&2;}
14541    { (exit 1); exit 1; }; }
14542 fi
14543
14544 fi
14545
14546 if test "$with_krb5" = yes; then
14547 # Check for differences between MIT and Heimdal (KTH) releases
14548   { echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
14549 echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6; }
14550 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
14551   echo $ECHO_N "(cached) $ECHO_C" >&6
14552 else
14553   cat >conftest.$ac_ext <<_ACEOF
14554 /* confdefs.h.  */
14555 _ACEOF
14556 cat confdefs.h >>conftest.$ac_ext
14557 cat >>conftest.$ac_ext <<_ACEOF
14558 /* end confdefs.h.  */
14559 #include <krb5.h>
14560
14561 int
14562 main ()
14563 {
14564 static krb5_ticket ac_aggr;
14565 if (ac_aggr.enc_part2)
14566 return 0;
14567   ;
14568   return 0;
14569 }
14570 _ACEOF
14571 rm -f conftest.$ac_objext
14572 if { (ac_try="$ac_compile"
14573 case "(($ac_try" in
14574   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14575   *) ac_try_echo=$ac_try;;
14576 esac
14577 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14578   (eval "$ac_compile") 2>conftest.er1
14579   ac_status=$?
14580   grep -v '^ *+' conftest.er1 >conftest.err
14581   rm -f conftest.er1
14582   cat conftest.err >&5
14583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14584   (exit $ac_status); } && {
14585          test -z "$ac_c_werror_flag" ||
14586          test ! -s conftest.err
14587        } && test -s conftest.$ac_objext; then
14588   ac_cv_member_krb5_ticket_enc_part2=yes
14589 else
14590   echo "$as_me: failed program was:" >&5
14591 sed 's/^/| /' conftest.$ac_ext >&5
14592
14593         cat >conftest.$ac_ext <<_ACEOF
14594 /* confdefs.h.  */
14595 _ACEOF
14596 cat confdefs.h >>conftest.$ac_ext
14597 cat >>conftest.$ac_ext <<_ACEOF
14598 /* end confdefs.h.  */
14599 #include <krb5.h>
14600
14601 int
14602 main ()
14603 {
14604 static krb5_ticket ac_aggr;
14605 if (sizeof ac_aggr.enc_part2)
14606 return 0;
14607   ;
14608   return 0;
14609 }
14610 _ACEOF
14611 rm -f conftest.$ac_objext
14612 if { (ac_try="$ac_compile"
14613 case "(($ac_try" in
14614   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14615   *) ac_try_echo=$ac_try;;
14616 esac
14617 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14618   (eval "$ac_compile") 2>conftest.er1
14619   ac_status=$?
14620   grep -v '^ *+' conftest.er1 >conftest.err
14621   rm -f conftest.er1
14622   cat conftest.err >&5
14623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14624   (exit $ac_status); } && {
14625          test -z "$ac_c_werror_flag" ||
14626          test ! -s conftest.err
14627        } && test -s conftest.$ac_objext; then
14628   ac_cv_member_krb5_ticket_enc_part2=yes
14629 else
14630   echo "$as_me: failed program was:" >&5
14631 sed 's/^/| /' conftest.$ac_ext >&5
14632
14633         ac_cv_member_krb5_ticket_enc_part2=no
14634 fi
14635
14636 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14637 fi
14638
14639 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14640 fi
14641 { echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
14642 echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6; }
14643 if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
14644
14645 cat >>confdefs.h <<_ACEOF
14646 #define HAVE_KRB5_TICKET_ENC_PART2 1
14647 _ACEOF
14648
14649
14650 else
14651   { echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
14652 echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6; }
14653 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
14654   echo $ECHO_N "(cached) $ECHO_C" >&6
14655 else
14656   cat >conftest.$ac_ext <<_ACEOF
14657 /* confdefs.h.  */
14658 _ACEOF
14659 cat confdefs.h >>conftest.$ac_ext
14660 cat >>conftest.$ac_ext <<_ACEOF
14661 /* end confdefs.h.  */
14662 #include <krb5.h>
14663
14664 int
14665 main ()
14666 {
14667 static krb5_ticket ac_aggr;
14668 if (ac_aggr.client)
14669 return 0;
14670   ;
14671   return 0;
14672 }
14673 _ACEOF
14674 rm -f conftest.$ac_objext
14675 if { (ac_try="$ac_compile"
14676 case "(($ac_try" in
14677   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14678   *) ac_try_echo=$ac_try;;
14679 esac
14680 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14681   (eval "$ac_compile") 2>conftest.er1
14682   ac_status=$?
14683   grep -v '^ *+' conftest.er1 >conftest.err
14684   rm -f conftest.er1
14685   cat conftest.err >&5
14686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14687   (exit $ac_status); } && {
14688          test -z "$ac_c_werror_flag" ||
14689          test ! -s conftest.err
14690        } && test -s conftest.$ac_objext; then
14691   ac_cv_member_krb5_ticket_client=yes
14692 else
14693   echo "$as_me: failed program was:" >&5
14694 sed 's/^/| /' conftest.$ac_ext >&5
14695
14696         cat >conftest.$ac_ext <<_ACEOF
14697 /* confdefs.h.  */
14698 _ACEOF
14699 cat confdefs.h >>conftest.$ac_ext
14700 cat >>conftest.$ac_ext <<_ACEOF
14701 /* end confdefs.h.  */
14702 #include <krb5.h>
14703
14704 int
14705 main ()
14706 {
14707 static krb5_ticket ac_aggr;
14708 if (sizeof ac_aggr.client)
14709 return 0;
14710   ;
14711   return 0;
14712 }
14713 _ACEOF
14714 rm -f conftest.$ac_objext
14715 if { (ac_try="$ac_compile"
14716 case "(($ac_try" in
14717   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14718   *) ac_try_echo=$ac_try;;
14719 esac
14720 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14721   (eval "$ac_compile") 2>conftest.er1
14722   ac_status=$?
14723   grep -v '^ *+' conftest.er1 >conftest.err
14724   rm -f conftest.er1
14725   cat conftest.err >&5
14726   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14727   (exit $ac_status); } && {
14728          test -z "$ac_c_werror_flag" ||
14729          test ! -s conftest.err
14730        } && test -s conftest.$ac_objext; then
14731   ac_cv_member_krb5_ticket_client=yes
14732 else
14733   echo "$as_me: failed program was:" >&5
14734 sed 's/^/| /' conftest.$ac_ext >&5
14735
14736         ac_cv_member_krb5_ticket_client=no
14737 fi
14738
14739 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14740 fi
14741
14742 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14743 fi
14744 { echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
14745 echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6; }
14746 if test $ac_cv_member_krb5_ticket_client = yes; then
14747
14748 cat >>confdefs.h <<_ACEOF
14749 #define HAVE_KRB5_TICKET_CLIENT 1
14750 _ACEOF
14751
14752
14753 else
14754   { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
14755 echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
14756    { (exit 1); exit 1; }; }
14757 fi
14758
14759 fi
14760
14761   { echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
14762 echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6; }
14763 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
14764   echo $ECHO_N "(cached) $ECHO_C" >&6
14765 else
14766   cat >conftest.$ac_ext <<_ACEOF
14767 /* confdefs.h.  */
14768 _ACEOF
14769 cat confdefs.h >>conftest.$ac_ext
14770 cat >>conftest.$ac_ext <<_ACEOF
14771 /* end confdefs.h.  */
14772 #include <krb5.h>
14773
14774 int
14775 main ()
14776 {
14777 static krb5_error ac_aggr;
14778 if (ac_aggr.text.data)
14779 return 0;
14780   ;
14781   return 0;
14782 }
14783 _ACEOF
14784 rm -f conftest.$ac_objext
14785 if { (ac_try="$ac_compile"
14786 case "(($ac_try" in
14787   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14788   *) ac_try_echo=$ac_try;;
14789 esac
14790 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14791   (eval "$ac_compile") 2>conftest.er1
14792   ac_status=$?
14793   grep -v '^ *+' conftest.er1 >conftest.err
14794   rm -f conftest.er1
14795   cat conftest.err >&5
14796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14797   (exit $ac_status); } && {
14798          test -z "$ac_c_werror_flag" ||
14799          test ! -s conftest.err
14800        } && test -s conftest.$ac_objext; then
14801   ac_cv_member_krb5_error_text_data=yes
14802 else
14803   echo "$as_me: failed program was:" >&5
14804 sed 's/^/| /' conftest.$ac_ext >&5
14805
14806         cat >conftest.$ac_ext <<_ACEOF
14807 /* confdefs.h.  */
14808 _ACEOF
14809 cat confdefs.h >>conftest.$ac_ext
14810 cat >>conftest.$ac_ext <<_ACEOF
14811 /* end confdefs.h.  */
14812 #include <krb5.h>
14813
14814 int
14815 main ()
14816 {
14817 static krb5_error ac_aggr;
14818 if (sizeof ac_aggr.text.data)
14819 return 0;
14820   ;
14821   return 0;
14822 }
14823 _ACEOF
14824 rm -f conftest.$ac_objext
14825 if { (ac_try="$ac_compile"
14826 case "(($ac_try" in
14827   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14828   *) ac_try_echo=$ac_try;;
14829 esac
14830 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14831   (eval "$ac_compile") 2>conftest.er1
14832   ac_status=$?
14833   grep -v '^ *+' conftest.er1 >conftest.err
14834   rm -f conftest.er1
14835   cat conftest.err >&5
14836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14837   (exit $ac_status); } && {
14838          test -z "$ac_c_werror_flag" ||
14839          test ! -s conftest.err
14840        } && test -s conftest.$ac_objext; then
14841   ac_cv_member_krb5_error_text_data=yes
14842 else
14843   echo "$as_me: failed program was:" >&5
14844 sed 's/^/| /' conftest.$ac_ext >&5
14845
14846         ac_cv_member_krb5_error_text_data=no
14847 fi
14848
14849 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14850 fi
14851
14852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14853 fi
14854 { echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
14855 echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6; }
14856 if test $ac_cv_member_krb5_error_text_data = yes; then
14857
14858 cat >>confdefs.h <<_ACEOF
14859 #define HAVE_KRB5_ERROR_TEXT_DATA 1
14860 _ACEOF
14861
14862
14863 else
14864   { echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
14865 echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6; }
14866 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
14867   echo $ECHO_N "(cached) $ECHO_C" >&6
14868 else
14869   cat >conftest.$ac_ext <<_ACEOF
14870 /* confdefs.h.  */
14871 _ACEOF
14872 cat confdefs.h >>conftest.$ac_ext
14873 cat >>conftest.$ac_ext <<_ACEOF
14874 /* end confdefs.h.  */
14875 #include <krb5.h>
14876
14877 int
14878 main ()
14879 {
14880 static krb5_error ac_aggr;
14881 if (ac_aggr.e_data)
14882 return 0;
14883   ;
14884   return 0;
14885 }
14886 _ACEOF
14887 rm -f conftest.$ac_objext
14888 if { (ac_try="$ac_compile"
14889 case "(($ac_try" in
14890   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14891   *) ac_try_echo=$ac_try;;
14892 esac
14893 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14894   (eval "$ac_compile") 2>conftest.er1
14895   ac_status=$?
14896   grep -v '^ *+' conftest.er1 >conftest.err
14897   rm -f conftest.er1
14898   cat conftest.err >&5
14899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14900   (exit $ac_status); } && {
14901          test -z "$ac_c_werror_flag" ||
14902          test ! -s conftest.err
14903        } && test -s conftest.$ac_objext; then
14904   ac_cv_member_krb5_error_e_data=yes
14905 else
14906   echo "$as_me: failed program was:" >&5
14907 sed 's/^/| /' conftest.$ac_ext >&5
14908
14909         cat >conftest.$ac_ext <<_ACEOF
14910 /* confdefs.h.  */
14911 _ACEOF
14912 cat confdefs.h >>conftest.$ac_ext
14913 cat >>conftest.$ac_ext <<_ACEOF
14914 /* end confdefs.h.  */
14915 #include <krb5.h>
14916
14917 int
14918 main ()
14919 {
14920 static krb5_error ac_aggr;
14921 if (sizeof ac_aggr.e_data)
14922 return 0;
14923   ;
14924   return 0;
14925 }
14926 _ACEOF
14927 rm -f conftest.$ac_objext
14928 if { (ac_try="$ac_compile"
14929 case "(($ac_try" in
14930   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14931   *) ac_try_echo=$ac_try;;
14932 esac
14933 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14934   (eval "$ac_compile") 2>conftest.er1
14935   ac_status=$?
14936   grep -v '^ *+' conftest.er1 >conftest.err
14937   rm -f conftest.er1
14938   cat conftest.err >&5
14939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14940   (exit $ac_status); } && {
14941          test -z "$ac_c_werror_flag" ||
14942          test ! -s conftest.err
14943        } && test -s conftest.$ac_objext; then
14944   ac_cv_member_krb5_error_e_data=yes
14945 else
14946   echo "$as_me: failed program was:" >&5
14947 sed 's/^/| /' conftest.$ac_ext >&5
14948
14949         ac_cv_member_krb5_error_e_data=no
14950 fi
14951
14952 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14953 fi
14954
14955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14956 fi
14957 { echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
14958 echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6; }
14959 if test $ac_cv_member_krb5_error_e_data = yes; then
14960
14961 cat >>confdefs.h <<_ACEOF
14962 #define HAVE_KRB5_ERROR_E_DATA 1
14963 _ACEOF
14964
14965
14966 else
14967   { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
14968 echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
14969    { (exit 1); exit 1; }; }
14970 fi
14971
14972 fi
14973
14974
14975 # Win32 requires headers to be loaded for __stdcall, so can't use
14976 # AC_CHECK_FUNCS here.
14977   { echo "$as_me:$LINENO: checking for krb5_free_unparsed_name" >&5
14978 echo $ECHO_N "checking for krb5_free_unparsed_name... $ECHO_C" >&6; }
14979   cat >conftest.$ac_ext <<_ACEOF
14980 /* confdefs.h.  */
14981 _ACEOF
14982 cat confdefs.h >>conftest.$ac_ext
14983 cat >>conftest.$ac_ext <<_ACEOF
14984 /* end confdefs.h.  */
14985 #include <krb5.h>
14986 int
14987 main ()
14988 {
14989 krb5_free_unparsed_name(NULL,NULL);
14990   ;
14991   return 0;
14992 }
14993 _ACEOF
14994 rm -f conftest.$ac_objext conftest$ac_exeext
14995 if { (ac_try="$ac_link"
14996 case "(($ac_try" in
14997   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14998   *) ac_try_echo=$ac_try;;
14999 esac
15000 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15001   (eval "$ac_link") 2>conftest.er1
15002   ac_status=$?
15003   grep -v '^ *+' conftest.er1 >conftest.err
15004   rm -f conftest.er1
15005   cat conftest.err >&5
15006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15007   (exit $ac_status); } && {
15008          test -z "$ac_c_werror_flag" ||
15009          test ! -s conftest.err
15010        } && test -s conftest$ac_exeext &&
15011        $as_test_x conftest$ac_exeext; then
15012
15013 cat >>confdefs.h <<\_ACEOF
15014 #define HAVE_KRB5_FREE_UNPARSED_NAME 1
15015 _ACEOF
15016
15017 { echo "$as_me:$LINENO: result: yes" >&5
15018 echo "${ECHO_T}yes" >&6; }
15019 else
15020   echo "$as_me: failed program was:" >&5
15021 sed 's/^/| /' conftest.$ac_ext >&5
15022
15023         { echo "$as_me:$LINENO: result: no" >&5
15024 echo "${ECHO_T}no" >&6; }
15025 fi
15026
15027 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15028       conftest$ac_exeext conftest.$ac_ext
15029 fi
15030
15031
15032 ##
15033 ## Functions, global variables
15034 ##
15035
15036 { echo "$as_me:$LINENO: checking for int timezone" >&5
15037 echo $ECHO_N "checking for int timezone... $ECHO_C" >&6; }
15038 if test "${pgac_cv_var_int_timezone+set}" = set; then
15039   echo $ECHO_N "(cached) $ECHO_C" >&6
15040 else
15041   cat >conftest.$ac_ext <<_ACEOF
15042 /* confdefs.h.  */
15043 _ACEOF
15044 cat confdefs.h >>conftest.$ac_ext
15045 cat >>conftest.$ac_ext <<_ACEOF
15046 /* end confdefs.h.  */
15047 #include <time.h>
15048 int res;
15049 int
15050 main ()
15051 {
15052 #ifndef __CYGWIN__
15053 res = timezone / 60;
15054 #else
15055 res = _timezone / 60;
15056 #endif
15057   ;
15058   return 0;
15059 }
15060 _ACEOF
15061 rm -f conftest.$ac_objext conftest$ac_exeext
15062 if { (ac_try="$ac_link"
15063 case "(($ac_try" in
15064   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15065   *) ac_try_echo=$ac_try;;
15066 esac
15067 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15068   (eval "$ac_link") 2>conftest.er1
15069   ac_status=$?
15070   grep -v '^ *+' conftest.er1 >conftest.err
15071   rm -f conftest.er1
15072   cat conftest.err >&5
15073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15074   (exit $ac_status); } && {
15075          test -z "$ac_c_werror_flag" ||
15076          test ! -s conftest.err
15077        } && test -s conftest$ac_exeext &&
15078        $as_test_x conftest$ac_exeext; then
15079   pgac_cv_var_int_timezone=yes
15080 else
15081   echo "$as_me: failed program was:" >&5
15082 sed 's/^/| /' conftest.$ac_ext >&5
15083
15084         pgac_cv_var_int_timezone=no
15085 fi
15086
15087 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15088       conftest$ac_exeext conftest.$ac_ext
15089 fi
15090 { echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
15091 echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6; }
15092 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15093
15094 cat >>confdefs.h <<\_ACEOF
15095 #define HAVE_INT_TIMEZONE
15096 _ACEOF
15097
15098 fi
15099 { echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
15100 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6; }
15101  if test "${ac_cv_func_accept_return+set}" = set; then
15102   echo $ECHO_N "(cached) $ECHO_C" >&6
15103 else
15104    if test "${ac_cv_func_accept_arg1+set}" = set; then
15105   echo $ECHO_N "(cached) $ECHO_C" >&6
15106 else
15107     if test "${ac_cv_func_accept_arg2+set}" = set; then
15108   echo $ECHO_N "(cached) $ECHO_C" >&6
15109 else
15110      if test "${ac_cv_func_accept_arg3+set}" = set; then
15111   echo $ECHO_N "(cached) $ECHO_C" >&6
15112 else
15113       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
15114       for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
15115        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
15116         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
15117          cat >conftest.$ac_ext <<_ACEOF
15118 /* confdefs.h.  */
15119 _ACEOF
15120 cat confdefs.h >>conftest.$ac_ext
15121 cat >>conftest.$ac_ext <<_ACEOF
15122 /* end confdefs.h.  */
15123 #ifdef HAVE_SYS_TYPES_H
15124 #include <sys/types.h>
15125 #endif
15126 #ifdef HAVE_SYS_SOCKET_H
15127 #include <sys/socket.h>
15128 #endif
15129 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
15130 int
15131 main ()
15132 {
15133
15134   ;
15135   return 0;
15136 }
15137 _ACEOF
15138 rm -f conftest.$ac_objext
15139 if { (ac_try="$ac_compile"
15140 case "(($ac_try" in
15141   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15142   *) ac_try_echo=$ac_try;;
15143 esac
15144 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15145   (eval "$ac_compile") 2>conftest.er1
15146   ac_status=$?
15147   grep -v '^ *+' conftest.er1 >conftest.err
15148   rm -f conftest.er1
15149   cat conftest.err >&5
15150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15151   (exit $ac_status); } && {
15152          test -z "$ac_c_werror_flag" ||
15153          test ! -s conftest.err
15154        } && test -s conftest.$ac_objext; then
15155   ac_not_found=no; break 4
15156 else
15157   echo "$as_me: failed program was:" >&5
15158 sed 's/^/| /' conftest.$ac_ext >&5
15159
15160         ac_not_found=yes
15161 fi
15162
15163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15164        done
15165       done
15166      done
15167     done
15168     if test "$ac_not_found" = yes; then
15169       { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
15170 echo "$as_me: error: could not determine argument types" >&2;}
15171    { (exit 1); exit 1; }; }
15172     fi
15173     if test "$ac_cv_func_accept_arg3" = "void"; then
15174       ac_cv_func_accept_arg3=int
15175     fi
15176
15177 fi
15178
15179 fi
15180
15181 fi
15182
15183 fi
15184  { 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
15185 echo "${ECHO_T}$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
15186
15187 cat >>confdefs.h <<_ACEOF
15188 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
15189 _ACEOF
15190
15191
15192 cat >>confdefs.h <<_ACEOF
15193 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
15194 _ACEOF
15195
15196
15197 cat >>confdefs.h <<_ACEOF
15198 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
15199 _ACEOF
15200
15201
15202 cat >>confdefs.h <<_ACEOF
15203 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
15204 _ACEOF
15205
15206
15207 { echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
15208 echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6; }
15209 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
15210   echo $ECHO_N "(cached) $ECHO_C" >&6
15211 else
15212   cat >conftest.$ac_ext <<_ACEOF
15213 /* confdefs.h.  */
15214 _ACEOF
15215 cat confdefs.h >>conftest.$ac_ext
15216 cat >>conftest.$ac_ext <<_ACEOF
15217 /* end confdefs.h.  */
15218 #include <sys/time.h>
15219 int
15220 main ()
15221 {
15222 struct timeval *tp;
15223 struct timezone *tzp;
15224 gettimeofday(tp,tzp);
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   pgac_cv_func_gettimeofday_1arg=no
15247 else
15248   echo "$as_me: failed program was:" >&5
15249 sed 's/^/| /' conftest.$ac_ext >&5
15250
15251         pgac_cv_func_gettimeofday_1arg=yes
15252 fi
15253
15254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15255 fi
15256 { echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
15257 echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6; }
15258 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
15259
15260 cat >>confdefs.h <<\_ACEOF
15261 #define GETTIMEOFDAY_1ARG
15262 _ACEOF
15263
15264 fi
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288 for ac_func in cbrt dlopen fcvt fdatasync getpeereid getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
15289 do
15290 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15291 { echo "$as_me:$LINENO: checking for $ac_func" >&5
15292 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15293 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
15294   echo $ECHO_N "(cached) $ECHO_C" >&6
15295 else
15296   cat >conftest.$ac_ext <<_ACEOF
15297 /* confdefs.h.  */
15298 _ACEOF
15299 cat confdefs.h >>conftest.$ac_ext
15300 cat >>conftest.$ac_ext <<_ACEOF
15301 /* end confdefs.h.  */
15302 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15303    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15304 #define $ac_func innocuous_$ac_func
15305
15306 /* System header to define __stub macros and hopefully few prototypes,
15307     which can conflict with char $ac_func (); below.
15308     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15309     <limits.h> exists even on freestanding compilers.  */
15310
15311 #ifdef __STDC__
15312 # include <limits.h>
15313 #else
15314 # include <assert.h>
15315 #endif
15316
15317 #undef $ac_func
15318
15319 /* Override any GCC internal prototype to avoid an error.
15320    Use char because int might match the return type of a GCC
15321    builtin and then its argument prototype would still apply.  */
15322 #ifdef __cplusplus
15323 extern "C"
15324 #endif
15325 char $ac_func ();
15326 /* The GNU C library defines this for functions which it implements
15327     to always fail with ENOSYS.  Some functions are actually named
15328     something starting with __ and the normal name is an alias.  */
15329 #if defined __stub_$ac_func || defined __stub___$ac_func
15330 choke me
15331 #endif
15332
15333 int
15334 main ()
15335 {
15336 return $ac_func ();
15337   ;
15338   return 0;
15339 }
15340 _ACEOF
15341 rm -f conftest.$ac_objext conftest$ac_exeext
15342 if { (ac_try="$ac_link"
15343 case "(($ac_try" in
15344   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15345   *) ac_try_echo=$ac_try;;
15346 esac
15347 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15348   (eval "$ac_link") 2>conftest.er1
15349   ac_status=$?
15350   grep -v '^ *+' conftest.er1 >conftest.err
15351   rm -f conftest.er1
15352   cat conftest.err >&5
15353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15354   (exit $ac_status); } && {
15355          test -z "$ac_c_werror_flag" ||
15356          test ! -s conftest.err
15357        } && test -s conftest$ac_exeext &&
15358        $as_test_x conftest$ac_exeext; then
15359   eval "$as_ac_var=yes"
15360 else
15361   echo "$as_me: failed program was:" >&5
15362 sed 's/^/| /' conftest.$ac_ext >&5
15363
15364         eval "$as_ac_var=no"
15365 fi
15366
15367 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15368       conftest$ac_exeext conftest.$ac_ext
15369 fi
15370 ac_res=`eval echo '${'$as_ac_var'}'`
15371                { echo "$as_me:$LINENO: result: $ac_res" >&5
15372 echo "${ECHO_T}$ac_res" >&6; }
15373 if test `eval echo '${'$as_ac_var'}'` = yes; then
15374   cat >>confdefs.h <<_ACEOF
15375 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15376 _ACEOF
15377
15378 fi
15379 done
15380
15381
15382 { echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
15383 echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6; }
15384 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
15385   echo $ECHO_N "(cached) $ECHO_C" >&6
15386 else
15387   cat >conftest.$ac_ext <<_ACEOF
15388 /* confdefs.h.  */
15389 _ACEOF
15390 cat confdefs.h >>conftest.$ac_ext
15391 cat >>conftest.$ac_ext <<_ACEOF
15392 /* end confdefs.h.  */
15393 #include <unistd.h>
15394
15395 int
15396 main ()
15397 {
15398 #ifndef fdatasync
15399   (void) fdatasync;
15400 #endif
15401
15402   ;
15403   return 0;
15404 }
15405 _ACEOF
15406 rm -f conftest.$ac_objext
15407 if { (ac_try="$ac_compile"
15408 case "(($ac_try" in
15409   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15410   *) ac_try_echo=$ac_try;;
15411 esac
15412 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15413   (eval "$ac_compile") 2>conftest.er1
15414   ac_status=$?
15415   grep -v '^ *+' conftest.er1 >conftest.err
15416   rm -f conftest.er1
15417   cat conftest.err >&5
15418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15419   (exit $ac_status); } && {
15420          test -z "$ac_c_werror_flag" ||
15421          test ! -s conftest.err
15422        } && test -s conftest.$ac_objext; then
15423   ac_cv_have_decl_fdatasync=yes
15424 else
15425   echo "$as_me: failed program was:" >&5
15426 sed 's/^/| /' conftest.$ac_ext >&5
15427
15428         ac_cv_have_decl_fdatasync=no
15429 fi
15430
15431 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15432 fi
15433 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
15434 echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6; }
15435 if test $ac_cv_have_decl_fdatasync = yes; then
15436
15437 cat >>confdefs.h <<_ACEOF
15438 #define HAVE_DECL_FDATASYNC 1
15439 _ACEOF
15440
15441
15442 else
15443   cat >>confdefs.h <<_ACEOF
15444 #define HAVE_DECL_FDATASYNC 0
15445 _ACEOF
15446
15447
15448 fi
15449
15450
15451 { echo "$as_me:$LINENO: checking whether posix_fadvise is declared" >&5
15452 echo $ECHO_N "checking whether posix_fadvise is declared... $ECHO_C" >&6; }
15453 if test "${ac_cv_have_decl_posix_fadvise+set}" = set; then
15454   echo $ECHO_N "(cached) $ECHO_C" >&6
15455 else
15456   cat >conftest.$ac_ext <<_ACEOF
15457 /* confdefs.h.  */
15458 _ACEOF
15459 cat confdefs.h >>conftest.$ac_ext
15460 cat >>conftest.$ac_ext <<_ACEOF
15461 /* end confdefs.h.  */
15462 #include <fcntl.h>
15463
15464 int
15465 main ()
15466 {
15467 #ifndef posix_fadvise
15468   (void) posix_fadvise;
15469 #endif
15470
15471   ;
15472   return 0;
15473 }
15474 _ACEOF
15475 rm -f conftest.$ac_objext
15476 if { (ac_try="$ac_compile"
15477 case "(($ac_try" in
15478   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15479   *) ac_try_echo=$ac_try;;
15480 esac
15481 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15482   (eval "$ac_compile") 2>conftest.er1
15483   ac_status=$?
15484   grep -v '^ *+' conftest.er1 >conftest.err
15485   rm -f conftest.er1
15486   cat conftest.err >&5
15487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15488   (exit $ac_status); } && {
15489          test -z "$ac_c_werror_flag" ||
15490          test ! -s conftest.err
15491        } && test -s conftest.$ac_objext; then
15492   ac_cv_have_decl_posix_fadvise=yes
15493 else
15494   echo "$as_me: failed program was:" >&5
15495 sed 's/^/| /' conftest.$ac_ext >&5
15496
15497         ac_cv_have_decl_posix_fadvise=no
15498 fi
15499
15500 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15501 fi
15502 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix_fadvise" >&5
15503 echo "${ECHO_T}$ac_cv_have_decl_posix_fadvise" >&6; }
15504 if test $ac_cv_have_decl_posix_fadvise = yes; then
15505
15506 cat >>confdefs.h <<_ACEOF
15507 #define HAVE_DECL_POSIX_FADVISE 1
15508 _ACEOF
15509
15510
15511 else
15512   cat >>confdefs.h <<_ACEOF
15513 #define HAVE_DECL_POSIX_FADVISE 0
15514 _ACEOF
15515
15516
15517 fi
15518
15519
15520 { echo "$as_me:$LINENO: checking whether strlcat is declared" >&5
15521 echo $ECHO_N "checking whether strlcat is declared... $ECHO_C" >&6; }
15522 if test "${ac_cv_have_decl_strlcat+set}" = set; then
15523   echo $ECHO_N "(cached) $ECHO_C" >&6
15524 else
15525   cat >conftest.$ac_ext <<_ACEOF
15526 /* confdefs.h.  */
15527 _ACEOF
15528 cat confdefs.h >>conftest.$ac_ext
15529 cat >>conftest.$ac_ext <<_ACEOF
15530 /* end confdefs.h.  */
15531 $ac_includes_default
15532 int
15533 main ()
15534 {
15535 #ifndef strlcat
15536   (void) strlcat;
15537 #endif
15538
15539   ;
15540   return 0;
15541 }
15542 _ACEOF
15543 rm -f conftest.$ac_objext
15544 if { (ac_try="$ac_compile"
15545 case "(($ac_try" in
15546   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15547   *) ac_try_echo=$ac_try;;
15548 esac
15549 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15550   (eval "$ac_compile") 2>conftest.er1
15551   ac_status=$?
15552   grep -v '^ *+' conftest.er1 >conftest.err
15553   rm -f conftest.er1
15554   cat conftest.err >&5
15555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15556   (exit $ac_status); } && {
15557          test -z "$ac_c_werror_flag" ||
15558          test ! -s conftest.err
15559        } && test -s conftest.$ac_objext; then
15560   ac_cv_have_decl_strlcat=yes
15561 else
15562   echo "$as_me: failed program was:" >&5
15563 sed 's/^/| /' conftest.$ac_ext >&5
15564
15565         ac_cv_have_decl_strlcat=no
15566 fi
15567
15568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15569 fi
15570 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcat" >&5
15571 echo "${ECHO_T}$ac_cv_have_decl_strlcat" >&6; }
15572 if test $ac_cv_have_decl_strlcat = yes; then
15573
15574 cat >>confdefs.h <<_ACEOF
15575 #define HAVE_DECL_STRLCAT 1
15576 _ACEOF
15577
15578
15579 else
15580   cat >>confdefs.h <<_ACEOF
15581 #define HAVE_DECL_STRLCAT 0
15582 _ACEOF
15583
15584
15585 fi
15586 { echo "$as_me:$LINENO: checking whether strlcpy is declared" >&5
15587 echo $ECHO_N "checking whether strlcpy is declared... $ECHO_C" >&6; }
15588 if test "${ac_cv_have_decl_strlcpy+set}" = set; then
15589   echo $ECHO_N "(cached) $ECHO_C" >&6
15590 else
15591   cat >conftest.$ac_ext <<_ACEOF
15592 /* confdefs.h.  */
15593 _ACEOF
15594 cat confdefs.h >>conftest.$ac_ext
15595 cat >>conftest.$ac_ext <<_ACEOF
15596 /* end confdefs.h.  */
15597 $ac_includes_default
15598 int
15599 main ()
15600 {
15601 #ifndef strlcpy
15602   (void) strlcpy;
15603 #endif
15604
15605   ;
15606   return 0;
15607 }
15608 _ACEOF
15609 rm -f conftest.$ac_objext
15610 if { (ac_try="$ac_compile"
15611 case "(($ac_try" in
15612   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15613   *) ac_try_echo=$ac_try;;
15614 esac
15615 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15616   (eval "$ac_compile") 2>conftest.er1
15617   ac_status=$?
15618   grep -v '^ *+' conftest.er1 >conftest.err
15619   rm -f conftest.er1
15620   cat conftest.err >&5
15621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15622   (exit $ac_status); } && {
15623          test -z "$ac_c_werror_flag" ||
15624          test ! -s conftest.err
15625        } && test -s conftest.$ac_objext; then
15626   ac_cv_have_decl_strlcpy=yes
15627 else
15628   echo "$as_me: failed program was:" >&5
15629 sed 's/^/| /' conftest.$ac_ext >&5
15630
15631         ac_cv_have_decl_strlcpy=no
15632 fi
15633
15634 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15635 fi
15636 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcpy" >&5
15637 echo "${ECHO_T}$ac_cv_have_decl_strlcpy" >&6; }
15638 if test $ac_cv_have_decl_strlcpy = yes; then
15639
15640 cat >>confdefs.h <<_ACEOF
15641 #define HAVE_DECL_STRLCPY 1
15642 _ACEOF
15643
15644
15645 else
15646   cat >>confdefs.h <<_ACEOF
15647 #define HAVE_DECL_STRLCPY 0
15648 _ACEOF
15649
15650
15651 fi
15652
15653
15654 # This is probably only present on Darwin, but may as well check always
15655 { echo "$as_me:$LINENO: checking whether F_FULLFSYNC is declared" >&5
15656 echo $ECHO_N "checking whether F_FULLFSYNC is declared... $ECHO_C" >&6; }
15657 if test "${ac_cv_have_decl_F_FULLFSYNC+set}" = set; then
15658   echo $ECHO_N "(cached) $ECHO_C" >&6
15659 else
15660   cat >conftest.$ac_ext <<_ACEOF
15661 /* confdefs.h.  */
15662 _ACEOF
15663 cat confdefs.h >>conftest.$ac_ext
15664 cat >>conftest.$ac_ext <<_ACEOF
15665 /* end confdefs.h.  */
15666 #include <fcntl.h>
15667
15668 int
15669 main ()
15670 {
15671 #ifndef F_FULLFSYNC
15672   (void) F_FULLFSYNC;
15673 #endif
15674
15675   ;
15676   return 0;
15677 }
15678 _ACEOF
15679 rm -f conftest.$ac_objext
15680 if { (ac_try="$ac_compile"
15681 case "(($ac_try" in
15682   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15683   *) ac_try_echo=$ac_try;;
15684 esac
15685 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15686   (eval "$ac_compile") 2>conftest.er1
15687   ac_status=$?
15688   grep -v '^ *+' conftest.er1 >conftest.err
15689   rm -f conftest.er1
15690   cat conftest.err >&5
15691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15692   (exit $ac_status); } && {
15693          test -z "$ac_c_werror_flag" ||
15694          test ! -s conftest.err
15695        } && test -s conftest.$ac_objext; then
15696   ac_cv_have_decl_F_FULLFSYNC=yes
15697 else
15698   echo "$as_me: failed program was:" >&5
15699 sed 's/^/| /' conftest.$ac_ext >&5
15700
15701         ac_cv_have_decl_F_FULLFSYNC=no
15702 fi
15703
15704 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15705 fi
15706 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_FULLFSYNC" >&5
15707 echo "${ECHO_T}$ac_cv_have_decl_F_FULLFSYNC" >&6; }
15708 if test $ac_cv_have_decl_F_FULLFSYNC = yes; then
15709
15710 cat >>confdefs.h <<_ACEOF
15711 #define HAVE_DECL_F_FULLFSYNC 1
15712 _ACEOF
15713
15714
15715 else
15716   cat >>confdefs.h <<_ACEOF
15717 #define HAVE_DECL_F_FULLFSYNC 0
15718 _ACEOF
15719
15720
15721 fi
15722
15723
15724
15725 HAVE_IPV6=no
15726 { echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
15727 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6; }
15728 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
15729   echo $ECHO_N "(cached) $ECHO_C" >&6
15730 else
15731   cat >conftest.$ac_ext <<_ACEOF
15732 /* confdefs.h.  */
15733 _ACEOF
15734 cat confdefs.h >>conftest.$ac_ext
15735 cat >>conftest.$ac_ext <<_ACEOF
15736 /* end confdefs.h.  */
15737 $ac_includes_default
15738 #include <netinet/in.h>
15739
15740 typedef struct sockaddr_in6 ac__type_new_;
15741 int
15742 main ()
15743 {
15744 if ((ac__type_new_ *) 0)
15745   return 0;
15746 if (sizeof (ac__type_new_))
15747   return 0;
15748   ;
15749   return 0;
15750 }
15751 _ACEOF
15752 rm -f conftest.$ac_objext
15753 if { (ac_try="$ac_compile"
15754 case "(($ac_try" in
15755   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15756   *) ac_try_echo=$ac_try;;
15757 esac
15758 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15759   (eval "$ac_compile") 2>conftest.er1
15760   ac_status=$?
15761   grep -v '^ *+' conftest.er1 >conftest.err
15762   rm -f conftest.er1
15763   cat conftest.err >&5
15764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15765   (exit $ac_status); } && {
15766          test -z "$ac_c_werror_flag" ||
15767          test ! -s conftest.err
15768        } && test -s conftest.$ac_objext; then
15769   ac_cv_type_struct_sockaddr_in6=yes
15770 else
15771   echo "$as_me: failed program was:" >&5
15772 sed 's/^/| /' conftest.$ac_ext >&5
15773
15774         ac_cv_type_struct_sockaddr_in6=no
15775 fi
15776
15777 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15778 fi
15779 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
15780 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6; }
15781 if test $ac_cv_type_struct_sockaddr_in6 = yes; then
15782
15783 cat >>confdefs.h <<\_ACEOF
15784 #define HAVE_IPV6 1
15785 _ACEOF
15786
15787          HAVE_IPV6=yes
15788 fi
15789
15790
15791
15792 { echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
15793 echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6; }
15794 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
15795   echo $ECHO_N "(cached) $ECHO_C" >&6
15796 else
15797   cat >conftest.$ac_ext <<_ACEOF
15798 /* confdefs.h.  */
15799 _ACEOF
15800 cat confdefs.h >>conftest.$ac_ext
15801 cat >>conftest.$ac_ext <<_ACEOF
15802 /* end confdefs.h.  */
15803 #include <machine/vmparam.h>
15804 #include <sys/exec.h>
15805
15806 int
15807 main ()
15808 {
15809 PS_STRINGS->ps_nargvstr = 1;
15810 PS_STRINGS->ps_argvstr = "foo";
15811   ;
15812   return 0;
15813 }
15814 _ACEOF
15815 rm -f conftest.$ac_objext conftest$ac_exeext
15816 if { (ac_try="$ac_link"
15817 case "(($ac_try" in
15818   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15819   *) ac_try_echo=$ac_try;;
15820 esac
15821 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15822   (eval "$ac_link") 2>conftest.er1
15823   ac_status=$?
15824   grep -v '^ *+' conftest.er1 >conftest.err
15825   rm -f conftest.er1
15826   cat conftest.err >&5
15827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15828   (exit $ac_status); } && {
15829          test -z "$ac_c_werror_flag" ||
15830          test ! -s conftest.err
15831        } && test -s conftest$ac_exeext &&
15832        $as_test_x conftest$ac_exeext; then
15833   pgac_cv_var_PS_STRINGS=yes
15834 else
15835   echo "$as_me: failed program was:" >&5
15836 sed 's/^/| /' conftest.$ac_ext >&5
15837
15838         pgac_cv_var_PS_STRINGS=no
15839 fi
15840
15841 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15842       conftest$ac_exeext conftest.$ac_ext
15843 fi
15844 { echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
15845 echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6; }
15846 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
15847
15848 cat >>confdefs.h <<\_ACEOF
15849 #define HAVE_PS_STRINGS
15850 _ACEOF
15851
15852 fi
15853
15854
15855 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
15856 # is missing.  Yes, there are machines that have only one.  We may
15857 # also decide to use snprintf.c if snprintf() is present but does not
15858 # have all the features we need --- see below.
15859
15860 if test "$PORTNAME" = "win32"; then
15861   # Win32 gets snprintf.c built unconditionally.
15862   #
15863   # To properly translate all NLS languages strings, we must support the
15864   # *printf() %$ format, which allows *printf() arguments to be selected
15865   # by position in the translated string.
15866   #
15867   # libintl versions < 0.13 use the native *printf() functions, and Win32
15868   # *printf() doesn't understand %$, so we must use our /port versions,
15869   # which do understand %$. libintl versions >= 0.13 include their own
15870   # *printf versions on Win32.  The libintl 0.13 release note text is:
15871   #
15872   #   C format strings with positions, as they arise when a translator
15873   #   needs to reorder a sentence, are now supported on all platforms.
15874   #   On those few platforms (NetBSD and Woe32) for which the native
15875   #   printf()/fprintf()/... functions don't support such format
15876   #   strings, replacements are provided through <libintl.h>.
15877   #
15878   # We could use libintl >= 0.13's *printf() if we were sure that we had
15879   # a litint >= 0.13 at runtime, but seeing that there is no clean way
15880   # to guarantee that, it is best to just use our own, so we are sure to
15881   # get %$ support. In include/port.h we disable the *printf() macros
15882   # that might have been defined by libintl.
15883   #
15884   # We do this unconditionally whether NLS is used or not so we are sure
15885   # that all Win32 libraries and binaries behave the same.
15886   pgac_need_repl_snprintf=yes
15887 else
15888   pgac_need_repl_snprintf=no
15889
15890 for ac_func in snprintf
15891 do
15892 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15893 { echo "$as_me:$LINENO: checking for $ac_func" >&5
15894 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15895 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
15896   echo $ECHO_N "(cached) $ECHO_C" >&6
15897 else
15898   cat >conftest.$ac_ext <<_ACEOF
15899 /* confdefs.h.  */
15900 _ACEOF
15901 cat confdefs.h >>conftest.$ac_ext
15902 cat >>conftest.$ac_ext <<_ACEOF
15903 /* end confdefs.h.  */
15904 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15905    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15906 #define $ac_func innocuous_$ac_func
15907
15908 /* System header to define __stub macros and hopefully few prototypes,
15909     which can conflict with char $ac_func (); below.
15910     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15911     <limits.h> exists even on freestanding compilers.  */
15912
15913 #ifdef __STDC__
15914 # include <limits.h>
15915 #else
15916 # include <assert.h>
15917 #endif
15918
15919 #undef $ac_func
15920
15921 /* Override any GCC internal prototype to avoid an error.
15922    Use char because int might match the return type of a GCC
15923    builtin and then its argument prototype would still apply.  */
15924 #ifdef __cplusplus
15925 extern "C"
15926 #endif
15927 char $ac_func ();
15928 /* The GNU C library defines this for functions which it implements
15929     to always fail with ENOSYS.  Some functions are actually named
15930     something starting with __ and the normal name is an alias.  */
15931 #if defined __stub_$ac_func || defined __stub___$ac_func
15932 choke me
15933 #endif
15934
15935 int
15936 main ()
15937 {
15938 return $ac_func ();
15939   ;
15940   return 0;
15941 }
15942 _ACEOF
15943 rm -f conftest.$ac_objext conftest$ac_exeext
15944 if { (ac_try="$ac_link"
15945 case "(($ac_try" in
15946   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15947   *) ac_try_echo=$ac_try;;
15948 esac
15949 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15950   (eval "$ac_link") 2>conftest.er1
15951   ac_status=$?
15952   grep -v '^ *+' conftest.er1 >conftest.err
15953   rm -f conftest.er1
15954   cat conftest.err >&5
15955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15956   (exit $ac_status); } && {
15957          test -z "$ac_c_werror_flag" ||
15958          test ! -s conftest.err
15959        } && test -s conftest$ac_exeext &&
15960        $as_test_x conftest$ac_exeext; then
15961   eval "$as_ac_var=yes"
15962 else
15963   echo "$as_me: failed program was:" >&5
15964 sed 's/^/| /' conftest.$ac_ext >&5
15965
15966         eval "$as_ac_var=no"
15967 fi
15968
15969 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15970       conftest$ac_exeext conftest.$ac_ext
15971 fi
15972 ac_res=`eval echo '${'$as_ac_var'}'`
15973                { echo "$as_me:$LINENO: result: $ac_res" >&5
15974 echo "${ECHO_T}$ac_res" >&6; }
15975 if test `eval echo '${'$as_ac_var'}'` = yes; then
15976   cat >>confdefs.h <<_ACEOF
15977 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15978 _ACEOF
15979
15980 else
15981   pgac_need_repl_snprintf=yes
15982 fi
15983 done
15984
15985
15986 for ac_func in vsnprintf
15987 do
15988 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15989 { echo "$as_me:$LINENO: checking for $ac_func" >&5
15990 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15991 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
15992   echo $ECHO_N "(cached) $ECHO_C" >&6
15993 else
15994   cat >conftest.$ac_ext <<_ACEOF
15995 /* confdefs.h.  */
15996 _ACEOF
15997 cat confdefs.h >>conftest.$ac_ext
15998 cat >>conftest.$ac_ext <<_ACEOF
15999 /* end confdefs.h.  */
16000 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16001    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16002 #define $ac_func innocuous_$ac_func
16003
16004 /* System header to define __stub macros and hopefully few prototypes,
16005     which can conflict with char $ac_func (); below.
16006     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16007     <limits.h> exists even on freestanding compilers.  */
16008
16009 #ifdef __STDC__
16010 # include <limits.h>
16011 #else
16012 # include <assert.h>
16013 #endif
16014
16015 #undef $ac_func
16016
16017 /* Override any GCC internal prototype to avoid an error.
16018    Use char because int might match the return type of a GCC
16019    builtin and then its argument prototype would still apply.  */
16020 #ifdef __cplusplus
16021 extern "C"
16022 #endif
16023 char $ac_func ();
16024 /* The GNU C library defines this for functions which it implements
16025     to always fail with ENOSYS.  Some functions are actually named
16026     something starting with __ and the normal name is an alias.  */
16027 #if defined __stub_$ac_func || defined __stub___$ac_func
16028 choke me
16029 #endif
16030
16031 int
16032 main ()
16033 {
16034 return $ac_func ();
16035   ;
16036   return 0;
16037 }
16038 _ACEOF
16039 rm -f conftest.$ac_objext conftest$ac_exeext
16040 if { (ac_try="$ac_link"
16041 case "(($ac_try" in
16042   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16043   *) ac_try_echo=$ac_try;;
16044 esac
16045 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16046   (eval "$ac_link") 2>conftest.er1
16047   ac_status=$?
16048   grep -v '^ *+' conftest.er1 >conftest.err
16049   rm -f conftest.er1
16050   cat conftest.err >&5
16051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16052   (exit $ac_status); } && {
16053          test -z "$ac_c_werror_flag" ||
16054          test ! -s conftest.err
16055        } && test -s conftest$ac_exeext &&
16056        $as_test_x conftest$ac_exeext; then
16057   eval "$as_ac_var=yes"
16058 else
16059   echo "$as_me: failed program was:" >&5
16060 sed 's/^/| /' conftest.$ac_ext >&5
16061
16062         eval "$as_ac_var=no"
16063 fi
16064
16065 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16066       conftest$ac_exeext conftest.$ac_ext
16067 fi
16068 ac_res=`eval echo '${'$as_ac_var'}'`
16069                { echo "$as_me:$LINENO: result: $ac_res" >&5
16070 echo "${ECHO_T}$ac_res" >&6; }
16071 if test `eval echo '${'$as_ac_var'}'` = yes; then
16072   cat >>confdefs.h <<_ACEOF
16073 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16074 _ACEOF
16075
16076 else
16077   pgac_need_repl_snprintf=yes
16078 fi
16079 done
16080
16081 fi
16082
16083
16084 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
16085 # include/c.h will provide declarations.  Note this is a separate test
16086 # from whether the functions exist in the C library --- there are
16087 # systems that have the functions but don't bother to declare them :-(
16088
16089 { echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
16090 echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6; }
16091 if test "${ac_cv_have_decl_snprintf+set}" = set; then
16092   echo $ECHO_N "(cached) $ECHO_C" >&6
16093 else
16094   cat >conftest.$ac_ext <<_ACEOF
16095 /* confdefs.h.  */
16096 _ACEOF
16097 cat confdefs.h >>conftest.$ac_ext
16098 cat >>conftest.$ac_ext <<_ACEOF
16099 /* end confdefs.h.  */
16100 $ac_includes_default
16101 int
16102 main ()
16103 {
16104 #ifndef snprintf
16105   (void) snprintf;
16106 #endif
16107
16108   ;
16109   return 0;
16110 }
16111 _ACEOF
16112 rm -f conftest.$ac_objext
16113 if { (ac_try="$ac_compile"
16114 case "(($ac_try" in
16115   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16116   *) ac_try_echo=$ac_try;;
16117 esac
16118 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16119   (eval "$ac_compile") 2>conftest.er1
16120   ac_status=$?
16121   grep -v '^ *+' conftest.er1 >conftest.err
16122   rm -f conftest.er1
16123   cat conftest.err >&5
16124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16125   (exit $ac_status); } && {
16126          test -z "$ac_c_werror_flag" ||
16127          test ! -s conftest.err
16128        } && test -s conftest.$ac_objext; then
16129   ac_cv_have_decl_snprintf=yes
16130 else
16131   echo "$as_me: failed program was:" >&5
16132 sed 's/^/| /' conftest.$ac_ext >&5
16133
16134         ac_cv_have_decl_snprintf=no
16135 fi
16136
16137 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16138 fi
16139 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
16140 echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6; }
16141 if test $ac_cv_have_decl_snprintf = yes; then
16142
16143 cat >>confdefs.h <<_ACEOF
16144 #define HAVE_DECL_SNPRINTF 1
16145 _ACEOF
16146
16147
16148 else
16149   cat >>confdefs.h <<_ACEOF
16150 #define HAVE_DECL_SNPRINTF 0
16151 _ACEOF
16152
16153
16154 fi
16155 { echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
16156 echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6; }
16157 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
16158   echo $ECHO_N "(cached) $ECHO_C" >&6
16159 else
16160   cat >conftest.$ac_ext <<_ACEOF
16161 /* confdefs.h.  */
16162 _ACEOF
16163 cat confdefs.h >>conftest.$ac_ext
16164 cat >>conftest.$ac_ext <<_ACEOF
16165 /* end confdefs.h.  */
16166 $ac_includes_default
16167 int
16168 main ()
16169 {
16170 #ifndef vsnprintf
16171   (void) vsnprintf;
16172 #endif
16173
16174   ;
16175   return 0;
16176 }
16177 _ACEOF
16178 rm -f conftest.$ac_objext
16179 if { (ac_try="$ac_compile"
16180 case "(($ac_try" in
16181   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16182   *) ac_try_echo=$ac_try;;
16183 esac
16184 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16185   (eval "$ac_compile") 2>conftest.er1
16186   ac_status=$?
16187   grep -v '^ *+' conftest.er1 >conftest.err
16188   rm -f conftest.er1
16189   cat conftest.err >&5
16190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16191   (exit $ac_status); } && {
16192          test -z "$ac_c_werror_flag" ||
16193          test ! -s conftest.err
16194        } && test -s conftest.$ac_objext; then
16195   ac_cv_have_decl_vsnprintf=yes
16196 else
16197   echo "$as_me: failed program was:" >&5
16198 sed 's/^/| /' conftest.$ac_ext >&5
16199
16200         ac_cv_have_decl_vsnprintf=no
16201 fi
16202
16203 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16204 fi
16205 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
16206 echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6; }
16207 if test $ac_cv_have_decl_vsnprintf = yes; then
16208
16209 cat >>confdefs.h <<_ACEOF
16210 #define HAVE_DECL_VSNPRINTF 1
16211 _ACEOF
16212
16213
16214 else
16215   cat >>confdefs.h <<_ACEOF
16216 #define HAVE_DECL_VSNPRINTF 0
16217 _ACEOF
16218
16219
16220 fi
16221
16222
16223
16224
16225 { echo "$as_me:$LINENO: checking for isinf" >&5
16226 echo $ECHO_N "checking for isinf... $ECHO_C" >&6; }
16227 if test "${ac_cv_func_isinf+set}" = set; then
16228   echo $ECHO_N "(cached) $ECHO_C" >&6
16229 else
16230   cat >conftest.$ac_ext <<_ACEOF
16231 /* confdefs.h.  */
16232 _ACEOF
16233 cat confdefs.h >>conftest.$ac_ext
16234 cat >>conftest.$ac_ext <<_ACEOF
16235 /* end confdefs.h.  */
16236
16237 #include <math.h>
16238 double glob_double;
16239
16240 int
16241 main ()
16242 {
16243 return isinf(glob_double) ? 0 : 1;
16244   ;
16245   return 0;
16246 }
16247 _ACEOF
16248 rm -f conftest.$ac_objext conftest$ac_exeext
16249 if { (ac_try="$ac_link"
16250 case "(($ac_try" in
16251   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16252   *) ac_try_echo=$ac_try;;
16253 esac
16254 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16255   (eval "$ac_link") 2>conftest.er1
16256   ac_status=$?
16257   grep -v '^ *+' conftest.er1 >conftest.err
16258   rm -f conftest.er1
16259   cat conftest.err >&5
16260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16261   (exit $ac_status); } && {
16262          test -z "$ac_c_werror_flag" ||
16263          test ! -s conftest.err
16264        } && test -s conftest$ac_exeext &&
16265        $as_test_x conftest$ac_exeext; then
16266   ac_cv_func_isinf=yes
16267 else
16268   echo "$as_me: failed program was:" >&5
16269 sed 's/^/| /' conftest.$ac_ext >&5
16270
16271         ac_cv_func_isinf=no
16272 fi
16273
16274 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16275       conftest$ac_exeext conftest.$ac_ext
16276 fi
16277 { echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
16278 echo "${ECHO_T}$ac_cv_func_isinf" >&6; }
16279
16280 if test $ac_cv_func_isinf = yes ; then
16281
16282 cat >>confdefs.h <<\_ACEOF
16283 #define HAVE_ISINF 1
16284 _ACEOF
16285
16286 else
16287   case " $LIBOBJS " in
16288   *" isinf.$ac_objext "* ) ;;
16289   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
16290  ;;
16291 esac
16292
16293   # Look for a way to implement a substitute for isinf()
16294
16295
16296
16297
16298 for ac_func in fpclass fp_class fp_class_d class
16299 do
16300 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16301 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16302 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16303 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16304   echo $ECHO_N "(cached) $ECHO_C" >&6
16305 else
16306   cat >conftest.$ac_ext <<_ACEOF
16307 /* confdefs.h.  */
16308 _ACEOF
16309 cat confdefs.h >>conftest.$ac_ext
16310 cat >>conftest.$ac_ext <<_ACEOF
16311 /* end confdefs.h.  */
16312 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16313    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16314 #define $ac_func innocuous_$ac_func
16315
16316 /* System header to define __stub macros and hopefully few prototypes,
16317     which can conflict with char $ac_func (); below.
16318     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16319     <limits.h> exists even on freestanding compilers.  */
16320
16321 #ifdef __STDC__
16322 # include <limits.h>
16323 #else
16324 # include <assert.h>
16325 #endif
16326
16327 #undef $ac_func
16328
16329 /* Override any GCC internal prototype to avoid an error.
16330    Use char because int might match the return type of a GCC
16331    builtin and then its argument prototype would still apply.  */
16332 #ifdef __cplusplus
16333 extern "C"
16334 #endif
16335 char $ac_func ();
16336 /* The GNU C library defines this for functions which it implements
16337     to always fail with ENOSYS.  Some functions are actually named
16338     something starting with __ and the normal name is an alias.  */
16339 #if defined __stub_$ac_func || defined __stub___$ac_func
16340 choke me
16341 #endif
16342
16343 int
16344 main ()
16345 {
16346 return $ac_func ();
16347   ;
16348   return 0;
16349 }
16350 _ACEOF
16351 rm -f conftest.$ac_objext conftest$ac_exeext
16352 if { (ac_try="$ac_link"
16353 case "(($ac_try" in
16354   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16355   *) ac_try_echo=$ac_try;;
16356 esac
16357 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16358   (eval "$ac_link") 2>conftest.er1
16359   ac_status=$?
16360   grep -v '^ *+' conftest.er1 >conftest.err
16361   rm -f conftest.er1
16362   cat conftest.err >&5
16363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16364   (exit $ac_status); } && {
16365          test -z "$ac_c_werror_flag" ||
16366          test ! -s conftest.err
16367        } && test -s conftest$ac_exeext &&
16368        $as_test_x conftest$ac_exeext; then
16369   eval "$as_ac_var=yes"
16370 else
16371   echo "$as_me: failed program was:" >&5
16372 sed 's/^/| /' conftest.$ac_ext >&5
16373
16374         eval "$as_ac_var=no"
16375 fi
16376
16377 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16378       conftest$ac_exeext conftest.$ac_ext
16379 fi
16380 ac_res=`eval echo '${'$as_ac_var'}'`
16381                { echo "$as_me:$LINENO: result: $ac_res" >&5
16382 echo "${ECHO_T}$ac_res" >&6; }
16383 if test `eval echo '${'$as_ac_var'}'` = yes; then
16384   cat >>confdefs.h <<_ACEOF
16385 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16386 _ACEOF
16387  break
16388 fi
16389 done
16390
16391 fi
16392
16393 # Some versions of libedit contain strlcpy(); so disregard that library while
16394 # checking for these standard libc functions.
16395 pgac_save_LIBS="$LIBS"
16396 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412 for ac_func in crypt getopt getrusage inet_aton random rint srandom strdup strerror strlcat strlcpy strtol strtoul unsetenv
16413 do
16414 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16415 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16416 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16417 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16418   echo $ECHO_N "(cached) $ECHO_C" >&6
16419 else
16420   cat >conftest.$ac_ext <<_ACEOF
16421 /* confdefs.h.  */
16422 _ACEOF
16423 cat confdefs.h >>conftest.$ac_ext
16424 cat >>conftest.$ac_ext <<_ACEOF
16425 /* end confdefs.h.  */
16426 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16427    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16428 #define $ac_func innocuous_$ac_func
16429
16430 /* System header to define __stub macros and hopefully few prototypes,
16431     which can conflict with char $ac_func (); below.
16432     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16433     <limits.h> exists even on freestanding compilers.  */
16434
16435 #ifdef __STDC__
16436 # include <limits.h>
16437 #else
16438 # include <assert.h>
16439 #endif
16440
16441 #undef $ac_func
16442
16443 /* Override any GCC internal prototype to avoid an error.
16444    Use char because int might match the return type of a GCC
16445    builtin and then its argument prototype would still apply.  */
16446 #ifdef __cplusplus
16447 extern "C"
16448 #endif
16449 char $ac_func ();
16450 /* The GNU C library defines this for functions which it implements
16451     to always fail with ENOSYS.  Some functions are actually named
16452     something starting with __ and the normal name is an alias.  */
16453 #if defined __stub_$ac_func || defined __stub___$ac_func
16454 choke me
16455 #endif
16456
16457 int
16458 main ()
16459 {
16460 return $ac_func ();
16461   ;
16462   return 0;
16463 }
16464 _ACEOF
16465 rm -f conftest.$ac_objext conftest$ac_exeext
16466 if { (ac_try="$ac_link"
16467 case "(($ac_try" in
16468   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16469   *) ac_try_echo=$ac_try;;
16470 esac
16471 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16472   (eval "$ac_link") 2>conftest.er1
16473   ac_status=$?
16474   grep -v '^ *+' conftest.er1 >conftest.err
16475   rm -f conftest.er1
16476   cat conftest.err >&5
16477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16478   (exit $ac_status); } && {
16479          test -z "$ac_c_werror_flag" ||
16480          test ! -s conftest.err
16481        } && test -s conftest$ac_exeext &&
16482        $as_test_x conftest$ac_exeext; then
16483   eval "$as_ac_var=yes"
16484 else
16485   echo "$as_me: failed program was:" >&5
16486 sed 's/^/| /' conftest.$ac_ext >&5
16487
16488         eval "$as_ac_var=no"
16489 fi
16490
16491 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16492       conftest$ac_exeext conftest.$ac_ext
16493 fi
16494 ac_res=`eval echo '${'$as_ac_var'}'`
16495                { echo "$as_me:$LINENO: result: $ac_res" >&5
16496 echo "${ECHO_T}$ac_res" >&6; }
16497 if test `eval echo '${'$as_ac_var'}'` = yes; then
16498   cat >>confdefs.h <<_ACEOF
16499 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16500 _ACEOF
16501
16502 else
16503   case " $LIBOBJS " in
16504   *" $ac_func.$ac_objext "* ) ;;
16505   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
16506  ;;
16507 esac
16508
16509 fi
16510 done
16511
16512
16513
16514 LIBS="$pgac_save_LIBS"
16515
16516 # System's version of getaddrinfo(), if any, may be used only if we found
16517 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
16518 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
16519 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
16520 # because we want to use our own getaddrinfo.c on Windows anyway.)
16521 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
16522
16523 for ac_func in getaddrinfo
16524 do
16525 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16526 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16527 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16528 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16529   echo $ECHO_N "(cached) $ECHO_C" >&6
16530 else
16531   cat >conftest.$ac_ext <<_ACEOF
16532 /* confdefs.h.  */
16533 _ACEOF
16534 cat confdefs.h >>conftest.$ac_ext
16535 cat >>conftest.$ac_ext <<_ACEOF
16536 /* end confdefs.h.  */
16537 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16538    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16539 #define $ac_func innocuous_$ac_func
16540
16541 /* System header to define __stub macros and hopefully few prototypes,
16542     which can conflict with char $ac_func (); below.
16543     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16544     <limits.h> exists even on freestanding compilers.  */
16545
16546 #ifdef __STDC__
16547 # include <limits.h>
16548 #else
16549 # include <assert.h>
16550 #endif
16551
16552 #undef $ac_func
16553
16554 /* Override any GCC internal prototype to avoid an error.
16555    Use char because int might match the return type of a GCC
16556    builtin and then its argument prototype would still apply.  */
16557 #ifdef __cplusplus
16558 extern "C"
16559 #endif
16560 char $ac_func ();
16561 /* The GNU C library defines this for functions which it implements
16562     to always fail with ENOSYS.  Some functions are actually named
16563     something starting with __ and the normal name is an alias.  */
16564 #if defined __stub_$ac_func || defined __stub___$ac_func
16565 choke me
16566 #endif
16567
16568 int
16569 main ()
16570 {
16571 return $ac_func ();
16572   ;
16573   return 0;
16574 }
16575 _ACEOF
16576 rm -f conftest.$ac_objext conftest$ac_exeext
16577 if { (ac_try="$ac_link"
16578 case "(($ac_try" in
16579   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16580   *) ac_try_echo=$ac_try;;
16581 esac
16582 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16583   (eval "$ac_link") 2>conftest.er1
16584   ac_status=$?
16585   grep -v '^ *+' conftest.er1 >conftest.err
16586   rm -f conftest.er1
16587   cat conftest.err >&5
16588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16589   (exit $ac_status); } && {
16590          test -z "$ac_c_werror_flag" ||
16591          test ! -s conftest.err
16592        } && test -s conftest$ac_exeext &&
16593        $as_test_x conftest$ac_exeext; then
16594   eval "$as_ac_var=yes"
16595 else
16596   echo "$as_me: failed program was:" >&5
16597 sed 's/^/| /' conftest.$ac_ext >&5
16598
16599         eval "$as_ac_var=no"
16600 fi
16601
16602 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16603       conftest$ac_exeext conftest.$ac_ext
16604 fi
16605 ac_res=`eval echo '${'$as_ac_var'}'`
16606                { echo "$as_me:$LINENO: result: $ac_res" >&5
16607 echo "${ECHO_T}$ac_res" >&6; }
16608 if test `eval echo '${'$as_ac_var'}'` = yes; then
16609   cat >>confdefs.h <<_ACEOF
16610 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16611 _ACEOF
16612
16613 else
16614   case " $LIBOBJS " in
16615   *" $ac_func.$ac_objext "* ) ;;
16616   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
16617  ;;
16618 esac
16619
16620 fi
16621 done
16622
16623
16624 else
16625   case " $LIBOBJS " in
16626   *" getaddrinfo.$ac_objext "* ) ;;
16627   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16628  ;;
16629 esac
16630
16631 fi
16632
16633 # Similarly, use system's getopt_long() only if system provides struct option.
16634 # Solaris' getopt() doesn't do what we want for long options, so always use
16635 # our versions on that platform.
16636 if test "$PORTNAME" = "solaris"; then
16637   case " $LIBOBJS " in
16638   *" getopt.$ac_objext "* ) ;;
16639   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16640  ;;
16641 esac
16642
16643   case " $LIBOBJS " in
16644   *" getopt_long.$ac_objext "* ) ;;
16645   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16646  ;;
16647 esac
16648
16649 elif test x"$ac_cv_type_struct_option" = xyes ; then
16650
16651 for ac_func in getopt_long
16652 do
16653 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16654 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16655 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16656 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16657   echo $ECHO_N "(cached) $ECHO_C" >&6
16658 else
16659   cat >conftest.$ac_ext <<_ACEOF
16660 /* confdefs.h.  */
16661 _ACEOF
16662 cat confdefs.h >>conftest.$ac_ext
16663 cat >>conftest.$ac_ext <<_ACEOF
16664 /* end confdefs.h.  */
16665 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16666    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16667 #define $ac_func innocuous_$ac_func
16668
16669 /* System header to define __stub macros and hopefully few prototypes,
16670     which can conflict with char $ac_func (); below.
16671     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16672     <limits.h> exists even on freestanding compilers.  */
16673
16674 #ifdef __STDC__
16675 # include <limits.h>
16676 #else
16677 # include <assert.h>
16678 #endif
16679
16680 #undef $ac_func
16681
16682 /* Override any GCC internal prototype to avoid an error.
16683    Use char because int might match the return type of a GCC
16684    builtin and then its argument prototype would still apply.  */
16685 #ifdef __cplusplus
16686 extern "C"
16687 #endif
16688 char $ac_func ();
16689 /* The GNU C library defines this for functions which it implements
16690     to always fail with ENOSYS.  Some functions are actually named
16691     something starting with __ and the normal name is an alias.  */
16692 #if defined __stub_$ac_func || defined __stub___$ac_func
16693 choke me
16694 #endif
16695
16696 int
16697 main ()
16698 {
16699 return $ac_func ();
16700   ;
16701   return 0;
16702 }
16703 _ACEOF
16704 rm -f conftest.$ac_objext conftest$ac_exeext
16705 if { (ac_try="$ac_link"
16706 case "(($ac_try" in
16707   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16708   *) ac_try_echo=$ac_try;;
16709 esac
16710 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16711   (eval "$ac_link") 2>conftest.er1
16712   ac_status=$?
16713   grep -v '^ *+' conftest.er1 >conftest.err
16714   rm -f conftest.er1
16715   cat conftest.err >&5
16716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16717   (exit $ac_status); } && {
16718          test -z "$ac_c_werror_flag" ||
16719          test ! -s conftest.err
16720        } && test -s conftest$ac_exeext &&
16721        $as_test_x conftest$ac_exeext; then
16722   eval "$as_ac_var=yes"
16723 else
16724   echo "$as_me: failed program was:" >&5
16725 sed 's/^/| /' conftest.$ac_ext >&5
16726
16727         eval "$as_ac_var=no"
16728 fi
16729
16730 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16731       conftest$ac_exeext conftest.$ac_ext
16732 fi
16733 ac_res=`eval echo '${'$as_ac_var'}'`
16734                { echo "$as_me:$LINENO: result: $ac_res" >&5
16735 echo "${ECHO_T}$ac_res" >&6; }
16736 if test `eval echo '${'$as_ac_var'}'` = yes; then
16737   cat >>confdefs.h <<_ACEOF
16738 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16739 _ACEOF
16740
16741 else
16742   case " $LIBOBJS " in
16743   *" $ac_func.$ac_objext "* ) ;;
16744   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
16745  ;;
16746 esac
16747
16748 fi
16749 done
16750
16751
16752 else
16753   case " $LIBOBJS " in
16754   *" getopt_long.$ac_objext "* ) ;;
16755   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16756  ;;
16757 esac
16758
16759 fi
16760
16761 # Win32 support
16762 if test "$PORTNAME" = "win32"; then
16763
16764 for ac_func in gettimeofday
16765 do
16766 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16767 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16768 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16769 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16770   echo $ECHO_N "(cached) $ECHO_C" >&6
16771 else
16772   cat >conftest.$ac_ext <<_ACEOF
16773 /* confdefs.h.  */
16774 _ACEOF
16775 cat confdefs.h >>conftest.$ac_ext
16776 cat >>conftest.$ac_ext <<_ACEOF
16777 /* end confdefs.h.  */
16778 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16779    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16780 #define $ac_func innocuous_$ac_func
16781
16782 /* System header to define __stub macros and hopefully few prototypes,
16783     which can conflict with char $ac_func (); below.
16784     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16785     <limits.h> exists even on freestanding compilers.  */
16786
16787 #ifdef __STDC__
16788 # include <limits.h>
16789 #else
16790 # include <assert.h>
16791 #endif
16792
16793 #undef $ac_func
16794
16795 /* Override any GCC internal prototype to avoid an error.
16796    Use char because int might match the return type of a GCC
16797    builtin and then its argument prototype would still apply.  */
16798 #ifdef __cplusplus
16799 extern "C"
16800 #endif
16801 char $ac_func ();
16802 /* The GNU C library defines this for functions which it implements
16803     to always fail with ENOSYS.  Some functions are actually named
16804     something starting with __ and the normal name is an alias.  */
16805 #if defined __stub_$ac_func || defined __stub___$ac_func
16806 choke me
16807 #endif
16808
16809 int
16810 main ()
16811 {
16812 return $ac_func ();
16813   ;
16814   return 0;
16815 }
16816 _ACEOF
16817 rm -f conftest.$ac_objext conftest$ac_exeext
16818 if { (ac_try="$ac_link"
16819 case "(($ac_try" in
16820   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16821   *) ac_try_echo=$ac_try;;
16822 esac
16823 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16824   (eval "$ac_link") 2>conftest.er1
16825   ac_status=$?
16826   grep -v '^ *+' conftest.er1 >conftest.err
16827   rm -f conftest.er1
16828   cat conftest.err >&5
16829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16830   (exit $ac_status); } && {
16831          test -z "$ac_c_werror_flag" ||
16832          test ! -s conftest.err
16833        } && test -s conftest$ac_exeext &&
16834        $as_test_x conftest$ac_exeext; then
16835   eval "$as_ac_var=yes"
16836 else
16837   echo "$as_me: failed program was:" >&5
16838 sed 's/^/| /' conftest.$ac_ext >&5
16839
16840         eval "$as_ac_var=no"
16841 fi
16842
16843 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16844       conftest$ac_exeext conftest.$ac_ext
16845 fi
16846 ac_res=`eval echo '${'$as_ac_var'}'`
16847                { echo "$as_me:$LINENO: result: $ac_res" >&5
16848 echo "${ECHO_T}$ac_res" >&6; }
16849 if test `eval echo '${'$as_ac_var'}'` = yes; then
16850   cat >>confdefs.h <<_ACEOF
16851 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16852 _ACEOF
16853
16854 else
16855   case " $LIBOBJS " in
16856   *" $ac_func.$ac_objext "* ) ;;
16857   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
16858  ;;
16859 esac
16860
16861 fi
16862 done
16863
16864
16865 case " $LIBOBJS " in
16866   *" kill.$ac_objext "* ) ;;
16867   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16868  ;;
16869 esac
16870
16871 case " $LIBOBJS " in
16872   *" open.$ac_objext "* ) ;;
16873   *) LIBOBJS="$LIBOBJS open.$ac_objext"
16874  ;;
16875 esac
16876
16877 case " $LIBOBJS " in
16878   *" rand.$ac_objext "* ) ;;
16879   *) LIBOBJS="$LIBOBJS rand.$ac_objext"
16880  ;;
16881 esac
16882
16883 case " $LIBOBJS " in
16884   *" win32error.$ac_objext "* ) ;;
16885   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16886  ;;
16887 esac
16888
16889
16890 cat >>confdefs.h <<\_ACEOF
16891 #define HAVE_SYMLINK 1
16892 _ACEOF
16893
16894 fi
16895
16896 if test "$with_readline" = yes; then
16897   { echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
16898 echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6; }
16899 cat >conftest.$ac_ext <<_ACEOF
16900 /* confdefs.h.  */
16901 _ACEOF
16902 cat confdefs.h >>conftest.$ac_ext
16903 cat >>conftest.$ac_ext <<_ACEOF
16904 /* end confdefs.h.  */
16905 #include <stdio.h>
16906 #ifdef HAVE_READLINE_READLINE_H
16907 # include <readline/readline.h>
16908 #elif defined(HAVE_READLINE_H)
16909 # include <readline.h>
16910 #endif
16911
16912 int
16913 main ()
16914 {
16915 rl_completion_append_character = 'x';
16916   ;
16917   return 0;
16918 }
16919 _ACEOF
16920 rm -f conftest.$ac_objext conftest$ac_exeext
16921 if { (ac_try="$ac_link"
16922 case "(($ac_try" in
16923   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16924   *) ac_try_echo=$ac_try;;
16925 esac
16926 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16927   (eval "$ac_link") 2>conftest.er1
16928   ac_status=$?
16929   grep -v '^ *+' conftest.er1 >conftest.err
16930   rm -f conftest.er1
16931   cat conftest.err >&5
16932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16933   (exit $ac_status); } && {
16934          test -z "$ac_c_werror_flag" ||
16935          test ! -s conftest.err
16936        } && test -s conftest$ac_exeext &&
16937        $as_test_x conftest$ac_exeext; then
16938   { echo "$as_me:$LINENO: result: yes" >&5
16939 echo "${ECHO_T}yes" >&6; }
16940
16941 cat >>confdefs.h <<\_ACEOF
16942 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
16943 _ACEOF
16944
16945 else
16946   echo "$as_me: failed program was:" >&5
16947 sed 's/^/| /' conftest.$ac_ext >&5
16948
16949         { echo "$as_me:$LINENO: result: no" >&5
16950 echo "${ECHO_T}no" >&6; }
16951 fi
16952
16953 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16954       conftest$ac_exeext conftest.$ac_ext
16955
16956
16957 for ac_func in rl_completion_matches rl_filename_completion_function
16958 do
16959 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16960 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16961 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16962 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16963   echo $ECHO_N "(cached) $ECHO_C" >&6
16964 else
16965   cat >conftest.$ac_ext <<_ACEOF
16966 /* confdefs.h.  */
16967 _ACEOF
16968 cat confdefs.h >>conftest.$ac_ext
16969 cat >>conftest.$ac_ext <<_ACEOF
16970 /* end confdefs.h.  */
16971 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16972    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16973 #define $ac_func innocuous_$ac_func
16974
16975 /* System header to define __stub macros and hopefully few prototypes,
16976     which can conflict with char $ac_func (); below.
16977     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16978     <limits.h> exists even on freestanding compilers.  */
16979
16980 #ifdef __STDC__
16981 # include <limits.h>
16982 #else
16983 # include <assert.h>
16984 #endif
16985
16986 #undef $ac_func
16987
16988 /* Override any GCC internal prototype to avoid an error.
16989    Use char because int might match the return type of a GCC
16990    builtin and then its argument prototype would still apply.  */
16991 #ifdef __cplusplus
16992 extern "C"
16993 #endif
16994 char $ac_func ();
16995 /* The GNU C library defines this for functions which it implements
16996     to always fail with ENOSYS.  Some functions are actually named
16997     something starting with __ and the normal name is an alias.  */
16998 #if defined __stub_$ac_func || defined __stub___$ac_func
16999 choke me
17000 #endif
17001
17002 int
17003 main ()
17004 {
17005 return $ac_func ();
17006   ;
17007   return 0;
17008 }
17009 _ACEOF
17010 rm -f conftest.$ac_objext conftest$ac_exeext
17011 if { (ac_try="$ac_link"
17012 case "(($ac_try" in
17013   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17014   *) ac_try_echo=$ac_try;;
17015 esac
17016 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17017   (eval "$ac_link") 2>conftest.er1
17018   ac_status=$?
17019   grep -v '^ *+' conftest.er1 >conftest.err
17020   rm -f conftest.er1
17021   cat conftest.err >&5
17022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17023   (exit $ac_status); } && {
17024          test -z "$ac_c_werror_flag" ||
17025          test ! -s conftest.err
17026        } && test -s conftest$ac_exeext &&
17027        $as_test_x conftest$ac_exeext; then
17028   eval "$as_ac_var=yes"
17029 else
17030   echo "$as_me: failed program was:" >&5
17031 sed 's/^/| /' conftest.$ac_ext >&5
17032
17033         eval "$as_ac_var=no"
17034 fi
17035
17036 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17037       conftest$ac_exeext conftest.$ac_ext
17038 fi
17039 ac_res=`eval echo '${'$as_ac_var'}'`
17040                { echo "$as_me:$LINENO: result: $ac_res" >&5
17041 echo "${ECHO_T}$ac_res" >&6; }
17042 if test `eval echo '${'$as_ac_var'}'` = yes; then
17043   cat >>confdefs.h <<_ACEOF
17044 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17045 _ACEOF
17046
17047 fi
17048 done
17049
17050
17051 for ac_func in replace_history_entry
17052 do
17053 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17054 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17055 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17056 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17057   echo $ECHO_N "(cached) $ECHO_C" >&6
17058 else
17059   cat >conftest.$ac_ext <<_ACEOF
17060 /* confdefs.h.  */
17061 _ACEOF
17062 cat confdefs.h >>conftest.$ac_ext
17063 cat >>conftest.$ac_ext <<_ACEOF
17064 /* end confdefs.h.  */
17065 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17066    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17067 #define $ac_func innocuous_$ac_func
17068
17069 /* System header to define __stub macros and hopefully few prototypes,
17070     which can conflict with char $ac_func (); below.
17071     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17072     <limits.h> exists even on freestanding compilers.  */
17073
17074 #ifdef __STDC__
17075 # include <limits.h>
17076 #else
17077 # include <assert.h>
17078 #endif
17079
17080 #undef $ac_func
17081
17082 /* Override any GCC internal prototype to avoid an error.
17083    Use char because int might match the return type of a GCC
17084    builtin and then its argument prototype would still apply.  */
17085 #ifdef __cplusplus
17086 extern "C"
17087 #endif
17088 char $ac_func ();
17089 /* The GNU C library defines this for functions which it implements
17090     to always fail with ENOSYS.  Some functions are actually named
17091     something starting with __ and the normal name is an alias.  */
17092 #if defined __stub_$ac_func || defined __stub___$ac_func
17093 choke me
17094 #endif
17095
17096 int
17097 main ()
17098 {
17099 return $ac_func ();
17100   ;
17101   return 0;
17102 }
17103 _ACEOF
17104 rm -f conftest.$ac_objext conftest$ac_exeext
17105 if { (ac_try="$ac_link"
17106 case "(($ac_try" in
17107   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17108   *) ac_try_echo=$ac_try;;
17109 esac
17110 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17111   (eval "$ac_link") 2>conftest.er1
17112   ac_status=$?
17113   grep -v '^ *+' conftest.er1 >conftest.err
17114   rm -f conftest.er1
17115   cat conftest.err >&5
17116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17117   (exit $ac_status); } && {
17118          test -z "$ac_c_werror_flag" ||
17119          test ! -s conftest.err
17120        } && test -s conftest$ac_exeext &&
17121        $as_test_x conftest$ac_exeext; then
17122   eval "$as_ac_var=yes"
17123 else
17124   echo "$as_me: failed program was:" >&5
17125 sed 's/^/| /' conftest.$ac_ext >&5
17126
17127         eval "$as_ac_var=no"
17128 fi
17129
17130 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17131       conftest$ac_exeext conftest.$ac_ext
17132 fi
17133 ac_res=`eval echo '${'$as_ac_var'}'`
17134                { echo "$as_me:$LINENO: result: $ac_res" >&5
17135 echo "${ECHO_T}$ac_res" >&6; }
17136 if test `eval echo '${'$as_ac_var'}'` = yes; then
17137   cat >>confdefs.h <<_ACEOF
17138 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17139 _ACEOF
17140
17141 fi
17142 done
17143
17144 fi
17145
17146
17147 { echo "$as_me:$LINENO: checking for sigsetjmp" >&5
17148 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6; }
17149 cat >conftest.$ac_ext <<_ACEOF
17150 /* confdefs.h.  */
17151 _ACEOF
17152 cat confdefs.h >>conftest.$ac_ext
17153 cat >>conftest.$ac_ext <<_ACEOF
17154 /* end confdefs.h.  */
17155 #include <setjmp.h>
17156 int
17157 main ()
17158 {
17159 sigjmp_buf x; sigsetjmp(x, 1);
17160   ;
17161   return 0;
17162 }
17163 _ACEOF
17164 rm -f conftest.$ac_objext conftest$ac_exeext
17165 if { (ac_try="$ac_link"
17166 case "(($ac_try" in
17167   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17168   *) ac_try_echo=$ac_try;;
17169 esac
17170 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17171   (eval "$ac_link") 2>conftest.er1
17172   ac_status=$?
17173   grep -v '^ *+' conftest.er1 >conftest.err
17174   rm -f conftest.er1
17175   cat conftest.err >&5
17176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17177   (exit $ac_status); } && {
17178          test -z "$ac_c_werror_flag" ||
17179          test ! -s conftest.err
17180        } && test -s conftest$ac_exeext &&
17181        $as_test_x conftest$ac_exeext; then
17182
17183 cat >>confdefs.h <<\_ACEOF
17184 #define HAVE_SIGSETJMP 1
17185 _ACEOF
17186
17187 { echo "$as_me:$LINENO: result: yes" >&5
17188 echo "${ECHO_T}yes" >&6; }
17189 else
17190   echo "$as_me: failed program was:" >&5
17191 sed 's/^/| /' conftest.$ac_ext >&5
17192
17193         { echo "$as_me:$LINENO: result: no" >&5
17194 echo "${ECHO_T}no" >&6; }
17195 fi
17196
17197 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17198       conftest$ac_exeext conftest.$ac_ext
17199
17200 { echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
17201 echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
17202 if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
17203   echo $ECHO_N "(cached) $ECHO_C" >&6
17204 else
17205   cat >conftest.$ac_ext <<_ACEOF
17206 /* confdefs.h.  */
17207 _ACEOF
17208 cat confdefs.h >>conftest.$ac_ext
17209 cat >>conftest.$ac_ext <<_ACEOF
17210 /* end confdefs.h.  */
17211 #include <signal.h>
17212 /* NetBSD declares sys_siglist in unistd.h.  */
17213 #ifdef HAVE_UNISTD_H
17214 # include <unistd.h>
17215 #endif
17216
17217
17218 int
17219 main ()
17220 {
17221 #ifndef sys_siglist
17222   (void) sys_siglist;
17223 #endif
17224
17225   ;
17226   return 0;
17227 }
17228 _ACEOF
17229 rm -f conftest.$ac_objext
17230 if { (ac_try="$ac_compile"
17231 case "(($ac_try" in
17232   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17233   *) ac_try_echo=$ac_try;;
17234 esac
17235 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17236   (eval "$ac_compile") 2>conftest.er1
17237   ac_status=$?
17238   grep -v '^ *+' conftest.er1 >conftest.err
17239   rm -f conftest.er1
17240   cat conftest.err >&5
17241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17242   (exit $ac_status); } && {
17243          test -z "$ac_c_werror_flag" ||
17244          test ! -s conftest.err
17245        } && test -s conftest.$ac_objext; then
17246   ac_cv_have_decl_sys_siglist=yes
17247 else
17248   echo "$as_me: failed program was:" >&5
17249 sed 's/^/| /' conftest.$ac_ext >&5
17250
17251         ac_cv_have_decl_sys_siglist=no
17252 fi
17253
17254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17255 fi
17256 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
17257 echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
17258 if test $ac_cv_have_decl_sys_siglist = yes; then
17259
17260 cat >>confdefs.h <<_ACEOF
17261 #define HAVE_DECL_SYS_SIGLIST 1
17262 _ACEOF
17263
17264
17265 else
17266   cat >>confdefs.h <<_ACEOF
17267 #define HAVE_DECL_SYS_SIGLIST 0
17268 _ACEOF
17269
17270
17271 fi
17272
17273
17274
17275
17276 { echo "$as_me:$LINENO: checking for syslog" >&5
17277 echo $ECHO_N "checking for syslog... $ECHO_C" >&6; }
17278 if test "${ac_cv_func_syslog+set}" = set; then
17279   echo $ECHO_N "(cached) $ECHO_C" >&6
17280 else
17281   cat >conftest.$ac_ext <<_ACEOF
17282 /* confdefs.h.  */
17283 _ACEOF
17284 cat confdefs.h >>conftest.$ac_ext
17285 cat >>conftest.$ac_ext <<_ACEOF
17286 /* end confdefs.h.  */
17287 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
17288    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17289 #define syslog innocuous_syslog
17290
17291 /* System header to define __stub macros and hopefully few prototypes,
17292     which can conflict with char syslog (); below.
17293     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17294     <limits.h> exists even on freestanding compilers.  */
17295
17296 #ifdef __STDC__
17297 # include <limits.h>
17298 #else
17299 # include <assert.h>
17300 #endif
17301
17302 #undef syslog
17303
17304 /* Override any GCC internal prototype to avoid an error.
17305    Use char because int might match the return type of a GCC
17306    builtin and then its argument prototype would still apply.  */
17307 #ifdef __cplusplus
17308 extern "C"
17309 #endif
17310 char syslog ();
17311 /* The GNU C library defines this for functions which it implements
17312     to always fail with ENOSYS.  Some functions are actually named
17313     something starting with __ and the normal name is an alias.  */
17314 #if defined __stub_syslog || defined __stub___syslog
17315 choke me
17316 #endif
17317
17318 int
17319 main ()
17320 {
17321 return syslog ();
17322   ;
17323   return 0;
17324 }
17325 _ACEOF
17326 rm -f conftest.$ac_objext conftest$ac_exeext
17327 if { (ac_try="$ac_link"
17328 case "(($ac_try" in
17329   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17330   *) ac_try_echo=$ac_try;;
17331 esac
17332 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17333   (eval "$ac_link") 2>conftest.er1
17334   ac_status=$?
17335   grep -v '^ *+' conftest.er1 >conftest.err
17336   rm -f conftest.er1
17337   cat conftest.err >&5
17338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17339   (exit $ac_status); } && {
17340          test -z "$ac_c_werror_flag" ||
17341          test ! -s conftest.err
17342        } && test -s conftest$ac_exeext &&
17343        $as_test_x conftest$ac_exeext; then
17344   ac_cv_func_syslog=yes
17345 else
17346   echo "$as_me: failed program was:" >&5
17347 sed 's/^/| /' conftest.$ac_ext >&5
17348
17349         ac_cv_func_syslog=no
17350 fi
17351
17352 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17353       conftest$ac_exeext conftest.$ac_ext
17354 fi
17355 { echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
17356 echo "${ECHO_T}$ac_cv_func_syslog" >&6; }
17357 if test $ac_cv_func_syslog = yes; then
17358   if test "${ac_cv_header_syslog_h+set}" = set; then
17359   { echo "$as_me:$LINENO: checking for syslog.h" >&5
17360 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6; }
17361 if test "${ac_cv_header_syslog_h+set}" = set; then
17362   echo $ECHO_N "(cached) $ECHO_C" >&6
17363 fi
17364 { echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
17365 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6; }
17366 else
17367   # Is the header compilable?
17368 { echo "$as_me:$LINENO: checking syslog.h usability" >&5
17369 echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6; }
17370 cat >conftest.$ac_ext <<_ACEOF
17371 /* confdefs.h.  */
17372 _ACEOF
17373 cat confdefs.h >>conftest.$ac_ext
17374 cat >>conftest.$ac_ext <<_ACEOF
17375 /* end confdefs.h.  */
17376 $ac_includes_default
17377 #include <syslog.h>
17378 _ACEOF
17379 rm -f conftest.$ac_objext
17380 if { (ac_try="$ac_compile"
17381 case "(($ac_try" in
17382   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17383   *) ac_try_echo=$ac_try;;
17384 esac
17385 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17386   (eval "$ac_compile") 2>conftest.er1
17387   ac_status=$?
17388   grep -v '^ *+' conftest.er1 >conftest.err
17389   rm -f conftest.er1
17390   cat conftest.err >&5
17391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17392   (exit $ac_status); } && {
17393          test -z "$ac_c_werror_flag" ||
17394          test ! -s conftest.err
17395        } && test -s conftest.$ac_objext; then
17396   ac_header_compiler=yes
17397 else
17398   echo "$as_me: failed program was:" >&5
17399 sed 's/^/| /' conftest.$ac_ext >&5
17400
17401         ac_header_compiler=no
17402 fi
17403
17404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17405 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17406 echo "${ECHO_T}$ac_header_compiler" >&6; }
17407
17408 # Is the header present?
17409 { echo "$as_me:$LINENO: checking syslog.h presence" >&5
17410 echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6; }
17411 cat >conftest.$ac_ext <<_ACEOF
17412 /* confdefs.h.  */
17413 _ACEOF
17414 cat confdefs.h >>conftest.$ac_ext
17415 cat >>conftest.$ac_ext <<_ACEOF
17416 /* end confdefs.h.  */
17417 #include <syslog.h>
17418 _ACEOF
17419 if { (ac_try="$ac_cpp conftest.$ac_ext"
17420 case "(($ac_try" in
17421   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17422   *) ac_try_echo=$ac_try;;
17423 esac
17424 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17425   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17426   ac_status=$?
17427   grep -v '^ *+' conftest.er1 >conftest.err
17428   rm -f conftest.er1
17429   cat conftest.err >&5
17430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17431   (exit $ac_status); } >/dev/null && {
17432          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17433          test ! -s conftest.err
17434        }; then
17435   ac_header_preproc=yes
17436 else
17437   echo "$as_me: failed program was:" >&5
17438 sed 's/^/| /' conftest.$ac_ext >&5
17439
17440   ac_header_preproc=no
17441 fi
17442
17443 rm -f conftest.err conftest.$ac_ext
17444 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17445 echo "${ECHO_T}$ac_header_preproc" >&6; }
17446
17447 # So?  What about this header?
17448 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17449   yes:no: )
17450     { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
17451 echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17452     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
17453 echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
17454     ac_header_preproc=yes
17455     ;;
17456   no:yes:* )
17457     { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
17458 echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
17459     { echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
17460 echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
17461     { echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
17462 echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
17463     { echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
17464 echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17465     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
17466 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
17467     { echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
17468 echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
17469     ( cat <<\_ASBOX
17470 ## ---------------------------------------- ##
17471 ## Report this to pgsql-bugs@postgresql.org ##
17472 ## ---------------------------------------- ##
17473 _ASBOX
17474      ) | sed "s/^/$as_me: WARNING:     /" >&2
17475     ;;
17476 esac
17477 { echo "$as_me:$LINENO: checking for syslog.h" >&5
17478 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6; }
17479 if test "${ac_cv_header_syslog_h+set}" = set; then
17480   echo $ECHO_N "(cached) $ECHO_C" >&6
17481 else
17482   ac_cv_header_syslog_h=$ac_header_preproc
17483 fi
17484 { echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
17485 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6; }
17486
17487 fi
17488 if test $ac_cv_header_syslog_h = yes; then
17489
17490 cat >>confdefs.h <<\_ACEOF
17491 #define HAVE_SYSLOG 1
17492 _ACEOF
17493
17494 fi
17495
17496
17497 fi
17498
17499
17500 { echo "$as_me:$LINENO: checking for optreset" >&5
17501 echo $ECHO_N "checking for optreset... $ECHO_C" >&6; }
17502 if test "${pgac_cv_var_int_optreset+set}" = set; then
17503   echo $ECHO_N "(cached) $ECHO_C" >&6
17504 else
17505   cat >conftest.$ac_ext <<_ACEOF
17506 /* confdefs.h.  */
17507 _ACEOF
17508 cat confdefs.h >>conftest.$ac_ext
17509 cat >>conftest.$ac_ext <<_ACEOF
17510 /* end confdefs.h.  */
17511 #include <unistd.h>
17512 int
17513 main ()
17514 {
17515 extern int optreset; optreset = 1;
17516   ;
17517   return 0;
17518 }
17519 _ACEOF
17520 rm -f conftest.$ac_objext conftest$ac_exeext
17521 if { (ac_try="$ac_link"
17522 case "(($ac_try" in
17523   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17524   *) ac_try_echo=$ac_try;;
17525 esac
17526 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17527   (eval "$ac_link") 2>conftest.er1
17528   ac_status=$?
17529   grep -v '^ *+' conftest.er1 >conftest.err
17530   rm -f conftest.er1
17531   cat conftest.err >&5
17532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17533   (exit $ac_status); } && {
17534          test -z "$ac_c_werror_flag" ||
17535          test ! -s conftest.err
17536        } && test -s conftest$ac_exeext &&
17537        $as_test_x conftest$ac_exeext; then
17538   pgac_cv_var_int_optreset=yes
17539 else
17540   echo "$as_me: failed program was:" >&5
17541 sed 's/^/| /' conftest.$ac_ext >&5
17542
17543         pgac_cv_var_int_optreset=no
17544 fi
17545
17546 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17547       conftest$ac_exeext conftest.$ac_ext
17548 fi
17549 { echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
17550 echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6; }
17551 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
17552
17553 cat >>confdefs.h <<\_ACEOF
17554 #define HAVE_INT_OPTRESET 1
17555 _ACEOF
17556
17557 fi
17558
17559
17560
17561 for ac_func in strtoll strtoq
17562 do
17563 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17564 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17565 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17566 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17567   echo $ECHO_N "(cached) $ECHO_C" >&6
17568 else
17569   cat >conftest.$ac_ext <<_ACEOF
17570 /* confdefs.h.  */
17571 _ACEOF
17572 cat confdefs.h >>conftest.$ac_ext
17573 cat >>conftest.$ac_ext <<_ACEOF
17574 /* end confdefs.h.  */
17575 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17576    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17577 #define $ac_func innocuous_$ac_func
17578
17579 /* System header to define __stub macros and hopefully few prototypes,
17580     which can conflict with char $ac_func (); below.
17581     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17582     <limits.h> exists even on freestanding compilers.  */
17583
17584 #ifdef __STDC__
17585 # include <limits.h>
17586 #else
17587 # include <assert.h>
17588 #endif
17589
17590 #undef $ac_func
17591
17592 /* Override any GCC internal prototype to avoid an error.
17593    Use char because int might match the return type of a GCC
17594    builtin and then its argument prototype would still apply.  */
17595 #ifdef __cplusplus
17596 extern "C"
17597 #endif
17598 char $ac_func ();
17599 /* The GNU C library defines this for functions which it implements
17600     to always fail with ENOSYS.  Some functions are actually named
17601     something starting with __ and the normal name is an alias.  */
17602 #if defined __stub_$ac_func || defined __stub___$ac_func
17603 choke me
17604 #endif
17605
17606 int
17607 main ()
17608 {
17609 return $ac_func ();
17610   ;
17611   return 0;
17612 }
17613 _ACEOF
17614 rm -f conftest.$ac_objext conftest$ac_exeext
17615 if { (ac_try="$ac_link"
17616 case "(($ac_try" in
17617   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17618   *) ac_try_echo=$ac_try;;
17619 esac
17620 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17621   (eval "$ac_link") 2>conftest.er1
17622   ac_status=$?
17623   grep -v '^ *+' conftest.er1 >conftest.err
17624   rm -f conftest.er1
17625   cat conftest.err >&5
17626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17627   (exit $ac_status); } && {
17628          test -z "$ac_c_werror_flag" ||
17629          test ! -s conftest.err
17630        } && test -s conftest$ac_exeext &&
17631        $as_test_x conftest$ac_exeext; then
17632   eval "$as_ac_var=yes"
17633 else
17634   echo "$as_me: failed program was:" >&5
17635 sed 's/^/| /' conftest.$ac_ext >&5
17636
17637         eval "$as_ac_var=no"
17638 fi
17639
17640 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17641       conftest$ac_exeext conftest.$ac_ext
17642 fi
17643 ac_res=`eval echo '${'$as_ac_var'}'`
17644                { echo "$as_me:$LINENO: result: $ac_res" >&5
17645 echo "${ECHO_T}$ac_res" >&6; }
17646 if test `eval echo '${'$as_ac_var'}'` = yes; then
17647   cat >>confdefs.h <<_ACEOF
17648 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17649 _ACEOF
17650  break
17651 fi
17652 done
17653
17654
17655
17656 for ac_func in strtoull strtouq
17657 do
17658 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17659 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17660 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17661 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17662   echo $ECHO_N "(cached) $ECHO_C" >&6
17663 else
17664   cat >conftest.$ac_ext <<_ACEOF
17665 /* confdefs.h.  */
17666 _ACEOF
17667 cat confdefs.h >>conftest.$ac_ext
17668 cat >>conftest.$ac_ext <<_ACEOF
17669 /* end confdefs.h.  */
17670 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17671    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17672 #define $ac_func innocuous_$ac_func
17673
17674 /* System header to define __stub macros and hopefully few prototypes,
17675     which can conflict with char $ac_func (); below.
17676     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17677     <limits.h> exists even on freestanding compilers.  */
17678
17679 #ifdef __STDC__
17680 # include <limits.h>
17681 #else
17682 # include <assert.h>
17683 #endif
17684
17685 #undef $ac_func
17686
17687 /* Override any GCC internal prototype to avoid an error.
17688    Use char because int might match the return type of a GCC
17689    builtin and then its argument prototype would still apply.  */
17690 #ifdef __cplusplus
17691 extern "C"
17692 #endif
17693 char $ac_func ();
17694 /* The GNU C library defines this for functions which it implements
17695     to always fail with ENOSYS.  Some functions are actually named
17696     something starting with __ and the normal name is an alias.  */
17697 #if defined __stub_$ac_func || defined __stub___$ac_func
17698 choke me
17699 #endif
17700
17701 int
17702 main ()
17703 {
17704 return $ac_func ();
17705   ;
17706   return 0;
17707 }
17708 _ACEOF
17709 rm -f conftest.$ac_objext conftest$ac_exeext
17710 if { (ac_try="$ac_link"
17711 case "(($ac_try" in
17712   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17713   *) ac_try_echo=$ac_try;;
17714 esac
17715 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17716   (eval "$ac_link") 2>conftest.er1
17717   ac_status=$?
17718   grep -v '^ *+' conftest.er1 >conftest.err
17719   rm -f conftest.er1
17720   cat conftest.err >&5
17721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17722   (exit $ac_status); } && {
17723          test -z "$ac_c_werror_flag" ||
17724          test ! -s conftest.err
17725        } && test -s conftest$ac_exeext &&
17726        $as_test_x conftest$ac_exeext; then
17727   eval "$as_ac_var=yes"
17728 else
17729   echo "$as_me: failed program was:" >&5
17730 sed 's/^/| /' conftest.$ac_ext >&5
17731
17732         eval "$as_ac_var=no"
17733 fi
17734
17735 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17736       conftest$ac_exeext conftest.$ac_ext
17737 fi
17738 ac_res=`eval echo '${'$as_ac_var'}'`
17739                { echo "$as_me:$LINENO: result: $ac_res" >&5
17740 echo "${ECHO_T}$ac_res" >&6; }
17741 if test `eval echo '${'$as_ac_var'}'` = yes; then
17742   cat >>confdefs.h <<_ACEOF
17743 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17744 _ACEOF
17745  break
17746 fi
17747 done
17748
17749
17750 # Check for one of atexit() or on_exit()
17751
17752 for ac_func in atexit
17753 do
17754 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17755 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17756 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17757 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17758   echo $ECHO_N "(cached) $ECHO_C" >&6
17759 else
17760   cat >conftest.$ac_ext <<_ACEOF
17761 /* confdefs.h.  */
17762 _ACEOF
17763 cat confdefs.h >>conftest.$ac_ext
17764 cat >>conftest.$ac_ext <<_ACEOF
17765 /* end confdefs.h.  */
17766 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17767    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17768 #define $ac_func innocuous_$ac_func
17769
17770 /* System header to define __stub macros and hopefully few prototypes,
17771     which can conflict with char $ac_func (); below.
17772     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17773     <limits.h> exists even on freestanding compilers.  */
17774
17775 #ifdef __STDC__
17776 # include <limits.h>
17777 #else
17778 # include <assert.h>
17779 #endif
17780
17781 #undef $ac_func
17782
17783 /* Override any GCC internal prototype to avoid an error.
17784    Use char because int might match the return type of a GCC
17785    builtin and then its argument prototype would still apply.  */
17786 #ifdef __cplusplus
17787 extern "C"
17788 #endif
17789 char $ac_func ();
17790 /* The GNU C library defines this for functions which it implements
17791     to always fail with ENOSYS.  Some functions are actually named
17792     something starting with __ and the normal name is an alias.  */
17793 #if defined __stub_$ac_func || defined __stub___$ac_func
17794 choke me
17795 #endif
17796
17797 int
17798 main ()
17799 {
17800 return $ac_func ();
17801   ;
17802   return 0;
17803 }
17804 _ACEOF
17805 rm -f conftest.$ac_objext conftest$ac_exeext
17806 if { (ac_try="$ac_link"
17807 case "(($ac_try" in
17808   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17809   *) ac_try_echo=$ac_try;;
17810 esac
17811 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17812   (eval "$ac_link") 2>conftest.er1
17813   ac_status=$?
17814   grep -v '^ *+' conftest.er1 >conftest.err
17815   rm -f conftest.er1
17816   cat conftest.err >&5
17817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17818   (exit $ac_status); } && {
17819          test -z "$ac_c_werror_flag" ||
17820          test ! -s conftest.err
17821        } && test -s conftest$ac_exeext &&
17822        $as_test_x conftest$ac_exeext; then
17823   eval "$as_ac_var=yes"
17824 else
17825   echo "$as_me: failed program was:" >&5
17826 sed 's/^/| /' conftest.$ac_ext >&5
17827
17828         eval "$as_ac_var=no"
17829 fi
17830
17831 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17832       conftest$ac_exeext conftest.$ac_ext
17833 fi
17834 ac_res=`eval echo '${'$as_ac_var'}'`
17835                { echo "$as_me:$LINENO: result: $ac_res" >&5
17836 echo "${ECHO_T}$ac_res" >&6; }
17837 if test `eval echo '${'$as_ac_var'}'` = yes; then
17838   cat >>confdefs.h <<_ACEOF
17839 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17840 _ACEOF
17841
17842 else
17843
17844 for ac_func in on_exit
17845 do
17846 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17847 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17848 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17849 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17850   echo $ECHO_N "(cached) $ECHO_C" >&6
17851 else
17852   cat >conftest.$ac_ext <<_ACEOF
17853 /* confdefs.h.  */
17854 _ACEOF
17855 cat confdefs.h >>conftest.$ac_ext
17856 cat >>conftest.$ac_ext <<_ACEOF
17857 /* end confdefs.h.  */
17858 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17859    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17860 #define $ac_func innocuous_$ac_func
17861
17862 /* System header to define __stub macros and hopefully few prototypes,
17863     which can conflict with char $ac_func (); below.
17864     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17865     <limits.h> exists even on freestanding compilers.  */
17866
17867 #ifdef __STDC__
17868 # include <limits.h>
17869 #else
17870 # include <assert.h>
17871 #endif
17872
17873 #undef $ac_func
17874
17875 /* Override any GCC internal prototype to avoid an error.
17876    Use char because int might match the return type of a GCC
17877    builtin and then its argument prototype would still apply.  */
17878 #ifdef __cplusplus
17879 extern "C"
17880 #endif
17881 char $ac_func ();
17882 /* The GNU C library defines this for functions which it implements
17883     to always fail with ENOSYS.  Some functions are actually named
17884     something starting with __ and the normal name is an alias.  */
17885 #if defined __stub_$ac_func || defined __stub___$ac_func
17886 choke me
17887 #endif
17888
17889 int
17890 main ()
17891 {
17892 return $ac_func ();
17893   ;
17894   return 0;
17895 }
17896 _ACEOF
17897 rm -f conftest.$ac_objext conftest$ac_exeext
17898 if { (ac_try="$ac_link"
17899 case "(($ac_try" in
17900   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17901   *) ac_try_echo=$ac_try;;
17902 esac
17903 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17904   (eval "$ac_link") 2>conftest.er1
17905   ac_status=$?
17906   grep -v '^ *+' conftest.er1 >conftest.err
17907   rm -f conftest.er1
17908   cat conftest.err >&5
17909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17910   (exit $ac_status); } && {
17911          test -z "$ac_c_werror_flag" ||
17912          test ! -s conftest.err
17913        } && test -s conftest$ac_exeext &&
17914        $as_test_x conftest$ac_exeext; then
17915   eval "$as_ac_var=yes"
17916 else
17917   echo "$as_me: failed program was:" >&5
17918 sed 's/^/| /' conftest.$ac_ext >&5
17919
17920         eval "$as_ac_var=no"
17921 fi
17922
17923 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17924       conftest$ac_exeext conftest.$ac_ext
17925 fi
17926 ac_res=`eval echo '${'$as_ac_var'}'`
17927                { echo "$as_me:$LINENO: result: $ac_res" >&5
17928 echo "${ECHO_T}$ac_res" >&6; }
17929 if test `eval echo '${'$as_ac_var'}'` = yes; then
17930   cat >>confdefs.h <<_ACEOF
17931 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17932 _ACEOF
17933
17934 else
17935   { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
17936 echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
17937    { (exit 1); exit 1; }; }
17938 fi
17939 done
17940
17941 fi
17942 done
17943
17944
17945
17946 for ac_func in fseeko
17947 do
17948 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17949 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17950 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17951 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17952   echo $ECHO_N "(cached) $ECHO_C" >&6
17953 else
17954   cat >conftest.$ac_ext <<_ACEOF
17955 /* confdefs.h.  */
17956 _ACEOF
17957 cat confdefs.h >>conftest.$ac_ext
17958 cat >>conftest.$ac_ext <<_ACEOF
17959 /* end confdefs.h.  */
17960 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17961    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17962 #define $ac_func innocuous_$ac_func
17963
17964 /* System header to define __stub macros and hopefully few prototypes,
17965     which can conflict with char $ac_func (); below.
17966     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17967     <limits.h> exists even on freestanding compilers.  */
17968
17969 #ifdef __STDC__
17970 # include <limits.h>
17971 #else
17972 # include <assert.h>
17973 #endif
17974
17975 #undef $ac_func
17976
17977 /* Override any GCC internal prototype to avoid an error.
17978    Use char because int might match the return type of a GCC
17979    builtin and then its argument prototype would still apply.  */
17980 #ifdef __cplusplus
17981 extern "C"
17982 #endif
17983 char $ac_func ();
17984 /* The GNU C library defines this for functions which it implements
17985     to always fail with ENOSYS.  Some functions are actually named
17986     something starting with __ and the normal name is an alias.  */
17987 #if defined __stub_$ac_func || defined __stub___$ac_func
17988 choke me
17989 #endif
17990
17991 int
17992 main ()
17993 {
17994 return $ac_func ();
17995   ;
17996   return 0;
17997 }
17998 _ACEOF
17999 rm -f conftest.$ac_objext conftest$ac_exeext
18000 if { (ac_try="$ac_link"
18001 case "(($ac_try" in
18002   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18003   *) ac_try_echo=$ac_try;;
18004 esac
18005 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18006   (eval "$ac_link") 2>conftest.er1
18007   ac_status=$?
18008   grep -v '^ *+' conftest.er1 >conftest.err
18009   rm -f conftest.er1
18010   cat conftest.err >&5
18011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18012   (exit $ac_status); } && {
18013          test -z "$ac_c_werror_flag" ||
18014          test ! -s conftest.err
18015        } && test -s conftest$ac_exeext &&
18016        $as_test_x conftest$ac_exeext; then
18017   eval "$as_ac_var=yes"
18018 else
18019   echo "$as_me: failed program was:" >&5
18020 sed 's/^/| /' conftest.$ac_ext >&5
18021
18022         eval "$as_ac_var=no"
18023 fi
18024
18025 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18026       conftest$ac_exeext conftest.$ac_ext
18027 fi
18028 ac_res=`eval echo '${'$as_ac_var'}'`
18029                { echo "$as_me:$LINENO: result: $ac_res" >&5
18030 echo "${ECHO_T}$ac_res" >&6; }
18031 if test `eval echo '${'$as_ac_var'}'` = yes; then
18032   cat >>confdefs.h <<_ACEOF
18033 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18034 _ACEOF
18035
18036 else
18037   case " $LIBOBJS " in
18038   *" $ac_func.$ac_objext "* ) ;;
18039   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18040  ;;
18041 esac
18042
18043 fi
18044 done
18045
18046
18047 case $host_os in
18048         # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
18049         bsdi*|netbsd*)
18050
18051 cat >>confdefs.h <<\_ACEOF
18052 #define HAVE_FSEEKO 1
18053 _ACEOF
18054
18055                 ac_cv_func_fseeko=yes;;
18056         *)
18057                 { echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
18058 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
18059 if test "${ac_cv_sys_largefile_source+set}" = set; then
18060   echo $ECHO_N "(cached) $ECHO_C" >&6
18061 else
18062   while :; do
18063   cat >conftest.$ac_ext <<_ACEOF
18064 /* confdefs.h.  */
18065 _ACEOF
18066 cat confdefs.h >>conftest.$ac_ext
18067 cat >>conftest.$ac_ext <<_ACEOF
18068 /* end confdefs.h.  */
18069 #include <sys/types.h> /* for off_t */
18070      #include <stdio.h>
18071 int
18072 main ()
18073 {
18074 int (*fp) (FILE *, off_t, int) = fseeko;
18075      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
18076   ;
18077   return 0;
18078 }
18079 _ACEOF
18080 rm -f conftest.$ac_objext conftest$ac_exeext
18081 if { (ac_try="$ac_link"
18082 case "(($ac_try" in
18083   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18084   *) ac_try_echo=$ac_try;;
18085 esac
18086 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18087   (eval "$ac_link") 2>conftest.er1
18088   ac_status=$?
18089   grep -v '^ *+' conftest.er1 >conftest.err
18090   rm -f conftest.er1
18091   cat conftest.err >&5
18092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18093   (exit $ac_status); } && {
18094          test -z "$ac_c_werror_flag" ||
18095          test ! -s conftest.err
18096        } && test -s conftest$ac_exeext &&
18097        $as_test_x conftest$ac_exeext; then
18098   ac_cv_sys_largefile_source=no; break
18099 else
18100   echo "$as_me: failed program was:" >&5
18101 sed 's/^/| /' conftest.$ac_ext >&5
18102
18103
18104 fi
18105
18106 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18107       conftest$ac_exeext conftest.$ac_ext
18108   cat >conftest.$ac_ext <<_ACEOF
18109 /* confdefs.h.  */
18110 _ACEOF
18111 cat confdefs.h >>conftest.$ac_ext
18112 cat >>conftest.$ac_ext <<_ACEOF
18113 /* end confdefs.h.  */
18114 #define _LARGEFILE_SOURCE 1
18115 #include <sys/types.h> /* for off_t */
18116      #include <stdio.h>
18117 int
18118 main ()
18119 {
18120 int (*fp) (FILE *, off_t, int) = fseeko;
18121      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
18122   ;
18123   return 0;
18124 }
18125 _ACEOF
18126 rm -f conftest.$ac_objext conftest$ac_exeext
18127 if { (ac_try="$ac_link"
18128 case "(($ac_try" in
18129   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18130   *) ac_try_echo=$ac_try;;
18131 esac
18132 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18133   (eval "$ac_link") 2>conftest.er1
18134   ac_status=$?
18135   grep -v '^ *+' conftest.er1 >conftest.err
18136   rm -f conftest.er1
18137   cat conftest.err >&5
18138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18139   (exit $ac_status); } && {
18140          test -z "$ac_c_werror_flag" ||
18141          test ! -s conftest.err
18142        } && test -s conftest$ac_exeext &&
18143        $as_test_x conftest$ac_exeext; then
18144   ac_cv_sys_largefile_source=1; break
18145 else
18146   echo "$as_me: failed program was:" >&5
18147 sed 's/^/| /' conftest.$ac_ext >&5
18148
18149
18150 fi
18151
18152 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18153       conftest$ac_exeext conftest.$ac_ext
18154   ac_cv_sys_largefile_source=unknown
18155   break
18156 done
18157 fi
18158 { echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
18159 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
18160 case $ac_cv_sys_largefile_source in #(
18161   no | unknown) ;;
18162   *)
18163 cat >>confdefs.h <<_ACEOF
18164 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
18165 _ACEOF
18166 ;;
18167 esac
18168 rm -f conftest*
18169
18170 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
18171 # in glibc 2.1.3, but that breaks too many other things.
18172 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
18173 if test $ac_cv_sys_largefile_source != unknown; then
18174
18175 cat >>confdefs.h <<\_ACEOF
18176 #define HAVE_FSEEKO 1
18177 _ACEOF
18178
18179 fi
18180 ;;
18181 esac
18182
18183
18184 #
18185 # Pthreads
18186 #
18187 # For each platform, we need to know about any special compile and link
18188 # libraries, and whether the normal C function names are thread-safe.
18189 # See the comment at the top of src/port/thread.c for more information.
18190 # WIN32 doesn't need the pthread tests;  it always uses threads
18191 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
18192
18193
18194
18195 ac_ext=c
18196 ac_cpp='$CPP $CPPFLAGS'
18197 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18198 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18199 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18200
18201 acx_pthread_ok=no
18202
18203 # We used to check for pthread.h first, but this fails if pthread.h
18204 # requires special compiler flags (e.g. on True64 or Sequent).
18205 # It gets checked for in the link test anyway.
18206
18207 # First of all, check if the user has set any of the PTHREAD_LIBS,
18208 # etcetera environment variables, and if threads linking works using
18209 # them:
18210 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
18211         save_CFLAGS="$CFLAGS"
18212         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18213         save_LIBS="$LIBS"
18214         LIBS="$PTHREAD_LIBS $LIBS"
18215         { echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
18216 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6; }
18217         cat >conftest.$ac_ext <<_ACEOF
18218 /* confdefs.h.  */
18219 _ACEOF
18220 cat confdefs.h >>conftest.$ac_ext
18221 cat >>conftest.$ac_ext <<_ACEOF
18222 /* end confdefs.h.  */
18223
18224 /* Override any GCC internal prototype to avoid an error.
18225    Use char because int might match the return type of a GCC
18226    builtin and then its argument prototype would still apply.  */
18227 #ifdef __cplusplus
18228 extern "C"
18229 #endif
18230 char pthread_join ();
18231 int
18232 main ()
18233 {
18234 return pthread_join ();
18235   ;
18236   return 0;
18237 }
18238 _ACEOF
18239 rm -f conftest.$ac_objext conftest$ac_exeext
18240 if { (ac_try="$ac_link"
18241 case "(($ac_try" in
18242   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18243   *) ac_try_echo=$ac_try;;
18244 esac
18245 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18246   (eval "$ac_link") 2>conftest.er1
18247   ac_status=$?
18248   grep -v '^ *+' conftest.er1 >conftest.err
18249   rm -f conftest.er1
18250   cat conftest.err >&5
18251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18252   (exit $ac_status); } && {
18253          test -z "$ac_c_werror_flag" ||
18254          test ! -s conftest.err
18255        } && test -s conftest$ac_exeext &&
18256        $as_test_x conftest$ac_exeext; then
18257   acx_pthread_ok=yes
18258 else
18259   echo "$as_me: failed program was:" >&5
18260 sed 's/^/| /' conftest.$ac_ext >&5
18261
18262
18263 fi
18264
18265 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18266       conftest$ac_exeext conftest.$ac_ext
18267         { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
18268 echo "${ECHO_T}$acx_pthread_ok" >&6; }
18269         if test x"$acx_pthread_ok" = xno; then
18270                 PTHREAD_LIBS=""
18271                 PTHREAD_CFLAGS=""
18272         fi
18273         LIBS="$save_LIBS"
18274         CFLAGS="$save_CFLAGS"
18275 fi
18276
18277 # We must check for the threads library under a number of different
18278 # names; the ordering is very important because some systems
18279 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
18280 # libraries is broken (non-POSIX).
18281
18282 # Create a list of thread flags to try.  Items starting with a "-" are
18283 # C compiler flags, and other items are library names, except for "none"
18284 # which indicates that we try without any flags at all, and "pthread-config"
18285 # which is a program returning the flags for the Pth emulation library.
18286
18287 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
18288
18289 # The ordering *is* (sometimes) important.  Some notes on the
18290 # individual items follow:
18291
18292 # pthreads: AIX (must check this before -lpthread)
18293 # none: in case threads are in libc; should be tried before -Kthread and
18294 #       other compiler flags to prevent continual compiler warnings
18295 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
18296 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
18297 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
18298 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
18299 # -pthreads: Solaris/gcc
18300 # -mthreads: Mingw32/gcc, Lynx/gcc
18301 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
18302 #      doesn't hurt to check since this sometimes defines pthreads too;
18303 #      also defines -D_REENTRANT)
18304 # pthread: Linux, etcetera
18305 # --thread-safe: KAI C++
18306 # pthread-config: use pthread-config program (for GNU Pth library)
18307
18308 case "${host_cpu}-${host_os}" in
18309         *solaris*)
18310
18311         # On Solaris (at least, for some versions), libc contains stubbed
18312         # (non-functional) versions of the pthreads routines, so link-based
18313         # tests will erroneously succeed.  (We need to link with -pthread or
18314         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
18315         # a function called by this macro, so we could check for that, but
18316         # who knows whether they'll stub that too in a future libc.)  So,
18317         # we'll just look for -pthreads and -lpthread first:
18318
18319         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
18320         ;;
18321 esac
18322
18323 if test x"$acx_pthread_ok" = xno; then
18324 for flag in $acx_pthread_flags; do
18325
18326         tryPTHREAD_CFLAGS=""
18327         tryPTHREAD_LIBS=""
18328         case $flag in
18329                 none)
18330                 { echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
18331 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6; }
18332                 ;;
18333
18334                 -*)
18335                 { echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
18336 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6; }
18337                 tryPTHREAD_CFLAGS="$flag"
18338                 ;;
18339
18340                 pthread-config)
18341                 # skip this if we already have flags defined, for PostgreSQL
18342                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
18343                 # Extract the first word of "pthread-config", so it can be a program name with args.
18344 set dummy pthread-config; ac_word=$2
18345 { echo "$as_me:$LINENO: checking for $ac_word" >&5
18346 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
18347 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
18348   echo $ECHO_N "(cached) $ECHO_C" >&6
18349 else
18350   if test -n "$acx_pthread_config"; then
18351   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
18352 else
18353 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18354 for as_dir in $PATH
18355 do
18356   IFS=$as_save_IFS
18357   test -z "$as_dir" && as_dir=.
18358   for ac_exec_ext in '' $ac_executable_extensions; do
18359   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18360     ac_cv_prog_acx_pthread_config="yes"
18361     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18362     break 2
18363   fi
18364 done
18365 done
18366 IFS=$as_save_IFS
18367
18368   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
18369 fi
18370 fi
18371 acx_pthread_config=$ac_cv_prog_acx_pthread_config
18372 if test -n "$acx_pthread_config"; then
18373   { echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
18374 echo "${ECHO_T}$acx_pthread_config" >&6; }
18375 else
18376   { echo "$as_me:$LINENO: result: no" >&5
18377 echo "${ECHO_T}no" >&6; }
18378 fi
18379
18380
18381                 if test x"$acx_pthread_config" = xno; then continue; fi
18382                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
18383                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
18384                 ;;
18385
18386                 *)
18387                 { echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
18388 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6; }
18389                 tryPTHREAD_LIBS="-l$flag"
18390                 ;;
18391         esac
18392
18393         save_LIBS="$LIBS"
18394         save_CFLAGS="$CFLAGS"
18395         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
18396         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
18397
18398         # Check for various functions.  We must include pthread.h,
18399         # since some functions may be macros.  (On the Sequent, we
18400         # need a special flag -Kthread to make this header compile.)
18401         # We check for pthread_join because it is in -lpthread on IRIX
18402         # while pthread_create is in libc.  We check for pthread_attr_init
18403         # due to DEC craziness with -lpthreads.  We check for
18404         # pthread_cleanup_push because it is one of the few pthread
18405         # functions on Solaris that doesn't have a non-functional libc stub.
18406         # We try pthread_create on general principles.
18407         cat >conftest.$ac_ext <<_ACEOF
18408 /* confdefs.h.  */
18409 _ACEOF
18410 cat confdefs.h >>conftest.$ac_ext
18411 cat >>conftest.$ac_ext <<_ACEOF
18412 /* end confdefs.h.  */
18413 #include <pthread.h>
18414 int
18415 main ()
18416 {
18417 pthread_t th; pthread_join(th, 0);
18418                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
18419                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
18420   ;
18421   return 0;
18422 }
18423 _ACEOF
18424 rm -f conftest.$ac_objext conftest$ac_exeext
18425 if { (ac_try="$ac_link"
18426 case "(($ac_try" in
18427   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18428   *) ac_try_echo=$ac_try;;
18429 esac
18430 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18431   (eval "$ac_link") 2>conftest.er1
18432   ac_status=$?
18433   grep -v '^ *+' conftest.er1 >conftest.err
18434   rm -f conftest.er1
18435   cat conftest.err >&5
18436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18437   (exit $ac_status); } && {
18438          test -z "$ac_c_werror_flag" ||
18439          test ! -s conftest.err
18440        } && test -s conftest$ac_exeext &&
18441        $as_test_x conftest$ac_exeext; then
18442   acx_pthread_ok=yes
18443 else
18444   echo "$as_me: failed program was:" >&5
18445 sed 's/^/| /' conftest.$ac_ext >&5
18446
18447         acx_pthread_ok=no
18448 fi
18449
18450 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18451       conftest$ac_exeext conftest.$ac_ext
18452
18453         if test "x$acx_pthread_ok" = xyes; then
18454             # Don't use options that are ignored by the compiler.
18455             # We find them by checking stderror.
18456             cat >conftest.$ac_ext <<_ACEOF
18457 int
18458 main (int argc, char **argv)
18459 {
18460   (void) argc;
18461   (void) argv;
18462   return 0;
18463 }
18464 _ACEOF
18465             rm -f conftest.$ac_objext conftest$ac_exeext
18466             if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
18467                 # we continue with more flags because Linux needs -lpthread
18468                 # for libpq builds on PostgreSQL.  The test above only
18469                 # tests for building binaries, not shared libraries.
18470                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
18471                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
18472             else   acx_pthread_ok=no
18473             fi
18474         fi
18475
18476         LIBS="$save_LIBS"
18477         CFLAGS="$save_CFLAGS"
18478
18479         { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
18480 echo "${ECHO_T}$acx_pthread_ok" >&6; }
18481 done
18482 fi
18483
18484 # Various other checks:
18485 if test "x$acx_pthread_ok" = xyes; then
18486         save_LIBS="$LIBS"
18487         LIBS="$PTHREAD_LIBS $LIBS"
18488         save_CFLAGS="$CFLAGS"
18489         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18490
18491         # Detect AIX lossage: threads are created detached by default
18492         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
18493         { echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
18494 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6; }
18495         cat >conftest.$ac_ext <<_ACEOF
18496 /* confdefs.h.  */
18497 _ACEOF
18498 cat confdefs.h >>conftest.$ac_ext
18499 cat >>conftest.$ac_ext <<_ACEOF
18500 /* end confdefs.h.  */
18501 #include <pthread.h>
18502 int
18503 main ()
18504 {
18505 int attr=PTHREAD_CREATE_JOINABLE;
18506   ;
18507   return 0;
18508 }
18509 _ACEOF
18510 rm -f conftest.$ac_objext conftest$ac_exeext
18511 if { (ac_try="$ac_link"
18512 case "(($ac_try" in
18513   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18514   *) ac_try_echo=$ac_try;;
18515 esac
18516 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18517   (eval "$ac_link") 2>conftest.er1
18518   ac_status=$?
18519   grep -v '^ *+' conftest.er1 >conftest.err
18520   rm -f conftest.er1
18521   cat conftest.err >&5
18522   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18523   (exit $ac_status); } && {
18524          test -z "$ac_c_werror_flag" ||
18525          test ! -s conftest.err
18526        } && test -s conftest$ac_exeext &&
18527        $as_test_x conftest$ac_exeext; then
18528   ok=PTHREAD_CREATE_JOINABLE
18529 else
18530   echo "$as_me: failed program was:" >&5
18531 sed 's/^/| /' conftest.$ac_ext >&5
18532
18533         ok=unknown
18534 fi
18535
18536 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18537       conftest$ac_exeext conftest.$ac_ext
18538         if test x"$ok" = xunknown; then
18539                 cat >conftest.$ac_ext <<_ACEOF
18540 /* confdefs.h.  */
18541 _ACEOF
18542 cat confdefs.h >>conftest.$ac_ext
18543 cat >>conftest.$ac_ext <<_ACEOF
18544 /* end confdefs.h.  */
18545 #include <pthread.h>
18546 int
18547 main ()
18548 {
18549 int attr=PTHREAD_CREATE_UNDETACHED;
18550   ;
18551   return 0;
18552 }
18553 _ACEOF
18554 rm -f conftest.$ac_objext conftest$ac_exeext
18555 if { (ac_try="$ac_link"
18556 case "(($ac_try" in
18557   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18558   *) ac_try_echo=$ac_try;;
18559 esac
18560 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18561   (eval "$ac_link") 2>conftest.er1
18562   ac_status=$?
18563   grep -v '^ *+' conftest.er1 >conftest.err
18564   rm -f conftest.er1
18565   cat conftest.err >&5
18566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18567   (exit $ac_status); } && {
18568          test -z "$ac_c_werror_flag" ||
18569          test ! -s conftest.err
18570        } && test -s conftest$ac_exeext &&
18571        $as_test_x conftest$ac_exeext; then
18572   ok=PTHREAD_CREATE_UNDETACHED
18573 else
18574   echo "$as_me: failed program was:" >&5
18575 sed 's/^/| /' conftest.$ac_ext >&5
18576
18577         ok=unknown
18578 fi
18579
18580 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18581       conftest$ac_exeext conftest.$ac_ext
18582         fi
18583         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
18584
18585 cat >>confdefs.h <<\_ACEOF
18586 #define PTHREAD_CREATE_JOINABLE $ok
18587 _ACEOF
18588
18589         fi
18590         { echo "$as_me:$LINENO: result: ${ok}" >&5
18591 echo "${ECHO_T}${ok}" >&6; }
18592         if test x"$ok" = xunknown; then
18593                 { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
18594 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
18595         fi
18596
18597         { echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
18598 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6; }
18599         flag=no
18600 # We always add these in PostgreSQL
18601 #       case "${host_cpu}-${host_os}" in
18602 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
18603 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
18604 #       esac
18605         { echo "$as_me:$LINENO: result: ${flag}" >&5
18606 echo "${ECHO_T}${flag}" >&6; }
18607         if test "x$flag" != xno; then
18608                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
18609         fi
18610
18611         LIBS="$save_LIBS"
18612         CFLAGS="$save_CFLAGS"
18613
18614 # Supporting cc_r would require a special CC in all places that
18615 # use libpq, and that is ugly, so we don't do it.  Users can still
18616 # define their compiler as cc_r to do thread builds of everything.
18617         # More AIX lossage: must compile with cc_r
18618         # Extract the first word of "cc_r", so it can be a program name with args.
18619 set dummy cc_r; ac_word=$2
18620 { echo "$as_me:$LINENO: checking for $ac_word" >&5
18621 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
18622 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
18623   echo $ECHO_N "(cached) $ECHO_C" >&6
18624 else
18625   if test -n "$PTHREAD_CC"; then
18626   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
18627 else
18628 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18629 for as_dir in $PATH
18630 do
18631   IFS=$as_save_IFS
18632   test -z "$as_dir" && as_dir=.
18633   for ac_exec_ext in '' $ac_executable_extensions; do
18634   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18635     ac_cv_prog_PTHREAD_CC="cc_r"
18636     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18637     break 2
18638   fi
18639 done
18640 done
18641 IFS=$as_save_IFS
18642
18643   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
18644 fi
18645 fi
18646 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
18647 if test -n "$PTHREAD_CC"; then
18648   { echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
18649 echo "${ECHO_T}$PTHREAD_CC" >&6; }
18650 else
18651   { echo "$as_me:$LINENO: result: no" >&5
18652 echo "${ECHO_T}no" >&6; }
18653 fi
18654
18655
18656 else
18657         PTHREAD_CC="$CC"
18658 fi
18659
18660
18661
18662
18663
18664 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
18665 if test x"$acx_pthread_ok" = xyes; then
18666
18667 cat >>confdefs.h <<\_ACEOF
18668 #define HAVE_PTHREAD 1
18669 _ACEOF
18670
18671         :
18672 else
18673         acx_pthread_ok=no
18674
18675 fi
18676 ac_ext=c
18677 ac_cpp='$CPP $CPPFLAGS'
18678 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18679 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18680 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18681
18682         # set thread flags
18683
18684 # Some platforms use these, so just defineed them.  They can't hurt if they
18685 # are not supported.
18686 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
18687
18688
18689 # At this point, we don't want to muck with the compiler name for threading.
18690 # Let's see who fails, perhaps AIX.  2004-04-23
18691 if test "$PTHREAD_CC" != "$CC"; then
18692 { { echo "$as_me:$LINENO: error:
18693 PostgreSQL does not support platforms that require a special compiler
18694 for thread safety." >&5
18695 echo "$as_me: error:
18696 PostgreSQL does not support platforms that require a special compiler
18697 for thread safety." >&2;}
18698    { (exit 1); exit 1; }; }
18699 fi
18700
18701 if test "$THREAD_SUPPORT" = no; then
18702 { { echo "$as_me:$LINENO: error: cannot enable threads on this platform
18703 This platform is known to not support thread-safe programs.  For details,
18704 compile and run src/bin/pg_thread_test." >&5
18705 echo "$as_me: error: cannot enable threads on this platform
18706 This platform is known to not support thread-safe programs.  For details,
18707 compile and run src/bin/pg_thread_test." >&2;}
18708    { (exit 1); exit 1; }; }
18709 fi
18710
18711 # Check for *_r functions
18712 _CFLAGS="$CFLAGS"
18713 _LIBS="$LIBS"
18714 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18715 LIBS="$LIBS $PTHREAD_LIBS"
18716
18717 if test "$PORTNAME" != "win32"; then
18718 if test "${ac_cv_header_pthread_h+set}" = set; then
18719   { echo "$as_me:$LINENO: checking for pthread.h" >&5
18720 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; }
18721 if test "${ac_cv_header_pthread_h+set}" = set; then
18722   echo $ECHO_N "(cached) $ECHO_C" >&6
18723 fi
18724 { echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
18725 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; }
18726 else
18727   # Is the header compilable?
18728 { echo "$as_me:$LINENO: checking pthread.h usability" >&5
18729 echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6; }
18730 cat >conftest.$ac_ext <<_ACEOF
18731 /* confdefs.h.  */
18732 _ACEOF
18733 cat confdefs.h >>conftest.$ac_ext
18734 cat >>conftest.$ac_ext <<_ACEOF
18735 /* end confdefs.h.  */
18736 $ac_includes_default
18737 #include <pthread.h>
18738 _ACEOF
18739 rm -f conftest.$ac_objext
18740 if { (ac_try="$ac_compile"
18741 case "(($ac_try" in
18742   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18743   *) ac_try_echo=$ac_try;;
18744 esac
18745 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18746   (eval "$ac_compile") 2>conftest.er1
18747   ac_status=$?
18748   grep -v '^ *+' conftest.er1 >conftest.err
18749   rm -f conftest.er1
18750   cat conftest.err >&5
18751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18752   (exit $ac_status); } && {
18753          test -z "$ac_c_werror_flag" ||
18754          test ! -s conftest.err
18755        } && test -s conftest.$ac_objext; then
18756   ac_header_compiler=yes
18757 else
18758   echo "$as_me: failed program was:" >&5
18759 sed 's/^/| /' conftest.$ac_ext >&5
18760
18761         ac_header_compiler=no
18762 fi
18763
18764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18765 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18766 echo "${ECHO_T}$ac_header_compiler" >&6; }
18767
18768 # Is the header present?
18769 { echo "$as_me:$LINENO: checking pthread.h presence" >&5
18770 echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6; }
18771 cat >conftest.$ac_ext <<_ACEOF
18772 /* confdefs.h.  */
18773 _ACEOF
18774 cat confdefs.h >>conftest.$ac_ext
18775 cat >>conftest.$ac_ext <<_ACEOF
18776 /* end confdefs.h.  */
18777 #include <pthread.h>
18778 _ACEOF
18779 if { (ac_try="$ac_cpp conftest.$ac_ext"
18780 case "(($ac_try" in
18781   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18782   *) ac_try_echo=$ac_try;;
18783 esac
18784 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18785   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18786   ac_status=$?
18787   grep -v '^ *+' conftest.er1 >conftest.err
18788   rm -f conftest.er1
18789   cat conftest.err >&5
18790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18791   (exit $ac_status); } >/dev/null && {
18792          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18793          test ! -s conftest.err
18794        }; then
18795   ac_header_preproc=yes
18796 else
18797   echo "$as_me: failed program was:" >&5
18798 sed 's/^/| /' conftest.$ac_ext >&5
18799
18800   ac_header_preproc=no
18801 fi
18802
18803 rm -f conftest.err conftest.$ac_ext
18804 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18805 echo "${ECHO_T}$ac_header_preproc" >&6; }
18806
18807 # So?  What about this header?
18808 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18809   yes:no: )
18810     { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
18811 echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18812     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
18813 echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
18814     ac_header_preproc=yes
18815     ;;
18816   no:yes:* )
18817     { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
18818 echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
18819     { echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
18820 echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
18821     { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
18822 echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
18823     { echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
18824 echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18825     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
18826 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
18827     { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
18828 echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
18829     ( cat <<\_ASBOX
18830 ## ---------------------------------------- ##
18831 ## Report this to pgsql-bugs@postgresql.org ##
18832 ## ---------------------------------------- ##
18833 _ASBOX
18834      ) | sed "s/^/$as_me: WARNING:     /" >&2
18835     ;;
18836 esac
18837 { echo "$as_me:$LINENO: checking for pthread.h" >&5
18838 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; }
18839 if test "${ac_cv_header_pthread_h+set}" = set; then
18840   echo $ECHO_N "(cached) $ECHO_C" >&6
18841 else
18842   ac_cv_header_pthread_h=$ac_header_preproc
18843 fi
18844 { echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
18845 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; }
18846
18847 fi
18848 if test $ac_cv_header_pthread_h = yes; then
18849   :
18850 else
18851   { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safety" >&5
18852 echo "$as_me: error: pthread.h not found, required for --enable-thread-safety" >&2;}
18853    { (exit 1); exit 1; }; }
18854 fi
18855
18856
18857 fi
18858
18859
18860
18861
18862 for ac_func in strerror_r getpwuid_r gethostbyname_r
18863 do
18864 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18865 { echo "$as_me:$LINENO: checking for $ac_func" >&5
18866 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18867 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18868   echo $ECHO_N "(cached) $ECHO_C" >&6
18869 else
18870   cat >conftest.$ac_ext <<_ACEOF
18871 /* confdefs.h.  */
18872 _ACEOF
18873 cat confdefs.h >>conftest.$ac_ext
18874 cat >>conftest.$ac_ext <<_ACEOF
18875 /* end confdefs.h.  */
18876 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18877    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
18878 #define $ac_func innocuous_$ac_func
18879
18880 /* System header to define __stub macros and hopefully few prototypes,
18881     which can conflict with char $ac_func (); below.
18882     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18883     <limits.h> exists even on freestanding compilers.  */
18884
18885 #ifdef __STDC__
18886 # include <limits.h>
18887 #else
18888 # include <assert.h>
18889 #endif
18890
18891 #undef $ac_func
18892
18893 /* Override any GCC internal prototype to avoid an error.
18894    Use char because int might match the return type of a GCC
18895    builtin and then its argument prototype would still apply.  */
18896 #ifdef __cplusplus
18897 extern "C"
18898 #endif
18899 char $ac_func ();
18900 /* The GNU C library defines this for functions which it implements
18901     to always fail with ENOSYS.  Some functions are actually named
18902     something starting with __ and the normal name is an alias.  */
18903 #if defined __stub_$ac_func || defined __stub___$ac_func
18904 choke me
18905 #endif
18906
18907 int
18908 main ()
18909 {
18910 return $ac_func ();
18911   ;
18912   return 0;
18913 }
18914 _ACEOF
18915 rm -f conftest.$ac_objext conftest$ac_exeext
18916 if { (ac_try="$ac_link"
18917 case "(($ac_try" in
18918   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18919   *) ac_try_echo=$ac_try;;
18920 esac
18921 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18922   (eval "$ac_link") 2>conftest.er1
18923   ac_status=$?
18924   grep -v '^ *+' conftest.er1 >conftest.err
18925   rm -f conftest.er1
18926   cat conftest.err >&5
18927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18928   (exit $ac_status); } && {
18929          test -z "$ac_c_werror_flag" ||
18930          test ! -s conftest.err
18931        } && test -s conftest$ac_exeext &&
18932        $as_test_x conftest$ac_exeext; then
18933   eval "$as_ac_var=yes"
18934 else
18935   echo "$as_me: failed program was:" >&5
18936 sed 's/^/| /' conftest.$ac_ext >&5
18937
18938         eval "$as_ac_var=no"
18939 fi
18940
18941 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18942       conftest$ac_exeext conftest.$ac_ext
18943 fi
18944 ac_res=`eval echo '${'$as_ac_var'}'`
18945                { echo "$as_me:$LINENO: result: $ac_res" >&5
18946 echo "${ECHO_T}$ac_res" >&6; }
18947 if test `eval echo '${'$as_ac_var'}'` = yes; then
18948   cat >>confdefs.h <<_ACEOF
18949 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18950 _ACEOF
18951
18952 fi
18953 done
18954
18955
18956 # Do test here with the proper thread flags
18957 { echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
18958 echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6; }
18959 if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
18960   echo $ECHO_N "(cached) $ECHO_C" >&6
18961 else
18962   cat >conftest.$ac_ext <<_ACEOF
18963 /* confdefs.h.  */
18964 _ACEOF
18965 cat confdefs.h >>conftest.$ac_ext
18966 cat >>conftest.$ac_ext <<_ACEOF
18967 /* end confdefs.h.  */
18968 #include <sys/types.h>
18969 #include <pwd.h>
18970 int
18971 main ()
18972 {
18973 uid_t uid;
18974 struct passwd *space;
18975 char *buf;
18976 size_t bufsize;
18977 struct passwd **result;
18978 getpwuid_r(uid, space, buf, bufsize, result);
18979   ;
18980   return 0;
18981 }
18982 _ACEOF
18983 rm -f conftest.$ac_objext
18984 if { (ac_try="$ac_compile"
18985 case "(($ac_try" in
18986   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18987   *) ac_try_echo=$ac_try;;
18988 esac
18989 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18990   (eval "$ac_compile") 2>conftest.er1
18991   ac_status=$?
18992   grep -v '^ *+' conftest.er1 >conftest.err
18993   rm -f conftest.er1
18994   cat conftest.err >&5
18995   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18996   (exit $ac_status); } && {
18997          test -z "$ac_c_werror_flag" ||
18998          test ! -s conftest.err
18999        } && test -s conftest.$ac_objext; then
19000   pgac_func_getpwuid_r_5arg=yes
19001 else
19002   echo "$as_me: failed program was:" >&5
19003 sed 's/^/| /' conftest.$ac_ext >&5
19004
19005         pgac_func_getpwuid_r_5arg=no
19006 fi
19007
19008 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19009 fi
19010 { echo "$as_me:$LINENO: result: $pgac_func_getpwuid_r_5arg" >&5
19011 echo "${ECHO_T}$pgac_func_getpwuid_r_5arg" >&6; }
19012 if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
19013
19014 cat >>confdefs.h <<\_ACEOF
19015 #define GETPWUID_R_5ARG
19016 _ACEOF
19017
19018 fi
19019
19020 { echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
19021 echo $ECHO_N "checking whether strerror_r returns int... $ECHO_C" >&6; }
19022 if test "${pgac_func_strerror_r_int+set}" = set; then
19023   echo $ECHO_N "(cached) $ECHO_C" >&6
19024 else
19025   cat >conftest.$ac_ext <<_ACEOF
19026 /* confdefs.h.  */
19027 _ACEOF
19028 cat confdefs.h >>conftest.$ac_ext
19029 cat >>conftest.$ac_ext <<_ACEOF
19030 /* end confdefs.h.  */
19031 #include <string.h>
19032 int
19033 main ()
19034 {
19035 #ifndef _AIX
19036 int strerror_r(int, char *, size_t);
19037 #else
19038 /* Older AIX has 'int' for the third argument so we don't test the args. */
19039 int strerror_r();
19040 #endif
19041   ;
19042   return 0;
19043 }
19044 _ACEOF
19045 rm -f conftest.$ac_objext
19046 if { (ac_try="$ac_compile"
19047 case "(($ac_try" in
19048   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19049   *) ac_try_echo=$ac_try;;
19050 esac
19051 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19052   (eval "$ac_compile") 2>conftest.er1
19053   ac_status=$?
19054   grep -v '^ *+' conftest.er1 >conftest.err
19055   rm -f conftest.er1
19056   cat conftest.err >&5
19057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19058   (exit $ac_status); } && {
19059          test -z "$ac_c_werror_flag" ||
19060          test ! -s conftest.err
19061        } && test -s conftest.$ac_objext; then
19062   pgac_func_strerror_r_int=yes
19063 else
19064   echo "$as_me: failed program was:" >&5
19065 sed 's/^/| /' conftest.$ac_ext >&5
19066
19067         pgac_func_strerror_r_int=no
19068 fi
19069
19070 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19071 fi
19072 { echo "$as_me:$LINENO: result: $pgac_func_strerror_r_int" >&5
19073 echo "${ECHO_T}$pgac_func_strerror_r_int" >&6; }
19074 if test x"$pgac_func_strerror_r_int" = xyes ; then
19075
19076 cat >>confdefs.h <<\_ACEOF
19077 #define STRERROR_R_INT
19078 _ACEOF
19079
19080 fi
19081
19082
19083 CFLAGS="$_CFLAGS"
19084 LIBS="$_LIBS"
19085
19086 else
19087 # do not use values from template file
19088 PTHREAD_CFLAGS=
19089 PTHREAD_LIBS=
19090 fi
19091
19092
19093
19094
19095
19096 # We can test for libldap_r only after we know PTHREAD_LIBS
19097 if test "$with_ldap" = yes ; then
19098   _LIBS="$LIBS"
19099   if test "$PORTNAME" != "win32"; then
19100
19101 { echo "$as_me:$LINENO: checking for ldap_bind in -lldap" >&5
19102 echo $ECHO_N "checking for ldap_bind in -lldap... $ECHO_C" >&6; }
19103 if test "${ac_cv_lib_ldap_ldap_bind+set}" = set; then
19104   echo $ECHO_N "(cached) $ECHO_C" >&6
19105 else
19106   ac_check_lib_save_LIBS=$LIBS
19107 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
19108 cat >conftest.$ac_ext <<_ACEOF
19109 /* confdefs.h.  */
19110 _ACEOF
19111 cat confdefs.h >>conftest.$ac_ext
19112 cat >>conftest.$ac_ext <<_ACEOF
19113 /* end confdefs.h.  */
19114
19115 /* Override any GCC internal prototype to avoid an error.
19116    Use char because int might match the return type of a GCC
19117    builtin and then its argument prototype would still apply.  */
19118 #ifdef __cplusplus
19119 extern "C"
19120 #endif
19121 char ldap_bind ();
19122 int
19123 main ()
19124 {
19125 return ldap_bind ();
19126   ;
19127   return 0;
19128 }
19129 _ACEOF
19130 rm -f conftest.$ac_objext conftest$ac_exeext
19131 if { (ac_try="$ac_link"
19132 case "(($ac_try" in
19133   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19134   *) ac_try_echo=$ac_try;;
19135 esac
19136 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19137   (eval "$ac_link") 2>conftest.er1
19138   ac_status=$?
19139   grep -v '^ *+' conftest.er1 >conftest.err
19140   rm -f conftest.er1
19141   cat conftest.err >&5
19142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19143   (exit $ac_status); } && {
19144          test -z "$ac_c_werror_flag" ||
19145          test ! -s conftest.err
19146        } && test -s conftest$ac_exeext &&
19147        $as_test_x conftest$ac_exeext; then
19148   ac_cv_lib_ldap_ldap_bind=yes
19149 else
19150   echo "$as_me: failed program was:" >&5
19151 sed 's/^/| /' conftest.$ac_ext >&5
19152
19153         ac_cv_lib_ldap_ldap_bind=no
19154 fi
19155
19156 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19157       conftest$ac_exeext conftest.$ac_ext
19158 LIBS=$ac_check_lib_save_LIBS
19159 fi
19160 { echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_bind" >&5
19161 echo "${ECHO_T}$ac_cv_lib_ldap_ldap_bind" >&6; }
19162 if test $ac_cv_lib_ldap_ldap_bind = yes; then
19163   cat >>confdefs.h <<_ACEOF
19164 #define HAVE_LIBLDAP 1
19165 _ACEOF
19166
19167   LIBS="-lldap $LIBS"
19168
19169 else
19170   { { echo "$as_me:$LINENO: error: library 'ldap' is required for LDAP" >&5
19171 echo "$as_me: error: library 'ldap' is required for LDAP" >&2;}
19172    { (exit 1); exit 1; }; }
19173 fi
19174
19175     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
19176     if test "$enable_thread_safety" = yes; then
19177       # on some platforms ldap_r fails to link without PTHREAD_LIBS
19178
19179 { echo "$as_me:$LINENO: checking for ldap_simple_bind in -lldap_r" >&5
19180 echo $ECHO_N "checking for ldap_simple_bind in -lldap_r... $ECHO_C" >&6; }
19181 if test "${ac_cv_lib_ldap_r_ldap_simple_bind+set}" = set; then
19182   echo $ECHO_N "(cached) $ECHO_C" >&6
19183 else
19184   ac_check_lib_save_LIBS=$LIBS
19185 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
19186 cat >conftest.$ac_ext <<_ACEOF
19187 /* confdefs.h.  */
19188 _ACEOF
19189 cat confdefs.h >>conftest.$ac_ext
19190 cat >>conftest.$ac_ext <<_ACEOF
19191 /* end confdefs.h.  */
19192
19193 /* Override any GCC internal prototype to avoid an error.
19194    Use char because int might match the return type of a GCC
19195    builtin and then its argument prototype would still apply.  */
19196 #ifdef __cplusplus
19197 extern "C"
19198 #endif
19199 char ldap_simple_bind ();
19200 int
19201 main ()
19202 {
19203 return ldap_simple_bind ();
19204   ;
19205   return 0;
19206 }
19207 _ACEOF
19208 rm -f conftest.$ac_objext conftest$ac_exeext
19209 if { (ac_try="$ac_link"
19210 case "(($ac_try" in
19211   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19212   *) ac_try_echo=$ac_try;;
19213 esac
19214 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19215   (eval "$ac_link") 2>conftest.er1
19216   ac_status=$?
19217   grep -v '^ *+' conftest.er1 >conftest.err
19218   rm -f conftest.er1
19219   cat conftest.err >&5
19220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19221   (exit $ac_status); } && {
19222          test -z "$ac_c_werror_flag" ||
19223          test ! -s conftest.err
19224        } && test -s conftest$ac_exeext &&
19225        $as_test_x conftest$ac_exeext; then
19226   ac_cv_lib_ldap_r_ldap_simple_bind=yes
19227 else
19228   echo "$as_me: failed program was:" >&5
19229 sed 's/^/| /' conftest.$ac_ext >&5
19230
19231         ac_cv_lib_ldap_r_ldap_simple_bind=no
19232 fi
19233
19234 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19235       conftest$ac_exeext conftest.$ac_ext
19236 LIBS=$ac_check_lib_save_LIBS
19237 fi
19238 { echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
19239 echo "${ECHO_T}$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
19240 if test $ac_cv_lib_ldap_r_ldap_simple_bind = yes; then
19241   cat >>confdefs.h <<_ACEOF
19242 #define HAVE_LIBLDAP_R 1
19243 _ACEOF
19244
19245   LIBS="-lldap_r $LIBS"
19246
19247 else
19248   { { echo "$as_me:$LINENO: error: library 'ldap_r' is required for LDAP" >&5
19249 echo "$as_me: error: library 'ldap_r' is required for LDAP" >&2;}
19250    { (exit 1); exit 1; }; }
19251 fi
19252
19253       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
19254     else
19255       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
19256     fi
19257   else
19258
19259 { echo "$as_me:$LINENO: checking for ldap_bind in -lwldap32" >&5
19260 echo $ECHO_N "checking for ldap_bind in -lwldap32... $ECHO_C" >&6; }
19261 if test "${ac_cv_lib_wldap32_ldap_bind+set}" = set; then
19262   echo $ECHO_N "(cached) $ECHO_C" >&6
19263 else
19264   ac_check_lib_save_LIBS=$LIBS
19265 LIBS="-lwldap32  $LIBS"
19266 cat >conftest.$ac_ext <<_ACEOF
19267 /* confdefs.h.  */
19268 _ACEOF
19269 cat confdefs.h >>conftest.$ac_ext
19270 cat >>conftest.$ac_ext <<_ACEOF
19271 /* end confdefs.h.  */
19272
19273 /* Override any GCC internal prototype to avoid an error.
19274    Use char because int might match the return type of a GCC
19275    builtin and then its argument prototype would still apply.  */
19276 #ifdef __cplusplus
19277 extern "C"
19278 #endif
19279 char ldap_bind ();
19280 int
19281 main ()
19282 {
19283 return ldap_bind ();
19284   ;
19285   return 0;
19286 }
19287 _ACEOF
19288 rm -f conftest.$ac_objext conftest$ac_exeext
19289 if { (ac_try="$ac_link"
19290 case "(($ac_try" in
19291   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19292   *) ac_try_echo=$ac_try;;
19293 esac
19294 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19295   (eval "$ac_link") 2>conftest.er1
19296   ac_status=$?
19297   grep -v '^ *+' conftest.er1 >conftest.err
19298   rm -f conftest.er1
19299   cat conftest.err >&5
19300   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19301   (exit $ac_status); } && {
19302          test -z "$ac_c_werror_flag" ||
19303          test ! -s conftest.err
19304        } && test -s conftest$ac_exeext &&
19305        $as_test_x conftest$ac_exeext; then
19306   ac_cv_lib_wldap32_ldap_bind=yes
19307 else
19308   echo "$as_me: failed program was:" >&5
19309 sed 's/^/| /' conftest.$ac_ext >&5
19310
19311         ac_cv_lib_wldap32_ldap_bind=no
19312 fi
19313
19314 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19315       conftest$ac_exeext conftest.$ac_ext
19316 LIBS=$ac_check_lib_save_LIBS
19317 fi
19318 { echo "$as_me:$LINENO: result: $ac_cv_lib_wldap32_ldap_bind" >&5
19319 echo "${ECHO_T}$ac_cv_lib_wldap32_ldap_bind" >&6; }
19320 if test $ac_cv_lib_wldap32_ldap_bind = yes; then
19321   cat >>confdefs.h <<_ACEOF
19322 #define HAVE_LIBWLDAP32 1
19323 _ACEOF
19324
19325   LIBS="-lwldap32 $LIBS"
19326
19327 else
19328   { { echo "$as_me:$LINENO: error: library 'wldap32' is required for LDAP" >&5
19329 echo "$as_me: error: library 'wldap32' is required for LDAP" >&2;}
19330    { (exit 1); exit 1; }; }
19331 fi
19332
19333     LDAP_LIBS_FE="-lwldap32"
19334     LDAP_LIBS_BE="-lwldap32"
19335   fi
19336   LIBS="$_LIBS"
19337 fi
19338
19339
19340
19341
19342 # This test makes sure that run tests work at all.  Sometimes a shared
19343 # library is found by the linker, but the runtime linker can't find it.
19344 # This check should come after all modifications of compiler or linker
19345 # variables, and before any other run tests.
19346 { echo "$as_me:$LINENO: checking test program" >&5
19347 echo $ECHO_N "checking test program... $ECHO_C" >&6; }
19348 if test "$cross_compiling" = yes; then
19349   { echo "$as_me:$LINENO: result: cross-compiling" >&5
19350 echo "${ECHO_T}cross-compiling" >&6; }
19351 else
19352   cat >conftest.$ac_ext <<_ACEOF
19353 /* confdefs.h.  */
19354 _ACEOF
19355 cat confdefs.h >>conftest.$ac_ext
19356 cat >>conftest.$ac_ext <<_ACEOF
19357 /* end confdefs.h.  */
19358 int main() { return 0; }
19359 _ACEOF
19360 rm -f 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>&5
19368   ac_status=$?
19369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19370   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19371   { (case "(($ac_try" in
19372   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19373   *) ac_try_echo=$ac_try;;
19374 esac
19375 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19376   (eval "$ac_try") 2>&5
19377   ac_status=$?
19378   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19379   (exit $ac_status); }; }; then
19380   { echo "$as_me:$LINENO: result: ok" >&5
19381 echo "${ECHO_T}ok" >&6; }
19382 else
19383   echo "$as_me: program exited with status $ac_status" >&5
19384 echo "$as_me: failed program was:" >&5
19385 sed 's/^/| /' conftest.$ac_ext >&5
19386
19387 ( exit $ac_status )
19388 { echo "$as_me:$LINENO: result: failed" >&5
19389 echo "${ECHO_T}failed" >&6; }
19390 { { echo "$as_me:$LINENO: error:
19391 Could not execute a simple test program.  This may be a problem
19392 related to locating shared libraries.  Check the file 'config.log'
19393 for the exact reason." >&5
19394 echo "$as_me: error:
19395 Could not execute a simple test program.  This may be a problem
19396 related to locating shared libraries.  Check the file 'config.log'
19397 for the exact reason." >&2;}
19398    { (exit 1); exit 1; }; }
19399 fi
19400 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19401 fi
19402
19403
19404
19405 # --------------------
19406 # Run tests below here
19407 # --------------------
19408
19409 # Force use of our snprintf if system's doesn't do arg control
19410 # See comment above at snprintf test for details.
19411 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
19412   { echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
19413 echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6; }
19414 if test "${pgac_cv_printf_arg_control+set}" = set; then
19415   echo $ECHO_N "(cached) $ECHO_C" >&6
19416 else
19417   if test "$cross_compiling" = yes; then
19418   pgac_cv_printf_arg_control=cross
19419 else
19420   cat >conftest.$ac_ext <<_ACEOF
19421 /* confdefs.h.  */
19422 _ACEOF
19423 cat confdefs.h >>conftest.$ac_ext
19424 cat >>conftest.$ac_ext <<_ACEOF
19425 /* end confdefs.h.  */
19426 #include <stdio.h>
19427 #include <string.h>
19428
19429 int main()
19430 {
19431   char buf[100];
19432
19433   /* can it swap arguments? */
19434   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
19435   if (strcmp(buf, "4 3") != 0)
19436     return 1;
19437   return 0;
19438 }
19439 _ACEOF
19440 rm -f conftest$ac_exeext
19441 if { (ac_try="$ac_link"
19442 case "(($ac_try" in
19443   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19444   *) ac_try_echo=$ac_try;;
19445 esac
19446 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19447   (eval "$ac_link") 2>&5
19448   ac_status=$?
19449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19450   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19451   { (case "(($ac_try" in
19452   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19453   *) ac_try_echo=$ac_try;;
19454 esac
19455 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19456   (eval "$ac_try") 2>&5
19457   ac_status=$?
19458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19459   (exit $ac_status); }; }; then
19460   pgac_cv_printf_arg_control=yes
19461 else
19462   echo "$as_me: program exited with status $ac_status" >&5
19463 echo "$as_me: failed program was:" >&5
19464 sed 's/^/| /' conftest.$ac_ext >&5
19465
19466 ( exit $ac_status )
19467 pgac_cv_printf_arg_control=no
19468 fi
19469 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19470 fi
19471
19472
19473
19474 fi
19475 { echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
19476 echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6; }
19477
19478   if test $pgac_cv_printf_arg_control != yes ; then
19479     pgac_need_repl_snprintf=yes
19480   fi
19481 fi
19482
19483
19484
19485 { echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
19486 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6; }
19487 if test "${pgac_cv_type_long_int_64+set}" = set; then
19488   echo $ECHO_N "(cached) $ECHO_C" >&6
19489 else
19490   if test "$cross_compiling" = yes; then
19491   # If cross-compiling, check the size reported by the compiler and
19492 # trust that the arithmetic works.
19493 cat >conftest.$ac_ext <<_ACEOF
19494 /* confdefs.h.  */
19495 _ACEOF
19496 cat confdefs.h >>conftest.$ac_ext
19497 cat >>conftest.$ac_ext <<_ACEOF
19498 /* end confdefs.h.  */
19499
19500 int
19501 main ()
19502 {
19503 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
19504 test_array [0] = 0
19505
19506   ;
19507   return 0;
19508 }
19509 _ACEOF
19510 rm -f conftest.$ac_objext
19511 if { (ac_try="$ac_compile"
19512 case "(($ac_try" in
19513   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19514   *) ac_try_echo=$ac_try;;
19515 esac
19516 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19517   (eval "$ac_compile") 2>conftest.er1
19518   ac_status=$?
19519   grep -v '^ *+' conftest.er1 >conftest.err
19520   rm -f conftest.er1
19521   cat conftest.err >&5
19522   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19523   (exit $ac_status); } && {
19524          test -z "$ac_c_werror_flag" ||
19525          test ! -s conftest.err
19526        } && test -s conftest.$ac_objext; then
19527   pgac_cv_type_long_int_64=yes
19528 else
19529   echo "$as_me: failed program was:" >&5
19530 sed 's/^/| /' conftest.$ac_ext >&5
19531
19532         pgac_cv_type_long_int_64=no
19533 fi
19534
19535 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19536 else
19537   cat >conftest.$ac_ext <<_ACEOF
19538 /* confdefs.h.  */
19539 _ACEOF
19540 cat confdefs.h >>conftest.$ac_ext
19541 cat >>conftest.$ac_ext <<_ACEOF
19542 /* end confdefs.h.  */
19543 typedef long int ac_int64;
19544
19545 /*
19546  * These are globals to discourage the compiler from folding all the
19547  * arithmetic tests down to compile-time constants.
19548  */
19549 ac_int64 a = 20000001;
19550 ac_int64 b = 40000005;
19551
19552 int does_int64_work()
19553 {
19554   ac_int64 c,d;
19555
19556   if (sizeof(ac_int64) != 8)
19557     return 0;                   /* definitely not the right size */
19558
19559   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
19560   c = a * b;
19561   d = (c + b) / b;
19562   if (d != a+1)
19563     return 0;
19564   return 1;
19565 }
19566 main() {
19567   exit(! does_int64_work());
19568 }
19569 _ACEOF
19570 rm -f conftest$ac_exeext
19571 if { (ac_try="$ac_link"
19572 case "(($ac_try" in
19573   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19574   *) ac_try_echo=$ac_try;;
19575 esac
19576 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19577   (eval "$ac_link") 2>&5
19578   ac_status=$?
19579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19580   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19581   { (case "(($ac_try" in
19582   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19583   *) ac_try_echo=$ac_try;;
19584 esac
19585 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19586   (eval "$ac_try") 2>&5
19587   ac_status=$?
19588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19589   (exit $ac_status); }; }; then
19590   pgac_cv_type_long_int_64=yes
19591 else
19592   echo "$as_me: program exited with status $ac_status" >&5
19593 echo "$as_me: failed program was:" >&5
19594 sed 's/^/| /' conftest.$ac_ext >&5
19595
19596 ( exit $ac_status )
19597 pgac_cv_type_long_int_64=no
19598 fi
19599 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19600 fi
19601
19602
19603 fi
19604 { echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
19605 echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6; }
19606
19607 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
19608 if test x"$pgac_cv_type_long_int_64" = xyes ; then
19609
19610 cat >>confdefs.h <<\_ACEOF
19611 #define HAVE_LONG_INT_64
19612 _ACEOF
19613
19614 fi
19615
19616
19617 if test x"$HAVE_LONG_INT_64" = x"no" ; then
19618   { echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
19619 echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6; }
19620 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
19621   echo $ECHO_N "(cached) $ECHO_C" >&6
19622 else
19623   if test "$cross_compiling" = yes; then
19624   # If cross-compiling, check the size reported by the compiler and
19625 # trust that the arithmetic works.
19626 cat >conftest.$ac_ext <<_ACEOF
19627 /* confdefs.h.  */
19628 _ACEOF
19629 cat confdefs.h >>conftest.$ac_ext
19630 cat >>conftest.$ac_ext <<_ACEOF
19631 /* end confdefs.h.  */
19632
19633 int
19634 main ()
19635 {
19636 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
19637 test_array [0] = 0
19638
19639   ;
19640   return 0;
19641 }
19642 _ACEOF
19643 rm -f conftest.$ac_objext
19644 if { (ac_try="$ac_compile"
19645 case "(($ac_try" in
19646   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19647   *) ac_try_echo=$ac_try;;
19648 esac
19649 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19650   (eval "$ac_compile") 2>conftest.er1
19651   ac_status=$?
19652   grep -v '^ *+' conftest.er1 >conftest.err
19653   rm -f conftest.er1
19654   cat conftest.err >&5
19655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19656   (exit $ac_status); } && {
19657          test -z "$ac_c_werror_flag" ||
19658          test ! -s conftest.err
19659        } && test -s conftest.$ac_objext; then
19660   pgac_cv_type_long_long_int_64=yes
19661 else
19662   echo "$as_me: failed program was:" >&5
19663 sed 's/^/| /' conftest.$ac_ext >&5
19664
19665         pgac_cv_type_long_long_int_64=no
19666 fi
19667
19668 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19669 else
19670   cat >conftest.$ac_ext <<_ACEOF
19671 /* confdefs.h.  */
19672 _ACEOF
19673 cat confdefs.h >>conftest.$ac_ext
19674 cat >>conftest.$ac_ext <<_ACEOF
19675 /* end confdefs.h.  */
19676 typedef long long int ac_int64;
19677
19678 /*
19679  * These are globals to discourage the compiler from folding all the
19680  * arithmetic tests down to compile-time constants.
19681  */
19682 ac_int64 a = 20000001;
19683 ac_int64 b = 40000005;
19684
19685 int does_int64_work()
19686 {
19687   ac_int64 c,d;
19688
19689   if (sizeof(ac_int64) != 8)
19690     return 0;                   /* definitely not the right size */
19691
19692   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
19693   c = a * b;
19694   d = (c + b) / b;
19695   if (d != a+1)
19696     return 0;
19697   return 1;
19698 }
19699 main() {
19700   exit(! does_int64_work());
19701 }
19702 _ACEOF
19703 rm -f conftest$ac_exeext
19704 if { (ac_try="$ac_link"
19705 case "(($ac_try" in
19706   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19707   *) ac_try_echo=$ac_try;;
19708 esac
19709 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19710   (eval "$ac_link") 2>&5
19711   ac_status=$?
19712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19713   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19714   { (case "(($ac_try" in
19715   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19716   *) ac_try_echo=$ac_try;;
19717 esac
19718 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19719   (eval "$ac_try") 2>&5
19720   ac_status=$?
19721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19722   (exit $ac_status); }; }; then
19723   pgac_cv_type_long_long_int_64=yes
19724 else
19725   echo "$as_me: program exited with status $ac_status" >&5
19726 echo "$as_me: failed program was:" >&5
19727 sed 's/^/| /' conftest.$ac_ext >&5
19728
19729 ( exit $ac_status )
19730 pgac_cv_type_long_long_int_64=no
19731 fi
19732 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19733 fi
19734
19735
19736 fi
19737 { echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
19738 echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6; }
19739
19740 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
19741 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
19742
19743 cat >>confdefs.h <<\_ACEOF
19744 #define HAVE_LONG_LONG_INT_64
19745 _ACEOF
19746
19747 fi
19748
19749 fi
19750
19751
19752
19753 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
19754   cat >conftest.$ac_ext <<_ACEOF
19755 /* confdefs.h.  */
19756 _ACEOF
19757 cat confdefs.h >>conftest.$ac_ext
19758 cat >>conftest.$ac_ext <<_ACEOF
19759 /* end confdefs.h.  */
19760
19761 #define INT64CONST(x)  x##LL
19762 long long int foo = INT64CONST(0x1234567890123456);
19763
19764 int
19765 main ()
19766 {
19767
19768   ;
19769   return 0;
19770 }
19771 _ACEOF
19772 rm -f conftest.$ac_objext
19773 if { (ac_try="$ac_compile"
19774 case "(($ac_try" in
19775   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19776   *) ac_try_echo=$ac_try;;
19777 esac
19778 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19779   (eval "$ac_compile") 2>conftest.er1
19780   ac_status=$?
19781   grep -v '^ *+' conftest.er1 >conftest.err
19782   rm -f conftest.er1
19783   cat conftest.err >&5
19784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19785   (exit $ac_status); } && {
19786          test -z "$ac_c_werror_flag" ||
19787          test ! -s conftest.err
19788        } && test -s conftest.$ac_objext; then
19789
19790 cat >>confdefs.h <<\_ACEOF
19791 #define HAVE_LL_CONSTANTS 1
19792 _ACEOF
19793
19794 else
19795   echo "$as_me: failed program was:" >&5
19796 sed 's/^/| /' conftest.$ac_ext >&5
19797
19798
19799 fi
19800
19801 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19802 fi
19803
19804
19805 # If we found "long int" is 64 bits, assume snprintf handles it.  If
19806 # we found we need to use "long long int", better check.  We cope with
19807 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
19808 # work, fall back to our own snprintf emulation (which we know uses %lld).
19809
19810 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
19811   if test $pgac_need_repl_snprintf = no; then
19812     { echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
19813 echo $ECHO_N "checking snprintf format for long long int... $ECHO_C" >&6; }
19814 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
19815   echo $ECHO_N "(cached) $ECHO_C" >&6
19816 else
19817   for pgac_format in '%lld' '%qd' '%I64d'; do
19818 if test "$cross_compiling" = yes; then
19819   pgac_cv_snprintf_long_long_int_format=cross; break
19820 else
19821   cat >conftest.$ac_ext <<_ACEOF
19822 /* confdefs.h.  */
19823 _ACEOF
19824 cat confdefs.h >>conftest.$ac_ext
19825 cat >>conftest.$ac_ext <<_ACEOF
19826 /* end confdefs.h.  */
19827 #include <stdio.h>
19828 typedef long long int ac_int64;
19829 #define INT64_FORMAT "$pgac_format"
19830
19831 ac_int64 a = 20000001;
19832 ac_int64 b = 40000005;
19833
19834 int does_int64_snprintf_work()
19835 {
19836   ac_int64 c;
19837   char buf[100];
19838
19839   if (sizeof(ac_int64) != 8)
19840     return 0;                   /* doesn't look like the right size */
19841
19842   c = a * b;
19843   snprintf(buf, 100, INT64_FORMAT, c);
19844   if (strcmp(buf, "800000140000005") != 0)
19845     return 0;                   /* either multiply or snprintf is busted */
19846   return 1;
19847 }
19848 main() {
19849   exit(! does_int64_snprintf_work());
19850 }
19851 _ACEOF
19852 rm -f conftest$ac_exeext
19853 if { (ac_try="$ac_link"
19854 case "(($ac_try" in
19855   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19856   *) ac_try_echo=$ac_try;;
19857 esac
19858 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19859   (eval "$ac_link") 2>&5
19860   ac_status=$?
19861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19862   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19863   { (case "(($ac_try" in
19864   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19865   *) ac_try_echo=$ac_try;;
19866 esac
19867 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19868   (eval "$ac_try") 2>&5
19869   ac_status=$?
19870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19871   (exit $ac_status); }; }; then
19872   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
19873 else
19874   echo "$as_me: program exited with status $ac_status" >&5
19875 echo "$as_me: failed program was:" >&5
19876 sed 's/^/| /' conftest.$ac_ext >&5
19877
19878 fi
19879 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19880 fi
19881
19882
19883 done
19884 fi
19885
19886 LONG_LONG_INT_FORMAT=''
19887
19888 case $pgac_cv_snprintf_long_long_int_format in
19889   cross) { echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
19890 echo "${ECHO_T}cannot test (not on host machine)" >&6; };;
19891   ?*)    { echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
19892 echo "${ECHO_T}$pgac_cv_snprintf_long_long_int_format" >&6; }
19893          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
19894   *)     { echo "$as_me:$LINENO: result: none" >&5
19895 echo "${ECHO_T}none" >&6; };;
19896 esac
19897     if test "$LONG_LONG_INT_FORMAT" = ""; then
19898       # Force usage of our own snprintf, since system snprintf is broken
19899       pgac_need_repl_snprintf=yes
19900       LONG_LONG_INT_FORMAT='%lld'
19901     fi
19902   else
19903     # Here if we previously decided we needed to use our own snprintf
19904     LONG_LONG_INT_FORMAT='%lld'
19905   fi
19906   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
19907   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
19908   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
19909 else
19910   # Here if we are not using 'long long int' at all
19911   INT64_FORMAT='"%ld"'
19912   UINT64_FORMAT='"%lu"'
19913 fi
19914
19915
19916 cat >>confdefs.h <<_ACEOF
19917 #define INT64_FORMAT $INT64_FORMAT
19918 _ACEOF
19919
19920
19921
19922 cat >>confdefs.h <<_ACEOF
19923 #define UINT64_FORMAT $UINT64_FORMAT
19924 _ACEOF
19925
19926
19927 # Now we have checked all the reasons to replace snprintf
19928 if test $pgac_need_repl_snprintf = yes; then
19929
19930 cat >>confdefs.h <<\_ACEOF
19931 #define USE_REPL_SNPRINTF 1
19932 _ACEOF
19933
19934   case " $LIBOBJS " in
19935   *" snprintf.$ac_objext "* ) ;;
19936   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
19937  ;;
19938 esac
19939
19940 fi
19941
19942 # Need a #define for the size of Datum (unsigned long)
19943 { echo "$as_me:$LINENO: checking for unsigned long" >&5
19944 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6; }
19945 if test "${ac_cv_type_unsigned_long+set}" = set; then
19946   echo $ECHO_N "(cached) $ECHO_C" >&6
19947 else
19948   cat >conftest.$ac_ext <<_ACEOF
19949 /* confdefs.h.  */
19950 _ACEOF
19951 cat confdefs.h >>conftest.$ac_ext
19952 cat >>conftest.$ac_ext <<_ACEOF
19953 /* end confdefs.h.  */
19954 $ac_includes_default
19955 typedef unsigned long ac__type_new_;
19956 int
19957 main ()
19958 {
19959 if ((ac__type_new_ *) 0)
19960   return 0;
19961 if (sizeof (ac__type_new_))
19962   return 0;
19963   ;
19964   return 0;
19965 }
19966 _ACEOF
19967 rm -f conftest.$ac_objext
19968 if { (ac_try="$ac_compile"
19969 case "(($ac_try" in
19970   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19971   *) ac_try_echo=$ac_try;;
19972 esac
19973 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19974   (eval "$ac_compile") 2>conftest.er1
19975   ac_status=$?
19976   grep -v '^ *+' conftest.er1 >conftest.err
19977   rm -f conftest.er1
19978   cat conftest.err >&5
19979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19980   (exit $ac_status); } && {
19981          test -z "$ac_c_werror_flag" ||
19982          test ! -s conftest.err
19983        } && test -s conftest.$ac_objext; then
19984   ac_cv_type_unsigned_long=yes
19985 else
19986   echo "$as_me: failed program was:" >&5
19987 sed 's/^/| /' conftest.$ac_ext >&5
19988
19989         ac_cv_type_unsigned_long=no
19990 fi
19991
19992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19993 fi
19994 { echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
19995 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6; }
19996
19997 # The cast to long int works around a bug in the HP C Compiler
19998 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19999 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
20000 # This bug is HP SR number 8606223364.
20001 { echo "$as_me:$LINENO: checking size of unsigned long" >&5
20002 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6; }
20003 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
20004   echo $ECHO_N "(cached) $ECHO_C" >&6
20005 else
20006   if test "$cross_compiling" = yes; then
20007   # Depending upon the size, compute the lo and hi bounds.
20008 cat >conftest.$ac_ext <<_ACEOF
20009 /* confdefs.h.  */
20010 _ACEOF
20011 cat confdefs.h >>conftest.$ac_ext
20012 cat >>conftest.$ac_ext <<_ACEOF
20013 /* end confdefs.h.  */
20014 $ac_includes_default
20015    typedef unsigned long ac__type_sizeof_;
20016 int
20017 main ()
20018 {
20019 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
20020 test_array [0] = 0
20021
20022   ;
20023   return 0;
20024 }
20025 _ACEOF
20026 rm -f conftest.$ac_objext
20027 if { (ac_try="$ac_compile"
20028 case "(($ac_try" in
20029   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20030   *) ac_try_echo=$ac_try;;
20031 esac
20032 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20033   (eval "$ac_compile") 2>conftest.er1
20034   ac_status=$?
20035   grep -v '^ *+' conftest.er1 >conftest.err
20036   rm -f conftest.er1
20037   cat conftest.err >&5
20038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20039   (exit $ac_status); } && {
20040          test -z "$ac_c_werror_flag" ||
20041          test ! -s conftest.err
20042        } && test -s conftest.$ac_objext; then
20043   ac_lo=0 ac_mid=0
20044   while :; do
20045     cat >conftest.$ac_ext <<_ACEOF
20046 /* confdefs.h.  */
20047 _ACEOF
20048 cat confdefs.h >>conftest.$ac_ext
20049 cat >>conftest.$ac_ext <<_ACEOF
20050 /* end confdefs.h.  */
20051 $ac_includes_default
20052    typedef unsigned long ac__type_sizeof_;
20053 int
20054 main ()
20055 {
20056 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
20057 test_array [0] = 0
20058
20059   ;
20060   return 0;
20061 }
20062 _ACEOF
20063 rm -f conftest.$ac_objext
20064 if { (ac_try="$ac_compile"
20065 case "(($ac_try" in
20066   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20067   *) ac_try_echo=$ac_try;;
20068 esac
20069 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20070   (eval "$ac_compile") 2>conftest.er1
20071   ac_status=$?
20072   grep -v '^ *+' conftest.er1 >conftest.err
20073   rm -f conftest.er1
20074   cat conftest.err >&5
20075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20076   (exit $ac_status); } && {
20077          test -z "$ac_c_werror_flag" ||
20078          test ! -s conftest.err
20079        } && test -s conftest.$ac_objext; then
20080   ac_hi=$ac_mid; break
20081 else
20082   echo "$as_me: failed program was:" >&5
20083 sed 's/^/| /' conftest.$ac_ext >&5
20084
20085         ac_lo=`expr $ac_mid + 1`
20086                         if test $ac_lo -le $ac_mid; then
20087                           ac_lo= ac_hi=
20088                           break
20089                         fi
20090                         ac_mid=`expr 2 '*' $ac_mid + 1`
20091 fi
20092
20093 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20094   done
20095 else
20096   echo "$as_me: failed program was:" >&5
20097 sed 's/^/| /' conftest.$ac_ext >&5
20098
20099         cat >conftest.$ac_ext <<_ACEOF
20100 /* confdefs.h.  */
20101 _ACEOF
20102 cat confdefs.h >>conftest.$ac_ext
20103 cat >>conftest.$ac_ext <<_ACEOF
20104 /* end confdefs.h.  */
20105 $ac_includes_default
20106    typedef unsigned long ac__type_sizeof_;
20107 int
20108 main ()
20109 {
20110 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
20111 test_array [0] = 0
20112
20113   ;
20114   return 0;
20115 }
20116 _ACEOF
20117 rm -f conftest.$ac_objext
20118 if { (ac_try="$ac_compile"
20119 case "(($ac_try" in
20120   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20121   *) ac_try_echo=$ac_try;;
20122 esac
20123 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20124   (eval "$ac_compile") 2>conftest.er1
20125   ac_status=$?
20126   grep -v '^ *+' conftest.er1 >conftest.err
20127   rm -f conftest.er1
20128   cat conftest.err >&5
20129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20130   (exit $ac_status); } && {
20131          test -z "$ac_c_werror_flag" ||
20132          test ! -s conftest.err
20133        } && test -s conftest.$ac_objext; then
20134   ac_hi=-1 ac_mid=-1
20135   while :; do
20136     cat >conftest.$ac_ext <<_ACEOF
20137 /* confdefs.h.  */
20138 _ACEOF
20139 cat confdefs.h >>conftest.$ac_ext
20140 cat >>conftest.$ac_ext <<_ACEOF
20141 /* end confdefs.h.  */
20142 $ac_includes_default
20143    typedef unsigned long ac__type_sizeof_;
20144 int
20145 main ()
20146 {
20147 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
20148 test_array [0] = 0
20149
20150   ;
20151   return 0;
20152 }
20153 _ACEOF
20154 rm -f conftest.$ac_objext
20155 if { (ac_try="$ac_compile"
20156 case "(($ac_try" in
20157   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20158   *) ac_try_echo=$ac_try;;
20159 esac
20160 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20161   (eval "$ac_compile") 2>conftest.er1
20162   ac_status=$?
20163   grep -v '^ *+' conftest.er1 >conftest.err
20164   rm -f conftest.er1
20165   cat conftest.err >&5
20166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20167   (exit $ac_status); } && {
20168          test -z "$ac_c_werror_flag" ||
20169          test ! -s conftest.err
20170        } && test -s conftest.$ac_objext; then
20171   ac_lo=$ac_mid; break
20172 else
20173   echo "$as_me: failed program was:" >&5
20174 sed 's/^/| /' conftest.$ac_ext >&5
20175
20176         ac_hi=`expr '(' $ac_mid ')' - 1`
20177                         if test $ac_mid -le $ac_hi; then
20178                           ac_lo= ac_hi=
20179                           break
20180                         fi
20181                         ac_mid=`expr 2 '*' $ac_mid`
20182 fi
20183
20184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20185   done
20186 else
20187   echo "$as_me: failed program was:" >&5
20188 sed 's/^/| /' conftest.$ac_ext >&5
20189
20190         ac_lo= ac_hi=
20191 fi
20192
20193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20194 fi
20195
20196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20197 # Binary search between lo and hi bounds.
20198 while test "x$ac_lo" != "x$ac_hi"; do
20199   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20200   cat >conftest.$ac_ext <<_ACEOF
20201 /* confdefs.h.  */
20202 _ACEOF
20203 cat confdefs.h >>conftest.$ac_ext
20204 cat >>conftest.$ac_ext <<_ACEOF
20205 /* end confdefs.h.  */
20206 $ac_includes_default
20207    typedef unsigned long ac__type_sizeof_;
20208 int
20209 main ()
20210 {
20211 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
20212 test_array [0] = 0
20213
20214   ;
20215   return 0;
20216 }
20217 _ACEOF
20218 rm -f conftest.$ac_objext
20219 if { (ac_try="$ac_compile"
20220 case "(($ac_try" in
20221   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20222   *) ac_try_echo=$ac_try;;
20223 esac
20224 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20225   (eval "$ac_compile") 2>conftest.er1
20226   ac_status=$?
20227   grep -v '^ *+' conftest.er1 >conftest.err
20228   rm -f conftest.er1
20229   cat conftest.err >&5
20230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20231   (exit $ac_status); } && {
20232          test -z "$ac_c_werror_flag" ||
20233          test ! -s conftest.err
20234        } && test -s conftest.$ac_objext; then
20235   ac_hi=$ac_mid
20236 else
20237   echo "$as_me: failed program was:" >&5
20238 sed 's/^/| /' conftest.$ac_ext >&5
20239
20240         ac_lo=`expr '(' $ac_mid ')' + 1`
20241 fi
20242
20243 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20244 done
20245 case $ac_lo in
20246 ?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
20247 '') if test "$ac_cv_type_unsigned_long" = yes; then
20248      { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long)
20249 See \`config.log' for more details." >&5
20250 echo "$as_me: error: cannot compute sizeof (unsigned long)
20251 See \`config.log' for more details." >&2;}
20252    { (exit 77); exit 77; }; }
20253    else
20254      ac_cv_sizeof_unsigned_long=0
20255    fi ;;
20256 esac
20257 else
20258   cat >conftest.$ac_ext <<_ACEOF
20259 /* confdefs.h.  */
20260 _ACEOF
20261 cat confdefs.h >>conftest.$ac_ext
20262 cat >>conftest.$ac_ext <<_ACEOF
20263 /* end confdefs.h.  */
20264 $ac_includes_default
20265    typedef unsigned long ac__type_sizeof_;
20266 static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
20267 static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
20268 #include <stdio.h>
20269 #include <stdlib.h>
20270 int
20271 main ()
20272 {
20273
20274   FILE *f = fopen ("conftest.val", "w");
20275   if (! f)
20276     return 1;
20277   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
20278     {
20279       long int i = longval ();
20280       if (i != ((long int) (sizeof (ac__type_sizeof_))))
20281         return 1;
20282       fprintf (f, "%ld\n", i);
20283     }
20284   else
20285     {
20286       unsigned long int i = ulongval ();
20287       if (i != ((long int) (sizeof (ac__type_sizeof_))))
20288         return 1;
20289       fprintf (f, "%lu\n", i);
20290     }
20291   return ferror (f) || fclose (f) != 0;
20292
20293   ;
20294   return 0;
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   ac_cv_sizeof_unsigned_long=`cat conftest.val`
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 ( exit $ac_status )
20324 if test "$ac_cv_type_unsigned_long" = yes; then
20325      { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long)
20326 See \`config.log' for more details." >&5
20327 echo "$as_me: error: cannot compute sizeof (unsigned long)
20328 See \`config.log' for more details." >&2;}
20329    { (exit 77); exit 77; }; }
20330    else
20331      ac_cv_sizeof_unsigned_long=0
20332    fi
20333 fi
20334 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20335 fi
20336 rm -f conftest.val
20337 fi
20338 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
20339 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6; }
20340
20341
20342
20343 cat >>confdefs.h <<_ACEOF
20344 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
20345 _ACEOF
20346
20347
20348
20349 # And one for the size of size_t (enables tweaks for > 32bit address space)
20350 { echo "$as_me:$LINENO: checking for size_t" >&5
20351 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
20352 if test "${ac_cv_type_size_t+set}" = set; then
20353   echo $ECHO_N "(cached) $ECHO_C" >&6
20354 else
20355   cat >conftest.$ac_ext <<_ACEOF
20356 /* confdefs.h.  */
20357 _ACEOF
20358 cat confdefs.h >>conftest.$ac_ext
20359 cat >>conftest.$ac_ext <<_ACEOF
20360 /* end confdefs.h.  */
20361 $ac_includes_default
20362 typedef size_t ac__type_new_;
20363 int
20364 main ()
20365 {
20366 if ((ac__type_new_ *) 0)
20367   return 0;
20368 if (sizeof (ac__type_new_))
20369   return 0;
20370   ;
20371   return 0;
20372 }
20373 _ACEOF
20374 rm -f conftest.$ac_objext
20375 if { (ac_try="$ac_compile"
20376 case "(($ac_try" in
20377   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20378   *) ac_try_echo=$ac_try;;
20379 esac
20380 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20381   (eval "$ac_compile") 2>conftest.er1
20382   ac_status=$?
20383   grep -v '^ *+' conftest.er1 >conftest.err
20384   rm -f conftest.er1
20385   cat conftest.err >&5
20386   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20387   (exit $ac_status); } && {
20388          test -z "$ac_c_werror_flag" ||
20389          test ! -s conftest.err
20390        } && test -s conftest.$ac_objext; then
20391   ac_cv_type_size_t=yes
20392 else
20393   echo "$as_me: failed program was:" >&5
20394 sed 's/^/| /' conftest.$ac_ext >&5
20395
20396         ac_cv_type_size_t=no
20397 fi
20398
20399 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20400 fi
20401 { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
20402 echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
20403
20404 # The cast to long int works around a bug in the HP C Compiler
20405 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
20406 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
20407 # This bug is HP SR number 8606223364.
20408 { echo "$as_me:$LINENO: checking size of size_t" >&5
20409 echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
20410 if test "${ac_cv_sizeof_size_t+set}" = set; then
20411   echo $ECHO_N "(cached) $ECHO_C" >&6
20412 else
20413   if test "$cross_compiling" = yes; then
20414   # Depending upon the size, compute the lo and hi bounds.
20415 cat >conftest.$ac_ext <<_ACEOF
20416 /* confdefs.h.  */
20417 _ACEOF
20418 cat confdefs.h >>conftest.$ac_ext
20419 cat >>conftest.$ac_ext <<_ACEOF
20420 /* end confdefs.h.  */
20421 $ac_includes_default
20422    typedef size_t ac__type_sizeof_;
20423 int
20424 main ()
20425 {
20426 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
20427 test_array [0] = 0
20428
20429   ;
20430   return 0;
20431 }
20432 _ACEOF
20433 rm -f conftest.$ac_objext
20434 if { (ac_try="$ac_compile"
20435 case "(($ac_try" in
20436   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20437   *) ac_try_echo=$ac_try;;
20438 esac
20439 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20440   (eval "$ac_compile") 2>conftest.er1
20441   ac_status=$?
20442   grep -v '^ *+' conftest.er1 >conftest.err
20443   rm -f conftest.er1
20444   cat conftest.err >&5
20445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20446   (exit $ac_status); } && {
20447          test -z "$ac_c_werror_flag" ||
20448          test ! -s conftest.err
20449        } && test -s conftest.$ac_objext; then
20450   ac_lo=0 ac_mid=0
20451   while :; do
20452     cat >conftest.$ac_ext <<_ACEOF
20453 /* confdefs.h.  */
20454 _ACEOF
20455 cat confdefs.h >>conftest.$ac_ext
20456 cat >>conftest.$ac_ext <<_ACEOF
20457 /* end confdefs.h.  */
20458 $ac_includes_default
20459    typedef size_t ac__type_sizeof_;
20460 int
20461 main ()
20462 {
20463 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
20464 test_array [0] = 0
20465
20466   ;
20467   return 0;
20468 }
20469 _ACEOF
20470 rm -f conftest.$ac_objext
20471 if { (ac_try="$ac_compile"
20472 case "(($ac_try" in
20473   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20474   *) ac_try_echo=$ac_try;;
20475 esac
20476 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20477   (eval "$ac_compile") 2>conftest.er1
20478   ac_status=$?
20479   grep -v '^ *+' conftest.er1 >conftest.err
20480   rm -f conftest.er1
20481   cat conftest.err >&5
20482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20483   (exit $ac_status); } && {
20484          test -z "$ac_c_werror_flag" ||
20485          test ! -s conftest.err
20486        } && test -s conftest.$ac_objext; then
20487   ac_hi=$ac_mid; break
20488 else
20489   echo "$as_me: failed program was:" >&5
20490 sed 's/^/| /' conftest.$ac_ext >&5
20491
20492         ac_lo=`expr $ac_mid + 1`
20493                         if test $ac_lo -le $ac_mid; then
20494                           ac_lo= ac_hi=
20495                           break
20496                         fi
20497                         ac_mid=`expr 2 '*' $ac_mid + 1`
20498 fi
20499
20500 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20501   done
20502 else
20503   echo "$as_me: failed program was:" >&5
20504 sed 's/^/| /' conftest.$ac_ext >&5
20505
20506         cat >conftest.$ac_ext <<_ACEOF
20507 /* confdefs.h.  */
20508 _ACEOF
20509 cat confdefs.h >>conftest.$ac_ext
20510 cat >>conftest.$ac_ext <<_ACEOF
20511 /* end confdefs.h.  */
20512 $ac_includes_default
20513    typedef size_t ac__type_sizeof_;
20514 int
20515 main ()
20516 {
20517 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
20518 test_array [0] = 0
20519
20520   ;
20521   return 0;
20522 }
20523 _ACEOF
20524 rm -f conftest.$ac_objext
20525 if { (ac_try="$ac_compile"
20526 case "(($ac_try" in
20527   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20528   *) ac_try_echo=$ac_try;;
20529 esac
20530 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20531   (eval "$ac_compile") 2>conftest.er1
20532   ac_status=$?
20533   grep -v '^ *+' conftest.er1 >conftest.err
20534   rm -f conftest.er1
20535   cat conftest.err >&5
20536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20537   (exit $ac_status); } && {
20538          test -z "$ac_c_werror_flag" ||
20539          test ! -s conftest.err
20540        } && test -s conftest.$ac_objext; then
20541   ac_hi=-1 ac_mid=-1
20542   while :; do
20543     cat >conftest.$ac_ext <<_ACEOF
20544 /* confdefs.h.  */
20545 _ACEOF
20546 cat confdefs.h >>conftest.$ac_ext
20547 cat >>conftest.$ac_ext <<_ACEOF
20548 /* end confdefs.h.  */
20549 $ac_includes_default
20550    typedef size_t ac__type_sizeof_;
20551 int
20552 main ()
20553 {
20554 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
20555 test_array [0] = 0
20556
20557   ;
20558   return 0;
20559 }
20560 _ACEOF
20561 rm -f conftest.$ac_objext
20562 if { (ac_try="$ac_compile"
20563 case "(($ac_try" in
20564   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20565   *) ac_try_echo=$ac_try;;
20566 esac
20567 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20568   (eval "$ac_compile") 2>conftest.er1
20569   ac_status=$?
20570   grep -v '^ *+' conftest.er1 >conftest.err
20571   rm -f conftest.er1
20572   cat conftest.err >&5
20573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20574   (exit $ac_status); } && {
20575          test -z "$ac_c_werror_flag" ||
20576          test ! -s conftest.err
20577        } && test -s conftest.$ac_objext; then
20578   ac_lo=$ac_mid; break
20579 else
20580   echo "$as_me: failed program was:" >&5
20581 sed 's/^/| /' conftest.$ac_ext >&5
20582
20583         ac_hi=`expr '(' $ac_mid ')' - 1`
20584                         if test $ac_mid -le $ac_hi; then
20585                           ac_lo= ac_hi=
20586                           break
20587                         fi
20588                         ac_mid=`expr 2 '*' $ac_mid`
20589 fi
20590
20591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20592   done
20593 else
20594   echo "$as_me: failed program was:" >&5
20595 sed 's/^/| /' conftest.$ac_ext >&5
20596
20597         ac_lo= ac_hi=
20598 fi
20599
20600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20601 fi
20602
20603 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20604 # Binary search between lo and hi bounds.
20605 while test "x$ac_lo" != "x$ac_hi"; do
20606   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20607   cat >conftest.$ac_ext <<_ACEOF
20608 /* confdefs.h.  */
20609 _ACEOF
20610 cat confdefs.h >>conftest.$ac_ext
20611 cat >>conftest.$ac_ext <<_ACEOF
20612 /* end confdefs.h.  */
20613 $ac_includes_default
20614    typedef size_t ac__type_sizeof_;
20615 int
20616 main ()
20617 {
20618 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
20619 test_array [0] = 0
20620
20621   ;
20622   return 0;
20623 }
20624 _ACEOF
20625 rm -f conftest.$ac_objext
20626 if { (ac_try="$ac_compile"
20627 case "(($ac_try" in
20628   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20629   *) ac_try_echo=$ac_try;;
20630 esac
20631 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20632   (eval "$ac_compile") 2>conftest.er1
20633   ac_status=$?
20634   grep -v '^ *+' conftest.er1 >conftest.err
20635   rm -f conftest.er1
20636   cat conftest.err >&5
20637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20638   (exit $ac_status); } && {
20639          test -z "$ac_c_werror_flag" ||
20640          test ! -s conftest.err
20641        } && test -s conftest.$ac_objext; then
20642   ac_hi=$ac_mid
20643 else
20644   echo "$as_me: failed program was:" >&5
20645 sed 's/^/| /' conftest.$ac_ext >&5
20646
20647         ac_lo=`expr '(' $ac_mid ')' + 1`
20648 fi
20649
20650 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20651 done
20652 case $ac_lo in
20653 ?*) ac_cv_sizeof_size_t=$ac_lo;;
20654 '') if test "$ac_cv_type_size_t" = yes; then
20655      { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
20656 See \`config.log' for more details." >&5
20657 echo "$as_me: error: cannot compute sizeof (size_t)
20658 See \`config.log' for more details." >&2;}
20659    { (exit 77); exit 77; }; }
20660    else
20661      ac_cv_sizeof_size_t=0
20662    fi ;;
20663 esac
20664 else
20665   cat >conftest.$ac_ext <<_ACEOF
20666 /* confdefs.h.  */
20667 _ACEOF
20668 cat confdefs.h >>conftest.$ac_ext
20669 cat >>conftest.$ac_ext <<_ACEOF
20670 /* end confdefs.h.  */
20671 $ac_includes_default
20672    typedef size_t ac__type_sizeof_;
20673 static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
20674 static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
20675 #include <stdio.h>
20676 #include <stdlib.h>
20677 int
20678 main ()
20679 {
20680
20681   FILE *f = fopen ("conftest.val", "w");
20682   if (! f)
20683     return 1;
20684   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
20685     {
20686       long int i = longval ();
20687       if (i != ((long int) (sizeof (ac__type_sizeof_))))
20688         return 1;
20689       fprintf (f, "%ld\n", i);
20690     }
20691   else
20692     {
20693       unsigned long int i = ulongval ();
20694       if (i != ((long int) (sizeof (ac__type_sizeof_))))
20695         return 1;
20696       fprintf (f, "%lu\n", i);
20697     }
20698   return ferror (f) || fclose (f) != 0;
20699
20700   ;
20701   return 0;
20702 }
20703 _ACEOF
20704 rm -f conftest$ac_exeext
20705 if { (ac_try="$ac_link"
20706 case "(($ac_try" in
20707   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20708   *) ac_try_echo=$ac_try;;
20709 esac
20710 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20711   (eval "$ac_link") 2>&5
20712   ac_status=$?
20713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20714   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20715   { (case "(($ac_try" in
20716   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20717   *) ac_try_echo=$ac_try;;
20718 esac
20719 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20720   (eval "$ac_try") 2>&5
20721   ac_status=$?
20722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20723   (exit $ac_status); }; }; then
20724   ac_cv_sizeof_size_t=`cat conftest.val`
20725 else
20726   echo "$as_me: program exited with status $ac_status" >&5
20727 echo "$as_me: failed program was:" >&5
20728 sed 's/^/| /' conftest.$ac_ext >&5
20729
20730 ( exit $ac_status )
20731 if test "$ac_cv_type_size_t" = yes; then
20732      { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
20733 See \`config.log' for more details." >&5
20734 echo "$as_me: error: cannot compute sizeof (size_t)
20735 See \`config.log' for more details." >&2;}
20736    { (exit 77); exit 77; }; }
20737    else
20738      ac_cv_sizeof_size_t=0
20739    fi
20740 fi
20741 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20742 fi
20743 rm -f conftest.val
20744 fi
20745 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
20746 echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
20747
20748
20749
20750 cat >>confdefs.h <<_ACEOF
20751 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
20752 _ACEOF
20753
20754
20755
20756 # Determine memory alignment requirements for the basic C data types.
20757
20758 { echo "$as_me:$LINENO: checking for short" >&5
20759 echo $ECHO_N "checking for short... $ECHO_C" >&6; }
20760 if test "${ac_cv_type_short+set}" = set; then
20761   echo $ECHO_N "(cached) $ECHO_C" >&6
20762 else
20763   cat >conftest.$ac_ext <<_ACEOF
20764 /* confdefs.h.  */
20765 _ACEOF
20766 cat confdefs.h >>conftest.$ac_ext
20767 cat >>conftest.$ac_ext <<_ACEOF
20768 /* end confdefs.h.  */
20769 $ac_includes_default
20770 typedef short ac__type_new_;
20771 int
20772 main ()
20773 {
20774 if ((ac__type_new_ *) 0)
20775   return 0;
20776 if (sizeof (ac__type_new_))
20777   return 0;
20778   ;
20779   return 0;
20780 }
20781 _ACEOF
20782 rm -f conftest.$ac_objext
20783 if { (ac_try="$ac_compile"
20784 case "(($ac_try" in
20785   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20786   *) ac_try_echo=$ac_try;;
20787 esac
20788 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20789   (eval "$ac_compile") 2>conftest.er1
20790   ac_status=$?
20791   grep -v '^ *+' conftest.er1 >conftest.err
20792   rm -f conftest.er1
20793   cat conftest.err >&5
20794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20795   (exit $ac_status); } && {
20796          test -z "$ac_c_werror_flag" ||
20797          test ! -s conftest.err
20798        } && test -s conftest.$ac_objext; then
20799   ac_cv_type_short=yes
20800 else
20801   echo "$as_me: failed program was:" >&5
20802 sed 's/^/| /' conftest.$ac_ext >&5
20803
20804         ac_cv_type_short=no
20805 fi
20806
20807 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20808 fi
20809 { echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
20810 echo "${ECHO_T}$ac_cv_type_short" >&6; }
20811
20812 # The cast to long int works around a bug in the HP C Compiler,
20813 # see AC_CHECK_SIZEOF for more information.
20814 { echo "$as_me:$LINENO: checking alignment of short" >&5
20815 echo $ECHO_N "checking alignment of short... $ECHO_C" >&6; }
20816 if test "${ac_cv_alignof_short+set}" = set; then
20817   echo $ECHO_N "(cached) $ECHO_C" >&6
20818 else
20819   if test "$cross_compiling" = yes; then
20820   # Depending upon the size, compute the lo and hi bounds.
20821 cat >conftest.$ac_ext <<_ACEOF
20822 /* confdefs.h.  */
20823 _ACEOF
20824 cat confdefs.h >>conftest.$ac_ext
20825 cat >>conftest.$ac_ext <<_ACEOF
20826 /* end confdefs.h.  */
20827 $ac_includes_default
20828 #ifndef offsetof
20829 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
20830 #endif
20831 typedef struct { char x; short y; } ac__type_alignof_;
20832 int
20833 main ()
20834 {
20835 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
20836 test_array [0] = 0
20837
20838   ;
20839   return 0;
20840 }
20841 _ACEOF
20842 rm -f conftest.$ac_objext
20843 if { (ac_try="$ac_compile"
20844 case "(($ac_try" in
20845   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20846   *) ac_try_echo=$ac_try;;
20847 esac
20848 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20849   (eval "$ac_compile") 2>conftest.er1
20850   ac_status=$?
20851   grep -v '^ *+' conftest.er1 >conftest.err
20852   rm -f conftest.er1
20853   cat conftest.err >&5
20854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20855   (exit $ac_status); } && {
20856          test -z "$ac_c_werror_flag" ||
20857          test ! -s conftest.err
20858        } && test -s conftest.$ac_objext; then
20859   ac_lo=0 ac_mid=0
20860   while :; do
20861     cat >conftest.$ac_ext <<_ACEOF
20862 /* confdefs.h.  */
20863 _ACEOF
20864 cat confdefs.h >>conftest.$ac_ext
20865 cat >>conftest.$ac_ext <<_ACEOF
20866 /* end confdefs.h.  */
20867 $ac_includes_default
20868 #ifndef offsetof
20869 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
20870 #endif
20871 typedef struct { char x; short y; } ac__type_alignof_;
20872 int
20873 main ()
20874 {
20875 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
20876 test_array [0] = 0
20877
20878   ;
20879   return 0;
20880 }
20881 _ACEOF
20882 rm -f conftest.$ac_objext
20883 if { (ac_try="$ac_compile"
20884 case "(($ac_try" in
20885   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20886   *) ac_try_echo=$ac_try;;
20887 esac
20888 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20889   (eval "$ac_compile") 2>conftest.er1
20890   ac_status=$?
20891   grep -v '^ *+' conftest.er1 >conftest.err
20892   rm -f conftest.er1
20893   cat conftest.err >&5
20894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20895   (exit $ac_status); } && {
20896          test -z "$ac_c_werror_flag" ||
20897          test ! -s conftest.err
20898        } && test -s conftest.$ac_objext; then
20899   ac_hi=$ac_mid; break
20900 else
20901   echo "$as_me: failed program was:" >&5
20902 sed 's/^/| /' conftest.$ac_ext >&5
20903
20904         ac_lo=`expr $ac_mid + 1`
20905                         if test $ac_lo -le $ac_mid; then
20906                           ac_lo= ac_hi=
20907                           break
20908                         fi
20909                         ac_mid=`expr 2 '*' $ac_mid + 1`
20910 fi
20911
20912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20913   done
20914 else
20915   echo "$as_me: failed program was:" >&5
20916 sed 's/^/| /' conftest.$ac_ext >&5
20917
20918         cat >conftest.$ac_ext <<_ACEOF
20919 /* confdefs.h.  */
20920 _ACEOF
20921 cat confdefs.h >>conftest.$ac_ext
20922 cat >>conftest.$ac_ext <<_ACEOF
20923 /* end confdefs.h.  */
20924 $ac_includes_default
20925 #ifndef offsetof
20926 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
20927 #endif
20928 typedef struct { char x; short y; } ac__type_alignof_;
20929 int
20930 main ()
20931 {
20932 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
20933 test_array [0] = 0
20934
20935   ;
20936   return 0;
20937 }
20938 _ACEOF
20939 rm -f conftest.$ac_objext
20940 if { (ac_try="$ac_compile"
20941 case "(($ac_try" in
20942   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20943   *) ac_try_echo=$ac_try;;
20944 esac
20945 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20946   (eval "$ac_compile") 2>conftest.er1
20947   ac_status=$?
20948   grep -v '^ *+' conftest.er1 >conftest.err
20949   rm -f conftest.er1
20950   cat conftest.err >&5
20951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20952   (exit $ac_status); } && {
20953          test -z "$ac_c_werror_flag" ||
20954          test ! -s conftest.err
20955        } && test -s conftest.$ac_objext; then
20956   ac_hi=-1 ac_mid=-1
20957   while :; do
20958     cat >conftest.$ac_ext <<_ACEOF
20959 /* confdefs.h.  */
20960 _ACEOF
20961 cat confdefs.h >>conftest.$ac_ext
20962 cat >>conftest.$ac_ext <<_ACEOF
20963 /* end confdefs.h.  */
20964 $ac_includes_default
20965 #ifndef offsetof
20966 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
20967 #endif
20968 typedef struct { char x; short y; } ac__type_alignof_;
20969 int
20970 main ()
20971 {
20972 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
20973 test_array [0] = 0
20974
20975   ;
20976   return 0;
20977 }
20978 _ACEOF
20979 rm -f conftest.$ac_objext
20980 if { (ac_try="$ac_compile"
20981 case "(($ac_try" in
20982   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20983   *) ac_try_echo=$ac_try;;
20984 esac
20985 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20986   (eval "$ac_compile") 2>conftest.er1
20987   ac_status=$?
20988   grep -v '^ *+' conftest.er1 >conftest.err
20989   rm -f conftest.er1
20990   cat conftest.err >&5
20991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20992   (exit $ac_status); } && {
20993          test -z "$ac_c_werror_flag" ||
20994          test ! -s conftest.err
20995        } && test -s conftest.$ac_objext; then
20996   ac_lo=$ac_mid; break
20997 else
20998   echo "$as_me: failed program was:" >&5
20999 sed 's/^/| /' conftest.$ac_ext >&5
21000
21001         ac_hi=`expr '(' $ac_mid ')' - 1`
21002                         if test $ac_mid -le $ac_hi; then
21003                           ac_lo= ac_hi=
21004                           break
21005                         fi
21006                         ac_mid=`expr 2 '*' $ac_mid`
21007 fi
21008
21009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21010   done
21011 else
21012   echo "$as_me: failed program was:" >&5
21013 sed 's/^/| /' conftest.$ac_ext >&5
21014
21015         ac_lo= ac_hi=
21016 fi
21017
21018 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21019 fi
21020
21021 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21022 # Binary search between lo and hi bounds.
21023 while test "x$ac_lo" != "x$ac_hi"; do
21024   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21025   cat >conftest.$ac_ext <<_ACEOF
21026 /* confdefs.h.  */
21027 _ACEOF
21028 cat confdefs.h >>conftest.$ac_ext
21029 cat >>conftest.$ac_ext <<_ACEOF
21030 /* end confdefs.h.  */
21031 $ac_includes_default
21032 #ifndef offsetof
21033 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21034 #endif
21035 typedef struct { char x; short y; } ac__type_alignof_;
21036 int
21037 main ()
21038 {
21039 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
21040 test_array [0] = 0
21041
21042   ;
21043   return 0;
21044 }
21045 _ACEOF
21046 rm -f conftest.$ac_objext
21047 if { (ac_try="$ac_compile"
21048 case "(($ac_try" in
21049   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21050   *) ac_try_echo=$ac_try;;
21051 esac
21052 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21053   (eval "$ac_compile") 2>conftest.er1
21054   ac_status=$?
21055   grep -v '^ *+' conftest.er1 >conftest.err
21056   rm -f conftest.er1
21057   cat conftest.err >&5
21058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21059   (exit $ac_status); } && {
21060          test -z "$ac_c_werror_flag" ||
21061          test ! -s conftest.err
21062        } && test -s conftest.$ac_objext; then
21063   ac_hi=$ac_mid
21064 else
21065   echo "$as_me: failed program was:" >&5
21066 sed 's/^/| /' conftest.$ac_ext >&5
21067
21068         ac_lo=`expr '(' $ac_mid ')' + 1`
21069 fi
21070
21071 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21072 done
21073 case $ac_lo in
21074 ?*) ac_cv_alignof_short=$ac_lo;;
21075 '') if test "$ac_cv_type_short" = yes; then
21076      { { echo "$as_me:$LINENO: error: cannot compute alignment of short
21077 See \`config.log' for more details." >&5
21078 echo "$as_me: error: cannot compute alignment of short
21079 See \`config.log' for more details." >&2;}
21080    { (exit 77); exit 77; }; }
21081    else
21082      ac_cv_alignof_short=0
21083    fi ;;
21084 esac
21085 else
21086   cat >conftest.$ac_ext <<_ACEOF
21087 /* confdefs.h.  */
21088 _ACEOF
21089 cat confdefs.h >>conftest.$ac_ext
21090 cat >>conftest.$ac_ext <<_ACEOF
21091 /* end confdefs.h.  */
21092 $ac_includes_default
21093 #ifndef offsetof
21094 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21095 #endif
21096 typedef struct { char x; short y; } ac__type_alignof_;
21097 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
21098 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
21099 #include <stdio.h>
21100 #include <stdlib.h>
21101 int
21102 main ()
21103 {
21104
21105   FILE *f = fopen ("conftest.val", "w");
21106   if (! f)
21107     return 1;
21108   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
21109     {
21110       long int i = longval ();
21111       if (i != ((long int) offsetof (ac__type_alignof_, y)))
21112         return 1;
21113       fprintf (f, "%ld\n", i);
21114     }
21115   else
21116     {
21117       unsigned long int i = ulongval ();
21118       if (i != ((long int) offsetof (ac__type_alignof_, y)))
21119         return 1;
21120       fprintf (f, "%lu\n", i);
21121     }
21122   return ferror (f) || fclose (f) != 0;
21123
21124   ;
21125   return 0;
21126 }
21127 _ACEOF
21128 rm -f conftest$ac_exeext
21129 if { (ac_try="$ac_link"
21130 case "(($ac_try" in
21131   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21132   *) ac_try_echo=$ac_try;;
21133 esac
21134 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21135   (eval "$ac_link") 2>&5
21136   ac_status=$?
21137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21138   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21139   { (case "(($ac_try" in
21140   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21141   *) ac_try_echo=$ac_try;;
21142 esac
21143 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21144   (eval "$ac_try") 2>&5
21145   ac_status=$?
21146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21147   (exit $ac_status); }; }; then
21148   ac_cv_alignof_short=`cat conftest.val`
21149 else
21150   echo "$as_me: program exited with status $ac_status" >&5
21151 echo "$as_me: failed program was:" >&5
21152 sed 's/^/| /' conftest.$ac_ext >&5
21153
21154 ( exit $ac_status )
21155 if test "$ac_cv_type_short" = yes; then
21156      { { echo "$as_me:$LINENO: error: cannot compute alignment of short
21157 See \`config.log' for more details." >&5
21158 echo "$as_me: error: cannot compute alignment of short
21159 See \`config.log' for more details." >&2;}
21160    { (exit 77); exit 77; }; }
21161    else
21162      ac_cv_alignof_short=0
21163    fi
21164 fi
21165 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21166 fi
21167 rm -f conftest.val
21168 fi
21169 { echo "$as_me:$LINENO: result: $ac_cv_alignof_short" >&5
21170 echo "${ECHO_T}$ac_cv_alignof_short" >&6; }
21171
21172
21173
21174 cat >>confdefs.h <<_ACEOF
21175 #define ALIGNOF_SHORT $ac_cv_alignof_short
21176 _ACEOF
21177
21178
21179 { echo "$as_me:$LINENO: checking for int" >&5
21180 echo $ECHO_N "checking for int... $ECHO_C" >&6; }
21181 if test "${ac_cv_type_int+set}" = set; then
21182   echo $ECHO_N "(cached) $ECHO_C" >&6
21183 else
21184   cat >conftest.$ac_ext <<_ACEOF
21185 /* confdefs.h.  */
21186 _ACEOF
21187 cat confdefs.h >>conftest.$ac_ext
21188 cat >>conftest.$ac_ext <<_ACEOF
21189 /* end confdefs.h.  */
21190 $ac_includes_default
21191 typedef int ac__type_new_;
21192 int
21193 main ()
21194 {
21195 if ((ac__type_new_ *) 0)
21196   return 0;
21197 if (sizeof (ac__type_new_))
21198   return 0;
21199   ;
21200   return 0;
21201 }
21202 _ACEOF
21203 rm -f conftest.$ac_objext
21204 if { (ac_try="$ac_compile"
21205 case "(($ac_try" in
21206   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21207   *) ac_try_echo=$ac_try;;
21208 esac
21209 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21210   (eval "$ac_compile") 2>conftest.er1
21211   ac_status=$?
21212   grep -v '^ *+' conftest.er1 >conftest.err
21213   rm -f conftest.er1
21214   cat conftest.err >&5
21215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21216   (exit $ac_status); } && {
21217          test -z "$ac_c_werror_flag" ||
21218          test ! -s conftest.err
21219        } && test -s conftest.$ac_objext; then
21220   ac_cv_type_int=yes
21221 else
21222   echo "$as_me: failed program was:" >&5
21223 sed 's/^/| /' conftest.$ac_ext >&5
21224
21225         ac_cv_type_int=no
21226 fi
21227
21228 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21229 fi
21230 { echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
21231 echo "${ECHO_T}$ac_cv_type_int" >&6; }
21232
21233 # The cast to long int works around a bug in the HP C Compiler,
21234 # see AC_CHECK_SIZEOF for more information.
21235 { echo "$as_me:$LINENO: checking alignment of int" >&5
21236 echo $ECHO_N "checking alignment of int... $ECHO_C" >&6; }
21237 if test "${ac_cv_alignof_int+set}" = set; then
21238   echo $ECHO_N "(cached) $ECHO_C" >&6
21239 else
21240   if test "$cross_compiling" = yes; then
21241   # Depending upon the size, compute the lo and hi bounds.
21242 cat >conftest.$ac_ext <<_ACEOF
21243 /* confdefs.h.  */
21244 _ACEOF
21245 cat confdefs.h >>conftest.$ac_ext
21246 cat >>conftest.$ac_ext <<_ACEOF
21247 /* end confdefs.h.  */
21248 $ac_includes_default
21249 #ifndef offsetof
21250 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21251 #endif
21252 typedef struct { char x; int y; } ac__type_alignof_;
21253 int
21254 main ()
21255 {
21256 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
21257 test_array [0] = 0
21258
21259   ;
21260   return 0;
21261 }
21262 _ACEOF
21263 rm -f conftest.$ac_objext
21264 if { (ac_try="$ac_compile"
21265 case "(($ac_try" in
21266   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21267   *) ac_try_echo=$ac_try;;
21268 esac
21269 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21270   (eval "$ac_compile") 2>conftest.er1
21271   ac_status=$?
21272   grep -v '^ *+' conftest.er1 >conftest.err
21273   rm -f conftest.er1
21274   cat conftest.err >&5
21275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21276   (exit $ac_status); } && {
21277          test -z "$ac_c_werror_flag" ||
21278          test ! -s conftest.err
21279        } && test -s conftest.$ac_objext; then
21280   ac_lo=0 ac_mid=0
21281   while :; do
21282     cat >conftest.$ac_ext <<_ACEOF
21283 /* confdefs.h.  */
21284 _ACEOF
21285 cat confdefs.h >>conftest.$ac_ext
21286 cat >>conftest.$ac_ext <<_ACEOF
21287 /* end confdefs.h.  */
21288 $ac_includes_default
21289 #ifndef offsetof
21290 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21291 #endif
21292 typedef struct { char x; int y; } ac__type_alignof_;
21293 int
21294 main ()
21295 {
21296 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
21297 test_array [0] = 0
21298
21299   ;
21300   return 0;
21301 }
21302 _ACEOF
21303 rm -f conftest.$ac_objext
21304 if { (ac_try="$ac_compile"
21305 case "(($ac_try" in
21306   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21307   *) ac_try_echo=$ac_try;;
21308 esac
21309 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21310   (eval "$ac_compile") 2>conftest.er1
21311   ac_status=$?
21312   grep -v '^ *+' conftest.er1 >conftest.err
21313   rm -f conftest.er1
21314   cat conftest.err >&5
21315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21316   (exit $ac_status); } && {
21317          test -z "$ac_c_werror_flag" ||
21318          test ! -s conftest.err
21319        } && test -s conftest.$ac_objext; then
21320   ac_hi=$ac_mid; break
21321 else
21322   echo "$as_me: failed program was:" >&5
21323 sed 's/^/| /' conftest.$ac_ext >&5
21324
21325         ac_lo=`expr $ac_mid + 1`
21326                         if test $ac_lo -le $ac_mid; then
21327                           ac_lo= ac_hi=
21328                           break
21329                         fi
21330                         ac_mid=`expr 2 '*' $ac_mid + 1`
21331 fi
21332
21333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21334   done
21335 else
21336   echo "$as_me: failed program was:" >&5
21337 sed 's/^/| /' conftest.$ac_ext >&5
21338
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 #ifndef offsetof
21347 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21348 #endif
21349 typedef struct { char x; int y; } ac__type_alignof_;
21350 int
21351 main ()
21352 {
21353 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
21354 test_array [0] = 0
21355
21356   ;
21357   return 0;
21358 }
21359 _ACEOF
21360 rm -f conftest.$ac_objext
21361 if { (ac_try="$ac_compile"
21362 case "(($ac_try" in
21363   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21364   *) ac_try_echo=$ac_try;;
21365 esac
21366 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21367   (eval "$ac_compile") 2>conftest.er1
21368   ac_status=$?
21369   grep -v '^ *+' conftest.er1 >conftest.err
21370   rm -f conftest.er1
21371   cat conftest.err >&5
21372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21373   (exit $ac_status); } && {
21374          test -z "$ac_c_werror_flag" ||
21375          test ! -s conftest.err
21376        } && test -s conftest.$ac_objext; then
21377   ac_hi=-1 ac_mid=-1
21378   while :; do
21379     cat >conftest.$ac_ext <<_ACEOF
21380 /* confdefs.h.  */
21381 _ACEOF
21382 cat confdefs.h >>conftest.$ac_ext
21383 cat >>conftest.$ac_ext <<_ACEOF
21384 /* end confdefs.h.  */
21385 $ac_includes_default
21386 #ifndef offsetof
21387 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21388 #endif
21389 typedef struct { char x; int y; } ac__type_alignof_;
21390 int
21391 main ()
21392 {
21393 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
21394 test_array [0] = 0
21395
21396   ;
21397   return 0;
21398 }
21399 _ACEOF
21400 rm -f conftest.$ac_objext
21401 if { (ac_try="$ac_compile"
21402 case "(($ac_try" in
21403   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21404   *) ac_try_echo=$ac_try;;
21405 esac
21406 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21407   (eval "$ac_compile") 2>conftest.er1
21408   ac_status=$?
21409   grep -v '^ *+' conftest.er1 >conftest.err
21410   rm -f conftest.er1
21411   cat conftest.err >&5
21412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21413   (exit $ac_status); } && {
21414          test -z "$ac_c_werror_flag" ||
21415          test ! -s conftest.err
21416        } && test -s conftest.$ac_objext; then
21417   ac_lo=$ac_mid; break
21418 else
21419   echo "$as_me: failed program was:" >&5
21420 sed 's/^/| /' conftest.$ac_ext >&5
21421
21422         ac_hi=`expr '(' $ac_mid ')' - 1`
21423                         if test $ac_mid -le $ac_hi; then
21424                           ac_lo= ac_hi=
21425                           break
21426                         fi
21427                         ac_mid=`expr 2 '*' $ac_mid`
21428 fi
21429
21430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21431   done
21432 else
21433   echo "$as_me: failed program was:" >&5
21434 sed 's/^/| /' conftest.$ac_ext >&5
21435
21436         ac_lo= ac_hi=
21437 fi
21438
21439 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21440 fi
21441
21442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21443 # Binary search between lo and hi bounds.
21444 while test "x$ac_lo" != "x$ac_hi"; do
21445   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21446   cat >conftest.$ac_ext <<_ACEOF
21447 /* confdefs.h.  */
21448 _ACEOF
21449 cat confdefs.h >>conftest.$ac_ext
21450 cat >>conftest.$ac_ext <<_ACEOF
21451 /* end confdefs.h.  */
21452 $ac_includes_default
21453 #ifndef offsetof
21454 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21455 #endif
21456 typedef struct { char x; int y; } ac__type_alignof_;
21457 int
21458 main ()
21459 {
21460 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
21461 test_array [0] = 0
21462
21463   ;
21464   return 0;
21465 }
21466 _ACEOF
21467 rm -f conftest.$ac_objext
21468 if { (ac_try="$ac_compile"
21469 case "(($ac_try" in
21470   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21471   *) ac_try_echo=$ac_try;;
21472 esac
21473 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21474   (eval "$ac_compile") 2>conftest.er1
21475   ac_status=$?
21476   grep -v '^ *+' conftest.er1 >conftest.err
21477   rm -f conftest.er1
21478   cat conftest.err >&5
21479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21480   (exit $ac_status); } && {
21481          test -z "$ac_c_werror_flag" ||
21482          test ! -s conftest.err
21483        } && test -s conftest.$ac_objext; then
21484   ac_hi=$ac_mid
21485 else
21486   echo "$as_me: failed program was:" >&5
21487 sed 's/^/| /' conftest.$ac_ext >&5
21488
21489         ac_lo=`expr '(' $ac_mid ')' + 1`
21490 fi
21491
21492 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21493 done
21494 case $ac_lo in
21495 ?*) ac_cv_alignof_int=$ac_lo;;
21496 '') if test "$ac_cv_type_int" = yes; then
21497      { { echo "$as_me:$LINENO: error: cannot compute alignment of int
21498 See \`config.log' for more details." >&5
21499 echo "$as_me: error: cannot compute alignment of int
21500 See \`config.log' for more details." >&2;}
21501    { (exit 77); exit 77; }; }
21502    else
21503      ac_cv_alignof_int=0
21504    fi ;;
21505 esac
21506 else
21507   cat >conftest.$ac_ext <<_ACEOF
21508 /* confdefs.h.  */
21509 _ACEOF
21510 cat confdefs.h >>conftest.$ac_ext
21511 cat >>conftest.$ac_ext <<_ACEOF
21512 /* end confdefs.h.  */
21513 $ac_includes_default
21514 #ifndef offsetof
21515 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21516 #endif
21517 typedef struct { char x; int y; } ac__type_alignof_;
21518 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
21519 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
21520 #include <stdio.h>
21521 #include <stdlib.h>
21522 int
21523 main ()
21524 {
21525
21526   FILE *f = fopen ("conftest.val", "w");
21527   if (! f)
21528     return 1;
21529   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
21530     {
21531       long int i = longval ();
21532       if (i != ((long int) offsetof (ac__type_alignof_, y)))
21533         return 1;
21534       fprintf (f, "%ld\n", i);
21535     }
21536   else
21537     {
21538       unsigned long int i = ulongval ();
21539       if (i != ((long int) offsetof (ac__type_alignof_, y)))
21540         return 1;
21541       fprintf (f, "%lu\n", i);
21542     }
21543   return ferror (f) || fclose (f) != 0;
21544
21545   ;
21546   return 0;
21547 }
21548 _ACEOF
21549 rm -f conftest$ac_exeext
21550 if { (ac_try="$ac_link"
21551 case "(($ac_try" in
21552   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21553   *) ac_try_echo=$ac_try;;
21554 esac
21555 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21556   (eval "$ac_link") 2>&5
21557   ac_status=$?
21558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21559   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21560   { (case "(($ac_try" in
21561   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21562   *) ac_try_echo=$ac_try;;
21563 esac
21564 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21565   (eval "$ac_try") 2>&5
21566   ac_status=$?
21567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21568   (exit $ac_status); }; }; then
21569   ac_cv_alignof_int=`cat conftest.val`
21570 else
21571   echo "$as_me: program exited with status $ac_status" >&5
21572 echo "$as_me: failed program was:" >&5
21573 sed 's/^/| /' conftest.$ac_ext >&5
21574
21575 ( exit $ac_status )
21576 if test "$ac_cv_type_int" = yes; then
21577      { { echo "$as_me:$LINENO: error: cannot compute alignment of int
21578 See \`config.log' for more details." >&5
21579 echo "$as_me: error: cannot compute alignment of int
21580 See \`config.log' for more details." >&2;}
21581    { (exit 77); exit 77; }; }
21582    else
21583      ac_cv_alignof_int=0
21584    fi
21585 fi
21586 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21587 fi
21588 rm -f conftest.val
21589 fi
21590 { echo "$as_me:$LINENO: result: $ac_cv_alignof_int" >&5
21591 echo "${ECHO_T}$ac_cv_alignof_int" >&6; }
21592
21593
21594
21595 cat >>confdefs.h <<_ACEOF
21596 #define ALIGNOF_INT $ac_cv_alignof_int
21597 _ACEOF
21598
21599
21600 { echo "$as_me:$LINENO: checking for long" >&5
21601 echo $ECHO_N "checking for long... $ECHO_C" >&6; }
21602 if test "${ac_cv_type_long+set}" = set; then
21603   echo $ECHO_N "(cached) $ECHO_C" >&6
21604 else
21605   cat >conftest.$ac_ext <<_ACEOF
21606 /* confdefs.h.  */
21607 _ACEOF
21608 cat confdefs.h >>conftest.$ac_ext
21609 cat >>conftest.$ac_ext <<_ACEOF
21610 /* end confdefs.h.  */
21611 $ac_includes_default
21612 typedef long ac__type_new_;
21613 int
21614 main ()
21615 {
21616 if ((ac__type_new_ *) 0)
21617   return 0;
21618 if (sizeof (ac__type_new_))
21619   return 0;
21620   ;
21621   return 0;
21622 }
21623 _ACEOF
21624 rm -f conftest.$ac_objext
21625 if { (ac_try="$ac_compile"
21626 case "(($ac_try" in
21627   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21628   *) ac_try_echo=$ac_try;;
21629 esac
21630 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21631   (eval "$ac_compile") 2>conftest.er1
21632   ac_status=$?
21633   grep -v '^ *+' conftest.er1 >conftest.err
21634   rm -f conftest.er1
21635   cat conftest.err >&5
21636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21637   (exit $ac_status); } && {
21638          test -z "$ac_c_werror_flag" ||
21639          test ! -s conftest.err
21640        } && test -s conftest.$ac_objext; then
21641   ac_cv_type_long=yes
21642 else
21643   echo "$as_me: failed program was:" >&5
21644 sed 's/^/| /' conftest.$ac_ext >&5
21645
21646         ac_cv_type_long=no
21647 fi
21648
21649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21650 fi
21651 { echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
21652 echo "${ECHO_T}$ac_cv_type_long" >&6; }
21653
21654 # The cast to long int works around a bug in the HP C Compiler,
21655 # see AC_CHECK_SIZEOF for more information.
21656 { echo "$as_me:$LINENO: checking alignment of long" >&5
21657 echo $ECHO_N "checking alignment of long... $ECHO_C" >&6; }
21658 if test "${ac_cv_alignof_long+set}" = set; then
21659   echo $ECHO_N "(cached) $ECHO_C" >&6
21660 else
21661   if test "$cross_compiling" = yes; then
21662   # Depending upon the size, compute the lo and hi bounds.
21663 cat >conftest.$ac_ext <<_ACEOF
21664 /* confdefs.h.  */
21665 _ACEOF
21666 cat confdefs.h >>conftest.$ac_ext
21667 cat >>conftest.$ac_ext <<_ACEOF
21668 /* end confdefs.h.  */
21669 $ac_includes_default
21670 #ifndef offsetof
21671 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21672 #endif
21673 typedef struct { char x; long y; } ac__type_alignof_;
21674 int
21675 main ()
21676 {
21677 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
21678 test_array [0] = 0
21679
21680   ;
21681   return 0;
21682 }
21683 _ACEOF
21684 rm -f conftest.$ac_objext
21685 if { (ac_try="$ac_compile"
21686 case "(($ac_try" in
21687   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21688   *) ac_try_echo=$ac_try;;
21689 esac
21690 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21691   (eval "$ac_compile") 2>conftest.er1
21692   ac_status=$?
21693   grep -v '^ *+' conftest.er1 >conftest.err
21694   rm -f conftest.er1
21695   cat conftest.err >&5
21696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21697   (exit $ac_status); } && {
21698          test -z "$ac_c_werror_flag" ||
21699          test ! -s conftest.err
21700        } && test -s conftest.$ac_objext; then
21701   ac_lo=0 ac_mid=0
21702   while :; do
21703     cat >conftest.$ac_ext <<_ACEOF
21704 /* confdefs.h.  */
21705 _ACEOF
21706 cat confdefs.h >>conftest.$ac_ext
21707 cat >>conftest.$ac_ext <<_ACEOF
21708 /* end confdefs.h.  */
21709 $ac_includes_default
21710 #ifndef offsetof
21711 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21712 #endif
21713 typedef struct { char x; long y; } ac__type_alignof_;
21714 int
21715 main ()
21716 {
21717 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
21718 test_array [0] = 0
21719
21720   ;
21721   return 0;
21722 }
21723 _ACEOF
21724 rm -f conftest.$ac_objext
21725 if { (ac_try="$ac_compile"
21726 case "(($ac_try" in
21727   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21728   *) ac_try_echo=$ac_try;;
21729 esac
21730 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21731   (eval "$ac_compile") 2>conftest.er1
21732   ac_status=$?
21733   grep -v '^ *+' conftest.er1 >conftest.err
21734   rm -f conftest.er1
21735   cat conftest.err >&5
21736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21737   (exit $ac_status); } && {
21738          test -z "$ac_c_werror_flag" ||
21739          test ! -s conftest.err
21740        } && test -s conftest.$ac_objext; then
21741   ac_hi=$ac_mid; break
21742 else
21743   echo "$as_me: failed program was:" >&5
21744 sed 's/^/| /' conftest.$ac_ext >&5
21745
21746         ac_lo=`expr $ac_mid + 1`
21747                         if test $ac_lo -le $ac_mid; then
21748                           ac_lo= ac_hi=
21749                           break
21750                         fi
21751                         ac_mid=`expr 2 '*' $ac_mid + 1`
21752 fi
21753
21754 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21755   done
21756 else
21757   echo "$as_me: failed program was:" >&5
21758 sed 's/^/| /' conftest.$ac_ext >&5
21759
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 #ifndef offsetof
21768 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21769 #endif
21770 typedef struct { char x; long y; } ac__type_alignof_;
21771 int
21772 main ()
21773 {
21774 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
21775 test_array [0] = 0
21776
21777   ;
21778   return 0;
21779 }
21780 _ACEOF
21781 rm -f conftest.$ac_objext
21782 if { (ac_try="$ac_compile"
21783 case "(($ac_try" in
21784   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21785   *) ac_try_echo=$ac_try;;
21786 esac
21787 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21788   (eval "$ac_compile") 2>conftest.er1
21789   ac_status=$?
21790   grep -v '^ *+' conftest.er1 >conftest.err
21791   rm -f conftest.er1
21792   cat conftest.err >&5
21793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21794   (exit $ac_status); } && {
21795          test -z "$ac_c_werror_flag" ||
21796          test ! -s conftest.err
21797        } && test -s conftest.$ac_objext; then
21798   ac_hi=-1 ac_mid=-1
21799   while :; do
21800     cat >conftest.$ac_ext <<_ACEOF
21801 /* confdefs.h.  */
21802 _ACEOF
21803 cat confdefs.h >>conftest.$ac_ext
21804 cat >>conftest.$ac_ext <<_ACEOF
21805 /* end confdefs.h.  */
21806 $ac_includes_default
21807 #ifndef offsetof
21808 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21809 #endif
21810 typedef struct { char x; long y; } ac__type_alignof_;
21811 int
21812 main ()
21813 {
21814 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
21815 test_array [0] = 0
21816
21817   ;
21818   return 0;
21819 }
21820 _ACEOF
21821 rm -f conftest.$ac_objext
21822 if { (ac_try="$ac_compile"
21823 case "(($ac_try" in
21824   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21825   *) ac_try_echo=$ac_try;;
21826 esac
21827 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21828   (eval "$ac_compile") 2>conftest.er1
21829   ac_status=$?
21830   grep -v '^ *+' conftest.er1 >conftest.err
21831   rm -f conftest.er1
21832   cat conftest.err >&5
21833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21834   (exit $ac_status); } && {
21835          test -z "$ac_c_werror_flag" ||
21836          test ! -s conftest.err
21837        } && test -s conftest.$ac_objext; then
21838   ac_lo=$ac_mid; break
21839 else
21840   echo "$as_me: failed program was:" >&5
21841 sed 's/^/| /' conftest.$ac_ext >&5
21842
21843         ac_hi=`expr '(' $ac_mid ')' - 1`
21844                         if test $ac_mid -le $ac_hi; then
21845                           ac_lo= ac_hi=
21846                           break
21847                         fi
21848                         ac_mid=`expr 2 '*' $ac_mid`
21849 fi
21850
21851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21852   done
21853 else
21854   echo "$as_me: failed program was:" >&5
21855 sed 's/^/| /' conftest.$ac_ext >&5
21856
21857         ac_lo= ac_hi=
21858 fi
21859
21860 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21861 fi
21862
21863 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21864 # Binary search between lo and hi bounds.
21865 while test "x$ac_lo" != "x$ac_hi"; do
21866   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21867   cat >conftest.$ac_ext <<_ACEOF
21868 /* confdefs.h.  */
21869 _ACEOF
21870 cat confdefs.h >>conftest.$ac_ext
21871 cat >>conftest.$ac_ext <<_ACEOF
21872 /* end confdefs.h.  */
21873 $ac_includes_default
21874 #ifndef offsetof
21875 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21876 #endif
21877 typedef struct { char x; long y; } ac__type_alignof_;
21878 int
21879 main ()
21880 {
21881 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
21882 test_array [0] = 0
21883
21884   ;
21885   return 0;
21886 }
21887 _ACEOF
21888 rm -f conftest.$ac_objext
21889 if { (ac_try="$ac_compile"
21890 case "(($ac_try" in
21891   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21892   *) ac_try_echo=$ac_try;;
21893 esac
21894 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21895   (eval "$ac_compile") 2>conftest.er1
21896   ac_status=$?
21897   grep -v '^ *+' conftest.er1 >conftest.err
21898   rm -f conftest.er1
21899   cat conftest.err >&5
21900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21901   (exit $ac_status); } && {
21902          test -z "$ac_c_werror_flag" ||
21903          test ! -s conftest.err
21904        } && test -s conftest.$ac_objext; then
21905   ac_hi=$ac_mid
21906 else
21907   echo "$as_me: failed program was:" >&5
21908 sed 's/^/| /' conftest.$ac_ext >&5
21909
21910         ac_lo=`expr '(' $ac_mid ')' + 1`
21911 fi
21912
21913 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21914 done
21915 case $ac_lo in
21916 ?*) ac_cv_alignof_long=$ac_lo;;
21917 '') if test "$ac_cv_type_long" = yes; then
21918      { { echo "$as_me:$LINENO: error: cannot compute alignment of long
21919 See \`config.log' for more details." >&5
21920 echo "$as_me: error: cannot compute alignment of long
21921 See \`config.log' for more details." >&2;}
21922    { (exit 77); exit 77; }; }
21923    else
21924      ac_cv_alignof_long=0
21925    fi ;;
21926 esac
21927 else
21928   cat >conftest.$ac_ext <<_ACEOF
21929 /* confdefs.h.  */
21930 _ACEOF
21931 cat confdefs.h >>conftest.$ac_ext
21932 cat >>conftest.$ac_ext <<_ACEOF
21933 /* end confdefs.h.  */
21934 $ac_includes_default
21935 #ifndef offsetof
21936 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21937 #endif
21938 typedef struct { char x; long y; } ac__type_alignof_;
21939 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
21940 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
21941 #include <stdio.h>
21942 #include <stdlib.h>
21943 int
21944 main ()
21945 {
21946
21947   FILE *f = fopen ("conftest.val", "w");
21948   if (! f)
21949     return 1;
21950   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
21951     {
21952       long int i = longval ();
21953       if (i != ((long int) offsetof (ac__type_alignof_, y)))
21954         return 1;
21955       fprintf (f, "%ld\n", i);
21956     }
21957   else
21958     {
21959       unsigned long int i = ulongval ();
21960       if (i != ((long int) offsetof (ac__type_alignof_, y)))
21961         return 1;
21962       fprintf (f, "%lu\n", i);
21963     }
21964   return ferror (f) || fclose (f) != 0;
21965
21966   ;
21967   return 0;
21968 }
21969 _ACEOF
21970 rm -f conftest$ac_exeext
21971 if { (ac_try="$ac_link"
21972 case "(($ac_try" in
21973   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21974   *) ac_try_echo=$ac_try;;
21975 esac
21976 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21977   (eval "$ac_link") 2>&5
21978   ac_status=$?
21979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21980   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21981   { (case "(($ac_try" in
21982   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21983   *) ac_try_echo=$ac_try;;
21984 esac
21985 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21986   (eval "$ac_try") 2>&5
21987   ac_status=$?
21988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21989   (exit $ac_status); }; }; then
21990   ac_cv_alignof_long=`cat conftest.val`
21991 else
21992   echo "$as_me: program exited with status $ac_status" >&5
21993 echo "$as_me: failed program was:" >&5
21994 sed 's/^/| /' conftest.$ac_ext >&5
21995
21996 ( exit $ac_status )
21997 if test "$ac_cv_type_long" = yes; then
21998      { { echo "$as_me:$LINENO: error: cannot compute alignment of long
21999 See \`config.log' for more details." >&5
22000 echo "$as_me: error: cannot compute alignment of long
22001 See \`config.log' for more details." >&2;}
22002    { (exit 77); exit 77; }; }
22003    else
22004      ac_cv_alignof_long=0
22005    fi
22006 fi
22007 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22008 fi
22009 rm -f conftest.val
22010 fi
22011 { echo "$as_me:$LINENO: result: $ac_cv_alignof_long" >&5
22012 echo "${ECHO_T}$ac_cv_alignof_long" >&6; }
22013
22014
22015
22016 cat >>confdefs.h <<_ACEOF
22017 #define ALIGNOF_LONG $ac_cv_alignof_long
22018 _ACEOF
22019
22020
22021 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
22022   { echo "$as_me:$LINENO: checking for long long int" >&5
22023 echo $ECHO_N "checking for long long int... $ECHO_C" >&6; }
22024 if test "${ac_cv_type_long_long_int+set}" = set; then
22025   echo $ECHO_N "(cached) $ECHO_C" >&6
22026 else
22027   cat >conftest.$ac_ext <<_ACEOF
22028 /* confdefs.h.  */
22029 _ACEOF
22030 cat confdefs.h >>conftest.$ac_ext
22031 cat >>conftest.$ac_ext <<_ACEOF
22032 /* end confdefs.h.  */
22033 $ac_includes_default
22034 typedef long long int ac__type_new_;
22035 int
22036 main ()
22037 {
22038 if ((ac__type_new_ *) 0)
22039   return 0;
22040 if (sizeof (ac__type_new_))
22041   return 0;
22042   ;
22043   return 0;
22044 }
22045 _ACEOF
22046 rm -f conftest.$ac_objext
22047 if { (ac_try="$ac_compile"
22048 case "(($ac_try" in
22049   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22050   *) ac_try_echo=$ac_try;;
22051 esac
22052 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22053   (eval "$ac_compile") 2>conftest.er1
22054   ac_status=$?
22055   grep -v '^ *+' conftest.er1 >conftest.err
22056   rm -f conftest.er1
22057   cat conftest.err >&5
22058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22059   (exit $ac_status); } && {
22060          test -z "$ac_c_werror_flag" ||
22061          test ! -s conftest.err
22062        } && test -s conftest.$ac_objext; then
22063   ac_cv_type_long_long_int=yes
22064 else
22065   echo "$as_me: failed program was:" >&5
22066 sed 's/^/| /' conftest.$ac_ext >&5
22067
22068         ac_cv_type_long_long_int=no
22069 fi
22070
22071 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22072 fi
22073 { echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
22074 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6; }
22075
22076 # The cast to long int works around a bug in the HP C Compiler,
22077 # see AC_CHECK_SIZEOF for more information.
22078 { echo "$as_me:$LINENO: checking alignment of long long int" >&5
22079 echo $ECHO_N "checking alignment of long long int... $ECHO_C" >&6; }
22080 if test "${ac_cv_alignof_long_long_int+set}" = set; then
22081   echo $ECHO_N "(cached) $ECHO_C" >&6
22082 else
22083   if test "$cross_compiling" = yes; then
22084   # Depending upon the size, compute the lo and hi bounds.
22085 cat >conftest.$ac_ext <<_ACEOF
22086 /* confdefs.h.  */
22087 _ACEOF
22088 cat confdefs.h >>conftest.$ac_ext
22089 cat >>conftest.$ac_ext <<_ACEOF
22090 /* end confdefs.h.  */
22091 $ac_includes_default
22092 #ifndef offsetof
22093 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22094 #endif
22095 typedef struct { char x; long long int y; } ac__type_alignof_;
22096 int
22097 main ()
22098 {
22099 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
22100 test_array [0] = 0
22101
22102   ;
22103   return 0;
22104 }
22105 _ACEOF
22106 rm -f conftest.$ac_objext
22107 if { (ac_try="$ac_compile"
22108 case "(($ac_try" in
22109   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22110   *) ac_try_echo=$ac_try;;
22111 esac
22112 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22113   (eval "$ac_compile") 2>conftest.er1
22114   ac_status=$?
22115   grep -v '^ *+' conftest.er1 >conftest.err
22116   rm -f conftest.er1
22117   cat conftest.err >&5
22118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22119   (exit $ac_status); } && {
22120          test -z "$ac_c_werror_flag" ||
22121          test ! -s conftest.err
22122        } && test -s conftest.$ac_objext; then
22123   ac_lo=0 ac_mid=0
22124   while :; do
22125     cat >conftest.$ac_ext <<_ACEOF
22126 /* confdefs.h.  */
22127 _ACEOF
22128 cat confdefs.h >>conftest.$ac_ext
22129 cat >>conftest.$ac_ext <<_ACEOF
22130 /* end confdefs.h.  */
22131 $ac_includes_default
22132 #ifndef offsetof
22133 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22134 #endif
22135 typedef struct { char x; long long int y; } ac__type_alignof_;
22136 int
22137 main ()
22138 {
22139 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
22140 test_array [0] = 0
22141
22142   ;
22143   return 0;
22144 }
22145 _ACEOF
22146 rm -f conftest.$ac_objext
22147 if { (ac_try="$ac_compile"
22148 case "(($ac_try" in
22149   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22150   *) ac_try_echo=$ac_try;;
22151 esac
22152 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22153   (eval "$ac_compile") 2>conftest.er1
22154   ac_status=$?
22155   grep -v '^ *+' conftest.er1 >conftest.err
22156   rm -f conftest.er1
22157   cat conftest.err >&5
22158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22159   (exit $ac_status); } && {
22160          test -z "$ac_c_werror_flag" ||
22161          test ! -s conftest.err
22162        } && test -s conftest.$ac_objext; then
22163   ac_hi=$ac_mid; break
22164 else
22165   echo "$as_me: failed program was:" >&5
22166 sed 's/^/| /' conftest.$ac_ext >&5
22167
22168         ac_lo=`expr $ac_mid + 1`
22169                         if test $ac_lo -le $ac_mid; then
22170                           ac_lo= ac_hi=
22171                           break
22172                         fi
22173                         ac_mid=`expr 2 '*' $ac_mid + 1`
22174 fi
22175
22176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22177   done
22178 else
22179   echo "$as_me: failed program was:" >&5
22180 sed 's/^/| /' conftest.$ac_ext >&5
22181
22182         cat >conftest.$ac_ext <<_ACEOF
22183 /* confdefs.h.  */
22184 _ACEOF
22185 cat confdefs.h >>conftest.$ac_ext
22186 cat >>conftest.$ac_ext <<_ACEOF
22187 /* end confdefs.h.  */
22188 $ac_includes_default
22189 #ifndef offsetof
22190 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22191 #endif
22192 typedef struct { char x; long long int y; } ac__type_alignof_;
22193 int
22194 main ()
22195 {
22196 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
22197 test_array [0] = 0
22198
22199   ;
22200   return 0;
22201 }
22202 _ACEOF
22203 rm -f conftest.$ac_objext
22204 if { (ac_try="$ac_compile"
22205 case "(($ac_try" in
22206   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22207   *) ac_try_echo=$ac_try;;
22208 esac
22209 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22210   (eval "$ac_compile") 2>conftest.er1
22211   ac_status=$?
22212   grep -v '^ *+' conftest.er1 >conftest.err
22213   rm -f conftest.er1
22214   cat conftest.err >&5
22215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22216   (exit $ac_status); } && {
22217          test -z "$ac_c_werror_flag" ||
22218          test ! -s conftest.err
22219        } && test -s conftest.$ac_objext; then
22220   ac_hi=-1 ac_mid=-1
22221   while :; do
22222     cat >conftest.$ac_ext <<_ACEOF
22223 /* confdefs.h.  */
22224 _ACEOF
22225 cat confdefs.h >>conftest.$ac_ext
22226 cat >>conftest.$ac_ext <<_ACEOF
22227 /* end confdefs.h.  */
22228 $ac_includes_default
22229 #ifndef offsetof
22230 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22231 #endif
22232 typedef struct { char x; long long int y; } ac__type_alignof_;
22233 int
22234 main ()
22235 {
22236 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
22237 test_array [0] = 0
22238
22239   ;
22240   return 0;
22241 }
22242 _ACEOF
22243 rm -f conftest.$ac_objext
22244 if { (ac_try="$ac_compile"
22245 case "(($ac_try" in
22246   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22247   *) ac_try_echo=$ac_try;;
22248 esac
22249 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22250   (eval "$ac_compile") 2>conftest.er1
22251   ac_status=$?
22252   grep -v '^ *+' conftest.er1 >conftest.err
22253   rm -f conftest.er1
22254   cat conftest.err >&5
22255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22256   (exit $ac_status); } && {
22257          test -z "$ac_c_werror_flag" ||
22258          test ! -s conftest.err
22259        } && test -s conftest.$ac_objext; then
22260   ac_lo=$ac_mid; break
22261 else
22262   echo "$as_me: failed program was:" >&5
22263 sed 's/^/| /' conftest.$ac_ext >&5
22264
22265         ac_hi=`expr '(' $ac_mid ')' - 1`
22266                         if test $ac_mid -le $ac_hi; then
22267                           ac_lo= ac_hi=
22268                           break
22269                         fi
22270                         ac_mid=`expr 2 '*' $ac_mid`
22271 fi
22272
22273 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22274   done
22275 else
22276   echo "$as_me: failed program was:" >&5
22277 sed 's/^/| /' conftest.$ac_ext >&5
22278
22279         ac_lo= ac_hi=
22280 fi
22281
22282 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22283 fi
22284
22285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22286 # Binary search between lo and hi bounds.
22287 while test "x$ac_lo" != "x$ac_hi"; do
22288   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22289   cat >conftest.$ac_ext <<_ACEOF
22290 /* confdefs.h.  */
22291 _ACEOF
22292 cat confdefs.h >>conftest.$ac_ext
22293 cat >>conftest.$ac_ext <<_ACEOF
22294 /* end confdefs.h.  */
22295 $ac_includes_default
22296 #ifndef offsetof
22297 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22298 #endif
22299 typedef struct { char x; long long int y; } ac__type_alignof_;
22300 int
22301 main ()
22302 {
22303 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
22304 test_array [0] = 0
22305
22306   ;
22307   return 0;
22308 }
22309 _ACEOF
22310 rm -f conftest.$ac_objext
22311 if { (ac_try="$ac_compile"
22312 case "(($ac_try" in
22313   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22314   *) ac_try_echo=$ac_try;;
22315 esac
22316 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22317   (eval "$ac_compile") 2>conftest.er1
22318   ac_status=$?
22319   grep -v '^ *+' conftest.er1 >conftest.err
22320   rm -f conftest.er1
22321   cat conftest.err >&5
22322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22323   (exit $ac_status); } && {
22324          test -z "$ac_c_werror_flag" ||
22325          test ! -s conftest.err
22326        } && test -s conftest.$ac_objext; then
22327   ac_hi=$ac_mid
22328 else
22329   echo "$as_me: failed program was:" >&5
22330 sed 's/^/| /' conftest.$ac_ext >&5
22331
22332         ac_lo=`expr '(' $ac_mid ')' + 1`
22333 fi
22334
22335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22336 done
22337 case $ac_lo in
22338 ?*) ac_cv_alignof_long_long_int=$ac_lo;;
22339 '') if test "$ac_cv_type_long_long_int" = yes; then
22340      { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int
22341 See \`config.log' for more details." >&5
22342 echo "$as_me: error: cannot compute alignment of long long int
22343 See \`config.log' for more details." >&2;}
22344    { (exit 77); exit 77; }; }
22345    else
22346      ac_cv_alignof_long_long_int=0
22347    fi ;;
22348 esac
22349 else
22350   cat >conftest.$ac_ext <<_ACEOF
22351 /* confdefs.h.  */
22352 _ACEOF
22353 cat confdefs.h >>conftest.$ac_ext
22354 cat >>conftest.$ac_ext <<_ACEOF
22355 /* end confdefs.h.  */
22356 $ac_includes_default
22357 #ifndef offsetof
22358 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22359 #endif
22360 typedef struct { char x; long long int y; } ac__type_alignof_;
22361 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
22362 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
22363 #include <stdio.h>
22364 #include <stdlib.h>
22365 int
22366 main ()
22367 {
22368
22369   FILE *f = fopen ("conftest.val", "w");
22370   if (! f)
22371     return 1;
22372   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
22373     {
22374       long int i = longval ();
22375       if (i != ((long int) offsetof (ac__type_alignof_, y)))
22376         return 1;
22377       fprintf (f, "%ld\n", i);
22378     }
22379   else
22380     {
22381       unsigned long int i = ulongval ();
22382       if (i != ((long int) offsetof (ac__type_alignof_, y)))
22383         return 1;
22384       fprintf (f, "%lu\n", i);
22385     }
22386   return ferror (f) || fclose (f) != 0;
22387
22388   ;
22389   return 0;
22390 }
22391 _ACEOF
22392 rm -f conftest$ac_exeext
22393 if { (ac_try="$ac_link"
22394 case "(($ac_try" in
22395   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22396   *) ac_try_echo=$ac_try;;
22397 esac
22398 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22399   (eval "$ac_link") 2>&5
22400   ac_status=$?
22401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22402   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22403   { (case "(($ac_try" in
22404   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22405   *) ac_try_echo=$ac_try;;
22406 esac
22407 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22408   (eval "$ac_try") 2>&5
22409   ac_status=$?
22410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22411   (exit $ac_status); }; }; then
22412   ac_cv_alignof_long_long_int=`cat conftest.val`
22413 else
22414   echo "$as_me: program exited with status $ac_status" >&5
22415 echo "$as_me: failed program was:" >&5
22416 sed 's/^/| /' conftest.$ac_ext >&5
22417
22418 ( exit $ac_status )
22419 if test "$ac_cv_type_long_long_int" = yes; then
22420      { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int
22421 See \`config.log' for more details." >&5
22422 echo "$as_me: error: cannot compute alignment of long long int
22423 See \`config.log' for more details." >&2;}
22424    { (exit 77); exit 77; }; }
22425    else
22426      ac_cv_alignof_long_long_int=0
22427    fi
22428 fi
22429 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22430 fi
22431 rm -f conftest.val
22432 fi
22433 { echo "$as_me:$LINENO: result: $ac_cv_alignof_long_long_int" >&5
22434 echo "${ECHO_T}$ac_cv_alignof_long_long_int" >&6; }
22435
22436
22437
22438 cat >>confdefs.h <<_ACEOF
22439 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
22440 _ACEOF
22441
22442
22443 fi
22444 { echo "$as_me:$LINENO: checking for double" >&5
22445 echo $ECHO_N "checking for double... $ECHO_C" >&6; }
22446 if test "${ac_cv_type_double+set}" = set; then
22447   echo $ECHO_N "(cached) $ECHO_C" >&6
22448 else
22449   cat >conftest.$ac_ext <<_ACEOF
22450 /* confdefs.h.  */
22451 _ACEOF
22452 cat confdefs.h >>conftest.$ac_ext
22453 cat >>conftest.$ac_ext <<_ACEOF
22454 /* end confdefs.h.  */
22455 $ac_includes_default
22456 typedef double ac__type_new_;
22457 int
22458 main ()
22459 {
22460 if ((ac__type_new_ *) 0)
22461   return 0;
22462 if (sizeof (ac__type_new_))
22463   return 0;
22464   ;
22465   return 0;
22466 }
22467 _ACEOF
22468 rm -f conftest.$ac_objext
22469 if { (ac_try="$ac_compile"
22470 case "(($ac_try" in
22471   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22472   *) ac_try_echo=$ac_try;;
22473 esac
22474 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22475   (eval "$ac_compile") 2>conftest.er1
22476   ac_status=$?
22477   grep -v '^ *+' conftest.er1 >conftest.err
22478   rm -f conftest.er1
22479   cat conftest.err >&5
22480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22481   (exit $ac_status); } && {
22482          test -z "$ac_c_werror_flag" ||
22483          test ! -s conftest.err
22484        } && test -s conftest.$ac_objext; then
22485   ac_cv_type_double=yes
22486 else
22487   echo "$as_me: failed program was:" >&5
22488 sed 's/^/| /' conftest.$ac_ext >&5
22489
22490         ac_cv_type_double=no
22491 fi
22492
22493 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22494 fi
22495 { echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
22496 echo "${ECHO_T}$ac_cv_type_double" >&6; }
22497
22498 # The cast to long int works around a bug in the HP C Compiler,
22499 # see AC_CHECK_SIZEOF for more information.
22500 { echo "$as_me:$LINENO: checking alignment of double" >&5
22501 echo $ECHO_N "checking alignment of double... $ECHO_C" >&6; }
22502 if test "${ac_cv_alignof_double+set}" = set; then
22503   echo $ECHO_N "(cached) $ECHO_C" >&6
22504 else
22505   if test "$cross_compiling" = yes; then
22506   # Depending upon the size, compute the lo and hi bounds.
22507 cat >conftest.$ac_ext <<_ACEOF
22508 /* confdefs.h.  */
22509 _ACEOF
22510 cat confdefs.h >>conftest.$ac_ext
22511 cat >>conftest.$ac_ext <<_ACEOF
22512 /* end confdefs.h.  */
22513 $ac_includes_default
22514 #ifndef offsetof
22515 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22516 #endif
22517 typedef struct { char x; double y; } ac__type_alignof_;
22518 int
22519 main ()
22520 {
22521 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
22522 test_array [0] = 0
22523
22524   ;
22525   return 0;
22526 }
22527 _ACEOF
22528 rm -f conftest.$ac_objext
22529 if { (ac_try="$ac_compile"
22530 case "(($ac_try" in
22531   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22532   *) ac_try_echo=$ac_try;;
22533 esac
22534 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22535   (eval "$ac_compile") 2>conftest.er1
22536   ac_status=$?
22537   grep -v '^ *+' conftest.er1 >conftest.err
22538   rm -f conftest.er1
22539   cat conftest.err >&5
22540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22541   (exit $ac_status); } && {
22542          test -z "$ac_c_werror_flag" ||
22543          test ! -s conftest.err
22544        } && test -s conftest.$ac_objext; then
22545   ac_lo=0 ac_mid=0
22546   while :; do
22547     cat >conftest.$ac_ext <<_ACEOF
22548 /* confdefs.h.  */
22549 _ACEOF
22550 cat confdefs.h >>conftest.$ac_ext
22551 cat >>conftest.$ac_ext <<_ACEOF
22552 /* end confdefs.h.  */
22553 $ac_includes_default
22554 #ifndef offsetof
22555 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22556 #endif
22557 typedef struct { char x; double y; } ac__type_alignof_;
22558 int
22559 main ()
22560 {
22561 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
22562 test_array [0] = 0
22563
22564   ;
22565   return 0;
22566 }
22567 _ACEOF
22568 rm -f conftest.$ac_objext
22569 if { (ac_try="$ac_compile"
22570 case "(($ac_try" in
22571   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22572   *) ac_try_echo=$ac_try;;
22573 esac
22574 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22575   (eval "$ac_compile") 2>conftest.er1
22576   ac_status=$?
22577   grep -v '^ *+' conftest.er1 >conftest.err
22578   rm -f conftest.er1
22579   cat conftest.err >&5
22580   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22581   (exit $ac_status); } && {
22582          test -z "$ac_c_werror_flag" ||
22583          test ! -s conftest.err
22584        } && test -s conftest.$ac_objext; then
22585   ac_hi=$ac_mid; break
22586 else
22587   echo "$as_me: failed program was:" >&5
22588 sed 's/^/| /' conftest.$ac_ext >&5
22589
22590         ac_lo=`expr $ac_mid + 1`
22591                         if test $ac_lo -le $ac_mid; then
22592                           ac_lo= ac_hi=
22593                           break
22594                         fi
22595                         ac_mid=`expr 2 '*' $ac_mid + 1`
22596 fi
22597
22598 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22599   done
22600 else
22601   echo "$as_me: failed program was:" >&5
22602 sed 's/^/| /' conftest.$ac_ext >&5
22603
22604         cat >conftest.$ac_ext <<_ACEOF
22605 /* confdefs.h.  */
22606 _ACEOF
22607 cat confdefs.h >>conftest.$ac_ext
22608 cat >>conftest.$ac_ext <<_ACEOF
22609 /* end confdefs.h.  */
22610 $ac_includes_default
22611 #ifndef offsetof
22612 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22613 #endif
22614 typedef struct { char x; double y; } ac__type_alignof_;
22615 int
22616 main ()
22617 {
22618 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
22619 test_array [0] = 0
22620
22621   ;
22622   return 0;
22623 }
22624 _ACEOF
22625 rm -f conftest.$ac_objext
22626 if { (ac_try="$ac_compile"
22627 case "(($ac_try" in
22628   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22629   *) ac_try_echo=$ac_try;;
22630 esac
22631 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22632   (eval "$ac_compile") 2>conftest.er1
22633   ac_status=$?
22634   grep -v '^ *+' conftest.er1 >conftest.err
22635   rm -f conftest.er1
22636   cat conftest.err >&5
22637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22638   (exit $ac_status); } && {
22639          test -z "$ac_c_werror_flag" ||
22640          test ! -s conftest.err
22641        } && test -s conftest.$ac_objext; then
22642   ac_hi=-1 ac_mid=-1
22643   while :; do
22644     cat >conftest.$ac_ext <<_ACEOF
22645 /* confdefs.h.  */
22646 _ACEOF
22647 cat confdefs.h >>conftest.$ac_ext
22648 cat >>conftest.$ac_ext <<_ACEOF
22649 /* end confdefs.h.  */
22650 $ac_includes_default
22651 #ifndef offsetof
22652 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22653 #endif
22654 typedef struct { char x; double y; } ac__type_alignof_;
22655 int
22656 main ()
22657 {
22658 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
22659 test_array [0] = 0
22660
22661   ;
22662   return 0;
22663 }
22664 _ACEOF
22665 rm -f conftest.$ac_objext
22666 if { (ac_try="$ac_compile"
22667 case "(($ac_try" in
22668   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22669   *) ac_try_echo=$ac_try;;
22670 esac
22671 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22672   (eval "$ac_compile") 2>conftest.er1
22673   ac_status=$?
22674   grep -v '^ *+' conftest.er1 >conftest.err
22675   rm -f conftest.er1
22676   cat conftest.err >&5
22677   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22678   (exit $ac_status); } && {
22679          test -z "$ac_c_werror_flag" ||
22680          test ! -s conftest.err
22681        } && test -s conftest.$ac_objext; then
22682   ac_lo=$ac_mid; break
22683 else
22684   echo "$as_me: failed program was:" >&5
22685 sed 's/^/| /' conftest.$ac_ext >&5
22686
22687         ac_hi=`expr '(' $ac_mid ')' - 1`
22688                         if test $ac_mid -le $ac_hi; then
22689                           ac_lo= ac_hi=
22690                           break
22691                         fi
22692                         ac_mid=`expr 2 '*' $ac_mid`
22693 fi
22694
22695 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22696   done
22697 else
22698   echo "$as_me: failed program was:" >&5
22699 sed 's/^/| /' conftest.$ac_ext >&5
22700
22701         ac_lo= ac_hi=
22702 fi
22703
22704 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22705 fi
22706
22707 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22708 # Binary search between lo and hi bounds.
22709 while test "x$ac_lo" != "x$ac_hi"; do
22710   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22711   cat >conftest.$ac_ext <<_ACEOF
22712 /* confdefs.h.  */
22713 _ACEOF
22714 cat confdefs.h >>conftest.$ac_ext
22715 cat >>conftest.$ac_ext <<_ACEOF
22716 /* end confdefs.h.  */
22717 $ac_includes_default
22718 #ifndef offsetof
22719 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22720 #endif
22721 typedef struct { char x; double y; } ac__type_alignof_;
22722 int
22723 main ()
22724 {
22725 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
22726 test_array [0] = 0
22727
22728   ;
22729   return 0;
22730 }
22731 _ACEOF
22732 rm -f conftest.$ac_objext
22733 if { (ac_try="$ac_compile"
22734 case "(($ac_try" in
22735   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22736   *) ac_try_echo=$ac_try;;
22737 esac
22738 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22739   (eval "$ac_compile") 2>conftest.er1
22740   ac_status=$?
22741   grep -v '^ *+' conftest.er1 >conftest.err
22742   rm -f conftest.er1
22743   cat conftest.err >&5
22744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22745   (exit $ac_status); } && {
22746          test -z "$ac_c_werror_flag" ||
22747          test ! -s conftest.err
22748        } && test -s conftest.$ac_objext; then
22749   ac_hi=$ac_mid
22750 else
22751   echo "$as_me: failed program was:" >&5
22752 sed 's/^/| /' conftest.$ac_ext >&5
22753
22754         ac_lo=`expr '(' $ac_mid ')' + 1`
22755 fi
22756
22757 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22758 done
22759 case $ac_lo in
22760 ?*) ac_cv_alignof_double=$ac_lo;;
22761 '') if test "$ac_cv_type_double" = yes; then
22762      { { echo "$as_me:$LINENO: error: cannot compute alignment of double
22763 See \`config.log' for more details." >&5
22764 echo "$as_me: error: cannot compute alignment of double
22765 See \`config.log' for more details." >&2;}
22766    { (exit 77); exit 77; }; }
22767    else
22768      ac_cv_alignof_double=0
22769    fi ;;
22770 esac
22771 else
22772   cat >conftest.$ac_ext <<_ACEOF
22773 /* confdefs.h.  */
22774 _ACEOF
22775 cat confdefs.h >>conftest.$ac_ext
22776 cat >>conftest.$ac_ext <<_ACEOF
22777 /* end confdefs.h.  */
22778 $ac_includes_default
22779 #ifndef offsetof
22780 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22781 #endif
22782 typedef struct { char x; double y; } ac__type_alignof_;
22783 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
22784 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
22785 #include <stdio.h>
22786 #include <stdlib.h>
22787 int
22788 main ()
22789 {
22790
22791   FILE *f = fopen ("conftest.val", "w");
22792   if (! f)
22793     return 1;
22794   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
22795     {
22796       long int i = longval ();
22797       if (i != ((long int) offsetof (ac__type_alignof_, y)))
22798         return 1;
22799       fprintf (f, "%ld\n", i);
22800     }
22801   else
22802     {
22803       unsigned long int i = ulongval ();
22804       if (i != ((long int) offsetof (ac__type_alignof_, y)))
22805         return 1;
22806       fprintf (f, "%lu\n", i);
22807     }
22808   return ferror (f) || fclose (f) != 0;
22809
22810   ;
22811   return 0;
22812 }
22813 _ACEOF
22814 rm -f conftest$ac_exeext
22815 if { (ac_try="$ac_link"
22816 case "(($ac_try" in
22817   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22818   *) ac_try_echo=$ac_try;;
22819 esac
22820 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22821   (eval "$ac_link") 2>&5
22822   ac_status=$?
22823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22824   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22825   { (case "(($ac_try" in
22826   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22827   *) ac_try_echo=$ac_try;;
22828 esac
22829 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22830   (eval "$ac_try") 2>&5
22831   ac_status=$?
22832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22833   (exit $ac_status); }; }; then
22834   ac_cv_alignof_double=`cat conftest.val`
22835 else
22836   echo "$as_me: program exited with status $ac_status" >&5
22837 echo "$as_me: failed program was:" >&5
22838 sed 's/^/| /' conftest.$ac_ext >&5
22839
22840 ( exit $ac_status )
22841 if test "$ac_cv_type_double" = yes; then
22842      { { echo "$as_me:$LINENO: error: cannot compute alignment of double
22843 See \`config.log' for more details." >&5
22844 echo "$as_me: error: cannot compute alignment of double
22845 See \`config.log' for more details." >&2;}
22846    { (exit 77); exit 77; }; }
22847    else
22848      ac_cv_alignof_double=0
22849    fi
22850 fi
22851 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22852 fi
22853 rm -f conftest.val
22854 fi
22855 { echo "$as_me:$LINENO: result: $ac_cv_alignof_double" >&5
22856 echo "${ECHO_T}$ac_cv_alignof_double" >&6; }
22857
22858
22859
22860 cat >>confdefs.h <<_ACEOF
22861 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
22862 _ACEOF
22863
22864
22865
22866 # Compute maximum alignment of any basic type.
22867 # We assume long's alignment is at least as strong as char, short, or int;
22868 # but we must check long long (if it exists) and double.
22869
22870 MAX_ALIGNOF=$ac_cv_alignof_long
22871 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
22872   MAX_ALIGNOF=$ac_cv_alignof_double
22873 fi
22874 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
22875   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
22876 fi
22877
22878 cat >>confdefs.h <<_ACEOF
22879 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
22880 _ACEOF
22881
22882
22883
22884 # Some platforms predefine the types int8, int16, etc.  Only check
22885 # a (hopefully) representative subset.
22886 { echo "$as_me:$LINENO: checking for int8" >&5
22887 echo $ECHO_N "checking for int8... $ECHO_C" >&6; }
22888 if test "${ac_cv_type_int8+set}" = set; then
22889   echo $ECHO_N "(cached) $ECHO_C" >&6
22890 else
22891   cat >conftest.$ac_ext <<_ACEOF
22892 /* confdefs.h.  */
22893 _ACEOF
22894 cat confdefs.h >>conftest.$ac_ext
22895 cat >>conftest.$ac_ext <<_ACEOF
22896 /* end confdefs.h.  */
22897 #include <stdio.h>
22898 #ifdef HAVE_SUPPORTDEFS_H
22899 #include <SupportDefs.h>
22900 #endif
22901
22902 typedef int8 ac__type_new_;
22903 int
22904 main ()
22905 {
22906 if ((ac__type_new_ *) 0)
22907   return 0;
22908 if (sizeof (ac__type_new_))
22909   return 0;
22910   ;
22911   return 0;
22912 }
22913 _ACEOF
22914 rm -f conftest.$ac_objext
22915 if { (ac_try="$ac_compile"
22916 case "(($ac_try" in
22917   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22918   *) ac_try_echo=$ac_try;;
22919 esac
22920 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22921   (eval "$ac_compile") 2>conftest.er1
22922   ac_status=$?
22923   grep -v '^ *+' conftest.er1 >conftest.err
22924   rm -f conftest.er1
22925   cat conftest.err >&5
22926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22927   (exit $ac_status); } && {
22928          test -z "$ac_c_werror_flag" ||
22929          test ! -s conftest.err
22930        } && test -s conftest.$ac_objext; then
22931   ac_cv_type_int8=yes
22932 else
22933   echo "$as_me: failed program was:" >&5
22934 sed 's/^/| /' conftest.$ac_ext >&5
22935
22936         ac_cv_type_int8=no
22937 fi
22938
22939 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22940 fi
22941 { echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
22942 echo "${ECHO_T}$ac_cv_type_int8" >&6; }
22943 if test $ac_cv_type_int8 = yes; then
22944
22945 cat >>confdefs.h <<_ACEOF
22946 #define HAVE_INT8 1
22947 _ACEOF
22948
22949
22950 fi
22951 { echo "$as_me:$LINENO: checking for uint8" >&5
22952 echo $ECHO_N "checking for uint8... $ECHO_C" >&6; }
22953 if test "${ac_cv_type_uint8+set}" = set; then
22954   echo $ECHO_N "(cached) $ECHO_C" >&6
22955 else
22956   cat >conftest.$ac_ext <<_ACEOF
22957 /* confdefs.h.  */
22958 _ACEOF
22959 cat confdefs.h >>conftest.$ac_ext
22960 cat >>conftest.$ac_ext <<_ACEOF
22961 /* end confdefs.h.  */
22962 #include <stdio.h>
22963 #ifdef HAVE_SUPPORTDEFS_H
22964 #include <SupportDefs.h>
22965 #endif
22966
22967 typedef uint8 ac__type_new_;
22968 int
22969 main ()
22970 {
22971 if ((ac__type_new_ *) 0)
22972   return 0;
22973 if (sizeof (ac__type_new_))
22974   return 0;
22975   ;
22976   return 0;
22977 }
22978 _ACEOF
22979 rm -f conftest.$ac_objext
22980 if { (ac_try="$ac_compile"
22981 case "(($ac_try" in
22982   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22983   *) ac_try_echo=$ac_try;;
22984 esac
22985 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22986   (eval "$ac_compile") 2>conftest.er1
22987   ac_status=$?
22988   grep -v '^ *+' conftest.er1 >conftest.err
22989   rm -f conftest.er1
22990   cat conftest.err >&5
22991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22992   (exit $ac_status); } && {
22993          test -z "$ac_c_werror_flag" ||
22994          test ! -s conftest.err
22995        } && test -s conftest.$ac_objext; then
22996   ac_cv_type_uint8=yes
22997 else
22998   echo "$as_me: failed program was:" >&5
22999 sed 's/^/| /' conftest.$ac_ext >&5
23000
23001         ac_cv_type_uint8=no
23002 fi
23003
23004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23005 fi
23006 { echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
23007 echo "${ECHO_T}$ac_cv_type_uint8" >&6; }
23008 if test $ac_cv_type_uint8 = yes; then
23009
23010 cat >>confdefs.h <<_ACEOF
23011 #define HAVE_UINT8 1
23012 _ACEOF
23013
23014
23015 fi
23016 { echo "$as_me:$LINENO: checking for int64" >&5
23017 echo $ECHO_N "checking for int64... $ECHO_C" >&6; }
23018 if test "${ac_cv_type_int64+set}" = set; then
23019   echo $ECHO_N "(cached) $ECHO_C" >&6
23020 else
23021   cat >conftest.$ac_ext <<_ACEOF
23022 /* confdefs.h.  */
23023 _ACEOF
23024 cat confdefs.h >>conftest.$ac_ext
23025 cat >>conftest.$ac_ext <<_ACEOF
23026 /* end confdefs.h.  */
23027 #include <stdio.h>
23028 #ifdef HAVE_SUPPORTDEFS_H
23029 #include <SupportDefs.h>
23030 #endif
23031
23032 typedef int64 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_int64=yes
23062 else
23063   echo "$as_me: failed program was:" >&5
23064 sed 's/^/| /' conftest.$ac_ext >&5
23065
23066         ac_cv_type_int64=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_int64" >&5
23072 echo "${ECHO_T}$ac_cv_type_int64" >&6; }
23073 if test $ac_cv_type_int64 = yes; then
23074
23075 cat >>confdefs.h <<_ACEOF
23076 #define HAVE_INT64 1
23077 _ACEOF
23078
23079
23080 fi
23081 { echo "$as_me:$LINENO: checking for uint64" >&5
23082 echo $ECHO_N "checking for uint64... $ECHO_C" >&6; }
23083 if test "${ac_cv_type_uint64+set}" = set; then
23084   echo $ECHO_N "(cached) $ECHO_C" >&6
23085 else
23086   cat >conftest.$ac_ext <<_ACEOF
23087 /* confdefs.h.  */
23088 _ACEOF
23089 cat confdefs.h >>conftest.$ac_ext
23090 cat >>conftest.$ac_ext <<_ACEOF
23091 /* end confdefs.h.  */
23092 #include <stdio.h>
23093 #ifdef HAVE_SUPPORTDEFS_H
23094 #include <SupportDefs.h>
23095 #endif
23096
23097 typedef uint64 ac__type_new_;
23098 int
23099 main ()
23100 {
23101 if ((ac__type_new_ *) 0)
23102   return 0;
23103 if (sizeof (ac__type_new_))
23104   return 0;
23105   ;
23106   return 0;
23107 }
23108 _ACEOF
23109 rm -f conftest.$ac_objext
23110 if { (ac_try="$ac_compile"
23111 case "(($ac_try" in
23112   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23113   *) ac_try_echo=$ac_try;;
23114 esac
23115 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23116   (eval "$ac_compile") 2>conftest.er1
23117   ac_status=$?
23118   grep -v '^ *+' conftest.er1 >conftest.err
23119   rm -f conftest.er1
23120   cat conftest.err >&5
23121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23122   (exit $ac_status); } && {
23123          test -z "$ac_c_werror_flag" ||
23124          test ! -s conftest.err
23125        } && test -s conftest.$ac_objext; then
23126   ac_cv_type_uint64=yes
23127 else
23128   echo "$as_me: failed program was:" >&5
23129 sed 's/^/| /' conftest.$ac_ext >&5
23130
23131         ac_cv_type_uint64=no
23132 fi
23133
23134 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23135 fi
23136 { echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
23137 echo "${ECHO_T}$ac_cv_type_uint64" >&6; }
23138 if test $ac_cv_type_uint64 = yes; then
23139
23140 cat >>confdefs.h <<_ACEOF
23141 #define HAVE_UINT64 1
23142 _ACEOF
23143
23144
23145 fi
23146
23147
23148 # We also check for sig_atomic_t, which *should* be defined per ANSI
23149 # C, but is missing on some old platforms.
23150 { echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
23151 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6; }
23152 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
23153   echo $ECHO_N "(cached) $ECHO_C" >&6
23154 else
23155   cat >conftest.$ac_ext <<_ACEOF
23156 /* confdefs.h.  */
23157 _ACEOF
23158 cat confdefs.h >>conftest.$ac_ext
23159 cat >>conftest.$ac_ext <<_ACEOF
23160 /* end confdefs.h.  */
23161 #include <signal.h>
23162
23163 typedef sig_atomic_t ac__type_new_;
23164 int
23165 main ()
23166 {
23167 if ((ac__type_new_ *) 0)
23168   return 0;
23169 if (sizeof (ac__type_new_))
23170   return 0;
23171   ;
23172   return 0;
23173 }
23174 _ACEOF
23175 rm -f conftest.$ac_objext
23176 if { (ac_try="$ac_compile"
23177 case "(($ac_try" in
23178   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23179   *) ac_try_echo=$ac_try;;
23180 esac
23181 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23182   (eval "$ac_compile") 2>conftest.er1
23183   ac_status=$?
23184   grep -v '^ *+' conftest.er1 >conftest.err
23185   rm -f conftest.er1
23186   cat conftest.err >&5
23187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23188   (exit $ac_status); } && {
23189          test -z "$ac_c_werror_flag" ||
23190          test ! -s conftest.err
23191        } && test -s conftest.$ac_objext; then
23192   ac_cv_type_sig_atomic_t=yes
23193 else
23194   echo "$as_me: failed program was:" >&5
23195 sed 's/^/| /' conftest.$ac_ext >&5
23196
23197         ac_cv_type_sig_atomic_t=no
23198 fi
23199
23200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23201 fi
23202 { echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
23203 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6; }
23204 if test $ac_cv_type_sig_atomic_t = yes; then
23205
23206 cat >>confdefs.h <<_ACEOF
23207 #define HAVE_SIG_ATOMIC_T 1
23208 _ACEOF
23209
23210
23211 fi
23212
23213
23214
23215 if test "$PORTNAME" != "win32"
23216 then
23217 { echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
23218 echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6; }
23219 if test "${pgac_cv_func_posix_signals+set}" = set; then
23220   echo $ECHO_N "(cached) $ECHO_C" >&6
23221 else
23222   cat >conftest.$ac_ext <<_ACEOF
23223 /* confdefs.h.  */
23224 _ACEOF
23225 cat confdefs.h >>conftest.$ac_ext
23226 cat >>conftest.$ac_ext <<_ACEOF
23227 /* end confdefs.h.  */
23228 #include <signal.h>
23229
23230 int
23231 main ()
23232 {
23233 struct sigaction act, oact;
23234 sigemptyset(&act.sa_mask);
23235 act.sa_flags = SA_RESTART;
23236 sigaction(0, &act, &oact);
23237   ;
23238   return 0;
23239 }
23240 _ACEOF
23241 rm -f conftest.$ac_objext conftest$ac_exeext
23242 if { (ac_try="$ac_link"
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_link") 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_exeext &&
23258        $as_test_x conftest$ac_exeext; then
23259   pgac_cv_func_posix_signals=yes
23260 else
23261   echo "$as_me: failed program was:" >&5
23262 sed 's/^/| /' conftest.$ac_ext >&5
23263
23264         pgac_cv_func_posix_signals=no
23265 fi
23266
23267 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23268       conftest$ac_exeext conftest.$ac_ext
23269 fi
23270 { echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
23271 echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6; }
23272 if test x"$pgac_cv_func_posix_signals" = xyes ; then
23273
23274 cat >>confdefs.h <<\_ACEOF
23275 #define HAVE_POSIX_SIGNALS
23276 _ACEOF
23277
23278 fi
23279 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
23280
23281 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
23282   { { echo "$as_me:$LINENO: error:
23283 Thread-safety requires POSIX signals, which are not supported by this
23284 operating system." >&5
23285 echo "$as_me: error:
23286 Thread-safety requires POSIX signals, which are not supported by this
23287 operating system." >&2;}
23288    { (exit 1); exit 1; }; }
23289 fi
23290 fi
23291
23292 if test $ac_cv_func_fseeko = yes; then
23293 # Check whether --enable-largefile was given.
23294 if test "${enable_largefile+set}" = set; then
23295   enableval=$enable_largefile;
23296 fi
23297
23298 if test "$enable_largefile" != no; then
23299
23300   { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
23301 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
23302 if test "${ac_cv_sys_largefile_CC+set}" = set; then
23303   echo $ECHO_N "(cached) $ECHO_C" >&6
23304 else
23305   ac_cv_sys_largefile_CC=no
23306      if test "$GCC" != yes; then
23307        ac_save_CC=$CC
23308        while :; do
23309          # IRIX 6.2 and later do not support large files by default,
23310          # so use the C compiler's -n32 option if that helps.
23311          cat >conftest.$ac_ext <<_ACEOF
23312 /* confdefs.h.  */
23313 _ACEOF
23314 cat confdefs.h >>conftest.$ac_ext
23315 cat >>conftest.$ac_ext <<_ACEOF
23316 /* end confdefs.h.  */
23317 #include <sys/types.h>
23318  /* Check that off_t can represent 2**63 - 1 correctly.
23319     We can't simply define LARGE_OFF_T to be 9223372036854775807,
23320     since some C++ compilers masquerading as C compilers
23321     incorrectly reject 9223372036854775807.  */
23322 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
23323   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
23324                        && LARGE_OFF_T % 2147483647 == 1)
23325                       ? 1 : -1];
23326 int
23327 main ()
23328 {
23329
23330   ;
23331   return 0;
23332 }
23333 _ACEOF
23334          rm -f conftest.$ac_objext
23335 if { (ac_try="$ac_compile"
23336 case "(($ac_try" in
23337   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23338   *) ac_try_echo=$ac_try;;
23339 esac
23340 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23341   (eval "$ac_compile") 2>conftest.er1
23342   ac_status=$?
23343   grep -v '^ *+' conftest.er1 >conftest.err
23344   rm -f conftest.er1
23345   cat conftest.err >&5
23346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23347   (exit $ac_status); } && {
23348          test -z "$ac_c_werror_flag" ||
23349          test ! -s conftest.err
23350        } && test -s conftest.$ac_objext; then
23351   break
23352 else
23353   echo "$as_me: failed program was:" >&5
23354 sed 's/^/| /' conftest.$ac_ext >&5
23355
23356
23357 fi
23358
23359 rm -f core conftest.err conftest.$ac_objext
23360          CC="$CC -n32"
23361          rm -f conftest.$ac_objext
23362 if { (ac_try="$ac_compile"
23363 case "(($ac_try" in
23364   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23365   *) ac_try_echo=$ac_try;;
23366 esac
23367 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23368   (eval "$ac_compile") 2>conftest.er1
23369   ac_status=$?
23370   grep -v '^ *+' conftest.er1 >conftest.err
23371   rm -f conftest.er1
23372   cat conftest.err >&5
23373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23374   (exit $ac_status); } && {
23375          test -z "$ac_c_werror_flag" ||
23376          test ! -s conftest.err
23377        } && test -s conftest.$ac_objext; then
23378   ac_cv_sys_largefile_CC=' -n32'; break
23379 else
23380   echo "$as_me: failed program was:" >&5
23381 sed 's/^/| /' conftest.$ac_ext >&5
23382
23383
23384 fi
23385
23386 rm -f core conftest.err conftest.$ac_objext
23387          break
23388        done
23389        CC=$ac_save_CC
23390        rm -f conftest.$ac_ext
23391     fi
23392 fi
23393 { echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
23394 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
23395   if test "$ac_cv_sys_largefile_CC" != no; then
23396     CC=$CC$ac_cv_sys_largefile_CC
23397   fi
23398
23399   { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
23400 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
23401 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
23402   echo $ECHO_N "(cached) $ECHO_C" >&6
23403 else
23404   while :; do
23405   cat >conftest.$ac_ext <<_ACEOF
23406 /* confdefs.h.  */
23407 _ACEOF
23408 cat confdefs.h >>conftest.$ac_ext
23409 cat >>conftest.$ac_ext <<_ACEOF
23410 /* end confdefs.h.  */
23411 #include <sys/types.h>
23412  /* Check that off_t can represent 2**63 - 1 correctly.
23413     We can't simply define LARGE_OFF_T to be 9223372036854775807,
23414     since some C++ compilers masquerading as C compilers
23415     incorrectly reject 9223372036854775807.  */
23416 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
23417   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
23418                        && LARGE_OFF_T % 2147483647 == 1)
23419                       ? 1 : -1];
23420 int
23421 main ()
23422 {
23423
23424   ;
23425   return 0;
23426 }
23427 _ACEOF
23428 rm -f conftest.$ac_objext
23429 if { (ac_try="$ac_compile"
23430 case "(($ac_try" in
23431   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23432   *) ac_try_echo=$ac_try;;
23433 esac
23434 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23435   (eval "$ac_compile") 2>conftest.er1
23436   ac_status=$?
23437   grep -v '^ *+' conftest.er1 >conftest.err
23438   rm -f conftest.er1
23439   cat conftest.err >&5
23440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23441   (exit $ac_status); } && {
23442          test -z "$ac_c_werror_flag" ||
23443          test ! -s conftest.err
23444        } && test -s conftest.$ac_objext; then
23445   ac_cv_sys_file_offset_bits=no; break
23446 else
23447   echo "$as_me: failed program was:" >&5
23448 sed 's/^/| /' conftest.$ac_ext >&5
23449
23450
23451 fi
23452
23453 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23454   cat >conftest.$ac_ext <<_ACEOF
23455 /* confdefs.h.  */
23456 _ACEOF
23457 cat confdefs.h >>conftest.$ac_ext
23458 cat >>conftest.$ac_ext <<_ACEOF
23459 /* end confdefs.h.  */
23460 #define _FILE_OFFSET_BITS 64
23461 #include <sys/types.h>
23462  /* Check that off_t can represent 2**63 - 1 correctly.
23463     We can't simply define LARGE_OFF_T to be 9223372036854775807,
23464     since some C++ compilers masquerading as C compilers
23465     incorrectly reject 9223372036854775807.  */
23466 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
23467   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
23468                        && LARGE_OFF_T % 2147483647 == 1)
23469                       ? 1 : -1];
23470 int
23471 main ()
23472 {
23473
23474   ;
23475   return 0;
23476 }
23477 _ACEOF
23478 rm -f conftest.$ac_objext
23479 if { (ac_try="$ac_compile"
23480 case "(($ac_try" in
23481   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23482   *) ac_try_echo=$ac_try;;
23483 esac
23484 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23485   (eval "$ac_compile") 2>conftest.er1
23486   ac_status=$?
23487   grep -v '^ *+' conftest.er1 >conftest.err
23488   rm -f conftest.er1
23489   cat conftest.err >&5
23490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23491   (exit $ac_status); } && {
23492          test -z "$ac_c_werror_flag" ||
23493          test ! -s conftest.err
23494        } && test -s conftest.$ac_objext; then
23495   ac_cv_sys_file_offset_bits=64; break
23496 else
23497   echo "$as_me: failed program was:" >&5
23498 sed 's/^/| /' conftest.$ac_ext >&5
23499
23500
23501 fi
23502
23503 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23504   ac_cv_sys_file_offset_bits=unknown
23505   break
23506 done
23507 fi
23508 { echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
23509 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
23510 case $ac_cv_sys_file_offset_bits in #(
23511   no | unknown) ;;
23512   *)
23513 cat >>confdefs.h <<_ACEOF
23514 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
23515 _ACEOF
23516 ;;
23517 esac
23518 rm -f conftest*
23519   if test $ac_cv_sys_file_offset_bits = unknown; then
23520     { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
23521 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
23522 if test "${ac_cv_sys_large_files+set}" = set; then
23523   echo $ECHO_N "(cached) $ECHO_C" >&6
23524 else
23525   while :; do
23526   cat >conftest.$ac_ext <<_ACEOF
23527 /* confdefs.h.  */
23528 _ACEOF
23529 cat confdefs.h >>conftest.$ac_ext
23530 cat >>conftest.$ac_ext <<_ACEOF
23531 /* end confdefs.h.  */
23532 #include <sys/types.h>
23533  /* Check that off_t can represent 2**63 - 1 correctly.
23534     We can't simply define LARGE_OFF_T to be 9223372036854775807,
23535     since some C++ compilers masquerading as C compilers
23536     incorrectly reject 9223372036854775807.  */
23537 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
23538   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
23539                        && LARGE_OFF_T % 2147483647 == 1)
23540                       ? 1 : -1];
23541 int
23542 main ()
23543 {
23544
23545   ;
23546   return 0;
23547 }
23548 _ACEOF
23549 rm -f conftest.$ac_objext
23550 if { (ac_try="$ac_compile"
23551 case "(($ac_try" in
23552   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23553   *) ac_try_echo=$ac_try;;
23554 esac
23555 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23556   (eval "$ac_compile") 2>conftest.er1
23557   ac_status=$?
23558   grep -v '^ *+' conftest.er1 >conftest.err
23559   rm -f conftest.er1
23560   cat conftest.err >&5
23561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23562   (exit $ac_status); } && {
23563          test -z "$ac_c_werror_flag" ||
23564          test ! -s conftest.err
23565        } && test -s conftest.$ac_objext; then
23566   ac_cv_sys_large_files=no; break
23567 else
23568   echo "$as_me: failed program was:" >&5
23569 sed 's/^/| /' conftest.$ac_ext >&5
23570
23571
23572 fi
23573
23574 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23575   cat >conftest.$ac_ext <<_ACEOF
23576 /* confdefs.h.  */
23577 _ACEOF
23578 cat confdefs.h >>conftest.$ac_ext
23579 cat >>conftest.$ac_ext <<_ACEOF
23580 /* end confdefs.h.  */
23581 #define _LARGE_FILES 1
23582 #include <sys/types.h>
23583  /* Check that off_t can represent 2**63 - 1 correctly.
23584     We can't simply define LARGE_OFF_T to be 9223372036854775807,
23585     since some C++ compilers masquerading as C compilers
23586     incorrectly reject 9223372036854775807.  */
23587 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
23588   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
23589                        && LARGE_OFF_T % 2147483647 == 1)
23590                       ? 1 : -1];
23591 int
23592 main ()
23593 {
23594
23595   ;
23596   return 0;
23597 }
23598 _ACEOF
23599 rm -f conftest.$ac_objext
23600 if { (ac_try="$ac_compile"
23601 case "(($ac_try" in
23602   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23603   *) ac_try_echo=$ac_try;;
23604 esac
23605 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23606   (eval "$ac_compile") 2>conftest.er1
23607   ac_status=$?
23608   grep -v '^ *+' conftest.er1 >conftest.err
23609   rm -f conftest.er1
23610   cat conftest.err >&5
23611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23612   (exit $ac_status); } && {
23613          test -z "$ac_c_werror_flag" ||
23614          test ! -s conftest.err
23615        } && test -s conftest.$ac_objext; then
23616   ac_cv_sys_large_files=1; break
23617 else
23618   echo "$as_me: failed program was:" >&5
23619 sed 's/^/| /' conftest.$ac_ext >&5
23620
23621
23622 fi
23623
23624 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23625   ac_cv_sys_large_files=unknown
23626   break
23627 done
23628 fi
23629 { echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
23630 echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
23631 case $ac_cv_sys_large_files in #(
23632   no | unknown) ;;
23633   *)
23634 cat >>confdefs.h <<_ACEOF
23635 #define _LARGE_FILES $ac_cv_sys_large_files
23636 _ACEOF
23637 ;;
23638 esac
23639 rm -f conftest*
23640   fi
23641 fi
23642
23643 fi
23644
23645 # SunOS doesn't handle negative byte comparisons properly with +/- return
23646 { echo "$as_me:$LINENO: checking for working memcmp" >&5
23647 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; }
23648 if test "${ac_cv_func_memcmp_working+set}" = set; then
23649   echo $ECHO_N "(cached) $ECHO_C" >&6
23650 else
23651   if test "$cross_compiling" = yes; then
23652   ac_cv_func_memcmp_working=no
23653 else
23654   cat >conftest.$ac_ext <<_ACEOF
23655 /* confdefs.h.  */
23656 _ACEOF
23657 cat confdefs.h >>conftest.$ac_ext
23658 cat >>conftest.$ac_ext <<_ACEOF
23659 /* end confdefs.h.  */
23660 $ac_includes_default
23661 int
23662 main ()
23663 {
23664
23665   /* Some versions of memcmp are not 8-bit clean.  */
23666   char c0 = '\100', c1 = '\200', c2 = '\201';
23667   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
23668     return 1;
23669
23670   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
23671      or more and with at least one buffer not starting on a 4-byte boundary.
23672      William Lewis provided this test program.   */
23673   {
23674     char foo[21];
23675     char bar[21];
23676     int i;
23677     for (i = 0; i < 4; i++)
23678       {
23679         char *a = foo + i;
23680         char *b = bar + i;
23681         strcpy (a, "--------01111111");
23682         strcpy (b, "--------10000000");
23683         if (memcmp (a, b, 16) >= 0)
23684           return 1;
23685       }
23686     return 0;
23687   }
23688
23689   ;
23690   return 0;
23691 }
23692 _ACEOF
23693 rm -f conftest$ac_exeext
23694 if { (ac_try="$ac_link"
23695 case "(($ac_try" in
23696   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23697   *) ac_try_echo=$ac_try;;
23698 esac
23699 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23700   (eval "$ac_link") 2>&5
23701   ac_status=$?
23702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23703   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23704   { (case "(($ac_try" in
23705   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23706   *) ac_try_echo=$ac_try;;
23707 esac
23708 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23709   (eval "$ac_try") 2>&5
23710   ac_status=$?
23711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23712   (exit $ac_status); }; }; then
23713   ac_cv_func_memcmp_working=yes
23714 else
23715   echo "$as_me: program exited with status $ac_status" >&5
23716 echo "$as_me: failed program was:" >&5
23717 sed 's/^/| /' conftest.$ac_ext >&5
23718
23719 ( exit $ac_status )
23720 ac_cv_func_memcmp_working=no
23721 fi
23722 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23723 fi
23724
23725
23726 fi
23727 { echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
23728 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; }
23729 test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
23730   *" memcmp.$ac_objext "* ) ;;
23731   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
23732  ;;
23733 esac
23734
23735
23736
23737
23738 # Select semaphore implementation type.
23739 if test "$PORTNAME" != "win32"; then
23740   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
23741
23742 cat >>confdefs.h <<\_ACEOF
23743 #define USE_NAMED_POSIX_SEMAPHORES 1
23744 _ACEOF
23745
23746     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
23747   else
23748     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
23749
23750 cat >>confdefs.h <<\_ACEOF
23751 #define USE_UNNAMED_POSIX_SEMAPHORES 1
23752 _ACEOF
23753
23754       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
23755     else
23756
23757 cat >>confdefs.h <<\_ACEOF
23758 #define USE_SYSV_SEMAPHORES 1
23759 _ACEOF
23760
23761       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
23762     fi
23763   fi
23764 else
23765
23766 cat >>confdefs.h <<\_ACEOF
23767 #define USE_WIN32_SEMAPHORES 1
23768 _ACEOF
23769
23770   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
23771 fi
23772
23773
23774 # Select shared-memory implementation type.
23775 if test "$PORTNAME" != "win32"; then
23776
23777 cat >>confdefs.h <<\_ACEOF
23778 #define USE_SYSV_SHARED_MEMORY 1
23779 _ACEOF
23780
23781   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
23782 else
23783
23784 cat >>confdefs.h <<\_ACEOF
23785 #define USE_WIN32_SHARED_MEMORY 1
23786 _ACEOF
23787
23788   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
23789 fi
23790
23791 # If not set in template file, set bytes to use libc memset()
23792 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
23793   MEMSET_LOOP_LIMIT=1024
23794 fi
23795
23796 cat >>confdefs.h <<_ACEOF
23797 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
23798 _ACEOF
23799
23800
23801
23802 if test "$enable_nls" = yes ; then
23803
23804   { echo "$as_me:$LINENO: checking for library containing gettext" >&5
23805 echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6; }
23806 if test "${ac_cv_search_gettext+set}" = set; then
23807   echo $ECHO_N "(cached) $ECHO_C" >&6
23808 else
23809   ac_func_search_save_LIBS=$LIBS
23810 cat >conftest.$ac_ext <<_ACEOF
23811 /* confdefs.h.  */
23812 _ACEOF
23813 cat confdefs.h >>conftest.$ac_ext
23814 cat >>conftest.$ac_ext <<_ACEOF
23815 /* end confdefs.h.  */
23816
23817 /* Override any GCC internal prototype to avoid an error.
23818    Use char because int might match the return type of a GCC
23819    builtin and then its argument prototype would still apply.  */
23820 #ifdef __cplusplus
23821 extern "C"
23822 #endif
23823 char gettext ();
23824 int
23825 main ()
23826 {
23827 return gettext ();
23828   ;
23829   return 0;
23830 }
23831 _ACEOF
23832 for ac_lib in '' intl; do
23833   if test -z "$ac_lib"; then
23834     ac_res="none required"
23835   else
23836     ac_res=-l$ac_lib
23837     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23838   fi
23839   rm -f conftest.$ac_objext conftest$ac_exeext
23840 if { (ac_try="$ac_link"
23841 case "(($ac_try" in
23842   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23843   *) ac_try_echo=$ac_try;;
23844 esac
23845 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23846   (eval "$ac_link") 2>conftest.er1
23847   ac_status=$?
23848   grep -v '^ *+' conftest.er1 >conftest.err
23849   rm -f conftest.er1
23850   cat conftest.err >&5
23851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23852   (exit $ac_status); } && {
23853          test -z "$ac_c_werror_flag" ||
23854          test ! -s conftest.err
23855        } && test -s conftest$ac_exeext &&
23856        $as_test_x conftest$ac_exeext; then
23857   ac_cv_search_gettext=$ac_res
23858 else
23859   echo "$as_me: failed program was:" >&5
23860 sed 's/^/| /' conftest.$ac_ext >&5
23861
23862
23863 fi
23864
23865 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23866       conftest$ac_exeext
23867   if test "${ac_cv_search_gettext+set}" = set; then
23868   break
23869 fi
23870 done
23871 if test "${ac_cv_search_gettext+set}" = set; then
23872   :
23873 else
23874   ac_cv_search_gettext=no
23875 fi
23876 rm conftest.$ac_ext
23877 LIBS=$ac_func_search_save_LIBS
23878 fi
23879 { echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5
23880 echo "${ECHO_T}$ac_cv_search_gettext" >&6; }
23881 ac_res=$ac_cv_search_gettext
23882 if test "$ac_res" != no; then
23883   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23884
23885 else
23886   { { echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
23887 echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
23888    { (exit 1); exit 1; }; }
23889 fi
23890
23891   if test "${ac_cv_header_libintl_h+set}" = set; then
23892   { echo "$as_me:$LINENO: checking for libintl.h" >&5
23893 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
23894 if test "${ac_cv_header_libintl_h+set}" = set; then
23895   echo $ECHO_N "(cached) $ECHO_C" >&6
23896 fi
23897 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
23898 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
23899 else
23900   # Is the header compilable?
23901 { echo "$as_me:$LINENO: checking libintl.h usability" >&5
23902 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6; }
23903 cat >conftest.$ac_ext <<_ACEOF
23904 /* confdefs.h.  */
23905 _ACEOF
23906 cat confdefs.h >>conftest.$ac_ext
23907 cat >>conftest.$ac_ext <<_ACEOF
23908 /* end confdefs.h.  */
23909 $ac_includes_default
23910 #include <libintl.h>
23911 _ACEOF
23912 rm -f conftest.$ac_objext
23913 if { (ac_try="$ac_compile"
23914 case "(($ac_try" in
23915   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23916   *) ac_try_echo=$ac_try;;
23917 esac
23918 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23919   (eval "$ac_compile") 2>conftest.er1
23920   ac_status=$?
23921   grep -v '^ *+' conftest.er1 >conftest.err
23922   rm -f conftest.er1
23923   cat conftest.err >&5
23924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23925   (exit $ac_status); } && {
23926          test -z "$ac_c_werror_flag" ||
23927          test ! -s conftest.err
23928        } && test -s conftest.$ac_objext; then
23929   ac_header_compiler=yes
23930 else
23931   echo "$as_me: failed program was:" >&5
23932 sed 's/^/| /' conftest.$ac_ext >&5
23933
23934         ac_header_compiler=no
23935 fi
23936
23937 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23938 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23939 echo "${ECHO_T}$ac_header_compiler" >&6; }
23940
23941 # Is the header present?
23942 { echo "$as_me:$LINENO: checking libintl.h presence" >&5
23943 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6; }
23944 cat >conftest.$ac_ext <<_ACEOF
23945 /* confdefs.h.  */
23946 _ACEOF
23947 cat confdefs.h >>conftest.$ac_ext
23948 cat >>conftest.$ac_ext <<_ACEOF
23949 /* end confdefs.h.  */
23950 #include <libintl.h>
23951 _ACEOF
23952 if { (ac_try="$ac_cpp conftest.$ac_ext"
23953 case "(($ac_try" in
23954   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23955   *) ac_try_echo=$ac_try;;
23956 esac
23957 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23958   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23959   ac_status=$?
23960   grep -v '^ *+' conftest.er1 >conftest.err
23961   rm -f conftest.er1
23962   cat conftest.err >&5
23963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23964   (exit $ac_status); } >/dev/null && {
23965          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23966          test ! -s conftest.err
23967        }; then
23968   ac_header_preproc=yes
23969 else
23970   echo "$as_me: failed program was:" >&5
23971 sed 's/^/| /' conftest.$ac_ext >&5
23972
23973   ac_header_preproc=no
23974 fi
23975
23976 rm -f conftest.err conftest.$ac_ext
23977 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23978 echo "${ECHO_T}$ac_header_preproc" >&6; }
23979
23980 # So?  What about this header?
23981 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23982   yes:no: )
23983     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
23984 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23985     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
23986 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
23987     ac_header_preproc=yes
23988     ;;
23989   no:yes:* )
23990     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
23991 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
23992     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
23993 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
23994     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
23995 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
23996     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
23997 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
23998     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
23999 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
24000     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
24001 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
24002     ( cat <<\_ASBOX
24003 ## ---------------------------------------- ##
24004 ## Report this to pgsql-bugs@postgresql.org ##
24005 ## ---------------------------------------- ##
24006 _ASBOX
24007      ) | sed "s/^/$as_me: WARNING:     /" >&2
24008     ;;
24009 esac
24010 { echo "$as_me:$LINENO: checking for libintl.h" >&5
24011 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
24012 if test "${ac_cv_header_libintl_h+set}" = set; then
24013   echo $ECHO_N "(cached) $ECHO_C" >&6
24014 else
24015   ac_cv_header_libintl_h=$ac_header_preproc
24016 fi
24017 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
24018 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
24019
24020 fi
24021 if test $ac_cv_header_libintl_h = yes; then
24022   :
24023 else
24024   { { echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
24025 echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
24026    { (exit 1); exit 1; }; }
24027 fi
24028
24029
24030   for ac_prog in msgfmt
24031 do
24032   # Extract the first word of "$ac_prog", so it can be a program name with args.
24033 set dummy $ac_prog; ac_word=$2
24034 { echo "$as_me:$LINENO: checking for $ac_word" >&5
24035 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
24036 if test "${ac_cv_prog_MSGFMT+set}" = set; then
24037   echo $ECHO_N "(cached) $ECHO_C" >&6
24038 else
24039   if test -n "$MSGFMT"; then
24040   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
24041 else
24042 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24043 for as_dir in $PATH
24044 do
24045   IFS=$as_save_IFS
24046   test -z "$as_dir" && as_dir=.
24047   for ac_exec_ext in '' $ac_executable_extensions; do
24048   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24049     ac_cv_prog_MSGFMT="$ac_prog"
24050     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24051     break 2
24052   fi
24053 done
24054 done
24055 IFS=$as_save_IFS
24056
24057 fi
24058 fi
24059 MSGFMT=$ac_cv_prog_MSGFMT
24060 if test -n "$MSGFMT"; then
24061   { echo "$as_me:$LINENO: result: $MSGFMT" >&5
24062 echo "${ECHO_T}$MSGFMT" >&6; }
24063 else
24064   { echo "$as_me:$LINENO: result: no" >&5
24065 echo "${ECHO_T}no" >&6; }
24066 fi
24067
24068
24069   test -n "$MSGFMT" && break
24070 done
24071
24072   if test -z "$MSGFMT"; then
24073     { { echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
24074 echo "$as_me: error: msgfmt is required for NLS" >&2;}
24075    { (exit 1); exit 1; }; }
24076   fi
24077   for ac_prog in msgmerge
24078 do
24079   # Extract the first word of "$ac_prog", so it can be a program name with args.
24080 set dummy $ac_prog; ac_word=$2
24081 { echo "$as_me:$LINENO: checking for $ac_word" >&5
24082 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
24083 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
24084   echo $ECHO_N "(cached) $ECHO_C" >&6
24085 else
24086   if test -n "$MSGMERGE"; then
24087   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
24088 else
24089 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24090 for as_dir in $PATH
24091 do
24092   IFS=$as_save_IFS
24093   test -z "$as_dir" && as_dir=.
24094   for ac_exec_ext in '' $ac_executable_extensions; do
24095   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24096     ac_cv_prog_MSGMERGE="$ac_prog"
24097     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24098     break 2
24099   fi
24100 done
24101 done
24102 IFS=$as_save_IFS
24103
24104 fi
24105 fi
24106 MSGMERGE=$ac_cv_prog_MSGMERGE
24107 if test -n "$MSGMERGE"; then
24108   { echo "$as_me:$LINENO: result: $MSGMERGE" >&5
24109 echo "${ECHO_T}$MSGMERGE" >&6; }
24110 else
24111   { echo "$as_me:$LINENO: result: no" >&5
24112 echo "${ECHO_T}no" >&6; }
24113 fi
24114
24115
24116   test -n "$MSGMERGE" && break
24117 done
24118
24119   for ac_prog in xgettext
24120 do
24121   # Extract the first word of "$ac_prog", so it can be a program name with args.
24122 set dummy $ac_prog; ac_word=$2
24123 { echo "$as_me:$LINENO: checking for $ac_word" >&5
24124 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
24125 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
24126   echo $ECHO_N "(cached) $ECHO_C" >&6
24127 else
24128   if test -n "$XGETTEXT"; then
24129   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
24130 else
24131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24132 for as_dir in $PATH
24133 do
24134   IFS=$as_save_IFS
24135   test -z "$as_dir" && as_dir=.
24136   for ac_exec_ext in '' $ac_executable_extensions; do
24137   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24138     ac_cv_prog_XGETTEXT="$ac_prog"
24139     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24140     break 2
24141   fi
24142 done
24143 done
24144 IFS=$as_save_IFS
24145
24146 fi
24147 fi
24148 XGETTEXT=$ac_cv_prog_XGETTEXT
24149 if test -n "$XGETTEXT"; then
24150   { echo "$as_me:$LINENO: result: $XGETTEXT" >&5
24151 echo "${ECHO_T}$XGETTEXT" >&6; }
24152 else
24153   { echo "$as_me:$LINENO: result: no" >&5
24154 echo "${ECHO_T}no" >&6; }
24155 fi
24156
24157
24158   test -n "$XGETTEXT" && break
24159 done
24160
24161
24162 fi
24163
24164 # Check for Tcl configuration script tclConfig.sh
24165 if test "$with_tcl" = yes; then
24166     for ac_prog in tclsh tcl
24167 do
24168   # Extract the first word of "$ac_prog", so it can be a program name with args.
24169 set dummy $ac_prog; ac_word=$2
24170 { echo "$as_me:$LINENO: checking for $ac_word" >&5
24171 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
24172 if test "${ac_cv_path_TCLSH+set}" = set; then
24173   echo $ECHO_N "(cached) $ECHO_C" >&6
24174 else
24175   case $TCLSH in
24176   [\\/]* | ?:[\\/]*)
24177   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
24178   ;;
24179   *)
24180   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24181 for as_dir in $PATH
24182 do
24183   IFS=$as_save_IFS
24184   test -z "$as_dir" && as_dir=.
24185   for ac_exec_ext in '' $ac_executable_extensions; do
24186   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24187     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
24188     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24189     break 2
24190   fi
24191 done
24192 done
24193 IFS=$as_save_IFS
24194
24195   ;;
24196 esac
24197 fi
24198 TCLSH=$ac_cv_path_TCLSH
24199 if test -n "$TCLSH"; then
24200   { echo "$as_me:$LINENO: result: $TCLSH" >&5
24201 echo "${ECHO_T}$TCLSH" >&6; }
24202 else
24203   { echo "$as_me:$LINENO: result: no" >&5
24204 echo "${ECHO_T}no" >&6; }
24205 fi
24206
24207
24208   test -n "$TCLSH" && break
24209 done
24210
24211 { echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
24212 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6; }
24213 # Let user override test
24214 if test -z "$TCL_CONFIG_SH"; then
24215     pgac_test_dirs="$with_tclconfig"
24216
24217     set X $pgac_test_dirs; shift
24218     if test $# -eq 0; then
24219         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
24220 echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
24221    { (exit 1); exit 1; }; }
24222         set X `echo 'puts $auto_path' | $TCLSH`; shift
24223     fi
24224
24225     for pgac_dir do
24226         if test -r "$pgac_dir/tclConfig.sh"; then
24227             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
24228             break
24229         fi
24230     done
24231 fi
24232
24233 if test -z "$TCL_CONFIG_SH"; then
24234     { echo "$as_me:$LINENO: result: no" >&5
24235 echo "${ECHO_T}no" >&6; }
24236     { { echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
24237 echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
24238    { (exit 1); exit 1; }; }
24239 else
24240     { echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
24241 echo "${ECHO_T}$TCL_CONFIG_SH" >&6; }
24242 fi
24243
24244
24245
24246     . "$TCL_CONFIG_SH"
24247 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
24248 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
24249 eval TCL_LIBS=\"$TCL_LIBS\"
24250 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
24251 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
24252
24253         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
24254     ac_save_CPPFLAGS=$CPPFLAGS
24255     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
24256     if test "${ac_cv_header_tcl_h+set}" = set; then
24257   { echo "$as_me:$LINENO: checking for tcl.h" >&5
24258 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6; }
24259 if test "${ac_cv_header_tcl_h+set}" = set; then
24260   echo $ECHO_N "(cached) $ECHO_C" >&6
24261 fi
24262 { echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
24263 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6; }
24264 else
24265   # Is the header compilable?
24266 { echo "$as_me:$LINENO: checking tcl.h usability" >&5
24267 echo $ECHO_N "checking tcl.h usability... $ECHO_C" >&6; }
24268 cat >conftest.$ac_ext <<_ACEOF
24269 /* confdefs.h.  */
24270 _ACEOF
24271 cat confdefs.h >>conftest.$ac_ext
24272 cat >>conftest.$ac_ext <<_ACEOF
24273 /* end confdefs.h.  */
24274 $ac_includes_default
24275 #include <tcl.h>
24276 _ACEOF
24277 rm -f conftest.$ac_objext
24278 if { (ac_try="$ac_compile"
24279 case "(($ac_try" in
24280   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24281   *) ac_try_echo=$ac_try;;
24282 esac
24283 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24284   (eval "$ac_compile") 2>conftest.er1
24285   ac_status=$?
24286   grep -v '^ *+' conftest.er1 >conftest.err
24287   rm -f conftest.er1
24288   cat conftest.err >&5
24289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24290   (exit $ac_status); } && {
24291          test -z "$ac_c_werror_flag" ||
24292          test ! -s conftest.err
24293        } && test -s conftest.$ac_objext; then
24294   ac_header_compiler=yes
24295 else
24296   echo "$as_me: failed program was:" >&5
24297 sed 's/^/| /' conftest.$ac_ext >&5
24298
24299         ac_header_compiler=no
24300 fi
24301
24302 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24303 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24304 echo "${ECHO_T}$ac_header_compiler" >&6; }
24305
24306 # Is the header present?
24307 { echo "$as_me:$LINENO: checking tcl.h presence" >&5
24308 echo $ECHO_N "checking tcl.h presence... $ECHO_C" >&6; }
24309 cat >conftest.$ac_ext <<_ACEOF
24310 /* confdefs.h.  */
24311 _ACEOF
24312 cat confdefs.h >>conftest.$ac_ext
24313 cat >>conftest.$ac_ext <<_ACEOF
24314 /* end confdefs.h.  */
24315 #include <tcl.h>
24316 _ACEOF
24317 if { (ac_try="$ac_cpp conftest.$ac_ext"
24318 case "(($ac_try" in
24319   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24320   *) ac_try_echo=$ac_try;;
24321 esac
24322 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24323   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
24324   ac_status=$?
24325   grep -v '^ *+' conftest.er1 >conftest.err
24326   rm -f conftest.er1
24327   cat conftest.err >&5
24328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24329   (exit $ac_status); } >/dev/null && {
24330          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24331          test ! -s conftest.err
24332        }; then
24333   ac_header_preproc=yes
24334 else
24335   echo "$as_me: failed program was:" >&5
24336 sed 's/^/| /' conftest.$ac_ext >&5
24337
24338   ac_header_preproc=no
24339 fi
24340
24341 rm -f conftest.err conftest.$ac_ext
24342 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24343 echo "${ECHO_T}$ac_header_preproc" >&6; }
24344
24345 # So?  What about this header?
24346 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24347   yes:no: )
24348     { echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
24349 echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24350     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
24351 echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
24352     ac_header_preproc=yes
24353     ;;
24354   no:yes:* )
24355     { echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
24356 echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
24357     { echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
24358 echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
24359     { echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
24360 echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
24361     { echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
24362 echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
24363     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
24364 echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
24365     { echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
24366 echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
24367     ( cat <<\_ASBOX
24368 ## ---------------------------------------- ##
24369 ## Report this to pgsql-bugs@postgresql.org ##
24370 ## ---------------------------------------- ##
24371 _ASBOX
24372      ) | sed "s/^/$as_me: WARNING:     /" >&2
24373     ;;
24374 esac
24375 { echo "$as_me:$LINENO: checking for tcl.h" >&5
24376 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6; }
24377 if test "${ac_cv_header_tcl_h+set}" = set; then
24378   echo $ECHO_N "(cached) $ECHO_C" >&6
24379 else
24380   ac_cv_header_tcl_h=$ac_header_preproc
24381 fi
24382 { echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
24383 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6; }
24384
24385 fi
24386 if test $ac_cv_header_tcl_h = yes; then
24387   :
24388 else
24389   { { echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
24390 echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
24391    { (exit 1); exit 1; }; }
24392 fi
24393
24394
24395     CPPFLAGS=$ac_save_CPPFLAGS
24396 fi
24397
24398 #
24399 # Check for DocBook and tools
24400 #
24401 for ac_prog in onsgmls nsgmls
24402 do
24403   # Extract the first word of "$ac_prog", so it can be a program name with args.
24404 set dummy $ac_prog; ac_word=$2
24405 { echo "$as_me:$LINENO: checking for $ac_word" >&5
24406 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
24407 if test "${ac_cv_prog_NSGMLS+set}" = set; then
24408   echo $ECHO_N "(cached) $ECHO_C" >&6
24409 else
24410   if test -n "$NSGMLS"; then
24411   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
24412 else
24413 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24414 for as_dir in $PATH
24415 do
24416   IFS=$as_save_IFS
24417   test -z "$as_dir" && as_dir=.
24418   for ac_exec_ext in '' $ac_executable_extensions; do
24419   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24420     ac_cv_prog_NSGMLS="$ac_prog"
24421     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24422     break 2
24423   fi
24424 done
24425 done
24426 IFS=$as_save_IFS
24427
24428 fi
24429 fi
24430 NSGMLS=$ac_cv_prog_NSGMLS
24431 if test -n "$NSGMLS"; then
24432   { echo "$as_me:$LINENO: result: $NSGMLS" >&5
24433 echo "${ECHO_T}$NSGMLS" >&6; }
24434 else
24435   { echo "$as_me:$LINENO: result: no" >&5
24436 echo "${ECHO_T}no" >&6; }
24437 fi
24438
24439
24440   test -n "$NSGMLS" && break
24441 done
24442
24443 for ac_prog in openjade jade
24444 do
24445   # Extract the first word of "$ac_prog", so it can be a program name with args.
24446 set dummy $ac_prog; ac_word=$2
24447 { echo "$as_me:$LINENO: checking for $ac_word" >&5
24448 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
24449 if test "${ac_cv_prog_JADE+set}" = set; then
24450   echo $ECHO_N "(cached) $ECHO_C" >&6
24451 else
24452   if test -n "$JADE"; then
24453   ac_cv_prog_JADE="$JADE" # Let the user override the test.
24454 else
24455 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24456 for as_dir in $PATH
24457 do
24458   IFS=$as_save_IFS
24459   test -z "$as_dir" && as_dir=.
24460   for ac_exec_ext in '' $ac_executable_extensions; do
24461   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24462     ac_cv_prog_JADE="$ac_prog"
24463     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24464     break 2
24465   fi
24466 done
24467 done
24468 IFS=$as_save_IFS
24469
24470 fi
24471 fi
24472 JADE=$ac_cv_prog_JADE
24473 if test -n "$JADE"; then
24474   { echo "$as_me:$LINENO: result: $JADE" >&5
24475 echo "${ECHO_T}$JADE" >&6; }
24476 else
24477   { echo "$as_me:$LINENO: result: no" >&5
24478 echo "${ECHO_T}no" >&6; }
24479 fi
24480
24481
24482   test -n "$JADE" && break
24483 done
24484
24485
24486 { echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
24487 echo $ECHO_N "checking for DocBook V4.2... $ECHO_C" >&6; }
24488 if test "${pgac_cv_check_docbook+set}" = set; then
24489   echo $ECHO_N "(cached) $ECHO_C" >&6
24490 else
24491   cat >conftest.sgml <<EOF
24492 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
24493 <book>
24494  <title>test</title>
24495  <chapter>
24496   <title>random</title>
24497    <sect1>
24498     <title>testsect</title>
24499     <para>text</para>
24500   </sect1>
24501  </chapter>
24502 </book>
24503 EOF
24504
24505 pgac_cv_check_docbook=no
24506
24507 if test -n "$NSGMLS"; then
24508   $NSGMLS -s conftest.sgml 1>&5 2>&1
24509   if test $? -eq 0; then
24510     pgac_cv_check_docbook=yes
24511   fi
24512 fi
24513 rm -f conftest.sgml
24514 fi
24515 { echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
24516 echo "${ECHO_T}$pgac_cv_check_docbook" >&6; }
24517
24518 have_docbook=$pgac_cv_check_docbook
24519
24520
24521 { echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
24522 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6; }
24523 if test "${pgac_cv_path_stylesheets+set}" = set; then
24524   echo $ECHO_N "(cached) $ECHO_C" >&6
24525 else
24526   if test -n "$DOCBOOKSTYLE"; then
24527   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
24528 else
24529   for pgac_prefix in /usr /usr/local /opt; do
24530     for pgac_infix in share lib; do
24531       for pgac_postfix in \
24532         sgml/stylesheets/nwalsh-modular \
24533         sgml/stylesheets/docbook \
24534         sgml/stylesheets/dsssl/docbook \
24535         sgml/docbook-dsssl \
24536         sgml/docbook/dsssl/modular \
24537         sgml/docbook/stylesheet/dsssl/modular \
24538         sgml/docbook/dsssl-stylesheets
24539       do
24540         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
24541         if test -r "$pgac_candidate/html/docbook.dsl" \
24542            && test -r "$pgac_candidate/print/docbook.dsl"
24543         then
24544           pgac_cv_path_stylesheets=$pgac_candidate
24545           break 3
24546         fi
24547       done
24548     done
24549   done
24550 fi
24551 fi
24552
24553 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
24554
24555 if test -n "$DOCBOOKSTYLE"; then
24556   { echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
24557 echo "${ECHO_T}$DOCBOOKSTYLE" >&6; }
24558 else
24559   { echo "$as_me:$LINENO: result: no" >&5
24560 echo "${ECHO_T}no" >&6; }
24561 fi
24562 if test -n "$DOCBOOKSTYLE"; then
24563   for ac_prog in collateindex.pl
24564 do
24565   # Extract the first word of "$ac_prog", so it can be a program name with args.
24566 set dummy $ac_prog; ac_word=$2
24567 { echo "$as_me:$LINENO: checking for $ac_word" >&5
24568 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
24569 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
24570   echo $ECHO_N "(cached) $ECHO_C" >&6
24571 else
24572   case $COLLATEINDEX in
24573   [\\/]* | ?:[\\/]*)
24574   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
24575   ;;
24576   *)
24577   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24578 for as_dir in $DOCBOOKSTYLE/bin $PATH
24579 do
24580   IFS=$as_save_IFS
24581   test -z "$as_dir" && as_dir=.
24582   for ac_exec_ext in '' $ac_executable_extensions; do
24583   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24584     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
24585     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24586     break 2
24587   fi
24588 done
24589 done
24590 IFS=$as_save_IFS
24591
24592   ;;
24593 esac
24594 fi
24595 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
24596 if test -n "$COLLATEINDEX"; then
24597   { echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
24598 echo "${ECHO_T}$COLLATEINDEX" >&6; }
24599 else
24600   { echo "$as_me:$LINENO: result: no" >&5
24601 echo "${ECHO_T}no" >&6; }
24602 fi
24603
24604
24605   test -n "$COLLATEINDEX" && break
24606 done
24607
24608 else
24609   for ac_prog in collateindex.pl
24610 do
24611   # Extract the first word of "$ac_prog", so it can be a program name with args.
24612 set dummy $ac_prog; ac_word=$2
24613 { echo "$as_me:$LINENO: checking for $ac_word" >&5
24614 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
24615 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
24616   echo $ECHO_N "(cached) $ECHO_C" >&6
24617 else
24618   case $COLLATEINDEX in
24619   [\\/]* | ?:[\\/]*)
24620   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
24621   ;;
24622   *)
24623   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24624 for as_dir in $PATH
24625 do
24626   IFS=$as_save_IFS
24627   test -z "$as_dir" && as_dir=.
24628   for ac_exec_ext in '' $ac_executable_extensions; do
24629   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24630     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
24631     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24632     break 2
24633   fi
24634 done
24635 done
24636 IFS=$as_save_IFS
24637
24638   ;;
24639 esac
24640 fi
24641 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
24642 if test -n "$COLLATEINDEX"; then
24643   { echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
24644 echo "${ECHO_T}$COLLATEINDEX" >&6; }
24645 else
24646   { echo "$as_me:$LINENO: result: no" >&5
24647 echo "${ECHO_T}no" >&6; }
24648 fi
24649
24650
24651   test -n "$COLLATEINDEX" && break
24652 done
24653
24654 fi
24655 for ac_prog in sgmlspl
24656 do
24657   # Extract the first word of "$ac_prog", so it can be a program name with args.
24658 set dummy $ac_prog; ac_word=$2
24659 { echo "$as_me:$LINENO: checking for $ac_word" >&5
24660 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
24661 if test "${ac_cv_prog_SGMLSPL+set}" = set; then
24662   echo $ECHO_N "(cached) $ECHO_C" >&6
24663 else
24664   if test -n "$SGMLSPL"; then
24665   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
24666 else
24667 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24668 for as_dir in $PATH
24669 do
24670   IFS=$as_save_IFS
24671   test -z "$as_dir" && as_dir=.
24672   for ac_exec_ext in '' $ac_executable_extensions; do
24673   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24674     ac_cv_prog_SGMLSPL="$ac_prog"
24675     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24676     break 2
24677   fi
24678 done
24679 done
24680 IFS=$as_save_IFS
24681
24682 fi
24683 fi
24684 SGMLSPL=$ac_cv_prog_SGMLSPL
24685 if test -n "$SGMLSPL"; then
24686   { echo "$as_me:$LINENO: result: $SGMLSPL" >&5
24687 echo "${ECHO_T}$SGMLSPL" >&6; }
24688 else
24689   { echo "$as_me:$LINENO: result: no" >&5
24690 echo "${ECHO_T}no" >&6; }
24691 fi
24692
24693
24694   test -n "$SGMLSPL" && break
24695 done
24696
24697
24698 # Thread testing
24699
24700 # We have to run the thread test near the end so we have all our symbols
24701 # defined.  Cross compiling throws a warning.
24702 #
24703 if test "$enable_thread_safety_force" = yes; then
24704 if test "$PORTNAME" != "win32"
24705 then
24706   { echo "$as_me:$LINENO: WARNING:
24707 *** Skipping thread test program.  --enable-thread-safety-force was used.
24708 *** Run the program in src/test/thread on the your machine and add proper
24709 *** locking function calls to your applications to guarantee thread safety.
24710 " >&5
24711 echo "$as_me: WARNING:
24712 *** Skipping thread test program.  --enable-thread-safety-force was used.
24713 *** Run the program in src/test/thread on the your machine and add proper
24714 *** locking function calls to your applications to guarantee thread safety.
24715 " >&2;}
24716 else
24717 { echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
24718 echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
24719 fi
24720 elif test "$enable_thread_safety" = yes; then
24721 if test "$PORTNAME" != "win32"
24722 then
24723 { echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
24724 echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6; }
24725
24726 _CFLAGS="$CFLAGS"
24727 _LIBS="$LIBS"
24728 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
24729 LIBS="$LIBS $PTHREAD_LIBS"
24730 if test "$cross_compiling" = yes; then
24731   { echo "$as_me:$LINENO: result: maybe" >&5
24732 echo "${ECHO_T}maybe" >&6; }
24733   { echo "$as_me:$LINENO: WARNING:
24734 *** Skipping thread test program because of cross-compile build.
24735 *** Run the program in src/test/thread on the target machine.
24736 " >&5
24737 echo "$as_me: WARNING:
24738 *** Skipping thread test program because of cross-compile build.
24739 *** Run the program in src/test/thread on the target machine.
24740 " >&2;}
24741 else
24742   cat >conftest.$ac_ext <<_ACEOF
24743 /* confdefs.h.  */
24744 _ACEOF
24745 cat confdefs.h >>conftest.$ac_ext
24746 cat >>conftest.$ac_ext <<_ACEOF
24747 /* end confdefs.h.  */
24748 #include "$srcdir/src/test/thread/thread_test.c"
24749 _ACEOF
24750 rm -f conftest$ac_exeext
24751 if { (ac_try="$ac_link"
24752 case "(($ac_try" in
24753   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24754   *) ac_try_echo=$ac_try;;
24755 esac
24756 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24757   (eval "$ac_link") 2>&5
24758   ac_status=$?
24759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24760   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24761   { (case "(($ac_try" in
24762   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24763   *) ac_try_echo=$ac_try;;
24764 esac
24765 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24766   (eval "$ac_try") 2>&5
24767   ac_status=$?
24768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24769   (exit $ac_status); }; }; then
24770   { echo "$as_me:$LINENO: result: yes" >&5
24771 echo "${ECHO_T}yes" >&6; }
24772 else
24773   echo "$as_me: program exited with status $ac_status" >&5
24774 echo "$as_me: failed program was:" >&5
24775 sed 's/^/| /' conftest.$ac_ext >&5
24776
24777 ( exit $ac_status )
24778 { echo "$as_me:$LINENO: result: no" >&5
24779 echo "${ECHO_T}no" >&6; }
24780   { { echo "$as_me:$LINENO: error: thread test program failed
24781 This platform is not thread-safe.  Check the file 'config.log'for the
24782 exact reason.
24783
24784 You can use the configure option --enable-thread-safety-force to force
24785 threads to be enabled.  But you must then run the program in
24786 src/test/thread and add locking function calls to your applications to
24787 guarantee thread safety." >&5
24788 echo "$as_me: error: thread test program failed
24789 This platform is not thread-safe.  Check the file 'config.log'for the
24790 exact reason.
24791
24792 You can use the configure option --enable-thread-safety-force to force
24793 threads to be enabled.  But you must then run the program in
24794 src/test/thread and add locking function calls to your applications to
24795 guarantee thread safety." >&2;}
24796    { (exit 1); exit 1; }; }
24797 fi
24798 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24799 fi
24800
24801
24802 CFLAGS="$_CFLAGS"
24803 LIBS="$_LIBS"
24804 else
24805 { echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
24806 echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
24807 fi
24808 fi
24809
24810 # prepare build tree if outside source tree
24811 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
24812 # Note 2: /bin/pwd might be better than shell's built-in at getting
24813 #         a symlink-free name.
24814 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
24815   vpath_build=no
24816 else
24817   vpath_build=yes
24818   if test "$no_create" != yes; then
24819     echo $ECHO_N "preparing build tree... $ECHO_C" >&6
24820     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
24821     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
24822       || { { echo "$as_me:$LINENO: error: failed" >&5
24823 echo "$as_me: error: failed" >&2;}
24824    { (exit 1); exit 1; }; }
24825     { echo "$as_me:$LINENO: result: done" >&5
24826 echo "${ECHO_T}done" >&6; }
24827   fi
24828 fi
24829
24830
24831
24832 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
24833
24834
24835 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}"
24836
24837
24838 if test "$PORTNAME" = "win32"; then
24839 ac_config_commands="$ac_config_commands check_win32_symlinks"
24840
24841 fi
24842
24843 ac_config_headers="$ac_config_headers src/include/pg_config.h"
24844
24845
24846 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
24847
24848
24849 cat >confcache <<\_ACEOF
24850 # This file is a shell script that caches the results of configure
24851 # tests run on this system so they can be shared between configure
24852 # scripts and configure runs, see configure's option --config-cache.
24853 # It is not useful on other systems.  If it contains results you don't
24854 # want to keep, you may remove or edit it.
24855 #
24856 # config.status only pays attention to the cache file if you give it
24857 # the --recheck option to rerun configure.
24858 #
24859 # `ac_cv_env_foo' variables (set or unset) will be overridden when
24860 # loading this file, other *unset* `ac_cv_foo' will be assigned the
24861 # following values.
24862
24863 _ACEOF
24864
24865 # The following way of writing the cache mishandles newlines in values,
24866 # but we know of no workaround that is simple, portable, and efficient.
24867 # So, we kill variables containing newlines.
24868 # Ultrix sh set writes to stderr and can't be redirected directly,
24869 # and sets the high bit in the cache file unless we assign to the vars.
24870 (
24871   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24872     eval ac_val=\$$ac_var
24873     case $ac_val in #(
24874     *${as_nl}*)
24875       case $ac_var in #(
24876       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24877 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24878       esac
24879       case $ac_var in #(
24880       _ | IFS | as_nl) ;; #(
24881       *) $as_unset $ac_var ;;
24882       esac ;;
24883     esac
24884   done
24885
24886   (set) 2>&1 |
24887     case $as_nl`(ac_space=' '; set) 2>&1` in #(
24888     *${as_nl}ac_space=\ *)
24889       # `set' does not quote correctly, so add quotes (double-quote
24890       # substitution turns \\\\ into \\, and sed turns \\ into \).
24891       sed -n \
24892         "s/'/'\\\\''/g;
24893           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24894       ;; #(
24895     *)
24896       # `set' quotes correctly as required by POSIX, so do not add quotes.
24897       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
24898       ;;
24899     esac |
24900     sort
24901 ) |
24902   sed '
24903      /^ac_cv_env_/b end
24904      t clear
24905      :clear
24906      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24907      t end
24908      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24909      :end' >>confcache
24910 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24911   if test -w "$cache_file"; then
24912     test "x$cache_file" != "x/dev/null" &&
24913       { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24914 echo "$as_me: updating cache $cache_file" >&6;}
24915     cat confcache >$cache_file
24916   else
24917     { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24918 echo "$as_me: not updating unwritable cache $cache_file" >&6;}
24919   fi
24920 fi
24921 rm -f confcache
24922
24923 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24924 # Let make expand exec_prefix.
24925 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24926
24927 DEFS=-DHAVE_CONFIG_H
24928
24929 ac_libobjs=
24930 ac_ltlibobjs=
24931 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24932   # 1. Remove the extension, and $U if already installed.
24933   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24934   ac_i=`echo "$ac_i" | sed "$ac_script"`
24935   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
24936   #    will be set to the directory where LIBOBJS objects are built.
24937   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24938   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
24939 done
24940 LIBOBJS=$ac_libobjs
24941
24942 LTLIBOBJS=$ac_ltlibobjs
24943
24944
24945
24946 : ${CONFIG_STATUS=./config.status}
24947 ac_clean_files_save=$ac_clean_files
24948 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24949 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
24950 echo "$as_me: creating $CONFIG_STATUS" >&6;}
24951 cat >$CONFIG_STATUS <<_ACEOF
24952 #! $SHELL
24953 # Generated by $as_me.
24954 # Run this file to recreate the current configuration.
24955 # Compiler output produced by configure, useful for debugging
24956 # configure, is in config.log if it exists.
24957
24958 debug=false
24959 ac_cs_recheck=false
24960 ac_cs_silent=false
24961 SHELL=\${CONFIG_SHELL-$SHELL}
24962 _ACEOF
24963
24964 cat >>$CONFIG_STATUS <<\_ACEOF
24965 ## --------------------- ##
24966 ## M4sh Initialization.  ##
24967 ## --------------------- ##
24968
24969 # Be more Bourne compatible
24970 DUALCASE=1; export DUALCASE # for MKS sh
24971 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24972   emulate sh
24973   NULLCMD=:
24974   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24975   # is contrary to our usage.  Disable this feature.
24976   alias -g '${1+"$@"}'='"$@"'
24977   setopt NO_GLOB_SUBST
24978 else
24979   case `(set -o) 2>/dev/null` in
24980   *posix*) set -o posix ;;
24981 esac
24982
24983 fi
24984
24985
24986
24987
24988 # PATH needs CR
24989 # Avoid depending upon Character Ranges.
24990 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24991 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24992 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24993 as_cr_digits='0123456789'
24994 as_cr_alnum=$as_cr_Letters$as_cr_digits
24995
24996 # The user is always right.
24997 if test "${PATH_SEPARATOR+set}" != set; then
24998   echo "#! /bin/sh" >conf$$.sh
24999   echo  "exit 0"   >>conf$$.sh
25000   chmod +x conf$$.sh
25001   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
25002     PATH_SEPARATOR=';'
25003   else
25004     PATH_SEPARATOR=:
25005   fi
25006   rm -f conf$$.sh
25007 fi
25008
25009 # Support unset when possible.
25010 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
25011   as_unset=unset
25012 else
25013   as_unset=false
25014 fi
25015
25016
25017 # IFS
25018 # We need space, tab and new line, in precisely that order.  Quoting is
25019 # there to prevent editors from complaining about space-tab.
25020 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
25021 # splitting by setting IFS to empty value.)
25022 as_nl='
25023 '
25024 IFS=" ""        $as_nl"
25025
25026 # Find who we are.  Look in the path if we contain no directory separator.
25027 case $0 in
25028   *[\\/]* ) as_myself=$0 ;;
25029   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25030 for as_dir in $PATH
25031 do
25032   IFS=$as_save_IFS
25033   test -z "$as_dir" && as_dir=.
25034   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25035 done
25036 IFS=$as_save_IFS
25037
25038      ;;
25039 esac
25040 # We did not find ourselves, most probably we were run as `sh COMMAND'
25041 # in which case we are not to be found in the path.
25042 if test "x$as_myself" = x; then
25043   as_myself=$0
25044 fi
25045 if test ! -f "$as_myself"; then
25046   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25047   { (exit 1); exit 1; }
25048 fi
25049
25050 # Work around bugs in pre-3.0 UWIN ksh.
25051 for as_var in ENV MAIL MAILPATH
25052 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25053 done
25054 PS1='$ '
25055 PS2='> '
25056 PS4='+ '
25057
25058 # NLS nuisances.
25059 for as_var in \
25060   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
25061   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
25062   LC_TELEPHONE LC_TIME
25063 do
25064   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
25065     eval $as_var=C; export $as_var
25066   else
25067     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25068   fi
25069 done
25070
25071 # Required to use basename.
25072 if expr a : '\(a\)' >/dev/null 2>&1 &&
25073    test "X`expr 00001 : '.*\(...\)'`" = X001; then
25074   as_expr=expr
25075 else
25076   as_expr=false
25077 fi
25078
25079 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25080   as_basename=basename
25081 else
25082   as_basename=false
25083 fi
25084
25085
25086 # Name of the executable.
25087 as_me=`$as_basename -- "$0" ||
25088 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25089          X"$0" : 'X\(//\)$' \| \
25090          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25091 echo X/"$0" |
25092     sed '/^.*\/\([^/][^/]*\)\/*$/{
25093             s//\1/
25094             q
25095           }
25096           /^X\/\(\/\/\)$/{
25097             s//\1/
25098             q
25099           }
25100           /^X\/\(\/\).*/{
25101             s//\1/
25102             q
25103           }
25104           s/.*/./; q'`
25105
25106 # CDPATH.
25107 $as_unset CDPATH
25108
25109
25110
25111   as_lineno_1=$LINENO
25112   as_lineno_2=$LINENO
25113   test "x$as_lineno_1" != "x$as_lineno_2" &&
25114   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
25115
25116   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
25117   # uniformly replaced by the line number.  The first 'sed' inserts a
25118   # line-number line after each line using $LINENO; the second 'sed'
25119   # does the real work.  The second script uses 'N' to pair each
25120   # line-number line with the line containing $LINENO, and appends
25121   # trailing '-' during substitution so that $LINENO is not a special
25122   # case at line end.
25123   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
25124   # scripts with optimization help from Paolo Bonzini.  Blame Lee
25125   # E. McMahon (1931-1989) for sed's syntax.  :-)
25126   sed -n '
25127     p
25128     /[$]LINENO/=
25129   ' <$as_myself |
25130     sed '
25131       s/[$]LINENO.*/&-/
25132       t lineno
25133       b
25134       :lineno
25135       N
25136       :loop
25137       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
25138       t loop
25139       s/-\n.*//
25140     ' >$as_me.lineno &&
25141   chmod +x "$as_me.lineno" ||
25142     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
25143    { (exit 1); exit 1; }; }
25144
25145   # Don't try to exec as it changes $[0], causing all sort of problems
25146   # (the dirname of $[0] is not the place where we might find the
25147   # original and so on.  Autoconf is especially sensitive to this).
25148   . "./$as_me.lineno"
25149   # Exit status is that of the last command.
25150   exit
25151 }
25152
25153
25154 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25155   as_dirname=dirname
25156 else
25157   as_dirname=false
25158 fi
25159
25160 ECHO_C= ECHO_N= ECHO_T=
25161 case `echo -n x` in
25162 -n*)
25163   case `echo 'x\c'` in
25164   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
25165   *)   ECHO_C='\c';;
25166   esac;;
25167 *)
25168   ECHO_N='-n';;
25169 esac
25170
25171 if expr a : '\(a\)' >/dev/null 2>&1 &&
25172    test "X`expr 00001 : '.*\(...\)'`" = X001; then
25173   as_expr=expr
25174 else
25175   as_expr=false
25176 fi
25177
25178 rm -f conf$$ conf$$.exe conf$$.file
25179 if test -d conf$$.dir; then
25180   rm -f conf$$.dir/conf$$.file
25181 else
25182   rm -f conf$$.dir
25183   mkdir conf$$.dir
25184 fi
25185 echo >conf$$.file
25186 if ln -s conf$$.file conf$$ 2>/dev/null; then
25187   as_ln_s='ln -s'
25188   # ... but there are two gotchas:
25189   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25190   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25191   # In both cases, we have to default to `cp -p'.
25192   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
25193     as_ln_s='cp -p'
25194 elif ln conf$$.file conf$$ 2>/dev/null; then
25195   as_ln_s=ln
25196 else
25197   as_ln_s='cp -p'
25198 fi
25199 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25200 rmdir conf$$.dir 2>/dev/null
25201
25202 if mkdir -p . 2>/dev/null; then
25203   as_mkdir_p=:
25204 else
25205   test -d ./-p && rmdir ./-p
25206   as_mkdir_p=false
25207 fi
25208
25209 if test -x / >/dev/null 2>&1; then
25210   as_test_x='test -x'
25211 else
25212   if ls -dL / >/dev/null 2>&1; then
25213     as_ls_L_option=L
25214   else
25215     as_ls_L_option=
25216   fi
25217   as_test_x='
25218     eval sh -c '\''
25219       if test -d "$1"; then
25220         test -d "$1/.";
25221       else
25222         case $1 in
25223         -*)set "./$1";;
25224         esac;
25225         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
25226         ???[sx]*):;;*)false;;esac;fi
25227     '\'' sh
25228   '
25229 fi
25230 as_executable_p=$as_test_x
25231
25232 # Sed expression to map a string onto a valid CPP name.
25233 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
25234
25235 # Sed expression to map a string onto a valid variable name.
25236 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
25237
25238
25239 exec 6>&1
25240
25241 # Save the log message, to keep $[0] and so on meaningful, and to
25242 # report actual input values of CONFIG_FILES etc. instead of their
25243 # values after options handling.
25244 ac_log="
25245 This file was extended by PostgreSQL $as_me 8.4devel, which was
25246 generated by GNU Autoconf 2.61.  Invocation command line was
25247
25248   CONFIG_FILES    = $CONFIG_FILES
25249   CONFIG_HEADERS  = $CONFIG_HEADERS
25250   CONFIG_LINKS    = $CONFIG_LINKS
25251   CONFIG_COMMANDS = $CONFIG_COMMANDS
25252   $ $0 $@
25253
25254 on `(hostname || uname -n) 2>/dev/null | sed 1q`
25255 "
25256
25257 _ACEOF
25258
25259 cat >>$CONFIG_STATUS <<_ACEOF
25260 # Files that config.status was made for.
25261 config_files="$ac_config_files"
25262 config_headers="$ac_config_headers"
25263 config_links="$ac_config_links"
25264 config_commands="$ac_config_commands"
25265
25266 _ACEOF
25267
25268 cat >>$CONFIG_STATUS <<\_ACEOF
25269 ac_cs_usage="\
25270 \`$as_me' instantiates files from templates according to the
25271 current configuration.
25272
25273 Usage: $0 [OPTIONS] [FILE]...
25274
25275   -h, --help       print this help, then exit
25276   -V, --version    print version number and configuration settings, then exit
25277   -q, --quiet      do not print progress messages
25278   -d, --debug      don't remove temporary files
25279       --recheck    update $as_me by reconfiguring in the same conditions
25280   --file=FILE[:TEMPLATE]
25281                    instantiate the configuration file FILE
25282   --header=FILE[:TEMPLATE]
25283                    instantiate the configuration header FILE
25284
25285 Configuration files:
25286 $config_files
25287
25288 Configuration headers:
25289 $config_headers
25290
25291 Configuration links:
25292 $config_links
25293
25294 Configuration commands:
25295 $config_commands
25296
25297 Report bugs to <bug-autoconf@gnu.org>."
25298
25299 _ACEOF
25300 cat >>$CONFIG_STATUS <<_ACEOF
25301 ac_cs_version="\\
25302 PostgreSQL config.status 8.4devel
25303 configured by $0, generated by GNU Autoconf 2.61,
25304   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
25305
25306 Copyright (C) 2006 Free Software Foundation, Inc.
25307 This config.status script is free software; the Free Software Foundation
25308 gives unlimited permission to copy, distribute and modify it."
25309
25310 ac_pwd='$ac_pwd'
25311 srcdir='$srcdir'
25312 _ACEOF
25313
25314 cat >>$CONFIG_STATUS <<\_ACEOF
25315 # If no file are specified by the user, then we need to provide default
25316 # value.  By we need to know if files were specified by the user.
25317 ac_need_defaults=:
25318 while test $# != 0
25319 do
25320   case $1 in
25321   --*=*)
25322     ac_option=`expr "X$1" : 'X\([^=]*\)='`
25323     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
25324     ac_shift=:
25325     ;;
25326   *)
25327     ac_option=$1
25328     ac_optarg=$2
25329     ac_shift=shift
25330     ;;
25331   esac
25332
25333   case $ac_option in
25334   # Handling of the options.
25335   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25336     ac_cs_recheck=: ;;
25337   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25338     echo "$ac_cs_version"; exit ;;
25339   --debug | --debu | --deb | --de | --d | -d )
25340     debug=: ;;
25341   --file | --fil | --fi | --f )
25342     $ac_shift
25343     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
25344     ac_need_defaults=false;;
25345   --header | --heade | --head | --hea )
25346     $ac_shift
25347     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
25348     ac_need_defaults=false;;
25349   --he | --h)
25350     # Conflict between --help and --header
25351     { echo "$as_me: error: ambiguous option: $1
25352 Try \`$0 --help' for more information." >&2
25353    { (exit 1); exit 1; }; };;
25354   --help | --hel | -h )
25355     echo "$ac_cs_usage"; exit ;;
25356   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25357   | -silent | --silent | --silen | --sile | --sil | --si | --s)
25358     ac_cs_silent=: ;;
25359
25360   # This is an error.
25361   -*) { echo "$as_me: error: unrecognized option: $1
25362 Try \`$0 --help' for more information." >&2
25363    { (exit 1); exit 1; }; } ;;
25364
25365   *) ac_config_targets="$ac_config_targets $1"
25366      ac_need_defaults=false ;;
25367
25368   esac
25369   shift
25370 done
25371
25372 ac_configure_extra_args=
25373
25374 if $ac_cs_silent; then
25375   exec 6>/dev/null
25376   ac_configure_extra_args="$ac_configure_extra_args --silent"
25377 fi
25378
25379 _ACEOF
25380 cat >>$CONFIG_STATUS <<_ACEOF
25381 if \$ac_cs_recheck; then
25382   echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
25383   CONFIG_SHELL=$SHELL
25384   export CONFIG_SHELL
25385   exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
25386 fi
25387
25388 _ACEOF
25389 cat >>$CONFIG_STATUS <<\_ACEOF
25390 exec 5>>config.log
25391 {
25392   echo
25393   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25394 ## Running $as_me. ##
25395 _ASBOX
25396   echo "$ac_log"
25397 } >&5
25398
25399 _ACEOF
25400 cat >>$CONFIG_STATUS <<_ACEOF
25401 _ACEOF
25402
25403 cat >>$CONFIG_STATUS <<\_ACEOF
25404
25405 # Handling of arguments.
25406 for ac_config_target in $ac_config_targets
25407 do
25408   case $ac_config_target in
25409     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
25410     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
25411     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
25412     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
25413     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
25414     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
25415     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
25416     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
25417     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
25418     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
25419     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
25420     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
25421
25422   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
25423 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25424    { (exit 1); exit 1; }; };;
25425   esac
25426 done
25427
25428
25429 # If the user did not use the arguments to specify the items to instantiate,
25430 # then the envvar interface is used.  Set only those that are not.
25431 # We use the long form for the default assignment because of an extremely
25432 # bizarre bug on SunOS 4.1.3.
25433 if $ac_need_defaults; then
25434   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25435   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25436   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
25437   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25438 fi
25439
25440 # Have a temporary directory for convenience.  Make it in the build tree
25441 # simply because there is no reason against having it here, and in addition,
25442 # creating and moving files from /tmp can sometimes cause problems.
25443 # Hook for its removal unless debugging.
25444 # Note that there is a small window in which the directory will not be cleaned:
25445 # after its creation but before its name has been assigned to `$tmp'.
25446 $debug ||
25447 {
25448   tmp=
25449   trap 'exit_status=$?
25450   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25451 ' 0
25452   trap '{ (exit 1); exit 1; }' 1 2 13 15
25453 }
25454 # Create a (secure) tmp directory for tmp files.
25455
25456 {
25457   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
25458   test -n "$tmp" && test -d "$tmp"
25459 }  ||
25460 {
25461   tmp=./conf$$-$RANDOM
25462   (umask 077 && mkdir "$tmp")
25463 } ||
25464 {
25465    echo "$me: cannot create a temporary directory in ." >&2
25466    { (exit 1); exit 1; }
25467 }
25468
25469 #
25470 # Set up the sed scripts for CONFIG_FILES section.
25471 #
25472
25473 # No need to generate the scripts if there are no CONFIG_FILES.
25474 # This happens for instance when ./config.status config.h
25475 if test -n "$CONFIG_FILES"; then
25476
25477 _ACEOF
25478
25479
25480
25481 ac_delim='%!_!# '
25482 for ac_last_try in false false false false false :; do
25483   cat >conf$$subs.sed <<_ACEOF
25484 SHELL!$SHELL$ac_delim
25485 PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
25486 PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25487 PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25488 PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25489 PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25490 PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25491 exec_prefix!$exec_prefix$ac_delim
25492 prefix!$prefix$ac_delim
25493 program_transform_name!$program_transform_name$ac_delim
25494 bindir!$bindir$ac_delim
25495 sbindir!$sbindir$ac_delim
25496 libexecdir!$libexecdir$ac_delim
25497 datarootdir!$datarootdir$ac_delim
25498 datadir!$datadir$ac_delim
25499 sysconfdir!$sysconfdir$ac_delim
25500 sharedstatedir!$sharedstatedir$ac_delim
25501 localstatedir!$localstatedir$ac_delim
25502 includedir!$includedir$ac_delim
25503 oldincludedir!$oldincludedir$ac_delim
25504 docdir!$docdir$ac_delim
25505 infodir!$infodir$ac_delim
25506 htmldir!$htmldir$ac_delim
25507 dvidir!$dvidir$ac_delim
25508 pdfdir!$pdfdir$ac_delim
25509 psdir!$psdir$ac_delim
25510 libdir!$libdir$ac_delim
25511 localedir!$localedir$ac_delim
25512 mandir!$mandir$ac_delim
25513 DEFS!$DEFS$ac_delim
25514 ECHO_C!$ECHO_C$ac_delim
25515 ECHO_N!$ECHO_N$ac_delim
25516 ECHO_T!$ECHO_T$ac_delim
25517 LIBS!$LIBS$ac_delim
25518 build_alias!$build_alias$ac_delim
25519 host_alias!$host_alias$ac_delim
25520 target_alias!$target_alias$ac_delim
25521 configure_args!$configure_args$ac_delim
25522 build!$build$ac_delim
25523 build_cpu!$build_cpu$ac_delim
25524 build_vendor!$build_vendor$ac_delim
25525 build_os!$build_os$ac_delim
25526 host!$host$ac_delim
25527 host_cpu!$host_cpu$ac_delim
25528 host_vendor!$host_vendor$ac_delim
25529 host_os!$host_os$ac_delim
25530 PORTNAME!$PORTNAME$ac_delim
25531 enable_nls!$enable_nls$ac_delim
25532 WANTED_LANGUAGES!$WANTED_LANGUAGES$ac_delim
25533 default_port!$default_port$ac_delim
25534 enable_shared!$enable_shared$ac_delim
25535 enable_rpath!$enable_rpath$ac_delim
25536 enable_debug!$enable_debug$ac_delim
25537 enable_profiling!$enable_profiling$ac_delim
25538 DTRACE!$DTRACE$ac_delim
25539 DTRACEFLAGS!$DTRACEFLAGS$ac_delim
25540 enable_dtrace!$enable_dtrace$ac_delim
25541 CC!$CC$ac_delim
25542 CFLAGS!$CFLAGS$ac_delim
25543 LDFLAGS!$LDFLAGS$ac_delim
25544 CPPFLAGS!$CPPFLAGS$ac_delim
25545 ac_ct_CC!$ac_ct_CC$ac_delim
25546 EXEEXT!$EXEEXT$ac_delim
25547 OBJEXT!$OBJEXT$ac_delim
25548 CPP!$CPP$ac_delim
25549 GCC!$GCC$ac_delim
25550 TAS!$TAS$ac_delim
25551 autodepend!$autodepend$ac_delim
25552 INCLUDES!$INCLUDES$ac_delim
25553 enable_thread_safety!$enable_thread_safety$ac_delim
25554 with_tcl!$with_tcl$ac_delim
25555 with_perl!$with_perl$ac_delim
25556 with_python!$with_python$ac_delim
25557 with_gssapi!$with_gssapi$ac_delim
25558 with_krb5!$with_krb5$ac_delim
25559 krb_srvtab!$krb_srvtab$ac_delim
25560 with_pam!$with_pam$ac_delim
25561 with_ldap!$with_ldap$ac_delim
25562 with_bonjour!$with_bonjour$ac_delim
25563 with_openssl!$with_openssl$ac_delim
25564 with_ossp_uuid!$with_ossp_uuid$ac_delim
25565 XML2_CONFIG!$XML2_CONFIG$ac_delim
25566 with_libxml!$with_libxml$ac_delim
25567 with_libxslt!$with_libxslt$ac_delim
25568 with_system_tzdata!$with_system_tzdata$ac_delim
25569 with_zlib!$with_zlib$ac_delim
25570 GREP!$GREP$ac_delim
25571 EGREP!$EGREP$ac_delim
25572 ELF_SYS!$ELF_SYS$ac_delim
25573 LDFLAGS_SL!$LDFLAGS_SL$ac_delim
25574 LD!$LD$ac_delim
25575 with_gnu_ld!$with_gnu_ld$ac_delim
25576 ld_R_works!$ld_R_works$ac_delim
25577 RANLIB!$RANLIB$ac_delim
25578 STRIP!$STRIP$ac_delim
25579 STRIP_STATIC_LIB!$STRIP_STATIC_LIB$ac_delim
25580 STRIP_SHARED_LIB!$STRIP_SHARED_LIB$ac_delim
25581 _ACEOF
25582
25583   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
25584     break
25585   elif $ac_last_try; then
25586     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25587 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25588    { (exit 1); exit 1; }; }
25589   else
25590     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25591   fi
25592 done
25593
25594 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25595 if test -n "$ac_eof"; then
25596   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25597   ac_eof=`expr $ac_eof + 1`
25598 fi
25599
25600 cat >>$CONFIG_STATUS <<_ACEOF
25601 cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
25602 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25603 _ACEOF
25604 sed '
25605 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25606 s/^/s,@/; s/!/@,|#_!!_#|/
25607 :n
25608 t n
25609 s/'"$ac_delim"'$/,g/; t
25610 s/$/\\/; p
25611 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25612 ' >>$CONFIG_STATUS <conf$$subs.sed
25613 rm -f conf$$subs.sed
25614 cat >>$CONFIG_STATUS <<_ACEOF
25615 CEOF$ac_eof
25616 _ACEOF
25617
25618
25619 ac_delim='%!_!# '
25620 for ac_last_try in false false false false false :; do
25621   cat >conf$$subs.sed <<_ACEOF
25622 TAR!$TAR$ac_delim
25623 LN_S!$LN_S$ac_delim
25624 AWK!$AWK$ac_delim
25625 YACC!$YACC$ac_delim
25626 YFLAGS!$YFLAGS$ac_delim
25627 FLEX!$FLEX$ac_delim
25628 FLEXFLAGS!$FLEXFLAGS$ac_delim
25629 PERL!$PERL$ac_delim
25630 perl_archlibexp!$perl_archlibexp$ac_delim
25631 perl_privlibexp!$perl_privlibexp$ac_delim
25632 perl_useshrplib!$perl_useshrplib$ac_delim
25633 perl_embed_ldflags!$perl_embed_ldflags$ac_delim
25634 PYTHON!$PYTHON$ac_delim
25635 python_version!$python_version$ac_delim
25636 python_configdir!$python_configdir$ac_delim
25637 python_includespec!$python_includespec$ac_delim
25638 python_libdir!$python_libdir$ac_delim
25639 python_libspec!$python_libspec$ac_delim
25640 python_additional_libs!$python_additional_libs$ac_delim
25641 OSSP_UUID_LIBS!$OSSP_UUID_LIBS$ac_delim
25642 HAVE_IPV6!$HAVE_IPV6$ac_delim
25643 LIBOBJS!$LIBOBJS$ac_delim
25644 acx_pthread_config!$acx_pthread_config$ac_delim
25645 PTHREAD_CC!$PTHREAD_CC$ac_delim
25646 PTHREAD_LIBS!$PTHREAD_LIBS$ac_delim
25647 PTHREAD_CFLAGS!$PTHREAD_CFLAGS$ac_delim
25648 LDAP_LIBS_FE!$LDAP_LIBS_FE$ac_delim
25649 LDAP_LIBS_BE!$LDAP_LIBS_BE$ac_delim
25650 HAVE_POSIX_SIGNALS!$HAVE_POSIX_SIGNALS$ac_delim
25651 MSGFMT!$MSGFMT$ac_delim
25652 MSGMERGE!$MSGMERGE$ac_delim
25653 XGETTEXT!$XGETTEXT$ac_delim
25654 TCLSH!$TCLSH$ac_delim
25655 TCL_CONFIG_SH!$TCL_CONFIG_SH$ac_delim
25656 TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim
25657 TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim
25658 TCL_LIBS!$TCL_LIBS$ac_delim
25659 TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim
25660 TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim
25661 TCL_SHLIB_LD_LIBS!$TCL_SHLIB_LD_LIBS$ac_delim
25662 NSGMLS!$NSGMLS$ac_delim
25663 JADE!$JADE$ac_delim
25664 have_docbook!$have_docbook$ac_delim
25665 DOCBOOKSTYLE!$DOCBOOKSTYLE$ac_delim
25666 COLLATEINDEX!$COLLATEINDEX$ac_delim
25667 SGMLSPL!$SGMLSPL$ac_delim
25668 vpath_build!$vpath_build$ac_delim
25669 LTLIBOBJS!$LTLIBOBJS$ac_delim
25670 _ACEOF
25671
25672   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 48; then
25673     break
25674   elif $ac_last_try; then
25675     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25676 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25677    { (exit 1); exit 1; }; }
25678   else
25679     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25680   fi
25681 done
25682
25683 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25684 if test -n "$ac_eof"; then
25685   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25686   ac_eof=`expr $ac_eof + 1`
25687 fi
25688
25689 cat >>$CONFIG_STATUS <<_ACEOF
25690 cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
25691 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
25692 _ACEOF
25693 sed '
25694 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25695 s/^/s,@/; s/!/@,|#_!!_#|/
25696 :n
25697 t n
25698 s/'"$ac_delim"'$/,g/; t
25699 s/$/\\/; p
25700 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25701 ' >>$CONFIG_STATUS <conf$$subs.sed
25702 rm -f conf$$subs.sed
25703 cat >>$CONFIG_STATUS <<_ACEOF
25704 :end
25705 s/|#_!!_#|//g
25706 CEOF$ac_eof
25707 _ACEOF
25708
25709
25710 # VPATH may cause trouble with some makes, so we remove $(srcdir),
25711 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25712 # trailing colons and then remove the whole line if VPATH becomes empty
25713 # (actually we leave an empty line to preserve line numbers).
25714 if test "x$srcdir" = x.; then
25715   ac_vpsub='/^[  ]*VPATH[        ]*=/{
25716 s/:*\$(srcdir):*/:/
25717 s/:*\${srcdir}:*/:/
25718 s/:*@srcdir@:*/:/
25719 s/^\([^=]*=[     ]*\):*/\1/
25720 s/:*$//
25721 s/^[^=]*=[       ]*$//
25722 }'
25723 fi
25724
25725 cat >>$CONFIG_STATUS <<\_ACEOF
25726 fi # test -n "$CONFIG_FILES"
25727
25728
25729 for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS
25730 do
25731   case $ac_tag in
25732   :[FHLC]) ac_mode=$ac_tag; continue;;
25733   esac
25734   case $ac_mode$ac_tag in
25735   :[FHL]*:*);;
25736   :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
25737 echo "$as_me: error: Invalid tag $ac_tag." >&2;}
25738    { (exit 1); exit 1; }; };;
25739   :[FH]-) ac_tag=-:-;;
25740   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25741   esac
25742   ac_save_IFS=$IFS
25743   IFS=:
25744   set x $ac_tag
25745   IFS=$ac_save_IFS
25746   shift
25747   ac_file=$1
25748   shift
25749
25750   case $ac_mode in
25751   :L) ac_source=$1;;
25752   :[FH])
25753     ac_file_inputs=
25754     for ac_f
25755     do
25756       case $ac_f in
25757       -) ac_f="$tmp/stdin";;
25758       *) # Look for the file first in the build tree, then in the source tree
25759          # (if the path is not absolute).  The absolute path cannot be DOS-style,
25760          # because $ac_f cannot contain `:'.
25761          test -f "$ac_f" ||
25762            case $ac_f in
25763            [\\/$]*) false;;
25764            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25765            esac ||
25766            { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
25767 echo "$as_me: error: cannot find input file: $ac_f" >&2;}
25768    { (exit 1); exit 1; }; };;
25769       esac
25770       ac_file_inputs="$ac_file_inputs $ac_f"
25771     done
25772
25773     # Let's still pretend it is `configure' which instantiates (i.e., don't
25774     # use $as_me), people would be surprised to read:
25775     #    /* config.h.  Generated by config.status.  */
25776     configure_input="Generated from "`IFS=:
25777           echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
25778     if test x"$ac_file" != x-; then
25779       configure_input="$ac_file.  $configure_input"
25780       { echo "$as_me:$LINENO: creating $ac_file" >&5
25781 echo "$as_me: creating $ac_file" >&6;}
25782     fi
25783
25784     case $ac_tag in
25785     *:-:* | *:-) cat >"$tmp/stdin";;
25786     esac
25787     ;;
25788   esac
25789
25790   ac_dir=`$as_dirname -- "$ac_file" ||
25791 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25792          X"$ac_file" : 'X\(//\)[^/]' \| \
25793          X"$ac_file" : 'X\(//\)$' \| \
25794          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
25795 echo X"$ac_file" |
25796     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25797             s//\1/
25798             q
25799           }
25800           /^X\(\/\/\)[^/].*/{
25801             s//\1/
25802             q
25803           }
25804           /^X\(\/\/\)$/{
25805             s//\1/
25806             q
25807           }
25808           /^X\(\/\).*/{
25809             s//\1/
25810             q
25811           }
25812           s/.*/./; q'`
25813   { as_dir="$ac_dir"
25814   case $as_dir in #(
25815   -*) as_dir=./$as_dir;;
25816   esac
25817   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
25818     as_dirs=
25819     while :; do
25820       case $as_dir in #(
25821       *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
25822       *) as_qdir=$as_dir;;
25823       esac
25824       as_dirs="'$as_qdir' $as_dirs"
25825       as_dir=`$as_dirname -- "$as_dir" ||
25826 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25827          X"$as_dir" : 'X\(//\)[^/]' \| \
25828          X"$as_dir" : 'X\(//\)$' \| \
25829          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
25830 echo X"$as_dir" |
25831     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25832             s//\1/
25833             q
25834           }
25835           /^X\(\/\/\)[^/].*/{
25836             s//\1/
25837             q
25838           }
25839           /^X\(\/\/\)$/{
25840             s//\1/
25841             q
25842           }
25843           /^X\(\/\).*/{
25844             s//\1/
25845             q
25846           }
25847           s/.*/./; q'`
25848       test -d "$as_dir" && break
25849     done
25850     test -z "$as_dirs" || eval "mkdir $as_dirs"
25851   } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25852 echo "$as_me: error: cannot create directory $as_dir" >&2;}
25853    { (exit 1); exit 1; }; }; }
25854   ac_builddir=.
25855
25856 case "$ac_dir" in
25857 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25858 *)
25859   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
25860   # A ".." for each directory in $ac_dir_suffix.
25861   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25862   case $ac_top_builddir_sub in
25863   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25864   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25865   esac ;;
25866 esac
25867 ac_abs_top_builddir=$ac_pwd
25868 ac_abs_builddir=$ac_pwd$ac_dir_suffix
25869 # for backward compatibility:
25870 ac_top_builddir=$ac_top_build_prefix
25871
25872 case $srcdir in
25873   .)  # We are building in place.
25874     ac_srcdir=.
25875     ac_top_srcdir=$ac_top_builddir_sub
25876     ac_abs_top_srcdir=$ac_pwd ;;
25877   [\\/]* | ?:[\\/]* )  # Absolute name.
25878     ac_srcdir=$srcdir$ac_dir_suffix;
25879     ac_top_srcdir=$srcdir
25880     ac_abs_top_srcdir=$srcdir ;;
25881   *) # Relative name.
25882     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25883     ac_top_srcdir=$ac_top_build_prefix$srcdir
25884     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
25885 esac
25886 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
25887
25888
25889   case $ac_mode in
25890   :F)
25891   #
25892   # CONFIG_FILE
25893   #
25894
25895 _ACEOF
25896
25897 cat >>$CONFIG_STATUS <<\_ACEOF
25898 # If the template does not know about datarootdir, expand it.
25899 # FIXME: This hack should be removed a few years after 2.60.
25900 ac_datarootdir_hack=; ac_datarootdir_seen=
25901
25902 case `sed -n '/datarootdir/ {
25903   p
25904   q
25905 }
25906 /@datadir@/p
25907 /@docdir@/p
25908 /@infodir@/p
25909 /@localedir@/p
25910 /@mandir@/p
25911 ' $ac_file_inputs` in
25912 *datarootdir*) ac_datarootdir_seen=yes;;
25913 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25914   { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25915 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25916 _ACEOF
25917 cat >>$CONFIG_STATUS <<_ACEOF
25918   ac_datarootdir_hack='
25919   s&@datadir@&$datadir&g
25920   s&@docdir@&$docdir&g
25921   s&@infodir@&$infodir&g
25922   s&@localedir@&$localedir&g
25923   s&@mandir@&$mandir&g
25924     s&\\\${datarootdir}&$datarootdir&g' ;;
25925 esac
25926 _ACEOF
25927
25928 # Neutralize VPATH when `$srcdir' = `.'.
25929 # Shell code in configure.ac might set extrasub.
25930 # FIXME: do we really want to maintain this feature?
25931 cat >>$CONFIG_STATUS <<_ACEOF
25932   sed "$ac_vpsub
25933 $extrasub
25934 _ACEOF
25935 cat >>$CONFIG_STATUS <<\_ACEOF
25936 :t
25937 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25938 s&@configure_input@&$configure_input&;t t
25939 s&@top_builddir@&$ac_top_builddir_sub&;t t
25940 s&@srcdir@&$ac_srcdir&;t t
25941 s&@abs_srcdir@&$ac_abs_srcdir&;t t
25942 s&@top_srcdir@&$ac_top_srcdir&;t t
25943 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25944 s&@builddir@&$ac_builddir&;t t
25945 s&@abs_builddir@&$ac_abs_builddir&;t t
25946 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25947 $ac_datarootdir_hack
25948 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
25949
25950 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25951   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25952   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25953   { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25954 which seems to be undefined.  Please make sure it is defined." >&5
25955 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25956 which seems to be undefined.  Please make sure it is defined." >&2;}
25957
25958   rm -f "$tmp/stdin"
25959   case $ac_file in
25960   -) cat "$tmp/out"; rm -f "$tmp/out";;
25961   *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
25962   esac
25963  ;;
25964   :H)
25965   #
25966   # CONFIG_HEADER
25967   #
25968 _ACEOF
25969
25970 # Transform confdefs.h into a sed script `conftest.defines', that
25971 # substitutes the proper values into config.h.in to produce config.h.
25972 rm -f conftest.defines conftest.tail
25973 # First, append a space to every undef/define line, to ease matching.
25974 echo 's/$/ /' >conftest.defines
25975 # Then, protect against being on the right side of a sed subst, or in
25976 # an unquoted here document, in config.status.  If some macros were
25977 # called several times there might be several #defines for the same
25978 # symbol, which is useless.  But do not sort them, since the last
25979 # AC_DEFINE must be honored.
25980 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25981 # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25982 # NAME is the cpp macro being defined, VALUE is the value it is being given.
25983 # PARAMS is the parameter list in the macro definition--in most cases, it's
25984 # just an empty string.
25985 ac_dA='s,^\\([   #]*\\)[^        ]*\\([  ]*'
25986 ac_dB='\\)[      (].*,\\1define\\2'
25987 ac_dC=' '
25988 ac_dD=' ,'
25989
25990 uniq confdefs.h |
25991   sed -n '
25992         t rset
25993         :rset
25994         s/^[     ]*#[    ]*define[       ][      ]*//
25995         t ok
25996         d
25997         :ok
25998         s/[\\&,]/\\&/g
25999         s/^\('"$ac_word_re"'\)\(([^()]*)\)[      ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
26000         s/^\('"$ac_word_re"'\)[  ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
26001   ' >>conftest.defines
26002
26003 # Remove the space that was appended to ease matching.
26004 # Then replace #undef with comments.  This is necessary, for
26005 # example, in the case of _POSIX_SOURCE, which is predefined and required
26006 # on some systems where configure will not decide to define it.
26007 # (The regexp can be short, since the line contains either #define or #undef.)
26008 echo 's/ $//
26009 s,^[     #]*u.*,/* & */,' >>conftest.defines
26010
26011 # Break up conftest.defines:
26012 ac_max_sed_lines=50
26013
26014 # First sed command is:  sed -f defines.sed $ac_file_inputs >"$tmp/out1"
26015 # Second one is:         sed -f defines.sed "$tmp/out1" >"$tmp/out2"
26016 # Third one will be:     sed -f defines.sed "$tmp/out2" >"$tmp/out1"
26017 # et cetera.
26018 ac_in='$ac_file_inputs'
26019 ac_out='"$tmp/out1"'
26020 ac_nxt='"$tmp/out2"'
26021
26022 while :
26023 do
26024   # Write a here document:
26025     cat >>$CONFIG_STATUS <<_ACEOF
26026     # First, check the format of the line:
26027     cat >"\$tmp/defines.sed" <<\\CEOF
26028 /^[      ]*#[    ]*undef[        ][      ]*$ac_word_re[  ]*\$/b def
26029 /^[      ]*#[    ]*define[       ][      ]*$ac_word_re[(         ]/b def
26030 b
26031 :def
26032 _ACEOF
26033   sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
26034   echo 'CEOF
26035     sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
26036   ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
26037   sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
26038   grep . conftest.tail >/dev/null || break
26039   rm -f conftest.defines
26040   mv conftest.tail conftest.defines
26041 done
26042 rm -f conftest.defines conftest.tail
26043
26044 echo "ac_result=$ac_in" >>$CONFIG_STATUS
26045 cat >>$CONFIG_STATUS <<\_ACEOF
26046   if test x"$ac_file" != x-; then
26047     echo "/* $configure_input  */" >"$tmp/config.h"
26048     cat "$ac_result" >>"$tmp/config.h"
26049     if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
26050       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
26051 echo "$as_me: $ac_file is unchanged" >&6;}
26052     else
26053       rm -f $ac_file
26054       mv "$tmp/config.h" $ac_file
26055     fi
26056   else
26057     echo "/* $configure_input  */"
26058     cat "$ac_result"
26059   fi
26060   rm -f "$tmp/out12"
26061  ;;
26062   :L)
26063   #
26064   # CONFIG_LINK
26065   #
26066
26067   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_file" >&5
26068 echo "$as_me: linking $srcdir/$ac_source to $ac_file" >&6;}
26069
26070   if test ! -r "$srcdir/$ac_source"; then
26071     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
26072 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
26073    { (exit 1); exit 1; }; }
26074   fi
26075   rm -f "$ac_file"
26076
26077   # Try a relative symlink, then a hard link, then a copy.
26078   case $srcdir in
26079   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
26080       *) ac_rel_source=$ac_top_build_prefix$srcdir/$ac_source ;;
26081   esac
26082   ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
26083     ln "$srcdir/$ac_source" "$ac_file" 2>/dev/null ||
26084     cp -p "$srcdir/$ac_source" "$ac_file" ||
26085     { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_file" >&5
26086 echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_file" >&2;}
26087    { (exit 1); exit 1; }; }
26088  ;;
26089   :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
26090 echo "$as_me: executing $ac_file commands" >&6;}
26091  ;;
26092   esac
26093
26094
26095   case $ac_file$ac_mode in
26096     "check_win32_symlinks":C)
26097 # Links sometimes fail undetected on Mingw -
26098 # so here we detect it and warn the user
26099 for FILE in $CONFIG_LINKS
26100  do
26101         # test -e works for symlinks in the MinGW console
26102         test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE -- please fix by hand" >&5
26103 echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
26104  done
26105  ;;
26106     "src/include/pg_config.h":H)
26107 # Update timestamp for pg_config.h (see Makefile.global)
26108 echo >src/include/stamp-h
26109  ;;
26110
26111   esac
26112 done # for ac_tag
26113
26114
26115 { (exit 0); exit 0; }
26116 _ACEOF
26117 chmod +x $CONFIG_STATUS
26118 ac_clean_files=$ac_clean_files_save
26119
26120
26121 # configure is writing to config.log, and then calls config.status.
26122 # config.status does its own redirection, appending to config.log.
26123 # Unfortunately, on DOS this fails, as config.log is still kept open
26124 # by configure, so config.status won't be able to write to it; its
26125 # output is simply discarded.  So we exec the FD to /dev/null,
26126 # effectively closing config.log, so it can be properly (re)opened and
26127 # appended to by config.status.  When coming back to configure, we
26128 # need to make the FD available again.
26129 if test "$no_create" != yes; then
26130   ac_cs_success=:
26131   ac_config_status_args=
26132   test "$silent" = yes &&
26133     ac_config_status_args="$ac_config_status_args --quiet"
26134   exec 5>/dev/null
26135   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
26136   exec 5>>config.log
26137   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26138   # would make configure fail if this is the last instruction.
26139   $ac_cs_success || { (exit 1); exit 1; }
26140 fi
26141
26142
26143 # Warn about unknown options
26144 for pgac_var in `set | sed 's/=.*//' | $EGREP 'with_|enable_'`; do
26145   for pgac_arg in $pgac_args with_gnu_ld; do
26146     if test "$pgac_var" = "$pgac_arg"; then
26147       continue 2
26148     fi
26149   done
26150   pgac_txt=`echo $pgac_var | sed 's/_/-/g'`
26151   { echo "$as_me:$LINENO: WARNING: option ignored: --$pgac_txt" >&5
26152 echo "$as_me: WARNING: option ignored: --$pgac_txt" >&2;}
26153 done