OSDN Git Service

Bundle v8.4.0
[pg-rex/syncrep.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.61 for PostgreSQL 8.4.0.
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-2009, 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.4.0'
580 PACKAGE_STRING='PostgreSQL 8.4.0'
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 PG_MAJORVERSION
660 build
661 build_cpu
662 build_vendor
663 build_os
664 host
665 host_cpu
666 host_vendor
667 host_os
668 PORTNAME
669 enable_nls
670 WANTED_LANGUAGES
671 default_port
672 enable_shared
673 enable_rpath
674 enable_debug
675 enable_profiling
676 GCOV
677 LCOV
678 GENHTML
679 enable_coverage
680 DTRACE
681 DTRACEFLAGS
682 enable_dtrace
683 CC
684 CFLAGS
685 LDFLAGS
686 CPPFLAGS
687 ac_ct_CC
688 EXEEXT
689 OBJEXT
690 SUN_STUDIO_CC
691 CPP
692 GCC
693 TAS
694 autodepend
695 INCLUDES
696 enable_thread_safety
697 with_tcl
698 with_perl
699 with_python
700 with_gssapi
701 with_krb5
702 krb_srvtab
703 with_pam
704 with_ldap
705 with_bonjour
706 with_openssl
707 with_ossp_uuid
708 XML2_CONFIG
709 with_libxml
710 with_libxslt
711 with_system_tzdata
712 with_zlib
713 GREP
714 EGREP
715 ELF_SYS
716 LDFLAGS_SL
717 LD
718 with_gnu_ld
719 ld_R_works
720 RANLIB
721 STRIP
722 STRIP_STATIC_LIB
723 STRIP_SHARED_LIB
724 AR
725 DLLTOOL
726 DLLWRAP
727 WINDRES
728 TAR
729 LN_S
730 AWK
731 BISON
732 BISONFLAGS
733 FLEX
734 FLEXFLAGS
735 PERL
736 perl_archlibexp
737 perl_privlibexp
738 perl_useshrplib
739 perl_embed_ldflags
740 PYTHON
741 python_version
742 python_configdir
743 python_includespec
744 python_libdir
745 python_libspec
746 python_additional_libs
747 ZIC
748 OSSP_UUID_LIBS
749 HAVE_IPV6
750 LIBOBJS
751 acx_pthread_config
752 PTHREAD_CC
753 PTHREAD_LIBS
754 PTHREAD_CFLAGS
755 LDAP_LIBS_FE
756 LDAP_LIBS_BE
757 HAVE_POSIX_SIGNALS
758 MSGFMT
759 MSGMERGE
760 XGETTEXT
761 TCLSH
762 TCL_CONFIG_SH
763 TCL_INCLUDE_SPEC
764 TCL_LIB_FILE
765 TCL_LIBS
766 TCL_LIB_SPEC
767 TCL_SHARED_BUILD
768 TCL_SHLIB_LD_LIBS
769 NSGMLS
770 JADE
771 have_docbook
772 DOCBOOKSTYLE
773 COLLATEINDEX
774 SGMLSPL
775 DOCBOOK2MAN
776 vpath_build
777 LTLIBOBJS'
778 ac_subst_files=''
779       ac_precious_vars='build_alias
780 host_alias
781 target_alias
782 CC
783 CFLAGS
784 LDFLAGS
785 LIBS
786 CPPFLAGS
787 CPP
788 LDFLAGS_SL
789 DOCBOOKSTYLE'
790
791
792 # Initialize some variables set by options.
793 ac_init_help=
794 ac_init_version=false
795 # The variables have the same names as the options, with
796 # dashes changed to underlines.
797 cache_file=/dev/null
798 exec_prefix=NONE
799 no_create=
800 no_recursion=
801 prefix=NONE
802 program_prefix=NONE
803 program_suffix=NONE
804 program_transform_name=s,x,x,
805 silent=
806 site=
807 srcdir=
808 verbose=
809 x_includes=NONE
810 x_libraries=NONE
811
812 # Installation directory options.
813 # These are left unexpanded so users can "make install exec_prefix=/foo"
814 # and all the variables that are supposed to be based on exec_prefix
815 # by default will actually change.
816 # Use braces instead of parens because sh, perl, etc. also accept them.
817 # (The list follows the same order as the GNU Coding Standards.)
818 bindir='${exec_prefix}/bin'
819 sbindir='${exec_prefix}/sbin'
820 libexecdir='${exec_prefix}/libexec'
821 datarootdir='${prefix}/share'
822 datadir='${datarootdir}'
823 sysconfdir='${prefix}/etc'
824 sharedstatedir='${prefix}/com'
825 localstatedir='${prefix}/var'
826 includedir='${prefix}/include'
827 oldincludedir='/usr/include'
828 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
829 infodir='${datarootdir}/info'
830 htmldir='${docdir}'
831 dvidir='${docdir}'
832 pdfdir='${docdir}'
833 psdir='${docdir}'
834 libdir='${exec_prefix}/lib'
835 localedir='${datarootdir}/locale'
836 mandir='${datarootdir}/man'
837
838 ac_prev=
839 ac_dashdash=
840 for ac_option
841 do
842   # If the previous option needs an argument, assign it.
843   if test -n "$ac_prev"; then
844     eval $ac_prev=\$ac_option
845     ac_prev=
846     continue
847   fi
848
849   case $ac_option in
850   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
851   *)    ac_optarg=yes ;;
852   esac
853
854   # Accept the important Cygnus configure options, so we can diagnose typos.
855
856   case $ac_dashdash$ac_option in
857   --)
858     ac_dashdash=yes ;;
859
860   -bindir | --bindir | --bindi | --bind | --bin | --bi)
861     ac_prev=bindir ;;
862   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
863     bindir=$ac_optarg ;;
864
865   -build | --build | --buil | --bui | --bu)
866     ac_prev=build_alias ;;
867   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
868     build_alias=$ac_optarg ;;
869
870   -cache-file | --cache-file | --cache-fil | --cache-fi \
871   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
872     ac_prev=cache_file ;;
873   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
874   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
875     cache_file=$ac_optarg ;;
876
877   --config-cache | -C)
878     cache_file=config.cache ;;
879
880   -datadir | --datadir | --datadi | --datad)
881     ac_prev=datadir ;;
882   -datadir=* | --datadir=* | --datadi=* | --datad=*)
883     datadir=$ac_optarg ;;
884
885   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
886   | --dataroo | --dataro | --datar)
887     ac_prev=datarootdir ;;
888   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
889   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
890     datarootdir=$ac_optarg ;;
891
892   -disable-* | --disable-*)
893     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
894     # Reject names that are not valid shell variable names.
895     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
896       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
897    { (exit 1); exit 1; }; }
898     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
899     eval enable_$ac_feature=no ;;
900
901   -docdir | --docdir | --docdi | --doc | --do)
902     ac_prev=docdir ;;
903   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
904     docdir=$ac_optarg ;;
905
906   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
907     ac_prev=dvidir ;;
908   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
909     dvidir=$ac_optarg ;;
910
911   -enable-* | --enable-*)
912     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
913     # Reject names that are not valid shell variable names.
914     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
915       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
916    { (exit 1); exit 1; }; }
917     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
918     eval enable_$ac_feature=\$ac_optarg ;;
919
920   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
921   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
922   | --exec | --exe | --ex)
923     ac_prev=exec_prefix ;;
924   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
925   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
926   | --exec=* | --exe=* | --ex=*)
927     exec_prefix=$ac_optarg ;;
928
929   -gas | --gas | --ga | --g)
930     # Obsolete; use --with-gas.
931     with_gas=yes ;;
932
933   -help | --help | --hel | --he | -h)
934     ac_init_help=long ;;
935   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
936     ac_init_help=recursive ;;
937   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
938     ac_init_help=short ;;
939
940   -host | --host | --hos | --ho)
941     ac_prev=host_alias ;;
942   -host=* | --host=* | --hos=* | --ho=*)
943     host_alias=$ac_optarg ;;
944
945   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
946     ac_prev=htmldir ;;
947   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
948   | --ht=*)
949     htmldir=$ac_optarg ;;
950
951   -includedir | --includedir | --includedi | --included | --include \
952   | --includ | --inclu | --incl | --inc)
953     ac_prev=includedir ;;
954   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
955   | --includ=* | --inclu=* | --incl=* | --inc=*)
956     includedir=$ac_optarg ;;
957
958   -infodir | --infodir | --infodi | --infod | --info | --inf)
959     ac_prev=infodir ;;
960   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
961     infodir=$ac_optarg ;;
962
963   -libdir | --libdir | --libdi | --libd)
964     ac_prev=libdir ;;
965   -libdir=* | --libdir=* | --libdi=* | --libd=*)
966     libdir=$ac_optarg ;;
967
968   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
969   | --libexe | --libex | --libe)
970     ac_prev=libexecdir ;;
971   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
972   | --libexe=* | --libex=* | --libe=*)
973     libexecdir=$ac_optarg ;;
974
975   -localedir | --localedir | --localedi | --localed | --locale)
976     ac_prev=localedir ;;
977   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
978     localedir=$ac_optarg ;;
979
980   -localstatedir | --localstatedir | --localstatedi | --localstated \
981   | --localstate | --localstat | --localsta | --localst | --locals)
982     ac_prev=localstatedir ;;
983   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
984   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
985     localstatedir=$ac_optarg ;;
986
987   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
988     ac_prev=mandir ;;
989   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
990     mandir=$ac_optarg ;;
991
992   -nfp | --nfp | --nf)
993     # Obsolete; use --without-fp.
994     with_fp=no ;;
995
996   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
997   | --no-cr | --no-c | -n)
998     no_create=yes ;;
999
1000   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1001   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1002     no_recursion=yes ;;
1003
1004   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1005   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1006   | --oldin | --oldi | --old | --ol | --o)
1007     ac_prev=oldincludedir ;;
1008   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1009   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1010   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1011     oldincludedir=$ac_optarg ;;
1012
1013   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1014     ac_prev=prefix ;;
1015   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1016     prefix=$ac_optarg ;;
1017
1018   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1019   | --program-pre | --program-pr | --program-p)
1020     ac_prev=program_prefix ;;
1021   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1022   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1023     program_prefix=$ac_optarg ;;
1024
1025   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1026   | --program-suf | --program-su | --program-s)
1027     ac_prev=program_suffix ;;
1028   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1029   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1030     program_suffix=$ac_optarg ;;
1031
1032   -program-transform-name | --program-transform-name \
1033   | --program-transform-nam | --program-transform-na \
1034   | --program-transform-n | --program-transform- \
1035   | --program-transform | --program-transfor \
1036   | --program-transfo | --program-transf \
1037   | --program-trans | --program-tran \
1038   | --progr-tra | --program-tr | --program-t)
1039     ac_prev=program_transform_name ;;
1040   -program-transform-name=* | --program-transform-name=* \
1041   | --program-transform-nam=* | --program-transform-na=* \
1042   | --program-transform-n=* | --program-transform-=* \
1043   | --program-transform=* | --program-transfor=* \
1044   | --program-transfo=* | --program-transf=* \
1045   | --program-trans=* | --program-tran=* \
1046   | --progr-tra=* | --program-tr=* | --program-t=*)
1047     program_transform_name=$ac_optarg ;;
1048
1049   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1050     ac_prev=pdfdir ;;
1051   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1052     pdfdir=$ac_optarg ;;
1053
1054   -psdir | --psdir | --psdi | --psd | --ps)
1055     ac_prev=psdir ;;
1056   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1057     psdir=$ac_optarg ;;
1058
1059   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1060   | -silent | --silent | --silen | --sile | --sil)
1061     silent=yes ;;
1062
1063   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1064     ac_prev=sbindir ;;
1065   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1066   | --sbi=* | --sb=*)
1067     sbindir=$ac_optarg ;;
1068
1069   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1070   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1071   | --sharedst | --shareds | --shared | --share | --shar \
1072   | --sha | --sh)
1073     ac_prev=sharedstatedir ;;
1074   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1075   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1076   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1077   | --sha=* | --sh=*)
1078     sharedstatedir=$ac_optarg ;;
1079
1080   -site | --site | --sit)
1081     ac_prev=site ;;
1082   -site=* | --site=* | --sit=*)
1083     site=$ac_optarg ;;
1084
1085   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1086     ac_prev=srcdir ;;
1087   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1088     srcdir=$ac_optarg ;;
1089
1090   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1091   | --syscon | --sysco | --sysc | --sys | --sy)
1092     ac_prev=sysconfdir ;;
1093   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1094   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1095     sysconfdir=$ac_optarg ;;
1096
1097   -target | --target | --targe | --targ | --tar | --ta | --t)
1098     ac_prev=target_alias ;;
1099   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1100     target_alias=$ac_optarg ;;
1101
1102   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1103     verbose=yes ;;
1104
1105   -version | --version | --versio | --versi | --vers | -V)
1106     ac_init_version=: ;;
1107
1108   -with-* | --with-*)
1109     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1110     # Reject names that are not valid shell variable names.
1111     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1112       { echo "$as_me: error: invalid package name: $ac_package" >&2
1113    { (exit 1); exit 1; }; }
1114     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1115     eval with_$ac_package=\$ac_optarg ;;
1116
1117   -without-* | --without-*)
1118     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1119     # Reject names that are not valid shell variable names.
1120     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1121       { echo "$as_me: error: invalid package name: $ac_package" >&2
1122    { (exit 1); exit 1; }; }
1123     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1124     eval with_$ac_package=no ;;
1125
1126   --x)
1127     # Obsolete; use --with-x.
1128     with_x=yes ;;
1129
1130   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1131   | --x-incl | --x-inc | --x-in | --x-i)
1132     ac_prev=x_includes ;;
1133   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1134   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1135     x_includes=$ac_optarg ;;
1136
1137   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1138   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1139     ac_prev=x_libraries ;;
1140   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1141   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1142     x_libraries=$ac_optarg ;;
1143
1144   -*) { echo "$as_me: error: unrecognized option: $ac_option
1145 Try \`$0 --help' for more information." >&2
1146    { (exit 1); exit 1; }; }
1147     ;;
1148
1149   *=*)
1150     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1151     # Reject names that are not valid shell variable names.
1152     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1153       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1154    { (exit 1); exit 1; }; }
1155     eval $ac_envvar=\$ac_optarg
1156     export $ac_envvar ;;
1157
1158   *)
1159     # FIXME: should be removed in autoconf 3.0.
1160     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1161     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1162       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1163     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1164     ;;
1165
1166   esac
1167 done
1168
1169 if test -n "$ac_prev"; then
1170   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1171   { echo "$as_me: error: missing argument to $ac_option" >&2
1172    { (exit 1); exit 1; }; }
1173 fi
1174
1175 # Be sure to have absolute directory names.
1176 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1177                 datadir sysconfdir sharedstatedir localstatedir includedir \
1178                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1179                 libdir localedir mandir
1180 do
1181   eval ac_val=\$$ac_var
1182   case $ac_val in
1183     [\\/$]* | ?:[\\/]* )  continue;;
1184     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1185   esac
1186   { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1187    { (exit 1); exit 1; }; }
1188 done
1189
1190 # There might be people who depend on the old broken behavior: `$host'
1191 # used to hold the argument of --host etc.
1192 # FIXME: To remove some day.
1193 build=$build_alias
1194 host=$host_alias
1195 target=$target_alias
1196
1197 # FIXME: To remove some day.
1198 if test "x$host_alias" != x; then
1199   if test "x$build_alias" = x; then
1200     cross_compiling=maybe
1201     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1202     If a cross compiler is detected then cross compile mode will be used." >&2
1203   elif test "x$build_alias" != "x$host_alias"; then
1204     cross_compiling=yes
1205   fi
1206 fi
1207
1208 ac_tool_prefix=
1209 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1210
1211 test "$silent" = yes && exec 6>/dev/null
1212
1213
1214 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1215 ac_ls_di=`ls -di .` &&
1216 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1217   { echo "$as_me: error: Working directory cannot be determined" >&2
1218    { (exit 1); exit 1; }; }
1219 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1220   { echo "$as_me: error: pwd does not report name of working directory" >&2
1221    { (exit 1); exit 1; }; }
1222
1223
1224 # Find the source files, if location was not specified.
1225 if test -z "$srcdir"; then
1226   ac_srcdir_defaulted=yes
1227   # Try the directory containing this script, then the parent directory.
1228   ac_confdir=`$as_dirname -- "$0" ||
1229 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1230          X"$0" : 'X\(//\)[^/]' \| \
1231          X"$0" : 'X\(//\)$' \| \
1232          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1233 echo X"$0" |
1234     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1235             s//\1/
1236             q
1237           }
1238           /^X\(\/\/\)[^/].*/{
1239             s//\1/
1240             q
1241           }
1242           /^X\(\/\/\)$/{
1243             s//\1/
1244             q
1245           }
1246           /^X\(\/\).*/{
1247             s//\1/
1248             q
1249           }
1250           s/.*/./; q'`
1251   srcdir=$ac_confdir
1252   if test ! -r "$srcdir/$ac_unique_file"; then
1253     srcdir=..
1254   fi
1255 else
1256   ac_srcdir_defaulted=no
1257 fi
1258 if test ! -r "$srcdir/$ac_unique_file"; then
1259   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1260   { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1261    { (exit 1); exit 1; }; }
1262 fi
1263 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1264 ac_abs_confdir=`(
1265         cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1266    { (exit 1); exit 1; }; }
1267         pwd)`
1268 # When building in place, set srcdir=.
1269 if test "$ac_abs_confdir" = "$ac_pwd"; then
1270   srcdir=.
1271 fi
1272 # Remove unnecessary trailing slashes from srcdir.
1273 # Double slashes in file names in object file debugging info
1274 # mess up M-x gdb in Emacs.
1275 case $srcdir in
1276 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1277 esac
1278 for ac_var in $ac_precious_vars; do
1279   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1280   eval ac_env_${ac_var}_value=\$${ac_var}
1281   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1282   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1283 done
1284
1285 #
1286 # Report the --help message.
1287 #
1288 if test "$ac_init_help" = "long"; then
1289   # Omit some internal or obsolete options to make the list less imposing.
1290   # This message is too long to be a string in the A/UX 3.1 sh.
1291   cat <<_ACEOF
1292 \`configure' configures PostgreSQL 8.4.0 to adapt to many kinds of systems.
1293
1294 Usage: $0 [OPTION]... [VAR=VALUE]...
1295
1296 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1297 VAR=VALUE.  See below for descriptions of some of the useful variables.
1298
1299 Defaults for the options are specified in brackets.
1300
1301 Configuration:
1302   -h, --help              display this help and exit
1303       --help=short        display options specific to this package
1304       --help=recursive    display the short help of all the included packages
1305   -V, --version           display version information and exit
1306   -q, --quiet, --silent   do not print \`checking...' messages
1307       --cache-file=FILE   cache test results in FILE [disabled]
1308   -C, --config-cache      alias for \`--cache-file=config.cache'
1309   -n, --no-create         do not create output files
1310       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1311
1312 Installation directories:
1313   --prefix=PREFIX         install architecture-independent files in PREFIX
1314                           [$ac_default_prefix]
1315   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1316                           [PREFIX]
1317
1318 By default, \`make install' will install all the files in
1319 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1320 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1321 for instance \`--prefix=\$HOME'.
1322
1323 For better control, use the options below.
1324
1325 Fine tuning of the installation directories:
1326   --bindir=DIR           user executables [EPREFIX/bin]
1327   --sbindir=DIR          system admin executables [EPREFIX/sbin]
1328   --libexecdir=DIR       program executables [EPREFIX/libexec]
1329   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
1330   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
1331   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
1332   --libdir=DIR           object code libraries [EPREFIX/lib]
1333   --includedir=DIR       C header files [PREFIX/include]
1334   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
1335   --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1336   --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1337   --infodir=DIR          info documentation [DATAROOTDIR/info]
1338   --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1339   --mandir=DIR           man documentation [DATAROOTDIR/man]
1340   --docdir=DIR           documentation root [DATAROOTDIR/doc/postgresql]
1341   --htmldir=DIR          html documentation [DOCDIR]
1342   --dvidir=DIR           dvi documentation [DOCDIR]
1343   --pdfdir=DIR           pdf documentation [DOCDIR]
1344   --psdir=DIR            ps documentation [DOCDIR]
1345 _ACEOF
1346
1347   cat <<\_ACEOF
1348
1349 System types:
1350   --build=BUILD     configure for building on BUILD [guessed]
1351   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1352 _ACEOF
1353 fi
1354
1355 if test -n "$ac_init_help"; then
1356   case $ac_init_help in
1357      short | recursive ) echo "Configuration of PostgreSQL 8.4.0:";;
1358    esac
1359   cat <<\_ACEOF
1360
1361 Optional Features:
1362   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1363   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1364   --disable-integer-datetimes
1365                           disable 64-bit integer date/time support
1366   --enable-nls[=LANGUAGES]
1367                           enable Native Language Support
1368   --disable-shared        do not build shared libraries
1369   --disable-rpath         do not embed shared library search path in
1370                           executables
1371   --disable-spinlocks     do not use spinlocks
1372   --enable-debug          build with debugging symbols (-g)
1373   --enable-profiling      build with profiling enabled
1374   --enable-coverage       build with coverage testing instrumentation
1375   --enable-dtrace         build with DTrace support
1376   --enable-depend         turn on automatic dependency tracking
1377   --enable-cassert        enable assertion checks (for debugging)
1378   --enable-thread-safety  make client libraries thread-safe
1379   --enable-thread-safety-force
1380                           force thread-safety despite thread test failure
1381   --disable-float4-byval  disable float4 passed by value
1382   --disable-float8-byval  disable float8 passed by value
1383   --disable-largefile     omit support for large files
1384
1385 Optional Packages:
1386   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1387   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1388   --with-template=NAME    override operating system template
1389   --with-includes=DIRS    look for additional header files in DIRS
1390   --with-libraries=DIRS   look for additional libraries in DIRS
1391   --with-libs=DIRS        alternative spelling of --with-libraries
1392   --with-pgport=PORTNUM   set default port number [5432]
1393   --with-blocksize=BLOCKSIZE
1394                           set table block size in kB [8]
1395   --with-segsize=SEGSIZE  set table segment size in GB [1]
1396   --with-wal-blocksize=BLOCKSIZE
1397                           set WAL block size in kB [8]
1398   --with-wal-segsize=SEGSIZE
1399                           set WAL segment size in MB [16]
1400   --with-CC=CMD           set compiler (deprecated)
1401   --with-tcl              build Tcl modules (PL/Tcl)
1402   --with-tclconfig=DIR    tclConfig.sh is in DIR
1403   --with-perl             build Perl modules (PL/Perl)
1404   --with-python           build Python modules (PL/Python)
1405   --with-gssapi           build with GSSAPI support
1406   --with-krb5             build with Kerberos 5 support
1407   --with-krb-srvnam=NAME  default service principal name in Kerberos
1408                           [postgres]
1409   --with-pam              build with PAM support
1410   --with-ldap             build with LDAP support
1411   --with-bonjour          build with Bonjour support
1412   --with-openssl          build with OpenSSL support
1413   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1414   --with-libedit-preferred
1415                           prefer BSD Libedit over GNU Readline
1416   --with-ossp-uuid        use OSSP UUID library when building
1417                           contrib/uuid-ossp
1418   --with-libxml           build with XML support
1419   --with-libxslt          use XSLT support when building contrib/xml2
1420   --with-system-tzdata=DIR
1421                           use system time zone data in DIR
1422   --without-zlib          do not use Zlib
1423   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1424
1425 Some influential environment variables:
1426   CC          C compiler command
1427   CFLAGS      C compiler flags
1428   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1429               nonstandard directory <lib dir>
1430   LIBS        libraries to pass to the linker, e.g. -l<library>
1431   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1432               you have headers in a nonstandard directory <include dir>
1433   CPP         C preprocessor
1434   LDFLAGS_SL  linker flags for shared library linking
1435   DOCBOOKSTYLE
1436               location of DocBook stylesheets
1437
1438 Use these variables to override the choices made by `configure' or to help
1439 it to find libraries and programs with nonstandard names/locations.
1440
1441 Report bugs to <pgsql-bugs@postgresql.org>.
1442 _ACEOF
1443 ac_status=$?
1444 fi
1445
1446 if test "$ac_init_help" = "recursive"; then
1447   # If there are subdirs, report their specific --help.
1448   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1449     test -d "$ac_dir" || continue
1450     ac_builddir=.
1451
1452 case "$ac_dir" in
1453 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1454 *)
1455   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1456   # A ".." for each directory in $ac_dir_suffix.
1457   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1458   case $ac_top_builddir_sub in
1459   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1460   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1461   esac ;;
1462 esac
1463 ac_abs_top_builddir=$ac_pwd
1464 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1465 # for backward compatibility:
1466 ac_top_builddir=$ac_top_build_prefix
1467
1468 case $srcdir in
1469   .)  # We are building in place.
1470     ac_srcdir=.
1471     ac_top_srcdir=$ac_top_builddir_sub
1472     ac_abs_top_srcdir=$ac_pwd ;;
1473   [\\/]* | ?:[\\/]* )  # Absolute name.
1474     ac_srcdir=$srcdir$ac_dir_suffix;
1475     ac_top_srcdir=$srcdir
1476     ac_abs_top_srcdir=$srcdir ;;
1477   *) # Relative name.
1478     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1479     ac_top_srcdir=$ac_top_build_prefix$srcdir
1480     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1481 esac
1482 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1483
1484     cd "$ac_dir" || { ac_status=$?; continue; }
1485     # Check for guested configure.
1486     if test -f "$ac_srcdir/configure.gnu"; then
1487       echo &&
1488       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1489     elif test -f "$ac_srcdir/configure"; then
1490       echo &&
1491       $SHELL "$ac_srcdir/configure" --help=recursive
1492     else
1493       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1494     fi || ac_status=$?
1495     cd "$ac_pwd" || { ac_status=$?; break; }
1496   done
1497 fi
1498
1499 test -n "$ac_init_help" && exit $ac_status
1500 if $ac_init_version; then
1501   cat <<\_ACEOF
1502 PostgreSQL configure 8.4.0
1503 generated by GNU Autoconf 2.61
1504
1505 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1506 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1507 This configure script is free software; the Free Software Foundation
1508 gives unlimited permission to copy, distribute and modify it.
1509
1510 Copyright (c) 1996-2009, PostgreSQL Global Development Group
1511 _ACEOF
1512   exit
1513 fi
1514 cat >config.log <<_ACEOF
1515 This file contains any messages produced by compilers while
1516 running configure, to aid debugging if configure makes a mistake.
1517
1518 It was created by PostgreSQL $as_me 8.4.0, which was
1519 generated by GNU Autoconf 2.61.  Invocation command line was
1520
1521   $ $0 $@
1522
1523 _ACEOF
1524 exec 5>>config.log
1525 {
1526 cat <<_ASUNAME
1527 ## --------- ##
1528 ## Platform. ##
1529 ## --------- ##
1530
1531 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1532 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1533 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1534 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1535 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1536
1537 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1538 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1539
1540 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1541 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1542 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1543 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1544 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1545 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1546 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1547
1548 _ASUNAME
1549
1550 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1551 for as_dir in $PATH
1552 do
1553   IFS=$as_save_IFS
1554   test -z "$as_dir" && as_dir=.
1555   echo "PATH: $as_dir"
1556 done
1557 IFS=$as_save_IFS
1558
1559 } >&5
1560
1561 cat >&5 <<_ACEOF
1562
1563
1564 ## ----------- ##
1565 ## Core tests. ##
1566 ## ----------- ##
1567
1568 _ACEOF
1569
1570
1571 # Keep a trace of the command line.
1572 # Strip out --no-create and --no-recursion so they do not pile up.
1573 # Strip out --silent because we don't want to record it for future runs.
1574 # Also quote any args containing shell meta-characters.
1575 # Make two passes to allow for proper duplicate-argument suppression.
1576 ac_configure_args=
1577 ac_configure_args0=
1578 ac_configure_args1=
1579 ac_must_keep_next=false
1580 for ac_pass in 1 2
1581 do
1582   for ac_arg
1583   do
1584     case $ac_arg in
1585     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1586     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1587     | -silent | --silent | --silen | --sile | --sil)
1588       continue ;;
1589     *\'*)
1590       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1591     esac
1592     case $ac_pass in
1593     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1594     2)
1595       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1596       if test $ac_must_keep_next = true; then
1597         ac_must_keep_next=false # Got value, back to normal.
1598       else
1599         case $ac_arg in
1600           *=* | --config-cache | -C | -disable-* | --disable-* \
1601           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1602           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1603           | -with-* | --with-* | -without-* | --without-* | --x)
1604             case "$ac_configure_args0 " in
1605               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1606             esac
1607             ;;
1608           -* ) ac_must_keep_next=true ;;
1609         esac
1610       fi
1611       ac_configure_args="$ac_configure_args '$ac_arg'"
1612       ;;
1613     esac
1614   done
1615 done
1616 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1617 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1618
1619 # When interrupted or exit'd, cleanup temporary files, and complete
1620 # config.log.  We remove comments because anyway the quotes in there
1621 # would cause problems or look ugly.
1622 # WARNING: Use '\'' to represent an apostrophe within the trap.
1623 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1624 trap 'exit_status=$?
1625   # Save into config.log some information that might help in debugging.
1626   {
1627     echo
1628
1629     cat <<\_ASBOX
1630 ## ---------------- ##
1631 ## Cache variables. ##
1632 ## ---------------- ##
1633 _ASBOX
1634     echo
1635     # The following way of writing the cache mishandles newlines in values,
1636 (
1637   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1638     eval ac_val=\$$ac_var
1639     case $ac_val in #(
1640     *${as_nl}*)
1641       case $ac_var in #(
1642       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1643 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1644       esac
1645       case $ac_var in #(
1646       _ | IFS | as_nl) ;; #(
1647       *) $as_unset $ac_var ;;
1648       esac ;;
1649     esac
1650   done
1651   (set) 2>&1 |
1652     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1653     *${as_nl}ac_space=\ *)
1654       sed -n \
1655         "s/'\''/'\''\\\\'\'''\''/g;
1656           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1657       ;; #(
1658     *)
1659       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1660       ;;
1661     esac |
1662     sort
1663 )
1664     echo
1665
1666     cat <<\_ASBOX
1667 ## ----------------- ##
1668 ## Output variables. ##
1669 ## ----------------- ##
1670 _ASBOX
1671     echo
1672     for ac_var in $ac_subst_vars
1673     do
1674       eval ac_val=\$$ac_var
1675       case $ac_val in
1676       *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1677       esac
1678       echo "$ac_var='\''$ac_val'\''"
1679     done | sort
1680     echo
1681
1682     if test -n "$ac_subst_files"; then
1683       cat <<\_ASBOX
1684 ## ------------------- ##
1685 ## File substitutions. ##
1686 ## ------------------- ##
1687 _ASBOX
1688       echo
1689       for ac_var in $ac_subst_files
1690       do
1691         eval ac_val=\$$ac_var
1692         case $ac_val in
1693         *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1694         esac
1695         echo "$ac_var='\''$ac_val'\''"
1696       done | sort
1697       echo
1698     fi
1699
1700     if test -s confdefs.h; then
1701       cat <<\_ASBOX
1702 ## ----------- ##
1703 ## confdefs.h. ##
1704 ## ----------- ##
1705 _ASBOX
1706       echo
1707       cat confdefs.h
1708       echo
1709     fi
1710     test "$ac_signal" != 0 &&
1711       echo "$as_me: caught signal $ac_signal"
1712     echo "$as_me: exit $exit_status"
1713   } >&5
1714   rm -f core *.core core.conftest.* &&
1715     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1716     exit $exit_status
1717 ' 0
1718 for ac_signal in 1 2 13 15; do
1719   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1720 done
1721 ac_signal=0
1722
1723 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1724 rm -f -r conftest* confdefs.h
1725
1726 # Predefined preprocessor variables.
1727
1728 cat >>confdefs.h <<_ACEOF
1729 #define PACKAGE_NAME "$PACKAGE_NAME"
1730 _ACEOF
1731
1732
1733 cat >>confdefs.h <<_ACEOF
1734 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1735 _ACEOF
1736
1737
1738 cat >>confdefs.h <<_ACEOF
1739 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1740 _ACEOF
1741
1742
1743 cat >>confdefs.h <<_ACEOF
1744 #define PACKAGE_STRING "$PACKAGE_STRING"
1745 _ACEOF
1746
1747
1748 cat >>confdefs.h <<_ACEOF
1749 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1750 _ACEOF
1751
1752
1753 # Let the site file select an alternate cache file if it wants to.
1754 # Prefer explicitly selected file to automatically selected ones.
1755 if test -n "$CONFIG_SITE"; then
1756   set x "$CONFIG_SITE"
1757 elif test "x$prefix" != xNONE; then
1758   set x "$prefix/share/config.site" "$prefix/etc/config.site"
1759 else
1760   set x "$ac_default_prefix/share/config.site" \
1761         "$ac_default_prefix/etc/config.site"
1762 fi
1763 shift
1764 for ac_site_file
1765 do
1766   if test -r "$ac_site_file"; then
1767     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1768 echo "$as_me: loading site script $ac_site_file" >&6;}
1769     sed 's/^/| /' "$ac_site_file" >&5
1770     . "$ac_site_file"
1771   fi
1772 done
1773
1774 if test -r "$cache_file"; then
1775   # Some versions of bash will fail to source /dev/null (special
1776   # files actually), so we avoid doing that.
1777   if test -f "$cache_file"; then
1778     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1779 echo "$as_me: loading cache $cache_file" >&6;}
1780     case $cache_file in
1781       [\\/]* | ?:[\\/]* ) . "$cache_file";;
1782       *)                      . "./$cache_file";;
1783     esac
1784   fi
1785 else
1786   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1787 echo "$as_me: creating cache $cache_file" >&6;}
1788   >$cache_file
1789 fi
1790
1791 # Check that the precious variables saved in the cache have kept the same
1792 # value.
1793 ac_cache_corrupted=false
1794 for ac_var in $ac_precious_vars; do
1795   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1796   eval ac_new_set=\$ac_env_${ac_var}_set
1797   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1798   eval ac_new_val=\$ac_env_${ac_var}_value
1799   case $ac_old_set,$ac_new_set in
1800     set,)
1801       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1802 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1803       ac_cache_corrupted=: ;;
1804     ,set)
1805       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1806 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1807       ac_cache_corrupted=: ;;
1808     ,);;
1809     *)
1810       if test "x$ac_old_val" != "x$ac_new_val"; then
1811         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1812 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1813         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1814 echo "$as_me:   former value:  $ac_old_val" >&2;}
1815         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1816 echo "$as_me:   current value: $ac_new_val" >&2;}
1817         ac_cache_corrupted=:
1818       fi;;
1819   esac
1820   # Pass precious variables to config.status.
1821   if test "$ac_new_set" = set; then
1822     case $ac_new_val in
1823     *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1824     *) ac_arg=$ac_var=$ac_new_val ;;
1825     esac
1826     case " $ac_configure_args " in
1827       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1828       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1829     esac
1830   fi
1831 done
1832 if $ac_cache_corrupted; then
1833   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1834 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1835   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1836 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1837    { (exit 1); exit 1; }; }
1838 fi
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864 ac_ext=c
1865 ac_cpp='$CPP $CPPFLAGS'
1866 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1867 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1868 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1869
1870
1871
1872
1873
1874
1875 ac_aux_dir=
1876 for ac_dir in config "$srcdir"/config; do
1877   if test -f "$ac_dir/install-sh"; then
1878     ac_aux_dir=$ac_dir
1879     ac_install_sh="$ac_aux_dir/install-sh -c"
1880     break
1881   elif test -f "$ac_dir/install.sh"; then
1882     ac_aux_dir=$ac_dir
1883     ac_install_sh="$ac_aux_dir/install.sh -c"
1884     break
1885   elif test -f "$ac_dir/shtool"; then
1886     ac_aux_dir=$ac_dir
1887     ac_install_sh="$ac_aux_dir/shtool install -c"
1888     break
1889   fi
1890 done
1891 if test -z "$ac_aux_dir"; then
1892   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5
1893 echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;}
1894    { (exit 1); exit 1; }; }
1895 fi
1896
1897 # These three variables are undocumented and unsupported,
1898 # and are intended to be withdrawn in a future Autoconf release.
1899 # They can cause serious problems if a builder's source tree is in a directory
1900 # whose full name contains unusual characters.
1901 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
1902 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
1903 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
1904
1905
1906
1907 configure_args=$ac_configure_args
1908
1909
1910
1911 cat >>confdefs.h <<_ACEOF
1912 #define PG_VERSION "$PACKAGE_VERSION"
1913 _ACEOF
1914
1915 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
1916
1917
1918 cat >>confdefs.h <<_ACEOF
1919 #define PG_MAJORVERSION "$PG_MAJORVERSION"
1920 _ACEOF
1921
1922
1923 # Make sure we can run config.sub.
1924 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
1925   { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
1926 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
1927    { (exit 1); exit 1; }; }
1928
1929 { echo "$as_me:$LINENO: checking build system type" >&5
1930 echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
1931 if test "${ac_cv_build+set}" = set; then
1932   echo $ECHO_N "(cached) $ECHO_C" >&6
1933 else
1934   ac_build_alias=$build_alias
1935 test "x$ac_build_alias" = x &&
1936   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
1937 test "x$ac_build_alias" = x &&
1938   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1939 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1940    { (exit 1); exit 1; }; }
1941 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
1942   { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
1943 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
1944    { (exit 1); exit 1; }; }
1945
1946 fi
1947 { echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1948 echo "${ECHO_T}$ac_cv_build" >&6; }
1949 case $ac_cv_build in
1950 *-*-*) ;;
1951 *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
1952 echo "$as_me: error: invalid value of canonical build" >&2;}
1953    { (exit 1); exit 1; }; };;
1954 esac
1955 build=$ac_cv_build
1956 ac_save_IFS=$IFS; IFS='-'
1957 set x $ac_cv_build
1958 shift
1959 build_cpu=$1
1960 build_vendor=$2
1961 shift; shift
1962 # Remember, the first character of IFS is used to create $*,
1963 # except with old shells:
1964 build_os=$*
1965 IFS=$ac_save_IFS
1966 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
1967
1968
1969 { echo "$as_me:$LINENO: checking host system type" >&5
1970 echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
1971 if test "${ac_cv_host+set}" = set; then
1972   echo $ECHO_N "(cached) $ECHO_C" >&6
1973 else
1974   if test "x$host_alias" = x; then
1975   ac_cv_host=$ac_cv_build
1976 else
1977   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
1978     { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
1979 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
1980    { (exit 1); exit 1; }; }
1981 fi
1982
1983 fi
1984 { echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1985 echo "${ECHO_T}$ac_cv_host" >&6; }
1986 case $ac_cv_host in
1987 *-*-*) ;;
1988 *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
1989 echo "$as_me: error: invalid value of canonical host" >&2;}
1990    { (exit 1); exit 1; }; };;
1991 esac
1992 host=$ac_cv_host
1993 ac_save_IFS=$IFS; IFS='-'
1994 set x $ac_cv_host
1995 shift
1996 host_cpu=$1
1997 host_vendor=$2
1998 shift; shift
1999 # Remember, the first character of IFS is used to create $*,
2000 # except with old shells:
2001 host_os=$*
2002 IFS=$ac_save_IFS
2003 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2004
2005
2006
2007 template=
2008 { echo "$as_me:$LINENO: checking which template to use" >&5
2009 echo $ECHO_N "checking which template to use... $ECHO_C" >&6; }
2010
2011
2012 pgac_args="$pgac_args with_template"
2013
2014
2015 # Check whether --with-template was given.
2016 if test "${with_template+set}" = set; then
2017   withval=$with_template;
2018   case $withval in
2019     yes)
2020       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
2021 echo "$as_me: error: argument required for --with-template option" >&2;}
2022    { (exit 1); exit 1; }; }
2023       ;;
2024     no)
2025       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
2026 echo "$as_me: error: argument required for --with-template option" >&2;}
2027    { (exit 1); exit 1; }; }
2028       ;;
2029     *)
2030
2031   case $withval in
2032     list)   echo; ls "$srcdir/src/template"; exit;;
2033     *)      if test -f "$srcdir/src/template/$with_template" ; then
2034               template=$withval
2035             else
2036               { { echo "$as_me:$LINENO: error: '$withval' is not a valid template name. Use 'list' for a list." >&5
2037 echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a list." >&2;}
2038    { (exit 1); exit 1; }; }
2039             fi;;
2040   esac
2041
2042       ;;
2043   esac
2044
2045 else
2046
2047 # --with-template not given
2048
2049 case $host_os in
2050      aix*) template=aix ;;
2051     bsdi*) template=bsdi ;;
2052   cygwin*) template=cygwin ;;
2053   darwin*) template=darwin ;;
2054     dgux*) template=dgux ;;
2055  freebsd*) template=freebsd ;;
2056     hpux*) template=hpux ;;
2057     irix*) template=irix ;;
2058  linux*|gnu*|k*bsd*-gnu)
2059            template=linux ;;
2060    mingw*) template=win32 ;;
2061   netbsd*) template=netbsd ;;
2062 nextstep*) template=nextstep ;;
2063  openbsd*) template=openbsd ;;
2064      osf*) template=osf ;;
2065      sco*) template=sco ;;
2066  solaris*) template=solaris ;;
2067    sunos*) template=sunos4 ;;
2068  sysv4.2*)
2069         case $host_vendor in
2070           univel) template=univel ;;
2071         esac ;;
2072    sysv4*) template=svr4 ;;
2073    sysv5*) template=unixware ;;
2074   ultrix*) template=ultrix4 ;;
2075 esac
2076
2077   if test x"$template" = x"" ; then
2078     { { echo "$as_me:$LINENO: error:
2079 *******************************************************************
2080 PostgreSQL has apparently not been ported to your platform yet.
2081 To try a manual configuration, look into the src/template directory
2082 for a similar platform and use the '--with-template=' option.
2083
2084 Please also contact <pgsql-bugs@postgresql.org> to see about
2085 rectifying this.  Include the above 'checking host system type...'
2086 line.
2087 *******************************************************************
2088 " >&5
2089 echo "$as_me: error:
2090 *******************************************************************
2091 PostgreSQL has apparently not been ported to your platform yet.
2092 To try a manual configuration, look into the src/template directory
2093 for a similar platform and use the '--with-template=' option.
2094
2095 Please also contact <pgsql-bugs@postgresql.org> to see about
2096 rectifying this.  Include the above 'checking host system type...'
2097 line.
2098 *******************************************************************
2099 " >&2;}
2100    { (exit 1); exit 1; }; }
2101   fi
2102
2103
2104 fi
2105
2106
2107
2108 { echo "$as_me:$LINENO: result: $template" >&5
2109 echo "${ECHO_T}$template" >&6; }
2110
2111 PORTNAME=$template
2112
2113
2114 # Initialize default assumption that we do not need separate assembly code
2115 # for TAS (test-and-set).  This can be overridden by the template file
2116 # when it's executed.
2117 need_tas=no
2118 tas_file=dummy.s
2119
2120
2121
2122 ##
2123 ## Command line options
2124 ##
2125
2126 #
2127 # Add non-standard directories to the include path
2128 #
2129
2130 pgac_args="$pgac_args with_includes"
2131
2132
2133 # Check whether --with-includes was given.
2134 if test "${with_includes+set}" = set; then
2135   withval=$with_includes;
2136   case $withval in
2137     yes)
2138       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
2139 echo "$as_me: error: argument required for --with-includes option" >&2;}
2140    { (exit 1); exit 1; }; }
2141       ;;
2142     no)
2143       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
2144 echo "$as_me: error: argument required for --with-includes option" >&2;}
2145    { (exit 1); exit 1; }; }
2146       ;;
2147     *)
2148
2149       ;;
2150   esac
2151
2152 fi
2153
2154
2155
2156
2157 #
2158 # Add non-standard directories to the library search path
2159 #
2160
2161 pgac_args="$pgac_args with_libraries"
2162
2163
2164 # Check whether --with-libraries was given.
2165 if test "${with_libraries+set}" = set; then
2166   withval=$with_libraries;
2167   case $withval in
2168     yes)
2169       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
2170 echo "$as_me: error: argument required for --with-libraries option" >&2;}
2171    { (exit 1); exit 1; }; }
2172       ;;
2173     no)
2174       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
2175 echo "$as_me: error: argument required for --with-libraries option" >&2;}
2176    { (exit 1); exit 1; }; }
2177       ;;
2178     *)
2179       LIBRARY_DIRS=$withval
2180       ;;
2181   esac
2182
2183 fi
2184
2185
2186
2187
2188 pgac_args="$pgac_args with_libs"
2189
2190
2191 # Check whether --with-libs was given.
2192 if test "${with_libs+set}" = set; then
2193   withval=$with_libs;
2194   case $withval in
2195     yes)
2196       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
2197 echo "$as_me: error: argument required for --with-libs option" >&2;}
2198    { (exit 1); exit 1; }; }
2199       ;;
2200     no)
2201       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
2202 echo "$as_me: error: argument required for --with-libs option" >&2;}
2203    { (exit 1); exit 1; }; }
2204       ;;
2205     *)
2206       LIBRARY_DIRS=$withval
2207       ;;
2208   esac
2209
2210 fi
2211
2212
2213
2214
2215 #
2216 # 64-bit integer date/time storage: enabled by default.
2217 #
2218 { echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time support" >&5
2219 echo $ECHO_N "checking whether to build with 64-bit integer date/time support... $ECHO_C" >&6; }
2220
2221 pgac_args="$pgac_args enable_integer_datetimes"
2222
2223 # Check whether --enable-integer-datetimes was given.
2224 if test "${enable_integer_datetimes+set}" = set; then
2225   enableval=$enable_integer_datetimes;
2226   case $enableval in
2227     yes)
2228
2229 cat >>confdefs.h <<\_ACEOF
2230 #define USE_INTEGER_DATETIMES 1
2231 _ACEOF
2232
2233       ;;
2234     no)
2235       :
2236       ;;
2237     *)
2238       { { echo "$as_me:$LINENO: error: no argument expected for --enable-integer-datetimes option" >&5
2239 echo "$as_me: error: no argument expected for --enable-integer-datetimes option" >&2;}
2240    { (exit 1); exit 1; }; }
2241       ;;
2242   esac
2243
2244 else
2245   enable_integer_datetimes=yes
2246
2247 cat >>confdefs.h <<\_ACEOF
2248 #define USE_INTEGER_DATETIMES 1
2249 _ACEOF
2250
2251 fi
2252
2253
2254 { echo "$as_me:$LINENO: result: $enable_integer_datetimes" >&5
2255 echo "${ECHO_T}$enable_integer_datetimes" >&6; }
2256
2257
2258 #
2259 # NLS
2260 #
2261 { echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
2262 echo $ECHO_N "checking whether NLS is wanted... $ECHO_C" >&6; }
2263
2264 pgac_args="$pgac_args enable_nls"
2265
2266 # Check whether --enable-nls was given.
2267 if test "${enable_nls+set}" = set; then
2268   enableval=$enable_nls;
2269   case $enableval in
2270     yes)
2271       :
2272       ;;
2273     no)
2274       :
2275       ;;
2276     *)
2277       enable_nls=yes
2278 WANTED_LANGUAGES=$enableval
2279       ;;
2280   esac
2281
2282 else
2283   enable_nls=no
2284 fi
2285
2286
2287
2288 if test "$enable_nls" = yes; then
2289
2290 cat >>confdefs.h <<\_ACEOF
2291 #define ENABLE_NLS 1
2292 _ACEOF
2293
2294 fi
2295
2296 { echo "$as_me:$LINENO: result: $enable_nls" >&5
2297 echo "${ECHO_T}$enable_nls" >&6; }
2298
2299
2300
2301 #
2302 # Default port number (--with-pgport), default 5432
2303 #
2304 { echo "$as_me:$LINENO: checking for default port number" >&5
2305 echo $ECHO_N "checking for default port number... $ECHO_C" >&6; }
2306
2307 pgac_args="$pgac_args with_pgport"
2308
2309
2310 # Check whether --with-pgport was given.
2311 if test "${with_pgport+set}" = set; then
2312   withval=$with_pgport;
2313   case $withval in
2314     yes)
2315       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
2316 echo "$as_me: error: argument required for --with-pgport option" >&2;}
2317    { (exit 1); exit 1; }; }
2318       ;;
2319     no)
2320       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
2321 echo "$as_me: error: argument required for --with-pgport option" >&2;}
2322    { (exit 1); exit 1; }; }
2323       ;;
2324     *)
2325       default_port=$withval
2326       ;;
2327   esac
2328
2329 else
2330   default_port=5432
2331 fi
2332
2333
2334 { echo "$as_me:$LINENO: result: $default_port" >&5
2335 echo "${ECHO_T}$default_port" >&6; }
2336 # Need both of these because some places want an integer and some a string
2337
2338 cat >>confdefs.h <<_ACEOF
2339 #define DEF_PGPORT ${default_port}
2340 _ACEOF
2341
2342
2343 cat >>confdefs.h <<_ACEOF
2344 #define DEF_PGPORT_STR "${default_port}"
2345 _ACEOF
2346
2347
2348
2349 #
2350 # Option to disable shared libraries
2351 #
2352
2353 pgac_args="$pgac_args enable_shared"
2354
2355 # Check whether --enable-shared was given.
2356 if test "${enable_shared+set}" = set; then
2357   enableval=$enable_shared;
2358   case $enableval in
2359     yes)
2360       :
2361       ;;
2362     no)
2363       :
2364       ;;
2365     *)
2366       { { echo "$as_me:$LINENO: error: no argument expected for --enable-shared option" >&5
2367 echo "$as_me: error: no argument expected for --enable-shared option" >&2;}
2368    { (exit 1); exit 1; }; }
2369       ;;
2370   esac
2371
2372 else
2373   enable_shared=yes
2374
2375 fi
2376
2377
2378
2379
2380 #
2381 # '-rpath'-like feature can be disabled
2382 #
2383
2384 pgac_args="$pgac_args enable_rpath"
2385
2386 # Check whether --enable-rpath was given.
2387 if test "${enable_rpath+set}" = set; then
2388   enableval=$enable_rpath;
2389   case $enableval in
2390     yes)
2391       :
2392       ;;
2393     no)
2394       :
2395       ;;
2396     *)
2397       { { echo "$as_me:$LINENO: error: no argument expected for --enable-rpath option" >&5
2398 echo "$as_me: error: no argument expected for --enable-rpath option" >&2;}
2399    { (exit 1); exit 1; }; }
2400       ;;
2401   esac
2402
2403 else
2404   enable_rpath=yes
2405
2406 fi
2407
2408
2409
2410
2411 #
2412 # Spinlocks
2413 #
2414
2415 pgac_args="$pgac_args enable_spinlocks"
2416
2417 # Check whether --enable-spinlocks was given.
2418 if test "${enable_spinlocks+set}" = set; then
2419   enableval=$enable_spinlocks;
2420   case $enableval in
2421     yes)
2422       :
2423       ;;
2424     no)
2425       :
2426       ;;
2427     *)
2428       { { echo "$as_me:$LINENO: error: no argument expected for --enable-spinlocks option" >&5
2429 echo "$as_me: error: no argument expected for --enable-spinlocks option" >&2;}
2430    { (exit 1); exit 1; }; }
2431       ;;
2432   esac
2433
2434 else
2435   enable_spinlocks=yes
2436
2437 fi
2438
2439
2440
2441 #
2442 # --enable-debug adds -g to compiler flags
2443 #
2444
2445 pgac_args="$pgac_args enable_debug"
2446
2447 # Check whether --enable-debug was given.
2448 if test "${enable_debug+set}" = set; then
2449   enableval=$enable_debug;
2450   case $enableval in
2451     yes)
2452       :
2453       ;;
2454     no)
2455       :
2456       ;;
2457     *)
2458       { { echo "$as_me:$LINENO: error: no argument expected for --enable-debug option" >&5
2459 echo "$as_me: error: no argument expected for --enable-debug option" >&2;}
2460    { (exit 1); exit 1; }; }
2461       ;;
2462   esac
2463
2464 else
2465   enable_debug=no
2466
2467 fi
2468
2469
2470
2471
2472 #
2473 # --enable-profiling enables gcc profiling
2474 #
2475
2476 pgac_args="$pgac_args enable_profiling"
2477
2478 # Check whether --enable-profiling was given.
2479 if test "${enable_profiling+set}" = set; then
2480   enableval=$enable_profiling;
2481   case $enableval in
2482     yes)
2483       :
2484       ;;
2485     no)
2486       :
2487       ;;
2488     *)
2489       { { echo "$as_me:$LINENO: error: no argument expected for --enable-profiling option" >&5
2490 echo "$as_me: error: no argument expected for --enable-profiling option" >&2;}
2491    { (exit 1); exit 1; }; }
2492       ;;
2493   esac
2494
2495 else
2496   enable_profiling=no
2497
2498 fi
2499
2500
2501
2502
2503 #
2504 # --enable-coverage enables generation of code coverage metrics with gcov
2505 #
2506
2507 pgac_args="$pgac_args enable_coverage"
2508
2509 # Check whether --enable-coverage was given.
2510 if test "${enable_coverage+set}" = set; then
2511   enableval=$enable_coverage;
2512   case $enableval in
2513     yes)
2514       for ac_prog in gcov
2515 do
2516   # Extract the first word of "$ac_prog", so it can be a program name with args.
2517 set dummy $ac_prog; ac_word=$2
2518 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2519 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2520 if test "${ac_cv_prog_GCOV+set}" = set; then
2521   echo $ECHO_N "(cached) $ECHO_C" >&6
2522 else
2523   if test -n "$GCOV"; then
2524   ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
2525 else
2526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2527 for as_dir in $PATH
2528 do
2529   IFS=$as_save_IFS
2530   test -z "$as_dir" && as_dir=.
2531   for ac_exec_ext in '' $ac_executable_extensions; do
2532   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2533     ac_cv_prog_GCOV="$ac_prog"
2534     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2535     break 2
2536   fi
2537 done
2538 done
2539 IFS=$as_save_IFS
2540
2541 fi
2542 fi
2543 GCOV=$ac_cv_prog_GCOV
2544 if test -n "$GCOV"; then
2545   { echo "$as_me:$LINENO: result: $GCOV" >&5
2546 echo "${ECHO_T}$GCOV" >&6; }
2547 else
2548   { echo "$as_me:$LINENO: result: no" >&5
2549 echo "${ECHO_T}no" >&6; }
2550 fi
2551
2552
2553   test -n "$GCOV" && break
2554 done
2555
2556 if test -z "$GCOV"; then
2557   { { echo "$as_me:$LINENO: error: gcov not found" >&5
2558 echo "$as_me: error: gcov not found" >&2;}
2559    { (exit 1); exit 1; }; }
2560 fi
2561 for ac_prog in lcov
2562 do
2563   # Extract the first word of "$ac_prog", so it can be a program name with args.
2564 set dummy $ac_prog; ac_word=$2
2565 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2566 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2567 if test "${ac_cv_prog_LCOV+set}" = set; then
2568   echo $ECHO_N "(cached) $ECHO_C" >&6
2569 else
2570   if test -n "$LCOV"; then
2571   ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
2572 else
2573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2574 for as_dir in $PATH
2575 do
2576   IFS=$as_save_IFS
2577   test -z "$as_dir" && as_dir=.
2578   for ac_exec_ext in '' $ac_executable_extensions; do
2579   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2580     ac_cv_prog_LCOV="$ac_prog"
2581     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2582     break 2
2583   fi
2584 done
2585 done
2586 IFS=$as_save_IFS
2587
2588 fi
2589 fi
2590 LCOV=$ac_cv_prog_LCOV
2591 if test -n "$LCOV"; then
2592   { echo "$as_me:$LINENO: result: $LCOV" >&5
2593 echo "${ECHO_T}$LCOV" >&6; }
2594 else
2595   { echo "$as_me:$LINENO: result: no" >&5
2596 echo "${ECHO_T}no" >&6; }
2597 fi
2598
2599
2600   test -n "$LCOV" && break
2601 done
2602
2603 if test -z "$LCOV"; then
2604   { { echo "$as_me:$LINENO: error: lcov not found" >&5
2605 echo "$as_me: error: lcov not found" >&2;}
2606    { (exit 1); exit 1; }; }
2607 fi
2608 for ac_prog in genhtml
2609 do
2610   # Extract the first word of "$ac_prog", so it can be a program name with args.
2611 set dummy $ac_prog; ac_word=$2
2612 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2613 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2614 if test "${ac_cv_prog_GENHTML+set}" = set; then
2615   echo $ECHO_N "(cached) $ECHO_C" >&6
2616 else
2617   if test -n "$GENHTML"; then
2618   ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
2619 else
2620 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2621 for as_dir in $PATH
2622 do
2623   IFS=$as_save_IFS
2624   test -z "$as_dir" && as_dir=.
2625   for ac_exec_ext in '' $ac_executable_extensions; do
2626   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2627     ac_cv_prog_GENHTML="$ac_prog"
2628     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2629     break 2
2630   fi
2631 done
2632 done
2633 IFS=$as_save_IFS
2634
2635 fi
2636 fi
2637 GENHTML=$ac_cv_prog_GENHTML
2638 if test -n "$GENHTML"; then
2639   { echo "$as_me:$LINENO: result: $GENHTML" >&5
2640 echo "${ECHO_T}$GENHTML" >&6; }
2641 else
2642   { echo "$as_me:$LINENO: result: no" >&5
2643 echo "${ECHO_T}no" >&6; }
2644 fi
2645
2646
2647   test -n "$GENHTML" && break
2648 done
2649
2650 if test -z "$GENHTML"; then
2651   { { echo "$as_me:$LINENO: error: genhtml not found" >&5
2652 echo "$as_me: error: genhtml not found" >&2;}
2653    { (exit 1); exit 1; }; }
2654 fi
2655       ;;
2656     no)
2657       :
2658       ;;
2659     *)
2660       { { echo "$as_me:$LINENO: error: no argument expected for --enable-coverage option" >&5
2661 echo "$as_me: error: no argument expected for --enable-coverage option" >&2;}
2662    { (exit 1); exit 1; }; }
2663       ;;
2664   esac
2665
2666 else
2667   enable_coverage=no
2668
2669 fi
2670
2671
2672
2673
2674 #
2675 # DTrace
2676 #
2677
2678 pgac_args="$pgac_args enable_dtrace"
2679
2680 # Check whether --enable-dtrace was given.
2681 if test "${enable_dtrace+set}" = set; then
2682   enableval=$enable_dtrace;
2683   case $enableval in
2684     yes)
2685
2686 cat >>confdefs.h <<\_ACEOF
2687 #define ENABLE_DTRACE 1
2688 _ACEOF
2689
2690 for ac_prog in dtrace
2691 do
2692   # Extract the first word of "$ac_prog", so it can be a program name with args.
2693 set dummy $ac_prog; ac_word=$2
2694 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2695 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2696 if test "${ac_cv_prog_DTRACE+set}" = set; then
2697   echo $ECHO_N "(cached) $ECHO_C" >&6
2698 else
2699   if test -n "$DTRACE"; then
2700   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
2701 else
2702 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2703 for as_dir in $PATH
2704 do
2705   IFS=$as_save_IFS
2706   test -z "$as_dir" && as_dir=.
2707   for ac_exec_ext in '' $ac_executable_extensions; do
2708   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2709     ac_cv_prog_DTRACE="$ac_prog"
2710     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2711     break 2
2712   fi
2713 done
2714 done
2715 IFS=$as_save_IFS
2716
2717 fi
2718 fi
2719 DTRACE=$ac_cv_prog_DTRACE
2720 if test -n "$DTRACE"; then
2721   { echo "$as_me:$LINENO: result: $DTRACE" >&5
2722 echo "${ECHO_T}$DTRACE" >&6; }
2723 else
2724   { echo "$as_me:$LINENO: result: no" >&5
2725 echo "${ECHO_T}no" >&6; }
2726 fi
2727
2728
2729   test -n "$DTRACE" && break
2730 done
2731
2732 if test -z "$DTRACE"; then
2733   { { echo "$as_me:$LINENO: error: dtrace not found" >&5
2734 echo "$as_me: error: dtrace not found" >&2;}
2735    { (exit 1); exit 1; }; }
2736 fi
2737
2738       ;;
2739     no)
2740       :
2741       ;;
2742     *)
2743       { { echo "$as_me:$LINENO: error: no argument expected for --enable-dtrace option" >&5
2744 echo "$as_me: error: no argument expected for --enable-dtrace option" >&2;}
2745    { (exit 1); exit 1; }; }
2746       ;;
2747   esac
2748
2749 else
2750   enable_dtrace=no
2751
2752 fi
2753
2754
2755
2756
2757 #
2758 # Block size
2759 #
2760 { echo "$as_me:$LINENO: checking for block size" >&5
2761 echo $ECHO_N "checking for block size... $ECHO_C" >&6; }
2762
2763 pgac_args="$pgac_args with_blocksize"
2764
2765
2766 # Check whether --with-blocksize was given.
2767 if test "${with_blocksize+set}" = set; then
2768   withval=$with_blocksize;
2769   case $withval in
2770     yes)
2771       { { echo "$as_me:$LINENO: error: argument required for --with-blocksize option" >&5
2772 echo "$as_me: error: argument required for --with-blocksize option" >&2;}
2773    { (exit 1); exit 1; }; }
2774       ;;
2775     no)
2776       { { echo "$as_me:$LINENO: error: argument required for --with-blocksize option" >&5
2777 echo "$as_me: error: argument required for --with-blocksize option" >&2;}
2778    { (exit 1); exit 1; }; }
2779       ;;
2780     *)
2781       blocksize=$withval
2782       ;;
2783   esac
2784
2785 else
2786   blocksize=8
2787 fi
2788
2789
2790 case ${blocksize} in
2791   1) BLCKSZ=1024;;
2792   2) BLCKSZ=2048;;
2793   4) BLCKSZ=4096;;
2794   8) BLCKSZ=8192;;
2795  16) BLCKSZ=16384;;
2796  32) BLCKSZ=32768;;
2797   *) { { echo "$as_me:$LINENO: error: Invalid block size. Allowed values are 1,2,4,8,16,32." >&5
2798 echo "$as_me: error: Invalid block size. Allowed values are 1,2,4,8,16,32." >&2;}
2799    { (exit 1); exit 1; }; }
2800 esac
2801 { echo "$as_me:$LINENO: result: ${blocksize}kB" >&5
2802 echo "${ECHO_T}${blocksize}kB" >&6; }
2803
2804
2805 cat >>confdefs.h <<_ACEOF
2806 #define BLCKSZ ${BLCKSZ}
2807 _ACEOF
2808
2809
2810 #
2811 # Relation segment size
2812 #
2813 { echo "$as_me:$LINENO: checking for segment size" >&5
2814 echo $ECHO_N "checking for segment size... $ECHO_C" >&6; }
2815
2816 pgac_args="$pgac_args with_segsize"
2817
2818
2819 # Check whether --with-segsize was given.
2820 if test "${with_segsize+set}" = set; then
2821   withval=$with_segsize;
2822   case $withval in
2823     yes)
2824       { { echo "$as_me:$LINENO: error: argument required for --with-segsize option" >&5
2825 echo "$as_me: error: argument required for --with-segsize option" >&2;}
2826    { (exit 1); exit 1; }; }
2827       ;;
2828     no)
2829       { { echo "$as_me:$LINENO: error: argument required for --with-segsize option" >&5
2830 echo "$as_me: error: argument required for --with-segsize option" >&2;}
2831    { (exit 1); exit 1; }; }
2832       ;;
2833     *)
2834       segsize=$withval
2835       ;;
2836   esac
2837
2838 else
2839   segsize=1
2840 fi
2841
2842
2843 # this expression is set up to avoid unnecessary integer overflow
2844 # blocksize is already guaranteed to be a factor of 1024
2845 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
2846 test $? -eq 0 || exit 1
2847 { echo "$as_me:$LINENO: result: ${segsize}GB" >&5
2848 echo "${ECHO_T}${segsize}GB" >&6; }
2849
2850
2851 cat >>confdefs.h <<_ACEOF
2852 #define RELSEG_SIZE ${RELSEG_SIZE}
2853 _ACEOF
2854
2855
2856 #
2857 # WAL block size
2858 #
2859 { echo "$as_me:$LINENO: checking for WAL block size" >&5
2860 echo $ECHO_N "checking for WAL block size... $ECHO_C" >&6; }
2861
2862 pgac_args="$pgac_args with_wal_blocksize"
2863
2864
2865 # Check whether --with-wal-blocksize was given.
2866 if test "${with_wal_blocksize+set}" = set; then
2867   withval=$with_wal_blocksize;
2868   case $withval in
2869     yes)
2870       { { echo "$as_me:$LINENO: error: argument required for --with-wal-blocksize option" >&5
2871 echo "$as_me: error: argument required for --with-wal-blocksize option" >&2;}
2872    { (exit 1); exit 1; }; }
2873       ;;
2874     no)
2875       { { echo "$as_me:$LINENO: error: argument required for --with-wal-blocksize option" >&5
2876 echo "$as_me: error: argument required for --with-wal-blocksize option" >&2;}
2877    { (exit 1); exit 1; }; }
2878       ;;
2879     *)
2880       wal_blocksize=$withval
2881       ;;
2882   esac
2883
2884 else
2885   wal_blocksize=8
2886 fi
2887
2888
2889 case ${wal_blocksize} in
2890   1) XLOG_BLCKSZ=1024;;
2891   2) XLOG_BLCKSZ=2048;;
2892   4) XLOG_BLCKSZ=4096;;
2893   8) XLOG_BLCKSZ=8192;;
2894  16) XLOG_BLCKSZ=16384;;
2895  32) XLOG_BLCKSZ=32768;;
2896  64) XLOG_BLCKSZ=65536;;
2897   *) { { echo "$as_me:$LINENO: error: Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." >&5
2898 echo "$as_me: error: Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." >&2;}
2899    { (exit 1); exit 1; }; }
2900 esac
2901 { echo "$as_me:$LINENO: result: ${wal_blocksize}kB" >&5
2902 echo "${ECHO_T}${wal_blocksize}kB" >&6; }
2903
2904
2905 cat >>confdefs.h <<_ACEOF
2906 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
2907 _ACEOF
2908
2909
2910 #
2911 # WAL segment size
2912 #
2913 { echo "$as_me:$LINENO: checking for WAL segment size" >&5
2914 echo $ECHO_N "checking for WAL segment size... $ECHO_C" >&6; }
2915
2916 pgac_args="$pgac_args with_wal_segsize"
2917
2918
2919 # Check whether --with-wal-segsize was given.
2920 if test "${with_wal_segsize+set}" = set; then
2921   withval=$with_wal_segsize;
2922   case $withval in
2923     yes)
2924       { { echo "$as_me:$LINENO: error: argument required for --with-wal-segsize option" >&5
2925 echo "$as_me: error: argument required for --with-wal-segsize option" >&2;}
2926    { (exit 1); exit 1; }; }
2927       ;;
2928     no)
2929       { { echo "$as_me:$LINENO: error: argument required for --with-wal-segsize option" >&5
2930 echo "$as_me: error: argument required for --with-wal-segsize option" >&2;}
2931    { (exit 1); exit 1; }; }
2932       ;;
2933     *)
2934       wal_segsize=$withval
2935       ;;
2936   esac
2937
2938 else
2939   wal_segsize=16
2940 fi
2941
2942
2943 case ${wal_segsize} in
2944   1) ;;
2945   2) ;;
2946   4) ;;
2947   8) ;;
2948  16) ;;
2949  32) ;;
2950  64) ;;
2951   *) { { echo "$as_me:$LINENO: error: Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." >&5
2952 echo "$as_me: error: Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." >&2;}
2953    { (exit 1); exit 1; }; }
2954 esac
2955 { echo "$as_me:$LINENO: result: ${wal_segsize}MB" >&5
2956 echo "${ECHO_T}${wal_segsize}MB" >&6; }
2957
2958
2959 cat >>confdefs.h <<_ACEOF
2960 #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
2961 _ACEOF
2962
2963
2964 #
2965 # C compiler
2966 #
2967
2968 # For historical reasons you can also use --with-CC to specify the C compiler
2969 # to use, although the standard way to do this is to set the CC environment
2970 # variable.
2971
2972 pgac_args="$pgac_args with_CC"
2973
2974
2975 # Check whether --with-CC was given.
2976 if test "${with_CC+set}" = set; then
2977   withval=$with_CC;
2978   case $withval in
2979     yes)
2980       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
2981 echo "$as_me: error: argument required for --with-CC option" >&2;}
2982    { (exit 1); exit 1; }; }
2983       ;;
2984     no)
2985       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
2986 echo "$as_me: error: argument required for --with-CC option" >&2;}
2987    { (exit 1); exit 1; }; }
2988       ;;
2989     *)
2990       CC=$with_CC
2991       ;;
2992   esac
2993
2994 fi
2995
2996
2997
2998 case $template in
2999   aix) pgac_cc_list="gcc xlc";;
3000  irix) pgac_cc_list="cc";; # no gcc
3001     *) pgac_cc_list="gcc cc";;
3002 esac
3003
3004 ac_ext=c
3005 ac_cpp='$CPP $CPPFLAGS'
3006 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3007 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3008 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3009 if test -n "$ac_tool_prefix"; then
3010   for ac_prog in $pgac_cc_list
3011   do
3012     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3013 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3014 { echo "$as_me:$LINENO: checking for $ac_word" >&5
3015 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3016 if test "${ac_cv_prog_CC+set}" = set; then
3017   echo $ECHO_N "(cached) $ECHO_C" >&6
3018 else
3019   if test -n "$CC"; then
3020   ac_cv_prog_CC="$CC" # Let the user override the test.
3021 else
3022 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3023 for as_dir in $PATH
3024 do
3025   IFS=$as_save_IFS
3026   test -z "$as_dir" && as_dir=.
3027   for ac_exec_ext in '' $ac_executable_extensions; do
3028   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3029     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3030     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3031     break 2
3032   fi
3033 done
3034 done
3035 IFS=$as_save_IFS
3036
3037 fi
3038 fi
3039 CC=$ac_cv_prog_CC
3040 if test -n "$CC"; then
3041   { echo "$as_me:$LINENO: result: $CC" >&5
3042 echo "${ECHO_T}$CC" >&6; }
3043 else
3044   { echo "$as_me:$LINENO: result: no" >&5
3045 echo "${ECHO_T}no" >&6; }
3046 fi
3047
3048
3049     test -n "$CC" && break
3050   done
3051 fi
3052 if test -z "$CC"; then
3053   ac_ct_CC=$CC
3054   for ac_prog in $pgac_cc_list
3055 do
3056   # Extract the first word of "$ac_prog", so it can be a program name with args.
3057 set dummy $ac_prog; ac_word=$2
3058 { echo "$as_me:$LINENO: checking for $ac_word" >&5
3059 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3060 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3061   echo $ECHO_N "(cached) $ECHO_C" >&6
3062 else
3063   if test -n "$ac_ct_CC"; then
3064   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3065 else
3066 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3067 for as_dir in $PATH
3068 do
3069   IFS=$as_save_IFS
3070   test -z "$as_dir" && as_dir=.
3071   for ac_exec_ext in '' $ac_executable_extensions; do
3072   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3073     ac_cv_prog_ac_ct_CC="$ac_prog"
3074     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3075     break 2
3076   fi
3077 done
3078 done
3079 IFS=$as_save_IFS
3080
3081 fi
3082 fi
3083 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3084 if test -n "$ac_ct_CC"; then
3085   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3086 echo "${ECHO_T}$ac_ct_CC" >&6; }
3087 else
3088   { echo "$as_me:$LINENO: result: no" >&5
3089 echo "${ECHO_T}no" >&6; }
3090 fi
3091
3092
3093   test -n "$ac_ct_CC" && break
3094 done
3095
3096   if test "x$ac_ct_CC" = x; then
3097     CC=""
3098   else
3099     case $cross_compiling:$ac_tool_warned in
3100 yes:)
3101 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3102 whose name does not start with the host triplet.  If you think this
3103 configuration is useful to you, please write to autoconf@gnu.org." >&5
3104 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3105 whose name does not start with the host triplet.  If you think this
3106 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3107 ac_tool_warned=yes ;;
3108 esac
3109     CC=$ac_ct_CC
3110   fi
3111 fi
3112
3113
3114 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3115 See \`config.log' for more details." >&5
3116 echo "$as_me: error: no acceptable C compiler found in \$PATH
3117 See \`config.log' for more details." >&2;}
3118    { (exit 1); exit 1; }; }
3119
3120 # Provide some information about the compiler.
3121 echo "$as_me:$LINENO: checking for C compiler version" >&5
3122 ac_compiler=`set X $ac_compile; echo $2`
3123 { (ac_try="$ac_compiler --version >&5"
3124 case "(($ac_try" in
3125   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3126   *) ac_try_echo=$ac_try;;
3127 esac
3128 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3129   (eval "$ac_compiler --version >&5") 2>&5
3130   ac_status=$?
3131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3132   (exit $ac_status); }
3133 { (ac_try="$ac_compiler -v >&5"
3134 case "(($ac_try" in
3135   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3136   *) ac_try_echo=$ac_try;;
3137 esac
3138 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3139   (eval "$ac_compiler -v >&5") 2>&5
3140   ac_status=$?
3141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3142   (exit $ac_status); }
3143 { (ac_try="$ac_compiler -V >&5"
3144 case "(($ac_try" in
3145   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3146   *) ac_try_echo=$ac_try;;
3147 esac
3148 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3149   (eval "$ac_compiler -V >&5") 2>&5
3150   ac_status=$?
3151   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3152   (exit $ac_status); }
3153
3154 cat >conftest.$ac_ext <<_ACEOF
3155 /* confdefs.h.  */
3156 _ACEOF
3157 cat confdefs.h >>conftest.$ac_ext
3158 cat >>conftest.$ac_ext <<_ACEOF
3159 /* end confdefs.h.  */
3160
3161 int
3162 main ()
3163 {
3164
3165   ;
3166   return 0;
3167 }
3168 _ACEOF
3169 ac_clean_files_save=$ac_clean_files
3170 ac_clean_files="$ac_clean_files a.out a.exe b.out"
3171 # Try to create an executable without -o first, disregard a.out.
3172 # It will help us diagnose broken compilers, and finding out an intuition
3173 # of exeext.
3174 { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3175 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
3176 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3177 #
3178 # List of possible output files, starting from the most likely.
3179 # The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
3180 # only as a last resort.  b.out is created by i960 compilers.
3181 ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
3182 #
3183 # The IRIX 6 linker writes into existing files which may not be
3184 # executable, retaining their permissions.  Remove them first so a
3185 # subsequent execution test works.
3186 ac_rmfiles=
3187 for ac_file in $ac_files
3188 do
3189   case $ac_file in
3190     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3191     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3192   esac
3193 done
3194 rm -f $ac_rmfiles
3195
3196 if { (ac_try="$ac_link_default"
3197 case "(($ac_try" in
3198   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3199   *) ac_try_echo=$ac_try;;
3200 esac
3201 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3202   (eval "$ac_link_default") 2>&5
3203   ac_status=$?
3204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3205   (exit $ac_status); }; then
3206   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3207 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3208 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3209 # so that the user can short-circuit this test for compilers unknown to
3210 # Autoconf.
3211 for ac_file in $ac_files ''
3212 do
3213   test -f "$ac_file" || continue
3214   case $ac_file in
3215     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
3216         ;;
3217     [ab].out )
3218         # We found the default executable, but exeext='' is most
3219         # certainly right.
3220         break;;
3221     *.* )
3222         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3223         then :; else
3224            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3225         fi
3226         # We set ac_cv_exeext here because the later test for it is not
3227         # safe: cross compilers may not add the suffix if given an `-o'
3228         # argument, so we may need to know it at that point already.
3229         # Even if this section looks crufty: it has the advantage of
3230         # actually working.
3231         break;;
3232     * )
3233         break;;
3234   esac
3235 done
3236 test "$ac_cv_exeext" = no && ac_cv_exeext=
3237
3238 else
3239   ac_file=''
3240 fi
3241
3242 { echo "$as_me:$LINENO: result: $ac_file" >&5
3243 echo "${ECHO_T}$ac_file" >&6; }
3244 if test -z "$ac_file"; then
3245   echo "$as_me: failed program was:" >&5
3246 sed 's/^/| /' conftest.$ac_ext >&5
3247
3248 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
3249 See \`config.log' for more details." >&5
3250 echo "$as_me: error: C compiler cannot create executables
3251 See \`config.log' for more details." >&2;}
3252    { (exit 77); exit 77; }; }
3253 fi
3254
3255 ac_exeext=$ac_cv_exeext
3256
3257 # Check that the compiler produces executables we can run.  If not, either
3258 # the compiler is broken, or we cross compile.
3259 { echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3260 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
3261 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3262 # If not cross compiling, check that we can run a simple program.
3263 if test "$cross_compiling" != yes; then
3264   if { ac_try='./$ac_file'
3265   { (case "(($ac_try" in
3266   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3267   *) ac_try_echo=$ac_try;;
3268 esac
3269 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3270   (eval "$ac_try") 2>&5
3271   ac_status=$?
3272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3273   (exit $ac_status); }; }; then
3274     cross_compiling=no
3275   else
3276     if test "$cross_compiling" = maybe; then
3277         cross_compiling=yes
3278     else
3279         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
3280 If you meant to cross compile, use \`--host'.
3281 See \`config.log' for more details." >&5
3282 echo "$as_me: error: cannot run C compiled programs.
3283 If you meant to cross compile, use \`--host'.
3284 See \`config.log' for more details." >&2;}
3285    { (exit 1); exit 1; }; }
3286     fi
3287   fi
3288 fi
3289 { echo "$as_me:$LINENO: result: yes" >&5
3290 echo "${ECHO_T}yes" >&6; }
3291
3292 rm -f a.out a.exe conftest$ac_cv_exeext b.out
3293 ac_clean_files=$ac_clean_files_save
3294 # Check that the compiler produces executables we can run.  If not, either
3295 # the compiler is broken, or we cross compile.
3296 { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3297 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3298 { echo "$as_me:$LINENO: result: $cross_compiling" >&5
3299 echo "${ECHO_T}$cross_compiling" >&6; }
3300
3301 { echo "$as_me:$LINENO: checking for suffix of executables" >&5
3302 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
3303 if { (ac_try="$ac_link"
3304 case "(($ac_try" in
3305   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3306   *) ac_try_echo=$ac_try;;
3307 esac
3308 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3309   (eval "$ac_link") 2>&5
3310   ac_status=$?
3311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3312   (exit $ac_status); }; then
3313   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3314 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3315 # work properly (i.e., refer to `conftest.exe'), while it won't with
3316 # `rm'.
3317 for ac_file in conftest.exe conftest conftest.*; do
3318   test -f "$ac_file" || continue
3319   case $ac_file in
3320     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3321     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3322           break;;
3323     * ) break;;
3324   esac
3325 done
3326 else
3327   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3328 See \`config.log' for more details." >&5
3329 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3330 See \`config.log' for more details." >&2;}
3331    { (exit 1); exit 1; }; }
3332 fi
3333
3334 rm -f conftest$ac_cv_exeext
3335 { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3336 echo "${ECHO_T}$ac_cv_exeext" >&6; }
3337
3338 rm -f conftest.$ac_ext
3339 EXEEXT=$ac_cv_exeext
3340 ac_exeext=$EXEEXT
3341 { echo "$as_me:$LINENO: checking for suffix of object files" >&5
3342 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
3343 if test "${ac_cv_objext+set}" = set; then
3344   echo $ECHO_N "(cached) $ECHO_C" >&6
3345 else
3346   cat >conftest.$ac_ext <<_ACEOF
3347 /* confdefs.h.  */
3348 _ACEOF
3349 cat confdefs.h >>conftest.$ac_ext
3350 cat >>conftest.$ac_ext <<_ACEOF
3351 /* end confdefs.h.  */
3352
3353 int
3354 main ()
3355 {
3356
3357   ;
3358   return 0;
3359 }
3360 _ACEOF
3361 rm -f conftest.o conftest.obj
3362 if { (ac_try="$ac_compile"
3363 case "(($ac_try" in
3364   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3365   *) ac_try_echo=$ac_try;;
3366 esac
3367 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3368   (eval "$ac_compile") 2>&5
3369   ac_status=$?
3370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3371   (exit $ac_status); }; then
3372   for ac_file in conftest.o conftest.obj conftest.*; do
3373   test -f "$ac_file" || continue;
3374   case $ac_file in
3375     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
3376     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3377        break;;
3378   esac
3379 done
3380 else
3381   echo "$as_me: failed program was:" >&5
3382 sed 's/^/| /' conftest.$ac_ext >&5
3383
3384 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3385 See \`config.log' for more details." >&5
3386 echo "$as_me: error: cannot compute suffix of object files: cannot compile
3387 See \`config.log' for more details." >&2;}
3388    { (exit 1); exit 1; }; }
3389 fi
3390
3391 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3392 fi
3393 { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3394 echo "${ECHO_T}$ac_cv_objext" >&6; }
3395 OBJEXT=$ac_cv_objext
3396 ac_objext=$OBJEXT
3397 { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3398 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
3399 if test "${ac_cv_c_compiler_gnu+set}" = set; then
3400   echo $ECHO_N "(cached) $ECHO_C" >&6
3401 else
3402   cat >conftest.$ac_ext <<_ACEOF
3403 /* confdefs.h.  */
3404 _ACEOF
3405 cat confdefs.h >>conftest.$ac_ext
3406 cat >>conftest.$ac_ext <<_ACEOF
3407 /* end confdefs.h.  */
3408
3409 int
3410 main ()
3411 {
3412 #ifndef __GNUC__
3413        choke me
3414 #endif
3415
3416   ;
3417   return 0;
3418 }
3419 _ACEOF
3420 rm -f conftest.$ac_objext
3421 if { (ac_try="$ac_compile"
3422 case "(($ac_try" in
3423   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3424   *) ac_try_echo=$ac_try;;
3425 esac
3426 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3427   (eval "$ac_compile") 2>conftest.er1
3428   ac_status=$?
3429   grep -v '^ *+' conftest.er1 >conftest.err
3430   rm -f conftest.er1
3431   cat conftest.err >&5
3432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3433   (exit $ac_status); } && {
3434          test -z "$ac_c_werror_flag" ||
3435          test ! -s conftest.err
3436        } && test -s conftest.$ac_objext; then
3437   ac_compiler_gnu=yes
3438 else
3439   echo "$as_me: failed program was:" >&5
3440 sed 's/^/| /' conftest.$ac_ext >&5
3441
3442         ac_compiler_gnu=no
3443 fi
3444
3445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3446 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3447
3448 fi
3449 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3450 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3451 GCC=`test $ac_compiler_gnu = yes && echo yes`
3452 ac_test_CFLAGS=${CFLAGS+set}
3453 ac_save_CFLAGS=$CFLAGS
3454 { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3455 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
3456 if test "${ac_cv_prog_cc_g+set}" = set; then
3457   echo $ECHO_N "(cached) $ECHO_C" >&6
3458 else
3459   ac_save_c_werror_flag=$ac_c_werror_flag
3460    ac_c_werror_flag=yes
3461    ac_cv_prog_cc_g=no
3462    CFLAGS="-g"
3463    cat >conftest.$ac_ext <<_ACEOF
3464 /* confdefs.h.  */
3465 _ACEOF
3466 cat confdefs.h >>conftest.$ac_ext
3467 cat >>conftest.$ac_ext <<_ACEOF
3468 /* end confdefs.h.  */
3469
3470 int
3471 main ()
3472 {
3473
3474   ;
3475   return 0;
3476 }
3477 _ACEOF
3478 rm -f conftest.$ac_objext
3479 if { (ac_try="$ac_compile"
3480 case "(($ac_try" in
3481   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3482   *) ac_try_echo=$ac_try;;
3483 esac
3484 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3485   (eval "$ac_compile") 2>conftest.er1
3486   ac_status=$?
3487   grep -v '^ *+' conftest.er1 >conftest.err
3488   rm -f conftest.er1
3489   cat conftest.err >&5
3490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3491   (exit $ac_status); } && {
3492          test -z "$ac_c_werror_flag" ||
3493          test ! -s conftest.err
3494        } && test -s conftest.$ac_objext; then
3495   ac_cv_prog_cc_g=yes
3496 else
3497   echo "$as_me: failed program was:" >&5
3498 sed 's/^/| /' conftest.$ac_ext >&5
3499
3500         CFLAGS=""
3501       cat >conftest.$ac_ext <<_ACEOF
3502 /* confdefs.h.  */
3503 _ACEOF
3504 cat confdefs.h >>conftest.$ac_ext
3505 cat >>conftest.$ac_ext <<_ACEOF
3506 /* end confdefs.h.  */
3507
3508 int
3509 main ()
3510 {
3511
3512   ;
3513   return 0;
3514 }
3515 _ACEOF
3516 rm -f conftest.$ac_objext
3517 if { (ac_try="$ac_compile"
3518 case "(($ac_try" in
3519   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3520   *) ac_try_echo=$ac_try;;
3521 esac
3522 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3523   (eval "$ac_compile") 2>conftest.er1
3524   ac_status=$?
3525   grep -v '^ *+' conftest.er1 >conftest.err
3526   rm -f conftest.er1
3527   cat conftest.err >&5
3528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3529   (exit $ac_status); } && {
3530          test -z "$ac_c_werror_flag" ||
3531          test ! -s conftest.err
3532        } && test -s conftest.$ac_objext; then
3533   :
3534 else
3535   echo "$as_me: failed program was:" >&5
3536 sed 's/^/| /' conftest.$ac_ext >&5
3537
3538         ac_c_werror_flag=$ac_save_c_werror_flag
3539          CFLAGS="-g"
3540          cat >conftest.$ac_ext <<_ACEOF
3541 /* confdefs.h.  */
3542 _ACEOF
3543 cat confdefs.h >>conftest.$ac_ext
3544 cat >>conftest.$ac_ext <<_ACEOF
3545 /* end confdefs.h.  */
3546
3547 int
3548 main ()
3549 {
3550
3551   ;
3552   return 0;
3553 }
3554 _ACEOF
3555 rm -f conftest.$ac_objext
3556 if { (ac_try="$ac_compile"
3557 case "(($ac_try" in
3558   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3559   *) ac_try_echo=$ac_try;;
3560 esac
3561 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3562   (eval "$ac_compile") 2>conftest.er1
3563   ac_status=$?
3564   grep -v '^ *+' conftest.er1 >conftest.err
3565   rm -f conftest.er1
3566   cat conftest.err >&5
3567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3568   (exit $ac_status); } && {
3569          test -z "$ac_c_werror_flag" ||
3570          test ! -s conftest.err
3571        } && test -s conftest.$ac_objext; then
3572   ac_cv_prog_cc_g=yes
3573 else
3574   echo "$as_me: failed program was:" >&5
3575 sed 's/^/| /' conftest.$ac_ext >&5
3576
3577
3578 fi
3579
3580 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3581 fi
3582
3583 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3584 fi
3585
3586 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3587    ac_c_werror_flag=$ac_save_c_werror_flag
3588 fi
3589 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3590 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3591 if test "$ac_test_CFLAGS" = set; then
3592   CFLAGS=$ac_save_CFLAGS
3593 elif test $ac_cv_prog_cc_g = yes; then
3594   if test "$GCC" = yes; then
3595     CFLAGS="-g -O2"
3596   else
3597     CFLAGS="-g"
3598   fi
3599 else
3600   if test "$GCC" = yes; then
3601     CFLAGS="-O2"
3602   else
3603     CFLAGS=
3604   fi
3605 fi
3606 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3607 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3608 if test "${ac_cv_prog_cc_c89+set}" = set; then
3609   echo $ECHO_N "(cached) $ECHO_C" >&6
3610 else
3611   ac_cv_prog_cc_c89=no
3612 ac_save_CC=$CC
3613 cat >conftest.$ac_ext <<_ACEOF
3614 /* confdefs.h.  */
3615 _ACEOF
3616 cat confdefs.h >>conftest.$ac_ext
3617 cat >>conftest.$ac_ext <<_ACEOF
3618 /* end confdefs.h.  */
3619 #include <stdarg.h>
3620 #include <stdio.h>
3621 #include <sys/types.h>
3622 #include <sys/stat.h>
3623 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3624 struct buf { int x; };
3625 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3626 static char *e (p, i)
3627      char **p;
3628      int i;
3629 {
3630   return p[i];
3631 }
3632 static char *f (char * (*g) (char **, int), char **p, ...)
3633 {
3634   char *s;
3635   va_list v;
3636   va_start (v,p);
3637   s = g (p, va_arg (v,int));
3638   va_end (v);
3639   return s;
3640 }
3641
3642 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3643    function prototypes and stuff, but not '\xHH' hex character constants.
3644    These don't provoke an error unfortunately, instead are silently treated
3645    as 'x'.  The following induces an error, until -std is added to get
3646    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3647    array size at least.  It's necessary to write '\x00'==0 to get something
3648    that's true only with -std.  */
3649 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3650
3651 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3652    inside strings and character constants.  */
3653 #define FOO(x) 'x'
3654 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3655
3656 int test (int i, double x);
3657 struct s1 {int (*f) (int a);};
3658 struct s2 {int (*f) (double a);};
3659 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3660 int argc;
3661 char **argv;
3662 int
3663 main ()
3664 {
3665 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3666   ;
3667   return 0;
3668 }
3669 _ACEOF
3670 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3671         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3672 do
3673   CC="$ac_save_CC $ac_arg"
3674   rm -f conftest.$ac_objext
3675 if { (ac_try="$ac_compile"
3676 case "(($ac_try" in
3677   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3678   *) ac_try_echo=$ac_try;;
3679 esac
3680 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3681   (eval "$ac_compile") 2>conftest.er1
3682   ac_status=$?
3683   grep -v '^ *+' conftest.er1 >conftest.err
3684   rm -f conftest.er1
3685   cat conftest.err >&5
3686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3687   (exit $ac_status); } && {
3688          test -z "$ac_c_werror_flag" ||
3689          test ! -s conftest.err
3690        } && test -s conftest.$ac_objext; then
3691   ac_cv_prog_cc_c89=$ac_arg
3692 else
3693   echo "$as_me: failed program was:" >&5
3694 sed 's/^/| /' conftest.$ac_ext >&5
3695
3696
3697 fi
3698
3699 rm -f core conftest.err conftest.$ac_objext
3700   test "x$ac_cv_prog_cc_c89" != "xno" && break
3701 done
3702 rm -f conftest.$ac_ext
3703 CC=$ac_save_CC
3704
3705 fi
3706 # AC_CACHE_VAL
3707 case "x$ac_cv_prog_cc_c89" in
3708   x)
3709     { echo "$as_me:$LINENO: result: none needed" >&5
3710 echo "${ECHO_T}none needed" >&6; } ;;
3711   xno)
3712     { echo "$as_me:$LINENO: result: unsupported" >&5
3713 echo "${ECHO_T}unsupported" >&6; } ;;
3714   *)
3715     CC="$CC $ac_cv_prog_cc_c89"
3716     { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3717 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3718 esac
3719
3720
3721 ac_ext=c
3722 ac_cpp='$CPP $CPPFLAGS'
3723 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3724 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3725 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3726
3727
3728 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
3729 # but has idiosyncrasies of its own.  We assume icc will define
3730 # __INTEL_COMPILER regardless of CFLAGS.
3731
3732 cat >conftest.$ac_ext <<_ACEOF
3733 /* confdefs.h.  */
3734 _ACEOF
3735 cat confdefs.h >>conftest.$ac_ext
3736 cat >>conftest.$ac_ext <<_ACEOF
3737 /* end confdefs.h.  */
3738
3739 int
3740 main ()
3741 {
3742 #ifndef __INTEL_COMPILER
3743 choke me
3744 #endif
3745   ;
3746   return 0;
3747 }
3748 _ACEOF
3749 rm -f conftest.$ac_objext
3750 if { (ac_try="$ac_compile"
3751 case "(($ac_try" in
3752   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3753   *) ac_try_echo=$ac_try;;
3754 esac
3755 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3756   (eval "$ac_compile") 2>conftest.er1
3757   ac_status=$?
3758   grep -v '^ *+' conftest.er1 >conftest.err
3759   rm -f conftest.er1
3760   cat conftest.err >&5
3761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3762   (exit $ac_status); } && {
3763          test -z "$ac_c_werror_flag" ||
3764          test ! -s conftest.err
3765        } && test -s conftest.$ac_objext; then
3766   ICC=yes
3767 else
3768   echo "$as_me: failed program was:" >&5
3769 sed 's/^/| /' conftest.$ac_ext >&5
3770
3771         ICC=no
3772 fi
3773
3774 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3775
3776 # Check if it's Sun Studio compiler. We assume that
3777 # __SUNPRO_C will be defined for Sun Studio compilers
3778 cat >conftest.$ac_ext <<_ACEOF
3779 /* confdefs.h.  */
3780 _ACEOF
3781 cat confdefs.h >>conftest.$ac_ext
3782 cat >>conftest.$ac_ext <<_ACEOF
3783 /* end confdefs.h.  */
3784
3785 int
3786 main ()
3787 {
3788 #ifndef __SUNPRO_C
3789 choke me
3790 #endif
3791   ;
3792   return 0;
3793 }
3794 _ACEOF
3795 rm -f conftest.$ac_objext
3796 if { (ac_try="$ac_compile"
3797 case "(($ac_try" in
3798   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3799   *) ac_try_echo=$ac_try;;
3800 esac
3801 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3802   (eval "$ac_compile") 2>conftest.er1
3803   ac_status=$?
3804   grep -v '^ *+' conftest.er1 >conftest.err
3805   rm -f conftest.er1
3806   cat conftest.err >&5
3807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3808   (exit $ac_status); } && {
3809          test -z "$ac_c_werror_flag" ||
3810          test ! -s conftest.err
3811        } && test -s conftest.$ac_objext; then
3812   SUN_STUDIO_CC=yes
3813 else
3814   echo "$as_me: failed program was:" >&5
3815 sed 's/^/| /' conftest.$ac_ext >&5
3816
3817         SUN_STUDIO_CC=no
3818 fi
3819
3820 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3821
3822
3823
3824 unset CFLAGS
3825
3826 #
3827 # Read the template
3828 #
3829 . "$srcdir/src/template/$template" || exit
3830
3831 # CFLAGS are selected so:
3832 # If the user specifies something in the environment, that is used.
3833 # else:  If the template file set something, that is used.
3834 # else:  If coverage was enabled, don't set anything.
3835 # else:  If the compiler is GCC, then we use -O2.
3836 # else:  If the compiler is something else, then we use -O, unless debugging.
3837
3838 if test "$ac_env_CFLAGS_set" = set; then
3839   CFLAGS=$ac_env_CFLAGS_value
3840 elif test "${CFLAGS+set}" = set; then
3841   : # (keep what template set)
3842 elif test "$enable_coverage" = yes; then
3843   : # no optimization by default
3844 elif test "$GCC" = yes; then
3845   CFLAGS="-O2"
3846 else
3847   # if the user selected debug mode, don't use -O
3848   if test "$enable_debug" != yes; then
3849     CFLAGS="-O"
3850   fi
3851 fi
3852
3853 # Some versions of GCC support some additional useful warning flags.
3854 # Check whether they are supported, and add them to CFLAGS if so.
3855 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
3856 # but has its own.  Also check other compiler-specific flags here.
3857
3858 if test "$GCC" = yes -a "$ICC" = no; then
3859   CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith"
3860   # These work in some but not all gcc versions
3861   { echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5
3862 echo $ECHO_N "checking if $CC supports -Wdeclaration-after-statement... $ECHO_C" >&6; }
3863 pgac_save_CFLAGS=$CFLAGS
3864 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
3865 cat >conftest.$ac_ext <<_ACEOF
3866 /* confdefs.h.  */
3867 _ACEOF
3868 cat confdefs.h >>conftest.$ac_ext
3869 cat >>conftest.$ac_ext <<_ACEOF
3870 /* end confdefs.h.  */
3871
3872 int
3873 main ()
3874 {
3875
3876   ;
3877   return 0;
3878 }
3879 _ACEOF
3880 rm -f conftest.$ac_objext
3881 if { (ac_try="$ac_compile"
3882 case "(($ac_try" in
3883   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3884   *) ac_try_echo=$ac_try;;
3885 esac
3886 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3887   (eval "$ac_compile") 2>conftest.er1
3888   ac_status=$?
3889   grep -v '^ *+' conftest.er1 >conftest.err
3890   rm -f conftest.er1
3891   cat conftest.err >&5
3892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3893   (exit $ac_status); } && {
3894          test -z "$ac_c_werror_flag" ||
3895          test ! -s conftest.err
3896        } && test -s conftest.$ac_objext; then
3897   { echo "$as_me:$LINENO: result: yes" >&5
3898 echo "${ECHO_T}yes" >&6; }
3899 else
3900   echo "$as_me: failed program was:" >&5
3901 sed 's/^/| /' conftest.$ac_ext >&5
3902
3903         CFLAGS="$pgac_save_CFLAGS"
3904                     { echo "$as_me:$LINENO: result: no" >&5
3905 echo "${ECHO_T}no" >&6; }
3906 fi
3907
3908 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3909
3910   { echo "$as_me:$LINENO: checking if $CC supports -Wendif-labels" >&5
3911 echo $ECHO_N "checking if $CC supports -Wendif-labels... $ECHO_C" >&6; }
3912 pgac_save_CFLAGS=$CFLAGS
3913 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
3914 cat >conftest.$ac_ext <<_ACEOF
3915 /* confdefs.h.  */
3916 _ACEOF
3917 cat confdefs.h >>conftest.$ac_ext
3918 cat >>conftest.$ac_ext <<_ACEOF
3919 /* end confdefs.h.  */
3920
3921 int
3922 main ()
3923 {
3924
3925   ;
3926   return 0;
3927 }
3928 _ACEOF
3929 rm -f conftest.$ac_objext
3930 if { (ac_try="$ac_compile"
3931 case "(($ac_try" in
3932   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3933   *) ac_try_echo=$ac_try;;
3934 esac
3935 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3936   (eval "$ac_compile") 2>conftest.er1
3937   ac_status=$?
3938   grep -v '^ *+' conftest.er1 >conftest.err
3939   rm -f conftest.er1
3940   cat conftest.err >&5
3941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3942   (exit $ac_status); } && {
3943          test -z "$ac_c_werror_flag" ||
3944          test ! -s conftest.err
3945        } && test -s conftest.$ac_objext; then
3946   { echo "$as_me:$LINENO: result: yes" >&5
3947 echo "${ECHO_T}yes" >&6; }
3948 else
3949   echo "$as_me: failed program was:" >&5
3950 sed 's/^/| /' conftest.$ac_ext >&5
3951
3952         CFLAGS="$pgac_save_CFLAGS"
3953                     { echo "$as_me:$LINENO: result: no" >&5
3954 echo "${ECHO_T}no" >&6; }
3955 fi
3956
3957 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3958
3959   # Disable strict-aliasing rules; needed for gcc 3.3+
3960   { echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
3961 echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6; }
3962 pgac_save_CFLAGS=$CFLAGS
3963 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
3964 cat >conftest.$ac_ext <<_ACEOF
3965 /* confdefs.h.  */
3966 _ACEOF
3967 cat confdefs.h >>conftest.$ac_ext
3968 cat >>conftest.$ac_ext <<_ACEOF
3969 /* end confdefs.h.  */
3970
3971 int
3972 main ()
3973 {
3974
3975   ;
3976   return 0;
3977 }
3978 _ACEOF
3979 rm -f conftest.$ac_objext
3980 if { (ac_try="$ac_compile"
3981 case "(($ac_try" in
3982   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3983   *) ac_try_echo=$ac_try;;
3984 esac
3985 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3986   (eval "$ac_compile") 2>conftest.er1
3987   ac_status=$?
3988   grep -v '^ *+' conftest.er1 >conftest.err
3989   rm -f conftest.er1
3990   cat conftest.err >&5
3991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3992   (exit $ac_status); } && {
3993          test -z "$ac_c_werror_flag" ||
3994          test ! -s conftest.err
3995        } && test -s conftest.$ac_objext; then
3996   { echo "$as_me:$LINENO: result: yes" >&5
3997 echo "${ECHO_T}yes" >&6; }
3998 else
3999   echo "$as_me: failed program was:" >&5
4000 sed 's/^/| /' conftest.$ac_ext >&5
4001
4002         CFLAGS="$pgac_save_CFLAGS"
4003                     { echo "$as_me:$LINENO: result: no" >&5
4004 echo "${ECHO_T}no" >&6; }
4005 fi
4006
4007 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4008
4009   # Disable optimizations that assume no overflow; needed for gcc 4.3+
4010   { echo "$as_me:$LINENO: checking if $CC supports -fwrapv" >&5
4011 echo $ECHO_N "checking if $CC supports -fwrapv... $ECHO_C" >&6; }
4012 pgac_save_CFLAGS=$CFLAGS
4013 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4014 cat >conftest.$ac_ext <<_ACEOF
4015 /* confdefs.h.  */
4016 _ACEOF
4017 cat confdefs.h >>conftest.$ac_ext
4018 cat >>conftest.$ac_ext <<_ACEOF
4019 /* end confdefs.h.  */
4020
4021 int
4022 main ()
4023 {
4024
4025   ;
4026   return 0;
4027 }
4028 _ACEOF
4029 rm -f conftest.$ac_objext
4030 if { (ac_try="$ac_compile"
4031 case "(($ac_try" in
4032   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4033   *) ac_try_echo=$ac_try;;
4034 esac
4035 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4036   (eval "$ac_compile") 2>conftest.er1
4037   ac_status=$?
4038   grep -v '^ *+' conftest.er1 >conftest.err
4039   rm -f conftest.er1
4040   cat conftest.err >&5
4041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4042   (exit $ac_status); } && {
4043          test -z "$ac_c_werror_flag" ||
4044          test ! -s conftest.err
4045        } && test -s conftest.$ac_objext; then
4046   { echo "$as_me:$LINENO: result: yes" >&5
4047 echo "${ECHO_T}yes" >&6; }
4048 else
4049   echo "$as_me: failed program was:" >&5
4050 sed 's/^/| /' conftest.$ac_ext >&5
4051
4052         CFLAGS="$pgac_save_CFLAGS"
4053                     { echo "$as_me:$LINENO: result: no" >&5
4054 echo "${ECHO_T}no" >&6; }
4055 fi
4056
4057 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4058
4059 elif test "$ICC" = yes; then
4060   # Intel's compiler has a bug/misoptimization in checking for
4061   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4062   { echo "$as_me:$LINENO: checking if $CC supports -mp1" >&5
4063 echo $ECHO_N "checking if $CC supports -mp1... $ECHO_C" >&6; }
4064 pgac_save_CFLAGS=$CFLAGS
4065 CFLAGS="$pgac_save_CFLAGS -mp1"
4066 cat >conftest.$ac_ext <<_ACEOF
4067 /* confdefs.h.  */
4068 _ACEOF
4069 cat confdefs.h >>conftest.$ac_ext
4070 cat >>conftest.$ac_ext <<_ACEOF
4071 /* end confdefs.h.  */
4072
4073 int
4074 main ()
4075 {
4076
4077   ;
4078   return 0;
4079 }
4080 _ACEOF
4081 rm -f conftest.$ac_objext
4082 if { (ac_try="$ac_compile"
4083 case "(($ac_try" in
4084   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4085   *) ac_try_echo=$ac_try;;
4086 esac
4087 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4088   (eval "$ac_compile") 2>conftest.er1
4089   ac_status=$?
4090   grep -v '^ *+' conftest.er1 >conftest.err
4091   rm -f conftest.er1
4092   cat conftest.err >&5
4093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4094   (exit $ac_status); } && {
4095          test -z "$ac_c_werror_flag" ||
4096          test ! -s conftest.err
4097        } && test -s conftest.$ac_objext; then
4098   { echo "$as_me:$LINENO: result: yes" >&5
4099 echo "${ECHO_T}yes" >&6; }
4100 else
4101   echo "$as_me: failed program was:" >&5
4102 sed 's/^/| /' conftest.$ac_ext >&5
4103
4104         CFLAGS="$pgac_save_CFLAGS"
4105                     { echo "$as_me:$LINENO: result: no" >&5
4106 echo "${ECHO_T}no" >&6; }
4107 fi
4108
4109 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4110
4111   # Make sure strict aliasing is off (though this is said to be the default)
4112   { echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
4113 echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6; }
4114 pgac_save_CFLAGS=$CFLAGS
4115 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4116 cat >conftest.$ac_ext <<_ACEOF
4117 /* confdefs.h.  */
4118 _ACEOF
4119 cat confdefs.h >>conftest.$ac_ext
4120 cat >>conftest.$ac_ext <<_ACEOF
4121 /* end confdefs.h.  */
4122
4123 int
4124 main ()
4125 {
4126
4127   ;
4128   return 0;
4129 }
4130 _ACEOF
4131 rm -f conftest.$ac_objext
4132 if { (ac_try="$ac_compile"
4133 case "(($ac_try" in
4134   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4135   *) ac_try_echo=$ac_try;;
4136 esac
4137 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4138   (eval "$ac_compile") 2>conftest.er1
4139   ac_status=$?
4140   grep -v '^ *+' conftest.er1 >conftest.err
4141   rm -f conftest.er1
4142   cat conftest.err >&5
4143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4144   (exit $ac_status); } && {
4145          test -z "$ac_c_werror_flag" ||
4146          test ! -s conftest.err
4147        } && test -s conftest.$ac_objext; then
4148   { echo "$as_me:$LINENO: result: yes" >&5
4149 echo "${ECHO_T}yes" >&6; }
4150 else
4151   echo "$as_me: failed program was:" >&5
4152 sed 's/^/| /' conftest.$ac_ext >&5
4153
4154         CFLAGS="$pgac_save_CFLAGS"
4155                     { echo "$as_me:$LINENO: result: no" >&5
4156 echo "${ECHO_T}no" >&6; }
4157 fi
4158
4159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4160
4161 elif test "$PORTNAME" = "aix"; then
4162   # AIX's xlc has to have strict aliasing turned off too
4163   { echo "$as_me:$LINENO: checking if $CC supports -qnoansialias" >&5
4164 echo $ECHO_N "checking if $CC supports -qnoansialias... $ECHO_C" >&6; }
4165 pgac_save_CFLAGS=$CFLAGS
4166 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4167 cat >conftest.$ac_ext <<_ACEOF
4168 /* confdefs.h.  */
4169 _ACEOF
4170 cat confdefs.h >>conftest.$ac_ext
4171 cat >>conftest.$ac_ext <<_ACEOF
4172 /* end confdefs.h.  */
4173
4174 int
4175 main ()
4176 {
4177
4178   ;
4179   return 0;
4180 }
4181 _ACEOF
4182 rm -f conftest.$ac_objext
4183 if { (ac_try="$ac_compile"
4184 case "(($ac_try" in
4185   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4186   *) ac_try_echo=$ac_try;;
4187 esac
4188 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4189   (eval "$ac_compile") 2>conftest.er1
4190   ac_status=$?
4191   grep -v '^ *+' conftest.er1 >conftest.err
4192   rm -f conftest.er1
4193   cat conftest.err >&5
4194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4195   (exit $ac_status); } && {
4196          test -z "$ac_c_werror_flag" ||
4197          test ! -s conftest.err
4198        } && test -s conftest.$ac_objext; then
4199   { echo "$as_me:$LINENO: result: yes" >&5
4200 echo "${ECHO_T}yes" >&6; }
4201 else
4202   echo "$as_me: failed program was:" >&5
4203 sed 's/^/| /' conftest.$ac_ext >&5
4204
4205         CFLAGS="$pgac_save_CFLAGS"
4206                     { echo "$as_me:$LINENO: result: no" >&5
4207 echo "${ECHO_T}no" >&6; }
4208 fi
4209
4210 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4211
4212 fi
4213
4214 # supply -g if --enable-debug
4215 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
4216   CFLAGS="$CFLAGS -g"
4217 fi
4218
4219 # enable code coverage if --enable-coverage
4220 if test "$enable_coverage" = yes; then
4221   if test "$GCC" = yes; then
4222     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
4223   else
4224     { { echo "$as_me:$LINENO: error: --enable-coverage is supported only when using GCC" >&5
4225 echo "$as_me: error: --enable-coverage is supported only when using GCC" >&2;}
4226    { (exit 1); exit 1; }; }
4227   fi
4228 fi
4229
4230 # enable profiling if --enable-profiling
4231 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
4232   if test "$GCC" = yes; then
4233
4234 cat >>confdefs.h <<\_ACEOF
4235 #define PROFILE_PID_DIR 1
4236 _ACEOF
4237
4238     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
4239   else
4240     { { echo "$as_me:$LINENO: error: --enable-profiling is supported only when using GCC" >&5
4241 echo "$as_me: error: --enable-profiling is supported only when using GCC" >&2;}
4242    { (exit 1); exit 1; }; }
4243   fi
4244 fi
4245
4246 # We already have this in Makefile.win32, but configure needs it too
4247 if test "$PORTNAME" = "win32"; then
4248   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
4249 fi
4250
4251 # Check if the compiler still works with the template settings
4252 { echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
4253 echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6; }
4254 cat >conftest.$ac_ext <<_ACEOF
4255 /* confdefs.h.  */
4256 _ACEOF
4257 cat confdefs.h >>conftest.$ac_ext
4258 cat >>conftest.$ac_ext <<_ACEOF
4259 /* end confdefs.h.  */
4260
4261 int
4262 main ()
4263 {
4264 return 0;
4265   ;
4266   return 0;
4267 }
4268 _ACEOF
4269 rm -f conftest.$ac_objext conftest$ac_exeext
4270 if { (ac_try="$ac_link"
4271 case "(($ac_try" in
4272   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4273   *) ac_try_echo=$ac_try;;
4274 esac
4275 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4276   (eval "$ac_link") 2>conftest.er1
4277   ac_status=$?
4278   grep -v '^ *+' conftest.er1 >conftest.err
4279   rm -f conftest.er1
4280   cat conftest.err >&5
4281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4282   (exit $ac_status); } && {
4283          test -z "$ac_c_werror_flag" ||
4284          test ! -s conftest.err
4285        } && test -s conftest$ac_exeext &&
4286        $as_test_x conftest$ac_exeext; then
4287   { echo "$as_me:$LINENO: result: yes" >&5
4288 echo "${ECHO_T}yes" >&6; }
4289 else
4290   echo "$as_me: failed program was:" >&5
4291 sed 's/^/| /' conftest.$ac_ext >&5
4292
4293         { echo "$as_me:$LINENO: result: no" >&5
4294 echo "${ECHO_T}no" >&6; }
4295    { { echo "$as_me:$LINENO: error: cannot proceed" >&5
4296 echo "$as_me: error: cannot proceed" >&2;}
4297    { (exit 1); exit 1; }; }
4298 fi
4299
4300 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4301       conftest$ac_exeext conftest.$ac_ext
4302
4303 # Defend against gcc -ffast-math
4304 if test "$GCC" = yes; then
4305 cat >conftest.$ac_ext <<_ACEOF
4306 /* confdefs.h.  */
4307 _ACEOF
4308 cat confdefs.h >>conftest.$ac_ext
4309 cat >>conftest.$ac_ext <<_ACEOF
4310 /* end confdefs.h.  */
4311
4312 int
4313 main ()
4314 {
4315 #ifdef __FAST_MATH__
4316 choke me
4317 #endif
4318   ;
4319   return 0;
4320 }
4321 _ACEOF
4322 rm -f conftest.$ac_objext
4323 if { (ac_try="$ac_compile"
4324 case "(($ac_try" in
4325   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4326   *) ac_try_echo=$ac_try;;
4327 esac
4328 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4329   (eval "$ac_compile") 2>conftest.er1
4330   ac_status=$?
4331   grep -v '^ *+' conftest.er1 >conftest.err
4332   rm -f conftest.er1
4333   cat conftest.err >&5
4334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4335   (exit $ac_status); } && {
4336          test -z "$ac_c_werror_flag" ||
4337          test ! -s conftest.err
4338        } && test -s conftest.$ac_objext; then
4339   :
4340 else
4341   echo "$as_me: failed program was:" >&5
4342 sed 's/^/| /' conftest.$ac_ext >&5
4343
4344         { { echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
4345 echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
4346    { (exit 1); exit 1; }; }
4347 fi
4348
4349 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4350 fi
4351
4352 ac_ext=c
4353 ac_cpp='$CPP $CPPFLAGS'
4354 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4355 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4356 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4357 { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4358 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
4359 # On Suns, sometimes $CPP names a directory.
4360 if test -n "$CPP" && test -d "$CPP"; then
4361   CPP=
4362 fi
4363 if test -z "$CPP"; then
4364   if test "${ac_cv_prog_CPP+set}" = set; then
4365   echo $ECHO_N "(cached) $ECHO_C" >&6
4366 else
4367       # Double quotes because CPP needs to be expanded
4368     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4369     do
4370       ac_preproc_ok=false
4371 for ac_c_preproc_warn_flag in '' yes
4372 do
4373   # Use a header file that comes with gcc, so configuring glibc
4374   # with a fresh cross-compiler works.
4375   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4376   # <limits.h> exists even on freestanding compilers.
4377   # On the NeXT, cc -E runs the code through the compiler's parser,
4378   # not just through cpp. "Syntax error" is here to catch this case.
4379   cat >conftest.$ac_ext <<_ACEOF
4380 /* confdefs.h.  */
4381 _ACEOF
4382 cat confdefs.h >>conftest.$ac_ext
4383 cat >>conftest.$ac_ext <<_ACEOF
4384 /* end confdefs.h.  */
4385 #ifdef __STDC__
4386 # include <limits.h>
4387 #else
4388 # include <assert.h>
4389 #endif
4390                      Syntax error
4391 _ACEOF
4392 if { (ac_try="$ac_cpp conftest.$ac_ext"
4393 case "(($ac_try" in
4394   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4395   *) ac_try_echo=$ac_try;;
4396 esac
4397 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4398   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4399   ac_status=$?
4400   grep -v '^ *+' conftest.er1 >conftest.err
4401   rm -f conftest.er1
4402   cat conftest.err >&5
4403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4404   (exit $ac_status); } >/dev/null && {
4405          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4406          test ! -s conftest.err
4407        }; then
4408   :
4409 else
4410   echo "$as_me: failed program was:" >&5
4411 sed 's/^/| /' conftest.$ac_ext >&5
4412
4413   # Broken: fails on valid input.
4414 continue
4415 fi
4416
4417 rm -f conftest.err conftest.$ac_ext
4418
4419   # OK, works on sane cases.  Now check whether nonexistent headers
4420   # can be detected and how.
4421   cat >conftest.$ac_ext <<_ACEOF
4422 /* confdefs.h.  */
4423 _ACEOF
4424 cat confdefs.h >>conftest.$ac_ext
4425 cat >>conftest.$ac_ext <<_ACEOF
4426 /* end confdefs.h.  */
4427 #include <ac_nonexistent.h>
4428 _ACEOF
4429 if { (ac_try="$ac_cpp conftest.$ac_ext"
4430 case "(($ac_try" in
4431   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4432   *) ac_try_echo=$ac_try;;
4433 esac
4434 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4435   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4436   ac_status=$?
4437   grep -v '^ *+' conftest.er1 >conftest.err
4438   rm -f conftest.er1
4439   cat conftest.err >&5
4440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4441   (exit $ac_status); } >/dev/null && {
4442          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4443          test ! -s conftest.err
4444        }; then
4445   # Broken: success on invalid input.
4446 continue
4447 else
4448   echo "$as_me: failed program was:" >&5
4449 sed 's/^/| /' conftest.$ac_ext >&5
4450
4451   # Passes both tests.
4452 ac_preproc_ok=:
4453 break
4454 fi
4455
4456 rm -f conftest.err conftest.$ac_ext
4457
4458 done
4459 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4460 rm -f conftest.err conftest.$ac_ext
4461 if $ac_preproc_ok; then
4462   break
4463 fi
4464
4465     done
4466     ac_cv_prog_CPP=$CPP
4467
4468 fi
4469   CPP=$ac_cv_prog_CPP
4470 else
4471   ac_cv_prog_CPP=$CPP
4472 fi
4473 { echo "$as_me:$LINENO: result: $CPP" >&5
4474 echo "${ECHO_T}$CPP" >&6; }
4475 ac_preproc_ok=false
4476 for ac_c_preproc_warn_flag in '' yes
4477 do
4478   # Use a header file that comes with gcc, so configuring glibc
4479   # with a fresh cross-compiler works.
4480   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4481   # <limits.h> exists even on freestanding compilers.
4482   # On the NeXT, cc -E runs the code through the compiler's parser,
4483   # not just through cpp. "Syntax error" is here to catch this case.
4484   cat >conftest.$ac_ext <<_ACEOF
4485 /* confdefs.h.  */
4486 _ACEOF
4487 cat confdefs.h >>conftest.$ac_ext
4488 cat >>conftest.$ac_ext <<_ACEOF
4489 /* end confdefs.h.  */
4490 #ifdef __STDC__
4491 # include <limits.h>
4492 #else
4493 # include <assert.h>
4494 #endif
4495                      Syntax error
4496 _ACEOF
4497 if { (ac_try="$ac_cpp conftest.$ac_ext"
4498 case "(($ac_try" in
4499   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4500   *) ac_try_echo=$ac_try;;
4501 esac
4502 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4503   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4504   ac_status=$?
4505   grep -v '^ *+' conftest.er1 >conftest.err
4506   rm -f conftest.er1
4507   cat conftest.err >&5
4508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4509   (exit $ac_status); } >/dev/null && {
4510          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4511          test ! -s conftest.err
4512        }; then
4513   :
4514 else
4515   echo "$as_me: failed program was:" >&5
4516 sed 's/^/| /' conftest.$ac_ext >&5
4517
4518   # Broken: fails on valid input.
4519 continue
4520 fi
4521
4522 rm -f conftest.err conftest.$ac_ext
4523
4524   # OK, works on sane cases.  Now check whether nonexistent headers
4525   # can be detected and how.
4526   cat >conftest.$ac_ext <<_ACEOF
4527 /* confdefs.h.  */
4528 _ACEOF
4529 cat confdefs.h >>conftest.$ac_ext
4530 cat >>conftest.$ac_ext <<_ACEOF
4531 /* end confdefs.h.  */
4532 #include <ac_nonexistent.h>
4533 _ACEOF
4534 if { (ac_try="$ac_cpp conftest.$ac_ext"
4535 case "(($ac_try" in
4536   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4537   *) ac_try_echo=$ac_try;;
4538 esac
4539 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4540   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4541   ac_status=$?
4542   grep -v '^ *+' conftest.er1 >conftest.err
4543   rm -f conftest.er1
4544   cat conftest.err >&5
4545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4546   (exit $ac_status); } >/dev/null && {
4547          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4548          test ! -s conftest.err
4549        }; then
4550   # Broken: success on invalid input.
4551 continue
4552 else
4553   echo "$as_me: failed program was:" >&5
4554 sed 's/^/| /' conftest.$ac_ext >&5
4555
4556   # Passes both tests.
4557 ac_preproc_ok=:
4558 break
4559 fi
4560
4561 rm -f conftest.err conftest.$ac_ext
4562
4563 done
4564 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4565 rm -f conftest.err conftest.$ac_ext
4566 if $ac_preproc_ok; then
4567   :
4568 else
4569   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4570 See \`config.log' for more details." >&5
4571 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4572 See \`config.log' for more details." >&2;}
4573    { (exit 1); exit 1; }; }
4574 fi
4575
4576 ac_ext=c
4577 ac_cpp='$CPP $CPPFLAGS'
4578 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4579 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4580 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4581
4582
4583
4584
4585 #
4586 # Set up TAS assembly code if needed; the template file has now had its
4587 # chance to request this.
4588 #
4589 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
4590
4591
4592 if test "$need_tas" = yes ; then
4593   TAS=tas.o
4594 else
4595   TAS=""
4596 fi
4597
4598
4599
4600 #
4601 # Automatic dependency tracking
4602 #
4603
4604 pgac_args="$pgac_args enable_depend"
4605
4606 # Check whether --enable-depend was given.
4607 if test "${enable_depend+set}" = set; then
4608   enableval=$enable_depend;
4609   case $enableval in
4610     yes)
4611       autodepend=yes
4612       ;;
4613     no)
4614       :
4615       ;;
4616     *)
4617       { { echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
4618 echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
4619    { (exit 1); exit 1; }; }
4620       ;;
4621   esac
4622
4623 else
4624   enable_depend=no
4625
4626 fi
4627
4628
4629
4630
4631
4632 #
4633 # Enable assert checks
4634 #
4635
4636 pgac_args="$pgac_args enable_cassert"
4637
4638 # Check whether --enable-cassert was given.
4639 if test "${enable_cassert+set}" = set; then
4640   enableval=$enable_cassert;
4641   case $enableval in
4642     yes)
4643
4644 cat >>confdefs.h <<\_ACEOF
4645 #define USE_ASSERT_CHECKING 1
4646 _ACEOF
4647
4648       ;;
4649     no)
4650       :
4651       ;;
4652     *)
4653       { { echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
4654 echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
4655    { (exit 1); exit 1; }; }
4656       ;;
4657   esac
4658
4659 else
4660   enable_cassert=no
4661
4662 fi
4663
4664
4665
4666
4667 #
4668 # Include directories
4669 #
4670 ac_save_IFS=$IFS
4671 IFS="${IFS}${PATH_SEPARATOR}"
4672 # SRCH_INC comes from the template file
4673 for dir in $with_includes $SRCH_INC; do
4674   if test -d "$dir"; then
4675     INCLUDES="$INCLUDES -I$dir"
4676   else
4677     { echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
4678 echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
4679   fi
4680 done
4681 IFS=$ac_save_IFS
4682
4683
4684
4685 #
4686 # Library directories
4687 #
4688 ac_save_IFS=$IFS
4689 IFS="${IFS}${PATH_SEPARATOR}"
4690 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
4691 for dir in $LIBRARY_DIRS $SRCH_LIB; do
4692   if test -d "$dir"; then
4693     LIBDIRS="$LIBDIRS -L$dir"
4694   else
4695     { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
4696 echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
4697   fi
4698 done
4699 IFS=$ac_save_IFS
4700
4701 #
4702 # Enable thread-safe client libraries
4703 #
4704 { echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
4705 echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6; }
4706 if test "$PORTNAME" != "win32"; then
4707
4708 pgac_args="$pgac_args enable_thread_safety"
4709
4710 # Check whether --enable-thread-safety was given.
4711 if test "${enable_thread_safety+set}" = set; then
4712   enableval=$enable_thread_safety;
4713   case $enableval in
4714     yes)
4715       :
4716       ;;
4717     no)
4718       :
4719       ;;
4720     *)
4721       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
4722 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
4723    { (exit 1); exit 1; }; }
4724       ;;
4725   esac
4726
4727 else
4728   enable_thread_safety=no
4729
4730 fi
4731
4732
4733 else
4734 # Win32 should always use threads
4735
4736 pgac_args="$pgac_args enable_thread_safety"
4737
4738 # Check whether --enable-thread-safety was given.
4739 if test "${enable_thread_safety+set}" = set; then
4740   enableval=$enable_thread_safety;
4741   case $enableval in
4742     yes)
4743       :
4744       ;;
4745     no)
4746       :
4747       ;;
4748     *)
4749       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
4750 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
4751    { (exit 1); exit 1; }; }
4752       ;;
4753   esac
4754
4755 else
4756   enable_thread_safety=yes
4757
4758 fi
4759
4760
4761 fi
4762
4763
4764 pgac_args="$pgac_args enable_thread_safety_force"
4765
4766 # Check whether --enable-thread-safety-force was given.
4767 if test "${enable_thread_safety_force+set}" = set; then
4768   enableval=$enable_thread_safety_force;
4769   case $enableval in
4770     yes)
4771       :
4772       ;;
4773     no)
4774       :
4775       ;;
4776     *)
4777       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety-force option" >&5
4778 echo "$as_me: error: no argument expected for --enable-thread-safety-force option" >&2;}
4779    { (exit 1); exit 1; }; }
4780       ;;
4781   esac
4782
4783 else
4784   enable_thread_safety_force=no
4785
4786 fi
4787
4788
4789 if test "$enable_thread_safety" = yes -o \
4790         "$enable_thread_safety_force" = yes; then
4791   enable_thread_safety="yes"    # for 'force'
4792
4793 cat >>confdefs.h <<\_ACEOF
4794 #define ENABLE_THREAD_SAFETY 1
4795 _ACEOF
4796
4797 fi
4798 { echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
4799 echo "${ECHO_T}$enable_thread_safety" >&6; }
4800
4801
4802 #
4803 # Optionally build Tcl modules (PL/Tcl)
4804 #
4805 { echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
4806 echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6; }
4807
4808 pgac_args="$pgac_args with_tcl"
4809
4810
4811 # Check whether --with-tcl was given.
4812 if test "${with_tcl+set}" = set; then
4813   withval=$with_tcl;
4814   case $withval in
4815     yes)
4816       :
4817       ;;
4818     no)
4819       :
4820       ;;
4821     *)
4822       { { echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
4823 echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
4824    { (exit 1); exit 1; }; }
4825       ;;
4826   esac
4827
4828 else
4829   with_tcl=no
4830
4831 fi
4832
4833
4834 { echo "$as_me:$LINENO: result: $with_tcl" >&5
4835 echo "${ECHO_T}$with_tcl" >&6; }
4836
4837
4838 # We see if the path to the Tcl/Tk configuration scripts is specified.
4839 # This will override the use of tclsh to find the paths to search.
4840
4841
4842 pgac_args="$pgac_args with_tclconfig"
4843
4844
4845 # Check whether --with-tclconfig was given.
4846 if test "${with_tclconfig+set}" = set; then
4847   withval=$with_tclconfig;
4848   case $withval in
4849     yes)
4850       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
4851 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
4852    { (exit 1); exit 1; }; }
4853       ;;
4854     no)
4855       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
4856 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
4857    { (exit 1); exit 1; }; }
4858       ;;
4859     *)
4860
4861       ;;
4862   esac
4863
4864 fi
4865
4866
4867
4868 #
4869 # Optionally build Perl modules (PL/Perl)
4870 #
4871 { echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
4872 echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6; }
4873
4874 pgac_args="$pgac_args with_perl"
4875
4876
4877 # Check whether --with-perl was given.
4878 if test "${with_perl+set}" = set; then
4879   withval=$with_perl;
4880   case $withval in
4881     yes)
4882       :
4883       ;;
4884     no)
4885       :
4886       ;;
4887     *)
4888       { { echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
4889 echo "$as_me: error: no argument expected for --with-perl option" >&2;}
4890    { (exit 1); exit 1; }; }
4891       ;;
4892   esac
4893
4894 else
4895   with_perl=no
4896
4897 fi
4898
4899
4900 { echo "$as_me:$LINENO: result: $with_perl" >&5
4901 echo "${ECHO_T}$with_perl" >&6; }
4902
4903
4904 #
4905 # Optionally build Python modules (PL/Python)
4906 #
4907 { echo "$as_me:$LINENO: checking whether to build Python modules" >&5
4908 echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6; }
4909
4910 pgac_args="$pgac_args with_python"
4911
4912
4913 # Check whether --with-python was given.
4914 if test "${with_python+set}" = set; then
4915   withval=$with_python;
4916   case $withval in
4917     yes)
4918       :
4919       ;;
4920     no)
4921       :
4922       ;;
4923     *)
4924       { { echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
4925 echo "$as_me: error: no argument expected for --with-python option" >&2;}
4926    { (exit 1); exit 1; }; }
4927       ;;
4928   esac
4929
4930 else
4931   with_python=no
4932
4933 fi
4934
4935
4936 { echo "$as_me:$LINENO: result: $with_python" >&5
4937 echo "${ECHO_T}$with_python" >&6; }
4938
4939
4940 #
4941 # GSSAPI
4942 #
4943 { echo "$as_me:$LINENO: checking whether to build with GSSAPI support" >&5
4944 echo $ECHO_N "checking whether to build with GSSAPI support... $ECHO_C" >&6; }
4945
4946 pgac_args="$pgac_args with_gssapi"
4947
4948
4949 # Check whether --with-gssapi was given.
4950 if test "${with_gssapi+set}" = set; then
4951   withval=$with_gssapi;
4952   case $withval in
4953     yes)
4954
4955
4956 cat >>confdefs.h <<\_ACEOF
4957 #define ENABLE_GSS 1
4958 _ACEOF
4959
4960   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
4961
4962       ;;
4963     no)
4964       :
4965       ;;
4966     *)
4967       { { echo "$as_me:$LINENO: error: no argument expected for --with-gssapi option" >&5
4968 echo "$as_me: error: no argument expected for --with-gssapi option" >&2;}
4969    { (exit 1); exit 1; }; }
4970       ;;
4971   esac
4972
4973 else
4974   with_gssapi=no
4975
4976 fi
4977
4978
4979 { echo "$as_me:$LINENO: result: $with_gssapi" >&5
4980 echo "${ECHO_T}$with_gssapi" >&6; }
4981
4982
4983 #
4984 # Kerberos 5
4985 #
4986 { echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
4987 echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6; }
4988
4989 pgac_args="$pgac_args with_krb5"
4990
4991
4992 # Check whether --with-krb5 was given.
4993 if test "${with_krb5+set}" = set; then
4994   withval=$with_krb5;
4995   case $withval in
4996     yes)
4997
4998
4999 cat >>confdefs.h <<\_ACEOF
5000 #define KRB5 1
5001 _ACEOF
5002
5003   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5004
5005       ;;
5006     no)
5007       :
5008       ;;
5009     *)
5010       { { echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
5011 echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
5012    { (exit 1); exit 1; }; }
5013       ;;
5014   esac
5015
5016 else
5017   with_krb5=no
5018
5019 fi
5020
5021
5022 { echo "$as_me:$LINENO: result: $with_krb5" >&5
5023 echo "${ECHO_T}$with_krb5" >&6; }
5024
5025
5026
5027
5028
5029
5030 #
5031 # Kerberos configuration parameters
5032 #
5033
5034 pgac_args="$pgac_args with_krb_srvnam"
5035
5036
5037 # Check whether --with-krb-srvnam was given.
5038 if test "${with_krb_srvnam+set}" = set; then
5039   withval=$with_krb_srvnam;
5040   case $withval in
5041     yes)
5042       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
5043 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
5044    { (exit 1); exit 1; }; }
5045       ;;
5046     no)
5047       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
5048 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
5049    { (exit 1); exit 1; }; }
5050       ;;
5051     *)
5052
5053       ;;
5054   esac
5055
5056 else
5057   with_krb_srvnam="postgres"
5058 fi
5059
5060
5061
5062 cat >>confdefs.h <<_ACEOF
5063 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5064 _ACEOF
5065
5066
5067
5068 #
5069 # PAM
5070 #
5071 { echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
5072 echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6; }
5073
5074 pgac_args="$pgac_args with_pam"
5075
5076
5077 # Check whether --with-pam was given.
5078 if test "${with_pam+set}" = set; then
5079   withval=$with_pam;
5080   case $withval in
5081     yes)
5082
5083 cat >>confdefs.h <<\_ACEOF
5084 #define USE_PAM 1
5085 _ACEOF
5086
5087       ;;
5088     no)
5089       :
5090       ;;
5091     *)
5092       { { echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
5093 echo "$as_me: error: no argument expected for --with-pam option" >&2;}
5094    { (exit 1); exit 1; }; }
5095       ;;
5096   esac
5097
5098 else
5099   with_pam=no
5100
5101 fi
5102
5103
5104 { echo "$as_me:$LINENO: result: $with_pam" >&5
5105 echo "${ECHO_T}$with_pam" >&6; }
5106
5107
5108
5109 #
5110 # LDAP
5111 #
5112 { echo "$as_me:$LINENO: checking whether to build with LDAP support" >&5
5113 echo $ECHO_N "checking whether to build with LDAP support... $ECHO_C" >&6; }
5114
5115 pgac_args="$pgac_args with_ldap"
5116
5117
5118 # Check whether --with-ldap was given.
5119 if test "${with_ldap+set}" = set; then
5120   withval=$with_ldap;
5121   case $withval in
5122     yes)
5123
5124 cat >>confdefs.h <<\_ACEOF
5125 #define USE_LDAP 1
5126 _ACEOF
5127
5128       ;;
5129     no)
5130       :
5131       ;;
5132     *)
5133       { { echo "$as_me:$LINENO: error: no argument expected for --with-ldap option" >&5
5134 echo "$as_me: error: no argument expected for --with-ldap option" >&2;}
5135    { (exit 1); exit 1; }; }
5136       ;;
5137   esac
5138
5139 else
5140   with_ldap=no
5141
5142 fi
5143
5144
5145 { echo "$as_me:$LINENO: result: $with_ldap" >&5
5146 echo "${ECHO_T}$with_ldap" >&6; }
5147
5148
5149
5150 #
5151 # Bonjour
5152 #
5153 { echo "$as_me:$LINENO: checking whether to build with Bonjour support" >&5
5154 echo $ECHO_N "checking whether to build with Bonjour support... $ECHO_C" >&6; }
5155
5156 pgac_args="$pgac_args with_bonjour"
5157
5158
5159 # Check whether --with-bonjour was given.
5160 if test "${with_bonjour+set}" = set; then
5161   withval=$with_bonjour;
5162   case $withval in
5163     yes)
5164
5165 cat >>confdefs.h <<\_ACEOF
5166 #define USE_BONJOUR 1
5167 _ACEOF
5168
5169       ;;
5170     no)
5171       :
5172       ;;
5173     *)
5174       { { echo "$as_me:$LINENO: error: no argument expected for --with-bonjour option" >&5
5175 echo "$as_me: error: no argument expected for --with-bonjour option" >&2;}
5176    { (exit 1); exit 1; }; }
5177       ;;
5178   esac
5179
5180 else
5181   with_bonjour=no
5182
5183 fi
5184
5185
5186 { echo "$as_me:$LINENO: result: $with_bonjour" >&5
5187 echo "${ECHO_T}$with_bonjour" >&6; }
5188
5189
5190
5191 #
5192 # OpenSSL
5193 #
5194 { echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
5195 echo $ECHO_N "checking whether to build with OpenSSL support... $ECHO_C" >&6; }
5196
5197 pgac_args="$pgac_args with_openssl"
5198
5199
5200 # Check whether --with-openssl was given.
5201 if test "${with_openssl+set}" = set; then
5202   withval=$with_openssl;
5203   case $withval in
5204     yes)
5205
5206 cat >>confdefs.h <<\_ACEOF
5207 #define USE_SSL 1
5208 _ACEOF
5209
5210       ;;
5211     no)
5212       :
5213       ;;
5214     *)
5215       { { echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
5216 echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
5217    { (exit 1); exit 1; }; }
5218       ;;
5219   esac
5220
5221 else
5222   with_openssl=no
5223
5224 fi
5225
5226
5227 { echo "$as_me:$LINENO: result: $with_openssl" >&5
5228 echo "${ECHO_T}$with_openssl" >&6; }
5229
5230
5231
5232 #
5233 # Readline
5234 #
5235
5236 pgac_args="$pgac_args with_readline"
5237
5238
5239 # Check whether --with-readline was given.
5240 if test "${with_readline+set}" = set; then
5241   withval=$with_readline;
5242   case $withval in
5243     yes)
5244       :
5245       ;;
5246     no)
5247       :
5248       ;;
5249     *)
5250       { { echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
5251 echo "$as_me: error: no argument expected for --with-readline option" >&2;}
5252    { (exit 1); exit 1; }; }
5253       ;;
5254   esac
5255
5256 else
5257   with_readline=yes
5258
5259 fi
5260
5261
5262 # readline on MinGW has problems with backslashes in psql and other bugs.
5263 # This is particularly a problem with non-US code pages.
5264 # Therefore disable its use until we understand the cause. 2004-07-20
5265 if test "$PORTNAME" = "win32"; then
5266   if test "$with_readline" = yes; then
5267     { echo "$as_me:$LINENO: WARNING: *** Readline does not work on MinGW --- disabling" >&5
5268 echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
5269     with_readline=no
5270   fi
5271 fi
5272
5273
5274 #
5275 # Prefer libedit
5276 #
5277
5278 pgac_args="$pgac_args with_libedit_preferred"
5279
5280
5281 # Check whether --with-libedit-preferred was given.
5282 if test "${with_libedit_preferred+set}" = set; then
5283   withval=$with_libedit_preferred;
5284   case $withval in
5285     yes)
5286       :
5287       ;;
5288     no)
5289       :
5290       ;;
5291     *)
5292       { { echo "$as_me:$LINENO: error: no argument expected for --with-libedit-preferred option" >&5
5293 echo "$as_me: error: no argument expected for --with-libedit-preferred option" >&2;}
5294    { (exit 1); exit 1; }; }
5295       ;;
5296   esac
5297
5298 else
5299   with_libedit_preferred=no
5300
5301 fi
5302
5303
5304
5305
5306 #
5307 # OSSP UUID library
5308 #
5309
5310 pgac_args="$pgac_args with_ossp_uuid"
5311
5312
5313 # Check whether --with-ossp-uuid was given.
5314 if test "${with_ossp_uuid+set}" = set; then
5315   withval=$with_ossp_uuid;
5316   case $withval in
5317     yes)
5318       :
5319       ;;
5320     no)
5321       :
5322       ;;
5323     *)
5324       { { echo "$as_me:$LINENO: error: no argument expected for --with-ossp-uuid option" >&5
5325 echo "$as_me: error: no argument expected for --with-ossp-uuid option" >&2;}
5326    { (exit 1); exit 1; }; }
5327       ;;
5328   esac
5329
5330 else
5331   with_ossp_uuid=no
5332
5333 fi
5334
5335
5336
5337
5338
5339 #
5340 # XML
5341 #
5342
5343 pgac_args="$pgac_args with_libxml"
5344
5345
5346 # Check whether --with-libxml was given.
5347 if test "${with_libxml+set}" = set; then
5348   withval=$with_libxml;
5349   case $withval in
5350     yes)
5351
5352 cat >>confdefs.h <<\_ACEOF
5353 #define USE_LIBXML 1
5354 _ACEOF
5355
5356       ;;
5357     no)
5358       :
5359       ;;
5360     *)
5361       { { echo "$as_me:$LINENO: error: no argument expected for --with-libxml option" >&5
5362 echo "$as_me: error: no argument expected for --with-libxml option" >&2;}
5363    { (exit 1); exit 1; }; }
5364       ;;
5365   esac
5366
5367 else
5368   with_libxml=no
5369
5370 fi
5371
5372
5373
5374 if test "$with_libxml" = yes ; then
5375   for ac_prog in xml2-config
5376 do
5377   # Extract the first word of "$ac_prog", so it can be a program name with args.
5378 set dummy $ac_prog; ac_word=$2
5379 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5380 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5381 if test "${ac_cv_prog_XML2_CONFIG+set}" = set; then
5382   echo $ECHO_N "(cached) $ECHO_C" >&6
5383 else
5384   if test -n "$XML2_CONFIG"; then
5385   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
5386 else
5387 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5388 for as_dir in $PATH
5389 do
5390   IFS=$as_save_IFS
5391   test -z "$as_dir" && as_dir=.
5392   for ac_exec_ext in '' $ac_executable_extensions; do
5393   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5394     ac_cv_prog_XML2_CONFIG="$ac_prog"
5395     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5396     break 2
5397   fi
5398 done
5399 done
5400 IFS=$as_save_IFS
5401
5402 fi
5403 fi
5404 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
5405 if test -n "$XML2_CONFIG"; then
5406   { echo "$as_me:$LINENO: result: $XML2_CONFIG" >&5
5407 echo "${ECHO_T}$XML2_CONFIG" >&6; }
5408 else
5409   { echo "$as_me:$LINENO: result: no" >&5
5410 echo "${ECHO_T}no" >&6; }
5411 fi
5412
5413
5414   test -n "$XML2_CONFIG" && break
5415 done
5416
5417   if test -n "$XML2_CONFIG"; then
5418     for pgac_option in `$XML2_CONFIG --cflags`; do
5419       case $pgac_option in
5420         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
5421       esac
5422     done
5423     for pgac_option in `$XML2_CONFIG --libs`; do
5424       case $pgac_option in
5425         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5426       esac
5427     done
5428   fi
5429 fi
5430
5431
5432
5433 #
5434 # XSLT
5435 #
5436
5437 pgac_args="$pgac_args with_libxslt"
5438
5439
5440 # Check whether --with-libxslt was given.
5441 if test "${with_libxslt+set}" = set; then
5442   withval=$with_libxslt;
5443   case $withval in
5444     yes)
5445
5446 cat >>confdefs.h <<\_ACEOF
5447 #define USE_LIBXSLT 1
5448 _ACEOF
5449
5450       ;;
5451     no)
5452       :
5453       ;;
5454     *)
5455       { { echo "$as_me:$LINENO: error: no argument expected for --with-libxslt option" >&5
5456 echo "$as_me: error: no argument expected for --with-libxslt option" >&2;}
5457    { (exit 1); exit 1; }; }
5458       ;;
5459   esac
5460
5461 else
5462   with_libxslt=no
5463
5464 fi
5465
5466
5467
5468
5469
5470
5471 #
5472 # tzdata
5473 #
5474
5475 pgac_args="$pgac_args with_system_tzdata"
5476
5477
5478 # Check whether --with-system-tzdata was given.
5479 if test "${with_system_tzdata+set}" = set; then
5480   withval=$with_system_tzdata;
5481   case $withval in
5482     yes)
5483       { { echo "$as_me:$LINENO: error: argument required for --with-system-tzdata option" >&5
5484 echo "$as_me: error: argument required for --with-system-tzdata option" >&2;}
5485    { (exit 1); exit 1; }; }
5486       ;;
5487     no)
5488       { { echo "$as_me:$LINENO: error: argument required for --with-system-tzdata option" >&5
5489 echo "$as_me: error: argument required for --with-system-tzdata option" >&2;}
5490    { (exit 1); exit 1; }; }
5491       ;;
5492     *)
5493
5494       ;;
5495   esac
5496
5497 fi
5498
5499
5500
5501
5502 #
5503 # Zlib
5504 #
5505
5506 pgac_args="$pgac_args with_zlib"
5507
5508
5509 # Check whether --with-zlib was given.
5510 if test "${with_zlib+set}" = set; then
5511   withval=$with_zlib;
5512   case $withval in
5513     yes)
5514       :
5515       ;;
5516     no)
5517       :
5518       ;;
5519     *)
5520       { { echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
5521 echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
5522    { (exit 1); exit 1; }; }
5523       ;;
5524   esac
5525
5526 else
5527   with_zlib=yes
5528
5529 fi
5530
5531
5532
5533
5534 #
5535 # Elf
5536 #
5537
5538 # Assume system is ELF if it predefines __ELF__ as 1,
5539 # otherwise believe host_os based default.
5540 case $host_os in
5541     freebsd1*|freebsd2*) elf=no;;
5542     freebsd3*|freebsd4*) elf=yes;;
5543 esac
5544
5545
5546 { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
5547 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
5548 if test "${ac_cv_path_GREP+set}" = set; then
5549   echo $ECHO_N "(cached) $ECHO_C" >&6
5550 else
5551   # Extract the first word of "grep ggrep" to use in msg output
5552 if test -z "$GREP"; then
5553 set dummy grep ggrep; ac_prog_name=$2
5554 if test "${ac_cv_path_GREP+set}" = set; then
5555   echo $ECHO_N "(cached) $ECHO_C" >&6
5556 else
5557   ac_path_GREP_found=false
5558 # Loop through the user's path and test for each of PROGNAME-LIST
5559 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5560 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5561 do
5562   IFS=$as_save_IFS
5563   test -z "$as_dir" && as_dir=.
5564   for ac_prog in grep ggrep; do
5565   for ac_exec_ext in '' $ac_executable_extensions; do
5566     ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5567     { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5568     # Check for GNU ac_path_GREP and select it if it is found.
5569   # Check for GNU $ac_path_GREP
5570 case `"$ac_path_GREP" --version 2>&1` in
5571 *GNU*)
5572   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5573 *)
5574   ac_count=0
5575   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
5576   while :
5577   do
5578     cat "conftest.in" "conftest.in" >"conftest.tmp"
5579     mv "conftest.tmp" "conftest.in"
5580     cp "conftest.in" "conftest.nl"
5581     echo 'GREP' >> "conftest.nl"
5582     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5583     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5584     ac_count=`expr $ac_count + 1`
5585     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5586       # Best one so far, save it but keep looking for a better one
5587       ac_cv_path_GREP="$ac_path_GREP"
5588       ac_path_GREP_max=$ac_count
5589     fi
5590     # 10*(2^10) chars as input seems more than enough
5591     test $ac_count -gt 10 && break
5592   done
5593   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5594 esac
5595
5596
5597     $ac_path_GREP_found && break 3
5598   done
5599 done
5600
5601 done
5602 IFS=$as_save_IFS
5603
5604
5605 fi
5606
5607 GREP="$ac_cv_path_GREP"
5608 if test -z "$GREP"; then
5609   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
5610 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
5611    { (exit 1); exit 1; }; }
5612 fi
5613
5614 else
5615   ac_cv_path_GREP=$GREP
5616 fi
5617
5618
5619 fi
5620 { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
5621 echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
5622  GREP="$ac_cv_path_GREP"
5623
5624
5625 { echo "$as_me:$LINENO: checking for egrep" >&5
5626 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
5627 if test "${ac_cv_path_EGREP+set}" = set; then
5628   echo $ECHO_N "(cached) $ECHO_C" >&6
5629 else
5630   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5631    then ac_cv_path_EGREP="$GREP -E"
5632    else
5633      # Extract the first word of "egrep" to use in msg output
5634 if test -z "$EGREP"; then
5635 set dummy egrep; ac_prog_name=$2
5636 if test "${ac_cv_path_EGREP+set}" = set; then
5637   echo $ECHO_N "(cached) $ECHO_C" >&6
5638 else
5639   ac_path_EGREP_found=false
5640 # Loop through the user's path and test for each of PROGNAME-LIST
5641 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5642 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5643 do
5644   IFS=$as_save_IFS
5645   test -z "$as_dir" && as_dir=.
5646   for ac_prog in egrep; do
5647   for ac_exec_ext in '' $ac_executable_extensions; do
5648     ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5649     { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5650     # Check for GNU ac_path_EGREP and select it if it is found.
5651   # Check for GNU $ac_path_EGREP
5652 case `"$ac_path_EGREP" --version 2>&1` in
5653 *GNU*)
5654   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5655 *)
5656   ac_count=0
5657   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
5658   while :
5659   do
5660     cat "conftest.in" "conftest.in" >"conftest.tmp"
5661     mv "conftest.tmp" "conftest.in"
5662     cp "conftest.in" "conftest.nl"
5663     echo 'EGREP' >> "conftest.nl"
5664     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5665     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5666     ac_count=`expr $ac_count + 1`
5667     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5668       # Best one so far, save it but keep looking for a better one
5669       ac_cv_path_EGREP="$ac_path_EGREP"
5670       ac_path_EGREP_max=$ac_count
5671     fi
5672     # 10*(2^10) chars as input seems more than enough
5673     test $ac_count -gt 10 && break
5674   done
5675   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5676 esac
5677
5678
5679     $ac_path_EGREP_found && break 3
5680   done
5681 done
5682
5683 done
5684 IFS=$as_save_IFS
5685
5686
5687 fi
5688
5689 EGREP="$ac_cv_path_EGREP"
5690 if test -z "$EGREP"; then
5691   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
5692 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
5693    { (exit 1); exit 1; }; }
5694 fi
5695
5696 else
5697   ac_cv_path_EGREP=$EGREP
5698 fi
5699
5700
5701    fi
5702 fi
5703 { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
5704 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
5705  EGREP="$ac_cv_path_EGREP"
5706
5707
5708 cat >conftest.$ac_ext <<_ACEOF
5709 /* confdefs.h.  */
5710 _ACEOF
5711 cat confdefs.h >>conftest.$ac_ext
5712 cat >>conftest.$ac_ext <<_ACEOF
5713 /* end confdefs.h.  */
5714 #if __ELF__
5715   yes
5716 #endif
5717
5718 _ACEOF
5719 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5720   $EGREP "yes" >/dev/null 2>&1; then
5721   ELF_SYS=true
5722 else
5723   if test "X$elf" = "Xyes" ; then
5724   ELF_SYS=true
5725 else
5726   ELF_SYS=
5727 fi
5728 fi
5729 rm -f conftest*
5730
5731
5732
5733 #
5734 # Assignments
5735 #
5736
5737 CPPFLAGS="$CPPFLAGS $INCLUDES"
5738 LDFLAGS="$LDFLAGS $LIBDIRS"
5739
5740
5741
5742
5743 # Check whether --with-gnu-ld was given.
5744 if test "${with_gnu_ld+set}" = set; then
5745   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
5746 else
5747   with_gnu_ld=no
5748 fi
5749
5750 ac_prog=ld
5751 if test "$GCC" = yes; then
5752   # Check if gcc -print-prog-name=ld gives a path.
5753   { echo "$as_me:$LINENO: checking for ld used by GCC" >&5
5754 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6; }
5755   case $host in
5756   *-*-mingw*)
5757     # gcc leaves a trailing carriage return which upsets mingw
5758     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5759   *)
5760     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5761   esac
5762   case "$ac_prog" in
5763     # Accept absolute paths.
5764     [\\/]* | [A-Za-z]:[\\/]*)
5765       re_direlt='/[^/][^/]*/\.\./'
5766       # Canonicalize the path of ld
5767       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
5768       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
5769         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
5770       done
5771       test -z "$LD" && LD="$ac_prog"
5772       ;;
5773   "")
5774     # If it fails, then pretend we aren't using GCC.
5775     ac_prog=ld
5776     ;;
5777   *)
5778     # If it is relative, then search for the first ld in PATH.
5779     with_gnu_ld=unknown
5780     ;;
5781   esac
5782 elif test "$with_gnu_ld" = yes; then
5783   { echo "$as_me:$LINENO: checking for GNU ld" >&5
5784 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
5785 else
5786   { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
5787 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
5788 fi
5789 if test "${ac_cv_path_LD+set}" = set; then
5790   echo $ECHO_N "(cached) $ECHO_C" >&6
5791 else
5792   if test -z "$LD"; then
5793   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
5794   for ac_dir in $PATH; do
5795     test -z "$ac_dir" && ac_dir=.
5796     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5797       ac_cv_path_LD="$ac_dir/$ac_prog"
5798       # Check to see if the program is GNU ld.  I'd rather use --version,
5799       # but apparently some GNU ld's only accept -v.
5800       # Break only if it was the GNU/non-GNU ld that we prefer.
5801       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
5802         test "$with_gnu_ld" != no && break
5803       else
5804         test "$with_gnu_ld" != yes && break
5805       fi
5806     fi
5807   done
5808   IFS="$ac_save_ifs"
5809 else
5810   ac_cv_path_LD="$LD" # Let the user override the test with a path.
5811 fi
5812 fi
5813
5814 LD="$ac_cv_path_LD"
5815 if test -n "$LD"; then
5816   { echo "$as_me:$LINENO: result: $LD" >&5
5817 echo "${ECHO_T}$LD" >&6; }
5818 else
5819   { echo "$as_me:$LINENO: result: no" >&5
5820 echo "${ECHO_T}no" >&6; }
5821 fi
5822 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
5823 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
5824    { (exit 1); exit 1; }; }
5825 { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
5826 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
5827 if test "${ac_cv_prog_gnu_ld+set}" = set; then
5828   echo $ECHO_N "(cached) $ECHO_C" >&6
5829 else
5830   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
5831 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
5832   ac_cv_prog_gnu_ld=yes
5833 else
5834   ac_cv_prog_gnu_ld=no
5835 fi
5836 fi
5837 { echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
5838 echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6; }
5839 with_gnu_ld=$ac_cv_prog_gnu_ld
5840
5841
5842
5843
5844 case $host_os in sysv5*)
5845   { echo "$as_me:$LINENO: checking whether ld -R works" >&5
5846 echo $ECHO_N "checking whether ld -R works... $ECHO_C" >&6; }
5847 if test "${pgac_cv_prog_ld_R+set}" = set; then
5848   echo $ECHO_N "(cached) $ECHO_C" >&6
5849 else
5850
5851     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
5852     cat >conftest.$ac_ext <<_ACEOF
5853 /* confdefs.h.  */
5854 _ACEOF
5855 cat confdefs.h >>conftest.$ac_ext
5856 cat >>conftest.$ac_ext <<_ACEOF
5857 /* end confdefs.h.  */
5858
5859 int
5860 main ()
5861 {
5862
5863   ;
5864   return 0;
5865 }
5866 _ACEOF
5867 rm -f conftest.$ac_objext conftest$ac_exeext
5868 if { (ac_try="$ac_link"
5869 case "(($ac_try" in
5870   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5871   *) ac_try_echo=$ac_try;;
5872 esac
5873 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5874   (eval "$ac_link") 2>conftest.er1
5875   ac_status=$?
5876   grep -v '^ *+' conftest.er1 >conftest.err
5877   rm -f conftest.er1
5878   cat conftest.err >&5
5879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5880   (exit $ac_status); } && {
5881          test -z "$ac_c_werror_flag" ||
5882          test ! -s conftest.err
5883        } && test -s conftest$ac_exeext &&
5884        $as_test_x conftest$ac_exeext; then
5885   pgac_cv_prog_ld_R=yes
5886 else
5887   echo "$as_me: failed program was:" >&5
5888 sed 's/^/| /' conftest.$ac_ext >&5
5889
5890         pgac_cv_prog_ld_R=no
5891 fi
5892
5893 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5894       conftest$ac_exeext conftest.$ac_ext
5895     LDFLAGS=$pgac_save_LDFLAGS
5896
5897 fi
5898 { echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
5899 echo "${ECHO_T}$pgac_cv_prog_ld_R" >&6; }
5900   ld_R_works=$pgac_cv_prog_ld_R
5901
5902 esac
5903 if test -n "$ac_tool_prefix"; then
5904   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5905 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5906 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5907 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5908 if test "${ac_cv_prog_RANLIB+set}" = set; then
5909   echo $ECHO_N "(cached) $ECHO_C" >&6
5910 else
5911   if test -n "$RANLIB"; then
5912   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5913 else
5914 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5915 for as_dir in $PATH
5916 do
5917   IFS=$as_save_IFS
5918   test -z "$as_dir" && as_dir=.
5919   for ac_exec_ext in '' $ac_executable_extensions; do
5920   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5921     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5922     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5923     break 2
5924   fi
5925 done
5926 done
5927 IFS=$as_save_IFS
5928
5929 fi
5930 fi
5931 RANLIB=$ac_cv_prog_RANLIB
5932 if test -n "$RANLIB"; then
5933   { echo "$as_me:$LINENO: result: $RANLIB" >&5
5934 echo "${ECHO_T}$RANLIB" >&6; }
5935 else
5936   { echo "$as_me:$LINENO: result: no" >&5
5937 echo "${ECHO_T}no" >&6; }
5938 fi
5939
5940
5941 fi
5942 if test -z "$ac_cv_prog_RANLIB"; then
5943   ac_ct_RANLIB=$RANLIB
5944   # Extract the first word of "ranlib", so it can be a program name with args.
5945 set dummy ranlib; ac_word=$2
5946 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5947 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5948 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5949   echo $ECHO_N "(cached) $ECHO_C" >&6
5950 else
5951   if test -n "$ac_ct_RANLIB"; then
5952   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5953 else
5954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5955 for as_dir in $PATH
5956 do
5957   IFS=$as_save_IFS
5958   test -z "$as_dir" && as_dir=.
5959   for ac_exec_ext in '' $ac_executable_extensions; do
5960   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5961     ac_cv_prog_ac_ct_RANLIB="ranlib"
5962     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5963     break 2
5964   fi
5965 done
5966 done
5967 IFS=$as_save_IFS
5968
5969 fi
5970 fi
5971 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5972 if test -n "$ac_ct_RANLIB"; then
5973   { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5974 echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
5975 else
5976   { echo "$as_me:$LINENO: result: no" >&5
5977 echo "${ECHO_T}no" >&6; }
5978 fi
5979
5980   if test "x$ac_ct_RANLIB" = x; then
5981     RANLIB=":"
5982   else
5983     case $cross_compiling:$ac_tool_warned in
5984 yes:)
5985 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5986 whose name does not start with the host triplet.  If you think this
5987 configuration is useful to you, please write to autoconf@gnu.org." >&5
5988 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5989 whose name does not start with the host triplet.  If you think this
5990 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5991 ac_tool_warned=yes ;;
5992 esac
5993     RANLIB=$ac_ct_RANLIB
5994   fi
5995 else
5996   RANLIB="$ac_cv_prog_RANLIB"
5997 fi
5998
5999
6000   if test -n "$ac_tool_prefix"; then
6001   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6002 set dummy ${ac_tool_prefix}strip; ac_word=$2
6003 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6004 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6005 if test "${ac_cv_prog_STRIP+set}" = set; then
6006   echo $ECHO_N "(cached) $ECHO_C" >&6
6007 else
6008   if test -n "$STRIP"; then
6009   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6010 else
6011 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6012 for as_dir in $PATH
6013 do
6014   IFS=$as_save_IFS
6015   test -z "$as_dir" && as_dir=.
6016   for ac_exec_ext in '' $ac_executable_extensions; do
6017   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6018     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6019     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6020     break 2
6021   fi
6022 done
6023 done
6024 IFS=$as_save_IFS
6025
6026 fi
6027 fi
6028 STRIP=$ac_cv_prog_STRIP
6029 if test -n "$STRIP"; then
6030   { echo "$as_me:$LINENO: result: $STRIP" >&5
6031 echo "${ECHO_T}$STRIP" >&6; }
6032 else
6033   { echo "$as_me:$LINENO: result: no" >&5
6034 echo "${ECHO_T}no" >&6; }
6035 fi
6036
6037
6038 fi
6039 if test -z "$ac_cv_prog_STRIP"; then
6040   ac_ct_STRIP=$STRIP
6041   # Extract the first word of "strip", so it can be a program name with args.
6042 set dummy strip; ac_word=$2
6043 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6044 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6045 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
6046   echo $ECHO_N "(cached) $ECHO_C" >&6
6047 else
6048   if test -n "$ac_ct_STRIP"; then
6049   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6050 else
6051 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6052 for as_dir in $PATH
6053 do
6054   IFS=$as_save_IFS
6055   test -z "$as_dir" && as_dir=.
6056   for ac_exec_ext in '' $ac_executable_extensions; do
6057   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6058     ac_cv_prog_ac_ct_STRIP="strip"
6059     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6060     break 2
6061   fi
6062 done
6063 done
6064 IFS=$as_save_IFS
6065
6066 fi
6067 fi
6068 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6069 if test -n "$ac_ct_STRIP"; then
6070   { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
6071 echo "${ECHO_T}$ac_ct_STRIP" >&6; }
6072 else
6073   { echo "$as_me:$LINENO: result: no" >&5
6074 echo "${ECHO_T}no" >&6; }
6075 fi
6076
6077   if test "x$ac_ct_STRIP" = x; then
6078     STRIP=":"
6079   else
6080     case $cross_compiling:$ac_tool_warned in
6081 yes:)
6082 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
6083 whose name does not start with the host triplet.  If you think this
6084 configuration is useful to you, please write to autoconf@gnu.org." >&5
6085 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
6086 whose name does not start with the host triplet.  If you think this
6087 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
6088 ac_tool_warned=yes ;;
6089 esac
6090     STRIP=$ac_ct_STRIP
6091   fi
6092 else
6093   STRIP="$ac_cv_prog_STRIP"
6094 fi
6095
6096
6097   { echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
6098 echo $ECHO_N "checking whether it is possible to strip libraries... $ECHO_C" >&6; }
6099   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6100     STRIP_STATIC_LIB="$STRIP -x"
6101     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6102     { echo "$as_me:$LINENO: result: yes" >&5
6103 echo "${ECHO_T}yes" >&6; }
6104   else
6105     STRIP_STATIC_LIB=:
6106     STRIP_SHARED_LIB=:
6107     { echo "$as_me:$LINENO: result: no" >&5
6108 echo "${ECHO_T}no" >&6; }
6109   fi
6110
6111
6112
6113 if test -n "$ac_tool_prefix"; then
6114   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6115 set dummy ${ac_tool_prefix}ar; ac_word=$2
6116 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6117 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6118 if test "${ac_cv_prog_AR+set}" = set; then
6119   echo $ECHO_N "(cached) $ECHO_C" >&6
6120 else
6121   if test -n "$AR"; then
6122   ac_cv_prog_AR="$AR" # Let the user override the test.
6123 else
6124 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6125 for as_dir in $PATH
6126 do
6127   IFS=$as_save_IFS
6128   test -z "$as_dir" && as_dir=.
6129   for ac_exec_ext in '' $ac_executable_extensions; do
6130   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6131     ac_cv_prog_AR="${ac_tool_prefix}ar"
6132     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6133     break 2
6134   fi
6135 done
6136 done
6137 IFS=$as_save_IFS
6138
6139 fi
6140 fi
6141 AR=$ac_cv_prog_AR
6142 if test -n "$AR"; then
6143   { echo "$as_me:$LINENO: result: $AR" >&5
6144 echo "${ECHO_T}$AR" >&6; }
6145 else
6146   { echo "$as_me:$LINENO: result: no" >&5
6147 echo "${ECHO_T}no" >&6; }
6148 fi
6149
6150
6151 fi
6152 if test -z "$ac_cv_prog_AR"; then
6153   ac_ct_AR=$AR
6154   # Extract the first word of "ar", so it can be a program name with args.
6155 set dummy ar; ac_word=$2
6156 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6157 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6158 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
6159   echo $ECHO_N "(cached) $ECHO_C" >&6
6160 else
6161   if test -n "$ac_ct_AR"; then
6162   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6163 else
6164 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6165 for as_dir in $PATH
6166 do
6167   IFS=$as_save_IFS
6168   test -z "$as_dir" && as_dir=.
6169   for ac_exec_ext in '' $ac_executable_extensions; do
6170   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6171     ac_cv_prog_ac_ct_AR="ar"
6172     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6173     break 2
6174   fi
6175 done
6176 done
6177 IFS=$as_save_IFS
6178
6179 fi
6180 fi
6181 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6182 if test -n "$ac_ct_AR"; then
6183   { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
6184 echo "${ECHO_T}$ac_ct_AR" >&6; }
6185 else
6186   { echo "$as_me:$LINENO: result: no" >&5
6187 echo "${ECHO_T}no" >&6; }
6188 fi
6189
6190   if test "x$ac_ct_AR" = x; then
6191     AR="ar"
6192   else
6193     case $cross_compiling:$ac_tool_warned in
6194 yes:)
6195 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
6196 whose name does not start with the host triplet.  If you think this
6197 configuration is useful to you, please write to autoconf@gnu.org." >&5
6198 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
6199 whose name does not start with the host triplet.  If you think this
6200 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
6201 ac_tool_warned=yes ;;
6202 esac
6203     AR=$ac_ct_AR
6204   fi
6205 else
6206   AR="$ac_cv_prog_AR"
6207 fi
6208
6209 if test "$PORTNAME" = "win32"; then
6210   if test -n "$ac_tool_prefix"; then
6211   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6212 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6213 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6214 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6215 if test "${ac_cv_prog_DLLTOOL+set}" = set; then
6216   echo $ECHO_N "(cached) $ECHO_C" >&6
6217 else
6218   if test -n "$DLLTOOL"; then
6219   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6220 else
6221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6222 for as_dir in $PATH
6223 do
6224   IFS=$as_save_IFS
6225   test -z "$as_dir" && as_dir=.
6226   for ac_exec_ext in '' $ac_executable_extensions; do
6227   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6228     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6229     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6230     break 2
6231   fi
6232 done
6233 done
6234 IFS=$as_save_IFS
6235
6236 fi
6237 fi
6238 DLLTOOL=$ac_cv_prog_DLLTOOL
6239 if test -n "$DLLTOOL"; then
6240   { echo "$as_me:$LINENO: result: $DLLTOOL" >&5
6241 echo "${ECHO_T}$DLLTOOL" >&6; }
6242 else
6243   { echo "$as_me:$LINENO: result: no" >&5
6244 echo "${ECHO_T}no" >&6; }
6245 fi
6246
6247
6248 fi
6249 if test -z "$ac_cv_prog_DLLTOOL"; then
6250   ac_ct_DLLTOOL=$DLLTOOL
6251   # Extract the first word of "dlltool", so it can be a program name with args.
6252 set dummy dlltool; ac_word=$2
6253 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6254 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6255 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
6256   echo $ECHO_N "(cached) $ECHO_C" >&6
6257 else
6258   if test -n "$ac_ct_DLLTOOL"; then
6259   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6260 else
6261 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6262 for as_dir in $PATH
6263 do
6264   IFS=$as_save_IFS
6265   test -z "$as_dir" && as_dir=.
6266   for ac_exec_ext in '' $ac_executable_extensions; do
6267   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6268     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6269     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6270     break 2
6271   fi
6272 done
6273 done
6274 IFS=$as_save_IFS
6275
6276 fi
6277 fi
6278 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6279 if test -n "$ac_ct_DLLTOOL"; then
6280   { echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
6281 echo "${ECHO_T}$ac_ct_DLLTOOL" >&6; }
6282 else
6283   { echo "$as_me:$LINENO: result: no" >&5
6284 echo "${ECHO_T}no" >&6; }
6285 fi
6286
6287   if test "x$ac_ct_DLLTOOL" = x; then
6288     DLLTOOL="dlltool"
6289   else
6290     case $cross_compiling:$ac_tool_warned in
6291 yes:)
6292 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
6293 whose name does not start with the host triplet.  If you think this
6294 configuration is useful to you, please write to autoconf@gnu.org." >&5
6295 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
6296 whose name does not start with the host triplet.  If you think this
6297 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
6298 ac_tool_warned=yes ;;
6299 esac
6300     DLLTOOL=$ac_ct_DLLTOOL
6301   fi
6302 else
6303   DLLTOOL="$ac_cv_prog_DLLTOOL"
6304 fi
6305
6306   if test -n "$ac_tool_prefix"; then
6307   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
6308 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
6309 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6310 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6311 if test "${ac_cv_prog_DLLWRAP+set}" = set; then
6312   echo $ECHO_N "(cached) $ECHO_C" >&6
6313 else
6314   if test -n "$DLLWRAP"; then
6315   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
6316 else
6317 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6318 for as_dir in $PATH
6319 do
6320   IFS=$as_save_IFS
6321   test -z "$as_dir" && as_dir=.
6322   for ac_exec_ext in '' $ac_executable_extensions; do
6323   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6324     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
6325     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6326     break 2
6327   fi
6328 done
6329 done
6330 IFS=$as_save_IFS
6331
6332 fi
6333 fi
6334 DLLWRAP=$ac_cv_prog_DLLWRAP
6335 if test -n "$DLLWRAP"; then
6336   { echo "$as_me:$LINENO: result: $DLLWRAP" >&5
6337 echo "${ECHO_T}$DLLWRAP" >&6; }
6338 else
6339   { echo "$as_me:$LINENO: result: no" >&5
6340 echo "${ECHO_T}no" >&6; }
6341 fi
6342
6343
6344 fi
6345 if test -z "$ac_cv_prog_DLLWRAP"; then
6346   ac_ct_DLLWRAP=$DLLWRAP
6347   # Extract the first word of "dllwrap", so it can be a program name with args.
6348 set dummy dllwrap; ac_word=$2
6349 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6350 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6351 if test "${ac_cv_prog_ac_ct_DLLWRAP+set}" = set; then
6352   echo $ECHO_N "(cached) $ECHO_C" >&6
6353 else
6354   if test -n "$ac_ct_DLLWRAP"; then
6355   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
6356 else
6357 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6358 for as_dir in $PATH
6359 do
6360   IFS=$as_save_IFS
6361   test -z "$as_dir" && as_dir=.
6362   for ac_exec_ext in '' $ac_executable_extensions; do
6363   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6364     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
6365     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6366     break 2
6367   fi
6368 done
6369 done
6370 IFS=$as_save_IFS
6371
6372 fi
6373 fi
6374 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
6375 if test -n "$ac_ct_DLLWRAP"; then
6376   { echo "$as_me:$LINENO: result: $ac_ct_DLLWRAP" >&5
6377 echo "${ECHO_T}$ac_ct_DLLWRAP" >&6; }
6378 else
6379   { echo "$as_me:$LINENO: result: no" >&5
6380 echo "${ECHO_T}no" >&6; }
6381 fi
6382
6383   if test "x$ac_ct_DLLWRAP" = x; then
6384     DLLWRAP="dllwrap"
6385   else
6386     case $cross_compiling:$ac_tool_warned in
6387 yes:)
6388 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
6389 whose name does not start with the host triplet.  If you think this
6390 configuration is useful to you, please write to autoconf@gnu.org." >&5
6391 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
6392 whose name does not start with the host triplet.  If you think this
6393 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
6394 ac_tool_warned=yes ;;
6395 esac
6396     DLLWRAP=$ac_ct_DLLWRAP
6397   fi
6398 else
6399   DLLWRAP="$ac_cv_prog_DLLWRAP"
6400 fi
6401
6402   if test -n "$ac_tool_prefix"; then
6403   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6404 set dummy ${ac_tool_prefix}windres; ac_word=$2
6405 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6406 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6407 if test "${ac_cv_prog_WINDRES+set}" = set; then
6408   echo $ECHO_N "(cached) $ECHO_C" >&6
6409 else
6410   if test -n "$WINDRES"; then
6411   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6412 else
6413 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6414 for as_dir in $PATH
6415 do
6416   IFS=$as_save_IFS
6417   test -z "$as_dir" && as_dir=.
6418   for ac_exec_ext in '' $ac_executable_extensions; do
6419   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6420     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6421     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6422     break 2
6423   fi
6424 done
6425 done
6426 IFS=$as_save_IFS
6427
6428 fi
6429 fi
6430 WINDRES=$ac_cv_prog_WINDRES
6431 if test -n "$WINDRES"; then
6432   { echo "$as_me:$LINENO: result: $WINDRES" >&5
6433 echo "${ECHO_T}$WINDRES" >&6; }
6434 else
6435   { echo "$as_me:$LINENO: result: no" >&5
6436 echo "${ECHO_T}no" >&6; }
6437 fi
6438
6439
6440 fi
6441 if test -z "$ac_cv_prog_WINDRES"; then
6442   ac_ct_WINDRES=$WINDRES
6443   # Extract the first word of "windres", so it can be a program name with args.
6444 set dummy windres; ac_word=$2
6445 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6446 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6447 if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then
6448   echo $ECHO_N "(cached) $ECHO_C" >&6
6449 else
6450   if test -n "$ac_ct_WINDRES"; then
6451   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6452 else
6453 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6454 for as_dir in $PATH
6455 do
6456   IFS=$as_save_IFS
6457   test -z "$as_dir" && as_dir=.
6458   for ac_exec_ext in '' $ac_executable_extensions; do
6459   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6460     ac_cv_prog_ac_ct_WINDRES="windres"
6461     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6462     break 2
6463   fi
6464 done
6465 done
6466 IFS=$as_save_IFS
6467
6468 fi
6469 fi
6470 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6471 if test -n "$ac_ct_WINDRES"; then
6472   { echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5
6473 echo "${ECHO_T}$ac_ct_WINDRES" >&6; }
6474 else
6475   { echo "$as_me:$LINENO: result: no" >&5
6476 echo "${ECHO_T}no" >&6; }
6477 fi
6478
6479   if test "x$ac_ct_WINDRES" = x; then
6480     WINDRES="windres"
6481   else
6482     case $cross_compiling:$ac_tool_warned in
6483 yes:)
6484 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
6485 whose name does not start with the host triplet.  If you think this
6486 configuration is useful to you, please write to autoconf@gnu.org." >&5
6487 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
6488 whose name does not start with the host triplet.  If you think this
6489 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
6490 ac_tool_warned=yes ;;
6491 esac
6492     WINDRES=$ac_ct_WINDRES
6493   fi
6494 else
6495   WINDRES="$ac_cv_prog_WINDRES"
6496 fi
6497
6498 fi
6499
6500 # Extract the first word of "tar", so it can be a program name with args.
6501 set dummy tar; ac_word=$2
6502 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6503 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6504 if test "${ac_cv_path_TAR+set}" = set; then
6505   echo $ECHO_N "(cached) $ECHO_C" >&6
6506 else
6507   case $TAR in
6508   [\\/]* | ?:[\\/]*)
6509   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
6510   ;;
6511   *)
6512   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6513 for as_dir in $PATH
6514 do
6515   IFS=$as_save_IFS
6516   test -z "$as_dir" && as_dir=.
6517   for ac_exec_ext in '' $ac_executable_extensions; do
6518   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6519     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
6520     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6521     break 2
6522   fi
6523 done
6524 done
6525 IFS=$as_save_IFS
6526
6527   ;;
6528 esac
6529 fi
6530 TAR=$ac_cv_path_TAR
6531 if test -n "$TAR"; then
6532   { echo "$as_me:$LINENO: result: $TAR" >&5
6533 echo "${ECHO_T}$TAR" >&6; }
6534 else
6535   { echo "$as_me:$LINENO: result: no" >&5
6536 echo "${ECHO_T}no" >&6; }
6537 fi
6538
6539
6540 { echo "$as_me:$LINENO: checking whether ln -s works" >&5
6541 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
6542 LN_S=$as_ln_s
6543 if test "$LN_S" = "ln -s"; then
6544   { echo "$as_me:$LINENO: result: yes" >&5
6545 echo "${ECHO_T}yes" >&6; }
6546 else
6547   { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
6548 echo "${ECHO_T}no, using $LN_S" >&6; }
6549 fi
6550
6551 for ac_prog in gawk mawk nawk awk
6552 do
6553   # Extract the first word of "$ac_prog", so it can be a program name with args.
6554 set dummy $ac_prog; ac_word=$2
6555 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6556 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6557 if test "${ac_cv_prog_AWK+set}" = set; then
6558   echo $ECHO_N "(cached) $ECHO_C" >&6
6559 else
6560   if test -n "$AWK"; then
6561   ac_cv_prog_AWK="$AWK" # Let the user override the test.
6562 else
6563 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6564 for as_dir in $PATH
6565 do
6566   IFS=$as_save_IFS
6567   test -z "$as_dir" && as_dir=.
6568   for ac_exec_ext in '' $ac_executable_extensions; do
6569   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6570     ac_cv_prog_AWK="$ac_prog"
6571     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6572     break 2
6573   fi
6574 done
6575 done
6576 IFS=$as_save_IFS
6577
6578 fi
6579 fi
6580 AWK=$ac_cv_prog_AWK
6581 if test -n "$AWK"; then
6582   { echo "$as_me:$LINENO: result: $AWK" >&5
6583 echo "${ECHO_T}$AWK" >&6; }
6584 else
6585   { echo "$as_me:$LINENO: result: no" >&5
6586 echo "${ECHO_T}no" >&6; }
6587 fi
6588
6589
6590   test -n "$AWK" && break
6591 done
6592
6593
6594 # Let the user override the search
6595 if test -z "$BISON"; then
6596   for ac_prog in bison
6597 do
6598   # Extract the first word of "$ac_prog", so it can be a program name with args.
6599 set dummy $ac_prog; ac_word=$2
6600 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6601 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6602 if test "${ac_cv_prog_BISON+set}" = set; then
6603   echo $ECHO_N "(cached) $ECHO_C" >&6
6604 else
6605   if test -n "$BISON"; then
6606   ac_cv_prog_BISON="$BISON" # Let the user override the test.
6607 else
6608 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6609 for as_dir in $PATH
6610 do
6611   IFS=$as_save_IFS
6612   test -z "$as_dir" && as_dir=.
6613   for ac_exec_ext in '' $ac_executable_extensions; do
6614   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6615     ac_cv_prog_BISON="$ac_prog"
6616     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6617     break 2
6618   fi
6619 done
6620 done
6621 IFS=$as_save_IFS
6622
6623 fi
6624 fi
6625 BISON=$ac_cv_prog_BISON
6626 if test -n "$BISON"; then
6627   { echo "$as_me:$LINENO: result: $BISON" >&5
6628 echo "${ECHO_T}$BISON" >&6; }
6629 else
6630   { echo "$as_me:$LINENO: result: no" >&5
6631 echo "${ECHO_T}no" >&6; }
6632 fi
6633
6634
6635   test -n "$BISON" && break
6636 done
6637
6638 fi
6639
6640 if test "$BISON"; then
6641   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
6642   { echo "$as_me:$LINENO: using $pgac_bison_version" >&5
6643 echo "$as_me: using $pgac_bison_version" >&6;}
6644   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
6645   then
6646     { echo "$as_me:$LINENO: WARNING:
6647 *** The installed version of Bison is too old to use with PostgreSQL.
6648 *** Bison version 1.875 or later is required." >&5
6649 echo "$as_me: WARNING:
6650 *** The installed version of Bison is too old to use with PostgreSQL.
6651 *** Bison version 1.875 or later is required." >&2;}
6652     BISON=""
6653   fi
6654 fi
6655
6656 if test -z "$BISON"; then
6657   { echo "$as_me:$LINENO: WARNING:
6658 *** Without Bison you will not be able to build PostgreSQL from CVS nor
6659 *** change any of the parser definition files.  You can obtain Bison from
6660 *** a GNU mirror site.  (If you are using the official distribution of
6661 *** PostgreSQL then you do not need to worry about this, because the Bison
6662 *** output is pre-generated.)" >&5
6663 echo "$as_me: WARNING:
6664 *** Without Bison you will not be able to build PostgreSQL from CVS nor
6665 *** change any of the parser definition files.  You can obtain Bison from
6666 *** a GNU mirror site.  (If you are using the official distribution of
6667 *** PostgreSQL then you do not need to worry about this, because the Bison
6668 *** output is pre-generated.)" >&2;}
6669 fi
6670 # We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
6671
6672
6673 { echo "$as_me:$LINENO: checking for flex" >&5
6674 echo $ECHO_N "checking for flex... $ECHO_C" >&6; }
6675 if test "${pgac_cv_path_flex+set}" = set; then
6676   echo $ECHO_N "(cached) $ECHO_C" >&6
6677 else
6678   # Let the user override the test
6679 if test -n "$FLEX"; then
6680   pgac_cv_path_flex=$FLEX
6681 else
6682   pgac_save_IFS=$IFS
6683   IFS=$PATH_SEPARATOR
6684   for pgac_dir in $PATH; do
6685     IFS=$pgac_save_IFS
6686     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
6687       pgac_dir=`pwd`
6688     fi
6689     for pgac_prog in flex lex; do
6690       pgac_candidate="$pgac_dir/$pgac_prog"
6691       if test -f "$pgac_candidate" \
6692         && $pgac_candidate --version </dev/null >/dev/null 2>&1
6693       then
6694         echo '%%'  > conftest.l
6695         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
6696           if $pgac_candidate --version | grep ' 2\.5\.3$' >/dev/null 2>&1; then
6697             pgac_broken_flex=$pgac_candidate
6698             continue
6699           fi
6700
6701           pgac_cv_path_flex=$pgac_candidate
6702           break 2
6703         fi
6704       fi
6705     done
6706   done
6707   rm -f conftest.l lex.yy.c
6708   : ${pgac_cv_path_flex=no}
6709 fi
6710
6711 fi
6712 { echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
6713 echo "${ECHO_T}$pgac_cv_path_flex" >&6; }
6714 if test x"$pgac_cv_path_flex" = x"no"; then
6715   if test -n "$pgac_broken_flex"; then
6716     { echo "$as_me:$LINENO: WARNING:
6717 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
6718 *** should get version 2.5.4 or later." >&5
6719 echo "$as_me: WARNING:
6720 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
6721 *** should get version 2.5.4 or later." >&2;}
6722   fi
6723
6724   { echo "$as_me:$LINENO: WARNING:
6725 *** Without Flex you will not be able to build PostgreSQL from CVS or
6726 *** change any of the scanner definition files.  You can obtain Flex from
6727 *** a GNU mirror site.  (If you are using the official distribution of
6728 *** PostgreSQL then you do not need to worry about this because the Flex
6729 *** output is pre-generated.)" >&5
6730 echo "$as_me: WARNING:
6731 *** Without Flex you will not be able to build PostgreSQL from CVS or
6732 *** change any of the scanner definition files.  You can obtain Flex from
6733 *** a GNU mirror site.  (If you are using the official distribution of
6734 *** PostgreSQL then you do not need to worry about this because the Flex
6735 *** output is pre-generated.)" >&2;}
6736
6737   FLEX=
6738 else
6739   FLEX=$pgac_cv_path_flex
6740   pgac_flex_version=`$FLEX -V 2>/dev/null`
6741   { echo "$as_me:$LINENO: using $pgac_flex_version" >&5
6742 echo "$as_me: using $pgac_flex_version" >&6;}
6743 fi
6744
6745
6746
6747
6748
6749 # Extract the first word of "perl", so it can be a program name with args.
6750 set dummy perl; ac_word=$2
6751 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6752 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6753 if test "${ac_cv_path_PERL+set}" = set; then
6754   echo $ECHO_N "(cached) $ECHO_C" >&6
6755 else
6756   case $PERL in
6757   [\\/]* | ?:[\\/]*)
6758   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
6759   ;;
6760   *)
6761   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6762 for as_dir in $PATH
6763 do
6764   IFS=$as_save_IFS
6765   test -z "$as_dir" && as_dir=.
6766   for ac_exec_ext in '' $ac_executable_extensions; do
6767   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6768     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
6769     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6770     break 2
6771   fi
6772 done
6773 done
6774 IFS=$as_save_IFS
6775
6776   ;;
6777 esac
6778 fi
6779 PERL=$ac_cv_path_PERL
6780 if test -n "$PERL"; then
6781   { echo "$as_me:$LINENO: result: $PERL" >&5
6782 echo "${ECHO_T}$PERL" >&6; }
6783 else
6784   { echo "$as_me:$LINENO: result: no" >&5
6785 echo "${ECHO_T}no" >&6; }
6786 fi
6787
6788
6789 if test "$with_perl" = yes; then
6790
6791 { echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
6792 echo $ECHO_N "checking for Perl archlibexp... $ECHO_C" >&6; }
6793 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
6794 { echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
6795 echo "${ECHO_T}$perl_archlibexp" >&6; }
6796 { echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
6797 echo $ECHO_N "checking for Perl privlibexp... $ECHO_C" >&6; }
6798 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
6799 { echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
6800 echo "${ECHO_T}$perl_privlibexp" >&6; }
6801 { echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
6802 echo $ECHO_N "checking for Perl useshrplib... $ECHO_C" >&6; }
6803 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
6804 { echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
6805 echo "${ECHO_T}$perl_useshrplib" >&6; }
6806
6807 { echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
6808 echo $ECHO_N "checking for flags to link embedded Perl... $ECHO_C" >&6; }
6809 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
6810 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
6811 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
6812 if test -z "$perl_embed_ldflags" ; then
6813         { echo "$as_me:$LINENO: result: no" >&5
6814 echo "${ECHO_T}no" >&6; }
6815         { { echo "$as_me:$LINENO: error: could not determine flags for linking embedded Perl.
6816 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
6817 installed." >&5
6818 echo "$as_me: error: could not determine flags for linking embedded Perl.
6819 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
6820 installed." >&2;}
6821    { (exit 1); exit 1; }; }
6822 else
6823         { echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
6824 echo "${ECHO_T}$perl_embed_ldflags" >&6; }
6825 fi
6826
6827 fi
6828
6829 if test "$with_python" = yes; then
6830   # Extract the first word of "python", so it can be a program name with args.
6831 set dummy python; ac_word=$2
6832 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6833 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6834 if test "${ac_cv_path_PYTHON+set}" = set; then
6835   echo $ECHO_N "(cached) $ECHO_C" >&6
6836 else
6837   case $PYTHON in
6838   [\\/]* | ?:[\\/]*)
6839   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
6840   ;;
6841   *)
6842   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6843 for as_dir in $PATH
6844 do
6845   IFS=$as_save_IFS
6846   test -z "$as_dir" && as_dir=.
6847   for ac_exec_ext in '' $ac_executable_extensions; do
6848   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6849     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
6850     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6851     break 2
6852   fi
6853 done
6854 done
6855 IFS=$as_save_IFS
6856
6857   ;;
6858 esac
6859 fi
6860 PYTHON=$ac_cv_path_PYTHON
6861 if test -n "$PYTHON"; then
6862   { echo "$as_me:$LINENO: result: $PYTHON" >&5
6863 echo "${ECHO_T}$PYTHON" >&6; }
6864 else
6865   { echo "$as_me:$LINENO: result: no" >&5
6866 echo "${ECHO_T}no" >&6; }
6867 fi
6868
6869
6870 if test x"$PYTHON" = x""; then
6871   { { echo "$as_me:$LINENO: error: Python not found" >&5
6872 echo "$as_me: error: Python not found" >&2;}
6873    { (exit 1); exit 1; }; }
6874 fi
6875
6876
6877 { echo "$as_me:$LINENO: checking for Python distutils module" >&5
6878 echo $ECHO_N "checking for Python distutils module... $ECHO_C" >&6; }
6879 if "${PYTHON}" 2>&- -c 'import distutils'
6880 then
6881     { echo "$as_me:$LINENO: result: yes" >&5
6882 echo "${ECHO_T}yes" >&6; }
6883 else
6884     { echo "$as_me:$LINENO: result: no" >&5
6885 echo "${ECHO_T}no" >&6; }
6886     { { echo "$as_me:$LINENO: error: distutils module not found" >&5
6887 echo "$as_me: error: distutils module not found" >&2;}
6888    { (exit 1); exit 1; }; }
6889 fi
6890 { echo "$as_me:$LINENO: checking Python configuration directory" >&5
6891 echo $ECHO_N "checking Python configuration directory... $ECHO_C" >&6; }
6892 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
6893 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'))"`
6894 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print('-I'+distutils.sysconfig.get_python_inc())"`
6895
6896 # This should be enough of a message.
6897 { echo "$as_me:$LINENO: result: $python_configdir" >&5
6898 echo "${ECHO_T}$python_configdir" >&6; }
6899
6900
6901 { echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
6902 echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6; }
6903
6904 python_libdir=`${PYTHON} -c "import distutils.sysconfig,string; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
6905 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig,string; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
6906 python_so=`${PYTHON} -c "import distutils.sysconfig,string; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"`
6907 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
6908
6909 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
6910 then
6911         # New way: use the official shared library
6912         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
6913         python_libspec="-L${python_libdir} -l${ldlibrary}"
6914 else
6915         # Old way: use libpython from python_configdir
6916         python_libdir="${python_configdir}"
6917         python_libspec="-L${python_libdir} -lpython${python_version}"
6918 fi
6919
6920 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','LOCALMODLIBS','BASEMODLIBS'))))"`
6921
6922 { echo "$as_me:$LINENO: result: ${python_libspec} ${python_additional_libs}" >&5
6923 echo "${ECHO_T}${python_libspec} ${python_additional_libs}" >&6; }
6924
6925
6926 # threaded python is not supported on bsd's
6927 { echo "$as_me:$LINENO: checking whether Python is compiled with thread support" >&5
6928 echo $ECHO_N "checking whether Python is compiled with thread support... $ECHO_C" >&6; }
6929 pythreads=`${PYTHON} -c "import sys; print(int('thread' in sys.builtin_module_names))"`
6930 if test "$pythreads" = "1"; then
6931   { echo "$as_me:$LINENO: result: yes" >&5
6932 echo "${ECHO_T}yes" >&6; }
6933   case $host_os in
6934   openbsd*|freebsd*)
6935     { { echo "$as_me:$LINENO: error: threaded Python not supported on this platform" >&5
6936 echo "$as_me: error: threaded Python not supported on this platform" >&2;}
6937    { (exit 1); exit 1; }; }
6938     ;;
6939   esac
6940 else
6941   { echo "$as_me:$LINENO: result: no" >&5
6942 echo "${ECHO_T}no" >&6; }
6943 fi
6944
6945
6946 fi
6947
6948 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
6949   # Extract the first word of "zic", so it can be a program name with args.
6950 set dummy zic; ac_word=$2
6951 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6952 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6953 if test "${ac_cv_path_ZIC+set}" = set; then
6954   echo $ECHO_N "(cached) $ECHO_C" >&6
6955 else
6956   case $ZIC in
6957   [\\/]* | ?:[\\/]*)
6958   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
6959   ;;
6960   *)
6961   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6962 for as_dir in $PATH
6963 do
6964   IFS=$as_save_IFS
6965   test -z "$as_dir" && as_dir=.
6966   for ac_exec_ext in '' $ac_executable_extensions; do
6967   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6968     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
6969     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6970     break 2
6971   fi
6972 done
6973 done
6974 IFS=$as_save_IFS
6975
6976   ;;
6977 esac
6978 fi
6979 ZIC=$ac_cv_path_ZIC
6980 if test -n "$ZIC"; then
6981   { echo "$as_me:$LINENO: result: $ZIC" >&5
6982 echo "${ECHO_T}$ZIC" >&6; }
6983 else
6984   { echo "$as_me:$LINENO: result: no" >&5
6985 echo "${ECHO_T}no" >&6; }
6986 fi
6987
6988
6989   if test -z "$ZIC"; then
6990     { { echo "$as_me:$LINENO: error:
6991 When cross-compiling, either use the option --with-system-tzdata to use
6992 existing time-zone data, or set the environment variable ZIC to a zic
6993 program to use during the build." >&5
6994 echo "$as_me: error:
6995 When cross-compiling, either use the option --with-system-tzdata to use
6996 existing time-zone data, or set the environment variable ZIC to a zic
6997 program to use during the build." >&2;}
6998    { (exit 1); exit 1; }; }
6999   fi
7000 fi
7001
7002
7003 ##
7004 ## Libraries
7005 ##
7006 ## Most libraries are included only if they demonstrably provide a function
7007 ## we need, but libm is an exception: always include it, because there are
7008 ## too many compilers that play cute optimization games that will break
7009 ## probes for standard functions such as pow().
7010 ##
7011
7012
7013 { echo "$as_me:$LINENO: checking for main in -lm" >&5
7014 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6; }
7015 if test "${ac_cv_lib_m_main+set}" = set; then
7016   echo $ECHO_N "(cached) $ECHO_C" >&6
7017 else
7018   ac_check_lib_save_LIBS=$LIBS
7019 LIBS="-lm  $LIBS"
7020 cat >conftest.$ac_ext <<_ACEOF
7021 /* confdefs.h.  */
7022 _ACEOF
7023 cat confdefs.h >>conftest.$ac_ext
7024 cat >>conftest.$ac_ext <<_ACEOF
7025 /* end confdefs.h.  */
7026
7027
7028 int
7029 main ()
7030 {
7031 return main ();
7032   ;
7033   return 0;
7034 }
7035 _ACEOF
7036 rm -f conftest.$ac_objext conftest$ac_exeext
7037 if { (ac_try="$ac_link"
7038 case "(($ac_try" in
7039   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7040   *) ac_try_echo=$ac_try;;
7041 esac
7042 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7043   (eval "$ac_link") 2>conftest.er1
7044   ac_status=$?
7045   grep -v '^ *+' conftest.er1 >conftest.err
7046   rm -f conftest.er1
7047   cat conftest.err >&5
7048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7049   (exit $ac_status); } && {
7050          test -z "$ac_c_werror_flag" ||
7051          test ! -s conftest.err
7052        } && test -s conftest$ac_exeext &&
7053        $as_test_x conftest$ac_exeext; then
7054   ac_cv_lib_m_main=yes
7055 else
7056   echo "$as_me: failed program was:" >&5
7057 sed 's/^/| /' conftest.$ac_ext >&5
7058
7059         ac_cv_lib_m_main=no
7060 fi
7061
7062 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7063       conftest$ac_exeext conftest.$ac_ext
7064 LIBS=$ac_check_lib_save_LIBS
7065 fi
7066 { echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
7067 echo "${ECHO_T}$ac_cv_lib_m_main" >&6; }
7068 if test $ac_cv_lib_m_main = yes; then
7069   cat >>confdefs.h <<_ACEOF
7070 #define HAVE_LIBM 1
7071 _ACEOF
7072
7073   LIBS="-lm $LIBS"
7074
7075 fi
7076
7077 { echo "$as_me:$LINENO: checking for library containing setproctitle" >&5
7078 echo $ECHO_N "checking for library containing setproctitle... $ECHO_C" >&6; }
7079 if test "${ac_cv_search_setproctitle+set}" = set; then
7080   echo $ECHO_N "(cached) $ECHO_C" >&6
7081 else
7082   ac_func_search_save_LIBS=$LIBS
7083 cat >conftest.$ac_ext <<_ACEOF
7084 /* confdefs.h.  */
7085 _ACEOF
7086 cat confdefs.h >>conftest.$ac_ext
7087 cat >>conftest.$ac_ext <<_ACEOF
7088 /* end confdefs.h.  */
7089
7090 /* Override any GCC internal prototype to avoid an error.
7091    Use char because int might match the return type of a GCC
7092    builtin and then its argument prototype would still apply.  */
7093 #ifdef __cplusplus
7094 extern "C"
7095 #endif
7096 char setproctitle ();
7097 int
7098 main ()
7099 {
7100 return setproctitle ();
7101   ;
7102   return 0;
7103 }
7104 _ACEOF
7105 for ac_lib in '' util; do
7106   if test -z "$ac_lib"; then
7107     ac_res="none required"
7108   else
7109     ac_res=-l$ac_lib
7110     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7111   fi
7112   rm -f conftest.$ac_objext conftest$ac_exeext
7113 if { (ac_try="$ac_link"
7114 case "(($ac_try" in
7115   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7116   *) ac_try_echo=$ac_try;;
7117 esac
7118 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7119   (eval "$ac_link") 2>conftest.er1
7120   ac_status=$?
7121   grep -v '^ *+' conftest.er1 >conftest.err
7122   rm -f conftest.er1
7123   cat conftest.err >&5
7124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7125   (exit $ac_status); } && {
7126          test -z "$ac_c_werror_flag" ||
7127          test ! -s conftest.err
7128        } && test -s conftest$ac_exeext &&
7129        $as_test_x conftest$ac_exeext; then
7130   ac_cv_search_setproctitle=$ac_res
7131 else
7132   echo "$as_me: failed program was:" >&5
7133 sed 's/^/| /' conftest.$ac_ext >&5
7134
7135
7136 fi
7137
7138 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7139       conftest$ac_exeext
7140   if test "${ac_cv_search_setproctitle+set}" = set; then
7141   break
7142 fi
7143 done
7144 if test "${ac_cv_search_setproctitle+set}" = set; then
7145   :
7146 else
7147   ac_cv_search_setproctitle=no
7148 fi
7149 rm conftest.$ac_ext
7150 LIBS=$ac_func_search_save_LIBS
7151 fi
7152 { echo "$as_me:$LINENO: result: $ac_cv_search_setproctitle" >&5
7153 echo "${ECHO_T}$ac_cv_search_setproctitle" >&6; }
7154 ac_res=$ac_cv_search_setproctitle
7155 if test "$ac_res" != no; then
7156   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7157
7158 fi
7159
7160 { echo "$as_me:$LINENO: checking for library containing dlopen" >&5
7161 echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6; }
7162 if test "${ac_cv_search_dlopen+set}" = set; then
7163   echo $ECHO_N "(cached) $ECHO_C" >&6
7164 else
7165   ac_func_search_save_LIBS=$LIBS
7166 cat >conftest.$ac_ext <<_ACEOF
7167 /* confdefs.h.  */
7168 _ACEOF
7169 cat confdefs.h >>conftest.$ac_ext
7170 cat >>conftest.$ac_ext <<_ACEOF
7171 /* end confdefs.h.  */
7172
7173 /* Override any GCC internal prototype to avoid an error.
7174    Use char because int might match the return type of a GCC
7175    builtin and then its argument prototype would still apply.  */
7176 #ifdef __cplusplus
7177 extern "C"
7178 #endif
7179 char dlopen ();
7180 int
7181 main ()
7182 {
7183 return dlopen ();
7184   ;
7185   return 0;
7186 }
7187 _ACEOF
7188 for ac_lib in '' dl; do
7189   if test -z "$ac_lib"; then
7190     ac_res="none required"
7191   else
7192     ac_res=-l$ac_lib
7193     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7194   fi
7195   rm -f conftest.$ac_objext conftest$ac_exeext
7196 if { (ac_try="$ac_link"
7197 case "(($ac_try" in
7198   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7199   *) ac_try_echo=$ac_try;;
7200 esac
7201 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7202   (eval "$ac_link") 2>conftest.er1
7203   ac_status=$?
7204   grep -v '^ *+' conftest.er1 >conftest.err
7205   rm -f conftest.er1
7206   cat conftest.err >&5
7207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7208   (exit $ac_status); } && {
7209          test -z "$ac_c_werror_flag" ||
7210          test ! -s conftest.err
7211        } && test -s conftest$ac_exeext &&
7212        $as_test_x conftest$ac_exeext; then
7213   ac_cv_search_dlopen=$ac_res
7214 else
7215   echo "$as_me: failed program was:" >&5
7216 sed 's/^/| /' conftest.$ac_ext >&5
7217
7218
7219 fi
7220
7221 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7222       conftest$ac_exeext
7223   if test "${ac_cv_search_dlopen+set}" = set; then
7224   break
7225 fi
7226 done
7227 if test "${ac_cv_search_dlopen+set}" = set; then
7228   :
7229 else
7230   ac_cv_search_dlopen=no
7231 fi
7232 rm conftest.$ac_ext
7233 LIBS=$ac_func_search_save_LIBS
7234 fi
7235 { echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
7236 echo "${ECHO_T}$ac_cv_search_dlopen" >&6; }
7237 ac_res=$ac_cv_search_dlopen
7238 if test "$ac_res" != no; then
7239   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7240
7241 fi
7242
7243 { echo "$as_me:$LINENO: checking for library containing socket" >&5
7244 echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6; }
7245 if test "${ac_cv_search_socket+set}" = set; then
7246   echo $ECHO_N "(cached) $ECHO_C" >&6
7247 else
7248   ac_func_search_save_LIBS=$LIBS
7249 cat >conftest.$ac_ext <<_ACEOF
7250 /* confdefs.h.  */
7251 _ACEOF
7252 cat confdefs.h >>conftest.$ac_ext
7253 cat >>conftest.$ac_ext <<_ACEOF
7254 /* end confdefs.h.  */
7255
7256 /* Override any GCC internal prototype to avoid an error.
7257    Use char because int might match the return type of a GCC
7258    builtin and then its argument prototype would still apply.  */
7259 #ifdef __cplusplus
7260 extern "C"
7261 #endif
7262 char socket ();
7263 int
7264 main ()
7265 {
7266 return socket ();
7267   ;
7268   return 0;
7269 }
7270 _ACEOF
7271 for ac_lib in '' socket wsock32; do
7272   if test -z "$ac_lib"; then
7273     ac_res="none required"
7274   else
7275     ac_res=-l$ac_lib
7276     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7277   fi
7278   rm -f conftest.$ac_objext conftest$ac_exeext
7279 if { (ac_try="$ac_link"
7280 case "(($ac_try" in
7281   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7282   *) ac_try_echo=$ac_try;;
7283 esac
7284 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7285   (eval "$ac_link") 2>conftest.er1
7286   ac_status=$?
7287   grep -v '^ *+' conftest.er1 >conftest.err
7288   rm -f conftest.er1
7289   cat conftest.err >&5
7290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7291   (exit $ac_status); } && {
7292          test -z "$ac_c_werror_flag" ||
7293          test ! -s conftest.err
7294        } && test -s conftest$ac_exeext &&
7295        $as_test_x conftest$ac_exeext; then
7296   ac_cv_search_socket=$ac_res
7297 else
7298   echo "$as_me: failed program was:" >&5
7299 sed 's/^/| /' conftest.$ac_ext >&5
7300
7301
7302 fi
7303
7304 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7305       conftest$ac_exeext
7306   if test "${ac_cv_search_socket+set}" = set; then
7307   break
7308 fi
7309 done
7310 if test "${ac_cv_search_socket+set}" = set; then
7311   :
7312 else
7313   ac_cv_search_socket=no
7314 fi
7315 rm conftest.$ac_ext
7316 LIBS=$ac_func_search_save_LIBS
7317 fi
7318 { echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
7319 echo "${ECHO_T}$ac_cv_search_socket" >&6; }
7320 ac_res=$ac_cv_search_socket
7321 if test "$ac_res" != no; then
7322   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7323
7324 fi
7325
7326 { echo "$as_me:$LINENO: checking for library containing shl_load" >&5
7327 echo $ECHO_N "checking for library containing shl_load... $ECHO_C" >&6; }
7328 if test "${ac_cv_search_shl_load+set}" = set; then
7329   echo $ECHO_N "(cached) $ECHO_C" >&6
7330 else
7331   ac_func_search_save_LIBS=$LIBS
7332 cat >conftest.$ac_ext <<_ACEOF
7333 /* confdefs.h.  */
7334 _ACEOF
7335 cat confdefs.h >>conftest.$ac_ext
7336 cat >>conftest.$ac_ext <<_ACEOF
7337 /* end confdefs.h.  */
7338
7339 /* Override any GCC internal prototype to avoid an error.
7340    Use char because int might match the return type of a GCC
7341    builtin and then its argument prototype would still apply.  */
7342 #ifdef __cplusplus
7343 extern "C"
7344 #endif
7345 char shl_load ();
7346 int
7347 main ()
7348 {
7349 return shl_load ();
7350   ;
7351   return 0;
7352 }
7353 _ACEOF
7354 for ac_lib in '' dld; do
7355   if test -z "$ac_lib"; then
7356     ac_res="none required"
7357   else
7358     ac_res=-l$ac_lib
7359     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7360   fi
7361   rm -f conftest.$ac_objext conftest$ac_exeext
7362 if { (ac_try="$ac_link"
7363 case "(($ac_try" in
7364   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7365   *) ac_try_echo=$ac_try;;
7366 esac
7367 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7368   (eval "$ac_link") 2>conftest.er1
7369   ac_status=$?
7370   grep -v '^ *+' conftest.er1 >conftest.err
7371   rm -f conftest.er1
7372   cat conftest.err >&5
7373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7374   (exit $ac_status); } && {
7375          test -z "$ac_c_werror_flag" ||
7376          test ! -s conftest.err
7377        } && test -s conftest$ac_exeext &&
7378        $as_test_x conftest$ac_exeext; then
7379   ac_cv_search_shl_load=$ac_res
7380 else
7381   echo "$as_me: failed program was:" >&5
7382 sed 's/^/| /' conftest.$ac_ext >&5
7383
7384
7385 fi
7386
7387 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7388       conftest$ac_exeext
7389   if test "${ac_cv_search_shl_load+set}" = set; then
7390   break
7391 fi
7392 done
7393 if test "${ac_cv_search_shl_load+set}" = set; then
7394   :
7395 else
7396   ac_cv_search_shl_load=no
7397 fi
7398 rm conftest.$ac_ext
7399 LIBS=$ac_func_search_save_LIBS
7400 fi
7401 { echo "$as_me:$LINENO: result: $ac_cv_search_shl_load" >&5
7402 echo "${ECHO_T}$ac_cv_search_shl_load" >&6; }
7403 ac_res=$ac_cv_search_shl_load
7404 if test "$ac_res" != no; then
7405   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7406
7407 fi
7408
7409 # We only use libld in port/dynloader/aix.c
7410 case $host_os in
7411      aix*)
7412         { echo "$as_me:$LINENO: checking for library containing ldopen" >&5
7413 echo $ECHO_N "checking for library containing ldopen... $ECHO_C" >&6; }
7414 if test "${ac_cv_search_ldopen+set}" = set; then
7415   echo $ECHO_N "(cached) $ECHO_C" >&6
7416 else
7417   ac_func_search_save_LIBS=$LIBS
7418 cat >conftest.$ac_ext <<_ACEOF
7419 /* confdefs.h.  */
7420 _ACEOF
7421 cat confdefs.h >>conftest.$ac_ext
7422 cat >>conftest.$ac_ext <<_ACEOF
7423 /* end confdefs.h.  */
7424
7425 /* Override any GCC internal prototype to avoid an error.
7426    Use char because int might match the return type of a GCC
7427    builtin and then its argument prototype would still apply.  */
7428 #ifdef __cplusplus
7429 extern "C"
7430 #endif
7431 char ldopen ();
7432 int
7433 main ()
7434 {
7435 return ldopen ();
7436   ;
7437   return 0;
7438 }
7439 _ACEOF
7440 for ac_lib in '' ld; do
7441   if test -z "$ac_lib"; then
7442     ac_res="none required"
7443   else
7444     ac_res=-l$ac_lib
7445     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7446   fi
7447   rm -f conftest.$ac_objext conftest$ac_exeext
7448 if { (ac_try="$ac_link"
7449 case "(($ac_try" in
7450   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7451   *) ac_try_echo=$ac_try;;
7452 esac
7453 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7454   (eval "$ac_link") 2>conftest.er1
7455   ac_status=$?
7456   grep -v '^ *+' conftest.er1 >conftest.err
7457   rm -f conftest.er1
7458   cat conftest.err >&5
7459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7460   (exit $ac_status); } && {
7461          test -z "$ac_c_werror_flag" ||
7462          test ! -s conftest.err
7463        } && test -s conftest$ac_exeext &&
7464        $as_test_x conftest$ac_exeext; then
7465   ac_cv_search_ldopen=$ac_res
7466 else
7467   echo "$as_me: failed program was:" >&5
7468 sed 's/^/| /' conftest.$ac_ext >&5
7469
7470
7471 fi
7472
7473 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7474       conftest$ac_exeext
7475   if test "${ac_cv_search_ldopen+set}" = set; then
7476   break
7477 fi
7478 done
7479 if test "${ac_cv_search_ldopen+set}" = set; then
7480   :
7481 else
7482   ac_cv_search_ldopen=no
7483 fi
7484 rm conftest.$ac_ext
7485 LIBS=$ac_func_search_save_LIBS
7486 fi
7487 { echo "$as_me:$LINENO: result: $ac_cv_search_ldopen" >&5
7488 echo "${ECHO_T}$ac_cv_search_ldopen" >&6; }
7489 ac_res=$ac_cv_search_ldopen
7490 if test "$ac_res" != no; then
7491   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7492
7493 fi
7494
7495         ;;
7496 esac
7497 { echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
7498 echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6; }
7499 if test "${ac_cv_search_getopt_long+set}" = set; then
7500   echo $ECHO_N "(cached) $ECHO_C" >&6
7501 else
7502   ac_func_search_save_LIBS=$LIBS
7503 cat >conftest.$ac_ext <<_ACEOF
7504 /* confdefs.h.  */
7505 _ACEOF
7506 cat confdefs.h >>conftest.$ac_ext
7507 cat >>conftest.$ac_ext <<_ACEOF
7508 /* end confdefs.h.  */
7509
7510 /* Override any GCC internal prototype to avoid an error.
7511    Use char because int might match the return type of a GCC
7512    builtin and then its argument prototype would still apply.  */
7513 #ifdef __cplusplus
7514 extern "C"
7515 #endif
7516 char getopt_long ();
7517 int
7518 main ()
7519 {
7520 return getopt_long ();
7521   ;
7522   return 0;
7523 }
7524 _ACEOF
7525 for ac_lib in '' getopt gnugetopt; do
7526   if test -z "$ac_lib"; then
7527     ac_res="none required"
7528   else
7529     ac_res=-l$ac_lib
7530     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7531   fi
7532   rm -f conftest.$ac_objext conftest$ac_exeext
7533 if { (ac_try="$ac_link"
7534 case "(($ac_try" in
7535   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7536   *) ac_try_echo=$ac_try;;
7537 esac
7538 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7539   (eval "$ac_link") 2>conftest.er1
7540   ac_status=$?
7541   grep -v '^ *+' conftest.er1 >conftest.err
7542   rm -f conftest.er1
7543   cat conftest.err >&5
7544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7545   (exit $ac_status); } && {
7546          test -z "$ac_c_werror_flag" ||
7547          test ! -s conftest.err
7548        } && test -s conftest$ac_exeext &&
7549        $as_test_x conftest$ac_exeext; then
7550   ac_cv_search_getopt_long=$ac_res
7551 else
7552   echo "$as_me: failed program was:" >&5
7553 sed 's/^/| /' conftest.$ac_ext >&5
7554
7555
7556 fi
7557
7558 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7559       conftest$ac_exeext
7560   if test "${ac_cv_search_getopt_long+set}" = set; then
7561   break
7562 fi
7563 done
7564 if test "${ac_cv_search_getopt_long+set}" = set; then
7565   :
7566 else
7567   ac_cv_search_getopt_long=no
7568 fi
7569 rm conftest.$ac_ext
7570 LIBS=$ac_func_search_save_LIBS
7571 fi
7572 { echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
7573 echo "${ECHO_T}$ac_cv_search_getopt_long" >&6; }
7574 ac_res=$ac_cv_search_getopt_long
7575 if test "$ac_res" != no; then
7576   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7577
7578 fi
7579
7580 { echo "$as_me:$LINENO: checking for library containing crypt" >&5
7581 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6; }
7582 if test "${ac_cv_search_crypt+set}" = set; then
7583   echo $ECHO_N "(cached) $ECHO_C" >&6
7584 else
7585   ac_func_search_save_LIBS=$LIBS
7586 cat >conftest.$ac_ext <<_ACEOF
7587 /* confdefs.h.  */
7588 _ACEOF
7589 cat confdefs.h >>conftest.$ac_ext
7590 cat >>conftest.$ac_ext <<_ACEOF
7591 /* end confdefs.h.  */
7592
7593 /* Override any GCC internal prototype to avoid an error.
7594    Use char because int might match the return type of a GCC
7595    builtin and then its argument prototype would still apply.  */
7596 #ifdef __cplusplus
7597 extern "C"
7598 #endif
7599 char crypt ();
7600 int
7601 main ()
7602 {
7603 return crypt ();
7604   ;
7605   return 0;
7606 }
7607 _ACEOF
7608 for ac_lib in '' crypt; do
7609   if test -z "$ac_lib"; then
7610     ac_res="none required"
7611   else
7612     ac_res=-l$ac_lib
7613     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7614   fi
7615   rm -f conftest.$ac_objext conftest$ac_exeext
7616 if { (ac_try="$ac_link"
7617 case "(($ac_try" in
7618   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7619   *) ac_try_echo=$ac_try;;
7620 esac
7621 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7622   (eval "$ac_link") 2>conftest.er1
7623   ac_status=$?
7624   grep -v '^ *+' conftest.er1 >conftest.err
7625   rm -f conftest.er1
7626   cat conftest.err >&5
7627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7628   (exit $ac_status); } && {
7629          test -z "$ac_c_werror_flag" ||
7630          test ! -s conftest.err
7631        } && test -s conftest$ac_exeext &&
7632        $as_test_x conftest$ac_exeext; then
7633   ac_cv_search_crypt=$ac_res
7634 else
7635   echo "$as_me: failed program was:" >&5
7636 sed 's/^/| /' conftest.$ac_ext >&5
7637
7638
7639 fi
7640
7641 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7642       conftest$ac_exeext
7643   if test "${ac_cv_search_crypt+set}" = set; then
7644   break
7645 fi
7646 done
7647 if test "${ac_cv_search_crypt+set}" = set; then
7648   :
7649 else
7650   ac_cv_search_crypt=no
7651 fi
7652 rm conftest.$ac_ext
7653 LIBS=$ac_func_search_save_LIBS
7654 fi
7655 { echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
7656 echo "${ECHO_T}$ac_cv_search_crypt" >&6; }
7657 ac_res=$ac_cv_search_crypt
7658 if test "$ac_res" != no; then
7659   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7660
7661 fi
7662
7663 # Solaris:
7664 { echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
7665 echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6; }
7666 if test "${ac_cv_search_fdatasync+set}" = set; then
7667   echo $ECHO_N "(cached) $ECHO_C" >&6
7668 else
7669   ac_func_search_save_LIBS=$LIBS
7670 cat >conftest.$ac_ext <<_ACEOF
7671 /* confdefs.h.  */
7672 _ACEOF
7673 cat confdefs.h >>conftest.$ac_ext
7674 cat >>conftest.$ac_ext <<_ACEOF
7675 /* end confdefs.h.  */
7676
7677 /* Override any GCC internal prototype to avoid an error.
7678    Use char because int might match the return type of a GCC
7679    builtin and then its argument prototype would still apply.  */
7680 #ifdef __cplusplus
7681 extern "C"
7682 #endif
7683 char fdatasync ();
7684 int
7685 main ()
7686 {
7687 return fdatasync ();
7688   ;
7689   return 0;
7690 }
7691 _ACEOF
7692 for ac_lib in '' rt posix4; do
7693   if test -z "$ac_lib"; then
7694     ac_res="none required"
7695   else
7696     ac_res=-l$ac_lib
7697     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7698   fi
7699   rm -f conftest.$ac_objext conftest$ac_exeext
7700 if { (ac_try="$ac_link"
7701 case "(($ac_try" in
7702   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7703   *) ac_try_echo=$ac_try;;
7704 esac
7705 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7706   (eval "$ac_link") 2>conftest.er1
7707   ac_status=$?
7708   grep -v '^ *+' conftest.er1 >conftest.err
7709   rm -f conftest.er1
7710   cat conftest.err >&5
7711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7712   (exit $ac_status); } && {
7713          test -z "$ac_c_werror_flag" ||
7714          test ! -s conftest.err
7715        } && test -s conftest$ac_exeext &&
7716        $as_test_x conftest$ac_exeext; then
7717   ac_cv_search_fdatasync=$ac_res
7718 else
7719   echo "$as_me: failed program was:" >&5
7720 sed 's/^/| /' conftest.$ac_ext >&5
7721
7722
7723 fi
7724
7725 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7726       conftest$ac_exeext
7727   if test "${ac_cv_search_fdatasync+set}" = set; then
7728   break
7729 fi
7730 done
7731 if test "${ac_cv_search_fdatasync+set}" = set; then
7732   :
7733 else
7734   ac_cv_search_fdatasync=no
7735 fi
7736 rm conftest.$ac_ext
7737 LIBS=$ac_func_search_save_LIBS
7738 fi
7739 { echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
7740 echo "${ECHO_T}$ac_cv_search_fdatasync" >&6; }
7741 ac_res=$ac_cv_search_fdatasync
7742 if test "$ac_res" != no; then
7743   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7744
7745 fi
7746
7747 # Required for thread_test.c on Solaris 2.5:
7748 # Other ports use it too (HP-UX) so test unconditionally
7749 { echo "$as_me:$LINENO: checking for library containing gethostbyname_r" >&5
7750 echo $ECHO_N "checking for library containing gethostbyname_r... $ECHO_C" >&6; }
7751 if test "${ac_cv_search_gethostbyname_r+set}" = set; then
7752   echo $ECHO_N "(cached) $ECHO_C" >&6
7753 else
7754   ac_func_search_save_LIBS=$LIBS
7755 cat >conftest.$ac_ext <<_ACEOF
7756 /* confdefs.h.  */
7757 _ACEOF
7758 cat confdefs.h >>conftest.$ac_ext
7759 cat >>conftest.$ac_ext <<_ACEOF
7760 /* end confdefs.h.  */
7761
7762 /* Override any GCC internal prototype to avoid an error.
7763    Use char because int might match the return type of a GCC
7764    builtin and then its argument prototype would still apply.  */
7765 #ifdef __cplusplus
7766 extern "C"
7767 #endif
7768 char gethostbyname_r ();
7769 int
7770 main ()
7771 {
7772 return gethostbyname_r ();
7773   ;
7774   return 0;
7775 }
7776 _ACEOF
7777 for ac_lib in '' nsl; do
7778   if test -z "$ac_lib"; then
7779     ac_res="none required"
7780   else
7781     ac_res=-l$ac_lib
7782     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7783   fi
7784   rm -f conftest.$ac_objext conftest$ac_exeext
7785 if { (ac_try="$ac_link"
7786 case "(($ac_try" in
7787   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7788   *) ac_try_echo=$ac_try;;
7789 esac
7790 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7791   (eval "$ac_link") 2>conftest.er1
7792   ac_status=$?
7793   grep -v '^ *+' conftest.er1 >conftest.err
7794   rm -f conftest.er1
7795   cat conftest.err >&5
7796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7797   (exit $ac_status); } && {
7798          test -z "$ac_c_werror_flag" ||
7799          test ! -s conftest.err
7800        } && test -s conftest$ac_exeext &&
7801        $as_test_x conftest$ac_exeext; then
7802   ac_cv_search_gethostbyname_r=$ac_res
7803 else
7804   echo "$as_me: failed program was:" >&5
7805 sed 's/^/| /' conftest.$ac_ext >&5
7806
7807
7808 fi
7809
7810 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7811       conftest$ac_exeext
7812   if test "${ac_cv_search_gethostbyname_r+set}" = set; then
7813   break
7814 fi
7815 done
7816 if test "${ac_cv_search_gethostbyname_r+set}" = set; then
7817   :
7818 else
7819   ac_cv_search_gethostbyname_r=no
7820 fi
7821 rm conftest.$ac_ext
7822 LIBS=$ac_func_search_save_LIBS
7823 fi
7824 { echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname_r" >&5
7825 echo "${ECHO_T}$ac_cv_search_gethostbyname_r" >&6; }
7826 ac_res=$ac_cv_search_gethostbyname_r
7827 if test "$ac_res" != no; then
7828   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7829
7830 fi
7831
7832 # Cygwin:
7833 { echo "$as_me:$LINENO: checking for library containing shmget" >&5
7834 echo $ECHO_N "checking for library containing shmget... $ECHO_C" >&6; }
7835 if test "${ac_cv_search_shmget+set}" = set; then
7836   echo $ECHO_N "(cached) $ECHO_C" >&6
7837 else
7838   ac_func_search_save_LIBS=$LIBS
7839 cat >conftest.$ac_ext <<_ACEOF
7840 /* confdefs.h.  */
7841 _ACEOF
7842 cat confdefs.h >>conftest.$ac_ext
7843 cat >>conftest.$ac_ext <<_ACEOF
7844 /* end confdefs.h.  */
7845
7846 /* Override any GCC internal prototype to avoid an error.
7847    Use char because int might match the return type of a GCC
7848    builtin and then its argument prototype would still apply.  */
7849 #ifdef __cplusplus
7850 extern "C"
7851 #endif
7852 char shmget ();
7853 int
7854 main ()
7855 {
7856 return shmget ();
7857   ;
7858   return 0;
7859 }
7860 _ACEOF
7861 for ac_lib in '' cygipc; do
7862   if test -z "$ac_lib"; then
7863     ac_res="none required"
7864   else
7865     ac_res=-l$ac_lib
7866     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7867   fi
7868   rm -f conftest.$ac_objext conftest$ac_exeext
7869 if { (ac_try="$ac_link"
7870 case "(($ac_try" in
7871   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7872   *) ac_try_echo=$ac_try;;
7873 esac
7874 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7875   (eval "$ac_link") 2>conftest.er1
7876   ac_status=$?
7877   grep -v '^ *+' conftest.er1 >conftest.err
7878   rm -f conftest.er1
7879   cat conftest.err >&5
7880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7881   (exit $ac_status); } && {
7882          test -z "$ac_c_werror_flag" ||
7883          test ! -s conftest.err
7884        } && test -s conftest$ac_exeext &&
7885        $as_test_x conftest$ac_exeext; then
7886   ac_cv_search_shmget=$ac_res
7887 else
7888   echo "$as_me: failed program was:" >&5
7889 sed 's/^/| /' conftest.$ac_ext >&5
7890
7891
7892 fi
7893
7894 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7895       conftest$ac_exeext
7896   if test "${ac_cv_search_shmget+set}" = set; then
7897   break
7898 fi
7899 done
7900 if test "${ac_cv_search_shmget+set}" = set; then
7901   :
7902 else
7903   ac_cv_search_shmget=no
7904 fi
7905 rm conftest.$ac_ext
7906 LIBS=$ac_func_search_save_LIBS
7907 fi
7908 { echo "$as_me:$LINENO: result: $ac_cv_search_shmget" >&5
7909 echo "${ECHO_T}$ac_cv_search_shmget" >&6; }
7910 ac_res=$ac_cv_search_shmget
7911 if test "$ac_res" != no; then
7912   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7913
7914 fi
7915
7916
7917 if test "$with_readline" = yes; then
7918
7919
7920 if test "${pgac_cv_check_readline+set}" = set; then
7921   echo $ECHO_N "(cached) $ECHO_C" >&6
7922 else
7923   pgac_cv_check_readline=no
7924 pgac_save_LIBS=$LIBS
7925 if test x"$with_libedit_preferred" != x"yes"
7926 then    READLINE_ORDER="-lreadline -ledit"
7927 else    READLINE_ORDER="-ledit -lreadline"
7928 fi
7929 for pgac_rllib in $READLINE_ORDER ; do
7930   { echo "$as_me:$LINENO: checking for ${pgac_rllib}" >&5
7931 echo $ECHO_N "checking for ${pgac_rllib}... $ECHO_C" >&6; }
7932   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
7933     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
7934     cat >conftest.$ac_ext <<_ACEOF
7935 /* confdefs.h.  */
7936 _ACEOF
7937 cat confdefs.h >>conftest.$ac_ext
7938 cat >>conftest.$ac_ext <<_ACEOF
7939 /* end confdefs.h.  */
7940
7941 /* Override any GCC internal prototype to avoid an error.
7942    Use char because int might match the return type of a GCC
7943    builtin and then its argument prototype would still apply.  */
7944 #ifdef __cplusplus
7945 extern "C"
7946 #endif
7947 char readline ();
7948 int
7949 main ()
7950 {
7951 return readline ();
7952   ;
7953   return 0;
7954 }
7955 _ACEOF
7956 rm -f conftest.$ac_objext conftest$ac_exeext
7957 if { (ac_try="$ac_link"
7958 case "(($ac_try" in
7959   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7960   *) ac_try_echo=$ac_try;;
7961 esac
7962 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7963   (eval "$ac_link") 2>conftest.er1
7964   ac_status=$?
7965   grep -v '^ *+' conftest.er1 >conftest.err
7966   rm -f conftest.er1
7967   cat conftest.err >&5
7968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7969   (exit $ac_status); } && {
7970          test -z "$ac_c_werror_flag" ||
7971          test ! -s conftest.err
7972        } && test -s conftest$ac_exeext &&
7973        $as_test_x conftest$ac_exeext; then
7974
7975       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
7976       # recognize dependent libraries; assume curses is needed if we didn't
7977       # find any dependency.
7978       case $host_os in
7979         netbsd* | openbsd* | irix*)
7980           if test x"$pgac_lib" = x"" ; then
7981             pgac_lib=" -lcurses"
7982           fi ;;
7983       esac
7984
7985       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
7986       break
7987
7988 else
7989   echo "$as_me: failed program was:" >&5
7990 sed 's/^/| /' conftest.$ac_ext >&5
7991
7992
7993 fi
7994
7995 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7996       conftest$ac_exeext conftest.$ac_ext
7997   done
7998   if test "$pgac_cv_check_readline" != no ; then
7999     { echo "$as_me:$LINENO: result: yes ($pgac_cv_check_readline)" >&5
8000 echo "${ECHO_T}yes ($pgac_cv_check_readline)" >&6; }
8001     break
8002   else
8003     { echo "$as_me:$LINENO: result: no" >&5
8004 echo "${ECHO_T}no" >&6; }
8005   fi
8006 done
8007 LIBS=$pgac_save_LIBS
8008
8009 fi
8010
8011 if test "$pgac_cv_check_readline" != no ; then
8012   LIBS="$pgac_cv_check_readline $LIBS"
8013
8014 cat >>confdefs.h <<\_ACEOF
8015 #define HAVE_LIBREADLINE 1
8016 _ACEOF
8017
8018 fi
8019
8020
8021   if test x"$pgac_cv_check_readline" = x"no"; then
8022     { { echo "$as_me:$LINENO: error: readline library not found
8023 If you have readline already installed, see config.log for details on the
8024 failure.  It is possible the compiler isn't looking in the proper directory.
8025 Use --without-readline to disable readline support." >&5
8026 echo "$as_me: error: readline library not found
8027 If you have readline already installed, see config.log for details on the
8028 failure.  It is possible the compiler isn't looking in the proper directory.
8029 Use --without-readline to disable readline support." >&2;}
8030    { (exit 1); exit 1; }; }
8031   fi
8032 fi
8033
8034 if test "$with_zlib" = yes; then
8035
8036 { echo "$as_me:$LINENO: checking for inflate in -lz" >&5
8037 echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6; }
8038 if test "${ac_cv_lib_z_inflate+set}" = set; then
8039   echo $ECHO_N "(cached) $ECHO_C" >&6
8040 else
8041   ac_check_lib_save_LIBS=$LIBS
8042 LIBS="-lz  $LIBS"
8043 cat >conftest.$ac_ext <<_ACEOF
8044 /* confdefs.h.  */
8045 _ACEOF
8046 cat confdefs.h >>conftest.$ac_ext
8047 cat >>conftest.$ac_ext <<_ACEOF
8048 /* end confdefs.h.  */
8049
8050 /* Override any GCC internal prototype to avoid an error.
8051    Use char because int might match the return type of a GCC
8052    builtin and then its argument prototype would still apply.  */
8053 #ifdef __cplusplus
8054 extern "C"
8055 #endif
8056 char inflate ();
8057 int
8058 main ()
8059 {
8060 return inflate ();
8061   ;
8062   return 0;
8063 }
8064 _ACEOF
8065 rm -f conftest.$ac_objext conftest$ac_exeext
8066 if { (ac_try="$ac_link"
8067 case "(($ac_try" in
8068   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8069   *) ac_try_echo=$ac_try;;
8070 esac
8071 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8072   (eval "$ac_link") 2>conftest.er1
8073   ac_status=$?
8074   grep -v '^ *+' conftest.er1 >conftest.err
8075   rm -f conftest.er1
8076   cat conftest.err >&5
8077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8078   (exit $ac_status); } && {
8079          test -z "$ac_c_werror_flag" ||
8080          test ! -s conftest.err
8081        } && test -s conftest$ac_exeext &&
8082        $as_test_x conftest$ac_exeext; then
8083   ac_cv_lib_z_inflate=yes
8084 else
8085   echo "$as_me: failed program was:" >&5
8086 sed 's/^/| /' conftest.$ac_ext >&5
8087
8088         ac_cv_lib_z_inflate=no
8089 fi
8090
8091 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8092       conftest$ac_exeext conftest.$ac_ext
8093 LIBS=$ac_check_lib_save_LIBS
8094 fi
8095 { echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
8096 echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6; }
8097 if test $ac_cv_lib_z_inflate = yes; then
8098   cat >>confdefs.h <<_ACEOF
8099 #define HAVE_LIBZ 1
8100 _ACEOF
8101
8102   LIBS="-lz $LIBS"
8103
8104 else
8105   { { echo "$as_me:$LINENO: error: zlib library not found
8106 If you have zlib already installed, see config.log for details on the
8107 failure.  It is possible the compiler isn't looking in the proper directory.
8108 Use --without-zlib to disable zlib support." >&5
8109 echo "$as_me: error: zlib library not found
8110 If you have zlib already installed, see config.log for details on the
8111 failure.  It is possible the compiler isn't looking in the proper directory.
8112 Use --without-zlib to disable zlib support." >&2;}
8113    { (exit 1); exit 1; }; }
8114 fi
8115
8116 fi
8117
8118 if test "$enable_spinlocks" = yes; then
8119
8120 cat >>confdefs.h <<\_ACEOF
8121 #define HAVE_SPINLOCKS 1
8122 _ACEOF
8123
8124 else
8125   { echo "$as_me:$LINENO: WARNING:
8126 *** Not using spinlocks will cause poor performance." >&5
8127 echo "$as_me: WARNING:
8128 *** Not using spinlocks will cause poor performance." >&2;}
8129 fi
8130
8131 if test "$with_gssapi" = yes ; then
8132   if test "$PORTNAME" != "win32"; then
8133     { echo "$as_me:$LINENO: checking for library containing gss_init_sec_context" >&5
8134 echo $ECHO_N "checking for library containing gss_init_sec_context... $ECHO_C" >&6; }
8135 if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
8136   echo $ECHO_N "(cached) $ECHO_C" >&6
8137 else
8138   ac_func_search_save_LIBS=$LIBS
8139 cat >conftest.$ac_ext <<_ACEOF
8140 /* confdefs.h.  */
8141 _ACEOF
8142 cat confdefs.h >>conftest.$ac_ext
8143 cat >>conftest.$ac_ext <<_ACEOF
8144 /* end confdefs.h.  */
8145
8146 /* Override any GCC internal prototype to avoid an error.
8147    Use char because int might match the return type of a GCC
8148    builtin and then its argument prototype would still apply.  */
8149 #ifdef __cplusplus
8150 extern "C"
8151 #endif
8152 char gss_init_sec_context ();
8153 int
8154 main ()
8155 {
8156 return gss_init_sec_context ();
8157   ;
8158   return 0;
8159 }
8160 _ACEOF
8161 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
8162   if test -z "$ac_lib"; then
8163     ac_res="none required"
8164   else
8165     ac_res=-l$ac_lib
8166     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8167   fi
8168   rm -f conftest.$ac_objext conftest$ac_exeext
8169 if { (ac_try="$ac_link"
8170 case "(($ac_try" in
8171   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8172   *) ac_try_echo=$ac_try;;
8173 esac
8174 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8175   (eval "$ac_link") 2>conftest.er1
8176   ac_status=$?
8177   grep -v '^ *+' conftest.er1 >conftest.err
8178   rm -f conftest.er1
8179   cat conftest.err >&5
8180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8181   (exit $ac_status); } && {
8182          test -z "$ac_c_werror_flag" ||
8183          test ! -s conftest.err
8184        } && test -s conftest$ac_exeext &&
8185        $as_test_x conftest$ac_exeext; then
8186   ac_cv_search_gss_init_sec_context=$ac_res
8187 else
8188   echo "$as_me: failed program was:" >&5
8189 sed 's/^/| /' conftest.$ac_ext >&5
8190
8191
8192 fi
8193
8194 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8195       conftest$ac_exeext
8196   if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
8197   break
8198 fi
8199 done
8200 if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
8201   :
8202 else
8203   ac_cv_search_gss_init_sec_context=no
8204 fi
8205 rm conftest.$ac_ext
8206 LIBS=$ac_func_search_save_LIBS
8207 fi
8208 { echo "$as_me:$LINENO: result: $ac_cv_search_gss_init_sec_context" >&5
8209 echo "${ECHO_T}$ac_cv_search_gss_init_sec_context" >&6; }
8210 ac_res=$ac_cv_search_gss_init_sec_context
8211 if test "$ac_res" != no; then
8212   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8213
8214 else
8215   { { echo "$as_me:$LINENO: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&5
8216 echo "$as_me: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&2;}
8217    { (exit 1); exit 1; }; }
8218 fi
8219
8220   else
8221     LIBS="$LIBS -lgssapi32"
8222   fi
8223 fi
8224
8225 if test "$with_krb5" = yes ; then
8226   if test "$PORTNAME" != "win32"; then
8227      { echo "$as_me:$LINENO: checking for library containing com_err" >&5
8228 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6; }
8229 if test "${ac_cv_search_com_err+set}" = set; then
8230   echo $ECHO_N "(cached) $ECHO_C" >&6
8231 else
8232   ac_func_search_save_LIBS=$LIBS
8233 cat >conftest.$ac_ext <<_ACEOF
8234 /* confdefs.h.  */
8235 _ACEOF
8236 cat confdefs.h >>conftest.$ac_ext
8237 cat >>conftest.$ac_ext <<_ACEOF
8238 /* end confdefs.h.  */
8239
8240 /* Override any GCC internal prototype to avoid an error.
8241    Use char because int might match the return type of a GCC
8242    builtin and then its argument prototype would still apply.  */
8243 #ifdef __cplusplus
8244 extern "C"
8245 #endif
8246 char com_err ();
8247 int
8248 main ()
8249 {
8250 return com_err ();
8251   ;
8252   return 0;
8253 }
8254 _ACEOF
8255 for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' com_err 'com_err -lssl -lcrypto'; do
8256   if test -z "$ac_lib"; then
8257     ac_res="none required"
8258   else
8259     ac_res=-l$ac_lib
8260     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8261   fi
8262   rm -f conftest.$ac_objext conftest$ac_exeext
8263 if { (ac_try="$ac_link"
8264 case "(($ac_try" in
8265   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8266   *) ac_try_echo=$ac_try;;
8267 esac
8268 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8269   (eval "$ac_link") 2>conftest.er1
8270   ac_status=$?
8271   grep -v '^ *+' conftest.er1 >conftest.err
8272   rm -f conftest.er1
8273   cat conftest.err >&5
8274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8275   (exit $ac_status); } && {
8276          test -z "$ac_c_werror_flag" ||
8277          test ! -s conftest.err
8278        } && test -s conftest$ac_exeext &&
8279        $as_test_x conftest$ac_exeext; then
8280   ac_cv_search_com_err=$ac_res
8281 else
8282   echo "$as_me: failed program was:" >&5
8283 sed 's/^/| /' conftest.$ac_ext >&5
8284
8285
8286 fi
8287
8288 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8289       conftest$ac_exeext
8290   if test "${ac_cv_search_com_err+set}" = set; then
8291   break
8292 fi
8293 done
8294 if test "${ac_cv_search_com_err+set}" = set; then
8295   :
8296 else
8297   ac_cv_search_com_err=no
8298 fi
8299 rm conftest.$ac_ext
8300 LIBS=$ac_func_search_save_LIBS
8301 fi
8302 { echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
8303 echo "${ECHO_T}$ac_cv_search_com_err" >&6; }
8304 ac_res=$ac_cv_search_com_err
8305 if test "$ac_res" != no; then
8306   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8307
8308 else
8309   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
8310 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
8311    { (exit 1); exit 1; }; }
8312 fi
8313
8314      { echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
8315 echo $ECHO_N "checking for library containing krb5_sendauth... $ECHO_C" >&6; }
8316 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
8317   echo $ECHO_N "(cached) $ECHO_C" >&6
8318 else
8319   ac_func_search_save_LIBS=$LIBS
8320 cat >conftest.$ac_ext <<_ACEOF
8321 /* confdefs.h.  */
8322 _ACEOF
8323 cat confdefs.h >>conftest.$ac_ext
8324 cat >>conftest.$ac_ext <<_ACEOF
8325 /* end confdefs.h.  */
8326
8327 /* Override any GCC internal prototype to avoid an error.
8328    Use char because int might match the return type of a GCC
8329    builtin and then its argument prototype would still apply.  */
8330 #ifdef __cplusplus
8331 extern "C"
8332 #endif
8333 char krb5_sendauth ();
8334 int
8335 main ()
8336 {
8337 return krb5_sendauth ();
8338   ;
8339   return 0;
8340 }
8341 _ACEOF
8342 for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'; do
8343   if test -z "$ac_lib"; then
8344     ac_res="none required"
8345   else
8346     ac_res=-l$ac_lib
8347     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8348   fi
8349   rm -f conftest.$ac_objext conftest$ac_exeext
8350 if { (ac_try="$ac_link"
8351 case "(($ac_try" in
8352   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8353   *) ac_try_echo=$ac_try;;
8354 esac
8355 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8356   (eval "$ac_link") 2>conftest.er1
8357   ac_status=$?
8358   grep -v '^ *+' conftest.er1 >conftest.err
8359   rm -f conftest.er1
8360   cat conftest.err >&5
8361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8362   (exit $ac_status); } && {
8363          test -z "$ac_c_werror_flag" ||
8364          test ! -s conftest.err
8365        } && test -s conftest$ac_exeext &&
8366        $as_test_x conftest$ac_exeext; then
8367   ac_cv_search_krb5_sendauth=$ac_res
8368 else
8369   echo "$as_me: failed program was:" >&5
8370 sed 's/^/| /' conftest.$ac_ext >&5
8371
8372
8373 fi
8374
8375 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8376       conftest$ac_exeext
8377   if test "${ac_cv_search_krb5_sendauth+set}" = set; then
8378   break
8379 fi
8380 done
8381 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
8382   :
8383 else
8384   ac_cv_search_krb5_sendauth=no
8385 fi
8386 rm conftest.$ac_ext
8387 LIBS=$ac_func_search_save_LIBS
8388 fi
8389 { echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
8390 echo "${ECHO_T}$ac_cv_search_krb5_sendauth" >&6; }
8391 ac_res=$ac_cv_search_krb5_sendauth
8392 if test "$ac_res" != no; then
8393   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8394
8395 else
8396   { { echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
8397 echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
8398    { (exit 1); exit 1; }; }
8399 fi
8400
8401   else
8402      { echo "$as_me:$LINENO: checking for library containing com_err" >&5
8403 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6; }
8404 if test "${ac_cv_search_com_err+set}" = set; then
8405   echo $ECHO_N "(cached) $ECHO_C" >&6
8406 else
8407   ac_func_search_save_LIBS=$LIBS
8408 cat >conftest.$ac_ext <<_ACEOF
8409 /* confdefs.h.  */
8410 _ACEOF
8411 cat confdefs.h >>conftest.$ac_ext
8412 cat >>conftest.$ac_ext <<_ACEOF
8413 /* end confdefs.h.  */
8414
8415 /* Override any GCC internal prototype to avoid an error.
8416    Use char because int might match the return type of a GCC
8417    builtin and then its argument prototype would still apply.  */
8418 #ifdef __cplusplus
8419 extern "C"
8420 #endif
8421 char com_err ();
8422 int
8423 main ()
8424 {
8425 return com_err ();
8426   ;
8427   return 0;
8428 }
8429 _ACEOF
8430 for ac_lib in '' 'comerr32 -lkrb5_32'; do
8431   if test -z "$ac_lib"; then
8432     ac_res="none required"
8433   else
8434     ac_res=-l$ac_lib
8435     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8436   fi
8437   rm -f conftest.$ac_objext conftest$ac_exeext
8438 if { (ac_try="$ac_link"
8439 case "(($ac_try" in
8440   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8441   *) ac_try_echo=$ac_try;;
8442 esac
8443 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8444   (eval "$ac_link") 2>conftest.er1
8445   ac_status=$?
8446   grep -v '^ *+' conftest.er1 >conftest.err
8447   rm -f conftest.er1
8448   cat conftest.err >&5
8449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8450   (exit $ac_status); } && {
8451          test -z "$ac_c_werror_flag" ||
8452          test ! -s conftest.err
8453        } && test -s conftest$ac_exeext &&
8454        $as_test_x conftest$ac_exeext; then
8455   ac_cv_search_com_err=$ac_res
8456 else
8457   echo "$as_me: failed program was:" >&5
8458 sed 's/^/| /' conftest.$ac_ext >&5
8459
8460
8461 fi
8462
8463 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8464       conftest$ac_exeext
8465   if test "${ac_cv_search_com_err+set}" = set; then
8466   break
8467 fi
8468 done
8469 if test "${ac_cv_search_com_err+set}" = set; then
8470   :
8471 else
8472   ac_cv_search_com_err=no
8473 fi
8474 rm conftest.$ac_ext
8475 LIBS=$ac_func_search_save_LIBS
8476 fi
8477 { echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
8478 echo "${ECHO_T}$ac_cv_search_com_err" >&6; }
8479 ac_res=$ac_cv_search_com_err
8480 if test "$ac_res" != no; then
8481   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8482
8483 else
8484   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
8485 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
8486    { (exit 1); exit 1; }; }
8487 fi
8488
8489   fi
8490 fi
8491
8492 if test "$with_openssl" = yes ; then
8493     if test "$PORTNAME" != "win32"; then
8494
8495 { echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
8496 echo $ECHO_N "checking for CRYPTO_new_ex_data in -lcrypto... $ECHO_C" >&6; }
8497 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
8498   echo $ECHO_N "(cached) $ECHO_C" >&6
8499 else
8500   ac_check_lib_save_LIBS=$LIBS
8501 LIBS="-lcrypto  $LIBS"
8502 cat >conftest.$ac_ext <<_ACEOF
8503 /* confdefs.h.  */
8504 _ACEOF
8505 cat confdefs.h >>conftest.$ac_ext
8506 cat >>conftest.$ac_ext <<_ACEOF
8507 /* end confdefs.h.  */
8508
8509 /* Override any GCC internal prototype to avoid an error.
8510    Use char because int might match the return type of a GCC
8511    builtin and then its argument prototype would still apply.  */
8512 #ifdef __cplusplus
8513 extern "C"
8514 #endif
8515 char CRYPTO_new_ex_data ();
8516 int
8517 main ()
8518 {
8519 return CRYPTO_new_ex_data ();
8520   ;
8521   return 0;
8522 }
8523 _ACEOF
8524 rm -f conftest.$ac_objext conftest$ac_exeext
8525 if { (ac_try="$ac_link"
8526 case "(($ac_try" in
8527   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8528   *) ac_try_echo=$ac_try;;
8529 esac
8530 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8531   (eval "$ac_link") 2>conftest.er1
8532   ac_status=$?
8533   grep -v '^ *+' conftest.er1 >conftest.err
8534   rm -f conftest.er1
8535   cat conftest.err >&5
8536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8537   (exit $ac_status); } && {
8538          test -z "$ac_c_werror_flag" ||
8539          test ! -s conftest.err
8540        } && test -s conftest$ac_exeext &&
8541        $as_test_x conftest$ac_exeext; then
8542   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
8543 else
8544   echo "$as_me: failed program was:" >&5
8545 sed 's/^/| /' conftest.$ac_ext >&5
8546
8547         ac_cv_lib_crypto_CRYPTO_new_ex_data=no
8548 fi
8549
8550 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8551       conftest$ac_exeext conftest.$ac_ext
8552 LIBS=$ac_check_lib_save_LIBS
8553 fi
8554 { echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
8555 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
8556 if test $ac_cv_lib_crypto_CRYPTO_new_ex_data = yes; then
8557   cat >>confdefs.h <<_ACEOF
8558 #define HAVE_LIBCRYPTO 1
8559 _ACEOF
8560
8561   LIBS="-lcrypto $LIBS"
8562
8563 else
8564   { { echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
8565 echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
8566    { (exit 1); exit 1; }; }
8567 fi
8568
8569
8570 { echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
8571 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6; }
8572 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
8573   echo $ECHO_N "(cached) $ECHO_C" >&6
8574 else
8575   ac_check_lib_save_LIBS=$LIBS
8576 LIBS="-lssl  $LIBS"
8577 cat >conftest.$ac_ext <<_ACEOF
8578 /* confdefs.h.  */
8579 _ACEOF
8580 cat confdefs.h >>conftest.$ac_ext
8581 cat >>conftest.$ac_ext <<_ACEOF
8582 /* end confdefs.h.  */
8583
8584 /* Override any GCC internal prototype to avoid an error.
8585    Use char because int might match the return type of a GCC
8586    builtin and then its argument prototype would still apply.  */
8587 #ifdef __cplusplus
8588 extern "C"
8589 #endif
8590 char SSL_library_init ();
8591 int
8592 main ()
8593 {
8594 return SSL_library_init ();
8595   ;
8596   return 0;
8597 }
8598 _ACEOF
8599 rm -f conftest.$ac_objext conftest$ac_exeext
8600 if { (ac_try="$ac_link"
8601 case "(($ac_try" in
8602   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8603   *) ac_try_echo=$ac_try;;
8604 esac
8605 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8606   (eval "$ac_link") 2>conftest.er1
8607   ac_status=$?
8608   grep -v '^ *+' conftest.er1 >conftest.err
8609   rm -f conftest.er1
8610   cat conftest.err >&5
8611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8612   (exit $ac_status); } && {
8613          test -z "$ac_c_werror_flag" ||
8614          test ! -s conftest.err
8615        } && test -s conftest$ac_exeext &&
8616        $as_test_x conftest$ac_exeext; then
8617   ac_cv_lib_ssl_SSL_library_init=yes
8618 else
8619   echo "$as_me: failed program was:" >&5
8620 sed 's/^/| /' conftest.$ac_ext >&5
8621
8622         ac_cv_lib_ssl_SSL_library_init=no
8623 fi
8624
8625 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8626       conftest$ac_exeext conftest.$ac_ext
8627 LIBS=$ac_check_lib_save_LIBS
8628 fi
8629 { echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
8630 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6; }
8631 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
8632   cat >>confdefs.h <<_ACEOF
8633 #define HAVE_LIBSSL 1
8634 _ACEOF
8635
8636   LIBS="-lssl $LIBS"
8637
8638 else
8639   { { echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
8640 echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
8641    { (exit 1); exit 1; }; }
8642 fi
8643
8644   else
8645
8646 { echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -leay32" >&5
8647 echo $ECHO_N "checking for CRYPTO_new_ex_data in -leay32... $ECHO_C" >&6; }
8648 if test "${ac_cv_lib_eay32_CRYPTO_new_ex_data+set}" = set; then
8649   echo $ECHO_N "(cached) $ECHO_C" >&6
8650 else
8651   ac_check_lib_save_LIBS=$LIBS
8652 LIBS="-leay32  $LIBS"
8653 cat >conftest.$ac_ext <<_ACEOF
8654 /* confdefs.h.  */
8655 _ACEOF
8656 cat confdefs.h >>conftest.$ac_ext
8657 cat >>conftest.$ac_ext <<_ACEOF
8658 /* end confdefs.h.  */
8659
8660 /* Override any GCC internal prototype to avoid an error.
8661    Use char because int might match the return type of a GCC
8662    builtin and then its argument prototype would still apply.  */
8663 #ifdef __cplusplus
8664 extern "C"
8665 #endif
8666 char CRYPTO_new_ex_data ();
8667 int
8668 main ()
8669 {
8670 return CRYPTO_new_ex_data ();
8671   ;
8672   return 0;
8673 }
8674 _ACEOF
8675 rm -f conftest.$ac_objext conftest$ac_exeext
8676 if { (ac_try="$ac_link"
8677 case "(($ac_try" in
8678   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8679   *) ac_try_echo=$ac_try;;
8680 esac
8681 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8682   (eval "$ac_link") 2>conftest.er1
8683   ac_status=$?
8684   grep -v '^ *+' conftest.er1 >conftest.err
8685   rm -f conftest.er1
8686   cat conftest.err >&5
8687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8688   (exit $ac_status); } && {
8689          test -z "$ac_c_werror_flag" ||
8690          test ! -s conftest.err
8691        } && test -s conftest$ac_exeext &&
8692        $as_test_x conftest$ac_exeext; then
8693   ac_cv_lib_eay32_CRYPTO_new_ex_data=yes
8694 else
8695   echo "$as_me: failed program was:" >&5
8696 sed 's/^/| /' conftest.$ac_ext >&5
8697
8698         ac_cv_lib_eay32_CRYPTO_new_ex_data=no
8699 fi
8700
8701 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8702       conftest$ac_exeext conftest.$ac_ext
8703 LIBS=$ac_check_lib_save_LIBS
8704 fi
8705 { echo "$as_me:$LINENO: result: $ac_cv_lib_eay32_CRYPTO_new_ex_data" >&5
8706 echo "${ECHO_T}$ac_cv_lib_eay32_CRYPTO_new_ex_data" >&6; }
8707 if test $ac_cv_lib_eay32_CRYPTO_new_ex_data = yes; then
8708   cat >>confdefs.h <<_ACEOF
8709 #define HAVE_LIBEAY32 1
8710 _ACEOF
8711
8712   LIBS="-leay32 $LIBS"
8713
8714 else
8715   { { echo "$as_me:$LINENO: error: library 'eay32' is required for OpenSSL" >&5
8716 echo "$as_me: error: library 'eay32' is required for OpenSSL" >&2;}
8717    { (exit 1); exit 1; }; }
8718 fi
8719
8720
8721 { echo "$as_me:$LINENO: checking for SSL_library_init in -lssleay32" >&5
8722 echo $ECHO_N "checking for SSL_library_init in -lssleay32... $ECHO_C" >&6; }
8723 if test "${ac_cv_lib_ssleay32_SSL_library_init+set}" = set; then
8724   echo $ECHO_N "(cached) $ECHO_C" >&6
8725 else
8726   ac_check_lib_save_LIBS=$LIBS
8727 LIBS="-lssleay32  $LIBS"
8728 cat >conftest.$ac_ext <<_ACEOF
8729 /* confdefs.h.  */
8730 _ACEOF
8731 cat confdefs.h >>conftest.$ac_ext
8732 cat >>conftest.$ac_ext <<_ACEOF
8733 /* end confdefs.h.  */
8734
8735 /* Override any GCC internal prototype to avoid an error.
8736    Use char because int might match the return type of a GCC
8737    builtin and then its argument prototype would still apply.  */
8738 #ifdef __cplusplus
8739 extern "C"
8740 #endif
8741 char SSL_library_init ();
8742 int
8743 main ()
8744 {
8745 return SSL_library_init ();
8746   ;
8747   return 0;
8748 }
8749 _ACEOF
8750 rm -f conftest.$ac_objext conftest$ac_exeext
8751 if { (ac_try="$ac_link"
8752 case "(($ac_try" in
8753   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8754   *) ac_try_echo=$ac_try;;
8755 esac
8756 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8757   (eval "$ac_link") 2>conftest.er1
8758   ac_status=$?
8759   grep -v '^ *+' conftest.er1 >conftest.err
8760   rm -f conftest.er1
8761   cat conftest.err >&5
8762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8763   (exit $ac_status); } && {
8764          test -z "$ac_c_werror_flag" ||
8765          test ! -s conftest.err
8766        } && test -s conftest$ac_exeext &&
8767        $as_test_x conftest$ac_exeext; then
8768   ac_cv_lib_ssleay32_SSL_library_init=yes
8769 else
8770   echo "$as_me: failed program was:" >&5
8771 sed 's/^/| /' conftest.$ac_ext >&5
8772
8773         ac_cv_lib_ssleay32_SSL_library_init=no
8774 fi
8775
8776 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8777       conftest$ac_exeext conftest.$ac_ext
8778 LIBS=$ac_check_lib_save_LIBS
8779 fi
8780 { echo "$as_me:$LINENO: result: $ac_cv_lib_ssleay32_SSL_library_init" >&5
8781 echo "${ECHO_T}$ac_cv_lib_ssleay32_SSL_library_init" >&6; }
8782 if test $ac_cv_lib_ssleay32_SSL_library_init = yes; then
8783   cat >>confdefs.h <<_ACEOF
8784 #define HAVE_LIBSSLEAY32 1
8785 _ACEOF
8786
8787   LIBS="-lssleay32 $LIBS"
8788
8789 else
8790   { { echo "$as_me:$LINENO: error: library 'ssleay32' is required for OpenSSL" >&5
8791 echo "$as_me: error: library 'ssleay32' is required for OpenSSL" >&2;}
8792    { (exit 1); exit 1; }; }
8793 fi
8794
8795   fi
8796 fi
8797
8798 if test "$with_pam" = yes ; then
8799
8800 { echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
8801 echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6; }
8802 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
8803   echo $ECHO_N "(cached) $ECHO_C" >&6
8804 else
8805   ac_check_lib_save_LIBS=$LIBS
8806 LIBS="-lpam  $LIBS"
8807 cat >conftest.$ac_ext <<_ACEOF
8808 /* confdefs.h.  */
8809 _ACEOF
8810 cat confdefs.h >>conftest.$ac_ext
8811 cat >>conftest.$ac_ext <<_ACEOF
8812 /* end confdefs.h.  */
8813
8814 /* Override any GCC internal prototype to avoid an error.
8815    Use char because int might match the return type of a GCC
8816    builtin and then its argument prototype would still apply.  */
8817 #ifdef __cplusplus
8818 extern "C"
8819 #endif
8820 char pam_start ();
8821 int
8822 main ()
8823 {
8824 return pam_start ();
8825   ;
8826   return 0;
8827 }
8828 _ACEOF
8829 rm -f conftest.$ac_objext conftest$ac_exeext
8830 if { (ac_try="$ac_link"
8831 case "(($ac_try" in
8832   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8833   *) ac_try_echo=$ac_try;;
8834 esac
8835 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8836   (eval "$ac_link") 2>conftest.er1
8837   ac_status=$?
8838   grep -v '^ *+' conftest.er1 >conftest.err
8839   rm -f conftest.er1
8840   cat conftest.err >&5
8841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8842   (exit $ac_status); } && {
8843          test -z "$ac_c_werror_flag" ||
8844          test ! -s conftest.err
8845        } && test -s conftest$ac_exeext &&
8846        $as_test_x conftest$ac_exeext; then
8847   ac_cv_lib_pam_pam_start=yes
8848 else
8849   echo "$as_me: failed program was:" >&5
8850 sed 's/^/| /' conftest.$ac_ext >&5
8851
8852         ac_cv_lib_pam_pam_start=no
8853 fi
8854
8855 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8856       conftest$ac_exeext conftest.$ac_ext
8857 LIBS=$ac_check_lib_save_LIBS
8858 fi
8859 { echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
8860 echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6; }
8861 if test $ac_cv_lib_pam_pam_start = yes; then
8862   cat >>confdefs.h <<_ACEOF
8863 #define HAVE_LIBPAM 1
8864 _ACEOF
8865
8866   LIBS="-lpam $LIBS"
8867
8868 else
8869   { { echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
8870 echo "$as_me: error: library 'pam' is required for PAM" >&2;}
8871    { (exit 1); exit 1; }; }
8872 fi
8873
8874 fi
8875
8876 if test "$with_libxml" = yes ; then
8877
8878 { echo "$as_me:$LINENO: checking for xmlSaveToBuffer in -lxml2" >&5
8879 echo $ECHO_N "checking for xmlSaveToBuffer in -lxml2... $ECHO_C" >&6; }
8880 if test "${ac_cv_lib_xml2_xmlSaveToBuffer+set}" = set; then
8881   echo $ECHO_N "(cached) $ECHO_C" >&6
8882 else
8883   ac_check_lib_save_LIBS=$LIBS
8884 LIBS="-lxml2  $LIBS"
8885 cat >conftest.$ac_ext <<_ACEOF
8886 /* confdefs.h.  */
8887 _ACEOF
8888 cat confdefs.h >>conftest.$ac_ext
8889 cat >>conftest.$ac_ext <<_ACEOF
8890 /* end confdefs.h.  */
8891
8892 /* Override any GCC internal prototype to avoid an error.
8893    Use char because int might match the return type of a GCC
8894    builtin and then its argument prototype would still apply.  */
8895 #ifdef __cplusplus
8896 extern "C"
8897 #endif
8898 char xmlSaveToBuffer ();
8899 int
8900 main ()
8901 {
8902 return xmlSaveToBuffer ();
8903   ;
8904   return 0;
8905 }
8906 _ACEOF
8907 rm -f conftest.$ac_objext conftest$ac_exeext
8908 if { (ac_try="$ac_link"
8909 case "(($ac_try" in
8910   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8911   *) ac_try_echo=$ac_try;;
8912 esac
8913 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8914   (eval "$ac_link") 2>conftest.er1
8915   ac_status=$?
8916   grep -v '^ *+' conftest.er1 >conftest.err
8917   rm -f conftest.er1
8918   cat conftest.err >&5
8919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8920   (exit $ac_status); } && {
8921          test -z "$ac_c_werror_flag" ||
8922          test ! -s conftest.err
8923        } && test -s conftest$ac_exeext &&
8924        $as_test_x conftest$ac_exeext; then
8925   ac_cv_lib_xml2_xmlSaveToBuffer=yes
8926 else
8927   echo "$as_me: failed program was:" >&5
8928 sed 's/^/| /' conftest.$ac_ext >&5
8929
8930         ac_cv_lib_xml2_xmlSaveToBuffer=no
8931 fi
8932
8933 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8934       conftest$ac_exeext conftest.$ac_ext
8935 LIBS=$ac_check_lib_save_LIBS
8936 fi
8937 { echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
8938 echo "${ECHO_T}$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
8939 if test $ac_cv_lib_xml2_xmlSaveToBuffer = yes; then
8940   cat >>confdefs.h <<_ACEOF
8941 #define HAVE_LIBXML2 1
8942 _ACEOF
8943
8944   LIBS="-lxml2 $LIBS"
8945
8946 else
8947   { { echo "$as_me:$LINENO: error: library 'xml2' (version >= 2.6.23) is required for XML support" >&5
8948 echo "$as_me: error: library 'xml2' (version >= 2.6.23) is required for XML support" >&2;}
8949    { (exit 1); exit 1; }; }
8950 fi
8951
8952 fi
8953
8954 if test "$with_libxslt" = yes ; then
8955
8956 { echo "$as_me:$LINENO: checking for xsltCleanupGlobals in -lxslt" >&5
8957 echo $ECHO_N "checking for xsltCleanupGlobals in -lxslt... $ECHO_C" >&6; }
8958 if test "${ac_cv_lib_xslt_xsltCleanupGlobals+set}" = set; then
8959   echo $ECHO_N "(cached) $ECHO_C" >&6
8960 else
8961   ac_check_lib_save_LIBS=$LIBS
8962 LIBS="-lxslt  $LIBS"
8963 cat >conftest.$ac_ext <<_ACEOF
8964 /* confdefs.h.  */
8965 _ACEOF
8966 cat confdefs.h >>conftest.$ac_ext
8967 cat >>conftest.$ac_ext <<_ACEOF
8968 /* end confdefs.h.  */
8969
8970 /* Override any GCC internal prototype to avoid an error.
8971    Use char because int might match the return type of a GCC
8972    builtin and then its argument prototype would still apply.  */
8973 #ifdef __cplusplus
8974 extern "C"
8975 #endif
8976 char xsltCleanupGlobals ();
8977 int
8978 main ()
8979 {
8980 return xsltCleanupGlobals ();
8981   ;
8982   return 0;
8983 }
8984 _ACEOF
8985 rm -f conftest.$ac_objext conftest$ac_exeext
8986 if { (ac_try="$ac_link"
8987 case "(($ac_try" in
8988   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8989   *) ac_try_echo=$ac_try;;
8990 esac
8991 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8992   (eval "$ac_link") 2>conftest.er1
8993   ac_status=$?
8994   grep -v '^ *+' conftest.er1 >conftest.err
8995   rm -f conftest.er1
8996   cat conftest.err >&5
8997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8998   (exit $ac_status); } && {
8999          test -z "$ac_c_werror_flag" ||
9000          test ! -s conftest.err
9001        } && test -s conftest$ac_exeext &&
9002        $as_test_x conftest$ac_exeext; then
9003   ac_cv_lib_xslt_xsltCleanupGlobals=yes
9004 else
9005   echo "$as_me: failed program was:" >&5
9006 sed 's/^/| /' conftest.$ac_ext >&5
9007
9008         ac_cv_lib_xslt_xsltCleanupGlobals=no
9009 fi
9010
9011 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9012       conftest$ac_exeext conftest.$ac_ext
9013 LIBS=$ac_check_lib_save_LIBS
9014 fi
9015 { echo "$as_me:$LINENO: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
9016 echo "${ECHO_T}$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
9017 if test $ac_cv_lib_xslt_xsltCleanupGlobals = yes; then
9018   cat >>confdefs.h <<_ACEOF
9019 #define HAVE_LIBXSLT 1
9020 _ACEOF
9021
9022   LIBS="-lxslt $LIBS"
9023
9024 else
9025   { { echo "$as_me:$LINENO: error: library 'xslt' is required for XSLT support" >&5
9026 echo "$as_me: error: library 'xslt' is required for XSLT support" >&2;}
9027    { (exit 1); exit 1; }; }
9028 fi
9029
9030 fi
9031
9032 # for contrib/uuid-ossp
9033 if test "$with_ossp_uuid" = yes ; then
9034   { echo "$as_me:$LINENO: checking for uuid_export in -lossp-uuid" >&5
9035 echo $ECHO_N "checking for uuid_export in -lossp-uuid... $ECHO_C" >&6; }
9036 if test "${ac_cv_lib_ossp_uuid_uuid_export+set}" = set; then
9037   echo $ECHO_N "(cached) $ECHO_C" >&6
9038 else
9039   ac_check_lib_save_LIBS=$LIBS
9040 LIBS="-lossp-uuid  $LIBS"
9041 cat >conftest.$ac_ext <<_ACEOF
9042 /* confdefs.h.  */
9043 _ACEOF
9044 cat confdefs.h >>conftest.$ac_ext
9045 cat >>conftest.$ac_ext <<_ACEOF
9046 /* end confdefs.h.  */
9047
9048 /* Override any GCC internal prototype to avoid an error.
9049    Use char because int might match the return type of a GCC
9050    builtin and then its argument prototype would still apply.  */
9051 #ifdef __cplusplus
9052 extern "C"
9053 #endif
9054 char uuid_export ();
9055 int
9056 main ()
9057 {
9058 return uuid_export ();
9059   ;
9060   return 0;
9061 }
9062 _ACEOF
9063 rm -f conftest.$ac_objext conftest$ac_exeext
9064 if { (ac_try="$ac_link"
9065 case "(($ac_try" in
9066   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9067   *) ac_try_echo=$ac_try;;
9068 esac
9069 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9070   (eval "$ac_link") 2>conftest.er1
9071   ac_status=$?
9072   grep -v '^ *+' conftest.er1 >conftest.err
9073   rm -f conftest.er1
9074   cat conftest.err >&5
9075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9076   (exit $ac_status); } && {
9077          test -z "$ac_c_werror_flag" ||
9078          test ! -s conftest.err
9079        } && test -s conftest$ac_exeext &&
9080        $as_test_x conftest$ac_exeext; then
9081   ac_cv_lib_ossp_uuid_uuid_export=yes
9082 else
9083   echo "$as_me: failed program was:" >&5
9084 sed 's/^/| /' conftest.$ac_ext >&5
9085
9086         ac_cv_lib_ossp_uuid_uuid_export=no
9087 fi
9088
9089 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9090       conftest$ac_exeext conftest.$ac_ext
9091 LIBS=$ac_check_lib_save_LIBS
9092 fi
9093 { echo "$as_me:$LINENO: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
9094 echo "${ECHO_T}$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
9095 if test $ac_cv_lib_ossp_uuid_uuid_export = yes; then
9096   OSSP_UUID_LIBS="-lossp-uuid"
9097 else
9098   { echo "$as_me:$LINENO: checking for uuid_export in -luuid" >&5
9099 echo $ECHO_N "checking for uuid_export in -luuid... $ECHO_C" >&6; }
9100 if test "${ac_cv_lib_uuid_uuid_export+set}" = set; then
9101   echo $ECHO_N "(cached) $ECHO_C" >&6
9102 else
9103   ac_check_lib_save_LIBS=$LIBS
9104 LIBS="-luuid  $LIBS"
9105 cat >conftest.$ac_ext <<_ACEOF
9106 /* confdefs.h.  */
9107 _ACEOF
9108 cat confdefs.h >>conftest.$ac_ext
9109 cat >>conftest.$ac_ext <<_ACEOF
9110 /* end confdefs.h.  */
9111
9112 /* Override any GCC internal prototype to avoid an error.
9113    Use char because int might match the return type of a GCC
9114    builtin and then its argument prototype would still apply.  */
9115 #ifdef __cplusplus
9116 extern "C"
9117 #endif
9118 char uuid_export ();
9119 int
9120 main ()
9121 {
9122 return uuid_export ();
9123   ;
9124   return 0;
9125 }
9126 _ACEOF
9127 rm -f conftest.$ac_objext conftest$ac_exeext
9128 if { (ac_try="$ac_link"
9129 case "(($ac_try" in
9130   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9131   *) ac_try_echo=$ac_try;;
9132 esac
9133 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9134   (eval "$ac_link") 2>conftest.er1
9135   ac_status=$?
9136   grep -v '^ *+' conftest.er1 >conftest.err
9137   rm -f conftest.er1
9138   cat conftest.err >&5
9139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9140   (exit $ac_status); } && {
9141          test -z "$ac_c_werror_flag" ||
9142          test ! -s conftest.err
9143        } && test -s conftest$ac_exeext &&
9144        $as_test_x conftest$ac_exeext; then
9145   ac_cv_lib_uuid_uuid_export=yes
9146 else
9147   echo "$as_me: failed program was:" >&5
9148 sed 's/^/| /' conftest.$ac_ext >&5
9149
9150         ac_cv_lib_uuid_uuid_export=no
9151 fi
9152
9153 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9154       conftest$ac_exeext conftest.$ac_ext
9155 LIBS=$ac_check_lib_save_LIBS
9156 fi
9157 { echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_export" >&5
9158 echo "${ECHO_T}$ac_cv_lib_uuid_uuid_export" >&6; }
9159 if test $ac_cv_lib_uuid_uuid_export = yes; then
9160   OSSP_UUID_LIBS="-luuid"
9161 else
9162   { { echo "$as_me:$LINENO: error: library 'ossp-uuid' or 'uuid' is required for OSSP-UUID" >&5
9163 echo "$as_me: error: library 'ossp-uuid' or 'uuid' is required for OSSP-UUID" >&2;}
9164    { (exit 1); exit 1; }; }
9165 fi
9166
9167 fi
9168
9169 fi
9170
9171
9172
9173 ##
9174 ## Header files
9175 ##
9176
9177 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
9178 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
9179 if test "${ac_cv_header_stdc+set}" = set; then
9180   echo $ECHO_N "(cached) $ECHO_C" >&6
9181 else
9182   cat >conftest.$ac_ext <<_ACEOF
9183 /* confdefs.h.  */
9184 _ACEOF
9185 cat confdefs.h >>conftest.$ac_ext
9186 cat >>conftest.$ac_ext <<_ACEOF
9187 /* end confdefs.h.  */
9188 #include <stdlib.h>
9189 #include <stdarg.h>
9190 #include <string.h>
9191 #include <float.h>
9192
9193 int
9194 main ()
9195 {
9196
9197   ;
9198   return 0;
9199 }
9200 _ACEOF
9201 rm -f conftest.$ac_objext
9202 if { (ac_try="$ac_compile"
9203 case "(($ac_try" in
9204   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9205   *) ac_try_echo=$ac_try;;
9206 esac
9207 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9208   (eval "$ac_compile") 2>conftest.er1
9209   ac_status=$?
9210   grep -v '^ *+' conftest.er1 >conftest.err
9211   rm -f conftest.er1
9212   cat conftest.err >&5
9213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9214   (exit $ac_status); } && {
9215          test -z "$ac_c_werror_flag" ||
9216          test ! -s conftest.err
9217        } && test -s conftest.$ac_objext; then
9218   ac_cv_header_stdc=yes
9219 else
9220   echo "$as_me: failed program was:" >&5
9221 sed 's/^/| /' conftest.$ac_ext >&5
9222
9223         ac_cv_header_stdc=no
9224 fi
9225
9226 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9227
9228 if test $ac_cv_header_stdc = yes; then
9229   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9230   cat >conftest.$ac_ext <<_ACEOF
9231 /* confdefs.h.  */
9232 _ACEOF
9233 cat confdefs.h >>conftest.$ac_ext
9234 cat >>conftest.$ac_ext <<_ACEOF
9235 /* end confdefs.h.  */
9236 #include <string.h>
9237
9238 _ACEOF
9239 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9240   $EGREP "memchr" >/dev/null 2>&1; then
9241   :
9242 else
9243   ac_cv_header_stdc=no
9244 fi
9245 rm -f conftest*
9246
9247 fi
9248
9249 if test $ac_cv_header_stdc = yes; then
9250   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9251   cat >conftest.$ac_ext <<_ACEOF
9252 /* confdefs.h.  */
9253 _ACEOF
9254 cat confdefs.h >>conftest.$ac_ext
9255 cat >>conftest.$ac_ext <<_ACEOF
9256 /* end confdefs.h.  */
9257 #include <stdlib.h>
9258
9259 _ACEOF
9260 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9261   $EGREP "free" >/dev/null 2>&1; then
9262   :
9263 else
9264   ac_cv_header_stdc=no
9265 fi
9266 rm -f conftest*
9267
9268 fi
9269
9270 if test $ac_cv_header_stdc = yes; then
9271   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9272   if test "$cross_compiling" = yes; then
9273   :
9274 else
9275   cat >conftest.$ac_ext <<_ACEOF
9276 /* confdefs.h.  */
9277 _ACEOF
9278 cat confdefs.h >>conftest.$ac_ext
9279 cat >>conftest.$ac_ext <<_ACEOF
9280 /* end confdefs.h.  */
9281 #include <ctype.h>
9282 #include <stdlib.h>
9283 #if ((' ' & 0x0FF) == 0x020)
9284 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9285 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9286 #else
9287 # define ISLOWER(c) \
9288                    (('a' <= (c) && (c) <= 'i') \
9289                      || ('j' <= (c) && (c) <= 'r') \
9290                      || ('s' <= (c) && (c) <= 'z'))
9291 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9292 #endif
9293
9294 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9295 int
9296 main ()
9297 {
9298   int i;
9299   for (i = 0; i < 256; i++)
9300     if (XOR (islower (i), ISLOWER (i))
9301         || toupper (i) != TOUPPER (i))
9302       return 2;
9303   return 0;
9304 }
9305 _ACEOF
9306 rm -f conftest$ac_exeext
9307 if { (ac_try="$ac_link"
9308 case "(($ac_try" in
9309   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9310   *) ac_try_echo=$ac_try;;
9311 esac
9312 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9313   (eval "$ac_link") 2>&5
9314   ac_status=$?
9315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9316   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9317   { (case "(($ac_try" in
9318   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9319   *) ac_try_echo=$ac_try;;
9320 esac
9321 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9322   (eval "$ac_try") 2>&5
9323   ac_status=$?
9324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9325   (exit $ac_status); }; }; then
9326   :
9327 else
9328   echo "$as_me: program exited with status $ac_status" >&5
9329 echo "$as_me: failed program was:" >&5
9330 sed 's/^/| /' conftest.$ac_ext >&5
9331
9332 ( exit $ac_status )
9333 ac_cv_header_stdc=no
9334 fi
9335 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9336 fi
9337
9338
9339 fi
9340 fi
9341 { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
9342 echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
9343 if test $ac_cv_header_stdc = yes; then
9344
9345 cat >>confdefs.h <<\_ACEOF
9346 #define STDC_HEADERS 1
9347 _ACEOF
9348
9349 fi
9350
9351 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9362                   inttypes.h stdint.h unistd.h
9363 do
9364 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9365 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9366 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9367 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9368   echo $ECHO_N "(cached) $ECHO_C" >&6
9369 else
9370   cat >conftest.$ac_ext <<_ACEOF
9371 /* confdefs.h.  */
9372 _ACEOF
9373 cat confdefs.h >>conftest.$ac_ext
9374 cat >>conftest.$ac_ext <<_ACEOF
9375 /* end confdefs.h.  */
9376 $ac_includes_default
9377
9378 #include <$ac_header>
9379 _ACEOF
9380 rm -f conftest.$ac_objext
9381 if { (ac_try="$ac_compile"
9382 case "(($ac_try" in
9383   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9384   *) ac_try_echo=$ac_try;;
9385 esac
9386 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9387   (eval "$ac_compile") 2>conftest.er1
9388   ac_status=$?
9389   grep -v '^ *+' conftest.er1 >conftest.err
9390   rm -f conftest.er1
9391   cat conftest.err >&5
9392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9393   (exit $ac_status); } && {
9394          test -z "$ac_c_werror_flag" ||
9395          test ! -s conftest.err
9396        } && test -s conftest.$ac_objext; then
9397   eval "$as_ac_Header=yes"
9398 else
9399   echo "$as_me: failed program was:" >&5
9400 sed 's/^/| /' conftest.$ac_ext >&5
9401
9402         eval "$as_ac_Header=no"
9403 fi
9404
9405 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9406 fi
9407 ac_res=`eval echo '${'$as_ac_Header'}'`
9408                { echo "$as_me:$LINENO: result: $ac_res" >&5
9409 echo "${ECHO_T}$ac_res" >&6; }
9410 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9411   cat >>confdefs.h <<_ACEOF
9412 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9413 _ACEOF
9414
9415 fi
9416
9417 done
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447 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 ucred.h utime.h wchar.h wctype.h kernel/OS.h kernel/image.h SupportDefs.h
9448 do
9449 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9450 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9451   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9452 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9453 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9454   echo $ECHO_N "(cached) $ECHO_C" >&6
9455 fi
9456 ac_res=`eval echo '${'$as_ac_Header'}'`
9457                { echo "$as_me:$LINENO: result: $ac_res" >&5
9458 echo "${ECHO_T}$ac_res" >&6; }
9459 else
9460   # Is the header compilable?
9461 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9462 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9463 cat >conftest.$ac_ext <<_ACEOF
9464 /* confdefs.h.  */
9465 _ACEOF
9466 cat confdefs.h >>conftest.$ac_ext
9467 cat >>conftest.$ac_ext <<_ACEOF
9468 /* end confdefs.h.  */
9469 $ac_includes_default
9470 #include <$ac_header>
9471 _ACEOF
9472 rm -f conftest.$ac_objext
9473 if { (ac_try="$ac_compile"
9474 case "(($ac_try" in
9475   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9476   *) ac_try_echo=$ac_try;;
9477 esac
9478 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9479   (eval "$ac_compile") 2>conftest.er1
9480   ac_status=$?
9481   grep -v '^ *+' conftest.er1 >conftest.err
9482   rm -f conftest.er1
9483   cat conftest.err >&5
9484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9485   (exit $ac_status); } && {
9486          test -z "$ac_c_werror_flag" ||
9487          test ! -s conftest.err
9488        } && test -s conftest.$ac_objext; then
9489   ac_header_compiler=yes
9490 else
9491   echo "$as_me: failed program was:" >&5
9492 sed 's/^/| /' conftest.$ac_ext >&5
9493
9494         ac_header_compiler=no
9495 fi
9496
9497 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9498 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9499 echo "${ECHO_T}$ac_header_compiler" >&6; }
9500
9501 # Is the header present?
9502 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
9503 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
9504 cat >conftest.$ac_ext <<_ACEOF
9505 /* confdefs.h.  */
9506 _ACEOF
9507 cat confdefs.h >>conftest.$ac_ext
9508 cat >>conftest.$ac_ext <<_ACEOF
9509 /* end confdefs.h.  */
9510 #include <$ac_header>
9511 _ACEOF
9512 if { (ac_try="$ac_cpp conftest.$ac_ext"
9513 case "(($ac_try" in
9514   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9515   *) ac_try_echo=$ac_try;;
9516 esac
9517 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9518   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9519   ac_status=$?
9520   grep -v '^ *+' conftest.er1 >conftest.err
9521   rm -f conftest.er1
9522   cat conftest.err >&5
9523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9524   (exit $ac_status); } >/dev/null && {
9525          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9526          test ! -s conftest.err
9527        }; then
9528   ac_header_preproc=yes
9529 else
9530   echo "$as_me: failed program was:" >&5
9531 sed 's/^/| /' conftest.$ac_ext >&5
9532
9533   ac_header_preproc=no
9534 fi
9535
9536 rm -f conftest.err conftest.$ac_ext
9537 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9538 echo "${ECHO_T}$ac_header_preproc" >&6; }
9539
9540 # So?  What about this header?
9541 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9542   yes:no: )
9543     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9544 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9545     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9546 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9547     ac_header_preproc=yes
9548     ;;
9549   no:yes:* )
9550     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9551 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9552     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9553 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9554     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9555 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9556     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9557 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9558     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9559 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9560     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9561 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9562     ( cat <<\_ASBOX
9563 ## ---------------------------------------- ##
9564 ## Report this to pgsql-bugs@postgresql.org ##
9565 ## ---------------------------------------- ##
9566 _ASBOX
9567      ) | sed "s/^/$as_me: WARNING:     /" >&2
9568     ;;
9569 esac
9570 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9571 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9572 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9573   echo $ECHO_N "(cached) $ECHO_C" >&6
9574 else
9575   eval "$as_ac_Header=\$ac_header_preproc"
9576 fi
9577 ac_res=`eval echo '${'$as_ac_Header'}'`
9578                { echo "$as_me:$LINENO: result: $ac_res" >&5
9579 echo "${ECHO_T}$ac_res" >&6; }
9580
9581 fi
9582 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9583   cat >>confdefs.h <<_ACEOF
9584 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9585 _ACEOF
9586
9587 fi
9588
9589 done
9590
9591
9592 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
9593 # netinet/in.h is included first.
9594
9595 for ac_header in netinet/in.h
9596 do
9597 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9598 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9599   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9600 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9601 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9602   echo $ECHO_N "(cached) $ECHO_C" >&6
9603 fi
9604 ac_res=`eval echo '${'$as_ac_Header'}'`
9605                { echo "$as_me:$LINENO: result: $ac_res" >&5
9606 echo "${ECHO_T}$ac_res" >&6; }
9607 else
9608   # Is the header compilable?
9609 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9610 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9611 cat >conftest.$ac_ext <<_ACEOF
9612 /* confdefs.h.  */
9613 _ACEOF
9614 cat confdefs.h >>conftest.$ac_ext
9615 cat >>conftest.$ac_ext <<_ACEOF
9616 /* end confdefs.h.  */
9617 $ac_includes_default
9618 #include <$ac_header>
9619 _ACEOF
9620 rm -f conftest.$ac_objext
9621 if { (ac_try="$ac_compile"
9622 case "(($ac_try" in
9623   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9624   *) ac_try_echo=$ac_try;;
9625 esac
9626 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9627   (eval "$ac_compile") 2>conftest.er1
9628   ac_status=$?
9629   grep -v '^ *+' conftest.er1 >conftest.err
9630   rm -f conftest.er1
9631   cat conftest.err >&5
9632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9633   (exit $ac_status); } && {
9634          test -z "$ac_c_werror_flag" ||
9635          test ! -s conftest.err
9636        } && test -s conftest.$ac_objext; then
9637   ac_header_compiler=yes
9638 else
9639   echo "$as_me: failed program was:" >&5
9640 sed 's/^/| /' conftest.$ac_ext >&5
9641
9642         ac_header_compiler=no
9643 fi
9644
9645 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9646 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9647 echo "${ECHO_T}$ac_header_compiler" >&6; }
9648
9649 # Is the header present?
9650 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
9651 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
9652 cat >conftest.$ac_ext <<_ACEOF
9653 /* confdefs.h.  */
9654 _ACEOF
9655 cat confdefs.h >>conftest.$ac_ext
9656 cat >>conftest.$ac_ext <<_ACEOF
9657 /* end confdefs.h.  */
9658 #include <$ac_header>
9659 _ACEOF
9660 if { (ac_try="$ac_cpp conftest.$ac_ext"
9661 case "(($ac_try" in
9662   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9663   *) ac_try_echo=$ac_try;;
9664 esac
9665 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9666   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9667   ac_status=$?
9668   grep -v '^ *+' conftest.er1 >conftest.err
9669   rm -f conftest.er1
9670   cat conftest.err >&5
9671   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9672   (exit $ac_status); } >/dev/null && {
9673          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9674          test ! -s conftest.err
9675        }; then
9676   ac_header_preproc=yes
9677 else
9678   echo "$as_me: failed program was:" >&5
9679 sed 's/^/| /' conftest.$ac_ext >&5
9680
9681   ac_header_preproc=no
9682 fi
9683
9684 rm -f conftest.err conftest.$ac_ext
9685 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9686 echo "${ECHO_T}$ac_header_preproc" >&6; }
9687
9688 # So?  What about this header?
9689 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9690   yes:no: )
9691     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9692 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9693     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9694 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9695     ac_header_preproc=yes
9696     ;;
9697   no:yes:* )
9698     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9699 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9700     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9701 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9702     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9703 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9704     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9705 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9706     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9707 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9708     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9709 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9710     ( cat <<\_ASBOX
9711 ## ---------------------------------------- ##
9712 ## Report this to pgsql-bugs@postgresql.org ##
9713 ## ---------------------------------------- ##
9714 _ASBOX
9715      ) | sed "s/^/$as_me: WARNING:     /" >&2
9716     ;;
9717 esac
9718 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9719 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9720 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9721   echo $ECHO_N "(cached) $ECHO_C" >&6
9722 else
9723   eval "$as_ac_Header=\$ac_header_preproc"
9724 fi
9725 ac_res=`eval echo '${'$as_ac_Header'}'`
9726                { echo "$as_me:$LINENO: result: $ac_res" >&5
9727 echo "${ECHO_T}$ac_res" >&6; }
9728
9729 fi
9730 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9731   cat >>confdefs.h <<_ACEOF
9732 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9733 _ACEOF
9734
9735 fi
9736
9737 done
9738
9739
9740 for ac_header in netinet/tcp.h
9741 do
9742 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9743 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9744 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9745 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9746   echo $ECHO_N "(cached) $ECHO_C" >&6
9747 else
9748   cat >conftest.$ac_ext <<_ACEOF
9749 /* confdefs.h.  */
9750 _ACEOF
9751 cat confdefs.h >>conftest.$ac_ext
9752 cat >>conftest.$ac_ext <<_ACEOF
9753 /* end confdefs.h.  */
9754 $ac_includes_default
9755 #ifdef HAVE_NETINET_IN_H
9756 #include <netinet/in.h>
9757 #endif
9758
9759
9760 #include <$ac_header>
9761 _ACEOF
9762 rm -f conftest.$ac_objext
9763 if { (ac_try="$ac_compile"
9764 case "(($ac_try" in
9765   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9766   *) ac_try_echo=$ac_try;;
9767 esac
9768 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9769   (eval "$ac_compile") 2>conftest.er1
9770   ac_status=$?
9771   grep -v '^ *+' conftest.er1 >conftest.err
9772   rm -f conftest.er1
9773   cat conftest.err >&5
9774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9775   (exit $ac_status); } && {
9776          test -z "$ac_c_werror_flag" ||
9777          test ! -s conftest.err
9778        } && test -s conftest.$ac_objext; then
9779   eval "$as_ac_Header=yes"
9780 else
9781   echo "$as_me: failed program was:" >&5
9782 sed 's/^/| /' conftest.$ac_ext >&5
9783
9784         eval "$as_ac_Header=no"
9785 fi
9786
9787 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9793   cat >>confdefs.h <<_ACEOF
9794 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9795 _ACEOF
9796
9797 fi
9798
9799 done
9800
9801
9802 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
9803
9804 for ac_header in readline/readline.h
9805 do
9806 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9807 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9808   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9809 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9810 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9811   echo $ECHO_N "(cached) $ECHO_C" >&6
9812 fi
9813 ac_res=`eval echo '${'$as_ac_Header'}'`
9814                { echo "$as_me:$LINENO: result: $ac_res" >&5
9815 echo "${ECHO_T}$ac_res" >&6; }
9816 else
9817   # Is the header compilable?
9818 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9819 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9820 cat >conftest.$ac_ext <<_ACEOF
9821 /* confdefs.h.  */
9822 _ACEOF
9823 cat confdefs.h >>conftest.$ac_ext
9824 cat >>conftest.$ac_ext <<_ACEOF
9825 /* end confdefs.h.  */
9826 $ac_includes_default
9827 #include <$ac_header>
9828 _ACEOF
9829 rm -f conftest.$ac_objext
9830 if { (ac_try="$ac_compile"
9831 case "(($ac_try" in
9832   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9833   *) ac_try_echo=$ac_try;;
9834 esac
9835 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9836   (eval "$ac_compile") 2>conftest.er1
9837   ac_status=$?
9838   grep -v '^ *+' conftest.er1 >conftest.err
9839   rm -f conftest.er1
9840   cat conftest.err >&5
9841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9842   (exit $ac_status); } && {
9843          test -z "$ac_c_werror_flag" ||
9844          test ! -s conftest.err
9845        } && test -s conftest.$ac_objext; then
9846   ac_header_compiler=yes
9847 else
9848   echo "$as_me: failed program was:" >&5
9849 sed 's/^/| /' conftest.$ac_ext >&5
9850
9851         ac_header_compiler=no
9852 fi
9853
9854 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9855 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9856 echo "${ECHO_T}$ac_header_compiler" >&6; }
9857
9858 # Is the header present?
9859 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
9860 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
9861 cat >conftest.$ac_ext <<_ACEOF
9862 /* confdefs.h.  */
9863 _ACEOF
9864 cat confdefs.h >>conftest.$ac_ext
9865 cat >>conftest.$ac_ext <<_ACEOF
9866 /* end confdefs.h.  */
9867 #include <$ac_header>
9868 _ACEOF
9869 if { (ac_try="$ac_cpp conftest.$ac_ext"
9870 case "(($ac_try" in
9871   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9872   *) ac_try_echo=$ac_try;;
9873 esac
9874 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9875   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9876   ac_status=$?
9877   grep -v '^ *+' conftest.er1 >conftest.err
9878   rm -f conftest.er1
9879   cat conftest.err >&5
9880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9881   (exit $ac_status); } >/dev/null && {
9882          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9883          test ! -s conftest.err
9884        }; then
9885   ac_header_preproc=yes
9886 else
9887   echo "$as_me: failed program was:" >&5
9888 sed 's/^/| /' conftest.$ac_ext >&5
9889
9890   ac_header_preproc=no
9891 fi
9892
9893 rm -f conftest.err conftest.$ac_ext
9894 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9895 echo "${ECHO_T}$ac_header_preproc" >&6; }
9896
9897 # So?  What about this header?
9898 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9899   yes:no: )
9900     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9901 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9902     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9903 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9904     ac_header_preproc=yes
9905     ;;
9906   no:yes:* )
9907     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9908 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9909     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9910 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9911     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9912 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9913     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9914 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9915     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9916 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9917     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9918 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9919     ( cat <<\_ASBOX
9920 ## ---------------------------------------- ##
9921 ## Report this to pgsql-bugs@postgresql.org ##
9922 ## ---------------------------------------- ##
9923 _ASBOX
9924      ) | sed "s/^/$as_me: WARNING:     /" >&2
9925     ;;
9926 esac
9927 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9928 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9929 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9930   echo $ECHO_N "(cached) $ECHO_C" >&6
9931 else
9932   eval "$as_ac_Header=\$ac_header_preproc"
9933 fi
9934 ac_res=`eval echo '${'$as_ac_Header'}'`
9935                { echo "$as_me:$LINENO: result: $ac_res" >&5
9936 echo "${ECHO_T}$ac_res" >&6; }
9937
9938 fi
9939 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9940   cat >>confdefs.h <<_ACEOF
9941 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9942 _ACEOF
9943
9944 else
9945
9946 for ac_header in readline.h
9947 do
9948 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9949 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9950   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9951 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9952 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9953   echo $ECHO_N "(cached) $ECHO_C" >&6
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 else
9959   # Is the header compilable?
9960 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9961 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9962 cat >conftest.$ac_ext <<_ACEOF
9963 /* confdefs.h.  */
9964 _ACEOF
9965 cat confdefs.h >>conftest.$ac_ext
9966 cat >>conftest.$ac_ext <<_ACEOF
9967 /* end confdefs.h.  */
9968 $ac_includes_default
9969 #include <$ac_header>
9970 _ACEOF
9971 rm -f conftest.$ac_objext
9972 if { (ac_try="$ac_compile"
9973 case "(($ac_try" in
9974   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9975   *) ac_try_echo=$ac_try;;
9976 esac
9977 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9978   (eval "$ac_compile") 2>conftest.er1
9979   ac_status=$?
9980   grep -v '^ *+' conftest.er1 >conftest.err
9981   rm -f conftest.er1
9982   cat conftest.err >&5
9983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9984   (exit $ac_status); } && {
9985          test -z "$ac_c_werror_flag" ||
9986          test ! -s conftest.err
9987        } && test -s conftest.$ac_objext; then
9988   ac_header_compiler=yes
9989 else
9990   echo "$as_me: failed program was:" >&5
9991 sed 's/^/| /' conftest.$ac_ext >&5
9992
9993         ac_header_compiler=no
9994 fi
9995
9996 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9997 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9998 echo "${ECHO_T}$ac_header_compiler" >&6; }
9999
10000 # Is the header present?
10001 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
10002 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10003 cat >conftest.$ac_ext <<_ACEOF
10004 /* confdefs.h.  */
10005 _ACEOF
10006 cat confdefs.h >>conftest.$ac_ext
10007 cat >>conftest.$ac_ext <<_ACEOF
10008 /* end confdefs.h.  */
10009 #include <$ac_header>
10010 _ACEOF
10011 if { (ac_try="$ac_cpp conftest.$ac_ext"
10012 case "(($ac_try" in
10013   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10014   *) ac_try_echo=$ac_try;;
10015 esac
10016 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10017   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10018   ac_status=$?
10019   grep -v '^ *+' conftest.er1 >conftest.err
10020   rm -f conftest.er1
10021   cat conftest.err >&5
10022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10023   (exit $ac_status); } >/dev/null && {
10024          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10025          test ! -s conftest.err
10026        }; then
10027   ac_header_preproc=yes
10028 else
10029   echo "$as_me: failed program was:" >&5
10030 sed 's/^/| /' conftest.$ac_ext >&5
10031
10032   ac_header_preproc=no
10033 fi
10034
10035 rm -f conftest.err conftest.$ac_ext
10036 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10037 echo "${ECHO_T}$ac_header_preproc" >&6; }
10038
10039 # So?  What about this header?
10040 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10041   yes:no: )
10042     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10043 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10044     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10045 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10046     ac_header_preproc=yes
10047     ;;
10048   no:yes:* )
10049     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10050 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10051     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10052 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10053     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10054 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10055     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10056 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10057     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10058 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10059     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10060 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10061     ( cat <<\_ASBOX
10062 ## ---------------------------------------- ##
10063 ## Report this to pgsql-bugs@postgresql.org ##
10064 ## ---------------------------------------- ##
10065 _ASBOX
10066      ) | sed "s/^/$as_me: WARNING:     /" >&2
10067     ;;
10068 esac
10069 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10070 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10071 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10072   echo $ECHO_N "(cached) $ECHO_C" >&6
10073 else
10074   eval "$as_ac_Header=\$ac_header_preproc"
10075 fi
10076 ac_res=`eval echo '${'$as_ac_Header'}'`
10077                { echo "$as_me:$LINENO: result: $ac_res" >&5
10078 echo "${ECHO_T}$ac_res" >&6; }
10079
10080 fi
10081 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10082   cat >>confdefs.h <<_ACEOF
10083 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10084 _ACEOF
10085
10086 else
10087   { { echo "$as_me:$LINENO: error: readline header not found
10088 If you have readline already installed, see config.log for details on the
10089 failure.  It is possible the compiler isn't looking in the proper directory.
10090 Use --without-readline to disable readline support." >&5
10091 echo "$as_me: error: readline header not found
10092 If you have readline already installed, see config.log for details on the
10093 failure.  It is possible the compiler isn't looking in the proper directory.
10094 Use --without-readline to disable readline support." >&2;}
10095    { (exit 1); exit 1; }; }
10096 fi
10097
10098 done
10099
10100 fi
10101
10102 done
10103
10104
10105 for ac_header in readline/history.h
10106 do
10107 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10108 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10109   { echo "$as_me:$LINENO: checking for $ac_header" >&5
10110 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10111 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10112   echo $ECHO_N "(cached) $ECHO_C" >&6
10113 fi
10114 ac_res=`eval echo '${'$as_ac_Header'}'`
10115                { echo "$as_me:$LINENO: result: $ac_res" >&5
10116 echo "${ECHO_T}$ac_res" >&6; }
10117 else
10118   # Is the header compilable?
10119 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
10120 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
10121 cat >conftest.$ac_ext <<_ACEOF
10122 /* confdefs.h.  */
10123 _ACEOF
10124 cat confdefs.h >>conftest.$ac_ext
10125 cat >>conftest.$ac_ext <<_ACEOF
10126 /* end confdefs.h.  */
10127 $ac_includes_default
10128 #include <$ac_header>
10129 _ACEOF
10130 rm -f conftest.$ac_objext
10131 if { (ac_try="$ac_compile"
10132 case "(($ac_try" in
10133   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10134   *) ac_try_echo=$ac_try;;
10135 esac
10136 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10137   (eval "$ac_compile") 2>conftest.er1
10138   ac_status=$?
10139   grep -v '^ *+' conftest.er1 >conftest.err
10140   rm -f conftest.er1
10141   cat conftest.err >&5
10142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10143   (exit $ac_status); } && {
10144          test -z "$ac_c_werror_flag" ||
10145          test ! -s conftest.err
10146        } && test -s conftest.$ac_objext; then
10147   ac_header_compiler=yes
10148 else
10149   echo "$as_me: failed program was:" >&5
10150 sed 's/^/| /' conftest.$ac_ext >&5
10151
10152         ac_header_compiler=no
10153 fi
10154
10155 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10156 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10157 echo "${ECHO_T}$ac_header_compiler" >&6; }
10158
10159 # Is the header present?
10160 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
10161 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10162 cat >conftest.$ac_ext <<_ACEOF
10163 /* confdefs.h.  */
10164 _ACEOF
10165 cat confdefs.h >>conftest.$ac_ext
10166 cat >>conftest.$ac_ext <<_ACEOF
10167 /* end confdefs.h.  */
10168 #include <$ac_header>
10169 _ACEOF
10170 if { (ac_try="$ac_cpp conftest.$ac_ext"
10171 case "(($ac_try" in
10172   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10173   *) ac_try_echo=$ac_try;;
10174 esac
10175 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10176   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10177   ac_status=$?
10178   grep -v '^ *+' conftest.er1 >conftest.err
10179   rm -f conftest.er1
10180   cat conftest.err >&5
10181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10182   (exit $ac_status); } >/dev/null && {
10183          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10184          test ! -s conftest.err
10185        }; then
10186   ac_header_preproc=yes
10187 else
10188   echo "$as_me: failed program was:" >&5
10189 sed 's/^/| /' conftest.$ac_ext >&5
10190
10191   ac_header_preproc=no
10192 fi
10193
10194 rm -f conftest.err conftest.$ac_ext
10195 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10196 echo "${ECHO_T}$ac_header_preproc" >&6; }
10197
10198 # So?  What about this header?
10199 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10200   yes:no: )
10201     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10202 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10203     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10204 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10205     ac_header_preproc=yes
10206     ;;
10207   no:yes:* )
10208     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10209 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10210     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10211 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10212     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10213 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10214     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10215 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10216     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10217 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10218     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10219 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10220     ( cat <<\_ASBOX
10221 ## ---------------------------------------- ##
10222 ## Report this to pgsql-bugs@postgresql.org ##
10223 ## ---------------------------------------- ##
10224 _ASBOX
10225      ) | sed "s/^/$as_me: WARNING:     /" >&2
10226     ;;
10227 esac
10228 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10229 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10230 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10231   echo $ECHO_N "(cached) $ECHO_C" >&6
10232 else
10233   eval "$as_ac_Header=\$ac_header_preproc"
10234 fi
10235 ac_res=`eval echo '${'$as_ac_Header'}'`
10236                { echo "$as_me:$LINENO: result: $ac_res" >&5
10237 echo "${ECHO_T}$ac_res" >&6; }
10238
10239 fi
10240 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10241   cat >>confdefs.h <<_ACEOF
10242 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10243 _ACEOF
10244
10245 else
10246
10247 for ac_header in history.h
10248 do
10249 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10250 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10251   { echo "$as_me:$LINENO: checking for $ac_header" >&5
10252 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10253 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10254   echo $ECHO_N "(cached) $ECHO_C" >&6
10255 fi
10256 ac_res=`eval echo '${'$as_ac_Header'}'`
10257                { echo "$as_me:$LINENO: result: $ac_res" >&5
10258 echo "${ECHO_T}$ac_res" >&6; }
10259 else
10260   # Is the header compilable?
10261 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
10262 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
10263 cat >conftest.$ac_ext <<_ACEOF
10264 /* confdefs.h.  */
10265 _ACEOF
10266 cat confdefs.h >>conftest.$ac_ext
10267 cat >>conftest.$ac_ext <<_ACEOF
10268 /* end confdefs.h.  */
10269 $ac_includes_default
10270 #include <$ac_header>
10271 _ACEOF
10272 rm -f conftest.$ac_objext
10273 if { (ac_try="$ac_compile"
10274 case "(($ac_try" in
10275   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10276   *) ac_try_echo=$ac_try;;
10277 esac
10278 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10279   (eval "$ac_compile") 2>conftest.er1
10280   ac_status=$?
10281   grep -v '^ *+' conftest.er1 >conftest.err
10282   rm -f conftest.er1
10283   cat conftest.err >&5
10284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10285   (exit $ac_status); } && {
10286          test -z "$ac_c_werror_flag" ||
10287          test ! -s conftest.err
10288        } && test -s conftest.$ac_objext; then
10289   ac_header_compiler=yes
10290 else
10291   echo "$as_me: failed program was:" >&5
10292 sed 's/^/| /' conftest.$ac_ext >&5
10293
10294         ac_header_compiler=no
10295 fi
10296
10297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10298 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10299 echo "${ECHO_T}$ac_header_compiler" >&6; }
10300
10301 # Is the header present?
10302 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
10303 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10304 cat >conftest.$ac_ext <<_ACEOF
10305 /* confdefs.h.  */
10306 _ACEOF
10307 cat confdefs.h >>conftest.$ac_ext
10308 cat >>conftest.$ac_ext <<_ACEOF
10309 /* end confdefs.h.  */
10310 #include <$ac_header>
10311 _ACEOF
10312 if { (ac_try="$ac_cpp conftest.$ac_ext"
10313 case "(($ac_try" in
10314   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10315   *) ac_try_echo=$ac_try;;
10316 esac
10317 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10318   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10319   ac_status=$?
10320   grep -v '^ *+' conftest.er1 >conftest.err
10321   rm -f conftest.er1
10322   cat conftest.err >&5
10323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10324   (exit $ac_status); } >/dev/null && {
10325          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10326          test ! -s conftest.err
10327        }; then
10328   ac_header_preproc=yes
10329 else
10330   echo "$as_me: failed program was:" >&5
10331 sed 's/^/| /' conftest.$ac_ext >&5
10332
10333   ac_header_preproc=no
10334 fi
10335
10336 rm -f conftest.err conftest.$ac_ext
10337 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10338 echo "${ECHO_T}$ac_header_preproc" >&6; }
10339
10340 # So?  What about this header?
10341 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10342   yes:no: )
10343     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10344 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10345     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10346 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10347     ac_header_preproc=yes
10348     ;;
10349   no:yes:* )
10350     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10351 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10352     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10353 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10354     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10355 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10356     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10357 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10358     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10359 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10360     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10361 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10362     ( cat <<\_ASBOX
10363 ## ---------------------------------------- ##
10364 ## Report this to pgsql-bugs@postgresql.org ##
10365 ## ---------------------------------------- ##
10366 _ASBOX
10367      ) | sed "s/^/$as_me: WARNING:     /" >&2
10368     ;;
10369 esac
10370 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10371 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10372 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10373   echo $ECHO_N "(cached) $ECHO_C" >&6
10374 else
10375   eval "$as_ac_Header=\$ac_header_preproc"
10376 fi
10377 ac_res=`eval echo '${'$as_ac_Header'}'`
10378                { echo "$as_me:$LINENO: result: $ac_res" >&5
10379 echo "${ECHO_T}$ac_res" >&6; }
10380
10381 fi
10382 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10383   cat >>confdefs.h <<_ACEOF
10384 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10385 _ACEOF
10386
10387 else
10388   { { echo "$as_me:$LINENO: error: history header not found
10389 If you have readline already installed, see config.log for details on the
10390 failure.  It is possible the compiler isn't looking in the proper directory.
10391 Use --without-readline to disable readline support." >&5
10392 echo "$as_me: error: history header not found
10393 If you have readline already installed, see config.log for details on the
10394 failure.  It is possible the compiler isn't looking in the proper directory.
10395 Use --without-readline to disable readline support." >&2;}
10396    { (exit 1); exit 1; }; }
10397 fi
10398
10399 done
10400
10401 fi
10402
10403 done
10404
10405 fi
10406
10407 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
10408 # Some installations of libedit usurp /usr/include/readline/, which seems
10409 # bad practice, since in combined installations readline will have its headers
10410 # there.  We might have to resort to AC_EGREP checks to make sure we found
10411 # the proper header...
10412
10413 for ac_header in editline/readline.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 readline.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
10697 for ac_header in readline/readline.h
10698 do
10699 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10700 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10701   { echo "$as_me:$LINENO: checking for $ac_header" >&5
10702 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10703 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10704   echo $ECHO_N "(cached) $ECHO_C" >&6
10705 fi
10706 ac_res=`eval echo '${'$as_ac_Header'}'`
10707                { echo "$as_me:$LINENO: result: $ac_res" >&5
10708 echo "${ECHO_T}$ac_res" >&6; }
10709 else
10710   # Is the header compilable?
10711 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
10712 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
10713 cat >conftest.$ac_ext <<_ACEOF
10714 /* confdefs.h.  */
10715 _ACEOF
10716 cat confdefs.h >>conftest.$ac_ext
10717 cat >>conftest.$ac_ext <<_ACEOF
10718 /* end confdefs.h.  */
10719 $ac_includes_default
10720 #include <$ac_header>
10721 _ACEOF
10722 rm -f conftest.$ac_objext
10723 if { (ac_try="$ac_compile"
10724 case "(($ac_try" in
10725   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10726   *) ac_try_echo=$ac_try;;
10727 esac
10728 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10729   (eval "$ac_compile") 2>conftest.er1
10730   ac_status=$?
10731   grep -v '^ *+' conftest.er1 >conftest.err
10732   rm -f conftest.er1
10733   cat conftest.err >&5
10734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10735   (exit $ac_status); } && {
10736          test -z "$ac_c_werror_flag" ||
10737          test ! -s conftest.err
10738        } && test -s conftest.$ac_objext; then
10739   ac_header_compiler=yes
10740 else
10741   echo "$as_me: failed program was:" >&5
10742 sed 's/^/| /' conftest.$ac_ext >&5
10743
10744         ac_header_compiler=no
10745 fi
10746
10747 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10748 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10749 echo "${ECHO_T}$ac_header_compiler" >&6; }
10750
10751 # Is the header present?
10752 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
10753 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10754 cat >conftest.$ac_ext <<_ACEOF
10755 /* confdefs.h.  */
10756 _ACEOF
10757 cat confdefs.h >>conftest.$ac_ext
10758 cat >>conftest.$ac_ext <<_ACEOF
10759 /* end confdefs.h.  */
10760 #include <$ac_header>
10761 _ACEOF
10762 if { (ac_try="$ac_cpp conftest.$ac_ext"
10763 case "(($ac_try" in
10764   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10765   *) ac_try_echo=$ac_try;;
10766 esac
10767 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10768   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10769   ac_status=$?
10770   grep -v '^ *+' conftest.er1 >conftest.err
10771   rm -f conftest.er1
10772   cat conftest.err >&5
10773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10774   (exit $ac_status); } >/dev/null && {
10775          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10776          test ! -s conftest.err
10777        }; then
10778   ac_header_preproc=yes
10779 else
10780   echo "$as_me: failed program was:" >&5
10781 sed 's/^/| /' conftest.$ac_ext >&5
10782
10783   ac_header_preproc=no
10784 fi
10785
10786 rm -f conftest.err conftest.$ac_ext
10787 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10788 echo "${ECHO_T}$ac_header_preproc" >&6; }
10789
10790 # So?  What about this header?
10791 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10792   yes:no: )
10793     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10794 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10795     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10796 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10797     ac_header_preproc=yes
10798     ;;
10799   no:yes:* )
10800     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10801 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10802     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10803 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10804     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10805 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10806     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10807 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10808     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10809 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10810     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10811 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10812     ( cat <<\_ASBOX
10813 ## ---------------------------------------- ##
10814 ## Report this to pgsql-bugs@postgresql.org ##
10815 ## ---------------------------------------- ##
10816 _ASBOX
10817      ) | sed "s/^/$as_me: WARNING:     /" >&2
10818     ;;
10819 esac
10820 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10821 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10822 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10823   echo $ECHO_N "(cached) $ECHO_C" >&6
10824 else
10825   eval "$as_ac_Header=\$ac_header_preproc"
10826 fi
10827 ac_res=`eval echo '${'$as_ac_Header'}'`
10828                { echo "$as_me:$LINENO: result: $ac_res" >&5
10829 echo "${ECHO_T}$ac_res" >&6; }
10830
10831 fi
10832 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10833   cat >>confdefs.h <<_ACEOF
10834 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10835 _ACEOF
10836
10837 else
10838   { { echo "$as_me:$LINENO: error: readline header not found
10839 If you have libedit already installed, see config.log for details on the
10840 failure.  It is possible the compiler isn't looking in the proper directory.
10841 Use --without-readline to disable libedit support." >&5
10842 echo "$as_me: error: readline header not found
10843 If you have libedit already installed, see config.log for details on the
10844 failure.  It is possible the compiler isn't looking in the proper directory.
10845 Use --without-readline to disable libedit support." >&2;}
10846    { (exit 1); exit 1; }; }
10847 fi
10848
10849 done
10850
10851 fi
10852
10853 done
10854
10855 fi
10856
10857 done
10858
10859 # Note: in a libedit installation, history.h is sometimes a dummy, and may
10860 # not be there at all.  Hence, don't complain if not found.  We must check
10861 # though, since in yet other versions it is an independent header.
10862
10863 for ac_header in editline/history.h
10864 do
10865 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10866 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10867   { echo "$as_me:$LINENO: checking for $ac_header" >&5
10868 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10869 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10870   echo $ECHO_N "(cached) $ECHO_C" >&6
10871 fi
10872 ac_res=`eval echo '${'$as_ac_Header'}'`
10873                { echo "$as_me:$LINENO: result: $ac_res" >&5
10874 echo "${ECHO_T}$ac_res" >&6; }
10875 else
10876   # Is the header compilable?
10877 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
10878 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
10879 cat >conftest.$ac_ext <<_ACEOF
10880 /* confdefs.h.  */
10881 _ACEOF
10882 cat confdefs.h >>conftest.$ac_ext
10883 cat >>conftest.$ac_ext <<_ACEOF
10884 /* end confdefs.h.  */
10885 $ac_includes_default
10886 #include <$ac_header>
10887 _ACEOF
10888 rm -f conftest.$ac_objext
10889 if { (ac_try="$ac_compile"
10890 case "(($ac_try" in
10891   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10892   *) ac_try_echo=$ac_try;;
10893 esac
10894 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10895   (eval "$ac_compile") 2>conftest.er1
10896   ac_status=$?
10897   grep -v '^ *+' conftest.er1 >conftest.err
10898   rm -f conftest.er1
10899   cat conftest.err >&5
10900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10901   (exit $ac_status); } && {
10902          test -z "$ac_c_werror_flag" ||
10903          test ! -s conftest.err
10904        } && test -s conftest.$ac_objext; then
10905   ac_header_compiler=yes
10906 else
10907   echo "$as_me: failed program was:" >&5
10908 sed 's/^/| /' conftest.$ac_ext >&5
10909
10910         ac_header_compiler=no
10911 fi
10912
10913 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10914 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10915 echo "${ECHO_T}$ac_header_compiler" >&6; }
10916
10917 # Is the header present?
10918 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
10919 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10920 cat >conftest.$ac_ext <<_ACEOF
10921 /* confdefs.h.  */
10922 _ACEOF
10923 cat confdefs.h >>conftest.$ac_ext
10924 cat >>conftest.$ac_ext <<_ACEOF
10925 /* end confdefs.h.  */
10926 #include <$ac_header>
10927 _ACEOF
10928 if { (ac_try="$ac_cpp conftest.$ac_ext"
10929 case "(($ac_try" in
10930   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10931   *) ac_try_echo=$ac_try;;
10932 esac
10933 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10934   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10935   ac_status=$?
10936   grep -v '^ *+' conftest.er1 >conftest.err
10937   rm -f conftest.er1
10938   cat conftest.err >&5
10939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10940   (exit $ac_status); } >/dev/null && {
10941          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10942          test ! -s conftest.err
10943        }; then
10944   ac_header_preproc=yes
10945 else
10946   echo "$as_me: failed program was:" >&5
10947 sed 's/^/| /' conftest.$ac_ext >&5
10948
10949   ac_header_preproc=no
10950 fi
10951
10952 rm -f conftest.err conftest.$ac_ext
10953 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10954 echo "${ECHO_T}$ac_header_preproc" >&6; }
10955
10956 # So?  What about this header?
10957 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10958   yes:no: )
10959     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10960 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10961     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10962 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10963     ac_header_preproc=yes
10964     ;;
10965   no:yes:* )
10966     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10967 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10968     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10969 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10970     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10971 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10972     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10973 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10974     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10975 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10976     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10977 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10978     ( cat <<\_ASBOX
10979 ## ---------------------------------------- ##
10980 ## Report this to pgsql-bugs@postgresql.org ##
10981 ## ---------------------------------------- ##
10982 _ASBOX
10983      ) | sed "s/^/$as_me: WARNING:     /" >&2
10984     ;;
10985 esac
10986 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10987 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10988 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10989   echo $ECHO_N "(cached) $ECHO_C" >&6
10990 else
10991   eval "$as_ac_Header=\$ac_header_preproc"
10992 fi
10993 ac_res=`eval echo '${'$as_ac_Header'}'`
10994                { echo "$as_me:$LINENO: result: $ac_res" >&5
10995 echo "${ECHO_T}$ac_res" >&6; }
10996
10997 fi
10998 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10999   cat >>confdefs.h <<_ACEOF
11000 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11001 _ACEOF
11002
11003 else
11004
11005 for ac_header in history.h
11006 do
11007 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11008 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11009   { echo "$as_me:$LINENO: checking for $ac_header" >&5
11010 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11011 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11012   echo $ECHO_N "(cached) $ECHO_C" >&6
11013 fi
11014 ac_res=`eval echo '${'$as_ac_Header'}'`
11015                { echo "$as_me:$LINENO: result: $ac_res" >&5
11016 echo "${ECHO_T}$ac_res" >&6; }
11017 else
11018   # Is the header compilable?
11019 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
11020 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
11021 cat >conftest.$ac_ext <<_ACEOF
11022 /* confdefs.h.  */
11023 _ACEOF
11024 cat confdefs.h >>conftest.$ac_ext
11025 cat >>conftest.$ac_ext <<_ACEOF
11026 /* end confdefs.h.  */
11027 $ac_includes_default
11028 #include <$ac_header>
11029 _ACEOF
11030 rm -f conftest.$ac_objext
11031 if { (ac_try="$ac_compile"
11032 case "(($ac_try" in
11033   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11034   *) ac_try_echo=$ac_try;;
11035 esac
11036 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11037   (eval "$ac_compile") 2>conftest.er1
11038   ac_status=$?
11039   grep -v '^ *+' conftest.er1 >conftest.err
11040   rm -f conftest.er1
11041   cat conftest.err >&5
11042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11043   (exit $ac_status); } && {
11044          test -z "$ac_c_werror_flag" ||
11045          test ! -s conftest.err
11046        } && test -s conftest.$ac_objext; then
11047   ac_header_compiler=yes
11048 else
11049   echo "$as_me: failed program was:" >&5
11050 sed 's/^/| /' conftest.$ac_ext >&5
11051
11052         ac_header_compiler=no
11053 fi
11054
11055 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11056 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11057 echo "${ECHO_T}$ac_header_compiler" >&6; }
11058
11059 # Is the header present?
11060 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
11061 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
11062 cat >conftest.$ac_ext <<_ACEOF
11063 /* confdefs.h.  */
11064 _ACEOF
11065 cat confdefs.h >>conftest.$ac_ext
11066 cat >>conftest.$ac_ext <<_ACEOF
11067 /* end confdefs.h.  */
11068 #include <$ac_header>
11069 _ACEOF
11070 if { (ac_try="$ac_cpp conftest.$ac_ext"
11071 case "(($ac_try" in
11072   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11073   *) ac_try_echo=$ac_try;;
11074 esac
11075 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11076   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11077   ac_status=$?
11078   grep -v '^ *+' conftest.er1 >conftest.err
11079   rm -f conftest.er1
11080   cat conftest.err >&5
11081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11082   (exit $ac_status); } >/dev/null && {
11083          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11084          test ! -s conftest.err
11085        }; then
11086   ac_header_preproc=yes
11087 else
11088   echo "$as_me: failed program was:" >&5
11089 sed 's/^/| /' conftest.$ac_ext >&5
11090
11091   ac_header_preproc=no
11092 fi
11093
11094 rm -f conftest.err conftest.$ac_ext
11095 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11096 echo "${ECHO_T}$ac_header_preproc" >&6; }
11097
11098 # So?  What about this header?
11099 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11100   yes:no: )
11101     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11102 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11103     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11104 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11105     ac_header_preproc=yes
11106     ;;
11107   no:yes:* )
11108     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11109 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11110     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11111 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11112     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11113 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11114     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11115 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11116     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11117 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11118     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11119 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11120     ( cat <<\_ASBOX
11121 ## ---------------------------------------- ##
11122 ## Report this to pgsql-bugs@postgresql.org ##
11123 ## ---------------------------------------- ##
11124 _ASBOX
11125      ) | sed "s/^/$as_me: WARNING:     /" >&2
11126     ;;
11127 esac
11128 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11129 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11130 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11131   echo $ECHO_N "(cached) $ECHO_C" >&6
11132 else
11133   eval "$as_ac_Header=\$ac_header_preproc"
11134 fi
11135 ac_res=`eval echo '${'$as_ac_Header'}'`
11136                { echo "$as_me:$LINENO: result: $ac_res" >&5
11137 echo "${ECHO_T}$ac_res" >&6; }
11138
11139 fi
11140 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11141   cat >>confdefs.h <<_ACEOF
11142 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11143 _ACEOF
11144
11145 else
11146
11147 for ac_header in readline/history.h
11148 do
11149 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11150 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11151   { echo "$as_me:$LINENO: checking for $ac_header" >&5
11152 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11153 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11154   echo $ECHO_N "(cached) $ECHO_C" >&6
11155 fi
11156 ac_res=`eval echo '${'$as_ac_Header'}'`
11157                { echo "$as_me:$LINENO: result: $ac_res" >&5
11158 echo "${ECHO_T}$ac_res" >&6; }
11159 else
11160   # Is the header compilable?
11161 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
11162 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
11163 cat >conftest.$ac_ext <<_ACEOF
11164 /* confdefs.h.  */
11165 _ACEOF
11166 cat confdefs.h >>conftest.$ac_ext
11167 cat >>conftest.$ac_ext <<_ACEOF
11168 /* end confdefs.h.  */
11169 $ac_includes_default
11170 #include <$ac_header>
11171 _ACEOF
11172 rm -f conftest.$ac_objext
11173 if { (ac_try="$ac_compile"
11174 case "(($ac_try" in
11175   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11176   *) ac_try_echo=$ac_try;;
11177 esac
11178 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11179   (eval "$ac_compile") 2>conftest.er1
11180   ac_status=$?
11181   grep -v '^ *+' conftest.er1 >conftest.err
11182   rm -f conftest.er1
11183   cat conftest.err >&5
11184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11185   (exit $ac_status); } && {
11186          test -z "$ac_c_werror_flag" ||
11187          test ! -s conftest.err
11188        } && test -s conftest.$ac_objext; then
11189   ac_header_compiler=yes
11190 else
11191   echo "$as_me: failed program was:" >&5
11192 sed 's/^/| /' conftest.$ac_ext >&5
11193
11194         ac_header_compiler=no
11195 fi
11196
11197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11198 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11199 echo "${ECHO_T}$ac_header_compiler" >&6; }
11200
11201 # Is the header present?
11202 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
11203 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
11204 cat >conftest.$ac_ext <<_ACEOF
11205 /* confdefs.h.  */
11206 _ACEOF
11207 cat confdefs.h >>conftest.$ac_ext
11208 cat >>conftest.$ac_ext <<_ACEOF
11209 /* end confdefs.h.  */
11210 #include <$ac_header>
11211 _ACEOF
11212 if { (ac_try="$ac_cpp conftest.$ac_ext"
11213 case "(($ac_try" in
11214   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11215   *) ac_try_echo=$ac_try;;
11216 esac
11217 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11218   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11219   ac_status=$?
11220   grep -v '^ *+' conftest.er1 >conftest.err
11221   rm -f conftest.er1
11222   cat conftest.err >&5
11223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11224   (exit $ac_status); } >/dev/null && {
11225          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11226          test ! -s conftest.err
11227        }; then
11228   ac_header_preproc=yes
11229 else
11230   echo "$as_me: failed program was:" >&5
11231 sed 's/^/| /' conftest.$ac_ext >&5
11232
11233   ac_header_preproc=no
11234 fi
11235
11236 rm -f conftest.err conftest.$ac_ext
11237 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11238 echo "${ECHO_T}$ac_header_preproc" >&6; }
11239
11240 # So?  What about this header?
11241 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11242   yes:no: )
11243     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11244 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11245     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11246 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11247     ac_header_preproc=yes
11248     ;;
11249   no:yes:* )
11250     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11251 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11252     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11253 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11254     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11255 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11256     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11257 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11258     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11259 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11260     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11261 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11262     ( cat <<\_ASBOX
11263 ## ---------------------------------------- ##
11264 ## Report this to pgsql-bugs@postgresql.org ##
11265 ## ---------------------------------------- ##
11266 _ASBOX
11267      ) | sed "s/^/$as_me: WARNING:     /" >&2
11268     ;;
11269 esac
11270 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11271 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11272 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11273   echo $ECHO_N "(cached) $ECHO_C" >&6
11274 else
11275   eval "$as_ac_Header=\$ac_header_preproc"
11276 fi
11277 ac_res=`eval echo '${'$as_ac_Header'}'`
11278                { echo "$as_me:$LINENO: result: $ac_res" >&5
11279 echo "${ECHO_T}$ac_res" >&6; }
11280
11281 fi
11282 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11283   cat >>confdefs.h <<_ACEOF
11284 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11285 _ACEOF
11286
11287 fi
11288
11289 done
11290
11291 fi
11292
11293 done
11294
11295 fi
11296
11297 done
11298
11299 fi
11300
11301 if test "$with_zlib" = yes; then
11302   if test "${ac_cv_header_zlib_h+set}" = set; then
11303   { echo "$as_me:$LINENO: checking for zlib.h" >&5
11304 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; }
11305 if test "${ac_cv_header_zlib_h+set}" = set; then
11306   echo $ECHO_N "(cached) $ECHO_C" >&6
11307 fi
11308 { echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
11309 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }
11310 else
11311   # Is the header compilable?
11312 { echo "$as_me:$LINENO: checking zlib.h usability" >&5
11313 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; }
11314 cat >conftest.$ac_ext <<_ACEOF
11315 /* confdefs.h.  */
11316 _ACEOF
11317 cat confdefs.h >>conftest.$ac_ext
11318 cat >>conftest.$ac_ext <<_ACEOF
11319 /* end confdefs.h.  */
11320 $ac_includes_default
11321 #include <zlib.h>
11322 _ACEOF
11323 rm -f conftest.$ac_objext
11324 if { (ac_try="$ac_compile"
11325 case "(($ac_try" in
11326   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11327   *) ac_try_echo=$ac_try;;
11328 esac
11329 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11330   (eval "$ac_compile") 2>conftest.er1
11331   ac_status=$?
11332   grep -v '^ *+' conftest.er1 >conftest.err
11333   rm -f conftest.er1
11334   cat conftest.err >&5
11335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11336   (exit $ac_status); } && {
11337          test -z "$ac_c_werror_flag" ||
11338          test ! -s conftest.err
11339        } && test -s conftest.$ac_objext; then
11340   ac_header_compiler=yes
11341 else
11342   echo "$as_me: failed program was:" >&5
11343 sed 's/^/| /' conftest.$ac_ext >&5
11344
11345         ac_header_compiler=no
11346 fi
11347
11348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11349 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11350 echo "${ECHO_T}$ac_header_compiler" >&6; }
11351
11352 # Is the header present?
11353 { echo "$as_me:$LINENO: checking zlib.h presence" >&5
11354 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; }
11355 cat >conftest.$ac_ext <<_ACEOF
11356 /* confdefs.h.  */
11357 _ACEOF
11358 cat confdefs.h >>conftest.$ac_ext
11359 cat >>conftest.$ac_ext <<_ACEOF
11360 /* end confdefs.h.  */
11361 #include <zlib.h>
11362 _ACEOF
11363 if { (ac_try="$ac_cpp conftest.$ac_ext"
11364 case "(($ac_try" in
11365   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11366   *) ac_try_echo=$ac_try;;
11367 esac
11368 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11369   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11370   ac_status=$?
11371   grep -v '^ *+' conftest.er1 >conftest.err
11372   rm -f conftest.er1
11373   cat conftest.err >&5
11374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11375   (exit $ac_status); } >/dev/null && {
11376          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11377          test ! -s conftest.err
11378        }; then
11379   ac_header_preproc=yes
11380 else
11381   echo "$as_me: failed program was:" >&5
11382 sed 's/^/| /' conftest.$ac_ext >&5
11383
11384   ac_header_preproc=no
11385 fi
11386
11387 rm -f conftest.err conftest.$ac_ext
11388 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11389 echo "${ECHO_T}$ac_header_preproc" >&6; }
11390
11391 # So?  What about this header?
11392 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11393   yes:no: )
11394     { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
11395 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11396     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
11397 echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
11398     ac_header_preproc=yes
11399     ;;
11400   no:yes:* )
11401     { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
11402 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
11403     { echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
11404 echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
11405     { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
11406 echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
11407     { echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
11408 echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
11409     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
11410 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
11411     { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
11412 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
11413     ( cat <<\_ASBOX
11414 ## ---------------------------------------- ##
11415 ## Report this to pgsql-bugs@postgresql.org ##
11416 ## ---------------------------------------- ##
11417 _ASBOX
11418      ) | sed "s/^/$as_me: WARNING:     /" >&2
11419     ;;
11420 esac
11421 { echo "$as_me:$LINENO: checking for zlib.h" >&5
11422 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; }
11423 if test "${ac_cv_header_zlib_h+set}" = set; then
11424   echo $ECHO_N "(cached) $ECHO_C" >&6
11425 else
11426   ac_cv_header_zlib_h=$ac_header_preproc
11427 fi
11428 { echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
11429 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }
11430
11431 fi
11432 if test $ac_cv_header_zlib_h = yes; then
11433   :
11434 else
11435   { { echo "$as_me:$LINENO: error: zlib header not found
11436 If you have zlib already installed, see config.log for details on the
11437 failure.  It is possible the compiler isn't looking in the proper directory.
11438 Use --without-zlib to disable zlib support." >&5
11439 echo "$as_me: error: zlib header not found
11440 If you have zlib already installed, see config.log for details on the
11441 failure.  It is possible the compiler isn't looking in the proper directory.
11442 Use --without-zlib to disable zlib support." >&2;}
11443    { (exit 1); exit 1; }; }
11444 fi
11445
11446
11447 fi
11448
11449 if test "$with_gssapi" = yes ; then
11450
11451 for ac_header in gssapi/gssapi.h
11452 do
11453 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11454 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11455   { echo "$as_me:$LINENO: checking for $ac_header" >&5
11456 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11457 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11458   echo $ECHO_N "(cached) $ECHO_C" >&6
11459 fi
11460 ac_res=`eval echo '${'$as_ac_Header'}'`
11461                { echo "$as_me:$LINENO: result: $ac_res" >&5
11462 echo "${ECHO_T}$ac_res" >&6; }
11463 else
11464   # Is the header compilable?
11465 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
11466 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
11467 cat >conftest.$ac_ext <<_ACEOF
11468 /* confdefs.h.  */
11469 _ACEOF
11470 cat confdefs.h >>conftest.$ac_ext
11471 cat >>conftest.$ac_ext <<_ACEOF
11472 /* end confdefs.h.  */
11473 $ac_includes_default
11474 #include <$ac_header>
11475 _ACEOF
11476 rm -f conftest.$ac_objext
11477 if { (ac_try="$ac_compile"
11478 case "(($ac_try" in
11479   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11480   *) ac_try_echo=$ac_try;;
11481 esac
11482 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11483   (eval "$ac_compile") 2>conftest.er1
11484   ac_status=$?
11485   grep -v '^ *+' conftest.er1 >conftest.err
11486   rm -f conftest.er1
11487   cat conftest.err >&5
11488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11489   (exit $ac_status); } && {
11490          test -z "$ac_c_werror_flag" ||
11491          test ! -s conftest.err
11492        } && test -s conftest.$ac_objext; then
11493   ac_header_compiler=yes
11494 else
11495   echo "$as_me: failed program was:" >&5
11496 sed 's/^/| /' conftest.$ac_ext >&5
11497
11498         ac_header_compiler=no
11499 fi
11500
11501 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11502 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11503 echo "${ECHO_T}$ac_header_compiler" >&6; }
11504
11505 # Is the header present?
11506 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
11507 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
11508 cat >conftest.$ac_ext <<_ACEOF
11509 /* confdefs.h.  */
11510 _ACEOF
11511 cat confdefs.h >>conftest.$ac_ext
11512 cat >>conftest.$ac_ext <<_ACEOF
11513 /* end confdefs.h.  */
11514 #include <$ac_header>
11515 _ACEOF
11516 if { (ac_try="$ac_cpp conftest.$ac_ext"
11517 case "(($ac_try" in
11518   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11519   *) ac_try_echo=$ac_try;;
11520 esac
11521 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11522   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11523   ac_status=$?
11524   grep -v '^ *+' conftest.er1 >conftest.err
11525   rm -f conftest.er1
11526   cat conftest.err >&5
11527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11528   (exit $ac_status); } >/dev/null && {
11529          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11530          test ! -s conftest.err
11531        }; then
11532   ac_header_preproc=yes
11533 else
11534   echo "$as_me: failed program was:" >&5
11535 sed 's/^/| /' conftest.$ac_ext >&5
11536
11537   ac_header_preproc=no
11538 fi
11539
11540 rm -f conftest.err conftest.$ac_ext
11541 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11542 echo "${ECHO_T}$ac_header_preproc" >&6; }
11543
11544 # So?  What about this header?
11545 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11546   yes:no: )
11547     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11548 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11549     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11550 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11551     ac_header_preproc=yes
11552     ;;
11553   no:yes:* )
11554     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11555 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11556     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11557 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11558     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11559 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11560     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11561 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11562     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11563 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11564     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11565 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11566     ( cat <<\_ASBOX
11567 ## ---------------------------------------- ##
11568 ## Report this to pgsql-bugs@postgresql.org ##
11569 ## ---------------------------------------- ##
11570 _ASBOX
11571      ) | sed "s/^/$as_me: WARNING:     /" >&2
11572     ;;
11573 esac
11574 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11575 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11576 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11577   echo $ECHO_N "(cached) $ECHO_C" >&6
11578 else
11579   eval "$as_ac_Header=\$ac_header_preproc"
11580 fi
11581 ac_res=`eval echo '${'$as_ac_Header'}'`
11582                { echo "$as_me:$LINENO: result: $ac_res" >&5
11583 echo "${ECHO_T}$ac_res" >&6; }
11584
11585 fi
11586 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11587   cat >>confdefs.h <<_ACEOF
11588 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11589 _ACEOF
11590
11591 else
11592
11593 for ac_header in gssapi.h
11594 do
11595 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11596 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11597   { echo "$as_me:$LINENO: checking for $ac_header" >&5
11598 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11599 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11600   echo $ECHO_N "(cached) $ECHO_C" >&6
11601 fi
11602 ac_res=`eval echo '${'$as_ac_Header'}'`
11603                { echo "$as_me:$LINENO: result: $ac_res" >&5
11604 echo "${ECHO_T}$ac_res" >&6; }
11605 else
11606   # Is the header compilable?
11607 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
11608 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
11609 cat >conftest.$ac_ext <<_ACEOF
11610 /* confdefs.h.  */
11611 _ACEOF
11612 cat confdefs.h >>conftest.$ac_ext
11613 cat >>conftest.$ac_ext <<_ACEOF
11614 /* end confdefs.h.  */
11615 $ac_includes_default
11616 #include <$ac_header>
11617 _ACEOF
11618 rm -f conftest.$ac_objext
11619 if { (ac_try="$ac_compile"
11620 case "(($ac_try" in
11621   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11622   *) ac_try_echo=$ac_try;;
11623 esac
11624 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11625   (eval "$ac_compile") 2>conftest.er1
11626   ac_status=$?
11627   grep -v '^ *+' conftest.er1 >conftest.err
11628   rm -f conftest.er1
11629   cat conftest.err >&5
11630   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11631   (exit $ac_status); } && {
11632          test -z "$ac_c_werror_flag" ||
11633          test ! -s conftest.err
11634        } && test -s conftest.$ac_objext; then
11635   ac_header_compiler=yes
11636 else
11637   echo "$as_me: failed program was:" >&5
11638 sed 's/^/| /' conftest.$ac_ext >&5
11639
11640         ac_header_compiler=no
11641 fi
11642
11643 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11644 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11645 echo "${ECHO_T}$ac_header_compiler" >&6; }
11646
11647 # Is the header present?
11648 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
11649 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
11650 cat >conftest.$ac_ext <<_ACEOF
11651 /* confdefs.h.  */
11652 _ACEOF
11653 cat confdefs.h >>conftest.$ac_ext
11654 cat >>conftest.$ac_ext <<_ACEOF
11655 /* end confdefs.h.  */
11656 #include <$ac_header>
11657 _ACEOF
11658 if { (ac_try="$ac_cpp conftest.$ac_ext"
11659 case "(($ac_try" in
11660   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11661   *) ac_try_echo=$ac_try;;
11662 esac
11663 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11664   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11665   ac_status=$?
11666   grep -v '^ *+' conftest.er1 >conftest.err
11667   rm -f conftest.er1
11668   cat conftest.err >&5
11669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11670   (exit $ac_status); } >/dev/null && {
11671          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11672          test ! -s conftest.err
11673        }; then
11674   ac_header_preproc=yes
11675 else
11676   echo "$as_me: failed program was:" >&5
11677 sed 's/^/| /' conftest.$ac_ext >&5
11678
11679   ac_header_preproc=no
11680 fi
11681
11682 rm -f conftest.err conftest.$ac_ext
11683 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11684 echo "${ECHO_T}$ac_header_preproc" >&6; }
11685
11686 # So?  What about this header?
11687 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11688   yes:no: )
11689     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11690 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11691     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11692 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11693     ac_header_preproc=yes
11694     ;;
11695   no:yes:* )
11696     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11697 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11698     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11699 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11700     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11701 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11702     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11703 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11704     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11705 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11706     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11707 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11708     ( cat <<\_ASBOX
11709 ## ---------------------------------------- ##
11710 ## Report this to pgsql-bugs@postgresql.org ##
11711 ## ---------------------------------------- ##
11712 _ASBOX
11713      ) | sed "s/^/$as_me: WARNING:     /" >&2
11714     ;;
11715 esac
11716 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11717 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11718 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11719   echo $ECHO_N "(cached) $ECHO_C" >&6
11720 else
11721   eval "$as_ac_Header=\$ac_header_preproc"
11722 fi
11723 ac_res=`eval echo '${'$as_ac_Header'}'`
11724                { echo "$as_me:$LINENO: result: $ac_res" >&5
11725 echo "${ECHO_T}$ac_res" >&6; }
11726
11727 fi
11728 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11729   cat >>confdefs.h <<_ACEOF
11730 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11731 _ACEOF
11732
11733 else
11734   { { echo "$as_me:$LINENO: error: gssapi.h header file is required for GSSAPI" >&5
11735 echo "$as_me: error: gssapi.h header file is required for GSSAPI" >&2;}
11736    { (exit 1); exit 1; }; }
11737 fi
11738
11739 done
11740
11741 fi
11742
11743 done
11744
11745 fi
11746
11747 if test "$with_krb5" = yes ; then
11748   if test "${ac_cv_header_krb5_h+set}" = set; then
11749   { echo "$as_me:$LINENO: checking for krb5.h" >&5
11750 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6; }
11751 if test "${ac_cv_header_krb5_h+set}" = set; then
11752   echo $ECHO_N "(cached) $ECHO_C" >&6
11753 fi
11754 { echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
11755 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6; }
11756 else
11757   # Is the header compilable?
11758 { echo "$as_me:$LINENO: checking krb5.h usability" >&5
11759 echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6; }
11760 cat >conftest.$ac_ext <<_ACEOF
11761 /* confdefs.h.  */
11762 _ACEOF
11763 cat confdefs.h >>conftest.$ac_ext
11764 cat >>conftest.$ac_ext <<_ACEOF
11765 /* end confdefs.h.  */
11766 $ac_includes_default
11767 #include <krb5.h>
11768 _ACEOF
11769 rm -f conftest.$ac_objext
11770 if { (ac_try="$ac_compile"
11771 case "(($ac_try" in
11772   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11773   *) ac_try_echo=$ac_try;;
11774 esac
11775 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11776   (eval "$ac_compile") 2>conftest.er1
11777   ac_status=$?
11778   grep -v '^ *+' conftest.er1 >conftest.err
11779   rm -f conftest.er1
11780   cat conftest.err >&5
11781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11782   (exit $ac_status); } && {
11783          test -z "$ac_c_werror_flag" ||
11784          test ! -s conftest.err
11785        } && test -s conftest.$ac_objext; then
11786   ac_header_compiler=yes
11787 else
11788   echo "$as_me: failed program was:" >&5
11789 sed 's/^/| /' conftest.$ac_ext >&5
11790
11791         ac_header_compiler=no
11792 fi
11793
11794 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11795 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11796 echo "${ECHO_T}$ac_header_compiler" >&6; }
11797
11798 # Is the header present?
11799 { echo "$as_me:$LINENO: checking krb5.h presence" >&5
11800 echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6; }
11801 cat >conftest.$ac_ext <<_ACEOF
11802 /* confdefs.h.  */
11803 _ACEOF
11804 cat confdefs.h >>conftest.$ac_ext
11805 cat >>conftest.$ac_ext <<_ACEOF
11806 /* end confdefs.h.  */
11807 #include <krb5.h>
11808 _ACEOF
11809 if { (ac_try="$ac_cpp conftest.$ac_ext"
11810 case "(($ac_try" in
11811   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11812   *) ac_try_echo=$ac_try;;
11813 esac
11814 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11815   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11816   ac_status=$?
11817   grep -v '^ *+' conftest.er1 >conftest.err
11818   rm -f conftest.er1
11819   cat conftest.err >&5
11820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11821   (exit $ac_status); } >/dev/null && {
11822          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11823          test ! -s conftest.err
11824        }; then
11825   ac_header_preproc=yes
11826 else
11827   echo "$as_me: failed program was:" >&5
11828 sed 's/^/| /' conftest.$ac_ext >&5
11829
11830   ac_header_preproc=no
11831 fi
11832
11833 rm -f conftest.err conftest.$ac_ext
11834 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11835 echo "${ECHO_T}$ac_header_preproc" >&6; }
11836
11837 # So?  What about this header?
11838 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11839   yes:no: )
11840     { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
11841 echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11842     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the compiler's result" >&5
11843 echo "$as_me: WARNING: krb5.h: proceeding with the compiler's result" >&2;}
11844     ac_header_preproc=yes
11845     ;;
11846   no:yes:* )
11847     { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
11848 echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
11849     { echo "$as_me:$LINENO: WARNING: krb5.h:     check for missing prerequisite headers?" >&5
11850 echo "$as_me: WARNING: krb5.h:     check for missing prerequisite headers?" >&2;}
11851     { echo "$as_me:$LINENO: WARNING: krb5.h: see the Autoconf documentation" >&5
11852 echo "$as_me: WARNING: krb5.h: see the Autoconf documentation" >&2;}
11853     { echo "$as_me:$LINENO: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
11854 echo "$as_me: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
11855     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
11856 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
11857     { echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
11858 echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
11859     ( cat <<\_ASBOX
11860 ## ---------------------------------------- ##
11861 ## Report this to pgsql-bugs@postgresql.org ##
11862 ## ---------------------------------------- ##
11863 _ASBOX
11864      ) | sed "s/^/$as_me: WARNING:     /" >&2
11865     ;;
11866 esac
11867 { echo "$as_me:$LINENO: checking for krb5.h" >&5
11868 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6; }
11869 if test "${ac_cv_header_krb5_h+set}" = set; then
11870   echo $ECHO_N "(cached) $ECHO_C" >&6
11871 else
11872   ac_cv_header_krb5_h=$ac_header_preproc
11873 fi
11874 { echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
11875 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6; }
11876
11877 fi
11878 if test $ac_cv_header_krb5_h = yes; then
11879   :
11880 else
11881   { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
11882 echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
11883    { (exit 1); exit 1; }; }
11884 fi
11885
11886
11887 fi
11888
11889 if test "$with_openssl" = yes ; then
11890   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
11891   { echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
11892 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6; }
11893 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
11894   echo $ECHO_N "(cached) $ECHO_C" >&6
11895 fi
11896 { echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
11897 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6; }
11898 else
11899   # Is the header compilable?
11900 { echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
11901 echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6; }
11902 cat >conftest.$ac_ext <<_ACEOF
11903 /* confdefs.h.  */
11904 _ACEOF
11905 cat confdefs.h >>conftest.$ac_ext
11906 cat >>conftest.$ac_ext <<_ACEOF
11907 /* end confdefs.h.  */
11908 $ac_includes_default
11909 #include <openssl/ssl.h>
11910 _ACEOF
11911 rm -f conftest.$ac_objext
11912 if { (ac_try="$ac_compile"
11913 case "(($ac_try" in
11914   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11915   *) ac_try_echo=$ac_try;;
11916 esac
11917 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11918   (eval "$ac_compile") 2>conftest.er1
11919   ac_status=$?
11920   grep -v '^ *+' conftest.er1 >conftest.err
11921   rm -f conftest.er1
11922   cat conftest.err >&5
11923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11924   (exit $ac_status); } && {
11925          test -z "$ac_c_werror_flag" ||
11926          test ! -s conftest.err
11927        } && test -s conftest.$ac_objext; then
11928   ac_header_compiler=yes
11929 else
11930   echo "$as_me: failed program was:" >&5
11931 sed 's/^/| /' conftest.$ac_ext >&5
11932
11933         ac_header_compiler=no
11934 fi
11935
11936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11937 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11938 echo "${ECHO_T}$ac_header_compiler" >&6; }
11939
11940 # Is the header present?
11941 { echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
11942 echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6; }
11943 cat >conftest.$ac_ext <<_ACEOF
11944 /* confdefs.h.  */
11945 _ACEOF
11946 cat confdefs.h >>conftest.$ac_ext
11947 cat >>conftest.$ac_ext <<_ACEOF
11948 /* end confdefs.h.  */
11949 #include <openssl/ssl.h>
11950 _ACEOF
11951 if { (ac_try="$ac_cpp conftest.$ac_ext"
11952 case "(($ac_try" in
11953   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11954   *) ac_try_echo=$ac_try;;
11955 esac
11956 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11957   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11958   ac_status=$?
11959   grep -v '^ *+' conftest.er1 >conftest.err
11960   rm -f conftest.er1
11961   cat conftest.err >&5
11962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11963   (exit $ac_status); } >/dev/null && {
11964          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11965          test ! -s conftest.err
11966        }; then
11967   ac_header_preproc=yes
11968 else
11969   echo "$as_me: failed program was:" >&5
11970 sed 's/^/| /' conftest.$ac_ext >&5
11971
11972   ac_header_preproc=no
11973 fi
11974
11975 rm -f conftest.err conftest.$ac_ext
11976 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11977 echo "${ECHO_T}$ac_header_preproc" >&6; }
11978
11979 # So?  What about this header?
11980 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11981   yes:no: )
11982     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
11983 echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11984     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
11985 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
11986     ac_header_preproc=yes
11987     ;;
11988   no:yes:* )
11989     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
11990 echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
11991     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
11992 echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
11993     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
11994 echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
11995     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
11996 echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
11997     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
11998 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
11999     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
12000 echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
12001     ( cat <<\_ASBOX
12002 ## ---------------------------------------- ##
12003 ## Report this to pgsql-bugs@postgresql.org ##
12004 ## ---------------------------------------- ##
12005 _ASBOX
12006      ) | sed "s/^/$as_me: WARNING:     /" >&2
12007     ;;
12008 esac
12009 { echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
12010 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6; }
12011 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
12012   echo $ECHO_N "(cached) $ECHO_C" >&6
12013 else
12014   ac_cv_header_openssl_ssl_h=$ac_header_preproc
12015 fi
12016 { echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
12017 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6; }
12018
12019 fi
12020 if test $ac_cv_header_openssl_ssl_h = yes; then
12021   :
12022 else
12023   { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
12024 echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
12025    { (exit 1); exit 1; }; }
12026 fi
12027
12028
12029   if test "${ac_cv_header_openssl_err_h+set}" = set; then
12030   { echo "$as_me:$LINENO: checking for openssl/err.h" >&5
12031 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6; }
12032 if test "${ac_cv_header_openssl_err_h+set}" = set; then
12033   echo $ECHO_N "(cached) $ECHO_C" >&6
12034 fi
12035 { echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
12036 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6; }
12037 else
12038   # Is the header compilable?
12039 { echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
12040 echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6; }
12041 cat >conftest.$ac_ext <<_ACEOF
12042 /* confdefs.h.  */
12043 _ACEOF
12044 cat confdefs.h >>conftest.$ac_ext
12045 cat >>conftest.$ac_ext <<_ACEOF
12046 /* end confdefs.h.  */
12047 $ac_includes_default
12048 #include <openssl/err.h>
12049 _ACEOF
12050 rm -f conftest.$ac_objext
12051 if { (ac_try="$ac_compile"
12052 case "(($ac_try" in
12053   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12054   *) ac_try_echo=$ac_try;;
12055 esac
12056 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12057   (eval "$ac_compile") 2>conftest.er1
12058   ac_status=$?
12059   grep -v '^ *+' conftest.er1 >conftest.err
12060   rm -f conftest.er1
12061   cat conftest.err >&5
12062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12063   (exit $ac_status); } && {
12064          test -z "$ac_c_werror_flag" ||
12065          test ! -s conftest.err
12066        } && test -s conftest.$ac_objext; then
12067   ac_header_compiler=yes
12068 else
12069   echo "$as_me: failed program was:" >&5
12070 sed 's/^/| /' conftest.$ac_ext >&5
12071
12072         ac_header_compiler=no
12073 fi
12074
12075 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12076 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12077 echo "${ECHO_T}$ac_header_compiler" >&6; }
12078
12079 # Is the header present?
12080 { echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
12081 echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6; }
12082 cat >conftest.$ac_ext <<_ACEOF
12083 /* confdefs.h.  */
12084 _ACEOF
12085 cat confdefs.h >>conftest.$ac_ext
12086 cat >>conftest.$ac_ext <<_ACEOF
12087 /* end confdefs.h.  */
12088 #include <openssl/err.h>
12089 _ACEOF
12090 if { (ac_try="$ac_cpp conftest.$ac_ext"
12091 case "(($ac_try" in
12092   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12093   *) ac_try_echo=$ac_try;;
12094 esac
12095 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12096   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12097   ac_status=$?
12098   grep -v '^ *+' conftest.er1 >conftest.err
12099   rm -f conftest.er1
12100   cat conftest.err >&5
12101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12102   (exit $ac_status); } >/dev/null && {
12103          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12104          test ! -s conftest.err
12105        }; then
12106   ac_header_preproc=yes
12107 else
12108   echo "$as_me: failed program was:" >&5
12109 sed 's/^/| /' conftest.$ac_ext >&5
12110
12111   ac_header_preproc=no
12112 fi
12113
12114 rm -f conftest.err conftest.$ac_ext
12115 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12116 echo "${ECHO_T}$ac_header_preproc" >&6; }
12117
12118 # So?  What about this header?
12119 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12120   yes:no: )
12121     { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
12122 echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12123     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5
12124 echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;}
12125     ac_header_preproc=yes
12126     ;;
12127   no:yes:* )
12128     { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
12129 echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
12130     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&5
12131 echo "$as_me: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&2;}
12132     { echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5
12133 echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;}
12134     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&5
12135 echo "$as_me: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&2;}
12136     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
12137 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;}
12138     { echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5
12139 echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;}
12140     ( cat <<\_ASBOX
12141 ## ---------------------------------------- ##
12142 ## Report this to pgsql-bugs@postgresql.org ##
12143 ## ---------------------------------------- ##
12144 _ASBOX
12145      ) | sed "s/^/$as_me: WARNING:     /" >&2
12146     ;;
12147 esac
12148 { echo "$as_me:$LINENO: checking for openssl/err.h" >&5
12149 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6; }
12150 if test "${ac_cv_header_openssl_err_h+set}" = set; then
12151   echo $ECHO_N "(cached) $ECHO_C" >&6
12152 else
12153   ac_cv_header_openssl_err_h=$ac_header_preproc
12154 fi
12155 { echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
12156 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6; }
12157
12158 fi
12159 if test $ac_cv_header_openssl_err_h = yes; then
12160   :
12161 else
12162   { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
12163 echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
12164    { (exit 1); exit 1; }; }
12165 fi
12166
12167
12168
12169 for ac_func in ERR_set_mark
12170 do
12171 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12172 { echo "$as_me:$LINENO: checking for $ac_func" >&5
12173 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
12174 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
12175   echo $ECHO_N "(cached) $ECHO_C" >&6
12176 else
12177   cat >conftest.$ac_ext <<_ACEOF
12178 /* confdefs.h.  */
12179 _ACEOF
12180 cat confdefs.h >>conftest.$ac_ext
12181 cat >>conftest.$ac_ext <<_ACEOF
12182 /* end confdefs.h.  */
12183 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
12184    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
12185 #define $ac_func innocuous_$ac_func
12186
12187 /* System header to define __stub macros and hopefully few prototypes,
12188     which can conflict with char $ac_func (); below.
12189     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12190     <limits.h> exists even on freestanding compilers.  */
12191
12192 #ifdef __STDC__
12193 # include <limits.h>
12194 #else
12195 # include <assert.h>
12196 #endif
12197
12198 #undef $ac_func
12199
12200 /* Override any GCC internal prototype to avoid an error.
12201    Use char because int might match the return type of a GCC
12202    builtin and then its argument prototype would still apply.  */
12203 #ifdef __cplusplus
12204 extern "C"
12205 #endif
12206 char $ac_func ();
12207 /* The GNU C library defines this for functions which it implements
12208     to always fail with ENOSYS.  Some functions are actually named
12209     something starting with __ and the normal name is an alias.  */
12210 #if defined __stub_$ac_func || defined __stub___$ac_func
12211 choke me
12212 #endif
12213
12214 int
12215 main ()
12216 {
12217 return $ac_func ();
12218   ;
12219   return 0;
12220 }
12221 _ACEOF
12222 rm -f conftest.$ac_objext conftest$ac_exeext
12223 if { (ac_try="$ac_link"
12224 case "(($ac_try" in
12225   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12226   *) ac_try_echo=$ac_try;;
12227 esac
12228 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12229   (eval "$ac_link") 2>conftest.er1
12230   ac_status=$?
12231   grep -v '^ *+' conftest.er1 >conftest.err
12232   rm -f conftest.er1
12233   cat conftest.err >&5
12234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12235   (exit $ac_status); } && {
12236          test -z "$ac_c_werror_flag" ||
12237          test ! -s conftest.err
12238        } && test -s conftest$ac_exeext &&
12239        $as_test_x conftest$ac_exeext; then
12240   eval "$as_ac_var=yes"
12241 else
12242   echo "$as_me: failed program was:" >&5
12243 sed 's/^/| /' conftest.$ac_ext >&5
12244
12245         eval "$as_ac_var=no"
12246 fi
12247
12248 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12249       conftest$ac_exeext conftest.$ac_ext
12250 fi
12251 ac_res=`eval echo '${'$as_ac_var'}'`
12252                { echo "$as_me:$LINENO: result: $ac_res" >&5
12253 echo "${ECHO_T}$ac_res" >&6; }
12254 if test `eval echo '${'$as_ac_var'}'` = yes; then
12255   cat >>confdefs.h <<_ACEOF
12256 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12257 _ACEOF
12258
12259 fi
12260 done
12261
12262 fi
12263
12264 if test "$with_pam" = yes ; then
12265
12266 for ac_header in security/pam_appl.h
12267 do
12268 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12269 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12270   { echo "$as_me:$LINENO: checking for $ac_header" >&5
12271 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12272 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12273   echo $ECHO_N "(cached) $ECHO_C" >&6
12274 fi
12275 ac_res=`eval echo '${'$as_ac_Header'}'`
12276                { echo "$as_me:$LINENO: result: $ac_res" >&5
12277 echo "${ECHO_T}$ac_res" >&6; }
12278 else
12279   # Is the header compilable?
12280 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
12281 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
12282 cat >conftest.$ac_ext <<_ACEOF
12283 /* confdefs.h.  */
12284 _ACEOF
12285 cat confdefs.h >>conftest.$ac_ext
12286 cat >>conftest.$ac_ext <<_ACEOF
12287 /* end confdefs.h.  */
12288 $ac_includes_default
12289 #include <$ac_header>
12290 _ACEOF
12291 rm -f conftest.$ac_objext
12292 if { (ac_try="$ac_compile"
12293 case "(($ac_try" in
12294   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12295   *) ac_try_echo=$ac_try;;
12296 esac
12297 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12298   (eval "$ac_compile") 2>conftest.er1
12299   ac_status=$?
12300   grep -v '^ *+' conftest.er1 >conftest.err
12301   rm -f conftest.er1
12302   cat conftest.err >&5
12303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12304   (exit $ac_status); } && {
12305          test -z "$ac_c_werror_flag" ||
12306          test ! -s conftest.err
12307        } && test -s conftest.$ac_objext; then
12308   ac_header_compiler=yes
12309 else
12310   echo "$as_me: failed program was:" >&5
12311 sed 's/^/| /' conftest.$ac_ext >&5
12312
12313         ac_header_compiler=no
12314 fi
12315
12316 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12317 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12318 echo "${ECHO_T}$ac_header_compiler" >&6; }
12319
12320 # Is the header present?
12321 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
12322 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
12323 cat >conftest.$ac_ext <<_ACEOF
12324 /* confdefs.h.  */
12325 _ACEOF
12326 cat confdefs.h >>conftest.$ac_ext
12327 cat >>conftest.$ac_ext <<_ACEOF
12328 /* end confdefs.h.  */
12329 #include <$ac_header>
12330 _ACEOF
12331 if { (ac_try="$ac_cpp conftest.$ac_ext"
12332 case "(($ac_try" in
12333   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12334   *) ac_try_echo=$ac_try;;
12335 esac
12336 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12337   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12338   ac_status=$?
12339   grep -v '^ *+' conftest.er1 >conftest.err
12340   rm -f conftest.er1
12341   cat conftest.err >&5
12342   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12343   (exit $ac_status); } >/dev/null && {
12344          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12345          test ! -s conftest.err
12346        }; then
12347   ac_header_preproc=yes
12348 else
12349   echo "$as_me: failed program was:" >&5
12350 sed 's/^/| /' conftest.$ac_ext >&5
12351
12352   ac_header_preproc=no
12353 fi
12354
12355 rm -f conftest.err conftest.$ac_ext
12356 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12357 echo "${ECHO_T}$ac_header_preproc" >&6; }
12358
12359 # So?  What about this header?
12360 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12361   yes:no: )
12362     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12363 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12364     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12365 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12366     ac_header_preproc=yes
12367     ;;
12368   no:yes:* )
12369     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12370 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12371     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12372 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12373     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12374 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12375     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12376 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12377     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12378 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12379     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12380 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12381     ( cat <<\_ASBOX
12382 ## ---------------------------------------- ##
12383 ## Report this to pgsql-bugs@postgresql.org ##
12384 ## ---------------------------------------- ##
12385 _ASBOX
12386      ) | sed "s/^/$as_me: WARNING:     /" >&2
12387     ;;
12388 esac
12389 { echo "$as_me:$LINENO: checking for $ac_header" >&5
12390 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12391 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12392   echo $ECHO_N "(cached) $ECHO_C" >&6
12393 else
12394   eval "$as_ac_Header=\$ac_header_preproc"
12395 fi
12396 ac_res=`eval echo '${'$as_ac_Header'}'`
12397                { echo "$as_me:$LINENO: result: $ac_res" >&5
12398 echo "${ECHO_T}$ac_res" >&6; }
12399
12400 fi
12401 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12402   cat >>confdefs.h <<_ACEOF
12403 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12404 _ACEOF
12405
12406 else
12407
12408 for ac_header in pam/pam_appl.h
12409 do
12410 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12411 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12412   { echo "$as_me:$LINENO: checking for $ac_header" >&5
12413 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12414 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12415   echo $ECHO_N "(cached) $ECHO_C" >&6
12416 fi
12417 ac_res=`eval echo '${'$as_ac_Header'}'`
12418                { echo "$as_me:$LINENO: result: $ac_res" >&5
12419 echo "${ECHO_T}$ac_res" >&6; }
12420 else
12421   # Is the header compilable?
12422 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
12423 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
12424 cat >conftest.$ac_ext <<_ACEOF
12425 /* confdefs.h.  */
12426 _ACEOF
12427 cat confdefs.h >>conftest.$ac_ext
12428 cat >>conftest.$ac_ext <<_ACEOF
12429 /* end confdefs.h.  */
12430 $ac_includes_default
12431 #include <$ac_header>
12432 _ACEOF
12433 rm -f conftest.$ac_objext
12434 if { (ac_try="$ac_compile"
12435 case "(($ac_try" in
12436   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12437   *) ac_try_echo=$ac_try;;
12438 esac
12439 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12440   (eval "$ac_compile") 2>conftest.er1
12441   ac_status=$?
12442   grep -v '^ *+' conftest.er1 >conftest.err
12443   rm -f conftest.er1
12444   cat conftest.err >&5
12445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12446   (exit $ac_status); } && {
12447          test -z "$ac_c_werror_flag" ||
12448          test ! -s conftest.err
12449        } && test -s conftest.$ac_objext; then
12450   ac_header_compiler=yes
12451 else
12452   echo "$as_me: failed program was:" >&5
12453 sed 's/^/| /' conftest.$ac_ext >&5
12454
12455         ac_header_compiler=no
12456 fi
12457
12458 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12459 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12460 echo "${ECHO_T}$ac_header_compiler" >&6; }
12461
12462 # Is the header present?
12463 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
12464 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
12465 cat >conftest.$ac_ext <<_ACEOF
12466 /* confdefs.h.  */
12467 _ACEOF
12468 cat confdefs.h >>conftest.$ac_ext
12469 cat >>conftest.$ac_ext <<_ACEOF
12470 /* end confdefs.h.  */
12471 #include <$ac_header>
12472 _ACEOF
12473 if { (ac_try="$ac_cpp conftest.$ac_ext"
12474 case "(($ac_try" in
12475   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12476   *) ac_try_echo=$ac_try;;
12477 esac
12478 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12479   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12480   ac_status=$?
12481   grep -v '^ *+' conftest.er1 >conftest.err
12482   rm -f conftest.er1
12483   cat conftest.err >&5
12484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12485   (exit $ac_status); } >/dev/null && {
12486          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12487          test ! -s conftest.err
12488        }; then
12489   ac_header_preproc=yes
12490 else
12491   echo "$as_me: failed program was:" >&5
12492 sed 's/^/| /' conftest.$ac_ext >&5
12493
12494   ac_header_preproc=no
12495 fi
12496
12497 rm -f conftest.err conftest.$ac_ext
12498 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12499 echo "${ECHO_T}$ac_header_preproc" >&6; }
12500
12501 # So?  What about this header?
12502 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12503   yes:no: )
12504     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12505 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12506     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12507 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12508     ac_header_preproc=yes
12509     ;;
12510   no:yes:* )
12511     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12512 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12513     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12514 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12515     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12516 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12517     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12518 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12519     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12520 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12521     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12522 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12523     ( cat <<\_ASBOX
12524 ## ---------------------------------------- ##
12525 ## Report this to pgsql-bugs@postgresql.org ##
12526 ## ---------------------------------------- ##
12527 _ASBOX
12528      ) | sed "s/^/$as_me: WARNING:     /" >&2
12529     ;;
12530 esac
12531 { echo "$as_me:$LINENO: checking for $ac_header" >&5
12532 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12533 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12534   echo $ECHO_N "(cached) $ECHO_C" >&6
12535 else
12536   eval "$as_ac_Header=\$ac_header_preproc"
12537 fi
12538 ac_res=`eval echo '${'$as_ac_Header'}'`
12539                { echo "$as_me:$LINENO: result: $ac_res" >&5
12540 echo "${ECHO_T}$ac_res" >&6; }
12541
12542 fi
12543 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12544   cat >>confdefs.h <<_ACEOF
12545 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12546 _ACEOF
12547
12548 else
12549   { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
12550 echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
12551    { (exit 1); exit 1; }; }
12552 fi
12553
12554 done
12555
12556 fi
12557
12558 done
12559
12560 fi
12561
12562 if test "$with_libxml" = yes ; then
12563   if test "${ac_cv_header_libxml_parser_h+set}" = set; then
12564   { echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
12565 echo $ECHO_N "checking for libxml/parser.h... $ECHO_C" >&6; }
12566 if test "${ac_cv_header_libxml_parser_h+set}" = set; then
12567   echo $ECHO_N "(cached) $ECHO_C" >&6
12568 fi
12569 { echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
12570 echo "${ECHO_T}$ac_cv_header_libxml_parser_h" >&6; }
12571 else
12572   # Is the header compilable?
12573 { echo "$as_me:$LINENO: checking libxml/parser.h usability" >&5
12574 echo $ECHO_N "checking libxml/parser.h usability... $ECHO_C" >&6; }
12575 cat >conftest.$ac_ext <<_ACEOF
12576 /* confdefs.h.  */
12577 _ACEOF
12578 cat confdefs.h >>conftest.$ac_ext
12579 cat >>conftest.$ac_ext <<_ACEOF
12580 /* end confdefs.h.  */
12581 $ac_includes_default
12582 #include <libxml/parser.h>
12583 _ACEOF
12584 rm -f conftest.$ac_objext
12585 if { (ac_try="$ac_compile"
12586 case "(($ac_try" in
12587   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12588   *) ac_try_echo=$ac_try;;
12589 esac
12590 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12591   (eval "$ac_compile") 2>conftest.er1
12592   ac_status=$?
12593   grep -v '^ *+' conftest.er1 >conftest.err
12594   rm -f conftest.er1
12595   cat conftest.err >&5
12596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12597   (exit $ac_status); } && {
12598          test -z "$ac_c_werror_flag" ||
12599          test ! -s conftest.err
12600        } && test -s conftest.$ac_objext; then
12601   ac_header_compiler=yes
12602 else
12603   echo "$as_me: failed program was:" >&5
12604 sed 's/^/| /' conftest.$ac_ext >&5
12605
12606         ac_header_compiler=no
12607 fi
12608
12609 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12610 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12611 echo "${ECHO_T}$ac_header_compiler" >&6; }
12612
12613 # Is the header present?
12614 { echo "$as_me:$LINENO: checking libxml/parser.h presence" >&5
12615 echo $ECHO_N "checking libxml/parser.h presence... $ECHO_C" >&6; }
12616 cat >conftest.$ac_ext <<_ACEOF
12617 /* confdefs.h.  */
12618 _ACEOF
12619 cat confdefs.h >>conftest.$ac_ext
12620 cat >>conftest.$ac_ext <<_ACEOF
12621 /* end confdefs.h.  */
12622 #include <libxml/parser.h>
12623 _ACEOF
12624 if { (ac_try="$ac_cpp conftest.$ac_ext"
12625 case "(($ac_try" in
12626   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12627   *) ac_try_echo=$ac_try;;
12628 esac
12629 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12630   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12631   ac_status=$?
12632   grep -v '^ *+' conftest.er1 >conftest.err
12633   rm -f conftest.er1
12634   cat conftest.err >&5
12635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12636   (exit $ac_status); } >/dev/null && {
12637          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12638          test ! -s conftest.err
12639        }; then
12640   ac_header_preproc=yes
12641 else
12642   echo "$as_me: failed program was:" >&5
12643 sed 's/^/| /' conftest.$ac_ext >&5
12644
12645   ac_header_preproc=no
12646 fi
12647
12648 rm -f conftest.err conftest.$ac_ext
12649 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12650 echo "${ECHO_T}$ac_header_preproc" >&6; }
12651
12652 # So?  What about this header?
12653 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12654   yes:no: )
12655     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&5
12656 echo "$as_me: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12657     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the compiler's result" >&5
12658 echo "$as_me: WARNING: libxml/parser.h: proceeding with the compiler's result" >&2;}
12659     ac_header_preproc=yes
12660     ;;
12661   no:yes:* )
12662     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: present but cannot be compiled" >&5
12663 echo "$as_me: WARNING: libxml/parser.h: present but cannot be compiled" >&2;}
12664     { echo "$as_me:$LINENO: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&5
12665 echo "$as_me: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&2;}
12666     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: see the Autoconf documentation" >&5
12667 echo "$as_me: WARNING: libxml/parser.h: see the Autoconf documentation" >&2;}
12668     { echo "$as_me:$LINENO: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&5
12669 echo "$as_me: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&2;}
12670     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&5
12671 echo "$as_me: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&2;}
12672     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&5
12673 echo "$as_me: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&2;}
12674     ( cat <<\_ASBOX
12675 ## ---------------------------------------- ##
12676 ## Report this to pgsql-bugs@postgresql.org ##
12677 ## ---------------------------------------- ##
12678 _ASBOX
12679      ) | sed "s/^/$as_me: WARNING:     /" >&2
12680     ;;
12681 esac
12682 { echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
12683 echo $ECHO_N "checking for libxml/parser.h... $ECHO_C" >&6; }
12684 if test "${ac_cv_header_libxml_parser_h+set}" = set; then
12685   echo $ECHO_N "(cached) $ECHO_C" >&6
12686 else
12687   ac_cv_header_libxml_parser_h=$ac_header_preproc
12688 fi
12689 { echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
12690 echo "${ECHO_T}$ac_cv_header_libxml_parser_h" >&6; }
12691
12692 fi
12693 if test $ac_cv_header_libxml_parser_h = yes; then
12694   :
12695 else
12696   { { echo "$as_me:$LINENO: error: header file <libxml/parser.h> is required for XML support" >&5
12697 echo "$as_me: error: header file <libxml/parser.h> is required for XML support" >&2;}
12698    { (exit 1); exit 1; }; }
12699 fi
12700
12701
12702 fi
12703
12704 if test "$with_libxslt" = yes ; then
12705   if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
12706   { echo "$as_me:$LINENO: checking for libxslt/xslt.h" >&5
12707 echo $ECHO_N "checking for libxslt/xslt.h... $ECHO_C" >&6; }
12708 if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
12709   echo $ECHO_N "(cached) $ECHO_C" >&6
12710 fi
12711 { echo "$as_me:$LINENO: result: $ac_cv_header_libxslt_xslt_h" >&5
12712 echo "${ECHO_T}$ac_cv_header_libxslt_xslt_h" >&6; }
12713 else
12714   # Is the header compilable?
12715 { echo "$as_me:$LINENO: checking libxslt/xslt.h usability" >&5
12716 echo $ECHO_N "checking libxslt/xslt.h usability... $ECHO_C" >&6; }
12717 cat >conftest.$ac_ext <<_ACEOF
12718 /* confdefs.h.  */
12719 _ACEOF
12720 cat confdefs.h >>conftest.$ac_ext
12721 cat >>conftest.$ac_ext <<_ACEOF
12722 /* end confdefs.h.  */
12723 $ac_includes_default
12724 #include <libxslt/xslt.h>
12725 _ACEOF
12726 rm -f conftest.$ac_objext
12727 if { (ac_try="$ac_compile"
12728 case "(($ac_try" in
12729   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12730   *) ac_try_echo=$ac_try;;
12731 esac
12732 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12733   (eval "$ac_compile") 2>conftest.er1
12734   ac_status=$?
12735   grep -v '^ *+' conftest.er1 >conftest.err
12736   rm -f conftest.er1
12737   cat conftest.err >&5
12738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12739   (exit $ac_status); } && {
12740          test -z "$ac_c_werror_flag" ||
12741          test ! -s conftest.err
12742        } && test -s conftest.$ac_objext; then
12743   ac_header_compiler=yes
12744 else
12745   echo "$as_me: failed program was:" >&5
12746 sed 's/^/| /' conftest.$ac_ext >&5
12747
12748         ac_header_compiler=no
12749 fi
12750
12751 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12752 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12753 echo "${ECHO_T}$ac_header_compiler" >&6; }
12754
12755 # Is the header present?
12756 { echo "$as_me:$LINENO: checking libxslt/xslt.h presence" >&5
12757 echo $ECHO_N "checking libxslt/xslt.h presence... $ECHO_C" >&6; }
12758 cat >conftest.$ac_ext <<_ACEOF
12759 /* confdefs.h.  */
12760 _ACEOF
12761 cat confdefs.h >>conftest.$ac_ext
12762 cat >>conftest.$ac_ext <<_ACEOF
12763 /* end confdefs.h.  */
12764 #include <libxslt/xslt.h>
12765 _ACEOF
12766 if { (ac_try="$ac_cpp conftest.$ac_ext"
12767 case "(($ac_try" in
12768   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12769   *) ac_try_echo=$ac_try;;
12770 esac
12771 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12772   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12773   ac_status=$?
12774   grep -v '^ *+' conftest.er1 >conftest.err
12775   rm -f conftest.er1
12776   cat conftest.err >&5
12777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12778   (exit $ac_status); } >/dev/null && {
12779          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12780          test ! -s conftest.err
12781        }; then
12782   ac_header_preproc=yes
12783 else
12784   echo "$as_me: failed program was:" >&5
12785 sed 's/^/| /' conftest.$ac_ext >&5
12786
12787   ac_header_preproc=no
12788 fi
12789
12790 rm -f conftest.err conftest.$ac_ext
12791 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12792 echo "${ECHO_T}$ac_header_preproc" >&6; }
12793
12794 # So?  What about this header?
12795 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12796   yes:no: )
12797     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: accepted by the compiler, rejected by the preprocessor!" >&5
12798 echo "$as_me: WARNING: libxslt/xslt.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12799     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: proceeding with the compiler's result" >&5
12800 echo "$as_me: WARNING: libxslt/xslt.h: proceeding with the compiler's result" >&2;}
12801     ac_header_preproc=yes
12802     ;;
12803   no:yes:* )
12804     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: present but cannot be compiled" >&5
12805 echo "$as_me: WARNING: libxslt/xslt.h: present but cannot be compiled" >&2;}
12806     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h:     check for missing prerequisite headers?" >&5
12807 echo "$as_me: WARNING: libxslt/xslt.h:     check for missing prerequisite headers?" >&2;}
12808     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: see the Autoconf documentation" >&5
12809 echo "$as_me: WARNING: libxslt/xslt.h: see the Autoconf documentation" >&2;}
12810     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h:     section \"Present But Cannot Be Compiled\"" >&5
12811 echo "$as_me: WARNING: libxslt/xslt.h:     section \"Present But Cannot Be Compiled\"" >&2;}
12812     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: proceeding with the preprocessor's result" >&5
12813 echo "$as_me: WARNING: libxslt/xslt.h: proceeding with the preprocessor's result" >&2;}
12814     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: in the future, the compiler will take precedence" >&5
12815 echo "$as_me: WARNING: libxslt/xslt.h: in the future, the compiler will take precedence" >&2;}
12816     ( cat <<\_ASBOX
12817 ## ---------------------------------------- ##
12818 ## Report this to pgsql-bugs@postgresql.org ##
12819 ## ---------------------------------------- ##
12820 _ASBOX
12821      ) | sed "s/^/$as_me: WARNING:     /" >&2
12822     ;;
12823 esac
12824 { echo "$as_me:$LINENO: checking for libxslt/xslt.h" >&5
12825 echo $ECHO_N "checking for libxslt/xslt.h... $ECHO_C" >&6; }
12826 if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
12827   echo $ECHO_N "(cached) $ECHO_C" >&6
12828 else
12829   ac_cv_header_libxslt_xslt_h=$ac_header_preproc
12830 fi
12831 { echo "$as_me:$LINENO: result: $ac_cv_header_libxslt_xslt_h" >&5
12832 echo "${ECHO_T}$ac_cv_header_libxslt_xslt_h" >&6; }
12833
12834 fi
12835 if test $ac_cv_header_libxslt_xslt_h = yes; then
12836   :
12837 else
12838   { { echo "$as_me:$LINENO: error: header file <libxslt/xslt.h> is required for XSLT support" >&5
12839 echo "$as_me: error: header file <libxslt/xslt.h> is required for XSLT support" >&2;}
12840    { (exit 1); exit 1; }; }
12841 fi
12842
12843
12844 fi
12845
12846 if test "$with_ldap" = yes ; then
12847   if test "$PORTNAME" != "win32"; then
12848
12849 for ac_header in ldap.h
12850 do
12851 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12852 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12853   { echo "$as_me:$LINENO: checking for $ac_header" >&5
12854 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12855 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12856   echo $ECHO_N "(cached) $ECHO_C" >&6
12857 fi
12858 ac_res=`eval echo '${'$as_ac_Header'}'`
12859                { echo "$as_me:$LINENO: result: $ac_res" >&5
12860 echo "${ECHO_T}$ac_res" >&6; }
12861 else
12862   # Is the header compilable?
12863 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
12864 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
12865 cat >conftest.$ac_ext <<_ACEOF
12866 /* confdefs.h.  */
12867 _ACEOF
12868 cat confdefs.h >>conftest.$ac_ext
12869 cat >>conftest.$ac_ext <<_ACEOF
12870 /* end confdefs.h.  */
12871 $ac_includes_default
12872 #include <$ac_header>
12873 _ACEOF
12874 rm -f conftest.$ac_objext
12875 if { (ac_try="$ac_compile"
12876 case "(($ac_try" in
12877   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12878   *) ac_try_echo=$ac_try;;
12879 esac
12880 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12881   (eval "$ac_compile") 2>conftest.er1
12882   ac_status=$?
12883   grep -v '^ *+' conftest.er1 >conftest.err
12884   rm -f conftest.er1
12885   cat conftest.err >&5
12886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12887   (exit $ac_status); } && {
12888          test -z "$ac_c_werror_flag" ||
12889          test ! -s conftest.err
12890        } && test -s conftest.$ac_objext; then
12891   ac_header_compiler=yes
12892 else
12893   echo "$as_me: failed program was:" >&5
12894 sed 's/^/| /' conftest.$ac_ext >&5
12895
12896         ac_header_compiler=no
12897 fi
12898
12899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12900 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12901 echo "${ECHO_T}$ac_header_compiler" >&6; }
12902
12903 # Is the header present?
12904 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
12905 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
12906 cat >conftest.$ac_ext <<_ACEOF
12907 /* confdefs.h.  */
12908 _ACEOF
12909 cat confdefs.h >>conftest.$ac_ext
12910 cat >>conftest.$ac_ext <<_ACEOF
12911 /* end confdefs.h.  */
12912 #include <$ac_header>
12913 _ACEOF
12914 if { (ac_try="$ac_cpp conftest.$ac_ext"
12915 case "(($ac_try" in
12916   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12917   *) ac_try_echo=$ac_try;;
12918 esac
12919 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12920   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12921   ac_status=$?
12922   grep -v '^ *+' conftest.er1 >conftest.err
12923   rm -f conftest.er1
12924   cat conftest.err >&5
12925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12926   (exit $ac_status); } >/dev/null && {
12927          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12928          test ! -s conftest.err
12929        }; then
12930   ac_header_preproc=yes
12931 else
12932   echo "$as_me: failed program was:" >&5
12933 sed 's/^/| /' conftest.$ac_ext >&5
12934
12935   ac_header_preproc=no
12936 fi
12937
12938 rm -f conftest.err conftest.$ac_ext
12939 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12940 echo "${ECHO_T}$ac_header_preproc" >&6; }
12941
12942 # So?  What about this header?
12943 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12944   yes:no: )
12945     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12946 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12947     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12948 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12949     ac_header_preproc=yes
12950     ;;
12951   no:yes:* )
12952     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12953 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12954     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12955 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12956     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12957 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12958     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12959 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12960     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12961 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12962     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12963 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12964     ( cat <<\_ASBOX
12965 ## ---------------------------------------- ##
12966 ## Report this to pgsql-bugs@postgresql.org ##
12967 ## ---------------------------------------- ##
12968 _ASBOX
12969      ) | sed "s/^/$as_me: WARNING:     /" >&2
12970     ;;
12971 esac
12972 { echo "$as_me:$LINENO: checking for $ac_header" >&5
12973 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12974 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12975   echo $ECHO_N "(cached) $ECHO_C" >&6
12976 else
12977   eval "$as_ac_Header=\$ac_header_preproc"
12978 fi
12979 ac_res=`eval echo '${'$as_ac_Header'}'`
12980                { echo "$as_me:$LINENO: result: $ac_res" >&5
12981 echo "${ECHO_T}$ac_res" >&6; }
12982
12983 fi
12984 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12985   cat >>confdefs.h <<_ACEOF
12986 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12987 _ACEOF
12988
12989 else
12990   { { echo "$as_me:$LINENO: error: header file <ldap.h> is required for LDAP" >&5
12991 echo "$as_me: error: header file <ldap.h> is required for LDAP" >&2;}
12992    { (exit 1); exit 1; }; }
12993 fi
12994
12995 done
12996
12997   else
12998
12999 for ac_header in winldap.h
13000 do
13001 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13002 { echo "$as_me:$LINENO: checking for $ac_header" >&5
13003 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13004 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13005   echo $ECHO_N "(cached) $ECHO_C" >&6
13006 else
13007   cat >conftest.$ac_ext <<_ACEOF
13008 /* confdefs.h.  */
13009 _ACEOF
13010 cat confdefs.h >>conftest.$ac_ext
13011 cat >>conftest.$ac_ext <<_ACEOF
13012 /* end confdefs.h.  */
13013 $ac_includes_default
13014 #include <windows.h>
13015
13016
13017 #include <$ac_header>
13018 _ACEOF
13019 rm -f conftest.$ac_objext
13020 if { (ac_try="$ac_compile"
13021 case "(($ac_try" in
13022   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13023   *) ac_try_echo=$ac_try;;
13024 esac
13025 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13026   (eval "$ac_compile") 2>conftest.er1
13027   ac_status=$?
13028   grep -v '^ *+' conftest.er1 >conftest.err
13029   rm -f conftest.er1
13030   cat conftest.err >&5
13031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13032   (exit $ac_status); } && {
13033          test -z "$ac_c_werror_flag" ||
13034          test ! -s conftest.err
13035        } && test -s conftest.$ac_objext; then
13036   eval "$as_ac_Header=yes"
13037 else
13038   echo "$as_me: failed program was:" >&5
13039 sed 's/^/| /' conftest.$ac_ext >&5
13040
13041         eval "$as_ac_Header=no"
13042 fi
13043
13044 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13045 fi
13046 ac_res=`eval echo '${'$as_ac_Header'}'`
13047                { echo "$as_me:$LINENO: result: $ac_res" >&5
13048 echo "${ECHO_T}$ac_res" >&6; }
13049 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13050   cat >>confdefs.h <<_ACEOF
13051 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13052 _ACEOF
13053
13054 else
13055   { { echo "$as_me:$LINENO: error: header file <winldap.h> is required for LDAP" >&5
13056 echo "$as_me: error: header file <winldap.h> is required for LDAP" >&2;}
13057    { (exit 1); exit 1; }; }
13058 fi
13059
13060 done
13061
13062   fi
13063 fi
13064
13065 if test "$with_bonjour" = yes ; then
13066   if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
13067   { echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
13068 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6; }
13069 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
13070   echo $ECHO_N "(cached) $ECHO_C" >&6
13071 fi
13072 { echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
13073 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6; }
13074 else
13075   # Is the header compilable?
13076 { echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h usability" >&5
13077 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h usability... $ECHO_C" >&6; }
13078 cat >conftest.$ac_ext <<_ACEOF
13079 /* confdefs.h.  */
13080 _ACEOF
13081 cat confdefs.h >>conftest.$ac_ext
13082 cat >>conftest.$ac_ext <<_ACEOF
13083 /* end confdefs.h.  */
13084 $ac_includes_default
13085 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
13086 _ACEOF
13087 rm -f conftest.$ac_objext
13088 if { (ac_try="$ac_compile"
13089 case "(($ac_try" in
13090   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13091   *) ac_try_echo=$ac_try;;
13092 esac
13093 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13094   (eval "$ac_compile") 2>conftest.er1
13095   ac_status=$?
13096   grep -v '^ *+' conftest.er1 >conftest.err
13097   rm -f conftest.er1
13098   cat conftest.err >&5
13099   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13100   (exit $ac_status); } && {
13101          test -z "$ac_c_werror_flag" ||
13102          test ! -s conftest.err
13103        } && test -s conftest.$ac_objext; then
13104   ac_header_compiler=yes
13105 else
13106   echo "$as_me: failed program was:" >&5
13107 sed 's/^/| /' conftest.$ac_ext >&5
13108
13109         ac_header_compiler=no
13110 fi
13111
13112 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13113 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13114 echo "${ECHO_T}$ac_header_compiler" >&6; }
13115
13116 # Is the header present?
13117 { echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h presence" >&5
13118 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h presence... $ECHO_C" >&6; }
13119 cat >conftest.$ac_ext <<_ACEOF
13120 /* confdefs.h.  */
13121 _ACEOF
13122 cat confdefs.h >>conftest.$ac_ext
13123 cat >>conftest.$ac_ext <<_ACEOF
13124 /* end confdefs.h.  */
13125 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
13126 _ACEOF
13127 if { (ac_try="$ac_cpp conftest.$ac_ext"
13128 case "(($ac_try" in
13129   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13130   *) ac_try_echo=$ac_try;;
13131 esac
13132 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13133   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13134   ac_status=$?
13135   grep -v '^ *+' conftest.er1 >conftest.err
13136   rm -f conftest.er1
13137   cat conftest.err >&5
13138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13139   (exit $ac_status); } >/dev/null && {
13140          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13141          test ! -s conftest.err
13142        }; then
13143   ac_header_preproc=yes
13144 else
13145   echo "$as_me: failed program was:" >&5
13146 sed 's/^/| /' conftest.$ac_ext >&5
13147
13148   ac_header_preproc=no
13149 fi
13150
13151 rm -f conftest.err conftest.$ac_ext
13152 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13153 echo "${ECHO_T}$ac_header_preproc" >&6; }
13154
13155 # So?  What about this header?
13156 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13157   yes:no: )
13158     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&5
13159 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13160     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&5
13161 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&2;}
13162     ac_header_preproc=yes
13163     ;;
13164   no:yes:* )
13165     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&5
13166 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&2;}
13167     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&5
13168 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&2;}
13169     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&5
13170 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&2;}
13171     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&5
13172 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&2;}
13173     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
13174 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;}
13175     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&5
13176 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&2;}
13177     ( cat <<\_ASBOX
13178 ## ---------------------------------------- ##
13179 ## Report this to pgsql-bugs@postgresql.org ##
13180 ## ---------------------------------------- ##
13181 _ASBOX
13182      ) | sed "s/^/$as_me: WARNING:     /" >&2
13183     ;;
13184 esac
13185 { echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
13186 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6; }
13187 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
13188   echo $ECHO_N "(cached) $ECHO_C" >&6
13189 else
13190   ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h=$ac_header_preproc
13191 fi
13192 { echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
13193 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6; }
13194
13195 fi
13196 if test $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h = yes; then
13197   :
13198 else
13199   { { echo "$as_me:$LINENO: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&5
13200 echo "$as_me: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&2;}
13201    { (exit 1); exit 1; }; }
13202 fi
13203
13204
13205 fi
13206
13207 # for contrib/uuid-ossp
13208 if test "$with_ossp_uuid" = yes ; then
13209
13210 for ac_header in ossp/uuid.h
13211 do
13212 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13213 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13214   { echo "$as_me:$LINENO: checking for $ac_header" >&5
13215 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13216 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13217   echo $ECHO_N "(cached) $ECHO_C" >&6
13218 fi
13219 ac_res=`eval echo '${'$as_ac_Header'}'`
13220                { echo "$as_me:$LINENO: result: $ac_res" >&5
13221 echo "${ECHO_T}$ac_res" >&6; }
13222 else
13223   # Is the header compilable?
13224 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
13225 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
13226 cat >conftest.$ac_ext <<_ACEOF
13227 /* confdefs.h.  */
13228 _ACEOF
13229 cat confdefs.h >>conftest.$ac_ext
13230 cat >>conftest.$ac_ext <<_ACEOF
13231 /* end confdefs.h.  */
13232 $ac_includes_default
13233 #include <$ac_header>
13234 _ACEOF
13235 rm -f conftest.$ac_objext
13236 if { (ac_try="$ac_compile"
13237 case "(($ac_try" in
13238   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13239   *) ac_try_echo=$ac_try;;
13240 esac
13241 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13242   (eval "$ac_compile") 2>conftest.er1
13243   ac_status=$?
13244   grep -v '^ *+' conftest.er1 >conftest.err
13245   rm -f conftest.er1
13246   cat conftest.err >&5
13247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13248   (exit $ac_status); } && {
13249          test -z "$ac_c_werror_flag" ||
13250          test ! -s conftest.err
13251        } && test -s conftest.$ac_objext; then
13252   ac_header_compiler=yes
13253 else
13254   echo "$as_me: failed program was:" >&5
13255 sed 's/^/| /' conftest.$ac_ext >&5
13256
13257         ac_header_compiler=no
13258 fi
13259
13260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13261 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13262 echo "${ECHO_T}$ac_header_compiler" >&6; }
13263
13264 # Is the header present?
13265 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
13266 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
13267 cat >conftest.$ac_ext <<_ACEOF
13268 /* confdefs.h.  */
13269 _ACEOF
13270 cat confdefs.h >>conftest.$ac_ext
13271 cat >>conftest.$ac_ext <<_ACEOF
13272 /* end confdefs.h.  */
13273 #include <$ac_header>
13274 _ACEOF
13275 if { (ac_try="$ac_cpp conftest.$ac_ext"
13276 case "(($ac_try" in
13277   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13278   *) ac_try_echo=$ac_try;;
13279 esac
13280 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13281   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13282   ac_status=$?
13283   grep -v '^ *+' conftest.er1 >conftest.err
13284   rm -f conftest.er1
13285   cat conftest.err >&5
13286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13287   (exit $ac_status); } >/dev/null && {
13288          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13289          test ! -s conftest.err
13290        }; then
13291   ac_header_preproc=yes
13292 else
13293   echo "$as_me: failed program was:" >&5
13294 sed 's/^/| /' conftest.$ac_ext >&5
13295
13296   ac_header_preproc=no
13297 fi
13298
13299 rm -f conftest.err conftest.$ac_ext
13300 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13301 echo "${ECHO_T}$ac_header_preproc" >&6; }
13302
13303 # So?  What about this header?
13304 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13305   yes:no: )
13306     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13307 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13308     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13309 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13310     ac_header_preproc=yes
13311     ;;
13312   no:yes:* )
13313     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13314 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13315     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13316 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13317     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13318 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13319     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13320 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13321     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13322 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13323     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13324 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13325     ( cat <<\_ASBOX
13326 ## ---------------------------------------- ##
13327 ## Report this to pgsql-bugs@postgresql.org ##
13328 ## ---------------------------------------- ##
13329 _ASBOX
13330      ) | sed "s/^/$as_me: WARNING:     /" >&2
13331     ;;
13332 esac
13333 { echo "$as_me:$LINENO: checking for $ac_header" >&5
13334 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13335 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13336   echo $ECHO_N "(cached) $ECHO_C" >&6
13337 else
13338   eval "$as_ac_Header=\$ac_header_preproc"
13339 fi
13340 ac_res=`eval echo '${'$as_ac_Header'}'`
13341                { echo "$as_me:$LINENO: result: $ac_res" >&5
13342 echo "${ECHO_T}$ac_res" >&6; }
13343
13344 fi
13345 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13346   cat >>confdefs.h <<_ACEOF
13347 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13348 _ACEOF
13349
13350 else
13351
13352
13353 for ac_header in uuid.h
13354 do
13355 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13356 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13357   { echo "$as_me:$LINENO: checking for $ac_header" >&5
13358 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13359 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13360   echo $ECHO_N "(cached) $ECHO_C" >&6
13361 fi
13362 ac_res=`eval echo '${'$as_ac_Header'}'`
13363                { echo "$as_me:$LINENO: result: $ac_res" >&5
13364 echo "${ECHO_T}$ac_res" >&6; }
13365 else
13366   # Is the header compilable?
13367 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
13368 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
13369 cat >conftest.$ac_ext <<_ACEOF
13370 /* confdefs.h.  */
13371 _ACEOF
13372 cat confdefs.h >>conftest.$ac_ext
13373 cat >>conftest.$ac_ext <<_ACEOF
13374 /* end confdefs.h.  */
13375 $ac_includes_default
13376 #include <$ac_header>
13377 _ACEOF
13378 rm -f conftest.$ac_objext
13379 if { (ac_try="$ac_compile"
13380 case "(($ac_try" in
13381   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13382   *) ac_try_echo=$ac_try;;
13383 esac
13384 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13385   (eval "$ac_compile") 2>conftest.er1
13386   ac_status=$?
13387   grep -v '^ *+' conftest.er1 >conftest.err
13388   rm -f conftest.er1
13389   cat conftest.err >&5
13390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13391   (exit $ac_status); } && {
13392          test -z "$ac_c_werror_flag" ||
13393          test ! -s conftest.err
13394        } && test -s conftest.$ac_objext; then
13395   ac_header_compiler=yes
13396 else
13397   echo "$as_me: failed program was:" >&5
13398 sed 's/^/| /' conftest.$ac_ext >&5
13399
13400         ac_header_compiler=no
13401 fi
13402
13403 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13404 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13405 echo "${ECHO_T}$ac_header_compiler" >&6; }
13406
13407 # Is the header present?
13408 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
13409 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
13410 cat >conftest.$ac_ext <<_ACEOF
13411 /* confdefs.h.  */
13412 _ACEOF
13413 cat confdefs.h >>conftest.$ac_ext
13414 cat >>conftest.$ac_ext <<_ACEOF
13415 /* end confdefs.h.  */
13416 #include <$ac_header>
13417 _ACEOF
13418 if { (ac_try="$ac_cpp conftest.$ac_ext"
13419 case "(($ac_try" in
13420   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13421   *) ac_try_echo=$ac_try;;
13422 esac
13423 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13424   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13425   ac_status=$?
13426   grep -v '^ *+' conftest.er1 >conftest.err
13427   rm -f conftest.er1
13428   cat conftest.err >&5
13429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13430   (exit $ac_status); } >/dev/null && {
13431          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13432          test ! -s conftest.err
13433        }; then
13434   ac_header_preproc=yes
13435 else
13436   echo "$as_me: failed program was:" >&5
13437 sed 's/^/| /' conftest.$ac_ext >&5
13438
13439   ac_header_preproc=no
13440 fi
13441
13442 rm -f conftest.err conftest.$ac_ext
13443 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13444 echo "${ECHO_T}$ac_header_preproc" >&6; }
13445
13446 # So?  What about this header?
13447 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13448   yes:no: )
13449     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13450 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13451     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13452 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13453     ac_header_preproc=yes
13454     ;;
13455   no:yes:* )
13456     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13457 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13458     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13459 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13460     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13461 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13462     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13463 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13464     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13465 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13466     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13467 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13468     ( cat <<\_ASBOX
13469 ## ---------------------------------------- ##
13470 ## Report this to pgsql-bugs@postgresql.org ##
13471 ## ---------------------------------------- ##
13472 _ASBOX
13473      ) | sed "s/^/$as_me: WARNING:     /" >&2
13474     ;;
13475 esac
13476 { echo "$as_me:$LINENO: checking for $ac_header" >&5
13477 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13478 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13479   echo $ECHO_N "(cached) $ECHO_C" >&6
13480 else
13481   eval "$as_ac_Header=\$ac_header_preproc"
13482 fi
13483 ac_res=`eval echo '${'$as_ac_Header'}'`
13484                { echo "$as_me:$LINENO: result: $ac_res" >&5
13485 echo "${ECHO_T}$ac_res" >&6; }
13486
13487 fi
13488 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13489   cat >>confdefs.h <<_ACEOF
13490 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13491 _ACEOF
13492
13493 else
13494   { { echo "$as_me:$LINENO: error: header file <ossp/uuid.h> or <uuid.h> is required for OSSP-UUID" >&5
13495 echo "$as_me: error: header file <ossp/uuid.h> or <uuid.h> is required for OSSP-UUID" >&2;}
13496    { (exit 1); exit 1; }; }
13497 fi
13498
13499 done
13500
13501 fi
13502
13503 done
13504
13505 fi
13506
13507
13508 ##
13509 ## Types, structures, compiler characteristics
13510 ##
13511
13512  { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
13513 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
13514 if test "${ac_cv_c_bigendian+set}" = set; then
13515   echo $ECHO_N "(cached) $ECHO_C" >&6
13516 else
13517   # See if sys/param.h defines the BYTE_ORDER macro.
13518 cat >conftest.$ac_ext <<_ACEOF
13519 /* confdefs.h.  */
13520 _ACEOF
13521 cat confdefs.h >>conftest.$ac_ext
13522 cat >>conftest.$ac_ext <<_ACEOF
13523 /* end confdefs.h.  */
13524 #include <sys/types.h>
13525 #include <sys/param.h>
13526
13527 int
13528 main ()
13529 {
13530 #if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
13531         && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
13532  bogus endian macros
13533 #endif
13534
13535   ;
13536   return 0;
13537 }
13538 _ACEOF
13539 rm -f conftest.$ac_objext
13540 if { (ac_try="$ac_compile"
13541 case "(($ac_try" in
13542   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13543   *) ac_try_echo=$ac_try;;
13544 esac
13545 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13546   (eval "$ac_compile") 2>conftest.er1
13547   ac_status=$?
13548   grep -v '^ *+' conftest.er1 >conftest.err
13549   rm -f conftest.er1
13550   cat conftest.err >&5
13551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13552   (exit $ac_status); } && {
13553          test -z "$ac_c_werror_flag" ||
13554          test ! -s conftest.err
13555        } && test -s conftest.$ac_objext; then
13556   # It does; now see whether it defined to BIG_ENDIAN or not.
13557 cat >conftest.$ac_ext <<_ACEOF
13558 /* confdefs.h.  */
13559 _ACEOF
13560 cat confdefs.h >>conftest.$ac_ext
13561 cat >>conftest.$ac_ext <<_ACEOF
13562 /* end confdefs.h.  */
13563 #include <sys/types.h>
13564 #include <sys/param.h>
13565
13566 int
13567 main ()
13568 {
13569 #if BYTE_ORDER != BIG_ENDIAN
13570  not big endian
13571 #endif
13572
13573   ;
13574   return 0;
13575 }
13576 _ACEOF
13577 rm -f conftest.$ac_objext
13578 if { (ac_try="$ac_compile"
13579 case "(($ac_try" in
13580   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13581   *) ac_try_echo=$ac_try;;
13582 esac
13583 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13584   (eval "$ac_compile") 2>conftest.er1
13585   ac_status=$?
13586   grep -v '^ *+' conftest.er1 >conftest.err
13587   rm -f conftest.er1
13588   cat conftest.err >&5
13589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13590   (exit $ac_status); } && {
13591          test -z "$ac_c_werror_flag" ||
13592          test ! -s conftest.err
13593        } && test -s conftest.$ac_objext; then
13594   ac_cv_c_bigendian=yes
13595 else
13596   echo "$as_me: failed program was:" >&5
13597 sed 's/^/| /' conftest.$ac_ext >&5
13598
13599         ac_cv_c_bigendian=no
13600 fi
13601
13602 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13603 else
13604   echo "$as_me: failed program was:" >&5
13605 sed 's/^/| /' conftest.$ac_ext >&5
13606
13607         # It does not; compile a test program.
13608 if test "$cross_compiling" = yes; then
13609   # try to guess the endianness by grepping values into an object file
13610   ac_cv_c_bigendian=unknown
13611   cat >conftest.$ac_ext <<_ACEOF
13612 /* confdefs.h.  */
13613 _ACEOF
13614 cat confdefs.h >>conftest.$ac_ext
13615 cat >>conftest.$ac_ext <<_ACEOF
13616 /* end confdefs.h.  */
13617 short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13618 short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13619 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
13620 short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13621 short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13622 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
13623 int
13624 main ()
13625 {
13626  _ascii (); _ebcdic ();
13627   ;
13628   return 0;
13629 }
13630 _ACEOF
13631 rm -f conftest.$ac_objext
13632 if { (ac_try="$ac_compile"
13633 case "(($ac_try" in
13634   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13635   *) ac_try_echo=$ac_try;;
13636 esac
13637 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13638   (eval "$ac_compile") 2>conftest.er1
13639   ac_status=$?
13640   grep -v '^ *+' conftest.er1 >conftest.err
13641   rm -f conftest.er1
13642   cat conftest.err >&5
13643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13644   (exit $ac_status); } && {
13645          test -z "$ac_c_werror_flag" ||
13646          test ! -s conftest.err
13647        } && test -s conftest.$ac_objext; then
13648   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
13649   ac_cv_c_bigendian=yes
13650 fi
13651 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13652   if test "$ac_cv_c_bigendian" = unknown; then
13653     ac_cv_c_bigendian=no
13654   else
13655     # finding both strings is unlikely to happen, but who knows?
13656     ac_cv_c_bigendian=unknown
13657   fi
13658 fi
13659 else
13660   echo "$as_me: failed program was:" >&5
13661 sed 's/^/| /' conftest.$ac_ext >&5
13662
13663
13664 fi
13665
13666 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13667 else
13668   cat >conftest.$ac_ext <<_ACEOF
13669 /* confdefs.h.  */
13670 _ACEOF
13671 cat confdefs.h >>conftest.$ac_ext
13672 cat >>conftest.$ac_ext <<_ACEOF
13673 /* end confdefs.h.  */
13674 $ac_includes_default
13675 int
13676 main ()
13677 {
13678
13679   /* Are we little or big endian?  From Harbison&Steele.  */
13680   union
13681   {
13682     long int l;
13683     char c[sizeof (long int)];
13684   } u;
13685   u.l = 1;
13686   return u.c[sizeof (long int) - 1] == 1;
13687
13688   ;
13689   return 0;
13690 }
13691 _ACEOF
13692 rm -f conftest$ac_exeext
13693 if { (ac_try="$ac_link"
13694 case "(($ac_try" in
13695   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13696   *) ac_try_echo=$ac_try;;
13697 esac
13698 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13699   (eval "$ac_link") 2>&5
13700   ac_status=$?
13701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13702   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13703   { (case "(($ac_try" in
13704   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13705   *) ac_try_echo=$ac_try;;
13706 esac
13707 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13708   (eval "$ac_try") 2>&5
13709   ac_status=$?
13710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13711   (exit $ac_status); }; }; then
13712   ac_cv_c_bigendian=no
13713 else
13714   echo "$as_me: program exited with status $ac_status" >&5
13715 echo "$as_me: failed program was:" >&5
13716 sed 's/^/| /' conftest.$ac_ext >&5
13717
13718 ( exit $ac_status )
13719 ac_cv_c_bigendian=yes
13720 fi
13721 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13722 fi
13723
13724
13725 fi
13726
13727 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13728 fi
13729 { echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
13730 echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
13731 case $ac_cv_c_bigendian in
13732   yes)
13733
13734 cat >>confdefs.h <<\_ACEOF
13735 #define WORDS_BIGENDIAN 1
13736 _ACEOF
13737  ;;
13738   no)
13739      ;;
13740   *)
13741     { { echo "$as_me:$LINENO: error: unknown endianness
13742 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
13743 echo "$as_me: error: unknown endianness
13744 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
13745    { (exit 1); exit 1; }; } ;;
13746 esac
13747
13748 { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13749 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
13750 if test "${ac_cv_c_const+set}" = set; then
13751   echo $ECHO_N "(cached) $ECHO_C" >&6
13752 else
13753   cat >conftest.$ac_ext <<_ACEOF
13754 /* confdefs.h.  */
13755 _ACEOF
13756 cat confdefs.h >>conftest.$ac_ext
13757 cat >>conftest.$ac_ext <<_ACEOF
13758 /* end confdefs.h.  */
13759
13760 int
13761 main ()
13762 {
13763 /* FIXME: Include the comments suggested by Paul. */
13764 #ifndef __cplusplus
13765   /* Ultrix mips cc rejects this.  */
13766   typedef int charset[2];
13767   const charset cs;
13768   /* SunOS 4.1.1 cc rejects this.  */
13769   char const *const *pcpcc;
13770   char **ppc;
13771   /* NEC SVR4.0.2 mips cc rejects this.  */
13772   struct point {int x, y;};
13773   static struct point const zero = {0,0};
13774   /* AIX XL C 1.02.0.0 rejects this.
13775      It does not let you subtract one const X* pointer from another in
13776      an arm of an if-expression whose if-part is not a constant
13777      expression */
13778   const char *g = "string";
13779   pcpcc = &g + (g ? g-g : 0);
13780   /* HPUX 7.0 cc rejects these. */
13781   ++pcpcc;
13782   ppc = (char**) pcpcc;
13783   pcpcc = (char const *const *) ppc;
13784   { /* SCO 3.2v4 cc rejects this.  */
13785     char *t;
13786     char const *s = 0 ? (char *) 0 : (char const *) 0;
13787
13788     *t++ = 0;
13789     if (s) return 0;
13790   }
13791   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13792     int x[] = {25, 17};
13793     const int *foo = &x[0];
13794     ++foo;
13795   }
13796   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13797     typedef const int *iptr;
13798     iptr p = 0;
13799     ++p;
13800   }
13801   { /* AIX XL C 1.02.0.0 rejects this saying
13802        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13803     struct s { int j; const int *ap[3]; };
13804     struct s *b; b->j = 5;
13805   }
13806   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13807     const int foo = 10;
13808     if (!foo) return 0;
13809   }
13810   return !cs[0] && !zero.x;
13811 #endif
13812
13813   ;
13814   return 0;
13815 }
13816 _ACEOF
13817 rm -f conftest.$ac_objext
13818 if { (ac_try="$ac_compile"
13819 case "(($ac_try" in
13820   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13821   *) ac_try_echo=$ac_try;;
13822 esac
13823 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13824   (eval "$ac_compile") 2>conftest.er1
13825   ac_status=$?
13826   grep -v '^ *+' conftest.er1 >conftest.err
13827   rm -f conftest.er1
13828   cat conftest.err >&5
13829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13830   (exit $ac_status); } && {
13831          test -z "$ac_c_werror_flag" ||
13832          test ! -s conftest.err
13833        } && test -s conftest.$ac_objext; then
13834   ac_cv_c_const=yes
13835 else
13836   echo "$as_me: failed program was:" >&5
13837 sed 's/^/| /' conftest.$ac_ext >&5
13838
13839         ac_cv_c_const=no
13840 fi
13841
13842 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13843 fi
13844 { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13845 echo "${ECHO_T}$ac_cv_c_const" >&6; }
13846 if test $ac_cv_c_const = no; then
13847
13848 cat >>confdefs.h <<\_ACEOF
13849 #define const
13850 _ACEOF
13851
13852 fi
13853
13854 { echo "$as_me:$LINENO: checking for inline" >&5
13855 echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
13856 if test "${ac_cv_c_inline+set}" = set; then
13857   echo $ECHO_N "(cached) $ECHO_C" >&6
13858 else
13859   ac_cv_c_inline=no
13860 for ac_kw in inline __inline__ __inline; do
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 #ifndef __cplusplus
13868 typedef int foo_t;
13869 static $ac_kw foo_t static_foo () {return 0; }
13870 $ac_kw foo_t foo () {return 0; }
13871 #endif
13872
13873 _ACEOF
13874 rm -f conftest.$ac_objext
13875 if { (ac_try="$ac_compile"
13876 case "(($ac_try" in
13877   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13878   *) ac_try_echo=$ac_try;;
13879 esac
13880 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13881   (eval "$ac_compile") 2>conftest.er1
13882   ac_status=$?
13883   grep -v '^ *+' conftest.er1 >conftest.err
13884   rm -f conftest.er1
13885   cat conftest.err >&5
13886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13887   (exit $ac_status); } && {
13888          test -z "$ac_c_werror_flag" ||
13889          test ! -s conftest.err
13890        } && test -s conftest.$ac_objext; then
13891   ac_cv_c_inline=$ac_kw
13892 else
13893   echo "$as_me: failed program was:" >&5
13894 sed 's/^/| /' conftest.$ac_ext >&5
13895
13896
13897 fi
13898
13899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13900   test "$ac_cv_c_inline" != no && break
13901 done
13902
13903 fi
13904 { echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
13905 echo "${ECHO_T}$ac_cv_c_inline" >&6; }
13906
13907
13908 case $ac_cv_c_inline in
13909   inline | yes) ;;
13910   *)
13911     case $ac_cv_c_inline in
13912       no) ac_val=;;
13913       *) ac_val=$ac_cv_c_inline;;
13914     esac
13915     cat >>confdefs.h <<_ACEOF
13916 #ifndef __cplusplus
13917 #define inline $ac_val
13918 #endif
13919 _ACEOF
13920     ;;
13921 esac
13922
13923 { echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
13924 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6; }
13925 if test "${ac_cv_c_stringize+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 #define x(y) #y
13935
13936 char *s = x(teststring);
13937 _ACEOF
13938 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13939   $EGREP "#teststring" >/dev/null 2>&1; then
13940   ac_cv_c_stringize=no
13941 else
13942   ac_cv_c_stringize=yes
13943 fi
13944 rm -f conftest*
13945
13946 fi
13947 { echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
13948 echo "${ECHO_T}$ac_cv_c_stringize" >&6; }
13949 if test $ac_cv_c_stringize = yes; then
13950
13951 cat >>confdefs.h <<\_ACEOF
13952 #define HAVE_STRINGIZE 1
13953 _ACEOF
13954
13955 fi
13956
13957 { echo "$as_me:$LINENO: checking for signed types" >&5
13958 echo $ECHO_N "checking for signed types... $ECHO_C" >&6; }
13959 if test "${pgac_cv_c_signed+set}" = set; then
13960   echo $ECHO_N "(cached) $ECHO_C" >&6
13961 else
13962   cat >conftest.$ac_ext <<_ACEOF
13963 /* confdefs.h.  */
13964 _ACEOF
13965 cat confdefs.h >>conftest.$ac_ext
13966 cat >>conftest.$ac_ext <<_ACEOF
13967 /* end confdefs.h.  */
13968
13969 int
13970 main ()
13971 {
13972 signed char c; signed short s; signed int i;
13973   ;
13974   return 0;
13975 }
13976 _ACEOF
13977 rm -f conftest.$ac_objext
13978 if { (ac_try="$ac_compile"
13979 case "(($ac_try" in
13980   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13981   *) ac_try_echo=$ac_try;;
13982 esac
13983 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13984   (eval "$ac_compile") 2>conftest.er1
13985   ac_status=$?
13986   grep -v '^ *+' conftest.er1 >conftest.err
13987   rm -f conftest.er1
13988   cat conftest.err >&5
13989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13990   (exit $ac_status); } && {
13991          test -z "$ac_c_werror_flag" ||
13992          test ! -s conftest.err
13993        } && test -s conftest.$ac_objext; then
13994   pgac_cv_c_signed=yes
13995 else
13996   echo "$as_me: failed program was:" >&5
13997 sed 's/^/| /' conftest.$ac_ext >&5
13998
13999         pgac_cv_c_signed=no
14000 fi
14001
14002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14003 fi
14004 { echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
14005 echo "${ECHO_T}$pgac_cv_c_signed" >&6; }
14006 if test x"$pgac_cv_c_signed" = xno ; then
14007
14008 cat >>confdefs.h <<\_ACEOF
14009 #define signed
14010 _ACEOF
14011
14012 fi
14013 { echo "$as_me:$LINENO: checking for working volatile" >&5
14014 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
14015 if test "${ac_cv_c_volatile+set}" = set; then
14016   echo $ECHO_N "(cached) $ECHO_C" >&6
14017 else
14018   cat >conftest.$ac_ext <<_ACEOF
14019 /* confdefs.h.  */
14020 _ACEOF
14021 cat confdefs.h >>conftest.$ac_ext
14022 cat >>conftest.$ac_ext <<_ACEOF
14023 /* end confdefs.h.  */
14024
14025 int
14026 main ()
14027 {
14028
14029 volatile int x;
14030 int * volatile y = (int *) 0;
14031 return !x && !y;
14032   ;
14033   return 0;
14034 }
14035 _ACEOF
14036 rm -f conftest.$ac_objext
14037 if { (ac_try="$ac_compile"
14038 case "(($ac_try" in
14039   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14040   *) ac_try_echo=$ac_try;;
14041 esac
14042 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14043   (eval "$ac_compile") 2>conftest.er1
14044   ac_status=$?
14045   grep -v '^ *+' conftest.er1 >conftest.err
14046   rm -f conftest.er1
14047   cat conftest.err >&5
14048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14049   (exit $ac_status); } && {
14050          test -z "$ac_c_werror_flag" ||
14051          test ! -s conftest.err
14052        } && test -s conftest.$ac_objext; then
14053   ac_cv_c_volatile=yes
14054 else
14055   echo "$as_me: failed program was:" >&5
14056 sed 's/^/| /' conftest.$ac_ext >&5
14057
14058         ac_cv_c_volatile=no
14059 fi
14060
14061 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14062 fi
14063 { echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
14064 echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
14065 if test $ac_cv_c_volatile = no; then
14066
14067 cat >>confdefs.h <<\_ACEOF
14068 #define volatile
14069 _ACEOF
14070
14071 fi
14072
14073 { echo "$as_me:$LINENO: checking for __func__" >&5
14074 echo $ECHO_N "checking for __func__... $ECHO_C" >&6; }
14075 if test "${pgac_cv_funcname_func_support+set}" = set; then
14076   echo $ECHO_N "(cached) $ECHO_C" >&6
14077 else
14078   cat >conftest.$ac_ext <<_ACEOF
14079 /* confdefs.h.  */
14080 _ACEOF
14081 cat confdefs.h >>conftest.$ac_ext
14082 cat >>conftest.$ac_ext <<_ACEOF
14083 /* end confdefs.h.  */
14084 #include <stdio.h>
14085 int
14086 main ()
14087 {
14088 printf("%s\n", __func__);
14089   ;
14090   return 0;
14091 }
14092 _ACEOF
14093 rm -f conftest.$ac_objext
14094 if { (ac_try="$ac_compile"
14095 case "(($ac_try" in
14096   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14097   *) ac_try_echo=$ac_try;;
14098 esac
14099 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14100   (eval "$ac_compile") 2>conftest.er1
14101   ac_status=$?
14102   grep -v '^ *+' conftest.er1 >conftest.err
14103   rm -f conftest.er1
14104   cat conftest.err >&5
14105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14106   (exit $ac_status); } && {
14107          test -z "$ac_c_werror_flag" ||
14108          test ! -s conftest.err
14109        } && test -s conftest.$ac_objext; then
14110   pgac_cv_funcname_func_support=yes
14111 else
14112   echo "$as_me: failed program was:" >&5
14113 sed 's/^/| /' conftest.$ac_ext >&5
14114
14115         pgac_cv_funcname_func_support=no
14116 fi
14117
14118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14119 fi
14120 { echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
14121 echo "${ECHO_T}$pgac_cv_funcname_func_support" >&6; }
14122 if test x"$pgac_cv_funcname_func_support" = xyes ; then
14123
14124 cat >>confdefs.h <<\_ACEOF
14125 #define HAVE_FUNCNAME__FUNC 1
14126 _ACEOF
14127
14128 else
14129 { echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
14130 echo $ECHO_N "checking for __FUNCTION__... $ECHO_C" >&6; }
14131 if test "${pgac_cv_funcname_function_support+set}" = set; then
14132   echo $ECHO_N "(cached) $ECHO_C" >&6
14133 else
14134   cat >conftest.$ac_ext <<_ACEOF
14135 /* confdefs.h.  */
14136 _ACEOF
14137 cat confdefs.h >>conftest.$ac_ext
14138 cat >>conftest.$ac_ext <<_ACEOF
14139 /* end confdefs.h.  */
14140 #include <stdio.h>
14141 int
14142 main ()
14143 {
14144 printf("%s\n", __FUNCTION__);
14145   ;
14146   return 0;
14147 }
14148 _ACEOF
14149 rm -f conftest.$ac_objext
14150 if { (ac_try="$ac_compile"
14151 case "(($ac_try" in
14152   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14153   *) ac_try_echo=$ac_try;;
14154 esac
14155 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14156   (eval "$ac_compile") 2>conftest.er1
14157   ac_status=$?
14158   grep -v '^ *+' conftest.er1 >conftest.err
14159   rm -f conftest.er1
14160   cat conftest.err >&5
14161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14162   (exit $ac_status); } && {
14163          test -z "$ac_c_werror_flag" ||
14164          test ! -s conftest.err
14165        } && test -s conftest.$ac_objext; then
14166   pgac_cv_funcname_function_support=yes
14167 else
14168   echo "$as_me: failed program was:" >&5
14169 sed 's/^/| /' conftest.$ac_ext >&5
14170
14171         pgac_cv_funcname_function_support=no
14172 fi
14173
14174 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14175 fi
14176 { echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
14177 echo "${ECHO_T}$pgac_cv_funcname_function_support" >&6; }
14178 if test x"$pgac_cv_funcname_function_support" = xyes ; then
14179
14180 cat >>confdefs.h <<\_ACEOF
14181 #define HAVE_FUNCNAME__FUNCTION 1
14182 _ACEOF
14183
14184 fi
14185 fi
14186 { echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14187 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
14188 if test "${ac_cv_struct_tm+set}" = set; then
14189   echo $ECHO_N "(cached) $ECHO_C" >&6
14190 else
14191   cat >conftest.$ac_ext <<_ACEOF
14192 /* confdefs.h.  */
14193 _ACEOF
14194 cat confdefs.h >>conftest.$ac_ext
14195 cat >>conftest.$ac_ext <<_ACEOF
14196 /* end confdefs.h.  */
14197 #include <sys/types.h>
14198 #include <time.h>
14199
14200 int
14201 main ()
14202 {
14203 struct tm tm;
14204                                      int *p = &tm.tm_sec;
14205                                      return !p;
14206   ;
14207   return 0;
14208 }
14209 _ACEOF
14210 rm -f conftest.$ac_objext
14211 if { (ac_try="$ac_compile"
14212 case "(($ac_try" in
14213   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14214   *) ac_try_echo=$ac_try;;
14215 esac
14216 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14217   (eval "$ac_compile") 2>conftest.er1
14218   ac_status=$?
14219   grep -v '^ *+' conftest.er1 >conftest.err
14220   rm -f conftest.er1
14221   cat conftest.err >&5
14222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14223   (exit $ac_status); } && {
14224          test -z "$ac_c_werror_flag" ||
14225          test ! -s conftest.err
14226        } && test -s conftest.$ac_objext; then
14227   ac_cv_struct_tm=time.h
14228 else
14229   echo "$as_me: failed program was:" >&5
14230 sed 's/^/| /' conftest.$ac_ext >&5
14231
14232         ac_cv_struct_tm=sys/time.h
14233 fi
14234
14235 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14236 fi
14237 { echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14238 echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
14239 if test $ac_cv_struct_tm = sys/time.h; then
14240
14241 cat >>confdefs.h <<\_ACEOF
14242 #define TM_IN_SYS_TIME 1
14243 _ACEOF
14244
14245 fi
14246
14247 { echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14248 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
14249 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14250   echo $ECHO_N "(cached) $ECHO_C" >&6
14251 else
14252   cat >conftest.$ac_ext <<_ACEOF
14253 /* confdefs.h.  */
14254 _ACEOF
14255 cat confdefs.h >>conftest.$ac_ext
14256 cat >>conftest.$ac_ext <<_ACEOF
14257 /* end confdefs.h.  */
14258 #include <sys/types.h>
14259 #include <$ac_cv_struct_tm>
14260
14261
14262 int
14263 main ()
14264 {
14265 static struct tm ac_aggr;
14266 if (ac_aggr.tm_zone)
14267 return 0;
14268   ;
14269   return 0;
14270 }
14271 _ACEOF
14272 rm -f conftest.$ac_objext
14273 if { (ac_try="$ac_compile"
14274 case "(($ac_try" in
14275   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14276   *) ac_try_echo=$ac_try;;
14277 esac
14278 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14279   (eval "$ac_compile") 2>conftest.er1
14280   ac_status=$?
14281   grep -v '^ *+' conftest.er1 >conftest.err
14282   rm -f conftest.er1
14283   cat conftest.err >&5
14284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14285   (exit $ac_status); } && {
14286          test -z "$ac_c_werror_flag" ||
14287          test ! -s conftest.err
14288        } && test -s conftest.$ac_objext; then
14289   ac_cv_member_struct_tm_tm_zone=yes
14290 else
14291   echo "$as_me: failed program was:" >&5
14292 sed 's/^/| /' conftest.$ac_ext >&5
14293
14294         cat >conftest.$ac_ext <<_ACEOF
14295 /* confdefs.h.  */
14296 _ACEOF
14297 cat confdefs.h >>conftest.$ac_ext
14298 cat >>conftest.$ac_ext <<_ACEOF
14299 /* end confdefs.h.  */
14300 #include <sys/types.h>
14301 #include <$ac_cv_struct_tm>
14302
14303
14304 int
14305 main ()
14306 {
14307 static struct tm ac_aggr;
14308 if (sizeof ac_aggr.tm_zone)
14309 return 0;
14310   ;
14311   return 0;
14312 }
14313 _ACEOF
14314 rm -f conftest.$ac_objext
14315 if { (ac_try="$ac_compile"
14316 case "(($ac_try" in
14317   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14318   *) ac_try_echo=$ac_try;;
14319 esac
14320 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14321   (eval "$ac_compile") 2>conftest.er1
14322   ac_status=$?
14323   grep -v '^ *+' conftest.er1 >conftest.err
14324   rm -f conftest.er1
14325   cat conftest.err >&5
14326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14327   (exit $ac_status); } && {
14328          test -z "$ac_c_werror_flag" ||
14329          test ! -s conftest.err
14330        } && test -s conftest.$ac_objext; then
14331   ac_cv_member_struct_tm_tm_zone=yes
14332 else
14333   echo "$as_me: failed program was:" >&5
14334 sed 's/^/| /' conftest.$ac_ext >&5
14335
14336         ac_cv_member_struct_tm_tm_zone=no
14337 fi
14338
14339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14340 fi
14341
14342 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14343 fi
14344 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14345 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
14346 if test $ac_cv_member_struct_tm_tm_zone = yes; then
14347
14348 cat >>confdefs.h <<_ACEOF
14349 #define HAVE_STRUCT_TM_TM_ZONE 1
14350 _ACEOF
14351
14352
14353 fi
14354
14355 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14356
14357 cat >>confdefs.h <<\_ACEOF
14358 #define HAVE_TM_ZONE 1
14359 _ACEOF
14360
14361 fi
14362 { echo "$as_me:$LINENO: checking for tzname" >&5
14363 echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
14364 if test "${ac_cv_var_tzname+set}" = set; then
14365   echo $ECHO_N "(cached) $ECHO_C" >&6
14366 else
14367   cat >conftest.$ac_ext <<_ACEOF
14368 /* confdefs.h.  */
14369 _ACEOF
14370 cat confdefs.h >>conftest.$ac_ext
14371 cat >>conftest.$ac_ext <<_ACEOF
14372 /* end confdefs.h.  */
14373 #include <time.h>
14374 #ifndef tzname /* For SGI.  */
14375 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
14376 #endif
14377
14378 int
14379 main ()
14380 {
14381 atoi(*tzname);
14382   ;
14383   return 0;
14384 }
14385 _ACEOF
14386 rm -f conftest.$ac_objext conftest$ac_exeext
14387 if { (ac_try="$ac_link"
14388 case "(($ac_try" in
14389   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14390   *) ac_try_echo=$ac_try;;
14391 esac
14392 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14393   (eval "$ac_link") 2>conftest.er1
14394   ac_status=$?
14395   grep -v '^ *+' conftest.er1 >conftest.err
14396   rm -f conftest.er1
14397   cat conftest.err >&5
14398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14399   (exit $ac_status); } && {
14400          test -z "$ac_c_werror_flag" ||
14401          test ! -s conftest.err
14402        } && test -s conftest$ac_exeext &&
14403        $as_test_x conftest$ac_exeext; then
14404   ac_cv_var_tzname=yes
14405 else
14406   echo "$as_me: failed program was:" >&5
14407 sed 's/^/| /' conftest.$ac_ext >&5
14408
14409         ac_cv_var_tzname=no
14410 fi
14411
14412 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14413       conftest$ac_exeext conftest.$ac_ext
14414 fi
14415 { echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14416 echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
14417 if test $ac_cv_var_tzname = yes; then
14418
14419 cat >>confdefs.h <<\_ACEOF
14420 #define HAVE_TZNAME 1
14421 _ACEOF
14422
14423 fi
14424
14425 { echo "$as_me:$LINENO: checking for union semun" >&5
14426 echo $ECHO_N "checking for union semun... $ECHO_C" >&6; }
14427 if test "${ac_cv_type_union_semun+set}" = set; then
14428   echo $ECHO_N "(cached) $ECHO_C" >&6
14429 else
14430   cat >conftest.$ac_ext <<_ACEOF
14431 /* confdefs.h.  */
14432 _ACEOF
14433 cat confdefs.h >>conftest.$ac_ext
14434 cat >>conftest.$ac_ext <<_ACEOF
14435 /* end confdefs.h.  */
14436 #include <sys/types.h>
14437 #include <sys/ipc.h>
14438 #include <sys/sem.h>
14439
14440 typedef union semun ac__type_new_;
14441 int
14442 main ()
14443 {
14444 if ((ac__type_new_ *) 0)
14445   return 0;
14446 if (sizeof (ac__type_new_))
14447   return 0;
14448   ;
14449   return 0;
14450 }
14451 _ACEOF
14452 rm -f conftest.$ac_objext
14453 if { (ac_try="$ac_compile"
14454 case "(($ac_try" in
14455   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14456   *) ac_try_echo=$ac_try;;
14457 esac
14458 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14459   (eval "$ac_compile") 2>conftest.er1
14460   ac_status=$?
14461   grep -v '^ *+' conftest.er1 >conftest.err
14462   rm -f conftest.er1
14463   cat conftest.err >&5
14464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14465   (exit $ac_status); } && {
14466          test -z "$ac_c_werror_flag" ||
14467          test ! -s conftest.err
14468        } && test -s conftest.$ac_objext; then
14469   ac_cv_type_union_semun=yes
14470 else
14471   echo "$as_me: failed program was:" >&5
14472 sed 's/^/| /' conftest.$ac_ext >&5
14473
14474         ac_cv_type_union_semun=no
14475 fi
14476
14477 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14478 fi
14479 { echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
14480 echo "${ECHO_T}$ac_cv_type_union_semun" >&6; }
14481 if test $ac_cv_type_union_semun = yes; then
14482
14483 cat >>confdefs.h <<_ACEOF
14484 #define HAVE_UNION_SEMUN 1
14485 _ACEOF
14486
14487
14488 fi
14489
14490 { echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
14491 echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6; }
14492 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
14493   echo $ECHO_N "(cached) $ECHO_C" >&6
14494 else
14495   cat >conftest.$ac_ext <<_ACEOF
14496 /* confdefs.h.  */
14497 _ACEOF
14498 cat confdefs.h >>conftest.$ac_ext
14499 cat >>conftest.$ac_ext <<_ACEOF
14500 /* end confdefs.h.  */
14501 #include <sys/types.h>
14502 #ifdef HAVE_SYS_UN_H
14503 #include <sys/un.h>
14504 #endif
14505
14506
14507 typedef struct sockaddr_un ac__type_new_;
14508 int
14509 main ()
14510 {
14511 if ((ac__type_new_ *) 0)
14512   return 0;
14513 if (sizeof (ac__type_new_))
14514   return 0;
14515   ;
14516   return 0;
14517 }
14518 _ACEOF
14519 rm -f conftest.$ac_objext
14520 if { (ac_try="$ac_compile"
14521 case "(($ac_try" in
14522   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14523   *) ac_try_echo=$ac_try;;
14524 esac
14525 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14526   (eval "$ac_compile") 2>conftest.er1
14527   ac_status=$?
14528   grep -v '^ *+' conftest.er1 >conftest.err
14529   rm -f conftest.er1
14530   cat conftest.err >&5
14531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14532   (exit $ac_status); } && {
14533          test -z "$ac_c_werror_flag" ||
14534          test ! -s conftest.err
14535        } && test -s conftest.$ac_objext; then
14536   ac_cv_type_struct_sockaddr_un=yes
14537 else
14538   echo "$as_me: failed program was:" >&5
14539 sed 's/^/| /' conftest.$ac_ext >&5
14540
14541         ac_cv_type_struct_sockaddr_un=no
14542 fi
14543
14544 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14545 fi
14546 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
14547 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6; }
14548 if test $ac_cv_type_struct_sockaddr_un = yes; then
14549
14550 cat >>confdefs.h <<_ACEOF
14551 #define HAVE_STRUCT_SOCKADDR_UN 1
14552 _ACEOF
14553
14554
14555 cat >>confdefs.h <<\_ACEOF
14556 #define HAVE_UNIX_SOCKETS 1
14557 _ACEOF
14558
14559 fi
14560
14561 { echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
14562 echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6; }
14563 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
14564   echo $ECHO_N "(cached) $ECHO_C" >&6
14565 else
14566   cat >conftest.$ac_ext <<_ACEOF
14567 /* confdefs.h.  */
14568 _ACEOF
14569 cat confdefs.h >>conftest.$ac_ext
14570 cat >>conftest.$ac_ext <<_ACEOF
14571 /* end confdefs.h.  */
14572 #include <sys/types.h>
14573 #ifdef HAVE_SYS_SOCKET_H
14574 #include <sys/socket.h>
14575 #endif
14576
14577
14578 typedef struct sockaddr_storage ac__type_new_;
14579 int
14580 main ()
14581 {
14582 if ((ac__type_new_ *) 0)
14583   return 0;
14584 if (sizeof (ac__type_new_))
14585   return 0;
14586   ;
14587   return 0;
14588 }
14589 _ACEOF
14590 rm -f conftest.$ac_objext
14591 if { (ac_try="$ac_compile"
14592 case "(($ac_try" in
14593   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14594   *) ac_try_echo=$ac_try;;
14595 esac
14596 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14597   (eval "$ac_compile") 2>conftest.er1
14598   ac_status=$?
14599   grep -v '^ *+' conftest.er1 >conftest.err
14600   rm -f conftest.er1
14601   cat conftest.err >&5
14602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14603   (exit $ac_status); } && {
14604          test -z "$ac_c_werror_flag" ||
14605          test ! -s conftest.err
14606        } && test -s conftest.$ac_objext; then
14607   ac_cv_type_struct_sockaddr_storage=yes
14608 else
14609   echo "$as_me: failed program was:" >&5
14610 sed 's/^/| /' conftest.$ac_ext >&5
14611
14612         ac_cv_type_struct_sockaddr_storage=no
14613 fi
14614
14615 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14616 fi
14617 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
14618 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_storage" >&6; }
14619 if test $ac_cv_type_struct_sockaddr_storage = yes; then
14620
14621 cat >>confdefs.h <<_ACEOF
14622 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
14623 _ACEOF
14624
14625
14626 fi
14627
14628 { echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
14629 echo $ECHO_N "checking for struct sockaddr_storage.ss_family... $ECHO_C" >&6; }
14630 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
14631   echo $ECHO_N "(cached) $ECHO_C" >&6
14632 else
14633   cat >conftest.$ac_ext <<_ACEOF
14634 /* confdefs.h.  */
14635 _ACEOF
14636 cat confdefs.h >>conftest.$ac_ext
14637 cat >>conftest.$ac_ext <<_ACEOF
14638 /* end confdefs.h.  */
14639 #include <sys/types.h>
14640 #ifdef HAVE_SYS_SOCKET_H
14641 #include <sys/socket.h>
14642 #endif
14643
14644
14645 int
14646 main ()
14647 {
14648 static struct sockaddr_storage ac_aggr;
14649 if (ac_aggr.ss_family)
14650 return 0;
14651   ;
14652   return 0;
14653 }
14654 _ACEOF
14655 rm -f conftest.$ac_objext
14656 if { (ac_try="$ac_compile"
14657 case "(($ac_try" in
14658   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14659   *) ac_try_echo=$ac_try;;
14660 esac
14661 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14662   (eval "$ac_compile") 2>conftest.er1
14663   ac_status=$?
14664   grep -v '^ *+' conftest.er1 >conftest.err
14665   rm -f conftest.er1
14666   cat conftest.err >&5
14667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14668   (exit $ac_status); } && {
14669          test -z "$ac_c_werror_flag" ||
14670          test ! -s conftest.err
14671        } && test -s conftest.$ac_objext; then
14672   ac_cv_member_struct_sockaddr_storage_ss_family=yes
14673 else
14674   echo "$as_me: failed program was:" >&5
14675 sed 's/^/| /' conftest.$ac_ext >&5
14676
14677         cat >conftest.$ac_ext <<_ACEOF
14678 /* confdefs.h.  */
14679 _ACEOF
14680 cat confdefs.h >>conftest.$ac_ext
14681 cat >>conftest.$ac_ext <<_ACEOF
14682 /* end confdefs.h.  */
14683 #include <sys/types.h>
14684 #ifdef HAVE_SYS_SOCKET_H
14685 #include <sys/socket.h>
14686 #endif
14687
14688
14689 int
14690 main ()
14691 {
14692 static struct sockaddr_storage ac_aggr;
14693 if (sizeof ac_aggr.ss_family)
14694 return 0;
14695   ;
14696   return 0;
14697 }
14698 _ACEOF
14699 rm -f conftest.$ac_objext
14700 if { (ac_try="$ac_compile"
14701 case "(($ac_try" in
14702   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14703   *) ac_try_echo=$ac_try;;
14704 esac
14705 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14706   (eval "$ac_compile") 2>conftest.er1
14707   ac_status=$?
14708   grep -v '^ *+' conftest.er1 >conftest.err
14709   rm -f conftest.er1
14710   cat conftest.err >&5
14711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14712   (exit $ac_status); } && {
14713          test -z "$ac_c_werror_flag" ||
14714          test ! -s conftest.err
14715        } && test -s conftest.$ac_objext; then
14716   ac_cv_member_struct_sockaddr_storage_ss_family=yes
14717 else
14718   echo "$as_me: failed program was:" >&5
14719 sed 's/^/| /' conftest.$ac_ext >&5
14720
14721         ac_cv_member_struct_sockaddr_storage_ss_family=no
14722 fi
14723
14724 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14725 fi
14726
14727 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14728 fi
14729 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
14730 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_family" >&6; }
14731 if test $ac_cv_member_struct_sockaddr_storage_ss_family = yes; then
14732
14733 cat >>confdefs.h <<_ACEOF
14734 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
14735 _ACEOF
14736
14737
14738 fi
14739 { echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
14740 echo $ECHO_N "checking for struct sockaddr_storage.__ss_family... $ECHO_C" >&6; }
14741 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
14742   echo $ECHO_N "(cached) $ECHO_C" >&6
14743 else
14744   cat >conftest.$ac_ext <<_ACEOF
14745 /* confdefs.h.  */
14746 _ACEOF
14747 cat confdefs.h >>conftest.$ac_ext
14748 cat >>conftest.$ac_ext <<_ACEOF
14749 /* end confdefs.h.  */
14750 #include <sys/types.h>
14751 #ifdef HAVE_SYS_SOCKET_H
14752 #include <sys/socket.h>
14753 #endif
14754
14755
14756 int
14757 main ()
14758 {
14759 static struct sockaddr_storage ac_aggr;
14760 if (ac_aggr.__ss_family)
14761 return 0;
14762   ;
14763   return 0;
14764 }
14765 _ACEOF
14766 rm -f conftest.$ac_objext
14767 if { (ac_try="$ac_compile"
14768 case "(($ac_try" in
14769   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14770   *) ac_try_echo=$ac_try;;
14771 esac
14772 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14773   (eval "$ac_compile") 2>conftest.er1
14774   ac_status=$?
14775   grep -v '^ *+' conftest.er1 >conftest.err
14776   rm -f conftest.er1
14777   cat conftest.err >&5
14778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14779   (exit $ac_status); } && {
14780          test -z "$ac_c_werror_flag" ||
14781          test ! -s conftest.err
14782        } && test -s conftest.$ac_objext; then
14783   ac_cv_member_struct_sockaddr_storage___ss_family=yes
14784 else
14785   echo "$as_me: failed program was:" >&5
14786 sed 's/^/| /' conftest.$ac_ext >&5
14787
14788         cat >conftest.$ac_ext <<_ACEOF
14789 /* confdefs.h.  */
14790 _ACEOF
14791 cat confdefs.h >>conftest.$ac_ext
14792 cat >>conftest.$ac_ext <<_ACEOF
14793 /* end confdefs.h.  */
14794 #include <sys/types.h>
14795 #ifdef HAVE_SYS_SOCKET_H
14796 #include <sys/socket.h>
14797 #endif
14798
14799
14800 int
14801 main ()
14802 {
14803 static struct sockaddr_storage ac_aggr;
14804 if (sizeof ac_aggr.__ss_family)
14805 return 0;
14806   ;
14807   return 0;
14808 }
14809 _ACEOF
14810 rm -f conftest.$ac_objext
14811 if { (ac_try="$ac_compile"
14812 case "(($ac_try" in
14813   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14814   *) ac_try_echo=$ac_try;;
14815 esac
14816 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14817   (eval "$ac_compile") 2>conftest.er1
14818   ac_status=$?
14819   grep -v '^ *+' conftest.er1 >conftest.err
14820   rm -f conftest.er1
14821   cat conftest.err >&5
14822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14823   (exit $ac_status); } && {
14824          test -z "$ac_c_werror_flag" ||
14825          test ! -s conftest.err
14826        } && test -s conftest.$ac_objext; then
14827   ac_cv_member_struct_sockaddr_storage___ss_family=yes
14828 else
14829   echo "$as_me: failed program was:" >&5
14830 sed 's/^/| /' conftest.$ac_ext >&5
14831
14832         ac_cv_member_struct_sockaddr_storage___ss_family=no
14833 fi
14834
14835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14836 fi
14837
14838 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14839 fi
14840 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
14841 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_family" >&6; }
14842 if test $ac_cv_member_struct_sockaddr_storage___ss_family = yes; then
14843
14844 cat >>confdefs.h <<_ACEOF
14845 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
14846 _ACEOF
14847
14848
14849 fi
14850 { echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
14851 echo $ECHO_N "checking for struct sockaddr_storage.ss_len... $ECHO_C" >&6; }
14852 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
14853   echo $ECHO_N "(cached) $ECHO_C" >&6
14854 else
14855   cat >conftest.$ac_ext <<_ACEOF
14856 /* confdefs.h.  */
14857 _ACEOF
14858 cat confdefs.h >>conftest.$ac_ext
14859 cat >>conftest.$ac_ext <<_ACEOF
14860 /* end confdefs.h.  */
14861 #include <sys/types.h>
14862 #ifdef HAVE_SYS_SOCKET_H
14863 #include <sys/socket.h>
14864 #endif
14865
14866
14867 int
14868 main ()
14869 {
14870 static struct sockaddr_storage ac_aggr;
14871 if (ac_aggr.ss_len)
14872 return 0;
14873   ;
14874   return 0;
14875 }
14876 _ACEOF
14877 rm -f conftest.$ac_objext
14878 if { (ac_try="$ac_compile"
14879 case "(($ac_try" in
14880   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14881   *) ac_try_echo=$ac_try;;
14882 esac
14883 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14884   (eval "$ac_compile") 2>conftest.er1
14885   ac_status=$?
14886   grep -v '^ *+' conftest.er1 >conftest.err
14887   rm -f conftest.er1
14888   cat conftest.err >&5
14889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14890   (exit $ac_status); } && {
14891          test -z "$ac_c_werror_flag" ||
14892          test ! -s conftest.err
14893        } && test -s conftest.$ac_objext; then
14894   ac_cv_member_struct_sockaddr_storage_ss_len=yes
14895 else
14896   echo "$as_me: failed program was:" >&5
14897 sed 's/^/| /' conftest.$ac_ext >&5
14898
14899         cat >conftest.$ac_ext <<_ACEOF
14900 /* confdefs.h.  */
14901 _ACEOF
14902 cat confdefs.h >>conftest.$ac_ext
14903 cat >>conftest.$ac_ext <<_ACEOF
14904 /* end confdefs.h.  */
14905 #include <sys/types.h>
14906 #ifdef HAVE_SYS_SOCKET_H
14907 #include <sys/socket.h>
14908 #endif
14909
14910
14911 int
14912 main ()
14913 {
14914 static struct sockaddr_storage ac_aggr;
14915 if (sizeof ac_aggr.ss_len)
14916 return 0;
14917   ;
14918   return 0;
14919 }
14920 _ACEOF
14921 rm -f conftest.$ac_objext
14922 if { (ac_try="$ac_compile"
14923 case "(($ac_try" in
14924   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14925   *) ac_try_echo=$ac_try;;
14926 esac
14927 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14928   (eval "$ac_compile") 2>conftest.er1
14929   ac_status=$?
14930   grep -v '^ *+' conftest.er1 >conftest.err
14931   rm -f conftest.er1
14932   cat conftest.err >&5
14933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14934   (exit $ac_status); } && {
14935          test -z "$ac_c_werror_flag" ||
14936          test ! -s conftest.err
14937        } && test -s conftest.$ac_objext; then
14938   ac_cv_member_struct_sockaddr_storage_ss_len=yes
14939 else
14940   echo "$as_me: failed program was:" >&5
14941 sed 's/^/| /' conftest.$ac_ext >&5
14942
14943         ac_cv_member_struct_sockaddr_storage_ss_len=no
14944 fi
14945
14946 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14947 fi
14948
14949 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14950 fi
14951 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
14952 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_len" >&6; }
14953 if test $ac_cv_member_struct_sockaddr_storage_ss_len = yes; then
14954
14955 cat >>confdefs.h <<_ACEOF
14956 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
14957 _ACEOF
14958
14959
14960 fi
14961 { echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
14962 echo $ECHO_N "checking for struct sockaddr_storage.__ss_len... $ECHO_C" >&6; }
14963 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
14964   echo $ECHO_N "(cached) $ECHO_C" >&6
14965 else
14966   cat >conftest.$ac_ext <<_ACEOF
14967 /* confdefs.h.  */
14968 _ACEOF
14969 cat confdefs.h >>conftest.$ac_ext
14970 cat >>conftest.$ac_ext <<_ACEOF
14971 /* end confdefs.h.  */
14972 #include <sys/types.h>
14973 #ifdef HAVE_SYS_SOCKET_H
14974 #include <sys/socket.h>
14975 #endif
14976
14977
14978 int
14979 main ()
14980 {
14981 static struct sockaddr_storage ac_aggr;
14982 if (ac_aggr.__ss_len)
14983 return 0;
14984   ;
14985   return 0;
14986 }
14987 _ACEOF
14988 rm -f conftest.$ac_objext
14989 if { (ac_try="$ac_compile"
14990 case "(($ac_try" in
14991   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14992   *) ac_try_echo=$ac_try;;
14993 esac
14994 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14995   (eval "$ac_compile") 2>conftest.er1
14996   ac_status=$?
14997   grep -v '^ *+' conftest.er1 >conftest.err
14998   rm -f conftest.er1
14999   cat conftest.err >&5
15000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15001   (exit $ac_status); } && {
15002          test -z "$ac_c_werror_flag" ||
15003          test ! -s conftest.err
15004        } && test -s conftest.$ac_objext; then
15005   ac_cv_member_struct_sockaddr_storage___ss_len=yes
15006 else
15007   echo "$as_me: failed program was:" >&5
15008 sed 's/^/| /' conftest.$ac_ext >&5
15009
15010         cat >conftest.$ac_ext <<_ACEOF
15011 /* confdefs.h.  */
15012 _ACEOF
15013 cat confdefs.h >>conftest.$ac_ext
15014 cat >>conftest.$ac_ext <<_ACEOF
15015 /* end confdefs.h.  */
15016 #include <sys/types.h>
15017 #ifdef HAVE_SYS_SOCKET_H
15018 #include <sys/socket.h>
15019 #endif
15020
15021
15022 int
15023 main ()
15024 {
15025 static struct sockaddr_storage ac_aggr;
15026 if (sizeof ac_aggr.__ss_len)
15027 return 0;
15028   ;
15029   return 0;
15030 }
15031 _ACEOF
15032 rm -f conftest.$ac_objext
15033 if { (ac_try="$ac_compile"
15034 case "(($ac_try" in
15035   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15036   *) ac_try_echo=$ac_try;;
15037 esac
15038 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15039   (eval "$ac_compile") 2>conftest.er1
15040   ac_status=$?
15041   grep -v '^ *+' conftest.er1 >conftest.err
15042   rm -f conftest.er1
15043   cat conftest.err >&5
15044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15045   (exit $ac_status); } && {
15046          test -z "$ac_c_werror_flag" ||
15047          test ! -s conftest.err
15048        } && test -s conftest.$ac_objext; then
15049   ac_cv_member_struct_sockaddr_storage___ss_len=yes
15050 else
15051   echo "$as_me: failed program was:" >&5
15052 sed 's/^/| /' conftest.$ac_ext >&5
15053
15054         ac_cv_member_struct_sockaddr_storage___ss_len=no
15055 fi
15056
15057 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15058 fi
15059
15060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15061 fi
15062 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
15063 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_len" >&6; }
15064 if test $ac_cv_member_struct_sockaddr_storage___ss_len = yes; then
15065
15066 cat >>confdefs.h <<_ACEOF
15067 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
15068 _ACEOF
15069
15070
15071 fi
15072 { echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
15073 echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6; }
15074 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
15075   echo $ECHO_N "(cached) $ECHO_C" >&6
15076 else
15077   cat >conftest.$ac_ext <<_ACEOF
15078 /* confdefs.h.  */
15079 _ACEOF
15080 cat confdefs.h >>conftest.$ac_ext
15081 cat >>conftest.$ac_ext <<_ACEOF
15082 /* end confdefs.h.  */
15083 #include <sys/types.h>
15084 #ifdef HAVE_SYS_SOCKET_H
15085 #include <sys/socket.h>
15086 #endif
15087
15088
15089 int
15090 main ()
15091 {
15092 static struct sockaddr ac_aggr;
15093 if (ac_aggr.sa_len)
15094 return 0;
15095   ;
15096   return 0;
15097 }
15098 _ACEOF
15099 rm -f conftest.$ac_objext
15100 if { (ac_try="$ac_compile"
15101 case "(($ac_try" in
15102   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15103   *) ac_try_echo=$ac_try;;
15104 esac
15105 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15106   (eval "$ac_compile") 2>conftest.er1
15107   ac_status=$?
15108   grep -v '^ *+' conftest.er1 >conftest.err
15109   rm -f conftest.er1
15110   cat conftest.err >&5
15111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15112   (exit $ac_status); } && {
15113          test -z "$ac_c_werror_flag" ||
15114          test ! -s conftest.err
15115        } && test -s conftest.$ac_objext; then
15116   ac_cv_member_struct_sockaddr_sa_len=yes
15117 else
15118   echo "$as_me: failed program was:" >&5
15119 sed 's/^/| /' conftest.$ac_ext >&5
15120
15121         cat >conftest.$ac_ext <<_ACEOF
15122 /* confdefs.h.  */
15123 _ACEOF
15124 cat confdefs.h >>conftest.$ac_ext
15125 cat >>conftest.$ac_ext <<_ACEOF
15126 /* end confdefs.h.  */
15127 #include <sys/types.h>
15128 #ifdef HAVE_SYS_SOCKET_H
15129 #include <sys/socket.h>
15130 #endif
15131
15132
15133 int
15134 main ()
15135 {
15136 static struct sockaddr ac_aggr;
15137 if (sizeof ac_aggr.sa_len)
15138 return 0;
15139   ;
15140   return 0;
15141 }
15142 _ACEOF
15143 rm -f conftest.$ac_objext
15144 if { (ac_try="$ac_compile"
15145 case "(($ac_try" in
15146   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15147   *) ac_try_echo=$ac_try;;
15148 esac
15149 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15150   (eval "$ac_compile") 2>conftest.er1
15151   ac_status=$?
15152   grep -v '^ *+' conftest.er1 >conftest.err
15153   rm -f conftest.er1
15154   cat conftest.err >&5
15155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15156   (exit $ac_status); } && {
15157          test -z "$ac_c_werror_flag" ||
15158          test ! -s conftest.err
15159        } && test -s conftest.$ac_objext; then
15160   ac_cv_member_struct_sockaddr_sa_len=yes
15161 else
15162   echo "$as_me: failed program was:" >&5
15163 sed 's/^/| /' conftest.$ac_ext >&5
15164
15165         ac_cv_member_struct_sockaddr_sa_len=no
15166 fi
15167
15168 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15169 fi
15170
15171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15172 fi
15173 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
15174 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6; }
15175 if test $ac_cv_member_struct_sockaddr_sa_len = yes; then
15176
15177 cat >>confdefs.h <<_ACEOF
15178 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
15179 _ACEOF
15180
15181
15182 fi
15183
15184 { echo "$as_me:$LINENO: checking for struct addrinfo" >&5
15185 echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6; }
15186 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
15187   echo $ECHO_N "(cached) $ECHO_C" >&6
15188 else
15189   cat >conftest.$ac_ext <<_ACEOF
15190 /* confdefs.h.  */
15191 _ACEOF
15192 cat confdefs.h >>conftest.$ac_ext
15193 cat >>conftest.$ac_ext <<_ACEOF
15194 /* end confdefs.h.  */
15195 #include <sys/types.h>
15196 #include <sys/socket.h>
15197 #include <netdb.h>
15198
15199
15200 typedef struct addrinfo ac__type_new_;
15201 int
15202 main ()
15203 {
15204 if ((ac__type_new_ *) 0)
15205   return 0;
15206 if (sizeof (ac__type_new_))
15207   return 0;
15208   ;
15209   return 0;
15210 }
15211 _ACEOF
15212 rm -f conftest.$ac_objext
15213 if { (ac_try="$ac_compile"
15214 case "(($ac_try" in
15215   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15216   *) ac_try_echo=$ac_try;;
15217 esac
15218 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15219   (eval "$ac_compile") 2>conftest.er1
15220   ac_status=$?
15221   grep -v '^ *+' conftest.er1 >conftest.err
15222   rm -f conftest.er1
15223   cat conftest.err >&5
15224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15225   (exit $ac_status); } && {
15226          test -z "$ac_c_werror_flag" ||
15227          test ! -s conftest.err
15228        } && test -s conftest.$ac_objext; then
15229   ac_cv_type_struct_addrinfo=yes
15230 else
15231   echo "$as_me: failed program was:" >&5
15232 sed 's/^/| /' conftest.$ac_ext >&5
15233
15234         ac_cv_type_struct_addrinfo=no
15235 fi
15236
15237 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15238 fi
15239 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
15240 echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6; }
15241 if test $ac_cv_type_struct_addrinfo = yes; then
15242
15243 cat >>confdefs.h <<_ACEOF
15244 #define HAVE_STRUCT_ADDRINFO 1
15245 _ACEOF
15246
15247
15248 fi
15249
15250
15251 { echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
15252 echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6; }
15253 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
15254   echo $ECHO_N "(cached) $ECHO_C" >&6
15255 else
15256   cat >conftest.$ac_ext <<_ACEOF
15257 /* confdefs.h.  */
15258 _ACEOF
15259 cat confdefs.h >>conftest.$ac_ext
15260 cat >>conftest.$ac_ext <<_ACEOF
15261 /* end confdefs.h.  */
15262 #include <sys/param.h>
15263 #include <sys/types.h>
15264 #include <sys/socket.h>
15265 #include <sys/ucred.h>
15266
15267 typedef struct cmsgcred ac__type_new_;
15268 int
15269 main ()
15270 {
15271 if ((ac__type_new_ *) 0)
15272   return 0;
15273 if (sizeof (ac__type_new_))
15274   return 0;
15275   ;
15276   return 0;
15277 }
15278 _ACEOF
15279 rm -f conftest.$ac_objext
15280 if { (ac_try="$ac_compile"
15281 case "(($ac_try" in
15282   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15283   *) ac_try_echo=$ac_try;;
15284 esac
15285 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15286   (eval "$ac_compile") 2>conftest.er1
15287   ac_status=$?
15288   grep -v '^ *+' conftest.er1 >conftest.err
15289   rm -f conftest.er1
15290   cat conftest.err >&5
15291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15292   (exit $ac_status); } && {
15293          test -z "$ac_c_werror_flag" ||
15294          test ! -s conftest.err
15295        } && test -s conftest.$ac_objext; then
15296   ac_cv_type_struct_cmsgcred=yes
15297 else
15298   echo "$as_me: failed program was:" >&5
15299 sed 's/^/| /' conftest.$ac_ext >&5
15300
15301         ac_cv_type_struct_cmsgcred=no
15302 fi
15303
15304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15305 fi
15306 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
15307 echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6; }
15308 if test $ac_cv_type_struct_cmsgcred = yes; then
15309
15310 cat >>confdefs.h <<_ACEOF
15311 #define HAVE_STRUCT_CMSGCRED 1
15312 _ACEOF
15313
15314
15315 fi
15316 { echo "$as_me:$LINENO: checking for struct fcred" >&5
15317 echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6; }
15318 if test "${ac_cv_type_struct_fcred+set}" = set; then
15319   echo $ECHO_N "(cached) $ECHO_C" >&6
15320 else
15321   cat >conftest.$ac_ext <<_ACEOF
15322 /* confdefs.h.  */
15323 _ACEOF
15324 cat confdefs.h >>conftest.$ac_ext
15325 cat >>conftest.$ac_ext <<_ACEOF
15326 /* end confdefs.h.  */
15327 #include <sys/param.h>
15328 #include <sys/types.h>
15329 #include <sys/socket.h>
15330 #include <sys/ucred.h>
15331
15332 typedef struct fcred ac__type_new_;
15333 int
15334 main ()
15335 {
15336 if ((ac__type_new_ *) 0)
15337   return 0;
15338 if (sizeof (ac__type_new_))
15339   return 0;
15340   ;
15341   return 0;
15342 }
15343 _ACEOF
15344 rm -f conftest.$ac_objext
15345 if { (ac_try="$ac_compile"
15346 case "(($ac_try" in
15347   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15348   *) ac_try_echo=$ac_try;;
15349 esac
15350 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15351   (eval "$ac_compile") 2>conftest.er1
15352   ac_status=$?
15353   grep -v '^ *+' conftest.er1 >conftest.err
15354   rm -f conftest.er1
15355   cat conftest.err >&5
15356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15357   (exit $ac_status); } && {
15358          test -z "$ac_c_werror_flag" ||
15359          test ! -s conftest.err
15360        } && test -s conftest.$ac_objext; then
15361   ac_cv_type_struct_fcred=yes
15362 else
15363   echo "$as_me: failed program was:" >&5
15364 sed 's/^/| /' conftest.$ac_ext >&5
15365
15366         ac_cv_type_struct_fcred=no
15367 fi
15368
15369 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15370 fi
15371 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
15372 echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6; }
15373 if test $ac_cv_type_struct_fcred = yes; then
15374
15375 cat >>confdefs.h <<_ACEOF
15376 #define HAVE_STRUCT_FCRED 1
15377 _ACEOF
15378
15379
15380 fi
15381 { echo "$as_me:$LINENO: checking for struct sockcred" >&5
15382 echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6; }
15383 if test "${ac_cv_type_struct_sockcred+set}" = set; then
15384   echo $ECHO_N "(cached) $ECHO_C" >&6
15385 else
15386   cat >conftest.$ac_ext <<_ACEOF
15387 /* confdefs.h.  */
15388 _ACEOF
15389 cat confdefs.h >>conftest.$ac_ext
15390 cat >>conftest.$ac_ext <<_ACEOF
15391 /* end confdefs.h.  */
15392 #include <sys/param.h>
15393 #include <sys/types.h>
15394 #include <sys/socket.h>
15395 #include <sys/ucred.h>
15396
15397 typedef struct sockcred ac__type_new_;
15398 int
15399 main ()
15400 {
15401 if ((ac__type_new_ *) 0)
15402   return 0;
15403 if (sizeof (ac__type_new_))
15404   return 0;
15405   ;
15406   return 0;
15407 }
15408 _ACEOF
15409 rm -f conftest.$ac_objext
15410 if { (ac_try="$ac_compile"
15411 case "(($ac_try" in
15412   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15413   *) ac_try_echo=$ac_try;;
15414 esac
15415 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15416   (eval "$ac_compile") 2>conftest.er1
15417   ac_status=$?
15418   grep -v '^ *+' conftest.er1 >conftest.err
15419   rm -f conftest.er1
15420   cat conftest.err >&5
15421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15422   (exit $ac_status); } && {
15423          test -z "$ac_c_werror_flag" ||
15424          test ! -s conftest.err
15425        } && test -s conftest.$ac_objext; then
15426   ac_cv_type_struct_sockcred=yes
15427 else
15428   echo "$as_me: failed program was:" >&5
15429 sed 's/^/| /' conftest.$ac_ext >&5
15430
15431         ac_cv_type_struct_sockcred=no
15432 fi
15433
15434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15435 fi
15436 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
15437 echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6; }
15438 if test $ac_cv_type_struct_sockcred = yes; then
15439
15440 cat >>confdefs.h <<_ACEOF
15441 #define HAVE_STRUCT_SOCKCRED 1
15442 _ACEOF
15443
15444
15445 fi
15446
15447
15448 { echo "$as_me:$LINENO: checking for struct option" >&5
15449 echo $ECHO_N "checking for struct option... $ECHO_C" >&6; }
15450 if test "${ac_cv_type_struct_option+set}" = set; then
15451   echo $ECHO_N "(cached) $ECHO_C" >&6
15452 else
15453   cat >conftest.$ac_ext <<_ACEOF
15454 /* confdefs.h.  */
15455 _ACEOF
15456 cat confdefs.h >>conftest.$ac_ext
15457 cat >>conftest.$ac_ext <<_ACEOF
15458 /* end confdefs.h.  */
15459 #ifdef HAVE_GETOPT_H
15460 #include <getopt.h>
15461 #endif
15462
15463 typedef struct option ac__type_new_;
15464 int
15465 main ()
15466 {
15467 if ((ac__type_new_ *) 0)
15468   return 0;
15469 if (sizeof (ac__type_new_))
15470   return 0;
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_type_struct_option=yes
15493 else
15494   echo "$as_me: failed program was:" >&5
15495 sed 's/^/| /' conftest.$ac_ext >&5
15496
15497         ac_cv_type_struct_option=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_type_struct_option" >&5
15503 echo "${ECHO_T}$ac_cv_type_struct_option" >&6; }
15504 if test $ac_cv_type_struct_option = yes; then
15505
15506 cat >>confdefs.h <<_ACEOF
15507 #define HAVE_STRUCT_OPTION 1
15508 _ACEOF
15509
15510
15511 fi
15512
15513
15514 if test "$with_zlib" = yes; then
15515   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
15516   # did not).  While we could work around the lack of z_streamp, it
15517   # seems unwise to encourage people to use such old zlib versions...
15518   { echo "$as_me:$LINENO: checking for z_streamp" >&5
15519 echo $ECHO_N "checking for z_streamp... $ECHO_C" >&6; }
15520 if test "${ac_cv_type_z_streamp+set}" = set; then
15521   echo $ECHO_N "(cached) $ECHO_C" >&6
15522 else
15523   cat >conftest.$ac_ext <<_ACEOF
15524 /* confdefs.h.  */
15525 _ACEOF
15526 cat confdefs.h >>conftest.$ac_ext
15527 cat >>conftest.$ac_ext <<_ACEOF
15528 /* end confdefs.h.  */
15529 #include <zlib.h>
15530
15531 typedef z_streamp ac__type_new_;
15532 int
15533 main ()
15534 {
15535 if ((ac__type_new_ *) 0)
15536   return 0;
15537 if (sizeof (ac__type_new_))
15538   return 0;
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_type_z_streamp=yes
15561 else
15562   echo "$as_me: failed program was:" >&5
15563 sed 's/^/| /' conftest.$ac_ext >&5
15564
15565         ac_cv_type_z_streamp=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_type_z_streamp" >&5
15571 echo "${ECHO_T}$ac_cv_type_z_streamp" >&6; }
15572 if test $ac_cv_type_z_streamp = yes; then
15573   :
15574 else
15575   { { echo "$as_me:$LINENO: error: zlib version is too old
15576 Use --without-zlib to disable zlib support." >&5
15577 echo "$as_me: error: zlib version is too old
15578 Use --without-zlib to disable zlib support." >&2;}
15579    { (exit 1); exit 1; }; }
15580 fi
15581
15582 fi
15583
15584 if test "$with_krb5" = yes; then
15585 # Check for differences between MIT and Heimdal (KTH) releases
15586   { echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
15587 echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6; }
15588 if test "${ac_cv_member_krb5_ticket_enc_part2+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 #include <krb5.h>
15598
15599 int
15600 main ()
15601 {
15602 static krb5_ticket ac_aggr;
15603 if (ac_aggr.enc_part2)
15604 return 0;
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_member_krb5_ticket_enc_part2=yes
15627 else
15628   echo "$as_me: failed program was:" >&5
15629 sed 's/^/| /' conftest.$ac_ext >&5
15630
15631         cat >conftest.$ac_ext <<_ACEOF
15632 /* confdefs.h.  */
15633 _ACEOF
15634 cat confdefs.h >>conftest.$ac_ext
15635 cat >>conftest.$ac_ext <<_ACEOF
15636 /* end confdefs.h.  */
15637 #include <krb5.h>
15638
15639 int
15640 main ()
15641 {
15642 static krb5_ticket ac_aggr;
15643 if (sizeof ac_aggr.enc_part2)
15644 return 0;
15645   ;
15646   return 0;
15647 }
15648 _ACEOF
15649 rm -f conftest.$ac_objext
15650 if { (ac_try="$ac_compile"
15651 case "(($ac_try" in
15652   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15653   *) ac_try_echo=$ac_try;;
15654 esac
15655 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15656   (eval "$ac_compile") 2>conftest.er1
15657   ac_status=$?
15658   grep -v '^ *+' conftest.er1 >conftest.err
15659   rm -f conftest.er1
15660   cat conftest.err >&5
15661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15662   (exit $ac_status); } && {
15663          test -z "$ac_c_werror_flag" ||
15664          test ! -s conftest.err
15665        } && test -s conftest.$ac_objext; then
15666   ac_cv_member_krb5_ticket_enc_part2=yes
15667 else
15668   echo "$as_me: failed program was:" >&5
15669 sed 's/^/| /' conftest.$ac_ext >&5
15670
15671         ac_cv_member_krb5_ticket_enc_part2=no
15672 fi
15673
15674 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15675 fi
15676
15677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15678 fi
15679 { echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
15680 echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6; }
15681 if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
15682
15683 cat >>confdefs.h <<_ACEOF
15684 #define HAVE_KRB5_TICKET_ENC_PART2 1
15685 _ACEOF
15686
15687
15688 else
15689   { echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
15690 echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6; }
15691 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
15692   echo $ECHO_N "(cached) $ECHO_C" >&6
15693 else
15694   cat >conftest.$ac_ext <<_ACEOF
15695 /* confdefs.h.  */
15696 _ACEOF
15697 cat confdefs.h >>conftest.$ac_ext
15698 cat >>conftest.$ac_ext <<_ACEOF
15699 /* end confdefs.h.  */
15700 #include <krb5.h>
15701
15702 int
15703 main ()
15704 {
15705 static krb5_ticket ac_aggr;
15706 if (ac_aggr.client)
15707 return 0;
15708   ;
15709   return 0;
15710 }
15711 _ACEOF
15712 rm -f conftest.$ac_objext
15713 if { (ac_try="$ac_compile"
15714 case "(($ac_try" in
15715   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15716   *) ac_try_echo=$ac_try;;
15717 esac
15718 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15719   (eval "$ac_compile") 2>conftest.er1
15720   ac_status=$?
15721   grep -v '^ *+' conftest.er1 >conftest.err
15722   rm -f conftest.er1
15723   cat conftest.err >&5
15724   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15725   (exit $ac_status); } && {
15726          test -z "$ac_c_werror_flag" ||
15727          test ! -s conftest.err
15728        } && test -s conftest.$ac_objext; then
15729   ac_cv_member_krb5_ticket_client=yes
15730 else
15731   echo "$as_me: failed program was:" >&5
15732 sed 's/^/| /' conftest.$ac_ext >&5
15733
15734         cat >conftest.$ac_ext <<_ACEOF
15735 /* confdefs.h.  */
15736 _ACEOF
15737 cat confdefs.h >>conftest.$ac_ext
15738 cat >>conftest.$ac_ext <<_ACEOF
15739 /* end confdefs.h.  */
15740 #include <krb5.h>
15741
15742 int
15743 main ()
15744 {
15745 static krb5_ticket ac_aggr;
15746 if (sizeof ac_aggr.client)
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_member_krb5_ticket_client=yes
15770 else
15771   echo "$as_me: failed program was:" >&5
15772 sed 's/^/| /' conftest.$ac_ext >&5
15773
15774         ac_cv_member_krb5_ticket_client=no
15775 fi
15776
15777 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15778 fi
15779
15780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15781 fi
15782 { echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
15783 echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6; }
15784 if test $ac_cv_member_krb5_ticket_client = yes; then
15785
15786 cat >>confdefs.h <<_ACEOF
15787 #define HAVE_KRB5_TICKET_CLIENT 1
15788 _ACEOF
15789
15790
15791 else
15792   { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
15793 echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
15794    { (exit 1); exit 1; }; }
15795 fi
15796
15797 fi
15798
15799   { echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
15800 echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6; }
15801 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
15802   echo $ECHO_N "(cached) $ECHO_C" >&6
15803 else
15804   cat >conftest.$ac_ext <<_ACEOF
15805 /* confdefs.h.  */
15806 _ACEOF
15807 cat confdefs.h >>conftest.$ac_ext
15808 cat >>conftest.$ac_ext <<_ACEOF
15809 /* end confdefs.h.  */
15810 #include <krb5.h>
15811
15812 int
15813 main ()
15814 {
15815 static krb5_error ac_aggr;
15816 if (ac_aggr.text.data)
15817 return 0;
15818   ;
15819   return 0;
15820 }
15821 _ACEOF
15822 rm -f conftest.$ac_objext
15823 if { (ac_try="$ac_compile"
15824 case "(($ac_try" in
15825   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15826   *) ac_try_echo=$ac_try;;
15827 esac
15828 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15829   (eval "$ac_compile") 2>conftest.er1
15830   ac_status=$?
15831   grep -v '^ *+' conftest.er1 >conftest.err
15832   rm -f conftest.er1
15833   cat conftest.err >&5
15834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15835   (exit $ac_status); } && {
15836          test -z "$ac_c_werror_flag" ||
15837          test ! -s conftest.err
15838        } && test -s conftest.$ac_objext; then
15839   ac_cv_member_krb5_error_text_data=yes
15840 else
15841   echo "$as_me: failed program was:" >&5
15842 sed 's/^/| /' conftest.$ac_ext >&5
15843
15844         cat >conftest.$ac_ext <<_ACEOF
15845 /* confdefs.h.  */
15846 _ACEOF
15847 cat confdefs.h >>conftest.$ac_ext
15848 cat >>conftest.$ac_ext <<_ACEOF
15849 /* end confdefs.h.  */
15850 #include <krb5.h>
15851
15852 int
15853 main ()
15854 {
15855 static krb5_error ac_aggr;
15856 if (sizeof ac_aggr.text.data)
15857 return 0;
15858   ;
15859   return 0;
15860 }
15861 _ACEOF
15862 rm -f conftest.$ac_objext
15863 if { (ac_try="$ac_compile"
15864 case "(($ac_try" in
15865   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15866   *) ac_try_echo=$ac_try;;
15867 esac
15868 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15869   (eval "$ac_compile") 2>conftest.er1
15870   ac_status=$?
15871   grep -v '^ *+' conftest.er1 >conftest.err
15872   rm -f conftest.er1
15873   cat conftest.err >&5
15874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15875   (exit $ac_status); } && {
15876          test -z "$ac_c_werror_flag" ||
15877          test ! -s conftest.err
15878        } && test -s conftest.$ac_objext; then
15879   ac_cv_member_krb5_error_text_data=yes
15880 else
15881   echo "$as_me: failed program was:" >&5
15882 sed 's/^/| /' conftest.$ac_ext >&5
15883
15884         ac_cv_member_krb5_error_text_data=no
15885 fi
15886
15887 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15888 fi
15889
15890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15891 fi
15892 { echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
15893 echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6; }
15894 if test $ac_cv_member_krb5_error_text_data = yes; then
15895
15896 cat >>confdefs.h <<_ACEOF
15897 #define HAVE_KRB5_ERROR_TEXT_DATA 1
15898 _ACEOF
15899
15900
15901 else
15902   { echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
15903 echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6; }
15904 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
15905   echo $ECHO_N "(cached) $ECHO_C" >&6
15906 else
15907   cat >conftest.$ac_ext <<_ACEOF
15908 /* confdefs.h.  */
15909 _ACEOF
15910 cat confdefs.h >>conftest.$ac_ext
15911 cat >>conftest.$ac_ext <<_ACEOF
15912 /* end confdefs.h.  */
15913 #include <krb5.h>
15914
15915 int
15916 main ()
15917 {
15918 static krb5_error ac_aggr;
15919 if (ac_aggr.e_data)
15920 return 0;
15921   ;
15922   return 0;
15923 }
15924 _ACEOF
15925 rm -f conftest.$ac_objext
15926 if { (ac_try="$ac_compile"
15927 case "(($ac_try" in
15928   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15929   *) ac_try_echo=$ac_try;;
15930 esac
15931 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15932   (eval "$ac_compile") 2>conftest.er1
15933   ac_status=$?
15934   grep -v '^ *+' conftest.er1 >conftest.err
15935   rm -f conftest.er1
15936   cat conftest.err >&5
15937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15938   (exit $ac_status); } && {
15939          test -z "$ac_c_werror_flag" ||
15940          test ! -s conftest.err
15941        } && test -s conftest.$ac_objext; then
15942   ac_cv_member_krb5_error_e_data=yes
15943 else
15944   echo "$as_me: failed program was:" >&5
15945 sed 's/^/| /' conftest.$ac_ext >&5
15946
15947         cat >conftest.$ac_ext <<_ACEOF
15948 /* confdefs.h.  */
15949 _ACEOF
15950 cat confdefs.h >>conftest.$ac_ext
15951 cat >>conftest.$ac_ext <<_ACEOF
15952 /* end confdefs.h.  */
15953 #include <krb5.h>
15954
15955 int
15956 main ()
15957 {
15958 static krb5_error ac_aggr;
15959 if (sizeof ac_aggr.e_data)
15960 return 0;
15961   ;
15962   return 0;
15963 }
15964 _ACEOF
15965 rm -f conftest.$ac_objext
15966 if { (ac_try="$ac_compile"
15967 case "(($ac_try" in
15968   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15969   *) ac_try_echo=$ac_try;;
15970 esac
15971 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15972   (eval "$ac_compile") 2>conftest.er1
15973   ac_status=$?
15974   grep -v '^ *+' conftest.er1 >conftest.err
15975   rm -f conftest.er1
15976   cat conftest.err >&5
15977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15978   (exit $ac_status); } && {
15979          test -z "$ac_c_werror_flag" ||
15980          test ! -s conftest.err
15981        } && test -s conftest.$ac_objext; then
15982   ac_cv_member_krb5_error_e_data=yes
15983 else
15984   echo "$as_me: failed program was:" >&5
15985 sed 's/^/| /' conftest.$ac_ext >&5
15986
15987         ac_cv_member_krb5_error_e_data=no
15988 fi
15989
15990 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15991 fi
15992
15993 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15994 fi
15995 { echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
15996 echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6; }
15997 if test $ac_cv_member_krb5_error_e_data = yes; then
15998
15999 cat >>confdefs.h <<_ACEOF
16000 #define HAVE_KRB5_ERROR_E_DATA 1
16001 _ACEOF
16002
16003
16004 else
16005   { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
16006 echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
16007    { (exit 1); exit 1; }; }
16008 fi
16009
16010 fi
16011
16012
16013 # Win32 requires headers to be loaded for __stdcall, so can't use
16014 # AC_CHECK_FUNCS here.
16015   { echo "$as_me:$LINENO: checking for krb5_free_unparsed_name" >&5
16016 echo $ECHO_N "checking for krb5_free_unparsed_name... $ECHO_C" >&6; }
16017   cat >conftest.$ac_ext <<_ACEOF
16018 /* confdefs.h.  */
16019 _ACEOF
16020 cat confdefs.h >>conftest.$ac_ext
16021 cat >>conftest.$ac_ext <<_ACEOF
16022 /* end confdefs.h.  */
16023 #include <krb5.h>
16024 int
16025 main ()
16026 {
16027 krb5_free_unparsed_name(NULL,NULL);
16028   ;
16029   return 0;
16030 }
16031 _ACEOF
16032 rm -f conftest.$ac_objext conftest$ac_exeext
16033 if { (ac_try="$ac_link"
16034 case "(($ac_try" in
16035   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16036   *) ac_try_echo=$ac_try;;
16037 esac
16038 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16039   (eval "$ac_link") 2>conftest.er1
16040   ac_status=$?
16041   grep -v '^ *+' conftest.er1 >conftest.err
16042   rm -f conftest.er1
16043   cat conftest.err >&5
16044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16045   (exit $ac_status); } && {
16046          test -z "$ac_c_werror_flag" ||
16047          test ! -s conftest.err
16048        } && test -s conftest$ac_exeext &&
16049        $as_test_x conftest$ac_exeext; then
16050
16051 cat >>confdefs.h <<\_ACEOF
16052 #define HAVE_KRB5_FREE_UNPARSED_NAME 1
16053 _ACEOF
16054
16055 { echo "$as_me:$LINENO: result: yes" >&5
16056 echo "${ECHO_T}yes" >&6; }
16057 else
16058   echo "$as_me: failed program was:" >&5
16059 sed 's/^/| /' conftest.$ac_ext >&5
16060
16061         { echo "$as_me:$LINENO: result: no" >&5
16062 echo "${ECHO_T}no" >&6; }
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
16069
16070 ##
16071 ## Functions, global variables
16072 ##
16073
16074 { echo "$as_me:$LINENO: checking for int timezone" >&5
16075 echo $ECHO_N "checking for int timezone... $ECHO_C" >&6; }
16076 if test "${pgac_cv_var_int_timezone+set}" = set; then
16077   echo $ECHO_N "(cached) $ECHO_C" >&6
16078 else
16079   cat >conftest.$ac_ext <<_ACEOF
16080 /* confdefs.h.  */
16081 _ACEOF
16082 cat confdefs.h >>conftest.$ac_ext
16083 cat >>conftest.$ac_ext <<_ACEOF
16084 /* end confdefs.h.  */
16085 #include <time.h>
16086 int res;
16087 int
16088 main ()
16089 {
16090 #ifndef __CYGWIN__
16091 res = timezone / 60;
16092 #else
16093 res = _timezone / 60;
16094 #endif
16095   ;
16096   return 0;
16097 }
16098 _ACEOF
16099 rm -f conftest.$ac_objext conftest$ac_exeext
16100 if { (ac_try="$ac_link"
16101 case "(($ac_try" in
16102   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16103   *) ac_try_echo=$ac_try;;
16104 esac
16105 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16106   (eval "$ac_link") 2>conftest.er1
16107   ac_status=$?
16108   grep -v '^ *+' conftest.er1 >conftest.err
16109   rm -f conftest.er1
16110   cat conftest.err >&5
16111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16112   (exit $ac_status); } && {
16113          test -z "$ac_c_werror_flag" ||
16114          test ! -s conftest.err
16115        } && test -s conftest$ac_exeext &&
16116        $as_test_x conftest$ac_exeext; then
16117   pgac_cv_var_int_timezone=yes
16118 else
16119   echo "$as_me: failed program was:" >&5
16120 sed 's/^/| /' conftest.$ac_ext >&5
16121
16122         pgac_cv_var_int_timezone=no
16123 fi
16124
16125 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16126       conftest$ac_exeext conftest.$ac_ext
16127 fi
16128 { echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
16129 echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6; }
16130 if test x"$pgac_cv_var_int_timezone" = xyes ; then
16131
16132 cat >>confdefs.h <<\_ACEOF
16133 #define HAVE_INT_TIMEZONE
16134 _ACEOF
16135
16136 fi
16137 { echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
16138 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6; }
16139  if test "${ac_cv_func_accept_return+set}" = set; then
16140   echo $ECHO_N "(cached) $ECHO_C" >&6
16141 else
16142    if test "${ac_cv_func_accept_arg1+set}" = set; then
16143   echo $ECHO_N "(cached) $ECHO_C" >&6
16144 else
16145     if test "${ac_cv_func_accept_arg2+set}" = set; then
16146   echo $ECHO_N "(cached) $ECHO_C" >&6
16147 else
16148      if test "${ac_cv_func_accept_arg3+set}" = set; then
16149   echo $ECHO_N "(cached) $ECHO_C" >&6
16150 else
16151       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
16152       for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
16153        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
16154         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
16155          cat >conftest.$ac_ext <<_ACEOF
16156 /* confdefs.h.  */
16157 _ACEOF
16158 cat confdefs.h >>conftest.$ac_ext
16159 cat >>conftest.$ac_ext <<_ACEOF
16160 /* end confdefs.h.  */
16161 #ifdef HAVE_SYS_TYPES_H
16162 #include <sys/types.h>
16163 #endif
16164 #ifdef HAVE_SYS_SOCKET_H
16165 #include <sys/socket.h>
16166 #endif
16167 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
16168 int
16169 main ()
16170 {
16171
16172   ;
16173   return 0;
16174 }
16175 _ACEOF
16176 rm -f conftest.$ac_objext
16177 if { (ac_try="$ac_compile"
16178 case "(($ac_try" in
16179   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16180   *) ac_try_echo=$ac_try;;
16181 esac
16182 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16183   (eval "$ac_compile") 2>conftest.er1
16184   ac_status=$?
16185   grep -v '^ *+' conftest.er1 >conftest.err
16186   rm -f conftest.er1
16187   cat conftest.err >&5
16188   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16189   (exit $ac_status); } && {
16190          test -z "$ac_c_werror_flag" ||
16191          test ! -s conftest.err
16192        } && test -s conftest.$ac_objext; then
16193   ac_not_found=no; break 4
16194 else
16195   echo "$as_me: failed program was:" >&5
16196 sed 's/^/| /' conftest.$ac_ext >&5
16197
16198         ac_not_found=yes
16199 fi
16200
16201 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16202        done
16203       done
16204      done
16205     done
16206     if test "$ac_not_found" = yes; then
16207       { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
16208 echo "$as_me: error: could not determine argument types" >&2;}
16209    { (exit 1); exit 1; }; }
16210     fi
16211     if test "$ac_cv_func_accept_arg3" = "void"; then
16212       ac_cv_func_accept_arg3=int
16213     fi
16214
16215 fi
16216
16217 fi
16218
16219 fi
16220
16221 fi
16222  { 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
16223 echo "${ECHO_T}$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
16224
16225 cat >>confdefs.h <<_ACEOF
16226 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
16227 _ACEOF
16228
16229
16230 cat >>confdefs.h <<_ACEOF
16231 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
16232 _ACEOF
16233
16234
16235 cat >>confdefs.h <<_ACEOF
16236 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
16237 _ACEOF
16238
16239
16240 cat >>confdefs.h <<_ACEOF
16241 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
16242 _ACEOF
16243
16244
16245 { echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
16246 echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6; }
16247 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
16248   echo $ECHO_N "(cached) $ECHO_C" >&6
16249 else
16250   cat >conftest.$ac_ext <<_ACEOF
16251 /* confdefs.h.  */
16252 _ACEOF
16253 cat confdefs.h >>conftest.$ac_ext
16254 cat >>conftest.$ac_ext <<_ACEOF
16255 /* end confdefs.h.  */
16256 #include <sys/time.h>
16257 int
16258 main ()
16259 {
16260 struct timeval *tp;
16261 struct timezone *tzp;
16262 gettimeofday(tp,tzp);
16263   ;
16264   return 0;
16265 }
16266 _ACEOF
16267 rm -f conftest.$ac_objext
16268 if { (ac_try="$ac_compile"
16269 case "(($ac_try" in
16270   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16271   *) ac_try_echo=$ac_try;;
16272 esac
16273 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16274   (eval "$ac_compile") 2>conftest.er1
16275   ac_status=$?
16276   grep -v '^ *+' conftest.er1 >conftest.err
16277   rm -f conftest.er1
16278   cat conftest.err >&5
16279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16280   (exit $ac_status); } && {
16281          test -z "$ac_c_werror_flag" ||
16282          test ! -s conftest.err
16283        } && test -s conftest.$ac_objext; then
16284   pgac_cv_func_gettimeofday_1arg=no
16285 else
16286   echo "$as_me: failed program was:" >&5
16287 sed 's/^/| /' conftest.$ac_ext >&5
16288
16289         pgac_cv_func_gettimeofday_1arg=yes
16290 fi
16291
16292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16293 fi
16294 { echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
16295 echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6; }
16296 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
16297
16298 cat >>confdefs.h <<\_ACEOF
16299 #define GETTIMEOFDAY_1ARG
16300 _ACEOF
16301
16302 fi
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327 for ac_func in cbrt dlopen fcvt fdatasync getpeereid getpeerucred getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
16328 do
16329 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16330 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16331 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16332 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16333   echo $ECHO_N "(cached) $ECHO_C" >&6
16334 else
16335   cat >conftest.$ac_ext <<_ACEOF
16336 /* confdefs.h.  */
16337 _ACEOF
16338 cat confdefs.h >>conftest.$ac_ext
16339 cat >>conftest.$ac_ext <<_ACEOF
16340 /* end confdefs.h.  */
16341 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16342    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16343 #define $ac_func innocuous_$ac_func
16344
16345 /* System header to define __stub macros and hopefully few prototypes,
16346     which can conflict with char $ac_func (); below.
16347     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16348     <limits.h> exists even on freestanding compilers.  */
16349
16350 #ifdef __STDC__
16351 # include <limits.h>
16352 #else
16353 # include <assert.h>
16354 #endif
16355
16356 #undef $ac_func
16357
16358 /* Override any GCC internal prototype to avoid an error.
16359    Use char because int might match the return type of a GCC
16360    builtin and then its argument prototype would still apply.  */
16361 #ifdef __cplusplus
16362 extern "C"
16363 #endif
16364 char $ac_func ();
16365 /* The GNU C library defines this for functions which it implements
16366     to always fail with ENOSYS.  Some functions are actually named
16367     something starting with __ and the normal name is an alias.  */
16368 #if defined __stub_$ac_func || defined __stub___$ac_func
16369 choke me
16370 #endif
16371
16372 int
16373 main ()
16374 {
16375 return $ac_func ();
16376   ;
16377   return 0;
16378 }
16379 _ACEOF
16380 rm -f conftest.$ac_objext conftest$ac_exeext
16381 if { (ac_try="$ac_link"
16382 case "(($ac_try" in
16383   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16384   *) ac_try_echo=$ac_try;;
16385 esac
16386 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16387   (eval "$ac_link") 2>conftest.er1
16388   ac_status=$?
16389   grep -v '^ *+' conftest.er1 >conftest.err
16390   rm -f conftest.er1
16391   cat conftest.err >&5
16392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16393   (exit $ac_status); } && {
16394          test -z "$ac_c_werror_flag" ||
16395          test ! -s conftest.err
16396        } && test -s conftest$ac_exeext &&
16397        $as_test_x conftest$ac_exeext; then
16398   eval "$as_ac_var=yes"
16399 else
16400   echo "$as_me: failed program was:" >&5
16401 sed 's/^/| /' conftest.$ac_ext >&5
16402
16403         eval "$as_ac_var=no"
16404 fi
16405
16406 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16407       conftest$ac_exeext conftest.$ac_ext
16408 fi
16409 ac_res=`eval echo '${'$as_ac_var'}'`
16410                { echo "$as_me:$LINENO: result: $ac_res" >&5
16411 echo "${ECHO_T}$ac_res" >&6; }
16412 if test `eval echo '${'$as_ac_var'}'` = yes; then
16413   cat >>confdefs.h <<_ACEOF
16414 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16415 _ACEOF
16416
16417 fi
16418 done
16419
16420
16421 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
16422 # by calling it, 2009-04-02
16423 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
16424 if test "$PORTNAME" != "solaris"; then
16425
16426 for ac_func in posix_fadvise
16427 do
16428 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16429 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16430 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16431 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16432   echo $ECHO_N "(cached) $ECHO_C" >&6
16433 else
16434   cat >conftest.$ac_ext <<_ACEOF
16435 /* confdefs.h.  */
16436 _ACEOF
16437 cat confdefs.h >>conftest.$ac_ext
16438 cat >>conftest.$ac_ext <<_ACEOF
16439 /* end confdefs.h.  */
16440 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16441    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16442 #define $ac_func innocuous_$ac_func
16443
16444 /* System header to define __stub macros and hopefully few prototypes,
16445     which can conflict with char $ac_func (); below.
16446     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16447     <limits.h> exists even on freestanding compilers.  */
16448
16449 #ifdef __STDC__
16450 # include <limits.h>
16451 #else
16452 # include <assert.h>
16453 #endif
16454
16455 #undef $ac_func
16456
16457 /* Override any GCC internal prototype to avoid an error.
16458    Use char because int might match the return type of a GCC
16459    builtin and then its argument prototype would still apply.  */
16460 #ifdef __cplusplus
16461 extern "C"
16462 #endif
16463 char $ac_func ();
16464 /* The GNU C library defines this for functions which it implements
16465     to always fail with ENOSYS.  Some functions are actually named
16466     something starting with __ and the normal name is an alias.  */
16467 #if defined __stub_$ac_func || defined __stub___$ac_func
16468 choke me
16469 #endif
16470
16471 int
16472 main ()
16473 {
16474 return $ac_func ();
16475   ;
16476   return 0;
16477 }
16478 _ACEOF
16479 rm -f conftest.$ac_objext conftest$ac_exeext
16480 if { (ac_try="$ac_link"
16481 case "(($ac_try" in
16482   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16483   *) ac_try_echo=$ac_try;;
16484 esac
16485 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16486   (eval "$ac_link") 2>conftest.er1
16487   ac_status=$?
16488   grep -v '^ *+' conftest.er1 >conftest.err
16489   rm -f conftest.er1
16490   cat conftest.err >&5
16491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16492   (exit $ac_status); } && {
16493          test -z "$ac_c_werror_flag" ||
16494          test ! -s conftest.err
16495        } && test -s conftest$ac_exeext &&
16496        $as_test_x conftest$ac_exeext; then
16497   eval "$as_ac_var=yes"
16498 else
16499   echo "$as_me: failed program was:" >&5
16500 sed 's/^/| /' conftest.$ac_ext >&5
16501
16502         eval "$as_ac_var=no"
16503 fi
16504
16505 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16506       conftest$ac_exeext conftest.$ac_ext
16507 fi
16508 ac_res=`eval echo '${'$as_ac_var'}'`
16509                { echo "$as_me:$LINENO: result: $ac_res" >&5
16510 echo "${ECHO_T}$ac_res" >&6; }
16511 if test `eval echo '${'$as_ac_var'}'` = yes; then
16512   cat >>confdefs.h <<_ACEOF
16513 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16514 _ACEOF
16515
16516 fi
16517 done
16518
16519 { echo "$as_me:$LINENO: checking whether posix_fadvise is declared" >&5
16520 echo $ECHO_N "checking whether posix_fadvise is declared... $ECHO_C" >&6; }
16521 if test "${ac_cv_have_decl_posix_fadvise+set}" = set; then
16522   echo $ECHO_N "(cached) $ECHO_C" >&6
16523 else
16524   cat >conftest.$ac_ext <<_ACEOF
16525 /* confdefs.h.  */
16526 _ACEOF
16527 cat confdefs.h >>conftest.$ac_ext
16528 cat >>conftest.$ac_ext <<_ACEOF
16529 /* end confdefs.h.  */
16530 #include <fcntl.h>
16531
16532 int
16533 main ()
16534 {
16535 #ifndef posix_fadvise
16536   (void) posix_fadvise;
16537 #endif
16538
16539   ;
16540   return 0;
16541 }
16542 _ACEOF
16543 rm -f conftest.$ac_objext
16544 if { (ac_try="$ac_compile"
16545 case "(($ac_try" in
16546   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16547   *) ac_try_echo=$ac_try;;
16548 esac
16549 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16550   (eval "$ac_compile") 2>conftest.er1
16551   ac_status=$?
16552   grep -v '^ *+' conftest.er1 >conftest.err
16553   rm -f conftest.er1
16554   cat conftest.err >&5
16555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16556   (exit $ac_status); } && {
16557          test -z "$ac_c_werror_flag" ||
16558          test ! -s conftest.err
16559        } && test -s conftest.$ac_objext; then
16560   ac_cv_have_decl_posix_fadvise=yes
16561 else
16562   echo "$as_me: failed program was:" >&5
16563 sed 's/^/| /' conftest.$ac_ext >&5
16564
16565         ac_cv_have_decl_posix_fadvise=no
16566 fi
16567
16568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16569 fi
16570 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix_fadvise" >&5
16571 echo "${ECHO_T}$ac_cv_have_decl_posix_fadvise" >&6; }
16572 if test $ac_cv_have_decl_posix_fadvise = yes; then
16573
16574 cat >>confdefs.h <<_ACEOF
16575 #define HAVE_DECL_POSIX_FADVISE 1
16576 _ACEOF
16577
16578
16579 else
16580   cat >>confdefs.h <<_ACEOF
16581 #define HAVE_DECL_POSIX_FADVISE 0
16582 _ACEOF
16583
16584
16585 fi
16586
16587
16588 fi
16589
16590 { echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
16591 echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6; }
16592 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
16593   echo $ECHO_N "(cached) $ECHO_C" >&6
16594 else
16595   cat >conftest.$ac_ext <<_ACEOF
16596 /* confdefs.h.  */
16597 _ACEOF
16598 cat confdefs.h >>conftest.$ac_ext
16599 cat >>conftest.$ac_ext <<_ACEOF
16600 /* end confdefs.h.  */
16601 #include <unistd.h>
16602
16603 int
16604 main ()
16605 {
16606 #ifndef fdatasync
16607   (void) fdatasync;
16608 #endif
16609
16610   ;
16611   return 0;
16612 }
16613 _ACEOF
16614 rm -f conftest.$ac_objext
16615 if { (ac_try="$ac_compile"
16616 case "(($ac_try" in
16617   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16618   *) ac_try_echo=$ac_try;;
16619 esac
16620 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16621   (eval "$ac_compile") 2>conftest.er1
16622   ac_status=$?
16623   grep -v '^ *+' conftest.er1 >conftest.err
16624   rm -f conftest.er1
16625   cat conftest.err >&5
16626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16627   (exit $ac_status); } && {
16628          test -z "$ac_c_werror_flag" ||
16629          test ! -s conftest.err
16630        } && test -s conftest.$ac_objext; then
16631   ac_cv_have_decl_fdatasync=yes
16632 else
16633   echo "$as_me: failed program was:" >&5
16634 sed 's/^/| /' conftest.$ac_ext >&5
16635
16636         ac_cv_have_decl_fdatasync=no
16637 fi
16638
16639 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16640 fi
16641 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
16642 echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6; }
16643 if test $ac_cv_have_decl_fdatasync = yes; then
16644
16645 cat >>confdefs.h <<_ACEOF
16646 #define HAVE_DECL_FDATASYNC 1
16647 _ACEOF
16648
16649
16650 else
16651   cat >>confdefs.h <<_ACEOF
16652 #define HAVE_DECL_FDATASYNC 0
16653 _ACEOF
16654
16655
16656 fi
16657
16658
16659 { echo "$as_me:$LINENO: checking whether strlcat is declared" >&5
16660 echo $ECHO_N "checking whether strlcat is declared... $ECHO_C" >&6; }
16661 if test "${ac_cv_have_decl_strlcat+set}" = set; then
16662   echo $ECHO_N "(cached) $ECHO_C" >&6
16663 else
16664   cat >conftest.$ac_ext <<_ACEOF
16665 /* confdefs.h.  */
16666 _ACEOF
16667 cat confdefs.h >>conftest.$ac_ext
16668 cat >>conftest.$ac_ext <<_ACEOF
16669 /* end confdefs.h.  */
16670 $ac_includes_default
16671 int
16672 main ()
16673 {
16674 #ifndef strlcat
16675   (void) strlcat;
16676 #endif
16677
16678   ;
16679   return 0;
16680 }
16681 _ACEOF
16682 rm -f conftest.$ac_objext
16683 if { (ac_try="$ac_compile"
16684 case "(($ac_try" in
16685   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16686   *) ac_try_echo=$ac_try;;
16687 esac
16688 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16689   (eval "$ac_compile") 2>conftest.er1
16690   ac_status=$?
16691   grep -v '^ *+' conftest.er1 >conftest.err
16692   rm -f conftest.er1
16693   cat conftest.err >&5
16694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16695   (exit $ac_status); } && {
16696          test -z "$ac_c_werror_flag" ||
16697          test ! -s conftest.err
16698        } && test -s conftest.$ac_objext; then
16699   ac_cv_have_decl_strlcat=yes
16700 else
16701   echo "$as_me: failed program was:" >&5
16702 sed 's/^/| /' conftest.$ac_ext >&5
16703
16704         ac_cv_have_decl_strlcat=no
16705 fi
16706
16707 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16708 fi
16709 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcat" >&5
16710 echo "${ECHO_T}$ac_cv_have_decl_strlcat" >&6; }
16711 if test $ac_cv_have_decl_strlcat = yes; then
16712
16713 cat >>confdefs.h <<_ACEOF
16714 #define HAVE_DECL_STRLCAT 1
16715 _ACEOF
16716
16717
16718 else
16719   cat >>confdefs.h <<_ACEOF
16720 #define HAVE_DECL_STRLCAT 0
16721 _ACEOF
16722
16723
16724 fi
16725 { echo "$as_me:$LINENO: checking whether strlcpy is declared" >&5
16726 echo $ECHO_N "checking whether strlcpy is declared... $ECHO_C" >&6; }
16727 if test "${ac_cv_have_decl_strlcpy+set}" = set; then
16728   echo $ECHO_N "(cached) $ECHO_C" >&6
16729 else
16730   cat >conftest.$ac_ext <<_ACEOF
16731 /* confdefs.h.  */
16732 _ACEOF
16733 cat confdefs.h >>conftest.$ac_ext
16734 cat >>conftest.$ac_ext <<_ACEOF
16735 /* end confdefs.h.  */
16736 $ac_includes_default
16737 int
16738 main ()
16739 {
16740 #ifndef strlcpy
16741   (void) strlcpy;
16742 #endif
16743
16744   ;
16745   return 0;
16746 }
16747 _ACEOF
16748 rm -f conftest.$ac_objext
16749 if { (ac_try="$ac_compile"
16750 case "(($ac_try" in
16751   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16752   *) ac_try_echo=$ac_try;;
16753 esac
16754 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16755   (eval "$ac_compile") 2>conftest.er1
16756   ac_status=$?
16757   grep -v '^ *+' conftest.er1 >conftest.err
16758   rm -f conftest.er1
16759   cat conftest.err >&5
16760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16761   (exit $ac_status); } && {
16762          test -z "$ac_c_werror_flag" ||
16763          test ! -s conftest.err
16764        } && test -s conftest.$ac_objext; then
16765   ac_cv_have_decl_strlcpy=yes
16766 else
16767   echo "$as_me: failed program was:" >&5
16768 sed 's/^/| /' conftest.$ac_ext >&5
16769
16770         ac_cv_have_decl_strlcpy=no
16771 fi
16772
16773 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16774 fi
16775 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcpy" >&5
16776 echo "${ECHO_T}$ac_cv_have_decl_strlcpy" >&6; }
16777 if test $ac_cv_have_decl_strlcpy = yes; then
16778
16779 cat >>confdefs.h <<_ACEOF
16780 #define HAVE_DECL_STRLCPY 1
16781 _ACEOF
16782
16783
16784 else
16785   cat >>confdefs.h <<_ACEOF
16786 #define HAVE_DECL_STRLCPY 0
16787 _ACEOF
16788
16789
16790 fi
16791
16792
16793 # This is probably only present on Darwin, but may as well check always
16794 { echo "$as_me:$LINENO: checking whether F_FULLFSYNC is declared" >&5
16795 echo $ECHO_N "checking whether F_FULLFSYNC is declared... $ECHO_C" >&6; }
16796 if test "${ac_cv_have_decl_F_FULLFSYNC+set}" = set; then
16797   echo $ECHO_N "(cached) $ECHO_C" >&6
16798 else
16799   cat >conftest.$ac_ext <<_ACEOF
16800 /* confdefs.h.  */
16801 _ACEOF
16802 cat confdefs.h >>conftest.$ac_ext
16803 cat >>conftest.$ac_ext <<_ACEOF
16804 /* end confdefs.h.  */
16805 #include <fcntl.h>
16806
16807 int
16808 main ()
16809 {
16810 #ifndef F_FULLFSYNC
16811   (void) F_FULLFSYNC;
16812 #endif
16813
16814   ;
16815   return 0;
16816 }
16817 _ACEOF
16818 rm -f conftest.$ac_objext
16819 if { (ac_try="$ac_compile"
16820 case "(($ac_try" in
16821   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16822   *) ac_try_echo=$ac_try;;
16823 esac
16824 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16825   (eval "$ac_compile") 2>conftest.er1
16826   ac_status=$?
16827   grep -v '^ *+' conftest.er1 >conftest.err
16828   rm -f conftest.er1
16829   cat conftest.err >&5
16830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16831   (exit $ac_status); } && {
16832          test -z "$ac_c_werror_flag" ||
16833          test ! -s conftest.err
16834        } && test -s conftest.$ac_objext; then
16835   ac_cv_have_decl_F_FULLFSYNC=yes
16836 else
16837   echo "$as_me: failed program was:" >&5
16838 sed 's/^/| /' conftest.$ac_ext >&5
16839
16840         ac_cv_have_decl_F_FULLFSYNC=no
16841 fi
16842
16843 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16844 fi
16845 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_FULLFSYNC" >&5
16846 echo "${ECHO_T}$ac_cv_have_decl_F_FULLFSYNC" >&6; }
16847 if test $ac_cv_have_decl_F_FULLFSYNC = yes; then
16848
16849 cat >>confdefs.h <<_ACEOF
16850 #define HAVE_DECL_F_FULLFSYNC 1
16851 _ACEOF
16852
16853
16854 else
16855   cat >>confdefs.h <<_ACEOF
16856 #define HAVE_DECL_F_FULLFSYNC 0
16857 _ACEOF
16858
16859
16860 fi
16861
16862
16863
16864 HAVE_IPV6=no
16865 { echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
16866 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6; }
16867 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
16868   echo $ECHO_N "(cached) $ECHO_C" >&6
16869 else
16870   cat >conftest.$ac_ext <<_ACEOF
16871 /* confdefs.h.  */
16872 _ACEOF
16873 cat confdefs.h >>conftest.$ac_ext
16874 cat >>conftest.$ac_ext <<_ACEOF
16875 /* end confdefs.h.  */
16876 $ac_includes_default
16877 #include <netinet/in.h>
16878
16879 typedef struct sockaddr_in6 ac__type_new_;
16880 int
16881 main ()
16882 {
16883 if ((ac__type_new_ *) 0)
16884   return 0;
16885 if (sizeof (ac__type_new_))
16886   return 0;
16887   ;
16888   return 0;
16889 }
16890 _ACEOF
16891 rm -f conftest.$ac_objext
16892 if { (ac_try="$ac_compile"
16893 case "(($ac_try" in
16894   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16895   *) ac_try_echo=$ac_try;;
16896 esac
16897 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16898   (eval "$ac_compile") 2>conftest.er1
16899   ac_status=$?
16900   grep -v '^ *+' conftest.er1 >conftest.err
16901   rm -f conftest.er1
16902   cat conftest.err >&5
16903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16904   (exit $ac_status); } && {
16905          test -z "$ac_c_werror_flag" ||
16906          test ! -s conftest.err
16907        } && test -s conftest.$ac_objext; then
16908   ac_cv_type_struct_sockaddr_in6=yes
16909 else
16910   echo "$as_me: failed program was:" >&5
16911 sed 's/^/| /' conftest.$ac_ext >&5
16912
16913         ac_cv_type_struct_sockaddr_in6=no
16914 fi
16915
16916 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16917 fi
16918 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
16919 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6; }
16920 if test $ac_cv_type_struct_sockaddr_in6 = yes; then
16921
16922 cat >>confdefs.h <<\_ACEOF
16923 #define HAVE_IPV6 1
16924 _ACEOF
16925
16926          HAVE_IPV6=yes
16927 fi
16928
16929
16930
16931 { echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
16932 echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6; }
16933 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
16934   echo $ECHO_N "(cached) $ECHO_C" >&6
16935 else
16936   cat >conftest.$ac_ext <<_ACEOF
16937 /* confdefs.h.  */
16938 _ACEOF
16939 cat confdefs.h >>conftest.$ac_ext
16940 cat >>conftest.$ac_ext <<_ACEOF
16941 /* end confdefs.h.  */
16942 #include <machine/vmparam.h>
16943 #include <sys/exec.h>
16944
16945 int
16946 main ()
16947 {
16948 PS_STRINGS->ps_nargvstr = 1;
16949 PS_STRINGS->ps_argvstr = "foo";
16950   ;
16951   return 0;
16952 }
16953 _ACEOF
16954 rm -f conftest.$ac_objext conftest$ac_exeext
16955 if { (ac_try="$ac_link"
16956 case "(($ac_try" in
16957   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16958   *) ac_try_echo=$ac_try;;
16959 esac
16960 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16961   (eval "$ac_link") 2>conftest.er1
16962   ac_status=$?
16963   grep -v '^ *+' conftest.er1 >conftest.err
16964   rm -f conftest.er1
16965   cat conftest.err >&5
16966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16967   (exit $ac_status); } && {
16968          test -z "$ac_c_werror_flag" ||
16969          test ! -s conftest.err
16970        } && test -s conftest$ac_exeext &&
16971        $as_test_x conftest$ac_exeext; then
16972   pgac_cv_var_PS_STRINGS=yes
16973 else
16974   echo "$as_me: failed program was:" >&5
16975 sed 's/^/| /' conftest.$ac_ext >&5
16976
16977         pgac_cv_var_PS_STRINGS=no
16978 fi
16979
16980 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16981       conftest$ac_exeext conftest.$ac_ext
16982 fi
16983 { echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
16984 echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6; }
16985 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
16986
16987 cat >>confdefs.h <<\_ACEOF
16988 #define HAVE_PS_STRINGS
16989 _ACEOF
16990
16991 fi
16992
16993
16994 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
16995 # is missing.  Yes, there are machines that have only one.  We may
16996 # also decide to use snprintf.c if snprintf() is present but does not
16997 # have all the features we need --- see below.
16998
16999 if test "$PORTNAME" = "win32"; then
17000   # Win32 gets snprintf.c built unconditionally.
17001   #
17002   # To properly translate all NLS languages strings, we must support the
17003   # *printf() %$ format, which allows *printf() arguments to be selected
17004   # by position in the translated string.
17005   #
17006   # libintl versions < 0.13 use the native *printf() functions, and Win32
17007   # *printf() doesn't understand %$, so we must use our /port versions,
17008   # which do understand %$. libintl versions >= 0.13 include their own
17009   # *printf versions on Win32.  The libintl 0.13 release note text is:
17010   #
17011   #   C format strings with positions, as they arise when a translator
17012   #   needs to reorder a sentence, are now supported on all platforms.
17013   #   On those few platforms (NetBSD and Woe32) for which the native
17014   #   printf()/fprintf()/... functions don't support such format
17015   #   strings, replacements are provided through <libintl.h>.
17016   #
17017   # We could use libintl >= 0.13's *printf() if we were sure that we had
17018   # a litint >= 0.13 at runtime, but seeing that there is no clean way
17019   # to guarantee that, it is best to just use our own, so we are sure to
17020   # get %$ support. In include/port.h we disable the *printf() macros
17021   # that might have been defined by libintl.
17022   #
17023   # We do this unconditionally whether NLS is used or not so we are sure
17024   # that all Win32 libraries and binaries behave the same.
17025   pgac_need_repl_snprintf=yes
17026 else
17027   pgac_need_repl_snprintf=no
17028
17029 for ac_func in snprintf
17030 do
17031 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17032 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17033 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17034 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17035   echo $ECHO_N "(cached) $ECHO_C" >&6
17036 else
17037   cat >conftest.$ac_ext <<_ACEOF
17038 /* confdefs.h.  */
17039 _ACEOF
17040 cat confdefs.h >>conftest.$ac_ext
17041 cat >>conftest.$ac_ext <<_ACEOF
17042 /* end confdefs.h.  */
17043 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17044    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17045 #define $ac_func innocuous_$ac_func
17046
17047 /* System header to define __stub macros and hopefully few prototypes,
17048     which can conflict with char $ac_func (); below.
17049     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17050     <limits.h> exists even on freestanding compilers.  */
17051
17052 #ifdef __STDC__
17053 # include <limits.h>
17054 #else
17055 # include <assert.h>
17056 #endif
17057
17058 #undef $ac_func
17059
17060 /* Override any GCC internal prototype to avoid an error.
17061    Use char because int might match the return type of a GCC
17062    builtin and then its argument prototype would still apply.  */
17063 #ifdef __cplusplus
17064 extern "C"
17065 #endif
17066 char $ac_func ();
17067 /* The GNU C library defines this for functions which it implements
17068     to always fail with ENOSYS.  Some functions are actually named
17069     something starting with __ and the normal name is an alias.  */
17070 #if defined __stub_$ac_func || defined __stub___$ac_func
17071 choke me
17072 #endif
17073
17074 int
17075 main ()
17076 {
17077 return $ac_func ();
17078   ;
17079   return 0;
17080 }
17081 _ACEOF
17082 rm -f conftest.$ac_objext conftest$ac_exeext
17083 if { (ac_try="$ac_link"
17084 case "(($ac_try" in
17085   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17086   *) ac_try_echo=$ac_try;;
17087 esac
17088 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17089   (eval "$ac_link") 2>conftest.er1
17090   ac_status=$?
17091   grep -v '^ *+' conftest.er1 >conftest.err
17092   rm -f conftest.er1
17093   cat conftest.err >&5
17094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17095   (exit $ac_status); } && {
17096          test -z "$ac_c_werror_flag" ||
17097          test ! -s conftest.err
17098        } && test -s conftest$ac_exeext &&
17099        $as_test_x conftest$ac_exeext; then
17100   eval "$as_ac_var=yes"
17101 else
17102   echo "$as_me: failed program was:" >&5
17103 sed 's/^/| /' conftest.$ac_ext >&5
17104
17105         eval "$as_ac_var=no"
17106 fi
17107
17108 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17109       conftest$ac_exeext conftest.$ac_ext
17110 fi
17111 ac_res=`eval echo '${'$as_ac_var'}'`
17112                { echo "$as_me:$LINENO: result: $ac_res" >&5
17113 echo "${ECHO_T}$ac_res" >&6; }
17114 if test `eval echo '${'$as_ac_var'}'` = yes; then
17115   cat >>confdefs.h <<_ACEOF
17116 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17117 _ACEOF
17118
17119 else
17120   pgac_need_repl_snprintf=yes
17121 fi
17122 done
17123
17124
17125 for ac_func in vsnprintf
17126 do
17127 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17128 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17129 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17130 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17131   echo $ECHO_N "(cached) $ECHO_C" >&6
17132 else
17133   cat >conftest.$ac_ext <<_ACEOF
17134 /* confdefs.h.  */
17135 _ACEOF
17136 cat confdefs.h >>conftest.$ac_ext
17137 cat >>conftest.$ac_ext <<_ACEOF
17138 /* end confdefs.h.  */
17139 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17140    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17141 #define $ac_func innocuous_$ac_func
17142
17143 /* System header to define __stub macros and hopefully few prototypes,
17144     which can conflict with char $ac_func (); below.
17145     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17146     <limits.h> exists even on freestanding compilers.  */
17147
17148 #ifdef __STDC__
17149 # include <limits.h>
17150 #else
17151 # include <assert.h>
17152 #endif
17153
17154 #undef $ac_func
17155
17156 /* Override any GCC internal prototype to avoid an error.
17157    Use char because int might match the return type of a GCC
17158    builtin and then its argument prototype would still apply.  */
17159 #ifdef __cplusplus
17160 extern "C"
17161 #endif
17162 char $ac_func ();
17163 /* The GNU C library defines this for functions which it implements
17164     to always fail with ENOSYS.  Some functions are actually named
17165     something starting with __ and the normal name is an alias.  */
17166 #if defined __stub_$ac_func || defined __stub___$ac_func
17167 choke me
17168 #endif
17169
17170 int
17171 main ()
17172 {
17173 return $ac_func ();
17174   ;
17175   return 0;
17176 }
17177 _ACEOF
17178 rm -f conftest.$ac_objext conftest$ac_exeext
17179 if { (ac_try="$ac_link"
17180 case "(($ac_try" in
17181   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17182   *) ac_try_echo=$ac_try;;
17183 esac
17184 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17185   (eval "$ac_link") 2>conftest.er1
17186   ac_status=$?
17187   grep -v '^ *+' conftest.er1 >conftest.err
17188   rm -f conftest.er1
17189   cat conftest.err >&5
17190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17191   (exit $ac_status); } && {
17192          test -z "$ac_c_werror_flag" ||
17193          test ! -s conftest.err
17194        } && test -s conftest$ac_exeext &&
17195        $as_test_x conftest$ac_exeext; then
17196   eval "$as_ac_var=yes"
17197 else
17198   echo "$as_me: failed program was:" >&5
17199 sed 's/^/| /' conftest.$ac_ext >&5
17200
17201         eval "$as_ac_var=no"
17202 fi
17203
17204 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17205       conftest$ac_exeext conftest.$ac_ext
17206 fi
17207 ac_res=`eval echo '${'$as_ac_var'}'`
17208                { echo "$as_me:$LINENO: result: $ac_res" >&5
17209 echo "${ECHO_T}$ac_res" >&6; }
17210 if test `eval echo '${'$as_ac_var'}'` = yes; then
17211   cat >>confdefs.h <<_ACEOF
17212 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17213 _ACEOF
17214
17215 else
17216   pgac_need_repl_snprintf=yes
17217 fi
17218 done
17219
17220 fi
17221
17222
17223 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
17224 # include/c.h will provide declarations.  Note this is a separate test
17225 # from whether the functions exist in the C library --- there are
17226 # systems that have the functions but don't bother to declare them :-(
17227
17228 { echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
17229 echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6; }
17230 if test "${ac_cv_have_decl_snprintf+set}" = set; then
17231   echo $ECHO_N "(cached) $ECHO_C" >&6
17232 else
17233   cat >conftest.$ac_ext <<_ACEOF
17234 /* confdefs.h.  */
17235 _ACEOF
17236 cat confdefs.h >>conftest.$ac_ext
17237 cat >>conftest.$ac_ext <<_ACEOF
17238 /* end confdefs.h.  */
17239 $ac_includes_default
17240 int
17241 main ()
17242 {
17243 #ifndef snprintf
17244   (void) snprintf;
17245 #endif
17246
17247   ;
17248   return 0;
17249 }
17250 _ACEOF
17251 rm -f conftest.$ac_objext
17252 if { (ac_try="$ac_compile"
17253 case "(($ac_try" in
17254   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17255   *) ac_try_echo=$ac_try;;
17256 esac
17257 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17258   (eval "$ac_compile") 2>conftest.er1
17259   ac_status=$?
17260   grep -v '^ *+' conftest.er1 >conftest.err
17261   rm -f conftest.er1
17262   cat conftest.err >&5
17263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17264   (exit $ac_status); } && {
17265          test -z "$ac_c_werror_flag" ||
17266          test ! -s conftest.err
17267        } && test -s conftest.$ac_objext; then
17268   ac_cv_have_decl_snprintf=yes
17269 else
17270   echo "$as_me: failed program was:" >&5
17271 sed 's/^/| /' conftest.$ac_ext >&5
17272
17273         ac_cv_have_decl_snprintf=no
17274 fi
17275
17276 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17277 fi
17278 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
17279 echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6; }
17280 if test $ac_cv_have_decl_snprintf = yes; then
17281
17282 cat >>confdefs.h <<_ACEOF
17283 #define HAVE_DECL_SNPRINTF 1
17284 _ACEOF
17285
17286
17287 else
17288   cat >>confdefs.h <<_ACEOF
17289 #define HAVE_DECL_SNPRINTF 0
17290 _ACEOF
17291
17292
17293 fi
17294 { echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
17295 echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6; }
17296 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
17297   echo $ECHO_N "(cached) $ECHO_C" >&6
17298 else
17299   cat >conftest.$ac_ext <<_ACEOF
17300 /* confdefs.h.  */
17301 _ACEOF
17302 cat confdefs.h >>conftest.$ac_ext
17303 cat >>conftest.$ac_ext <<_ACEOF
17304 /* end confdefs.h.  */
17305 $ac_includes_default
17306 int
17307 main ()
17308 {
17309 #ifndef vsnprintf
17310   (void) vsnprintf;
17311 #endif
17312
17313   ;
17314   return 0;
17315 }
17316 _ACEOF
17317 rm -f conftest.$ac_objext
17318 if { (ac_try="$ac_compile"
17319 case "(($ac_try" in
17320   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17321   *) ac_try_echo=$ac_try;;
17322 esac
17323 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17324   (eval "$ac_compile") 2>conftest.er1
17325   ac_status=$?
17326   grep -v '^ *+' conftest.er1 >conftest.err
17327   rm -f conftest.er1
17328   cat conftest.err >&5
17329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17330   (exit $ac_status); } && {
17331          test -z "$ac_c_werror_flag" ||
17332          test ! -s conftest.err
17333        } && test -s conftest.$ac_objext; then
17334   ac_cv_have_decl_vsnprintf=yes
17335 else
17336   echo "$as_me: failed program was:" >&5
17337 sed 's/^/| /' conftest.$ac_ext >&5
17338
17339         ac_cv_have_decl_vsnprintf=no
17340 fi
17341
17342 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17343 fi
17344 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
17345 echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6; }
17346 if test $ac_cv_have_decl_vsnprintf = yes; then
17347
17348 cat >>confdefs.h <<_ACEOF
17349 #define HAVE_DECL_VSNPRINTF 1
17350 _ACEOF
17351
17352
17353 else
17354   cat >>confdefs.h <<_ACEOF
17355 #define HAVE_DECL_VSNPRINTF 0
17356 _ACEOF
17357
17358
17359 fi
17360
17361
17362
17363
17364 { echo "$as_me:$LINENO: checking for isinf" >&5
17365 echo $ECHO_N "checking for isinf... $ECHO_C" >&6; }
17366 if test "${ac_cv_func_isinf+set}" = set; then
17367   echo $ECHO_N "(cached) $ECHO_C" >&6
17368 else
17369   cat >conftest.$ac_ext <<_ACEOF
17370 /* confdefs.h.  */
17371 _ACEOF
17372 cat confdefs.h >>conftest.$ac_ext
17373 cat >>conftest.$ac_ext <<_ACEOF
17374 /* end confdefs.h.  */
17375
17376 #include <math.h>
17377 double glob_double;
17378
17379 int
17380 main ()
17381 {
17382 return isinf(glob_double) ? 0 : 1;
17383   ;
17384   return 0;
17385 }
17386 _ACEOF
17387 rm -f conftest.$ac_objext conftest$ac_exeext
17388 if { (ac_try="$ac_link"
17389 case "(($ac_try" in
17390   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17391   *) ac_try_echo=$ac_try;;
17392 esac
17393 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17394   (eval "$ac_link") 2>conftest.er1
17395   ac_status=$?
17396   grep -v '^ *+' conftest.er1 >conftest.err
17397   rm -f conftest.er1
17398   cat conftest.err >&5
17399   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17400   (exit $ac_status); } && {
17401          test -z "$ac_c_werror_flag" ||
17402          test ! -s conftest.err
17403        } && test -s conftest$ac_exeext &&
17404        $as_test_x conftest$ac_exeext; then
17405   ac_cv_func_isinf=yes
17406 else
17407   echo "$as_me: failed program was:" >&5
17408 sed 's/^/| /' conftest.$ac_ext >&5
17409
17410         ac_cv_func_isinf=no
17411 fi
17412
17413 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17414       conftest$ac_exeext conftest.$ac_ext
17415 fi
17416 { echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
17417 echo "${ECHO_T}$ac_cv_func_isinf" >&6; }
17418
17419 if test $ac_cv_func_isinf = yes ; then
17420
17421 cat >>confdefs.h <<\_ACEOF
17422 #define HAVE_ISINF 1
17423 _ACEOF
17424
17425 else
17426   case " $LIBOBJS " in
17427   *" isinf.$ac_objext "* ) ;;
17428   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
17429  ;;
17430 esac
17431
17432   # Look for a way to implement a substitute for isinf()
17433
17434
17435
17436
17437 for ac_func in fpclass fp_class fp_class_d class
17438 do
17439 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17440 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17441 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17442 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17443   echo $ECHO_N "(cached) $ECHO_C" >&6
17444 else
17445   cat >conftest.$ac_ext <<_ACEOF
17446 /* confdefs.h.  */
17447 _ACEOF
17448 cat confdefs.h >>conftest.$ac_ext
17449 cat >>conftest.$ac_ext <<_ACEOF
17450 /* end confdefs.h.  */
17451 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17452    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17453 #define $ac_func innocuous_$ac_func
17454
17455 /* System header to define __stub macros and hopefully few prototypes,
17456     which can conflict with char $ac_func (); below.
17457     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17458     <limits.h> exists even on freestanding compilers.  */
17459
17460 #ifdef __STDC__
17461 # include <limits.h>
17462 #else
17463 # include <assert.h>
17464 #endif
17465
17466 #undef $ac_func
17467
17468 /* Override any GCC internal prototype to avoid an error.
17469    Use char because int might match the return type of a GCC
17470    builtin and then its argument prototype would still apply.  */
17471 #ifdef __cplusplus
17472 extern "C"
17473 #endif
17474 char $ac_func ();
17475 /* The GNU C library defines this for functions which it implements
17476     to always fail with ENOSYS.  Some functions are actually named
17477     something starting with __ and the normal name is an alias.  */
17478 #if defined __stub_$ac_func || defined __stub___$ac_func
17479 choke me
17480 #endif
17481
17482 int
17483 main ()
17484 {
17485 return $ac_func ();
17486   ;
17487   return 0;
17488 }
17489 _ACEOF
17490 rm -f conftest.$ac_objext conftest$ac_exeext
17491 if { (ac_try="$ac_link"
17492 case "(($ac_try" in
17493   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17494   *) ac_try_echo=$ac_try;;
17495 esac
17496 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17497   (eval "$ac_link") 2>conftest.er1
17498   ac_status=$?
17499   grep -v '^ *+' conftest.er1 >conftest.err
17500   rm -f conftest.er1
17501   cat conftest.err >&5
17502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17503   (exit $ac_status); } && {
17504          test -z "$ac_c_werror_flag" ||
17505          test ! -s conftest.err
17506        } && test -s conftest$ac_exeext &&
17507        $as_test_x conftest$ac_exeext; then
17508   eval "$as_ac_var=yes"
17509 else
17510   echo "$as_me: failed program was:" >&5
17511 sed 's/^/| /' conftest.$ac_ext >&5
17512
17513         eval "$as_ac_var=no"
17514 fi
17515
17516 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17517       conftest$ac_exeext conftest.$ac_ext
17518 fi
17519 ac_res=`eval echo '${'$as_ac_var'}'`
17520                { echo "$as_me:$LINENO: result: $ac_res" >&5
17521 echo "${ECHO_T}$ac_res" >&6; }
17522 if test `eval echo '${'$as_ac_var'}'` = yes; then
17523   cat >>confdefs.h <<_ACEOF
17524 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17525 _ACEOF
17526  break
17527 fi
17528 done
17529
17530 fi
17531
17532 # Some versions of libedit contain strlcpy(); so disregard that library while
17533 # checking for these standard libc functions.
17534 pgac_save_LIBS="$LIBS"
17535 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550 for ac_func in crypt getopt getrusage inet_aton random rint srandom strdup strerror strlcat strlcpy strtol strtoul
17551 do
17552 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17553 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17554 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17555 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17556   echo $ECHO_N "(cached) $ECHO_C" >&6
17557 else
17558   cat >conftest.$ac_ext <<_ACEOF
17559 /* confdefs.h.  */
17560 _ACEOF
17561 cat confdefs.h >>conftest.$ac_ext
17562 cat >>conftest.$ac_ext <<_ACEOF
17563 /* end confdefs.h.  */
17564 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17565    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17566 #define $ac_func innocuous_$ac_func
17567
17568 /* System header to define __stub macros and hopefully few prototypes,
17569     which can conflict with char $ac_func (); below.
17570     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17571     <limits.h> exists even on freestanding compilers.  */
17572
17573 #ifdef __STDC__
17574 # include <limits.h>
17575 #else
17576 # include <assert.h>
17577 #endif
17578
17579 #undef $ac_func
17580
17581 /* Override any GCC internal prototype to avoid an error.
17582    Use char because int might match the return type of a GCC
17583    builtin and then its argument prototype would still apply.  */
17584 #ifdef __cplusplus
17585 extern "C"
17586 #endif
17587 char $ac_func ();
17588 /* The GNU C library defines this for functions which it implements
17589     to always fail with ENOSYS.  Some functions are actually named
17590     something starting with __ and the normal name is an alias.  */
17591 #if defined __stub_$ac_func || defined __stub___$ac_func
17592 choke me
17593 #endif
17594
17595 int
17596 main ()
17597 {
17598 return $ac_func ();
17599   ;
17600   return 0;
17601 }
17602 _ACEOF
17603 rm -f conftest.$ac_objext conftest$ac_exeext
17604 if { (ac_try="$ac_link"
17605 case "(($ac_try" in
17606   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17607   *) ac_try_echo=$ac_try;;
17608 esac
17609 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17610   (eval "$ac_link") 2>conftest.er1
17611   ac_status=$?
17612   grep -v '^ *+' conftest.er1 >conftest.err
17613   rm -f conftest.er1
17614   cat conftest.err >&5
17615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17616   (exit $ac_status); } && {
17617          test -z "$ac_c_werror_flag" ||
17618          test ! -s conftest.err
17619        } && test -s conftest$ac_exeext &&
17620        $as_test_x conftest$ac_exeext; then
17621   eval "$as_ac_var=yes"
17622 else
17623   echo "$as_me: failed program was:" >&5
17624 sed 's/^/| /' conftest.$ac_ext >&5
17625
17626         eval "$as_ac_var=no"
17627 fi
17628
17629 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17630       conftest$ac_exeext conftest.$ac_ext
17631 fi
17632 ac_res=`eval echo '${'$as_ac_var'}'`
17633                { echo "$as_me:$LINENO: result: $ac_res" >&5
17634 echo "${ECHO_T}$ac_res" >&6; }
17635 if test `eval echo '${'$as_ac_var'}'` = yes; then
17636   cat >>confdefs.h <<_ACEOF
17637 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17638 _ACEOF
17639
17640 else
17641   case " $LIBOBJS " in
17642   *" $ac_func.$ac_objext "* ) ;;
17643   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
17644  ;;
17645 esac
17646
17647 fi
17648 done
17649
17650
17651
17652 case $host_os in
17653
17654         # Windows uses a specialised env handler
17655         mingw*)
17656
17657 cat >>confdefs.h <<\_ACEOF
17658 #define HAVE_UNSETENV 1
17659 _ACEOF
17660
17661                 ac_cv_func_unsetenv=yes;;
17662         *)
17663
17664 for ac_func in unsetenv
17665 do
17666 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17667 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17668 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17669 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17670   echo $ECHO_N "(cached) $ECHO_C" >&6
17671 else
17672   cat >conftest.$ac_ext <<_ACEOF
17673 /* confdefs.h.  */
17674 _ACEOF
17675 cat confdefs.h >>conftest.$ac_ext
17676 cat >>conftest.$ac_ext <<_ACEOF
17677 /* end confdefs.h.  */
17678 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17679    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17680 #define $ac_func innocuous_$ac_func
17681
17682 /* System header to define __stub macros and hopefully few prototypes,
17683     which can conflict with char $ac_func (); below.
17684     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17685     <limits.h> exists even on freestanding compilers.  */
17686
17687 #ifdef __STDC__
17688 # include <limits.h>
17689 #else
17690 # include <assert.h>
17691 #endif
17692
17693 #undef $ac_func
17694
17695 /* Override any GCC internal prototype to avoid an error.
17696    Use char because int might match the return type of a GCC
17697    builtin and then its argument prototype would still apply.  */
17698 #ifdef __cplusplus
17699 extern "C"
17700 #endif
17701 char $ac_func ();
17702 /* The GNU C library defines this for functions which it implements
17703     to always fail with ENOSYS.  Some functions are actually named
17704     something starting with __ and the normal name is an alias.  */
17705 #if defined __stub_$ac_func || defined __stub___$ac_func
17706 choke me
17707 #endif
17708
17709 int
17710 main ()
17711 {
17712 return $ac_func ();
17713   ;
17714   return 0;
17715 }
17716 _ACEOF
17717 rm -f conftest.$ac_objext conftest$ac_exeext
17718 if { (ac_try="$ac_link"
17719 case "(($ac_try" in
17720   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17721   *) ac_try_echo=$ac_try;;
17722 esac
17723 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17724   (eval "$ac_link") 2>conftest.er1
17725   ac_status=$?
17726   grep -v '^ *+' conftest.er1 >conftest.err
17727   rm -f conftest.er1
17728   cat conftest.err >&5
17729   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17730   (exit $ac_status); } && {
17731          test -z "$ac_c_werror_flag" ||
17732          test ! -s conftest.err
17733        } && test -s conftest$ac_exeext &&
17734        $as_test_x conftest$ac_exeext; then
17735   eval "$as_ac_var=yes"
17736 else
17737   echo "$as_me: failed program was:" >&5
17738 sed 's/^/| /' conftest.$ac_ext >&5
17739
17740         eval "$as_ac_var=no"
17741 fi
17742
17743 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17744       conftest$ac_exeext conftest.$ac_ext
17745 fi
17746 ac_res=`eval echo '${'$as_ac_var'}'`
17747                { echo "$as_me:$LINENO: result: $ac_res" >&5
17748 echo "${ECHO_T}$ac_res" >&6; }
17749 if test `eval echo '${'$as_ac_var'}'` = yes; then
17750   cat >>confdefs.h <<_ACEOF
17751 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17752 _ACEOF
17753
17754 else
17755   case " $LIBOBJS " in
17756   *" $ac_func.$ac_objext "* ) ;;
17757   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
17758  ;;
17759 esac
17760
17761 fi
17762 done
17763
17764
17765                 ;;
17766 esac
17767
17768
17769 LIBS="$pgac_save_LIBS"
17770
17771 # System's version of getaddrinfo(), if any, may be used only if we found
17772 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
17773 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
17774 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
17775 # because we want to use our own getaddrinfo.c on Windows anyway.)
17776 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
17777
17778 for ac_func in getaddrinfo
17779 do
17780 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17781 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17782 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17783 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17784   echo $ECHO_N "(cached) $ECHO_C" >&6
17785 else
17786   cat >conftest.$ac_ext <<_ACEOF
17787 /* confdefs.h.  */
17788 _ACEOF
17789 cat confdefs.h >>conftest.$ac_ext
17790 cat >>conftest.$ac_ext <<_ACEOF
17791 /* end confdefs.h.  */
17792 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17793    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17794 #define $ac_func innocuous_$ac_func
17795
17796 /* System header to define __stub macros and hopefully few prototypes,
17797     which can conflict with char $ac_func (); below.
17798     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17799     <limits.h> exists even on freestanding compilers.  */
17800
17801 #ifdef __STDC__
17802 # include <limits.h>
17803 #else
17804 # include <assert.h>
17805 #endif
17806
17807 #undef $ac_func
17808
17809 /* Override any GCC internal prototype to avoid an error.
17810    Use char because int might match the return type of a GCC
17811    builtin and then its argument prototype would still apply.  */
17812 #ifdef __cplusplus
17813 extern "C"
17814 #endif
17815 char $ac_func ();
17816 /* The GNU C library defines this for functions which it implements
17817     to always fail with ENOSYS.  Some functions are actually named
17818     something starting with __ and the normal name is an alias.  */
17819 #if defined __stub_$ac_func || defined __stub___$ac_func
17820 choke me
17821 #endif
17822
17823 int
17824 main ()
17825 {
17826 return $ac_func ();
17827   ;
17828   return 0;
17829 }
17830 _ACEOF
17831 rm -f conftest.$ac_objext conftest$ac_exeext
17832 if { (ac_try="$ac_link"
17833 case "(($ac_try" in
17834   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17835   *) ac_try_echo=$ac_try;;
17836 esac
17837 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17838   (eval "$ac_link") 2>conftest.er1
17839   ac_status=$?
17840   grep -v '^ *+' conftest.er1 >conftest.err
17841   rm -f conftest.er1
17842   cat conftest.err >&5
17843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17844   (exit $ac_status); } && {
17845          test -z "$ac_c_werror_flag" ||
17846          test ! -s conftest.err
17847        } && test -s conftest$ac_exeext &&
17848        $as_test_x conftest$ac_exeext; then
17849   eval "$as_ac_var=yes"
17850 else
17851   echo "$as_me: failed program was:" >&5
17852 sed 's/^/| /' conftest.$ac_ext >&5
17853
17854         eval "$as_ac_var=no"
17855 fi
17856
17857 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17858       conftest$ac_exeext conftest.$ac_ext
17859 fi
17860 ac_res=`eval echo '${'$as_ac_var'}'`
17861                { echo "$as_me:$LINENO: result: $ac_res" >&5
17862 echo "${ECHO_T}$ac_res" >&6; }
17863 if test `eval echo '${'$as_ac_var'}'` = yes; then
17864   cat >>confdefs.h <<_ACEOF
17865 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17866 _ACEOF
17867
17868 else
17869   case " $LIBOBJS " in
17870   *" $ac_func.$ac_objext "* ) ;;
17871   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
17872  ;;
17873 esac
17874
17875 fi
17876 done
17877
17878
17879 else
17880   case " $LIBOBJS " in
17881   *" getaddrinfo.$ac_objext "* ) ;;
17882   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
17883  ;;
17884 esac
17885
17886 fi
17887
17888 # Similarly, use system's getopt_long() only if system provides struct option.
17889 if test x"$ac_cv_type_struct_option" = xyes ; then
17890
17891 for ac_func in getopt_long
17892 do
17893 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17894 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17895 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17896 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17897   echo $ECHO_N "(cached) $ECHO_C" >&6
17898 else
17899   cat >conftest.$ac_ext <<_ACEOF
17900 /* confdefs.h.  */
17901 _ACEOF
17902 cat confdefs.h >>conftest.$ac_ext
17903 cat >>conftest.$ac_ext <<_ACEOF
17904 /* end confdefs.h.  */
17905 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17906    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17907 #define $ac_func innocuous_$ac_func
17908
17909 /* System header to define __stub macros and hopefully few prototypes,
17910     which can conflict with char $ac_func (); below.
17911     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17912     <limits.h> exists even on freestanding compilers.  */
17913
17914 #ifdef __STDC__
17915 # include <limits.h>
17916 #else
17917 # include <assert.h>
17918 #endif
17919
17920 #undef $ac_func
17921
17922 /* Override any GCC internal prototype to avoid an error.
17923    Use char because int might match the return type of a GCC
17924    builtin and then its argument prototype would still apply.  */
17925 #ifdef __cplusplus
17926 extern "C"
17927 #endif
17928 char $ac_func ();
17929 /* The GNU C library defines this for functions which it implements
17930     to always fail with ENOSYS.  Some functions are actually named
17931     something starting with __ and the normal name is an alias.  */
17932 #if defined __stub_$ac_func || defined __stub___$ac_func
17933 choke me
17934 #endif
17935
17936 int
17937 main ()
17938 {
17939 return $ac_func ();
17940   ;
17941   return 0;
17942 }
17943 _ACEOF
17944 rm -f conftest.$ac_objext conftest$ac_exeext
17945 if { (ac_try="$ac_link"
17946 case "(($ac_try" in
17947   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17948   *) ac_try_echo=$ac_try;;
17949 esac
17950 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17951   (eval "$ac_link") 2>conftest.er1
17952   ac_status=$?
17953   grep -v '^ *+' conftest.er1 >conftest.err
17954   rm -f conftest.er1
17955   cat conftest.err >&5
17956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17957   (exit $ac_status); } && {
17958          test -z "$ac_c_werror_flag" ||
17959          test ! -s conftest.err
17960        } && test -s conftest$ac_exeext &&
17961        $as_test_x conftest$ac_exeext; then
17962   eval "$as_ac_var=yes"
17963 else
17964   echo "$as_me: failed program was:" >&5
17965 sed 's/^/| /' conftest.$ac_ext >&5
17966
17967         eval "$as_ac_var=no"
17968 fi
17969
17970 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17971       conftest$ac_exeext conftest.$ac_ext
17972 fi
17973 ac_res=`eval echo '${'$as_ac_var'}'`
17974                { echo "$as_me:$LINENO: result: $ac_res" >&5
17975 echo "${ECHO_T}$ac_res" >&6; }
17976 if test `eval echo '${'$as_ac_var'}'` = yes; then
17977   cat >>confdefs.h <<_ACEOF
17978 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17979 _ACEOF
17980
17981 else
17982   case " $LIBOBJS " in
17983   *" $ac_func.$ac_objext "* ) ;;
17984   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
17985  ;;
17986 esac
17987
17988 fi
17989 done
17990
17991
17992 else
17993   case " $LIBOBJS " in
17994   *" getopt_long.$ac_objext "* ) ;;
17995   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
17996  ;;
17997 esac
17998
17999 fi
18000
18001 # Solaris' getopt() doesn't do what we want for long options, so always use
18002 # our version on that platform.
18003 if test "$PORTNAME" = "solaris"; then
18004   case " $LIBOBJS " in
18005   *" getopt.$ac_objext "* ) ;;
18006   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
18007  ;;
18008 esac
18009
18010 fi
18011
18012 # Win32 support
18013 if test "$PORTNAME" = "win32"; then
18014
18015 for ac_func in gettimeofday
18016 do
18017 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18018 { echo "$as_me:$LINENO: checking for $ac_func" >&5
18019 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18020 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18021   echo $ECHO_N "(cached) $ECHO_C" >&6
18022 else
18023   cat >conftest.$ac_ext <<_ACEOF
18024 /* confdefs.h.  */
18025 _ACEOF
18026 cat confdefs.h >>conftest.$ac_ext
18027 cat >>conftest.$ac_ext <<_ACEOF
18028 /* end confdefs.h.  */
18029 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18030    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
18031 #define $ac_func innocuous_$ac_func
18032
18033 /* System header to define __stub macros and hopefully few prototypes,
18034     which can conflict with char $ac_func (); below.
18035     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18036     <limits.h> exists even on freestanding compilers.  */
18037
18038 #ifdef __STDC__
18039 # include <limits.h>
18040 #else
18041 # include <assert.h>
18042 #endif
18043
18044 #undef $ac_func
18045
18046 /* Override any GCC internal prototype to avoid an error.
18047    Use char because int might match the return type of a GCC
18048    builtin and then its argument prototype would still apply.  */
18049 #ifdef __cplusplus
18050 extern "C"
18051 #endif
18052 char $ac_func ();
18053 /* The GNU C library defines this for functions which it implements
18054     to always fail with ENOSYS.  Some functions are actually named
18055     something starting with __ and the normal name is an alias.  */
18056 #if defined __stub_$ac_func || defined __stub___$ac_func
18057 choke me
18058 #endif
18059
18060 int
18061 main ()
18062 {
18063 return $ac_func ();
18064   ;
18065   return 0;
18066 }
18067 _ACEOF
18068 rm -f conftest.$ac_objext conftest$ac_exeext
18069 if { (ac_try="$ac_link"
18070 case "(($ac_try" in
18071   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18072   *) ac_try_echo=$ac_try;;
18073 esac
18074 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18075   (eval "$ac_link") 2>conftest.er1
18076   ac_status=$?
18077   grep -v '^ *+' conftest.er1 >conftest.err
18078   rm -f conftest.er1
18079   cat conftest.err >&5
18080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18081   (exit $ac_status); } && {
18082          test -z "$ac_c_werror_flag" ||
18083          test ! -s conftest.err
18084        } && test -s conftest$ac_exeext &&
18085        $as_test_x conftest$ac_exeext; then
18086   eval "$as_ac_var=yes"
18087 else
18088   echo "$as_me: failed program was:" >&5
18089 sed 's/^/| /' conftest.$ac_ext >&5
18090
18091         eval "$as_ac_var=no"
18092 fi
18093
18094 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18095       conftest$ac_exeext conftest.$ac_ext
18096 fi
18097 ac_res=`eval echo '${'$as_ac_var'}'`
18098                { echo "$as_me:$LINENO: result: $ac_res" >&5
18099 echo "${ECHO_T}$ac_res" >&6; }
18100 if test `eval echo '${'$as_ac_var'}'` = yes; then
18101   cat >>confdefs.h <<_ACEOF
18102 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18103 _ACEOF
18104
18105 else
18106   case " $LIBOBJS " in
18107   *" $ac_func.$ac_objext "* ) ;;
18108   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18109  ;;
18110 esac
18111
18112 fi
18113 done
18114
18115
18116 case " $LIBOBJS " in
18117   *" kill.$ac_objext "* ) ;;
18118   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
18119  ;;
18120 esac
18121
18122 case " $LIBOBJS " in
18123   *" open.$ac_objext "* ) ;;
18124   *) LIBOBJS="$LIBOBJS open.$ac_objext"
18125  ;;
18126 esac
18127
18128 case " $LIBOBJS " in
18129   *" rand.$ac_objext "* ) ;;
18130   *) LIBOBJS="$LIBOBJS rand.$ac_objext"
18131  ;;
18132 esac
18133
18134 case " $LIBOBJS " in
18135   *" win32env.$ac_objext "* ) ;;
18136   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
18137  ;;
18138 esac
18139
18140 case " $LIBOBJS " in
18141   *" win32error.$ac_objext "* ) ;;
18142   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
18143  ;;
18144 esac
18145
18146
18147 cat >>confdefs.h <<\_ACEOF
18148 #define HAVE_SYMLINK 1
18149 _ACEOF
18150
18151 fi
18152
18153 if test "$with_readline" = yes; then
18154   { echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
18155 echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6; }
18156 cat >conftest.$ac_ext <<_ACEOF
18157 /* confdefs.h.  */
18158 _ACEOF
18159 cat confdefs.h >>conftest.$ac_ext
18160 cat >>conftest.$ac_ext <<_ACEOF
18161 /* end confdefs.h.  */
18162 #include <stdio.h>
18163 #ifdef HAVE_READLINE_READLINE_H
18164 # include <readline/readline.h>
18165 #elif defined(HAVE_READLINE_H)
18166 # include <readline.h>
18167 #endif
18168
18169 int
18170 main ()
18171 {
18172 rl_completion_append_character = 'x';
18173   ;
18174   return 0;
18175 }
18176 _ACEOF
18177 rm -f conftest.$ac_objext conftest$ac_exeext
18178 if { (ac_try="$ac_link"
18179 case "(($ac_try" in
18180   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18181   *) ac_try_echo=$ac_try;;
18182 esac
18183 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18184   (eval "$ac_link") 2>conftest.er1
18185   ac_status=$?
18186   grep -v '^ *+' conftest.er1 >conftest.err
18187   rm -f conftest.er1
18188   cat conftest.err >&5
18189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18190   (exit $ac_status); } && {
18191          test -z "$ac_c_werror_flag" ||
18192          test ! -s conftest.err
18193        } && test -s conftest$ac_exeext &&
18194        $as_test_x conftest$ac_exeext; then
18195   { echo "$as_me:$LINENO: result: yes" >&5
18196 echo "${ECHO_T}yes" >&6; }
18197
18198 cat >>confdefs.h <<\_ACEOF
18199 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
18200 _ACEOF
18201
18202 else
18203   echo "$as_me: failed program was:" >&5
18204 sed 's/^/| /' conftest.$ac_ext >&5
18205
18206         { echo "$as_me:$LINENO: result: no" >&5
18207 echo "${ECHO_T}no" >&6; }
18208 fi
18209
18210 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18211       conftest$ac_exeext conftest.$ac_ext
18212
18213
18214 for ac_func in rl_completion_matches rl_filename_completion_function
18215 do
18216 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18217 { echo "$as_me:$LINENO: checking for $ac_func" >&5
18218 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18219 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18220   echo $ECHO_N "(cached) $ECHO_C" >&6
18221 else
18222   cat >conftest.$ac_ext <<_ACEOF
18223 /* confdefs.h.  */
18224 _ACEOF
18225 cat confdefs.h >>conftest.$ac_ext
18226 cat >>conftest.$ac_ext <<_ACEOF
18227 /* end confdefs.h.  */
18228 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18229    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
18230 #define $ac_func innocuous_$ac_func
18231
18232 /* System header to define __stub macros and hopefully few prototypes,
18233     which can conflict with char $ac_func (); below.
18234     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18235     <limits.h> exists even on freestanding compilers.  */
18236
18237 #ifdef __STDC__
18238 # include <limits.h>
18239 #else
18240 # include <assert.h>
18241 #endif
18242
18243 #undef $ac_func
18244
18245 /* Override any GCC internal prototype to avoid an error.
18246    Use char because int might match the return type of a GCC
18247    builtin and then its argument prototype would still apply.  */
18248 #ifdef __cplusplus
18249 extern "C"
18250 #endif
18251 char $ac_func ();
18252 /* The GNU C library defines this for functions which it implements
18253     to always fail with ENOSYS.  Some functions are actually named
18254     something starting with __ and the normal name is an alias.  */
18255 #if defined __stub_$ac_func || defined __stub___$ac_func
18256 choke me
18257 #endif
18258
18259 int
18260 main ()
18261 {
18262 return $ac_func ();
18263   ;
18264   return 0;
18265 }
18266 _ACEOF
18267 rm -f conftest.$ac_objext conftest$ac_exeext
18268 if { (ac_try="$ac_link"
18269 case "(($ac_try" in
18270   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18271   *) ac_try_echo=$ac_try;;
18272 esac
18273 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18274   (eval "$ac_link") 2>conftest.er1
18275   ac_status=$?
18276   grep -v '^ *+' conftest.er1 >conftest.err
18277   rm -f conftest.er1
18278   cat conftest.err >&5
18279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18280   (exit $ac_status); } && {
18281          test -z "$ac_c_werror_flag" ||
18282          test ! -s conftest.err
18283        } && test -s conftest$ac_exeext &&
18284        $as_test_x conftest$ac_exeext; then
18285   eval "$as_ac_var=yes"
18286 else
18287   echo "$as_me: failed program was:" >&5
18288 sed 's/^/| /' conftest.$ac_ext >&5
18289
18290         eval "$as_ac_var=no"
18291 fi
18292
18293 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18294       conftest$ac_exeext conftest.$ac_ext
18295 fi
18296 ac_res=`eval echo '${'$as_ac_var'}'`
18297                { echo "$as_me:$LINENO: result: $ac_res" >&5
18298 echo "${ECHO_T}$ac_res" >&6; }
18299 if test `eval echo '${'$as_ac_var'}'` = yes; then
18300   cat >>confdefs.h <<_ACEOF
18301 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18302 _ACEOF
18303
18304 fi
18305 done
18306
18307
18308 for ac_func in replace_history_entry
18309 do
18310 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18311 { echo "$as_me:$LINENO: checking for $ac_func" >&5
18312 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18313 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18314   echo $ECHO_N "(cached) $ECHO_C" >&6
18315 else
18316   cat >conftest.$ac_ext <<_ACEOF
18317 /* confdefs.h.  */
18318 _ACEOF
18319 cat confdefs.h >>conftest.$ac_ext
18320 cat >>conftest.$ac_ext <<_ACEOF
18321 /* end confdefs.h.  */
18322 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18323    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
18324 #define $ac_func innocuous_$ac_func
18325
18326 /* System header to define __stub macros and hopefully few prototypes,
18327     which can conflict with char $ac_func (); below.
18328     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18329     <limits.h> exists even on freestanding compilers.  */
18330
18331 #ifdef __STDC__
18332 # include <limits.h>
18333 #else
18334 # include <assert.h>
18335 #endif
18336
18337 #undef $ac_func
18338
18339 /* Override any GCC internal prototype to avoid an error.
18340    Use char because int might match the return type of a GCC
18341    builtin and then its argument prototype would still apply.  */
18342 #ifdef __cplusplus
18343 extern "C"
18344 #endif
18345 char $ac_func ();
18346 /* The GNU C library defines this for functions which it implements
18347     to always fail with ENOSYS.  Some functions are actually named
18348     something starting with __ and the normal name is an alias.  */
18349 #if defined __stub_$ac_func || defined __stub___$ac_func
18350 choke me
18351 #endif
18352
18353 int
18354 main ()
18355 {
18356 return $ac_func ();
18357   ;
18358   return 0;
18359 }
18360 _ACEOF
18361 rm -f conftest.$ac_objext conftest$ac_exeext
18362 if { (ac_try="$ac_link"
18363 case "(($ac_try" in
18364   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18365   *) ac_try_echo=$ac_try;;
18366 esac
18367 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18368   (eval "$ac_link") 2>conftest.er1
18369   ac_status=$?
18370   grep -v '^ *+' conftest.er1 >conftest.err
18371   rm -f conftest.er1
18372   cat conftest.err >&5
18373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18374   (exit $ac_status); } && {
18375          test -z "$ac_c_werror_flag" ||
18376          test ! -s conftest.err
18377        } && test -s conftest$ac_exeext &&
18378        $as_test_x conftest$ac_exeext; then
18379   eval "$as_ac_var=yes"
18380 else
18381   echo "$as_me: failed program was:" >&5
18382 sed 's/^/| /' conftest.$ac_ext >&5
18383
18384         eval "$as_ac_var=no"
18385 fi
18386
18387 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18388       conftest$ac_exeext conftest.$ac_ext
18389 fi
18390 ac_res=`eval echo '${'$as_ac_var'}'`
18391                { echo "$as_me:$LINENO: result: $ac_res" >&5
18392 echo "${ECHO_T}$ac_res" >&6; }
18393 if test `eval echo '${'$as_ac_var'}'` = yes; then
18394   cat >>confdefs.h <<_ACEOF
18395 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18396 _ACEOF
18397
18398 fi
18399 done
18400
18401 fi
18402
18403
18404 { echo "$as_me:$LINENO: checking for sigsetjmp" >&5
18405 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6; }
18406 cat >conftest.$ac_ext <<_ACEOF
18407 /* confdefs.h.  */
18408 _ACEOF
18409 cat confdefs.h >>conftest.$ac_ext
18410 cat >>conftest.$ac_ext <<_ACEOF
18411 /* end confdefs.h.  */
18412 #include <setjmp.h>
18413 int
18414 main ()
18415 {
18416 sigjmp_buf x; sigsetjmp(x, 1);
18417   ;
18418   return 0;
18419 }
18420 _ACEOF
18421 rm -f conftest.$ac_objext conftest$ac_exeext
18422 if { (ac_try="$ac_link"
18423 case "(($ac_try" in
18424   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18425   *) ac_try_echo=$ac_try;;
18426 esac
18427 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18428   (eval "$ac_link") 2>conftest.er1
18429   ac_status=$?
18430   grep -v '^ *+' conftest.er1 >conftest.err
18431   rm -f conftest.er1
18432   cat conftest.err >&5
18433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18434   (exit $ac_status); } && {
18435          test -z "$ac_c_werror_flag" ||
18436          test ! -s conftest.err
18437        } && test -s conftest$ac_exeext &&
18438        $as_test_x conftest$ac_exeext; then
18439
18440 cat >>confdefs.h <<\_ACEOF
18441 #define HAVE_SIGSETJMP 1
18442 _ACEOF
18443
18444 { echo "$as_me:$LINENO: result: yes" >&5
18445 echo "${ECHO_T}yes" >&6; }
18446 else
18447   echo "$as_me: failed program was:" >&5
18448 sed 's/^/| /' conftest.$ac_ext >&5
18449
18450         { echo "$as_me:$LINENO: result: no" >&5
18451 echo "${ECHO_T}no" >&6; }
18452 fi
18453
18454 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18455       conftest$ac_exeext conftest.$ac_ext
18456
18457 { echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
18458 echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
18459 if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
18460   echo $ECHO_N "(cached) $ECHO_C" >&6
18461 else
18462   cat >conftest.$ac_ext <<_ACEOF
18463 /* confdefs.h.  */
18464 _ACEOF
18465 cat confdefs.h >>conftest.$ac_ext
18466 cat >>conftest.$ac_ext <<_ACEOF
18467 /* end confdefs.h.  */
18468 #include <signal.h>
18469 /* NetBSD declares sys_siglist in unistd.h.  */
18470 #ifdef HAVE_UNISTD_H
18471 # include <unistd.h>
18472 #endif
18473
18474
18475 int
18476 main ()
18477 {
18478 #ifndef sys_siglist
18479   (void) sys_siglist;
18480 #endif
18481
18482   ;
18483   return 0;
18484 }
18485 _ACEOF
18486 rm -f conftest.$ac_objext
18487 if { (ac_try="$ac_compile"
18488 case "(($ac_try" in
18489   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18490   *) ac_try_echo=$ac_try;;
18491 esac
18492 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18493   (eval "$ac_compile") 2>conftest.er1
18494   ac_status=$?
18495   grep -v '^ *+' conftest.er1 >conftest.err
18496   rm -f conftest.er1
18497   cat conftest.err >&5
18498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18499   (exit $ac_status); } && {
18500          test -z "$ac_c_werror_flag" ||
18501          test ! -s conftest.err
18502        } && test -s conftest.$ac_objext; then
18503   ac_cv_have_decl_sys_siglist=yes
18504 else
18505   echo "$as_me: failed program was:" >&5
18506 sed 's/^/| /' conftest.$ac_ext >&5
18507
18508         ac_cv_have_decl_sys_siglist=no
18509 fi
18510
18511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18512 fi
18513 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
18514 echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
18515 if test $ac_cv_have_decl_sys_siglist = yes; then
18516
18517 cat >>confdefs.h <<_ACEOF
18518 #define HAVE_DECL_SYS_SIGLIST 1
18519 _ACEOF
18520
18521
18522 else
18523   cat >>confdefs.h <<_ACEOF
18524 #define HAVE_DECL_SYS_SIGLIST 0
18525 _ACEOF
18526
18527
18528 fi
18529
18530
18531
18532
18533 { echo "$as_me:$LINENO: checking for syslog" >&5
18534 echo $ECHO_N "checking for syslog... $ECHO_C" >&6; }
18535 if test "${ac_cv_func_syslog+set}" = set; then
18536   echo $ECHO_N "(cached) $ECHO_C" >&6
18537 else
18538   cat >conftest.$ac_ext <<_ACEOF
18539 /* confdefs.h.  */
18540 _ACEOF
18541 cat confdefs.h >>conftest.$ac_ext
18542 cat >>conftest.$ac_ext <<_ACEOF
18543 /* end confdefs.h.  */
18544 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
18545    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
18546 #define syslog innocuous_syslog
18547
18548 /* System header to define __stub macros and hopefully few prototypes,
18549     which can conflict with char syslog (); below.
18550     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18551     <limits.h> exists even on freestanding compilers.  */
18552
18553 #ifdef __STDC__
18554 # include <limits.h>
18555 #else
18556 # include <assert.h>
18557 #endif
18558
18559 #undef syslog
18560
18561 /* Override any GCC internal prototype to avoid an error.
18562    Use char because int might match the return type of a GCC
18563    builtin and then its argument prototype would still apply.  */
18564 #ifdef __cplusplus
18565 extern "C"
18566 #endif
18567 char syslog ();
18568 /* The GNU C library defines this for functions which it implements
18569     to always fail with ENOSYS.  Some functions are actually named
18570     something starting with __ and the normal name is an alias.  */
18571 #if defined __stub_syslog || defined __stub___syslog
18572 choke me
18573 #endif
18574
18575 int
18576 main ()
18577 {
18578 return syslog ();
18579   ;
18580   return 0;
18581 }
18582 _ACEOF
18583 rm -f conftest.$ac_objext conftest$ac_exeext
18584 if { (ac_try="$ac_link"
18585 case "(($ac_try" in
18586   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18587   *) ac_try_echo=$ac_try;;
18588 esac
18589 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18590   (eval "$ac_link") 2>conftest.er1
18591   ac_status=$?
18592   grep -v '^ *+' conftest.er1 >conftest.err
18593   rm -f conftest.er1
18594   cat conftest.err >&5
18595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18596   (exit $ac_status); } && {
18597          test -z "$ac_c_werror_flag" ||
18598          test ! -s conftest.err
18599        } && test -s conftest$ac_exeext &&
18600        $as_test_x conftest$ac_exeext; then
18601   ac_cv_func_syslog=yes
18602 else
18603   echo "$as_me: failed program was:" >&5
18604 sed 's/^/| /' conftest.$ac_ext >&5
18605
18606         ac_cv_func_syslog=no
18607 fi
18608
18609 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18610       conftest$ac_exeext conftest.$ac_ext
18611 fi
18612 { echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
18613 echo "${ECHO_T}$ac_cv_func_syslog" >&6; }
18614 if test $ac_cv_func_syslog = yes; then
18615   if test "${ac_cv_header_syslog_h+set}" = set; then
18616   { echo "$as_me:$LINENO: checking for syslog.h" >&5
18617 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6; }
18618 if test "${ac_cv_header_syslog_h+set}" = set; then
18619   echo $ECHO_N "(cached) $ECHO_C" >&6
18620 fi
18621 { echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
18622 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6; }
18623 else
18624   # Is the header compilable?
18625 { echo "$as_me:$LINENO: checking syslog.h usability" >&5
18626 echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6; }
18627 cat >conftest.$ac_ext <<_ACEOF
18628 /* confdefs.h.  */
18629 _ACEOF
18630 cat confdefs.h >>conftest.$ac_ext
18631 cat >>conftest.$ac_ext <<_ACEOF
18632 /* end confdefs.h.  */
18633 $ac_includes_default
18634 #include <syslog.h>
18635 _ACEOF
18636 rm -f conftest.$ac_objext
18637 if { (ac_try="$ac_compile"
18638 case "(($ac_try" in
18639   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18640   *) ac_try_echo=$ac_try;;
18641 esac
18642 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18643   (eval "$ac_compile") 2>conftest.er1
18644   ac_status=$?
18645   grep -v '^ *+' conftest.er1 >conftest.err
18646   rm -f conftest.er1
18647   cat conftest.err >&5
18648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18649   (exit $ac_status); } && {
18650          test -z "$ac_c_werror_flag" ||
18651          test ! -s conftest.err
18652        } && test -s conftest.$ac_objext; then
18653   ac_header_compiler=yes
18654 else
18655   echo "$as_me: failed program was:" >&5
18656 sed 's/^/| /' conftest.$ac_ext >&5
18657
18658         ac_header_compiler=no
18659 fi
18660
18661 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18662 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18663 echo "${ECHO_T}$ac_header_compiler" >&6; }
18664
18665 # Is the header present?
18666 { echo "$as_me:$LINENO: checking syslog.h presence" >&5
18667 echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6; }
18668 cat >conftest.$ac_ext <<_ACEOF
18669 /* confdefs.h.  */
18670 _ACEOF
18671 cat confdefs.h >>conftest.$ac_ext
18672 cat >>conftest.$ac_ext <<_ACEOF
18673 /* end confdefs.h.  */
18674 #include <syslog.h>
18675 _ACEOF
18676 if { (ac_try="$ac_cpp conftest.$ac_ext"
18677 case "(($ac_try" in
18678   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18679   *) ac_try_echo=$ac_try;;
18680 esac
18681 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18682   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18683   ac_status=$?
18684   grep -v '^ *+' conftest.er1 >conftest.err
18685   rm -f conftest.er1
18686   cat conftest.err >&5
18687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18688   (exit $ac_status); } >/dev/null && {
18689          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18690          test ! -s conftest.err
18691        }; then
18692   ac_header_preproc=yes
18693 else
18694   echo "$as_me: failed program was:" >&5
18695 sed 's/^/| /' conftest.$ac_ext >&5
18696
18697   ac_header_preproc=no
18698 fi
18699
18700 rm -f conftest.err conftest.$ac_ext
18701 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18702 echo "${ECHO_T}$ac_header_preproc" >&6; }
18703
18704 # So?  What about this header?
18705 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18706   yes:no: )
18707     { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
18708 echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18709     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
18710 echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
18711     ac_header_preproc=yes
18712     ;;
18713   no:yes:* )
18714     { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
18715 echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
18716     { echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
18717 echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
18718     { echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
18719 echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
18720     { echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
18721 echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18722     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
18723 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
18724     { echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
18725 echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
18726     ( cat <<\_ASBOX
18727 ## ---------------------------------------- ##
18728 ## Report this to pgsql-bugs@postgresql.org ##
18729 ## ---------------------------------------- ##
18730 _ASBOX
18731      ) | sed "s/^/$as_me: WARNING:     /" >&2
18732     ;;
18733 esac
18734 { echo "$as_me:$LINENO: checking for syslog.h" >&5
18735 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6; }
18736 if test "${ac_cv_header_syslog_h+set}" = set; then
18737   echo $ECHO_N "(cached) $ECHO_C" >&6
18738 else
18739   ac_cv_header_syslog_h=$ac_header_preproc
18740 fi
18741 { echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
18742 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6; }
18743
18744 fi
18745 if test $ac_cv_header_syslog_h = yes; then
18746
18747 cat >>confdefs.h <<\_ACEOF
18748 #define HAVE_SYSLOG 1
18749 _ACEOF
18750
18751 fi
18752
18753
18754 fi
18755
18756
18757 { echo "$as_me:$LINENO: checking for opterr" >&5
18758 echo $ECHO_N "checking for opterr... $ECHO_C" >&6; }
18759 if test "${pgac_cv_var_int_opterr+set}" = set; then
18760   echo $ECHO_N "(cached) $ECHO_C" >&6
18761 else
18762   cat >conftest.$ac_ext <<_ACEOF
18763 /* confdefs.h.  */
18764 _ACEOF
18765 cat confdefs.h >>conftest.$ac_ext
18766 cat >>conftest.$ac_ext <<_ACEOF
18767 /* end confdefs.h.  */
18768 #include <unistd.h>
18769 int
18770 main ()
18771 {
18772 extern int opterr; opterr = 1;
18773   ;
18774   return 0;
18775 }
18776 _ACEOF
18777 rm -f conftest.$ac_objext conftest$ac_exeext
18778 if { (ac_try="$ac_link"
18779 case "(($ac_try" in
18780   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18781   *) ac_try_echo=$ac_try;;
18782 esac
18783 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18784   (eval "$ac_link") 2>conftest.er1
18785   ac_status=$?
18786   grep -v '^ *+' conftest.er1 >conftest.err
18787   rm -f conftest.er1
18788   cat conftest.err >&5
18789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18790   (exit $ac_status); } && {
18791          test -z "$ac_c_werror_flag" ||
18792          test ! -s conftest.err
18793        } && test -s conftest$ac_exeext &&
18794        $as_test_x conftest$ac_exeext; then
18795   pgac_cv_var_int_opterr=yes
18796 else
18797   echo "$as_me: failed program was:" >&5
18798 sed 's/^/| /' conftest.$ac_ext >&5
18799
18800         pgac_cv_var_int_opterr=no
18801 fi
18802
18803 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18804       conftest$ac_exeext conftest.$ac_ext
18805 fi
18806 { echo "$as_me:$LINENO: result: $pgac_cv_var_int_opterr" >&5
18807 echo "${ECHO_T}$pgac_cv_var_int_opterr" >&6; }
18808 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
18809
18810 cat >>confdefs.h <<\_ACEOF
18811 #define HAVE_INT_OPTERR 1
18812 _ACEOF
18813
18814 fi
18815
18816 { echo "$as_me:$LINENO: checking for optreset" >&5
18817 echo $ECHO_N "checking for optreset... $ECHO_C" >&6; }
18818 if test "${pgac_cv_var_int_optreset+set}" = set; then
18819   echo $ECHO_N "(cached) $ECHO_C" >&6
18820 else
18821   cat >conftest.$ac_ext <<_ACEOF
18822 /* confdefs.h.  */
18823 _ACEOF
18824 cat confdefs.h >>conftest.$ac_ext
18825 cat >>conftest.$ac_ext <<_ACEOF
18826 /* end confdefs.h.  */
18827 #include <unistd.h>
18828 int
18829 main ()
18830 {
18831 extern int optreset; optreset = 1;
18832   ;
18833   return 0;
18834 }
18835 _ACEOF
18836 rm -f conftest.$ac_objext conftest$ac_exeext
18837 if { (ac_try="$ac_link"
18838 case "(($ac_try" in
18839   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18840   *) ac_try_echo=$ac_try;;
18841 esac
18842 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18843   (eval "$ac_link") 2>conftest.er1
18844   ac_status=$?
18845   grep -v '^ *+' conftest.er1 >conftest.err
18846   rm -f conftest.er1
18847   cat conftest.err >&5
18848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18849   (exit $ac_status); } && {
18850          test -z "$ac_c_werror_flag" ||
18851          test ! -s conftest.err
18852        } && test -s conftest$ac_exeext &&
18853        $as_test_x conftest$ac_exeext; then
18854   pgac_cv_var_int_optreset=yes
18855 else
18856   echo "$as_me: failed program was:" >&5
18857 sed 's/^/| /' conftest.$ac_ext >&5
18858
18859         pgac_cv_var_int_optreset=no
18860 fi
18861
18862 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18863       conftest$ac_exeext conftest.$ac_ext
18864 fi
18865 { echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
18866 echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6; }
18867 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
18868
18869 cat >>confdefs.h <<\_ACEOF
18870 #define HAVE_INT_OPTRESET 1
18871 _ACEOF
18872
18873 fi
18874
18875
18876
18877 for ac_func in strtoll strtoq
18878 do
18879 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18880 { echo "$as_me:$LINENO: checking for $ac_func" >&5
18881 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18882 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18883   echo $ECHO_N "(cached) $ECHO_C" >&6
18884 else
18885   cat >conftest.$ac_ext <<_ACEOF
18886 /* confdefs.h.  */
18887 _ACEOF
18888 cat confdefs.h >>conftest.$ac_ext
18889 cat >>conftest.$ac_ext <<_ACEOF
18890 /* end confdefs.h.  */
18891 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18892    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
18893 #define $ac_func innocuous_$ac_func
18894
18895 /* System header to define __stub macros and hopefully few prototypes,
18896     which can conflict with char $ac_func (); below.
18897     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18898     <limits.h> exists even on freestanding compilers.  */
18899
18900 #ifdef __STDC__
18901 # include <limits.h>
18902 #else
18903 # include <assert.h>
18904 #endif
18905
18906 #undef $ac_func
18907
18908 /* Override any GCC internal prototype to avoid an error.
18909    Use char because int might match the return type of a GCC
18910    builtin and then its argument prototype would still apply.  */
18911 #ifdef __cplusplus
18912 extern "C"
18913 #endif
18914 char $ac_func ();
18915 /* The GNU C library defines this for functions which it implements
18916     to always fail with ENOSYS.  Some functions are actually named
18917     something starting with __ and the normal name is an alias.  */
18918 #if defined __stub_$ac_func || defined __stub___$ac_func
18919 choke me
18920 #endif
18921
18922 int
18923 main ()
18924 {
18925 return $ac_func ();
18926   ;
18927   return 0;
18928 }
18929 _ACEOF
18930 rm -f conftest.$ac_objext conftest$ac_exeext
18931 if { (ac_try="$ac_link"
18932 case "(($ac_try" in
18933   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18934   *) ac_try_echo=$ac_try;;
18935 esac
18936 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18937   (eval "$ac_link") 2>conftest.er1
18938   ac_status=$?
18939   grep -v '^ *+' conftest.er1 >conftest.err
18940   rm -f conftest.er1
18941   cat conftest.err >&5
18942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18943   (exit $ac_status); } && {
18944          test -z "$ac_c_werror_flag" ||
18945          test ! -s conftest.err
18946        } && test -s conftest$ac_exeext &&
18947        $as_test_x conftest$ac_exeext; then
18948   eval "$as_ac_var=yes"
18949 else
18950   echo "$as_me: failed program was:" >&5
18951 sed 's/^/| /' conftest.$ac_ext >&5
18952
18953         eval "$as_ac_var=no"
18954 fi
18955
18956 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18957       conftest$ac_exeext conftest.$ac_ext
18958 fi
18959 ac_res=`eval echo '${'$as_ac_var'}'`
18960                { echo "$as_me:$LINENO: result: $ac_res" >&5
18961 echo "${ECHO_T}$ac_res" >&6; }
18962 if test `eval echo '${'$as_ac_var'}'` = yes; then
18963   cat >>confdefs.h <<_ACEOF
18964 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18965 _ACEOF
18966  break
18967 fi
18968 done
18969
18970
18971
18972 for ac_func in strtoull strtouq
18973 do
18974 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18975 { echo "$as_me:$LINENO: checking for $ac_func" >&5
18976 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18977 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18978   echo $ECHO_N "(cached) $ECHO_C" >&6
18979 else
18980   cat >conftest.$ac_ext <<_ACEOF
18981 /* confdefs.h.  */
18982 _ACEOF
18983 cat confdefs.h >>conftest.$ac_ext
18984 cat >>conftest.$ac_ext <<_ACEOF
18985 /* end confdefs.h.  */
18986 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18987    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
18988 #define $ac_func innocuous_$ac_func
18989
18990 /* System header to define __stub macros and hopefully few prototypes,
18991     which can conflict with char $ac_func (); below.
18992     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18993     <limits.h> exists even on freestanding compilers.  */
18994
18995 #ifdef __STDC__
18996 # include <limits.h>
18997 #else
18998 # include <assert.h>
18999 #endif
19000
19001 #undef $ac_func
19002
19003 /* Override any GCC internal prototype to avoid an error.
19004    Use char because int might match the return type of a GCC
19005    builtin and then its argument prototype would still apply.  */
19006 #ifdef __cplusplus
19007 extern "C"
19008 #endif
19009 char $ac_func ();
19010 /* The GNU C library defines this for functions which it implements
19011     to always fail with ENOSYS.  Some functions are actually named
19012     something starting with __ and the normal name is an alias.  */
19013 #if defined __stub_$ac_func || defined __stub___$ac_func
19014 choke me
19015 #endif
19016
19017 int
19018 main ()
19019 {
19020 return $ac_func ();
19021   ;
19022   return 0;
19023 }
19024 _ACEOF
19025 rm -f conftest.$ac_objext conftest$ac_exeext
19026 if { (ac_try="$ac_link"
19027 case "(($ac_try" in
19028   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19029   *) ac_try_echo=$ac_try;;
19030 esac
19031 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19032   (eval "$ac_link") 2>conftest.er1
19033   ac_status=$?
19034   grep -v '^ *+' conftest.er1 >conftest.err
19035   rm -f conftest.er1
19036   cat conftest.err >&5
19037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19038   (exit $ac_status); } && {
19039          test -z "$ac_c_werror_flag" ||
19040          test ! -s conftest.err
19041        } && test -s conftest$ac_exeext &&
19042        $as_test_x conftest$ac_exeext; then
19043   eval "$as_ac_var=yes"
19044 else
19045   echo "$as_me: failed program was:" >&5
19046 sed 's/^/| /' conftest.$ac_ext >&5
19047
19048         eval "$as_ac_var=no"
19049 fi
19050
19051 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19052       conftest$ac_exeext conftest.$ac_ext
19053 fi
19054 ac_res=`eval echo '${'$as_ac_var'}'`
19055                { echo "$as_me:$LINENO: result: $ac_res" >&5
19056 echo "${ECHO_T}$ac_res" >&6; }
19057 if test `eval echo '${'$as_ac_var'}'` = yes; then
19058   cat >>confdefs.h <<_ACEOF
19059 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19060 _ACEOF
19061  break
19062 fi
19063 done
19064
19065
19066 # Check for one of atexit() or on_exit()
19067
19068 for ac_func in atexit
19069 do
19070 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19071 { echo "$as_me:$LINENO: checking for $ac_func" >&5
19072 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19073 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
19074   echo $ECHO_N "(cached) $ECHO_C" >&6
19075 else
19076   cat >conftest.$ac_ext <<_ACEOF
19077 /* confdefs.h.  */
19078 _ACEOF
19079 cat confdefs.h >>conftest.$ac_ext
19080 cat >>conftest.$ac_ext <<_ACEOF
19081 /* end confdefs.h.  */
19082 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19083    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
19084 #define $ac_func innocuous_$ac_func
19085
19086 /* System header to define __stub macros and hopefully few prototypes,
19087     which can conflict with char $ac_func (); below.
19088     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19089     <limits.h> exists even on freestanding compilers.  */
19090
19091 #ifdef __STDC__
19092 # include <limits.h>
19093 #else
19094 # include <assert.h>
19095 #endif
19096
19097 #undef $ac_func
19098
19099 /* Override any GCC internal prototype to avoid an error.
19100    Use char because int might match the return type of a GCC
19101    builtin and then its argument prototype would still apply.  */
19102 #ifdef __cplusplus
19103 extern "C"
19104 #endif
19105 char $ac_func ();
19106 /* The GNU C library defines this for functions which it implements
19107     to always fail with ENOSYS.  Some functions are actually named
19108     something starting with __ and the normal name is an alias.  */
19109 #if defined __stub_$ac_func || defined __stub___$ac_func
19110 choke me
19111 #endif
19112
19113 int
19114 main ()
19115 {
19116 return $ac_func ();
19117   ;
19118   return 0;
19119 }
19120 _ACEOF
19121 rm -f conftest.$ac_objext conftest$ac_exeext
19122 if { (ac_try="$ac_link"
19123 case "(($ac_try" in
19124   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19125   *) ac_try_echo=$ac_try;;
19126 esac
19127 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19128   (eval "$ac_link") 2>conftest.er1
19129   ac_status=$?
19130   grep -v '^ *+' conftest.er1 >conftest.err
19131   rm -f conftest.er1
19132   cat conftest.err >&5
19133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19134   (exit $ac_status); } && {
19135          test -z "$ac_c_werror_flag" ||
19136          test ! -s conftest.err
19137        } && test -s conftest$ac_exeext &&
19138        $as_test_x conftest$ac_exeext; then
19139   eval "$as_ac_var=yes"
19140 else
19141   echo "$as_me: failed program was:" >&5
19142 sed 's/^/| /' conftest.$ac_ext >&5
19143
19144         eval "$as_ac_var=no"
19145 fi
19146
19147 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19148       conftest$ac_exeext conftest.$ac_ext
19149 fi
19150 ac_res=`eval echo '${'$as_ac_var'}'`
19151                { echo "$as_me:$LINENO: result: $ac_res" >&5
19152 echo "${ECHO_T}$ac_res" >&6; }
19153 if test `eval echo '${'$as_ac_var'}'` = yes; then
19154   cat >>confdefs.h <<_ACEOF
19155 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19156 _ACEOF
19157
19158 else
19159
19160 for ac_func in on_exit
19161 do
19162 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19163 { echo "$as_me:$LINENO: checking for $ac_func" >&5
19164 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19165 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
19166   echo $ECHO_N "(cached) $ECHO_C" >&6
19167 else
19168   cat >conftest.$ac_ext <<_ACEOF
19169 /* confdefs.h.  */
19170 _ACEOF
19171 cat confdefs.h >>conftest.$ac_ext
19172 cat >>conftest.$ac_ext <<_ACEOF
19173 /* end confdefs.h.  */
19174 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19175    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
19176 #define $ac_func innocuous_$ac_func
19177
19178 /* System header to define __stub macros and hopefully few prototypes,
19179     which can conflict with char $ac_func (); below.
19180     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19181     <limits.h> exists even on freestanding compilers.  */
19182
19183 #ifdef __STDC__
19184 # include <limits.h>
19185 #else
19186 # include <assert.h>
19187 #endif
19188
19189 #undef $ac_func
19190
19191 /* Override any GCC internal prototype to avoid an error.
19192    Use char because int might match the return type of a GCC
19193    builtin and then its argument prototype would still apply.  */
19194 #ifdef __cplusplus
19195 extern "C"
19196 #endif
19197 char $ac_func ();
19198 /* The GNU C library defines this for functions which it implements
19199     to always fail with ENOSYS.  Some functions are actually named
19200     something starting with __ and the normal name is an alias.  */
19201 #if defined __stub_$ac_func || defined __stub___$ac_func
19202 choke me
19203 #endif
19204
19205 int
19206 main ()
19207 {
19208 return $ac_func ();
19209   ;
19210   return 0;
19211 }
19212 _ACEOF
19213 rm -f conftest.$ac_objext conftest$ac_exeext
19214 if { (ac_try="$ac_link"
19215 case "(($ac_try" in
19216   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19217   *) ac_try_echo=$ac_try;;
19218 esac
19219 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19220   (eval "$ac_link") 2>conftest.er1
19221   ac_status=$?
19222   grep -v '^ *+' conftest.er1 >conftest.err
19223   rm -f conftest.er1
19224   cat conftest.err >&5
19225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19226   (exit $ac_status); } && {
19227          test -z "$ac_c_werror_flag" ||
19228          test ! -s conftest.err
19229        } && test -s conftest$ac_exeext &&
19230        $as_test_x conftest$ac_exeext; then
19231   eval "$as_ac_var=yes"
19232 else
19233   echo "$as_me: failed program was:" >&5
19234 sed 's/^/| /' conftest.$ac_ext >&5
19235
19236         eval "$as_ac_var=no"
19237 fi
19238
19239 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19240       conftest$ac_exeext conftest.$ac_ext
19241 fi
19242 ac_res=`eval echo '${'$as_ac_var'}'`
19243                { echo "$as_me:$LINENO: result: $ac_res" >&5
19244 echo "${ECHO_T}$ac_res" >&6; }
19245 if test `eval echo '${'$as_ac_var'}'` = yes; then
19246   cat >>confdefs.h <<_ACEOF
19247 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19248 _ACEOF
19249
19250 else
19251   { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
19252 echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
19253    { (exit 1); exit 1; }; }
19254 fi
19255 done
19256
19257 fi
19258 done
19259
19260
19261
19262 for ac_func in fseeko
19263 do
19264 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19265 { echo "$as_me:$LINENO: checking for $ac_func" >&5
19266 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19267 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
19268   echo $ECHO_N "(cached) $ECHO_C" >&6
19269 else
19270   cat >conftest.$ac_ext <<_ACEOF
19271 /* confdefs.h.  */
19272 _ACEOF
19273 cat confdefs.h >>conftest.$ac_ext
19274 cat >>conftest.$ac_ext <<_ACEOF
19275 /* end confdefs.h.  */
19276 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19277    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
19278 #define $ac_func innocuous_$ac_func
19279
19280 /* System header to define __stub macros and hopefully few prototypes,
19281     which can conflict with char $ac_func (); below.
19282     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19283     <limits.h> exists even on freestanding compilers.  */
19284
19285 #ifdef __STDC__
19286 # include <limits.h>
19287 #else
19288 # include <assert.h>
19289 #endif
19290
19291 #undef $ac_func
19292
19293 /* Override any GCC internal prototype to avoid an error.
19294    Use char because int might match the return type of a GCC
19295    builtin and then its argument prototype would still apply.  */
19296 #ifdef __cplusplus
19297 extern "C"
19298 #endif
19299 char $ac_func ();
19300 /* The GNU C library defines this for functions which it implements
19301     to always fail with ENOSYS.  Some functions are actually named
19302     something starting with __ and the normal name is an alias.  */
19303 #if defined __stub_$ac_func || defined __stub___$ac_func
19304 choke me
19305 #endif
19306
19307 int
19308 main ()
19309 {
19310 return $ac_func ();
19311   ;
19312   return 0;
19313 }
19314 _ACEOF
19315 rm -f conftest.$ac_objext conftest$ac_exeext
19316 if { (ac_try="$ac_link"
19317 case "(($ac_try" in
19318   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19319   *) ac_try_echo=$ac_try;;
19320 esac
19321 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19322   (eval "$ac_link") 2>conftest.er1
19323   ac_status=$?
19324   grep -v '^ *+' conftest.er1 >conftest.err
19325   rm -f conftest.er1
19326   cat conftest.err >&5
19327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19328   (exit $ac_status); } && {
19329          test -z "$ac_c_werror_flag" ||
19330          test ! -s conftest.err
19331        } && test -s conftest$ac_exeext &&
19332        $as_test_x conftest$ac_exeext; then
19333   eval "$as_ac_var=yes"
19334 else
19335   echo "$as_me: failed program was:" >&5
19336 sed 's/^/| /' conftest.$ac_ext >&5
19337
19338         eval "$as_ac_var=no"
19339 fi
19340
19341 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19342       conftest$ac_exeext conftest.$ac_ext
19343 fi
19344 ac_res=`eval echo '${'$as_ac_var'}'`
19345                { echo "$as_me:$LINENO: result: $ac_res" >&5
19346 echo "${ECHO_T}$ac_res" >&6; }
19347 if test `eval echo '${'$as_ac_var'}'` = yes; then
19348   cat >>confdefs.h <<_ACEOF
19349 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19350 _ACEOF
19351
19352 else
19353   case " $LIBOBJS " in
19354   *" $ac_func.$ac_objext "* ) ;;
19355   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19356  ;;
19357 esac
19358
19359 fi
19360 done
19361
19362
19363 case $host_os in
19364         # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
19365         # Mingw uses macros to access Win32 API calls
19366         bsdi*|netbsd*|mingw*)
19367
19368 cat >>confdefs.h <<\_ACEOF
19369 #define HAVE_FSEEKO 1
19370 _ACEOF
19371
19372                 ac_cv_func_fseeko=yes;;
19373         *)
19374                 { echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
19375 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
19376 if test "${ac_cv_sys_largefile_source+set}" = set; then
19377   echo $ECHO_N "(cached) $ECHO_C" >&6
19378 else
19379   while :; do
19380   cat >conftest.$ac_ext <<_ACEOF
19381 /* confdefs.h.  */
19382 _ACEOF
19383 cat confdefs.h >>conftest.$ac_ext
19384 cat >>conftest.$ac_ext <<_ACEOF
19385 /* end confdefs.h.  */
19386 #include <sys/types.h> /* for off_t */
19387      #include <stdio.h>
19388 int
19389 main ()
19390 {
19391 int (*fp) (FILE *, off_t, int) = fseeko;
19392      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
19393   ;
19394   return 0;
19395 }
19396 _ACEOF
19397 rm -f conftest.$ac_objext conftest$ac_exeext
19398 if { (ac_try="$ac_link"
19399 case "(($ac_try" in
19400   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19401   *) ac_try_echo=$ac_try;;
19402 esac
19403 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19404   (eval "$ac_link") 2>conftest.er1
19405   ac_status=$?
19406   grep -v '^ *+' conftest.er1 >conftest.err
19407   rm -f conftest.er1
19408   cat conftest.err >&5
19409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19410   (exit $ac_status); } && {
19411          test -z "$ac_c_werror_flag" ||
19412          test ! -s conftest.err
19413        } && test -s conftest$ac_exeext &&
19414        $as_test_x conftest$ac_exeext; then
19415   ac_cv_sys_largefile_source=no; break
19416 else
19417   echo "$as_me: failed program was:" >&5
19418 sed 's/^/| /' conftest.$ac_ext >&5
19419
19420
19421 fi
19422
19423 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19424       conftest$ac_exeext conftest.$ac_ext
19425   cat >conftest.$ac_ext <<_ACEOF
19426 /* confdefs.h.  */
19427 _ACEOF
19428 cat confdefs.h >>conftest.$ac_ext
19429 cat >>conftest.$ac_ext <<_ACEOF
19430 /* end confdefs.h.  */
19431 #define _LARGEFILE_SOURCE 1
19432 #include <sys/types.h> /* for off_t */
19433      #include <stdio.h>
19434 int
19435 main ()
19436 {
19437 int (*fp) (FILE *, off_t, int) = fseeko;
19438      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
19439   ;
19440   return 0;
19441 }
19442 _ACEOF
19443 rm -f conftest.$ac_objext conftest$ac_exeext
19444 if { (ac_try="$ac_link"
19445 case "(($ac_try" in
19446   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19447   *) ac_try_echo=$ac_try;;
19448 esac
19449 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19450   (eval "$ac_link") 2>conftest.er1
19451   ac_status=$?
19452   grep -v '^ *+' conftest.er1 >conftest.err
19453   rm -f conftest.er1
19454   cat conftest.err >&5
19455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19456   (exit $ac_status); } && {
19457          test -z "$ac_c_werror_flag" ||
19458          test ! -s conftest.err
19459        } && test -s conftest$ac_exeext &&
19460        $as_test_x conftest$ac_exeext; then
19461   ac_cv_sys_largefile_source=1; break
19462 else
19463   echo "$as_me: failed program was:" >&5
19464 sed 's/^/| /' conftest.$ac_ext >&5
19465
19466
19467 fi
19468
19469 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19470       conftest$ac_exeext conftest.$ac_ext
19471   ac_cv_sys_largefile_source=unknown
19472   break
19473 done
19474 fi
19475 { echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
19476 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
19477 case $ac_cv_sys_largefile_source in #(
19478   no | unknown) ;;
19479   *)
19480 cat >>confdefs.h <<_ACEOF
19481 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
19482 _ACEOF
19483 ;;
19484 esac
19485 rm -f conftest*
19486
19487 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
19488 # in glibc 2.1.3, but that breaks too many other things.
19489 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
19490 if test $ac_cv_sys_largefile_source != unknown; then
19491
19492 cat >>confdefs.h <<\_ACEOF
19493 #define HAVE_FSEEKO 1
19494 _ACEOF
19495
19496 fi
19497 ;;
19498 esac
19499
19500
19501 #
19502 # Pthreads
19503 #
19504 # For each platform, we need to know about any special compile and link
19505 # libraries, and whether the normal C function names are thread-safe.
19506 # See the comment at the top of src/port/thread.c for more information.
19507 # WIN32 doesn't need the pthread tests;  it always uses threads
19508 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
19509
19510
19511
19512 ac_ext=c
19513 ac_cpp='$CPP $CPPFLAGS'
19514 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19515 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19516 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19517
19518 acx_pthread_ok=no
19519
19520 # We used to check for pthread.h first, but this fails if pthread.h
19521 # requires special compiler flags (e.g. on True64 or Sequent).
19522 # It gets checked for in the link test anyway.
19523
19524 # First of all, check if the user has set any of the PTHREAD_LIBS,
19525 # etcetera environment variables, and if threads linking works using
19526 # them:
19527 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
19528         save_CFLAGS="$CFLAGS"
19529         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
19530         save_LIBS="$LIBS"
19531         LIBS="$PTHREAD_LIBS $LIBS"
19532         { echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
19533 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6; }
19534         cat >conftest.$ac_ext <<_ACEOF
19535 /* confdefs.h.  */
19536 _ACEOF
19537 cat confdefs.h >>conftest.$ac_ext
19538 cat >>conftest.$ac_ext <<_ACEOF
19539 /* end confdefs.h.  */
19540
19541 /* Override any GCC internal prototype to avoid an error.
19542    Use char because int might match the return type of a GCC
19543    builtin and then its argument prototype would still apply.  */
19544 #ifdef __cplusplus
19545 extern "C"
19546 #endif
19547 char pthread_join ();
19548 int
19549 main ()
19550 {
19551 return pthread_join ();
19552   ;
19553   return 0;
19554 }
19555 _ACEOF
19556 rm -f conftest.$ac_objext conftest$ac_exeext
19557 if { (ac_try="$ac_link"
19558 case "(($ac_try" in
19559   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19560   *) ac_try_echo=$ac_try;;
19561 esac
19562 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19563   (eval "$ac_link") 2>conftest.er1
19564   ac_status=$?
19565   grep -v '^ *+' conftest.er1 >conftest.err
19566   rm -f conftest.er1
19567   cat conftest.err >&5
19568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19569   (exit $ac_status); } && {
19570          test -z "$ac_c_werror_flag" ||
19571          test ! -s conftest.err
19572        } && test -s conftest$ac_exeext &&
19573        $as_test_x conftest$ac_exeext; then
19574   acx_pthread_ok=yes
19575 else
19576   echo "$as_me: failed program was:" >&5
19577 sed 's/^/| /' conftest.$ac_ext >&5
19578
19579
19580 fi
19581
19582 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19583       conftest$ac_exeext conftest.$ac_ext
19584         { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
19585 echo "${ECHO_T}$acx_pthread_ok" >&6; }
19586         if test x"$acx_pthread_ok" = xno; then
19587                 PTHREAD_LIBS=""
19588                 PTHREAD_CFLAGS=""
19589         fi
19590         LIBS="$save_LIBS"
19591         CFLAGS="$save_CFLAGS"
19592 fi
19593
19594 # We must check for the threads library under a number of different
19595 # names; the ordering is very important because some systems
19596 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
19597 # libraries is broken (non-POSIX).
19598
19599 # Create a list of thread flags to try.  Items starting with a "-" are
19600 # C compiler flags, and other items are library names, except for "none"
19601 # which indicates that we try without any flags at all, and "pthread-config"
19602 # which is a program returning the flags for the Pth emulation library.
19603
19604 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
19605
19606 # The ordering *is* (sometimes) important.  Some notes on the
19607 # individual items follow:
19608
19609 # pthreads: AIX (must check this before -lpthread)
19610 # none: in case threads are in libc; should be tried before -Kthread and
19611 #       other compiler flags to prevent continual compiler warnings
19612 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
19613 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
19614 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
19615 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
19616 # -pthreads: Solaris/gcc
19617 # -mthreads: Mingw32/gcc, Lynx/gcc
19618 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
19619 #      doesn't hurt to check since this sometimes defines pthreads too;
19620 #      also defines -D_REENTRANT)
19621 # pthread: Linux, etcetera
19622 # --thread-safe: KAI C++
19623 # pthread-config: use pthread-config program (for GNU Pth library)
19624
19625 case "${host_cpu}-${host_os}" in
19626         *solaris*)
19627
19628         # On Solaris (at least, for some versions), libc contains stubbed
19629         # (non-functional) versions of the pthreads routines, so link-based
19630         # tests will erroneously succeed.  (We need to link with -pthread or
19631         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
19632         # a function called by this macro, so we could check for that, but
19633         # who knows whether they'll stub that too in a future libc.)  So,
19634         # we'll just look for -pthreads and -lpthread first:
19635
19636         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
19637         ;;
19638 esac
19639
19640 if test x"$acx_pthread_ok" = xno; then
19641 for flag in $acx_pthread_flags; do
19642
19643         tryPTHREAD_CFLAGS=""
19644         tryPTHREAD_LIBS=""
19645         case $flag in
19646                 none)
19647                 { echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
19648 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6; }
19649                 ;;
19650
19651                 -*)
19652                 { echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
19653 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6; }
19654                 tryPTHREAD_CFLAGS="$flag"
19655                 ;;
19656
19657                 pthread-config)
19658                 # skip this if we already have flags defined, for PostgreSQL
19659                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
19660                 # Extract the first word of "pthread-config", so it can be a program name with args.
19661 set dummy pthread-config; ac_word=$2
19662 { echo "$as_me:$LINENO: checking for $ac_word" >&5
19663 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19664 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
19665   echo $ECHO_N "(cached) $ECHO_C" >&6
19666 else
19667   if test -n "$acx_pthread_config"; then
19668   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
19669 else
19670 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19671 for as_dir in $PATH
19672 do
19673   IFS=$as_save_IFS
19674   test -z "$as_dir" && as_dir=.
19675   for ac_exec_ext in '' $ac_executable_extensions; do
19676   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19677     ac_cv_prog_acx_pthread_config="yes"
19678     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19679     break 2
19680   fi
19681 done
19682 done
19683 IFS=$as_save_IFS
19684
19685   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
19686 fi
19687 fi
19688 acx_pthread_config=$ac_cv_prog_acx_pthread_config
19689 if test -n "$acx_pthread_config"; then
19690   { echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
19691 echo "${ECHO_T}$acx_pthread_config" >&6; }
19692 else
19693   { echo "$as_me:$LINENO: result: no" >&5
19694 echo "${ECHO_T}no" >&6; }
19695 fi
19696
19697
19698                 if test x"$acx_pthread_config" = xno; then continue; fi
19699                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
19700                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
19701                 ;;
19702
19703                 *)
19704                 { echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
19705 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6; }
19706                 tryPTHREAD_LIBS="-l$flag"
19707                 ;;
19708         esac
19709
19710         save_LIBS="$LIBS"
19711         save_CFLAGS="$CFLAGS"
19712         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
19713         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
19714
19715         # Check for various functions.  We must include pthread.h,
19716         # since some functions may be macros.  (On the Sequent, we
19717         # need a special flag -Kthread to make this header compile.)
19718         # We check for pthread_join because it is in -lpthread on IRIX
19719         # while pthread_create is in libc.  We check for pthread_attr_init
19720         # due to DEC craziness with -lpthreads.  We check for
19721         # pthread_cleanup_push because it is one of the few pthread
19722         # functions on Solaris that doesn't have a non-functional libc stub.
19723         # We try pthread_create on general principles.
19724         cat >conftest.$ac_ext <<_ACEOF
19725 /* confdefs.h.  */
19726 _ACEOF
19727 cat confdefs.h >>conftest.$ac_ext
19728 cat >>conftest.$ac_ext <<_ACEOF
19729 /* end confdefs.h.  */
19730 #include <pthread.h>
19731 int
19732 main ()
19733 {
19734 pthread_t th; pthread_join(th, 0);
19735                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
19736                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
19737   ;
19738   return 0;
19739 }
19740 _ACEOF
19741 rm -f conftest.$ac_objext conftest$ac_exeext
19742 if { (ac_try="$ac_link"
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_link") 2>conftest.er1
19749   ac_status=$?
19750   grep -v '^ *+' conftest.er1 >conftest.err
19751   rm -f conftest.er1
19752   cat conftest.err >&5
19753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19754   (exit $ac_status); } && {
19755          test -z "$ac_c_werror_flag" ||
19756          test ! -s conftest.err
19757        } && test -s conftest$ac_exeext &&
19758        $as_test_x conftest$ac_exeext; then
19759   acx_pthread_ok=yes
19760 else
19761   echo "$as_me: failed program was:" >&5
19762 sed 's/^/| /' conftest.$ac_ext >&5
19763
19764         acx_pthread_ok=no
19765 fi
19766
19767 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19768       conftest$ac_exeext conftest.$ac_ext
19769
19770         if test "x$acx_pthread_ok" = xyes; then
19771             # Don't use options that are ignored by the compiler.
19772             # We find them by checking stderror.
19773             cat >conftest.$ac_ext <<_ACEOF
19774 int
19775 main (int argc, char **argv)
19776 {
19777   (void) argc;
19778   (void) argv;
19779   return 0;
19780 }
19781 _ACEOF
19782             rm -f conftest.$ac_objext conftest$ac_exeext
19783             if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
19784                 # we continue with more flags because Linux needs -lpthread
19785                 # for libpq builds on PostgreSQL.  The test above only
19786                 # tests for building binaries, not shared libraries.
19787                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
19788                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
19789             else   acx_pthread_ok=no
19790             fi
19791         fi
19792
19793         LIBS="$save_LIBS"
19794         CFLAGS="$save_CFLAGS"
19795
19796         { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
19797 echo "${ECHO_T}$acx_pthread_ok" >&6; }
19798 done
19799 fi
19800
19801 # Various other checks:
19802 if test "x$acx_pthread_ok" = xyes; then
19803         save_LIBS="$LIBS"
19804         LIBS="$PTHREAD_LIBS $LIBS"
19805         save_CFLAGS="$CFLAGS"
19806         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
19807
19808         # Detect AIX lossage: threads are created detached by default
19809         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
19810         { echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
19811 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6; }
19812         cat >conftest.$ac_ext <<_ACEOF
19813 /* confdefs.h.  */
19814 _ACEOF
19815 cat confdefs.h >>conftest.$ac_ext
19816 cat >>conftest.$ac_ext <<_ACEOF
19817 /* end confdefs.h.  */
19818 #include <pthread.h>
19819 int
19820 main ()
19821 {
19822 int attr=PTHREAD_CREATE_JOINABLE;
19823   ;
19824   return 0;
19825 }
19826 _ACEOF
19827 rm -f conftest.$ac_objext conftest$ac_exeext
19828 if { (ac_try="$ac_link"
19829 case "(($ac_try" in
19830   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19831   *) ac_try_echo=$ac_try;;
19832 esac
19833 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19834   (eval "$ac_link") 2>conftest.er1
19835   ac_status=$?
19836   grep -v '^ *+' conftest.er1 >conftest.err
19837   rm -f conftest.er1
19838   cat conftest.err >&5
19839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19840   (exit $ac_status); } && {
19841          test -z "$ac_c_werror_flag" ||
19842          test ! -s conftest.err
19843        } && test -s conftest$ac_exeext &&
19844        $as_test_x conftest$ac_exeext; then
19845   ok=PTHREAD_CREATE_JOINABLE
19846 else
19847   echo "$as_me: failed program was:" >&5
19848 sed 's/^/| /' conftest.$ac_ext >&5
19849
19850         ok=unknown
19851 fi
19852
19853 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19854       conftest$ac_exeext conftest.$ac_ext
19855         if test x"$ok" = xunknown; then
19856                 cat >conftest.$ac_ext <<_ACEOF
19857 /* confdefs.h.  */
19858 _ACEOF
19859 cat confdefs.h >>conftest.$ac_ext
19860 cat >>conftest.$ac_ext <<_ACEOF
19861 /* end confdefs.h.  */
19862 #include <pthread.h>
19863 int
19864 main ()
19865 {
19866 int attr=PTHREAD_CREATE_UNDETACHED;
19867   ;
19868   return 0;
19869 }
19870 _ACEOF
19871 rm -f conftest.$ac_objext conftest$ac_exeext
19872 if { (ac_try="$ac_link"
19873 case "(($ac_try" in
19874   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19875   *) ac_try_echo=$ac_try;;
19876 esac
19877 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19878   (eval "$ac_link") 2>conftest.er1
19879   ac_status=$?
19880   grep -v '^ *+' conftest.er1 >conftest.err
19881   rm -f conftest.er1
19882   cat conftest.err >&5
19883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19884   (exit $ac_status); } && {
19885          test -z "$ac_c_werror_flag" ||
19886          test ! -s conftest.err
19887        } && test -s conftest$ac_exeext &&
19888        $as_test_x conftest$ac_exeext; then
19889   ok=PTHREAD_CREATE_UNDETACHED
19890 else
19891   echo "$as_me: failed program was:" >&5
19892 sed 's/^/| /' conftest.$ac_ext >&5
19893
19894         ok=unknown
19895 fi
19896
19897 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19898       conftest$ac_exeext conftest.$ac_ext
19899         fi
19900         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
19901
19902 cat >>confdefs.h <<\_ACEOF
19903 #define PTHREAD_CREATE_JOINABLE $ok
19904 _ACEOF
19905
19906         fi
19907         { echo "$as_me:$LINENO: result: ${ok}" >&5
19908 echo "${ECHO_T}${ok}" >&6; }
19909         if test x"$ok" = xunknown; then
19910                 { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
19911 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
19912         fi
19913
19914         { echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
19915 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6; }
19916         flag=no
19917 # We always add these in PostgreSQL
19918 #       case "${host_cpu}-${host_os}" in
19919 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
19920 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
19921 #       esac
19922         { echo "$as_me:$LINENO: result: ${flag}" >&5
19923 echo "${ECHO_T}${flag}" >&6; }
19924         if test "x$flag" != xno; then
19925                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
19926         fi
19927
19928         LIBS="$save_LIBS"
19929         CFLAGS="$save_CFLAGS"
19930
19931 # Supporting cc_r would require a special CC in all places that
19932 # use libpq, and that is ugly, so we don't do it.  Users can still
19933 # define their compiler as cc_r to do thread builds of everything.
19934         # More AIX lossage: must compile with cc_r
19935         # Extract the first word of "cc_r", so it can be a program name with args.
19936 set dummy cc_r; ac_word=$2
19937 { echo "$as_me:$LINENO: checking for $ac_word" >&5
19938 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19939 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
19940   echo $ECHO_N "(cached) $ECHO_C" >&6
19941 else
19942   if test -n "$PTHREAD_CC"; then
19943   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
19944 else
19945 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19946 for as_dir in $PATH
19947 do
19948   IFS=$as_save_IFS
19949   test -z "$as_dir" && as_dir=.
19950   for ac_exec_ext in '' $ac_executable_extensions; do
19951   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19952     ac_cv_prog_PTHREAD_CC="cc_r"
19953     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19954     break 2
19955   fi
19956 done
19957 done
19958 IFS=$as_save_IFS
19959
19960   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
19961 fi
19962 fi
19963 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
19964 if test -n "$PTHREAD_CC"; then
19965   { echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
19966 echo "${ECHO_T}$PTHREAD_CC" >&6; }
19967 else
19968   { echo "$as_me:$LINENO: result: no" >&5
19969 echo "${ECHO_T}no" >&6; }
19970 fi
19971
19972
19973 else
19974         PTHREAD_CC="$CC"
19975 fi
19976
19977
19978
19979
19980
19981 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
19982 if test x"$acx_pthread_ok" = xyes; then
19983
19984 cat >>confdefs.h <<\_ACEOF
19985 #define HAVE_PTHREAD 1
19986 _ACEOF
19987
19988         :
19989 else
19990         acx_pthread_ok=no
19991
19992 fi
19993 ac_ext=c
19994 ac_cpp='$CPP $CPPFLAGS'
19995 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19996 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19997 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19998
19999         # set thread flags
20000
20001 # Some platforms use these, so just define them.  They can't hurt if they
20002 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
20003 # enables 5-arg getpwuid_r, among other things.
20004 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
20005
20006
20007 # At this point, we don't want to muck with the compiler name for threading.
20008 # Let's see who fails, perhaps AIX.  2004-04-23
20009 if test "$PTHREAD_CC" != "$CC"; then
20010 { { echo "$as_me:$LINENO: error:
20011 PostgreSQL does not support platforms that require a special compiler
20012 for thread safety." >&5
20013 echo "$as_me: error:
20014 PostgreSQL does not support platforms that require a special compiler
20015 for thread safety." >&2;}
20016    { (exit 1); exit 1; }; }
20017 fi
20018
20019 if test "$THREAD_SUPPORT" = no; then
20020 { { echo "$as_me:$LINENO: error: cannot enable threads on this platform
20021 This platform is known to not support thread-safe programs.  For details,
20022 compile and run src/bin/pg_thread_test." >&5
20023 echo "$as_me: error: cannot enable threads on this platform
20024 This platform is known to not support thread-safe programs.  For details,
20025 compile and run src/bin/pg_thread_test." >&2;}
20026    { (exit 1); exit 1; }; }
20027 fi
20028
20029 # Check for *_r functions
20030 _CFLAGS="$CFLAGS"
20031 _LIBS="$LIBS"
20032 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
20033 LIBS="$LIBS $PTHREAD_LIBS"
20034
20035 if test "$PORTNAME" != "win32"; then
20036 if test "${ac_cv_header_pthread_h+set}" = set; then
20037   { echo "$as_me:$LINENO: checking for pthread.h" >&5
20038 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; }
20039 if test "${ac_cv_header_pthread_h+set}" = set; then
20040   echo $ECHO_N "(cached) $ECHO_C" >&6
20041 fi
20042 { echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
20043 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; }
20044 else
20045   # Is the header compilable?
20046 { echo "$as_me:$LINENO: checking pthread.h usability" >&5
20047 echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6; }
20048 cat >conftest.$ac_ext <<_ACEOF
20049 /* confdefs.h.  */
20050 _ACEOF
20051 cat confdefs.h >>conftest.$ac_ext
20052 cat >>conftest.$ac_ext <<_ACEOF
20053 /* end confdefs.h.  */
20054 $ac_includes_default
20055 #include <pthread.h>
20056 _ACEOF
20057 rm -f conftest.$ac_objext
20058 if { (ac_try="$ac_compile"
20059 case "(($ac_try" in
20060   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20061   *) ac_try_echo=$ac_try;;
20062 esac
20063 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20064   (eval "$ac_compile") 2>conftest.er1
20065   ac_status=$?
20066   grep -v '^ *+' conftest.er1 >conftest.err
20067   rm -f conftest.er1
20068   cat conftest.err >&5
20069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20070   (exit $ac_status); } && {
20071          test -z "$ac_c_werror_flag" ||
20072          test ! -s conftest.err
20073        } && test -s conftest.$ac_objext; then
20074   ac_header_compiler=yes
20075 else
20076   echo "$as_me: failed program was:" >&5
20077 sed 's/^/| /' conftest.$ac_ext >&5
20078
20079         ac_header_compiler=no
20080 fi
20081
20082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20083 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20084 echo "${ECHO_T}$ac_header_compiler" >&6; }
20085
20086 # Is the header present?
20087 { echo "$as_me:$LINENO: checking pthread.h presence" >&5
20088 echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6; }
20089 cat >conftest.$ac_ext <<_ACEOF
20090 /* confdefs.h.  */
20091 _ACEOF
20092 cat confdefs.h >>conftest.$ac_ext
20093 cat >>conftest.$ac_ext <<_ACEOF
20094 /* end confdefs.h.  */
20095 #include <pthread.h>
20096 _ACEOF
20097 if { (ac_try="$ac_cpp conftest.$ac_ext"
20098 case "(($ac_try" in
20099   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20100   *) ac_try_echo=$ac_try;;
20101 esac
20102 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20103   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
20104   ac_status=$?
20105   grep -v '^ *+' conftest.er1 >conftest.err
20106   rm -f conftest.er1
20107   cat conftest.err >&5
20108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20109   (exit $ac_status); } >/dev/null && {
20110          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20111          test ! -s conftest.err
20112        }; then
20113   ac_header_preproc=yes
20114 else
20115   echo "$as_me: failed program was:" >&5
20116 sed 's/^/| /' conftest.$ac_ext >&5
20117
20118   ac_header_preproc=no
20119 fi
20120
20121 rm -f conftest.err conftest.$ac_ext
20122 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20123 echo "${ECHO_T}$ac_header_preproc" >&6; }
20124
20125 # So?  What about this header?
20126 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20127   yes:no: )
20128     { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
20129 echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
20130     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
20131 echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
20132     ac_header_preproc=yes
20133     ;;
20134   no:yes:* )
20135     { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
20136 echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
20137     { echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
20138 echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
20139     { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
20140 echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
20141     { echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
20142 echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
20143     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
20144 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
20145     { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
20146 echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
20147     ( cat <<\_ASBOX
20148 ## ---------------------------------------- ##
20149 ## Report this to pgsql-bugs@postgresql.org ##
20150 ## ---------------------------------------- ##
20151 _ASBOX
20152      ) | sed "s/^/$as_me: WARNING:     /" >&2
20153     ;;
20154 esac
20155 { echo "$as_me:$LINENO: checking for pthread.h" >&5
20156 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; }
20157 if test "${ac_cv_header_pthread_h+set}" = set; then
20158   echo $ECHO_N "(cached) $ECHO_C" >&6
20159 else
20160   ac_cv_header_pthread_h=$ac_header_preproc
20161 fi
20162 { echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
20163 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; }
20164
20165 fi
20166 if test $ac_cv_header_pthread_h = yes; then
20167   :
20168 else
20169   { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safety" >&5
20170 echo "$as_me: error: pthread.h not found, required for --enable-thread-safety" >&2;}
20171    { (exit 1); exit 1; }; }
20172 fi
20173
20174
20175 fi
20176
20177
20178
20179
20180 for ac_func in strerror_r getpwuid_r gethostbyname_r
20181 do
20182 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20183 { echo "$as_me:$LINENO: checking for $ac_func" >&5
20184 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20185 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20186   echo $ECHO_N "(cached) $ECHO_C" >&6
20187 else
20188   cat >conftest.$ac_ext <<_ACEOF
20189 /* confdefs.h.  */
20190 _ACEOF
20191 cat confdefs.h >>conftest.$ac_ext
20192 cat >>conftest.$ac_ext <<_ACEOF
20193 /* end confdefs.h.  */
20194 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20195    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
20196 #define $ac_func innocuous_$ac_func
20197
20198 /* System header to define __stub macros and hopefully few prototypes,
20199     which can conflict with char $ac_func (); below.
20200     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20201     <limits.h> exists even on freestanding compilers.  */
20202
20203 #ifdef __STDC__
20204 # include <limits.h>
20205 #else
20206 # include <assert.h>
20207 #endif
20208
20209 #undef $ac_func
20210
20211 /* Override any GCC internal prototype to avoid an error.
20212    Use char because int might match the return type of a GCC
20213    builtin and then its argument prototype would still apply.  */
20214 #ifdef __cplusplus
20215 extern "C"
20216 #endif
20217 char $ac_func ();
20218 /* The GNU C library defines this for functions which it implements
20219     to always fail with ENOSYS.  Some functions are actually named
20220     something starting with __ and the normal name is an alias.  */
20221 #if defined __stub_$ac_func || defined __stub___$ac_func
20222 choke me
20223 #endif
20224
20225 int
20226 main ()
20227 {
20228 return $ac_func ();
20229   ;
20230   return 0;
20231 }
20232 _ACEOF
20233 rm -f conftest.$ac_objext conftest$ac_exeext
20234 if { (ac_try="$ac_link"
20235 case "(($ac_try" in
20236   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20237   *) ac_try_echo=$ac_try;;
20238 esac
20239 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20240   (eval "$ac_link") 2>conftest.er1
20241   ac_status=$?
20242   grep -v '^ *+' conftest.er1 >conftest.err
20243   rm -f conftest.er1
20244   cat conftest.err >&5
20245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20246   (exit $ac_status); } && {
20247          test -z "$ac_c_werror_flag" ||
20248          test ! -s conftest.err
20249        } && test -s conftest$ac_exeext &&
20250        $as_test_x conftest$ac_exeext; then
20251   eval "$as_ac_var=yes"
20252 else
20253   echo "$as_me: failed program was:" >&5
20254 sed 's/^/| /' conftest.$ac_ext >&5
20255
20256         eval "$as_ac_var=no"
20257 fi
20258
20259 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20260       conftest$ac_exeext conftest.$ac_ext
20261 fi
20262 ac_res=`eval echo '${'$as_ac_var'}'`
20263                { echo "$as_me:$LINENO: result: $ac_res" >&5
20264 echo "${ECHO_T}$ac_res" >&6; }
20265 if test `eval echo '${'$as_ac_var'}'` = yes; then
20266   cat >>confdefs.h <<_ACEOF
20267 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20268 _ACEOF
20269
20270 fi
20271 done
20272
20273
20274 # Do test here with the proper thread flags
20275 { echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
20276 echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6; }
20277 if test "${pgac_cv_func_getpwuid_r_5arg+set}" = set; then
20278   echo $ECHO_N "(cached) $ECHO_C" >&6
20279 else
20280   cat >conftest.$ac_ext <<_ACEOF
20281 /* confdefs.h.  */
20282 _ACEOF
20283 cat confdefs.h >>conftest.$ac_ext
20284 cat >>conftest.$ac_ext <<_ACEOF
20285 /* end confdefs.h.  */
20286 #include <sys/types.h>
20287 #include <pwd.h>
20288 int
20289 main ()
20290 {
20291 uid_t uid;
20292 struct passwd *space;
20293 char *buf;
20294 size_t bufsize;
20295 struct passwd **result;
20296 getpwuid_r(uid, space, buf, bufsize, result);
20297   ;
20298   return 0;
20299 }
20300 _ACEOF
20301 rm -f conftest.$ac_objext
20302 if { (ac_try="$ac_compile"
20303 case "(($ac_try" in
20304   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20305   *) ac_try_echo=$ac_try;;
20306 esac
20307 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20308   (eval "$ac_compile") 2>conftest.er1
20309   ac_status=$?
20310   grep -v '^ *+' conftest.er1 >conftest.err
20311   rm -f conftest.er1
20312   cat conftest.err >&5
20313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20314   (exit $ac_status); } && {
20315          test -z "$ac_c_werror_flag" ||
20316          test ! -s conftest.err
20317        } && test -s conftest.$ac_objext; then
20318   pgac_cv_func_getpwuid_r_5arg=yes
20319 else
20320   echo "$as_me: failed program was:" >&5
20321 sed 's/^/| /' conftest.$ac_ext >&5
20322
20323         pgac_cv_func_getpwuid_r_5arg=no
20324 fi
20325
20326 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20327 fi
20328 { echo "$as_me:$LINENO: result: $pgac_cv_func_getpwuid_r_5arg" >&5
20329 echo "${ECHO_T}$pgac_cv_func_getpwuid_r_5arg" >&6; }
20330 if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
20331
20332 cat >>confdefs.h <<\_ACEOF
20333 #define GETPWUID_R_5ARG
20334 _ACEOF
20335
20336 fi
20337
20338 { echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
20339 echo $ECHO_N "checking whether strerror_r returns int... $ECHO_C" >&6; }
20340 if test "${pgac_cv_func_strerror_r_int+set}" = set; then
20341   echo $ECHO_N "(cached) $ECHO_C" >&6
20342 else
20343   cat >conftest.$ac_ext <<_ACEOF
20344 /* confdefs.h.  */
20345 _ACEOF
20346 cat confdefs.h >>conftest.$ac_ext
20347 cat >>conftest.$ac_ext <<_ACEOF
20348 /* end confdefs.h.  */
20349 #include <string.h>
20350 int
20351 main ()
20352 {
20353 #ifndef _AIX
20354 int strerror_r(int, char *, size_t);
20355 #else
20356 /* Older AIX has 'int' for the third argument so we don't test the args. */
20357 int strerror_r();
20358 #endif
20359   ;
20360   return 0;
20361 }
20362 _ACEOF
20363 rm -f conftest.$ac_objext
20364 if { (ac_try="$ac_compile"
20365 case "(($ac_try" in
20366   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20367   *) ac_try_echo=$ac_try;;
20368 esac
20369 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20370   (eval "$ac_compile") 2>conftest.er1
20371   ac_status=$?
20372   grep -v '^ *+' conftest.er1 >conftest.err
20373   rm -f conftest.er1
20374   cat conftest.err >&5
20375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20376   (exit $ac_status); } && {
20377          test -z "$ac_c_werror_flag" ||
20378          test ! -s conftest.err
20379        } && test -s conftest.$ac_objext; then
20380   pgac_cv_func_strerror_r_int=yes
20381 else
20382   echo "$as_me: failed program was:" >&5
20383 sed 's/^/| /' conftest.$ac_ext >&5
20384
20385         pgac_cv_func_strerror_r_int=no
20386 fi
20387
20388 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20389 fi
20390 { echo "$as_me:$LINENO: result: $pgac_cv_func_strerror_r_int" >&5
20391 echo "${ECHO_T}$pgac_cv_func_strerror_r_int" >&6; }
20392 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
20393
20394 cat >>confdefs.h <<\_ACEOF
20395 #define STRERROR_R_INT
20396 _ACEOF
20397
20398 fi
20399
20400
20401 CFLAGS="$_CFLAGS"
20402 LIBS="$_LIBS"
20403
20404 else
20405 # do not use values from template file
20406 PTHREAD_CFLAGS=
20407 PTHREAD_LIBS=
20408 fi
20409
20410
20411
20412
20413
20414 # We can test for libldap_r only after we know PTHREAD_LIBS
20415 if test "$with_ldap" = yes ; then
20416   _LIBS="$LIBS"
20417   if test "$PORTNAME" != "win32"; then
20418
20419 { echo "$as_me:$LINENO: checking for ldap_bind in -lldap" >&5
20420 echo $ECHO_N "checking for ldap_bind in -lldap... $ECHO_C" >&6; }
20421 if test "${ac_cv_lib_ldap_ldap_bind+set}" = set; then
20422   echo $ECHO_N "(cached) $ECHO_C" >&6
20423 else
20424   ac_check_lib_save_LIBS=$LIBS
20425 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
20426 cat >conftest.$ac_ext <<_ACEOF
20427 /* confdefs.h.  */
20428 _ACEOF
20429 cat confdefs.h >>conftest.$ac_ext
20430 cat >>conftest.$ac_ext <<_ACEOF
20431 /* end confdefs.h.  */
20432
20433 /* Override any GCC internal prototype to avoid an error.
20434    Use char because int might match the return type of a GCC
20435    builtin and then its argument prototype would still apply.  */
20436 #ifdef __cplusplus
20437 extern "C"
20438 #endif
20439 char ldap_bind ();
20440 int
20441 main ()
20442 {
20443 return ldap_bind ();
20444   ;
20445   return 0;
20446 }
20447 _ACEOF
20448 rm -f conftest.$ac_objext conftest$ac_exeext
20449 if { (ac_try="$ac_link"
20450 case "(($ac_try" in
20451   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20452   *) ac_try_echo=$ac_try;;
20453 esac
20454 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20455   (eval "$ac_link") 2>conftest.er1
20456   ac_status=$?
20457   grep -v '^ *+' conftest.er1 >conftest.err
20458   rm -f conftest.er1
20459   cat conftest.err >&5
20460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20461   (exit $ac_status); } && {
20462          test -z "$ac_c_werror_flag" ||
20463          test ! -s conftest.err
20464        } && test -s conftest$ac_exeext &&
20465        $as_test_x conftest$ac_exeext; then
20466   ac_cv_lib_ldap_ldap_bind=yes
20467 else
20468   echo "$as_me: failed program was:" >&5
20469 sed 's/^/| /' conftest.$ac_ext >&5
20470
20471         ac_cv_lib_ldap_ldap_bind=no
20472 fi
20473
20474 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20475       conftest$ac_exeext conftest.$ac_ext
20476 LIBS=$ac_check_lib_save_LIBS
20477 fi
20478 { echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_bind" >&5
20479 echo "${ECHO_T}$ac_cv_lib_ldap_ldap_bind" >&6; }
20480 if test $ac_cv_lib_ldap_ldap_bind = yes; then
20481   cat >>confdefs.h <<_ACEOF
20482 #define HAVE_LIBLDAP 1
20483 _ACEOF
20484
20485   LIBS="-lldap $LIBS"
20486
20487 else
20488   { { echo "$as_me:$LINENO: error: library 'ldap' is required for LDAP" >&5
20489 echo "$as_me: error: library 'ldap' is required for LDAP" >&2;}
20490    { (exit 1); exit 1; }; }
20491 fi
20492
20493     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
20494     if test "$enable_thread_safety" = yes; then
20495       # on some platforms ldap_r fails to link without PTHREAD_LIBS
20496
20497 { echo "$as_me:$LINENO: checking for ldap_simple_bind in -lldap_r" >&5
20498 echo $ECHO_N "checking for ldap_simple_bind in -lldap_r... $ECHO_C" >&6; }
20499 if test "${ac_cv_lib_ldap_r_ldap_simple_bind+set}" = set; then
20500   echo $ECHO_N "(cached) $ECHO_C" >&6
20501 else
20502   ac_check_lib_save_LIBS=$LIBS
20503 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
20504 cat >conftest.$ac_ext <<_ACEOF
20505 /* confdefs.h.  */
20506 _ACEOF
20507 cat confdefs.h >>conftest.$ac_ext
20508 cat >>conftest.$ac_ext <<_ACEOF
20509 /* end confdefs.h.  */
20510
20511 /* Override any GCC internal prototype to avoid an error.
20512    Use char because int might match the return type of a GCC
20513    builtin and then its argument prototype would still apply.  */
20514 #ifdef __cplusplus
20515 extern "C"
20516 #endif
20517 char ldap_simple_bind ();
20518 int
20519 main ()
20520 {
20521 return ldap_simple_bind ();
20522   ;
20523   return 0;
20524 }
20525 _ACEOF
20526 rm -f conftest.$ac_objext conftest$ac_exeext
20527 if { (ac_try="$ac_link"
20528 case "(($ac_try" in
20529   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20530   *) ac_try_echo=$ac_try;;
20531 esac
20532 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20533   (eval "$ac_link") 2>conftest.er1
20534   ac_status=$?
20535   grep -v '^ *+' conftest.er1 >conftest.err
20536   rm -f conftest.er1
20537   cat conftest.err >&5
20538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20539   (exit $ac_status); } && {
20540          test -z "$ac_c_werror_flag" ||
20541          test ! -s conftest.err
20542        } && test -s conftest$ac_exeext &&
20543        $as_test_x conftest$ac_exeext; then
20544   ac_cv_lib_ldap_r_ldap_simple_bind=yes
20545 else
20546   echo "$as_me: failed program was:" >&5
20547 sed 's/^/| /' conftest.$ac_ext >&5
20548
20549         ac_cv_lib_ldap_r_ldap_simple_bind=no
20550 fi
20551
20552 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20553       conftest$ac_exeext conftest.$ac_ext
20554 LIBS=$ac_check_lib_save_LIBS
20555 fi
20556 { echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
20557 echo "${ECHO_T}$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
20558 if test $ac_cv_lib_ldap_r_ldap_simple_bind = yes; then
20559   cat >>confdefs.h <<_ACEOF
20560 #define HAVE_LIBLDAP_R 1
20561 _ACEOF
20562
20563   LIBS="-lldap_r $LIBS"
20564
20565 else
20566   { { echo "$as_me:$LINENO: error: library 'ldap_r' is required for LDAP" >&5
20567 echo "$as_me: error: library 'ldap_r' is required for LDAP" >&2;}
20568    { (exit 1); exit 1; }; }
20569 fi
20570
20571       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
20572     else
20573       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
20574     fi
20575   else
20576
20577 { echo "$as_me:$LINENO: checking for ldap_bind in -lwldap32" >&5
20578 echo $ECHO_N "checking for ldap_bind in -lwldap32... $ECHO_C" >&6; }
20579 if test "${ac_cv_lib_wldap32_ldap_bind+set}" = set; then
20580   echo $ECHO_N "(cached) $ECHO_C" >&6
20581 else
20582   ac_check_lib_save_LIBS=$LIBS
20583 LIBS="-lwldap32  $LIBS"
20584 cat >conftest.$ac_ext <<_ACEOF
20585 /* confdefs.h.  */
20586 _ACEOF
20587 cat confdefs.h >>conftest.$ac_ext
20588 cat >>conftest.$ac_ext <<_ACEOF
20589 /* end confdefs.h.  */
20590
20591 /* Override any GCC internal prototype to avoid an error.
20592    Use char because int might match the return type of a GCC
20593    builtin and then its argument prototype would still apply.  */
20594 #ifdef __cplusplus
20595 extern "C"
20596 #endif
20597 char ldap_bind ();
20598 int
20599 main ()
20600 {
20601 return ldap_bind ();
20602   ;
20603   return 0;
20604 }
20605 _ACEOF
20606 rm -f conftest.$ac_objext conftest$ac_exeext
20607 if { (ac_try="$ac_link"
20608 case "(($ac_try" in
20609   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20610   *) ac_try_echo=$ac_try;;
20611 esac
20612 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20613   (eval "$ac_link") 2>conftest.er1
20614   ac_status=$?
20615   grep -v '^ *+' conftest.er1 >conftest.err
20616   rm -f conftest.er1
20617   cat conftest.err >&5
20618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20619   (exit $ac_status); } && {
20620          test -z "$ac_c_werror_flag" ||
20621          test ! -s conftest.err
20622        } && test -s conftest$ac_exeext &&
20623        $as_test_x conftest$ac_exeext; then
20624   ac_cv_lib_wldap32_ldap_bind=yes
20625 else
20626   echo "$as_me: failed program was:" >&5
20627 sed 's/^/| /' conftest.$ac_ext >&5
20628
20629         ac_cv_lib_wldap32_ldap_bind=no
20630 fi
20631
20632 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20633       conftest$ac_exeext conftest.$ac_ext
20634 LIBS=$ac_check_lib_save_LIBS
20635 fi
20636 { echo "$as_me:$LINENO: result: $ac_cv_lib_wldap32_ldap_bind" >&5
20637 echo "${ECHO_T}$ac_cv_lib_wldap32_ldap_bind" >&6; }
20638 if test $ac_cv_lib_wldap32_ldap_bind = yes; then
20639   cat >>confdefs.h <<_ACEOF
20640 #define HAVE_LIBWLDAP32 1
20641 _ACEOF
20642
20643   LIBS="-lwldap32 $LIBS"
20644
20645 else
20646   { { echo "$as_me:$LINENO: error: library 'wldap32' is required for LDAP" >&5
20647 echo "$as_me: error: library 'wldap32' is required for LDAP" >&2;}
20648    { (exit 1); exit 1; }; }
20649 fi
20650
20651     LDAP_LIBS_FE="-lwldap32"
20652     LDAP_LIBS_BE="-lwldap32"
20653   fi
20654   LIBS="$_LIBS"
20655 fi
20656
20657
20658
20659
20660 # This test makes sure that run tests work at all.  Sometimes a shared
20661 # library is found by the linker, but the runtime linker can't find it.
20662 # This check should come after all modifications of compiler or linker
20663 # variables, and before any other run tests.
20664 { echo "$as_me:$LINENO: checking test program" >&5
20665 echo $ECHO_N "checking test program... $ECHO_C" >&6; }
20666 if test "$cross_compiling" = yes; then
20667   { echo "$as_me:$LINENO: result: cross-compiling" >&5
20668 echo "${ECHO_T}cross-compiling" >&6; }
20669 else
20670   cat >conftest.$ac_ext <<_ACEOF
20671 /* confdefs.h.  */
20672 _ACEOF
20673 cat confdefs.h >>conftest.$ac_ext
20674 cat >>conftest.$ac_ext <<_ACEOF
20675 /* end confdefs.h.  */
20676 int main() { return 0; }
20677 _ACEOF
20678 rm -f conftest$ac_exeext
20679 if { (ac_try="$ac_link"
20680 case "(($ac_try" in
20681   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20682   *) ac_try_echo=$ac_try;;
20683 esac
20684 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20685   (eval "$ac_link") 2>&5
20686   ac_status=$?
20687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20688   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20689   { (case "(($ac_try" in
20690   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20691   *) ac_try_echo=$ac_try;;
20692 esac
20693 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20694   (eval "$ac_try") 2>&5
20695   ac_status=$?
20696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20697   (exit $ac_status); }; }; then
20698   { echo "$as_me:$LINENO: result: ok" >&5
20699 echo "${ECHO_T}ok" >&6; }
20700 else
20701   echo "$as_me: program exited with status $ac_status" >&5
20702 echo "$as_me: failed program was:" >&5
20703 sed 's/^/| /' conftest.$ac_ext >&5
20704
20705 ( exit $ac_status )
20706 { echo "$as_me:$LINENO: result: failed" >&5
20707 echo "${ECHO_T}failed" >&6; }
20708 { { echo "$as_me:$LINENO: error:
20709 Could not execute a simple test program.  This may be a problem
20710 related to locating shared libraries.  Check the file 'config.log'
20711 for the exact reason." >&5
20712 echo "$as_me: error:
20713 Could not execute a simple test program.  This may be a problem
20714 related to locating shared libraries.  Check the file 'config.log'
20715 for the exact reason." >&2;}
20716    { (exit 1); exit 1; }; }
20717 fi
20718 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20719 fi
20720
20721
20722
20723 # --------------------
20724 # Run tests below here
20725 # --------------------
20726
20727 # Force use of our snprintf if system's doesn't do arg control
20728 # See comment above at snprintf test for details.
20729 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
20730   { echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
20731 echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6; }
20732 if test "${pgac_cv_printf_arg_control+set}" = set; then
20733   echo $ECHO_N "(cached) $ECHO_C" >&6
20734 else
20735   if test "$cross_compiling" = yes; then
20736   pgac_cv_printf_arg_control=cross
20737 else
20738   cat >conftest.$ac_ext <<_ACEOF
20739 /* confdefs.h.  */
20740 _ACEOF
20741 cat confdefs.h >>conftest.$ac_ext
20742 cat >>conftest.$ac_ext <<_ACEOF
20743 /* end confdefs.h.  */
20744 #include <stdio.h>
20745 #include <string.h>
20746
20747 int main()
20748 {
20749   char buf[100];
20750
20751   /* can it swap arguments? */
20752   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
20753   if (strcmp(buf, "4 3") != 0)
20754     return 1;
20755   return 0;
20756 }
20757 _ACEOF
20758 rm -f conftest$ac_exeext
20759 if { (ac_try="$ac_link"
20760 case "(($ac_try" in
20761   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20762   *) ac_try_echo=$ac_try;;
20763 esac
20764 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20765   (eval "$ac_link") 2>&5
20766   ac_status=$?
20767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20768   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20769   { (case "(($ac_try" in
20770   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20771   *) ac_try_echo=$ac_try;;
20772 esac
20773 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20774   (eval "$ac_try") 2>&5
20775   ac_status=$?
20776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20777   (exit $ac_status); }; }; then
20778   pgac_cv_printf_arg_control=yes
20779 else
20780   echo "$as_me: program exited with status $ac_status" >&5
20781 echo "$as_me: failed program was:" >&5
20782 sed 's/^/| /' conftest.$ac_ext >&5
20783
20784 ( exit $ac_status )
20785 pgac_cv_printf_arg_control=no
20786 fi
20787 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20788 fi
20789
20790
20791
20792 fi
20793 { echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
20794 echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6; }
20795
20796   if test $pgac_cv_printf_arg_control != yes ; then
20797     pgac_need_repl_snprintf=yes
20798   fi
20799 fi
20800
20801
20802
20803 { echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
20804 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6; }
20805 if test "${pgac_cv_type_long_int_64+set}" = set; then
20806   echo $ECHO_N "(cached) $ECHO_C" >&6
20807 else
20808   if test "$cross_compiling" = yes; then
20809   # If cross-compiling, check the size reported by the compiler and
20810 # trust that the arithmetic works.
20811 cat >conftest.$ac_ext <<_ACEOF
20812 /* confdefs.h.  */
20813 _ACEOF
20814 cat confdefs.h >>conftest.$ac_ext
20815 cat >>conftest.$ac_ext <<_ACEOF
20816 /* end confdefs.h.  */
20817
20818 int
20819 main ()
20820 {
20821 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
20822 test_array [0] = 0
20823
20824   ;
20825   return 0;
20826 }
20827 _ACEOF
20828 rm -f conftest.$ac_objext
20829 if { (ac_try="$ac_compile"
20830 case "(($ac_try" in
20831   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20832   *) ac_try_echo=$ac_try;;
20833 esac
20834 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20835   (eval "$ac_compile") 2>conftest.er1
20836   ac_status=$?
20837   grep -v '^ *+' conftest.er1 >conftest.err
20838   rm -f conftest.er1
20839   cat conftest.err >&5
20840   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20841   (exit $ac_status); } && {
20842          test -z "$ac_c_werror_flag" ||
20843          test ! -s conftest.err
20844        } && test -s conftest.$ac_objext; then
20845   pgac_cv_type_long_int_64=yes
20846 else
20847   echo "$as_me: failed program was:" >&5
20848 sed 's/^/| /' conftest.$ac_ext >&5
20849
20850         pgac_cv_type_long_int_64=no
20851 fi
20852
20853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20854 else
20855   cat >conftest.$ac_ext <<_ACEOF
20856 /* confdefs.h.  */
20857 _ACEOF
20858 cat confdefs.h >>conftest.$ac_ext
20859 cat >>conftest.$ac_ext <<_ACEOF
20860 /* end confdefs.h.  */
20861 typedef long int ac_int64;
20862
20863 /*
20864  * These are globals to discourage the compiler from folding all the
20865  * arithmetic tests down to compile-time constants.
20866  */
20867 ac_int64 a = 20000001;
20868 ac_int64 b = 40000005;
20869
20870 int does_int64_work()
20871 {
20872   ac_int64 c,d;
20873
20874   if (sizeof(ac_int64) != 8)
20875     return 0;                   /* definitely not the right size */
20876
20877   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
20878   c = a * b;
20879   d = (c + b) / b;
20880   if (d != a+1)
20881     return 0;
20882   return 1;
20883 }
20884 main() {
20885   exit(! does_int64_work());
20886 }
20887 _ACEOF
20888 rm -f conftest$ac_exeext
20889 if { (ac_try="$ac_link"
20890 case "(($ac_try" in
20891   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20892   *) ac_try_echo=$ac_try;;
20893 esac
20894 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20895   (eval "$ac_link") 2>&5
20896   ac_status=$?
20897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20898   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20899   { (case "(($ac_try" in
20900   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20901   *) ac_try_echo=$ac_try;;
20902 esac
20903 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20904   (eval "$ac_try") 2>&5
20905   ac_status=$?
20906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20907   (exit $ac_status); }; }; then
20908   pgac_cv_type_long_int_64=yes
20909 else
20910   echo "$as_me: program exited with status $ac_status" >&5
20911 echo "$as_me: failed program was:" >&5
20912 sed 's/^/| /' conftest.$ac_ext >&5
20913
20914 ( exit $ac_status )
20915 pgac_cv_type_long_int_64=no
20916 fi
20917 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20918 fi
20919
20920
20921 fi
20922 { echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
20923 echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6; }
20924
20925 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
20926 if test x"$pgac_cv_type_long_int_64" = xyes ; then
20927
20928 cat >>confdefs.h <<\_ACEOF
20929 #define HAVE_LONG_INT_64 1
20930 _ACEOF
20931
20932 fi
20933
20934
20935 if test x"$HAVE_LONG_INT_64" = x"no" ; then
20936   { echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
20937 echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6; }
20938 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
20939   echo $ECHO_N "(cached) $ECHO_C" >&6
20940 else
20941   if test "$cross_compiling" = yes; then
20942   # If cross-compiling, check the size reported by the compiler and
20943 # trust that the arithmetic works.
20944 cat >conftest.$ac_ext <<_ACEOF
20945 /* confdefs.h.  */
20946 _ACEOF
20947 cat confdefs.h >>conftest.$ac_ext
20948 cat >>conftest.$ac_ext <<_ACEOF
20949 /* end confdefs.h.  */
20950
20951 int
20952 main ()
20953 {
20954 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
20955 test_array [0] = 0
20956
20957   ;
20958   return 0;
20959 }
20960 _ACEOF
20961 rm -f conftest.$ac_objext
20962 if { (ac_try="$ac_compile"
20963 case "(($ac_try" in
20964   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20965   *) ac_try_echo=$ac_try;;
20966 esac
20967 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20968   (eval "$ac_compile") 2>conftest.er1
20969   ac_status=$?
20970   grep -v '^ *+' conftest.er1 >conftest.err
20971   rm -f conftest.er1
20972   cat conftest.err >&5
20973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20974   (exit $ac_status); } && {
20975          test -z "$ac_c_werror_flag" ||
20976          test ! -s conftest.err
20977        } && test -s conftest.$ac_objext; then
20978   pgac_cv_type_long_long_int_64=yes
20979 else
20980   echo "$as_me: failed program was:" >&5
20981 sed 's/^/| /' conftest.$ac_ext >&5
20982
20983         pgac_cv_type_long_long_int_64=no
20984 fi
20985
20986 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20987 else
20988   cat >conftest.$ac_ext <<_ACEOF
20989 /* confdefs.h.  */
20990 _ACEOF
20991 cat confdefs.h >>conftest.$ac_ext
20992 cat >>conftest.$ac_ext <<_ACEOF
20993 /* end confdefs.h.  */
20994 typedef long long int ac_int64;
20995
20996 /*
20997  * These are globals to discourage the compiler from folding all the
20998  * arithmetic tests down to compile-time constants.
20999  */
21000 ac_int64 a = 20000001;
21001 ac_int64 b = 40000005;
21002
21003 int does_int64_work()
21004 {
21005   ac_int64 c,d;
21006
21007   if (sizeof(ac_int64) != 8)
21008     return 0;                   /* definitely not the right size */
21009
21010   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
21011   c = a * b;
21012   d = (c + b) / b;
21013   if (d != a+1)
21014     return 0;
21015   return 1;
21016 }
21017 main() {
21018   exit(! does_int64_work());
21019 }
21020 _ACEOF
21021 rm -f conftest$ac_exeext
21022 if { (ac_try="$ac_link"
21023 case "(($ac_try" in
21024   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21025   *) ac_try_echo=$ac_try;;
21026 esac
21027 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21028   (eval "$ac_link") 2>&5
21029   ac_status=$?
21030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21031   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21032   { (case "(($ac_try" in
21033   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21034   *) ac_try_echo=$ac_try;;
21035 esac
21036 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21037   (eval "$ac_try") 2>&5
21038   ac_status=$?
21039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21040   (exit $ac_status); }; }; then
21041   pgac_cv_type_long_long_int_64=yes
21042 else
21043   echo "$as_me: program exited with status $ac_status" >&5
21044 echo "$as_me: failed program was:" >&5
21045 sed 's/^/| /' conftest.$ac_ext >&5
21046
21047 ( exit $ac_status )
21048 pgac_cv_type_long_long_int_64=no
21049 fi
21050 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21051 fi
21052
21053
21054 fi
21055 { echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
21056 echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6; }
21057
21058 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
21059 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
21060
21061 cat >>confdefs.h <<\_ACEOF
21062 #define HAVE_LONG_LONG_INT_64 1
21063 _ACEOF
21064
21065 fi
21066
21067 fi
21068
21069
21070
21071 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
21072   cat >conftest.$ac_ext <<_ACEOF
21073 /* confdefs.h.  */
21074 _ACEOF
21075 cat confdefs.h >>conftest.$ac_ext
21076 cat >>conftest.$ac_ext <<_ACEOF
21077 /* end confdefs.h.  */
21078
21079 #define INT64CONST(x)  x##LL
21080 long long int foo = INT64CONST(0x1234567890123456);
21081
21082 int
21083 main ()
21084 {
21085
21086   ;
21087   return 0;
21088 }
21089 _ACEOF
21090 rm -f conftest.$ac_objext
21091 if { (ac_try="$ac_compile"
21092 case "(($ac_try" in
21093   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21094   *) ac_try_echo=$ac_try;;
21095 esac
21096 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21097   (eval "$ac_compile") 2>conftest.er1
21098   ac_status=$?
21099   grep -v '^ *+' conftest.er1 >conftest.err
21100   rm -f conftest.er1
21101   cat conftest.err >&5
21102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21103   (exit $ac_status); } && {
21104          test -z "$ac_c_werror_flag" ||
21105          test ! -s conftest.err
21106        } && test -s conftest.$ac_objext; then
21107
21108 cat >>confdefs.h <<\_ACEOF
21109 #define HAVE_LL_CONSTANTS 1
21110 _ACEOF
21111
21112 else
21113   echo "$as_me: failed program was:" >&5
21114 sed 's/^/| /' conftest.$ac_ext >&5
21115
21116
21117 fi
21118
21119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21120 fi
21121
21122
21123 # If we found "long int" is 64 bits, assume snprintf handles it.  If
21124 # we found we need to use "long long int", better check.  We cope with
21125 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
21126 # work, fall back to our own snprintf emulation (which we know uses %lld).
21127
21128 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
21129   if test $pgac_need_repl_snprintf = no; then
21130     { echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
21131 echo $ECHO_N "checking snprintf format for long long int... $ECHO_C" >&6; }
21132 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
21133   echo $ECHO_N "(cached) $ECHO_C" >&6
21134 else
21135   for pgac_format in '%lld' '%qd' '%I64d'; do
21136 if test "$cross_compiling" = yes; then
21137   pgac_cv_snprintf_long_long_int_format=cross; break
21138 else
21139   cat >conftest.$ac_ext <<_ACEOF
21140 /* confdefs.h.  */
21141 _ACEOF
21142 cat confdefs.h >>conftest.$ac_ext
21143 cat >>conftest.$ac_ext <<_ACEOF
21144 /* end confdefs.h.  */
21145 #include <stdio.h>
21146 typedef long long int ac_int64;
21147 #define INT64_FORMAT "$pgac_format"
21148
21149 ac_int64 a = 20000001;
21150 ac_int64 b = 40000005;
21151
21152 int does_int64_snprintf_work()
21153 {
21154   ac_int64 c;
21155   char buf[100];
21156
21157   if (sizeof(ac_int64) != 8)
21158     return 0;                   /* doesn't look like the right size */
21159
21160   c = a * b;
21161   snprintf(buf, 100, INT64_FORMAT, c);
21162   if (strcmp(buf, "800000140000005") != 0)
21163     return 0;                   /* either multiply or snprintf is busted */
21164   return 1;
21165 }
21166 main() {
21167   exit(! does_int64_snprintf_work());
21168 }
21169 _ACEOF
21170 rm -f conftest$ac_exeext
21171 if { (ac_try="$ac_link"
21172 case "(($ac_try" in
21173   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21174   *) ac_try_echo=$ac_try;;
21175 esac
21176 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21177   (eval "$ac_link") 2>&5
21178   ac_status=$?
21179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21180   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21181   { (case "(($ac_try" in
21182   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21183   *) ac_try_echo=$ac_try;;
21184 esac
21185 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21186   (eval "$ac_try") 2>&5
21187   ac_status=$?
21188   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21189   (exit $ac_status); }; }; then
21190   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
21191 else
21192   echo "$as_me: program exited with status $ac_status" >&5
21193 echo "$as_me: failed program was:" >&5
21194 sed 's/^/| /' conftest.$ac_ext >&5
21195
21196 fi
21197 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21198 fi
21199
21200
21201 done
21202 fi
21203
21204 LONG_LONG_INT_FORMAT=''
21205
21206 case $pgac_cv_snprintf_long_long_int_format in
21207   cross) { echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
21208 echo "${ECHO_T}cannot test (not on host machine)" >&6; };;
21209   ?*)    { echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
21210 echo "${ECHO_T}$pgac_cv_snprintf_long_long_int_format" >&6; }
21211          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
21212   *)     { echo "$as_me:$LINENO: result: none" >&5
21213 echo "${ECHO_T}none" >&6; };;
21214 esac
21215     if test "$LONG_LONG_INT_FORMAT" = ""; then
21216       # Force usage of our own snprintf, since system snprintf is broken
21217       pgac_need_repl_snprintf=yes
21218       LONG_LONG_INT_FORMAT='%lld'
21219     fi
21220   else
21221     # Here if we previously decided we needed to use our own snprintf
21222     LONG_LONG_INT_FORMAT='%lld'
21223   fi
21224   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
21225   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
21226   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
21227 else
21228   # Here if we are not using 'long long int' at all
21229   INT64_FORMAT='"%ld"'
21230   UINT64_FORMAT='"%lu"'
21231 fi
21232
21233
21234 cat >>confdefs.h <<_ACEOF
21235 #define INT64_FORMAT $INT64_FORMAT
21236 _ACEOF
21237
21238
21239
21240 cat >>confdefs.h <<_ACEOF
21241 #define UINT64_FORMAT $UINT64_FORMAT
21242 _ACEOF
21243
21244
21245 # Now we have checked all the reasons to replace snprintf
21246 if test $pgac_need_repl_snprintf = yes; then
21247
21248 cat >>confdefs.h <<\_ACEOF
21249 #define USE_REPL_SNPRINTF 1
21250 _ACEOF
21251
21252   case " $LIBOBJS " in
21253   *" snprintf.$ac_objext "* ) ;;
21254   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
21255  ;;
21256 esac
21257
21258 fi
21259
21260 # Need a #define for the size of Datum (unsigned long)
21261 { echo "$as_me:$LINENO: checking for unsigned long" >&5
21262 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6; }
21263 if test "${ac_cv_type_unsigned_long+set}" = set; then
21264   echo $ECHO_N "(cached) $ECHO_C" >&6
21265 else
21266   cat >conftest.$ac_ext <<_ACEOF
21267 /* confdefs.h.  */
21268 _ACEOF
21269 cat confdefs.h >>conftest.$ac_ext
21270 cat >>conftest.$ac_ext <<_ACEOF
21271 /* end confdefs.h.  */
21272 $ac_includes_default
21273 typedef unsigned long ac__type_new_;
21274 int
21275 main ()
21276 {
21277 if ((ac__type_new_ *) 0)
21278   return 0;
21279 if (sizeof (ac__type_new_))
21280   return 0;
21281   ;
21282   return 0;
21283 }
21284 _ACEOF
21285 rm -f conftest.$ac_objext
21286 if { (ac_try="$ac_compile"
21287 case "(($ac_try" in
21288   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21289   *) ac_try_echo=$ac_try;;
21290 esac
21291 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21292   (eval "$ac_compile") 2>conftest.er1
21293   ac_status=$?
21294   grep -v '^ *+' conftest.er1 >conftest.err
21295   rm -f conftest.er1
21296   cat conftest.err >&5
21297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21298   (exit $ac_status); } && {
21299          test -z "$ac_c_werror_flag" ||
21300          test ! -s conftest.err
21301        } && test -s conftest.$ac_objext; then
21302   ac_cv_type_unsigned_long=yes
21303 else
21304   echo "$as_me: failed program was:" >&5
21305 sed 's/^/| /' conftest.$ac_ext >&5
21306
21307         ac_cv_type_unsigned_long=no
21308 fi
21309
21310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21311 fi
21312 { echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
21313 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6; }
21314
21315 # The cast to long int works around a bug in the HP C Compiler
21316 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
21317 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
21318 # This bug is HP SR number 8606223364.
21319 { echo "$as_me:$LINENO: checking size of unsigned long" >&5
21320 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6; }
21321 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
21322   echo $ECHO_N "(cached) $ECHO_C" >&6
21323 else
21324   if test "$cross_compiling" = yes; then
21325   # Depending upon the size, compute the lo and hi bounds.
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    typedef unsigned long ac__type_sizeof_;
21334 int
21335 main ()
21336 {
21337 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
21338 test_array [0] = 0
21339
21340   ;
21341   return 0;
21342 }
21343 _ACEOF
21344 rm -f conftest.$ac_objext
21345 if { (ac_try="$ac_compile"
21346 case "(($ac_try" in
21347   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21348   *) ac_try_echo=$ac_try;;
21349 esac
21350 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21351   (eval "$ac_compile") 2>conftest.er1
21352   ac_status=$?
21353   grep -v '^ *+' conftest.er1 >conftest.err
21354   rm -f conftest.er1
21355   cat conftest.err >&5
21356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21357   (exit $ac_status); } && {
21358          test -z "$ac_c_werror_flag" ||
21359          test ! -s conftest.err
21360        } && test -s conftest.$ac_objext; then
21361   ac_lo=0 ac_mid=0
21362   while :; do
21363     cat >conftest.$ac_ext <<_ACEOF
21364 /* confdefs.h.  */
21365 _ACEOF
21366 cat confdefs.h >>conftest.$ac_ext
21367 cat >>conftest.$ac_ext <<_ACEOF
21368 /* end confdefs.h.  */
21369 $ac_includes_default
21370    typedef unsigned long ac__type_sizeof_;
21371 int
21372 main ()
21373 {
21374 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
21375 test_array [0] = 0
21376
21377   ;
21378   return 0;
21379 }
21380 _ACEOF
21381 rm -f conftest.$ac_objext
21382 if { (ac_try="$ac_compile"
21383 case "(($ac_try" in
21384   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21385   *) ac_try_echo=$ac_try;;
21386 esac
21387 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21388   (eval "$ac_compile") 2>conftest.er1
21389   ac_status=$?
21390   grep -v '^ *+' conftest.er1 >conftest.err
21391   rm -f conftest.er1
21392   cat conftest.err >&5
21393   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21394   (exit $ac_status); } && {
21395          test -z "$ac_c_werror_flag" ||
21396          test ! -s conftest.err
21397        } && test -s conftest.$ac_objext; then
21398   ac_hi=$ac_mid; break
21399 else
21400   echo "$as_me: failed program was:" >&5
21401 sed 's/^/| /' conftest.$ac_ext >&5
21402
21403         ac_lo=`expr $ac_mid + 1`
21404                         if test $ac_lo -le $ac_mid; then
21405                           ac_lo= ac_hi=
21406                           break
21407                         fi
21408                         ac_mid=`expr 2 '*' $ac_mid + 1`
21409 fi
21410
21411 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21412   done
21413 else
21414   echo "$as_me: failed program was:" >&5
21415 sed 's/^/| /' conftest.$ac_ext >&5
21416
21417         cat >conftest.$ac_ext <<_ACEOF
21418 /* confdefs.h.  */
21419 _ACEOF
21420 cat confdefs.h >>conftest.$ac_ext
21421 cat >>conftest.$ac_ext <<_ACEOF
21422 /* end confdefs.h.  */
21423 $ac_includes_default
21424    typedef unsigned long ac__type_sizeof_;
21425 int
21426 main ()
21427 {
21428 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
21429 test_array [0] = 0
21430
21431   ;
21432   return 0;
21433 }
21434 _ACEOF
21435 rm -f conftest.$ac_objext
21436 if { (ac_try="$ac_compile"
21437 case "(($ac_try" in
21438   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21439   *) ac_try_echo=$ac_try;;
21440 esac
21441 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21442   (eval "$ac_compile") 2>conftest.er1
21443   ac_status=$?
21444   grep -v '^ *+' conftest.er1 >conftest.err
21445   rm -f conftest.er1
21446   cat conftest.err >&5
21447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21448   (exit $ac_status); } && {
21449          test -z "$ac_c_werror_flag" ||
21450          test ! -s conftest.err
21451        } && test -s conftest.$ac_objext; then
21452   ac_hi=-1 ac_mid=-1
21453   while :; do
21454     cat >conftest.$ac_ext <<_ACEOF
21455 /* confdefs.h.  */
21456 _ACEOF
21457 cat confdefs.h >>conftest.$ac_ext
21458 cat >>conftest.$ac_ext <<_ACEOF
21459 /* end confdefs.h.  */
21460 $ac_includes_default
21461    typedef unsigned long ac__type_sizeof_;
21462 int
21463 main ()
21464 {
21465 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
21466 test_array [0] = 0
21467
21468   ;
21469   return 0;
21470 }
21471 _ACEOF
21472 rm -f conftest.$ac_objext
21473 if { (ac_try="$ac_compile"
21474 case "(($ac_try" in
21475   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21476   *) ac_try_echo=$ac_try;;
21477 esac
21478 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21479   (eval "$ac_compile") 2>conftest.er1
21480   ac_status=$?
21481   grep -v '^ *+' conftest.er1 >conftest.err
21482   rm -f conftest.er1
21483   cat conftest.err >&5
21484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21485   (exit $ac_status); } && {
21486          test -z "$ac_c_werror_flag" ||
21487          test ! -s conftest.err
21488        } && test -s conftest.$ac_objext; then
21489   ac_lo=$ac_mid; break
21490 else
21491   echo "$as_me: failed program was:" >&5
21492 sed 's/^/| /' conftest.$ac_ext >&5
21493
21494         ac_hi=`expr '(' $ac_mid ')' - 1`
21495                         if test $ac_mid -le $ac_hi; then
21496                           ac_lo= ac_hi=
21497                           break
21498                         fi
21499                         ac_mid=`expr 2 '*' $ac_mid`
21500 fi
21501
21502 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21503   done
21504 else
21505   echo "$as_me: failed program was:" >&5
21506 sed 's/^/| /' conftest.$ac_ext >&5
21507
21508         ac_lo= ac_hi=
21509 fi
21510
21511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21512 fi
21513
21514 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21515 # Binary search between lo and hi bounds.
21516 while test "x$ac_lo" != "x$ac_hi"; do
21517   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21518   cat >conftest.$ac_ext <<_ACEOF
21519 /* confdefs.h.  */
21520 _ACEOF
21521 cat confdefs.h >>conftest.$ac_ext
21522 cat >>conftest.$ac_ext <<_ACEOF
21523 /* end confdefs.h.  */
21524 $ac_includes_default
21525    typedef unsigned long ac__type_sizeof_;
21526 int
21527 main ()
21528 {
21529 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
21530 test_array [0] = 0
21531
21532   ;
21533   return 0;
21534 }
21535 _ACEOF
21536 rm -f conftest.$ac_objext
21537 if { (ac_try="$ac_compile"
21538 case "(($ac_try" in
21539   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21540   *) ac_try_echo=$ac_try;;
21541 esac
21542 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21543   (eval "$ac_compile") 2>conftest.er1
21544   ac_status=$?
21545   grep -v '^ *+' conftest.er1 >conftest.err
21546   rm -f conftest.er1
21547   cat conftest.err >&5
21548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21549   (exit $ac_status); } && {
21550          test -z "$ac_c_werror_flag" ||
21551          test ! -s conftest.err
21552        } && test -s conftest.$ac_objext; then
21553   ac_hi=$ac_mid
21554 else
21555   echo "$as_me: failed program was:" >&5
21556 sed 's/^/| /' conftest.$ac_ext >&5
21557
21558         ac_lo=`expr '(' $ac_mid ')' + 1`
21559 fi
21560
21561 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21562 done
21563 case $ac_lo in
21564 ?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
21565 '') if test "$ac_cv_type_unsigned_long" = yes; then
21566      { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long)
21567 See \`config.log' for more details." >&5
21568 echo "$as_me: error: cannot compute sizeof (unsigned long)
21569 See \`config.log' for more details." >&2;}
21570    { (exit 77); exit 77; }; }
21571    else
21572      ac_cv_sizeof_unsigned_long=0
21573    fi ;;
21574 esac
21575 else
21576   cat >conftest.$ac_ext <<_ACEOF
21577 /* confdefs.h.  */
21578 _ACEOF
21579 cat confdefs.h >>conftest.$ac_ext
21580 cat >>conftest.$ac_ext <<_ACEOF
21581 /* end confdefs.h.  */
21582 $ac_includes_default
21583    typedef unsigned long ac__type_sizeof_;
21584 static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
21585 static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
21586 #include <stdio.h>
21587 #include <stdlib.h>
21588 int
21589 main ()
21590 {
21591
21592   FILE *f = fopen ("conftest.val", "w");
21593   if (! f)
21594     return 1;
21595   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
21596     {
21597       long int i = longval ();
21598       if (i != ((long int) (sizeof (ac__type_sizeof_))))
21599         return 1;
21600       fprintf (f, "%ld\n", i);
21601     }
21602   else
21603     {
21604       unsigned long int i = ulongval ();
21605       if (i != ((long int) (sizeof (ac__type_sizeof_))))
21606         return 1;
21607       fprintf (f, "%lu\n", i);
21608     }
21609   return ferror (f) || fclose (f) != 0;
21610
21611   ;
21612   return 0;
21613 }
21614 _ACEOF
21615 rm -f conftest$ac_exeext
21616 if { (ac_try="$ac_link"
21617 case "(($ac_try" in
21618   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21619   *) ac_try_echo=$ac_try;;
21620 esac
21621 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21622   (eval "$ac_link") 2>&5
21623   ac_status=$?
21624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21625   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21626   { (case "(($ac_try" in
21627   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21628   *) ac_try_echo=$ac_try;;
21629 esac
21630 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21631   (eval "$ac_try") 2>&5
21632   ac_status=$?
21633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21634   (exit $ac_status); }; }; then
21635   ac_cv_sizeof_unsigned_long=`cat conftest.val`
21636 else
21637   echo "$as_me: program exited with status $ac_status" >&5
21638 echo "$as_me: failed program was:" >&5
21639 sed 's/^/| /' conftest.$ac_ext >&5
21640
21641 ( exit $ac_status )
21642 if test "$ac_cv_type_unsigned_long" = yes; then
21643      { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long)
21644 See \`config.log' for more details." >&5
21645 echo "$as_me: error: cannot compute sizeof (unsigned long)
21646 See \`config.log' for more details." >&2;}
21647    { (exit 77); exit 77; }; }
21648    else
21649      ac_cv_sizeof_unsigned_long=0
21650    fi
21651 fi
21652 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21653 fi
21654 rm -f conftest.val
21655 fi
21656 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
21657 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6; }
21658
21659
21660
21661 cat >>confdefs.h <<_ACEOF
21662 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
21663 _ACEOF
21664
21665
21666
21667 # And check size of void *, size_t (enables tweaks for > 32bit address space)
21668 { echo "$as_me:$LINENO: checking for void *" >&5
21669 echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
21670 if test "${ac_cv_type_void_p+set}" = set; then
21671   echo $ECHO_N "(cached) $ECHO_C" >&6
21672 else
21673   cat >conftest.$ac_ext <<_ACEOF
21674 /* confdefs.h.  */
21675 _ACEOF
21676 cat confdefs.h >>conftest.$ac_ext
21677 cat >>conftest.$ac_ext <<_ACEOF
21678 /* end confdefs.h.  */
21679 $ac_includes_default
21680 typedef void * ac__type_new_;
21681 int
21682 main ()
21683 {
21684 if ((ac__type_new_ *) 0)
21685   return 0;
21686 if (sizeof (ac__type_new_))
21687   return 0;
21688   ;
21689   return 0;
21690 }
21691 _ACEOF
21692 rm -f conftest.$ac_objext
21693 if { (ac_try="$ac_compile"
21694 case "(($ac_try" in
21695   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21696   *) ac_try_echo=$ac_try;;
21697 esac
21698 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21699   (eval "$ac_compile") 2>conftest.er1
21700   ac_status=$?
21701   grep -v '^ *+' conftest.er1 >conftest.err
21702   rm -f conftest.er1
21703   cat conftest.err >&5
21704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21705   (exit $ac_status); } && {
21706          test -z "$ac_c_werror_flag" ||
21707          test ! -s conftest.err
21708        } && test -s conftest.$ac_objext; then
21709   ac_cv_type_void_p=yes
21710 else
21711   echo "$as_me: failed program was:" >&5
21712 sed 's/^/| /' conftest.$ac_ext >&5
21713
21714         ac_cv_type_void_p=no
21715 fi
21716
21717 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21718 fi
21719 { echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
21720 echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
21721
21722 # The cast to long int works around a bug in the HP C Compiler
21723 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
21724 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
21725 # This bug is HP SR number 8606223364.
21726 { echo "$as_me:$LINENO: checking size of void *" >&5
21727 echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
21728 if test "${ac_cv_sizeof_void_p+set}" = set; then
21729   echo $ECHO_N "(cached) $ECHO_C" >&6
21730 else
21731   if test "$cross_compiling" = yes; then
21732   # Depending upon the size, compute the lo and hi bounds.
21733 cat >conftest.$ac_ext <<_ACEOF
21734 /* confdefs.h.  */
21735 _ACEOF
21736 cat confdefs.h >>conftest.$ac_ext
21737 cat >>conftest.$ac_ext <<_ACEOF
21738 /* end confdefs.h.  */
21739 $ac_includes_default
21740    typedef void * ac__type_sizeof_;
21741 int
21742 main ()
21743 {
21744 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
21745 test_array [0] = 0
21746
21747   ;
21748   return 0;
21749 }
21750 _ACEOF
21751 rm -f conftest.$ac_objext
21752 if { (ac_try="$ac_compile"
21753 case "(($ac_try" in
21754   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21755   *) ac_try_echo=$ac_try;;
21756 esac
21757 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21758   (eval "$ac_compile") 2>conftest.er1
21759   ac_status=$?
21760   grep -v '^ *+' conftest.er1 >conftest.err
21761   rm -f conftest.er1
21762   cat conftest.err >&5
21763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21764   (exit $ac_status); } && {
21765          test -z "$ac_c_werror_flag" ||
21766          test ! -s conftest.err
21767        } && test -s conftest.$ac_objext; then
21768   ac_lo=0 ac_mid=0
21769   while :; do
21770     cat >conftest.$ac_ext <<_ACEOF
21771 /* confdefs.h.  */
21772 _ACEOF
21773 cat confdefs.h >>conftest.$ac_ext
21774 cat >>conftest.$ac_ext <<_ACEOF
21775 /* end confdefs.h.  */
21776 $ac_includes_default
21777    typedef void * ac__type_sizeof_;
21778 int
21779 main ()
21780 {
21781 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
21782 test_array [0] = 0
21783
21784   ;
21785   return 0;
21786 }
21787 _ACEOF
21788 rm -f conftest.$ac_objext
21789 if { (ac_try="$ac_compile"
21790 case "(($ac_try" in
21791   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21792   *) ac_try_echo=$ac_try;;
21793 esac
21794 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21795   (eval "$ac_compile") 2>conftest.er1
21796   ac_status=$?
21797   grep -v '^ *+' conftest.er1 >conftest.err
21798   rm -f conftest.er1
21799   cat conftest.err >&5
21800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21801   (exit $ac_status); } && {
21802          test -z "$ac_c_werror_flag" ||
21803          test ! -s conftest.err
21804        } && test -s conftest.$ac_objext; then
21805   ac_hi=$ac_mid; break
21806 else
21807   echo "$as_me: failed program was:" >&5
21808 sed 's/^/| /' conftest.$ac_ext >&5
21809
21810         ac_lo=`expr $ac_mid + 1`
21811                         if test $ac_lo -le $ac_mid; then
21812                           ac_lo= ac_hi=
21813                           break
21814                         fi
21815                         ac_mid=`expr 2 '*' $ac_mid + 1`
21816 fi
21817
21818 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21819   done
21820 else
21821   echo "$as_me: failed program was:" >&5
21822 sed 's/^/| /' conftest.$ac_ext >&5
21823
21824         cat >conftest.$ac_ext <<_ACEOF
21825 /* confdefs.h.  */
21826 _ACEOF
21827 cat confdefs.h >>conftest.$ac_ext
21828 cat >>conftest.$ac_ext <<_ACEOF
21829 /* end confdefs.h.  */
21830 $ac_includes_default
21831    typedef void * ac__type_sizeof_;
21832 int
21833 main ()
21834 {
21835 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
21836 test_array [0] = 0
21837
21838   ;
21839   return 0;
21840 }
21841 _ACEOF
21842 rm -f conftest.$ac_objext
21843 if { (ac_try="$ac_compile"
21844 case "(($ac_try" in
21845   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21846   *) ac_try_echo=$ac_try;;
21847 esac
21848 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21849   (eval "$ac_compile") 2>conftest.er1
21850   ac_status=$?
21851   grep -v '^ *+' conftest.er1 >conftest.err
21852   rm -f conftest.er1
21853   cat conftest.err >&5
21854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21855   (exit $ac_status); } && {
21856          test -z "$ac_c_werror_flag" ||
21857          test ! -s conftest.err
21858        } && test -s conftest.$ac_objext; then
21859   ac_hi=-1 ac_mid=-1
21860   while :; do
21861     cat >conftest.$ac_ext <<_ACEOF
21862 /* confdefs.h.  */
21863 _ACEOF
21864 cat confdefs.h >>conftest.$ac_ext
21865 cat >>conftest.$ac_ext <<_ACEOF
21866 /* end confdefs.h.  */
21867 $ac_includes_default
21868    typedef void * ac__type_sizeof_;
21869 int
21870 main ()
21871 {
21872 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
21873 test_array [0] = 0
21874
21875   ;
21876   return 0;
21877 }
21878 _ACEOF
21879 rm -f conftest.$ac_objext
21880 if { (ac_try="$ac_compile"
21881 case "(($ac_try" in
21882   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21883   *) ac_try_echo=$ac_try;;
21884 esac
21885 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21886   (eval "$ac_compile") 2>conftest.er1
21887   ac_status=$?
21888   grep -v '^ *+' conftest.er1 >conftest.err
21889   rm -f conftest.er1
21890   cat conftest.err >&5
21891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21892   (exit $ac_status); } && {
21893          test -z "$ac_c_werror_flag" ||
21894          test ! -s conftest.err
21895        } && test -s conftest.$ac_objext; then
21896   ac_lo=$ac_mid; break
21897 else
21898   echo "$as_me: failed program was:" >&5
21899 sed 's/^/| /' conftest.$ac_ext >&5
21900
21901         ac_hi=`expr '(' $ac_mid ')' - 1`
21902                         if test $ac_mid -le $ac_hi; then
21903                           ac_lo= ac_hi=
21904                           break
21905                         fi
21906                         ac_mid=`expr 2 '*' $ac_mid`
21907 fi
21908
21909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21910   done
21911 else
21912   echo "$as_me: failed program was:" >&5
21913 sed 's/^/| /' conftest.$ac_ext >&5
21914
21915         ac_lo= ac_hi=
21916 fi
21917
21918 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21919 fi
21920
21921 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21922 # Binary search between lo and hi bounds.
21923 while test "x$ac_lo" != "x$ac_hi"; do
21924   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21925   cat >conftest.$ac_ext <<_ACEOF
21926 /* confdefs.h.  */
21927 _ACEOF
21928 cat confdefs.h >>conftest.$ac_ext
21929 cat >>conftest.$ac_ext <<_ACEOF
21930 /* end confdefs.h.  */
21931 $ac_includes_default
21932    typedef void * ac__type_sizeof_;
21933 int
21934 main ()
21935 {
21936 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
21937 test_array [0] = 0
21938
21939   ;
21940   return 0;
21941 }
21942 _ACEOF
21943 rm -f conftest.$ac_objext
21944 if { (ac_try="$ac_compile"
21945 case "(($ac_try" in
21946   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21947   *) ac_try_echo=$ac_try;;
21948 esac
21949 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21950   (eval "$ac_compile") 2>conftest.er1
21951   ac_status=$?
21952   grep -v '^ *+' conftest.er1 >conftest.err
21953   rm -f conftest.er1
21954   cat conftest.err >&5
21955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21956   (exit $ac_status); } && {
21957          test -z "$ac_c_werror_flag" ||
21958          test ! -s conftest.err
21959        } && test -s conftest.$ac_objext; then
21960   ac_hi=$ac_mid
21961 else
21962   echo "$as_me: failed program was:" >&5
21963 sed 's/^/| /' conftest.$ac_ext >&5
21964
21965         ac_lo=`expr '(' $ac_mid ')' + 1`
21966 fi
21967
21968 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21969 done
21970 case $ac_lo in
21971 ?*) ac_cv_sizeof_void_p=$ac_lo;;
21972 '') if test "$ac_cv_type_void_p" = yes; then
21973      { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
21974 See \`config.log' for more details." >&5
21975 echo "$as_me: error: cannot compute sizeof (void *)
21976 See \`config.log' for more details." >&2;}
21977    { (exit 77); exit 77; }; }
21978    else
21979      ac_cv_sizeof_void_p=0
21980    fi ;;
21981 esac
21982 else
21983   cat >conftest.$ac_ext <<_ACEOF
21984 /* confdefs.h.  */
21985 _ACEOF
21986 cat confdefs.h >>conftest.$ac_ext
21987 cat >>conftest.$ac_ext <<_ACEOF
21988 /* end confdefs.h.  */
21989 $ac_includes_default
21990    typedef void * ac__type_sizeof_;
21991 static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
21992 static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
21993 #include <stdio.h>
21994 #include <stdlib.h>
21995 int
21996 main ()
21997 {
21998
21999   FILE *f = fopen ("conftest.val", "w");
22000   if (! f)
22001     return 1;
22002   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
22003     {
22004       long int i = longval ();
22005       if (i != ((long int) (sizeof (ac__type_sizeof_))))
22006         return 1;
22007       fprintf (f, "%ld\n", i);
22008     }
22009   else
22010     {
22011       unsigned long int i = ulongval ();
22012       if (i != ((long int) (sizeof (ac__type_sizeof_))))
22013         return 1;
22014       fprintf (f, "%lu\n", i);
22015     }
22016   return ferror (f) || fclose (f) != 0;
22017
22018   ;
22019   return 0;
22020 }
22021 _ACEOF
22022 rm -f conftest$ac_exeext
22023 if { (ac_try="$ac_link"
22024 case "(($ac_try" in
22025   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22026   *) ac_try_echo=$ac_try;;
22027 esac
22028 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22029   (eval "$ac_link") 2>&5
22030   ac_status=$?
22031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22032   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22033   { (case "(($ac_try" in
22034   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22035   *) ac_try_echo=$ac_try;;
22036 esac
22037 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22038   (eval "$ac_try") 2>&5
22039   ac_status=$?
22040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22041   (exit $ac_status); }; }; then
22042   ac_cv_sizeof_void_p=`cat conftest.val`
22043 else
22044   echo "$as_me: program exited with status $ac_status" >&5
22045 echo "$as_me: failed program was:" >&5
22046 sed 's/^/| /' conftest.$ac_ext >&5
22047
22048 ( exit $ac_status )
22049 if test "$ac_cv_type_void_p" = yes; then
22050      { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
22051 See \`config.log' for more details." >&5
22052 echo "$as_me: error: cannot compute sizeof (void *)
22053 See \`config.log' for more details." >&2;}
22054    { (exit 77); exit 77; }; }
22055    else
22056      ac_cv_sizeof_void_p=0
22057    fi
22058 fi
22059 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22060 fi
22061 rm -f conftest.val
22062 fi
22063 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
22064 echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
22065
22066
22067
22068 cat >>confdefs.h <<_ACEOF
22069 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
22070 _ACEOF
22071
22072
22073 { echo "$as_me:$LINENO: checking for size_t" >&5
22074 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
22075 if test "${ac_cv_type_size_t+set}" = set; then
22076   echo $ECHO_N "(cached) $ECHO_C" >&6
22077 else
22078   cat >conftest.$ac_ext <<_ACEOF
22079 /* confdefs.h.  */
22080 _ACEOF
22081 cat confdefs.h >>conftest.$ac_ext
22082 cat >>conftest.$ac_ext <<_ACEOF
22083 /* end confdefs.h.  */
22084 $ac_includes_default
22085 typedef size_t ac__type_new_;
22086 int
22087 main ()
22088 {
22089 if ((ac__type_new_ *) 0)
22090   return 0;
22091 if (sizeof (ac__type_new_))
22092   return 0;
22093   ;
22094   return 0;
22095 }
22096 _ACEOF
22097 rm -f conftest.$ac_objext
22098 if { (ac_try="$ac_compile"
22099 case "(($ac_try" in
22100   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22101   *) ac_try_echo=$ac_try;;
22102 esac
22103 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22104   (eval "$ac_compile") 2>conftest.er1
22105   ac_status=$?
22106   grep -v '^ *+' conftest.er1 >conftest.err
22107   rm -f conftest.er1
22108   cat conftest.err >&5
22109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22110   (exit $ac_status); } && {
22111          test -z "$ac_c_werror_flag" ||
22112          test ! -s conftest.err
22113        } && test -s conftest.$ac_objext; then
22114   ac_cv_type_size_t=yes
22115 else
22116   echo "$as_me: failed program was:" >&5
22117 sed 's/^/| /' conftest.$ac_ext >&5
22118
22119         ac_cv_type_size_t=no
22120 fi
22121
22122 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22123 fi
22124 { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
22125 echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
22126
22127 # The cast to long int works around a bug in the HP C Compiler
22128 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22129 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22130 # This bug is HP SR number 8606223364.
22131 { echo "$as_me:$LINENO: checking size of size_t" >&5
22132 echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
22133 if test "${ac_cv_sizeof_size_t+set}" = set; then
22134   echo $ECHO_N "(cached) $ECHO_C" >&6
22135 else
22136   if test "$cross_compiling" = yes; then
22137   # Depending upon the size, compute the lo and hi bounds.
22138 cat >conftest.$ac_ext <<_ACEOF
22139 /* confdefs.h.  */
22140 _ACEOF
22141 cat confdefs.h >>conftest.$ac_ext
22142 cat >>conftest.$ac_ext <<_ACEOF
22143 /* end confdefs.h.  */
22144 $ac_includes_default
22145    typedef size_t ac__type_sizeof_;
22146 int
22147 main ()
22148 {
22149 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
22150 test_array [0] = 0
22151
22152   ;
22153   return 0;
22154 }
22155 _ACEOF
22156 rm -f conftest.$ac_objext
22157 if { (ac_try="$ac_compile"
22158 case "(($ac_try" in
22159   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22160   *) ac_try_echo=$ac_try;;
22161 esac
22162 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22163   (eval "$ac_compile") 2>conftest.er1
22164   ac_status=$?
22165   grep -v '^ *+' conftest.er1 >conftest.err
22166   rm -f conftest.er1
22167   cat conftest.err >&5
22168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22169   (exit $ac_status); } && {
22170          test -z "$ac_c_werror_flag" ||
22171          test ! -s conftest.err
22172        } && test -s conftest.$ac_objext; then
22173   ac_lo=0 ac_mid=0
22174   while :; do
22175     cat >conftest.$ac_ext <<_ACEOF
22176 /* confdefs.h.  */
22177 _ACEOF
22178 cat confdefs.h >>conftest.$ac_ext
22179 cat >>conftest.$ac_ext <<_ACEOF
22180 /* end confdefs.h.  */
22181 $ac_includes_default
22182    typedef size_t ac__type_sizeof_;
22183 int
22184 main ()
22185 {
22186 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
22187 test_array [0] = 0
22188
22189   ;
22190   return 0;
22191 }
22192 _ACEOF
22193 rm -f conftest.$ac_objext
22194 if { (ac_try="$ac_compile"
22195 case "(($ac_try" in
22196   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22197   *) ac_try_echo=$ac_try;;
22198 esac
22199 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22200   (eval "$ac_compile") 2>conftest.er1
22201   ac_status=$?
22202   grep -v '^ *+' conftest.er1 >conftest.err
22203   rm -f conftest.er1
22204   cat conftest.err >&5
22205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22206   (exit $ac_status); } && {
22207          test -z "$ac_c_werror_flag" ||
22208          test ! -s conftest.err
22209        } && test -s conftest.$ac_objext; then
22210   ac_hi=$ac_mid; break
22211 else
22212   echo "$as_me: failed program was:" >&5
22213 sed 's/^/| /' conftest.$ac_ext >&5
22214
22215         ac_lo=`expr $ac_mid + 1`
22216                         if test $ac_lo -le $ac_mid; then
22217                           ac_lo= ac_hi=
22218                           break
22219                         fi
22220                         ac_mid=`expr 2 '*' $ac_mid + 1`
22221 fi
22222
22223 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22224   done
22225 else
22226   echo "$as_me: failed program was:" >&5
22227 sed 's/^/| /' conftest.$ac_ext >&5
22228
22229         cat >conftest.$ac_ext <<_ACEOF
22230 /* confdefs.h.  */
22231 _ACEOF
22232 cat confdefs.h >>conftest.$ac_ext
22233 cat >>conftest.$ac_ext <<_ACEOF
22234 /* end confdefs.h.  */
22235 $ac_includes_default
22236    typedef size_t ac__type_sizeof_;
22237 int
22238 main ()
22239 {
22240 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
22241 test_array [0] = 0
22242
22243   ;
22244   return 0;
22245 }
22246 _ACEOF
22247 rm -f conftest.$ac_objext
22248 if { (ac_try="$ac_compile"
22249 case "(($ac_try" in
22250   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22251   *) ac_try_echo=$ac_try;;
22252 esac
22253 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22254   (eval "$ac_compile") 2>conftest.er1
22255   ac_status=$?
22256   grep -v '^ *+' conftest.er1 >conftest.err
22257   rm -f conftest.er1
22258   cat conftest.err >&5
22259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22260   (exit $ac_status); } && {
22261          test -z "$ac_c_werror_flag" ||
22262          test ! -s conftest.err
22263        } && test -s conftest.$ac_objext; then
22264   ac_hi=-1 ac_mid=-1
22265   while :; do
22266     cat >conftest.$ac_ext <<_ACEOF
22267 /* confdefs.h.  */
22268 _ACEOF
22269 cat confdefs.h >>conftest.$ac_ext
22270 cat >>conftest.$ac_ext <<_ACEOF
22271 /* end confdefs.h.  */
22272 $ac_includes_default
22273    typedef size_t ac__type_sizeof_;
22274 int
22275 main ()
22276 {
22277 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
22278 test_array [0] = 0
22279
22280   ;
22281   return 0;
22282 }
22283 _ACEOF
22284 rm -f conftest.$ac_objext
22285 if { (ac_try="$ac_compile"
22286 case "(($ac_try" in
22287   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22288   *) ac_try_echo=$ac_try;;
22289 esac
22290 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22291   (eval "$ac_compile") 2>conftest.er1
22292   ac_status=$?
22293   grep -v '^ *+' conftest.er1 >conftest.err
22294   rm -f conftest.er1
22295   cat conftest.err >&5
22296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22297   (exit $ac_status); } && {
22298          test -z "$ac_c_werror_flag" ||
22299          test ! -s conftest.err
22300        } && test -s conftest.$ac_objext; then
22301   ac_lo=$ac_mid; break
22302 else
22303   echo "$as_me: failed program was:" >&5
22304 sed 's/^/| /' conftest.$ac_ext >&5
22305
22306         ac_hi=`expr '(' $ac_mid ')' - 1`
22307                         if test $ac_mid -le $ac_hi; then
22308                           ac_lo= ac_hi=
22309                           break
22310                         fi
22311                         ac_mid=`expr 2 '*' $ac_mid`
22312 fi
22313
22314 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22315   done
22316 else
22317   echo "$as_me: failed program was:" >&5
22318 sed 's/^/| /' conftest.$ac_ext >&5
22319
22320         ac_lo= ac_hi=
22321 fi
22322
22323 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22324 fi
22325
22326 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22327 # Binary search between lo and hi bounds.
22328 while test "x$ac_lo" != "x$ac_hi"; do
22329   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22330   cat >conftest.$ac_ext <<_ACEOF
22331 /* confdefs.h.  */
22332 _ACEOF
22333 cat confdefs.h >>conftest.$ac_ext
22334 cat >>conftest.$ac_ext <<_ACEOF
22335 /* end confdefs.h.  */
22336 $ac_includes_default
22337    typedef size_t ac__type_sizeof_;
22338 int
22339 main ()
22340 {
22341 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
22342 test_array [0] = 0
22343
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_hi=$ac_mid
22366 else
22367   echo "$as_me: failed program was:" >&5
22368 sed 's/^/| /' conftest.$ac_ext >&5
22369
22370         ac_lo=`expr '(' $ac_mid ')' + 1`
22371 fi
22372
22373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22374 done
22375 case $ac_lo in
22376 ?*) ac_cv_sizeof_size_t=$ac_lo;;
22377 '') if test "$ac_cv_type_size_t" = yes; then
22378      { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
22379 See \`config.log' for more details." >&5
22380 echo "$as_me: error: cannot compute sizeof (size_t)
22381 See \`config.log' for more details." >&2;}
22382    { (exit 77); exit 77; }; }
22383    else
22384      ac_cv_sizeof_size_t=0
22385    fi ;;
22386 esac
22387 else
22388   cat >conftest.$ac_ext <<_ACEOF
22389 /* confdefs.h.  */
22390 _ACEOF
22391 cat confdefs.h >>conftest.$ac_ext
22392 cat >>conftest.$ac_ext <<_ACEOF
22393 /* end confdefs.h.  */
22394 $ac_includes_default
22395    typedef size_t ac__type_sizeof_;
22396 static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
22397 static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
22398 #include <stdio.h>
22399 #include <stdlib.h>
22400 int
22401 main ()
22402 {
22403
22404   FILE *f = fopen ("conftest.val", "w");
22405   if (! f)
22406     return 1;
22407   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
22408     {
22409       long int i = longval ();
22410       if (i != ((long int) (sizeof (ac__type_sizeof_))))
22411         return 1;
22412       fprintf (f, "%ld\n", i);
22413     }
22414   else
22415     {
22416       unsigned long int i = ulongval ();
22417       if (i != ((long int) (sizeof (ac__type_sizeof_))))
22418         return 1;
22419       fprintf (f, "%lu\n", i);
22420     }
22421   return ferror (f) || fclose (f) != 0;
22422
22423   ;
22424   return 0;
22425 }
22426 _ACEOF
22427 rm -f conftest$ac_exeext
22428 if { (ac_try="$ac_link"
22429 case "(($ac_try" in
22430   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22431   *) ac_try_echo=$ac_try;;
22432 esac
22433 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22434   (eval "$ac_link") 2>&5
22435   ac_status=$?
22436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22437   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22438   { (case "(($ac_try" in
22439   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22440   *) ac_try_echo=$ac_try;;
22441 esac
22442 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22443   (eval "$ac_try") 2>&5
22444   ac_status=$?
22445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22446   (exit $ac_status); }; }; then
22447   ac_cv_sizeof_size_t=`cat conftest.val`
22448 else
22449   echo "$as_me: program exited with status $ac_status" >&5
22450 echo "$as_me: failed program was:" >&5
22451 sed 's/^/| /' conftest.$ac_ext >&5
22452
22453 ( exit $ac_status )
22454 if test "$ac_cv_type_size_t" = yes; then
22455      { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
22456 See \`config.log' for more details." >&5
22457 echo "$as_me: error: cannot compute sizeof (size_t)
22458 See \`config.log' for more details." >&2;}
22459    { (exit 77); exit 77; }; }
22460    else
22461      ac_cv_sizeof_size_t=0
22462    fi
22463 fi
22464 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22465 fi
22466 rm -f conftest.val
22467 fi
22468 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
22469 echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
22470
22471
22472
22473 cat >>confdefs.h <<_ACEOF
22474 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
22475 _ACEOF
22476
22477
22478
22479 # Decide whether float4 is passed by value: user-selectable, enabled by default
22480 { echo "$as_me:$LINENO: checking whether to build with float4 passed by value" >&5
22481 echo $ECHO_N "checking whether to build with float4 passed by value... $ECHO_C" >&6; }
22482
22483 pgac_args="$pgac_args enable_float4_byval"
22484
22485 # Check whether --enable-float4-byval was given.
22486 if test "${enable_float4_byval+set}" = set; then
22487   enableval=$enable_float4_byval;
22488   case $enableval in
22489     yes)
22490
22491 cat >>confdefs.h <<\_ACEOF
22492 #define USE_FLOAT4_BYVAL 1
22493 _ACEOF
22494
22495                float4passbyval=true
22496       ;;
22497     no)
22498       float4passbyval=false
22499       ;;
22500     *)
22501       { { echo "$as_me:$LINENO: error: no argument expected for --enable-float4-byval option" >&5
22502 echo "$as_me: error: no argument expected for --enable-float4-byval option" >&2;}
22503    { (exit 1); exit 1; }; }
22504       ;;
22505   esac
22506
22507 else
22508   enable_float4_byval=yes
22509
22510 cat >>confdefs.h <<\_ACEOF
22511 #define USE_FLOAT4_BYVAL 1
22512 _ACEOF
22513
22514                float4passbyval=true
22515 fi
22516
22517
22518 { echo "$as_me:$LINENO: result: $enable_float4_byval" >&5
22519 echo "${ECHO_T}$enable_float4_byval" >&6; }
22520
22521 cat >>confdefs.h <<_ACEOF
22522 #define FLOAT4PASSBYVAL $float4passbyval
22523 _ACEOF
22524
22525
22526 # Decide whether float8 is passed by value.
22527 # Note: this setting also controls int8 and related types such as timestamp.
22528 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
22529 # If not, trying to select it is an error.
22530 { echo "$as_me:$LINENO: checking whether to build with float8 passed by value" >&5
22531 echo $ECHO_N "checking whether to build with float8 passed by value... $ECHO_C" >&6; }
22532 if test $ac_cv_sizeof_unsigned_long -ge 8 ; then
22533
22534 pgac_args="$pgac_args enable_float8_byval"
22535
22536 # Check whether --enable-float8-byval was given.
22537 if test "${enable_float8_byval+set}" = set; then
22538   enableval=$enable_float8_byval;
22539   case $enableval in
22540     yes)
22541       :
22542       ;;
22543     no)
22544       :
22545       ;;
22546     *)
22547       { { echo "$as_me:$LINENO: error: no argument expected for --enable-float8-byval option" >&5
22548 echo "$as_me: error: no argument expected for --enable-float8-byval option" >&2;}
22549    { (exit 1); exit 1; }; }
22550       ;;
22551   esac
22552
22553 else
22554   enable_float8_byval=yes
22555
22556 fi
22557
22558
22559 else
22560
22561 pgac_args="$pgac_args enable_float8_byval"
22562
22563 # Check whether --enable-float8-byval was given.
22564 if test "${enable_float8_byval+set}" = set; then
22565   enableval=$enable_float8_byval;
22566   case $enableval in
22567     yes)
22568       :
22569       ;;
22570     no)
22571       :
22572       ;;
22573     *)
22574       { { echo "$as_me:$LINENO: error: no argument expected for --enable-float8-byval option" >&5
22575 echo "$as_me: error: no argument expected for --enable-float8-byval option" >&2;}
22576    { (exit 1); exit 1; }; }
22577       ;;
22578   esac
22579
22580 else
22581   enable_float8_byval=no
22582
22583 fi
22584
22585
22586   if test "$enable_float8_byval" = yes ; then
22587     { { echo "$as_me:$LINENO: error: --enable-float8-byval is not supported on 32-bit platforms." >&5
22588 echo "$as_me: error: --enable-float8-byval is not supported on 32-bit platforms." >&2;}
22589    { (exit 1); exit 1; }; }
22590   fi
22591 fi
22592 if test "$enable_float8_byval" = yes ; then
22593
22594 cat >>confdefs.h <<\_ACEOF
22595 #define USE_FLOAT8_BYVAL 1
22596 _ACEOF
22597
22598   float8passbyval=true
22599 else
22600   float8passbyval=false
22601 fi
22602 { echo "$as_me:$LINENO: result: $enable_float8_byval" >&5
22603 echo "${ECHO_T}$enable_float8_byval" >&6; }
22604
22605 cat >>confdefs.h <<_ACEOF
22606 #define FLOAT8PASSBYVAL $float8passbyval
22607 _ACEOF
22608
22609
22610 # Determine memory alignment requirements for the basic C data types.
22611
22612 { echo "$as_me:$LINENO: checking for short" >&5
22613 echo $ECHO_N "checking for short... $ECHO_C" >&6; }
22614 if test "${ac_cv_type_short+set}" = set; then
22615   echo $ECHO_N "(cached) $ECHO_C" >&6
22616 else
22617   cat >conftest.$ac_ext <<_ACEOF
22618 /* confdefs.h.  */
22619 _ACEOF
22620 cat confdefs.h >>conftest.$ac_ext
22621 cat >>conftest.$ac_ext <<_ACEOF
22622 /* end confdefs.h.  */
22623 $ac_includes_default
22624 typedef short ac__type_new_;
22625 int
22626 main ()
22627 {
22628 if ((ac__type_new_ *) 0)
22629   return 0;
22630 if (sizeof (ac__type_new_))
22631   return 0;
22632   ;
22633   return 0;
22634 }
22635 _ACEOF
22636 rm -f conftest.$ac_objext
22637 if { (ac_try="$ac_compile"
22638 case "(($ac_try" in
22639   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22640   *) ac_try_echo=$ac_try;;
22641 esac
22642 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22643   (eval "$ac_compile") 2>conftest.er1
22644   ac_status=$?
22645   grep -v '^ *+' conftest.er1 >conftest.err
22646   rm -f conftest.er1
22647   cat conftest.err >&5
22648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22649   (exit $ac_status); } && {
22650          test -z "$ac_c_werror_flag" ||
22651          test ! -s conftest.err
22652        } && test -s conftest.$ac_objext; then
22653   ac_cv_type_short=yes
22654 else
22655   echo "$as_me: failed program was:" >&5
22656 sed 's/^/| /' conftest.$ac_ext >&5
22657
22658         ac_cv_type_short=no
22659 fi
22660
22661 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22662 fi
22663 { echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
22664 echo "${ECHO_T}$ac_cv_type_short" >&6; }
22665
22666 # The cast to long int works around a bug in the HP C Compiler,
22667 # see AC_CHECK_SIZEOF for more information.
22668 { echo "$as_me:$LINENO: checking alignment of short" >&5
22669 echo $ECHO_N "checking alignment of short... $ECHO_C" >&6; }
22670 if test "${ac_cv_alignof_short+set}" = set; then
22671   echo $ECHO_N "(cached) $ECHO_C" >&6
22672 else
22673   if test "$cross_compiling" = yes; then
22674   # Depending upon the size, compute the lo and hi bounds.
22675 cat >conftest.$ac_ext <<_ACEOF
22676 /* confdefs.h.  */
22677 _ACEOF
22678 cat confdefs.h >>conftest.$ac_ext
22679 cat >>conftest.$ac_ext <<_ACEOF
22680 /* end confdefs.h.  */
22681 $ac_includes_default
22682 #ifndef offsetof
22683 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22684 #endif
22685 typedef struct { char x; short y; } ac__type_alignof_;
22686 int
22687 main ()
22688 {
22689 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
22690 test_array [0] = 0
22691
22692   ;
22693   return 0;
22694 }
22695 _ACEOF
22696 rm -f conftest.$ac_objext
22697 if { (ac_try="$ac_compile"
22698 case "(($ac_try" in
22699   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22700   *) ac_try_echo=$ac_try;;
22701 esac
22702 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22703   (eval "$ac_compile") 2>conftest.er1
22704   ac_status=$?
22705   grep -v '^ *+' conftest.er1 >conftest.err
22706   rm -f conftest.er1
22707   cat conftest.err >&5
22708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22709   (exit $ac_status); } && {
22710          test -z "$ac_c_werror_flag" ||
22711          test ! -s conftest.err
22712        } && test -s conftest.$ac_objext; then
22713   ac_lo=0 ac_mid=0
22714   while :; do
22715     cat >conftest.$ac_ext <<_ACEOF
22716 /* confdefs.h.  */
22717 _ACEOF
22718 cat confdefs.h >>conftest.$ac_ext
22719 cat >>conftest.$ac_ext <<_ACEOF
22720 /* end confdefs.h.  */
22721 $ac_includes_default
22722 #ifndef offsetof
22723 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22724 #endif
22725 typedef struct { char x; short y; } ac__type_alignof_;
22726 int
22727 main ()
22728 {
22729 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
22730 test_array [0] = 0
22731
22732   ;
22733   return 0;
22734 }
22735 _ACEOF
22736 rm -f conftest.$ac_objext
22737 if { (ac_try="$ac_compile"
22738 case "(($ac_try" in
22739   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22740   *) ac_try_echo=$ac_try;;
22741 esac
22742 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22743   (eval "$ac_compile") 2>conftest.er1
22744   ac_status=$?
22745   grep -v '^ *+' conftest.er1 >conftest.err
22746   rm -f conftest.er1
22747   cat conftest.err >&5
22748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22749   (exit $ac_status); } && {
22750          test -z "$ac_c_werror_flag" ||
22751          test ! -s conftest.err
22752        } && test -s conftest.$ac_objext; then
22753   ac_hi=$ac_mid; break
22754 else
22755   echo "$as_me: failed program was:" >&5
22756 sed 's/^/| /' conftest.$ac_ext >&5
22757
22758         ac_lo=`expr $ac_mid + 1`
22759                         if test $ac_lo -le $ac_mid; then
22760                           ac_lo= ac_hi=
22761                           break
22762                         fi
22763                         ac_mid=`expr 2 '*' $ac_mid + 1`
22764 fi
22765
22766 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22767   done
22768 else
22769   echo "$as_me: failed program was:" >&5
22770 sed 's/^/| /' conftest.$ac_ext >&5
22771
22772         cat >conftest.$ac_ext <<_ACEOF
22773 /* confdefs.h.  */
22774 _ACEOF
22775 cat confdefs.h >>conftest.$ac_ext
22776 cat >>conftest.$ac_ext <<_ACEOF
22777 /* end confdefs.h.  */
22778 $ac_includes_default
22779 #ifndef offsetof
22780 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22781 #endif
22782 typedef struct { char x; short y; } ac__type_alignof_;
22783 int
22784 main ()
22785 {
22786 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
22787 test_array [0] = 0
22788
22789   ;
22790   return 0;
22791 }
22792 _ACEOF
22793 rm -f conftest.$ac_objext
22794 if { (ac_try="$ac_compile"
22795 case "(($ac_try" in
22796   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22797   *) ac_try_echo=$ac_try;;
22798 esac
22799 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22800   (eval "$ac_compile") 2>conftest.er1
22801   ac_status=$?
22802   grep -v '^ *+' conftest.er1 >conftest.err
22803   rm -f conftest.er1
22804   cat conftest.err >&5
22805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22806   (exit $ac_status); } && {
22807          test -z "$ac_c_werror_flag" ||
22808          test ! -s conftest.err
22809        } && test -s conftest.$ac_objext; then
22810   ac_hi=-1 ac_mid=-1
22811   while :; do
22812     cat >conftest.$ac_ext <<_ACEOF
22813 /* confdefs.h.  */
22814 _ACEOF
22815 cat confdefs.h >>conftest.$ac_ext
22816 cat >>conftest.$ac_ext <<_ACEOF
22817 /* end confdefs.h.  */
22818 $ac_includes_default
22819 #ifndef offsetof
22820 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22821 #endif
22822 typedef struct { char x; short y; } ac__type_alignof_;
22823 int
22824 main ()
22825 {
22826 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
22827 test_array [0] = 0
22828
22829   ;
22830   return 0;
22831 }
22832 _ACEOF
22833 rm -f conftest.$ac_objext
22834 if { (ac_try="$ac_compile"
22835 case "(($ac_try" in
22836   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22837   *) ac_try_echo=$ac_try;;
22838 esac
22839 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22840   (eval "$ac_compile") 2>conftest.er1
22841   ac_status=$?
22842   grep -v '^ *+' conftest.er1 >conftest.err
22843   rm -f conftest.er1
22844   cat conftest.err >&5
22845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22846   (exit $ac_status); } && {
22847          test -z "$ac_c_werror_flag" ||
22848          test ! -s conftest.err
22849        } && test -s conftest.$ac_objext; then
22850   ac_lo=$ac_mid; break
22851 else
22852   echo "$as_me: failed program was:" >&5
22853 sed 's/^/| /' conftest.$ac_ext >&5
22854
22855         ac_hi=`expr '(' $ac_mid ')' - 1`
22856                         if test $ac_mid -le $ac_hi; then
22857                           ac_lo= ac_hi=
22858                           break
22859                         fi
22860                         ac_mid=`expr 2 '*' $ac_mid`
22861 fi
22862
22863 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22864   done
22865 else
22866   echo "$as_me: failed program was:" >&5
22867 sed 's/^/| /' conftest.$ac_ext >&5
22868
22869         ac_lo= ac_hi=
22870 fi
22871
22872 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22873 fi
22874
22875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22876 # Binary search between lo and hi bounds.
22877 while test "x$ac_lo" != "x$ac_hi"; do
22878   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22879   cat >conftest.$ac_ext <<_ACEOF
22880 /* confdefs.h.  */
22881 _ACEOF
22882 cat confdefs.h >>conftest.$ac_ext
22883 cat >>conftest.$ac_ext <<_ACEOF
22884 /* end confdefs.h.  */
22885 $ac_includes_default
22886 #ifndef offsetof
22887 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22888 #endif
22889 typedef struct { char x; short y; } ac__type_alignof_;
22890 int
22891 main ()
22892 {
22893 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
22894 test_array [0] = 0
22895
22896   ;
22897   return 0;
22898 }
22899 _ACEOF
22900 rm -f conftest.$ac_objext
22901 if { (ac_try="$ac_compile"
22902 case "(($ac_try" in
22903   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22904   *) ac_try_echo=$ac_try;;
22905 esac
22906 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22907   (eval "$ac_compile") 2>conftest.er1
22908   ac_status=$?
22909   grep -v '^ *+' conftest.er1 >conftest.err
22910   rm -f conftest.er1
22911   cat conftest.err >&5
22912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22913   (exit $ac_status); } && {
22914          test -z "$ac_c_werror_flag" ||
22915          test ! -s conftest.err
22916        } && test -s conftest.$ac_objext; then
22917   ac_hi=$ac_mid
22918 else
22919   echo "$as_me: failed program was:" >&5
22920 sed 's/^/| /' conftest.$ac_ext >&5
22921
22922         ac_lo=`expr '(' $ac_mid ')' + 1`
22923 fi
22924
22925 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22926 done
22927 case $ac_lo in
22928 ?*) ac_cv_alignof_short=$ac_lo;;
22929 '') if test "$ac_cv_type_short" = yes; then
22930      { { echo "$as_me:$LINENO: error: cannot compute alignment of short
22931 See \`config.log' for more details." >&5
22932 echo "$as_me: error: cannot compute alignment of short
22933 See \`config.log' for more details." >&2;}
22934    { (exit 77); exit 77; }; }
22935    else
22936      ac_cv_alignof_short=0
22937    fi ;;
22938 esac
22939 else
22940   cat >conftest.$ac_ext <<_ACEOF
22941 /* confdefs.h.  */
22942 _ACEOF
22943 cat confdefs.h >>conftest.$ac_ext
22944 cat >>conftest.$ac_ext <<_ACEOF
22945 /* end confdefs.h.  */
22946 $ac_includes_default
22947 #ifndef offsetof
22948 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22949 #endif
22950 typedef struct { char x; short y; } ac__type_alignof_;
22951 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
22952 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
22953 #include <stdio.h>
22954 #include <stdlib.h>
22955 int
22956 main ()
22957 {
22958
22959   FILE *f = fopen ("conftest.val", "w");
22960   if (! f)
22961     return 1;
22962   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
22963     {
22964       long int i = longval ();
22965       if (i != ((long int) offsetof (ac__type_alignof_, y)))
22966         return 1;
22967       fprintf (f, "%ld\n", i);
22968     }
22969   else
22970     {
22971       unsigned long int i = ulongval ();
22972       if (i != ((long int) offsetof (ac__type_alignof_, y)))
22973         return 1;
22974       fprintf (f, "%lu\n", i);
22975     }
22976   return ferror (f) || fclose (f) != 0;
22977
22978   ;
22979   return 0;
22980 }
22981 _ACEOF
22982 rm -f conftest$ac_exeext
22983 if { (ac_try="$ac_link"
22984 case "(($ac_try" in
22985   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22986   *) ac_try_echo=$ac_try;;
22987 esac
22988 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22989   (eval "$ac_link") 2>&5
22990   ac_status=$?
22991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22992   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22993   { (case "(($ac_try" in
22994   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22995   *) ac_try_echo=$ac_try;;
22996 esac
22997 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22998   (eval "$ac_try") 2>&5
22999   ac_status=$?
23000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23001   (exit $ac_status); }; }; then
23002   ac_cv_alignof_short=`cat conftest.val`
23003 else
23004   echo "$as_me: program exited with status $ac_status" >&5
23005 echo "$as_me: failed program was:" >&5
23006 sed 's/^/| /' conftest.$ac_ext >&5
23007
23008 ( exit $ac_status )
23009 if test "$ac_cv_type_short" = yes; then
23010      { { echo "$as_me:$LINENO: error: cannot compute alignment of short
23011 See \`config.log' for more details." >&5
23012 echo "$as_me: error: cannot compute alignment of short
23013 See \`config.log' for more details." >&2;}
23014    { (exit 77); exit 77; }; }
23015    else
23016      ac_cv_alignof_short=0
23017    fi
23018 fi
23019 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23020 fi
23021 rm -f conftest.val
23022 fi
23023 { echo "$as_me:$LINENO: result: $ac_cv_alignof_short" >&5
23024 echo "${ECHO_T}$ac_cv_alignof_short" >&6; }
23025
23026
23027
23028 cat >>confdefs.h <<_ACEOF
23029 #define ALIGNOF_SHORT $ac_cv_alignof_short
23030 _ACEOF
23031
23032
23033 { echo "$as_me:$LINENO: checking for int" >&5
23034 echo $ECHO_N "checking for int... $ECHO_C" >&6; }
23035 if test "${ac_cv_type_int+set}" = set; then
23036   echo $ECHO_N "(cached) $ECHO_C" >&6
23037 else
23038   cat >conftest.$ac_ext <<_ACEOF
23039 /* confdefs.h.  */
23040 _ACEOF
23041 cat confdefs.h >>conftest.$ac_ext
23042 cat >>conftest.$ac_ext <<_ACEOF
23043 /* end confdefs.h.  */
23044 $ac_includes_default
23045 typedef int ac__type_new_;
23046 int
23047 main ()
23048 {
23049 if ((ac__type_new_ *) 0)
23050   return 0;
23051 if (sizeof (ac__type_new_))
23052   return 0;
23053   ;
23054   return 0;
23055 }
23056 _ACEOF
23057 rm -f conftest.$ac_objext
23058 if { (ac_try="$ac_compile"
23059 case "(($ac_try" in
23060   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23061   *) ac_try_echo=$ac_try;;
23062 esac
23063 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23064   (eval "$ac_compile") 2>conftest.er1
23065   ac_status=$?
23066   grep -v '^ *+' conftest.er1 >conftest.err
23067   rm -f conftest.er1
23068   cat conftest.err >&5
23069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23070   (exit $ac_status); } && {
23071          test -z "$ac_c_werror_flag" ||
23072          test ! -s conftest.err
23073        } && test -s conftest.$ac_objext; then
23074   ac_cv_type_int=yes
23075 else
23076   echo "$as_me: failed program was:" >&5
23077 sed 's/^/| /' conftest.$ac_ext >&5
23078
23079         ac_cv_type_int=no
23080 fi
23081
23082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23083 fi
23084 { echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
23085 echo "${ECHO_T}$ac_cv_type_int" >&6; }
23086
23087 # The cast to long int works around a bug in the HP C Compiler,
23088 # see AC_CHECK_SIZEOF for more information.
23089 { echo "$as_me:$LINENO: checking alignment of int" >&5
23090 echo $ECHO_N "checking alignment of int... $ECHO_C" >&6; }
23091 if test "${ac_cv_alignof_int+set}" = set; then
23092   echo $ECHO_N "(cached) $ECHO_C" >&6
23093 else
23094   if test "$cross_compiling" = yes; then
23095   # Depending upon the size, compute the lo and hi bounds.
23096 cat >conftest.$ac_ext <<_ACEOF
23097 /* confdefs.h.  */
23098 _ACEOF
23099 cat confdefs.h >>conftest.$ac_ext
23100 cat >>conftest.$ac_ext <<_ACEOF
23101 /* end confdefs.h.  */
23102 $ac_includes_default
23103 #ifndef offsetof
23104 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
23105 #endif
23106 typedef struct { char x; int y; } ac__type_alignof_;
23107 int
23108 main ()
23109 {
23110 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
23111 test_array [0] = 0
23112
23113   ;
23114   return 0;
23115 }
23116 _ACEOF
23117 rm -f conftest.$ac_objext
23118 if { (ac_try="$ac_compile"
23119 case "(($ac_try" in
23120   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23121   *) ac_try_echo=$ac_try;;
23122 esac
23123 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23124   (eval "$ac_compile") 2>conftest.er1
23125   ac_status=$?
23126   grep -v '^ *+' conftest.er1 >conftest.err
23127   rm -f conftest.er1
23128   cat conftest.err >&5
23129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23130   (exit $ac_status); } && {
23131          test -z "$ac_c_werror_flag" ||
23132          test ! -s conftest.err
23133        } && test -s conftest.$ac_objext; then
23134   ac_lo=0 ac_mid=0
23135   while :; do
23136     cat >conftest.$ac_ext <<_ACEOF
23137 /* confdefs.h.  */
23138 _ACEOF
23139 cat confdefs.h >>conftest.$ac_ext
23140 cat >>conftest.$ac_ext <<_ACEOF
23141 /* end confdefs.h.  */
23142 $ac_includes_default
23143 #ifndef offsetof
23144 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
23145 #endif
23146 typedef struct { char x; int y; } ac__type_alignof_;
23147 int
23148 main ()
23149 {
23150 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
23151 test_array [0] = 0
23152
23153   ;
23154   return 0;
23155 }
23156 _ACEOF
23157 rm -f conftest.$ac_objext
23158 if { (ac_try="$ac_compile"
23159 case "(($ac_try" in
23160   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23161   *) ac_try_echo=$ac_try;;
23162 esac
23163 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23164   (eval "$ac_compile") 2>conftest.er1
23165   ac_status=$?
23166   grep -v '^ *+' conftest.er1 >conftest.err
23167   rm -f conftest.er1
23168   cat conftest.err >&5
23169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23170   (exit $ac_status); } && {
23171          test -z "$ac_c_werror_flag" ||
23172          test ! -s conftest.err
23173        } && test -s conftest.$ac_objext; then
23174   ac_hi=$ac_mid; break
23175 else
23176   echo "$as_me: failed program was:" >&5
23177 sed 's/^/| /' conftest.$ac_ext >&5
23178
23179         ac_lo=`expr $ac_mid + 1`
23180                         if test $ac_lo -le $ac_mid; then
23181                           ac_lo= ac_hi=
23182                           break
23183                         fi
23184                         ac_mid=`expr 2 '*' $ac_mid + 1`
23185 fi
23186
23187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23188   done
23189 else
23190   echo "$as_me: failed program was:" >&5
23191 sed 's/^/| /' conftest.$ac_ext >&5
23192
23193         cat >conftest.$ac_ext <<_ACEOF
23194 /* confdefs.h.  */
23195 _ACEOF
23196 cat confdefs.h >>conftest.$ac_ext
23197 cat >>conftest.$ac_ext <<_ACEOF
23198 /* end confdefs.h.  */
23199 $ac_includes_default
23200 #ifndef offsetof
23201 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
23202 #endif
23203 typedef struct { char x; int y; } ac__type_alignof_;
23204 int
23205 main ()
23206 {
23207 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
23208 test_array [0] = 0
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   ac_hi=-1 ac_mid=-1
23232   while :; do
23233     cat >conftest.$ac_ext <<_ACEOF
23234 /* confdefs.h.  */
23235 _ACEOF
23236 cat confdefs.h >>conftest.$ac_ext
23237 cat >>conftest.$ac_ext <<_ACEOF
23238 /* end confdefs.h.  */
23239 $ac_includes_default
23240 #ifndef offsetof
23241 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
23242 #endif
23243 typedef struct { char x; int y; } ac__type_alignof_;
23244 int
23245 main ()
23246 {
23247 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
23248 test_array [0] = 0
23249
23250   ;
23251   return 0;
23252 }
23253 _ACEOF
23254 rm -f conftest.$ac_objext
23255 if { (ac_try="$ac_compile"
23256 case "(($ac_try" in
23257   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23258   *) ac_try_echo=$ac_try;;
23259 esac
23260 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23261   (eval "$ac_compile") 2>conftest.er1
23262   ac_status=$?
23263   grep -v '^ *+' conftest.er1 >conftest.err
23264   rm -f conftest.er1
23265   cat conftest.err >&5
23266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23267   (exit $ac_status); } && {
23268          test -z "$ac_c_werror_flag" ||
23269          test ! -s conftest.err
23270        } && test -s conftest.$ac_objext; then
23271   ac_lo=$ac_mid; break
23272 else
23273   echo "$as_me: failed program was:" >&5
23274 sed 's/^/| /' conftest.$ac_ext >&5
23275
23276         ac_hi=`expr '(' $ac_mid ')' - 1`
23277                         if test $ac_mid -le $ac_hi; then
23278                           ac_lo= ac_hi=
23279                           break
23280                         fi
23281                         ac_mid=`expr 2 '*' $ac_mid`
23282 fi
23283
23284 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23285   done
23286 else
23287   echo "$as_me: failed program was:" >&5
23288 sed 's/^/| /' conftest.$ac_ext >&5
23289
23290         ac_lo= ac_hi=
23291 fi
23292
23293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23294 fi
23295
23296 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23297 # Binary search between lo and hi bounds.
23298 while test "x$ac_lo" != "x$ac_hi"; do
23299   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23300   cat >conftest.$ac_ext <<_ACEOF
23301 /* confdefs.h.  */
23302 _ACEOF
23303 cat confdefs.h >>conftest.$ac_ext
23304 cat >>conftest.$ac_ext <<_ACEOF
23305 /* end confdefs.h.  */
23306 $ac_includes_default
23307 #ifndef offsetof
23308 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
23309 #endif
23310 typedef struct { char x; int y; } ac__type_alignof_;
23311 int
23312 main ()
23313 {
23314 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
23315 test_array [0] = 0
23316
23317   ;
23318   return 0;
23319 }
23320 _ACEOF
23321 rm -f conftest.$ac_objext
23322 if { (ac_try="$ac_compile"
23323 case "(($ac_try" in
23324   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23325   *) ac_try_echo=$ac_try;;
23326 esac
23327 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23328   (eval "$ac_compile") 2>conftest.er1
23329   ac_status=$?
23330   grep -v '^ *+' conftest.er1 >conftest.err
23331   rm -f conftest.er1
23332   cat conftest.err >&5
23333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23334   (exit $ac_status); } && {
23335          test -z "$ac_c_werror_flag" ||
23336          test ! -s conftest.err
23337        } && test -s conftest.$ac_objext; then
23338   ac_hi=$ac_mid
23339 else
23340   echo "$as_me: failed program was:" >&5
23341 sed 's/^/| /' conftest.$ac_ext >&5
23342
23343         ac_lo=`expr '(' $ac_mid ')' + 1`
23344 fi
23345
23346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23347 done
23348 case $ac_lo in
23349 ?*) ac_cv_alignof_int=$ac_lo;;
23350 '') if test "$ac_cv_type_int" = yes; then
23351      { { echo "$as_me:$LINENO: error: cannot compute alignment of int
23352 See \`config.log' for more details." >&5
23353 echo "$as_me: error: cannot compute alignment of int
23354 See \`config.log' for more details." >&2;}
23355    { (exit 77); exit 77; }; }
23356    else
23357      ac_cv_alignof_int=0
23358    fi ;;
23359 esac
23360 else
23361   cat >conftest.$ac_ext <<_ACEOF
23362 /* confdefs.h.  */
23363 _ACEOF
23364 cat confdefs.h >>conftest.$ac_ext
23365 cat >>conftest.$ac_ext <<_ACEOF
23366 /* end confdefs.h.  */
23367 $ac_includes_default
23368 #ifndef offsetof
23369 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
23370 #endif
23371 typedef struct { char x; int y; } ac__type_alignof_;
23372 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
23373 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
23374 #include <stdio.h>
23375 #include <stdlib.h>
23376 int
23377 main ()
23378 {
23379
23380   FILE *f = fopen ("conftest.val", "w");
23381   if (! f)
23382     return 1;
23383   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
23384     {
23385       long int i = longval ();
23386       if (i != ((long int) offsetof (ac__type_alignof_, y)))
23387         return 1;
23388       fprintf (f, "%ld\n", i);
23389     }
23390   else
23391     {
23392       unsigned long int i = ulongval ();
23393       if (i != ((long int) offsetof (ac__type_alignof_, y)))
23394         return 1;
23395       fprintf (f, "%lu\n", i);
23396     }
23397   return ferror (f) || fclose (f) != 0;
23398
23399   ;
23400   return 0;
23401 }
23402 _ACEOF
23403 rm -f conftest$ac_exeext
23404 if { (ac_try="$ac_link"
23405 case "(($ac_try" in
23406   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23407   *) ac_try_echo=$ac_try;;
23408 esac
23409 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23410   (eval "$ac_link") 2>&5
23411   ac_status=$?
23412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23413   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23414   { (case "(($ac_try" in
23415   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23416   *) ac_try_echo=$ac_try;;
23417 esac
23418 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23419   (eval "$ac_try") 2>&5
23420   ac_status=$?
23421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23422   (exit $ac_status); }; }; then
23423   ac_cv_alignof_int=`cat conftest.val`
23424 else
23425   echo "$as_me: program exited with status $ac_status" >&5
23426 echo "$as_me: failed program was:" >&5
23427 sed 's/^/| /' conftest.$ac_ext >&5
23428
23429 ( exit $ac_status )
23430 if test "$ac_cv_type_int" = yes; then
23431      { { echo "$as_me:$LINENO: error: cannot compute alignment of int
23432 See \`config.log' for more details." >&5
23433 echo "$as_me: error: cannot compute alignment of int
23434 See \`config.log' for more details." >&2;}
23435    { (exit 77); exit 77; }; }
23436    else
23437      ac_cv_alignof_int=0
23438    fi
23439 fi
23440 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23441 fi
23442 rm -f conftest.val
23443 fi
23444 { echo "$as_me:$LINENO: result: $ac_cv_alignof_int" >&5
23445 echo "${ECHO_T}$ac_cv_alignof_int" >&6; }
23446
23447
23448
23449 cat >>confdefs.h <<_ACEOF
23450 #define ALIGNOF_INT $ac_cv_alignof_int
23451 _ACEOF
23452
23453
23454 { echo "$as_me:$LINENO: checking for long" >&5
23455 echo $ECHO_N "checking for long... $ECHO_C" >&6; }
23456 if test "${ac_cv_type_long+set}" = set; then
23457   echo $ECHO_N "(cached) $ECHO_C" >&6
23458 else
23459   cat >conftest.$ac_ext <<_ACEOF
23460 /* confdefs.h.  */
23461 _ACEOF
23462 cat confdefs.h >>conftest.$ac_ext
23463 cat >>conftest.$ac_ext <<_ACEOF
23464 /* end confdefs.h.  */
23465 $ac_includes_default
23466 typedef long ac__type_new_;
23467 int
23468 main ()
23469 {
23470 if ((ac__type_new_ *) 0)
23471   return 0;
23472 if (sizeof (ac__type_new_))
23473   return 0;
23474   ;
23475   return 0;
23476 }
23477 _ACEOF
23478 rm -f conftest.$ac_objext
23479 if { (ac_try="$ac_compile"
23480 case "(($ac_try" in
23481   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23482   *) ac_try_echo=$ac_try;;
23483 esac
23484 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23485   (eval "$ac_compile") 2>conftest.er1
23486   ac_status=$?
23487   grep -v '^ *+' conftest.er1 >conftest.err
23488   rm -f conftest.er1
23489   cat conftest.err >&5
23490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23491   (exit $ac_status); } && {
23492          test -z "$ac_c_werror_flag" ||
23493          test ! -s conftest.err
23494        } && test -s conftest.$ac_objext; then
23495   ac_cv_type_long=yes
23496 else
23497   echo "$as_me: failed program was:" >&5
23498 sed 's/^/| /' conftest.$ac_ext >&5
23499
23500         ac_cv_type_long=no
23501 fi
23502
23503 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23504 fi
23505 { echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
23506 echo "${ECHO_T}$ac_cv_type_long" >&6; }
23507
23508 # The cast to long int works around a bug in the HP C Compiler,
23509 # see AC_CHECK_SIZEOF for more information.
23510 { echo "$as_me:$LINENO: checking alignment of long" >&5
23511 echo $ECHO_N "checking alignment of long... $ECHO_C" >&6; }
23512 if test "${ac_cv_alignof_long+set}" = set; then
23513   echo $ECHO_N "(cached) $ECHO_C" >&6
23514 else
23515   if test "$cross_compiling" = yes; then
23516   # Depending upon the size, compute the lo and hi bounds.
23517 cat >conftest.$ac_ext <<_ACEOF
23518 /* confdefs.h.  */
23519 _ACEOF
23520 cat confdefs.h >>conftest.$ac_ext
23521 cat >>conftest.$ac_ext <<_ACEOF
23522 /* end confdefs.h.  */
23523 $ac_includes_default
23524 #ifndef offsetof
23525 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
23526 #endif
23527 typedef struct { char x; long y; } ac__type_alignof_;
23528 int
23529 main ()
23530 {
23531 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
23532 test_array [0] = 0
23533
23534   ;
23535   return 0;
23536 }
23537 _ACEOF
23538 rm -f conftest.$ac_objext
23539 if { (ac_try="$ac_compile"
23540 case "(($ac_try" in
23541   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23542   *) ac_try_echo=$ac_try;;
23543 esac
23544 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23545   (eval "$ac_compile") 2>conftest.er1
23546   ac_status=$?
23547   grep -v '^ *+' conftest.er1 >conftest.err
23548   rm -f conftest.er1
23549   cat conftest.err >&5
23550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23551   (exit $ac_status); } && {
23552          test -z "$ac_c_werror_flag" ||
23553          test ! -s conftest.err
23554        } && test -s conftest.$ac_objext; then
23555   ac_lo=0 ac_mid=0
23556   while :; do
23557     cat >conftest.$ac_ext <<_ACEOF
23558 /* confdefs.h.  */
23559 _ACEOF
23560 cat confdefs.h >>conftest.$ac_ext
23561 cat >>conftest.$ac_ext <<_ACEOF
23562 /* end confdefs.h.  */
23563 $ac_includes_default
23564 #ifndef offsetof
23565 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
23566 #endif
23567 typedef struct { char x; long y; } ac__type_alignof_;
23568 int
23569 main ()
23570 {
23571 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
23572 test_array [0] = 0
23573
23574   ;
23575   return 0;
23576 }
23577 _ACEOF
23578 rm -f conftest.$ac_objext
23579 if { (ac_try="$ac_compile"
23580 case "(($ac_try" in
23581   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23582   *) ac_try_echo=$ac_try;;
23583 esac
23584 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23585   (eval "$ac_compile") 2>conftest.er1
23586   ac_status=$?
23587   grep -v '^ *+' conftest.er1 >conftest.err
23588   rm -f conftest.er1
23589   cat conftest.err >&5
23590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23591   (exit $ac_status); } && {
23592          test -z "$ac_c_werror_flag" ||
23593          test ! -s conftest.err
23594        } && test -s conftest.$ac_objext; then
23595   ac_hi=$ac_mid; break
23596 else
23597   echo "$as_me: failed program was:" >&5
23598 sed 's/^/| /' conftest.$ac_ext >&5
23599
23600         ac_lo=`expr $ac_mid + 1`
23601                         if test $ac_lo -le $ac_mid; then
23602                           ac_lo= ac_hi=
23603                           break
23604                         fi
23605                         ac_mid=`expr 2 '*' $ac_mid + 1`
23606 fi
23607
23608 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23609   done
23610 else
23611   echo "$as_me: failed program was:" >&5
23612 sed 's/^/| /' conftest.$ac_ext >&5
23613
23614         cat >conftest.$ac_ext <<_ACEOF
23615 /* confdefs.h.  */
23616 _ACEOF
23617 cat confdefs.h >>conftest.$ac_ext
23618 cat >>conftest.$ac_ext <<_ACEOF
23619 /* end confdefs.h.  */
23620 $ac_includes_default
23621 #ifndef offsetof
23622 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
23623 #endif
23624 typedef struct { char x; long y; } ac__type_alignof_;
23625 int
23626 main ()
23627 {
23628 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
23629 test_array [0] = 0
23630
23631   ;
23632   return 0;
23633 }
23634 _ACEOF
23635 rm -f conftest.$ac_objext
23636 if { (ac_try="$ac_compile"
23637 case "(($ac_try" in
23638   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23639   *) ac_try_echo=$ac_try;;
23640 esac
23641 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23642   (eval "$ac_compile") 2>conftest.er1
23643   ac_status=$?
23644   grep -v '^ *+' conftest.er1 >conftest.err
23645   rm -f conftest.er1
23646   cat conftest.err >&5
23647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23648   (exit $ac_status); } && {
23649          test -z "$ac_c_werror_flag" ||
23650          test ! -s conftest.err
23651        } && test -s conftest.$ac_objext; then
23652   ac_hi=-1 ac_mid=-1
23653   while :; do
23654     cat >conftest.$ac_ext <<_ACEOF
23655 /* confdefs.h.  */
23656 _ACEOF
23657 cat confdefs.h >>conftest.$ac_ext
23658 cat >>conftest.$ac_ext <<_ACEOF
23659 /* end confdefs.h.  */
23660 $ac_includes_default
23661 #ifndef offsetof
23662 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
23663 #endif
23664 typedef struct { char x; long y; } ac__type_alignof_;
23665 int
23666 main ()
23667 {
23668 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
23669 test_array [0] = 0
23670
23671   ;
23672   return 0;
23673 }
23674 _ACEOF
23675 rm -f conftest.$ac_objext
23676 if { (ac_try="$ac_compile"
23677 case "(($ac_try" in
23678   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23679   *) ac_try_echo=$ac_try;;
23680 esac
23681 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23682   (eval "$ac_compile") 2>conftest.er1
23683   ac_status=$?
23684   grep -v '^ *+' conftest.er1 >conftest.err
23685   rm -f conftest.er1
23686   cat conftest.err >&5
23687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23688   (exit $ac_status); } && {
23689          test -z "$ac_c_werror_flag" ||
23690          test ! -s conftest.err
23691        } && test -s conftest.$ac_objext; then
23692   ac_lo=$ac_mid; break
23693 else
23694   echo "$as_me: failed program was:" >&5
23695 sed 's/^/| /' conftest.$ac_ext >&5
23696
23697         ac_hi=`expr '(' $ac_mid ')' - 1`
23698                         if test $ac_mid -le $ac_hi; then
23699                           ac_lo= ac_hi=
23700                           break
23701                         fi
23702                         ac_mid=`expr 2 '*' $ac_mid`
23703 fi
23704
23705 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23706   done
23707 else
23708   echo "$as_me: failed program was:" >&5
23709 sed 's/^/| /' conftest.$ac_ext >&5
23710
23711         ac_lo= ac_hi=
23712 fi
23713
23714 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23715 fi
23716
23717 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23718 # Binary search between lo and hi bounds.
23719 while test "x$ac_lo" != "x$ac_hi"; do
23720   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23721   cat >conftest.$ac_ext <<_ACEOF
23722 /* confdefs.h.  */
23723 _ACEOF
23724 cat confdefs.h >>conftest.$ac_ext
23725 cat >>conftest.$ac_ext <<_ACEOF
23726 /* end confdefs.h.  */
23727 $ac_includes_default
23728 #ifndef offsetof
23729 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
23730 #endif
23731 typedef struct { char x; long y; } ac__type_alignof_;
23732 int
23733 main ()
23734 {
23735 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
23736 test_array [0] = 0
23737
23738   ;
23739   return 0;
23740 }
23741 _ACEOF
23742 rm -f conftest.$ac_objext
23743 if { (ac_try="$ac_compile"
23744 case "(($ac_try" in
23745   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23746   *) ac_try_echo=$ac_try;;
23747 esac
23748 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23749   (eval "$ac_compile") 2>conftest.er1
23750   ac_status=$?
23751   grep -v '^ *+' conftest.er1 >conftest.err
23752   rm -f conftest.er1
23753   cat conftest.err >&5
23754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23755   (exit $ac_status); } && {
23756          test -z "$ac_c_werror_flag" ||
23757          test ! -s conftest.err
23758        } && test -s conftest.$ac_objext; then
23759   ac_hi=$ac_mid
23760 else
23761   echo "$as_me: failed program was:" >&5
23762 sed 's/^/| /' conftest.$ac_ext >&5
23763
23764         ac_lo=`expr '(' $ac_mid ')' + 1`
23765 fi
23766
23767 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23768 done
23769 case $ac_lo in
23770 ?*) ac_cv_alignof_long=$ac_lo;;
23771 '') if test "$ac_cv_type_long" = yes; then
23772      { { echo "$as_me:$LINENO: error: cannot compute alignment of long
23773 See \`config.log' for more details." >&5
23774 echo "$as_me: error: cannot compute alignment of long
23775 See \`config.log' for more details." >&2;}
23776    { (exit 77); exit 77; }; }
23777    else
23778      ac_cv_alignof_long=0
23779    fi ;;
23780 esac
23781 else
23782   cat >conftest.$ac_ext <<_ACEOF
23783 /* confdefs.h.  */
23784 _ACEOF
23785 cat confdefs.h >>conftest.$ac_ext
23786 cat >>conftest.$ac_ext <<_ACEOF
23787 /* end confdefs.h.  */
23788 $ac_includes_default
23789 #ifndef offsetof
23790 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
23791 #endif
23792 typedef struct { char x; long y; } ac__type_alignof_;
23793 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
23794 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
23795 #include <stdio.h>
23796 #include <stdlib.h>
23797 int
23798 main ()
23799 {
23800
23801   FILE *f = fopen ("conftest.val", "w");
23802   if (! f)
23803     return 1;
23804   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
23805     {
23806       long int i = longval ();
23807       if (i != ((long int) offsetof (ac__type_alignof_, y)))
23808         return 1;
23809       fprintf (f, "%ld\n", i);
23810     }
23811   else
23812     {
23813       unsigned long int i = ulongval ();
23814       if (i != ((long int) offsetof (ac__type_alignof_, y)))
23815         return 1;
23816       fprintf (f, "%lu\n", i);
23817     }
23818   return ferror (f) || fclose (f) != 0;
23819
23820   ;
23821   return 0;
23822 }
23823 _ACEOF
23824 rm -f conftest$ac_exeext
23825 if { (ac_try="$ac_link"
23826 case "(($ac_try" in
23827   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23828   *) ac_try_echo=$ac_try;;
23829 esac
23830 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23831   (eval "$ac_link") 2>&5
23832   ac_status=$?
23833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23834   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23835   { (case "(($ac_try" in
23836   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23837   *) ac_try_echo=$ac_try;;
23838 esac
23839 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23840   (eval "$ac_try") 2>&5
23841   ac_status=$?
23842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23843   (exit $ac_status); }; }; then
23844   ac_cv_alignof_long=`cat conftest.val`
23845 else
23846   echo "$as_me: program exited with status $ac_status" >&5
23847 echo "$as_me: failed program was:" >&5
23848 sed 's/^/| /' conftest.$ac_ext >&5
23849
23850 ( exit $ac_status )
23851 if test "$ac_cv_type_long" = yes; then
23852      { { echo "$as_me:$LINENO: error: cannot compute alignment of long
23853 See \`config.log' for more details." >&5
23854 echo "$as_me: error: cannot compute alignment of long
23855 See \`config.log' for more details." >&2;}
23856    { (exit 77); exit 77; }; }
23857    else
23858      ac_cv_alignof_long=0
23859    fi
23860 fi
23861 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23862 fi
23863 rm -f conftest.val
23864 fi
23865 { echo "$as_me:$LINENO: result: $ac_cv_alignof_long" >&5
23866 echo "${ECHO_T}$ac_cv_alignof_long" >&6; }
23867
23868
23869
23870 cat >>confdefs.h <<_ACEOF
23871 #define ALIGNOF_LONG $ac_cv_alignof_long
23872 _ACEOF
23873
23874
23875 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
23876   { echo "$as_me:$LINENO: checking for long long int" >&5
23877 echo $ECHO_N "checking for long long int... $ECHO_C" >&6; }
23878 if test "${ac_cv_type_long_long_int+set}" = set; then
23879   echo $ECHO_N "(cached) $ECHO_C" >&6
23880 else
23881   cat >conftest.$ac_ext <<_ACEOF
23882 /* confdefs.h.  */
23883 _ACEOF
23884 cat confdefs.h >>conftest.$ac_ext
23885 cat >>conftest.$ac_ext <<_ACEOF
23886 /* end confdefs.h.  */
23887 $ac_includes_default
23888 typedef long long int ac__type_new_;
23889 int
23890 main ()
23891 {
23892 if ((ac__type_new_ *) 0)
23893   return 0;
23894 if (sizeof (ac__type_new_))
23895   return 0;
23896   ;
23897   return 0;
23898 }
23899 _ACEOF
23900 rm -f conftest.$ac_objext
23901 if { (ac_try="$ac_compile"
23902 case "(($ac_try" in
23903   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23904   *) ac_try_echo=$ac_try;;
23905 esac
23906 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23907   (eval "$ac_compile") 2>conftest.er1
23908   ac_status=$?
23909   grep -v '^ *+' conftest.er1 >conftest.err
23910   rm -f conftest.er1
23911   cat conftest.err >&5
23912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23913   (exit $ac_status); } && {
23914          test -z "$ac_c_werror_flag" ||
23915          test ! -s conftest.err
23916        } && test -s conftest.$ac_objext; then
23917   ac_cv_type_long_long_int=yes
23918 else
23919   echo "$as_me: failed program was:" >&5
23920 sed 's/^/| /' conftest.$ac_ext >&5
23921
23922         ac_cv_type_long_long_int=no
23923 fi
23924
23925 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23926 fi
23927 { echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
23928 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6; }
23929
23930 # The cast to long int works around a bug in the HP C Compiler,
23931 # see AC_CHECK_SIZEOF for more information.
23932 { echo "$as_me:$LINENO: checking alignment of long long int" >&5
23933 echo $ECHO_N "checking alignment of long long int... $ECHO_C" >&6; }
23934 if test "${ac_cv_alignof_long_long_int+set}" = set; then
23935   echo $ECHO_N "(cached) $ECHO_C" >&6
23936 else
23937   if test "$cross_compiling" = yes; then
23938   # Depending upon the size, compute the lo and hi bounds.
23939 cat >conftest.$ac_ext <<_ACEOF
23940 /* confdefs.h.  */
23941 _ACEOF
23942 cat confdefs.h >>conftest.$ac_ext
23943 cat >>conftest.$ac_ext <<_ACEOF
23944 /* end confdefs.h.  */
23945 $ac_includes_default
23946 #ifndef offsetof
23947 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
23948 #endif
23949 typedef struct { char x; long long int y; } ac__type_alignof_;
23950 int
23951 main ()
23952 {
23953 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
23954 test_array [0] = 0
23955
23956   ;
23957   return 0;
23958 }
23959 _ACEOF
23960 rm -f conftest.$ac_objext
23961 if { (ac_try="$ac_compile"
23962 case "(($ac_try" in
23963   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23964   *) ac_try_echo=$ac_try;;
23965 esac
23966 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23967   (eval "$ac_compile") 2>conftest.er1
23968   ac_status=$?
23969   grep -v '^ *+' conftest.er1 >conftest.err
23970   rm -f conftest.er1
23971   cat conftest.err >&5
23972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23973   (exit $ac_status); } && {
23974          test -z "$ac_c_werror_flag" ||
23975          test ! -s conftest.err
23976        } && test -s conftest.$ac_objext; then
23977   ac_lo=0 ac_mid=0
23978   while :; do
23979     cat >conftest.$ac_ext <<_ACEOF
23980 /* confdefs.h.  */
23981 _ACEOF
23982 cat confdefs.h >>conftest.$ac_ext
23983 cat >>conftest.$ac_ext <<_ACEOF
23984 /* end confdefs.h.  */
23985 $ac_includes_default
23986 #ifndef offsetof
23987 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
23988 #endif
23989 typedef struct { char x; long long int y; } ac__type_alignof_;
23990 int
23991 main ()
23992 {
23993 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
23994 test_array [0] = 0
23995
23996   ;
23997   return 0;
23998 }
23999 _ACEOF
24000 rm -f conftest.$ac_objext
24001 if { (ac_try="$ac_compile"
24002 case "(($ac_try" in
24003   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24004   *) ac_try_echo=$ac_try;;
24005 esac
24006 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24007   (eval "$ac_compile") 2>conftest.er1
24008   ac_status=$?
24009   grep -v '^ *+' conftest.er1 >conftest.err
24010   rm -f conftest.er1
24011   cat conftest.err >&5
24012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24013   (exit $ac_status); } && {
24014          test -z "$ac_c_werror_flag" ||
24015          test ! -s conftest.err
24016        } && test -s conftest.$ac_objext; then
24017   ac_hi=$ac_mid; break
24018 else
24019   echo "$as_me: failed program was:" >&5
24020 sed 's/^/| /' conftest.$ac_ext >&5
24021
24022         ac_lo=`expr $ac_mid + 1`
24023                         if test $ac_lo -le $ac_mid; then
24024                           ac_lo= ac_hi=
24025                           break
24026                         fi
24027                         ac_mid=`expr 2 '*' $ac_mid + 1`
24028 fi
24029
24030 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24031   done
24032 else
24033   echo "$as_me: failed program was:" >&5
24034 sed 's/^/| /' conftest.$ac_ext >&5
24035
24036         cat >conftest.$ac_ext <<_ACEOF
24037 /* confdefs.h.  */
24038 _ACEOF
24039 cat confdefs.h >>conftest.$ac_ext
24040 cat >>conftest.$ac_ext <<_ACEOF
24041 /* end confdefs.h.  */
24042 $ac_includes_default
24043 #ifndef offsetof
24044 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
24045 #endif
24046 typedef struct { char x; long long int y; } ac__type_alignof_;
24047 int
24048 main ()
24049 {
24050 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
24051 test_array [0] = 0
24052
24053   ;
24054   return 0;
24055 }
24056 _ACEOF
24057 rm -f conftest.$ac_objext
24058 if { (ac_try="$ac_compile"
24059 case "(($ac_try" in
24060   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24061   *) ac_try_echo=$ac_try;;
24062 esac
24063 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24064   (eval "$ac_compile") 2>conftest.er1
24065   ac_status=$?
24066   grep -v '^ *+' conftest.er1 >conftest.err
24067   rm -f conftest.er1
24068   cat conftest.err >&5
24069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24070   (exit $ac_status); } && {
24071          test -z "$ac_c_werror_flag" ||
24072          test ! -s conftest.err
24073        } && test -s conftest.$ac_objext; then
24074   ac_hi=-1 ac_mid=-1
24075   while :; do
24076     cat >conftest.$ac_ext <<_ACEOF
24077 /* confdefs.h.  */
24078 _ACEOF
24079 cat confdefs.h >>conftest.$ac_ext
24080 cat >>conftest.$ac_ext <<_ACEOF
24081 /* end confdefs.h.  */
24082 $ac_includes_default
24083 #ifndef offsetof
24084 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
24085 #endif
24086 typedef struct { char x; long long int y; } ac__type_alignof_;
24087 int
24088 main ()
24089 {
24090 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
24091 test_array [0] = 0
24092
24093   ;
24094   return 0;
24095 }
24096 _ACEOF
24097 rm -f conftest.$ac_objext
24098 if { (ac_try="$ac_compile"
24099 case "(($ac_try" in
24100   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24101   *) ac_try_echo=$ac_try;;
24102 esac
24103 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24104   (eval "$ac_compile") 2>conftest.er1
24105   ac_status=$?
24106   grep -v '^ *+' conftest.er1 >conftest.err
24107   rm -f conftest.er1
24108   cat conftest.err >&5
24109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24110   (exit $ac_status); } && {
24111          test -z "$ac_c_werror_flag" ||
24112          test ! -s conftest.err
24113        } && test -s conftest.$ac_objext; then
24114   ac_lo=$ac_mid; break
24115 else
24116   echo "$as_me: failed program was:" >&5
24117 sed 's/^/| /' conftest.$ac_ext >&5
24118
24119         ac_hi=`expr '(' $ac_mid ')' - 1`
24120                         if test $ac_mid -le $ac_hi; then
24121                           ac_lo= ac_hi=
24122                           break
24123                         fi
24124                         ac_mid=`expr 2 '*' $ac_mid`
24125 fi
24126
24127 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24128   done
24129 else
24130   echo "$as_me: failed program was:" >&5
24131 sed 's/^/| /' conftest.$ac_ext >&5
24132
24133         ac_lo= ac_hi=
24134 fi
24135
24136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24137 fi
24138
24139 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24140 # Binary search between lo and hi bounds.
24141 while test "x$ac_lo" != "x$ac_hi"; do
24142   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24143   cat >conftest.$ac_ext <<_ACEOF
24144 /* confdefs.h.  */
24145 _ACEOF
24146 cat confdefs.h >>conftest.$ac_ext
24147 cat >>conftest.$ac_ext <<_ACEOF
24148 /* end confdefs.h.  */
24149 $ac_includes_default
24150 #ifndef offsetof
24151 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
24152 #endif
24153 typedef struct { char x; long long int y; } ac__type_alignof_;
24154 int
24155 main ()
24156 {
24157 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
24158 test_array [0] = 0
24159
24160   ;
24161   return 0;
24162 }
24163 _ACEOF
24164 rm -f conftest.$ac_objext
24165 if { (ac_try="$ac_compile"
24166 case "(($ac_try" in
24167   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24168   *) ac_try_echo=$ac_try;;
24169 esac
24170 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24171   (eval "$ac_compile") 2>conftest.er1
24172   ac_status=$?
24173   grep -v '^ *+' conftest.er1 >conftest.err
24174   rm -f conftest.er1
24175   cat conftest.err >&5
24176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24177   (exit $ac_status); } && {
24178          test -z "$ac_c_werror_flag" ||
24179          test ! -s conftest.err
24180        } && test -s conftest.$ac_objext; then
24181   ac_hi=$ac_mid
24182 else
24183   echo "$as_me: failed program was:" >&5
24184 sed 's/^/| /' conftest.$ac_ext >&5
24185
24186         ac_lo=`expr '(' $ac_mid ')' + 1`
24187 fi
24188
24189 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24190 done
24191 case $ac_lo in
24192 ?*) ac_cv_alignof_long_long_int=$ac_lo;;
24193 '') if test "$ac_cv_type_long_long_int" = yes; then
24194      { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int
24195 See \`config.log' for more details." >&5
24196 echo "$as_me: error: cannot compute alignment of long long int
24197 See \`config.log' for more details." >&2;}
24198    { (exit 77); exit 77; }; }
24199    else
24200      ac_cv_alignof_long_long_int=0
24201    fi ;;
24202 esac
24203 else
24204   cat >conftest.$ac_ext <<_ACEOF
24205 /* confdefs.h.  */
24206 _ACEOF
24207 cat confdefs.h >>conftest.$ac_ext
24208 cat >>conftest.$ac_ext <<_ACEOF
24209 /* end confdefs.h.  */
24210 $ac_includes_default
24211 #ifndef offsetof
24212 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
24213 #endif
24214 typedef struct { char x; long long int y; } ac__type_alignof_;
24215 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
24216 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
24217 #include <stdio.h>
24218 #include <stdlib.h>
24219 int
24220 main ()
24221 {
24222
24223   FILE *f = fopen ("conftest.val", "w");
24224   if (! f)
24225     return 1;
24226   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
24227     {
24228       long int i = longval ();
24229       if (i != ((long int) offsetof (ac__type_alignof_, y)))
24230         return 1;
24231       fprintf (f, "%ld\n", i);
24232     }
24233   else
24234     {
24235       unsigned long int i = ulongval ();
24236       if (i != ((long int) offsetof (ac__type_alignof_, y)))
24237         return 1;
24238       fprintf (f, "%lu\n", i);
24239     }
24240   return ferror (f) || fclose (f) != 0;
24241
24242   ;
24243   return 0;
24244 }
24245 _ACEOF
24246 rm -f conftest$ac_exeext
24247 if { (ac_try="$ac_link"
24248 case "(($ac_try" in
24249   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24250   *) ac_try_echo=$ac_try;;
24251 esac
24252 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24253   (eval "$ac_link") 2>&5
24254   ac_status=$?
24255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24256   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24257   { (case "(($ac_try" in
24258   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24259   *) ac_try_echo=$ac_try;;
24260 esac
24261 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24262   (eval "$ac_try") 2>&5
24263   ac_status=$?
24264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24265   (exit $ac_status); }; }; then
24266   ac_cv_alignof_long_long_int=`cat conftest.val`
24267 else
24268   echo "$as_me: program exited with status $ac_status" >&5
24269 echo "$as_me: failed program was:" >&5
24270 sed 's/^/| /' conftest.$ac_ext >&5
24271
24272 ( exit $ac_status )
24273 if test "$ac_cv_type_long_long_int" = yes; then
24274      { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int
24275 See \`config.log' for more details." >&5
24276 echo "$as_me: error: cannot compute alignment of long long int
24277 See \`config.log' for more details." >&2;}
24278    { (exit 77); exit 77; }; }
24279    else
24280      ac_cv_alignof_long_long_int=0
24281    fi
24282 fi
24283 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24284 fi
24285 rm -f conftest.val
24286 fi
24287 { echo "$as_me:$LINENO: result: $ac_cv_alignof_long_long_int" >&5
24288 echo "${ECHO_T}$ac_cv_alignof_long_long_int" >&6; }
24289
24290
24291
24292 cat >>confdefs.h <<_ACEOF
24293 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
24294 _ACEOF
24295
24296
24297 fi
24298 { echo "$as_me:$LINENO: checking for double" >&5
24299 echo $ECHO_N "checking for double... $ECHO_C" >&6; }
24300 if test "${ac_cv_type_double+set}" = set; then
24301   echo $ECHO_N "(cached) $ECHO_C" >&6
24302 else
24303   cat >conftest.$ac_ext <<_ACEOF
24304 /* confdefs.h.  */
24305 _ACEOF
24306 cat confdefs.h >>conftest.$ac_ext
24307 cat >>conftest.$ac_ext <<_ACEOF
24308 /* end confdefs.h.  */
24309 $ac_includes_default
24310 typedef double ac__type_new_;
24311 int
24312 main ()
24313 {
24314 if ((ac__type_new_ *) 0)
24315   return 0;
24316 if (sizeof (ac__type_new_))
24317   return 0;
24318   ;
24319   return 0;
24320 }
24321 _ACEOF
24322 rm -f conftest.$ac_objext
24323 if { (ac_try="$ac_compile"
24324 case "(($ac_try" in
24325   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24326   *) ac_try_echo=$ac_try;;
24327 esac
24328 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24329   (eval "$ac_compile") 2>conftest.er1
24330   ac_status=$?
24331   grep -v '^ *+' conftest.er1 >conftest.err
24332   rm -f conftest.er1
24333   cat conftest.err >&5
24334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24335   (exit $ac_status); } && {
24336          test -z "$ac_c_werror_flag" ||
24337          test ! -s conftest.err
24338        } && test -s conftest.$ac_objext; then
24339   ac_cv_type_double=yes
24340 else
24341   echo "$as_me: failed program was:" >&5
24342 sed 's/^/| /' conftest.$ac_ext >&5
24343
24344         ac_cv_type_double=no
24345 fi
24346
24347 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24348 fi
24349 { echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
24350 echo "${ECHO_T}$ac_cv_type_double" >&6; }
24351
24352 # The cast to long int works around a bug in the HP C Compiler,
24353 # see AC_CHECK_SIZEOF for more information.
24354 { echo "$as_me:$LINENO: checking alignment of double" >&5
24355 echo $ECHO_N "checking alignment of double... $ECHO_C" >&6; }
24356 if test "${ac_cv_alignof_double+set}" = set; then
24357   echo $ECHO_N "(cached) $ECHO_C" >&6
24358 else
24359   if test "$cross_compiling" = yes; then
24360   # Depending upon the size, compute the lo and hi bounds.
24361 cat >conftest.$ac_ext <<_ACEOF
24362 /* confdefs.h.  */
24363 _ACEOF
24364 cat confdefs.h >>conftest.$ac_ext
24365 cat >>conftest.$ac_ext <<_ACEOF
24366 /* end confdefs.h.  */
24367 $ac_includes_default
24368 #ifndef offsetof
24369 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
24370 #endif
24371 typedef struct { char x; double y; } ac__type_alignof_;
24372 int
24373 main ()
24374 {
24375 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
24376 test_array [0] = 0
24377
24378   ;
24379   return 0;
24380 }
24381 _ACEOF
24382 rm -f conftest.$ac_objext
24383 if { (ac_try="$ac_compile"
24384 case "(($ac_try" in
24385   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24386   *) ac_try_echo=$ac_try;;
24387 esac
24388 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24389   (eval "$ac_compile") 2>conftest.er1
24390   ac_status=$?
24391   grep -v '^ *+' conftest.er1 >conftest.err
24392   rm -f conftest.er1
24393   cat conftest.err >&5
24394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24395   (exit $ac_status); } && {
24396          test -z "$ac_c_werror_flag" ||
24397          test ! -s conftest.err
24398        } && test -s conftest.$ac_objext; then
24399   ac_lo=0 ac_mid=0
24400   while :; do
24401     cat >conftest.$ac_ext <<_ACEOF
24402 /* confdefs.h.  */
24403 _ACEOF
24404 cat confdefs.h >>conftest.$ac_ext
24405 cat >>conftest.$ac_ext <<_ACEOF
24406 /* end confdefs.h.  */
24407 $ac_includes_default
24408 #ifndef offsetof
24409 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
24410 #endif
24411 typedef struct { char x; double y; } ac__type_alignof_;
24412 int
24413 main ()
24414 {
24415 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
24416 test_array [0] = 0
24417
24418   ;
24419   return 0;
24420 }
24421 _ACEOF
24422 rm -f conftest.$ac_objext
24423 if { (ac_try="$ac_compile"
24424 case "(($ac_try" in
24425   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24426   *) ac_try_echo=$ac_try;;
24427 esac
24428 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24429   (eval "$ac_compile") 2>conftest.er1
24430   ac_status=$?
24431   grep -v '^ *+' conftest.er1 >conftest.err
24432   rm -f conftest.er1
24433   cat conftest.err >&5
24434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24435   (exit $ac_status); } && {
24436          test -z "$ac_c_werror_flag" ||
24437          test ! -s conftest.err
24438        } && test -s conftest.$ac_objext; then
24439   ac_hi=$ac_mid; break
24440 else
24441   echo "$as_me: failed program was:" >&5
24442 sed 's/^/| /' conftest.$ac_ext >&5
24443
24444         ac_lo=`expr $ac_mid + 1`
24445                         if test $ac_lo -le $ac_mid; then
24446                           ac_lo= ac_hi=
24447                           break
24448                         fi
24449                         ac_mid=`expr 2 '*' $ac_mid + 1`
24450 fi
24451
24452 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24453   done
24454 else
24455   echo "$as_me: failed program was:" >&5
24456 sed 's/^/| /' conftest.$ac_ext >&5
24457
24458         cat >conftest.$ac_ext <<_ACEOF
24459 /* confdefs.h.  */
24460 _ACEOF
24461 cat confdefs.h >>conftest.$ac_ext
24462 cat >>conftest.$ac_ext <<_ACEOF
24463 /* end confdefs.h.  */
24464 $ac_includes_default
24465 #ifndef offsetof
24466 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
24467 #endif
24468 typedef struct { char x; double y; } ac__type_alignof_;
24469 int
24470 main ()
24471 {
24472 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
24473 test_array [0] = 0
24474
24475   ;
24476   return 0;
24477 }
24478 _ACEOF
24479 rm -f conftest.$ac_objext
24480 if { (ac_try="$ac_compile"
24481 case "(($ac_try" in
24482   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24483   *) ac_try_echo=$ac_try;;
24484 esac
24485 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24486   (eval "$ac_compile") 2>conftest.er1
24487   ac_status=$?
24488   grep -v '^ *+' conftest.er1 >conftest.err
24489   rm -f conftest.er1
24490   cat conftest.err >&5
24491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24492   (exit $ac_status); } && {
24493          test -z "$ac_c_werror_flag" ||
24494          test ! -s conftest.err
24495        } && test -s conftest.$ac_objext; then
24496   ac_hi=-1 ac_mid=-1
24497   while :; do
24498     cat >conftest.$ac_ext <<_ACEOF
24499 /* confdefs.h.  */
24500 _ACEOF
24501 cat confdefs.h >>conftest.$ac_ext
24502 cat >>conftest.$ac_ext <<_ACEOF
24503 /* end confdefs.h.  */
24504 $ac_includes_default
24505 #ifndef offsetof
24506 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
24507 #endif
24508 typedef struct { char x; double y; } ac__type_alignof_;
24509 int
24510 main ()
24511 {
24512 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
24513 test_array [0] = 0
24514
24515   ;
24516   return 0;
24517 }
24518 _ACEOF
24519 rm -f conftest.$ac_objext
24520 if { (ac_try="$ac_compile"
24521 case "(($ac_try" in
24522   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24523   *) ac_try_echo=$ac_try;;
24524 esac
24525 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24526   (eval "$ac_compile") 2>conftest.er1
24527   ac_status=$?
24528   grep -v '^ *+' conftest.er1 >conftest.err
24529   rm -f conftest.er1
24530   cat conftest.err >&5
24531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24532   (exit $ac_status); } && {
24533          test -z "$ac_c_werror_flag" ||
24534          test ! -s conftest.err
24535        } && test -s conftest.$ac_objext; then
24536   ac_lo=$ac_mid; break
24537 else
24538   echo "$as_me: failed program was:" >&5
24539 sed 's/^/| /' conftest.$ac_ext >&5
24540
24541         ac_hi=`expr '(' $ac_mid ')' - 1`
24542                         if test $ac_mid -le $ac_hi; then
24543                           ac_lo= ac_hi=
24544                           break
24545                         fi
24546                         ac_mid=`expr 2 '*' $ac_mid`
24547 fi
24548
24549 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24550   done
24551 else
24552   echo "$as_me: failed program was:" >&5
24553 sed 's/^/| /' conftest.$ac_ext >&5
24554
24555         ac_lo= ac_hi=
24556 fi
24557
24558 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24559 fi
24560
24561 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24562 # Binary search between lo and hi bounds.
24563 while test "x$ac_lo" != "x$ac_hi"; do
24564   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24565   cat >conftest.$ac_ext <<_ACEOF
24566 /* confdefs.h.  */
24567 _ACEOF
24568 cat confdefs.h >>conftest.$ac_ext
24569 cat >>conftest.$ac_ext <<_ACEOF
24570 /* end confdefs.h.  */
24571 $ac_includes_default
24572 #ifndef offsetof
24573 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
24574 #endif
24575 typedef struct { char x; double y; } ac__type_alignof_;
24576 int
24577 main ()
24578 {
24579 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
24580 test_array [0] = 0
24581
24582   ;
24583   return 0;
24584 }
24585 _ACEOF
24586 rm -f conftest.$ac_objext
24587 if { (ac_try="$ac_compile"
24588 case "(($ac_try" in
24589   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24590   *) ac_try_echo=$ac_try;;
24591 esac
24592 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24593   (eval "$ac_compile") 2>conftest.er1
24594   ac_status=$?
24595   grep -v '^ *+' conftest.er1 >conftest.err
24596   rm -f conftest.er1
24597   cat conftest.err >&5
24598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24599   (exit $ac_status); } && {
24600          test -z "$ac_c_werror_flag" ||
24601          test ! -s conftest.err
24602        } && test -s conftest.$ac_objext; then
24603   ac_hi=$ac_mid
24604 else
24605   echo "$as_me: failed program was:" >&5
24606 sed 's/^/| /' conftest.$ac_ext >&5
24607
24608         ac_lo=`expr '(' $ac_mid ')' + 1`
24609 fi
24610
24611 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24612 done
24613 case $ac_lo in
24614 ?*) ac_cv_alignof_double=$ac_lo;;
24615 '') if test "$ac_cv_type_double" = yes; then
24616      { { echo "$as_me:$LINENO: error: cannot compute alignment of double
24617 See \`config.log' for more details." >&5
24618 echo "$as_me: error: cannot compute alignment of double
24619 See \`config.log' for more details." >&2;}
24620    { (exit 77); exit 77; }; }
24621    else
24622      ac_cv_alignof_double=0
24623    fi ;;
24624 esac
24625 else
24626   cat >conftest.$ac_ext <<_ACEOF
24627 /* confdefs.h.  */
24628 _ACEOF
24629 cat confdefs.h >>conftest.$ac_ext
24630 cat >>conftest.$ac_ext <<_ACEOF
24631 /* end confdefs.h.  */
24632 $ac_includes_default
24633 #ifndef offsetof
24634 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
24635 #endif
24636 typedef struct { char x; double y; } ac__type_alignof_;
24637 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
24638 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
24639 #include <stdio.h>
24640 #include <stdlib.h>
24641 int
24642 main ()
24643 {
24644
24645   FILE *f = fopen ("conftest.val", "w");
24646   if (! f)
24647     return 1;
24648   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
24649     {
24650       long int i = longval ();
24651       if (i != ((long int) offsetof (ac__type_alignof_, y)))
24652         return 1;
24653       fprintf (f, "%ld\n", i);
24654     }
24655   else
24656     {
24657       unsigned long int i = ulongval ();
24658       if (i != ((long int) offsetof (ac__type_alignof_, y)))
24659         return 1;
24660       fprintf (f, "%lu\n", i);
24661     }
24662   return ferror (f) || fclose (f) != 0;
24663
24664   ;
24665   return 0;
24666 }
24667 _ACEOF
24668 rm -f conftest$ac_exeext
24669 if { (ac_try="$ac_link"
24670 case "(($ac_try" in
24671   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24672   *) ac_try_echo=$ac_try;;
24673 esac
24674 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24675   (eval "$ac_link") 2>&5
24676   ac_status=$?
24677   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24678   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24679   { (case "(($ac_try" in
24680   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24681   *) ac_try_echo=$ac_try;;
24682 esac
24683 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24684   (eval "$ac_try") 2>&5
24685   ac_status=$?
24686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24687   (exit $ac_status); }; }; then
24688   ac_cv_alignof_double=`cat conftest.val`
24689 else
24690   echo "$as_me: program exited with status $ac_status" >&5
24691 echo "$as_me: failed program was:" >&5
24692 sed 's/^/| /' conftest.$ac_ext >&5
24693
24694 ( exit $ac_status )
24695 if test "$ac_cv_type_double" = yes; then
24696      { { echo "$as_me:$LINENO: error: cannot compute alignment of double
24697 See \`config.log' for more details." >&5
24698 echo "$as_me: error: cannot compute alignment of double
24699 See \`config.log' for more details." >&2;}
24700    { (exit 77); exit 77; }; }
24701    else
24702      ac_cv_alignof_double=0
24703    fi
24704 fi
24705 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24706 fi
24707 rm -f conftest.val
24708 fi
24709 { echo "$as_me:$LINENO: result: $ac_cv_alignof_double" >&5
24710 echo "${ECHO_T}$ac_cv_alignof_double" >&6; }
24711
24712
24713
24714 cat >>confdefs.h <<_ACEOF
24715 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
24716 _ACEOF
24717
24718
24719
24720 # Compute maximum alignment of any basic type.
24721 # We assume long's alignment is at least as strong as char, short, or int;
24722 # but we must check long long (if it exists) and double.
24723
24724 MAX_ALIGNOF=$ac_cv_alignof_long
24725 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
24726   MAX_ALIGNOF=$ac_cv_alignof_double
24727 fi
24728 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
24729   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
24730 fi
24731
24732 cat >>confdefs.h <<_ACEOF
24733 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
24734 _ACEOF
24735
24736
24737
24738 # Some platforms predefine the types int8, int16, etc.  Only check
24739 # a (hopefully) representative subset.
24740 { echo "$as_me:$LINENO: checking for int8" >&5
24741 echo $ECHO_N "checking for int8... $ECHO_C" >&6; }
24742 if test "${ac_cv_type_int8+set}" = set; then
24743   echo $ECHO_N "(cached) $ECHO_C" >&6
24744 else
24745   cat >conftest.$ac_ext <<_ACEOF
24746 /* confdefs.h.  */
24747 _ACEOF
24748 cat confdefs.h >>conftest.$ac_ext
24749 cat >>conftest.$ac_ext <<_ACEOF
24750 /* end confdefs.h.  */
24751 #include <stdio.h>
24752 #ifdef HAVE_SUPPORTDEFS_H
24753 #include <SupportDefs.h>
24754 #endif
24755
24756 typedef int8 ac__type_new_;
24757 int
24758 main ()
24759 {
24760 if ((ac__type_new_ *) 0)
24761   return 0;
24762 if (sizeof (ac__type_new_))
24763   return 0;
24764   ;
24765   return 0;
24766 }
24767 _ACEOF
24768 rm -f conftest.$ac_objext
24769 if { (ac_try="$ac_compile"
24770 case "(($ac_try" in
24771   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24772   *) ac_try_echo=$ac_try;;
24773 esac
24774 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24775   (eval "$ac_compile") 2>conftest.er1
24776   ac_status=$?
24777   grep -v '^ *+' conftest.er1 >conftest.err
24778   rm -f conftest.er1
24779   cat conftest.err >&5
24780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24781   (exit $ac_status); } && {
24782          test -z "$ac_c_werror_flag" ||
24783          test ! -s conftest.err
24784        } && test -s conftest.$ac_objext; then
24785   ac_cv_type_int8=yes
24786 else
24787   echo "$as_me: failed program was:" >&5
24788 sed 's/^/| /' conftest.$ac_ext >&5
24789
24790         ac_cv_type_int8=no
24791 fi
24792
24793 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24794 fi
24795 { echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
24796 echo "${ECHO_T}$ac_cv_type_int8" >&6; }
24797 if test $ac_cv_type_int8 = yes; then
24798
24799 cat >>confdefs.h <<_ACEOF
24800 #define HAVE_INT8 1
24801 _ACEOF
24802
24803
24804 fi
24805 { echo "$as_me:$LINENO: checking for uint8" >&5
24806 echo $ECHO_N "checking for uint8... $ECHO_C" >&6; }
24807 if test "${ac_cv_type_uint8+set}" = set; then
24808   echo $ECHO_N "(cached) $ECHO_C" >&6
24809 else
24810   cat >conftest.$ac_ext <<_ACEOF
24811 /* confdefs.h.  */
24812 _ACEOF
24813 cat confdefs.h >>conftest.$ac_ext
24814 cat >>conftest.$ac_ext <<_ACEOF
24815 /* end confdefs.h.  */
24816 #include <stdio.h>
24817 #ifdef HAVE_SUPPORTDEFS_H
24818 #include <SupportDefs.h>
24819 #endif
24820
24821 typedef uint8 ac__type_new_;
24822 int
24823 main ()
24824 {
24825 if ((ac__type_new_ *) 0)
24826   return 0;
24827 if (sizeof (ac__type_new_))
24828   return 0;
24829   ;
24830   return 0;
24831 }
24832 _ACEOF
24833 rm -f conftest.$ac_objext
24834 if { (ac_try="$ac_compile"
24835 case "(($ac_try" in
24836   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24837   *) ac_try_echo=$ac_try;;
24838 esac
24839 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24840   (eval "$ac_compile") 2>conftest.er1
24841   ac_status=$?
24842   grep -v '^ *+' conftest.er1 >conftest.err
24843   rm -f conftest.er1
24844   cat conftest.err >&5
24845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24846   (exit $ac_status); } && {
24847          test -z "$ac_c_werror_flag" ||
24848          test ! -s conftest.err
24849        } && test -s conftest.$ac_objext; then
24850   ac_cv_type_uint8=yes
24851 else
24852   echo "$as_me: failed program was:" >&5
24853 sed 's/^/| /' conftest.$ac_ext >&5
24854
24855         ac_cv_type_uint8=no
24856 fi
24857
24858 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24859 fi
24860 { echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
24861 echo "${ECHO_T}$ac_cv_type_uint8" >&6; }
24862 if test $ac_cv_type_uint8 = yes; then
24863
24864 cat >>confdefs.h <<_ACEOF
24865 #define HAVE_UINT8 1
24866 _ACEOF
24867
24868
24869 fi
24870 { echo "$as_me:$LINENO: checking for int64" >&5
24871 echo $ECHO_N "checking for int64... $ECHO_C" >&6; }
24872 if test "${ac_cv_type_int64+set}" = set; then
24873   echo $ECHO_N "(cached) $ECHO_C" >&6
24874 else
24875   cat >conftest.$ac_ext <<_ACEOF
24876 /* confdefs.h.  */
24877 _ACEOF
24878 cat confdefs.h >>conftest.$ac_ext
24879 cat >>conftest.$ac_ext <<_ACEOF
24880 /* end confdefs.h.  */
24881 #include <stdio.h>
24882 #ifdef HAVE_SUPPORTDEFS_H
24883 #include <SupportDefs.h>
24884 #endif
24885
24886 typedef int64 ac__type_new_;
24887 int
24888 main ()
24889 {
24890 if ((ac__type_new_ *) 0)
24891   return 0;
24892 if (sizeof (ac__type_new_))
24893   return 0;
24894   ;
24895   return 0;
24896 }
24897 _ACEOF
24898 rm -f conftest.$ac_objext
24899 if { (ac_try="$ac_compile"
24900 case "(($ac_try" in
24901   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24902   *) ac_try_echo=$ac_try;;
24903 esac
24904 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24905   (eval "$ac_compile") 2>conftest.er1
24906   ac_status=$?
24907   grep -v '^ *+' conftest.er1 >conftest.err
24908   rm -f conftest.er1
24909   cat conftest.err >&5
24910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24911   (exit $ac_status); } && {
24912          test -z "$ac_c_werror_flag" ||
24913          test ! -s conftest.err
24914        } && test -s conftest.$ac_objext; then
24915   ac_cv_type_int64=yes
24916 else
24917   echo "$as_me: failed program was:" >&5
24918 sed 's/^/| /' conftest.$ac_ext >&5
24919
24920         ac_cv_type_int64=no
24921 fi
24922
24923 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24924 fi
24925 { echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
24926 echo "${ECHO_T}$ac_cv_type_int64" >&6; }
24927 if test $ac_cv_type_int64 = yes; then
24928
24929 cat >>confdefs.h <<_ACEOF
24930 #define HAVE_INT64 1
24931 _ACEOF
24932
24933
24934 fi
24935 { echo "$as_me:$LINENO: checking for uint64" >&5
24936 echo $ECHO_N "checking for uint64... $ECHO_C" >&6; }
24937 if test "${ac_cv_type_uint64+set}" = set; then
24938   echo $ECHO_N "(cached) $ECHO_C" >&6
24939 else
24940   cat >conftest.$ac_ext <<_ACEOF
24941 /* confdefs.h.  */
24942 _ACEOF
24943 cat confdefs.h >>conftest.$ac_ext
24944 cat >>conftest.$ac_ext <<_ACEOF
24945 /* end confdefs.h.  */
24946 #include <stdio.h>
24947 #ifdef HAVE_SUPPORTDEFS_H
24948 #include <SupportDefs.h>
24949 #endif
24950
24951 typedef uint64 ac__type_new_;
24952 int
24953 main ()
24954 {
24955 if ((ac__type_new_ *) 0)
24956   return 0;
24957 if (sizeof (ac__type_new_))
24958   return 0;
24959   ;
24960   return 0;
24961 }
24962 _ACEOF
24963 rm -f conftest.$ac_objext
24964 if { (ac_try="$ac_compile"
24965 case "(($ac_try" in
24966   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24967   *) ac_try_echo=$ac_try;;
24968 esac
24969 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24970   (eval "$ac_compile") 2>conftest.er1
24971   ac_status=$?
24972   grep -v '^ *+' conftest.er1 >conftest.err
24973   rm -f conftest.er1
24974   cat conftest.err >&5
24975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24976   (exit $ac_status); } && {
24977          test -z "$ac_c_werror_flag" ||
24978          test ! -s conftest.err
24979        } && test -s conftest.$ac_objext; then
24980   ac_cv_type_uint64=yes
24981 else
24982   echo "$as_me: failed program was:" >&5
24983 sed 's/^/| /' conftest.$ac_ext >&5
24984
24985         ac_cv_type_uint64=no
24986 fi
24987
24988 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24989 fi
24990 { echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
24991 echo "${ECHO_T}$ac_cv_type_uint64" >&6; }
24992 if test $ac_cv_type_uint64 = yes; then
24993
24994 cat >>confdefs.h <<_ACEOF
24995 #define HAVE_UINT64 1
24996 _ACEOF
24997
24998
24999 fi
25000
25001
25002 # We also check for sig_atomic_t, which *should* be defined per ANSI
25003 # C, but is missing on some old platforms.
25004 { echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
25005 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6; }
25006 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
25007   echo $ECHO_N "(cached) $ECHO_C" >&6
25008 else
25009   cat >conftest.$ac_ext <<_ACEOF
25010 /* confdefs.h.  */
25011 _ACEOF
25012 cat confdefs.h >>conftest.$ac_ext
25013 cat >>conftest.$ac_ext <<_ACEOF
25014 /* end confdefs.h.  */
25015 #include <signal.h>
25016
25017 typedef sig_atomic_t ac__type_new_;
25018 int
25019 main ()
25020 {
25021 if ((ac__type_new_ *) 0)
25022   return 0;
25023 if (sizeof (ac__type_new_))
25024   return 0;
25025   ;
25026   return 0;
25027 }
25028 _ACEOF
25029 rm -f conftest.$ac_objext
25030 if { (ac_try="$ac_compile"
25031 case "(($ac_try" in
25032   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25033   *) ac_try_echo=$ac_try;;
25034 esac
25035 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25036   (eval "$ac_compile") 2>conftest.er1
25037   ac_status=$?
25038   grep -v '^ *+' conftest.er1 >conftest.err
25039   rm -f conftest.er1
25040   cat conftest.err >&5
25041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25042   (exit $ac_status); } && {
25043          test -z "$ac_c_werror_flag" ||
25044          test ! -s conftest.err
25045        } && test -s conftest.$ac_objext; then
25046   ac_cv_type_sig_atomic_t=yes
25047 else
25048   echo "$as_me: failed program was:" >&5
25049 sed 's/^/| /' conftest.$ac_ext >&5
25050
25051         ac_cv_type_sig_atomic_t=no
25052 fi
25053
25054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25055 fi
25056 { echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
25057 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6; }
25058 if test $ac_cv_type_sig_atomic_t = yes; then
25059
25060 cat >>confdefs.h <<_ACEOF
25061 #define HAVE_SIG_ATOMIC_T 1
25062 _ACEOF
25063
25064
25065 fi
25066
25067
25068
25069 # If the user did not disable integer datetimes, check that
25070 # there is a working 64-bit integral type to use.
25071 if test x"$USE_INTEGER_DATETIMES" = x"yes" &&
25072    test x"$HAVE_LONG_INT_64" = x"no" &&
25073    test x"$HAVE_LONG_LONG_INT_64" = x"no" &&
25074    test x"$HAVE_INT64" = x"no" ; then
25075   { { echo "$as_me:$LINENO: error:
25076 Integer-based datetime support requires a 64-bit integer type,
25077 but no such type could be found. The --disable-integer-datetimes
25078 configure option can be used to disable integer-based storage
25079 of datetime values." >&5
25080 echo "$as_me: error:
25081 Integer-based datetime support requires a 64-bit integer type,
25082 but no such type could be found. The --disable-integer-datetimes
25083 configure option can be used to disable integer-based storage
25084 of datetime values." >&2;}
25085    { (exit 1); exit 1; }; }
25086 fi
25087
25088
25089 if test "$PORTNAME" != "win32"
25090 then
25091 { echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
25092 echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6; }
25093 if test "${pgac_cv_func_posix_signals+set}" = set; then
25094   echo $ECHO_N "(cached) $ECHO_C" >&6
25095 else
25096   cat >conftest.$ac_ext <<_ACEOF
25097 /* confdefs.h.  */
25098 _ACEOF
25099 cat confdefs.h >>conftest.$ac_ext
25100 cat >>conftest.$ac_ext <<_ACEOF
25101 /* end confdefs.h.  */
25102 #include <signal.h>
25103
25104 int
25105 main ()
25106 {
25107 struct sigaction act, oact;
25108 sigemptyset(&act.sa_mask);
25109 act.sa_flags = SA_RESTART;
25110 sigaction(0, &act, &oact);
25111   ;
25112   return 0;
25113 }
25114 _ACEOF
25115 rm -f conftest.$ac_objext conftest$ac_exeext
25116 if { (ac_try="$ac_link"
25117 case "(($ac_try" in
25118   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25119   *) ac_try_echo=$ac_try;;
25120 esac
25121 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25122   (eval "$ac_link") 2>conftest.er1
25123   ac_status=$?
25124   grep -v '^ *+' conftest.er1 >conftest.err
25125   rm -f conftest.er1
25126   cat conftest.err >&5
25127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25128   (exit $ac_status); } && {
25129          test -z "$ac_c_werror_flag" ||
25130          test ! -s conftest.err
25131        } && test -s conftest$ac_exeext &&
25132        $as_test_x conftest$ac_exeext; then
25133   pgac_cv_func_posix_signals=yes
25134 else
25135   echo "$as_me: failed program was:" >&5
25136 sed 's/^/| /' conftest.$ac_ext >&5
25137
25138         pgac_cv_func_posix_signals=no
25139 fi
25140
25141 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25142       conftest$ac_exeext conftest.$ac_ext
25143 fi
25144 { echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
25145 echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6; }
25146 if test x"$pgac_cv_func_posix_signals" = xyes ; then
25147
25148 cat >>confdefs.h <<\_ACEOF
25149 #define HAVE_POSIX_SIGNALS
25150 _ACEOF
25151
25152 fi
25153 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
25154
25155 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
25156   { { echo "$as_me:$LINENO: error:
25157 Thread-safety requires POSIX signals, which are not supported by this
25158 operating system." >&5
25159 echo "$as_me: error:
25160 Thread-safety requires POSIX signals, which are not supported by this
25161 operating system." >&2;}
25162    { (exit 1); exit 1; }; }
25163 fi
25164 fi
25165
25166 if test $ac_cv_func_fseeko = yes; then
25167 # Check whether --enable-largefile was given.
25168 if test "${enable_largefile+set}" = set; then
25169   enableval=$enable_largefile;
25170 fi
25171
25172 if test "$enable_largefile" != no; then
25173
25174   { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
25175 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
25176 if test "${ac_cv_sys_largefile_CC+set}" = set; then
25177   echo $ECHO_N "(cached) $ECHO_C" >&6
25178 else
25179   ac_cv_sys_largefile_CC=no
25180      if test "$GCC" != yes; then
25181        ac_save_CC=$CC
25182        while :; do
25183          # IRIX 6.2 and later do not support large files by default,
25184          # so use the C compiler's -n32 option if that helps.
25185          cat >conftest.$ac_ext <<_ACEOF
25186 /* confdefs.h.  */
25187 _ACEOF
25188 cat confdefs.h >>conftest.$ac_ext
25189 cat >>conftest.$ac_ext <<_ACEOF
25190 /* end confdefs.h.  */
25191 #include <sys/types.h>
25192  /* Check that off_t can represent 2**63 - 1 correctly.
25193     We can't simply define LARGE_OFF_T to be 9223372036854775807,
25194     since some C++ compilers masquerading as C compilers
25195     incorrectly reject 9223372036854775807.  */
25196 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
25197   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
25198                        && LARGE_OFF_T % 2147483647 == 1)
25199                       ? 1 : -1];
25200 int
25201 main ()
25202 {
25203
25204   ;
25205   return 0;
25206 }
25207 _ACEOF
25208          rm -f conftest.$ac_objext
25209 if { (ac_try="$ac_compile"
25210 case "(($ac_try" in
25211   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25212   *) ac_try_echo=$ac_try;;
25213 esac
25214 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25215   (eval "$ac_compile") 2>conftest.er1
25216   ac_status=$?
25217   grep -v '^ *+' conftest.er1 >conftest.err
25218   rm -f conftest.er1
25219   cat conftest.err >&5
25220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25221   (exit $ac_status); } && {
25222          test -z "$ac_c_werror_flag" ||
25223          test ! -s conftest.err
25224        } && test -s conftest.$ac_objext; then
25225   break
25226 else
25227   echo "$as_me: failed program was:" >&5
25228 sed 's/^/| /' conftest.$ac_ext >&5
25229
25230
25231 fi
25232
25233 rm -f core conftest.err conftest.$ac_objext
25234          CC="$CC -n32"
25235          rm -f conftest.$ac_objext
25236 if { (ac_try="$ac_compile"
25237 case "(($ac_try" in
25238   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25239   *) ac_try_echo=$ac_try;;
25240 esac
25241 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25242   (eval "$ac_compile") 2>conftest.er1
25243   ac_status=$?
25244   grep -v '^ *+' conftest.er1 >conftest.err
25245   rm -f conftest.er1
25246   cat conftest.err >&5
25247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25248   (exit $ac_status); } && {
25249          test -z "$ac_c_werror_flag" ||
25250          test ! -s conftest.err
25251        } && test -s conftest.$ac_objext; then
25252   ac_cv_sys_largefile_CC=' -n32'; break
25253 else
25254   echo "$as_me: failed program was:" >&5
25255 sed 's/^/| /' conftest.$ac_ext >&5
25256
25257
25258 fi
25259
25260 rm -f core conftest.err conftest.$ac_objext
25261          break
25262        done
25263        CC=$ac_save_CC
25264        rm -f conftest.$ac_ext
25265     fi
25266 fi
25267 { echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
25268 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
25269   if test "$ac_cv_sys_largefile_CC" != no; then
25270     CC=$CC$ac_cv_sys_largefile_CC
25271   fi
25272
25273   { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
25274 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
25275 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
25276   echo $ECHO_N "(cached) $ECHO_C" >&6
25277 else
25278   while :; do
25279   cat >conftest.$ac_ext <<_ACEOF
25280 /* confdefs.h.  */
25281 _ACEOF
25282 cat confdefs.h >>conftest.$ac_ext
25283 cat >>conftest.$ac_ext <<_ACEOF
25284 /* end confdefs.h.  */
25285 #include <sys/types.h>
25286  /* Check that off_t can represent 2**63 - 1 correctly.
25287     We can't simply define LARGE_OFF_T to be 9223372036854775807,
25288     since some C++ compilers masquerading as C compilers
25289     incorrectly reject 9223372036854775807.  */
25290 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
25291   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
25292                        && LARGE_OFF_T % 2147483647 == 1)
25293                       ? 1 : -1];
25294 int
25295 main ()
25296 {
25297
25298   ;
25299   return 0;
25300 }
25301 _ACEOF
25302 rm -f conftest.$ac_objext
25303 if { (ac_try="$ac_compile"
25304 case "(($ac_try" in
25305   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25306   *) ac_try_echo=$ac_try;;
25307 esac
25308 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25309   (eval "$ac_compile") 2>conftest.er1
25310   ac_status=$?
25311   grep -v '^ *+' conftest.er1 >conftest.err
25312   rm -f conftest.er1
25313   cat conftest.err >&5
25314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25315   (exit $ac_status); } && {
25316          test -z "$ac_c_werror_flag" ||
25317          test ! -s conftest.err
25318        } && test -s conftest.$ac_objext; then
25319   ac_cv_sys_file_offset_bits=no; break
25320 else
25321   echo "$as_me: failed program was:" >&5
25322 sed 's/^/| /' conftest.$ac_ext >&5
25323
25324
25325 fi
25326
25327 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25328   cat >conftest.$ac_ext <<_ACEOF
25329 /* confdefs.h.  */
25330 _ACEOF
25331 cat confdefs.h >>conftest.$ac_ext
25332 cat >>conftest.$ac_ext <<_ACEOF
25333 /* end confdefs.h.  */
25334 #define _FILE_OFFSET_BITS 64
25335 #include <sys/types.h>
25336  /* Check that off_t can represent 2**63 - 1 correctly.
25337     We can't simply define LARGE_OFF_T to be 9223372036854775807,
25338     since some C++ compilers masquerading as C compilers
25339     incorrectly reject 9223372036854775807.  */
25340 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
25341   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
25342                        && LARGE_OFF_T % 2147483647 == 1)
25343                       ? 1 : -1];
25344 int
25345 main ()
25346 {
25347
25348   ;
25349   return 0;
25350 }
25351 _ACEOF
25352 rm -f conftest.$ac_objext
25353 if { (ac_try="$ac_compile"
25354 case "(($ac_try" in
25355   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25356   *) ac_try_echo=$ac_try;;
25357 esac
25358 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25359   (eval "$ac_compile") 2>conftest.er1
25360   ac_status=$?
25361   grep -v '^ *+' conftest.er1 >conftest.err
25362   rm -f conftest.er1
25363   cat conftest.err >&5
25364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25365   (exit $ac_status); } && {
25366          test -z "$ac_c_werror_flag" ||
25367          test ! -s conftest.err
25368        } && test -s conftest.$ac_objext; then
25369   ac_cv_sys_file_offset_bits=64; break
25370 else
25371   echo "$as_me: failed program was:" >&5
25372 sed 's/^/| /' conftest.$ac_ext >&5
25373
25374
25375 fi
25376
25377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25378   ac_cv_sys_file_offset_bits=unknown
25379   break
25380 done
25381 fi
25382 { echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
25383 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
25384 case $ac_cv_sys_file_offset_bits in #(
25385   no | unknown) ;;
25386   *)
25387 cat >>confdefs.h <<_ACEOF
25388 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
25389 _ACEOF
25390 ;;
25391 esac
25392 rm -f conftest*
25393   if test $ac_cv_sys_file_offset_bits = unknown; then
25394     { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
25395 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
25396 if test "${ac_cv_sys_large_files+set}" = set; then
25397   echo $ECHO_N "(cached) $ECHO_C" >&6
25398 else
25399   while :; do
25400   cat >conftest.$ac_ext <<_ACEOF
25401 /* confdefs.h.  */
25402 _ACEOF
25403 cat confdefs.h >>conftest.$ac_ext
25404 cat >>conftest.$ac_ext <<_ACEOF
25405 /* end confdefs.h.  */
25406 #include <sys/types.h>
25407  /* Check that off_t can represent 2**63 - 1 correctly.
25408     We can't simply define LARGE_OFF_T to be 9223372036854775807,
25409     since some C++ compilers masquerading as C compilers
25410     incorrectly reject 9223372036854775807.  */
25411 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
25412   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
25413                        && LARGE_OFF_T % 2147483647 == 1)
25414                       ? 1 : -1];
25415 int
25416 main ()
25417 {
25418
25419   ;
25420   return 0;
25421 }
25422 _ACEOF
25423 rm -f conftest.$ac_objext
25424 if { (ac_try="$ac_compile"
25425 case "(($ac_try" in
25426   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25427   *) ac_try_echo=$ac_try;;
25428 esac
25429 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25430   (eval "$ac_compile") 2>conftest.er1
25431   ac_status=$?
25432   grep -v '^ *+' conftest.er1 >conftest.err
25433   rm -f conftest.er1
25434   cat conftest.err >&5
25435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25436   (exit $ac_status); } && {
25437          test -z "$ac_c_werror_flag" ||
25438          test ! -s conftest.err
25439        } && test -s conftest.$ac_objext; then
25440   ac_cv_sys_large_files=no; break
25441 else
25442   echo "$as_me: failed program was:" >&5
25443 sed 's/^/| /' conftest.$ac_ext >&5
25444
25445
25446 fi
25447
25448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25449   cat >conftest.$ac_ext <<_ACEOF
25450 /* confdefs.h.  */
25451 _ACEOF
25452 cat confdefs.h >>conftest.$ac_ext
25453 cat >>conftest.$ac_ext <<_ACEOF
25454 /* end confdefs.h.  */
25455 #define _LARGE_FILES 1
25456 #include <sys/types.h>
25457  /* Check that off_t can represent 2**63 - 1 correctly.
25458     We can't simply define LARGE_OFF_T to be 9223372036854775807,
25459     since some C++ compilers masquerading as C compilers
25460     incorrectly reject 9223372036854775807.  */
25461 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
25462   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
25463                        && LARGE_OFF_T % 2147483647 == 1)
25464                       ? 1 : -1];
25465 int
25466 main ()
25467 {
25468
25469   ;
25470   return 0;
25471 }
25472 _ACEOF
25473 rm -f conftest.$ac_objext
25474 if { (ac_try="$ac_compile"
25475 case "(($ac_try" in
25476   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25477   *) ac_try_echo=$ac_try;;
25478 esac
25479 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25480   (eval "$ac_compile") 2>conftest.er1
25481   ac_status=$?
25482   grep -v '^ *+' conftest.er1 >conftest.err
25483   rm -f conftest.er1
25484   cat conftest.err >&5
25485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25486   (exit $ac_status); } && {
25487          test -z "$ac_c_werror_flag" ||
25488          test ! -s conftest.err
25489        } && test -s conftest.$ac_objext; then
25490   ac_cv_sys_large_files=1; break
25491 else
25492   echo "$as_me: failed program was:" >&5
25493 sed 's/^/| /' conftest.$ac_ext >&5
25494
25495
25496 fi
25497
25498 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25499   ac_cv_sys_large_files=unknown
25500   break
25501 done
25502 fi
25503 { echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
25504 echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
25505 case $ac_cv_sys_large_files in #(
25506   no | unknown) ;;
25507   *)
25508 cat >>confdefs.h <<_ACEOF
25509 #define _LARGE_FILES $ac_cv_sys_large_files
25510 _ACEOF
25511 ;;
25512 esac
25513 rm -f conftest*
25514   fi
25515 fi
25516
25517 fi
25518
25519 # Check for largefile support (must be after AC_SYS_LARGEFILE)
25520 { echo "$as_me:$LINENO: checking for off_t" >&5
25521 echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
25522 if test "${ac_cv_type_off_t+set}" = set; then
25523   echo $ECHO_N "(cached) $ECHO_C" >&6
25524 else
25525   cat >conftest.$ac_ext <<_ACEOF
25526 /* confdefs.h.  */
25527 _ACEOF
25528 cat confdefs.h >>conftest.$ac_ext
25529 cat >>conftest.$ac_ext <<_ACEOF
25530 /* end confdefs.h.  */
25531 $ac_includes_default
25532 typedef off_t ac__type_new_;
25533 int
25534 main ()
25535 {
25536 if ((ac__type_new_ *) 0)
25537   return 0;
25538 if (sizeof (ac__type_new_))
25539   return 0;
25540   ;
25541   return 0;
25542 }
25543 _ACEOF
25544 rm -f conftest.$ac_objext
25545 if { (ac_try="$ac_compile"
25546 case "(($ac_try" in
25547   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25548   *) ac_try_echo=$ac_try;;
25549 esac
25550 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25551   (eval "$ac_compile") 2>conftest.er1
25552   ac_status=$?
25553   grep -v '^ *+' conftest.er1 >conftest.err
25554   rm -f conftest.er1
25555   cat conftest.err >&5
25556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25557   (exit $ac_status); } && {
25558          test -z "$ac_c_werror_flag" ||
25559          test ! -s conftest.err
25560        } && test -s conftest.$ac_objext; then
25561   ac_cv_type_off_t=yes
25562 else
25563   echo "$as_me: failed program was:" >&5
25564 sed 's/^/| /' conftest.$ac_ext >&5
25565
25566         ac_cv_type_off_t=no
25567 fi
25568
25569 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25570 fi
25571 { echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
25572 echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
25573
25574 # The cast to long int works around a bug in the HP C Compiler
25575 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
25576 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
25577 # This bug is HP SR number 8606223364.
25578 { echo "$as_me:$LINENO: checking size of off_t" >&5
25579 echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
25580 if test "${ac_cv_sizeof_off_t+set}" = set; then
25581   echo $ECHO_N "(cached) $ECHO_C" >&6
25582 else
25583   if test "$cross_compiling" = yes; then
25584   # Depending upon the size, compute the lo and hi bounds.
25585 cat >conftest.$ac_ext <<_ACEOF
25586 /* confdefs.h.  */
25587 _ACEOF
25588 cat confdefs.h >>conftest.$ac_ext
25589 cat >>conftest.$ac_ext <<_ACEOF
25590 /* end confdefs.h.  */
25591 $ac_includes_default
25592    typedef off_t ac__type_sizeof_;
25593 int
25594 main ()
25595 {
25596 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
25597 test_array [0] = 0
25598
25599   ;
25600   return 0;
25601 }
25602 _ACEOF
25603 rm -f conftest.$ac_objext
25604 if { (ac_try="$ac_compile"
25605 case "(($ac_try" in
25606   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25607   *) ac_try_echo=$ac_try;;
25608 esac
25609 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25610   (eval "$ac_compile") 2>conftest.er1
25611   ac_status=$?
25612   grep -v '^ *+' conftest.er1 >conftest.err
25613   rm -f conftest.er1
25614   cat conftest.err >&5
25615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25616   (exit $ac_status); } && {
25617          test -z "$ac_c_werror_flag" ||
25618          test ! -s conftest.err
25619        } && test -s conftest.$ac_objext; then
25620   ac_lo=0 ac_mid=0
25621   while :; do
25622     cat >conftest.$ac_ext <<_ACEOF
25623 /* confdefs.h.  */
25624 _ACEOF
25625 cat confdefs.h >>conftest.$ac_ext
25626 cat >>conftest.$ac_ext <<_ACEOF
25627 /* end confdefs.h.  */
25628 $ac_includes_default
25629    typedef off_t ac__type_sizeof_;
25630 int
25631 main ()
25632 {
25633 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
25634 test_array [0] = 0
25635
25636   ;
25637   return 0;
25638 }
25639 _ACEOF
25640 rm -f conftest.$ac_objext
25641 if { (ac_try="$ac_compile"
25642 case "(($ac_try" in
25643   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25644   *) ac_try_echo=$ac_try;;
25645 esac
25646 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25647   (eval "$ac_compile") 2>conftest.er1
25648   ac_status=$?
25649   grep -v '^ *+' conftest.er1 >conftest.err
25650   rm -f conftest.er1
25651   cat conftest.err >&5
25652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25653   (exit $ac_status); } && {
25654          test -z "$ac_c_werror_flag" ||
25655          test ! -s conftest.err
25656        } && test -s conftest.$ac_objext; then
25657   ac_hi=$ac_mid; break
25658 else
25659   echo "$as_me: failed program was:" >&5
25660 sed 's/^/| /' conftest.$ac_ext >&5
25661
25662         ac_lo=`expr $ac_mid + 1`
25663                         if test $ac_lo -le $ac_mid; then
25664                           ac_lo= ac_hi=
25665                           break
25666                         fi
25667                         ac_mid=`expr 2 '*' $ac_mid + 1`
25668 fi
25669
25670 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25671   done
25672 else
25673   echo "$as_me: failed program was:" >&5
25674 sed 's/^/| /' conftest.$ac_ext >&5
25675
25676         cat >conftest.$ac_ext <<_ACEOF
25677 /* confdefs.h.  */
25678 _ACEOF
25679 cat confdefs.h >>conftest.$ac_ext
25680 cat >>conftest.$ac_ext <<_ACEOF
25681 /* end confdefs.h.  */
25682 $ac_includes_default
25683    typedef off_t ac__type_sizeof_;
25684 int
25685 main ()
25686 {
25687 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
25688 test_array [0] = 0
25689
25690   ;
25691   return 0;
25692 }
25693 _ACEOF
25694 rm -f conftest.$ac_objext
25695 if { (ac_try="$ac_compile"
25696 case "(($ac_try" in
25697   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25698   *) ac_try_echo=$ac_try;;
25699 esac
25700 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25701   (eval "$ac_compile") 2>conftest.er1
25702   ac_status=$?
25703   grep -v '^ *+' conftest.er1 >conftest.err
25704   rm -f conftest.er1
25705   cat conftest.err >&5
25706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25707   (exit $ac_status); } && {
25708          test -z "$ac_c_werror_flag" ||
25709          test ! -s conftest.err
25710        } && test -s conftest.$ac_objext; then
25711   ac_hi=-1 ac_mid=-1
25712   while :; do
25713     cat >conftest.$ac_ext <<_ACEOF
25714 /* confdefs.h.  */
25715 _ACEOF
25716 cat confdefs.h >>conftest.$ac_ext
25717 cat >>conftest.$ac_ext <<_ACEOF
25718 /* end confdefs.h.  */
25719 $ac_includes_default
25720    typedef off_t ac__type_sizeof_;
25721 int
25722 main ()
25723 {
25724 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
25725 test_array [0] = 0
25726
25727   ;
25728   return 0;
25729 }
25730 _ACEOF
25731 rm -f conftest.$ac_objext
25732 if { (ac_try="$ac_compile"
25733 case "(($ac_try" in
25734   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25735   *) ac_try_echo=$ac_try;;
25736 esac
25737 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25738   (eval "$ac_compile") 2>conftest.er1
25739   ac_status=$?
25740   grep -v '^ *+' conftest.er1 >conftest.err
25741   rm -f conftest.er1
25742   cat conftest.err >&5
25743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25744   (exit $ac_status); } && {
25745          test -z "$ac_c_werror_flag" ||
25746          test ! -s conftest.err
25747        } && test -s conftest.$ac_objext; then
25748   ac_lo=$ac_mid; break
25749 else
25750   echo "$as_me: failed program was:" >&5
25751 sed 's/^/| /' conftest.$ac_ext >&5
25752
25753         ac_hi=`expr '(' $ac_mid ')' - 1`
25754                         if test $ac_mid -le $ac_hi; then
25755                           ac_lo= ac_hi=
25756                           break
25757                         fi
25758                         ac_mid=`expr 2 '*' $ac_mid`
25759 fi
25760
25761 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25762   done
25763 else
25764   echo "$as_me: failed program was:" >&5
25765 sed 's/^/| /' conftest.$ac_ext >&5
25766
25767         ac_lo= ac_hi=
25768 fi
25769
25770 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25771 fi
25772
25773 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25774 # Binary search between lo and hi bounds.
25775 while test "x$ac_lo" != "x$ac_hi"; do
25776   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25777   cat >conftest.$ac_ext <<_ACEOF
25778 /* confdefs.h.  */
25779 _ACEOF
25780 cat confdefs.h >>conftest.$ac_ext
25781 cat >>conftest.$ac_ext <<_ACEOF
25782 /* end confdefs.h.  */
25783 $ac_includes_default
25784    typedef off_t ac__type_sizeof_;
25785 int
25786 main ()
25787 {
25788 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
25789 test_array [0] = 0
25790
25791   ;
25792   return 0;
25793 }
25794 _ACEOF
25795 rm -f conftest.$ac_objext
25796 if { (ac_try="$ac_compile"
25797 case "(($ac_try" in
25798   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25799   *) ac_try_echo=$ac_try;;
25800 esac
25801 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25802   (eval "$ac_compile") 2>conftest.er1
25803   ac_status=$?
25804   grep -v '^ *+' conftest.er1 >conftest.err
25805   rm -f conftest.er1
25806   cat conftest.err >&5
25807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25808   (exit $ac_status); } && {
25809          test -z "$ac_c_werror_flag" ||
25810          test ! -s conftest.err
25811        } && test -s conftest.$ac_objext; then
25812   ac_hi=$ac_mid
25813 else
25814   echo "$as_me: failed program was:" >&5
25815 sed 's/^/| /' conftest.$ac_ext >&5
25816
25817         ac_lo=`expr '(' $ac_mid ')' + 1`
25818 fi
25819
25820 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25821 done
25822 case $ac_lo in
25823 ?*) ac_cv_sizeof_off_t=$ac_lo;;
25824 '') if test "$ac_cv_type_off_t" = yes; then
25825      { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
25826 See \`config.log' for more details." >&5
25827 echo "$as_me: error: cannot compute sizeof (off_t)
25828 See \`config.log' for more details." >&2;}
25829    { (exit 77); exit 77; }; }
25830    else
25831      ac_cv_sizeof_off_t=0
25832    fi ;;
25833 esac
25834 else
25835   cat >conftest.$ac_ext <<_ACEOF
25836 /* confdefs.h.  */
25837 _ACEOF
25838 cat confdefs.h >>conftest.$ac_ext
25839 cat >>conftest.$ac_ext <<_ACEOF
25840 /* end confdefs.h.  */
25841 $ac_includes_default
25842    typedef off_t ac__type_sizeof_;
25843 static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
25844 static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
25845 #include <stdio.h>
25846 #include <stdlib.h>
25847 int
25848 main ()
25849 {
25850
25851   FILE *f = fopen ("conftest.val", "w");
25852   if (! f)
25853     return 1;
25854   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
25855     {
25856       long int i = longval ();
25857       if (i != ((long int) (sizeof (ac__type_sizeof_))))
25858         return 1;
25859       fprintf (f, "%ld\n", i);
25860     }
25861   else
25862     {
25863       unsigned long int i = ulongval ();
25864       if (i != ((long int) (sizeof (ac__type_sizeof_))))
25865         return 1;
25866       fprintf (f, "%lu\n", i);
25867     }
25868   return ferror (f) || fclose (f) != 0;
25869
25870   ;
25871   return 0;
25872 }
25873 _ACEOF
25874 rm -f conftest$ac_exeext
25875 if { (ac_try="$ac_link"
25876 case "(($ac_try" in
25877   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25878   *) ac_try_echo=$ac_try;;
25879 esac
25880 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25881   (eval "$ac_link") 2>&5
25882   ac_status=$?
25883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25884   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25885   { (case "(($ac_try" in
25886   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25887   *) ac_try_echo=$ac_try;;
25888 esac
25889 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25890   (eval "$ac_try") 2>&5
25891   ac_status=$?
25892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25893   (exit $ac_status); }; }; then
25894   ac_cv_sizeof_off_t=`cat conftest.val`
25895 else
25896   echo "$as_me: program exited with status $ac_status" >&5
25897 echo "$as_me: failed program was:" >&5
25898 sed 's/^/| /' conftest.$ac_ext >&5
25899
25900 ( exit $ac_status )
25901 if test "$ac_cv_type_off_t" = yes; then
25902      { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
25903 See \`config.log' for more details." >&5
25904 echo "$as_me: error: cannot compute sizeof (off_t)
25905 See \`config.log' for more details." >&2;}
25906    { (exit 77); exit 77; }; }
25907    else
25908      ac_cv_sizeof_off_t=0
25909    fi
25910 fi
25911 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25912 fi
25913 rm -f conftest.val
25914 fi
25915 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
25916 echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
25917
25918
25919
25920 cat >>confdefs.h <<_ACEOF
25921 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
25922 _ACEOF
25923
25924
25925
25926 # If we don't have largefile support, can't handle segsize >= 2GB.
25927 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
25928    { { echo "$as_me:$LINENO: error: Large file support is not enabled. Segment size cannot be larger than 1GB." >&5
25929 echo "$as_me: error: Large file support is not enabled. Segment size cannot be larger than 1GB." >&2;}
25930    { (exit 1); exit 1; }; }
25931 fi
25932
25933 # SunOS doesn't handle negative byte comparisons properly with +/- return
25934 { echo "$as_me:$LINENO: checking for working memcmp" >&5
25935 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; }
25936 if test "${ac_cv_func_memcmp_working+set}" = set; then
25937   echo $ECHO_N "(cached) $ECHO_C" >&6
25938 else
25939   if test "$cross_compiling" = yes; then
25940   ac_cv_func_memcmp_working=no
25941 else
25942   cat >conftest.$ac_ext <<_ACEOF
25943 /* confdefs.h.  */
25944 _ACEOF
25945 cat confdefs.h >>conftest.$ac_ext
25946 cat >>conftest.$ac_ext <<_ACEOF
25947 /* end confdefs.h.  */
25948 $ac_includes_default
25949 int
25950 main ()
25951 {
25952
25953   /* Some versions of memcmp are not 8-bit clean.  */
25954   char c0 = '\100', c1 = '\200', c2 = '\201';
25955   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
25956     return 1;
25957
25958   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
25959      or more and with at least one buffer not starting on a 4-byte boundary.
25960      William Lewis provided this test program.   */
25961   {
25962     char foo[21];
25963     char bar[21];
25964     int i;
25965     for (i = 0; i < 4; i++)
25966       {
25967         char *a = foo + i;
25968         char *b = bar + i;
25969         strcpy (a, "--------01111111");
25970         strcpy (b, "--------10000000");
25971         if (memcmp (a, b, 16) >= 0)
25972           return 1;
25973       }
25974     return 0;
25975   }
25976
25977   ;
25978   return 0;
25979 }
25980 _ACEOF
25981 rm -f conftest$ac_exeext
25982 if { (ac_try="$ac_link"
25983 case "(($ac_try" in
25984   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25985   *) ac_try_echo=$ac_try;;
25986 esac
25987 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25988   (eval "$ac_link") 2>&5
25989   ac_status=$?
25990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25991   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25992   { (case "(($ac_try" in
25993   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25994   *) ac_try_echo=$ac_try;;
25995 esac
25996 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25997   (eval "$ac_try") 2>&5
25998   ac_status=$?
25999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26000   (exit $ac_status); }; }; then
26001   ac_cv_func_memcmp_working=yes
26002 else
26003   echo "$as_me: program exited with status $ac_status" >&5
26004 echo "$as_me: failed program was:" >&5
26005 sed 's/^/| /' conftest.$ac_ext >&5
26006
26007 ( exit $ac_status )
26008 ac_cv_func_memcmp_working=no
26009 fi
26010 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26011 fi
26012
26013
26014 fi
26015 { echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
26016 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; }
26017 test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
26018   *" memcmp.$ac_objext "* ) ;;
26019   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
26020  ;;
26021 esac
26022
26023
26024
26025
26026 # Select semaphore implementation type.
26027 if test "$PORTNAME" != "win32"; then
26028   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
26029
26030 cat >>confdefs.h <<\_ACEOF
26031 #define USE_NAMED_POSIX_SEMAPHORES 1
26032 _ACEOF
26033
26034     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
26035   else
26036     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
26037
26038 cat >>confdefs.h <<\_ACEOF
26039 #define USE_UNNAMED_POSIX_SEMAPHORES 1
26040 _ACEOF
26041
26042       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
26043     else
26044
26045 cat >>confdefs.h <<\_ACEOF
26046 #define USE_SYSV_SEMAPHORES 1
26047 _ACEOF
26048
26049       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
26050     fi
26051   fi
26052 else
26053
26054 cat >>confdefs.h <<\_ACEOF
26055 #define USE_WIN32_SEMAPHORES 1
26056 _ACEOF
26057
26058   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
26059 fi
26060
26061
26062 # Select shared-memory implementation type.
26063 if test "$PORTNAME" != "win32"; then
26064
26065 cat >>confdefs.h <<\_ACEOF
26066 #define USE_SYSV_SHARED_MEMORY 1
26067 _ACEOF
26068
26069   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
26070 else
26071
26072 cat >>confdefs.h <<\_ACEOF
26073 #define USE_WIN32_SHARED_MEMORY 1
26074 _ACEOF
26075
26076   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
26077 fi
26078
26079 # If not set in template file, set bytes to use libc memset()
26080 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
26081   MEMSET_LOOP_LIMIT=1024
26082 fi
26083
26084 cat >>confdefs.h <<_ACEOF
26085 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
26086 _ACEOF
26087
26088
26089
26090 if test "$enable_nls" = yes ; then
26091
26092   { echo "$as_me:$LINENO: checking for library containing bind_textdomain_codeset" >&5
26093 echo $ECHO_N "checking for library containing bind_textdomain_codeset... $ECHO_C" >&6; }
26094 if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then
26095   echo $ECHO_N "(cached) $ECHO_C" >&6
26096 else
26097   ac_func_search_save_LIBS=$LIBS
26098 cat >conftest.$ac_ext <<_ACEOF
26099 /* confdefs.h.  */
26100 _ACEOF
26101 cat confdefs.h >>conftest.$ac_ext
26102 cat >>conftest.$ac_ext <<_ACEOF
26103 /* end confdefs.h.  */
26104
26105 /* Override any GCC internal prototype to avoid an error.
26106    Use char because int might match the return type of a GCC
26107    builtin and then its argument prototype would still apply.  */
26108 #ifdef __cplusplus
26109 extern "C"
26110 #endif
26111 char bind_textdomain_codeset ();
26112 int
26113 main ()
26114 {
26115 return bind_textdomain_codeset ();
26116   ;
26117   return 0;
26118 }
26119 _ACEOF
26120 for ac_lib in '' intl; do
26121   if test -z "$ac_lib"; then
26122     ac_res="none required"
26123   else
26124     ac_res=-l$ac_lib
26125     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
26126   fi
26127   rm -f conftest.$ac_objext conftest$ac_exeext
26128 if { (ac_try="$ac_link"
26129 case "(($ac_try" in
26130   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26131   *) ac_try_echo=$ac_try;;
26132 esac
26133 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26134   (eval "$ac_link") 2>conftest.er1
26135   ac_status=$?
26136   grep -v '^ *+' conftest.er1 >conftest.err
26137   rm -f conftest.er1
26138   cat conftest.err >&5
26139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26140   (exit $ac_status); } && {
26141          test -z "$ac_c_werror_flag" ||
26142          test ! -s conftest.err
26143        } && test -s conftest$ac_exeext &&
26144        $as_test_x conftest$ac_exeext; then
26145   ac_cv_search_bind_textdomain_codeset=$ac_res
26146 else
26147   echo "$as_me: failed program was:" >&5
26148 sed 's/^/| /' conftest.$ac_ext >&5
26149
26150
26151 fi
26152
26153 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26154       conftest$ac_exeext
26155   if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then
26156   break
26157 fi
26158 done
26159 if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then
26160   :
26161 else
26162   ac_cv_search_bind_textdomain_codeset=no
26163 fi
26164 rm conftest.$ac_ext
26165 LIBS=$ac_func_search_save_LIBS
26166 fi
26167 { echo "$as_me:$LINENO: result: $ac_cv_search_bind_textdomain_codeset" >&5
26168 echo "${ECHO_T}$ac_cv_search_bind_textdomain_codeset" >&6; }
26169 ac_res=$ac_cv_search_bind_textdomain_codeset
26170 if test "$ac_res" != no; then
26171   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26172
26173 else
26174   { { echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
26175 echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
26176    { (exit 1); exit 1; }; }
26177 fi
26178
26179   if test "${ac_cv_header_libintl_h+set}" = set; then
26180   { echo "$as_me:$LINENO: checking for libintl.h" >&5
26181 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
26182 if test "${ac_cv_header_libintl_h+set}" = set; then
26183   echo $ECHO_N "(cached) $ECHO_C" >&6
26184 fi
26185 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
26186 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
26187 else
26188   # Is the header compilable?
26189 { echo "$as_me:$LINENO: checking libintl.h usability" >&5
26190 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6; }
26191 cat >conftest.$ac_ext <<_ACEOF
26192 /* confdefs.h.  */
26193 _ACEOF
26194 cat confdefs.h >>conftest.$ac_ext
26195 cat >>conftest.$ac_ext <<_ACEOF
26196 /* end confdefs.h.  */
26197 $ac_includes_default
26198 #include <libintl.h>
26199 _ACEOF
26200 rm -f conftest.$ac_objext
26201 if { (ac_try="$ac_compile"
26202 case "(($ac_try" in
26203   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26204   *) ac_try_echo=$ac_try;;
26205 esac
26206 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26207   (eval "$ac_compile") 2>conftest.er1
26208   ac_status=$?
26209   grep -v '^ *+' conftest.er1 >conftest.err
26210   rm -f conftest.er1
26211   cat conftest.err >&5
26212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26213   (exit $ac_status); } && {
26214          test -z "$ac_c_werror_flag" ||
26215          test ! -s conftest.err
26216        } && test -s conftest.$ac_objext; then
26217   ac_header_compiler=yes
26218 else
26219   echo "$as_me: failed program was:" >&5
26220 sed 's/^/| /' conftest.$ac_ext >&5
26221
26222         ac_header_compiler=no
26223 fi
26224
26225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26226 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26227 echo "${ECHO_T}$ac_header_compiler" >&6; }
26228
26229 # Is the header present?
26230 { echo "$as_me:$LINENO: checking libintl.h presence" >&5
26231 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6; }
26232 cat >conftest.$ac_ext <<_ACEOF
26233 /* confdefs.h.  */
26234 _ACEOF
26235 cat confdefs.h >>conftest.$ac_ext
26236 cat >>conftest.$ac_ext <<_ACEOF
26237 /* end confdefs.h.  */
26238 #include <libintl.h>
26239 _ACEOF
26240 if { (ac_try="$ac_cpp conftest.$ac_ext"
26241 case "(($ac_try" in
26242   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26243   *) ac_try_echo=$ac_try;;
26244 esac
26245 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26246   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
26247   ac_status=$?
26248   grep -v '^ *+' conftest.er1 >conftest.err
26249   rm -f conftest.er1
26250   cat conftest.err >&5
26251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26252   (exit $ac_status); } >/dev/null && {
26253          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26254          test ! -s conftest.err
26255        }; then
26256   ac_header_preproc=yes
26257 else
26258   echo "$as_me: failed program was:" >&5
26259 sed 's/^/| /' conftest.$ac_ext >&5
26260
26261   ac_header_preproc=no
26262 fi
26263
26264 rm -f conftest.err conftest.$ac_ext
26265 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26266 echo "${ECHO_T}$ac_header_preproc" >&6; }
26267
26268 # So?  What about this header?
26269 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26270   yes:no: )
26271     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
26272 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
26273     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
26274 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
26275     ac_header_preproc=yes
26276     ;;
26277   no:yes:* )
26278     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
26279 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
26280     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
26281 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
26282     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
26283 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
26284     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
26285 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
26286     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
26287 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
26288     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
26289 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
26290     ( cat <<\_ASBOX
26291 ## ---------------------------------------- ##
26292 ## Report this to pgsql-bugs@postgresql.org ##
26293 ## ---------------------------------------- ##
26294 _ASBOX
26295      ) | sed "s/^/$as_me: WARNING:     /" >&2
26296     ;;
26297 esac
26298 { echo "$as_me:$LINENO: checking for libintl.h" >&5
26299 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
26300 if test "${ac_cv_header_libintl_h+set}" = set; then
26301   echo $ECHO_N "(cached) $ECHO_C" >&6
26302 else
26303   ac_cv_header_libintl_h=$ac_header_preproc
26304 fi
26305 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
26306 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
26307
26308 fi
26309 if test $ac_cv_header_libintl_h = yes; then
26310   :
26311 else
26312   { { echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
26313 echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
26314    { (exit 1); exit 1; }; }
26315 fi
26316
26317
26318   for ac_prog in msgfmt
26319 do
26320   # Extract the first word of "$ac_prog", so it can be a program name with args.
26321 set dummy $ac_prog; ac_word=$2
26322 { echo "$as_me:$LINENO: checking for $ac_word" >&5
26323 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
26324 if test "${ac_cv_prog_MSGFMT+set}" = set; then
26325   echo $ECHO_N "(cached) $ECHO_C" >&6
26326 else
26327   if test -n "$MSGFMT"; then
26328   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
26329 else
26330 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26331 for as_dir in $PATH
26332 do
26333   IFS=$as_save_IFS
26334   test -z "$as_dir" && as_dir=.
26335   for ac_exec_ext in '' $ac_executable_extensions; do
26336   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26337     ac_cv_prog_MSGFMT="$ac_prog"
26338     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26339     break 2
26340   fi
26341 done
26342 done
26343 IFS=$as_save_IFS
26344
26345 fi
26346 fi
26347 MSGFMT=$ac_cv_prog_MSGFMT
26348 if test -n "$MSGFMT"; then
26349   { echo "$as_me:$LINENO: result: $MSGFMT" >&5
26350 echo "${ECHO_T}$MSGFMT" >&6; }
26351 else
26352   { echo "$as_me:$LINENO: result: no" >&5
26353 echo "${ECHO_T}no" >&6; }
26354 fi
26355
26356
26357   test -n "$MSGFMT" && break
26358 done
26359
26360   if test -z "$MSGFMT"; then
26361     { { echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
26362 echo "$as_me: error: msgfmt is required for NLS" >&2;}
26363    { (exit 1); exit 1; }; }
26364   fi
26365   for ac_prog in msgmerge
26366 do
26367   # Extract the first word of "$ac_prog", so it can be a program name with args.
26368 set dummy $ac_prog; ac_word=$2
26369 { echo "$as_me:$LINENO: checking for $ac_word" >&5
26370 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
26371 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
26372   echo $ECHO_N "(cached) $ECHO_C" >&6
26373 else
26374   if test -n "$MSGMERGE"; then
26375   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
26376 else
26377 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26378 for as_dir in $PATH
26379 do
26380   IFS=$as_save_IFS
26381   test -z "$as_dir" && as_dir=.
26382   for ac_exec_ext in '' $ac_executable_extensions; do
26383   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26384     ac_cv_prog_MSGMERGE="$ac_prog"
26385     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26386     break 2
26387   fi
26388 done
26389 done
26390 IFS=$as_save_IFS
26391
26392 fi
26393 fi
26394 MSGMERGE=$ac_cv_prog_MSGMERGE
26395 if test -n "$MSGMERGE"; then
26396   { echo "$as_me:$LINENO: result: $MSGMERGE" >&5
26397 echo "${ECHO_T}$MSGMERGE" >&6; }
26398 else
26399   { echo "$as_me:$LINENO: result: no" >&5
26400 echo "${ECHO_T}no" >&6; }
26401 fi
26402
26403
26404   test -n "$MSGMERGE" && break
26405 done
26406
26407   for ac_prog in xgettext
26408 do
26409   # Extract the first word of "$ac_prog", so it can be a program name with args.
26410 set dummy $ac_prog; ac_word=$2
26411 { echo "$as_me:$LINENO: checking for $ac_word" >&5
26412 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
26413 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
26414   echo $ECHO_N "(cached) $ECHO_C" >&6
26415 else
26416   if test -n "$XGETTEXT"; then
26417   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
26418 else
26419 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26420 for as_dir in $PATH
26421 do
26422   IFS=$as_save_IFS
26423   test -z "$as_dir" && as_dir=.
26424   for ac_exec_ext in '' $ac_executable_extensions; do
26425   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26426     ac_cv_prog_XGETTEXT="$ac_prog"
26427     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26428     break 2
26429   fi
26430 done
26431 done
26432 IFS=$as_save_IFS
26433
26434 fi
26435 fi
26436 XGETTEXT=$ac_cv_prog_XGETTEXT
26437 if test -n "$XGETTEXT"; then
26438   { echo "$as_me:$LINENO: result: $XGETTEXT" >&5
26439 echo "${ECHO_T}$XGETTEXT" >&6; }
26440 else
26441   { echo "$as_me:$LINENO: result: no" >&5
26442 echo "${ECHO_T}no" >&6; }
26443 fi
26444
26445
26446   test -n "$XGETTEXT" && break
26447 done
26448
26449
26450 fi
26451
26452 # Check for Tcl configuration script tclConfig.sh
26453 if test "$with_tcl" = yes; then
26454     for ac_prog in tclsh tcl tclsh8.5 tclsh85 tclsh8.4 tclsh84 tclsh8.3 tclsh83
26455 do
26456   # Extract the first word of "$ac_prog", so it can be a program name with args.
26457 set dummy $ac_prog; ac_word=$2
26458 { echo "$as_me:$LINENO: checking for $ac_word" >&5
26459 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
26460 if test "${ac_cv_path_TCLSH+set}" = set; then
26461   echo $ECHO_N "(cached) $ECHO_C" >&6
26462 else
26463   case $TCLSH in
26464   [\\/]* | ?:[\\/]*)
26465   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
26466   ;;
26467   *)
26468   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26469 for as_dir in $PATH
26470 do
26471   IFS=$as_save_IFS
26472   test -z "$as_dir" && as_dir=.
26473   for ac_exec_ext in '' $ac_executable_extensions; do
26474   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26475     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
26476     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26477     break 2
26478   fi
26479 done
26480 done
26481 IFS=$as_save_IFS
26482
26483   ;;
26484 esac
26485 fi
26486 TCLSH=$ac_cv_path_TCLSH
26487 if test -n "$TCLSH"; then
26488   { echo "$as_me:$LINENO: result: $TCLSH" >&5
26489 echo "${ECHO_T}$TCLSH" >&6; }
26490 else
26491   { echo "$as_me:$LINENO: result: no" >&5
26492 echo "${ECHO_T}no" >&6; }
26493 fi
26494
26495
26496   test -n "$TCLSH" && break
26497 done
26498
26499 if test x"$TCLSH" = x""; then
26500   { { echo "$as_me:$LINENO: error: Tcl shell not found" >&5
26501 echo "$as_me: error: Tcl shell not found" >&2;}
26502    { (exit 1); exit 1; }; }
26503 fi
26504
26505 { echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
26506 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6; }
26507 # Let user override test
26508 if test -z "$TCL_CONFIG_SH"; then
26509     pgac_test_dirs="$with_tclconfig"
26510
26511     set X $pgac_test_dirs; shift
26512     if test $# -eq 0; then
26513         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
26514 echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
26515    { (exit 1); exit 1; }; }
26516         set X `echo 'puts $auto_path' | $TCLSH`; shift
26517     fi
26518
26519     for pgac_dir do
26520         if test -r "$pgac_dir/tclConfig.sh"; then
26521             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
26522             break
26523         fi
26524     done
26525 fi
26526
26527 if test -z "$TCL_CONFIG_SH"; then
26528     { echo "$as_me:$LINENO: result: no" >&5
26529 echo "${ECHO_T}no" >&6; }
26530     { { echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
26531 echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
26532    { (exit 1); exit 1; }; }
26533 else
26534     { echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
26535 echo "${ECHO_T}$TCL_CONFIG_SH" >&6; }
26536 fi
26537
26538
26539
26540     . "$TCL_CONFIG_SH"
26541 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
26542 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
26543 eval TCL_LIBS=\"$TCL_LIBS\"
26544 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
26545 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
26546
26547         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
26548     ac_save_CPPFLAGS=$CPPFLAGS
26549     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
26550     if test "${ac_cv_header_tcl_h+set}" = set; then
26551   { echo "$as_me:$LINENO: checking for tcl.h" >&5
26552 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6; }
26553 if test "${ac_cv_header_tcl_h+set}" = set; then
26554   echo $ECHO_N "(cached) $ECHO_C" >&6
26555 fi
26556 { echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
26557 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6; }
26558 else
26559   # Is the header compilable?
26560 { echo "$as_me:$LINENO: checking tcl.h usability" >&5
26561 echo $ECHO_N "checking tcl.h usability... $ECHO_C" >&6; }
26562 cat >conftest.$ac_ext <<_ACEOF
26563 /* confdefs.h.  */
26564 _ACEOF
26565 cat confdefs.h >>conftest.$ac_ext
26566 cat >>conftest.$ac_ext <<_ACEOF
26567 /* end confdefs.h.  */
26568 $ac_includes_default
26569 #include <tcl.h>
26570 _ACEOF
26571 rm -f conftest.$ac_objext
26572 if { (ac_try="$ac_compile"
26573 case "(($ac_try" in
26574   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26575   *) ac_try_echo=$ac_try;;
26576 esac
26577 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26578   (eval "$ac_compile") 2>conftest.er1
26579   ac_status=$?
26580   grep -v '^ *+' conftest.er1 >conftest.err
26581   rm -f conftest.er1
26582   cat conftest.err >&5
26583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26584   (exit $ac_status); } && {
26585          test -z "$ac_c_werror_flag" ||
26586          test ! -s conftest.err
26587        } && test -s conftest.$ac_objext; then
26588   ac_header_compiler=yes
26589 else
26590   echo "$as_me: failed program was:" >&5
26591 sed 's/^/| /' conftest.$ac_ext >&5
26592
26593         ac_header_compiler=no
26594 fi
26595
26596 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26597 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26598 echo "${ECHO_T}$ac_header_compiler" >&6; }
26599
26600 # Is the header present?
26601 { echo "$as_me:$LINENO: checking tcl.h presence" >&5
26602 echo $ECHO_N "checking tcl.h presence... $ECHO_C" >&6; }
26603 cat >conftest.$ac_ext <<_ACEOF
26604 /* confdefs.h.  */
26605 _ACEOF
26606 cat confdefs.h >>conftest.$ac_ext
26607 cat >>conftest.$ac_ext <<_ACEOF
26608 /* end confdefs.h.  */
26609 #include <tcl.h>
26610 _ACEOF
26611 if { (ac_try="$ac_cpp conftest.$ac_ext"
26612 case "(($ac_try" in
26613   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26614   *) ac_try_echo=$ac_try;;
26615 esac
26616 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26617   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
26618   ac_status=$?
26619   grep -v '^ *+' conftest.er1 >conftest.err
26620   rm -f conftest.er1
26621   cat conftest.err >&5
26622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26623   (exit $ac_status); } >/dev/null && {
26624          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26625          test ! -s conftest.err
26626        }; then
26627   ac_header_preproc=yes
26628 else
26629   echo "$as_me: failed program was:" >&5
26630 sed 's/^/| /' conftest.$ac_ext >&5
26631
26632   ac_header_preproc=no
26633 fi
26634
26635 rm -f conftest.err conftest.$ac_ext
26636 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26637 echo "${ECHO_T}$ac_header_preproc" >&6; }
26638
26639 # So?  What about this header?
26640 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26641   yes:no: )
26642     { echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
26643 echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
26644     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
26645 echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
26646     ac_header_preproc=yes
26647     ;;
26648   no:yes:* )
26649     { echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
26650 echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
26651     { echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
26652 echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
26653     { echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
26654 echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
26655     { echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
26656 echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
26657     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
26658 echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
26659     { echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
26660 echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
26661     ( cat <<\_ASBOX
26662 ## ---------------------------------------- ##
26663 ## Report this to pgsql-bugs@postgresql.org ##
26664 ## ---------------------------------------- ##
26665 _ASBOX
26666      ) | sed "s/^/$as_me: WARNING:     /" >&2
26667     ;;
26668 esac
26669 { echo "$as_me:$LINENO: checking for tcl.h" >&5
26670 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6; }
26671 if test "${ac_cv_header_tcl_h+set}" = set; then
26672   echo $ECHO_N "(cached) $ECHO_C" >&6
26673 else
26674   ac_cv_header_tcl_h=$ac_header_preproc
26675 fi
26676 { echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
26677 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6; }
26678
26679 fi
26680 if test $ac_cv_header_tcl_h = yes; then
26681   :
26682 else
26683   { { echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
26684 echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
26685    { (exit 1); exit 1; }; }
26686 fi
26687
26688
26689     CPPFLAGS=$ac_save_CPPFLAGS
26690 fi
26691
26692 #
26693 # Check for DocBook and tools
26694 #
26695 for ac_prog in onsgmls nsgmls
26696 do
26697   # Extract the first word of "$ac_prog", so it can be a program name with args.
26698 set dummy $ac_prog; ac_word=$2
26699 { echo "$as_me:$LINENO: checking for $ac_word" >&5
26700 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
26701 if test "${ac_cv_prog_NSGMLS+set}" = set; then
26702   echo $ECHO_N "(cached) $ECHO_C" >&6
26703 else
26704   if test -n "$NSGMLS"; then
26705   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
26706 else
26707 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26708 for as_dir in $PATH
26709 do
26710   IFS=$as_save_IFS
26711   test -z "$as_dir" && as_dir=.
26712   for ac_exec_ext in '' $ac_executable_extensions; do
26713   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26714     ac_cv_prog_NSGMLS="$ac_prog"
26715     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26716     break 2
26717   fi
26718 done
26719 done
26720 IFS=$as_save_IFS
26721
26722 fi
26723 fi
26724 NSGMLS=$ac_cv_prog_NSGMLS
26725 if test -n "$NSGMLS"; then
26726   { echo "$as_me:$LINENO: result: $NSGMLS" >&5
26727 echo "${ECHO_T}$NSGMLS" >&6; }
26728 else
26729   { echo "$as_me:$LINENO: result: no" >&5
26730 echo "${ECHO_T}no" >&6; }
26731 fi
26732
26733
26734   test -n "$NSGMLS" && break
26735 done
26736
26737 for ac_prog in openjade jade
26738 do
26739   # Extract the first word of "$ac_prog", so it can be a program name with args.
26740 set dummy $ac_prog; ac_word=$2
26741 { echo "$as_me:$LINENO: checking for $ac_word" >&5
26742 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
26743 if test "${ac_cv_prog_JADE+set}" = set; then
26744   echo $ECHO_N "(cached) $ECHO_C" >&6
26745 else
26746   if test -n "$JADE"; then
26747   ac_cv_prog_JADE="$JADE" # Let the user override the test.
26748 else
26749 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26750 for as_dir in $PATH
26751 do
26752   IFS=$as_save_IFS
26753   test -z "$as_dir" && as_dir=.
26754   for ac_exec_ext in '' $ac_executable_extensions; do
26755   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26756     ac_cv_prog_JADE="$ac_prog"
26757     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26758     break 2
26759   fi
26760 done
26761 done
26762 IFS=$as_save_IFS
26763
26764 fi
26765 fi
26766 JADE=$ac_cv_prog_JADE
26767 if test -n "$JADE"; then
26768   { echo "$as_me:$LINENO: result: $JADE" >&5
26769 echo "${ECHO_T}$JADE" >&6; }
26770 else
26771   { echo "$as_me:$LINENO: result: no" >&5
26772 echo "${ECHO_T}no" >&6; }
26773 fi
26774
26775
26776   test -n "$JADE" && break
26777 done
26778
26779
26780 { echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
26781 echo $ECHO_N "checking for DocBook V4.2... $ECHO_C" >&6; }
26782 if test "${pgac_cv_check_docbook+set}" = set; then
26783   echo $ECHO_N "(cached) $ECHO_C" >&6
26784 else
26785   cat >conftest.sgml <<EOF
26786 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
26787 <book>
26788  <title>test</title>
26789  <chapter>
26790   <title>random</title>
26791    <sect1>
26792     <title>testsect</title>
26793     <para>text</para>
26794   </sect1>
26795  </chapter>
26796 </book>
26797 EOF
26798
26799 pgac_cv_check_docbook=no
26800
26801 if test -n "$NSGMLS"; then
26802   $NSGMLS -s conftest.sgml 1>&5 2>&1
26803   if test $? -eq 0; then
26804     pgac_cv_check_docbook=yes
26805   fi
26806 fi
26807 rm -f conftest.sgml
26808 fi
26809 { echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
26810 echo "${ECHO_T}$pgac_cv_check_docbook" >&6; }
26811
26812 have_docbook=$pgac_cv_check_docbook
26813
26814
26815 { echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
26816 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6; }
26817 if test "${pgac_cv_path_stylesheets+set}" = set; then
26818   echo $ECHO_N "(cached) $ECHO_C" >&6
26819 else
26820   if test -n "$DOCBOOKSTYLE"; then
26821   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
26822 else
26823   for pgac_prefix in /usr /usr/local /opt /sw; do
26824     for pgac_infix in share lib; do
26825       for pgac_postfix in \
26826         sgml/stylesheets/nwalsh-modular \
26827         sgml/stylesheets/docbook \
26828         sgml/stylesheets/dsssl/docbook \
26829         sgml/docbook-dsssl \
26830         sgml/docbook/dsssl/modular \
26831         sgml/docbook/stylesheet/dsssl/modular \
26832         sgml/docbook/dsssl-stylesheets \
26833         sgml/dsssl/docbook-dsssl-nwalsh
26834       do
26835         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
26836         if test -r "$pgac_candidate/html/docbook.dsl" \
26837            && test -r "$pgac_candidate/print/docbook.dsl"
26838         then
26839           pgac_cv_path_stylesheets=$pgac_candidate
26840           break 3
26841         fi
26842       done
26843     done
26844   done
26845 fi
26846 fi
26847
26848 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
26849
26850 if test -n "$DOCBOOKSTYLE"; then
26851   { echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
26852 echo "${ECHO_T}$DOCBOOKSTYLE" >&6; }
26853 else
26854   { echo "$as_me:$LINENO: result: no" >&5
26855 echo "${ECHO_T}no" >&6; }
26856 fi
26857 if test -n "$DOCBOOKSTYLE"; then
26858   for ac_prog in collateindex.pl
26859 do
26860   # Extract the first word of "$ac_prog", so it can be a program name with args.
26861 set dummy $ac_prog; ac_word=$2
26862 { echo "$as_me:$LINENO: checking for $ac_word" >&5
26863 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
26864 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
26865   echo $ECHO_N "(cached) $ECHO_C" >&6
26866 else
26867   case $COLLATEINDEX in
26868   [\\/]* | ?:[\\/]*)
26869   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
26870   ;;
26871   *)
26872   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26873 for as_dir in $DOCBOOKSTYLE/bin $PATH
26874 do
26875   IFS=$as_save_IFS
26876   test -z "$as_dir" && as_dir=.
26877   for ac_exec_ext in '' $ac_executable_extensions; do
26878   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26879     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
26880     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26881     break 2
26882   fi
26883 done
26884 done
26885 IFS=$as_save_IFS
26886
26887   ;;
26888 esac
26889 fi
26890 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
26891 if test -n "$COLLATEINDEX"; then
26892   { echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
26893 echo "${ECHO_T}$COLLATEINDEX" >&6; }
26894 else
26895   { echo "$as_me:$LINENO: result: no" >&5
26896 echo "${ECHO_T}no" >&6; }
26897 fi
26898
26899
26900   test -n "$COLLATEINDEX" && break
26901 done
26902
26903 else
26904   for ac_prog in collateindex.pl
26905 do
26906   # Extract the first word of "$ac_prog", so it can be a program name with args.
26907 set dummy $ac_prog; ac_word=$2
26908 { echo "$as_me:$LINENO: checking for $ac_word" >&5
26909 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
26910 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
26911   echo $ECHO_N "(cached) $ECHO_C" >&6
26912 else
26913   case $COLLATEINDEX in
26914   [\\/]* | ?:[\\/]*)
26915   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
26916   ;;
26917   *)
26918   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26919 for as_dir in $PATH
26920 do
26921   IFS=$as_save_IFS
26922   test -z "$as_dir" && as_dir=.
26923   for ac_exec_ext in '' $ac_executable_extensions; do
26924   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26925     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
26926     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26927     break 2
26928   fi
26929 done
26930 done
26931 IFS=$as_save_IFS
26932
26933   ;;
26934 esac
26935 fi
26936 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
26937 if test -n "$COLLATEINDEX"; then
26938   { echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
26939 echo "${ECHO_T}$COLLATEINDEX" >&6; }
26940 else
26941   { echo "$as_me:$LINENO: result: no" >&5
26942 echo "${ECHO_T}no" >&6; }
26943 fi
26944
26945
26946   test -n "$COLLATEINDEX" && break
26947 done
26948
26949 fi
26950 for ac_prog in sgmlspl
26951 do
26952   # Extract the first word of "$ac_prog", so it can be a program name with args.
26953 set dummy $ac_prog; ac_word=$2
26954 { echo "$as_me:$LINENO: checking for $ac_word" >&5
26955 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
26956 if test "${ac_cv_prog_SGMLSPL+set}" = set; then
26957   echo $ECHO_N "(cached) $ECHO_C" >&6
26958 else
26959   if test -n "$SGMLSPL"; then
26960   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
26961 else
26962 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26963 for as_dir in $PATH
26964 do
26965   IFS=$as_save_IFS
26966   test -z "$as_dir" && as_dir=.
26967   for ac_exec_ext in '' $ac_executable_extensions; do
26968   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26969     ac_cv_prog_SGMLSPL="$ac_prog"
26970     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26971     break 2
26972   fi
26973 done
26974 done
26975 IFS=$as_save_IFS
26976
26977 fi
26978 fi
26979 SGMLSPL=$ac_cv_prog_SGMLSPL
26980 if test -n "$SGMLSPL"; then
26981   { echo "$as_me:$LINENO: result: $SGMLSPL" >&5
26982 echo "${ECHO_T}$SGMLSPL" >&6; }
26983 else
26984   { echo "$as_me:$LINENO: result: no" >&5
26985 echo "${ECHO_T}no" >&6; }
26986 fi
26987
26988
26989   test -n "$SGMLSPL" && break
26990 done
26991
26992 { echo "$as_me:$LINENO: checking for docbook2man" >&5
26993 echo $ECHO_N "checking for docbook2man... $ECHO_C" >&6; }
26994 if test "${ac_cv_path_DOCBOOK2MAN+set}" = set; then
26995   echo $ECHO_N "(cached) $ECHO_C" >&6
26996 else
26997   if test -z "$DOCBOOK2MAN"; then
26998   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26999 for as_dir in $PATH
27000 do
27001   IFS=$as_save_IFS
27002   test -z "$as_dir" && as_dir=.
27003   for ac_prog in docbook2x-man db2x_docbook2man docbook2man; do
27004     ac_path="$as_dir/$ac_prog"
27005     { test -f "$ac_path" && $as_test_x "$ac_path"; } || continue
27006     if "$ac_path" --version 2>/dev/null | $GREP docbook2x >/dev/null 2>&1; then
27007       ac_cv_path_DOCBOOK2MAN=$ac_path
27008       break
27009     fi
27010   done
27011 done
27012 IFS=$as_save_IFS
27013
27014 else
27015   ac_cv_path_DOCBOOK2MAN=$DOCBOOK2MAN
27016 fi
27017 fi
27018 { echo "$as_me:$LINENO: result: $ac_cv_path_DOCBOOK2MAN" >&5
27019 echo "${ECHO_T}$ac_cv_path_DOCBOOK2MAN" >&6; }
27020 DOCBOOK2MAN=$ac_cv_path_DOCBOOK2MAN
27021
27022
27023
27024 # Thread testing
27025
27026 # We have to run the thread test near the end so we have all our symbols
27027 # defined.  Cross compiling throws a warning.
27028 #
27029 if test "$enable_thread_safety_force" = yes; then
27030 if test "$PORTNAME" != "win32"
27031 then
27032   { echo "$as_me:$LINENO: WARNING:
27033 *** Skipping thread test program.  --enable-thread-safety-force was used.
27034 *** Run the program in src/test/thread on the your machine and add proper
27035 *** locking function calls to your applications to guarantee thread safety.
27036 " >&5
27037 echo "$as_me: WARNING:
27038 *** Skipping thread test program.  --enable-thread-safety-force was used.
27039 *** Run the program in src/test/thread on the your machine and add proper
27040 *** locking function calls to your applications to guarantee thread safety.
27041 " >&2;}
27042 else
27043 { echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
27044 echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
27045 fi
27046 elif test "$enable_thread_safety" = yes; then
27047 if test "$PORTNAME" != "win32"
27048 then
27049 { echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
27050 echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6; }
27051
27052 _CFLAGS="$CFLAGS"
27053 _LIBS="$LIBS"
27054 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
27055 LIBS="$LIBS $PTHREAD_LIBS"
27056 if test "$cross_compiling" = yes; then
27057   { echo "$as_me:$LINENO: result: maybe" >&5
27058 echo "${ECHO_T}maybe" >&6; }
27059   { echo "$as_me:$LINENO: WARNING:
27060 *** Skipping thread test program because of cross-compile build.
27061 *** Run the program in src/test/thread on the target machine.
27062 " >&5
27063 echo "$as_me: WARNING:
27064 *** Skipping thread test program because of cross-compile build.
27065 *** Run the program in src/test/thread on the target machine.
27066 " >&2;}
27067 else
27068   cat >conftest.$ac_ext <<_ACEOF
27069 /* confdefs.h.  */
27070 _ACEOF
27071 cat confdefs.h >>conftest.$ac_ext
27072 cat >>conftest.$ac_ext <<_ACEOF
27073 /* end confdefs.h.  */
27074 #include "$srcdir/src/test/thread/thread_test.c"
27075 _ACEOF
27076 rm -f conftest$ac_exeext
27077 if { (ac_try="$ac_link"
27078 case "(($ac_try" in
27079   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27080   *) ac_try_echo=$ac_try;;
27081 esac
27082 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27083   (eval "$ac_link") 2>&5
27084   ac_status=$?
27085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27086   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27087   { (case "(($ac_try" in
27088   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27089   *) ac_try_echo=$ac_try;;
27090 esac
27091 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27092   (eval "$ac_try") 2>&5
27093   ac_status=$?
27094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27095   (exit $ac_status); }; }; then
27096   { echo "$as_me:$LINENO: result: yes" >&5
27097 echo "${ECHO_T}yes" >&6; }
27098 else
27099   echo "$as_me: program exited with status $ac_status" >&5
27100 echo "$as_me: failed program was:" >&5
27101 sed 's/^/| /' conftest.$ac_ext >&5
27102
27103 ( exit $ac_status )
27104 { echo "$as_me:$LINENO: result: no" >&5
27105 echo "${ECHO_T}no" >&6; }
27106   { { echo "$as_me:$LINENO: error: thread test program failed
27107 This platform is not thread-safe.  Check the file 'config.log' for the
27108 exact reason.
27109
27110 You can use the configure option --enable-thread-safety-force to force
27111 threads to be enabled.  But you must then run the program in
27112 src/test/thread and add locking function calls to your applications to
27113 guarantee thread safety." >&5
27114 echo "$as_me: error: thread test program failed
27115 This platform is not thread-safe.  Check the file 'config.log' for the
27116 exact reason.
27117
27118 You can use the configure option --enable-thread-safety-force to force
27119 threads to be enabled.  But you must then run the program in
27120 src/test/thread and add locking function calls to your applications to
27121 guarantee thread safety." >&2;}
27122    { (exit 1); exit 1; }; }
27123 fi
27124 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27125 fi
27126
27127
27128 CFLAGS="$_CFLAGS"
27129 LIBS="$_LIBS"
27130 else
27131 { echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
27132 echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
27133 fi
27134 fi
27135
27136 # If compiler will take -Wl,--as-needed (or various platform-specific
27137 # spellings thereof) then add that to LDFLAGS.  This is much easier than
27138 # trying to filter LIBS to the minimum for each executable.
27139 # (Note that shared library links won't use this switch, though.)
27140 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
27141 # libreadline; therefore we postpone testing it until we know what library
27142 # dependencies readline has.  The test code will try to link with $LIBS.
27143 if test "$with_readline" = yes; then
27144   link_test_func=readline
27145 else
27146   link_test_func=exit
27147 fi
27148
27149 if test "$PORTNAME" = "darwin"; then
27150   { echo "$as_me:$LINENO: checking if $CC supports -Wl,-dead_strip_dylibs" >&5
27151 echo $ECHO_N "checking if $CC supports -Wl,-dead_strip_dylibs... $ECHO_C" >&6; }
27152 pgac_save_LDFLAGS=$LDFLAGS
27153 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
27154 if test "$cross_compiling" = yes; then
27155   LDFLAGS="$pgac_save_LDFLAGS"
27156                { echo "$as_me:$LINENO: result: assuming no" >&5
27157 echo "${ECHO_T}assuming no" >&6; }
27158 else
27159   cat >conftest.$ac_ext <<_ACEOF
27160 /* confdefs.h.  */
27161 _ACEOF
27162 cat confdefs.h >>conftest.$ac_ext
27163 cat >>conftest.$ac_ext <<_ACEOF
27164 /* end confdefs.h.  */
27165 extern void $link_test_func (); void (*fptr) () = $link_test_func;
27166 int
27167 main ()
27168 {
27169
27170   ;
27171   return 0;
27172 }
27173 _ACEOF
27174 rm -f conftest$ac_exeext
27175 if { (ac_try="$ac_link"
27176 case "(($ac_try" in
27177   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27178   *) ac_try_echo=$ac_try;;
27179 esac
27180 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27181   (eval "$ac_link") 2>&5
27182   ac_status=$?
27183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27184   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27185   { (case "(($ac_try" in
27186   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27187   *) ac_try_echo=$ac_try;;
27188 esac
27189 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27190   (eval "$ac_try") 2>&5
27191   ac_status=$?
27192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27193   (exit $ac_status); }; }; then
27194   { echo "$as_me:$LINENO: result: yes" >&5
27195 echo "${ECHO_T}yes" >&6; }
27196 else
27197   echo "$as_me: program exited with status $ac_status" >&5
27198 echo "$as_me: failed program was:" >&5
27199 sed 's/^/| /' conftest.$ac_ext >&5
27200
27201 ( exit $ac_status )
27202 LDFLAGS="$pgac_save_LDFLAGS"
27203                { echo "$as_me:$LINENO: result: no" >&5
27204 echo "${ECHO_T}no" >&6; }
27205 fi
27206 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27207 fi
27208
27209
27210
27211 elif test "$PORTNAME" = "openbsd"; then
27212   { echo "$as_me:$LINENO: checking if $CC supports -Wl,-Bdynamic" >&5
27213 echo $ECHO_N "checking if $CC supports -Wl,-Bdynamic... $ECHO_C" >&6; }
27214 pgac_save_LDFLAGS=$LDFLAGS
27215 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
27216 if test "$cross_compiling" = yes; then
27217   LDFLAGS="$pgac_save_LDFLAGS"
27218                { echo "$as_me:$LINENO: result: assuming no" >&5
27219 echo "${ECHO_T}assuming no" >&6; }
27220 else
27221   cat >conftest.$ac_ext <<_ACEOF
27222 /* confdefs.h.  */
27223 _ACEOF
27224 cat confdefs.h >>conftest.$ac_ext
27225 cat >>conftest.$ac_ext <<_ACEOF
27226 /* end confdefs.h.  */
27227 extern void $link_test_func (); void (*fptr) () = $link_test_func;
27228 int
27229 main ()
27230 {
27231
27232   ;
27233   return 0;
27234 }
27235 _ACEOF
27236 rm -f conftest$ac_exeext
27237 if { (ac_try="$ac_link"
27238 case "(($ac_try" in
27239   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27240   *) ac_try_echo=$ac_try;;
27241 esac
27242 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27243   (eval "$ac_link") 2>&5
27244   ac_status=$?
27245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27246   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27247   { (case "(($ac_try" in
27248   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27249   *) ac_try_echo=$ac_try;;
27250 esac
27251 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27252   (eval "$ac_try") 2>&5
27253   ac_status=$?
27254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27255   (exit $ac_status); }; }; then
27256   { echo "$as_me:$LINENO: result: yes" >&5
27257 echo "${ECHO_T}yes" >&6; }
27258 else
27259   echo "$as_me: program exited with status $ac_status" >&5
27260 echo "$as_me: failed program was:" >&5
27261 sed 's/^/| /' conftest.$ac_ext >&5
27262
27263 ( exit $ac_status )
27264 LDFLAGS="$pgac_save_LDFLAGS"
27265                { echo "$as_me:$LINENO: result: no" >&5
27266 echo "${ECHO_T}no" >&6; }
27267 fi
27268 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27269 fi
27270
27271
27272
27273 else
27274   { echo "$as_me:$LINENO: checking if $CC supports -Wl,--as-needed" >&5
27275 echo $ECHO_N "checking if $CC supports -Wl,--as-needed... $ECHO_C" >&6; }
27276 pgac_save_LDFLAGS=$LDFLAGS
27277 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
27278 if test "$cross_compiling" = yes; then
27279   LDFLAGS="$pgac_save_LDFLAGS"
27280                { echo "$as_me:$LINENO: result: assuming no" >&5
27281 echo "${ECHO_T}assuming no" >&6; }
27282 else
27283   cat >conftest.$ac_ext <<_ACEOF
27284 /* confdefs.h.  */
27285 _ACEOF
27286 cat confdefs.h >>conftest.$ac_ext
27287 cat >>conftest.$ac_ext <<_ACEOF
27288 /* end confdefs.h.  */
27289 extern void $link_test_func (); void (*fptr) () = $link_test_func;
27290 int
27291 main ()
27292 {
27293
27294   ;
27295   return 0;
27296 }
27297 _ACEOF
27298 rm -f conftest$ac_exeext
27299 if { (ac_try="$ac_link"
27300 case "(($ac_try" in
27301   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27302   *) ac_try_echo=$ac_try;;
27303 esac
27304 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27305   (eval "$ac_link") 2>&5
27306   ac_status=$?
27307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27308   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27309   { (case "(($ac_try" in
27310   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27311   *) ac_try_echo=$ac_try;;
27312 esac
27313 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27314   (eval "$ac_try") 2>&5
27315   ac_status=$?
27316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27317   (exit $ac_status); }; }; then
27318   { echo "$as_me:$LINENO: result: yes" >&5
27319 echo "${ECHO_T}yes" >&6; }
27320 else
27321   echo "$as_me: program exited with status $ac_status" >&5
27322 echo "$as_me: failed program was:" >&5
27323 sed 's/^/| /' conftest.$ac_ext >&5
27324
27325 ( exit $ac_status )
27326 LDFLAGS="$pgac_save_LDFLAGS"
27327                { echo "$as_me:$LINENO: result: no" >&5
27328 echo "${ECHO_T}no" >&6; }
27329 fi
27330 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27331 fi
27332
27333
27334
27335 fi
27336
27337
27338 # Begin output steps
27339
27340 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
27341 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
27342 { echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
27343 echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
27344 { echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
27345 echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
27346
27347 # Create compiler version string
27348 if test x"$GCC" = x"yes" ; then
27349   cc_string="GCC `${CC} --version | sed q`"
27350 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
27351   cc_string=`${CC} -V 2>&1 | sed q`
27352 else
27353   cc_string=$CC
27354 fi
27355
27356
27357 cat >>confdefs.h <<_ACEOF
27358 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
27359 _ACEOF
27360
27361
27362 # Supply a numeric version string for use by 3rd party add-ons
27363 # awk -F is a regex on some platforms, and not on others, so make "." a tab
27364 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
27365 tr '.' '        ' |
27366 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
27367
27368 cat >>confdefs.h <<_ACEOF
27369 #define PG_VERSION_NUM $PG_VERSION_NUM
27370 _ACEOF
27371
27372
27373
27374 # prepare build tree if outside source tree
27375 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
27376 # Note 2: /bin/pwd might be better than shell's built-in at getting
27377 #         a symlink-free name.
27378 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
27379   vpath_build=no
27380 else
27381   vpath_build=yes
27382   if test "$no_create" != yes; then
27383     echo $ECHO_N "preparing build tree... $ECHO_C" >&6
27384     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
27385     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
27386       || { { echo "$as_me:$LINENO: error: failed" >&5
27387 echo "$as_me: error: failed" >&2;}
27388    { (exit 1); exit 1; }; }
27389     { echo "$as_me:$LINENO: result: done" >&5
27390 echo "${ECHO_T}done" >&6; }
27391   fi
27392 fi
27393
27394
27395
27396 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
27397
27398
27399 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}"
27400
27401
27402 if test "$PORTNAME" = "win32"; then
27403 ac_config_commands="$ac_config_commands check_win32_symlinks"
27404
27405 fi
27406
27407 ac_config_headers="$ac_config_headers src/include/pg_config.h"
27408
27409
27410 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
27411
27412
27413 cat >confcache <<\_ACEOF
27414 # This file is a shell script that caches the results of configure
27415 # tests run on this system so they can be shared between configure
27416 # scripts and configure runs, see configure's option --config-cache.
27417 # It is not useful on other systems.  If it contains results you don't
27418 # want to keep, you may remove or edit it.
27419 #
27420 # config.status only pays attention to the cache file if you give it
27421 # the --recheck option to rerun configure.
27422 #
27423 # `ac_cv_env_foo' variables (set or unset) will be overridden when
27424 # loading this file, other *unset* `ac_cv_foo' will be assigned the
27425 # following values.
27426
27427 _ACEOF
27428
27429 # The following way of writing the cache mishandles newlines in values,
27430 # but we know of no workaround that is simple, portable, and efficient.
27431 # So, we kill variables containing newlines.
27432 # Ultrix sh set writes to stderr and can't be redirected directly,
27433 # and sets the high bit in the cache file unless we assign to the vars.
27434 (
27435   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27436     eval ac_val=\$$ac_var
27437     case $ac_val in #(
27438     *${as_nl}*)
27439       case $ac_var in #(
27440       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27441 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
27442       esac
27443       case $ac_var in #(
27444       _ | IFS | as_nl) ;; #(
27445       *) $as_unset $ac_var ;;
27446       esac ;;
27447     esac
27448   done
27449
27450   (set) 2>&1 |
27451     case $as_nl`(ac_space=' '; set) 2>&1` in #(
27452     *${as_nl}ac_space=\ *)
27453       # `set' does not quote correctly, so add quotes (double-quote
27454       # substitution turns \\\\ into \\, and sed turns \\ into \).
27455       sed -n \
27456         "s/'/'\\\\''/g;
27457           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
27458       ;; #(
27459     *)
27460       # `set' quotes correctly as required by POSIX, so do not add quotes.
27461       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
27462       ;;
27463     esac |
27464     sort
27465 ) |
27466   sed '
27467      /^ac_cv_env_/b end
27468      t clear
27469      :clear
27470      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27471      t end
27472      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27473      :end' >>confcache
27474 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27475   if test -w "$cache_file"; then
27476     test "x$cache_file" != "x/dev/null" &&
27477       { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27478 echo "$as_me: updating cache $cache_file" >&6;}
27479     cat confcache >$cache_file
27480   else
27481     { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27482 echo "$as_me: not updating unwritable cache $cache_file" >&6;}
27483   fi
27484 fi
27485 rm -f confcache
27486
27487 test "x$prefix" = xNONE && prefix=$ac_default_prefix
27488 # Let make expand exec_prefix.
27489 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
27490
27491 DEFS=-DHAVE_CONFIG_H
27492
27493 ac_libobjs=
27494 ac_ltlibobjs=
27495 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27496   # 1. Remove the extension, and $U if already installed.
27497   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
27498   ac_i=`echo "$ac_i" | sed "$ac_script"`
27499   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
27500   #    will be set to the directory where LIBOBJS objects are built.
27501   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27502   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
27503 done
27504 LIBOBJS=$ac_libobjs
27505
27506 LTLIBOBJS=$ac_ltlibobjs
27507
27508
27509
27510 : ${CONFIG_STATUS=./config.status}
27511 ac_clean_files_save=$ac_clean_files
27512 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
27513 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27514 echo "$as_me: creating $CONFIG_STATUS" >&6;}
27515 cat >$CONFIG_STATUS <<_ACEOF
27516 #! $SHELL
27517 # Generated by $as_me.
27518 # Run this file to recreate the current configuration.
27519 # Compiler output produced by configure, useful for debugging
27520 # configure, is in config.log if it exists.
27521
27522 debug=false
27523 ac_cs_recheck=false
27524 ac_cs_silent=false
27525 SHELL=\${CONFIG_SHELL-$SHELL}
27526 _ACEOF
27527
27528 cat >>$CONFIG_STATUS <<\_ACEOF
27529 ## --------------------- ##
27530 ## M4sh Initialization.  ##
27531 ## --------------------- ##
27532
27533 # Be more Bourne compatible
27534 DUALCASE=1; export DUALCASE # for MKS sh
27535 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27536   emulate sh
27537   NULLCMD=:
27538   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
27539   # is contrary to our usage.  Disable this feature.
27540   alias -g '${1+"$@"}'='"$@"'
27541   setopt NO_GLOB_SUBST
27542 else
27543   case `(set -o) 2>/dev/null` in
27544   *posix*) set -o posix ;;
27545 esac
27546
27547 fi
27548
27549
27550
27551
27552 # PATH needs CR
27553 # Avoid depending upon Character Ranges.
27554 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27555 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27556 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27557 as_cr_digits='0123456789'
27558 as_cr_alnum=$as_cr_Letters$as_cr_digits
27559
27560 # The user is always right.
27561 if test "${PATH_SEPARATOR+set}" != set; then
27562   echo "#! /bin/sh" >conf$$.sh
27563   echo  "exit 0"   >>conf$$.sh
27564   chmod +x conf$$.sh
27565   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27566     PATH_SEPARATOR=';'
27567   else
27568     PATH_SEPARATOR=:
27569   fi
27570   rm -f conf$$.sh
27571 fi
27572
27573 # Support unset when possible.
27574 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27575   as_unset=unset
27576 else
27577   as_unset=false
27578 fi
27579
27580
27581 # IFS
27582 # We need space, tab and new line, in precisely that order.  Quoting is
27583 # there to prevent editors from complaining about space-tab.
27584 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
27585 # splitting by setting IFS to empty value.)
27586 as_nl='
27587 '
27588 IFS=" ""        $as_nl"
27589
27590 # Find who we are.  Look in the path if we contain no directory separator.
27591 case $0 in
27592   *[\\/]* ) as_myself=$0 ;;
27593   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27594 for as_dir in $PATH
27595 do
27596   IFS=$as_save_IFS
27597   test -z "$as_dir" && as_dir=.
27598   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27599 done
27600 IFS=$as_save_IFS
27601
27602      ;;
27603 esac
27604 # We did not find ourselves, most probably we were run as `sh COMMAND'
27605 # in which case we are not to be found in the path.
27606 if test "x$as_myself" = x; then
27607   as_myself=$0
27608 fi
27609 if test ! -f "$as_myself"; then
27610   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
27611   { (exit 1); exit 1; }
27612 fi
27613
27614 # Work around bugs in pre-3.0 UWIN ksh.
27615 for as_var in ENV MAIL MAILPATH
27616 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27617 done
27618 PS1='$ '
27619 PS2='> '
27620 PS4='+ '
27621
27622 # NLS nuisances.
27623 for as_var in \
27624   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27625   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27626   LC_TELEPHONE LC_TIME
27627 do
27628   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27629     eval $as_var=C; export $as_var
27630   else
27631     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27632   fi
27633 done
27634
27635 # Required to use basename.
27636 if expr a : '\(a\)' >/dev/null 2>&1 &&
27637    test "X`expr 00001 : '.*\(...\)'`" = X001; then
27638   as_expr=expr
27639 else
27640   as_expr=false
27641 fi
27642
27643 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27644   as_basename=basename
27645 else
27646   as_basename=false
27647 fi
27648
27649
27650 # Name of the executable.
27651 as_me=`$as_basename -- "$0" ||
27652 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27653          X"$0" : 'X\(//\)$' \| \
27654          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
27655 echo X/"$0" |
27656     sed '/^.*\/\([^/][^/]*\)\/*$/{
27657             s//\1/
27658             q
27659           }
27660           /^X\/\(\/\/\)$/{
27661             s//\1/
27662             q
27663           }
27664           /^X\/\(\/\).*/{
27665             s//\1/
27666             q
27667           }
27668           s/.*/./; q'`
27669
27670 # CDPATH.
27671 $as_unset CDPATH
27672
27673
27674
27675   as_lineno_1=$LINENO
27676   as_lineno_2=$LINENO
27677   test "x$as_lineno_1" != "x$as_lineno_2" &&
27678   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
27679
27680   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27681   # uniformly replaced by the line number.  The first 'sed' inserts a
27682   # line-number line after each line using $LINENO; the second 'sed'
27683   # does the real work.  The second script uses 'N' to pair each
27684   # line-number line with the line containing $LINENO, and appends
27685   # trailing '-' during substitution so that $LINENO is not a special
27686   # case at line end.
27687   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
27688   # scripts with optimization help from Paolo Bonzini.  Blame Lee
27689   # E. McMahon (1931-1989) for sed's syntax.  :-)
27690   sed -n '
27691     p
27692     /[$]LINENO/=
27693   ' <$as_myself |
27694     sed '
27695       s/[$]LINENO.*/&-/
27696       t lineno
27697       b
27698       :lineno
27699       N
27700       :loop
27701       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
27702       t loop
27703       s/-\n.*//
27704     ' >$as_me.lineno &&
27705   chmod +x "$as_me.lineno" ||
27706     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
27707    { (exit 1); exit 1; }; }
27708
27709   # Don't try to exec as it changes $[0], causing all sort of problems
27710   # (the dirname of $[0] is not the place where we might find the
27711   # original and so on.  Autoconf is especially sensitive to this).
27712   . "./$as_me.lineno"
27713   # Exit status is that of the last command.
27714   exit
27715 }
27716
27717
27718 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27719   as_dirname=dirname
27720 else
27721   as_dirname=false
27722 fi
27723
27724 ECHO_C= ECHO_N= ECHO_T=
27725 case `echo -n x` in
27726 -n*)
27727   case `echo 'x\c'` in
27728   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
27729   *)   ECHO_C='\c';;
27730   esac;;
27731 *)
27732   ECHO_N='-n';;
27733 esac
27734
27735 if expr a : '\(a\)' >/dev/null 2>&1 &&
27736    test "X`expr 00001 : '.*\(...\)'`" = X001; then
27737   as_expr=expr
27738 else
27739   as_expr=false
27740 fi
27741
27742 rm -f conf$$ conf$$.exe conf$$.file
27743 if test -d conf$$.dir; then
27744   rm -f conf$$.dir/conf$$.file
27745 else
27746   rm -f conf$$.dir
27747   mkdir conf$$.dir
27748 fi
27749 echo >conf$$.file
27750 if ln -s conf$$.file conf$$ 2>/dev/null; then
27751   as_ln_s='ln -s'
27752   # ... but there are two gotchas:
27753   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27754   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27755   # In both cases, we have to default to `cp -p'.
27756   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
27757     as_ln_s='cp -p'
27758 elif ln conf$$.file conf$$ 2>/dev/null; then
27759   as_ln_s=ln
27760 else
27761   as_ln_s='cp -p'
27762 fi
27763 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27764 rmdir conf$$.dir 2>/dev/null
27765
27766 if mkdir -p . 2>/dev/null; then
27767   as_mkdir_p=:
27768 else
27769   test -d ./-p && rmdir ./-p
27770   as_mkdir_p=false
27771 fi
27772
27773 if test -x / >/dev/null 2>&1; then
27774   as_test_x='test -x'
27775 else
27776   if ls -dL / >/dev/null 2>&1; then
27777     as_ls_L_option=L
27778   else
27779     as_ls_L_option=
27780   fi
27781   as_test_x='
27782     eval sh -c '\''
27783       if test -d "$1"; then
27784         test -d "$1/.";
27785       else
27786         case $1 in
27787         -*)set "./$1";;
27788         esac;
27789         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27790         ???[sx]*):;;*)false;;esac;fi
27791     '\'' sh
27792   '
27793 fi
27794 as_executable_p=$as_test_x
27795
27796 # Sed expression to map a string onto a valid CPP name.
27797 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
27798
27799 # Sed expression to map a string onto a valid variable name.
27800 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
27801
27802
27803 exec 6>&1
27804
27805 # Save the log message, to keep $[0] and so on meaningful, and to
27806 # report actual input values of CONFIG_FILES etc. instead of their
27807 # values after options handling.
27808 ac_log="
27809 This file was extended by PostgreSQL $as_me 8.4.0, which was
27810 generated by GNU Autoconf 2.61.  Invocation command line was
27811
27812   CONFIG_FILES    = $CONFIG_FILES
27813   CONFIG_HEADERS  = $CONFIG_HEADERS
27814   CONFIG_LINKS    = $CONFIG_LINKS
27815   CONFIG_COMMANDS = $CONFIG_COMMANDS
27816   $ $0 $@
27817
27818 on `(hostname || uname -n) 2>/dev/null | sed 1q`
27819 "
27820
27821 _ACEOF
27822
27823 cat >>$CONFIG_STATUS <<_ACEOF
27824 # Files that config.status was made for.
27825 config_files="$ac_config_files"
27826 config_headers="$ac_config_headers"
27827 config_links="$ac_config_links"
27828 config_commands="$ac_config_commands"
27829
27830 _ACEOF
27831
27832 cat >>$CONFIG_STATUS <<\_ACEOF
27833 ac_cs_usage="\
27834 \`$as_me' instantiates files from templates according to the
27835 current configuration.
27836
27837 Usage: $0 [OPTIONS] [FILE]...
27838
27839   -h, --help       print this help, then exit
27840   -V, --version    print version number and configuration settings, then exit
27841   -q, --quiet      do not print progress messages
27842   -d, --debug      don't remove temporary files
27843       --recheck    update $as_me by reconfiguring in the same conditions
27844   --file=FILE[:TEMPLATE]
27845                    instantiate the configuration file FILE
27846   --header=FILE[:TEMPLATE]
27847                    instantiate the configuration header FILE
27848
27849 Configuration files:
27850 $config_files
27851
27852 Configuration headers:
27853 $config_headers
27854
27855 Configuration links:
27856 $config_links
27857
27858 Configuration commands:
27859 $config_commands
27860
27861 Report bugs to <bug-autoconf@gnu.org>."
27862
27863 _ACEOF
27864 cat >>$CONFIG_STATUS <<_ACEOF
27865 ac_cs_version="\\
27866 PostgreSQL config.status 8.4.0
27867 configured by $0, generated by GNU Autoconf 2.61,
27868   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
27869
27870 Copyright (C) 2006 Free Software Foundation, Inc.
27871 This config.status script is free software; the Free Software Foundation
27872 gives unlimited permission to copy, distribute and modify it."
27873
27874 ac_pwd='$ac_pwd'
27875 srcdir='$srcdir'
27876 _ACEOF
27877
27878 cat >>$CONFIG_STATUS <<\_ACEOF
27879 # If no file are specified by the user, then we need to provide default
27880 # value.  By we need to know if files were specified by the user.
27881 ac_need_defaults=:
27882 while test $# != 0
27883 do
27884   case $1 in
27885   --*=*)
27886     ac_option=`expr "X$1" : 'X\([^=]*\)='`
27887     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
27888     ac_shift=:
27889     ;;
27890   *)
27891     ac_option=$1
27892     ac_optarg=$2
27893     ac_shift=shift
27894     ;;
27895   esac
27896
27897   case $ac_option in
27898   # Handling of the options.
27899   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27900     ac_cs_recheck=: ;;
27901   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
27902     echo "$ac_cs_version"; exit ;;
27903   --debug | --debu | --deb | --de | --d | -d )
27904     debug=: ;;
27905   --file | --fil | --fi | --f )
27906     $ac_shift
27907     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
27908     ac_need_defaults=false;;
27909   --header | --heade | --head | --hea )
27910     $ac_shift
27911     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
27912     ac_need_defaults=false;;
27913   --he | --h)
27914     # Conflict between --help and --header
27915     { echo "$as_me: error: ambiguous option: $1
27916 Try \`$0 --help' for more information." >&2
27917    { (exit 1); exit 1; }; };;
27918   --help | --hel | -h )
27919     echo "$ac_cs_usage"; exit ;;
27920   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27921   | -silent | --silent | --silen | --sile | --sil | --si | --s)
27922     ac_cs_silent=: ;;
27923
27924   # This is an error.
27925   -*) { echo "$as_me: error: unrecognized option: $1
27926 Try \`$0 --help' for more information." >&2
27927    { (exit 1); exit 1; }; } ;;
27928
27929   *) ac_config_targets="$ac_config_targets $1"
27930      ac_need_defaults=false ;;
27931
27932   esac
27933   shift
27934 done
27935
27936 ac_configure_extra_args=
27937
27938 if $ac_cs_silent; then
27939   exec 6>/dev/null
27940   ac_configure_extra_args="$ac_configure_extra_args --silent"
27941 fi
27942
27943 _ACEOF
27944 cat >>$CONFIG_STATUS <<_ACEOF
27945 if \$ac_cs_recheck; then
27946   echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27947   CONFIG_SHELL=$SHELL
27948   export CONFIG_SHELL
27949   exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
27950 fi
27951
27952 _ACEOF
27953 cat >>$CONFIG_STATUS <<\_ACEOF
27954 exec 5>>config.log
27955 {
27956   echo
27957   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27958 ## Running $as_me. ##
27959 _ASBOX
27960   echo "$ac_log"
27961 } >&5
27962
27963 _ACEOF
27964 cat >>$CONFIG_STATUS <<_ACEOF
27965 _ACEOF
27966
27967 cat >>$CONFIG_STATUS <<\_ACEOF
27968
27969 # Handling of arguments.
27970 for ac_config_target in $ac_config_targets
27971 do
27972   case $ac_config_target in
27973     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
27974     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
27975     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
27976     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
27977     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
27978     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
27979     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
27980     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
27981     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
27982     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
27983     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
27984     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
27985
27986   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27987 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
27988    { (exit 1); exit 1; }; };;
27989   esac
27990 done
27991
27992
27993 # If the user did not use the arguments to specify the items to instantiate,
27994 # then the envvar interface is used.  Set only those that are not.
27995 # We use the long form for the default assignment because of an extremely
27996 # bizarre bug on SunOS 4.1.3.
27997 if $ac_need_defaults; then
27998   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27999   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28000   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
28001   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
28002 fi
28003
28004 # Have a temporary directory for convenience.  Make it in the build tree
28005 # simply because there is no reason against having it here, and in addition,
28006 # creating and moving files from /tmp can sometimes cause problems.
28007 # Hook for its removal unless debugging.
28008 # Note that there is a small window in which the directory will not be cleaned:
28009 # after its creation but before its name has been assigned to `$tmp'.
28010 $debug ||
28011 {
28012   tmp=
28013   trap 'exit_status=$?
28014   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
28015 ' 0
28016   trap '{ (exit 1); exit 1; }' 1 2 13 15
28017 }
28018 # Create a (secure) tmp directory for tmp files.
28019
28020 {
28021   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
28022   test -n "$tmp" && test -d "$tmp"
28023 }  ||
28024 {
28025   tmp=./conf$$-$RANDOM
28026   (umask 077 && mkdir "$tmp")
28027 } ||
28028 {
28029    echo "$me: cannot create a temporary directory in ." >&2
28030    { (exit 1); exit 1; }
28031 }
28032
28033 #
28034 # Set up the sed scripts for CONFIG_FILES section.
28035 #
28036
28037 # No need to generate the scripts if there are no CONFIG_FILES.
28038 # This happens for instance when ./config.status config.h
28039 if test -n "$CONFIG_FILES"; then
28040
28041 _ACEOF
28042
28043
28044
28045 ac_delim='%!_!# '
28046 for ac_last_try in false false false false false :; do
28047   cat >conf$$subs.sed <<_ACEOF
28048 SHELL!$SHELL$ac_delim
28049 PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
28050 PACKAGE_NAME!$PACKAGE_NAME$ac_delim
28051 PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
28052 PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
28053 PACKAGE_STRING!$PACKAGE_STRING$ac_delim
28054 PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
28055 exec_prefix!$exec_prefix$ac_delim
28056 prefix!$prefix$ac_delim
28057 program_transform_name!$program_transform_name$ac_delim
28058 bindir!$bindir$ac_delim
28059 sbindir!$sbindir$ac_delim
28060 libexecdir!$libexecdir$ac_delim
28061 datarootdir!$datarootdir$ac_delim
28062 datadir!$datadir$ac_delim
28063 sysconfdir!$sysconfdir$ac_delim
28064 sharedstatedir!$sharedstatedir$ac_delim
28065 localstatedir!$localstatedir$ac_delim
28066 includedir!$includedir$ac_delim
28067 oldincludedir!$oldincludedir$ac_delim
28068 docdir!$docdir$ac_delim
28069 infodir!$infodir$ac_delim
28070 htmldir!$htmldir$ac_delim
28071 dvidir!$dvidir$ac_delim
28072 pdfdir!$pdfdir$ac_delim
28073 psdir!$psdir$ac_delim
28074 libdir!$libdir$ac_delim
28075 localedir!$localedir$ac_delim
28076 mandir!$mandir$ac_delim
28077 DEFS!$DEFS$ac_delim
28078 ECHO_C!$ECHO_C$ac_delim
28079 ECHO_N!$ECHO_N$ac_delim
28080 ECHO_T!$ECHO_T$ac_delim
28081 LIBS!$LIBS$ac_delim
28082 build_alias!$build_alias$ac_delim
28083 host_alias!$host_alias$ac_delim
28084 target_alias!$target_alias$ac_delim
28085 configure_args!$configure_args$ac_delim
28086 PG_MAJORVERSION!$PG_MAJORVERSION$ac_delim
28087 build!$build$ac_delim
28088 build_cpu!$build_cpu$ac_delim
28089 build_vendor!$build_vendor$ac_delim
28090 build_os!$build_os$ac_delim
28091 host!$host$ac_delim
28092 host_cpu!$host_cpu$ac_delim
28093 host_vendor!$host_vendor$ac_delim
28094 host_os!$host_os$ac_delim
28095 PORTNAME!$PORTNAME$ac_delim
28096 enable_nls!$enable_nls$ac_delim
28097 WANTED_LANGUAGES!$WANTED_LANGUAGES$ac_delim
28098 default_port!$default_port$ac_delim
28099 enable_shared!$enable_shared$ac_delim
28100 enable_rpath!$enable_rpath$ac_delim
28101 enable_debug!$enable_debug$ac_delim
28102 enable_profiling!$enable_profiling$ac_delim
28103 GCOV!$GCOV$ac_delim
28104 LCOV!$LCOV$ac_delim
28105 GENHTML!$GENHTML$ac_delim
28106 enable_coverage!$enable_coverage$ac_delim
28107 DTRACE!$DTRACE$ac_delim
28108 DTRACEFLAGS!$DTRACEFLAGS$ac_delim
28109 enable_dtrace!$enable_dtrace$ac_delim
28110 CC!$CC$ac_delim
28111 CFLAGS!$CFLAGS$ac_delim
28112 LDFLAGS!$LDFLAGS$ac_delim
28113 CPPFLAGS!$CPPFLAGS$ac_delim
28114 ac_ct_CC!$ac_ct_CC$ac_delim
28115 EXEEXT!$EXEEXT$ac_delim
28116 OBJEXT!$OBJEXT$ac_delim
28117 SUN_STUDIO_CC!$SUN_STUDIO_CC$ac_delim
28118 CPP!$CPP$ac_delim
28119 GCC!$GCC$ac_delim
28120 TAS!$TAS$ac_delim
28121 autodepend!$autodepend$ac_delim
28122 INCLUDES!$INCLUDES$ac_delim
28123 enable_thread_safety!$enable_thread_safety$ac_delim
28124 with_tcl!$with_tcl$ac_delim
28125 with_perl!$with_perl$ac_delim
28126 with_python!$with_python$ac_delim
28127 with_gssapi!$with_gssapi$ac_delim
28128 with_krb5!$with_krb5$ac_delim
28129 krb_srvtab!$krb_srvtab$ac_delim
28130 with_pam!$with_pam$ac_delim
28131 with_ldap!$with_ldap$ac_delim
28132 with_bonjour!$with_bonjour$ac_delim
28133 with_openssl!$with_openssl$ac_delim
28134 with_ossp_uuid!$with_ossp_uuid$ac_delim
28135 XML2_CONFIG!$XML2_CONFIG$ac_delim
28136 with_libxml!$with_libxml$ac_delim
28137 with_libxslt!$with_libxslt$ac_delim
28138 with_system_tzdata!$with_system_tzdata$ac_delim
28139 with_zlib!$with_zlib$ac_delim
28140 GREP!$GREP$ac_delim
28141 EGREP!$EGREP$ac_delim
28142 ELF_SYS!$ELF_SYS$ac_delim
28143 LDFLAGS_SL!$LDFLAGS_SL$ac_delim
28144 LD!$LD$ac_delim
28145 _ACEOF
28146
28147   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
28148     break
28149   elif $ac_last_try; then
28150     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28151 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
28152    { (exit 1); exit 1; }; }
28153   else
28154     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28155   fi
28156 done
28157
28158 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28159 if test -n "$ac_eof"; then
28160   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28161   ac_eof=`expr $ac_eof + 1`
28162 fi
28163
28164 cat >>$CONFIG_STATUS <<_ACEOF
28165 cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28166 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
28167 _ACEOF
28168 sed '
28169 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28170 s/^/s,@/; s/!/@,|#_!!_#|/
28171 :n
28172 t n
28173 s/'"$ac_delim"'$/,g/; t
28174 s/$/\\/; p
28175 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28176 ' >>$CONFIG_STATUS <conf$$subs.sed
28177 rm -f conf$$subs.sed
28178 cat >>$CONFIG_STATUS <<_ACEOF
28179 CEOF$ac_eof
28180 _ACEOF
28181
28182
28183 ac_delim='%!_!# '
28184 for ac_last_try in false false false false false :; do
28185   cat >conf$$subs.sed <<_ACEOF
28186 with_gnu_ld!$with_gnu_ld$ac_delim
28187 ld_R_works!$ld_R_works$ac_delim
28188 RANLIB!$RANLIB$ac_delim
28189 STRIP!$STRIP$ac_delim
28190 STRIP_STATIC_LIB!$STRIP_STATIC_LIB$ac_delim
28191 STRIP_SHARED_LIB!$STRIP_SHARED_LIB$ac_delim
28192 AR!$AR$ac_delim
28193 DLLTOOL!$DLLTOOL$ac_delim
28194 DLLWRAP!$DLLWRAP$ac_delim
28195 WINDRES!$WINDRES$ac_delim
28196 TAR!$TAR$ac_delim
28197 LN_S!$LN_S$ac_delim
28198 AWK!$AWK$ac_delim
28199 BISON!$BISON$ac_delim
28200 BISONFLAGS!$BISONFLAGS$ac_delim
28201 FLEX!$FLEX$ac_delim
28202 FLEXFLAGS!$FLEXFLAGS$ac_delim
28203 PERL!$PERL$ac_delim
28204 perl_archlibexp!$perl_archlibexp$ac_delim
28205 perl_privlibexp!$perl_privlibexp$ac_delim
28206 perl_useshrplib!$perl_useshrplib$ac_delim
28207 perl_embed_ldflags!$perl_embed_ldflags$ac_delim
28208 PYTHON!$PYTHON$ac_delim
28209 python_version!$python_version$ac_delim
28210 python_configdir!$python_configdir$ac_delim
28211 python_includespec!$python_includespec$ac_delim
28212 python_libdir!$python_libdir$ac_delim
28213 python_libspec!$python_libspec$ac_delim
28214 python_additional_libs!$python_additional_libs$ac_delim
28215 ZIC!$ZIC$ac_delim
28216 OSSP_UUID_LIBS!$OSSP_UUID_LIBS$ac_delim
28217 HAVE_IPV6!$HAVE_IPV6$ac_delim
28218 LIBOBJS!$LIBOBJS$ac_delim
28219 acx_pthread_config!$acx_pthread_config$ac_delim
28220 PTHREAD_CC!$PTHREAD_CC$ac_delim
28221 PTHREAD_LIBS!$PTHREAD_LIBS$ac_delim
28222 PTHREAD_CFLAGS!$PTHREAD_CFLAGS$ac_delim
28223 LDAP_LIBS_FE!$LDAP_LIBS_FE$ac_delim
28224 LDAP_LIBS_BE!$LDAP_LIBS_BE$ac_delim
28225 HAVE_POSIX_SIGNALS!$HAVE_POSIX_SIGNALS$ac_delim
28226 MSGFMT!$MSGFMT$ac_delim
28227 MSGMERGE!$MSGMERGE$ac_delim
28228 XGETTEXT!$XGETTEXT$ac_delim
28229 TCLSH!$TCLSH$ac_delim
28230 TCL_CONFIG_SH!$TCL_CONFIG_SH$ac_delim
28231 TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim
28232 TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim
28233 TCL_LIBS!$TCL_LIBS$ac_delim
28234 TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim
28235 TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim
28236 TCL_SHLIB_LD_LIBS!$TCL_SHLIB_LD_LIBS$ac_delim
28237 NSGMLS!$NSGMLS$ac_delim
28238 JADE!$JADE$ac_delim
28239 have_docbook!$have_docbook$ac_delim
28240 DOCBOOKSTYLE!$DOCBOOKSTYLE$ac_delim
28241 COLLATEINDEX!$COLLATEINDEX$ac_delim
28242 SGMLSPL!$SGMLSPL$ac_delim
28243 DOCBOOK2MAN!$DOCBOOK2MAN$ac_delim
28244 vpath_build!$vpath_build$ac_delim
28245 LTLIBOBJS!$LTLIBOBJS$ac_delim
28246 _ACEOF
28247
28248   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 60; then
28249     break
28250   elif $ac_last_try; then
28251     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28252 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
28253    { (exit 1); exit 1; }; }
28254   else
28255     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28256   fi
28257 done
28258
28259 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28260 if test -n "$ac_eof"; then
28261   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28262   ac_eof=`expr $ac_eof + 1`
28263 fi
28264
28265 cat >>$CONFIG_STATUS <<_ACEOF
28266 cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28267 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
28268 _ACEOF
28269 sed '
28270 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28271 s/^/s,@/; s/!/@,|#_!!_#|/
28272 :n
28273 t n
28274 s/'"$ac_delim"'$/,g/; t
28275 s/$/\\/; p
28276 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28277 ' >>$CONFIG_STATUS <conf$$subs.sed
28278 rm -f conf$$subs.sed
28279 cat >>$CONFIG_STATUS <<_ACEOF
28280 :end
28281 s/|#_!!_#|//g
28282 CEOF$ac_eof
28283 _ACEOF
28284
28285
28286 # VPATH may cause trouble with some makes, so we remove $(srcdir),
28287 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28288 # trailing colons and then remove the whole line if VPATH becomes empty
28289 # (actually we leave an empty line to preserve line numbers).
28290 if test "x$srcdir" = x.; then
28291   ac_vpsub='/^[  ]*VPATH[        ]*=/{
28292 s/:*\$(srcdir):*/:/
28293 s/:*\${srcdir}:*/:/
28294 s/:*@srcdir@:*/:/
28295 s/^\([^=]*=[     ]*\):*/\1/
28296 s/:*$//
28297 s/^[^=]*=[       ]*$//
28298 }'
28299 fi
28300
28301 cat >>$CONFIG_STATUS <<\_ACEOF
28302 fi # test -n "$CONFIG_FILES"
28303
28304
28305 for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS
28306 do
28307   case $ac_tag in
28308   :[FHLC]) ac_mode=$ac_tag; continue;;
28309   esac
28310   case $ac_mode$ac_tag in
28311   :[FHL]*:*);;
28312   :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28313 echo "$as_me: error: Invalid tag $ac_tag." >&2;}
28314    { (exit 1); exit 1; }; };;
28315   :[FH]-) ac_tag=-:-;;
28316   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28317   esac
28318   ac_save_IFS=$IFS
28319   IFS=:
28320   set x $ac_tag
28321   IFS=$ac_save_IFS
28322   shift
28323   ac_file=$1
28324   shift
28325
28326   case $ac_mode in
28327   :L) ac_source=$1;;
28328   :[FH])
28329     ac_file_inputs=
28330     for ac_f
28331     do
28332       case $ac_f in
28333       -) ac_f="$tmp/stdin";;
28334       *) # Look for the file first in the build tree, then in the source tree
28335          # (if the path is not absolute).  The absolute path cannot be DOS-style,
28336          # because $ac_f cannot contain `:'.
28337          test -f "$ac_f" ||
28338            case $ac_f in
28339            [\\/$]*) false;;
28340            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28341            esac ||
28342            { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28343 echo "$as_me: error: cannot find input file: $ac_f" >&2;}
28344    { (exit 1); exit 1; }; };;
28345       esac
28346       ac_file_inputs="$ac_file_inputs $ac_f"
28347     done
28348
28349     # Let's still pretend it is `configure' which instantiates (i.e., don't
28350     # use $as_me), people would be surprised to read:
28351     #    /* config.h.  Generated by config.status.  */
28352     configure_input="Generated from "`IFS=:
28353           echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
28354     if test x"$ac_file" != x-; then
28355       configure_input="$ac_file.  $configure_input"
28356       { echo "$as_me:$LINENO: creating $ac_file" >&5
28357 echo "$as_me: creating $ac_file" >&6;}
28358     fi
28359
28360     case $ac_tag in
28361     *:-:* | *:-) cat >"$tmp/stdin";;
28362     esac
28363     ;;
28364   esac
28365
28366   ac_dir=`$as_dirname -- "$ac_file" ||
28367 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28368          X"$ac_file" : 'X\(//\)[^/]' \| \
28369          X"$ac_file" : 'X\(//\)$' \| \
28370          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
28371 echo X"$ac_file" |
28372     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28373             s//\1/
28374             q
28375           }
28376           /^X\(\/\/\)[^/].*/{
28377             s//\1/
28378             q
28379           }
28380           /^X\(\/\/\)$/{
28381             s//\1/
28382             q
28383           }
28384           /^X\(\/\).*/{
28385             s//\1/
28386             q
28387           }
28388           s/.*/./; q'`
28389   { as_dir="$ac_dir"
28390   case $as_dir in #(
28391   -*) as_dir=./$as_dir;;
28392   esac
28393   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
28394     as_dirs=
28395     while :; do
28396       case $as_dir in #(
28397       *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
28398       *) as_qdir=$as_dir;;
28399       esac
28400       as_dirs="'$as_qdir' $as_dirs"
28401       as_dir=`$as_dirname -- "$as_dir" ||
28402 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28403          X"$as_dir" : 'X\(//\)[^/]' \| \
28404          X"$as_dir" : 'X\(//\)$' \| \
28405          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
28406 echo X"$as_dir" |
28407     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28408             s//\1/
28409             q
28410           }
28411           /^X\(\/\/\)[^/].*/{
28412             s//\1/
28413             q
28414           }
28415           /^X\(\/\/\)$/{
28416             s//\1/
28417             q
28418           }
28419           /^X\(\/\).*/{
28420             s//\1/
28421             q
28422           }
28423           s/.*/./; q'`
28424       test -d "$as_dir" && break
28425     done
28426     test -z "$as_dirs" || eval "mkdir $as_dirs"
28427   } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28428 echo "$as_me: error: cannot create directory $as_dir" >&2;}
28429    { (exit 1); exit 1; }; }; }
28430   ac_builddir=.
28431
28432 case "$ac_dir" in
28433 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28434 *)
28435   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
28436   # A ".." for each directory in $ac_dir_suffix.
28437   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
28438   case $ac_top_builddir_sub in
28439   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28440   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28441   esac ;;
28442 esac
28443 ac_abs_top_builddir=$ac_pwd
28444 ac_abs_builddir=$ac_pwd$ac_dir_suffix
28445 # for backward compatibility:
28446 ac_top_builddir=$ac_top_build_prefix
28447
28448 case $srcdir in
28449   .)  # We are building in place.
28450     ac_srcdir=.
28451     ac_top_srcdir=$ac_top_builddir_sub
28452     ac_abs_top_srcdir=$ac_pwd ;;
28453   [\\/]* | ?:[\\/]* )  # Absolute name.
28454     ac_srcdir=$srcdir$ac_dir_suffix;
28455     ac_top_srcdir=$srcdir
28456     ac_abs_top_srcdir=$srcdir ;;
28457   *) # Relative name.
28458     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28459     ac_top_srcdir=$ac_top_build_prefix$srcdir
28460     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
28461 esac
28462 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
28463
28464
28465   case $ac_mode in
28466   :F)
28467   #
28468   # CONFIG_FILE
28469   #
28470
28471 _ACEOF
28472
28473 cat >>$CONFIG_STATUS <<\_ACEOF
28474 # If the template does not know about datarootdir, expand it.
28475 # FIXME: This hack should be removed a few years after 2.60.
28476 ac_datarootdir_hack=; ac_datarootdir_seen=
28477
28478 case `sed -n '/datarootdir/ {
28479   p
28480   q
28481 }
28482 /@datadir@/p
28483 /@docdir@/p
28484 /@infodir@/p
28485 /@localedir@/p
28486 /@mandir@/p
28487 ' $ac_file_inputs` in
28488 *datarootdir*) ac_datarootdir_seen=yes;;
28489 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
28490   { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28491 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
28492 _ACEOF
28493 cat >>$CONFIG_STATUS <<_ACEOF
28494   ac_datarootdir_hack='
28495   s&@datadir@&$datadir&g
28496   s&@docdir@&$docdir&g
28497   s&@infodir@&$infodir&g
28498   s&@localedir@&$localedir&g
28499   s&@mandir@&$mandir&g
28500     s&\\\${datarootdir}&$datarootdir&g' ;;
28501 esac
28502 _ACEOF
28503
28504 # Neutralize VPATH when `$srcdir' = `.'.
28505 # Shell code in configure.ac might set extrasub.
28506 # FIXME: do we really want to maintain this feature?
28507 cat >>$CONFIG_STATUS <<_ACEOF
28508   sed "$ac_vpsub
28509 $extrasub
28510 _ACEOF
28511 cat >>$CONFIG_STATUS <<\_ACEOF
28512 :t
28513 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
28514 s&@configure_input@&$configure_input&;t t
28515 s&@top_builddir@&$ac_top_builddir_sub&;t t
28516 s&@srcdir@&$ac_srcdir&;t t
28517 s&@abs_srcdir@&$ac_abs_srcdir&;t t
28518 s&@top_srcdir@&$ac_top_srcdir&;t t
28519 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28520 s&@builddir@&$ac_builddir&;t t
28521 s&@abs_builddir@&$ac_abs_builddir&;t t
28522 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28523 $ac_datarootdir_hack
28524 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
28525
28526 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28527   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28528   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
28529   { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
28530 which seems to be undefined.  Please make sure it is defined." >&5
28531 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
28532 which seems to be undefined.  Please make sure it is defined." >&2;}
28533
28534   rm -f "$tmp/stdin"
28535   case $ac_file in
28536   -) cat "$tmp/out"; rm -f "$tmp/out";;
28537   *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28538   esac
28539  ;;
28540   :H)
28541   #
28542   # CONFIG_HEADER
28543   #
28544 _ACEOF
28545
28546 # Transform confdefs.h into a sed script `conftest.defines', that
28547 # substitutes the proper values into config.h.in to produce config.h.
28548 rm -f conftest.defines conftest.tail
28549 # First, append a space to every undef/define line, to ease matching.
28550 echo 's/$/ /' >conftest.defines
28551 # Then, protect against being on the right side of a sed subst, or in
28552 # an unquoted here document, in config.status.  If some macros were
28553 # called several times there might be several #defines for the same
28554 # symbol, which is useless.  But do not sort them, since the last
28555 # AC_DEFINE must be honored.
28556 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28557 # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28558 # NAME is the cpp macro being defined, VALUE is the value it is being given.
28559 # PARAMS is the parameter list in the macro definition--in most cases, it's
28560 # just an empty string.
28561 ac_dA='s,^\\([   #]*\\)[^        ]*\\([  ]*'
28562 ac_dB='\\)[      (].*,\\1define\\2'
28563 ac_dC=' '
28564 ac_dD=' ,'
28565
28566 uniq confdefs.h |
28567   sed -n '
28568         t rset
28569         :rset
28570         s/^[     ]*#[    ]*define[       ][      ]*//
28571         t ok
28572         d
28573         :ok
28574         s/[\\&,]/\\&/g
28575         s/^\('"$ac_word_re"'\)\(([^()]*)\)[      ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28576         s/^\('"$ac_word_re"'\)[  ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28577   ' >>conftest.defines
28578
28579 # Remove the space that was appended to ease matching.
28580 # Then replace #undef with comments.  This is necessary, for
28581 # example, in the case of _POSIX_SOURCE, which is predefined and required
28582 # on some systems where configure will not decide to define it.
28583 # (The regexp can be short, since the line contains either #define or #undef.)
28584 echo 's/ $//
28585 s,^[     #]*u.*,/* & */,' >>conftest.defines
28586
28587 # Break up conftest.defines:
28588 ac_max_sed_lines=50
28589
28590 # First sed command is:  sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28591 # Second one is:         sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28592 # Third one will be:     sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28593 # et cetera.
28594 ac_in='$ac_file_inputs'
28595 ac_out='"$tmp/out1"'
28596 ac_nxt='"$tmp/out2"'
28597
28598 while :
28599 do
28600   # Write a here document:
28601     cat >>$CONFIG_STATUS <<_ACEOF
28602     # First, check the format of the line:
28603     cat >"\$tmp/defines.sed" <<\\CEOF
28604 /^[      ]*#[    ]*undef[        ][      ]*$ac_word_re[  ]*\$/b def
28605 /^[      ]*#[    ]*define[       ][      ]*$ac_word_re[(         ]/b def
28606 b
28607 :def
28608 _ACEOF
28609   sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28610   echo 'CEOF
28611     sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28612   ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28613   sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28614   grep . conftest.tail >/dev/null || break
28615   rm -f conftest.defines
28616   mv conftest.tail conftest.defines
28617 done
28618 rm -f conftest.defines conftest.tail
28619
28620 echo "ac_result=$ac_in" >>$CONFIG_STATUS
28621 cat >>$CONFIG_STATUS <<\_ACEOF
28622   if test x"$ac_file" != x-; then
28623     echo "/* $configure_input  */" >"$tmp/config.h"
28624     cat "$ac_result" >>"$tmp/config.h"
28625     if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28626       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28627 echo "$as_me: $ac_file is unchanged" >&6;}
28628     else
28629       rm -f $ac_file
28630       mv "$tmp/config.h" $ac_file
28631     fi
28632   else
28633     echo "/* $configure_input  */"
28634     cat "$ac_result"
28635   fi
28636   rm -f "$tmp/out12"
28637  ;;
28638   :L)
28639   #
28640   # CONFIG_LINK
28641   #
28642
28643   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_file" >&5
28644 echo "$as_me: linking $srcdir/$ac_source to $ac_file" >&6;}
28645
28646   if test ! -r "$srcdir/$ac_source"; then
28647     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
28648 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
28649    { (exit 1); exit 1; }; }
28650   fi
28651   rm -f "$ac_file"
28652
28653   # Try a relative symlink, then a hard link, then a copy.
28654   case $srcdir in
28655   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
28656       *) ac_rel_source=$ac_top_build_prefix$srcdir/$ac_source ;;
28657   esac
28658   ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
28659     ln "$srcdir/$ac_source" "$ac_file" 2>/dev/null ||
28660     cp -p "$srcdir/$ac_source" "$ac_file" ||
28661     { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_file" >&5
28662 echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_file" >&2;}
28663    { (exit 1); exit 1; }; }
28664  ;;
28665   :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
28666 echo "$as_me: executing $ac_file commands" >&6;}
28667  ;;
28668   esac
28669
28670
28671   case $ac_file$ac_mode in
28672     "check_win32_symlinks":C)
28673 # Links sometimes fail undetected on Mingw -
28674 # so here we detect it and warn the user
28675 for FILE in $CONFIG_LINKS
28676  do
28677         # test -e works for symlinks in the MinGW console
28678         test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE -- please fix by hand" >&5
28679 echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
28680  done
28681  ;;
28682     "src/include/pg_config.h":H)
28683 # Update timestamp for pg_config.h (see Makefile.global)
28684 echo >src/include/stamp-h
28685  ;;
28686     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
28687
28688   esac
28689 done # for ac_tag
28690
28691
28692 { (exit 0); exit 0; }
28693 _ACEOF
28694 chmod +x $CONFIG_STATUS
28695 ac_clean_files=$ac_clean_files_save
28696
28697
28698 # configure is writing to config.log, and then calls config.status.
28699 # config.status does its own redirection, appending to config.log.
28700 # Unfortunately, on DOS this fails, as config.log is still kept open
28701 # by configure, so config.status won't be able to write to it; its
28702 # output is simply discarded.  So we exec the FD to /dev/null,
28703 # effectively closing config.log, so it can be properly (re)opened and
28704 # appended to by config.status.  When coming back to configure, we
28705 # need to make the FD available again.
28706 if test "$no_create" != yes; then
28707   ac_cs_success=:
28708   ac_config_status_args=
28709   test "$silent" = yes &&
28710     ac_config_status_args="$ac_config_status_args --quiet"
28711   exec 5>/dev/null
28712   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
28713   exec 5>>config.log
28714   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28715   # would make configure fail if this is the last instruction.
28716   $ac_cs_success || { (exit 1); exit 1; }
28717 fi
28718
28719
28720 # Warn about unknown options
28721 for pgac_var in `set | sed 's/=.*//' | $EGREP 'with_|enable_'`; do
28722   for pgac_arg in $pgac_args with_gnu_ld; do
28723     if test "$pgac_var" = "$pgac_arg"; then
28724       continue 2
28725     fi
28726   done
28727   pgac_txt=`echo $pgac_var | sed 's/_/-/g'`
28728   { echo "$as_me:$LINENO: WARNING: option ignored: --$pgac_txt" >&5
28729 echo "$as_me: WARNING: option ignored: --$pgac_txt" >&2;}
28730 done