]> granicus.if.org Git - postgresql/blob - configure
Put fseeko check back in old location, in hopes of silencing build warnings.
[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
16413 for ac_func in crypt fseeko getopt getrusage inet_aton random rint srandom strdup strerror strlcat strlcpy strtol strtoul unsetenv
16414 do
16415 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16416 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16417 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16418 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16419   echo $ECHO_N "(cached) $ECHO_C" >&6
16420 else
16421   cat >conftest.$ac_ext <<_ACEOF
16422 /* confdefs.h.  */
16423 _ACEOF
16424 cat confdefs.h >>conftest.$ac_ext
16425 cat >>conftest.$ac_ext <<_ACEOF
16426 /* end confdefs.h.  */
16427 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16428    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16429 #define $ac_func innocuous_$ac_func
16430
16431 /* System header to define __stub macros and hopefully few prototypes,
16432     which can conflict with char $ac_func (); below.
16433     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16434     <limits.h> exists even on freestanding compilers.  */
16435
16436 #ifdef __STDC__
16437 # include <limits.h>
16438 #else
16439 # include <assert.h>
16440 #endif
16441
16442 #undef $ac_func
16443
16444 /* Override any GCC internal prototype to avoid an error.
16445    Use char because int might match the return type of a GCC
16446    builtin and then its argument prototype would still apply.  */
16447 #ifdef __cplusplus
16448 extern "C"
16449 #endif
16450 char $ac_func ();
16451 /* The GNU C library defines this for functions which it implements
16452     to always fail with ENOSYS.  Some functions are actually named
16453     something starting with __ and the normal name is an alias.  */
16454 #if defined __stub_$ac_func || defined __stub___$ac_func
16455 choke me
16456 #endif
16457
16458 int
16459 main ()
16460 {
16461 return $ac_func ();
16462   ;
16463   return 0;
16464 }
16465 _ACEOF
16466 rm -f conftest.$ac_objext conftest$ac_exeext
16467 if { (ac_try="$ac_link"
16468 case "(($ac_try" in
16469   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16470   *) ac_try_echo=$ac_try;;
16471 esac
16472 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16473   (eval "$ac_link") 2>conftest.er1
16474   ac_status=$?
16475   grep -v '^ *+' conftest.er1 >conftest.err
16476   rm -f conftest.er1
16477   cat conftest.err >&5
16478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16479   (exit $ac_status); } && {
16480          test -z "$ac_c_werror_flag" ||
16481          test ! -s conftest.err
16482        } && test -s conftest$ac_exeext &&
16483        $as_test_x conftest$ac_exeext; then
16484   eval "$as_ac_var=yes"
16485 else
16486   echo "$as_me: failed program was:" >&5
16487 sed 's/^/| /' conftest.$ac_ext >&5
16488
16489         eval "$as_ac_var=no"
16490 fi
16491
16492 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16493       conftest$ac_exeext conftest.$ac_ext
16494 fi
16495 ac_res=`eval echo '${'$as_ac_var'}'`
16496                { echo "$as_me:$LINENO: result: $ac_res" >&5
16497 echo "${ECHO_T}$ac_res" >&6; }
16498 if test `eval echo '${'$as_ac_var'}'` = yes; then
16499   cat >>confdefs.h <<_ACEOF
16500 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16501 _ACEOF
16502
16503 else
16504   case " $LIBOBJS " in
16505   *" $ac_func.$ac_objext "* ) ;;
16506   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
16507  ;;
16508 esac
16509
16510 fi
16511 done
16512
16513
16514
16515 LIBS="$pgac_save_LIBS"
16516
16517 # System's version of getaddrinfo(), if any, may be used only if we found
16518 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
16519 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
16520 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
16521 # because we want to use our own getaddrinfo.c on Windows anyway.)
16522 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
16523
16524 for ac_func in getaddrinfo
16525 do
16526 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16527 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16528 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16529 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16530   echo $ECHO_N "(cached) $ECHO_C" >&6
16531 else
16532   cat >conftest.$ac_ext <<_ACEOF
16533 /* confdefs.h.  */
16534 _ACEOF
16535 cat confdefs.h >>conftest.$ac_ext
16536 cat >>conftest.$ac_ext <<_ACEOF
16537 /* end confdefs.h.  */
16538 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16539    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16540 #define $ac_func innocuous_$ac_func
16541
16542 /* System header to define __stub macros and hopefully few prototypes,
16543     which can conflict with char $ac_func (); below.
16544     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16545     <limits.h> exists even on freestanding compilers.  */
16546
16547 #ifdef __STDC__
16548 # include <limits.h>
16549 #else
16550 # include <assert.h>
16551 #endif
16552
16553 #undef $ac_func
16554
16555 /* Override any GCC internal prototype to avoid an error.
16556    Use char because int might match the return type of a GCC
16557    builtin and then its argument prototype would still apply.  */
16558 #ifdef __cplusplus
16559 extern "C"
16560 #endif
16561 char $ac_func ();
16562 /* The GNU C library defines this for functions which it implements
16563     to always fail with ENOSYS.  Some functions are actually named
16564     something starting with __ and the normal name is an alias.  */
16565 #if defined __stub_$ac_func || defined __stub___$ac_func
16566 choke me
16567 #endif
16568
16569 int
16570 main ()
16571 {
16572 return $ac_func ();
16573   ;
16574   return 0;
16575 }
16576 _ACEOF
16577 rm -f conftest.$ac_objext conftest$ac_exeext
16578 if { (ac_try="$ac_link"
16579 case "(($ac_try" in
16580   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16581   *) ac_try_echo=$ac_try;;
16582 esac
16583 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16584   (eval "$ac_link") 2>conftest.er1
16585   ac_status=$?
16586   grep -v '^ *+' conftest.er1 >conftest.err
16587   rm -f conftest.er1
16588   cat conftest.err >&5
16589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16590   (exit $ac_status); } && {
16591          test -z "$ac_c_werror_flag" ||
16592          test ! -s conftest.err
16593        } && test -s conftest$ac_exeext &&
16594        $as_test_x conftest$ac_exeext; then
16595   eval "$as_ac_var=yes"
16596 else
16597   echo "$as_me: failed program was:" >&5
16598 sed 's/^/| /' conftest.$ac_ext >&5
16599
16600         eval "$as_ac_var=no"
16601 fi
16602
16603 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16604       conftest$ac_exeext conftest.$ac_ext
16605 fi
16606 ac_res=`eval echo '${'$as_ac_var'}'`
16607                { echo "$as_me:$LINENO: result: $ac_res" >&5
16608 echo "${ECHO_T}$ac_res" >&6; }
16609 if test `eval echo '${'$as_ac_var'}'` = yes; then
16610   cat >>confdefs.h <<_ACEOF
16611 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16612 _ACEOF
16613
16614 else
16615   case " $LIBOBJS " in
16616   *" $ac_func.$ac_objext "* ) ;;
16617   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
16618  ;;
16619 esac
16620
16621 fi
16622 done
16623
16624
16625 else
16626   case " $LIBOBJS " in
16627   *" getaddrinfo.$ac_objext "* ) ;;
16628   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16629  ;;
16630 esac
16631
16632 fi
16633
16634 # similarly, use system's getopt_long() only if system provides struct option.
16635 if test x"$ac_cv_type_struct_option" = xyes ; then
16636
16637 for ac_func in getopt_long
16638 do
16639 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16640 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16641 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16642 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16643   echo $ECHO_N "(cached) $ECHO_C" >&6
16644 else
16645   cat >conftest.$ac_ext <<_ACEOF
16646 /* confdefs.h.  */
16647 _ACEOF
16648 cat confdefs.h >>conftest.$ac_ext
16649 cat >>conftest.$ac_ext <<_ACEOF
16650 /* end confdefs.h.  */
16651 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16652    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16653 #define $ac_func innocuous_$ac_func
16654
16655 /* System header to define __stub macros and hopefully few prototypes,
16656     which can conflict with char $ac_func (); below.
16657     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16658     <limits.h> exists even on freestanding compilers.  */
16659
16660 #ifdef __STDC__
16661 # include <limits.h>
16662 #else
16663 # include <assert.h>
16664 #endif
16665
16666 #undef $ac_func
16667
16668 /* Override any GCC internal prototype to avoid an error.
16669    Use char because int might match the return type of a GCC
16670    builtin and then its argument prototype would still apply.  */
16671 #ifdef __cplusplus
16672 extern "C"
16673 #endif
16674 char $ac_func ();
16675 /* The GNU C library defines this for functions which it implements
16676     to always fail with ENOSYS.  Some functions are actually named
16677     something starting with __ and the normal name is an alias.  */
16678 #if defined __stub_$ac_func || defined __stub___$ac_func
16679 choke me
16680 #endif
16681
16682 int
16683 main ()
16684 {
16685 return $ac_func ();
16686   ;
16687   return 0;
16688 }
16689 _ACEOF
16690 rm -f conftest.$ac_objext conftest$ac_exeext
16691 if { (ac_try="$ac_link"
16692 case "(($ac_try" in
16693   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16694   *) ac_try_echo=$ac_try;;
16695 esac
16696 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16697   (eval "$ac_link") 2>conftest.er1
16698   ac_status=$?
16699   grep -v '^ *+' conftest.er1 >conftest.err
16700   rm -f conftest.er1
16701   cat conftest.err >&5
16702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16703   (exit $ac_status); } && {
16704          test -z "$ac_c_werror_flag" ||
16705          test ! -s conftest.err
16706        } && test -s conftest$ac_exeext &&
16707        $as_test_x conftest$ac_exeext; then
16708   eval "$as_ac_var=yes"
16709 else
16710   echo "$as_me: failed program was:" >&5
16711 sed 's/^/| /' conftest.$ac_ext >&5
16712
16713         eval "$as_ac_var=no"
16714 fi
16715
16716 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16717       conftest$ac_exeext conftest.$ac_ext
16718 fi
16719 ac_res=`eval echo '${'$as_ac_var'}'`
16720                { echo "$as_me:$LINENO: result: $ac_res" >&5
16721 echo "${ECHO_T}$ac_res" >&6; }
16722 if test `eval echo '${'$as_ac_var'}'` = yes; then
16723   cat >>confdefs.h <<_ACEOF
16724 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16725 _ACEOF
16726
16727 else
16728   case " $LIBOBJS " in
16729   *" $ac_func.$ac_objext "* ) ;;
16730   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
16731  ;;
16732 esac
16733
16734 fi
16735 done
16736
16737
16738 else
16739   case " $LIBOBJS " in
16740   *" getopt_long.$ac_objext "* ) ;;
16741   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16742  ;;
16743 esac
16744
16745 fi
16746
16747 # Win32 support
16748 if test "$PORTNAME" = "win32"; then
16749
16750 for ac_func in gettimeofday
16751 do
16752 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16753 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16754 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16755 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16756   echo $ECHO_N "(cached) $ECHO_C" >&6
16757 else
16758   cat >conftest.$ac_ext <<_ACEOF
16759 /* confdefs.h.  */
16760 _ACEOF
16761 cat confdefs.h >>conftest.$ac_ext
16762 cat >>conftest.$ac_ext <<_ACEOF
16763 /* end confdefs.h.  */
16764 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16765    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16766 #define $ac_func innocuous_$ac_func
16767
16768 /* System header to define __stub macros and hopefully few prototypes,
16769     which can conflict with char $ac_func (); below.
16770     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16771     <limits.h> exists even on freestanding compilers.  */
16772
16773 #ifdef __STDC__
16774 # include <limits.h>
16775 #else
16776 # include <assert.h>
16777 #endif
16778
16779 #undef $ac_func
16780
16781 /* Override any GCC internal prototype to avoid an error.
16782    Use char because int might match the return type of a GCC
16783    builtin and then its argument prototype would still apply.  */
16784 #ifdef __cplusplus
16785 extern "C"
16786 #endif
16787 char $ac_func ();
16788 /* The GNU C library defines this for functions which it implements
16789     to always fail with ENOSYS.  Some functions are actually named
16790     something starting with __ and the normal name is an alias.  */
16791 #if defined __stub_$ac_func || defined __stub___$ac_func
16792 choke me
16793 #endif
16794
16795 int
16796 main ()
16797 {
16798 return $ac_func ();
16799   ;
16800   return 0;
16801 }
16802 _ACEOF
16803 rm -f conftest.$ac_objext conftest$ac_exeext
16804 if { (ac_try="$ac_link"
16805 case "(($ac_try" in
16806   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16807   *) ac_try_echo=$ac_try;;
16808 esac
16809 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16810   (eval "$ac_link") 2>conftest.er1
16811   ac_status=$?
16812   grep -v '^ *+' conftest.er1 >conftest.err
16813   rm -f conftest.er1
16814   cat conftest.err >&5
16815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16816   (exit $ac_status); } && {
16817          test -z "$ac_c_werror_flag" ||
16818          test ! -s conftest.err
16819        } && test -s conftest$ac_exeext &&
16820        $as_test_x conftest$ac_exeext; then
16821   eval "$as_ac_var=yes"
16822 else
16823   echo "$as_me: failed program was:" >&5
16824 sed 's/^/| /' conftest.$ac_ext >&5
16825
16826         eval "$as_ac_var=no"
16827 fi
16828
16829 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16830       conftest$ac_exeext conftest.$ac_ext
16831 fi
16832 ac_res=`eval echo '${'$as_ac_var'}'`
16833                { echo "$as_me:$LINENO: result: $ac_res" >&5
16834 echo "${ECHO_T}$ac_res" >&6; }
16835 if test `eval echo '${'$as_ac_var'}'` = yes; then
16836   cat >>confdefs.h <<_ACEOF
16837 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16838 _ACEOF
16839
16840 else
16841   case " $LIBOBJS " in
16842   *" $ac_func.$ac_objext "* ) ;;
16843   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
16844  ;;
16845 esac
16846
16847 fi
16848 done
16849
16850
16851 case " $LIBOBJS " in
16852   *" kill.$ac_objext "* ) ;;
16853   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16854  ;;
16855 esac
16856
16857 case " $LIBOBJS " in
16858   *" open.$ac_objext "* ) ;;
16859   *) LIBOBJS="$LIBOBJS open.$ac_objext"
16860  ;;
16861 esac
16862
16863 case " $LIBOBJS " in
16864   *" rand.$ac_objext "* ) ;;
16865   *) LIBOBJS="$LIBOBJS rand.$ac_objext"
16866  ;;
16867 esac
16868
16869 case " $LIBOBJS " in
16870   *" win32error.$ac_objext "* ) ;;
16871   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16872  ;;
16873 esac
16874
16875
16876 cat >>confdefs.h <<\_ACEOF
16877 #define HAVE_SYMLINK 1
16878 _ACEOF
16879
16880 fi
16881
16882 if test "$with_readline" = yes; then
16883   { echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
16884 echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6; }
16885 cat >conftest.$ac_ext <<_ACEOF
16886 /* confdefs.h.  */
16887 _ACEOF
16888 cat confdefs.h >>conftest.$ac_ext
16889 cat >>conftest.$ac_ext <<_ACEOF
16890 /* end confdefs.h.  */
16891 #include <stdio.h>
16892 #ifdef HAVE_READLINE_READLINE_H
16893 # include <readline/readline.h>
16894 #elif defined(HAVE_READLINE_H)
16895 # include <readline.h>
16896 #endif
16897
16898 int
16899 main ()
16900 {
16901 rl_completion_append_character = 'x';
16902   ;
16903   return 0;
16904 }
16905 _ACEOF
16906 rm -f conftest.$ac_objext conftest$ac_exeext
16907 if { (ac_try="$ac_link"
16908 case "(($ac_try" in
16909   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16910   *) ac_try_echo=$ac_try;;
16911 esac
16912 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16913   (eval "$ac_link") 2>conftest.er1
16914   ac_status=$?
16915   grep -v '^ *+' conftest.er1 >conftest.err
16916   rm -f conftest.er1
16917   cat conftest.err >&5
16918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16919   (exit $ac_status); } && {
16920          test -z "$ac_c_werror_flag" ||
16921          test ! -s conftest.err
16922        } && test -s conftest$ac_exeext &&
16923        $as_test_x conftest$ac_exeext; then
16924   { echo "$as_me:$LINENO: result: yes" >&5
16925 echo "${ECHO_T}yes" >&6; }
16926
16927 cat >>confdefs.h <<\_ACEOF
16928 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
16929 _ACEOF
16930
16931 else
16932   echo "$as_me: failed program was:" >&5
16933 sed 's/^/| /' conftest.$ac_ext >&5
16934
16935         { echo "$as_me:$LINENO: result: no" >&5
16936 echo "${ECHO_T}no" >&6; }
16937 fi
16938
16939 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16940       conftest$ac_exeext conftest.$ac_ext
16941
16942
16943 for ac_func in rl_completion_matches rl_filename_completion_function
16944 do
16945 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16946 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16947 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16948 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16949   echo $ECHO_N "(cached) $ECHO_C" >&6
16950 else
16951   cat >conftest.$ac_ext <<_ACEOF
16952 /* confdefs.h.  */
16953 _ACEOF
16954 cat confdefs.h >>conftest.$ac_ext
16955 cat >>conftest.$ac_ext <<_ACEOF
16956 /* end confdefs.h.  */
16957 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16958    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16959 #define $ac_func innocuous_$ac_func
16960
16961 /* System header to define __stub macros and hopefully few prototypes,
16962     which can conflict with char $ac_func (); below.
16963     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16964     <limits.h> exists even on freestanding compilers.  */
16965
16966 #ifdef __STDC__
16967 # include <limits.h>
16968 #else
16969 # include <assert.h>
16970 #endif
16971
16972 #undef $ac_func
16973
16974 /* Override any GCC internal prototype to avoid an error.
16975    Use char because int might match the return type of a GCC
16976    builtin and then its argument prototype would still apply.  */
16977 #ifdef __cplusplus
16978 extern "C"
16979 #endif
16980 char $ac_func ();
16981 /* The GNU C library defines this for functions which it implements
16982     to always fail with ENOSYS.  Some functions are actually named
16983     something starting with __ and the normal name is an alias.  */
16984 #if defined __stub_$ac_func || defined __stub___$ac_func
16985 choke me
16986 #endif
16987
16988 int
16989 main ()
16990 {
16991 return $ac_func ();
16992   ;
16993   return 0;
16994 }
16995 _ACEOF
16996 rm -f conftest.$ac_objext conftest$ac_exeext
16997 if { (ac_try="$ac_link"
16998 case "(($ac_try" in
16999   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17000   *) ac_try_echo=$ac_try;;
17001 esac
17002 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17003   (eval "$ac_link") 2>conftest.er1
17004   ac_status=$?
17005   grep -v '^ *+' conftest.er1 >conftest.err
17006   rm -f conftest.er1
17007   cat conftest.err >&5
17008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17009   (exit $ac_status); } && {
17010          test -z "$ac_c_werror_flag" ||
17011          test ! -s conftest.err
17012        } && test -s conftest$ac_exeext &&
17013        $as_test_x conftest$ac_exeext; then
17014   eval "$as_ac_var=yes"
17015 else
17016   echo "$as_me: failed program was:" >&5
17017 sed 's/^/| /' conftest.$ac_ext >&5
17018
17019         eval "$as_ac_var=no"
17020 fi
17021
17022 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17023       conftest$ac_exeext conftest.$ac_ext
17024 fi
17025 ac_res=`eval echo '${'$as_ac_var'}'`
17026                { echo "$as_me:$LINENO: result: $ac_res" >&5
17027 echo "${ECHO_T}$ac_res" >&6; }
17028 if test `eval echo '${'$as_ac_var'}'` = yes; then
17029   cat >>confdefs.h <<_ACEOF
17030 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17031 _ACEOF
17032
17033 fi
17034 done
17035
17036
17037 for ac_func in replace_history_entry
17038 do
17039 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17040 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17041 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17042 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17043   echo $ECHO_N "(cached) $ECHO_C" >&6
17044 else
17045   cat >conftest.$ac_ext <<_ACEOF
17046 /* confdefs.h.  */
17047 _ACEOF
17048 cat confdefs.h >>conftest.$ac_ext
17049 cat >>conftest.$ac_ext <<_ACEOF
17050 /* end confdefs.h.  */
17051 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17052    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17053 #define $ac_func innocuous_$ac_func
17054
17055 /* System header to define __stub macros and hopefully few prototypes,
17056     which can conflict with char $ac_func (); below.
17057     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17058     <limits.h> exists even on freestanding compilers.  */
17059
17060 #ifdef __STDC__
17061 # include <limits.h>
17062 #else
17063 # include <assert.h>
17064 #endif
17065
17066 #undef $ac_func
17067
17068 /* Override any GCC internal prototype to avoid an error.
17069    Use char because int might match the return type of a GCC
17070    builtin and then its argument prototype would still apply.  */
17071 #ifdef __cplusplus
17072 extern "C"
17073 #endif
17074 char $ac_func ();
17075 /* The GNU C library defines this for functions which it implements
17076     to always fail with ENOSYS.  Some functions are actually named
17077     something starting with __ and the normal name is an alias.  */
17078 #if defined __stub_$ac_func || defined __stub___$ac_func
17079 choke me
17080 #endif
17081
17082 int
17083 main ()
17084 {
17085 return $ac_func ();
17086   ;
17087   return 0;
17088 }
17089 _ACEOF
17090 rm -f conftest.$ac_objext conftest$ac_exeext
17091 if { (ac_try="$ac_link"
17092 case "(($ac_try" in
17093   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17094   *) ac_try_echo=$ac_try;;
17095 esac
17096 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17097   (eval "$ac_link") 2>conftest.er1
17098   ac_status=$?
17099   grep -v '^ *+' conftest.er1 >conftest.err
17100   rm -f conftest.er1
17101   cat conftest.err >&5
17102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17103   (exit $ac_status); } && {
17104          test -z "$ac_c_werror_flag" ||
17105          test ! -s conftest.err
17106        } && test -s conftest$ac_exeext &&
17107        $as_test_x conftest$ac_exeext; then
17108   eval "$as_ac_var=yes"
17109 else
17110   echo "$as_me: failed program was:" >&5
17111 sed 's/^/| /' conftest.$ac_ext >&5
17112
17113         eval "$as_ac_var=no"
17114 fi
17115
17116 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17117       conftest$ac_exeext conftest.$ac_ext
17118 fi
17119 ac_res=`eval echo '${'$as_ac_var'}'`
17120                { echo "$as_me:$LINENO: result: $ac_res" >&5
17121 echo "${ECHO_T}$ac_res" >&6; }
17122 if test `eval echo '${'$as_ac_var'}'` = yes; then
17123   cat >>confdefs.h <<_ACEOF
17124 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17125 _ACEOF
17126
17127 fi
17128 done
17129
17130 fi
17131
17132
17133 { echo "$as_me:$LINENO: checking for sigsetjmp" >&5
17134 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6; }
17135 cat >conftest.$ac_ext <<_ACEOF
17136 /* confdefs.h.  */
17137 _ACEOF
17138 cat confdefs.h >>conftest.$ac_ext
17139 cat >>conftest.$ac_ext <<_ACEOF
17140 /* end confdefs.h.  */
17141 #include <setjmp.h>
17142 int
17143 main ()
17144 {
17145 sigjmp_buf x; sigsetjmp(x, 1);
17146   ;
17147   return 0;
17148 }
17149 _ACEOF
17150 rm -f conftest.$ac_objext conftest$ac_exeext
17151 if { (ac_try="$ac_link"
17152 case "(($ac_try" in
17153   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17154   *) ac_try_echo=$ac_try;;
17155 esac
17156 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17157   (eval "$ac_link") 2>conftest.er1
17158   ac_status=$?
17159   grep -v '^ *+' conftest.er1 >conftest.err
17160   rm -f conftest.er1
17161   cat conftest.err >&5
17162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17163   (exit $ac_status); } && {
17164          test -z "$ac_c_werror_flag" ||
17165          test ! -s conftest.err
17166        } && test -s conftest$ac_exeext &&
17167        $as_test_x conftest$ac_exeext; then
17168
17169 cat >>confdefs.h <<\_ACEOF
17170 #define HAVE_SIGSETJMP 1
17171 _ACEOF
17172
17173 { echo "$as_me:$LINENO: result: yes" >&5
17174 echo "${ECHO_T}yes" >&6; }
17175 else
17176   echo "$as_me: failed program was:" >&5
17177 sed 's/^/| /' conftest.$ac_ext >&5
17178
17179         { echo "$as_me:$LINENO: result: no" >&5
17180 echo "${ECHO_T}no" >&6; }
17181 fi
17182
17183 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17184       conftest$ac_exeext conftest.$ac_ext
17185
17186 { echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
17187 echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
17188 if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
17189   echo $ECHO_N "(cached) $ECHO_C" >&6
17190 else
17191   cat >conftest.$ac_ext <<_ACEOF
17192 /* confdefs.h.  */
17193 _ACEOF
17194 cat confdefs.h >>conftest.$ac_ext
17195 cat >>conftest.$ac_ext <<_ACEOF
17196 /* end confdefs.h.  */
17197 #include <signal.h>
17198 /* NetBSD declares sys_siglist in unistd.h.  */
17199 #ifdef HAVE_UNISTD_H
17200 # include <unistd.h>
17201 #endif
17202
17203
17204 int
17205 main ()
17206 {
17207 #ifndef sys_siglist
17208   (void) sys_siglist;
17209 #endif
17210
17211   ;
17212   return 0;
17213 }
17214 _ACEOF
17215 rm -f conftest.$ac_objext
17216 if { (ac_try="$ac_compile"
17217 case "(($ac_try" in
17218   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17219   *) ac_try_echo=$ac_try;;
17220 esac
17221 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17222   (eval "$ac_compile") 2>conftest.er1
17223   ac_status=$?
17224   grep -v '^ *+' conftest.er1 >conftest.err
17225   rm -f conftest.er1
17226   cat conftest.err >&5
17227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17228   (exit $ac_status); } && {
17229          test -z "$ac_c_werror_flag" ||
17230          test ! -s conftest.err
17231        } && test -s conftest.$ac_objext; then
17232   ac_cv_have_decl_sys_siglist=yes
17233 else
17234   echo "$as_me: failed program was:" >&5
17235 sed 's/^/| /' conftest.$ac_ext >&5
17236
17237         ac_cv_have_decl_sys_siglist=no
17238 fi
17239
17240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17241 fi
17242 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
17243 echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
17244 if test $ac_cv_have_decl_sys_siglist = yes; then
17245
17246 cat >>confdefs.h <<_ACEOF
17247 #define HAVE_DECL_SYS_SIGLIST 1
17248 _ACEOF
17249
17250
17251 else
17252   cat >>confdefs.h <<_ACEOF
17253 #define HAVE_DECL_SYS_SIGLIST 0
17254 _ACEOF
17255
17256
17257 fi
17258
17259
17260
17261
17262 { echo "$as_me:$LINENO: checking for syslog" >&5
17263 echo $ECHO_N "checking for syslog... $ECHO_C" >&6; }
17264 if test "${ac_cv_func_syslog+set}" = set; then
17265   echo $ECHO_N "(cached) $ECHO_C" >&6
17266 else
17267   cat >conftest.$ac_ext <<_ACEOF
17268 /* confdefs.h.  */
17269 _ACEOF
17270 cat confdefs.h >>conftest.$ac_ext
17271 cat >>conftest.$ac_ext <<_ACEOF
17272 /* end confdefs.h.  */
17273 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
17274    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17275 #define syslog innocuous_syslog
17276
17277 /* System header to define __stub macros and hopefully few prototypes,
17278     which can conflict with char syslog (); below.
17279     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17280     <limits.h> exists even on freestanding compilers.  */
17281
17282 #ifdef __STDC__
17283 # include <limits.h>
17284 #else
17285 # include <assert.h>
17286 #endif
17287
17288 #undef syslog
17289
17290 /* Override any GCC internal prototype to avoid an error.
17291    Use char because int might match the return type of a GCC
17292    builtin and then its argument prototype would still apply.  */
17293 #ifdef __cplusplus
17294 extern "C"
17295 #endif
17296 char syslog ();
17297 /* The GNU C library defines this for functions which it implements
17298     to always fail with ENOSYS.  Some functions are actually named
17299     something starting with __ and the normal name is an alias.  */
17300 #if defined __stub_syslog || defined __stub___syslog
17301 choke me
17302 #endif
17303
17304 int
17305 main ()
17306 {
17307 return syslog ();
17308   ;
17309   return 0;
17310 }
17311 _ACEOF
17312 rm -f conftest.$ac_objext conftest$ac_exeext
17313 if { (ac_try="$ac_link"
17314 case "(($ac_try" in
17315   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17316   *) ac_try_echo=$ac_try;;
17317 esac
17318 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17319   (eval "$ac_link") 2>conftest.er1
17320   ac_status=$?
17321   grep -v '^ *+' conftest.er1 >conftest.err
17322   rm -f conftest.er1
17323   cat conftest.err >&5
17324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17325   (exit $ac_status); } && {
17326          test -z "$ac_c_werror_flag" ||
17327          test ! -s conftest.err
17328        } && test -s conftest$ac_exeext &&
17329        $as_test_x conftest$ac_exeext; then
17330   ac_cv_func_syslog=yes
17331 else
17332   echo "$as_me: failed program was:" >&5
17333 sed 's/^/| /' conftest.$ac_ext >&5
17334
17335         ac_cv_func_syslog=no
17336 fi
17337
17338 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17339       conftest$ac_exeext conftest.$ac_ext
17340 fi
17341 { echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
17342 echo "${ECHO_T}$ac_cv_func_syslog" >&6; }
17343 if test $ac_cv_func_syslog = yes; then
17344   if test "${ac_cv_header_syslog_h+set}" = set; then
17345   { echo "$as_me:$LINENO: checking for syslog.h" >&5
17346 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6; }
17347 if test "${ac_cv_header_syslog_h+set}" = set; then
17348   echo $ECHO_N "(cached) $ECHO_C" >&6
17349 fi
17350 { echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
17351 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6; }
17352 else
17353   # Is the header compilable?
17354 { echo "$as_me:$LINENO: checking syslog.h usability" >&5
17355 echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6; }
17356 cat >conftest.$ac_ext <<_ACEOF
17357 /* confdefs.h.  */
17358 _ACEOF
17359 cat confdefs.h >>conftest.$ac_ext
17360 cat >>conftest.$ac_ext <<_ACEOF
17361 /* end confdefs.h.  */
17362 $ac_includes_default
17363 #include <syslog.h>
17364 _ACEOF
17365 rm -f conftest.$ac_objext
17366 if { (ac_try="$ac_compile"
17367 case "(($ac_try" in
17368   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17369   *) ac_try_echo=$ac_try;;
17370 esac
17371 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17372   (eval "$ac_compile") 2>conftest.er1
17373   ac_status=$?
17374   grep -v '^ *+' conftest.er1 >conftest.err
17375   rm -f conftest.er1
17376   cat conftest.err >&5
17377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17378   (exit $ac_status); } && {
17379          test -z "$ac_c_werror_flag" ||
17380          test ! -s conftest.err
17381        } && test -s conftest.$ac_objext; then
17382   ac_header_compiler=yes
17383 else
17384   echo "$as_me: failed program was:" >&5
17385 sed 's/^/| /' conftest.$ac_ext >&5
17386
17387         ac_header_compiler=no
17388 fi
17389
17390 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17391 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17392 echo "${ECHO_T}$ac_header_compiler" >&6; }
17393
17394 # Is the header present?
17395 { echo "$as_me:$LINENO: checking syslog.h presence" >&5
17396 echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6; }
17397 cat >conftest.$ac_ext <<_ACEOF
17398 /* confdefs.h.  */
17399 _ACEOF
17400 cat confdefs.h >>conftest.$ac_ext
17401 cat >>conftest.$ac_ext <<_ACEOF
17402 /* end confdefs.h.  */
17403 #include <syslog.h>
17404 _ACEOF
17405 if { (ac_try="$ac_cpp conftest.$ac_ext"
17406 case "(($ac_try" in
17407   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17408   *) ac_try_echo=$ac_try;;
17409 esac
17410 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17411   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17412   ac_status=$?
17413   grep -v '^ *+' conftest.er1 >conftest.err
17414   rm -f conftest.er1
17415   cat conftest.err >&5
17416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17417   (exit $ac_status); } >/dev/null && {
17418          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17419          test ! -s conftest.err
17420        }; then
17421   ac_header_preproc=yes
17422 else
17423   echo "$as_me: failed program was:" >&5
17424 sed 's/^/| /' conftest.$ac_ext >&5
17425
17426   ac_header_preproc=no
17427 fi
17428
17429 rm -f conftest.err conftest.$ac_ext
17430 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17431 echo "${ECHO_T}$ac_header_preproc" >&6; }
17432
17433 # So?  What about this header?
17434 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17435   yes:no: )
17436     { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
17437 echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17438     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
17439 echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
17440     ac_header_preproc=yes
17441     ;;
17442   no:yes:* )
17443     { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
17444 echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
17445     { echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
17446 echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
17447     { echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
17448 echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
17449     { echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
17450 echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17451     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
17452 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
17453     { echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
17454 echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
17455     ( cat <<\_ASBOX
17456 ## ---------------------------------------- ##
17457 ## Report this to pgsql-bugs@postgresql.org ##
17458 ## ---------------------------------------- ##
17459 _ASBOX
17460      ) | sed "s/^/$as_me: WARNING:     /" >&2
17461     ;;
17462 esac
17463 { echo "$as_me:$LINENO: checking for syslog.h" >&5
17464 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6; }
17465 if test "${ac_cv_header_syslog_h+set}" = set; then
17466   echo $ECHO_N "(cached) $ECHO_C" >&6
17467 else
17468   ac_cv_header_syslog_h=$ac_header_preproc
17469 fi
17470 { echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
17471 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6; }
17472
17473 fi
17474 if test $ac_cv_header_syslog_h = yes; then
17475
17476 cat >>confdefs.h <<\_ACEOF
17477 #define HAVE_SYSLOG 1
17478 _ACEOF
17479
17480 fi
17481
17482
17483 fi
17484
17485
17486 { echo "$as_me:$LINENO: checking for optreset" >&5
17487 echo $ECHO_N "checking for optreset... $ECHO_C" >&6; }
17488 if test "${pgac_cv_var_int_optreset+set}" = set; then
17489   echo $ECHO_N "(cached) $ECHO_C" >&6
17490 else
17491   cat >conftest.$ac_ext <<_ACEOF
17492 /* confdefs.h.  */
17493 _ACEOF
17494 cat confdefs.h >>conftest.$ac_ext
17495 cat >>conftest.$ac_ext <<_ACEOF
17496 /* end confdefs.h.  */
17497 #include <unistd.h>
17498 int
17499 main ()
17500 {
17501 extern int optreset; optreset = 1;
17502   ;
17503   return 0;
17504 }
17505 _ACEOF
17506 rm -f conftest.$ac_objext conftest$ac_exeext
17507 if { (ac_try="$ac_link"
17508 case "(($ac_try" in
17509   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17510   *) ac_try_echo=$ac_try;;
17511 esac
17512 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17513   (eval "$ac_link") 2>conftest.er1
17514   ac_status=$?
17515   grep -v '^ *+' conftest.er1 >conftest.err
17516   rm -f conftest.er1
17517   cat conftest.err >&5
17518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17519   (exit $ac_status); } && {
17520          test -z "$ac_c_werror_flag" ||
17521          test ! -s conftest.err
17522        } && test -s conftest$ac_exeext &&
17523        $as_test_x conftest$ac_exeext; then
17524   pgac_cv_var_int_optreset=yes
17525 else
17526   echo "$as_me: failed program was:" >&5
17527 sed 's/^/| /' conftest.$ac_ext >&5
17528
17529         pgac_cv_var_int_optreset=no
17530 fi
17531
17532 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17533       conftest$ac_exeext conftest.$ac_ext
17534 fi
17535 { echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
17536 echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6; }
17537 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
17538
17539 cat >>confdefs.h <<\_ACEOF
17540 #define HAVE_INT_OPTRESET 1
17541 _ACEOF
17542
17543 fi
17544
17545
17546
17547 for ac_func in strtoll strtoq
17548 do
17549 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17550 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17551 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17552 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17553   echo $ECHO_N "(cached) $ECHO_C" >&6
17554 else
17555   cat >conftest.$ac_ext <<_ACEOF
17556 /* confdefs.h.  */
17557 _ACEOF
17558 cat confdefs.h >>conftest.$ac_ext
17559 cat >>conftest.$ac_ext <<_ACEOF
17560 /* end confdefs.h.  */
17561 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17562    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17563 #define $ac_func innocuous_$ac_func
17564
17565 /* System header to define __stub macros and hopefully few prototypes,
17566     which can conflict with char $ac_func (); below.
17567     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17568     <limits.h> exists even on freestanding compilers.  */
17569
17570 #ifdef __STDC__
17571 # include <limits.h>
17572 #else
17573 # include <assert.h>
17574 #endif
17575
17576 #undef $ac_func
17577
17578 /* Override any GCC internal prototype to avoid an error.
17579    Use char because int might match the return type of a GCC
17580    builtin and then its argument prototype would still apply.  */
17581 #ifdef __cplusplus
17582 extern "C"
17583 #endif
17584 char $ac_func ();
17585 /* The GNU C library defines this for functions which it implements
17586     to always fail with ENOSYS.  Some functions are actually named
17587     something starting with __ and the normal name is an alias.  */
17588 #if defined __stub_$ac_func || defined __stub___$ac_func
17589 choke me
17590 #endif
17591
17592 int
17593 main ()
17594 {
17595 return $ac_func ();
17596   ;
17597   return 0;
17598 }
17599 _ACEOF
17600 rm -f conftest.$ac_objext conftest$ac_exeext
17601 if { (ac_try="$ac_link"
17602 case "(($ac_try" in
17603   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17604   *) ac_try_echo=$ac_try;;
17605 esac
17606 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17607   (eval "$ac_link") 2>conftest.er1
17608   ac_status=$?
17609   grep -v '^ *+' conftest.er1 >conftest.err
17610   rm -f conftest.er1
17611   cat conftest.err >&5
17612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17613   (exit $ac_status); } && {
17614          test -z "$ac_c_werror_flag" ||
17615          test ! -s conftest.err
17616        } && test -s conftest$ac_exeext &&
17617        $as_test_x conftest$ac_exeext; then
17618   eval "$as_ac_var=yes"
17619 else
17620   echo "$as_me: failed program was:" >&5
17621 sed 's/^/| /' conftest.$ac_ext >&5
17622
17623         eval "$as_ac_var=no"
17624 fi
17625
17626 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17627       conftest$ac_exeext conftest.$ac_ext
17628 fi
17629 ac_res=`eval echo '${'$as_ac_var'}'`
17630                { echo "$as_me:$LINENO: result: $ac_res" >&5
17631 echo "${ECHO_T}$ac_res" >&6; }
17632 if test `eval echo '${'$as_ac_var'}'` = yes; then
17633   cat >>confdefs.h <<_ACEOF
17634 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17635 _ACEOF
17636  break
17637 fi
17638 done
17639
17640
17641
17642 for ac_func in strtoull strtouq
17643 do
17644 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17645 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17646 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17647 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17648   echo $ECHO_N "(cached) $ECHO_C" >&6
17649 else
17650   cat >conftest.$ac_ext <<_ACEOF
17651 /* confdefs.h.  */
17652 _ACEOF
17653 cat confdefs.h >>conftest.$ac_ext
17654 cat >>conftest.$ac_ext <<_ACEOF
17655 /* end confdefs.h.  */
17656 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17657    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17658 #define $ac_func innocuous_$ac_func
17659
17660 /* System header to define __stub macros and hopefully few prototypes,
17661     which can conflict with char $ac_func (); below.
17662     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17663     <limits.h> exists even on freestanding compilers.  */
17664
17665 #ifdef __STDC__
17666 # include <limits.h>
17667 #else
17668 # include <assert.h>
17669 #endif
17670
17671 #undef $ac_func
17672
17673 /* Override any GCC internal prototype to avoid an error.
17674    Use char because int might match the return type of a GCC
17675    builtin and then its argument prototype would still apply.  */
17676 #ifdef __cplusplus
17677 extern "C"
17678 #endif
17679 char $ac_func ();
17680 /* The GNU C library defines this for functions which it implements
17681     to always fail with ENOSYS.  Some functions are actually named
17682     something starting with __ and the normal name is an alias.  */
17683 #if defined __stub_$ac_func || defined __stub___$ac_func
17684 choke me
17685 #endif
17686
17687 int
17688 main ()
17689 {
17690 return $ac_func ();
17691   ;
17692   return 0;
17693 }
17694 _ACEOF
17695 rm -f conftest.$ac_objext conftest$ac_exeext
17696 if { (ac_try="$ac_link"
17697 case "(($ac_try" in
17698   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17699   *) ac_try_echo=$ac_try;;
17700 esac
17701 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17702   (eval "$ac_link") 2>conftest.er1
17703   ac_status=$?
17704   grep -v '^ *+' conftest.er1 >conftest.err
17705   rm -f conftest.er1
17706   cat conftest.err >&5
17707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17708   (exit $ac_status); } && {
17709          test -z "$ac_c_werror_flag" ||
17710          test ! -s conftest.err
17711        } && test -s conftest$ac_exeext &&
17712        $as_test_x conftest$ac_exeext; then
17713   eval "$as_ac_var=yes"
17714 else
17715   echo "$as_me: failed program was:" >&5
17716 sed 's/^/| /' conftest.$ac_ext >&5
17717
17718         eval "$as_ac_var=no"
17719 fi
17720
17721 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17722       conftest$ac_exeext conftest.$ac_ext
17723 fi
17724 ac_res=`eval echo '${'$as_ac_var'}'`
17725                { echo "$as_me:$LINENO: result: $ac_res" >&5
17726 echo "${ECHO_T}$ac_res" >&6; }
17727 if test `eval echo '${'$as_ac_var'}'` = yes; then
17728   cat >>confdefs.h <<_ACEOF
17729 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17730 _ACEOF
17731  break
17732 fi
17733 done
17734
17735
17736 # Check for one of atexit() or on_exit()
17737
17738 for ac_func in atexit
17739 do
17740 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17741 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17742 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17743 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17744   echo $ECHO_N "(cached) $ECHO_C" >&6
17745 else
17746   cat >conftest.$ac_ext <<_ACEOF
17747 /* confdefs.h.  */
17748 _ACEOF
17749 cat confdefs.h >>conftest.$ac_ext
17750 cat >>conftest.$ac_ext <<_ACEOF
17751 /* end confdefs.h.  */
17752 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17753    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17754 #define $ac_func innocuous_$ac_func
17755
17756 /* System header to define __stub macros and hopefully few prototypes,
17757     which can conflict with char $ac_func (); below.
17758     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17759     <limits.h> exists even on freestanding compilers.  */
17760
17761 #ifdef __STDC__
17762 # include <limits.h>
17763 #else
17764 # include <assert.h>
17765 #endif
17766
17767 #undef $ac_func
17768
17769 /* Override any GCC internal prototype to avoid an error.
17770    Use char because int might match the return type of a GCC
17771    builtin and then its argument prototype would still apply.  */
17772 #ifdef __cplusplus
17773 extern "C"
17774 #endif
17775 char $ac_func ();
17776 /* The GNU C library defines this for functions which it implements
17777     to always fail with ENOSYS.  Some functions are actually named
17778     something starting with __ and the normal name is an alias.  */
17779 #if defined __stub_$ac_func || defined __stub___$ac_func
17780 choke me
17781 #endif
17782
17783 int
17784 main ()
17785 {
17786 return $ac_func ();
17787   ;
17788   return 0;
17789 }
17790 _ACEOF
17791 rm -f conftest.$ac_objext conftest$ac_exeext
17792 if { (ac_try="$ac_link"
17793 case "(($ac_try" in
17794   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17795   *) ac_try_echo=$ac_try;;
17796 esac
17797 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17798   (eval "$ac_link") 2>conftest.er1
17799   ac_status=$?
17800   grep -v '^ *+' conftest.er1 >conftest.err
17801   rm -f conftest.er1
17802   cat conftest.err >&5
17803   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17804   (exit $ac_status); } && {
17805          test -z "$ac_c_werror_flag" ||
17806          test ! -s conftest.err
17807        } && test -s conftest$ac_exeext &&
17808        $as_test_x conftest$ac_exeext; then
17809   eval "$as_ac_var=yes"
17810 else
17811   echo "$as_me: failed program was:" >&5
17812 sed 's/^/| /' conftest.$ac_ext >&5
17813
17814         eval "$as_ac_var=no"
17815 fi
17816
17817 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17818       conftest$ac_exeext conftest.$ac_ext
17819 fi
17820 ac_res=`eval echo '${'$as_ac_var'}'`
17821                { echo "$as_me:$LINENO: result: $ac_res" >&5
17822 echo "${ECHO_T}$ac_res" >&6; }
17823 if test `eval echo '${'$as_ac_var'}'` = yes; then
17824   cat >>confdefs.h <<_ACEOF
17825 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17826 _ACEOF
17827
17828 else
17829
17830 for ac_func in on_exit
17831 do
17832 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17833 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17834 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17835 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17836   echo $ECHO_N "(cached) $ECHO_C" >&6
17837 else
17838   cat >conftest.$ac_ext <<_ACEOF
17839 /* confdefs.h.  */
17840 _ACEOF
17841 cat confdefs.h >>conftest.$ac_ext
17842 cat >>conftest.$ac_ext <<_ACEOF
17843 /* end confdefs.h.  */
17844 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17845    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17846 #define $ac_func innocuous_$ac_func
17847
17848 /* System header to define __stub macros and hopefully few prototypes,
17849     which can conflict with char $ac_func (); below.
17850     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17851     <limits.h> exists even on freestanding compilers.  */
17852
17853 #ifdef __STDC__
17854 # include <limits.h>
17855 #else
17856 # include <assert.h>
17857 #endif
17858
17859 #undef $ac_func
17860
17861 /* Override any GCC internal prototype to avoid an error.
17862    Use char because int might match the return type of a GCC
17863    builtin and then its argument prototype would still apply.  */
17864 #ifdef __cplusplus
17865 extern "C"
17866 #endif
17867 char $ac_func ();
17868 /* The GNU C library defines this for functions which it implements
17869     to always fail with ENOSYS.  Some functions are actually named
17870     something starting with __ and the normal name is an alias.  */
17871 #if defined __stub_$ac_func || defined __stub___$ac_func
17872 choke me
17873 #endif
17874
17875 int
17876 main ()
17877 {
17878 return $ac_func ();
17879   ;
17880   return 0;
17881 }
17882 _ACEOF
17883 rm -f conftest.$ac_objext conftest$ac_exeext
17884 if { (ac_try="$ac_link"
17885 case "(($ac_try" in
17886   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17887   *) ac_try_echo=$ac_try;;
17888 esac
17889 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17890   (eval "$ac_link") 2>conftest.er1
17891   ac_status=$?
17892   grep -v '^ *+' conftest.er1 >conftest.err
17893   rm -f conftest.er1
17894   cat conftest.err >&5
17895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17896   (exit $ac_status); } && {
17897          test -z "$ac_c_werror_flag" ||
17898          test ! -s conftest.err
17899        } && test -s conftest$ac_exeext &&
17900        $as_test_x conftest$ac_exeext; then
17901   eval "$as_ac_var=yes"
17902 else
17903   echo "$as_me: failed program was:" >&5
17904 sed 's/^/| /' conftest.$ac_ext >&5
17905
17906         eval "$as_ac_var=no"
17907 fi
17908
17909 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17910       conftest$ac_exeext conftest.$ac_ext
17911 fi
17912 ac_res=`eval echo '${'$as_ac_var'}'`
17913                { echo "$as_me:$LINENO: result: $ac_res" >&5
17914 echo "${ECHO_T}$ac_res" >&6; }
17915 if test `eval echo '${'$as_ac_var'}'` = yes; then
17916   cat >>confdefs.h <<_ACEOF
17917 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17918 _ACEOF
17919
17920 else
17921   { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
17922 echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
17923    { (exit 1); exit 1; }; }
17924 fi
17925 done
17926
17927 fi
17928 done
17929
17930
17931 case $host_os in
17932         # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
17933         bsdi*|netbsd*)
17934
17935 cat >>confdefs.h <<\_ACEOF
17936 #define HAVE_FSEEKO 1
17937 _ACEOF
17938
17939                 ac_cv_func_fseeko=yes;;
17940         *)
17941                 { echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
17942 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
17943 if test "${ac_cv_sys_largefile_source+set}" = set; then
17944   echo $ECHO_N "(cached) $ECHO_C" >&6
17945 else
17946   while :; do
17947   cat >conftest.$ac_ext <<_ACEOF
17948 /* confdefs.h.  */
17949 _ACEOF
17950 cat confdefs.h >>conftest.$ac_ext
17951 cat >>conftest.$ac_ext <<_ACEOF
17952 /* end confdefs.h.  */
17953 #include <stdio.h>
17954 int
17955 main ()
17956 {
17957 return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
17958   ;
17959   return 0;
17960 }
17961 _ACEOF
17962 rm -f conftest.$ac_objext conftest$ac_exeext
17963 if { (ac_try="$ac_link"
17964 case "(($ac_try" in
17965   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17966   *) ac_try_echo=$ac_try;;
17967 esac
17968 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17969   (eval "$ac_link") 2>conftest.er1
17970   ac_status=$?
17971   grep -v '^ *+' conftest.er1 >conftest.err
17972   rm -f conftest.er1
17973   cat conftest.err >&5
17974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17975   (exit $ac_status); } && {
17976          test -z "$ac_c_werror_flag" ||
17977          test ! -s conftest.err
17978        } && test -s conftest$ac_exeext &&
17979        $as_test_x conftest$ac_exeext; then
17980   ac_cv_sys_largefile_source=no; break
17981 else
17982   echo "$as_me: failed program was:" >&5
17983 sed 's/^/| /' conftest.$ac_ext >&5
17984
17985
17986 fi
17987
17988 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17989       conftest$ac_exeext conftest.$ac_ext
17990   cat >conftest.$ac_ext <<_ACEOF
17991 /* confdefs.h.  */
17992 _ACEOF
17993 cat confdefs.h >>conftest.$ac_ext
17994 cat >>conftest.$ac_ext <<_ACEOF
17995 /* end confdefs.h.  */
17996 #define _LARGEFILE_SOURCE 1
17997 #include <stdio.h>
17998 int
17999 main ()
18000 {
18001 return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
18002   ;
18003   return 0;
18004 }
18005 _ACEOF
18006 rm -f conftest.$ac_objext conftest$ac_exeext
18007 if { (ac_try="$ac_link"
18008 case "(($ac_try" in
18009   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18010   *) ac_try_echo=$ac_try;;
18011 esac
18012 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18013   (eval "$ac_link") 2>conftest.er1
18014   ac_status=$?
18015   grep -v '^ *+' conftest.er1 >conftest.err
18016   rm -f conftest.er1
18017   cat conftest.err >&5
18018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18019   (exit $ac_status); } && {
18020          test -z "$ac_c_werror_flag" ||
18021          test ! -s conftest.err
18022        } && test -s conftest$ac_exeext &&
18023        $as_test_x conftest$ac_exeext; then
18024   ac_cv_sys_largefile_source=1; break
18025 else
18026   echo "$as_me: failed program was:" >&5
18027 sed 's/^/| /' conftest.$ac_ext >&5
18028
18029
18030 fi
18031
18032 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18033       conftest$ac_exeext conftest.$ac_ext
18034   ac_cv_sys_largefile_source=unknown
18035   break
18036 done
18037 fi
18038 { echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
18039 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
18040 case $ac_cv_sys_largefile_source in #(
18041   no | unknown) ;;
18042   *)
18043 cat >>confdefs.h <<_ACEOF
18044 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
18045 _ACEOF
18046 ;;
18047 esac
18048 rm -f conftest*
18049
18050 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
18051 # in glibc 2.1.3, but that breaks too many other things.
18052 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
18053 if test $ac_cv_sys_largefile_source != unknown; then
18054
18055 cat >>confdefs.h <<\_ACEOF
18056 #define HAVE_FSEEKO 1
18057 _ACEOF
18058
18059 fi
18060 ;;
18061 esac
18062
18063
18064 #
18065 # Pthreads
18066 #
18067 # For each platform, we need to know about any special compile and link
18068 # libraries, and whether the normal C function names are thread-safe.
18069 # See the comment at the top of src/port/thread.c for more information.
18070 # WIN32 doesn't need the pthread tests;  it always uses threads
18071 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
18072
18073
18074
18075 ac_ext=c
18076 ac_cpp='$CPP $CPPFLAGS'
18077 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18078 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18079 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18080
18081 acx_pthread_ok=no
18082
18083 # We used to check for pthread.h first, but this fails if pthread.h
18084 # requires special compiler flags (e.g. on True64 or Sequent).
18085 # It gets checked for in the link test anyway.
18086
18087 # First of all, check if the user has set any of the PTHREAD_LIBS,
18088 # etcetera environment variables, and if threads linking works using
18089 # them:
18090 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
18091         save_CFLAGS="$CFLAGS"
18092         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18093         save_LIBS="$LIBS"
18094         LIBS="$PTHREAD_LIBS $LIBS"
18095         { echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
18096 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6; }
18097         cat >conftest.$ac_ext <<_ACEOF
18098 /* confdefs.h.  */
18099 _ACEOF
18100 cat confdefs.h >>conftest.$ac_ext
18101 cat >>conftest.$ac_ext <<_ACEOF
18102 /* end confdefs.h.  */
18103
18104 /* Override any GCC internal prototype to avoid an error.
18105    Use char because int might match the return type of a GCC
18106    builtin and then its argument prototype would still apply.  */
18107 #ifdef __cplusplus
18108 extern "C"
18109 #endif
18110 char pthread_join ();
18111 int
18112 main ()
18113 {
18114 return pthread_join ();
18115   ;
18116   return 0;
18117 }
18118 _ACEOF
18119 rm -f conftest.$ac_objext conftest$ac_exeext
18120 if { (ac_try="$ac_link"
18121 case "(($ac_try" in
18122   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18123   *) ac_try_echo=$ac_try;;
18124 esac
18125 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18126   (eval "$ac_link") 2>conftest.er1
18127   ac_status=$?
18128   grep -v '^ *+' conftest.er1 >conftest.err
18129   rm -f conftest.er1
18130   cat conftest.err >&5
18131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18132   (exit $ac_status); } && {
18133          test -z "$ac_c_werror_flag" ||
18134          test ! -s conftest.err
18135        } && test -s conftest$ac_exeext &&
18136        $as_test_x conftest$ac_exeext; then
18137   acx_pthread_ok=yes
18138 else
18139   echo "$as_me: failed program was:" >&5
18140 sed 's/^/| /' conftest.$ac_ext >&5
18141
18142
18143 fi
18144
18145 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18146       conftest$ac_exeext conftest.$ac_ext
18147         { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
18148 echo "${ECHO_T}$acx_pthread_ok" >&6; }
18149         if test x"$acx_pthread_ok" = xno; then
18150                 PTHREAD_LIBS=""
18151                 PTHREAD_CFLAGS=""
18152         fi
18153         LIBS="$save_LIBS"
18154         CFLAGS="$save_CFLAGS"
18155 fi
18156
18157 # We must check for the threads library under a number of different
18158 # names; the ordering is very important because some systems
18159 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
18160 # libraries is broken (non-POSIX).
18161
18162 # Create a list of thread flags to try.  Items starting with a "-" are
18163 # C compiler flags, and other items are library names, except for "none"
18164 # which indicates that we try without any flags at all, and "pthread-config"
18165 # which is a program returning the flags for the Pth emulation library.
18166
18167 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
18168
18169 # The ordering *is* (sometimes) important.  Some notes on the
18170 # individual items follow:
18171
18172 # pthreads: AIX (must check this before -lpthread)
18173 # none: in case threads are in libc; should be tried before -Kthread and
18174 #       other compiler flags to prevent continual compiler warnings
18175 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
18176 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
18177 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
18178 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
18179 # -pthreads: Solaris/gcc
18180 # -mthreads: Mingw32/gcc, Lynx/gcc
18181 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
18182 #      doesn't hurt to check since this sometimes defines pthreads too;
18183 #      also defines -D_REENTRANT)
18184 # pthread: Linux, etcetera
18185 # --thread-safe: KAI C++
18186 # pthread-config: use pthread-config program (for GNU Pth library)
18187
18188 case "${host_cpu}-${host_os}" in
18189         *solaris*)
18190
18191         # On Solaris (at least, for some versions), libc contains stubbed
18192         # (non-functional) versions of the pthreads routines, so link-based
18193         # tests will erroneously succeed.  (We need to link with -pthread or
18194         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
18195         # a function called by this macro, so we could check for that, but
18196         # who knows whether they'll stub that too in a future libc.)  So,
18197         # we'll just look for -pthreads and -lpthread first:
18198
18199         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
18200         ;;
18201 esac
18202
18203 if test x"$acx_pthread_ok" = xno; then
18204 for flag in $acx_pthread_flags; do
18205
18206         tryPTHREAD_CFLAGS=""
18207         tryPTHREAD_LIBS=""
18208         case $flag in
18209                 none)
18210                 { echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
18211 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6; }
18212                 ;;
18213
18214                 -*)
18215                 { echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
18216 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6; }
18217                 tryPTHREAD_CFLAGS="$flag"
18218                 ;;
18219
18220                 pthread-config)
18221                 # skip this if we already have flags defined, for PostgreSQL
18222                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
18223                 # Extract the first word of "pthread-config", so it can be a program name with args.
18224 set dummy pthread-config; ac_word=$2
18225 { echo "$as_me:$LINENO: checking for $ac_word" >&5
18226 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
18227 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
18228   echo $ECHO_N "(cached) $ECHO_C" >&6
18229 else
18230   if test -n "$acx_pthread_config"; then
18231   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
18232 else
18233 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18234 for as_dir in $PATH
18235 do
18236   IFS=$as_save_IFS
18237   test -z "$as_dir" && as_dir=.
18238   for ac_exec_ext in '' $ac_executable_extensions; do
18239   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18240     ac_cv_prog_acx_pthread_config="yes"
18241     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18242     break 2
18243   fi
18244 done
18245 done
18246 IFS=$as_save_IFS
18247
18248   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
18249 fi
18250 fi
18251 acx_pthread_config=$ac_cv_prog_acx_pthread_config
18252 if test -n "$acx_pthread_config"; then
18253   { echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
18254 echo "${ECHO_T}$acx_pthread_config" >&6; }
18255 else
18256   { echo "$as_me:$LINENO: result: no" >&5
18257 echo "${ECHO_T}no" >&6; }
18258 fi
18259
18260
18261                 if test x"$acx_pthread_config" = xno; then continue; fi
18262                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
18263                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
18264                 ;;
18265
18266                 *)
18267                 { echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
18268 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6; }
18269                 tryPTHREAD_LIBS="-l$flag"
18270                 ;;
18271         esac
18272
18273         save_LIBS="$LIBS"
18274         save_CFLAGS="$CFLAGS"
18275         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
18276         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
18277
18278         # Check for various functions.  We must include pthread.h,
18279         # since some functions may be macros.  (On the Sequent, we
18280         # need a special flag -Kthread to make this header compile.)
18281         # We check for pthread_join because it is in -lpthread on IRIX
18282         # while pthread_create is in libc.  We check for pthread_attr_init
18283         # due to DEC craziness with -lpthreads.  We check for
18284         # pthread_cleanup_push because it is one of the few pthread
18285         # functions on Solaris that doesn't have a non-functional libc stub.
18286         # We try pthread_create on general principles.
18287         cat >conftest.$ac_ext <<_ACEOF
18288 /* confdefs.h.  */
18289 _ACEOF
18290 cat confdefs.h >>conftest.$ac_ext
18291 cat >>conftest.$ac_ext <<_ACEOF
18292 /* end confdefs.h.  */
18293 #include <pthread.h>
18294 int
18295 main ()
18296 {
18297 pthread_t th; pthread_join(th, 0);
18298                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
18299                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
18300   ;
18301   return 0;
18302 }
18303 _ACEOF
18304 rm -f conftest.$ac_objext conftest$ac_exeext
18305 if { (ac_try="$ac_link"
18306 case "(($ac_try" in
18307   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18308   *) ac_try_echo=$ac_try;;
18309 esac
18310 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18311   (eval "$ac_link") 2>conftest.er1
18312   ac_status=$?
18313   grep -v '^ *+' conftest.er1 >conftest.err
18314   rm -f conftest.er1
18315   cat conftest.err >&5
18316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18317   (exit $ac_status); } && {
18318          test -z "$ac_c_werror_flag" ||
18319          test ! -s conftest.err
18320        } && test -s conftest$ac_exeext &&
18321        $as_test_x conftest$ac_exeext; then
18322   acx_pthread_ok=yes
18323 else
18324   echo "$as_me: failed program was:" >&5
18325 sed 's/^/| /' conftest.$ac_ext >&5
18326
18327         acx_pthread_ok=no
18328 fi
18329
18330 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18331       conftest$ac_exeext conftest.$ac_ext
18332
18333         if test "x$acx_pthread_ok" = xyes; then
18334             # Don't use options that are ignored by the compiler.
18335             # We find them by checking stderror.
18336             cat >conftest.$ac_ext <<_ACEOF
18337 int
18338 main (int argc, char **argv)
18339 {
18340   (void) argc;
18341   (void) argv;
18342   return 0;
18343 }
18344 _ACEOF
18345             rm -f conftest.$ac_objext conftest$ac_exeext
18346             if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
18347                 # we continue with more flags because Linux needs -lpthread
18348                 # for libpq builds on PostgreSQL.  The test above only
18349                 # tests for building binaries, not shared libraries.
18350                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
18351                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
18352             else   acx_pthread_ok=no
18353             fi
18354         fi
18355
18356         LIBS="$save_LIBS"
18357         CFLAGS="$save_CFLAGS"
18358
18359         { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
18360 echo "${ECHO_T}$acx_pthread_ok" >&6; }
18361 done
18362 fi
18363
18364 # Various other checks:
18365 if test "x$acx_pthread_ok" = xyes; then
18366         save_LIBS="$LIBS"
18367         LIBS="$PTHREAD_LIBS $LIBS"
18368         save_CFLAGS="$CFLAGS"
18369         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18370
18371         # Detect AIX lossage: threads are created detached by default
18372         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
18373         { echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
18374 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6; }
18375         cat >conftest.$ac_ext <<_ACEOF
18376 /* confdefs.h.  */
18377 _ACEOF
18378 cat confdefs.h >>conftest.$ac_ext
18379 cat >>conftest.$ac_ext <<_ACEOF
18380 /* end confdefs.h.  */
18381 #include <pthread.h>
18382 int
18383 main ()
18384 {
18385 int attr=PTHREAD_CREATE_JOINABLE;
18386   ;
18387   return 0;
18388 }
18389 _ACEOF
18390 rm -f conftest.$ac_objext conftest$ac_exeext
18391 if { (ac_try="$ac_link"
18392 case "(($ac_try" in
18393   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18394   *) ac_try_echo=$ac_try;;
18395 esac
18396 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18397   (eval "$ac_link") 2>conftest.er1
18398   ac_status=$?
18399   grep -v '^ *+' conftest.er1 >conftest.err
18400   rm -f conftest.er1
18401   cat conftest.err >&5
18402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18403   (exit $ac_status); } && {
18404          test -z "$ac_c_werror_flag" ||
18405          test ! -s conftest.err
18406        } && test -s conftest$ac_exeext &&
18407        $as_test_x conftest$ac_exeext; then
18408   ok=PTHREAD_CREATE_JOINABLE
18409 else
18410   echo "$as_me: failed program was:" >&5
18411 sed 's/^/| /' conftest.$ac_ext >&5
18412
18413         ok=unknown
18414 fi
18415
18416 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18417       conftest$ac_exeext conftest.$ac_ext
18418         if test x"$ok" = xunknown; then
18419                 cat >conftest.$ac_ext <<_ACEOF
18420 /* confdefs.h.  */
18421 _ACEOF
18422 cat confdefs.h >>conftest.$ac_ext
18423 cat >>conftest.$ac_ext <<_ACEOF
18424 /* end confdefs.h.  */
18425 #include <pthread.h>
18426 int
18427 main ()
18428 {
18429 int attr=PTHREAD_CREATE_UNDETACHED;
18430   ;
18431   return 0;
18432 }
18433 _ACEOF
18434 rm -f conftest.$ac_objext conftest$ac_exeext
18435 if { (ac_try="$ac_link"
18436 case "(($ac_try" in
18437   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18438   *) ac_try_echo=$ac_try;;
18439 esac
18440 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18441   (eval "$ac_link") 2>conftest.er1
18442   ac_status=$?
18443   grep -v '^ *+' conftest.er1 >conftest.err
18444   rm -f conftest.er1
18445   cat conftest.err >&5
18446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18447   (exit $ac_status); } && {
18448          test -z "$ac_c_werror_flag" ||
18449          test ! -s conftest.err
18450        } && test -s conftest$ac_exeext &&
18451        $as_test_x conftest$ac_exeext; then
18452   ok=PTHREAD_CREATE_UNDETACHED
18453 else
18454   echo "$as_me: failed program was:" >&5
18455 sed 's/^/| /' conftest.$ac_ext >&5
18456
18457         ok=unknown
18458 fi
18459
18460 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18461       conftest$ac_exeext conftest.$ac_ext
18462         fi
18463         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
18464
18465 cat >>confdefs.h <<\_ACEOF
18466 #define PTHREAD_CREATE_JOINABLE $ok
18467 _ACEOF
18468
18469         fi
18470         { echo "$as_me:$LINENO: result: ${ok}" >&5
18471 echo "${ECHO_T}${ok}" >&6; }
18472         if test x"$ok" = xunknown; then
18473                 { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
18474 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
18475         fi
18476
18477         { echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
18478 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6; }
18479         flag=no
18480 # We always add these in PostgreSQL
18481 #       case "${host_cpu}-${host_os}" in
18482 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
18483 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
18484 #       esac
18485         { echo "$as_me:$LINENO: result: ${flag}" >&5
18486 echo "${ECHO_T}${flag}" >&6; }
18487         if test "x$flag" != xno; then
18488                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
18489         fi
18490
18491         LIBS="$save_LIBS"
18492         CFLAGS="$save_CFLAGS"
18493
18494 # Supporting cc_r would require a special CC in all places that
18495 # use libpq, and that is ugly, so we don't do it.  Users can still
18496 # define their compiler as cc_r to do thread builds of everything.
18497         # More AIX lossage: must compile with cc_r
18498         # Extract the first word of "cc_r", so it can be a program name with args.
18499 set dummy cc_r; ac_word=$2
18500 { echo "$as_me:$LINENO: checking for $ac_word" >&5
18501 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
18502 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
18503   echo $ECHO_N "(cached) $ECHO_C" >&6
18504 else
18505   if test -n "$PTHREAD_CC"; then
18506   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
18507 else
18508 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18509 for as_dir in $PATH
18510 do
18511   IFS=$as_save_IFS
18512   test -z "$as_dir" && as_dir=.
18513   for ac_exec_ext in '' $ac_executable_extensions; do
18514   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18515     ac_cv_prog_PTHREAD_CC="cc_r"
18516     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18517     break 2
18518   fi
18519 done
18520 done
18521 IFS=$as_save_IFS
18522
18523   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
18524 fi
18525 fi
18526 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
18527 if test -n "$PTHREAD_CC"; then
18528   { echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
18529 echo "${ECHO_T}$PTHREAD_CC" >&6; }
18530 else
18531   { echo "$as_me:$LINENO: result: no" >&5
18532 echo "${ECHO_T}no" >&6; }
18533 fi
18534
18535
18536 else
18537         PTHREAD_CC="$CC"
18538 fi
18539
18540
18541
18542
18543
18544 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
18545 if test x"$acx_pthread_ok" = xyes; then
18546
18547 cat >>confdefs.h <<\_ACEOF
18548 #define HAVE_PTHREAD 1
18549 _ACEOF
18550
18551         :
18552 else
18553         acx_pthread_ok=no
18554
18555 fi
18556 ac_ext=c
18557 ac_cpp='$CPP $CPPFLAGS'
18558 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18559 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18560 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18561
18562         # set thread flags
18563
18564 # Some platforms use these, so just defineed them.  They can't hurt if they
18565 # are not supported.
18566 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
18567
18568
18569 # At this point, we don't want to muck with the compiler name for threading.
18570 # Let's see who fails, perhaps AIX.  2004-04-23
18571 if test "$PTHREAD_CC" != "$CC"; then
18572 { { echo "$as_me:$LINENO: error:
18573 PostgreSQL does not support platforms that require a special compiler
18574 for thread safety." >&5
18575 echo "$as_me: error:
18576 PostgreSQL does not support platforms that require a special compiler
18577 for thread safety." >&2;}
18578    { (exit 1); exit 1; }; }
18579 fi
18580
18581 if test "$THREAD_SUPPORT" = no; then
18582 { { echo "$as_me:$LINENO: error: cannot enable threads on this platform
18583 This platform is known to not support thread-safe programs.  For details,
18584 compile and run src/bin/pg_thread_test." >&5
18585 echo "$as_me: error: cannot enable threads on this platform
18586 This platform is known to not support thread-safe programs.  For details,
18587 compile and run src/bin/pg_thread_test." >&2;}
18588    { (exit 1); exit 1; }; }
18589 fi
18590
18591 # Check for *_r functions
18592 _CFLAGS="$CFLAGS"
18593 _LIBS="$LIBS"
18594 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18595 LIBS="$LIBS $PTHREAD_LIBS"
18596
18597 if test "$PORTNAME" != "win32"; then
18598 if test "${ac_cv_header_pthread_h+set}" = set; then
18599   { echo "$as_me:$LINENO: checking for pthread.h" >&5
18600 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; }
18601 if test "${ac_cv_header_pthread_h+set}" = set; then
18602   echo $ECHO_N "(cached) $ECHO_C" >&6
18603 fi
18604 { echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
18605 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; }
18606 else
18607   # Is the header compilable?
18608 { echo "$as_me:$LINENO: checking pthread.h usability" >&5
18609 echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6; }
18610 cat >conftest.$ac_ext <<_ACEOF
18611 /* confdefs.h.  */
18612 _ACEOF
18613 cat confdefs.h >>conftest.$ac_ext
18614 cat >>conftest.$ac_ext <<_ACEOF
18615 /* end confdefs.h.  */
18616 $ac_includes_default
18617 #include <pthread.h>
18618 _ACEOF
18619 rm -f conftest.$ac_objext
18620 if { (ac_try="$ac_compile"
18621 case "(($ac_try" in
18622   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18623   *) ac_try_echo=$ac_try;;
18624 esac
18625 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18626   (eval "$ac_compile") 2>conftest.er1
18627   ac_status=$?
18628   grep -v '^ *+' conftest.er1 >conftest.err
18629   rm -f conftest.er1
18630   cat conftest.err >&5
18631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18632   (exit $ac_status); } && {
18633          test -z "$ac_c_werror_flag" ||
18634          test ! -s conftest.err
18635        } && test -s conftest.$ac_objext; then
18636   ac_header_compiler=yes
18637 else
18638   echo "$as_me: failed program was:" >&5
18639 sed 's/^/| /' conftest.$ac_ext >&5
18640
18641         ac_header_compiler=no
18642 fi
18643
18644 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18645 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18646 echo "${ECHO_T}$ac_header_compiler" >&6; }
18647
18648 # Is the header present?
18649 { echo "$as_me:$LINENO: checking pthread.h presence" >&5
18650 echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6; }
18651 cat >conftest.$ac_ext <<_ACEOF
18652 /* confdefs.h.  */
18653 _ACEOF
18654 cat confdefs.h >>conftest.$ac_ext
18655 cat >>conftest.$ac_ext <<_ACEOF
18656 /* end confdefs.h.  */
18657 #include <pthread.h>
18658 _ACEOF
18659 if { (ac_try="$ac_cpp conftest.$ac_ext"
18660 case "(($ac_try" in
18661   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18662   *) ac_try_echo=$ac_try;;
18663 esac
18664 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18665   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18666   ac_status=$?
18667   grep -v '^ *+' conftest.er1 >conftest.err
18668   rm -f conftest.er1
18669   cat conftest.err >&5
18670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18671   (exit $ac_status); } >/dev/null && {
18672          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18673          test ! -s conftest.err
18674        }; then
18675   ac_header_preproc=yes
18676 else
18677   echo "$as_me: failed program was:" >&5
18678 sed 's/^/| /' conftest.$ac_ext >&5
18679
18680   ac_header_preproc=no
18681 fi
18682
18683 rm -f conftest.err conftest.$ac_ext
18684 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18685 echo "${ECHO_T}$ac_header_preproc" >&6; }
18686
18687 # So?  What about this header?
18688 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18689   yes:no: )
18690     { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
18691 echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18692     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
18693 echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
18694     ac_header_preproc=yes
18695     ;;
18696   no:yes:* )
18697     { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
18698 echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
18699     { echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
18700 echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
18701     { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
18702 echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
18703     { echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
18704 echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18705     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
18706 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
18707     { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
18708 echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
18709     ( cat <<\_ASBOX
18710 ## ---------------------------------------- ##
18711 ## Report this to pgsql-bugs@postgresql.org ##
18712 ## ---------------------------------------- ##
18713 _ASBOX
18714      ) | sed "s/^/$as_me: WARNING:     /" >&2
18715     ;;
18716 esac
18717 { echo "$as_me:$LINENO: checking for pthread.h" >&5
18718 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; }
18719 if test "${ac_cv_header_pthread_h+set}" = set; then
18720   echo $ECHO_N "(cached) $ECHO_C" >&6
18721 else
18722   ac_cv_header_pthread_h=$ac_header_preproc
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
18727 fi
18728 if test $ac_cv_header_pthread_h = yes; then
18729   :
18730 else
18731   { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safety" >&5
18732 echo "$as_me: error: pthread.h not found, required for --enable-thread-safety" >&2;}
18733    { (exit 1); exit 1; }; }
18734 fi
18735
18736
18737 fi
18738
18739
18740
18741
18742 for ac_func in strerror_r getpwuid_r gethostbyname_r
18743 do
18744 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18745 { echo "$as_me:$LINENO: checking for $ac_func" >&5
18746 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18747 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18748   echo $ECHO_N "(cached) $ECHO_C" >&6
18749 else
18750   cat >conftest.$ac_ext <<_ACEOF
18751 /* confdefs.h.  */
18752 _ACEOF
18753 cat confdefs.h >>conftest.$ac_ext
18754 cat >>conftest.$ac_ext <<_ACEOF
18755 /* end confdefs.h.  */
18756 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18757    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
18758 #define $ac_func innocuous_$ac_func
18759
18760 /* System header to define __stub macros and hopefully few prototypes,
18761     which can conflict with char $ac_func (); below.
18762     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18763     <limits.h> exists even on freestanding compilers.  */
18764
18765 #ifdef __STDC__
18766 # include <limits.h>
18767 #else
18768 # include <assert.h>
18769 #endif
18770
18771 #undef $ac_func
18772
18773 /* Override any GCC internal prototype to avoid an error.
18774    Use char because int might match the return type of a GCC
18775    builtin and then its argument prototype would still apply.  */
18776 #ifdef __cplusplus
18777 extern "C"
18778 #endif
18779 char $ac_func ();
18780 /* The GNU C library defines this for functions which it implements
18781     to always fail with ENOSYS.  Some functions are actually named
18782     something starting with __ and the normal name is an alias.  */
18783 #if defined __stub_$ac_func || defined __stub___$ac_func
18784 choke me
18785 #endif
18786
18787 int
18788 main ()
18789 {
18790 return $ac_func ();
18791   ;
18792   return 0;
18793 }
18794 _ACEOF
18795 rm -f conftest.$ac_objext conftest$ac_exeext
18796 if { (ac_try="$ac_link"
18797 case "(($ac_try" in
18798   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18799   *) ac_try_echo=$ac_try;;
18800 esac
18801 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18802   (eval "$ac_link") 2>conftest.er1
18803   ac_status=$?
18804   grep -v '^ *+' conftest.er1 >conftest.err
18805   rm -f conftest.er1
18806   cat conftest.err >&5
18807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18808   (exit $ac_status); } && {
18809          test -z "$ac_c_werror_flag" ||
18810          test ! -s conftest.err
18811        } && test -s conftest$ac_exeext &&
18812        $as_test_x conftest$ac_exeext; then
18813   eval "$as_ac_var=yes"
18814 else
18815   echo "$as_me: failed program was:" >&5
18816 sed 's/^/| /' conftest.$ac_ext >&5
18817
18818         eval "$as_ac_var=no"
18819 fi
18820
18821 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18822       conftest$ac_exeext conftest.$ac_ext
18823 fi
18824 ac_res=`eval echo '${'$as_ac_var'}'`
18825                { echo "$as_me:$LINENO: result: $ac_res" >&5
18826 echo "${ECHO_T}$ac_res" >&6; }
18827 if test `eval echo '${'$as_ac_var'}'` = yes; then
18828   cat >>confdefs.h <<_ACEOF
18829 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18830 _ACEOF
18831
18832 fi
18833 done
18834
18835
18836 # Do test here with the proper thread flags
18837 { echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
18838 echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6; }
18839 if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
18840   echo $ECHO_N "(cached) $ECHO_C" >&6
18841 else
18842   cat >conftest.$ac_ext <<_ACEOF
18843 /* confdefs.h.  */
18844 _ACEOF
18845 cat confdefs.h >>conftest.$ac_ext
18846 cat >>conftest.$ac_ext <<_ACEOF
18847 /* end confdefs.h.  */
18848 #include <sys/types.h>
18849 #include <pwd.h>
18850 int
18851 main ()
18852 {
18853 uid_t uid;
18854 struct passwd *space;
18855 char *buf;
18856 size_t bufsize;
18857 struct passwd **result;
18858 getpwuid_r(uid, space, buf, bufsize, result);
18859   ;
18860   return 0;
18861 }
18862 _ACEOF
18863 rm -f conftest.$ac_objext
18864 if { (ac_try="$ac_compile"
18865 case "(($ac_try" in
18866   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18867   *) ac_try_echo=$ac_try;;
18868 esac
18869 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18870   (eval "$ac_compile") 2>conftest.er1
18871   ac_status=$?
18872   grep -v '^ *+' conftest.er1 >conftest.err
18873   rm -f conftest.er1
18874   cat conftest.err >&5
18875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18876   (exit $ac_status); } && {
18877          test -z "$ac_c_werror_flag" ||
18878          test ! -s conftest.err
18879        } && test -s conftest.$ac_objext; then
18880   pgac_func_getpwuid_r_5arg=yes
18881 else
18882   echo "$as_me: failed program was:" >&5
18883 sed 's/^/| /' conftest.$ac_ext >&5
18884
18885         pgac_func_getpwuid_r_5arg=no
18886 fi
18887
18888 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18889 fi
18890 { echo "$as_me:$LINENO: result: $pgac_func_getpwuid_r_5arg" >&5
18891 echo "${ECHO_T}$pgac_func_getpwuid_r_5arg" >&6; }
18892 if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
18893
18894 cat >>confdefs.h <<\_ACEOF
18895 #define GETPWUID_R_5ARG
18896 _ACEOF
18897
18898 fi
18899
18900 { echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
18901 echo $ECHO_N "checking whether strerror_r returns int... $ECHO_C" >&6; }
18902 if test "${pgac_func_strerror_r_int+set}" = set; then
18903   echo $ECHO_N "(cached) $ECHO_C" >&6
18904 else
18905   cat >conftest.$ac_ext <<_ACEOF
18906 /* confdefs.h.  */
18907 _ACEOF
18908 cat confdefs.h >>conftest.$ac_ext
18909 cat >>conftest.$ac_ext <<_ACEOF
18910 /* end confdefs.h.  */
18911 #include <string.h>
18912 int
18913 main ()
18914 {
18915 #ifndef _AIX
18916 int strerror_r(int, char *, size_t);
18917 #else
18918 /* Older AIX has 'int' for the third argument so we don't test the args. */
18919 int strerror_r();
18920 #endif
18921   ;
18922   return 0;
18923 }
18924 _ACEOF
18925 rm -f conftest.$ac_objext
18926 if { (ac_try="$ac_compile"
18927 case "(($ac_try" in
18928   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18929   *) ac_try_echo=$ac_try;;
18930 esac
18931 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18932   (eval "$ac_compile") 2>conftest.er1
18933   ac_status=$?
18934   grep -v '^ *+' conftest.er1 >conftest.err
18935   rm -f conftest.er1
18936   cat conftest.err >&5
18937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18938   (exit $ac_status); } && {
18939          test -z "$ac_c_werror_flag" ||
18940          test ! -s conftest.err
18941        } && test -s conftest.$ac_objext; then
18942   pgac_func_strerror_r_int=yes
18943 else
18944   echo "$as_me: failed program was:" >&5
18945 sed 's/^/| /' conftest.$ac_ext >&5
18946
18947         pgac_func_strerror_r_int=no
18948 fi
18949
18950 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18951 fi
18952 { echo "$as_me:$LINENO: result: $pgac_func_strerror_r_int" >&5
18953 echo "${ECHO_T}$pgac_func_strerror_r_int" >&6; }
18954 if test x"$pgac_func_strerror_r_int" = xyes ; then
18955
18956 cat >>confdefs.h <<\_ACEOF
18957 #define STRERROR_R_INT
18958 _ACEOF
18959
18960 fi
18961
18962
18963 CFLAGS="$_CFLAGS"
18964 LIBS="$_LIBS"
18965
18966 else
18967 # do not use values from template file
18968 PTHREAD_CFLAGS=
18969 PTHREAD_LIBS=
18970 fi
18971
18972
18973
18974
18975
18976 # We can test for libldap_r only after we know PTHREAD_LIBS
18977 if test "$with_ldap" = yes ; then
18978   _LIBS="$LIBS"
18979   if test "$PORTNAME" != "win32"; then
18980
18981 { echo "$as_me:$LINENO: checking for ldap_bind in -lldap" >&5
18982 echo $ECHO_N "checking for ldap_bind in -lldap... $ECHO_C" >&6; }
18983 if test "${ac_cv_lib_ldap_ldap_bind+set}" = set; then
18984   echo $ECHO_N "(cached) $ECHO_C" >&6
18985 else
18986   ac_check_lib_save_LIBS=$LIBS
18987 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
18988 cat >conftest.$ac_ext <<_ACEOF
18989 /* confdefs.h.  */
18990 _ACEOF
18991 cat confdefs.h >>conftest.$ac_ext
18992 cat >>conftest.$ac_ext <<_ACEOF
18993 /* end confdefs.h.  */
18994
18995 /* Override any GCC internal prototype to avoid an error.
18996    Use char because int might match the return type of a GCC
18997    builtin and then its argument prototype would still apply.  */
18998 #ifdef __cplusplus
18999 extern "C"
19000 #endif
19001 char ldap_bind ();
19002 int
19003 main ()
19004 {
19005 return ldap_bind ();
19006   ;
19007   return 0;
19008 }
19009 _ACEOF
19010 rm -f conftest.$ac_objext conftest$ac_exeext
19011 if { (ac_try="$ac_link"
19012 case "(($ac_try" in
19013   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19014   *) ac_try_echo=$ac_try;;
19015 esac
19016 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19017   (eval "$ac_link") 2>conftest.er1
19018   ac_status=$?
19019   grep -v '^ *+' conftest.er1 >conftest.err
19020   rm -f conftest.er1
19021   cat conftest.err >&5
19022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19023   (exit $ac_status); } && {
19024          test -z "$ac_c_werror_flag" ||
19025          test ! -s conftest.err
19026        } && test -s conftest$ac_exeext &&
19027        $as_test_x conftest$ac_exeext; then
19028   ac_cv_lib_ldap_ldap_bind=yes
19029 else
19030   echo "$as_me: failed program was:" >&5
19031 sed 's/^/| /' conftest.$ac_ext >&5
19032
19033         ac_cv_lib_ldap_ldap_bind=no
19034 fi
19035
19036 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19037       conftest$ac_exeext conftest.$ac_ext
19038 LIBS=$ac_check_lib_save_LIBS
19039 fi
19040 { echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_bind" >&5
19041 echo "${ECHO_T}$ac_cv_lib_ldap_ldap_bind" >&6; }
19042 if test $ac_cv_lib_ldap_ldap_bind = yes; then
19043   cat >>confdefs.h <<_ACEOF
19044 #define HAVE_LIBLDAP 1
19045 _ACEOF
19046
19047   LIBS="-lldap $LIBS"
19048
19049 else
19050   { { echo "$as_me:$LINENO: error: library 'ldap' is required for LDAP" >&5
19051 echo "$as_me: error: library 'ldap' is required for LDAP" >&2;}
19052    { (exit 1); exit 1; }; }
19053 fi
19054
19055     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
19056     if test "$enable_thread_safety" = yes; then
19057       # on some platforms ldap_r fails to link without PTHREAD_LIBS
19058
19059 { echo "$as_me:$LINENO: checking for ldap_simple_bind in -lldap_r" >&5
19060 echo $ECHO_N "checking for ldap_simple_bind in -lldap_r... $ECHO_C" >&6; }
19061 if test "${ac_cv_lib_ldap_r_ldap_simple_bind+set}" = set; then
19062   echo $ECHO_N "(cached) $ECHO_C" >&6
19063 else
19064   ac_check_lib_save_LIBS=$LIBS
19065 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
19066 cat >conftest.$ac_ext <<_ACEOF
19067 /* confdefs.h.  */
19068 _ACEOF
19069 cat confdefs.h >>conftest.$ac_ext
19070 cat >>conftest.$ac_ext <<_ACEOF
19071 /* end confdefs.h.  */
19072
19073 /* Override any GCC internal prototype to avoid an error.
19074    Use char because int might match the return type of a GCC
19075    builtin and then its argument prototype would still apply.  */
19076 #ifdef __cplusplus
19077 extern "C"
19078 #endif
19079 char ldap_simple_bind ();
19080 int
19081 main ()
19082 {
19083 return ldap_simple_bind ();
19084   ;
19085   return 0;
19086 }
19087 _ACEOF
19088 rm -f conftest.$ac_objext conftest$ac_exeext
19089 if { (ac_try="$ac_link"
19090 case "(($ac_try" in
19091   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19092   *) ac_try_echo=$ac_try;;
19093 esac
19094 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19095   (eval "$ac_link") 2>conftest.er1
19096   ac_status=$?
19097   grep -v '^ *+' conftest.er1 >conftest.err
19098   rm -f conftest.er1
19099   cat conftest.err >&5
19100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19101   (exit $ac_status); } && {
19102          test -z "$ac_c_werror_flag" ||
19103          test ! -s conftest.err
19104        } && test -s conftest$ac_exeext &&
19105        $as_test_x conftest$ac_exeext; then
19106   ac_cv_lib_ldap_r_ldap_simple_bind=yes
19107 else
19108   echo "$as_me: failed program was:" >&5
19109 sed 's/^/| /' conftest.$ac_ext >&5
19110
19111         ac_cv_lib_ldap_r_ldap_simple_bind=no
19112 fi
19113
19114 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19115       conftest$ac_exeext conftest.$ac_ext
19116 LIBS=$ac_check_lib_save_LIBS
19117 fi
19118 { echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
19119 echo "${ECHO_T}$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
19120 if test $ac_cv_lib_ldap_r_ldap_simple_bind = yes; then
19121   cat >>confdefs.h <<_ACEOF
19122 #define HAVE_LIBLDAP_R 1
19123 _ACEOF
19124
19125   LIBS="-lldap_r $LIBS"
19126
19127 else
19128   { { echo "$as_me:$LINENO: error: library 'ldap_r' is required for LDAP" >&5
19129 echo "$as_me: error: library 'ldap_r' is required for LDAP" >&2;}
19130    { (exit 1); exit 1; }; }
19131 fi
19132
19133       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
19134     else
19135       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
19136     fi
19137   else
19138
19139 { echo "$as_me:$LINENO: checking for ldap_bind in -lwldap32" >&5
19140 echo $ECHO_N "checking for ldap_bind in -lwldap32... $ECHO_C" >&6; }
19141 if test "${ac_cv_lib_wldap32_ldap_bind+set}" = set; then
19142   echo $ECHO_N "(cached) $ECHO_C" >&6
19143 else
19144   ac_check_lib_save_LIBS=$LIBS
19145 LIBS="-lwldap32  $LIBS"
19146 cat >conftest.$ac_ext <<_ACEOF
19147 /* confdefs.h.  */
19148 _ACEOF
19149 cat confdefs.h >>conftest.$ac_ext
19150 cat >>conftest.$ac_ext <<_ACEOF
19151 /* end confdefs.h.  */
19152
19153 /* Override any GCC internal prototype to avoid an error.
19154    Use char because int might match the return type of a GCC
19155    builtin and then its argument prototype would still apply.  */
19156 #ifdef __cplusplus
19157 extern "C"
19158 #endif
19159 char ldap_bind ();
19160 int
19161 main ()
19162 {
19163 return ldap_bind ();
19164   ;
19165   return 0;
19166 }
19167 _ACEOF
19168 rm -f conftest.$ac_objext conftest$ac_exeext
19169 if { (ac_try="$ac_link"
19170 case "(($ac_try" in
19171   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19172   *) ac_try_echo=$ac_try;;
19173 esac
19174 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19175   (eval "$ac_link") 2>conftest.er1
19176   ac_status=$?
19177   grep -v '^ *+' conftest.er1 >conftest.err
19178   rm -f conftest.er1
19179   cat conftest.err >&5
19180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19181   (exit $ac_status); } && {
19182          test -z "$ac_c_werror_flag" ||
19183          test ! -s conftest.err
19184        } && test -s conftest$ac_exeext &&
19185        $as_test_x conftest$ac_exeext; then
19186   ac_cv_lib_wldap32_ldap_bind=yes
19187 else
19188   echo "$as_me: failed program was:" >&5
19189 sed 's/^/| /' conftest.$ac_ext >&5
19190
19191         ac_cv_lib_wldap32_ldap_bind=no
19192 fi
19193
19194 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19195       conftest$ac_exeext conftest.$ac_ext
19196 LIBS=$ac_check_lib_save_LIBS
19197 fi
19198 { echo "$as_me:$LINENO: result: $ac_cv_lib_wldap32_ldap_bind" >&5
19199 echo "${ECHO_T}$ac_cv_lib_wldap32_ldap_bind" >&6; }
19200 if test $ac_cv_lib_wldap32_ldap_bind = yes; then
19201   cat >>confdefs.h <<_ACEOF
19202 #define HAVE_LIBWLDAP32 1
19203 _ACEOF
19204
19205   LIBS="-lwldap32 $LIBS"
19206
19207 else
19208   { { echo "$as_me:$LINENO: error: library 'wldap32' is required for LDAP" >&5
19209 echo "$as_me: error: library 'wldap32' is required for LDAP" >&2;}
19210    { (exit 1); exit 1; }; }
19211 fi
19212
19213     LDAP_LIBS_FE="-lwldap32"
19214     LDAP_LIBS_BE="-lwldap32"
19215   fi
19216   LIBS="$_LIBS"
19217 fi
19218
19219
19220
19221
19222 # This test makes sure that run tests work at all.  Sometimes a shared
19223 # library is found by the linker, but the runtime linker can't find it.
19224 # This check should come after all modifications of compiler or linker
19225 # variables, and before any other run tests.
19226 { echo "$as_me:$LINENO: checking test program" >&5
19227 echo $ECHO_N "checking test program... $ECHO_C" >&6; }
19228 if test "$cross_compiling" = yes; then
19229   { echo "$as_me:$LINENO: result: cross-compiling" >&5
19230 echo "${ECHO_T}cross-compiling" >&6; }
19231 else
19232   cat >conftest.$ac_ext <<_ACEOF
19233 /* confdefs.h.  */
19234 _ACEOF
19235 cat confdefs.h >>conftest.$ac_ext
19236 cat >>conftest.$ac_ext <<_ACEOF
19237 /* end confdefs.h.  */
19238 int main() { return 0; }
19239 _ACEOF
19240 rm -f conftest$ac_exeext
19241 if { (ac_try="$ac_link"
19242 case "(($ac_try" in
19243   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19244   *) ac_try_echo=$ac_try;;
19245 esac
19246 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19247   (eval "$ac_link") 2>&5
19248   ac_status=$?
19249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19250   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19251   { (case "(($ac_try" in
19252   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19253   *) ac_try_echo=$ac_try;;
19254 esac
19255 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19256   (eval "$ac_try") 2>&5
19257   ac_status=$?
19258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19259   (exit $ac_status); }; }; then
19260   { echo "$as_me:$LINENO: result: ok" >&5
19261 echo "${ECHO_T}ok" >&6; }
19262 else
19263   echo "$as_me: program exited with status $ac_status" >&5
19264 echo "$as_me: failed program was:" >&5
19265 sed 's/^/| /' conftest.$ac_ext >&5
19266
19267 ( exit $ac_status )
19268 { echo "$as_me:$LINENO: result: failed" >&5
19269 echo "${ECHO_T}failed" >&6; }
19270 { { echo "$as_me:$LINENO: error:
19271 Could not execute a simple test program.  This may be a problem
19272 related to locating shared libraries.  Check the file 'config.log'
19273 for the exact reason." >&5
19274 echo "$as_me: error:
19275 Could not execute a simple test program.  This may be a problem
19276 related to locating shared libraries.  Check the file 'config.log'
19277 for the exact reason." >&2;}
19278    { (exit 1); exit 1; }; }
19279 fi
19280 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19281 fi
19282
19283
19284
19285 # --------------------
19286 # Run tests below here
19287 # --------------------
19288
19289 # Force use of our snprintf if system's doesn't do arg control
19290 # See comment above at snprintf test for details.
19291 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
19292   { echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
19293 echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6; }
19294 if test "${pgac_cv_printf_arg_control+set}" = set; then
19295   echo $ECHO_N "(cached) $ECHO_C" >&6
19296 else
19297   if test "$cross_compiling" = yes; then
19298   pgac_cv_printf_arg_control=cross
19299 else
19300   cat >conftest.$ac_ext <<_ACEOF
19301 /* confdefs.h.  */
19302 _ACEOF
19303 cat confdefs.h >>conftest.$ac_ext
19304 cat >>conftest.$ac_ext <<_ACEOF
19305 /* end confdefs.h.  */
19306 #include <stdio.h>
19307 #include <string.h>
19308
19309 int main()
19310 {
19311   char buf[100];
19312
19313   /* can it swap arguments? */
19314   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
19315   if (strcmp(buf, "4 3") != 0)
19316     return 1;
19317   return 0;
19318 }
19319 _ACEOF
19320 rm -f conftest$ac_exeext
19321 if { (ac_try="$ac_link"
19322 case "(($ac_try" in
19323   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19324   *) ac_try_echo=$ac_try;;
19325 esac
19326 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19327   (eval "$ac_link") 2>&5
19328   ac_status=$?
19329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19330   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19331   { (case "(($ac_try" in
19332   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19333   *) ac_try_echo=$ac_try;;
19334 esac
19335 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19336   (eval "$ac_try") 2>&5
19337   ac_status=$?
19338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19339   (exit $ac_status); }; }; then
19340   pgac_cv_printf_arg_control=yes
19341 else
19342   echo "$as_me: program exited with status $ac_status" >&5
19343 echo "$as_me: failed program was:" >&5
19344 sed 's/^/| /' conftest.$ac_ext >&5
19345
19346 ( exit $ac_status )
19347 pgac_cv_printf_arg_control=no
19348 fi
19349 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19350 fi
19351
19352
19353
19354 fi
19355 { echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
19356 echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6; }
19357
19358   if test $pgac_cv_printf_arg_control != yes ; then
19359     pgac_need_repl_snprintf=yes
19360   fi
19361 fi
19362
19363
19364
19365 { echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
19366 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6; }
19367 if test "${pgac_cv_type_long_int_64+set}" = set; then
19368   echo $ECHO_N "(cached) $ECHO_C" >&6
19369 else
19370   if test "$cross_compiling" = yes; then
19371   # If cross-compiling, check the size reported by the compiler and
19372 # trust that the arithmetic works.
19373 cat >conftest.$ac_ext <<_ACEOF
19374 /* confdefs.h.  */
19375 _ACEOF
19376 cat confdefs.h >>conftest.$ac_ext
19377 cat >>conftest.$ac_ext <<_ACEOF
19378 /* end confdefs.h.  */
19379
19380 int
19381 main ()
19382 {
19383 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
19384 test_array [0] = 0
19385
19386   ;
19387   return 0;
19388 }
19389 _ACEOF
19390 rm -f conftest.$ac_objext
19391 if { (ac_try="$ac_compile"
19392 case "(($ac_try" in
19393   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19394   *) ac_try_echo=$ac_try;;
19395 esac
19396 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19397   (eval "$ac_compile") 2>conftest.er1
19398   ac_status=$?
19399   grep -v '^ *+' conftest.er1 >conftest.err
19400   rm -f conftest.er1
19401   cat conftest.err >&5
19402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19403   (exit $ac_status); } && {
19404          test -z "$ac_c_werror_flag" ||
19405          test ! -s conftest.err
19406        } && test -s conftest.$ac_objext; then
19407   pgac_cv_type_long_int_64=yes
19408 else
19409   echo "$as_me: failed program was:" >&5
19410 sed 's/^/| /' conftest.$ac_ext >&5
19411
19412         pgac_cv_type_long_int_64=no
19413 fi
19414
19415 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19416 else
19417   cat >conftest.$ac_ext <<_ACEOF
19418 /* confdefs.h.  */
19419 _ACEOF
19420 cat confdefs.h >>conftest.$ac_ext
19421 cat >>conftest.$ac_ext <<_ACEOF
19422 /* end confdefs.h.  */
19423 typedef long int ac_int64;
19424
19425 /*
19426  * These are globals to discourage the compiler from folding all the
19427  * arithmetic tests down to compile-time constants.
19428  */
19429 ac_int64 a = 20000001;
19430 ac_int64 b = 40000005;
19431
19432 int does_int64_work()
19433 {
19434   ac_int64 c,d;
19435
19436   if (sizeof(ac_int64) != 8)
19437     return 0;                   /* definitely not the right size */
19438
19439   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
19440   c = a * b;
19441   d = (c + b) / b;
19442   if (d != a+1)
19443     return 0;
19444   return 1;
19445 }
19446 main() {
19447   exit(! does_int64_work());
19448 }
19449 _ACEOF
19450 rm -f conftest$ac_exeext
19451 if { (ac_try="$ac_link"
19452 case "(($ac_try" in
19453   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19454   *) ac_try_echo=$ac_try;;
19455 esac
19456 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19457   (eval "$ac_link") 2>&5
19458   ac_status=$?
19459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19460   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19461   { (case "(($ac_try" in
19462   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19463   *) ac_try_echo=$ac_try;;
19464 esac
19465 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19466   (eval "$ac_try") 2>&5
19467   ac_status=$?
19468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19469   (exit $ac_status); }; }; then
19470   pgac_cv_type_long_int_64=yes
19471 else
19472   echo "$as_me: program exited with status $ac_status" >&5
19473 echo "$as_me: failed program was:" >&5
19474 sed 's/^/| /' conftest.$ac_ext >&5
19475
19476 ( exit $ac_status )
19477 pgac_cv_type_long_int_64=no
19478 fi
19479 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19480 fi
19481
19482
19483 fi
19484 { echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
19485 echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6; }
19486
19487 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
19488 if test x"$pgac_cv_type_long_int_64" = xyes ; then
19489
19490 cat >>confdefs.h <<\_ACEOF
19491 #define HAVE_LONG_INT_64
19492 _ACEOF
19493
19494 fi
19495
19496
19497 if test x"$HAVE_LONG_INT_64" = x"no" ; then
19498   { echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
19499 echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6; }
19500 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
19501   echo $ECHO_N "(cached) $ECHO_C" >&6
19502 else
19503   if test "$cross_compiling" = yes; then
19504   # If cross-compiling, check the size reported by the compiler and
19505 # trust that the arithmetic works.
19506 cat >conftest.$ac_ext <<_ACEOF
19507 /* confdefs.h.  */
19508 _ACEOF
19509 cat confdefs.h >>conftest.$ac_ext
19510 cat >>conftest.$ac_ext <<_ACEOF
19511 /* end confdefs.h.  */
19512
19513 int
19514 main ()
19515 {
19516 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
19517 test_array [0] = 0
19518
19519   ;
19520   return 0;
19521 }
19522 _ACEOF
19523 rm -f conftest.$ac_objext
19524 if { (ac_try="$ac_compile"
19525 case "(($ac_try" in
19526   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19527   *) ac_try_echo=$ac_try;;
19528 esac
19529 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19530   (eval "$ac_compile") 2>conftest.er1
19531   ac_status=$?
19532   grep -v '^ *+' conftest.er1 >conftest.err
19533   rm -f conftest.er1
19534   cat conftest.err >&5
19535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19536   (exit $ac_status); } && {
19537          test -z "$ac_c_werror_flag" ||
19538          test ! -s conftest.err
19539        } && test -s conftest.$ac_objext; then
19540   pgac_cv_type_long_long_int_64=yes
19541 else
19542   echo "$as_me: failed program was:" >&5
19543 sed 's/^/| /' conftest.$ac_ext >&5
19544
19545         pgac_cv_type_long_long_int_64=no
19546 fi
19547
19548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19549 else
19550   cat >conftest.$ac_ext <<_ACEOF
19551 /* confdefs.h.  */
19552 _ACEOF
19553 cat confdefs.h >>conftest.$ac_ext
19554 cat >>conftest.$ac_ext <<_ACEOF
19555 /* end confdefs.h.  */
19556 typedef long long int ac_int64;
19557
19558 /*
19559  * These are globals to discourage the compiler from folding all the
19560  * arithmetic tests down to compile-time constants.
19561  */
19562 ac_int64 a = 20000001;
19563 ac_int64 b = 40000005;
19564
19565 int does_int64_work()
19566 {
19567   ac_int64 c,d;
19568
19569   if (sizeof(ac_int64) != 8)
19570     return 0;                   /* definitely not the right size */
19571
19572   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
19573   c = a * b;
19574   d = (c + b) / b;
19575   if (d != a+1)
19576     return 0;
19577   return 1;
19578 }
19579 main() {
19580   exit(! does_int64_work());
19581 }
19582 _ACEOF
19583 rm -f conftest$ac_exeext
19584 if { (ac_try="$ac_link"
19585 case "(($ac_try" in
19586   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19587   *) ac_try_echo=$ac_try;;
19588 esac
19589 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19590   (eval "$ac_link") 2>&5
19591   ac_status=$?
19592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19593   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19594   { (case "(($ac_try" in
19595   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19596   *) ac_try_echo=$ac_try;;
19597 esac
19598 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19599   (eval "$ac_try") 2>&5
19600   ac_status=$?
19601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19602   (exit $ac_status); }; }; then
19603   pgac_cv_type_long_long_int_64=yes
19604 else
19605   echo "$as_me: program exited with status $ac_status" >&5
19606 echo "$as_me: failed program was:" >&5
19607 sed 's/^/| /' conftest.$ac_ext >&5
19608
19609 ( exit $ac_status )
19610 pgac_cv_type_long_long_int_64=no
19611 fi
19612 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19613 fi
19614
19615
19616 fi
19617 { echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
19618 echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6; }
19619
19620 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
19621 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
19622
19623 cat >>confdefs.h <<\_ACEOF
19624 #define HAVE_LONG_LONG_INT_64
19625 _ACEOF
19626
19627 fi
19628
19629 fi
19630
19631
19632
19633 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
19634   cat >conftest.$ac_ext <<_ACEOF
19635 /* confdefs.h.  */
19636 _ACEOF
19637 cat confdefs.h >>conftest.$ac_ext
19638 cat >>conftest.$ac_ext <<_ACEOF
19639 /* end confdefs.h.  */
19640
19641 #define INT64CONST(x)  x##LL
19642 long long int foo = INT64CONST(0x1234567890123456);
19643
19644 int
19645 main ()
19646 {
19647
19648   ;
19649   return 0;
19650 }
19651 _ACEOF
19652 rm -f conftest.$ac_objext
19653 if { (ac_try="$ac_compile"
19654 case "(($ac_try" in
19655   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19656   *) ac_try_echo=$ac_try;;
19657 esac
19658 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19659   (eval "$ac_compile") 2>conftest.er1
19660   ac_status=$?
19661   grep -v '^ *+' conftest.er1 >conftest.err
19662   rm -f conftest.er1
19663   cat conftest.err >&5
19664   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19665   (exit $ac_status); } && {
19666          test -z "$ac_c_werror_flag" ||
19667          test ! -s conftest.err
19668        } && test -s conftest.$ac_objext; then
19669
19670 cat >>confdefs.h <<\_ACEOF
19671 #define HAVE_LL_CONSTANTS 1
19672 _ACEOF
19673
19674 else
19675   echo "$as_me: failed program was:" >&5
19676 sed 's/^/| /' conftest.$ac_ext >&5
19677
19678
19679 fi
19680
19681 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19682 fi
19683
19684
19685 # If we found "long int" is 64 bits, assume snprintf handles it.  If
19686 # we found we need to use "long long int", better check.  We cope with
19687 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
19688 # work, fall back to our own snprintf emulation (which we know uses %lld).
19689
19690 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
19691   if test $pgac_need_repl_snprintf = no; then
19692     { echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
19693 echo $ECHO_N "checking snprintf format for long long int... $ECHO_C" >&6; }
19694 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
19695   echo $ECHO_N "(cached) $ECHO_C" >&6
19696 else
19697   for pgac_format in '%lld' '%qd' '%I64d'; do
19698 if test "$cross_compiling" = yes; then
19699   pgac_cv_snprintf_long_long_int_format=cross; break
19700 else
19701   cat >conftest.$ac_ext <<_ACEOF
19702 /* confdefs.h.  */
19703 _ACEOF
19704 cat confdefs.h >>conftest.$ac_ext
19705 cat >>conftest.$ac_ext <<_ACEOF
19706 /* end confdefs.h.  */
19707 #include <stdio.h>
19708 typedef long long int ac_int64;
19709 #define INT64_FORMAT "$pgac_format"
19710
19711 ac_int64 a = 20000001;
19712 ac_int64 b = 40000005;
19713
19714 int does_int64_snprintf_work()
19715 {
19716   ac_int64 c;
19717   char buf[100];
19718
19719   if (sizeof(ac_int64) != 8)
19720     return 0;                   /* doesn't look like the right size */
19721
19722   c = a * b;
19723   snprintf(buf, 100, INT64_FORMAT, c);
19724   if (strcmp(buf, "800000140000005") != 0)
19725     return 0;                   /* either multiply or snprintf is busted */
19726   return 1;
19727 }
19728 main() {
19729   exit(! does_int64_snprintf_work());
19730 }
19731 _ACEOF
19732 rm -f conftest$ac_exeext
19733 if { (ac_try="$ac_link"
19734 case "(($ac_try" in
19735   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19736   *) ac_try_echo=$ac_try;;
19737 esac
19738 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19739   (eval "$ac_link") 2>&5
19740   ac_status=$?
19741   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19742   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19743   { (case "(($ac_try" in
19744   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19745   *) ac_try_echo=$ac_try;;
19746 esac
19747 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19748   (eval "$ac_try") 2>&5
19749   ac_status=$?
19750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19751   (exit $ac_status); }; }; then
19752   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
19753 else
19754   echo "$as_me: program exited with status $ac_status" >&5
19755 echo "$as_me: failed program was:" >&5
19756 sed 's/^/| /' conftest.$ac_ext >&5
19757
19758 fi
19759 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19760 fi
19761
19762
19763 done
19764 fi
19765
19766 LONG_LONG_INT_FORMAT=''
19767
19768 case $pgac_cv_snprintf_long_long_int_format in
19769   cross) { echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
19770 echo "${ECHO_T}cannot test (not on host machine)" >&6; };;
19771   ?*)    { echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
19772 echo "${ECHO_T}$pgac_cv_snprintf_long_long_int_format" >&6; }
19773          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
19774   *)     { echo "$as_me:$LINENO: result: none" >&5
19775 echo "${ECHO_T}none" >&6; };;
19776 esac
19777     if test "$LONG_LONG_INT_FORMAT" = ""; then
19778       # Force usage of our own snprintf, since system snprintf is broken
19779       pgac_need_repl_snprintf=yes
19780       LONG_LONG_INT_FORMAT='%lld'
19781     fi
19782   else
19783     # Here if we previously decided we needed to use our own snprintf
19784     LONG_LONG_INT_FORMAT='%lld'
19785   fi
19786   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
19787   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
19788   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
19789 else
19790   # Here if we are not using 'long long int' at all
19791   INT64_FORMAT='"%ld"'
19792   UINT64_FORMAT='"%lu"'
19793 fi
19794
19795
19796 cat >>confdefs.h <<_ACEOF
19797 #define INT64_FORMAT $INT64_FORMAT
19798 _ACEOF
19799
19800
19801
19802 cat >>confdefs.h <<_ACEOF
19803 #define UINT64_FORMAT $UINT64_FORMAT
19804 _ACEOF
19805
19806
19807 # Now we have checked all the reasons to replace snprintf
19808 if test $pgac_need_repl_snprintf = yes; then
19809
19810 cat >>confdefs.h <<\_ACEOF
19811 #define USE_REPL_SNPRINTF 1
19812 _ACEOF
19813
19814   case " $LIBOBJS " in
19815   *" snprintf.$ac_objext "* ) ;;
19816   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
19817  ;;
19818 esac
19819
19820 fi
19821
19822 # Need a #define for the size of Datum (unsigned long)
19823 { echo "$as_me:$LINENO: checking for unsigned long" >&5
19824 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6; }
19825 if test "${ac_cv_type_unsigned_long+set}" = set; then
19826   echo $ECHO_N "(cached) $ECHO_C" >&6
19827 else
19828   cat >conftest.$ac_ext <<_ACEOF
19829 /* confdefs.h.  */
19830 _ACEOF
19831 cat confdefs.h >>conftest.$ac_ext
19832 cat >>conftest.$ac_ext <<_ACEOF
19833 /* end confdefs.h.  */
19834 $ac_includes_default
19835 typedef unsigned long ac__type_new_;
19836 int
19837 main ()
19838 {
19839 if ((ac__type_new_ *) 0)
19840   return 0;
19841 if (sizeof (ac__type_new_))
19842   return 0;
19843   ;
19844   return 0;
19845 }
19846 _ACEOF
19847 rm -f conftest.$ac_objext
19848 if { (ac_try="$ac_compile"
19849 case "(($ac_try" in
19850   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19851   *) ac_try_echo=$ac_try;;
19852 esac
19853 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19854   (eval "$ac_compile") 2>conftest.er1
19855   ac_status=$?
19856   grep -v '^ *+' conftest.er1 >conftest.err
19857   rm -f conftest.er1
19858   cat conftest.err >&5
19859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19860   (exit $ac_status); } && {
19861          test -z "$ac_c_werror_flag" ||
19862          test ! -s conftest.err
19863        } && test -s conftest.$ac_objext; then
19864   ac_cv_type_unsigned_long=yes
19865 else
19866   echo "$as_me: failed program was:" >&5
19867 sed 's/^/| /' conftest.$ac_ext >&5
19868
19869         ac_cv_type_unsigned_long=no
19870 fi
19871
19872 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19873 fi
19874 { echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
19875 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6; }
19876
19877 # The cast to long int works around a bug in the HP C Compiler
19878 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19879 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
19880 # This bug is HP SR number 8606223364.
19881 { echo "$as_me:$LINENO: checking size of unsigned long" >&5
19882 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6; }
19883 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
19884   echo $ECHO_N "(cached) $ECHO_C" >&6
19885 else
19886   if test "$cross_compiling" = yes; then
19887   # Depending upon the size, compute the lo and hi bounds.
19888 cat >conftest.$ac_ext <<_ACEOF
19889 /* confdefs.h.  */
19890 _ACEOF
19891 cat confdefs.h >>conftest.$ac_ext
19892 cat >>conftest.$ac_ext <<_ACEOF
19893 /* end confdefs.h.  */
19894 $ac_includes_default
19895    typedef unsigned long ac__type_sizeof_;
19896 int
19897 main ()
19898 {
19899 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
19900 test_array [0] = 0
19901
19902   ;
19903   return 0;
19904 }
19905 _ACEOF
19906 rm -f conftest.$ac_objext
19907 if { (ac_try="$ac_compile"
19908 case "(($ac_try" in
19909   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19910   *) ac_try_echo=$ac_try;;
19911 esac
19912 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19913   (eval "$ac_compile") 2>conftest.er1
19914   ac_status=$?
19915   grep -v '^ *+' conftest.er1 >conftest.err
19916   rm -f conftest.er1
19917   cat conftest.err >&5
19918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19919   (exit $ac_status); } && {
19920          test -z "$ac_c_werror_flag" ||
19921          test ! -s conftest.err
19922        } && test -s conftest.$ac_objext; then
19923   ac_lo=0 ac_mid=0
19924   while :; do
19925     cat >conftest.$ac_ext <<_ACEOF
19926 /* confdefs.h.  */
19927 _ACEOF
19928 cat confdefs.h >>conftest.$ac_ext
19929 cat >>conftest.$ac_ext <<_ACEOF
19930 /* end confdefs.h.  */
19931 $ac_includes_default
19932    typedef unsigned long ac__type_sizeof_;
19933 int
19934 main ()
19935 {
19936 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
19937 test_array [0] = 0
19938
19939   ;
19940   return 0;
19941 }
19942 _ACEOF
19943 rm -f conftest.$ac_objext
19944 if { (ac_try="$ac_compile"
19945 case "(($ac_try" in
19946   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19947   *) ac_try_echo=$ac_try;;
19948 esac
19949 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19950   (eval "$ac_compile") 2>conftest.er1
19951   ac_status=$?
19952   grep -v '^ *+' conftest.er1 >conftest.err
19953   rm -f conftest.er1
19954   cat conftest.err >&5
19955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19956   (exit $ac_status); } && {
19957          test -z "$ac_c_werror_flag" ||
19958          test ! -s conftest.err
19959        } && test -s conftest.$ac_objext; then
19960   ac_hi=$ac_mid; break
19961 else
19962   echo "$as_me: failed program was:" >&5
19963 sed 's/^/| /' conftest.$ac_ext >&5
19964
19965         ac_lo=`expr $ac_mid + 1`
19966                         if test $ac_lo -le $ac_mid; then
19967                           ac_lo= ac_hi=
19968                           break
19969                         fi
19970                         ac_mid=`expr 2 '*' $ac_mid + 1`
19971 fi
19972
19973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19974   done
19975 else
19976   echo "$as_me: failed program was:" >&5
19977 sed 's/^/| /' conftest.$ac_ext >&5
19978
19979         cat >conftest.$ac_ext <<_ACEOF
19980 /* confdefs.h.  */
19981 _ACEOF
19982 cat confdefs.h >>conftest.$ac_ext
19983 cat >>conftest.$ac_ext <<_ACEOF
19984 /* end confdefs.h.  */
19985 $ac_includes_default
19986    typedef unsigned long ac__type_sizeof_;
19987 int
19988 main ()
19989 {
19990 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
19991 test_array [0] = 0
19992
19993   ;
19994   return 0;
19995 }
19996 _ACEOF
19997 rm -f conftest.$ac_objext
19998 if { (ac_try="$ac_compile"
19999 case "(($ac_try" in
20000   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20001   *) ac_try_echo=$ac_try;;
20002 esac
20003 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20004   (eval "$ac_compile") 2>conftest.er1
20005   ac_status=$?
20006   grep -v '^ *+' conftest.er1 >conftest.err
20007   rm -f conftest.er1
20008   cat conftest.err >&5
20009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20010   (exit $ac_status); } && {
20011          test -z "$ac_c_werror_flag" ||
20012          test ! -s conftest.err
20013        } && test -s conftest.$ac_objext; then
20014   ac_hi=-1 ac_mid=-1
20015   while :; do
20016     cat >conftest.$ac_ext <<_ACEOF
20017 /* confdefs.h.  */
20018 _ACEOF
20019 cat confdefs.h >>conftest.$ac_ext
20020 cat >>conftest.$ac_ext <<_ACEOF
20021 /* end confdefs.h.  */
20022 $ac_includes_default
20023    typedef unsigned long ac__type_sizeof_;
20024 int
20025 main ()
20026 {
20027 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
20028 test_array [0] = 0
20029
20030   ;
20031   return 0;
20032 }
20033 _ACEOF
20034 rm -f conftest.$ac_objext
20035 if { (ac_try="$ac_compile"
20036 case "(($ac_try" in
20037   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20038   *) ac_try_echo=$ac_try;;
20039 esac
20040 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20041   (eval "$ac_compile") 2>conftest.er1
20042   ac_status=$?
20043   grep -v '^ *+' conftest.er1 >conftest.err
20044   rm -f conftest.er1
20045   cat conftest.err >&5
20046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20047   (exit $ac_status); } && {
20048          test -z "$ac_c_werror_flag" ||
20049          test ! -s conftest.err
20050        } && test -s conftest.$ac_objext; then
20051   ac_lo=$ac_mid; break
20052 else
20053   echo "$as_me: failed program was:" >&5
20054 sed 's/^/| /' conftest.$ac_ext >&5
20055
20056         ac_hi=`expr '(' $ac_mid ')' - 1`
20057                         if test $ac_mid -le $ac_hi; then
20058                           ac_lo= ac_hi=
20059                           break
20060                         fi
20061                         ac_mid=`expr 2 '*' $ac_mid`
20062 fi
20063
20064 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20065   done
20066 else
20067   echo "$as_me: failed program was:" >&5
20068 sed 's/^/| /' conftest.$ac_ext >&5
20069
20070         ac_lo= ac_hi=
20071 fi
20072
20073 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20074 fi
20075
20076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20077 # Binary search between lo and hi bounds.
20078 while test "x$ac_lo" != "x$ac_hi"; do
20079   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20080   cat >conftest.$ac_ext <<_ACEOF
20081 /* confdefs.h.  */
20082 _ACEOF
20083 cat confdefs.h >>conftest.$ac_ext
20084 cat >>conftest.$ac_ext <<_ACEOF
20085 /* end confdefs.h.  */
20086 $ac_includes_default
20087    typedef unsigned long ac__type_sizeof_;
20088 int
20089 main ()
20090 {
20091 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
20092 test_array [0] = 0
20093
20094   ;
20095   return 0;
20096 }
20097 _ACEOF
20098 rm -f conftest.$ac_objext
20099 if { (ac_try="$ac_compile"
20100 case "(($ac_try" in
20101   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20102   *) ac_try_echo=$ac_try;;
20103 esac
20104 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20105   (eval "$ac_compile") 2>conftest.er1
20106   ac_status=$?
20107   grep -v '^ *+' conftest.er1 >conftest.err
20108   rm -f conftest.er1
20109   cat conftest.err >&5
20110   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20111   (exit $ac_status); } && {
20112          test -z "$ac_c_werror_flag" ||
20113          test ! -s conftest.err
20114        } && test -s conftest.$ac_objext; then
20115   ac_hi=$ac_mid
20116 else
20117   echo "$as_me: failed program was:" >&5
20118 sed 's/^/| /' conftest.$ac_ext >&5
20119
20120         ac_lo=`expr '(' $ac_mid ')' + 1`
20121 fi
20122
20123 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20124 done
20125 case $ac_lo in
20126 ?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
20127 '') if test "$ac_cv_type_unsigned_long" = yes; then
20128      { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long)
20129 See \`config.log' for more details." >&5
20130 echo "$as_me: error: cannot compute sizeof (unsigned long)
20131 See \`config.log' for more details." >&2;}
20132    { (exit 77); exit 77; }; }
20133    else
20134      ac_cv_sizeof_unsigned_long=0
20135    fi ;;
20136 esac
20137 else
20138   cat >conftest.$ac_ext <<_ACEOF
20139 /* confdefs.h.  */
20140 _ACEOF
20141 cat confdefs.h >>conftest.$ac_ext
20142 cat >>conftest.$ac_ext <<_ACEOF
20143 /* end confdefs.h.  */
20144 $ac_includes_default
20145    typedef unsigned long ac__type_sizeof_;
20146 static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
20147 static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
20148 #include <stdio.h>
20149 #include <stdlib.h>
20150 int
20151 main ()
20152 {
20153
20154   FILE *f = fopen ("conftest.val", "w");
20155   if (! f)
20156     return 1;
20157   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
20158     {
20159       long int i = longval ();
20160       if (i != ((long int) (sizeof (ac__type_sizeof_))))
20161         return 1;
20162       fprintf (f, "%ld\n", i);
20163     }
20164   else
20165     {
20166       unsigned long int i = ulongval ();
20167       if (i != ((long int) (sizeof (ac__type_sizeof_))))
20168         return 1;
20169       fprintf (f, "%lu\n", i);
20170     }
20171   return ferror (f) || fclose (f) != 0;
20172
20173   ;
20174   return 0;
20175 }
20176 _ACEOF
20177 rm -f conftest$ac_exeext
20178 if { (ac_try="$ac_link"
20179 case "(($ac_try" in
20180   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20181   *) ac_try_echo=$ac_try;;
20182 esac
20183 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20184   (eval "$ac_link") 2>&5
20185   ac_status=$?
20186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20187   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20188   { (case "(($ac_try" in
20189   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20190   *) ac_try_echo=$ac_try;;
20191 esac
20192 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20193   (eval "$ac_try") 2>&5
20194   ac_status=$?
20195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20196   (exit $ac_status); }; }; then
20197   ac_cv_sizeof_unsigned_long=`cat conftest.val`
20198 else
20199   echo "$as_me: program exited with status $ac_status" >&5
20200 echo "$as_me: failed program was:" >&5
20201 sed 's/^/| /' conftest.$ac_ext >&5
20202
20203 ( exit $ac_status )
20204 if test "$ac_cv_type_unsigned_long" = yes; then
20205      { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long)
20206 See \`config.log' for more details." >&5
20207 echo "$as_me: error: cannot compute sizeof (unsigned long)
20208 See \`config.log' for more details." >&2;}
20209    { (exit 77); exit 77; }; }
20210    else
20211      ac_cv_sizeof_unsigned_long=0
20212    fi
20213 fi
20214 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20215 fi
20216 rm -f conftest.val
20217 fi
20218 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
20219 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6; }
20220
20221
20222
20223 cat >>confdefs.h <<_ACEOF
20224 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
20225 _ACEOF
20226
20227
20228
20229 # And one for the size of size_t (enables tweaks for > 32bit address space)
20230 { echo "$as_me:$LINENO: checking for size_t" >&5
20231 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
20232 if test "${ac_cv_type_size_t+set}" = set; then
20233   echo $ECHO_N "(cached) $ECHO_C" >&6
20234 else
20235   cat >conftest.$ac_ext <<_ACEOF
20236 /* confdefs.h.  */
20237 _ACEOF
20238 cat confdefs.h >>conftest.$ac_ext
20239 cat >>conftest.$ac_ext <<_ACEOF
20240 /* end confdefs.h.  */
20241 $ac_includes_default
20242 typedef size_t ac__type_new_;
20243 int
20244 main ()
20245 {
20246 if ((ac__type_new_ *) 0)
20247   return 0;
20248 if (sizeof (ac__type_new_))
20249   return 0;
20250   ;
20251   return 0;
20252 }
20253 _ACEOF
20254 rm -f conftest.$ac_objext
20255 if { (ac_try="$ac_compile"
20256 case "(($ac_try" in
20257   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20258   *) ac_try_echo=$ac_try;;
20259 esac
20260 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20261   (eval "$ac_compile") 2>conftest.er1
20262   ac_status=$?
20263   grep -v '^ *+' conftest.er1 >conftest.err
20264   rm -f conftest.er1
20265   cat conftest.err >&5
20266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20267   (exit $ac_status); } && {
20268          test -z "$ac_c_werror_flag" ||
20269          test ! -s conftest.err
20270        } && test -s conftest.$ac_objext; then
20271   ac_cv_type_size_t=yes
20272 else
20273   echo "$as_me: failed program was:" >&5
20274 sed 's/^/| /' conftest.$ac_ext >&5
20275
20276         ac_cv_type_size_t=no
20277 fi
20278
20279 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20280 fi
20281 { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
20282 echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
20283
20284 # The cast to long int works around a bug in the HP C Compiler
20285 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
20286 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
20287 # This bug is HP SR number 8606223364.
20288 { echo "$as_me:$LINENO: checking size of size_t" >&5
20289 echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
20290 if test "${ac_cv_sizeof_size_t+set}" = set; then
20291   echo $ECHO_N "(cached) $ECHO_C" >&6
20292 else
20293   if test "$cross_compiling" = yes; then
20294   # Depending upon the size, compute the lo and hi bounds.
20295 cat >conftest.$ac_ext <<_ACEOF
20296 /* confdefs.h.  */
20297 _ACEOF
20298 cat confdefs.h >>conftest.$ac_ext
20299 cat >>conftest.$ac_ext <<_ACEOF
20300 /* end confdefs.h.  */
20301 $ac_includes_default
20302    typedef size_t ac__type_sizeof_;
20303 int
20304 main ()
20305 {
20306 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
20307 test_array [0] = 0
20308
20309   ;
20310   return 0;
20311 }
20312 _ACEOF
20313 rm -f conftest.$ac_objext
20314 if { (ac_try="$ac_compile"
20315 case "(($ac_try" in
20316   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20317   *) ac_try_echo=$ac_try;;
20318 esac
20319 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20320   (eval "$ac_compile") 2>conftest.er1
20321   ac_status=$?
20322   grep -v '^ *+' conftest.er1 >conftest.err
20323   rm -f conftest.er1
20324   cat conftest.err >&5
20325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20326   (exit $ac_status); } && {
20327          test -z "$ac_c_werror_flag" ||
20328          test ! -s conftest.err
20329        } && test -s conftest.$ac_objext; then
20330   ac_lo=0 ac_mid=0
20331   while :; do
20332     cat >conftest.$ac_ext <<_ACEOF
20333 /* confdefs.h.  */
20334 _ACEOF
20335 cat confdefs.h >>conftest.$ac_ext
20336 cat >>conftest.$ac_ext <<_ACEOF
20337 /* end confdefs.h.  */
20338 $ac_includes_default
20339    typedef size_t ac__type_sizeof_;
20340 int
20341 main ()
20342 {
20343 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
20344 test_array [0] = 0
20345
20346   ;
20347   return 0;
20348 }
20349 _ACEOF
20350 rm -f conftest.$ac_objext
20351 if { (ac_try="$ac_compile"
20352 case "(($ac_try" in
20353   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20354   *) ac_try_echo=$ac_try;;
20355 esac
20356 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20357   (eval "$ac_compile") 2>conftest.er1
20358   ac_status=$?
20359   grep -v '^ *+' conftest.er1 >conftest.err
20360   rm -f conftest.er1
20361   cat conftest.err >&5
20362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20363   (exit $ac_status); } && {
20364          test -z "$ac_c_werror_flag" ||
20365          test ! -s conftest.err
20366        } && test -s conftest.$ac_objext; then
20367   ac_hi=$ac_mid; break
20368 else
20369   echo "$as_me: failed program was:" >&5
20370 sed 's/^/| /' conftest.$ac_ext >&5
20371
20372         ac_lo=`expr $ac_mid + 1`
20373                         if test $ac_lo -le $ac_mid; then
20374                           ac_lo= ac_hi=
20375                           break
20376                         fi
20377                         ac_mid=`expr 2 '*' $ac_mid + 1`
20378 fi
20379
20380 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20381   done
20382 else
20383   echo "$as_me: failed program was:" >&5
20384 sed 's/^/| /' conftest.$ac_ext >&5
20385
20386         cat >conftest.$ac_ext <<_ACEOF
20387 /* confdefs.h.  */
20388 _ACEOF
20389 cat confdefs.h >>conftest.$ac_ext
20390 cat >>conftest.$ac_ext <<_ACEOF
20391 /* end confdefs.h.  */
20392 $ac_includes_default
20393    typedef size_t ac__type_sizeof_;
20394 int
20395 main ()
20396 {
20397 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
20398 test_array [0] = 0
20399
20400   ;
20401   return 0;
20402 }
20403 _ACEOF
20404 rm -f conftest.$ac_objext
20405 if { (ac_try="$ac_compile"
20406 case "(($ac_try" in
20407   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20408   *) ac_try_echo=$ac_try;;
20409 esac
20410 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20411   (eval "$ac_compile") 2>conftest.er1
20412   ac_status=$?
20413   grep -v '^ *+' conftest.er1 >conftest.err
20414   rm -f conftest.er1
20415   cat conftest.err >&5
20416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20417   (exit $ac_status); } && {
20418          test -z "$ac_c_werror_flag" ||
20419          test ! -s conftest.err
20420        } && test -s conftest.$ac_objext; then
20421   ac_hi=-1 ac_mid=-1
20422   while :; do
20423     cat >conftest.$ac_ext <<_ACEOF
20424 /* confdefs.h.  */
20425 _ACEOF
20426 cat confdefs.h >>conftest.$ac_ext
20427 cat >>conftest.$ac_ext <<_ACEOF
20428 /* end confdefs.h.  */
20429 $ac_includes_default
20430    typedef size_t ac__type_sizeof_;
20431 int
20432 main ()
20433 {
20434 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
20435 test_array [0] = 0
20436
20437   ;
20438   return 0;
20439 }
20440 _ACEOF
20441 rm -f conftest.$ac_objext
20442 if { (ac_try="$ac_compile"
20443 case "(($ac_try" in
20444   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20445   *) ac_try_echo=$ac_try;;
20446 esac
20447 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20448   (eval "$ac_compile") 2>conftest.er1
20449   ac_status=$?
20450   grep -v '^ *+' conftest.er1 >conftest.err
20451   rm -f conftest.er1
20452   cat conftest.err >&5
20453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20454   (exit $ac_status); } && {
20455          test -z "$ac_c_werror_flag" ||
20456          test ! -s conftest.err
20457        } && test -s conftest.$ac_objext; then
20458   ac_lo=$ac_mid; break
20459 else
20460   echo "$as_me: failed program was:" >&5
20461 sed 's/^/| /' conftest.$ac_ext >&5
20462
20463         ac_hi=`expr '(' $ac_mid ')' - 1`
20464                         if test $ac_mid -le $ac_hi; then
20465                           ac_lo= ac_hi=
20466                           break
20467                         fi
20468                         ac_mid=`expr 2 '*' $ac_mid`
20469 fi
20470
20471 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20472   done
20473 else
20474   echo "$as_me: failed program was:" >&5
20475 sed 's/^/| /' conftest.$ac_ext >&5
20476
20477         ac_lo= ac_hi=
20478 fi
20479
20480 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20481 fi
20482
20483 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20484 # Binary search between lo and hi bounds.
20485 while test "x$ac_lo" != "x$ac_hi"; do
20486   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20487   cat >conftest.$ac_ext <<_ACEOF
20488 /* confdefs.h.  */
20489 _ACEOF
20490 cat confdefs.h >>conftest.$ac_ext
20491 cat >>conftest.$ac_ext <<_ACEOF
20492 /* end confdefs.h.  */
20493 $ac_includes_default
20494    typedef size_t ac__type_sizeof_;
20495 int
20496 main ()
20497 {
20498 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
20499 test_array [0] = 0
20500
20501   ;
20502   return 0;
20503 }
20504 _ACEOF
20505 rm -f conftest.$ac_objext
20506 if { (ac_try="$ac_compile"
20507 case "(($ac_try" in
20508   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20509   *) ac_try_echo=$ac_try;;
20510 esac
20511 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20512   (eval "$ac_compile") 2>conftest.er1
20513   ac_status=$?
20514   grep -v '^ *+' conftest.er1 >conftest.err
20515   rm -f conftest.er1
20516   cat conftest.err >&5
20517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20518   (exit $ac_status); } && {
20519          test -z "$ac_c_werror_flag" ||
20520          test ! -s conftest.err
20521        } && test -s conftest.$ac_objext; then
20522   ac_hi=$ac_mid
20523 else
20524   echo "$as_me: failed program was:" >&5
20525 sed 's/^/| /' conftest.$ac_ext >&5
20526
20527         ac_lo=`expr '(' $ac_mid ')' + 1`
20528 fi
20529
20530 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20531 done
20532 case $ac_lo in
20533 ?*) ac_cv_sizeof_size_t=$ac_lo;;
20534 '') if test "$ac_cv_type_size_t" = yes; then
20535      { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
20536 See \`config.log' for more details." >&5
20537 echo "$as_me: error: cannot compute sizeof (size_t)
20538 See \`config.log' for more details." >&2;}
20539    { (exit 77); exit 77; }; }
20540    else
20541      ac_cv_sizeof_size_t=0
20542    fi ;;
20543 esac
20544 else
20545   cat >conftest.$ac_ext <<_ACEOF
20546 /* confdefs.h.  */
20547 _ACEOF
20548 cat confdefs.h >>conftest.$ac_ext
20549 cat >>conftest.$ac_ext <<_ACEOF
20550 /* end confdefs.h.  */
20551 $ac_includes_default
20552    typedef size_t ac__type_sizeof_;
20553 static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
20554 static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
20555 #include <stdio.h>
20556 #include <stdlib.h>
20557 int
20558 main ()
20559 {
20560
20561   FILE *f = fopen ("conftest.val", "w");
20562   if (! f)
20563     return 1;
20564   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
20565     {
20566       long int i = longval ();
20567       if (i != ((long int) (sizeof (ac__type_sizeof_))))
20568         return 1;
20569       fprintf (f, "%ld\n", i);
20570     }
20571   else
20572     {
20573       unsigned long int i = ulongval ();
20574       if (i != ((long int) (sizeof (ac__type_sizeof_))))
20575         return 1;
20576       fprintf (f, "%lu\n", i);
20577     }
20578   return ferror (f) || fclose (f) != 0;
20579
20580   ;
20581   return 0;
20582 }
20583 _ACEOF
20584 rm -f conftest$ac_exeext
20585 if { (ac_try="$ac_link"
20586 case "(($ac_try" in
20587   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20588   *) ac_try_echo=$ac_try;;
20589 esac
20590 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20591   (eval "$ac_link") 2>&5
20592   ac_status=$?
20593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20594   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20595   { (case "(($ac_try" in
20596   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20597   *) ac_try_echo=$ac_try;;
20598 esac
20599 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20600   (eval "$ac_try") 2>&5
20601   ac_status=$?
20602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20603   (exit $ac_status); }; }; then
20604   ac_cv_sizeof_size_t=`cat conftest.val`
20605 else
20606   echo "$as_me: program exited with status $ac_status" >&5
20607 echo "$as_me: failed program was:" >&5
20608 sed 's/^/| /' conftest.$ac_ext >&5
20609
20610 ( exit $ac_status )
20611 if test "$ac_cv_type_size_t" = yes; then
20612      { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
20613 See \`config.log' for more details." >&5
20614 echo "$as_me: error: cannot compute sizeof (size_t)
20615 See \`config.log' for more details." >&2;}
20616    { (exit 77); exit 77; }; }
20617    else
20618      ac_cv_sizeof_size_t=0
20619    fi
20620 fi
20621 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20622 fi
20623 rm -f conftest.val
20624 fi
20625 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
20626 echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
20627
20628
20629
20630 cat >>confdefs.h <<_ACEOF
20631 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
20632 _ACEOF
20633
20634
20635
20636 # Determine memory alignment requirements for the basic C data types.
20637
20638 { echo "$as_me:$LINENO: checking for short" >&5
20639 echo $ECHO_N "checking for short... $ECHO_C" >&6; }
20640 if test "${ac_cv_type_short+set}" = set; then
20641   echo $ECHO_N "(cached) $ECHO_C" >&6
20642 else
20643   cat >conftest.$ac_ext <<_ACEOF
20644 /* confdefs.h.  */
20645 _ACEOF
20646 cat confdefs.h >>conftest.$ac_ext
20647 cat >>conftest.$ac_ext <<_ACEOF
20648 /* end confdefs.h.  */
20649 $ac_includes_default
20650 typedef short ac__type_new_;
20651 int
20652 main ()
20653 {
20654 if ((ac__type_new_ *) 0)
20655   return 0;
20656 if (sizeof (ac__type_new_))
20657   return 0;
20658   ;
20659   return 0;
20660 }
20661 _ACEOF
20662 rm -f conftest.$ac_objext
20663 if { (ac_try="$ac_compile"
20664 case "(($ac_try" in
20665   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20666   *) ac_try_echo=$ac_try;;
20667 esac
20668 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20669   (eval "$ac_compile") 2>conftest.er1
20670   ac_status=$?
20671   grep -v '^ *+' conftest.er1 >conftest.err
20672   rm -f conftest.er1
20673   cat conftest.err >&5
20674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20675   (exit $ac_status); } && {
20676          test -z "$ac_c_werror_flag" ||
20677          test ! -s conftest.err
20678        } && test -s conftest.$ac_objext; then
20679   ac_cv_type_short=yes
20680 else
20681   echo "$as_me: failed program was:" >&5
20682 sed 's/^/| /' conftest.$ac_ext >&5
20683
20684         ac_cv_type_short=no
20685 fi
20686
20687 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20688 fi
20689 { echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
20690 echo "${ECHO_T}$ac_cv_type_short" >&6; }
20691
20692 # The cast to long int works around a bug in the HP C Compiler,
20693 # see AC_CHECK_SIZEOF for more information.
20694 { echo "$as_me:$LINENO: checking alignment of short" >&5
20695 echo $ECHO_N "checking alignment of short... $ECHO_C" >&6; }
20696 if test "${ac_cv_alignof_short+set}" = set; then
20697   echo $ECHO_N "(cached) $ECHO_C" >&6
20698 else
20699   if test "$cross_compiling" = yes; then
20700   # Depending upon the size, compute the lo and hi bounds.
20701 cat >conftest.$ac_ext <<_ACEOF
20702 /* confdefs.h.  */
20703 _ACEOF
20704 cat confdefs.h >>conftest.$ac_ext
20705 cat >>conftest.$ac_ext <<_ACEOF
20706 /* end confdefs.h.  */
20707 $ac_includes_default
20708 #ifndef offsetof
20709 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
20710 #endif
20711 typedef struct { char x; short y; } ac__type_alignof_;
20712 int
20713 main ()
20714 {
20715 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
20716 test_array [0] = 0
20717
20718   ;
20719   return 0;
20720 }
20721 _ACEOF
20722 rm -f conftest.$ac_objext
20723 if { (ac_try="$ac_compile"
20724 case "(($ac_try" in
20725   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20726   *) ac_try_echo=$ac_try;;
20727 esac
20728 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20729   (eval "$ac_compile") 2>conftest.er1
20730   ac_status=$?
20731   grep -v '^ *+' conftest.er1 >conftest.err
20732   rm -f conftest.er1
20733   cat conftest.err >&5
20734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20735   (exit $ac_status); } && {
20736          test -z "$ac_c_werror_flag" ||
20737          test ! -s conftest.err
20738        } && test -s conftest.$ac_objext; then
20739   ac_lo=0 ac_mid=0
20740   while :; do
20741     cat >conftest.$ac_ext <<_ACEOF
20742 /* confdefs.h.  */
20743 _ACEOF
20744 cat confdefs.h >>conftest.$ac_ext
20745 cat >>conftest.$ac_ext <<_ACEOF
20746 /* end confdefs.h.  */
20747 $ac_includes_default
20748 #ifndef offsetof
20749 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
20750 #endif
20751 typedef struct { char x; short y; } ac__type_alignof_;
20752 int
20753 main ()
20754 {
20755 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
20756 test_array [0] = 0
20757
20758   ;
20759   return 0;
20760 }
20761 _ACEOF
20762 rm -f conftest.$ac_objext
20763 if { (ac_try="$ac_compile"
20764 case "(($ac_try" in
20765   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20766   *) ac_try_echo=$ac_try;;
20767 esac
20768 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20769   (eval "$ac_compile") 2>conftest.er1
20770   ac_status=$?
20771   grep -v '^ *+' conftest.er1 >conftest.err
20772   rm -f conftest.er1
20773   cat conftest.err >&5
20774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20775   (exit $ac_status); } && {
20776          test -z "$ac_c_werror_flag" ||
20777          test ! -s conftest.err
20778        } && test -s conftest.$ac_objext; then
20779   ac_hi=$ac_mid; break
20780 else
20781   echo "$as_me: failed program was:" >&5
20782 sed 's/^/| /' conftest.$ac_ext >&5
20783
20784         ac_lo=`expr $ac_mid + 1`
20785                         if test $ac_lo -le $ac_mid; then
20786                           ac_lo= ac_hi=
20787                           break
20788                         fi
20789                         ac_mid=`expr 2 '*' $ac_mid + 1`
20790 fi
20791
20792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20793   done
20794 else
20795   echo "$as_me: failed program was:" >&5
20796 sed 's/^/| /' conftest.$ac_ext >&5
20797
20798         cat >conftest.$ac_ext <<_ACEOF
20799 /* confdefs.h.  */
20800 _ACEOF
20801 cat confdefs.h >>conftest.$ac_ext
20802 cat >>conftest.$ac_ext <<_ACEOF
20803 /* end confdefs.h.  */
20804 $ac_includes_default
20805 #ifndef offsetof
20806 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
20807 #endif
20808 typedef struct { char x; short y; } ac__type_alignof_;
20809 int
20810 main ()
20811 {
20812 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
20813 test_array [0] = 0
20814
20815   ;
20816   return 0;
20817 }
20818 _ACEOF
20819 rm -f conftest.$ac_objext
20820 if { (ac_try="$ac_compile"
20821 case "(($ac_try" in
20822   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20823   *) ac_try_echo=$ac_try;;
20824 esac
20825 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20826   (eval "$ac_compile") 2>conftest.er1
20827   ac_status=$?
20828   grep -v '^ *+' conftest.er1 >conftest.err
20829   rm -f conftest.er1
20830   cat conftest.err >&5
20831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20832   (exit $ac_status); } && {
20833          test -z "$ac_c_werror_flag" ||
20834          test ! -s conftest.err
20835        } && test -s conftest.$ac_objext; then
20836   ac_hi=-1 ac_mid=-1
20837   while :; do
20838     cat >conftest.$ac_ext <<_ACEOF
20839 /* confdefs.h.  */
20840 _ACEOF
20841 cat confdefs.h >>conftest.$ac_ext
20842 cat >>conftest.$ac_ext <<_ACEOF
20843 /* end confdefs.h.  */
20844 $ac_includes_default
20845 #ifndef offsetof
20846 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
20847 #endif
20848 typedef struct { char x; short y; } ac__type_alignof_;
20849 int
20850 main ()
20851 {
20852 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
20853 test_array [0] = 0
20854
20855   ;
20856   return 0;
20857 }
20858 _ACEOF
20859 rm -f conftest.$ac_objext
20860 if { (ac_try="$ac_compile"
20861 case "(($ac_try" in
20862   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20863   *) ac_try_echo=$ac_try;;
20864 esac
20865 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20866   (eval "$ac_compile") 2>conftest.er1
20867   ac_status=$?
20868   grep -v '^ *+' conftest.er1 >conftest.err
20869   rm -f conftest.er1
20870   cat conftest.err >&5
20871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20872   (exit $ac_status); } && {
20873          test -z "$ac_c_werror_flag" ||
20874          test ! -s conftest.err
20875        } && test -s conftest.$ac_objext; then
20876   ac_lo=$ac_mid; break
20877 else
20878   echo "$as_me: failed program was:" >&5
20879 sed 's/^/| /' conftest.$ac_ext >&5
20880
20881         ac_hi=`expr '(' $ac_mid ')' - 1`
20882                         if test $ac_mid -le $ac_hi; then
20883                           ac_lo= ac_hi=
20884                           break
20885                         fi
20886                         ac_mid=`expr 2 '*' $ac_mid`
20887 fi
20888
20889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20890   done
20891 else
20892   echo "$as_me: failed program was:" >&5
20893 sed 's/^/| /' conftest.$ac_ext >&5
20894
20895         ac_lo= ac_hi=
20896 fi
20897
20898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20899 fi
20900
20901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20902 # Binary search between lo and hi bounds.
20903 while test "x$ac_lo" != "x$ac_hi"; do
20904   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20905   cat >conftest.$ac_ext <<_ACEOF
20906 /* confdefs.h.  */
20907 _ACEOF
20908 cat confdefs.h >>conftest.$ac_ext
20909 cat >>conftest.$ac_ext <<_ACEOF
20910 /* end confdefs.h.  */
20911 $ac_includes_default
20912 #ifndef offsetof
20913 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
20914 #endif
20915 typedef struct { char x; short y; } ac__type_alignof_;
20916 int
20917 main ()
20918 {
20919 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
20920 test_array [0] = 0
20921
20922   ;
20923   return 0;
20924 }
20925 _ACEOF
20926 rm -f conftest.$ac_objext
20927 if { (ac_try="$ac_compile"
20928 case "(($ac_try" in
20929   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20930   *) ac_try_echo=$ac_try;;
20931 esac
20932 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20933   (eval "$ac_compile") 2>conftest.er1
20934   ac_status=$?
20935   grep -v '^ *+' conftest.er1 >conftest.err
20936   rm -f conftest.er1
20937   cat conftest.err >&5
20938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20939   (exit $ac_status); } && {
20940          test -z "$ac_c_werror_flag" ||
20941          test ! -s conftest.err
20942        } && test -s conftest.$ac_objext; then
20943   ac_hi=$ac_mid
20944 else
20945   echo "$as_me: failed program was:" >&5
20946 sed 's/^/| /' conftest.$ac_ext >&5
20947
20948         ac_lo=`expr '(' $ac_mid ')' + 1`
20949 fi
20950
20951 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20952 done
20953 case $ac_lo in
20954 ?*) ac_cv_alignof_short=$ac_lo;;
20955 '') if test "$ac_cv_type_short" = yes; then
20956      { { echo "$as_me:$LINENO: error: cannot compute alignment of short
20957 See \`config.log' for more details." >&5
20958 echo "$as_me: error: cannot compute alignment of short
20959 See \`config.log' for more details." >&2;}
20960    { (exit 77); exit 77; }; }
20961    else
20962      ac_cv_alignof_short=0
20963    fi ;;
20964 esac
20965 else
20966   cat >conftest.$ac_ext <<_ACEOF
20967 /* confdefs.h.  */
20968 _ACEOF
20969 cat confdefs.h >>conftest.$ac_ext
20970 cat >>conftest.$ac_ext <<_ACEOF
20971 /* end confdefs.h.  */
20972 $ac_includes_default
20973 #ifndef offsetof
20974 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
20975 #endif
20976 typedef struct { char x; short y; } ac__type_alignof_;
20977 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
20978 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
20979 #include <stdio.h>
20980 #include <stdlib.h>
20981 int
20982 main ()
20983 {
20984
20985   FILE *f = fopen ("conftest.val", "w");
20986   if (! f)
20987     return 1;
20988   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
20989     {
20990       long int i = longval ();
20991       if (i != ((long int) offsetof (ac__type_alignof_, y)))
20992         return 1;
20993       fprintf (f, "%ld\n", i);
20994     }
20995   else
20996     {
20997       unsigned long int i = ulongval ();
20998       if (i != ((long int) offsetof (ac__type_alignof_, y)))
20999         return 1;
21000       fprintf (f, "%lu\n", i);
21001     }
21002   return ferror (f) || fclose (f) != 0;
21003
21004   ;
21005   return 0;
21006 }
21007 _ACEOF
21008 rm -f conftest$ac_exeext
21009 if { (ac_try="$ac_link"
21010 case "(($ac_try" in
21011   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21012   *) ac_try_echo=$ac_try;;
21013 esac
21014 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21015   (eval "$ac_link") 2>&5
21016   ac_status=$?
21017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21018   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21019   { (case "(($ac_try" in
21020   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21021   *) ac_try_echo=$ac_try;;
21022 esac
21023 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21024   (eval "$ac_try") 2>&5
21025   ac_status=$?
21026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21027   (exit $ac_status); }; }; then
21028   ac_cv_alignof_short=`cat conftest.val`
21029 else
21030   echo "$as_me: program exited with status $ac_status" >&5
21031 echo "$as_me: failed program was:" >&5
21032 sed 's/^/| /' conftest.$ac_ext >&5
21033
21034 ( exit $ac_status )
21035 if test "$ac_cv_type_short" = yes; then
21036      { { echo "$as_me:$LINENO: error: cannot compute alignment of short
21037 See \`config.log' for more details." >&5
21038 echo "$as_me: error: cannot compute alignment of short
21039 See \`config.log' for more details." >&2;}
21040    { (exit 77); exit 77; }; }
21041    else
21042      ac_cv_alignof_short=0
21043    fi
21044 fi
21045 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21046 fi
21047 rm -f conftest.val
21048 fi
21049 { echo "$as_me:$LINENO: result: $ac_cv_alignof_short" >&5
21050 echo "${ECHO_T}$ac_cv_alignof_short" >&6; }
21051
21052
21053
21054 cat >>confdefs.h <<_ACEOF
21055 #define ALIGNOF_SHORT $ac_cv_alignof_short
21056 _ACEOF
21057
21058
21059 { echo "$as_me:$LINENO: checking for int" >&5
21060 echo $ECHO_N "checking for int... $ECHO_C" >&6; }
21061 if test "${ac_cv_type_int+set}" = set; then
21062   echo $ECHO_N "(cached) $ECHO_C" >&6
21063 else
21064   cat >conftest.$ac_ext <<_ACEOF
21065 /* confdefs.h.  */
21066 _ACEOF
21067 cat confdefs.h >>conftest.$ac_ext
21068 cat >>conftest.$ac_ext <<_ACEOF
21069 /* end confdefs.h.  */
21070 $ac_includes_default
21071 typedef int ac__type_new_;
21072 int
21073 main ()
21074 {
21075 if ((ac__type_new_ *) 0)
21076   return 0;
21077 if (sizeof (ac__type_new_))
21078   return 0;
21079   ;
21080   return 0;
21081 }
21082 _ACEOF
21083 rm -f conftest.$ac_objext
21084 if { (ac_try="$ac_compile"
21085 case "(($ac_try" in
21086   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21087   *) ac_try_echo=$ac_try;;
21088 esac
21089 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21090   (eval "$ac_compile") 2>conftest.er1
21091   ac_status=$?
21092   grep -v '^ *+' conftest.er1 >conftest.err
21093   rm -f conftest.er1
21094   cat conftest.err >&5
21095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21096   (exit $ac_status); } && {
21097          test -z "$ac_c_werror_flag" ||
21098          test ! -s conftest.err
21099        } && test -s conftest.$ac_objext; then
21100   ac_cv_type_int=yes
21101 else
21102   echo "$as_me: failed program was:" >&5
21103 sed 's/^/| /' conftest.$ac_ext >&5
21104
21105         ac_cv_type_int=no
21106 fi
21107
21108 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21109 fi
21110 { echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
21111 echo "${ECHO_T}$ac_cv_type_int" >&6; }
21112
21113 # The cast to long int works around a bug in the HP C Compiler,
21114 # see AC_CHECK_SIZEOF for more information.
21115 { echo "$as_me:$LINENO: checking alignment of int" >&5
21116 echo $ECHO_N "checking alignment of int... $ECHO_C" >&6; }
21117 if test "${ac_cv_alignof_int+set}" = set; then
21118   echo $ECHO_N "(cached) $ECHO_C" >&6
21119 else
21120   if test "$cross_compiling" = yes; then
21121   # Depending upon the size, compute the lo and hi bounds.
21122 cat >conftest.$ac_ext <<_ACEOF
21123 /* confdefs.h.  */
21124 _ACEOF
21125 cat confdefs.h >>conftest.$ac_ext
21126 cat >>conftest.$ac_ext <<_ACEOF
21127 /* end confdefs.h.  */
21128 $ac_includes_default
21129 #ifndef offsetof
21130 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21131 #endif
21132 typedef struct { char x; int y; } ac__type_alignof_;
21133 int
21134 main ()
21135 {
21136 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
21137 test_array [0] = 0
21138
21139   ;
21140   return 0;
21141 }
21142 _ACEOF
21143 rm -f conftest.$ac_objext
21144 if { (ac_try="$ac_compile"
21145 case "(($ac_try" in
21146   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21147   *) ac_try_echo=$ac_try;;
21148 esac
21149 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21150   (eval "$ac_compile") 2>conftest.er1
21151   ac_status=$?
21152   grep -v '^ *+' conftest.er1 >conftest.err
21153   rm -f conftest.er1
21154   cat conftest.err >&5
21155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21156   (exit $ac_status); } && {
21157          test -z "$ac_c_werror_flag" ||
21158          test ! -s conftest.err
21159        } && test -s conftest.$ac_objext; then
21160   ac_lo=0 ac_mid=0
21161   while :; do
21162     cat >conftest.$ac_ext <<_ACEOF
21163 /* confdefs.h.  */
21164 _ACEOF
21165 cat confdefs.h >>conftest.$ac_ext
21166 cat >>conftest.$ac_ext <<_ACEOF
21167 /* end confdefs.h.  */
21168 $ac_includes_default
21169 #ifndef offsetof
21170 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21171 #endif
21172 typedef struct { char x; int y; } ac__type_alignof_;
21173 int
21174 main ()
21175 {
21176 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
21177 test_array [0] = 0
21178
21179   ;
21180   return 0;
21181 }
21182 _ACEOF
21183 rm -f conftest.$ac_objext
21184 if { (ac_try="$ac_compile"
21185 case "(($ac_try" in
21186   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21187   *) ac_try_echo=$ac_try;;
21188 esac
21189 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21190   (eval "$ac_compile") 2>conftest.er1
21191   ac_status=$?
21192   grep -v '^ *+' conftest.er1 >conftest.err
21193   rm -f conftest.er1
21194   cat conftest.err >&5
21195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21196   (exit $ac_status); } && {
21197          test -z "$ac_c_werror_flag" ||
21198          test ! -s conftest.err
21199        } && test -s conftest.$ac_objext; then
21200   ac_hi=$ac_mid; break
21201 else
21202   echo "$as_me: failed program was:" >&5
21203 sed 's/^/| /' conftest.$ac_ext >&5
21204
21205         ac_lo=`expr $ac_mid + 1`
21206                         if test $ac_lo -le $ac_mid; then
21207                           ac_lo= ac_hi=
21208                           break
21209                         fi
21210                         ac_mid=`expr 2 '*' $ac_mid + 1`
21211 fi
21212
21213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21214   done
21215 else
21216   echo "$as_me: failed program was:" >&5
21217 sed 's/^/| /' conftest.$ac_ext >&5
21218
21219         cat >conftest.$ac_ext <<_ACEOF
21220 /* confdefs.h.  */
21221 _ACEOF
21222 cat confdefs.h >>conftest.$ac_ext
21223 cat >>conftest.$ac_ext <<_ACEOF
21224 /* end confdefs.h.  */
21225 $ac_includes_default
21226 #ifndef offsetof
21227 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21228 #endif
21229 typedef struct { char x; int y; } ac__type_alignof_;
21230 int
21231 main ()
21232 {
21233 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
21234 test_array [0] = 0
21235
21236   ;
21237   return 0;
21238 }
21239 _ACEOF
21240 rm -f conftest.$ac_objext
21241 if { (ac_try="$ac_compile"
21242 case "(($ac_try" in
21243   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21244   *) ac_try_echo=$ac_try;;
21245 esac
21246 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21247   (eval "$ac_compile") 2>conftest.er1
21248   ac_status=$?
21249   grep -v '^ *+' conftest.er1 >conftest.err
21250   rm -f conftest.er1
21251   cat conftest.err >&5
21252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21253   (exit $ac_status); } && {
21254          test -z "$ac_c_werror_flag" ||
21255          test ! -s conftest.err
21256        } && test -s conftest.$ac_objext; then
21257   ac_hi=-1 ac_mid=-1
21258   while :; do
21259     cat >conftest.$ac_ext <<_ACEOF
21260 /* confdefs.h.  */
21261 _ACEOF
21262 cat confdefs.h >>conftest.$ac_ext
21263 cat >>conftest.$ac_ext <<_ACEOF
21264 /* end confdefs.h.  */
21265 $ac_includes_default
21266 #ifndef offsetof
21267 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21268 #endif
21269 typedef struct { char x; int y; } ac__type_alignof_;
21270 int
21271 main ()
21272 {
21273 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
21274 test_array [0] = 0
21275
21276   ;
21277   return 0;
21278 }
21279 _ACEOF
21280 rm -f conftest.$ac_objext
21281 if { (ac_try="$ac_compile"
21282 case "(($ac_try" in
21283   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21284   *) ac_try_echo=$ac_try;;
21285 esac
21286 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21287   (eval "$ac_compile") 2>conftest.er1
21288   ac_status=$?
21289   grep -v '^ *+' conftest.er1 >conftest.err
21290   rm -f conftest.er1
21291   cat conftest.err >&5
21292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21293   (exit $ac_status); } && {
21294          test -z "$ac_c_werror_flag" ||
21295          test ! -s conftest.err
21296        } && test -s conftest.$ac_objext; then
21297   ac_lo=$ac_mid; break
21298 else
21299   echo "$as_me: failed program was:" >&5
21300 sed 's/^/| /' conftest.$ac_ext >&5
21301
21302         ac_hi=`expr '(' $ac_mid ')' - 1`
21303                         if test $ac_mid -le $ac_hi; then
21304                           ac_lo= ac_hi=
21305                           break
21306                         fi
21307                         ac_mid=`expr 2 '*' $ac_mid`
21308 fi
21309
21310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21311   done
21312 else
21313   echo "$as_me: failed program was:" >&5
21314 sed 's/^/| /' conftest.$ac_ext >&5
21315
21316         ac_lo= ac_hi=
21317 fi
21318
21319 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21320 fi
21321
21322 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21323 # Binary search between lo and hi bounds.
21324 while test "x$ac_lo" != "x$ac_hi"; do
21325   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21326   cat >conftest.$ac_ext <<_ACEOF
21327 /* confdefs.h.  */
21328 _ACEOF
21329 cat confdefs.h >>conftest.$ac_ext
21330 cat >>conftest.$ac_ext <<_ACEOF
21331 /* end confdefs.h.  */
21332 $ac_includes_default
21333 #ifndef offsetof
21334 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21335 #endif
21336 typedef struct { char x; int y; } ac__type_alignof_;
21337 int
21338 main ()
21339 {
21340 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
21341 test_array [0] = 0
21342
21343   ;
21344   return 0;
21345 }
21346 _ACEOF
21347 rm -f conftest.$ac_objext
21348 if { (ac_try="$ac_compile"
21349 case "(($ac_try" in
21350   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21351   *) ac_try_echo=$ac_try;;
21352 esac
21353 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21354   (eval "$ac_compile") 2>conftest.er1
21355   ac_status=$?
21356   grep -v '^ *+' conftest.er1 >conftest.err
21357   rm -f conftest.er1
21358   cat conftest.err >&5
21359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21360   (exit $ac_status); } && {
21361          test -z "$ac_c_werror_flag" ||
21362          test ! -s conftest.err
21363        } && test -s conftest.$ac_objext; then
21364   ac_hi=$ac_mid
21365 else
21366   echo "$as_me: failed program was:" >&5
21367 sed 's/^/| /' conftest.$ac_ext >&5
21368
21369         ac_lo=`expr '(' $ac_mid ')' + 1`
21370 fi
21371
21372 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21373 done
21374 case $ac_lo in
21375 ?*) ac_cv_alignof_int=$ac_lo;;
21376 '') if test "$ac_cv_type_int" = yes; then
21377      { { echo "$as_me:$LINENO: error: cannot compute alignment of int
21378 See \`config.log' for more details." >&5
21379 echo "$as_me: error: cannot compute alignment of int
21380 See \`config.log' for more details." >&2;}
21381    { (exit 77); exit 77; }; }
21382    else
21383      ac_cv_alignof_int=0
21384    fi ;;
21385 esac
21386 else
21387   cat >conftest.$ac_ext <<_ACEOF
21388 /* confdefs.h.  */
21389 _ACEOF
21390 cat confdefs.h >>conftest.$ac_ext
21391 cat >>conftest.$ac_ext <<_ACEOF
21392 /* end confdefs.h.  */
21393 $ac_includes_default
21394 #ifndef offsetof
21395 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21396 #endif
21397 typedef struct { char x; int y; } ac__type_alignof_;
21398 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
21399 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
21400 #include <stdio.h>
21401 #include <stdlib.h>
21402 int
21403 main ()
21404 {
21405
21406   FILE *f = fopen ("conftest.val", "w");
21407   if (! f)
21408     return 1;
21409   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
21410     {
21411       long int i = longval ();
21412       if (i != ((long int) offsetof (ac__type_alignof_, y)))
21413         return 1;
21414       fprintf (f, "%ld\n", i);
21415     }
21416   else
21417     {
21418       unsigned long int i = ulongval ();
21419       if (i != ((long int) offsetof (ac__type_alignof_, y)))
21420         return 1;
21421       fprintf (f, "%lu\n", i);
21422     }
21423   return ferror (f) || fclose (f) != 0;
21424
21425   ;
21426   return 0;
21427 }
21428 _ACEOF
21429 rm -f conftest$ac_exeext
21430 if { (ac_try="$ac_link"
21431 case "(($ac_try" in
21432   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21433   *) ac_try_echo=$ac_try;;
21434 esac
21435 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21436   (eval "$ac_link") 2>&5
21437   ac_status=$?
21438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21439   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21440   { (case "(($ac_try" in
21441   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21442   *) ac_try_echo=$ac_try;;
21443 esac
21444 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21445   (eval "$ac_try") 2>&5
21446   ac_status=$?
21447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21448   (exit $ac_status); }; }; then
21449   ac_cv_alignof_int=`cat conftest.val`
21450 else
21451   echo "$as_me: program exited with status $ac_status" >&5
21452 echo "$as_me: failed program was:" >&5
21453 sed 's/^/| /' conftest.$ac_ext >&5
21454
21455 ( exit $ac_status )
21456 if test "$ac_cv_type_int" = yes; then
21457      { { echo "$as_me:$LINENO: error: cannot compute alignment of int
21458 See \`config.log' for more details." >&5
21459 echo "$as_me: error: cannot compute alignment of int
21460 See \`config.log' for more details." >&2;}
21461    { (exit 77); exit 77; }; }
21462    else
21463      ac_cv_alignof_int=0
21464    fi
21465 fi
21466 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21467 fi
21468 rm -f conftest.val
21469 fi
21470 { echo "$as_me:$LINENO: result: $ac_cv_alignof_int" >&5
21471 echo "${ECHO_T}$ac_cv_alignof_int" >&6; }
21472
21473
21474
21475 cat >>confdefs.h <<_ACEOF
21476 #define ALIGNOF_INT $ac_cv_alignof_int
21477 _ACEOF
21478
21479
21480 { echo "$as_me:$LINENO: checking for long" >&5
21481 echo $ECHO_N "checking for long... $ECHO_C" >&6; }
21482 if test "${ac_cv_type_long+set}" = set; then
21483   echo $ECHO_N "(cached) $ECHO_C" >&6
21484 else
21485   cat >conftest.$ac_ext <<_ACEOF
21486 /* confdefs.h.  */
21487 _ACEOF
21488 cat confdefs.h >>conftest.$ac_ext
21489 cat >>conftest.$ac_ext <<_ACEOF
21490 /* end confdefs.h.  */
21491 $ac_includes_default
21492 typedef long ac__type_new_;
21493 int
21494 main ()
21495 {
21496 if ((ac__type_new_ *) 0)
21497   return 0;
21498 if (sizeof (ac__type_new_))
21499   return 0;
21500   ;
21501   return 0;
21502 }
21503 _ACEOF
21504 rm -f conftest.$ac_objext
21505 if { (ac_try="$ac_compile"
21506 case "(($ac_try" in
21507   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21508   *) ac_try_echo=$ac_try;;
21509 esac
21510 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21511   (eval "$ac_compile") 2>conftest.er1
21512   ac_status=$?
21513   grep -v '^ *+' conftest.er1 >conftest.err
21514   rm -f conftest.er1
21515   cat conftest.err >&5
21516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21517   (exit $ac_status); } && {
21518          test -z "$ac_c_werror_flag" ||
21519          test ! -s conftest.err
21520        } && test -s conftest.$ac_objext; then
21521   ac_cv_type_long=yes
21522 else
21523   echo "$as_me: failed program was:" >&5
21524 sed 's/^/| /' conftest.$ac_ext >&5
21525
21526         ac_cv_type_long=no
21527 fi
21528
21529 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21530 fi
21531 { echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
21532 echo "${ECHO_T}$ac_cv_type_long" >&6; }
21533
21534 # The cast to long int works around a bug in the HP C Compiler,
21535 # see AC_CHECK_SIZEOF for more information.
21536 { echo "$as_me:$LINENO: checking alignment of long" >&5
21537 echo $ECHO_N "checking alignment of long... $ECHO_C" >&6; }
21538 if test "${ac_cv_alignof_long+set}" = set; then
21539   echo $ECHO_N "(cached) $ECHO_C" >&6
21540 else
21541   if test "$cross_compiling" = yes; then
21542   # Depending upon the size, compute the lo and hi bounds.
21543 cat >conftest.$ac_ext <<_ACEOF
21544 /* confdefs.h.  */
21545 _ACEOF
21546 cat confdefs.h >>conftest.$ac_ext
21547 cat >>conftest.$ac_ext <<_ACEOF
21548 /* end confdefs.h.  */
21549 $ac_includes_default
21550 #ifndef offsetof
21551 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21552 #endif
21553 typedef struct { char x; long y; } ac__type_alignof_;
21554 int
21555 main ()
21556 {
21557 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
21558 test_array [0] = 0
21559
21560   ;
21561   return 0;
21562 }
21563 _ACEOF
21564 rm -f conftest.$ac_objext
21565 if { (ac_try="$ac_compile"
21566 case "(($ac_try" in
21567   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21568   *) ac_try_echo=$ac_try;;
21569 esac
21570 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21571   (eval "$ac_compile") 2>conftest.er1
21572   ac_status=$?
21573   grep -v '^ *+' conftest.er1 >conftest.err
21574   rm -f conftest.er1
21575   cat conftest.err >&5
21576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21577   (exit $ac_status); } && {
21578          test -z "$ac_c_werror_flag" ||
21579          test ! -s conftest.err
21580        } && test -s conftest.$ac_objext; then
21581   ac_lo=0 ac_mid=0
21582   while :; do
21583     cat >conftest.$ac_ext <<_ACEOF
21584 /* confdefs.h.  */
21585 _ACEOF
21586 cat confdefs.h >>conftest.$ac_ext
21587 cat >>conftest.$ac_ext <<_ACEOF
21588 /* end confdefs.h.  */
21589 $ac_includes_default
21590 #ifndef offsetof
21591 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21592 #endif
21593 typedef struct { char x; long y; } ac__type_alignof_;
21594 int
21595 main ()
21596 {
21597 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
21598 test_array [0] = 0
21599
21600   ;
21601   return 0;
21602 }
21603 _ACEOF
21604 rm -f conftest.$ac_objext
21605 if { (ac_try="$ac_compile"
21606 case "(($ac_try" in
21607   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21608   *) ac_try_echo=$ac_try;;
21609 esac
21610 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21611   (eval "$ac_compile") 2>conftest.er1
21612   ac_status=$?
21613   grep -v '^ *+' conftest.er1 >conftest.err
21614   rm -f conftest.er1
21615   cat conftest.err >&5
21616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21617   (exit $ac_status); } && {
21618          test -z "$ac_c_werror_flag" ||
21619          test ! -s conftest.err
21620        } && test -s conftest.$ac_objext; then
21621   ac_hi=$ac_mid; break
21622 else
21623   echo "$as_me: failed program was:" >&5
21624 sed 's/^/| /' conftest.$ac_ext >&5
21625
21626         ac_lo=`expr $ac_mid + 1`
21627                         if test $ac_lo -le $ac_mid; then
21628                           ac_lo= ac_hi=
21629                           break
21630                         fi
21631                         ac_mid=`expr 2 '*' $ac_mid + 1`
21632 fi
21633
21634 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21635   done
21636 else
21637   echo "$as_me: failed program was:" >&5
21638 sed 's/^/| /' conftest.$ac_ext >&5
21639
21640         cat >conftest.$ac_ext <<_ACEOF
21641 /* confdefs.h.  */
21642 _ACEOF
21643 cat confdefs.h >>conftest.$ac_ext
21644 cat >>conftest.$ac_ext <<_ACEOF
21645 /* end confdefs.h.  */
21646 $ac_includes_default
21647 #ifndef offsetof
21648 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21649 #endif
21650 typedef struct { char x; long y; } ac__type_alignof_;
21651 int
21652 main ()
21653 {
21654 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
21655 test_array [0] = 0
21656
21657   ;
21658   return 0;
21659 }
21660 _ACEOF
21661 rm -f conftest.$ac_objext
21662 if { (ac_try="$ac_compile"
21663 case "(($ac_try" in
21664   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21665   *) ac_try_echo=$ac_try;;
21666 esac
21667 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21668   (eval "$ac_compile") 2>conftest.er1
21669   ac_status=$?
21670   grep -v '^ *+' conftest.er1 >conftest.err
21671   rm -f conftest.er1
21672   cat conftest.err >&5
21673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21674   (exit $ac_status); } && {
21675          test -z "$ac_c_werror_flag" ||
21676          test ! -s conftest.err
21677        } && test -s conftest.$ac_objext; then
21678   ac_hi=-1 ac_mid=-1
21679   while :; do
21680     cat >conftest.$ac_ext <<_ACEOF
21681 /* confdefs.h.  */
21682 _ACEOF
21683 cat confdefs.h >>conftest.$ac_ext
21684 cat >>conftest.$ac_ext <<_ACEOF
21685 /* end confdefs.h.  */
21686 $ac_includes_default
21687 #ifndef offsetof
21688 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21689 #endif
21690 typedef struct { char x; long y; } ac__type_alignof_;
21691 int
21692 main ()
21693 {
21694 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
21695 test_array [0] = 0
21696
21697   ;
21698   return 0;
21699 }
21700 _ACEOF
21701 rm -f conftest.$ac_objext
21702 if { (ac_try="$ac_compile"
21703 case "(($ac_try" in
21704   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21705   *) ac_try_echo=$ac_try;;
21706 esac
21707 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21708   (eval "$ac_compile") 2>conftest.er1
21709   ac_status=$?
21710   grep -v '^ *+' conftest.er1 >conftest.err
21711   rm -f conftest.er1
21712   cat conftest.err >&5
21713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21714   (exit $ac_status); } && {
21715          test -z "$ac_c_werror_flag" ||
21716          test ! -s conftest.err
21717        } && test -s conftest.$ac_objext; then
21718   ac_lo=$ac_mid; break
21719 else
21720   echo "$as_me: failed program was:" >&5
21721 sed 's/^/| /' conftest.$ac_ext >&5
21722
21723         ac_hi=`expr '(' $ac_mid ')' - 1`
21724                         if test $ac_mid -le $ac_hi; then
21725                           ac_lo= ac_hi=
21726                           break
21727                         fi
21728                         ac_mid=`expr 2 '*' $ac_mid`
21729 fi
21730
21731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21732   done
21733 else
21734   echo "$as_me: failed program was:" >&5
21735 sed 's/^/| /' conftest.$ac_ext >&5
21736
21737         ac_lo= ac_hi=
21738 fi
21739
21740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21741 fi
21742
21743 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21744 # Binary search between lo and hi bounds.
21745 while test "x$ac_lo" != "x$ac_hi"; do
21746   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21747   cat >conftest.$ac_ext <<_ACEOF
21748 /* confdefs.h.  */
21749 _ACEOF
21750 cat confdefs.h >>conftest.$ac_ext
21751 cat >>conftest.$ac_ext <<_ACEOF
21752 /* end confdefs.h.  */
21753 $ac_includes_default
21754 #ifndef offsetof
21755 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21756 #endif
21757 typedef struct { char x; long y; } ac__type_alignof_;
21758 int
21759 main ()
21760 {
21761 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
21762 test_array [0] = 0
21763
21764   ;
21765   return 0;
21766 }
21767 _ACEOF
21768 rm -f conftest.$ac_objext
21769 if { (ac_try="$ac_compile"
21770 case "(($ac_try" in
21771   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21772   *) ac_try_echo=$ac_try;;
21773 esac
21774 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21775   (eval "$ac_compile") 2>conftest.er1
21776   ac_status=$?
21777   grep -v '^ *+' conftest.er1 >conftest.err
21778   rm -f conftest.er1
21779   cat conftest.err >&5
21780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21781   (exit $ac_status); } && {
21782          test -z "$ac_c_werror_flag" ||
21783          test ! -s conftest.err
21784        } && test -s conftest.$ac_objext; then
21785   ac_hi=$ac_mid
21786 else
21787   echo "$as_me: failed program was:" >&5
21788 sed 's/^/| /' conftest.$ac_ext >&5
21789
21790         ac_lo=`expr '(' $ac_mid ')' + 1`
21791 fi
21792
21793 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21794 done
21795 case $ac_lo in
21796 ?*) ac_cv_alignof_long=$ac_lo;;
21797 '') if test "$ac_cv_type_long" = yes; then
21798      { { echo "$as_me:$LINENO: error: cannot compute alignment of long
21799 See \`config.log' for more details." >&5
21800 echo "$as_me: error: cannot compute alignment of long
21801 See \`config.log' for more details." >&2;}
21802    { (exit 77); exit 77; }; }
21803    else
21804      ac_cv_alignof_long=0
21805    fi ;;
21806 esac
21807 else
21808   cat >conftest.$ac_ext <<_ACEOF
21809 /* confdefs.h.  */
21810 _ACEOF
21811 cat confdefs.h >>conftest.$ac_ext
21812 cat >>conftest.$ac_ext <<_ACEOF
21813 /* end confdefs.h.  */
21814 $ac_includes_default
21815 #ifndef offsetof
21816 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21817 #endif
21818 typedef struct { char x; long y; } ac__type_alignof_;
21819 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
21820 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
21821 #include <stdio.h>
21822 #include <stdlib.h>
21823 int
21824 main ()
21825 {
21826
21827   FILE *f = fopen ("conftest.val", "w");
21828   if (! f)
21829     return 1;
21830   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
21831     {
21832       long int i = longval ();
21833       if (i != ((long int) offsetof (ac__type_alignof_, y)))
21834         return 1;
21835       fprintf (f, "%ld\n", i);
21836     }
21837   else
21838     {
21839       unsigned long int i = ulongval ();
21840       if (i != ((long int) offsetof (ac__type_alignof_, y)))
21841         return 1;
21842       fprintf (f, "%lu\n", i);
21843     }
21844   return ferror (f) || fclose (f) != 0;
21845
21846   ;
21847   return 0;
21848 }
21849 _ACEOF
21850 rm -f conftest$ac_exeext
21851 if { (ac_try="$ac_link"
21852 case "(($ac_try" in
21853   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21854   *) ac_try_echo=$ac_try;;
21855 esac
21856 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21857   (eval "$ac_link") 2>&5
21858   ac_status=$?
21859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21860   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21861   { (case "(($ac_try" in
21862   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21863   *) ac_try_echo=$ac_try;;
21864 esac
21865 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21866   (eval "$ac_try") 2>&5
21867   ac_status=$?
21868   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21869   (exit $ac_status); }; }; then
21870   ac_cv_alignof_long=`cat conftest.val`
21871 else
21872   echo "$as_me: program exited with status $ac_status" >&5
21873 echo "$as_me: failed program was:" >&5
21874 sed 's/^/| /' conftest.$ac_ext >&5
21875
21876 ( exit $ac_status )
21877 if test "$ac_cv_type_long" = yes; then
21878      { { echo "$as_me:$LINENO: error: cannot compute alignment of long
21879 See \`config.log' for more details." >&5
21880 echo "$as_me: error: cannot compute alignment of long
21881 See \`config.log' for more details." >&2;}
21882    { (exit 77); exit 77; }; }
21883    else
21884      ac_cv_alignof_long=0
21885    fi
21886 fi
21887 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21888 fi
21889 rm -f conftest.val
21890 fi
21891 { echo "$as_me:$LINENO: result: $ac_cv_alignof_long" >&5
21892 echo "${ECHO_T}$ac_cv_alignof_long" >&6; }
21893
21894
21895
21896 cat >>confdefs.h <<_ACEOF
21897 #define ALIGNOF_LONG $ac_cv_alignof_long
21898 _ACEOF
21899
21900
21901 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
21902   { echo "$as_me:$LINENO: checking for long long int" >&5
21903 echo $ECHO_N "checking for long long int... $ECHO_C" >&6; }
21904 if test "${ac_cv_type_long_long_int+set}" = set; then
21905   echo $ECHO_N "(cached) $ECHO_C" >&6
21906 else
21907   cat >conftest.$ac_ext <<_ACEOF
21908 /* confdefs.h.  */
21909 _ACEOF
21910 cat confdefs.h >>conftest.$ac_ext
21911 cat >>conftest.$ac_ext <<_ACEOF
21912 /* end confdefs.h.  */
21913 $ac_includes_default
21914 typedef long long int ac__type_new_;
21915 int
21916 main ()
21917 {
21918 if ((ac__type_new_ *) 0)
21919   return 0;
21920 if (sizeof (ac__type_new_))
21921   return 0;
21922   ;
21923   return 0;
21924 }
21925 _ACEOF
21926 rm -f conftest.$ac_objext
21927 if { (ac_try="$ac_compile"
21928 case "(($ac_try" in
21929   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21930   *) ac_try_echo=$ac_try;;
21931 esac
21932 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21933   (eval "$ac_compile") 2>conftest.er1
21934   ac_status=$?
21935   grep -v '^ *+' conftest.er1 >conftest.err
21936   rm -f conftest.er1
21937   cat conftest.err >&5
21938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21939   (exit $ac_status); } && {
21940          test -z "$ac_c_werror_flag" ||
21941          test ! -s conftest.err
21942        } && test -s conftest.$ac_objext; then
21943   ac_cv_type_long_long_int=yes
21944 else
21945   echo "$as_me: failed program was:" >&5
21946 sed 's/^/| /' conftest.$ac_ext >&5
21947
21948         ac_cv_type_long_long_int=no
21949 fi
21950
21951 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21952 fi
21953 { echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
21954 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6; }
21955
21956 # The cast to long int works around a bug in the HP C Compiler,
21957 # see AC_CHECK_SIZEOF for more information.
21958 { echo "$as_me:$LINENO: checking alignment of long long int" >&5
21959 echo $ECHO_N "checking alignment of long long int... $ECHO_C" >&6; }
21960 if test "${ac_cv_alignof_long_long_int+set}" = set; then
21961   echo $ECHO_N "(cached) $ECHO_C" >&6
21962 else
21963   if test "$cross_compiling" = yes; then
21964   # Depending upon the size, compute the lo and hi bounds.
21965 cat >conftest.$ac_ext <<_ACEOF
21966 /* confdefs.h.  */
21967 _ACEOF
21968 cat confdefs.h >>conftest.$ac_ext
21969 cat >>conftest.$ac_ext <<_ACEOF
21970 /* end confdefs.h.  */
21971 $ac_includes_default
21972 #ifndef offsetof
21973 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21974 #endif
21975 typedef struct { char x; long long int y; } ac__type_alignof_;
21976 int
21977 main ()
21978 {
21979 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
21980 test_array [0] = 0
21981
21982   ;
21983   return 0;
21984 }
21985 _ACEOF
21986 rm -f conftest.$ac_objext
21987 if { (ac_try="$ac_compile"
21988 case "(($ac_try" in
21989   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21990   *) ac_try_echo=$ac_try;;
21991 esac
21992 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21993   (eval "$ac_compile") 2>conftest.er1
21994   ac_status=$?
21995   grep -v '^ *+' conftest.er1 >conftest.err
21996   rm -f conftest.er1
21997   cat conftest.err >&5
21998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21999   (exit $ac_status); } && {
22000          test -z "$ac_c_werror_flag" ||
22001          test ! -s conftest.err
22002        } && test -s conftest.$ac_objext; then
22003   ac_lo=0 ac_mid=0
22004   while :; do
22005     cat >conftest.$ac_ext <<_ACEOF
22006 /* confdefs.h.  */
22007 _ACEOF
22008 cat confdefs.h >>conftest.$ac_ext
22009 cat >>conftest.$ac_ext <<_ACEOF
22010 /* end confdefs.h.  */
22011 $ac_includes_default
22012 #ifndef offsetof
22013 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22014 #endif
22015 typedef struct { char x; long long int y; } ac__type_alignof_;
22016 int
22017 main ()
22018 {
22019 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
22020 test_array [0] = 0
22021
22022   ;
22023   return 0;
22024 }
22025 _ACEOF
22026 rm -f conftest.$ac_objext
22027 if { (ac_try="$ac_compile"
22028 case "(($ac_try" in
22029   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22030   *) ac_try_echo=$ac_try;;
22031 esac
22032 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22033   (eval "$ac_compile") 2>conftest.er1
22034   ac_status=$?
22035   grep -v '^ *+' conftest.er1 >conftest.err
22036   rm -f conftest.er1
22037   cat conftest.err >&5
22038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22039   (exit $ac_status); } && {
22040          test -z "$ac_c_werror_flag" ||
22041          test ! -s conftest.err
22042        } && test -s conftest.$ac_objext; then
22043   ac_hi=$ac_mid; break
22044 else
22045   echo "$as_me: failed program was:" >&5
22046 sed 's/^/| /' conftest.$ac_ext >&5
22047
22048         ac_lo=`expr $ac_mid + 1`
22049                         if test $ac_lo -le $ac_mid; then
22050                           ac_lo= ac_hi=
22051                           break
22052                         fi
22053                         ac_mid=`expr 2 '*' $ac_mid + 1`
22054 fi
22055
22056 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22057   done
22058 else
22059   echo "$as_me: failed program was:" >&5
22060 sed 's/^/| /' conftest.$ac_ext >&5
22061
22062         cat >conftest.$ac_ext <<_ACEOF
22063 /* confdefs.h.  */
22064 _ACEOF
22065 cat confdefs.h >>conftest.$ac_ext
22066 cat >>conftest.$ac_ext <<_ACEOF
22067 /* end confdefs.h.  */
22068 $ac_includes_default
22069 #ifndef offsetof
22070 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22071 #endif
22072 typedef struct { char x; long long int y; } ac__type_alignof_;
22073 int
22074 main ()
22075 {
22076 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
22077 test_array [0] = 0
22078
22079   ;
22080   return 0;
22081 }
22082 _ACEOF
22083 rm -f conftest.$ac_objext
22084 if { (ac_try="$ac_compile"
22085 case "(($ac_try" in
22086   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22087   *) ac_try_echo=$ac_try;;
22088 esac
22089 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22090   (eval "$ac_compile") 2>conftest.er1
22091   ac_status=$?
22092   grep -v '^ *+' conftest.er1 >conftest.err
22093   rm -f conftest.er1
22094   cat conftest.err >&5
22095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22096   (exit $ac_status); } && {
22097          test -z "$ac_c_werror_flag" ||
22098          test ! -s conftest.err
22099        } && test -s conftest.$ac_objext; then
22100   ac_hi=-1 ac_mid=-1
22101   while :; do
22102     cat >conftest.$ac_ext <<_ACEOF
22103 /* confdefs.h.  */
22104 _ACEOF
22105 cat confdefs.h >>conftest.$ac_ext
22106 cat >>conftest.$ac_ext <<_ACEOF
22107 /* end confdefs.h.  */
22108 $ac_includes_default
22109 #ifndef offsetof
22110 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22111 #endif
22112 typedef struct { char x; long long int y; } ac__type_alignof_;
22113 int
22114 main ()
22115 {
22116 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
22117 test_array [0] = 0
22118
22119   ;
22120   return 0;
22121 }
22122 _ACEOF
22123 rm -f conftest.$ac_objext
22124 if { (ac_try="$ac_compile"
22125 case "(($ac_try" in
22126   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22127   *) ac_try_echo=$ac_try;;
22128 esac
22129 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22130   (eval "$ac_compile") 2>conftest.er1
22131   ac_status=$?
22132   grep -v '^ *+' conftest.er1 >conftest.err
22133   rm -f conftest.er1
22134   cat conftest.err >&5
22135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22136   (exit $ac_status); } && {
22137          test -z "$ac_c_werror_flag" ||
22138          test ! -s conftest.err
22139        } && test -s conftest.$ac_objext; then
22140   ac_lo=$ac_mid; break
22141 else
22142   echo "$as_me: failed program was:" >&5
22143 sed 's/^/| /' conftest.$ac_ext >&5
22144
22145         ac_hi=`expr '(' $ac_mid ')' - 1`
22146                         if test $ac_mid -le $ac_hi; then
22147                           ac_lo= ac_hi=
22148                           break
22149                         fi
22150                         ac_mid=`expr 2 '*' $ac_mid`
22151 fi
22152
22153 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22154   done
22155 else
22156   echo "$as_me: failed program was:" >&5
22157 sed 's/^/| /' conftest.$ac_ext >&5
22158
22159         ac_lo= ac_hi=
22160 fi
22161
22162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22163 fi
22164
22165 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22166 # Binary search between lo and hi bounds.
22167 while test "x$ac_lo" != "x$ac_hi"; do
22168   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22169   cat >conftest.$ac_ext <<_ACEOF
22170 /* confdefs.h.  */
22171 _ACEOF
22172 cat confdefs.h >>conftest.$ac_ext
22173 cat >>conftest.$ac_ext <<_ACEOF
22174 /* end confdefs.h.  */
22175 $ac_includes_default
22176 #ifndef offsetof
22177 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22178 #endif
22179 typedef struct { char x; long long int y; } ac__type_alignof_;
22180 int
22181 main ()
22182 {
22183 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
22184 test_array [0] = 0
22185
22186   ;
22187   return 0;
22188 }
22189 _ACEOF
22190 rm -f conftest.$ac_objext
22191 if { (ac_try="$ac_compile"
22192 case "(($ac_try" in
22193   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22194   *) ac_try_echo=$ac_try;;
22195 esac
22196 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22197   (eval "$ac_compile") 2>conftest.er1
22198   ac_status=$?
22199   grep -v '^ *+' conftest.er1 >conftest.err
22200   rm -f conftest.er1
22201   cat conftest.err >&5
22202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22203   (exit $ac_status); } && {
22204          test -z "$ac_c_werror_flag" ||
22205          test ! -s conftest.err
22206        } && test -s conftest.$ac_objext; then
22207   ac_hi=$ac_mid
22208 else
22209   echo "$as_me: failed program was:" >&5
22210 sed 's/^/| /' conftest.$ac_ext >&5
22211
22212         ac_lo=`expr '(' $ac_mid ')' + 1`
22213 fi
22214
22215 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22216 done
22217 case $ac_lo in
22218 ?*) ac_cv_alignof_long_long_int=$ac_lo;;
22219 '') if test "$ac_cv_type_long_long_int" = yes; then
22220      { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int
22221 See \`config.log' for more details." >&5
22222 echo "$as_me: error: cannot compute alignment of long long int
22223 See \`config.log' for more details." >&2;}
22224    { (exit 77); exit 77; }; }
22225    else
22226      ac_cv_alignof_long_long_int=0
22227    fi ;;
22228 esac
22229 else
22230   cat >conftest.$ac_ext <<_ACEOF
22231 /* confdefs.h.  */
22232 _ACEOF
22233 cat confdefs.h >>conftest.$ac_ext
22234 cat >>conftest.$ac_ext <<_ACEOF
22235 /* end confdefs.h.  */
22236 $ac_includes_default
22237 #ifndef offsetof
22238 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22239 #endif
22240 typedef struct { char x; long long int y; } ac__type_alignof_;
22241 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
22242 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
22243 #include <stdio.h>
22244 #include <stdlib.h>
22245 int
22246 main ()
22247 {
22248
22249   FILE *f = fopen ("conftest.val", "w");
22250   if (! f)
22251     return 1;
22252   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
22253     {
22254       long int i = longval ();
22255       if (i != ((long int) offsetof (ac__type_alignof_, y)))
22256         return 1;
22257       fprintf (f, "%ld\n", i);
22258     }
22259   else
22260     {
22261       unsigned long int i = ulongval ();
22262       if (i != ((long int) offsetof (ac__type_alignof_, y)))
22263         return 1;
22264       fprintf (f, "%lu\n", i);
22265     }
22266   return ferror (f) || fclose (f) != 0;
22267
22268   ;
22269   return 0;
22270 }
22271 _ACEOF
22272 rm -f conftest$ac_exeext
22273 if { (ac_try="$ac_link"
22274 case "(($ac_try" in
22275   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22276   *) ac_try_echo=$ac_try;;
22277 esac
22278 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22279   (eval "$ac_link") 2>&5
22280   ac_status=$?
22281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22282   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22283   { (case "(($ac_try" in
22284   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22285   *) ac_try_echo=$ac_try;;
22286 esac
22287 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22288   (eval "$ac_try") 2>&5
22289   ac_status=$?
22290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22291   (exit $ac_status); }; }; then
22292   ac_cv_alignof_long_long_int=`cat conftest.val`
22293 else
22294   echo "$as_me: program exited with status $ac_status" >&5
22295 echo "$as_me: failed program was:" >&5
22296 sed 's/^/| /' conftest.$ac_ext >&5
22297
22298 ( exit $ac_status )
22299 if test "$ac_cv_type_long_long_int" = yes; then
22300      { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int
22301 See \`config.log' for more details." >&5
22302 echo "$as_me: error: cannot compute alignment of long long int
22303 See \`config.log' for more details." >&2;}
22304    { (exit 77); exit 77; }; }
22305    else
22306      ac_cv_alignof_long_long_int=0
22307    fi
22308 fi
22309 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22310 fi
22311 rm -f conftest.val
22312 fi
22313 { echo "$as_me:$LINENO: result: $ac_cv_alignof_long_long_int" >&5
22314 echo "${ECHO_T}$ac_cv_alignof_long_long_int" >&6; }
22315
22316
22317
22318 cat >>confdefs.h <<_ACEOF
22319 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
22320 _ACEOF
22321
22322
22323 fi
22324 { echo "$as_me:$LINENO: checking for double" >&5
22325 echo $ECHO_N "checking for double... $ECHO_C" >&6; }
22326 if test "${ac_cv_type_double+set}" = set; then
22327   echo $ECHO_N "(cached) $ECHO_C" >&6
22328 else
22329   cat >conftest.$ac_ext <<_ACEOF
22330 /* confdefs.h.  */
22331 _ACEOF
22332 cat confdefs.h >>conftest.$ac_ext
22333 cat >>conftest.$ac_ext <<_ACEOF
22334 /* end confdefs.h.  */
22335 $ac_includes_default
22336 typedef double ac__type_new_;
22337 int
22338 main ()
22339 {
22340 if ((ac__type_new_ *) 0)
22341   return 0;
22342 if (sizeof (ac__type_new_))
22343   return 0;
22344   ;
22345   return 0;
22346 }
22347 _ACEOF
22348 rm -f conftest.$ac_objext
22349 if { (ac_try="$ac_compile"
22350 case "(($ac_try" in
22351   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22352   *) ac_try_echo=$ac_try;;
22353 esac
22354 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22355   (eval "$ac_compile") 2>conftest.er1
22356   ac_status=$?
22357   grep -v '^ *+' conftest.er1 >conftest.err
22358   rm -f conftest.er1
22359   cat conftest.err >&5
22360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22361   (exit $ac_status); } && {
22362          test -z "$ac_c_werror_flag" ||
22363          test ! -s conftest.err
22364        } && test -s conftest.$ac_objext; then
22365   ac_cv_type_double=yes
22366 else
22367   echo "$as_me: failed program was:" >&5
22368 sed 's/^/| /' conftest.$ac_ext >&5
22369
22370         ac_cv_type_double=no
22371 fi
22372
22373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22374 fi
22375 { echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
22376 echo "${ECHO_T}$ac_cv_type_double" >&6; }
22377
22378 # The cast to long int works around a bug in the HP C Compiler,
22379 # see AC_CHECK_SIZEOF for more information.
22380 { echo "$as_me:$LINENO: checking alignment of double" >&5
22381 echo $ECHO_N "checking alignment of double... $ECHO_C" >&6; }
22382 if test "${ac_cv_alignof_double+set}" = set; then
22383   echo $ECHO_N "(cached) $ECHO_C" >&6
22384 else
22385   if test "$cross_compiling" = yes; then
22386   # Depending upon the size, compute the lo and hi bounds.
22387 cat >conftest.$ac_ext <<_ACEOF
22388 /* confdefs.h.  */
22389 _ACEOF
22390 cat confdefs.h >>conftest.$ac_ext
22391 cat >>conftest.$ac_ext <<_ACEOF
22392 /* end confdefs.h.  */
22393 $ac_includes_default
22394 #ifndef offsetof
22395 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22396 #endif
22397 typedef struct { char x; double y; } ac__type_alignof_;
22398 int
22399 main ()
22400 {
22401 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
22402 test_array [0] = 0
22403
22404   ;
22405   return 0;
22406 }
22407 _ACEOF
22408 rm -f conftest.$ac_objext
22409 if { (ac_try="$ac_compile"
22410 case "(($ac_try" in
22411   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22412   *) ac_try_echo=$ac_try;;
22413 esac
22414 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22415   (eval "$ac_compile") 2>conftest.er1
22416   ac_status=$?
22417   grep -v '^ *+' conftest.er1 >conftest.err
22418   rm -f conftest.er1
22419   cat conftest.err >&5
22420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22421   (exit $ac_status); } && {
22422          test -z "$ac_c_werror_flag" ||
22423          test ! -s conftest.err
22424        } && test -s conftest.$ac_objext; then
22425   ac_lo=0 ac_mid=0
22426   while :; do
22427     cat >conftest.$ac_ext <<_ACEOF
22428 /* confdefs.h.  */
22429 _ACEOF
22430 cat confdefs.h >>conftest.$ac_ext
22431 cat >>conftest.$ac_ext <<_ACEOF
22432 /* end confdefs.h.  */
22433 $ac_includes_default
22434 #ifndef offsetof
22435 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22436 #endif
22437 typedef struct { char x; double y; } ac__type_alignof_;
22438 int
22439 main ()
22440 {
22441 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
22442 test_array [0] = 0
22443
22444   ;
22445   return 0;
22446 }
22447 _ACEOF
22448 rm -f conftest.$ac_objext
22449 if { (ac_try="$ac_compile"
22450 case "(($ac_try" in
22451   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22452   *) ac_try_echo=$ac_try;;
22453 esac
22454 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22455   (eval "$ac_compile") 2>conftest.er1
22456   ac_status=$?
22457   grep -v '^ *+' conftest.er1 >conftest.err
22458   rm -f conftest.er1
22459   cat conftest.err >&5
22460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22461   (exit $ac_status); } && {
22462          test -z "$ac_c_werror_flag" ||
22463          test ! -s conftest.err
22464        } && test -s conftest.$ac_objext; then
22465   ac_hi=$ac_mid; break
22466 else
22467   echo "$as_me: failed program was:" >&5
22468 sed 's/^/| /' conftest.$ac_ext >&5
22469
22470         ac_lo=`expr $ac_mid + 1`
22471                         if test $ac_lo -le $ac_mid; then
22472                           ac_lo= ac_hi=
22473                           break
22474                         fi
22475                         ac_mid=`expr 2 '*' $ac_mid + 1`
22476 fi
22477
22478 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22479   done
22480 else
22481   echo "$as_me: failed program was:" >&5
22482 sed 's/^/| /' conftest.$ac_ext >&5
22483
22484         cat >conftest.$ac_ext <<_ACEOF
22485 /* confdefs.h.  */
22486 _ACEOF
22487 cat confdefs.h >>conftest.$ac_ext
22488 cat >>conftest.$ac_ext <<_ACEOF
22489 /* end confdefs.h.  */
22490 $ac_includes_default
22491 #ifndef offsetof
22492 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22493 #endif
22494 typedef struct { char x; double y; } ac__type_alignof_;
22495 int
22496 main ()
22497 {
22498 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
22499 test_array [0] = 0
22500
22501   ;
22502   return 0;
22503 }
22504 _ACEOF
22505 rm -f conftest.$ac_objext
22506 if { (ac_try="$ac_compile"
22507 case "(($ac_try" in
22508   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22509   *) ac_try_echo=$ac_try;;
22510 esac
22511 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22512   (eval "$ac_compile") 2>conftest.er1
22513   ac_status=$?
22514   grep -v '^ *+' conftest.er1 >conftest.err
22515   rm -f conftest.er1
22516   cat conftest.err >&5
22517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22518   (exit $ac_status); } && {
22519          test -z "$ac_c_werror_flag" ||
22520          test ! -s conftest.err
22521        } && test -s conftest.$ac_objext; then
22522   ac_hi=-1 ac_mid=-1
22523   while :; do
22524     cat >conftest.$ac_ext <<_ACEOF
22525 /* confdefs.h.  */
22526 _ACEOF
22527 cat confdefs.h >>conftest.$ac_ext
22528 cat >>conftest.$ac_ext <<_ACEOF
22529 /* end confdefs.h.  */
22530 $ac_includes_default
22531 #ifndef offsetof
22532 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22533 #endif
22534 typedef struct { char x; double y; } ac__type_alignof_;
22535 int
22536 main ()
22537 {
22538 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
22539 test_array [0] = 0
22540
22541   ;
22542   return 0;
22543 }
22544 _ACEOF
22545 rm -f conftest.$ac_objext
22546 if { (ac_try="$ac_compile"
22547 case "(($ac_try" in
22548   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22549   *) ac_try_echo=$ac_try;;
22550 esac
22551 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22552   (eval "$ac_compile") 2>conftest.er1
22553   ac_status=$?
22554   grep -v '^ *+' conftest.er1 >conftest.err
22555   rm -f conftest.er1
22556   cat conftest.err >&5
22557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22558   (exit $ac_status); } && {
22559          test -z "$ac_c_werror_flag" ||
22560          test ! -s conftest.err
22561        } && test -s conftest.$ac_objext; then
22562   ac_lo=$ac_mid; break
22563 else
22564   echo "$as_me: failed program was:" >&5
22565 sed 's/^/| /' conftest.$ac_ext >&5
22566
22567         ac_hi=`expr '(' $ac_mid ')' - 1`
22568                         if test $ac_mid -le $ac_hi; then
22569                           ac_lo= ac_hi=
22570                           break
22571                         fi
22572                         ac_mid=`expr 2 '*' $ac_mid`
22573 fi
22574
22575 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22576   done
22577 else
22578   echo "$as_me: failed program was:" >&5
22579 sed 's/^/| /' conftest.$ac_ext >&5
22580
22581         ac_lo= ac_hi=
22582 fi
22583
22584 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22585 fi
22586
22587 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22588 # Binary search between lo and hi bounds.
22589 while test "x$ac_lo" != "x$ac_hi"; do
22590   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22591   cat >conftest.$ac_ext <<_ACEOF
22592 /* confdefs.h.  */
22593 _ACEOF
22594 cat confdefs.h >>conftest.$ac_ext
22595 cat >>conftest.$ac_ext <<_ACEOF
22596 /* end confdefs.h.  */
22597 $ac_includes_default
22598 #ifndef offsetof
22599 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22600 #endif
22601 typedef struct { char x; double y; } ac__type_alignof_;
22602 int
22603 main ()
22604 {
22605 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
22606 test_array [0] = 0
22607
22608   ;
22609   return 0;
22610 }
22611 _ACEOF
22612 rm -f conftest.$ac_objext
22613 if { (ac_try="$ac_compile"
22614 case "(($ac_try" in
22615   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22616   *) ac_try_echo=$ac_try;;
22617 esac
22618 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22619   (eval "$ac_compile") 2>conftest.er1
22620   ac_status=$?
22621   grep -v '^ *+' conftest.er1 >conftest.err
22622   rm -f conftest.er1
22623   cat conftest.err >&5
22624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22625   (exit $ac_status); } && {
22626          test -z "$ac_c_werror_flag" ||
22627          test ! -s conftest.err
22628        } && test -s conftest.$ac_objext; then
22629   ac_hi=$ac_mid
22630 else
22631   echo "$as_me: failed program was:" >&5
22632 sed 's/^/| /' conftest.$ac_ext >&5
22633
22634         ac_lo=`expr '(' $ac_mid ')' + 1`
22635 fi
22636
22637 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22638 done
22639 case $ac_lo in
22640 ?*) ac_cv_alignof_double=$ac_lo;;
22641 '') if test "$ac_cv_type_double" = yes; then
22642      { { echo "$as_me:$LINENO: error: cannot compute alignment of double
22643 See \`config.log' for more details." >&5
22644 echo "$as_me: error: cannot compute alignment of double
22645 See \`config.log' for more details." >&2;}
22646    { (exit 77); exit 77; }; }
22647    else
22648      ac_cv_alignof_double=0
22649    fi ;;
22650 esac
22651 else
22652   cat >conftest.$ac_ext <<_ACEOF
22653 /* confdefs.h.  */
22654 _ACEOF
22655 cat confdefs.h >>conftest.$ac_ext
22656 cat >>conftest.$ac_ext <<_ACEOF
22657 /* end confdefs.h.  */
22658 $ac_includes_default
22659 #ifndef offsetof
22660 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22661 #endif
22662 typedef struct { char x; double y; } ac__type_alignof_;
22663 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
22664 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
22665 #include <stdio.h>
22666 #include <stdlib.h>
22667 int
22668 main ()
22669 {
22670
22671   FILE *f = fopen ("conftest.val", "w");
22672   if (! f)
22673     return 1;
22674   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
22675     {
22676       long int i = longval ();
22677       if (i != ((long int) offsetof (ac__type_alignof_, y)))
22678         return 1;
22679       fprintf (f, "%ld\n", i);
22680     }
22681   else
22682     {
22683       unsigned long int i = ulongval ();
22684       if (i != ((long int) offsetof (ac__type_alignof_, y)))
22685         return 1;
22686       fprintf (f, "%lu\n", i);
22687     }
22688   return ferror (f) || fclose (f) != 0;
22689
22690   ;
22691   return 0;
22692 }
22693 _ACEOF
22694 rm -f conftest$ac_exeext
22695 if { (ac_try="$ac_link"
22696 case "(($ac_try" in
22697   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22698   *) ac_try_echo=$ac_try;;
22699 esac
22700 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22701   (eval "$ac_link") 2>&5
22702   ac_status=$?
22703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22704   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22705   { (case "(($ac_try" in
22706   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22707   *) ac_try_echo=$ac_try;;
22708 esac
22709 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22710   (eval "$ac_try") 2>&5
22711   ac_status=$?
22712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22713   (exit $ac_status); }; }; then
22714   ac_cv_alignof_double=`cat conftest.val`
22715 else
22716   echo "$as_me: program exited with status $ac_status" >&5
22717 echo "$as_me: failed program was:" >&5
22718 sed 's/^/| /' conftest.$ac_ext >&5
22719
22720 ( exit $ac_status )
22721 if test "$ac_cv_type_double" = yes; then
22722      { { echo "$as_me:$LINENO: error: cannot compute alignment of double
22723 See \`config.log' for more details." >&5
22724 echo "$as_me: error: cannot compute alignment of double
22725 See \`config.log' for more details." >&2;}
22726    { (exit 77); exit 77; }; }
22727    else
22728      ac_cv_alignof_double=0
22729    fi
22730 fi
22731 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22732 fi
22733 rm -f conftest.val
22734 fi
22735 { echo "$as_me:$LINENO: result: $ac_cv_alignof_double" >&5
22736 echo "${ECHO_T}$ac_cv_alignof_double" >&6; }
22737
22738
22739
22740 cat >>confdefs.h <<_ACEOF
22741 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
22742 _ACEOF
22743
22744
22745
22746 # Compute maximum alignment of any basic type.
22747 # We assume long's alignment is at least as strong as char, short, or int;
22748 # but we must check long long (if it exists) and double.
22749
22750 MAX_ALIGNOF=$ac_cv_alignof_long
22751 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
22752   MAX_ALIGNOF=$ac_cv_alignof_double
22753 fi
22754 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
22755   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
22756 fi
22757
22758 cat >>confdefs.h <<_ACEOF
22759 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
22760 _ACEOF
22761
22762
22763
22764 # Some platforms predefine the types int8, int16, etc.  Only check
22765 # a (hopefully) representative subset.
22766 { echo "$as_me:$LINENO: checking for int8" >&5
22767 echo $ECHO_N "checking for int8... $ECHO_C" >&6; }
22768 if test "${ac_cv_type_int8+set}" = set; then
22769   echo $ECHO_N "(cached) $ECHO_C" >&6
22770 else
22771   cat >conftest.$ac_ext <<_ACEOF
22772 /* confdefs.h.  */
22773 _ACEOF
22774 cat confdefs.h >>conftest.$ac_ext
22775 cat >>conftest.$ac_ext <<_ACEOF
22776 /* end confdefs.h.  */
22777 #include <stdio.h>
22778 #ifdef HAVE_SUPPORTDEFS_H
22779 #include <SupportDefs.h>
22780 #endif
22781
22782 typedef int8 ac__type_new_;
22783 int
22784 main ()
22785 {
22786 if ((ac__type_new_ *) 0)
22787   return 0;
22788 if (sizeof (ac__type_new_))
22789   return 0;
22790   ;
22791   return 0;
22792 }
22793 _ACEOF
22794 rm -f conftest.$ac_objext
22795 if { (ac_try="$ac_compile"
22796 case "(($ac_try" in
22797   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22798   *) ac_try_echo=$ac_try;;
22799 esac
22800 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22801   (eval "$ac_compile") 2>conftest.er1
22802   ac_status=$?
22803   grep -v '^ *+' conftest.er1 >conftest.err
22804   rm -f conftest.er1
22805   cat conftest.err >&5
22806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22807   (exit $ac_status); } && {
22808          test -z "$ac_c_werror_flag" ||
22809          test ! -s conftest.err
22810        } && test -s conftest.$ac_objext; then
22811   ac_cv_type_int8=yes
22812 else
22813   echo "$as_me: failed program was:" >&5
22814 sed 's/^/| /' conftest.$ac_ext >&5
22815
22816         ac_cv_type_int8=no
22817 fi
22818
22819 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22820 fi
22821 { echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
22822 echo "${ECHO_T}$ac_cv_type_int8" >&6; }
22823 if test $ac_cv_type_int8 = yes; then
22824
22825 cat >>confdefs.h <<_ACEOF
22826 #define HAVE_INT8 1
22827 _ACEOF
22828
22829
22830 fi
22831 { echo "$as_me:$LINENO: checking for uint8" >&5
22832 echo $ECHO_N "checking for uint8... $ECHO_C" >&6; }
22833 if test "${ac_cv_type_uint8+set}" = set; then
22834   echo $ECHO_N "(cached) $ECHO_C" >&6
22835 else
22836   cat >conftest.$ac_ext <<_ACEOF
22837 /* confdefs.h.  */
22838 _ACEOF
22839 cat confdefs.h >>conftest.$ac_ext
22840 cat >>conftest.$ac_ext <<_ACEOF
22841 /* end confdefs.h.  */
22842 #include <stdio.h>
22843 #ifdef HAVE_SUPPORTDEFS_H
22844 #include <SupportDefs.h>
22845 #endif
22846
22847 typedef uint8 ac__type_new_;
22848 int
22849 main ()
22850 {
22851 if ((ac__type_new_ *) 0)
22852   return 0;
22853 if (sizeof (ac__type_new_))
22854   return 0;
22855   ;
22856   return 0;
22857 }
22858 _ACEOF
22859 rm -f conftest.$ac_objext
22860 if { (ac_try="$ac_compile"
22861 case "(($ac_try" in
22862   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22863   *) ac_try_echo=$ac_try;;
22864 esac
22865 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22866   (eval "$ac_compile") 2>conftest.er1
22867   ac_status=$?
22868   grep -v '^ *+' conftest.er1 >conftest.err
22869   rm -f conftest.er1
22870   cat conftest.err >&5
22871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22872   (exit $ac_status); } && {
22873          test -z "$ac_c_werror_flag" ||
22874          test ! -s conftest.err
22875        } && test -s conftest.$ac_objext; then
22876   ac_cv_type_uint8=yes
22877 else
22878   echo "$as_me: failed program was:" >&5
22879 sed 's/^/| /' conftest.$ac_ext >&5
22880
22881         ac_cv_type_uint8=no
22882 fi
22883
22884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22885 fi
22886 { echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
22887 echo "${ECHO_T}$ac_cv_type_uint8" >&6; }
22888 if test $ac_cv_type_uint8 = yes; then
22889
22890 cat >>confdefs.h <<_ACEOF
22891 #define HAVE_UINT8 1
22892 _ACEOF
22893
22894
22895 fi
22896 { echo "$as_me:$LINENO: checking for int64" >&5
22897 echo $ECHO_N "checking for int64... $ECHO_C" >&6; }
22898 if test "${ac_cv_type_int64+set}" = set; then
22899   echo $ECHO_N "(cached) $ECHO_C" >&6
22900 else
22901   cat >conftest.$ac_ext <<_ACEOF
22902 /* confdefs.h.  */
22903 _ACEOF
22904 cat confdefs.h >>conftest.$ac_ext
22905 cat >>conftest.$ac_ext <<_ACEOF
22906 /* end confdefs.h.  */
22907 #include <stdio.h>
22908 #ifdef HAVE_SUPPORTDEFS_H
22909 #include <SupportDefs.h>
22910 #endif
22911
22912 typedef int64 ac__type_new_;
22913 int
22914 main ()
22915 {
22916 if ((ac__type_new_ *) 0)
22917   return 0;
22918 if (sizeof (ac__type_new_))
22919   return 0;
22920   ;
22921   return 0;
22922 }
22923 _ACEOF
22924 rm -f conftest.$ac_objext
22925 if { (ac_try="$ac_compile"
22926 case "(($ac_try" in
22927   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22928   *) ac_try_echo=$ac_try;;
22929 esac
22930 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22931   (eval "$ac_compile") 2>conftest.er1
22932   ac_status=$?
22933   grep -v '^ *+' conftest.er1 >conftest.err
22934   rm -f conftest.er1
22935   cat conftest.err >&5
22936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22937   (exit $ac_status); } && {
22938          test -z "$ac_c_werror_flag" ||
22939          test ! -s conftest.err
22940        } && test -s conftest.$ac_objext; then
22941   ac_cv_type_int64=yes
22942 else
22943   echo "$as_me: failed program was:" >&5
22944 sed 's/^/| /' conftest.$ac_ext >&5
22945
22946         ac_cv_type_int64=no
22947 fi
22948
22949 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22950 fi
22951 { echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
22952 echo "${ECHO_T}$ac_cv_type_int64" >&6; }
22953 if test $ac_cv_type_int64 = yes; then
22954
22955 cat >>confdefs.h <<_ACEOF
22956 #define HAVE_INT64 1
22957 _ACEOF
22958
22959
22960 fi
22961 { echo "$as_me:$LINENO: checking for uint64" >&5
22962 echo $ECHO_N "checking for uint64... $ECHO_C" >&6; }
22963 if test "${ac_cv_type_uint64+set}" = set; then
22964   echo $ECHO_N "(cached) $ECHO_C" >&6
22965 else
22966   cat >conftest.$ac_ext <<_ACEOF
22967 /* confdefs.h.  */
22968 _ACEOF
22969 cat confdefs.h >>conftest.$ac_ext
22970 cat >>conftest.$ac_ext <<_ACEOF
22971 /* end confdefs.h.  */
22972 #include <stdio.h>
22973 #ifdef HAVE_SUPPORTDEFS_H
22974 #include <SupportDefs.h>
22975 #endif
22976
22977 typedef uint64 ac__type_new_;
22978 int
22979 main ()
22980 {
22981 if ((ac__type_new_ *) 0)
22982   return 0;
22983 if (sizeof (ac__type_new_))
22984   return 0;
22985   ;
22986   return 0;
22987 }
22988 _ACEOF
22989 rm -f conftest.$ac_objext
22990 if { (ac_try="$ac_compile"
22991 case "(($ac_try" in
22992   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22993   *) ac_try_echo=$ac_try;;
22994 esac
22995 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22996   (eval "$ac_compile") 2>conftest.er1
22997   ac_status=$?
22998   grep -v '^ *+' conftest.er1 >conftest.err
22999   rm -f conftest.er1
23000   cat conftest.err >&5
23001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23002   (exit $ac_status); } && {
23003          test -z "$ac_c_werror_flag" ||
23004          test ! -s conftest.err
23005        } && test -s conftest.$ac_objext; then
23006   ac_cv_type_uint64=yes
23007 else
23008   echo "$as_me: failed program was:" >&5
23009 sed 's/^/| /' conftest.$ac_ext >&5
23010
23011         ac_cv_type_uint64=no
23012 fi
23013
23014 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23015 fi
23016 { echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
23017 echo "${ECHO_T}$ac_cv_type_uint64" >&6; }
23018 if test $ac_cv_type_uint64 = yes; then
23019
23020 cat >>confdefs.h <<_ACEOF
23021 #define HAVE_UINT64 1
23022 _ACEOF
23023
23024
23025 fi
23026
23027
23028 # We also check for sig_atomic_t, which *should* be defined per ANSI
23029 # C, but is missing on some old platforms.
23030 { echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
23031 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6; }
23032 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
23033   echo $ECHO_N "(cached) $ECHO_C" >&6
23034 else
23035   cat >conftest.$ac_ext <<_ACEOF
23036 /* confdefs.h.  */
23037 _ACEOF
23038 cat confdefs.h >>conftest.$ac_ext
23039 cat >>conftest.$ac_ext <<_ACEOF
23040 /* end confdefs.h.  */
23041 #include <signal.h>
23042
23043 typedef sig_atomic_t ac__type_new_;
23044 int
23045 main ()
23046 {
23047 if ((ac__type_new_ *) 0)
23048   return 0;
23049 if (sizeof (ac__type_new_))
23050   return 0;
23051   ;
23052   return 0;
23053 }
23054 _ACEOF
23055 rm -f conftest.$ac_objext
23056 if { (ac_try="$ac_compile"
23057 case "(($ac_try" in
23058   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23059   *) ac_try_echo=$ac_try;;
23060 esac
23061 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23062   (eval "$ac_compile") 2>conftest.er1
23063   ac_status=$?
23064   grep -v '^ *+' conftest.er1 >conftest.err
23065   rm -f conftest.er1
23066   cat conftest.err >&5
23067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23068   (exit $ac_status); } && {
23069          test -z "$ac_c_werror_flag" ||
23070          test ! -s conftest.err
23071        } && test -s conftest.$ac_objext; then
23072   ac_cv_type_sig_atomic_t=yes
23073 else
23074   echo "$as_me: failed program was:" >&5
23075 sed 's/^/| /' conftest.$ac_ext >&5
23076
23077         ac_cv_type_sig_atomic_t=no
23078 fi
23079
23080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23081 fi
23082 { echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
23083 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6; }
23084 if test $ac_cv_type_sig_atomic_t = yes; then
23085
23086 cat >>confdefs.h <<_ACEOF
23087 #define HAVE_SIG_ATOMIC_T 1
23088 _ACEOF
23089
23090
23091 fi
23092
23093
23094
23095 if test "$PORTNAME" != "win32"
23096 then
23097 { echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
23098 echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6; }
23099 if test "${pgac_cv_func_posix_signals+set}" = set; then
23100   echo $ECHO_N "(cached) $ECHO_C" >&6
23101 else
23102   cat >conftest.$ac_ext <<_ACEOF
23103 /* confdefs.h.  */
23104 _ACEOF
23105 cat confdefs.h >>conftest.$ac_ext
23106 cat >>conftest.$ac_ext <<_ACEOF
23107 /* end confdefs.h.  */
23108 #include <signal.h>
23109
23110 int
23111 main ()
23112 {
23113 struct sigaction act, oact;
23114 sigemptyset(&act.sa_mask);
23115 act.sa_flags = SA_RESTART;
23116 sigaction(0, &act, &oact);
23117   ;
23118   return 0;
23119 }
23120 _ACEOF
23121 rm -f conftest.$ac_objext conftest$ac_exeext
23122 if { (ac_try="$ac_link"
23123 case "(($ac_try" in
23124   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23125   *) ac_try_echo=$ac_try;;
23126 esac
23127 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23128   (eval "$ac_link") 2>conftest.er1
23129   ac_status=$?
23130   grep -v '^ *+' conftest.er1 >conftest.err
23131   rm -f conftest.er1
23132   cat conftest.err >&5
23133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23134   (exit $ac_status); } && {
23135          test -z "$ac_c_werror_flag" ||
23136          test ! -s conftest.err
23137        } && test -s conftest$ac_exeext &&
23138        $as_test_x conftest$ac_exeext; then
23139   pgac_cv_func_posix_signals=yes
23140 else
23141   echo "$as_me: failed program was:" >&5
23142 sed 's/^/| /' conftest.$ac_ext >&5
23143
23144         pgac_cv_func_posix_signals=no
23145 fi
23146
23147 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23148       conftest$ac_exeext conftest.$ac_ext
23149 fi
23150 { echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
23151 echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6; }
23152 if test x"$pgac_cv_func_posix_signals" = xyes ; then
23153
23154 cat >>confdefs.h <<\_ACEOF
23155 #define HAVE_POSIX_SIGNALS
23156 _ACEOF
23157
23158 fi
23159 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
23160
23161 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
23162   { { echo "$as_me:$LINENO: error:
23163 Thread-safety requires POSIX signals, which are not supported by this
23164 operating system." >&5
23165 echo "$as_me: error:
23166 Thread-safety requires POSIX signals, which are not supported by this
23167 operating system." >&2;}
23168    { (exit 1); exit 1; }; }
23169 fi
23170 fi
23171
23172 if test $ac_cv_func_fseeko = yes; then
23173 # Check whether --enable-largefile was given.
23174 if test "${enable_largefile+set}" = set; then
23175   enableval=$enable_largefile;
23176 fi
23177
23178 if test "$enable_largefile" != no; then
23179
23180   { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
23181 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
23182 if test "${ac_cv_sys_largefile_CC+set}" = set; then
23183   echo $ECHO_N "(cached) $ECHO_C" >&6
23184 else
23185   ac_cv_sys_largefile_CC=no
23186      if test "$GCC" != yes; then
23187        ac_save_CC=$CC
23188        while :; do
23189          # IRIX 6.2 and later do not support large files by default,
23190          # so use the C compiler's -n32 option if that helps.
23191          cat >conftest.$ac_ext <<_ACEOF
23192 /* confdefs.h.  */
23193 _ACEOF
23194 cat confdefs.h >>conftest.$ac_ext
23195 cat >>conftest.$ac_ext <<_ACEOF
23196 /* end confdefs.h.  */
23197 #include <sys/types.h>
23198  /* Check that off_t can represent 2**63 - 1 correctly.
23199     We can't simply define LARGE_OFF_T to be 9223372036854775807,
23200     since some C++ compilers masquerading as C compilers
23201     incorrectly reject 9223372036854775807.  */
23202 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
23203   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
23204                        && LARGE_OFF_T % 2147483647 == 1)
23205                       ? 1 : -1];
23206 int
23207 main ()
23208 {
23209
23210   ;
23211   return 0;
23212 }
23213 _ACEOF
23214          rm -f conftest.$ac_objext
23215 if { (ac_try="$ac_compile"
23216 case "(($ac_try" in
23217   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23218   *) ac_try_echo=$ac_try;;
23219 esac
23220 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23221   (eval "$ac_compile") 2>conftest.er1
23222   ac_status=$?
23223   grep -v '^ *+' conftest.er1 >conftest.err
23224   rm -f conftest.er1
23225   cat conftest.err >&5
23226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23227   (exit $ac_status); } && {
23228          test -z "$ac_c_werror_flag" ||
23229          test ! -s conftest.err
23230        } && test -s conftest.$ac_objext; then
23231   break
23232 else
23233   echo "$as_me: failed program was:" >&5
23234 sed 's/^/| /' conftest.$ac_ext >&5
23235
23236
23237 fi
23238
23239 rm -f core conftest.err conftest.$ac_objext
23240          CC="$CC -n32"
23241          rm -f conftest.$ac_objext
23242 if { (ac_try="$ac_compile"
23243 case "(($ac_try" in
23244   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23245   *) ac_try_echo=$ac_try;;
23246 esac
23247 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23248   (eval "$ac_compile") 2>conftest.er1
23249   ac_status=$?
23250   grep -v '^ *+' conftest.er1 >conftest.err
23251   rm -f conftest.er1
23252   cat conftest.err >&5
23253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23254   (exit $ac_status); } && {
23255          test -z "$ac_c_werror_flag" ||
23256          test ! -s conftest.err
23257        } && test -s conftest.$ac_objext; then
23258   ac_cv_sys_largefile_CC=' -n32'; break
23259 else
23260   echo "$as_me: failed program was:" >&5
23261 sed 's/^/| /' conftest.$ac_ext >&5
23262
23263
23264 fi
23265
23266 rm -f core conftest.err conftest.$ac_objext
23267          break
23268        done
23269        CC=$ac_save_CC
23270        rm -f conftest.$ac_ext
23271     fi
23272 fi
23273 { echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
23274 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
23275   if test "$ac_cv_sys_largefile_CC" != no; then
23276     CC=$CC$ac_cv_sys_largefile_CC
23277   fi
23278
23279   { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
23280 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
23281 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
23282   echo $ECHO_N "(cached) $ECHO_C" >&6
23283 else
23284   while :; do
23285   cat >conftest.$ac_ext <<_ACEOF
23286 /* confdefs.h.  */
23287 _ACEOF
23288 cat confdefs.h >>conftest.$ac_ext
23289 cat >>conftest.$ac_ext <<_ACEOF
23290 /* end confdefs.h.  */
23291 #include <sys/types.h>
23292  /* Check that off_t can represent 2**63 - 1 correctly.
23293     We can't simply define LARGE_OFF_T to be 9223372036854775807,
23294     since some C++ compilers masquerading as C compilers
23295     incorrectly reject 9223372036854775807.  */
23296 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
23297   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
23298                        && LARGE_OFF_T % 2147483647 == 1)
23299                       ? 1 : -1];
23300 int
23301 main ()
23302 {
23303
23304   ;
23305   return 0;
23306 }
23307 _ACEOF
23308 rm -f conftest.$ac_objext
23309 if { (ac_try="$ac_compile"
23310 case "(($ac_try" in
23311   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23312   *) ac_try_echo=$ac_try;;
23313 esac
23314 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23315   (eval "$ac_compile") 2>conftest.er1
23316   ac_status=$?
23317   grep -v '^ *+' conftest.er1 >conftest.err
23318   rm -f conftest.er1
23319   cat conftest.err >&5
23320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23321   (exit $ac_status); } && {
23322          test -z "$ac_c_werror_flag" ||
23323          test ! -s conftest.err
23324        } && test -s conftest.$ac_objext; then
23325   ac_cv_sys_file_offset_bits=no; break
23326 else
23327   echo "$as_me: failed program was:" >&5
23328 sed 's/^/| /' conftest.$ac_ext >&5
23329
23330
23331 fi
23332
23333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23334   cat >conftest.$ac_ext <<_ACEOF
23335 /* confdefs.h.  */
23336 _ACEOF
23337 cat confdefs.h >>conftest.$ac_ext
23338 cat >>conftest.$ac_ext <<_ACEOF
23339 /* end confdefs.h.  */
23340 #define _FILE_OFFSET_BITS 64
23341 #include <sys/types.h>
23342  /* Check that off_t can represent 2**63 - 1 correctly.
23343     We can't simply define LARGE_OFF_T to be 9223372036854775807,
23344     since some C++ compilers masquerading as C compilers
23345     incorrectly reject 9223372036854775807.  */
23346 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
23347   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
23348                        && LARGE_OFF_T % 2147483647 == 1)
23349                       ? 1 : -1];
23350 int
23351 main ()
23352 {
23353
23354   ;
23355   return 0;
23356 }
23357 _ACEOF
23358 rm -f conftest.$ac_objext
23359 if { (ac_try="$ac_compile"
23360 case "(($ac_try" in
23361   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23362   *) ac_try_echo=$ac_try;;
23363 esac
23364 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23365   (eval "$ac_compile") 2>conftest.er1
23366   ac_status=$?
23367   grep -v '^ *+' conftest.er1 >conftest.err
23368   rm -f conftest.er1
23369   cat conftest.err >&5
23370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23371   (exit $ac_status); } && {
23372          test -z "$ac_c_werror_flag" ||
23373          test ! -s conftest.err
23374        } && test -s conftest.$ac_objext; then
23375   ac_cv_sys_file_offset_bits=64; break
23376 else
23377   echo "$as_me: failed program was:" >&5
23378 sed 's/^/| /' conftest.$ac_ext >&5
23379
23380
23381 fi
23382
23383 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23384   ac_cv_sys_file_offset_bits=unknown
23385   break
23386 done
23387 fi
23388 { echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
23389 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
23390 case $ac_cv_sys_file_offset_bits in #(
23391   no | unknown) ;;
23392   *)
23393 cat >>confdefs.h <<_ACEOF
23394 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
23395 _ACEOF
23396 ;;
23397 esac
23398 rm -f conftest*
23399   if test $ac_cv_sys_file_offset_bits = unknown; then
23400     { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
23401 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
23402 if test "${ac_cv_sys_large_files+set}" = set; then
23403   echo $ECHO_N "(cached) $ECHO_C" >&6
23404 else
23405   while :; do
23406   cat >conftest.$ac_ext <<_ACEOF
23407 /* confdefs.h.  */
23408 _ACEOF
23409 cat confdefs.h >>conftest.$ac_ext
23410 cat >>conftest.$ac_ext <<_ACEOF
23411 /* end confdefs.h.  */
23412 #include <sys/types.h>
23413  /* Check that off_t can represent 2**63 - 1 correctly.
23414     We can't simply define LARGE_OFF_T to be 9223372036854775807,
23415     since some C++ compilers masquerading as C compilers
23416     incorrectly reject 9223372036854775807.  */
23417 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
23418   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
23419                        && LARGE_OFF_T % 2147483647 == 1)
23420                       ? 1 : -1];
23421 int
23422 main ()
23423 {
23424
23425   ;
23426   return 0;
23427 }
23428 _ACEOF
23429 rm -f conftest.$ac_objext
23430 if { (ac_try="$ac_compile"
23431 case "(($ac_try" in
23432   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23433   *) ac_try_echo=$ac_try;;
23434 esac
23435 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23436   (eval "$ac_compile") 2>conftest.er1
23437   ac_status=$?
23438   grep -v '^ *+' conftest.er1 >conftest.err
23439   rm -f conftest.er1
23440   cat conftest.err >&5
23441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23442   (exit $ac_status); } && {
23443          test -z "$ac_c_werror_flag" ||
23444          test ! -s conftest.err
23445        } && test -s conftest.$ac_objext; then
23446   ac_cv_sys_large_files=no; break
23447 else
23448   echo "$as_me: failed program was:" >&5
23449 sed 's/^/| /' conftest.$ac_ext >&5
23450
23451
23452 fi
23453
23454 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23455   cat >conftest.$ac_ext <<_ACEOF
23456 /* confdefs.h.  */
23457 _ACEOF
23458 cat confdefs.h >>conftest.$ac_ext
23459 cat >>conftest.$ac_ext <<_ACEOF
23460 /* end confdefs.h.  */
23461 #define _LARGE_FILES 1
23462 #include <sys/types.h>
23463  /* Check that off_t can represent 2**63 - 1 correctly.
23464     We can't simply define LARGE_OFF_T to be 9223372036854775807,
23465     since some C++ compilers masquerading as C compilers
23466     incorrectly reject 9223372036854775807.  */
23467 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
23468   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
23469                        && LARGE_OFF_T % 2147483647 == 1)
23470                       ? 1 : -1];
23471 int
23472 main ()
23473 {
23474
23475   ;
23476   return 0;
23477 }
23478 _ACEOF
23479 rm -f conftest.$ac_objext
23480 if { (ac_try="$ac_compile"
23481 case "(($ac_try" in
23482   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23483   *) ac_try_echo=$ac_try;;
23484 esac
23485 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23486   (eval "$ac_compile") 2>conftest.er1
23487   ac_status=$?
23488   grep -v '^ *+' conftest.er1 >conftest.err
23489   rm -f conftest.er1
23490   cat conftest.err >&5
23491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23492   (exit $ac_status); } && {
23493          test -z "$ac_c_werror_flag" ||
23494          test ! -s conftest.err
23495        } && test -s conftest.$ac_objext; then
23496   ac_cv_sys_large_files=1; break
23497 else
23498   echo "$as_me: failed program was:" >&5
23499 sed 's/^/| /' conftest.$ac_ext >&5
23500
23501
23502 fi
23503
23504 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23505   ac_cv_sys_large_files=unknown
23506   break
23507 done
23508 fi
23509 { echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
23510 echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
23511 case $ac_cv_sys_large_files in #(
23512   no | unknown) ;;
23513   *)
23514 cat >>confdefs.h <<_ACEOF
23515 #define _LARGE_FILES $ac_cv_sys_large_files
23516 _ACEOF
23517 ;;
23518 esac
23519 rm -f conftest*
23520   fi
23521 fi
23522
23523 fi
23524
23525 # SunOS doesn't handle negative byte comparisons properly with +/- return
23526 { echo "$as_me:$LINENO: checking for working memcmp" >&5
23527 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; }
23528 if test "${ac_cv_func_memcmp_working+set}" = set; then
23529   echo $ECHO_N "(cached) $ECHO_C" >&6
23530 else
23531   if test "$cross_compiling" = yes; then
23532   ac_cv_func_memcmp_working=no
23533 else
23534   cat >conftest.$ac_ext <<_ACEOF
23535 /* confdefs.h.  */
23536 _ACEOF
23537 cat confdefs.h >>conftest.$ac_ext
23538 cat >>conftest.$ac_ext <<_ACEOF
23539 /* end confdefs.h.  */
23540 $ac_includes_default
23541 int
23542 main ()
23543 {
23544
23545   /* Some versions of memcmp are not 8-bit clean.  */
23546   char c0 = '\100', c1 = '\200', c2 = '\201';
23547   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
23548     return 1;
23549
23550   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
23551      or more and with at least one buffer not starting on a 4-byte boundary.
23552      William Lewis provided this test program.   */
23553   {
23554     char foo[21];
23555     char bar[21];
23556     int i;
23557     for (i = 0; i < 4; i++)
23558       {
23559         char *a = foo + i;
23560         char *b = bar + i;
23561         strcpy (a, "--------01111111");
23562         strcpy (b, "--------10000000");
23563         if (memcmp (a, b, 16) >= 0)
23564           return 1;
23565       }
23566     return 0;
23567   }
23568
23569   ;
23570   return 0;
23571 }
23572 _ACEOF
23573 rm -f conftest$ac_exeext
23574 if { (ac_try="$ac_link"
23575 case "(($ac_try" in
23576   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23577   *) ac_try_echo=$ac_try;;
23578 esac
23579 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23580   (eval "$ac_link") 2>&5
23581   ac_status=$?
23582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23583   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23584   { (case "(($ac_try" in
23585   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23586   *) ac_try_echo=$ac_try;;
23587 esac
23588 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23589   (eval "$ac_try") 2>&5
23590   ac_status=$?
23591   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23592   (exit $ac_status); }; }; then
23593   ac_cv_func_memcmp_working=yes
23594 else
23595   echo "$as_me: program exited with status $ac_status" >&5
23596 echo "$as_me: failed program was:" >&5
23597 sed 's/^/| /' conftest.$ac_ext >&5
23598
23599 ( exit $ac_status )
23600 ac_cv_func_memcmp_working=no
23601 fi
23602 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23603 fi
23604
23605
23606 fi
23607 { echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
23608 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; }
23609 test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
23610   *" memcmp.$ac_objext "* ) ;;
23611   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
23612  ;;
23613 esac
23614
23615
23616
23617
23618 # Select semaphore implementation type.
23619 if test "$PORTNAME" != "win32"; then
23620   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
23621
23622 cat >>confdefs.h <<\_ACEOF
23623 #define USE_NAMED_POSIX_SEMAPHORES 1
23624 _ACEOF
23625
23626     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
23627   else
23628     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
23629
23630 cat >>confdefs.h <<\_ACEOF
23631 #define USE_UNNAMED_POSIX_SEMAPHORES 1
23632 _ACEOF
23633
23634       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
23635     else
23636
23637 cat >>confdefs.h <<\_ACEOF
23638 #define USE_SYSV_SEMAPHORES 1
23639 _ACEOF
23640
23641       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
23642     fi
23643   fi
23644 else
23645
23646 cat >>confdefs.h <<\_ACEOF
23647 #define USE_WIN32_SEMAPHORES 1
23648 _ACEOF
23649
23650   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
23651 fi
23652
23653
23654 # Select shared-memory implementation type.
23655 if test "$PORTNAME" != "win32"; then
23656
23657 cat >>confdefs.h <<\_ACEOF
23658 #define USE_SYSV_SHARED_MEMORY 1
23659 _ACEOF
23660
23661   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
23662 else
23663
23664 cat >>confdefs.h <<\_ACEOF
23665 #define USE_WIN32_SHARED_MEMORY 1
23666 _ACEOF
23667
23668   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
23669 fi
23670
23671 # If not set in template file, set bytes to use libc memset()
23672 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
23673   MEMSET_LOOP_LIMIT=1024
23674 fi
23675
23676 cat >>confdefs.h <<_ACEOF
23677 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
23678 _ACEOF
23679
23680
23681
23682 if test "$enable_nls" = yes ; then
23683
23684   { echo "$as_me:$LINENO: checking for library containing gettext" >&5
23685 echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6; }
23686 if test "${ac_cv_search_gettext+set}" = set; then
23687   echo $ECHO_N "(cached) $ECHO_C" >&6
23688 else
23689   ac_func_search_save_LIBS=$LIBS
23690 cat >conftest.$ac_ext <<_ACEOF
23691 /* confdefs.h.  */
23692 _ACEOF
23693 cat confdefs.h >>conftest.$ac_ext
23694 cat >>conftest.$ac_ext <<_ACEOF
23695 /* end confdefs.h.  */
23696
23697 /* Override any GCC internal prototype to avoid an error.
23698    Use char because int might match the return type of a GCC
23699    builtin and then its argument prototype would still apply.  */
23700 #ifdef __cplusplus
23701 extern "C"
23702 #endif
23703 char gettext ();
23704 int
23705 main ()
23706 {
23707 return gettext ();
23708   ;
23709   return 0;
23710 }
23711 _ACEOF
23712 for ac_lib in '' intl; do
23713   if test -z "$ac_lib"; then
23714     ac_res="none required"
23715   else
23716     ac_res=-l$ac_lib
23717     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23718   fi
23719   rm -f conftest.$ac_objext conftest$ac_exeext
23720 if { (ac_try="$ac_link"
23721 case "(($ac_try" in
23722   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23723   *) ac_try_echo=$ac_try;;
23724 esac
23725 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23726   (eval "$ac_link") 2>conftest.er1
23727   ac_status=$?
23728   grep -v '^ *+' conftest.er1 >conftest.err
23729   rm -f conftest.er1
23730   cat conftest.err >&5
23731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23732   (exit $ac_status); } && {
23733          test -z "$ac_c_werror_flag" ||
23734          test ! -s conftest.err
23735        } && test -s conftest$ac_exeext &&
23736        $as_test_x conftest$ac_exeext; then
23737   ac_cv_search_gettext=$ac_res
23738 else
23739   echo "$as_me: failed program was:" >&5
23740 sed 's/^/| /' conftest.$ac_ext >&5
23741
23742
23743 fi
23744
23745 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23746       conftest$ac_exeext
23747   if test "${ac_cv_search_gettext+set}" = set; then
23748   break
23749 fi
23750 done
23751 if test "${ac_cv_search_gettext+set}" = set; then
23752   :
23753 else
23754   ac_cv_search_gettext=no
23755 fi
23756 rm conftest.$ac_ext
23757 LIBS=$ac_func_search_save_LIBS
23758 fi
23759 { echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5
23760 echo "${ECHO_T}$ac_cv_search_gettext" >&6; }
23761 ac_res=$ac_cv_search_gettext
23762 if test "$ac_res" != no; then
23763   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23764
23765 else
23766   { { echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
23767 echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
23768    { (exit 1); exit 1; }; }
23769 fi
23770
23771   if test "${ac_cv_header_libintl_h+set}" = set; then
23772   { echo "$as_me:$LINENO: checking for libintl.h" >&5
23773 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
23774 if test "${ac_cv_header_libintl_h+set}" = set; then
23775   echo $ECHO_N "(cached) $ECHO_C" >&6
23776 fi
23777 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
23778 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
23779 else
23780   # Is the header compilable?
23781 { echo "$as_me:$LINENO: checking libintl.h usability" >&5
23782 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6; }
23783 cat >conftest.$ac_ext <<_ACEOF
23784 /* confdefs.h.  */
23785 _ACEOF
23786 cat confdefs.h >>conftest.$ac_ext
23787 cat >>conftest.$ac_ext <<_ACEOF
23788 /* end confdefs.h.  */
23789 $ac_includes_default
23790 #include <libintl.h>
23791 _ACEOF
23792 rm -f conftest.$ac_objext
23793 if { (ac_try="$ac_compile"
23794 case "(($ac_try" in
23795   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23796   *) ac_try_echo=$ac_try;;
23797 esac
23798 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23799   (eval "$ac_compile") 2>conftest.er1
23800   ac_status=$?
23801   grep -v '^ *+' conftest.er1 >conftest.err
23802   rm -f conftest.er1
23803   cat conftest.err >&5
23804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23805   (exit $ac_status); } && {
23806          test -z "$ac_c_werror_flag" ||
23807          test ! -s conftest.err
23808        } && test -s conftest.$ac_objext; then
23809   ac_header_compiler=yes
23810 else
23811   echo "$as_me: failed program was:" >&5
23812 sed 's/^/| /' conftest.$ac_ext >&5
23813
23814         ac_header_compiler=no
23815 fi
23816
23817 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23818 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23819 echo "${ECHO_T}$ac_header_compiler" >&6; }
23820
23821 # Is the header present?
23822 { echo "$as_me:$LINENO: checking libintl.h presence" >&5
23823 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6; }
23824 cat >conftest.$ac_ext <<_ACEOF
23825 /* confdefs.h.  */
23826 _ACEOF
23827 cat confdefs.h >>conftest.$ac_ext
23828 cat >>conftest.$ac_ext <<_ACEOF
23829 /* end confdefs.h.  */
23830 #include <libintl.h>
23831 _ACEOF
23832 if { (ac_try="$ac_cpp conftest.$ac_ext"
23833 case "(($ac_try" in
23834   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23835   *) ac_try_echo=$ac_try;;
23836 esac
23837 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23838   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23839   ac_status=$?
23840   grep -v '^ *+' conftest.er1 >conftest.err
23841   rm -f conftest.er1
23842   cat conftest.err >&5
23843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23844   (exit $ac_status); } >/dev/null && {
23845          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23846          test ! -s conftest.err
23847        }; then
23848   ac_header_preproc=yes
23849 else
23850   echo "$as_me: failed program was:" >&5
23851 sed 's/^/| /' conftest.$ac_ext >&5
23852
23853   ac_header_preproc=no
23854 fi
23855
23856 rm -f conftest.err conftest.$ac_ext
23857 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23858 echo "${ECHO_T}$ac_header_preproc" >&6; }
23859
23860 # So?  What about this header?
23861 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23862   yes:no: )
23863     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
23864 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23865     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
23866 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
23867     ac_header_preproc=yes
23868     ;;
23869   no:yes:* )
23870     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
23871 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
23872     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
23873 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
23874     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
23875 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
23876     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
23877 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
23878     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
23879 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
23880     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
23881 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
23882     ( cat <<\_ASBOX
23883 ## ---------------------------------------- ##
23884 ## Report this to pgsql-bugs@postgresql.org ##
23885 ## ---------------------------------------- ##
23886 _ASBOX
23887      ) | sed "s/^/$as_me: WARNING:     /" >&2
23888     ;;
23889 esac
23890 { echo "$as_me:$LINENO: checking for libintl.h" >&5
23891 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
23892 if test "${ac_cv_header_libintl_h+set}" = set; then
23893   echo $ECHO_N "(cached) $ECHO_C" >&6
23894 else
23895   ac_cv_header_libintl_h=$ac_header_preproc
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
23900 fi
23901 if test $ac_cv_header_libintl_h = yes; then
23902   :
23903 else
23904   { { echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
23905 echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
23906    { (exit 1); exit 1; }; }
23907 fi
23908
23909
23910   for ac_prog in msgfmt
23911 do
23912   # Extract the first word of "$ac_prog", so it can be a program name with args.
23913 set dummy $ac_prog; ac_word=$2
23914 { echo "$as_me:$LINENO: checking for $ac_word" >&5
23915 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
23916 if test "${ac_cv_prog_MSGFMT+set}" = set; then
23917   echo $ECHO_N "(cached) $ECHO_C" >&6
23918 else
23919   if test -n "$MSGFMT"; then
23920   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
23921 else
23922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23923 for as_dir in $PATH
23924 do
23925   IFS=$as_save_IFS
23926   test -z "$as_dir" && as_dir=.
23927   for ac_exec_ext in '' $ac_executable_extensions; do
23928   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23929     ac_cv_prog_MSGFMT="$ac_prog"
23930     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
23931     break 2
23932   fi
23933 done
23934 done
23935 IFS=$as_save_IFS
23936
23937 fi
23938 fi
23939 MSGFMT=$ac_cv_prog_MSGFMT
23940 if test -n "$MSGFMT"; then
23941   { echo "$as_me:$LINENO: result: $MSGFMT" >&5
23942 echo "${ECHO_T}$MSGFMT" >&6; }
23943 else
23944   { echo "$as_me:$LINENO: result: no" >&5
23945 echo "${ECHO_T}no" >&6; }
23946 fi
23947
23948
23949   test -n "$MSGFMT" && break
23950 done
23951
23952   if test -z "$MSGFMT"; then
23953     { { echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
23954 echo "$as_me: error: msgfmt is required for NLS" >&2;}
23955    { (exit 1); exit 1; }; }
23956   fi
23957   for ac_prog in msgmerge
23958 do
23959   # Extract the first word of "$ac_prog", so it can be a program name with args.
23960 set dummy $ac_prog; ac_word=$2
23961 { echo "$as_me:$LINENO: checking for $ac_word" >&5
23962 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
23963 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
23964   echo $ECHO_N "(cached) $ECHO_C" >&6
23965 else
23966   if test -n "$MSGMERGE"; then
23967   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
23968 else
23969 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23970 for as_dir in $PATH
23971 do
23972   IFS=$as_save_IFS
23973   test -z "$as_dir" && as_dir=.
23974   for ac_exec_ext in '' $ac_executable_extensions; do
23975   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23976     ac_cv_prog_MSGMERGE="$ac_prog"
23977     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
23978     break 2
23979   fi
23980 done
23981 done
23982 IFS=$as_save_IFS
23983
23984 fi
23985 fi
23986 MSGMERGE=$ac_cv_prog_MSGMERGE
23987 if test -n "$MSGMERGE"; then
23988   { echo "$as_me:$LINENO: result: $MSGMERGE" >&5
23989 echo "${ECHO_T}$MSGMERGE" >&6; }
23990 else
23991   { echo "$as_me:$LINENO: result: no" >&5
23992 echo "${ECHO_T}no" >&6; }
23993 fi
23994
23995
23996   test -n "$MSGMERGE" && break
23997 done
23998
23999   for ac_prog in xgettext
24000 do
24001   # Extract the first word of "$ac_prog", so it can be a program name with args.
24002 set dummy $ac_prog; ac_word=$2
24003 { echo "$as_me:$LINENO: checking for $ac_word" >&5
24004 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
24005 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
24006   echo $ECHO_N "(cached) $ECHO_C" >&6
24007 else
24008   if test -n "$XGETTEXT"; then
24009   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
24010 else
24011 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24012 for as_dir in $PATH
24013 do
24014   IFS=$as_save_IFS
24015   test -z "$as_dir" && as_dir=.
24016   for ac_exec_ext in '' $ac_executable_extensions; do
24017   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24018     ac_cv_prog_XGETTEXT="$ac_prog"
24019     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24020     break 2
24021   fi
24022 done
24023 done
24024 IFS=$as_save_IFS
24025
24026 fi
24027 fi
24028 XGETTEXT=$ac_cv_prog_XGETTEXT
24029 if test -n "$XGETTEXT"; then
24030   { echo "$as_me:$LINENO: result: $XGETTEXT" >&5
24031 echo "${ECHO_T}$XGETTEXT" >&6; }
24032 else
24033   { echo "$as_me:$LINENO: result: no" >&5
24034 echo "${ECHO_T}no" >&6; }
24035 fi
24036
24037
24038   test -n "$XGETTEXT" && break
24039 done
24040
24041
24042 fi
24043
24044 # Check for Tcl configuration script tclConfig.sh
24045 if test "$with_tcl" = yes; then
24046     for ac_prog in tclsh tcl
24047 do
24048   # Extract the first word of "$ac_prog", so it can be a program name with args.
24049 set dummy $ac_prog; ac_word=$2
24050 { echo "$as_me:$LINENO: checking for $ac_word" >&5
24051 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
24052 if test "${ac_cv_path_TCLSH+set}" = set; then
24053   echo $ECHO_N "(cached) $ECHO_C" >&6
24054 else
24055   case $TCLSH in
24056   [\\/]* | ?:[\\/]*)
24057   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
24058   ;;
24059   *)
24060   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24061 for as_dir in $PATH
24062 do
24063   IFS=$as_save_IFS
24064   test -z "$as_dir" && as_dir=.
24065   for ac_exec_ext in '' $ac_executable_extensions; do
24066   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24067     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
24068     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24069     break 2
24070   fi
24071 done
24072 done
24073 IFS=$as_save_IFS
24074
24075   ;;
24076 esac
24077 fi
24078 TCLSH=$ac_cv_path_TCLSH
24079 if test -n "$TCLSH"; then
24080   { echo "$as_me:$LINENO: result: $TCLSH" >&5
24081 echo "${ECHO_T}$TCLSH" >&6; }
24082 else
24083   { echo "$as_me:$LINENO: result: no" >&5
24084 echo "${ECHO_T}no" >&6; }
24085 fi
24086
24087
24088   test -n "$TCLSH" && break
24089 done
24090
24091 { echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
24092 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6; }
24093 # Let user override test
24094 if test -z "$TCL_CONFIG_SH"; then
24095     pgac_test_dirs="$with_tclconfig"
24096
24097     set X $pgac_test_dirs; shift
24098     if test $# -eq 0; then
24099         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
24100 echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
24101    { (exit 1); exit 1; }; }
24102         set X `echo 'puts $auto_path' | $TCLSH`; shift
24103     fi
24104
24105     for pgac_dir do
24106         if test -r "$pgac_dir/tclConfig.sh"; then
24107             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
24108             break
24109         fi
24110     done
24111 fi
24112
24113 if test -z "$TCL_CONFIG_SH"; then
24114     { echo "$as_me:$LINENO: result: no" >&5
24115 echo "${ECHO_T}no" >&6; }
24116     { { echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
24117 echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
24118    { (exit 1); exit 1; }; }
24119 else
24120     { echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
24121 echo "${ECHO_T}$TCL_CONFIG_SH" >&6; }
24122 fi
24123
24124
24125
24126     . "$TCL_CONFIG_SH"
24127 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
24128 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
24129 eval TCL_LIBS=\"$TCL_LIBS\"
24130 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
24131 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
24132
24133         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
24134     ac_save_CPPFLAGS=$CPPFLAGS
24135     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
24136     if test "${ac_cv_header_tcl_h+set}" = set; then
24137   { echo "$as_me:$LINENO: checking for tcl.h" >&5
24138 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6; }
24139 if test "${ac_cv_header_tcl_h+set}" = set; then
24140   echo $ECHO_N "(cached) $ECHO_C" >&6
24141 fi
24142 { echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
24143 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6; }
24144 else
24145   # Is the header compilable?
24146 { echo "$as_me:$LINENO: checking tcl.h usability" >&5
24147 echo $ECHO_N "checking tcl.h usability... $ECHO_C" >&6; }
24148 cat >conftest.$ac_ext <<_ACEOF
24149 /* confdefs.h.  */
24150 _ACEOF
24151 cat confdefs.h >>conftest.$ac_ext
24152 cat >>conftest.$ac_ext <<_ACEOF
24153 /* end confdefs.h.  */
24154 $ac_includes_default
24155 #include <tcl.h>
24156 _ACEOF
24157 rm -f conftest.$ac_objext
24158 if { (ac_try="$ac_compile"
24159 case "(($ac_try" in
24160   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24161   *) ac_try_echo=$ac_try;;
24162 esac
24163 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24164   (eval "$ac_compile") 2>conftest.er1
24165   ac_status=$?
24166   grep -v '^ *+' conftest.er1 >conftest.err
24167   rm -f conftest.er1
24168   cat conftest.err >&5
24169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24170   (exit $ac_status); } && {
24171          test -z "$ac_c_werror_flag" ||
24172          test ! -s conftest.err
24173        } && test -s conftest.$ac_objext; then
24174   ac_header_compiler=yes
24175 else
24176   echo "$as_me: failed program was:" >&5
24177 sed 's/^/| /' conftest.$ac_ext >&5
24178
24179         ac_header_compiler=no
24180 fi
24181
24182 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24183 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24184 echo "${ECHO_T}$ac_header_compiler" >&6; }
24185
24186 # Is the header present?
24187 { echo "$as_me:$LINENO: checking tcl.h presence" >&5
24188 echo $ECHO_N "checking tcl.h presence... $ECHO_C" >&6; }
24189 cat >conftest.$ac_ext <<_ACEOF
24190 /* confdefs.h.  */
24191 _ACEOF
24192 cat confdefs.h >>conftest.$ac_ext
24193 cat >>conftest.$ac_ext <<_ACEOF
24194 /* end confdefs.h.  */
24195 #include <tcl.h>
24196 _ACEOF
24197 if { (ac_try="$ac_cpp conftest.$ac_ext"
24198 case "(($ac_try" in
24199   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24200   *) ac_try_echo=$ac_try;;
24201 esac
24202 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24203   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
24204   ac_status=$?
24205   grep -v '^ *+' conftest.er1 >conftest.err
24206   rm -f conftest.er1
24207   cat conftest.err >&5
24208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24209   (exit $ac_status); } >/dev/null && {
24210          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24211          test ! -s conftest.err
24212        }; then
24213   ac_header_preproc=yes
24214 else
24215   echo "$as_me: failed program was:" >&5
24216 sed 's/^/| /' conftest.$ac_ext >&5
24217
24218   ac_header_preproc=no
24219 fi
24220
24221 rm -f conftest.err conftest.$ac_ext
24222 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24223 echo "${ECHO_T}$ac_header_preproc" >&6; }
24224
24225 # So?  What about this header?
24226 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24227   yes:no: )
24228     { echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
24229 echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24230     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
24231 echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
24232     ac_header_preproc=yes
24233     ;;
24234   no:yes:* )
24235     { echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
24236 echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
24237     { echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
24238 echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
24239     { echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
24240 echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
24241     { echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
24242 echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
24243     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
24244 echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
24245     { echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
24246 echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
24247     ( cat <<\_ASBOX
24248 ## ---------------------------------------- ##
24249 ## Report this to pgsql-bugs@postgresql.org ##
24250 ## ---------------------------------------- ##
24251 _ASBOX
24252      ) | sed "s/^/$as_me: WARNING:     /" >&2
24253     ;;
24254 esac
24255 { echo "$as_me:$LINENO: checking for tcl.h" >&5
24256 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6; }
24257 if test "${ac_cv_header_tcl_h+set}" = set; then
24258   echo $ECHO_N "(cached) $ECHO_C" >&6
24259 else
24260   ac_cv_header_tcl_h=$ac_header_preproc
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
24265 fi
24266 if test $ac_cv_header_tcl_h = yes; then
24267   :
24268 else
24269   { { echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
24270 echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
24271    { (exit 1); exit 1; }; }
24272 fi
24273
24274
24275     CPPFLAGS=$ac_save_CPPFLAGS
24276 fi
24277
24278 #
24279 # Check for DocBook and tools
24280 #
24281 for ac_prog in onsgmls nsgmls
24282 do
24283   # Extract the first word of "$ac_prog", so it can be a program name with args.
24284 set dummy $ac_prog; ac_word=$2
24285 { echo "$as_me:$LINENO: checking for $ac_word" >&5
24286 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
24287 if test "${ac_cv_prog_NSGMLS+set}" = set; then
24288   echo $ECHO_N "(cached) $ECHO_C" >&6
24289 else
24290   if test -n "$NSGMLS"; then
24291   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
24292 else
24293 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24294 for as_dir in $PATH
24295 do
24296   IFS=$as_save_IFS
24297   test -z "$as_dir" && as_dir=.
24298   for ac_exec_ext in '' $ac_executable_extensions; do
24299   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24300     ac_cv_prog_NSGMLS="$ac_prog"
24301     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24302     break 2
24303   fi
24304 done
24305 done
24306 IFS=$as_save_IFS
24307
24308 fi
24309 fi
24310 NSGMLS=$ac_cv_prog_NSGMLS
24311 if test -n "$NSGMLS"; then
24312   { echo "$as_me:$LINENO: result: $NSGMLS" >&5
24313 echo "${ECHO_T}$NSGMLS" >&6; }
24314 else
24315   { echo "$as_me:$LINENO: result: no" >&5
24316 echo "${ECHO_T}no" >&6; }
24317 fi
24318
24319
24320   test -n "$NSGMLS" && break
24321 done
24322
24323 for ac_prog in openjade jade
24324 do
24325   # Extract the first word of "$ac_prog", so it can be a program name with args.
24326 set dummy $ac_prog; ac_word=$2
24327 { echo "$as_me:$LINENO: checking for $ac_word" >&5
24328 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
24329 if test "${ac_cv_prog_JADE+set}" = set; then
24330   echo $ECHO_N "(cached) $ECHO_C" >&6
24331 else
24332   if test -n "$JADE"; then
24333   ac_cv_prog_JADE="$JADE" # Let the user override the test.
24334 else
24335 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24336 for as_dir in $PATH
24337 do
24338   IFS=$as_save_IFS
24339   test -z "$as_dir" && as_dir=.
24340   for ac_exec_ext in '' $ac_executable_extensions; do
24341   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24342     ac_cv_prog_JADE="$ac_prog"
24343     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24344     break 2
24345   fi
24346 done
24347 done
24348 IFS=$as_save_IFS
24349
24350 fi
24351 fi
24352 JADE=$ac_cv_prog_JADE
24353 if test -n "$JADE"; then
24354   { echo "$as_me:$LINENO: result: $JADE" >&5
24355 echo "${ECHO_T}$JADE" >&6; }
24356 else
24357   { echo "$as_me:$LINENO: result: no" >&5
24358 echo "${ECHO_T}no" >&6; }
24359 fi
24360
24361
24362   test -n "$JADE" && break
24363 done
24364
24365
24366 { echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
24367 echo $ECHO_N "checking for DocBook V4.2... $ECHO_C" >&6; }
24368 if test "${pgac_cv_check_docbook+set}" = set; then
24369   echo $ECHO_N "(cached) $ECHO_C" >&6
24370 else
24371   cat >conftest.sgml <<EOF
24372 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
24373 <book>
24374  <title>test</title>
24375  <chapter>
24376   <title>random</title>
24377    <sect1>
24378     <title>testsect</title>
24379     <para>text</para>
24380   </sect1>
24381  </chapter>
24382 </book>
24383 EOF
24384
24385 pgac_cv_check_docbook=no
24386
24387 if test -n "$NSGMLS"; then
24388   $NSGMLS -s conftest.sgml 1>&5 2>&1
24389   if test $? -eq 0; then
24390     pgac_cv_check_docbook=yes
24391   fi
24392 fi
24393 rm -f conftest.sgml
24394 fi
24395 { echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
24396 echo "${ECHO_T}$pgac_cv_check_docbook" >&6; }
24397
24398 have_docbook=$pgac_cv_check_docbook
24399
24400
24401 { echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
24402 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6; }
24403 if test "${pgac_cv_path_stylesheets+set}" = set; then
24404   echo $ECHO_N "(cached) $ECHO_C" >&6
24405 else
24406   if test -n "$DOCBOOKSTYLE"; then
24407   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
24408 else
24409   for pgac_prefix in /usr /usr/local /opt; do
24410     for pgac_infix in share lib; do
24411       for pgac_postfix in \
24412         sgml/stylesheets/nwalsh-modular \
24413         sgml/stylesheets/docbook \
24414         sgml/stylesheets/dsssl/docbook \
24415         sgml/docbook-dsssl \
24416         sgml/docbook/dsssl/modular \
24417         sgml/docbook/stylesheet/dsssl/modular \
24418         sgml/docbook/dsssl-stylesheets
24419       do
24420         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
24421         if test -r "$pgac_candidate/html/docbook.dsl" \
24422            && test -r "$pgac_candidate/print/docbook.dsl"
24423         then
24424           pgac_cv_path_stylesheets=$pgac_candidate
24425           break 3
24426         fi
24427       done
24428     done
24429   done
24430 fi
24431 fi
24432
24433 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
24434
24435 if test -n "$DOCBOOKSTYLE"; then
24436   { echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
24437 echo "${ECHO_T}$DOCBOOKSTYLE" >&6; }
24438 else
24439   { echo "$as_me:$LINENO: result: no" >&5
24440 echo "${ECHO_T}no" >&6; }
24441 fi
24442 if test -n "$DOCBOOKSTYLE"; then
24443   for ac_prog in collateindex.pl
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_path_COLLATEINDEX+set}" = set; then
24450   echo $ECHO_N "(cached) $ECHO_C" >&6
24451 else
24452   case $COLLATEINDEX in
24453   [\\/]* | ?:[\\/]*)
24454   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
24455   ;;
24456   *)
24457   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24458 for as_dir in $DOCBOOKSTYLE/bin $PATH
24459 do
24460   IFS=$as_save_IFS
24461   test -z "$as_dir" && as_dir=.
24462   for ac_exec_ext in '' $ac_executable_extensions; do
24463   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24464     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
24465     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24466     break 2
24467   fi
24468 done
24469 done
24470 IFS=$as_save_IFS
24471
24472   ;;
24473 esac
24474 fi
24475 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
24476 if test -n "$COLLATEINDEX"; then
24477   { echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
24478 echo "${ECHO_T}$COLLATEINDEX" >&6; }
24479 else
24480   { echo "$as_me:$LINENO: result: no" >&5
24481 echo "${ECHO_T}no" >&6; }
24482 fi
24483
24484
24485   test -n "$COLLATEINDEX" && break
24486 done
24487
24488 else
24489   for ac_prog in collateindex.pl
24490 do
24491   # Extract the first word of "$ac_prog", so it can be a program name with args.
24492 set dummy $ac_prog; ac_word=$2
24493 { echo "$as_me:$LINENO: checking for $ac_word" >&5
24494 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
24495 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
24496   echo $ECHO_N "(cached) $ECHO_C" >&6
24497 else
24498   case $COLLATEINDEX in
24499   [\\/]* | ?:[\\/]*)
24500   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
24501   ;;
24502   *)
24503   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24504 for as_dir in $PATH
24505 do
24506   IFS=$as_save_IFS
24507   test -z "$as_dir" && as_dir=.
24508   for ac_exec_ext in '' $ac_executable_extensions; do
24509   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24510     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
24511     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24512     break 2
24513   fi
24514 done
24515 done
24516 IFS=$as_save_IFS
24517
24518   ;;
24519 esac
24520 fi
24521 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
24522 if test -n "$COLLATEINDEX"; then
24523   { echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
24524 echo "${ECHO_T}$COLLATEINDEX" >&6; }
24525 else
24526   { echo "$as_me:$LINENO: result: no" >&5
24527 echo "${ECHO_T}no" >&6; }
24528 fi
24529
24530
24531   test -n "$COLLATEINDEX" && break
24532 done
24533
24534 fi
24535 for ac_prog in sgmlspl
24536 do
24537   # Extract the first word of "$ac_prog", so it can be a program name with args.
24538 set dummy $ac_prog; ac_word=$2
24539 { echo "$as_me:$LINENO: checking for $ac_word" >&5
24540 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
24541 if test "${ac_cv_prog_SGMLSPL+set}" = set; then
24542   echo $ECHO_N "(cached) $ECHO_C" >&6
24543 else
24544   if test -n "$SGMLSPL"; then
24545   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
24546 else
24547 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24548 for as_dir in $PATH
24549 do
24550   IFS=$as_save_IFS
24551   test -z "$as_dir" && as_dir=.
24552   for ac_exec_ext in '' $ac_executable_extensions; do
24553   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24554     ac_cv_prog_SGMLSPL="$ac_prog"
24555     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24556     break 2
24557   fi
24558 done
24559 done
24560 IFS=$as_save_IFS
24561
24562 fi
24563 fi
24564 SGMLSPL=$ac_cv_prog_SGMLSPL
24565 if test -n "$SGMLSPL"; then
24566   { echo "$as_me:$LINENO: result: $SGMLSPL" >&5
24567 echo "${ECHO_T}$SGMLSPL" >&6; }
24568 else
24569   { echo "$as_me:$LINENO: result: no" >&5
24570 echo "${ECHO_T}no" >&6; }
24571 fi
24572
24573
24574   test -n "$SGMLSPL" && break
24575 done
24576
24577
24578 # Thread testing
24579
24580 # We have to run the thread test near the end so we have all our symbols
24581 # defined.  Cross compiling throws a warning.
24582 #
24583 if test "$enable_thread_safety_force" = yes; then
24584 if test "$PORTNAME" != "win32"
24585 then
24586   { echo "$as_me:$LINENO: WARNING:
24587 *** Skipping thread test program.  --enable-thread-safety-force was used.
24588 *** Run the program in src/test/thread on the your machine and add proper
24589 *** locking function calls to your applications to guarantee thread safety.
24590 " >&5
24591 echo "$as_me: WARNING:
24592 *** Skipping thread test program.  --enable-thread-safety-force was used.
24593 *** Run the program in src/test/thread on the your machine and add proper
24594 *** locking function calls to your applications to guarantee thread safety.
24595 " >&2;}
24596 else
24597 { echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
24598 echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
24599 fi
24600 elif test "$enable_thread_safety" = yes; then
24601 if test "$PORTNAME" != "win32"
24602 then
24603 { echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
24604 echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6; }
24605
24606 _CFLAGS="$CFLAGS"
24607 _LIBS="$LIBS"
24608 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
24609 LIBS="$LIBS $PTHREAD_LIBS"
24610 if test "$cross_compiling" = yes; then
24611   { echo "$as_me:$LINENO: result: maybe" >&5
24612 echo "${ECHO_T}maybe" >&6; }
24613   { echo "$as_me:$LINENO: WARNING:
24614 *** Skipping thread test program because of cross-compile build.
24615 *** Run the program in src/test/thread on the target machine.
24616 " >&5
24617 echo "$as_me: WARNING:
24618 *** Skipping thread test program because of cross-compile build.
24619 *** Run the program in src/test/thread on the target machine.
24620 " >&2;}
24621 else
24622   cat >conftest.$ac_ext <<_ACEOF
24623 /* confdefs.h.  */
24624 _ACEOF
24625 cat confdefs.h >>conftest.$ac_ext
24626 cat >>conftest.$ac_ext <<_ACEOF
24627 /* end confdefs.h.  */
24628 #include "$srcdir/src/test/thread/thread_test.c"
24629 _ACEOF
24630 rm -f conftest$ac_exeext
24631 if { (ac_try="$ac_link"
24632 case "(($ac_try" in
24633   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24634   *) ac_try_echo=$ac_try;;
24635 esac
24636 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24637   (eval "$ac_link") 2>&5
24638   ac_status=$?
24639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24640   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24641   { (case "(($ac_try" in
24642   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24643   *) ac_try_echo=$ac_try;;
24644 esac
24645 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24646   (eval "$ac_try") 2>&5
24647   ac_status=$?
24648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24649   (exit $ac_status); }; }; then
24650   { echo "$as_me:$LINENO: result: yes" >&5
24651 echo "${ECHO_T}yes" >&6; }
24652 else
24653   echo "$as_me: program exited with status $ac_status" >&5
24654 echo "$as_me: failed program was:" >&5
24655 sed 's/^/| /' conftest.$ac_ext >&5
24656
24657 ( exit $ac_status )
24658 { echo "$as_me:$LINENO: result: no" >&5
24659 echo "${ECHO_T}no" >&6; }
24660   { { echo "$as_me:$LINENO: error: thread test program failed
24661 This platform is not thread-safe.  Check the file 'config.log'for the
24662 exact reason.
24663
24664 You can use the configure option --enable-thread-safety-force to force
24665 threads to be enabled.  But you must then run the program in
24666 src/test/thread and add locking function calls to your applications to
24667 guarantee thread safety." >&5
24668 echo "$as_me: error: thread test program failed
24669 This platform is not thread-safe.  Check the file 'config.log'for the
24670 exact reason.
24671
24672 You can use the configure option --enable-thread-safety-force to force
24673 threads to be enabled.  But you must then run the program in
24674 src/test/thread and add locking function calls to your applications to
24675 guarantee thread safety." >&2;}
24676    { (exit 1); exit 1; }; }
24677 fi
24678 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24679 fi
24680
24681
24682 CFLAGS="$_CFLAGS"
24683 LIBS="$_LIBS"
24684 else
24685 { echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
24686 echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
24687 fi
24688 fi
24689
24690 # prepare build tree if outside source tree
24691 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
24692 # Note 2: /bin/pwd might be better than shell's built-in at getting
24693 #         a symlink-free name.
24694 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
24695   vpath_build=no
24696 else
24697   vpath_build=yes
24698   if test "$no_create" != yes; then
24699     echo $ECHO_N "preparing build tree... $ECHO_C" >&6
24700     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
24701     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
24702       || { { echo "$as_me:$LINENO: error: failed" >&5
24703 echo "$as_me: error: failed" >&2;}
24704    { (exit 1); exit 1; }; }
24705     { echo "$as_me:$LINENO: result: done" >&5
24706 echo "${ECHO_T}done" >&6; }
24707   fi
24708 fi
24709
24710
24711
24712 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
24713
24714
24715 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}"
24716
24717
24718 if test "$PORTNAME" = "win32"; then
24719 ac_config_commands="$ac_config_commands check_win32_symlinks"
24720
24721 fi
24722
24723 ac_config_headers="$ac_config_headers src/include/pg_config.h"
24724
24725
24726 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
24727
24728
24729 cat >confcache <<\_ACEOF
24730 # This file is a shell script that caches the results of configure
24731 # tests run on this system so they can be shared between configure
24732 # scripts and configure runs, see configure's option --config-cache.
24733 # It is not useful on other systems.  If it contains results you don't
24734 # want to keep, you may remove or edit it.
24735 #
24736 # config.status only pays attention to the cache file if you give it
24737 # the --recheck option to rerun configure.
24738 #
24739 # `ac_cv_env_foo' variables (set or unset) will be overridden when
24740 # loading this file, other *unset* `ac_cv_foo' will be assigned the
24741 # following values.
24742
24743 _ACEOF
24744
24745 # The following way of writing the cache mishandles newlines in values,
24746 # but we know of no workaround that is simple, portable, and efficient.
24747 # So, we kill variables containing newlines.
24748 # Ultrix sh set writes to stderr and can't be redirected directly,
24749 # and sets the high bit in the cache file unless we assign to the vars.
24750 (
24751   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24752     eval ac_val=\$$ac_var
24753     case $ac_val in #(
24754     *${as_nl}*)
24755       case $ac_var in #(
24756       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24757 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24758       esac
24759       case $ac_var in #(
24760       _ | IFS | as_nl) ;; #(
24761       *) $as_unset $ac_var ;;
24762       esac ;;
24763     esac
24764   done
24765
24766   (set) 2>&1 |
24767     case $as_nl`(ac_space=' '; set) 2>&1` in #(
24768     *${as_nl}ac_space=\ *)
24769       # `set' does not quote correctly, so add quotes (double-quote
24770       # substitution turns \\\\ into \\, and sed turns \\ into \).
24771       sed -n \
24772         "s/'/'\\\\''/g;
24773           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24774       ;; #(
24775     *)
24776       # `set' quotes correctly as required by POSIX, so do not add quotes.
24777       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
24778       ;;
24779     esac |
24780     sort
24781 ) |
24782   sed '
24783      /^ac_cv_env_/b end
24784      t clear
24785      :clear
24786      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24787      t end
24788      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24789      :end' >>confcache
24790 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24791   if test -w "$cache_file"; then
24792     test "x$cache_file" != "x/dev/null" &&
24793       { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24794 echo "$as_me: updating cache $cache_file" >&6;}
24795     cat confcache >$cache_file
24796   else
24797     { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24798 echo "$as_me: not updating unwritable cache $cache_file" >&6;}
24799   fi
24800 fi
24801 rm -f confcache
24802
24803 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24804 # Let make expand exec_prefix.
24805 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24806
24807 DEFS=-DHAVE_CONFIG_H
24808
24809 ac_libobjs=
24810 ac_ltlibobjs=
24811 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24812   # 1. Remove the extension, and $U if already installed.
24813   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24814   ac_i=`echo "$ac_i" | sed "$ac_script"`
24815   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
24816   #    will be set to the directory where LIBOBJS objects are built.
24817   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24818   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
24819 done
24820 LIBOBJS=$ac_libobjs
24821
24822 LTLIBOBJS=$ac_ltlibobjs
24823
24824
24825
24826 : ${CONFIG_STATUS=./config.status}
24827 ac_clean_files_save=$ac_clean_files
24828 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24829 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
24830 echo "$as_me: creating $CONFIG_STATUS" >&6;}
24831 cat >$CONFIG_STATUS <<_ACEOF
24832 #! $SHELL
24833 # Generated by $as_me.
24834 # Run this file to recreate the current configuration.
24835 # Compiler output produced by configure, useful for debugging
24836 # configure, is in config.log if it exists.
24837
24838 debug=false
24839 ac_cs_recheck=false
24840 ac_cs_silent=false
24841 SHELL=\${CONFIG_SHELL-$SHELL}
24842 _ACEOF
24843
24844 cat >>$CONFIG_STATUS <<\_ACEOF
24845 ## --------------------- ##
24846 ## M4sh Initialization.  ##
24847 ## --------------------- ##
24848
24849 # Be more Bourne compatible
24850 DUALCASE=1; export DUALCASE # for MKS sh
24851 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24852   emulate sh
24853   NULLCMD=:
24854   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24855   # is contrary to our usage.  Disable this feature.
24856   alias -g '${1+"$@"}'='"$@"'
24857   setopt NO_GLOB_SUBST
24858 else
24859   case `(set -o) 2>/dev/null` in
24860   *posix*) set -o posix ;;
24861 esac
24862
24863 fi
24864
24865
24866
24867
24868 # PATH needs CR
24869 # Avoid depending upon Character Ranges.
24870 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24871 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24872 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24873 as_cr_digits='0123456789'
24874 as_cr_alnum=$as_cr_Letters$as_cr_digits
24875
24876 # The user is always right.
24877 if test "${PATH_SEPARATOR+set}" != set; then
24878   echo "#! /bin/sh" >conf$$.sh
24879   echo  "exit 0"   >>conf$$.sh
24880   chmod +x conf$$.sh
24881   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
24882     PATH_SEPARATOR=';'
24883   else
24884     PATH_SEPARATOR=:
24885   fi
24886   rm -f conf$$.sh
24887 fi
24888
24889 # Support unset when possible.
24890 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
24891   as_unset=unset
24892 else
24893   as_unset=false
24894 fi
24895
24896
24897 # IFS
24898 # We need space, tab and new line, in precisely that order.  Quoting is
24899 # there to prevent editors from complaining about space-tab.
24900 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
24901 # splitting by setting IFS to empty value.)
24902 as_nl='
24903 '
24904 IFS=" ""        $as_nl"
24905
24906 # Find who we are.  Look in the path if we contain no directory separator.
24907 case $0 in
24908   *[\\/]* ) as_myself=$0 ;;
24909   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24910 for as_dir in $PATH
24911 do
24912   IFS=$as_save_IFS
24913   test -z "$as_dir" && as_dir=.
24914   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24915 done
24916 IFS=$as_save_IFS
24917
24918      ;;
24919 esac
24920 # We did not find ourselves, most probably we were run as `sh COMMAND'
24921 # in which case we are not to be found in the path.
24922 if test "x$as_myself" = x; then
24923   as_myself=$0
24924 fi
24925 if test ! -f "$as_myself"; then
24926   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24927   { (exit 1); exit 1; }
24928 fi
24929
24930 # Work around bugs in pre-3.0 UWIN ksh.
24931 for as_var in ENV MAIL MAILPATH
24932 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24933 done
24934 PS1='$ '
24935 PS2='> '
24936 PS4='+ '
24937
24938 # NLS nuisances.
24939 for as_var in \
24940   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24941   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24942   LC_TELEPHONE LC_TIME
24943 do
24944   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
24945     eval $as_var=C; export $as_var
24946   else
24947     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24948   fi
24949 done
24950
24951 # Required to use basename.
24952 if expr a : '\(a\)' >/dev/null 2>&1 &&
24953    test "X`expr 00001 : '.*\(...\)'`" = X001; then
24954   as_expr=expr
24955 else
24956   as_expr=false
24957 fi
24958
24959 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24960   as_basename=basename
24961 else
24962   as_basename=false
24963 fi
24964
24965
24966 # Name of the executable.
24967 as_me=`$as_basename -- "$0" ||
24968 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24969          X"$0" : 'X\(//\)$' \| \
24970          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24971 echo X/"$0" |
24972     sed '/^.*\/\([^/][^/]*\)\/*$/{
24973             s//\1/
24974             q
24975           }
24976           /^X\/\(\/\/\)$/{
24977             s//\1/
24978             q
24979           }
24980           /^X\/\(\/\).*/{
24981             s//\1/
24982             q
24983           }
24984           s/.*/./; q'`
24985
24986 # CDPATH.
24987 $as_unset CDPATH
24988
24989
24990
24991   as_lineno_1=$LINENO
24992   as_lineno_2=$LINENO
24993   test "x$as_lineno_1" != "x$as_lineno_2" &&
24994   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
24995
24996   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24997   # uniformly replaced by the line number.  The first 'sed' inserts a
24998   # line-number line after each line using $LINENO; the second 'sed'
24999   # does the real work.  The second script uses 'N' to pair each
25000   # line-number line with the line containing $LINENO, and appends
25001   # trailing '-' during substitution so that $LINENO is not a special
25002   # case at line end.
25003   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
25004   # scripts with optimization help from Paolo Bonzini.  Blame Lee
25005   # E. McMahon (1931-1989) for sed's syntax.  :-)
25006   sed -n '
25007     p
25008     /[$]LINENO/=
25009   ' <$as_myself |
25010     sed '
25011       s/[$]LINENO.*/&-/
25012       t lineno
25013       b
25014       :lineno
25015       N
25016       :loop
25017       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
25018       t loop
25019       s/-\n.*//
25020     ' >$as_me.lineno &&
25021   chmod +x "$as_me.lineno" ||
25022     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
25023    { (exit 1); exit 1; }; }
25024
25025   # Don't try to exec as it changes $[0], causing all sort of problems
25026   # (the dirname of $[0] is not the place where we might find the
25027   # original and so on.  Autoconf is especially sensitive to this).
25028   . "./$as_me.lineno"
25029   # Exit status is that of the last command.
25030   exit
25031 }
25032
25033
25034 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25035   as_dirname=dirname
25036 else
25037   as_dirname=false
25038 fi
25039
25040 ECHO_C= ECHO_N= ECHO_T=
25041 case `echo -n x` in
25042 -n*)
25043   case `echo 'x\c'` in
25044   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
25045   *)   ECHO_C='\c';;
25046   esac;;
25047 *)
25048   ECHO_N='-n';;
25049 esac
25050
25051 if expr a : '\(a\)' >/dev/null 2>&1 &&
25052    test "X`expr 00001 : '.*\(...\)'`" = X001; then
25053   as_expr=expr
25054 else
25055   as_expr=false
25056 fi
25057
25058 rm -f conf$$ conf$$.exe conf$$.file
25059 if test -d conf$$.dir; then
25060   rm -f conf$$.dir/conf$$.file
25061 else
25062   rm -f conf$$.dir
25063   mkdir conf$$.dir
25064 fi
25065 echo >conf$$.file
25066 if ln -s conf$$.file conf$$ 2>/dev/null; then
25067   as_ln_s='ln -s'
25068   # ... but there are two gotchas:
25069   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25070   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25071   # In both cases, we have to default to `cp -p'.
25072   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
25073     as_ln_s='cp -p'
25074 elif ln conf$$.file conf$$ 2>/dev/null; then
25075   as_ln_s=ln
25076 else
25077   as_ln_s='cp -p'
25078 fi
25079 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25080 rmdir conf$$.dir 2>/dev/null
25081
25082 if mkdir -p . 2>/dev/null; then
25083   as_mkdir_p=:
25084 else
25085   test -d ./-p && rmdir ./-p
25086   as_mkdir_p=false
25087 fi
25088
25089 if test -x / >/dev/null 2>&1; then
25090   as_test_x='test -x'
25091 else
25092   if ls -dL / >/dev/null 2>&1; then
25093     as_ls_L_option=L
25094   else
25095     as_ls_L_option=
25096   fi
25097   as_test_x='
25098     eval sh -c '\''
25099       if test -d "$1"; then
25100         test -d "$1/.";
25101       else
25102         case $1 in
25103         -*)set "./$1";;
25104         esac;
25105         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
25106         ???[sx]*):;;*)false;;esac;fi
25107     '\'' sh
25108   '
25109 fi
25110 as_executable_p=$as_test_x
25111
25112 # Sed expression to map a string onto a valid CPP name.
25113 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
25114
25115 # Sed expression to map a string onto a valid variable name.
25116 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
25117
25118
25119 exec 6>&1
25120
25121 # Save the log message, to keep $[0] and so on meaningful, and to
25122 # report actual input values of CONFIG_FILES etc. instead of their
25123 # values after options handling.
25124 ac_log="
25125 This file was extended by PostgreSQL $as_me 8.4devel, which was
25126 generated by GNU Autoconf 2.61.  Invocation command line was
25127
25128   CONFIG_FILES    = $CONFIG_FILES
25129   CONFIG_HEADERS  = $CONFIG_HEADERS
25130   CONFIG_LINKS    = $CONFIG_LINKS
25131   CONFIG_COMMANDS = $CONFIG_COMMANDS
25132   $ $0 $@
25133
25134 on `(hostname || uname -n) 2>/dev/null | sed 1q`
25135 "
25136
25137 _ACEOF
25138
25139 cat >>$CONFIG_STATUS <<_ACEOF
25140 # Files that config.status was made for.
25141 config_files="$ac_config_files"
25142 config_headers="$ac_config_headers"
25143 config_links="$ac_config_links"
25144 config_commands="$ac_config_commands"
25145
25146 _ACEOF
25147
25148 cat >>$CONFIG_STATUS <<\_ACEOF
25149 ac_cs_usage="\
25150 \`$as_me' instantiates files from templates according to the
25151 current configuration.
25152
25153 Usage: $0 [OPTIONS] [FILE]...
25154
25155   -h, --help       print this help, then exit
25156   -V, --version    print version number and configuration settings, then exit
25157   -q, --quiet      do not print progress messages
25158   -d, --debug      don't remove temporary files
25159       --recheck    update $as_me by reconfiguring in the same conditions
25160   --file=FILE[:TEMPLATE]
25161                    instantiate the configuration file FILE
25162   --header=FILE[:TEMPLATE]
25163                    instantiate the configuration header FILE
25164
25165 Configuration files:
25166 $config_files
25167
25168 Configuration headers:
25169 $config_headers
25170
25171 Configuration links:
25172 $config_links
25173
25174 Configuration commands:
25175 $config_commands
25176
25177 Report bugs to <bug-autoconf@gnu.org>."
25178
25179 _ACEOF
25180 cat >>$CONFIG_STATUS <<_ACEOF
25181 ac_cs_version="\\
25182 PostgreSQL config.status 8.4devel
25183 configured by $0, generated by GNU Autoconf 2.61,
25184   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
25185
25186 Copyright (C) 2006 Free Software Foundation, Inc.
25187 This config.status script is free software; the Free Software Foundation
25188 gives unlimited permission to copy, distribute and modify it."
25189
25190 ac_pwd='$ac_pwd'
25191 srcdir='$srcdir'
25192 _ACEOF
25193
25194 cat >>$CONFIG_STATUS <<\_ACEOF
25195 # If no file are specified by the user, then we need to provide default
25196 # value.  By we need to know if files were specified by the user.
25197 ac_need_defaults=:
25198 while test $# != 0
25199 do
25200   case $1 in
25201   --*=*)
25202     ac_option=`expr "X$1" : 'X\([^=]*\)='`
25203     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
25204     ac_shift=:
25205     ;;
25206   *)
25207     ac_option=$1
25208     ac_optarg=$2
25209     ac_shift=shift
25210     ;;
25211   esac
25212
25213   case $ac_option in
25214   # Handling of the options.
25215   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25216     ac_cs_recheck=: ;;
25217   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25218     echo "$ac_cs_version"; exit ;;
25219   --debug | --debu | --deb | --de | --d | -d )
25220     debug=: ;;
25221   --file | --fil | --fi | --f )
25222     $ac_shift
25223     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
25224     ac_need_defaults=false;;
25225   --header | --heade | --head | --hea )
25226     $ac_shift
25227     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
25228     ac_need_defaults=false;;
25229   --he | --h)
25230     # Conflict between --help and --header
25231     { echo "$as_me: error: ambiguous option: $1
25232 Try \`$0 --help' for more information." >&2
25233    { (exit 1); exit 1; }; };;
25234   --help | --hel | -h )
25235     echo "$ac_cs_usage"; exit ;;
25236   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25237   | -silent | --silent | --silen | --sile | --sil | --si | --s)
25238     ac_cs_silent=: ;;
25239
25240   # This is an error.
25241   -*) { echo "$as_me: error: unrecognized option: $1
25242 Try \`$0 --help' for more information." >&2
25243    { (exit 1); exit 1; }; } ;;
25244
25245   *) ac_config_targets="$ac_config_targets $1"
25246      ac_need_defaults=false ;;
25247
25248   esac
25249   shift
25250 done
25251
25252 ac_configure_extra_args=
25253
25254 if $ac_cs_silent; then
25255   exec 6>/dev/null
25256   ac_configure_extra_args="$ac_configure_extra_args --silent"
25257 fi
25258
25259 _ACEOF
25260 cat >>$CONFIG_STATUS <<_ACEOF
25261 if \$ac_cs_recheck; then
25262   echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
25263   CONFIG_SHELL=$SHELL
25264   export CONFIG_SHELL
25265   exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
25266 fi
25267
25268 _ACEOF
25269 cat >>$CONFIG_STATUS <<\_ACEOF
25270 exec 5>>config.log
25271 {
25272   echo
25273   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25274 ## Running $as_me. ##
25275 _ASBOX
25276   echo "$ac_log"
25277 } >&5
25278
25279 _ACEOF
25280 cat >>$CONFIG_STATUS <<_ACEOF
25281 _ACEOF
25282
25283 cat >>$CONFIG_STATUS <<\_ACEOF
25284
25285 # Handling of arguments.
25286 for ac_config_target in $ac_config_targets
25287 do
25288   case $ac_config_target in
25289     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
25290     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
25291     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
25292     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
25293     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
25294     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
25295     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
25296     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
25297     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
25298     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
25299     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
25300     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
25301
25302   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
25303 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25304    { (exit 1); exit 1; }; };;
25305   esac
25306 done
25307
25308
25309 # If the user did not use the arguments to specify the items to instantiate,
25310 # then the envvar interface is used.  Set only those that are not.
25311 # We use the long form for the default assignment because of an extremely
25312 # bizarre bug on SunOS 4.1.3.
25313 if $ac_need_defaults; then
25314   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25315   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25316   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
25317   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25318 fi
25319
25320 # Have a temporary directory for convenience.  Make it in the build tree
25321 # simply because there is no reason against having it here, and in addition,
25322 # creating and moving files from /tmp can sometimes cause problems.
25323 # Hook for its removal unless debugging.
25324 # Note that there is a small window in which the directory will not be cleaned:
25325 # after its creation but before its name has been assigned to `$tmp'.
25326 $debug ||
25327 {
25328   tmp=
25329   trap 'exit_status=$?
25330   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25331 ' 0
25332   trap '{ (exit 1); exit 1; }' 1 2 13 15
25333 }
25334 # Create a (secure) tmp directory for tmp files.
25335
25336 {
25337   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
25338   test -n "$tmp" && test -d "$tmp"
25339 }  ||
25340 {
25341   tmp=./conf$$-$RANDOM
25342   (umask 077 && mkdir "$tmp")
25343 } ||
25344 {
25345    echo "$me: cannot create a temporary directory in ." >&2
25346    { (exit 1); exit 1; }
25347 }
25348
25349 #
25350 # Set up the sed scripts for CONFIG_FILES section.
25351 #
25352
25353 # No need to generate the scripts if there are no CONFIG_FILES.
25354 # This happens for instance when ./config.status config.h
25355 if test -n "$CONFIG_FILES"; then
25356
25357 _ACEOF
25358
25359
25360
25361 ac_delim='%!_!# '
25362 for ac_last_try in false false false false false :; do
25363   cat >conf$$subs.sed <<_ACEOF
25364 SHELL!$SHELL$ac_delim
25365 PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
25366 PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25367 PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25368 PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25369 PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25370 PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25371 exec_prefix!$exec_prefix$ac_delim
25372 prefix!$prefix$ac_delim
25373 program_transform_name!$program_transform_name$ac_delim
25374 bindir!$bindir$ac_delim
25375 sbindir!$sbindir$ac_delim
25376 libexecdir!$libexecdir$ac_delim
25377 datarootdir!$datarootdir$ac_delim
25378 datadir!$datadir$ac_delim
25379 sysconfdir!$sysconfdir$ac_delim
25380 sharedstatedir!$sharedstatedir$ac_delim
25381 localstatedir!$localstatedir$ac_delim
25382 includedir!$includedir$ac_delim
25383 oldincludedir!$oldincludedir$ac_delim
25384 docdir!$docdir$ac_delim
25385 infodir!$infodir$ac_delim
25386 htmldir!$htmldir$ac_delim
25387 dvidir!$dvidir$ac_delim
25388 pdfdir!$pdfdir$ac_delim
25389 psdir!$psdir$ac_delim
25390 libdir!$libdir$ac_delim
25391 localedir!$localedir$ac_delim
25392 mandir!$mandir$ac_delim
25393 DEFS!$DEFS$ac_delim
25394 ECHO_C!$ECHO_C$ac_delim
25395 ECHO_N!$ECHO_N$ac_delim
25396 ECHO_T!$ECHO_T$ac_delim
25397 LIBS!$LIBS$ac_delim
25398 build_alias!$build_alias$ac_delim
25399 host_alias!$host_alias$ac_delim
25400 target_alias!$target_alias$ac_delim
25401 configure_args!$configure_args$ac_delim
25402 build!$build$ac_delim
25403 build_cpu!$build_cpu$ac_delim
25404 build_vendor!$build_vendor$ac_delim
25405 build_os!$build_os$ac_delim
25406 host!$host$ac_delim
25407 host_cpu!$host_cpu$ac_delim
25408 host_vendor!$host_vendor$ac_delim
25409 host_os!$host_os$ac_delim
25410 PORTNAME!$PORTNAME$ac_delim
25411 enable_nls!$enable_nls$ac_delim
25412 WANTED_LANGUAGES!$WANTED_LANGUAGES$ac_delim
25413 default_port!$default_port$ac_delim
25414 enable_shared!$enable_shared$ac_delim
25415 enable_rpath!$enable_rpath$ac_delim
25416 enable_debug!$enable_debug$ac_delim
25417 enable_profiling!$enable_profiling$ac_delim
25418 DTRACE!$DTRACE$ac_delim
25419 DTRACEFLAGS!$DTRACEFLAGS$ac_delim
25420 enable_dtrace!$enable_dtrace$ac_delim
25421 CC!$CC$ac_delim
25422 CFLAGS!$CFLAGS$ac_delim
25423 LDFLAGS!$LDFLAGS$ac_delim
25424 CPPFLAGS!$CPPFLAGS$ac_delim
25425 ac_ct_CC!$ac_ct_CC$ac_delim
25426 EXEEXT!$EXEEXT$ac_delim
25427 OBJEXT!$OBJEXT$ac_delim
25428 CPP!$CPP$ac_delim
25429 GCC!$GCC$ac_delim
25430 TAS!$TAS$ac_delim
25431 autodepend!$autodepend$ac_delim
25432 INCLUDES!$INCLUDES$ac_delim
25433 enable_thread_safety!$enable_thread_safety$ac_delim
25434 with_tcl!$with_tcl$ac_delim
25435 with_perl!$with_perl$ac_delim
25436 with_python!$with_python$ac_delim
25437 with_gssapi!$with_gssapi$ac_delim
25438 with_krb5!$with_krb5$ac_delim
25439 krb_srvtab!$krb_srvtab$ac_delim
25440 with_pam!$with_pam$ac_delim
25441 with_ldap!$with_ldap$ac_delim
25442 with_bonjour!$with_bonjour$ac_delim
25443 with_openssl!$with_openssl$ac_delim
25444 with_ossp_uuid!$with_ossp_uuid$ac_delim
25445 XML2_CONFIG!$XML2_CONFIG$ac_delim
25446 with_libxml!$with_libxml$ac_delim
25447 with_libxslt!$with_libxslt$ac_delim
25448 with_system_tzdata!$with_system_tzdata$ac_delim
25449 with_zlib!$with_zlib$ac_delim
25450 GREP!$GREP$ac_delim
25451 EGREP!$EGREP$ac_delim
25452 ELF_SYS!$ELF_SYS$ac_delim
25453 LDFLAGS_SL!$LDFLAGS_SL$ac_delim
25454 LD!$LD$ac_delim
25455 with_gnu_ld!$with_gnu_ld$ac_delim
25456 ld_R_works!$ld_R_works$ac_delim
25457 RANLIB!$RANLIB$ac_delim
25458 STRIP!$STRIP$ac_delim
25459 STRIP_STATIC_LIB!$STRIP_STATIC_LIB$ac_delim
25460 STRIP_SHARED_LIB!$STRIP_SHARED_LIB$ac_delim
25461 _ACEOF
25462
25463   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
25464     break
25465   elif $ac_last_try; then
25466     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25467 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25468    { (exit 1); exit 1; }; }
25469   else
25470     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25471   fi
25472 done
25473
25474 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25475 if test -n "$ac_eof"; then
25476   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25477   ac_eof=`expr $ac_eof + 1`
25478 fi
25479
25480 cat >>$CONFIG_STATUS <<_ACEOF
25481 cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
25482 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25483 _ACEOF
25484 sed '
25485 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25486 s/^/s,@/; s/!/@,|#_!!_#|/
25487 :n
25488 t n
25489 s/'"$ac_delim"'$/,g/; t
25490 s/$/\\/; p
25491 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25492 ' >>$CONFIG_STATUS <conf$$subs.sed
25493 rm -f conf$$subs.sed
25494 cat >>$CONFIG_STATUS <<_ACEOF
25495 CEOF$ac_eof
25496 _ACEOF
25497
25498
25499 ac_delim='%!_!# '
25500 for ac_last_try in false false false false false :; do
25501   cat >conf$$subs.sed <<_ACEOF
25502 TAR!$TAR$ac_delim
25503 LN_S!$LN_S$ac_delim
25504 AWK!$AWK$ac_delim
25505 YACC!$YACC$ac_delim
25506 YFLAGS!$YFLAGS$ac_delim
25507 FLEX!$FLEX$ac_delim
25508 FLEXFLAGS!$FLEXFLAGS$ac_delim
25509 PERL!$PERL$ac_delim
25510 perl_archlibexp!$perl_archlibexp$ac_delim
25511 perl_privlibexp!$perl_privlibexp$ac_delim
25512 perl_useshrplib!$perl_useshrplib$ac_delim
25513 perl_embed_ldflags!$perl_embed_ldflags$ac_delim
25514 PYTHON!$PYTHON$ac_delim
25515 python_version!$python_version$ac_delim
25516 python_configdir!$python_configdir$ac_delim
25517 python_includespec!$python_includespec$ac_delim
25518 python_libdir!$python_libdir$ac_delim
25519 python_libspec!$python_libspec$ac_delim
25520 python_additional_libs!$python_additional_libs$ac_delim
25521 OSSP_UUID_LIBS!$OSSP_UUID_LIBS$ac_delim
25522 HAVE_IPV6!$HAVE_IPV6$ac_delim
25523 LIBOBJS!$LIBOBJS$ac_delim
25524 acx_pthread_config!$acx_pthread_config$ac_delim
25525 PTHREAD_CC!$PTHREAD_CC$ac_delim
25526 PTHREAD_LIBS!$PTHREAD_LIBS$ac_delim
25527 PTHREAD_CFLAGS!$PTHREAD_CFLAGS$ac_delim
25528 LDAP_LIBS_FE!$LDAP_LIBS_FE$ac_delim
25529 LDAP_LIBS_BE!$LDAP_LIBS_BE$ac_delim
25530 HAVE_POSIX_SIGNALS!$HAVE_POSIX_SIGNALS$ac_delim
25531 MSGFMT!$MSGFMT$ac_delim
25532 MSGMERGE!$MSGMERGE$ac_delim
25533 XGETTEXT!$XGETTEXT$ac_delim
25534 TCLSH!$TCLSH$ac_delim
25535 TCL_CONFIG_SH!$TCL_CONFIG_SH$ac_delim
25536 TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim
25537 TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim
25538 TCL_LIBS!$TCL_LIBS$ac_delim
25539 TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim
25540 TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim
25541 TCL_SHLIB_LD_LIBS!$TCL_SHLIB_LD_LIBS$ac_delim
25542 NSGMLS!$NSGMLS$ac_delim
25543 JADE!$JADE$ac_delim
25544 have_docbook!$have_docbook$ac_delim
25545 DOCBOOKSTYLE!$DOCBOOKSTYLE$ac_delim
25546 COLLATEINDEX!$COLLATEINDEX$ac_delim
25547 SGMLSPL!$SGMLSPL$ac_delim
25548 vpath_build!$vpath_build$ac_delim
25549 LTLIBOBJS!$LTLIBOBJS$ac_delim
25550 _ACEOF
25551
25552   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 48; then
25553     break
25554   elif $ac_last_try; then
25555     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25556 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25557    { (exit 1); exit 1; }; }
25558   else
25559     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25560   fi
25561 done
25562
25563 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25564 if test -n "$ac_eof"; then
25565   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25566   ac_eof=`expr $ac_eof + 1`
25567 fi
25568
25569 cat >>$CONFIG_STATUS <<_ACEOF
25570 cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
25571 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
25572 _ACEOF
25573 sed '
25574 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25575 s/^/s,@/; s/!/@,|#_!!_#|/
25576 :n
25577 t n
25578 s/'"$ac_delim"'$/,g/; t
25579 s/$/\\/; p
25580 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25581 ' >>$CONFIG_STATUS <conf$$subs.sed
25582 rm -f conf$$subs.sed
25583 cat >>$CONFIG_STATUS <<_ACEOF
25584 :end
25585 s/|#_!!_#|//g
25586 CEOF$ac_eof
25587 _ACEOF
25588
25589
25590 # VPATH may cause trouble with some makes, so we remove $(srcdir),
25591 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25592 # trailing colons and then remove the whole line if VPATH becomes empty
25593 # (actually we leave an empty line to preserve line numbers).
25594 if test "x$srcdir" = x.; then
25595   ac_vpsub='/^[  ]*VPATH[        ]*=/{
25596 s/:*\$(srcdir):*/:/
25597 s/:*\${srcdir}:*/:/
25598 s/:*@srcdir@:*/:/
25599 s/^\([^=]*=[     ]*\):*/\1/
25600 s/:*$//
25601 s/^[^=]*=[       ]*$//
25602 }'
25603 fi
25604
25605 cat >>$CONFIG_STATUS <<\_ACEOF
25606 fi # test -n "$CONFIG_FILES"
25607
25608
25609 for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS
25610 do
25611   case $ac_tag in
25612   :[FHLC]) ac_mode=$ac_tag; continue;;
25613   esac
25614   case $ac_mode$ac_tag in
25615   :[FHL]*:*);;
25616   :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
25617 echo "$as_me: error: Invalid tag $ac_tag." >&2;}
25618    { (exit 1); exit 1; }; };;
25619   :[FH]-) ac_tag=-:-;;
25620   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25621   esac
25622   ac_save_IFS=$IFS
25623   IFS=:
25624   set x $ac_tag
25625   IFS=$ac_save_IFS
25626   shift
25627   ac_file=$1
25628   shift
25629
25630   case $ac_mode in
25631   :L) ac_source=$1;;
25632   :[FH])
25633     ac_file_inputs=
25634     for ac_f
25635     do
25636       case $ac_f in
25637       -) ac_f="$tmp/stdin";;
25638       *) # Look for the file first in the build tree, then in the source tree
25639          # (if the path is not absolute).  The absolute path cannot be DOS-style,
25640          # because $ac_f cannot contain `:'.
25641          test -f "$ac_f" ||
25642            case $ac_f in
25643            [\\/$]*) false;;
25644            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25645            esac ||
25646            { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
25647 echo "$as_me: error: cannot find input file: $ac_f" >&2;}
25648    { (exit 1); exit 1; }; };;
25649       esac
25650       ac_file_inputs="$ac_file_inputs $ac_f"
25651     done
25652
25653     # Let's still pretend it is `configure' which instantiates (i.e., don't
25654     # use $as_me), people would be surprised to read:
25655     #    /* config.h.  Generated by config.status.  */
25656     configure_input="Generated from "`IFS=:
25657           echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
25658     if test x"$ac_file" != x-; then
25659       configure_input="$ac_file.  $configure_input"
25660       { echo "$as_me:$LINENO: creating $ac_file" >&5
25661 echo "$as_me: creating $ac_file" >&6;}
25662     fi
25663
25664     case $ac_tag in
25665     *:-:* | *:-) cat >"$tmp/stdin";;
25666     esac
25667     ;;
25668   esac
25669
25670   ac_dir=`$as_dirname -- "$ac_file" ||
25671 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25672          X"$ac_file" : 'X\(//\)[^/]' \| \
25673          X"$ac_file" : 'X\(//\)$' \| \
25674          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
25675 echo X"$ac_file" |
25676     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25677             s//\1/
25678             q
25679           }
25680           /^X\(\/\/\)[^/].*/{
25681             s//\1/
25682             q
25683           }
25684           /^X\(\/\/\)$/{
25685             s//\1/
25686             q
25687           }
25688           /^X\(\/\).*/{
25689             s//\1/
25690             q
25691           }
25692           s/.*/./; q'`
25693   { as_dir="$ac_dir"
25694   case $as_dir in #(
25695   -*) as_dir=./$as_dir;;
25696   esac
25697   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
25698     as_dirs=
25699     while :; do
25700       case $as_dir in #(
25701       *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
25702       *) as_qdir=$as_dir;;
25703       esac
25704       as_dirs="'$as_qdir' $as_dirs"
25705       as_dir=`$as_dirname -- "$as_dir" ||
25706 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25707          X"$as_dir" : 'X\(//\)[^/]' \| \
25708          X"$as_dir" : 'X\(//\)$' \| \
25709          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
25710 echo X"$as_dir" |
25711     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25712             s//\1/
25713             q
25714           }
25715           /^X\(\/\/\)[^/].*/{
25716             s//\1/
25717             q
25718           }
25719           /^X\(\/\/\)$/{
25720             s//\1/
25721             q
25722           }
25723           /^X\(\/\).*/{
25724             s//\1/
25725             q
25726           }
25727           s/.*/./; q'`
25728       test -d "$as_dir" && break
25729     done
25730     test -z "$as_dirs" || eval "mkdir $as_dirs"
25731   } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25732 echo "$as_me: error: cannot create directory $as_dir" >&2;}
25733    { (exit 1); exit 1; }; }; }
25734   ac_builddir=.
25735
25736 case "$ac_dir" in
25737 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25738 *)
25739   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
25740   # A ".." for each directory in $ac_dir_suffix.
25741   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25742   case $ac_top_builddir_sub in
25743   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25744   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25745   esac ;;
25746 esac
25747 ac_abs_top_builddir=$ac_pwd
25748 ac_abs_builddir=$ac_pwd$ac_dir_suffix
25749 # for backward compatibility:
25750 ac_top_builddir=$ac_top_build_prefix
25751
25752 case $srcdir in
25753   .)  # We are building in place.
25754     ac_srcdir=.
25755     ac_top_srcdir=$ac_top_builddir_sub
25756     ac_abs_top_srcdir=$ac_pwd ;;
25757   [\\/]* | ?:[\\/]* )  # Absolute name.
25758     ac_srcdir=$srcdir$ac_dir_suffix;
25759     ac_top_srcdir=$srcdir
25760     ac_abs_top_srcdir=$srcdir ;;
25761   *) # Relative name.
25762     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25763     ac_top_srcdir=$ac_top_build_prefix$srcdir
25764     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
25765 esac
25766 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
25767
25768
25769   case $ac_mode in
25770   :F)
25771   #
25772   # CONFIG_FILE
25773   #
25774
25775 _ACEOF
25776
25777 cat >>$CONFIG_STATUS <<\_ACEOF
25778 # If the template does not know about datarootdir, expand it.
25779 # FIXME: This hack should be removed a few years after 2.60.
25780 ac_datarootdir_hack=; ac_datarootdir_seen=
25781
25782 case `sed -n '/datarootdir/ {
25783   p
25784   q
25785 }
25786 /@datadir@/p
25787 /@docdir@/p
25788 /@infodir@/p
25789 /@localedir@/p
25790 /@mandir@/p
25791 ' $ac_file_inputs` in
25792 *datarootdir*) ac_datarootdir_seen=yes;;
25793 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25794   { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25795 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25796 _ACEOF
25797 cat >>$CONFIG_STATUS <<_ACEOF
25798   ac_datarootdir_hack='
25799   s&@datadir@&$datadir&g
25800   s&@docdir@&$docdir&g
25801   s&@infodir@&$infodir&g
25802   s&@localedir@&$localedir&g
25803   s&@mandir@&$mandir&g
25804     s&\\\${datarootdir}&$datarootdir&g' ;;
25805 esac
25806 _ACEOF
25807
25808 # Neutralize VPATH when `$srcdir' = `.'.
25809 # Shell code in configure.ac might set extrasub.
25810 # FIXME: do we really want to maintain this feature?
25811 cat >>$CONFIG_STATUS <<_ACEOF
25812   sed "$ac_vpsub
25813 $extrasub
25814 _ACEOF
25815 cat >>$CONFIG_STATUS <<\_ACEOF
25816 :t
25817 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25818 s&@configure_input@&$configure_input&;t t
25819 s&@top_builddir@&$ac_top_builddir_sub&;t t
25820 s&@srcdir@&$ac_srcdir&;t t
25821 s&@abs_srcdir@&$ac_abs_srcdir&;t t
25822 s&@top_srcdir@&$ac_top_srcdir&;t t
25823 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25824 s&@builddir@&$ac_builddir&;t t
25825 s&@abs_builddir@&$ac_abs_builddir&;t t
25826 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25827 $ac_datarootdir_hack
25828 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
25829
25830 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25831   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25832   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25833   { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25834 which seems to be undefined.  Please make sure it is defined." >&5
25835 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25836 which seems to be undefined.  Please make sure it is defined." >&2;}
25837
25838   rm -f "$tmp/stdin"
25839   case $ac_file in
25840   -) cat "$tmp/out"; rm -f "$tmp/out";;
25841   *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
25842   esac
25843  ;;
25844   :H)
25845   #
25846   # CONFIG_HEADER
25847   #
25848 _ACEOF
25849
25850 # Transform confdefs.h into a sed script `conftest.defines', that
25851 # substitutes the proper values into config.h.in to produce config.h.
25852 rm -f conftest.defines conftest.tail
25853 # First, append a space to every undef/define line, to ease matching.
25854 echo 's/$/ /' >conftest.defines
25855 # Then, protect against being on the right side of a sed subst, or in
25856 # an unquoted here document, in config.status.  If some macros were
25857 # called several times there might be several #defines for the same
25858 # symbol, which is useless.  But do not sort them, since the last
25859 # AC_DEFINE must be honored.
25860 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25861 # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25862 # NAME is the cpp macro being defined, VALUE is the value it is being given.
25863 # PARAMS is the parameter list in the macro definition--in most cases, it's
25864 # just an empty string.
25865 ac_dA='s,^\\([   #]*\\)[^        ]*\\([  ]*'
25866 ac_dB='\\)[      (].*,\\1define\\2'
25867 ac_dC=' '
25868 ac_dD=' ,'
25869
25870 uniq confdefs.h |
25871   sed -n '
25872         t rset
25873         :rset
25874         s/^[     ]*#[    ]*define[       ][      ]*//
25875         t ok
25876         d
25877         :ok
25878         s/[\\&,]/\\&/g
25879         s/^\('"$ac_word_re"'\)\(([^()]*)\)[      ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25880         s/^\('"$ac_word_re"'\)[  ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25881   ' >>conftest.defines
25882
25883 # Remove the space that was appended to ease matching.
25884 # Then replace #undef with comments.  This is necessary, for
25885 # example, in the case of _POSIX_SOURCE, which is predefined and required
25886 # on some systems where configure will not decide to define it.
25887 # (The regexp can be short, since the line contains either #define or #undef.)
25888 echo 's/ $//
25889 s,^[     #]*u.*,/* & */,' >>conftest.defines
25890
25891 # Break up conftest.defines:
25892 ac_max_sed_lines=50
25893
25894 # First sed command is:  sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25895 # Second one is:         sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25896 # Third one will be:     sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25897 # et cetera.
25898 ac_in='$ac_file_inputs'
25899 ac_out='"$tmp/out1"'
25900 ac_nxt='"$tmp/out2"'
25901
25902 while :
25903 do
25904   # Write a here document:
25905     cat >>$CONFIG_STATUS <<_ACEOF
25906     # First, check the format of the line:
25907     cat >"\$tmp/defines.sed" <<\\CEOF
25908 /^[      ]*#[    ]*undef[        ][      ]*$ac_word_re[  ]*\$/b def
25909 /^[      ]*#[    ]*define[       ][      ]*$ac_word_re[(         ]/b def
25910 b
25911 :def
25912 _ACEOF
25913   sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
25914   echo 'CEOF
25915     sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25916   ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25917   sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25918   grep . conftest.tail >/dev/null || break
25919   rm -f conftest.defines
25920   mv conftest.tail conftest.defines
25921 done
25922 rm -f conftest.defines conftest.tail
25923
25924 echo "ac_result=$ac_in" >>$CONFIG_STATUS
25925 cat >>$CONFIG_STATUS <<\_ACEOF
25926   if test x"$ac_file" != x-; then
25927     echo "/* $configure_input  */" >"$tmp/config.h"
25928     cat "$ac_result" >>"$tmp/config.h"
25929     if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
25930       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
25931 echo "$as_me: $ac_file is unchanged" >&6;}
25932     else
25933       rm -f $ac_file
25934       mv "$tmp/config.h" $ac_file
25935     fi
25936   else
25937     echo "/* $configure_input  */"
25938     cat "$ac_result"
25939   fi
25940   rm -f "$tmp/out12"
25941  ;;
25942   :L)
25943   #
25944   # CONFIG_LINK
25945   #
25946
25947   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_file" >&5
25948 echo "$as_me: linking $srcdir/$ac_source to $ac_file" >&6;}
25949
25950   if test ! -r "$srcdir/$ac_source"; then
25951     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
25952 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
25953    { (exit 1); exit 1; }; }
25954   fi
25955   rm -f "$ac_file"
25956
25957   # Try a relative symlink, then a hard link, then a copy.
25958   case $srcdir in
25959   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
25960       *) ac_rel_source=$ac_top_build_prefix$srcdir/$ac_source ;;
25961   esac
25962   ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
25963     ln "$srcdir/$ac_source" "$ac_file" 2>/dev/null ||
25964     cp -p "$srcdir/$ac_source" "$ac_file" ||
25965     { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_file" >&5
25966 echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_file" >&2;}
25967    { (exit 1); exit 1; }; }
25968  ;;
25969   :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
25970 echo "$as_me: executing $ac_file commands" >&6;}
25971  ;;
25972   esac
25973
25974
25975   case $ac_file$ac_mode in
25976     "check_win32_symlinks":C)
25977 # Links sometimes fail undetected on Mingw -
25978 # so here we detect it and warn the user
25979 for FILE in $CONFIG_LINKS
25980  do
25981         # test -e works for symlinks in the MinGW console
25982         test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE -- please fix by hand" >&5
25983 echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
25984  done
25985  ;;
25986     "src/include/pg_config.h":H)
25987 # Update timestamp for pg_config.h (see Makefile.global)
25988 echo >src/include/stamp-h
25989  ;;
25990
25991   esac
25992 done # for ac_tag
25993
25994
25995 { (exit 0); exit 0; }
25996 _ACEOF
25997 chmod +x $CONFIG_STATUS
25998 ac_clean_files=$ac_clean_files_save
25999
26000
26001 # configure is writing to config.log, and then calls config.status.
26002 # config.status does its own redirection, appending to config.log.
26003 # Unfortunately, on DOS this fails, as config.log is still kept open
26004 # by configure, so config.status won't be able to write to it; its
26005 # output is simply discarded.  So we exec the FD to /dev/null,
26006 # effectively closing config.log, so it can be properly (re)opened and
26007 # appended to by config.status.  When coming back to configure, we
26008 # need to make the FD available again.
26009 if test "$no_create" != yes; then
26010   ac_cs_success=:
26011   ac_config_status_args=
26012   test "$silent" = yes &&
26013     ac_config_status_args="$ac_config_status_args --quiet"
26014   exec 5>/dev/null
26015   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
26016   exec 5>>config.log
26017   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26018   # would make configure fail if this is the last instruction.
26019   $ac_cs_success || { (exit 1); exit 1; }
26020 fi
26021
26022
26023 # Warn about unknown options
26024 for pgac_var in `set | sed 's/=.*//' | $EGREP 'with_|enable_'`; do
26025   for pgac_arg in $pgac_args with_gnu_ld; do
26026     if test "$pgac_var" = "$pgac_arg"; then
26027       continue 2
26028     fi
26029   done
26030   pgac_txt=`echo $pgac_var | sed 's/_/-/g'`
26031   { echo "$as_me:$LINENO: WARNING: option ignored: --$pgac_txt" >&5
26032 echo "$as_me: WARNING: option ignored: --$pgac_txt" >&2;}
26033 done