]> granicus.if.org Git - postgresql/blob - configure
Use posix_fallocate() for new WAL files, where available.
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.63 for PostgreSQL 9.4devel.
4 #
5 # Report bugs to <pgsql-bugs@postgresql.org>.
6 #
7 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
8 # 2002, 2003, 2004, 2005, 2006, 2007, 2008 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-2013, 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   # Pre-4.2 versions of Zsh do 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 as_nl='
45 '
46 export as_nl
47 # Printing a long string crashes Solaris 7 /usr/bin/printf.
48 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
49 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
50 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
51 if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52   as_echo='printf %s\n'
53   as_echo_n='printf %s'
54 else
55   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57     as_echo_n='/usr/ucb/echo -n'
58   else
59     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60     as_echo_n_body='eval
61       arg=$1;
62       case $arg in
63       *"$as_nl"*)
64         expr "X$arg" : "X\\(.*\\)$as_nl";
65         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66       esac;
67       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68     '
69     export as_echo_n_body
70     as_echo_n='sh -c $as_echo_n_body as_echo'
71   fi
72   export as_echo_body
73   as_echo='sh -c $as_echo_body as_echo'
74 fi
75
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
78   PATH_SEPARATOR=:
79   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81       PATH_SEPARATOR=';'
82   }
83 fi
84
85 # Support unset when possible.
86 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
87   as_unset=unset
88 else
89   as_unset=false
90 fi
91
92
93 # IFS
94 # We need space, tab and new line, in precisely that order.  Quoting is
95 # there to prevent editors from complaining about space-tab.
96 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
97 # splitting by setting IFS to empty value.)
98 IFS=" ""        $as_nl"
99
100 # Find who we are.  Look in the path if we contain no directory separator.
101 case $0 in
102   *[\\/]* ) as_myself=$0 ;;
103   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
104 for as_dir in $PATH
105 do
106   IFS=$as_save_IFS
107   test -z "$as_dir" && as_dir=.
108   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
109 done
110 IFS=$as_save_IFS
111
112      ;;
113 esac
114 # We did not find ourselves, most probably we were run as `sh COMMAND'
115 # in which case we are not to be found in the path.
116 if test "x$as_myself" = x; then
117   as_myself=$0
118 fi
119 if test ! -f "$as_myself"; then
120   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
121   { (exit 1); exit 1; }
122 fi
123
124 # Work around bugs in pre-3.0 UWIN ksh.
125 for as_var in ENV MAIL MAILPATH
126 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
127 done
128 PS1='$ '
129 PS2='> '
130 PS4='+ '
131
132 # NLS nuisances.
133 LC_ALL=C
134 export LC_ALL
135 LANGUAGE=C
136 export LANGUAGE
137
138 # Required to use basename.
139 if expr a : '\(a\)' >/dev/null 2>&1 &&
140    test "X`expr 00001 : '.*\(...\)'`" = X001; then
141   as_expr=expr
142 else
143   as_expr=false
144 fi
145
146 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
147   as_basename=basename
148 else
149   as_basename=false
150 fi
151
152
153 # Name of the executable.
154 as_me=`$as_basename -- "$0" ||
155 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
156          X"$0" : 'X\(//\)$' \| \
157          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
158 $as_echo X/"$0" |
159     sed '/^.*\/\([^/][^/]*\)\/*$/{
160             s//\1/
161             q
162           }
163           /^X\/\(\/\/\)$/{
164             s//\1/
165             q
166           }
167           /^X\/\(\/\).*/{
168             s//\1/
169             q
170           }
171           s/.*/./; q'`
172
173 # CDPATH.
174 $as_unset CDPATH
175
176
177 if test "x$CONFIG_SHELL" = x; then
178   if (eval ":") 2>/dev/null; then
179   as_have_required=yes
180 else
181   as_have_required=no
182 fi
183
184   if test $as_have_required = yes &&     (eval ":
185 (as_func_return () {
186   (exit \$1)
187 }
188 as_func_success () {
189   as_func_return 0
190 }
191 as_func_failure () {
192   as_func_return 1
193 }
194 as_func_ret_success () {
195   return 0
196 }
197 as_func_ret_failure () {
198   return 1
199 }
200
201 exitcode=0
202 if as_func_success; then
203   :
204 else
205   exitcode=1
206   echo as_func_success failed.
207 fi
208
209 if as_func_failure; then
210   exitcode=1
211   echo as_func_failure succeeded.
212 fi
213
214 if as_func_ret_success; then
215   :
216 else
217   exitcode=1
218   echo as_func_ret_success failed.
219 fi
220
221 if as_func_ret_failure; then
222   exitcode=1
223   echo as_func_ret_failure succeeded.
224 fi
225
226 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
227   :
228 else
229   exitcode=1
230   echo positional parameters were not saved.
231 fi
232
233 test \$exitcode = 0) || { (exit 1); exit 1; }
234
235 (
236   as_lineno_1=\$LINENO
237   as_lineno_2=\$LINENO
238   test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
239   test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
240 ") 2> /dev/null; then
241   :
242 else
243   as_candidate_shells=
244     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
245 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
246 do
247   IFS=$as_save_IFS
248   test -z "$as_dir" && as_dir=.
249   case $as_dir in
250          /*)
251            for as_base in sh bash ksh sh5; do
252              as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
253            done;;
254        esac
255 done
256 IFS=$as_save_IFS
257
258
259       for as_shell in $as_candidate_shells $SHELL; do
260          # Try only shells that exist, to save several forks.
261          if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
262                 { ("$as_shell") 2> /dev/null <<\_ASEOF
263 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
264   emulate sh
265   NULLCMD=:
266   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
267   # is contrary to our usage.  Disable this feature.
268   alias -g '${1+"$@"}'='"$@"'
269   setopt NO_GLOB_SUBST
270 else
271   case `(set -o) 2>/dev/null` in
272   *posix*) set -o posix ;;
273 esac
274
275 fi
276
277
278 :
279 _ASEOF
280 }; then
281   CONFIG_SHELL=$as_shell
282                as_have_required=yes
283                if { "$as_shell" 2> /dev/null <<\_ASEOF
284 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
285   emulate sh
286   NULLCMD=:
287   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
288   # is contrary to our usage.  Disable this feature.
289   alias -g '${1+"$@"}'='"$@"'
290   setopt NO_GLOB_SUBST
291 else
292   case `(set -o) 2>/dev/null` in
293   *posix*) set -o posix ;;
294 esac
295
296 fi
297
298
299 :
300 (as_func_return () {
301   (exit $1)
302 }
303 as_func_success () {
304   as_func_return 0
305 }
306 as_func_failure () {
307   as_func_return 1
308 }
309 as_func_ret_success () {
310   return 0
311 }
312 as_func_ret_failure () {
313   return 1
314 }
315
316 exitcode=0
317 if as_func_success; then
318   :
319 else
320   exitcode=1
321   echo as_func_success failed.
322 fi
323
324 if as_func_failure; then
325   exitcode=1
326   echo as_func_failure succeeded.
327 fi
328
329 if as_func_ret_success; then
330   :
331 else
332   exitcode=1
333   echo as_func_ret_success failed.
334 fi
335
336 if as_func_ret_failure; then
337   exitcode=1
338   echo as_func_ret_failure succeeded.
339 fi
340
341 if ( set x; as_func_ret_success y && test x = "$1" ); then
342   :
343 else
344   exitcode=1
345   echo positional parameters were not saved.
346 fi
347
348 test $exitcode = 0) || { (exit 1); exit 1; }
349
350 (
351   as_lineno_1=$LINENO
352   as_lineno_2=$LINENO
353   test "x$as_lineno_1" != "x$as_lineno_2" &&
354   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
355
356 _ASEOF
357 }; then
358   break
359 fi
360
361 fi
362
363       done
364
365       if test "x$CONFIG_SHELL" != x; then
366   for as_var in BASH_ENV ENV
367         do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
368         done
369         export CONFIG_SHELL
370         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
371 fi
372
373
374     if test $as_have_required = no; then
375   echo This script requires a shell more modern than all the
376       echo shells that I found on your system.  Please install a
377       echo modern shell, or manually run the script under such a
378       echo shell if you do have one.
379       { (exit 1); exit 1; }
380 fi
381
382
383 fi
384
385 fi
386
387
388
389 (eval "as_func_return () {
390   (exit \$1)
391 }
392 as_func_success () {
393   as_func_return 0
394 }
395 as_func_failure () {
396   as_func_return 1
397 }
398 as_func_ret_success () {
399   return 0
400 }
401 as_func_ret_failure () {
402   return 1
403 }
404
405 exitcode=0
406 if as_func_success; then
407   :
408 else
409   exitcode=1
410   echo as_func_success failed.
411 fi
412
413 if as_func_failure; then
414   exitcode=1
415   echo as_func_failure succeeded.
416 fi
417
418 if as_func_ret_success; then
419   :
420 else
421   exitcode=1
422   echo as_func_ret_success failed.
423 fi
424
425 if as_func_ret_failure; then
426   exitcode=1
427   echo as_func_ret_failure succeeded.
428 fi
429
430 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
431   :
432 else
433   exitcode=1
434   echo positional parameters were not saved.
435 fi
436
437 test \$exitcode = 0") || {
438   echo No shell found that supports shell functions.
439   echo Please tell bug-autoconf@gnu.org about your system,
440   echo including any error possibly output before this message.
441   echo This can help us improve future autoconf versions.
442   echo Configuration will now proceed without shell functions.
443 }
444
445
446
447   as_lineno_1=$LINENO
448   as_lineno_2=$LINENO
449   test "x$as_lineno_1" != "x$as_lineno_2" &&
450   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
451
452   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
453   # uniformly replaced by the line number.  The first 'sed' inserts a
454   # line-number line after each line using $LINENO; the second 'sed'
455   # does the real work.  The second script uses 'N' to pair each
456   # line-number line with the line containing $LINENO, and appends
457   # trailing '-' during substitution so that $LINENO is not a special
458   # case at line end.
459   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
460   # scripts with optimization help from Paolo Bonzini.  Blame Lee
461   # E. McMahon (1931-1989) for sed's syntax.  :-)
462   sed -n '
463     p
464     /[$]LINENO/=
465   ' <$as_myself |
466     sed '
467       s/[$]LINENO.*/&-/
468       t lineno
469       b
470       :lineno
471       N
472       :loop
473       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
474       t loop
475       s/-\n.*//
476     ' >$as_me.lineno &&
477   chmod +x "$as_me.lineno" ||
478     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
479    { (exit 1); exit 1; }; }
480
481   # Don't try to exec as it changes $[0], causing all sort of problems
482   # (the dirname of $[0] is not the place where we might find the
483   # original and so on.  Autoconf is especially sensitive to this).
484   . "./$as_me.lineno"
485   # Exit status is that of the last command.
486   exit
487 }
488
489
490 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
491   as_dirname=dirname
492 else
493   as_dirname=false
494 fi
495
496 ECHO_C= ECHO_N= ECHO_T=
497 case `echo -n x` in
498 -n*)
499   case `echo 'x\c'` in
500   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
501   *)   ECHO_C='\c';;
502   esac;;
503 *)
504   ECHO_N='-n';;
505 esac
506 if expr a : '\(a\)' >/dev/null 2>&1 &&
507    test "X`expr 00001 : '.*\(...\)'`" = X001; then
508   as_expr=expr
509 else
510   as_expr=false
511 fi
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515   rm -f conf$$.dir/conf$$.file
516 else
517   rm -f conf$$.dir
518   mkdir conf$$.dir 2>/dev/null
519 fi
520 if (echo >conf$$.file) 2>/dev/null; then
521   if ln -s conf$$.file conf$$ 2>/dev/null; then
522     as_ln_s='ln -s'
523     # ... but there are two gotchas:
524     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526     # In both cases, we have to default to `cp -p'.
527     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528       as_ln_s='cp -p'
529   elif ln conf$$.file conf$$ 2>/dev/null; then
530     as_ln_s=ln
531   else
532     as_ln_s='cp -p'
533   fi
534 else
535   as_ln_s='cp -p'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541   as_mkdir_p=:
542 else
543   test -d ./-p && rmdir ./-p
544   as_mkdir_p=false
545 fi
546
547 if test -x / >/dev/null 2>&1; then
548   as_test_x='test -x'
549 else
550   if ls -dL / >/dev/null 2>&1; then
551     as_ls_L_option=L
552   else
553     as_ls_L_option=
554   fi
555   as_test_x='
556     eval sh -c '\''
557       if test -d "$1"; then
558         test -d "$1/.";
559       else
560         case $1 in
561         -*)set "./$1";;
562         esac;
563         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
564         ???[sx]*):;;*)false;;esac;fi
565     '\'' sh
566   '
567 fi
568 as_executable_p=$as_test_x
569
570 # Sed expression to map a string onto a valid CPP name.
571 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
572
573 # Sed expression to map a string onto a valid variable name.
574 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
575
576
577
578 exec 7<&0 </dev/null 6>&1
579
580 # Name of the host.
581 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
582 # so uname gets run too.
583 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
584
585 #
586 # Initializations.
587 #
588 ac_default_prefix=/usr/local
589 ac_clean_files=
590 ac_config_libobj_dir=.
591 LIBOBJS=
592 cross_compiling=no
593 subdirs=
594 MFLAGS=
595 MAKEFLAGS=
596 SHELL=${CONFIG_SHELL-/bin/sh}
597
598 # Identity of this package.
599 PACKAGE_NAME='PostgreSQL'
600 PACKAGE_TARNAME='postgresql'
601 PACKAGE_VERSION='9.4devel'
602 PACKAGE_STRING='PostgreSQL 9.4devel'
603 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
604
605 ac_unique_file="src/backend/access/common/heaptuple.c"
606 ac_default_prefix=/usr/local/pgsql
607 # Factoring default headers for most tests.
608 ac_includes_default="\
609 #include <stdio.h>
610 #ifdef HAVE_SYS_TYPES_H
611 # include <sys/types.h>
612 #endif
613 #ifdef HAVE_SYS_STAT_H
614 # include <sys/stat.h>
615 #endif
616 #ifdef STDC_HEADERS
617 # include <stdlib.h>
618 # include <stddef.h>
619 #else
620 # ifdef HAVE_STDLIB_H
621 #  include <stdlib.h>
622 # endif
623 #endif
624 #ifdef HAVE_STRING_H
625 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
626 #  include <memory.h>
627 # endif
628 # include <string.h>
629 #endif
630 #ifdef HAVE_STRINGS_H
631 # include <strings.h>
632 #endif
633 #ifdef HAVE_INTTYPES_H
634 # include <inttypes.h>
635 #endif
636 #ifdef HAVE_STDINT_H
637 # include <stdint.h>
638 #endif
639 #ifdef HAVE_UNISTD_H
640 # include <unistd.h>
641 #endif"
642
643 ac_subst_vars='LTLIBOBJS
644 vpath_build
645 OSX
646 XSLTPROC
647 COLLATEINDEX
648 DOCBOOKSTYLE
649 have_docbook
650 JADE
651 NSGMLS
652 TCL_SHLIB_LD_LIBS
653 TCL_SHARED_BUILD
654 TCL_LIB_SPEC
655 TCL_LIBS
656 TCL_LIB_FILE
657 TCL_INCLUDE_SPEC
658 TCL_CONFIG_SH
659 TCLSH
660 XGETTEXT
661 MSGMERGE
662 MSGFMT
663 HAVE_POSIX_SIGNALS
664 LDAP_LIBS_BE
665 LDAP_LIBS_FE
666 PTHREAD_CFLAGS
667 PTHREAD_LIBS
668 PTHREAD_CC
669 acx_pthread_config
670 have_win32_dbghelp
671 HAVE_IPV6
672 LIBOBJS
673 OSSP_UUID_LIBS
674 ZIC
675 python_enable_shared
676 python_additional_libs
677 python_libspec
678 python_libdir
679 python_includespec
680 python_version
681 python_majorversion
682 PYTHON
683 perl_embed_ldflags
684 perl_useshrplib
685 perl_privlibexp
686 perl_archlibexp
687 PERL
688 FLEXFLAGS
689 FLEX
690 BISONFLAGS
691 BISON
692 MKDIR_P
693 AWK
694 LN_S
695 TAR
696 install_bin
697 INSTALL_DATA
698 INSTALL_SCRIPT
699 INSTALL_PROGRAM
700 WINDRES
701 DLLWRAP
702 DLLTOOL
703 AR
704 STRIP_SHARED_LIB
705 STRIP_STATIC_LIB
706 STRIP
707 RANLIB
708 ld_R_works
709 with_gnu_ld
710 LD
711 LDFLAGS_SL
712 LDFLAGS_EX
713 ELF_SYS
714 EGREP
715 GREP
716 with_zlib
717 with_system_tzdata
718 with_libxslt
719 with_libxml
720 XML2_CONFIG
721 with_ossp_uuid
722 with_selinux
723 with_openssl
724 krb_srvtab
725 with_python
726 with_perl
727 with_tcl
728 enable_thread_safety
729 INCLUDES
730 autodepend
731 TAS
732 GCC
733 CPP
734 CFLAGS_VECTOR
735 SUN_STUDIO_CC
736 OBJEXT
737 EXEEXT
738 ac_ct_CC
739 CPPFLAGS
740 LDFLAGS
741 CFLAGS
742 CC
743 enable_dtrace
744 DTRACEFLAGS
745 DTRACE
746 enable_coverage
747 GENHTML
748 LCOV
749 GCOV
750 enable_debug
751 enable_rpath
752 default_port
753 WANTED_LANGUAGES
754 enable_nls
755 PORTNAME
756 host_os
757 host_vendor
758 host_cpu
759 host
760 build_os
761 build_vendor
762 build_cpu
763 build
764 PG_MAJORVERSION
765 configure_args
766 target_alias
767 host_alias
768 build_alias
769 LIBS
770 ECHO_T
771 ECHO_N
772 ECHO_C
773 DEFS
774 mandir
775 localedir
776 libdir
777 psdir
778 pdfdir
779 dvidir
780 htmldir
781 infodir
782 docdir
783 oldincludedir
784 includedir
785 localstatedir
786 sharedstatedir
787 sysconfdir
788 datadir
789 datarootdir
790 libexecdir
791 sbindir
792 bindir
793 program_transform_name
794 prefix
795 exec_prefix
796 PACKAGE_BUGREPORT
797 PACKAGE_STRING
798 PACKAGE_VERSION
799 PACKAGE_TARNAME
800 PACKAGE_NAME
801 PATH_SEPARATOR
802 SHELL'
803 ac_subst_files=''
804 ac_user_opts='
805 enable_option_checking
806 with_template
807 with_includes
808 with_libraries
809 with_libs
810 enable_integer_datetimes
811 enable_nls
812 with_pgport
813 enable_rpath
814 enable_spinlocks
815 enable_debug
816 enable_profiling
817 enable_coverage
818 enable_dtrace
819 with_blocksize
820 with_segsize
821 with_wal_blocksize
822 with_wal_segsize
823 with_CC
824 enable_depend
825 enable_cassert
826 enable_thread_safety
827 with_tcl
828 with_tclconfig
829 with_perl
830 with_python
831 with_gssapi
832 with_krb5
833 with_krb_srvnam
834 with_pam
835 with_ldap
836 with_bonjour
837 with_openssl
838 with_selinux
839 with_readline
840 with_libedit_preferred
841 with_ossp_uuid
842 with_libxml
843 with_libxslt
844 with_system_tzdata
845 with_zlib
846 with_gnu_ld
847 enable_largefile
848 enable_float4_byval
849 enable_float8_byval
850 '
851       ac_precious_vars='build_alias
852 host_alias
853 target_alias
854 CC
855 CFLAGS
856 LDFLAGS
857 LIBS
858 CPPFLAGS
859 CPP
860 LDFLAGS_EX
861 LDFLAGS_SL
862 DOCBOOKSTYLE'
863
864
865 # Initialize some variables set by options.
866 ac_init_help=
867 ac_init_version=false
868 ac_unrecognized_opts=
869 ac_unrecognized_sep=
870 # The variables have the same names as the options, with
871 # dashes changed to underlines.
872 cache_file=/dev/null
873 exec_prefix=NONE
874 no_create=
875 no_recursion=
876 prefix=NONE
877 program_prefix=NONE
878 program_suffix=NONE
879 program_transform_name=s,x,x,
880 silent=
881 site=
882 srcdir=
883 verbose=
884 x_includes=NONE
885 x_libraries=NONE
886
887 # Installation directory options.
888 # These are left unexpanded so users can "make install exec_prefix=/foo"
889 # and all the variables that are supposed to be based on exec_prefix
890 # by default will actually change.
891 # Use braces instead of parens because sh, perl, etc. also accept them.
892 # (The list follows the same order as the GNU Coding Standards.)
893 bindir='${exec_prefix}/bin'
894 sbindir='${exec_prefix}/sbin'
895 libexecdir='${exec_prefix}/libexec'
896 datarootdir='${prefix}/share'
897 datadir='${datarootdir}'
898 sysconfdir='${prefix}/etc'
899 sharedstatedir='${prefix}/com'
900 localstatedir='${prefix}/var'
901 includedir='${prefix}/include'
902 oldincludedir='/usr/include'
903 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
904 infodir='${datarootdir}/info'
905 htmldir='${docdir}'
906 dvidir='${docdir}'
907 pdfdir='${docdir}'
908 psdir='${docdir}'
909 libdir='${exec_prefix}/lib'
910 localedir='${datarootdir}/locale'
911 mandir='${datarootdir}/man'
912
913 ac_prev=
914 ac_dashdash=
915 for ac_option
916 do
917   # If the previous option needs an argument, assign it.
918   if test -n "$ac_prev"; then
919     eval $ac_prev=\$ac_option
920     ac_prev=
921     continue
922   fi
923
924   case $ac_option in
925   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
926   *)    ac_optarg=yes ;;
927   esac
928
929   # Accept the important Cygnus configure options, so we can diagnose typos.
930
931   case $ac_dashdash$ac_option in
932   --)
933     ac_dashdash=yes ;;
934
935   -bindir | --bindir | --bindi | --bind | --bin | --bi)
936     ac_prev=bindir ;;
937   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
938     bindir=$ac_optarg ;;
939
940   -build | --build | --buil | --bui | --bu)
941     ac_prev=build_alias ;;
942   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
943     build_alias=$ac_optarg ;;
944
945   -cache-file | --cache-file | --cache-fil | --cache-fi \
946   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
947     ac_prev=cache_file ;;
948   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
949   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
950     cache_file=$ac_optarg ;;
951
952   --config-cache | -C)
953     cache_file=config.cache ;;
954
955   -datadir | --datadir | --datadi | --datad)
956     ac_prev=datadir ;;
957   -datadir=* | --datadir=* | --datadi=* | --datad=*)
958     datadir=$ac_optarg ;;
959
960   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
961   | --dataroo | --dataro | --datar)
962     ac_prev=datarootdir ;;
963   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
964   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
965     datarootdir=$ac_optarg ;;
966
967   -disable-* | --disable-*)
968     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
969     # Reject names that are not valid shell variable names.
970     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
971       { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
972    { (exit 1); exit 1; }; }
973     ac_useropt_orig=$ac_useropt
974     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
975     case $ac_user_opts in
976       *"
977 "enable_$ac_useropt"
978 "*) ;;
979       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
980          ac_unrecognized_sep=', ';;
981     esac
982     eval enable_$ac_useropt=no ;;
983
984   -docdir | --docdir | --docdi | --doc | --do)
985     ac_prev=docdir ;;
986   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
987     docdir=$ac_optarg ;;
988
989   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
990     ac_prev=dvidir ;;
991   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
992     dvidir=$ac_optarg ;;
993
994   -enable-* | --enable-*)
995     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
996     # Reject names that are not valid shell variable names.
997     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
998       { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
999    { (exit 1); exit 1; }; }
1000     ac_useropt_orig=$ac_useropt
1001     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1002     case $ac_user_opts in
1003       *"
1004 "enable_$ac_useropt"
1005 "*) ;;
1006       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1007          ac_unrecognized_sep=', ';;
1008     esac
1009     eval enable_$ac_useropt=\$ac_optarg ;;
1010
1011   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1012   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1013   | --exec | --exe | --ex)
1014     ac_prev=exec_prefix ;;
1015   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1016   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1017   | --exec=* | --exe=* | --ex=*)
1018     exec_prefix=$ac_optarg ;;
1019
1020   -gas | --gas | --ga | --g)
1021     # Obsolete; use --with-gas.
1022     with_gas=yes ;;
1023
1024   -help | --help | --hel | --he | -h)
1025     ac_init_help=long ;;
1026   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1027     ac_init_help=recursive ;;
1028   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1029     ac_init_help=short ;;
1030
1031   -host | --host | --hos | --ho)
1032     ac_prev=host_alias ;;
1033   -host=* | --host=* | --hos=* | --ho=*)
1034     host_alias=$ac_optarg ;;
1035
1036   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1037     ac_prev=htmldir ;;
1038   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1039   | --ht=*)
1040     htmldir=$ac_optarg ;;
1041
1042   -includedir | --includedir | --includedi | --included | --include \
1043   | --includ | --inclu | --incl | --inc)
1044     ac_prev=includedir ;;
1045   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1046   | --includ=* | --inclu=* | --incl=* | --inc=*)
1047     includedir=$ac_optarg ;;
1048
1049   -infodir | --infodir | --infodi | --infod | --info | --inf)
1050     ac_prev=infodir ;;
1051   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1052     infodir=$ac_optarg ;;
1053
1054   -libdir | --libdir | --libdi | --libd)
1055     ac_prev=libdir ;;
1056   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1057     libdir=$ac_optarg ;;
1058
1059   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1060   | --libexe | --libex | --libe)
1061     ac_prev=libexecdir ;;
1062   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1063   | --libexe=* | --libex=* | --libe=*)
1064     libexecdir=$ac_optarg ;;
1065
1066   -localedir | --localedir | --localedi | --localed | --locale)
1067     ac_prev=localedir ;;
1068   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1069     localedir=$ac_optarg ;;
1070
1071   -localstatedir | --localstatedir | --localstatedi | --localstated \
1072   | --localstate | --localstat | --localsta | --localst | --locals)
1073     ac_prev=localstatedir ;;
1074   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1075   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1076     localstatedir=$ac_optarg ;;
1077
1078   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1079     ac_prev=mandir ;;
1080   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1081     mandir=$ac_optarg ;;
1082
1083   -nfp | --nfp | --nf)
1084     # Obsolete; use --without-fp.
1085     with_fp=no ;;
1086
1087   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1088   | --no-cr | --no-c | -n)
1089     no_create=yes ;;
1090
1091   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1092   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1093     no_recursion=yes ;;
1094
1095   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1096   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1097   | --oldin | --oldi | --old | --ol | --o)
1098     ac_prev=oldincludedir ;;
1099   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1100   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1101   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1102     oldincludedir=$ac_optarg ;;
1103
1104   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1105     ac_prev=prefix ;;
1106   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1107     prefix=$ac_optarg ;;
1108
1109   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1110   | --program-pre | --program-pr | --program-p)
1111     ac_prev=program_prefix ;;
1112   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1113   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1114     program_prefix=$ac_optarg ;;
1115
1116   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1117   | --program-suf | --program-su | --program-s)
1118     ac_prev=program_suffix ;;
1119   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1120   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1121     program_suffix=$ac_optarg ;;
1122
1123   -program-transform-name | --program-transform-name \
1124   | --program-transform-nam | --program-transform-na \
1125   | --program-transform-n | --program-transform- \
1126   | --program-transform | --program-transfor \
1127   | --program-transfo | --program-transf \
1128   | --program-trans | --program-tran \
1129   | --progr-tra | --program-tr | --program-t)
1130     ac_prev=program_transform_name ;;
1131   -program-transform-name=* | --program-transform-name=* \
1132   | --program-transform-nam=* | --program-transform-na=* \
1133   | --program-transform-n=* | --program-transform-=* \
1134   | --program-transform=* | --program-transfor=* \
1135   | --program-transfo=* | --program-transf=* \
1136   | --program-trans=* | --program-tran=* \
1137   | --progr-tra=* | --program-tr=* | --program-t=*)
1138     program_transform_name=$ac_optarg ;;
1139
1140   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1141     ac_prev=pdfdir ;;
1142   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1143     pdfdir=$ac_optarg ;;
1144
1145   -psdir | --psdir | --psdi | --psd | --ps)
1146     ac_prev=psdir ;;
1147   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1148     psdir=$ac_optarg ;;
1149
1150   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1151   | -silent | --silent | --silen | --sile | --sil)
1152     silent=yes ;;
1153
1154   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1155     ac_prev=sbindir ;;
1156   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1157   | --sbi=* | --sb=*)
1158     sbindir=$ac_optarg ;;
1159
1160   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1161   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1162   | --sharedst | --shareds | --shared | --share | --shar \
1163   | --sha | --sh)
1164     ac_prev=sharedstatedir ;;
1165   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1166   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1167   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1168   | --sha=* | --sh=*)
1169     sharedstatedir=$ac_optarg ;;
1170
1171   -site | --site | --sit)
1172     ac_prev=site ;;
1173   -site=* | --site=* | --sit=*)
1174     site=$ac_optarg ;;
1175
1176   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1177     ac_prev=srcdir ;;
1178   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1179     srcdir=$ac_optarg ;;
1180
1181   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1182   | --syscon | --sysco | --sysc | --sys | --sy)
1183     ac_prev=sysconfdir ;;
1184   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1185   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1186     sysconfdir=$ac_optarg ;;
1187
1188   -target | --target | --targe | --targ | --tar | --ta | --t)
1189     ac_prev=target_alias ;;
1190   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1191     target_alias=$ac_optarg ;;
1192
1193   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1194     verbose=yes ;;
1195
1196   -version | --version | --versio | --versi | --vers | -V)
1197     ac_init_version=: ;;
1198
1199   -with-* | --with-*)
1200     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1201     # Reject names that are not valid shell variable names.
1202     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1203       { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1204    { (exit 1); exit 1; }; }
1205     ac_useropt_orig=$ac_useropt
1206     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1207     case $ac_user_opts in
1208       *"
1209 "with_$ac_useropt"
1210 "*) ;;
1211       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1212          ac_unrecognized_sep=', ';;
1213     esac
1214     eval with_$ac_useropt=\$ac_optarg ;;
1215
1216   -without-* | --without-*)
1217     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1218     # Reject names that are not valid shell variable names.
1219     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1220       { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1221    { (exit 1); exit 1; }; }
1222     ac_useropt_orig=$ac_useropt
1223     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1224     case $ac_user_opts in
1225       *"
1226 "with_$ac_useropt"
1227 "*) ;;
1228       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1229          ac_unrecognized_sep=', ';;
1230     esac
1231     eval with_$ac_useropt=no ;;
1232
1233   --x)
1234     # Obsolete; use --with-x.
1235     with_x=yes ;;
1236
1237   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1238   | --x-incl | --x-inc | --x-in | --x-i)
1239     ac_prev=x_includes ;;
1240   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1241   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1242     x_includes=$ac_optarg ;;
1243
1244   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1245   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1246     ac_prev=x_libraries ;;
1247   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1248   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1249     x_libraries=$ac_optarg ;;
1250
1251   -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
1252 Try \`$0 --help' for more information." >&2
1253    { (exit 1); exit 1; }; }
1254     ;;
1255
1256   *=*)
1257     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1258     # Reject names that are not valid shell variable names.
1259     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1260       { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1261    { (exit 1); exit 1; }; }
1262     eval $ac_envvar=\$ac_optarg
1263     export $ac_envvar ;;
1264
1265   *)
1266     # FIXME: should be removed in autoconf 3.0.
1267     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1268     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1269       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1270     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1271     ;;
1272
1273   esac
1274 done
1275
1276 if test -n "$ac_prev"; then
1277   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1278   { $as_echo "$as_me: error: missing argument to $ac_option" >&2
1279    { (exit 1); exit 1; }; }
1280 fi
1281
1282 if test -n "$ac_unrecognized_opts"; then
1283   case $enable_option_checking in
1284     no) ;;
1285     fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
1286    { (exit 1); exit 1; }; } ;;
1287     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1288   esac
1289 fi
1290
1291 # Check all directory arguments for consistency.
1292 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1293                 datadir sysconfdir sharedstatedir localstatedir includedir \
1294                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1295                 libdir localedir mandir
1296 do
1297   eval ac_val=\$$ac_var
1298   # Remove trailing slashes.
1299   case $ac_val in
1300     */ )
1301       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1302       eval $ac_var=\$ac_val;;
1303   esac
1304   # Be sure to have absolute directory names.
1305   case $ac_val in
1306     [\\/$]* | ?:[\\/]* )  continue;;
1307     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1308   esac
1309   { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1310    { (exit 1); exit 1; }; }
1311 done
1312
1313 # There might be people who depend on the old broken behavior: `$host'
1314 # used to hold the argument of --host etc.
1315 # FIXME: To remove some day.
1316 build=$build_alias
1317 host=$host_alias
1318 target=$target_alias
1319
1320 # FIXME: To remove some day.
1321 if test "x$host_alias" != x; then
1322   if test "x$build_alias" = x; then
1323     cross_compiling=maybe
1324     $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1325     If a cross compiler is detected then cross compile mode will be used." >&2
1326   elif test "x$build_alias" != "x$host_alias"; then
1327     cross_compiling=yes
1328   fi
1329 fi
1330
1331 ac_tool_prefix=
1332 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1333
1334 test "$silent" = yes && exec 6>/dev/null
1335
1336
1337 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1338 ac_ls_di=`ls -di .` &&
1339 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1340   { $as_echo "$as_me: error: working directory cannot be determined" >&2
1341    { (exit 1); exit 1; }; }
1342 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1343   { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
1344    { (exit 1); exit 1; }; }
1345
1346
1347 # Find the source files, if location was not specified.
1348 if test -z "$srcdir"; then
1349   ac_srcdir_defaulted=yes
1350   # Try the directory containing this script, then the parent directory.
1351   ac_confdir=`$as_dirname -- "$as_myself" ||
1352 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1353          X"$as_myself" : 'X\(//\)[^/]' \| \
1354          X"$as_myself" : 'X\(//\)$' \| \
1355          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1356 $as_echo X"$as_myself" |
1357     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1358             s//\1/
1359             q
1360           }
1361           /^X\(\/\/\)[^/].*/{
1362             s//\1/
1363             q
1364           }
1365           /^X\(\/\/\)$/{
1366             s//\1/
1367             q
1368           }
1369           /^X\(\/\).*/{
1370             s//\1/
1371             q
1372           }
1373           s/.*/./; q'`
1374   srcdir=$ac_confdir
1375   if test ! -r "$srcdir/$ac_unique_file"; then
1376     srcdir=..
1377   fi
1378 else
1379   ac_srcdir_defaulted=no
1380 fi
1381 if test ! -r "$srcdir/$ac_unique_file"; then
1382   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1383   { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1384    { (exit 1); exit 1; }; }
1385 fi
1386 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1387 ac_abs_confdir=`(
1388         cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
1389    { (exit 1); exit 1; }; }
1390         pwd)`
1391 # When building in place, set srcdir=.
1392 if test "$ac_abs_confdir" = "$ac_pwd"; then
1393   srcdir=.
1394 fi
1395 # Remove unnecessary trailing slashes from srcdir.
1396 # Double slashes in file names in object file debugging info
1397 # mess up M-x gdb in Emacs.
1398 case $srcdir in
1399 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1400 esac
1401 for ac_var in $ac_precious_vars; do
1402   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1403   eval ac_env_${ac_var}_value=\$${ac_var}
1404   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1405   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1406 done
1407
1408 #
1409 # Report the --help message.
1410 #
1411 if test "$ac_init_help" = "long"; then
1412   # Omit some internal or obsolete options to make the list less imposing.
1413   # This message is too long to be a string in the A/UX 3.1 sh.
1414   cat <<_ACEOF
1415 \`configure' configures PostgreSQL 9.4devel to adapt to many kinds of systems.
1416
1417 Usage: $0 [OPTION]... [VAR=VALUE]...
1418
1419 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1420 VAR=VALUE.  See below for descriptions of some of the useful variables.
1421
1422 Defaults for the options are specified in brackets.
1423
1424 Configuration:
1425   -h, --help              display this help and exit
1426       --help=short        display options specific to this package
1427       --help=recursive    display the short help of all the included packages
1428   -V, --version           display version information and exit
1429   -q, --quiet, --silent   do not print \`checking...' messages
1430       --cache-file=FILE   cache test results in FILE [disabled]
1431   -C, --config-cache      alias for \`--cache-file=config.cache'
1432   -n, --no-create         do not create output files
1433       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1434
1435 Installation directories:
1436   --prefix=PREFIX         install architecture-independent files in PREFIX
1437                           [$ac_default_prefix]
1438   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1439                           [PREFIX]
1440
1441 By default, \`make install' will install all the files in
1442 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1443 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1444 for instance \`--prefix=\$HOME'.
1445
1446 For better control, use the options below.
1447
1448 Fine tuning of the installation directories:
1449   --bindir=DIR            user executables [EPREFIX/bin]
1450   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1451   --libexecdir=DIR        program executables [EPREFIX/libexec]
1452   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1453   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1454   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1455   --libdir=DIR            object code libraries [EPREFIX/lib]
1456   --includedir=DIR        C header files [PREFIX/include]
1457   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1458   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1459   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1460   --infodir=DIR           info documentation [DATAROOTDIR/info]
1461   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1462   --mandir=DIR            man documentation [DATAROOTDIR/man]
1463   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1464   --htmldir=DIR           html documentation [DOCDIR]
1465   --dvidir=DIR            dvi documentation [DOCDIR]
1466   --pdfdir=DIR            pdf documentation [DOCDIR]
1467   --psdir=DIR             ps documentation [DOCDIR]
1468 _ACEOF
1469
1470   cat <<\_ACEOF
1471
1472 System types:
1473   --build=BUILD     configure for building on BUILD [guessed]
1474   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1475 _ACEOF
1476 fi
1477
1478 if test -n "$ac_init_help"; then
1479   case $ac_init_help in
1480      short | recursive ) echo "Configuration of PostgreSQL 9.4devel:";;
1481    esac
1482   cat <<\_ACEOF
1483
1484 Optional Features:
1485   --disable-option-checking  ignore unrecognized --enable/--with options
1486   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1487   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1488   --disable-integer-datetimes
1489                           disable 64-bit integer date/time support
1490   --enable-nls[=LANGUAGES]
1491                           enable Native Language Support
1492   --disable-rpath         do not embed shared library search path in
1493                           executables
1494   --disable-spinlocks     do not use spinlocks
1495   --enable-debug          build with debugging symbols (-g)
1496   --enable-profiling      build with profiling enabled
1497   --enable-coverage       build with coverage testing instrumentation
1498   --enable-dtrace         build with DTrace support
1499   --enable-depend         turn on automatic dependency tracking
1500   --enable-cassert        enable assertion checks (for debugging)
1501   --disable-thread-safety disable thread-safety in client libraries
1502   --disable-largefile     omit support for large files
1503   --disable-float4-byval  disable float4 passed by value
1504   --disable-float8-byval  disable float8 passed by value
1505
1506 Optional Packages:
1507   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1508   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1509   --with-template=NAME    override operating system template
1510   --with-includes=DIRS    look for additional header files in DIRS
1511   --with-libraries=DIRS   look for additional libraries in DIRS
1512   --with-libs=DIRS        alternative spelling of --with-libraries
1513   --with-pgport=PORTNUM   set default port number [5432]
1514   --with-blocksize=BLOCKSIZE
1515                           set table block size in kB [8]
1516   --with-segsize=SEGSIZE  set table segment size in GB [1]
1517   --with-wal-blocksize=BLOCKSIZE
1518                           set WAL block size in kB [8]
1519   --with-wal-segsize=SEGSIZE
1520                           set WAL segment size in MB [16]
1521   --with-CC=CMD           set compiler (deprecated)
1522   --with-tcl              build Tcl modules (PL/Tcl)
1523   --with-tclconfig=DIR    tclConfig.sh is in DIR
1524   --with-perl             build Perl modules (PL/Perl)
1525   --with-python           build Python modules (PL/Python)
1526   --with-gssapi           build with GSSAPI support
1527   --with-krb5             build with Kerberos 5 support
1528   --with-krb-srvnam=NAME  default service principal name in Kerberos
1529                           [postgres]
1530   --with-pam              build with PAM support
1531   --with-ldap             build with LDAP support
1532   --with-bonjour          build with Bonjour support
1533   --with-openssl          build with OpenSSL support
1534   --with-selinux          build with SELinux support
1535   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1536   --with-libedit-preferred
1537                           prefer BSD Libedit over GNU Readline
1538   --with-ossp-uuid        build contrib/uuid-ossp, requires OSSP UUID library
1539   --with-libxml           build with XML support
1540   --with-libxslt          use XSLT support when building contrib/xml2
1541   --with-system-tzdata=DIR
1542                           use system time zone data in DIR
1543   --without-zlib          do not use Zlib
1544   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1545
1546 Some influential environment variables:
1547   CC          C compiler command
1548   CFLAGS      C compiler flags
1549   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1550               nonstandard directory <lib dir>
1551   LIBS        libraries to pass to the linker, e.g. -l<library>
1552   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1553               you have headers in a nonstandard directory <include dir>
1554   CPP         C preprocessor
1555   LDFLAGS_EX  extra linker flags for linking executables only
1556   LDFLAGS_SL  extra linker flags for linking shared libraries only
1557   DOCBOOKSTYLE
1558               location of DocBook stylesheets
1559
1560 Use these variables to override the choices made by `configure' or to help
1561 it to find libraries and programs with nonstandard names/locations.
1562
1563 Report bugs to <pgsql-bugs@postgresql.org>.
1564 _ACEOF
1565 ac_status=$?
1566 fi
1567
1568 if test "$ac_init_help" = "recursive"; then
1569   # If there are subdirs, report their specific --help.
1570   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1571     test -d "$ac_dir" ||
1572       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1573       continue
1574     ac_builddir=.
1575
1576 case "$ac_dir" in
1577 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1578 *)
1579   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1580   # A ".." for each directory in $ac_dir_suffix.
1581   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1582   case $ac_top_builddir_sub in
1583   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1584   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1585   esac ;;
1586 esac
1587 ac_abs_top_builddir=$ac_pwd
1588 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1589 # for backward compatibility:
1590 ac_top_builddir=$ac_top_build_prefix
1591
1592 case $srcdir in
1593   .)  # We are building in place.
1594     ac_srcdir=.
1595     ac_top_srcdir=$ac_top_builddir_sub
1596     ac_abs_top_srcdir=$ac_pwd ;;
1597   [\\/]* | ?:[\\/]* )  # Absolute name.
1598     ac_srcdir=$srcdir$ac_dir_suffix;
1599     ac_top_srcdir=$srcdir
1600     ac_abs_top_srcdir=$srcdir ;;
1601   *) # Relative name.
1602     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1603     ac_top_srcdir=$ac_top_build_prefix$srcdir
1604     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1605 esac
1606 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1607
1608     cd "$ac_dir" || { ac_status=$?; continue; }
1609     # Check for guested configure.
1610     if test -f "$ac_srcdir/configure.gnu"; then
1611       echo &&
1612       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1613     elif test -f "$ac_srcdir/configure"; then
1614       echo &&
1615       $SHELL "$ac_srcdir/configure" --help=recursive
1616     else
1617       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1618     fi || ac_status=$?
1619     cd "$ac_pwd" || { ac_status=$?; break; }
1620   done
1621 fi
1622
1623 test -n "$ac_init_help" && exit $ac_status
1624 if $ac_init_version; then
1625   cat <<\_ACEOF
1626 PostgreSQL configure 9.4devel
1627 generated by GNU Autoconf 2.63
1628
1629 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1630 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1631 This configure script is free software; the Free Software Foundation
1632 gives unlimited permission to copy, distribute and modify it.
1633
1634 Copyright (c) 1996-2013, PostgreSQL Global Development Group
1635 _ACEOF
1636   exit
1637 fi
1638 cat >config.log <<_ACEOF
1639 This file contains any messages produced by compilers while
1640 running configure, to aid debugging if configure makes a mistake.
1641
1642 It was created by PostgreSQL $as_me 9.4devel, which was
1643 generated by GNU Autoconf 2.63.  Invocation command line was
1644
1645   $ $0 $@
1646
1647 _ACEOF
1648 exec 5>>config.log
1649 {
1650 cat <<_ASUNAME
1651 ## --------- ##
1652 ## Platform. ##
1653 ## --------- ##
1654
1655 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1656 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1657 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1658 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1659 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1660
1661 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1662 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1663
1664 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1665 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1666 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1667 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1668 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1669 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1670 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1671
1672 _ASUNAME
1673
1674 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1675 for as_dir in $PATH
1676 do
1677   IFS=$as_save_IFS
1678   test -z "$as_dir" && as_dir=.
1679   $as_echo "PATH: $as_dir"
1680 done
1681 IFS=$as_save_IFS
1682
1683 } >&5
1684
1685 cat >&5 <<_ACEOF
1686
1687
1688 ## ----------- ##
1689 ## Core tests. ##
1690 ## ----------- ##
1691
1692 _ACEOF
1693
1694
1695 # Keep a trace of the command line.
1696 # Strip out --no-create and --no-recursion so they do not pile up.
1697 # Strip out --silent because we don't want to record it for future runs.
1698 # Also quote any args containing shell meta-characters.
1699 # Make two passes to allow for proper duplicate-argument suppression.
1700 ac_configure_args=
1701 ac_configure_args0=
1702 ac_configure_args1=
1703 ac_must_keep_next=false
1704 for ac_pass in 1 2
1705 do
1706   for ac_arg
1707   do
1708     case $ac_arg in
1709     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1710     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1711     | -silent | --silent | --silen | --sile | --sil)
1712       continue ;;
1713     *\'*)
1714       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1715     esac
1716     case $ac_pass in
1717     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1718     2)
1719       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1720       if test $ac_must_keep_next = true; then
1721         ac_must_keep_next=false # Got value, back to normal.
1722       else
1723         case $ac_arg in
1724           *=* | --config-cache | -C | -disable-* | --disable-* \
1725           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1726           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1727           | -with-* | --with-* | -without-* | --without-* | --x)
1728             case "$ac_configure_args0 " in
1729               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1730             esac
1731             ;;
1732           -* ) ac_must_keep_next=true ;;
1733         esac
1734       fi
1735       ac_configure_args="$ac_configure_args '$ac_arg'"
1736       ;;
1737     esac
1738   done
1739 done
1740 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1741 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1742
1743 # When interrupted or exit'd, cleanup temporary files, and complete
1744 # config.log.  We remove comments because anyway the quotes in there
1745 # would cause problems or look ugly.
1746 # WARNING: Use '\'' to represent an apostrophe within the trap.
1747 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1748 trap 'exit_status=$?
1749   # Save into config.log some information that might help in debugging.
1750   {
1751     echo
1752
1753     cat <<\_ASBOX
1754 ## ---------------- ##
1755 ## Cache variables. ##
1756 ## ---------------- ##
1757 _ASBOX
1758     echo
1759     # The following way of writing the cache mishandles newlines in values,
1760 (
1761   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1762     eval ac_val=\$$ac_var
1763     case $ac_val in #(
1764     *${as_nl}*)
1765       case $ac_var in #(
1766       *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
1767 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1768       esac
1769       case $ac_var in #(
1770       _ | IFS | as_nl) ;; #(
1771       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1772       *) $as_unset $ac_var ;;
1773       esac ;;
1774     esac
1775   done
1776   (set) 2>&1 |
1777     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1778     *${as_nl}ac_space=\ *)
1779       sed -n \
1780         "s/'\''/'\''\\\\'\'''\''/g;
1781           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1782       ;; #(
1783     *)
1784       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1785       ;;
1786     esac |
1787     sort
1788 )
1789     echo
1790
1791     cat <<\_ASBOX
1792 ## ----------------- ##
1793 ## Output variables. ##
1794 ## ----------------- ##
1795 _ASBOX
1796     echo
1797     for ac_var in $ac_subst_vars
1798     do
1799       eval ac_val=\$$ac_var
1800       case $ac_val in
1801       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1802       esac
1803       $as_echo "$ac_var='\''$ac_val'\''"
1804     done | sort
1805     echo
1806
1807     if test -n "$ac_subst_files"; then
1808       cat <<\_ASBOX
1809 ## ------------------- ##
1810 ## File substitutions. ##
1811 ## ------------------- ##
1812 _ASBOX
1813       echo
1814       for ac_var in $ac_subst_files
1815       do
1816         eval ac_val=\$$ac_var
1817         case $ac_val in
1818         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1819         esac
1820         $as_echo "$ac_var='\''$ac_val'\''"
1821       done | sort
1822       echo
1823     fi
1824
1825     if test -s confdefs.h; then
1826       cat <<\_ASBOX
1827 ## ----------- ##
1828 ## confdefs.h. ##
1829 ## ----------- ##
1830 _ASBOX
1831       echo
1832       cat confdefs.h
1833       echo
1834     fi
1835     test "$ac_signal" != 0 &&
1836       $as_echo "$as_me: caught signal $ac_signal"
1837     $as_echo "$as_me: exit $exit_status"
1838   } >&5
1839   rm -f core *.core core.conftest.* &&
1840     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1841     exit $exit_status
1842 ' 0
1843 for ac_signal in 1 2 13 15; do
1844   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1845 done
1846 ac_signal=0
1847
1848 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1849 rm -f -r conftest* confdefs.h
1850
1851 # Predefined preprocessor variables.
1852
1853 cat >>confdefs.h <<_ACEOF
1854 #define PACKAGE_NAME "$PACKAGE_NAME"
1855 _ACEOF
1856
1857
1858 cat >>confdefs.h <<_ACEOF
1859 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1860 _ACEOF
1861
1862
1863 cat >>confdefs.h <<_ACEOF
1864 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1865 _ACEOF
1866
1867
1868 cat >>confdefs.h <<_ACEOF
1869 #define PACKAGE_STRING "$PACKAGE_STRING"
1870 _ACEOF
1871
1872
1873 cat >>confdefs.h <<_ACEOF
1874 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1875 _ACEOF
1876
1877
1878 # Let the site file select an alternate cache file if it wants to.
1879 # Prefer an explicitly selected file to automatically selected ones.
1880 ac_site_file1=NONE
1881 ac_site_file2=NONE
1882 if test -n "$CONFIG_SITE"; then
1883   ac_site_file1=$CONFIG_SITE
1884 elif test "x$prefix" != xNONE; then
1885   ac_site_file1=$prefix/share/config.site
1886   ac_site_file2=$prefix/etc/config.site
1887 else
1888   ac_site_file1=$ac_default_prefix/share/config.site
1889   ac_site_file2=$ac_default_prefix/etc/config.site
1890 fi
1891 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1892 do
1893   test "x$ac_site_file" = xNONE && continue
1894   if test -r "$ac_site_file"; then
1895     { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1896 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
1897     sed 's/^/| /' "$ac_site_file" >&5
1898     . "$ac_site_file"
1899   fi
1900 done
1901
1902 if test -r "$cache_file"; then
1903   # Some versions of bash will fail to source /dev/null (special
1904   # files actually), so we avoid doing that.
1905   if test -f "$cache_file"; then
1906     { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
1907 $as_echo "$as_me: loading cache $cache_file" >&6;}
1908     case $cache_file in
1909       [\\/]* | ?:[\\/]* ) . "$cache_file";;
1910       *)                      . "./$cache_file";;
1911     esac
1912   fi
1913 else
1914   { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
1915 $as_echo "$as_me: creating cache $cache_file" >&6;}
1916   >$cache_file
1917 fi
1918
1919 # Check that the precious variables saved in the cache have kept the same
1920 # value.
1921 ac_cache_corrupted=false
1922 for ac_var in $ac_precious_vars; do
1923   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1924   eval ac_new_set=\$ac_env_${ac_var}_set
1925   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1926   eval ac_new_val=\$ac_env_${ac_var}_value
1927   case $ac_old_set,$ac_new_set in
1928     set,)
1929       { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1930 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1931       ac_cache_corrupted=: ;;
1932     ,set)
1933       { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1934 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1935       ac_cache_corrupted=: ;;
1936     ,);;
1937     *)
1938       if test "x$ac_old_val" != "x$ac_new_val"; then
1939         # differences in whitespace do not lead to failure.
1940         ac_old_val_w=`echo x $ac_old_val`
1941         ac_new_val_w=`echo x $ac_new_val`
1942         if test "$ac_old_val_w" != "$ac_new_val_w"; then
1943           { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1944 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1945           ac_cache_corrupted=:
1946         else
1947           { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1948 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1949           eval $ac_var=\$ac_old_val
1950         fi
1951         { $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
1952 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
1953         { $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
1954 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
1955       fi;;
1956   esac
1957   # Pass precious variables to config.status.
1958   if test "$ac_new_set" = set; then
1959     case $ac_new_val in
1960     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1961     *) ac_arg=$ac_var=$ac_new_val ;;
1962     esac
1963     case " $ac_configure_args " in
1964       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1965       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1966     esac
1967   fi
1968 done
1969 if $ac_cache_corrupted; then
1970   { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1971 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1972   { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1973 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1974   { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1975 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1976    { (exit 1); exit 1; }; }
1977 fi
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003 ac_ext=c
2004 ac_cpp='$CPP $CPPFLAGS'
2005 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2006 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2007 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2008
2009
2010
2011
2012
2013
2014 ac_aux_dir=
2015 for ac_dir in config "$srcdir"/config; do
2016   if test -f "$ac_dir/install-sh"; then
2017     ac_aux_dir=$ac_dir
2018     ac_install_sh="$ac_aux_dir/install-sh -c"
2019     break
2020   elif test -f "$ac_dir/install.sh"; then
2021     ac_aux_dir=$ac_dir
2022     ac_install_sh="$ac_aux_dir/install.sh -c"
2023     break
2024   elif test -f "$ac_dir/shtool"; then
2025     ac_aux_dir=$ac_dir
2026     ac_install_sh="$ac_aux_dir/shtool install -c"
2027     break
2028   fi
2029 done
2030 if test -z "$ac_aux_dir"; then
2031   { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5
2032 $as_echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;}
2033    { (exit 1); exit 1; }; }
2034 fi
2035
2036 # These three variables are undocumented and unsupported,
2037 # and are intended to be withdrawn in a future Autoconf release.
2038 # They can cause serious problems if a builder's source tree is in a directory
2039 # whose full name contains unusual characters.
2040 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2041 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2042 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2043
2044
2045
2046 configure_args=$ac_configure_args
2047
2048
2049
2050 cat >>confdefs.h <<_ACEOF
2051 #define PG_VERSION "$PACKAGE_VERSION"
2052 _ACEOF
2053
2054 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
2055
2056
2057 cat >>confdefs.h <<_ACEOF
2058 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2059 _ACEOF
2060
2061
2062 # Make sure we can run config.sub.
2063 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2064   { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2065 $as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
2066    { (exit 1); exit 1; }; }
2067
2068 { $as_echo "$as_me:$LINENO: checking build system type" >&5
2069 $as_echo_n "checking build system type... " >&6; }
2070 if test "${ac_cv_build+set}" = set; then
2071   $as_echo_n "(cached) " >&6
2072 else
2073   ac_build_alias=$build_alias
2074 test "x$ac_build_alias" = x &&
2075   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2076 test "x$ac_build_alias" = x &&
2077   { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2078 $as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2079    { (exit 1); exit 1; }; }
2080 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2081   { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2082 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2083    { (exit 1); exit 1; }; }
2084
2085 fi
2086 { $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2087 $as_echo "$ac_cv_build" >&6; }
2088 case $ac_cv_build in
2089 *-*-*) ;;
2090 *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2091 $as_echo "$as_me: error: invalid value of canonical build" >&2;}
2092    { (exit 1); exit 1; }; };;
2093 esac
2094 build=$ac_cv_build
2095 ac_save_IFS=$IFS; IFS='-'
2096 set x $ac_cv_build
2097 shift
2098 build_cpu=$1
2099 build_vendor=$2
2100 shift; shift
2101 # Remember, the first character of IFS is used to create $*,
2102 # except with old shells:
2103 build_os=$*
2104 IFS=$ac_save_IFS
2105 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2106
2107
2108 { $as_echo "$as_me:$LINENO: checking host system type" >&5
2109 $as_echo_n "checking host system type... " >&6; }
2110 if test "${ac_cv_host+set}" = set; then
2111   $as_echo_n "(cached) " >&6
2112 else
2113   if test "x$host_alias" = x; then
2114   ac_cv_host=$ac_cv_build
2115 else
2116   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2117     { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2118 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2119    { (exit 1); exit 1; }; }
2120 fi
2121
2122 fi
2123 { $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2124 $as_echo "$ac_cv_host" >&6; }
2125 case $ac_cv_host in
2126 *-*-*) ;;
2127 *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2128 $as_echo "$as_me: error: invalid value of canonical host" >&2;}
2129    { (exit 1); exit 1; }; };;
2130 esac
2131 host=$ac_cv_host
2132 ac_save_IFS=$IFS; IFS='-'
2133 set x $ac_cv_host
2134 shift
2135 host_cpu=$1
2136 host_vendor=$2
2137 shift; shift
2138 # Remember, the first character of IFS is used to create $*,
2139 # except with old shells:
2140 host_os=$*
2141 IFS=$ac_save_IFS
2142 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2143
2144
2145
2146 template=
2147 { $as_echo "$as_me:$LINENO: checking which template to use" >&5
2148 $as_echo_n "checking which template to use... " >&6; }
2149
2150
2151
2152
2153 # Check whether --with-template was given.
2154 if test "${with_template+set}" = set; then
2155   withval=$with_template;
2156   case $withval in
2157     yes)
2158       { { $as_echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
2159 $as_echo "$as_me: error: argument required for --with-template option" >&2;}
2160    { (exit 1); exit 1; }; }
2161       ;;
2162     no)
2163       { { $as_echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
2164 $as_echo "$as_me: error: argument required for --with-template option" >&2;}
2165    { (exit 1); exit 1; }; }
2166       ;;
2167     *)
2168
2169   case $withval in
2170     list)   echo; ls "$srcdir/src/template"; exit;;
2171     *)      if test -f "$srcdir/src/template/$with_template" ; then
2172               template=$withval
2173             else
2174               { { $as_echo "$as_me:$LINENO: error: '$withval' is not a valid template name. Use 'list' for a list." >&5
2175 $as_echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a list." >&2;}
2176    { (exit 1); exit 1; }; }
2177             fi;;
2178   esac
2179
2180       ;;
2181   esac
2182
2183 else
2184
2185 # --with-template not given
2186
2187 case $host_os in
2188      aix*) template=aix ;;
2189   cygwin*) template=cygwin ;;
2190   darwin*) template=darwin ;;
2191 dragonfly*) template=netbsd ;;
2192  freebsd*) template=freebsd ;;
2193     hpux*) template=hpux ;;
2194     irix*) template=irix ;;
2195  linux*|gnu*|k*bsd*-gnu)
2196            template=linux ;;
2197    mingw*) template=win32 ;;
2198   netbsd*) template=netbsd ;;
2199  openbsd*) template=openbsd ;;
2200      osf*) template=osf ;;
2201      sco*) template=sco ;;
2202  solaris*) template=solaris ;;
2203    sysv5*) template=unixware ;;
2204 esac
2205
2206   if test x"$template" = x"" ; then
2207     { { $as_echo "$as_me:$LINENO: error:
2208 *******************************************************************
2209 PostgreSQL has apparently not been ported to your platform yet.
2210 To try a manual configuration, look into the src/template directory
2211 for a similar platform and use the '--with-template=' option.
2212
2213 Please also contact <pgsql-bugs@postgresql.org> to see about
2214 rectifying this.  Include the above 'checking host system type...'
2215 line.
2216 *******************************************************************
2217 " >&5
2218 $as_echo "$as_me: error:
2219 *******************************************************************
2220 PostgreSQL has apparently not been ported to your platform yet.
2221 To try a manual configuration, look into the src/template directory
2222 for a similar platform and use the '--with-template=' option.
2223
2224 Please also contact <pgsql-bugs@postgresql.org> to see about
2225 rectifying this.  Include the above 'checking host system type...'
2226 line.
2227 *******************************************************************
2228 " >&2;}
2229    { (exit 1); exit 1; }; }
2230   fi
2231
2232
2233 fi
2234
2235
2236
2237 { $as_echo "$as_me:$LINENO: result: $template" >&5
2238 $as_echo "$template" >&6; }
2239
2240 PORTNAME=$template
2241
2242
2243 # Initialize default assumption that we do not need separate assembly code
2244 # for TAS (test-and-set).  This can be overridden by the template file
2245 # when it's executed.
2246 need_tas=no
2247 tas_file=dummy.s
2248
2249
2250
2251 ##
2252 ## Command line options
2253 ##
2254
2255 #
2256 # Add non-standard directories to the include path
2257 #
2258
2259
2260
2261 # Check whether --with-includes was given.
2262 if test "${with_includes+set}" = set; then
2263   withval=$with_includes;
2264   case $withval in
2265     yes)
2266       { { $as_echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
2267 $as_echo "$as_me: error: argument required for --with-includes option" >&2;}
2268    { (exit 1); exit 1; }; }
2269       ;;
2270     no)
2271       { { $as_echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
2272 $as_echo "$as_me: error: argument required for --with-includes option" >&2;}
2273    { (exit 1); exit 1; }; }
2274       ;;
2275     *)
2276
2277       ;;
2278   esac
2279
2280 fi
2281
2282
2283
2284
2285 #
2286 # Add non-standard directories to the library search path
2287 #
2288
2289
2290
2291 # Check whether --with-libraries was given.
2292 if test "${with_libraries+set}" = set; then
2293   withval=$with_libraries;
2294   case $withval in
2295     yes)
2296       { { $as_echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
2297 $as_echo "$as_me: error: argument required for --with-libraries option" >&2;}
2298    { (exit 1); exit 1; }; }
2299       ;;
2300     no)
2301       { { $as_echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
2302 $as_echo "$as_me: error: argument required for --with-libraries option" >&2;}
2303    { (exit 1); exit 1; }; }
2304       ;;
2305     *)
2306       LIBRARY_DIRS=$withval
2307       ;;
2308   esac
2309
2310 fi
2311
2312
2313
2314
2315
2316
2317 # Check whether --with-libs was given.
2318 if test "${with_libs+set}" = set; then
2319   withval=$with_libs;
2320   case $withval in
2321     yes)
2322       { { $as_echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
2323 $as_echo "$as_me: error: argument required for --with-libs option" >&2;}
2324    { (exit 1); exit 1; }; }
2325       ;;
2326     no)
2327       { { $as_echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
2328 $as_echo "$as_me: error: argument required for --with-libs option" >&2;}
2329    { (exit 1); exit 1; }; }
2330       ;;
2331     *)
2332       LIBRARY_DIRS=$withval
2333       ;;
2334   esac
2335
2336 fi
2337
2338
2339
2340
2341 #
2342 # 64-bit integer date/time storage: enabled by default.
2343 #
2344 { $as_echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time support" >&5
2345 $as_echo_n "checking whether to build with 64-bit integer date/time support... " >&6; }
2346
2347
2348 # Check whether --enable-integer-datetimes was given.
2349 if test "${enable_integer_datetimes+set}" = set; then
2350   enableval=$enable_integer_datetimes;
2351   case $enableval in
2352     yes)
2353
2354 cat >>confdefs.h <<\_ACEOF
2355 #define USE_INTEGER_DATETIMES 1
2356 _ACEOF
2357
2358       ;;
2359     no)
2360       :
2361       ;;
2362     *)
2363       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-integer-datetimes option" >&5
2364 $as_echo "$as_me: error: no argument expected for --enable-integer-datetimes option" >&2;}
2365    { (exit 1); exit 1; }; }
2366       ;;
2367   esac
2368
2369 else
2370   enable_integer_datetimes=yes
2371
2372 cat >>confdefs.h <<\_ACEOF
2373 #define USE_INTEGER_DATETIMES 1
2374 _ACEOF
2375
2376 fi
2377
2378
2379 { $as_echo "$as_me:$LINENO: result: $enable_integer_datetimes" >&5
2380 $as_echo "$enable_integer_datetimes" >&6; }
2381
2382
2383 #
2384 # NLS
2385 #
2386 { $as_echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
2387 $as_echo_n "checking whether NLS is wanted... " >&6; }
2388
2389
2390 # Check whether --enable-nls was given.
2391 if test "${enable_nls+set}" = set; then
2392   enableval=$enable_nls;
2393   case $enableval in
2394     yes)
2395       :
2396       ;;
2397     no)
2398       :
2399       ;;
2400     *)
2401       enable_nls=yes
2402 WANTED_LANGUAGES=$enableval
2403       ;;
2404   esac
2405
2406 else
2407   enable_nls=no
2408 fi
2409
2410
2411
2412 if test "$enable_nls" = yes; then
2413
2414 cat >>confdefs.h <<\_ACEOF
2415 #define ENABLE_NLS 1
2416 _ACEOF
2417
2418 fi
2419
2420 { $as_echo "$as_me:$LINENO: result: $enable_nls" >&5
2421 $as_echo "$enable_nls" >&6; }
2422
2423
2424
2425 #
2426 # Default port number (--with-pgport), default 5432
2427 #
2428 { $as_echo "$as_me:$LINENO: checking for default port number" >&5
2429 $as_echo_n "checking for default port number... " >&6; }
2430
2431
2432
2433 # Check whether --with-pgport was given.
2434 if test "${with_pgport+set}" = set; then
2435   withval=$with_pgport;
2436   case $withval in
2437     yes)
2438       { { $as_echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
2439 $as_echo "$as_me: error: argument required for --with-pgport option" >&2;}
2440    { (exit 1); exit 1; }; }
2441       ;;
2442     no)
2443       { { $as_echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
2444 $as_echo "$as_me: error: argument required for --with-pgport option" >&2;}
2445    { (exit 1); exit 1; }; }
2446       ;;
2447     *)
2448       default_port=$withval
2449       ;;
2450   esac
2451
2452 else
2453   default_port=5432
2454 fi
2455
2456
2457 { $as_echo "$as_me:$LINENO: result: $default_port" >&5
2458 $as_echo "$default_port" >&6; }
2459 # Need both of these because some places want an integer and some a string
2460
2461 cat >>confdefs.h <<_ACEOF
2462 #define DEF_PGPORT ${default_port}
2463 _ACEOF
2464
2465
2466 cat >>confdefs.h <<_ACEOF
2467 #define DEF_PGPORT_STR "${default_port}"
2468 _ACEOF
2469
2470
2471
2472 #
2473 # '-rpath'-like feature can be disabled
2474 #
2475
2476
2477 # Check whether --enable-rpath was given.
2478 if test "${enable_rpath+set}" = set; then
2479   enableval=$enable_rpath;
2480   case $enableval in
2481     yes)
2482       :
2483       ;;
2484     no)
2485       :
2486       ;;
2487     *)
2488       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-rpath option" >&5
2489 $as_echo "$as_me: error: no argument expected for --enable-rpath option" >&2;}
2490    { (exit 1); exit 1; }; }
2491       ;;
2492   esac
2493
2494 else
2495   enable_rpath=yes
2496
2497 fi
2498
2499
2500
2501
2502 #
2503 # Spinlocks
2504 #
2505
2506
2507 # Check whether --enable-spinlocks was given.
2508 if test "${enable_spinlocks+set}" = set; then
2509   enableval=$enable_spinlocks;
2510   case $enableval in
2511     yes)
2512       :
2513       ;;
2514     no)
2515       :
2516       ;;
2517     *)
2518       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-spinlocks option" >&5
2519 $as_echo "$as_me: error: no argument expected for --enable-spinlocks option" >&2;}
2520    { (exit 1); exit 1; }; }
2521       ;;
2522   esac
2523
2524 else
2525   enable_spinlocks=yes
2526
2527 fi
2528
2529
2530
2531 #
2532 # --enable-debug adds -g to compiler flags
2533 #
2534
2535
2536 # Check whether --enable-debug was given.
2537 if test "${enable_debug+set}" = set; then
2538   enableval=$enable_debug;
2539   case $enableval in
2540     yes)
2541       :
2542       ;;
2543     no)
2544       :
2545       ;;
2546     *)
2547       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-debug option" >&5
2548 $as_echo "$as_me: error: no argument expected for --enable-debug option" >&2;}
2549    { (exit 1); exit 1; }; }
2550       ;;
2551   esac
2552
2553 else
2554   enable_debug=no
2555
2556 fi
2557
2558
2559
2560
2561 #
2562 # --enable-profiling enables gcc profiling
2563 #
2564
2565
2566 # Check whether --enable-profiling was given.
2567 if test "${enable_profiling+set}" = set; then
2568   enableval=$enable_profiling;
2569   case $enableval in
2570     yes)
2571       :
2572       ;;
2573     no)
2574       :
2575       ;;
2576     *)
2577       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-profiling option" >&5
2578 $as_echo "$as_me: error: no argument expected for --enable-profiling option" >&2;}
2579    { (exit 1); exit 1; }; }
2580       ;;
2581   esac
2582
2583 else
2584   enable_profiling=no
2585
2586 fi
2587
2588
2589
2590 #
2591 # --enable-coverage enables generation of code coverage metrics with gcov
2592 #
2593
2594
2595 # Check whether --enable-coverage was given.
2596 if test "${enable_coverage+set}" = set; then
2597   enableval=$enable_coverage;
2598   case $enableval in
2599     yes)
2600       for ac_prog in gcov
2601 do
2602   # Extract the first word of "$ac_prog", so it can be a program name with args.
2603 set dummy $ac_prog; ac_word=$2
2604 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2605 $as_echo_n "checking for $ac_word... " >&6; }
2606 if test "${ac_cv_prog_GCOV+set}" = set; then
2607   $as_echo_n "(cached) " >&6
2608 else
2609   if test -n "$GCOV"; then
2610   ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
2611 else
2612 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2613 for as_dir in $PATH
2614 do
2615   IFS=$as_save_IFS
2616   test -z "$as_dir" && as_dir=.
2617   for ac_exec_ext in '' $ac_executable_extensions; do
2618   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2619     ac_cv_prog_GCOV="$ac_prog"
2620     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2621     break 2
2622   fi
2623 done
2624 done
2625 IFS=$as_save_IFS
2626
2627 fi
2628 fi
2629 GCOV=$ac_cv_prog_GCOV
2630 if test -n "$GCOV"; then
2631   { $as_echo "$as_me:$LINENO: result: $GCOV" >&5
2632 $as_echo "$GCOV" >&6; }
2633 else
2634   { $as_echo "$as_me:$LINENO: result: no" >&5
2635 $as_echo "no" >&6; }
2636 fi
2637
2638
2639   test -n "$GCOV" && break
2640 done
2641
2642 if test -z "$GCOV"; then
2643   { { $as_echo "$as_me:$LINENO: error: gcov not found" >&5
2644 $as_echo "$as_me: error: gcov not found" >&2;}
2645    { (exit 1); exit 1; }; }
2646 fi
2647 for ac_prog in lcov
2648 do
2649   # Extract the first word of "$ac_prog", so it can be a program name with args.
2650 set dummy $ac_prog; ac_word=$2
2651 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2652 $as_echo_n "checking for $ac_word... " >&6; }
2653 if test "${ac_cv_prog_LCOV+set}" = set; then
2654   $as_echo_n "(cached) " >&6
2655 else
2656   if test -n "$LCOV"; then
2657   ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
2658 else
2659 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2660 for as_dir in $PATH
2661 do
2662   IFS=$as_save_IFS
2663   test -z "$as_dir" && as_dir=.
2664   for ac_exec_ext in '' $ac_executable_extensions; do
2665   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2666     ac_cv_prog_LCOV="$ac_prog"
2667     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2668     break 2
2669   fi
2670 done
2671 done
2672 IFS=$as_save_IFS
2673
2674 fi
2675 fi
2676 LCOV=$ac_cv_prog_LCOV
2677 if test -n "$LCOV"; then
2678   { $as_echo "$as_me:$LINENO: result: $LCOV" >&5
2679 $as_echo "$LCOV" >&6; }
2680 else
2681   { $as_echo "$as_me:$LINENO: result: no" >&5
2682 $as_echo "no" >&6; }
2683 fi
2684
2685
2686   test -n "$LCOV" && break
2687 done
2688
2689 if test -z "$LCOV"; then
2690   { { $as_echo "$as_me:$LINENO: error: lcov not found" >&5
2691 $as_echo "$as_me: error: lcov not found" >&2;}
2692    { (exit 1); exit 1; }; }
2693 fi
2694 for ac_prog in genhtml
2695 do
2696   # Extract the first word of "$ac_prog", so it can be a program name with args.
2697 set dummy $ac_prog; ac_word=$2
2698 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2699 $as_echo_n "checking for $ac_word... " >&6; }
2700 if test "${ac_cv_prog_GENHTML+set}" = set; then
2701   $as_echo_n "(cached) " >&6
2702 else
2703   if test -n "$GENHTML"; then
2704   ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
2705 else
2706 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2707 for as_dir in $PATH
2708 do
2709   IFS=$as_save_IFS
2710   test -z "$as_dir" && as_dir=.
2711   for ac_exec_ext in '' $ac_executable_extensions; do
2712   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2713     ac_cv_prog_GENHTML="$ac_prog"
2714     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2715     break 2
2716   fi
2717 done
2718 done
2719 IFS=$as_save_IFS
2720
2721 fi
2722 fi
2723 GENHTML=$ac_cv_prog_GENHTML
2724 if test -n "$GENHTML"; then
2725   { $as_echo "$as_me:$LINENO: result: $GENHTML" >&5
2726 $as_echo "$GENHTML" >&6; }
2727 else
2728   { $as_echo "$as_me:$LINENO: result: no" >&5
2729 $as_echo "no" >&6; }
2730 fi
2731
2732
2733   test -n "$GENHTML" && break
2734 done
2735
2736 if test -z "$GENHTML"; then
2737   { { $as_echo "$as_me:$LINENO: error: genhtml not found" >&5
2738 $as_echo "$as_me: error: genhtml not found" >&2;}
2739    { (exit 1); exit 1; }; }
2740 fi
2741       ;;
2742     no)
2743       :
2744       ;;
2745     *)
2746       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-coverage option" >&5
2747 $as_echo "$as_me: error: no argument expected for --enable-coverage option" >&2;}
2748    { (exit 1); exit 1; }; }
2749       ;;
2750   esac
2751
2752 else
2753   enable_coverage=no
2754
2755 fi
2756
2757
2758
2759
2760 #
2761 # DTrace
2762 #
2763
2764
2765 # Check whether --enable-dtrace was given.
2766 if test "${enable_dtrace+set}" = set; then
2767   enableval=$enable_dtrace;
2768   case $enableval in
2769     yes)
2770       for ac_prog in dtrace
2771 do
2772   # Extract the first word of "$ac_prog", so it can be a program name with args.
2773 set dummy $ac_prog; ac_word=$2
2774 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2775 $as_echo_n "checking for $ac_word... " >&6; }
2776 if test "${ac_cv_prog_DTRACE+set}" = set; then
2777   $as_echo_n "(cached) " >&6
2778 else
2779   if test -n "$DTRACE"; then
2780   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
2781 else
2782 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2783 for as_dir in $PATH
2784 do
2785   IFS=$as_save_IFS
2786   test -z "$as_dir" && as_dir=.
2787   for ac_exec_ext in '' $ac_executable_extensions; do
2788   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2789     ac_cv_prog_DTRACE="$ac_prog"
2790     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2791     break 2
2792   fi
2793 done
2794 done
2795 IFS=$as_save_IFS
2796
2797 fi
2798 fi
2799 DTRACE=$ac_cv_prog_DTRACE
2800 if test -n "$DTRACE"; then
2801   { $as_echo "$as_me:$LINENO: result: $DTRACE" >&5
2802 $as_echo "$DTRACE" >&6; }
2803 else
2804   { $as_echo "$as_me:$LINENO: result: no" >&5
2805 $as_echo "no" >&6; }
2806 fi
2807
2808
2809   test -n "$DTRACE" && break
2810 done
2811
2812 if test -z "$DTRACE"; then
2813   { { $as_echo "$as_me:$LINENO: error: dtrace not found" >&5
2814 $as_echo "$as_me: error: dtrace not found" >&2;}
2815    { (exit 1); exit 1; }; }
2816 fi
2817
2818       ;;
2819     no)
2820       :
2821       ;;
2822     *)
2823       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-dtrace option" >&5
2824 $as_echo "$as_me: error: no argument expected for --enable-dtrace option" >&2;}
2825    { (exit 1); exit 1; }; }
2826       ;;
2827   esac
2828
2829 else
2830   enable_dtrace=no
2831
2832 fi
2833
2834
2835
2836
2837 #
2838 # Block size
2839 #
2840 { $as_echo "$as_me:$LINENO: checking for block size" >&5
2841 $as_echo_n "checking for block size... " >&6; }
2842
2843
2844
2845 # Check whether --with-blocksize was given.
2846 if test "${with_blocksize+set}" = set; then
2847   withval=$with_blocksize;
2848   case $withval in
2849     yes)
2850       { { $as_echo "$as_me:$LINENO: error: argument required for --with-blocksize option" >&5
2851 $as_echo "$as_me: error: argument required for --with-blocksize option" >&2;}
2852    { (exit 1); exit 1; }; }
2853       ;;
2854     no)
2855       { { $as_echo "$as_me:$LINENO: error: argument required for --with-blocksize option" >&5
2856 $as_echo "$as_me: error: argument required for --with-blocksize option" >&2;}
2857    { (exit 1); exit 1; }; }
2858       ;;
2859     *)
2860       blocksize=$withval
2861       ;;
2862   esac
2863
2864 else
2865   blocksize=8
2866 fi
2867
2868
2869 case ${blocksize} in
2870   1) BLCKSZ=1024;;
2871   2) BLCKSZ=2048;;
2872   4) BLCKSZ=4096;;
2873   8) BLCKSZ=8192;;
2874  16) BLCKSZ=16384;;
2875  32) BLCKSZ=32768;;
2876   *) { { $as_echo "$as_me:$LINENO: error: Invalid block size. Allowed values are 1,2,4,8,16,32." >&5
2877 $as_echo "$as_me: error: Invalid block size. Allowed values are 1,2,4,8,16,32." >&2;}
2878    { (exit 1); exit 1; }; }
2879 esac
2880 { $as_echo "$as_me:$LINENO: result: ${blocksize}kB" >&5
2881 $as_echo "${blocksize}kB" >&6; }
2882
2883
2884 cat >>confdefs.h <<_ACEOF
2885 #define BLCKSZ ${BLCKSZ}
2886 _ACEOF
2887
2888
2889 #
2890 # Relation segment size
2891 #
2892 { $as_echo "$as_me:$LINENO: checking for segment size" >&5
2893 $as_echo_n "checking for segment size... " >&6; }
2894
2895
2896
2897 # Check whether --with-segsize was given.
2898 if test "${with_segsize+set}" = set; then
2899   withval=$with_segsize;
2900   case $withval in
2901     yes)
2902       { { $as_echo "$as_me:$LINENO: error: argument required for --with-segsize option" >&5
2903 $as_echo "$as_me: error: argument required for --with-segsize option" >&2;}
2904    { (exit 1); exit 1; }; }
2905       ;;
2906     no)
2907       { { $as_echo "$as_me:$LINENO: error: argument required for --with-segsize option" >&5
2908 $as_echo "$as_me: error: argument required for --with-segsize option" >&2;}
2909    { (exit 1); exit 1; }; }
2910       ;;
2911     *)
2912       segsize=$withval
2913       ;;
2914   esac
2915
2916 else
2917   segsize=1
2918 fi
2919
2920
2921 # this expression is set up to avoid unnecessary integer overflow
2922 # blocksize is already guaranteed to be a factor of 1024
2923 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
2924 test $? -eq 0 || exit 1
2925 { $as_echo "$as_me:$LINENO: result: ${segsize}GB" >&5
2926 $as_echo "${segsize}GB" >&6; }
2927
2928
2929 cat >>confdefs.h <<_ACEOF
2930 #define RELSEG_SIZE ${RELSEG_SIZE}
2931 _ACEOF
2932
2933
2934 #
2935 # WAL block size
2936 #
2937 { $as_echo "$as_me:$LINENO: checking for WAL block size" >&5
2938 $as_echo_n "checking for WAL block size... " >&6; }
2939
2940
2941
2942 # Check whether --with-wal-blocksize was given.
2943 if test "${with_wal_blocksize+set}" = set; then
2944   withval=$with_wal_blocksize;
2945   case $withval in
2946     yes)
2947       { { $as_echo "$as_me:$LINENO: error: argument required for --with-wal-blocksize option" >&5
2948 $as_echo "$as_me: error: argument required for --with-wal-blocksize option" >&2;}
2949    { (exit 1); exit 1; }; }
2950       ;;
2951     no)
2952       { { $as_echo "$as_me:$LINENO: error: argument required for --with-wal-blocksize option" >&5
2953 $as_echo "$as_me: error: argument required for --with-wal-blocksize option" >&2;}
2954    { (exit 1); exit 1; }; }
2955       ;;
2956     *)
2957       wal_blocksize=$withval
2958       ;;
2959   esac
2960
2961 else
2962   wal_blocksize=8
2963 fi
2964
2965
2966 case ${wal_blocksize} in
2967   1) XLOG_BLCKSZ=1024;;
2968   2) XLOG_BLCKSZ=2048;;
2969   4) XLOG_BLCKSZ=4096;;
2970   8) XLOG_BLCKSZ=8192;;
2971  16) XLOG_BLCKSZ=16384;;
2972  32) XLOG_BLCKSZ=32768;;
2973  64) XLOG_BLCKSZ=65536;;
2974   *) { { $as_echo "$as_me:$LINENO: error: Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." >&5
2975 $as_echo "$as_me: error: Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." >&2;}
2976    { (exit 1); exit 1; }; }
2977 esac
2978 { $as_echo "$as_me:$LINENO: result: ${wal_blocksize}kB" >&5
2979 $as_echo "${wal_blocksize}kB" >&6; }
2980
2981
2982 cat >>confdefs.h <<_ACEOF
2983 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
2984 _ACEOF
2985
2986
2987 #
2988 # WAL segment size
2989 #
2990 { $as_echo "$as_me:$LINENO: checking for WAL segment size" >&5
2991 $as_echo_n "checking for WAL segment size... " >&6; }
2992
2993
2994
2995 # Check whether --with-wal-segsize was given.
2996 if test "${with_wal_segsize+set}" = set; then
2997   withval=$with_wal_segsize;
2998   case $withval in
2999     yes)
3000       { { $as_echo "$as_me:$LINENO: error: argument required for --with-wal-segsize option" >&5
3001 $as_echo "$as_me: error: argument required for --with-wal-segsize option" >&2;}
3002    { (exit 1); exit 1; }; }
3003       ;;
3004     no)
3005       { { $as_echo "$as_me:$LINENO: error: argument required for --with-wal-segsize option" >&5
3006 $as_echo "$as_me: error: argument required for --with-wal-segsize option" >&2;}
3007    { (exit 1); exit 1; }; }
3008       ;;
3009     *)
3010       wal_segsize=$withval
3011       ;;
3012   esac
3013
3014 else
3015   wal_segsize=16
3016 fi
3017
3018
3019 case ${wal_segsize} in
3020   1) ;;
3021   2) ;;
3022   4) ;;
3023   8) ;;
3024  16) ;;
3025  32) ;;
3026  64) ;;
3027   *) { { $as_echo "$as_me:$LINENO: error: Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." >&5
3028 $as_echo "$as_me: error: Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." >&2;}
3029    { (exit 1); exit 1; }; }
3030 esac
3031 { $as_echo "$as_me:$LINENO: result: ${wal_segsize}MB" >&5
3032 $as_echo "${wal_segsize}MB" >&6; }
3033
3034
3035 cat >>confdefs.h <<_ACEOF
3036 #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
3037 _ACEOF
3038
3039
3040 #
3041 # C compiler
3042 #
3043
3044 # For historical reasons you can also use --with-CC to specify the C compiler
3045 # to use, although the standard way to do this is to set the CC environment
3046 # variable.
3047
3048
3049
3050 # Check whether --with-CC was given.
3051 if test "${with_CC+set}" = set; then
3052   withval=$with_CC;
3053   case $withval in
3054     yes)
3055       { { $as_echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
3056 $as_echo "$as_me: error: argument required for --with-CC option" >&2;}
3057    { (exit 1); exit 1; }; }
3058       ;;
3059     no)
3060       { { $as_echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
3061 $as_echo "$as_me: error: argument required for --with-CC option" >&2;}
3062    { (exit 1); exit 1; }; }
3063       ;;
3064     *)
3065       CC=$with_CC
3066       ;;
3067   esac
3068
3069 fi
3070
3071
3072
3073 case $template in
3074   aix) pgac_cc_list="gcc xlc";;
3075  irix) pgac_cc_list="cc";; # no gcc
3076     *) pgac_cc_list="gcc cc";;
3077 esac
3078
3079 ac_ext=c
3080 ac_cpp='$CPP $CPPFLAGS'
3081 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3082 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3083 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3084 if test -n "$ac_tool_prefix"; then
3085   for ac_prog in $pgac_cc_list
3086   do
3087     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3088 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3089 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3090 $as_echo_n "checking for $ac_word... " >&6; }
3091 if test "${ac_cv_prog_CC+set}" = set; then
3092   $as_echo_n "(cached) " >&6
3093 else
3094   if test -n "$CC"; then
3095   ac_cv_prog_CC="$CC" # Let the user override the test.
3096 else
3097 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3098 for as_dir in $PATH
3099 do
3100   IFS=$as_save_IFS
3101   test -z "$as_dir" && as_dir=.
3102   for ac_exec_ext in '' $ac_executable_extensions; do
3103   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3104     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3105     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3106     break 2
3107   fi
3108 done
3109 done
3110 IFS=$as_save_IFS
3111
3112 fi
3113 fi
3114 CC=$ac_cv_prog_CC
3115 if test -n "$CC"; then
3116   { $as_echo "$as_me:$LINENO: result: $CC" >&5
3117 $as_echo "$CC" >&6; }
3118 else
3119   { $as_echo "$as_me:$LINENO: result: no" >&5
3120 $as_echo "no" >&6; }
3121 fi
3122
3123
3124     test -n "$CC" && break
3125   done
3126 fi
3127 if test -z "$CC"; then
3128   ac_ct_CC=$CC
3129   for ac_prog in $pgac_cc_list
3130 do
3131   # Extract the first word of "$ac_prog", so it can be a program name with args.
3132 set dummy $ac_prog; ac_word=$2
3133 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3134 $as_echo_n "checking for $ac_word... " >&6; }
3135 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3136   $as_echo_n "(cached) " >&6
3137 else
3138   if test -n "$ac_ct_CC"; then
3139   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3140 else
3141 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3142 for as_dir in $PATH
3143 do
3144   IFS=$as_save_IFS
3145   test -z "$as_dir" && as_dir=.
3146   for ac_exec_ext in '' $ac_executable_extensions; do
3147   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3148     ac_cv_prog_ac_ct_CC="$ac_prog"
3149     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3150     break 2
3151   fi
3152 done
3153 done
3154 IFS=$as_save_IFS
3155
3156 fi
3157 fi
3158 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3159 if test -n "$ac_ct_CC"; then
3160   { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3161 $as_echo "$ac_ct_CC" >&6; }
3162 else
3163   { $as_echo "$as_me:$LINENO: result: no" >&5
3164 $as_echo "no" >&6; }
3165 fi
3166
3167
3168   test -n "$ac_ct_CC" && break
3169 done
3170
3171   if test "x$ac_ct_CC" = x; then
3172     CC=""
3173   else
3174     case $cross_compiling:$ac_tool_warned in
3175 yes:)
3176 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
3177 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3178 ac_tool_warned=yes ;;
3179 esac
3180     CC=$ac_ct_CC
3181   fi
3182 fi
3183
3184
3185 test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3186 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3187 { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3188 See \`config.log' for more details." >&5
3189 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH
3190 See \`config.log' for more details." >&2;}
3191    { (exit 1); exit 1; }; }; }
3192
3193 # Provide some information about the compiler.
3194 $as_echo "$as_me:$LINENO: checking for C compiler version" >&5
3195 set X $ac_compile
3196 ac_compiler=$2
3197 { (ac_try="$ac_compiler --version >&5"
3198 case "(($ac_try" in
3199   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3200   *) ac_try_echo=$ac_try;;
3201 esac
3202 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3203 $as_echo "$ac_try_echo") >&5
3204   (eval "$ac_compiler --version >&5") 2>&5
3205   ac_status=$?
3206   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3207   (exit $ac_status); }
3208 { (ac_try="$ac_compiler -v >&5"
3209 case "(($ac_try" in
3210   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3211   *) ac_try_echo=$ac_try;;
3212 esac
3213 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3214 $as_echo "$ac_try_echo") >&5
3215   (eval "$ac_compiler -v >&5") 2>&5
3216   ac_status=$?
3217   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3218   (exit $ac_status); }
3219 { (ac_try="$ac_compiler -V >&5"
3220 case "(($ac_try" in
3221   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3222   *) ac_try_echo=$ac_try;;
3223 esac
3224 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3225 $as_echo "$ac_try_echo") >&5
3226   (eval "$ac_compiler -V >&5") 2>&5
3227   ac_status=$?
3228   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3229   (exit $ac_status); }
3230
3231 cat >conftest.$ac_ext <<_ACEOF
3232 /* confdefs.h.  */
3233 _ACEOF
3234 cat confdefs.h >>conftest.$ac_ext
3235 cat >>conftest.$ac_ext <<_ACEOF
3236 /* end confdefs.h.  */
3237
3238 int
3239 main ()
3240 {
3241
3242   ;
3243   return 0;
3244 }
3245 _ACEOF
3246 ac_clean_files_save=$ac_clean_files
3247 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3248 # Try to create an executable without -o first, disregard a.out.
3249 # It will help us diagnose broken compilers, and finding out an intuition
3250 # of exeext.
3251 { $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3252 $as_echo_n "checking for C compiler default output file name... " >&6; }
3253 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3254
3255 # The possible output files:
3256 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3257
3258 ac_rmfiles=
3259 for ac_file in $ac_files
3260 do
3261   case $ac_file in
3262     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3263     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3264   esac
3265 done
3266 rm -f $ac_rmfiles
3267
3268 if { (ac_try="$ac_link_default"
3269 case "(($ac_try" in
3270   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3271   *) ac_try_echo=$ac_try;;
3272 esac
3273 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3274 $as_echo "$ac_try_echo") >&5
3275   (eval "$ac_link_default") 2>&5
3276   ac_status=$?
3277   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3278   (exit $ac_status); }; then
3279   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3280 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3281 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3282 # so that the user can short-circuit this test for compilers unknown to
3283 # Autoconf.
3284 for ac_file in $ac_files ''
3285 do
3286   test -f "$ac_file" || continue
3287   case $ac_file in
3288     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3289         ;;
3290     [ab].out )
3291         # We found the default executable, but exeext='' is most
3292         # certainly right.
3293         break;;
3294     *.* )
3295         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3296         then :; else
3297            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3298         fi
3299         # We set ac_cv_exeext here because the later test for it is not
3300         # safe: cross compilers may not add the suffix if given an `-o'
3301         # argument, so we may need to know it at that point already.
3302         # Even if this section looks crufty: it has the advantage of
3303         # actually working.
3304         break;;
3305     * )
3306         break;;
3307   esac
3308 done
3309 test "$ac_cv_exeext" = no && ac_cv_exeext=
3310
3311 else
3312   ac_file=''
3313 fi
3314
3315 { $as_echo "$as_me:$LINENO: result: $ac_file" >&5
3316 $as_echo "$ac_file" >&6; }
3317 if test -z "$ac_file"; then
3318   $as_echo "$as_me: failed program was:" >&5
3319 sed 's/^/| /' conftest.$ac_ext >&5
3320
3321 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3322 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3323 { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
3324 See \`config.log' for more details." >&5
3325 $as_echo "$as_me: error: C compiler cannot create executables
3326 See \`config.log' for more details." >&2;}
3327    { (exit 77); exit 77; }; }; }
3328 fi
3329
3330 ac_exeext=$ac_cv_exeext
3331
3332 # Check that the compiler produces executables we can run.  If not, either
3333 # the compiler is broken, or we cross compile.
3334 { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3335 $as_echo_n "checking whether the C compiler works... " >&6; }
3336 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3337 # If not cross compiling, check that we can run a simple program.
3338 if test "$cross_compiling" != yes; then
3339   if { ac_try='./$ac_file'
3340   { (case "(($ac_try" in
3341   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3342   *) ac_try_echo=$ac_try;;
3343 esac
3344 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3345 $as_echo "$ac_try_echo") >&5
3346   (eval "$ac_try") 2>&5
3347   ac_status=$?
3348   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3349   (exit $ac_status); }; }; then
3350     cross_compiling=no
3351   else
3352     if test "$cross_compiling" = maybe; then
3353         cross_compiling=yes
3354     else
3355         { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3356 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3357 { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
3358 If you meant to cross compile, use \`--host'.
3359 See \`config.log' for more details." >&5
3360 $as_echo "$as_me: error: cannot run C compiled programs.
3361 If you meant to cross compile, use \`--host'.
3362 See \`config.log' for more details." >&2;}
3363    { (exit 1); exit 1; }; }; }
3364     fi
3365   fi
3366 fi
3367 { $as_echo "$as_me:$LINENO: result: yes" >&5
3368 $as_echo "yes" >&6; }
3369
3370 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3371 ac_clean_files=$ac_clean_files_save
3372 # Check that the compiler produces executables we can run.  If not, either
3373 # the compiler is broken, or we cross compile.
3374 { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3375 $as_echo_n "checking whether we are cross compiling... " >&6; }
3376 { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
3377 $as_echo "$cross_compiling" >&6; }
3378
3379 { $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
3380 $as_echo_n "checking for suffix of executables... " >&6; }
3381 if { (ac_try="$ac_link"
3382 case "(($ac_try" in
3383   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3384   *) ac_try_echo=$ac_try;;
3385 esac
3386 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3387 $as_echo "$ac_try_echo") >&5
3388   (eval "$ac_link") 2>&5
3389   ac_status=$?
3390   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3391   (exit $ac_status); }; then
3392   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3393 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3394 # work properly (i.e., refer to `conftest.exe'), while it won't with
3395 # `rm'.
3396 for ac_file in conftest.exe conftest conftest.*; do
3397   test -f "$ac_file" || continue
3398   case $ac_file in
3399     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3400     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3401           break;;
3402     * ) break;;
3403   esac
3404 done
3405 else
3406   { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3407 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3408 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3409 See \`config.log' for more details." >&5
3410 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3411 See \`config.log' for more details." >&2;}
3412    { (exit 1); exit 1; }; }; }
3413 fi
3414
3415 rm -f conftest$ac_cv_exeext
3416 { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3417 $as_echo "$ac_cv_exeext" >&6; }
3418
3419 rm -f conftest.$ac_ext
3420 EXEEXT=$ac_cv_exeext
3421 ac_exeext=$EXEEXT
3422 { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
3423 $as_echo_n "checking for suffix of object files... " >&6; }
3424 if test "${ac_cv_objext+set}" = set; then
3425   $as_echo_n "(cached) " >&6
3426 else
3427   cat >conftest.$ac_ext <<_ACEOF
3428 /* confdefs.h.  */
3429 _ACEOF
3430 cat confdefs.h >>conftest.$ac_ext
3431 cat >>conftest.$ac_ext <<_ACEOF
3432 /* end confdefs.h.  */
3433
3434 int
3435 main ()
3436 {
3437
3438   ;
3439   return 0;
3440 }
3441 _ACEOF
3442 rm -f conftest.o conftest.obj
3443 if { (ac_try="$ac_compile"
3444 case "(($ac_try" in
3445   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3446   *) ac_try_echo=$ac_try;;
3447 esac
3448 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3449 $as_echo "$ac_try_echo") >&5
3450   (eval "$ac_compile") 2>&5
3451   ac_status=$?
3452   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3453   (exit $ac_status); }; then
3454   for ac_file in conftest.o conftest.obj conftest.*; do
3455   test -f "$ac_file" || continue;
3456   case $ac_file in
3457     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3458     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3459        break;;
3460   esac
3461 done
3462 else
3463   $as_echo "$as_me: failed program was:" >&5
3464 sed 's/^/| /' conftest.$ac_ext >&5
3465
3466 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3467 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3468 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3469 See \`config.log' for more details." >&5
3470 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
3471 See \`config.log' for more details." >&2;}
3472    { (exit 1); exit 1; }; }; }
3473 fi
3474
3475 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3476 fi
3477 { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3478 $as_echo "$ac_cv_objext" >&6; }
3479 OBJEXT=$ac_cv_objext
3480 ac_objext=$OBJEXT
3481 { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3482 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3483 if test "${ac_cv_c_compiler_gnu+set}" = set; then
3484   $as_echo_n "(cached) " >&6
3485 else
3486   cat >conftest.$ac_ext <<_ACEOF
3487 /* confdefs.h.  */
3488 _ACEOF
3489 cat confdefs.h >>conftest.$ac_ext
3490 cat >>conftest.$ac_ext <<_ACEOF
3491 /* end confdefs.h.  */
3492
3493 int
3494 main ()
3495 {
3496 #ifndef __GNUC__
3497        choke me
3498 #endif
3499
3500   ;
3501   return 0;
3502 }
3503 _ACEOF
3504 rm -f conftest.$ac_objext
3505 if { (ac_try="$ac_compile"
3506 case "(($ac_try" in
3507   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3508   *) ac_try_echo=$ac_try;;
3509 esac
3510 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3511 $as_echo "$ac_try_echo") >&5
3512   (eval "$ac_compile") 2>conftest.er1
3513   ac_status=$?
3514   grep -v '^ *+' conftest.er1 >conftest.err
3515   rm -f conftest.er1
3516   cat conftest.err >&5
3517   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3518   (exit $ac_status); } && {
3519          test -z "$ac_c_werror_flag" ||
3520          test ! -s conftest.err
3521        } && test -s conftest.$ac_objext; then
3522   ac_compiler_gnu=yes
3523 else
3524   $as_echo "$as_me: failed program was:" >&5
3525 sed 's/^/| /' conftest.$ac_ext >&5
3526
3527         ac_compiler_gnu=no
3528 fi
3529
3530 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3531 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3532
3533 fi
3534 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3535 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3536 if test $ac_compiler_gnu = yes; then
3537   GCC=yes
3538 else
3539   GCC=
3540 fi
3541 ac_test_CFLAGS=${CFLAGS+set}
3542 ac_save_CFLAGS=$CFLAGS
3543 { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3544 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3545 if test "${ac_cv_prog_cc_g+set}" = set; then
3546   $as_echo_n "(cached) " >&6
3547 else
3548   ac_save_c_werror_flag=$ac_c_werror_flag
3549    ac_c_werror_flag=yes
3550    ac_cv_prog_cc_g=no
3551    CFLAGS="-g"
3552    cat >conftest.$ac_ext <<_ACEOF
3553 /* confdefs.h.  */
3554 _ACEOF
3555 cat confdefs.h >>conftest.$ac_ext
3556 cat >>conftest.$ac_ext <<_ACEOF
3557 /* end confdefs.h.  */
3558
3559 int
3560 main ()
3561 {
3562
3563   ;
3564   return 0;
3565 }
3566 _ACEOF
3567 rm -f conftest.$ac_objext
3568 if { (ac_try="$ac_compile"
3569 case "(($ac_try" in
3570   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3571   *) ac_try_echo=$ac_try;;
3572 esac
3573 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3574 $as_echo "$ac_try_echo") >&5
3575   (eval "$ac_compile") 2>conftest.er1
3576   ac_status=$?
3577   grep -v '^ *+' conftest.er1 >conftest.err
3578   rm -f conftest.er1
3579   cat conftest.err >&5
3580   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3581   (exit $ac_status); } && {
3582          test -z "$ac_c_werror_flag" ||
3583          test ! -s conftest.err
3584        } && test -s conftest.$ac_objext; then
3585   ac_cv_prog_cc_g=yes
3586 else
3587   $as_echo "$as_me: failed program was:" >&5
3588 sed 's/^/| /' conftest.$ac_ext >&5
3589
3590         CFLAGS=""
3591       cat >conftest.$ac_ext <<_ACEOF
3592 /* confdefs.h.  */
3593 _ACEOF
3594 cat confdefs.h >>conftest.$ac_ext
3595 cat >>conftest.$ac_ext <<_ACEOF
3596 /* end confdefs.h.  */
3597
3598 int
3599 main ()
3600 {
3601
3602   ;
3603   return 0;
3604 }
3605 _ACEOF
3606 rm -f conftest.$ac_objext
3607 if { (ac_try="$ac_compile"
3608 case "(($ac_try" in
3609   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3610   *) ac_try_echo=$ac_try;;
3611 esac
3612 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3613 $as_echo "$ac_try_echo") >&5
3614   (eval "$ac_compile") 2>conftest.er1
3615   ac_status=$?
3616   grep -v '^ *+' conftest.er1 >conftest.err
3617   rm -f conftest.er1
3618   cat conftest.err >&5
3619   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3620   (exit $ac_status); } && {
3621          test -z "$ac_c_werror_flag" ||
3622          test ! -s conftest.err
3623        } && test -s conftest.$ac_objext; then
3624   :
3625 else
3626   $as_echo "$as_me: failed program was:" >&5
3627 sed 's/^/| /' conftest.$ac_ext >&5
3628
3629         ac_c_werror_flag=$ac_save_c_werror_flag
3630          CFLAGS="-g"
3631          cat >conftest.$ac_ext <<_ACEOF
3632 /* confdefs.h.  */
3633 _ACEOF
3634 cat confdefs.h >>conftest.$ac_ext
3635 cat >>conftest.$ac_ext <<_ACEOF
3636 /* end confdefs.h.  */
3637
3638 int
3639 main ()
3640 {
3641
3642   ;
3643   return 0;
3644 }
3645 _ACEOF
3646 rm -f conftest.$ac_objext
3647 if { (ac_try="$ac_compile"
3648 case "(($ac_try" in
3649   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3650   *) ac_try_echo=$ac_try;;
3651 esac
3652 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3653 $as_echo "$ac_try_echo") >&5
3654   (eval "$ac_compile") 2>conftest.er1
3655   ac_status=$?
3656   grep -v '^ *+' conftest.er1 >conftest.err
3657   rm -f conftest.er1
3658   cat conftest.err >&5
3659   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3660   (exit $ac_status); } && {
3661          test -z "$ac_c_werror_flag" ||
3662          test ! -s conftest.err
3663        } && test -s conftest.$ac_objext; then
3664   ac_cv_prog_cc_g=yes
3665 else
3666   $as_echo "$as_me: failed program was:" >&5
3667 sed 's/^/| /' conftest.$ac_ext >&5
3668
3669
3670 fi
3671
3672 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3673 fi
3674
3675 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3676 fi
3677
3678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3679    ac_c_werror_flag=$ac_save_c_werror_flag
3680 fi
3681 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3682 $as_echo "$ac_cv_prog_cc_g" >&6; }
3683 if test "$ac_test_CFLAGS" = set; then
3684   CFLAGS=$ac_save_CFLAGS
3685 elif test $ac_cv_prog_cc_g = yes; then
3686   if test "$GCC" = yes; then
3687     CFLAGS="-g -O2"
3688   else
3689     CFLAGS="-g"
3690   fi
3691 else
3692   if test "$GCC" = yes; then
3693     CFLAGS="-O2"
3694   else
3695     CFLAGS=
3696   fi
3697 fi
3698 { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3699 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3700 if test "${ac_cv_prog_cc_c89+set}" = set; then
3701   $as_echo_n "(cached) " >&6
3702 else
3703   ac_cv_prog_cc_c89=no
3704 ac_save_CC=$CC
3705 cat >conftest.$ac_ext <<_ACEOF
3706 /* confdefs.h.  */
3707 _ACEOF
3708 cat confdefs.h >>conftest.$ac_ext
3709 cat >>conftest.$ac_ext <<_ACEOF
3710 /* end confdefs.h.  */
3711 #include <stdarg.h>
3712 #include <stdio.h>
3713 #include <sys/types.h>
3714 #include <sys/stat.h>
3715 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3716 struct buf { int x; };
3717 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3718 static char *e (p, i)
3719      char **p;
3720      int i;
3721 {
3722   return p[i];
3723 }
3724 static char *f (char * (*g) (char **, int), char **p, ...)
3725 {
3726   char *s;
3727   va_list v;
3728   va_start (v,p);
3729   s = g (p, va_arg (v,int));
3730   va_end (v);
3731   return s;
3732 }
3733
3734 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3735    function prototypes and stuff, but not '\xHH' hex character constants.
3736    These don't provoke an error unfortunately, instead are silently treated
3737    as 'x'.  The following induces an error, until -std is added to get
3738    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3739    array size at least.  It's necessary to write '\x00'==0 to get something
3740    that's true only with -std.  */
3741 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3742
3743 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3744    inside strings and character constants.  */
3745 #define FOO(x) 'x'
3746 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3747
3748 int test (int i, double x);
3749 struct s1 {int (*f) (int a);};
3750 struct s2 {int (*f) (double a);};
3751 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3752 int argc;
3753 char **argv;
3754 int
3755 main ()
3756 {
3757 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3758   ;
3759   return 0;
3760 }
3761 _ACEOF
3762 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3763         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3764 do
3765   CC="$ac_save_CC $ac_arg"
3766   rm -f conftest.$ac_objext
3767 if { (ac_try="$ac_compile"
3768 case "(($ac_try" in
3769   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3770   *) ac_try_echo=$ac_try;;
3771 esac
3772 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3773 $as_echo "$ac_try_echo") >&5
3774   (eval "$ac_compile") 2>conftest.er1
3775   ac_status=$?
3776   grep -v '^ *+' conftest.er1 >conftest.err
3777   rm -f conftest.er1
3778   cat conftest.err >&5
3779   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3780   (exit $ac_status); } && {
3781          test -z "$ac_c_werror_flag" ||
3782          test ! -s conftest.err
3783        } && test -s conftest.$ac_objext; then
3784   ac_cv_prog_cc_c89=$ac_arg
3785 else
3786   $as_echo "$as_me: failed program was:" >&5
3787 sed 's/^/| /' conftest.$ac_ext >&5
3788
3789
3790 fi
3791
3792 rm -f core conftest.err conftest.$ac_objext
3793   test "x$ac_cv_prog_cc_c89" != "xno" && break
3794 done
3795 rm -f conftest.$ac_ext
3796 CC=$ac_save_CC
3797
3798 fi
3799 # AC_CACHE_VAL
3800 case "x$ac_cv_prog_cc_c89" in
3801   x)
3802     { $as_echo "$as_me:$LINENO: result: none needed" >&5
3803 $as_echo "none needed" >&6; } ;;
3804   xno)
3805     { $as_echo "$as_me:$LINENO: result: unsupported" >&5
3806 $as_echo "unsupported" >&6; } ;;
3807   *)
3808     CC="$CC $ac_cv_prog_cc_c89"
3809     { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3810 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3811 esac
3812
3813
3814 ac_ext=c
3815 ac_cpp='$CPP $CPPFLAGS'
3816 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3817 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3818 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3819
3820
3821 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
3822 # but has idiosyncrasies of its own.  We assume icc will define
3823 # __INTEL_COMPILER regardless of CFLAGS.
3824
3825 cat >conftest.$ac_ext <<_ACEOF
3826 /* confdefs.h.  */
3827 _ACEOF
3828 cat confdefs.h >>conftest.$ac_ext
3829 cat >>conftest.$ac_ext <<_ACEOF
3830 /* end confdefs.h.  */
3831
3832 int
3833 main ()
3834 {
3835 #ifndef __INTEL_COMPILER
3836 choke me
3837 #endif
3838   ;
3839   return 0;
3840 }
3841 _ACEOF
3842 rm -f conftest.$ac_objext
3843 if { (ac_try="$ac_compile"
3844 case "(($ac_try" in
3845   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3846   *) ac_try_echo=$ac_try;;
3847 esac
3848 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3849 $as_echo "$ac_try_echo") >&5
3850   (eval "$ac_compile") 2>conftest.er1
3851   ac_status=$?
3852   grep -v '^ *+' conftest.er1 >conftest.err
3853   rm -f conftest.er1
3854   cat conftest.err >&5
3855   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3856   (exit $ac_status); } && {
3857          test -z "$ac_c_werror_flag" ||
3858          test ! -s conftest.err
3859        } && test -s conftest.$ac_objext; then
3860   ICC=yes
3861 else
3862   $as_echo "$as_me: failed program was:" >&5
3863 sed 's/^/| /' conftest.$ac_ext >&5
3864
3865         ICC=no
3866 fi
3867
3868 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3869
3870 # Check if it's Sun Studio compiler. We assume that
3871 # __SUNPRO_C will be defined for Sun Studio compilers
3872 cat >conftest.$ac_ext <<_ACEOF
3873 /* confdefs.h.  */
3874 _ACEOF
3875 cat confdefs.h >>conftest.$ac_ext
3876 cat >>conftest.$ac_ext <<_ACEOF
3877 /* end confdefs.h.  */
3878
3879 int
3880 main ()
3881 {
3882 #ifndef __SUNPRO_C
3883 choke me
3884 #endif
3885   ;
3886   return 0;
3887 }
3888 _ACEOF
3889 rm -f conftest.$ac_objext
3890 if { (ac_try="$ac_compile"
3891 case "(($ac_try" in
3892   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3893   *) ac_try_echo=$ac_try;;
3894 esac
3895 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3896 $as_echo "$ac_try_echo") >&5
3897   (eval "$ac_compile") 2>conftest.er1
3898   ac_status=$?
3899   grep -v '^ *+' conftest.er1 >conftest.err
3900   rm -f conftest.er1
3901   cat conftest.err >&5
3902   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3903   (exit $ac_status); } && {
3904          test -z "$ac_c_werror_flag" ||
3905          test ! -s conftest.err
3906        } && test -s conftest.$ac_objext; then
3907   SUN_STUDIO_CC=yes
3908 else
3909   $as_echo "$as_me: failed program was:" >&5
3910 sed 's/^/| /' conftest.$ac_ext >&5
3911
3912         SUN_STUDIO_CC=no
3913 fi
3914
3915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3916
3917
3918
3919 unset CFLAGS
3920
3921 #
3922 # Read the template
3923 #
3924 . "$srcdir/src/template/$template" || exit
3925
3926 # CFLAGS are selected so:
3927 # If the user specifies something in the environment, that is used.
3928 # else:  If the template file set something, that is used.
3929 # else:  If coverage was enabled, don't set anything.
3930 # else:  If the compiler is GCC, then we use -O2.
3931 # else:  If the compiler is something else, then we use -O, unless debugging.
3932
3933 if test "$ac_env_CFLAGS_set" = set; then
3934   CFLAGS=$ac_env_CFLAGS_value
3935 elif test "${CFLAGS+set}" = set; then
3936   : # (keep what template set)
3937 elif test "$enable_coverage" = yes; then
3938   : # no optimization by default
3939 elif test "$GCC" = yes; then
3940   CFLAGS="-O2"
3941 else
3942   # if the user selected debug mode, don't use -O
3943   if test "$enable_debug" != yes; then
3944     CFLAGS="-O"
3945   fi
3946 fi
3947
3948 # set CFLAGS_VECTOR from the environment, if available
3949 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
3950   CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
3951 fi
3952
3953 # Some versions of GCC support some additional useful warning flags.
3954 # Check whether they are supported, and add them to CFLAGS if so.
3955 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
3956 # but has its own.  Also check other compiler-specific flags here.
3957
3958 if test "$GCC" = yes -a "$ICC" = no; then
3959   CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith"
3960   # These work in some but not all gcc versions
3961   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wdeclaration-after-statement" >&5
3962 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
3963 if test "${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+set}" = set; then
3964   $as_echo_n "(cached) " >&6
3965 else
3966   pgac_save_CFLAGS=$CFLAGS
3967 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
3968 ac_save_c_werror_flag=$ac_c_werror_flag
3969 ac_c_werror_flag=yes
3970 cat >conftest.$ac_ext <<_ACEOF
3971 /* confdefs.h.  */
3972 _ACEOF
3973 cat confdefs.h >>conftest.$ac_ext
3974 cat >>conftest.$ac_ext <<_ACEOF
3975 /* end confdefs.h.  */
3976
3977 int
3978 main ()
3979 {
3980
3981   ;
3982   return 0;
3983 }
3984 _ACEOF
3985 rm -f conftest.$ac_objext
3986 if { (ac_try="$ac_compile"
3987 case "(($ac_try" in
3988   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3989   *) ac_try_echo=$ac_try;;
3990 esac
3991 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3992 $as_echo "$ac_try_echo") >&5
3993   (eval "$ac_compile") 2>conftest.er1
3994   ac_status=$?
3995   grep -v '^ *+' conftest.er1 >conftest.err
3996   rm -f conftest.er1
3997   cat conftest.err >&5
3998   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3999   (exit $ac_status); } && {
4000          test -z "$ac_c_werror_flag" ||
4001          test ! -s conftest.err
4002        } && test -s conftest.$ac_objext; then
4003   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4004 else
4005   $as_echo "$as_me: failed program was:" >&5
4006 sed 's/^/| /' conftest.$ac_ext >&5
4007
4008         pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4009 fi
4010
4011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4012 ac_c_werror_flag=$ac_save_c_werror_flag
4013 CFLAGS="$pgac_save_CFLAGS"
4014 fi
4015 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4016 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4017 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4018   CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4019 fi
4020
4021   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wendif-labels" >&5
4022 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4023 if test "${pgac_cv_prog_cc_cflags__Wendif_labels+set}" = set; then
4024   $as_echo_n "(cached) " >&6
4025 else
4026   pgac_save_CFLAGS=$CFLAGS
4027 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4028 ac_save_c_werror_flag=$ac_c_werror_flag
4029 ac_c_werror_flag=yes
4030 cat >conftest.$ac_ext <<_ACEOF
4031 /* confdefs.h.  */
4032 _ACEOF
4033 cat confdefs.h >>conftest.$ac_ext
4034 cat >>conftest.$ac_ext <<_ACEOF
4035 /* end confdefs.h.  */
4036
4037 int
4038 main ()
4039 {
4040
4041   ;
4042   return 0;
4043 }
4044 _ACEOF
4045 rm -f conftest.$ac_objext
4046 if { (ac_try="$ac_compile"
4047 case "(($ac_try" in
4048   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4049   *) ac_try_echo=$ac_try;;
4050 esac
4051 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4052 $as_echo "$ac_try_echo") >&5
4053   (eval "$ac_compile") 2>conftest.er1
4054   ac_status=$?
4055   grep -v '^ *+' conftest.er1 >conftest.err
4056   rm -f conftest.er1
4057   cat conftest.err >&5
4058   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4059   (exit $ac_status); } && {
4060          test -z "$ac_c_werror_flag" ||
4061          test ! -s conftest.err
4062        } && test -s conftest.$ac_objext; then
4063   pgac_cv_prog_cc_cflags__Wendif_labels=yes
4064 else
4065   $as_echo "$as_me: failed program was:" >&5
4066 sed 's/^/| /' conftest.$ac_ext >&5
4067
4068         pgac_cv_prog_cc_cflags__Wendif_labels=no
4069 fi
4070
4071 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4072 ac_c_werror_flag=$ac_save_c_werror_flag
4073 CFLAGS="$pgac_save_CFLAGS"
4074 fi
4075 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4076 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4077 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4078   CFLAGS="$CFLAGS -Wendif-labels"
4079 fi
4080
4081   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wmissing-format-attribute" >&5
4082 $as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
4083 if test "${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+set}" = set; then
4084   $as_echo_n "(cached) " >&6
4085 else
4086   pgac_save_CFLAGS=$CFLAGS
4087 CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
4088 ac_save_c_werror_flag=$ac_c_werror_flag
4089 ac_c_werror_flag=yes
4090 cat >conftest.$ac_ext <<_ACEOF
4091 /* confdefs.h.  */
4092 _ACEOF
4093 cat confdefs.h >>conftest.$ac_ext
4094 cat >>conftest.$ac_ext <<_ACEOF
4095 /* end confdefs.h.  */
4096
4097 int
4098 main ()
4099 {
4100
4101   ;
4102   return 0;
4103 }
4104 _ACEOF
4105 rm -f conftest.$ac_objext
4106 if { (ac_try="$ac_compile"
4107 case "(($ac_try" in
4108   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4109   *) ac_try_echo=$ac_try;;
4110 esac
4111 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4112 $as_echo "$ac_try_echo") >&5
4113   (eval "$ac_compile") 2>conftest.er1
4114   ac_status=$?
4115   grep -v '^ *+' conftest.er1 >conftest.err
4116   rm -f conftest.er1
4117   cat conftest.err >&5
4118   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4119   (exit $ac_status); } && {
4120          test -z "$ac_c_werror_flag" ||
4121          test ! -s conftest.err
4122        } && test -s conftest.$ac_objext; then
4123   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
4124 else
4125   $as_echo "$as_me: failed program was:" >&5
4126 sed 's/^/| /' conftest.$ac_ext >&5
4127
4128         pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
4129 fi
4130
4131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4132 ac_c_werror_flag=$ac_save_c_werror_flag
4133 CFLAGS="$pgac_save_CFLAGS"
4134 fi
4135 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
4136 $as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
4137 if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
4138   CFLAGS="$CFLAGS -Wmissing-format-attribute"
4139 fi
4140
4141   # This was included in -Wall/-Wformat in older GCC versions
4142   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wformat-security" >&5
4143 $as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4144 if test "${pgac_cv_prog_cc_cflags__Wformat_security+set}" = set; then
4145   $as_echo_n "(cached) " >&6
4146 else
4147   pgac_save_CFLAGS=$CFLAGS
4148 CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4149 ac_save_c_werror_flag=$ac_c_werror_flag
4150 ac_c_werror_flag=yes
4151 cat >conftest.$ac_ext <<_ACEOF
4152 /* confdefs.h.  */
4153 _ACEOF
4154 cat confdefs.h >>conftest.$ac_ext
4155 cat >>conftest.$ac_ext <<_ACEOF
4156 /* end confdefs.h.  */
4157
4158 int
4159 main ()
4160 {
4161
4162   ;
4163   return 0;
4164 }
4165 _ACEOF
4166 rm -f conftest.$ac_objext
4167 if { (ac_try="$ac_compile"
4168 case "(($ac_try" in
4169   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4170   *) ac_try_echo=$ac_try;;
4171 esac
4172 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4173 $as_echo "$ac_try_echo") >&5
4174   (eval "$ac_compile") 2>conftest.er1
4175   ac_status=$?
4176   grep -v '^ *+' conftest.er1 >conftest.err
4177   rm -f conftest.er1
4178   cat conftest.err >&5
4179   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4180   (exit $ac_status); } && {
4181          test -z "$ac_c_werror_flag" ||
4182          test ! -s conftest.err
4183        } && test -s conftest.$ac_objext; then
4184   pgac_cv_prog_cc_cflags__Wformat_security=yes
4185 else
4186   $as_echo "$as_me: failed program was:" >&5
4187 sed 's/^/| /' conftest.$ac_ext >&5
4188
4189         pgac_cv_prog_cc_cflags__Wformat_security=no
4190 fi
4191
4192 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4193 ac_c_werror_flag=$ac_save_c_werror_flag
4194 CFLAGS="$pgac_save_CFLAGS"
4195 fi
4196 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4197 $as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4198 if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4199   CFLAGS="$CFLAGS -Wformat-security"
4200 fi
4201
4202   # Disable strict-aliasing rules; needed for gcc 3.3+
4203   { $as_echo "$as_me:$LINENO: checking whether $CC supports -fno-strict-aliasing" >&5
4204 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4205 if test "${pgac_cv_prog_cc_cflags__fno_strict_aliasing+set}" = set; then
4206   $as_echo_n "(cached) " >&6
4207 else
4208   pgac_save_CFLAGS=$CFLAGS
4209 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4210 ac_save_c_werror_flag=$ac_c_werror_flag
4211 ac_c_werror_flag=yes
4212 cat >conftest.$ac_ext <<_ACEOF
4213 /* confdefs.h.  */
4214 _ACEOF
4215 cat confdefs.h >>conftest.$ac_ext
4216 cat >>conftest.$ac_ext <<_ACEOF
4217 /* end confdefs.h.  */
4218
4219 int
4220 main ()
4221 {
4222
4223   ;
4224   return 0;
4225 }
4226 _ACEOF
4227 rm -f conftest.$ac_objext
4228 if { (ac_try="$ac_compile"
4229 case "(($ac_try" in
4230   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4231   *) ac_try_echo=$ac_try;;
4232 esac
4233 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4234 $as_echo "$ac_try_echo") >&5
4235   (eval "$ac_compile") 2>conftest.er1
4236   ac_status=$?
4237   grep -v '^ *+' conftest.er1 >conftest.err
4238   rm -f conftest.er1
4239   cat conftest.err >&5
4240   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4241   (exit $ac_status); } && {
4242          test -z "$ac_c_werror_flag" ||
4243          test ! -s conftest.err
4244        } && test -s conftest.$ac_objext; then
4245   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4246 else
4247   $as_echo "$as_me: failed program was:" >&5
4248 sed 's/^/| /' conftest.$ac_ext >&5
4249
4250         pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4251 fi
4252
4253 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4254 ac_c_werror_flag=$ac_save_c_werror_flag
4255 CFLAGS="$pgac_save_CFLAGS"
4256 fi
4257 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4258 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4259 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4260   CFLAGS="$CFLAGS -fno-strict-aliasing"
4261 fi
4262
4263   # Disable optimizations that assume no overflow; needed for gcc 4.3+
4264   { $as_echo "$as_me:$LINENO: checking whether $CC supports -fwrapv" >&5
4265 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4266 if test "${pgac_cv_prog_cc_cflags__fwrapv+set}" = set; then
4267   $as_echo_n "(cached) " >&6
4268 else
4269   pgac_save_CFLAGS=$CFLAGS
4270 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4271 ac_save_c_werror_flag=$ac_c_werror_flag
4272 ac_c_werror_flag=yes
4273 cat >conftest.$ac_ext <<_ACEOF
4274 /* confdefs.h.  */
4275 _ACEOF
4276 cat confdefs.h >>conftest.$ac_ext
4277 cat >>conftest.$ac_ext <<_ACEOF
4278 /* end confdefs.h.  */
4279
4280 int
4281 main ()
4282 {
4283
4284   ;
4285   return 0;
4286 }
4287 _ACEOF
4288 rm -f conftest.$ac_objext
4289 if { (ac_try="$ac_compile"
4290 case "(($ac_try" in
4291   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4292   *) ac_try_echo=$ac_try;;
4293 esac
4294 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4295 $as_echo "$ac_try_echo") >&5
4296   (eval "$ac_compile") 2>conftest.er1
4297   ac_status=$?
4298   grep -v '^ *+' conftest.er1 >conftest.err
4299   rm -f conftest.er1
4300   cat conftest.err >&5
4301   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4302   (exit $ac_status); } && {
4303          test -z "$ac_c_werror_flag" ||
4304          test ! -s conftest.err
4305        } && test -s conftest.$ac_objext; then
4306   pgac_cv_prog_cc_cflags__fwrapv=yes
4307 else
4308   $as_echo "$as_me: failed program was:" >&5
4309 sed 's/^/| /' conftest.$ac_ext >&5
4310
4311         pgac_cv_prog_cc_cflags__fwrapv=no
4312 fi
4313
4314 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4315 ac_c_werror_flag=$ac_save_c_werror_flag
4316 CFLAGS="$pgac_save_CFLAGS"
4317 fi
4318 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4319 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4320 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4321   CFLAGS="$CFLAGS -fwrapv"
4322 fi
4323
4324   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
4325   { $as_echo "$as_me:$LINENO: checking whether $CC supports -fexcess-precision=standard" >&5
4326 $as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
4327 if test "${pgac_cv_prog_cc_cflags__fexcess_precision_standard+set}" = set; then
4328   $as_echo_n "(cached) " >&6
4329 else
4330   pgac_save_CFLAGS=$CFLAGS
4331 CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
4332 ac_save_c_werror_flag=$ac_c_werror_flag
4333 ac_c_werror_flag=yes
4334 cat >conftest.$ac_ext <<_ACEOF
4335 /* confdefs.h.  */
4336 _ACEOF
4337 cat confdefs.h >>conftest.$ac_ext
4338 cat >>conftest.$ac_ext <<_ACEOF
4339 /* end confdefs.h.  */
4340
4341 int
4342 main ()
4343 {
4344
4345   ;
4346   return 0;
4347 }
4348 _ACEOF
4349 rm -f conftest.$ac_objext
4350 if { (ac_try="$ac_compile"
4351 case "(($ac_try" in
4352   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4353   *) ac_try_echo=$ac_try;;
4354 esac
4355 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4356 $as_echo "$ac_try_echo") >&5
4357   (eval "$ac_compile") 2>conftest.er1
4358   ac_status=$?
4359   grep -v '^ *+' conftest.er1 >conftest.err
4360   rm -f conftest.er1
4361   cat conftest.err >&5
4362   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4363   (exit $ac_status); } && {
4364          test -z "$ac_c_werror_flag" ||
4365          test ! -s conftest.err
4366        } && test -s conftest.$ac_objext; then
4367   pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
4368 else
4369   $as_echo "$as_me: failed program was:" >&5
4370 sed 's/^/| /' conftest.$ac_ext >&5
4371
4372         pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
4373 fi
4374
4375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4376 ac_c_werror_flag=$ac_save_c_werror_flag
4377 CFLAGS="$pgac_save_CFLAGS"
4378 fi
4379 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
4380 $as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
4381 if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
4382   CFLAGS="$CFLAGS -fexcess-precision=standard"
4383 fi
4384
4385   # Optimization flags for specific files that benefit from vectorization
4386   { $as_echo "$as_me:$LINENO: checking whether $CC supports -funroll-loops" >&5
4387 $as_echo_n "checking whether $CC supports -funroll-loops... " >&6; }
4388 if test "${pgac_cv_prog_cc_cflags__funroll_loops+set}" = set; then
4389   $as_echo_n "(cached) " >&6
4390 else
4391   pgac_save_CFLAGS=$CFLAGS
4392 CFLAGS="$pgac_save_CFLAGS -funroll-loops"
4393 ac_save_c_werror_flag=$ac_c_werror_flag
4394 ac_c_werror_flag=yes
4395 cat >conftest.$ac_ext <<_ACEOF
4396 /* confdefs.h.  */
4397 _ACEOF
4398 cat confdefs.h >>conftest.$ac_ext
4399 cat >>conftest.$ac_ext <<_ACEOF
4400 /* end confdefs.h.  */
4401
4402 int
4403 main ()
4404 {
4405
4406   ;
4407   return 0;
4408 }
4409 _ACEOF
4410 rm -f conftest.$ac_objext
4411 if { (ac_try="$ac_compile"
4412 case "(($ac_try" in
4413   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4414   *) ac_try_echo=$ac_try;;
4415 esac
4416 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4417 $as_echo "$ac_try_echo") >&5
4418   (eval "$ac_compile") 2>conftest.er1
4419   ac_status=$?
4420   grep -v '^ *+' conftest.er1 >conftest.err
4421   rm -f conftest.er1
4422   cat conftest.err >&5
4423   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4424   (exit $ac_status); } && {
4425          test -z "$ac_c_werror_flag" ||
4426          test ! -s conftest.err
4427        } && test -s conftest.$ac_objext; then
4428   pgac_cv_prog_cc_cflags__funroll_loops=yes
4429 else
4430   $as_echo "$as_me: failed program was:" >&5
4431 sed 's/^/| /' conftest.$ac_ext >&5
4432
4433         pgac_cv_prog_cc_cflags__funroll_loops=no
4434 fi
4435
4436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4437 ac_c_werror_flag=$ac_save_c_werror_flag
4438 CFLAGS="$pgac_save_CFLAGS"
4439 fi
4440 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__funroll_loops" >&5
4441 $as_echo "$pgac_cv_prog_cc_cflags__funroll_loops" >&6; }
4442 if test x"$pgac_cv_prog_cc_cflags__funroll_loops" = x"yes"; then
4443   CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
4444 fi
4445
4446   { $as_echo "$as_me:$LINENO: checking whether $CC supports -ftree-vectorize" >&5
4447 $as_echo_n "checking whether $CC supports -ftree-vectorize... " >&6; }
4448 if test "${pgac_cv_prog_cc_cflags__ftree_vectorize+set}" = set; then
4449   $as_echo_n "(cached) " >&6
4450 else
4451   pgac_save_CFLAGS=$CFLAGS
4452 CFLAGS="$pgac_save_CFLAGS -ftree-vectorize"
4453 ac_save_c_werror_flag=$ac_c_werror_flag
4454 ac_c_werror_flag=yes
4455 cat >conftest.$ac_ext <<_ACEOF
4456 /* confdefs.h.  */
4457 _ACEOF
4458 cat confdefs.h >>conftest.$ac_ext
4459 cat >>conftest.$ac_ext <<_ACEOF
4460 /* end confdefs.h.  */
4461
4462 int
4463 main ()
4464 {
4465
4466   ;
4467   return 0;
4468 }
4469 _ACEOF
4470 rm -f conftest.$ac_objext
4471 if { (ac_try="$ac_compile"
4472 case "(($ac_try" in
4473   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4474   *) ac_try_echo=$ac_try;;
4475 esac
4476 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4477 $as_echo "$ac_try_echo") >&5
4478   (eval "$ac_compile") 2>conftest.er1
4479   ac_status=$?
4480   grep -v '^ *+' conftest.er1 >conftest.err
4481   rm -f conftest.er1
4482   cat conftest.err >&5
4483   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4484   (exit $ac_status); } && {
4485          test -z "$ac_c_werror_flag" ||
4486          test ! -s conftest.err
4487        } && test -s conftest.$ac_objext; then
4488   pgac_cv_prog_cc_cflags__ftree_vectorize=yes
4489 else
4490   $as_echo "$as_me: failed program was:" >&5
4491 sed 's/^/| /' conftest.$ac_ext >&5
4492
4493         pgac_cv_prog_cc_cflags__ftree_vectorize=no
4494 fi
4495
4496 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4497 ac_c_werror_flag=$ac_save_c_werror_flag
4498 CFLAGS="$pgac_save_CFLAGS"
4499 fi
4500 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__ftree_vectorize" >&5
4501 $as_echo "$pgac_cv_prog_cc_cflags__ftree_vectorize" >&6; }
4502 if test x"$pgac_cv_prog_cc_cflags__ftree_vectorize" = x"yes"; then
4503   CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
4504 fi
4505
4506 elif test "$ICC" = yes; then
4507   # Intel's compiler has a bug/misoptimization in checking for
4508   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4509   { $as_echo "$as_me:$LINENO: checking whether $CC supports -mp1" >&5
4510 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4511 if test "${pgac_cv_prog_cc_cflags__mp1+set}" = set; then
4512   $as_echo_n "(cached) " >&6
4513 else
4514   pgac_save_CFLAGS=$CFLAGS
4515 CFLAGS="$pgac_save_CFLAGS -mp1"
4516 ac_save_c_werror_flag=$ac_c_werror_flag
4517 ac_c_werror_flag=yes
4518 cat >conftest.$ac_ext <<_ACEOF
4519 /* confdefs.h.  */
4520 _ACEOF
4521 cat confdefs.h >>conftest.$ac_ext
4522 cat >>conftest.$ac_ext <<_ACEOF
4523 /* end confdefs.h.  */
4524
4525 int
4526 main ()
4527 {
4528
4529   ;
4530   return 0;
4531 }
4532 _ACEOF
4533 rm -f conftest.$ac_objext
4534 if { (ac_try="$ac_compile"
4535 case "(($ac_try" in
4536   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4537   *) ac_try_echo=$ac_try;;
4538 esac
4539 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4540 $as_echo "$ac_try_echo") >&5
4541   (eval "$ac_compile") 2>conftest.er1
4542   ac_status=$?
4543   grep -v '^ *+' conftest.er1 >conftest.err
4544   rm -f conftest.er1
4545   cat conftest.err >&5
4546   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4547   (exit $ac_status); } && {
4548          test -z "$ac_c_werror_flag" ||
4549          test ! -s conftest.err
4550        } && test -s conftest.$ac_objext; then
4551   pgac_cv_prog_cc_cflags__mp1=yes
4552 else
4553   $as_echo "$as_me: failed program was:" >&5
4554 sed 's/^/| /' conftest.$ac_ext >&5
4555
4556         pgac_cv_prog_cc_cflags__mp1=no
4557 fi
4558
4559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4560 ac_c_werror_flag=$ac_save_c_werror_flag
4561 CFLAGS="$pgac_save_CFLAGS"
4562 fi
4563 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4564 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4565 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4566   CFLAGS="$CFLAGS -mp1"
4567 fi
4568
4569   # Make sure strict aliasing is off (though this is said to be the default)
4570   { $as_echo "$as_me:$LINENO: checking whether $CC supports -fno-strict-aliasing" >&5
4571 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4572 if test "${pgac_cv_prog_cc_cflags__fno_strict_aliasing+set}" = set; then
4573   $as_echo_n "(cached) " >&6
4574 else
4575   pgac_save_CFLAGS=$CFLAGS
4576 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4577 ac_save_c_werror_flag=$ac_c_werror_flag
4578 ac_c_werror_flag=yes
4579 cat >conftest.$ac_ext <<_ACEOF
4580 /* confdefs.h.  */
4581 _ACEOF
4582 cat confdefs.h >>conftest.$ac_ext
4583 cat >>conftest.$ac_ext <<_ACEOF
4584 /* end confdefs.h.  */
4585
4586 int
4587 main ()
4588 {
4589
4590   ;
4591   return 0;
4592 }
4593 _ACEOF
4594 rm -f conftest.$ac_objext
4595 if { (ac_try="$ac_compile"
4596 case "(($ac_try" in
4597   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4598   *) ac_try_echo=$ac_try;;
4599 esac
4600 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4601 $as_echo "$ac_try_echo") >&5
4602   (eval "$ac_compile") 2>conftest.er1
4603   ac_status=$?
4604   grep -v '^ *+' conftest.er1 >conftest.err
4605   rm -f conftest.er1
4606   cat conftest.err >&5
4607   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4608   (exit $ac_status); } && {
4609          test -z "$ac_c_werror_flag" ||
4610          test ! -s conftest.err
4611        } && test -s conftest.$ac_objext; then
4612   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4613 else
4614   $as_echo "$as_me: failed program was:" >&5
4615 sed 's/^/| /' conftest.$ac_ext >&5
4616
4617         pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4618 fi
4619
4620 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4621 ac_c_werror_flag=$ac_save_c_werror_flag
4622 CFLAGS="$pgac_save_CFLAGS"
4623 fi
4624 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4625 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4626 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4627   CFLAGS="$CFLAGS -fno-strict-aliasing"
4628 fi
4629
4630 elif test "$PORTNAME" = "aix"; then
4631   # AIX's xlc has to have strict aliasing turned off too
4632   { $as_echo "$as_me:$LINENO: checking whether $CC supports -qnoansialias" >&5
4633 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4634 if test "${pgac_cv_prog_cc_cflags__qnoansialias+set}" = set; then
4635   $as_echo_n "(cached) " >&6
4636 else
4637   pgac_save_CFLAGS=$CFLAGS
4638 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4639 ac_save_c_werror_flag=$ac_c_werror_flag
4640 ac_c_werror_flag=yes
4641 cat >conftest.$ac_ext <<_ACEOF
4642 /* confdefs.h.  */
4643 _ACEOF
4644 cat confdefs.h >>conftest.$ac_ext
4645 cat >>conftest.$ac_ext <<_ACEOF
4646 /* end confdefs.h.  */
4647
4648 int
4649 main ()
4650 {
4651
4652   ;
4653   return 0;
4654 }
4655 _ACEOF
4656 rm -f conftest.$ac_objext
4657 if { (ac_try="$ac_compile"
4658 case "(($ac_try" in
4659   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4660   *) ac_try_echo=$ac_try;;
4661 esac
4662 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4663 $as_echo "$ac_try_echo") >&5
4664   (eval "$ac_compile") 2>conftest.er1
4665   ac_status=$?
4666   grep -v '^ *+' conftest.er1 >conftest.err
4667   rm -f conftest.er1
4668   cat conftest.err >&5
4669   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4670   (exit $ac_status); } && {
4671          test -z "$ac_c_werror_flag" ||
4672          test ! -s conftest.err
4673        } && test -s conftest.$ac_objext; then
4674   pgac_cv_prog_cc_cflags__qnoansialias=yes
4675 else
4676   $as_echo "$as_me: failed program was:" >&5
4677 sed 's/^/| /' conftest.$ac_ext >&5
4678
4679         pgac_cv_prog_cc_cflags__qnoansialias=no
4680 fi
4681
4682 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4683 ac_c_werror_flag=$ac_save_c_werror_flag
4684 CFLAGS="$pgac_save_CFLAGS"
4685 fi
4686 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4687 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4688 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4689   CFLAGS="$CFLAGS -qnoansialias"
4690 fi
4691
4692 elif test "$PORTNAME" = "hpux"; then
4693   # On some versions of HP-UX, libm functions do not set errno by default.
4694   # Fix that by using +Olibmerrno if the compiler recognizes it.
4695   { $as_echo "$as_me:$LINENO: checking whether $CC supports +Olibmerrno" >&5
4696 $as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
4697 if test "${pgac_cv_prog_cc_cflags_pOlibmerrno+set}" = set; then
4698   $as_echo_n "(cached) " >&6
4699 else
4700   pgac_save_CFLAGS=$CFLAGS
4701 CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
4702 ac_save_c_werror_flag=$ac_c_werror_flag
4703 ac_c_werror_flag=yes
4704 cat >conftest.$ac_ext <<_ACEOF
4705 /* confdefs.h.  */
4706 _ACEOF
4707 cat confdefs.h >>conftest.$ac_ext
4708 cat >>conftest.$ac_ext <<_ACEOF
4709 /* end confdefs.h.  */
4710
4711 int
4712 main ()
4713 {
4714
4715   ;
4716   return 0;
4717 }
4718 _ACEOF
4719 rm -f conftest.$ac_objext
4720 if { (ac_try="$ac_compile"
4721 case "(($ac_try" in
4722   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4723   *) ac_try_echo=$ac_try;;
4724 esac
4725 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4726 $as_echo "$ac_try_echo") >&5
4727   (eval "$ac_compile") 2>conftest.er1
4728   ac_status=$?
4729   grep -v '^ *+' conftest.er1 >conftest.err
4730   rm -f conftest.er1
4731   cat conftest.err >&5
4732   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4733   (exit $ac_status); } && {
4734          test -z "$ac_c_werror_flag" ||
4735          test ! -s conftest.err
4736        } && test -s conftest.$ac_objext; then
4737   pgac_cv_prog_cc_cflags_pOlibmerrno=yes
4738 else
4739   $as_echo "$as_me: failed program was:" >&5
4740 sed 's/^/| /' conftest.$ac_ext >&5
4741
4742         pgac_cv_prog_cc_cflags_pOlibmerrno=no
4743 fi
4744
4745 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4746 ac_c_werror_flag=$ac_save_c_werror_flag
4747 CFLAGS="$pgac_save_CFLAGS"
4748 fi
4749 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
4750 $as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
4751 if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
4752   CFLAGS="$CFLAGS +Olibmerrno"
4753 fi
4754
4755 fi
4756
4757 CFLAGS_VECTOR=$CFLAGS_VECTOR
4758
4759
4760 # supply -g if --enable-debug
4761 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
4762   CFLAGS="$CFLAGS -g"
4763 fi
4764
4765 # enable code coverage if --enable-coverage
4766 if test "$enable_coverage" = yes; then
4767   if test "$GCC" = yes; then
4768     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
4769   else
4770     { { $as_echo "$as_me:$LINENO: error: --enable-coverage is supported only when using GCC" >&5
4771 $as_echo "$as_me: error: --enable-coverage is supported only when using GCC" >&2;}
4772    { (exit 1); exit 1; }; }
4773   fi
4774 fi
4775
4776 # enable profiling if --enable-profiling
4777 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
4778   if test "$GCC" = yes; then
4779
4780 cat >>confdefs.h <<\_ACEOF
4781 #define PROFILE_PID_DIR 1
4782 _ACEOF
4783
4784     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
4785   else
4786     { { $as_echo "$as_me:$LINENO: error: --enable-profiling is supported only when using GCC" >&5
4787 $as_echo "$as_me: error: --enable-profiling is supported only when using GCC" >&2;}
4788    { (exit 1); exit 1; }; }
4789   fi
4790 fi
4791
4792 # We already have this in Makefile.win32, but configure needs it too
4793 if test "$PORTNAME" = "win32"; then
4794   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
4795 fi
4796
4797 # Check if the compiler still works with the template settings
4798 { $as_echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
4799 $as_echo_n "checking whether the C compiler still works... " >&6; }
4800 cat >conftest.$ac_ext <<_ACEOF
4801 /* confdefs.h.  */
4802 _ACEOF
4803 cat confdefs.h >>conftest.$ac_ext
4804 cat >>conftest.$ac_ext <<_ACEOF
4805 /* end confdefs.h.  */
4806
4807 int
4808 main ()
4809 {
4810 return 0;
4811   ;
4812   return 0;
4813 }
4814 _ACEOF
4815 rm -f conftest.$ac_objext conftest$ac_exeext
4816 if { (ac_try="$ac_link"
4817 case "(($ac_try" in
4818   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4819   *) ac_try_echo=$ac_try;;
4820 esac
4821 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4822 $as_echo "$ac_try_echo") >&5
4823   (eval "$ac_link") 2>conftest.er1
4824   ac_status=$?
4825   grep -v '^ *+' conftest.er1 >conftest.err
4826   rm -f conftest.er1
4827   cat conftest.err >&5
4828   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4829   (exit $ac_status); } && {
4830          test -z "$ac_c_werror_flag" ||
4831          test ! -s conftest.err
4832        } && test -s conftest$ac_exeext && {
4833          test "$cross_compiling" = yes ||
4834          $as_test_x conftest$ac_exeext
4835        }; then
4836   { $as_echo "$as_me:$LINENO: result: yes" >&5
4837 $as_echo "yes" >&6; }
4838 else
4839   $as_echo "$as_me: failed program was:" >&5
4840 sed 's/^/| /' conftest.$ac_ext >&5
4841
4842         { $as_echo "$as_me:$LINENO: result: no" >&5
4843 $as_echo "no" >&6; }
4844    { { $as_echo "$as_me:$LINENO: error: cannot proceed" >&5
4845 $as_echo "$as_me: error: cannot proceed" >&2;}
4846    { (exit 1); exit 1; }; }
4847 fi
4848
4849 rm -rf conftest.dSYM
4850 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4851       conftest$ac_exeext conftest.$ac_ext
4852
4853 # Defend against gcc -ffast-math
4854 if test "$GCC" = yes; then
4855 cat >conftest.$ac_ext <<_ACEOF
4856 /* confdefs.h.  */
4857 _ACEOF
4858 cat confdefs.h >>conftest.$ac_ext
4859 cat >>conftest.$ac_ext <<_ACEOF
4860 /* end confdefs.h.  */
4861
4862 int
4863 main ()
4864 {
4865 #ifdef __FAST_MATH__
4866 choke me
4867 #endif
4868   ;
4869   return 0;
4870 }
4871 _ACEOF
4872 rm -f conftest.$ac_objext
4873 if { (ac_try="$ac_compile"
4874 case "(($ac_try" in
4875   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4876   *) ac_try_echo=$ac_try;;
4877 esac
4878 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4879 $as_echo "$ac_try_echo") >&5
4880   (eval "$ac_compile") 2>conftest.er1
4881   ac_status=$?
4882   grep -v '^ *+' conftest.er1 >conftest.err
4883   rm -f conftest.er1
4884   cat conftest.err >&5
4885   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4886   (exit $ac_status); } && {
4887          test -z "$ac_c_werror_flag" ||
4888          test ! -s conftest.err
4889        } && test -s conftest.$ac_objext; then
4890   :
4891 else
4892   $as_echo "$as_me: failed program was:" >&5
4893 sed 's/^/| /' conftest.$ac_ext >&5
4894
4895         { { $as_echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
4896 $as_echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
4897    { (exit 1); exit 1; }; }
4898 fi
4899
4900 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4901 fi
4902
4903 ac_ext=c
4904 ac_cpp='$CPP $CPPFLAGS'
4905 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4906 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4907 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4908 { $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4909 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4910 # On Suns, sometimes $CPP names a directory.
4911 if test -n "$CPP" && test -d "$CPP"; then
4912   CPP=
4913 fi
4914 if test -z "$CPP"; then
4915   if test "${ac_cv_prog_CPP+set}" = set; then
4916   $as_echo_n "(cached) " >&6
4917 else
4918       # Double quotes because CPP needs to be expanded
4919     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4920     do
4921       ac_preproc_ok=false
4922 for ac_c_preproc_warn_flag in '' yes
4923 do
4924   # Use a header file that comes with gcc, so configuring glibc
4925   # with a fresh cross-compiler works.
4926   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4927   # <limits.h> exists even on freestanding compilers.
4928   # On the NeXT, cc -E runs the code through the compiler's parser,
4929   # not just through cpp. "Syntax error" is here to catch this case.
4930   cat >conftest.$ac_ext <<_ACEOF
4931 /* confdefs.h.  */
4932 _ACEOF
4933 cat confdefs.h >>conftest.$ac_ext
4934 cat >>conftest.$ac_ext <<_ACEOF
4935 /* end confdefs.h.  */
4936 #ifdef __STDC__
4937 # include <limits.h>
4938 #else
4939 # include <assert.h>
4940 #endif
4941                      Syntax error
4942 _ACEOF
4943 if { (ac_try="$ac_cpp conftest.$ac_ext"
4944 case "(($ac_try" in
4945   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4946   *) ac_try_echo=$ac_try;;
4947 esac
4948 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4949 $as_echo "$ac_try_echo") >&5
4950   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4951   ac_status=$?
4952   grep -v '^ *+' conftest.er1 >conftest.err
4953   rm -f conftest.er1
4954   cat conftest.err >&5
4955   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4956   (exit $ac_status); } >/dev/null && {
4957          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4958          test ! -s conftest.err
4959        }; then
4960   :
4961 else
4962   $as_echo "$as_me: failed program was:" >&5
4963 sed 's/^/| /' conftest.$ac_ext >&5
4964
4965   # Broken: fails on valid input.
4966 continue
4967 fi
4968
4969 rm -f conftest.err conftest.$ac_ext
4970
4971   # OK, works on sane cases.  Now check whether nonexistent headers
4972   # can be detected and how.
4973   cat >conftest.$ac_ext <<_ACEOF
4974 /* confdefs.h.  */
4975 _ACEOF
4976 cat confdefs.h >>conftest.$ac_ext
4977 cat >>conftest.$ac_ext <<_ACEOF
4978 /* end confdefs.h.  */
4979 #include <ac_nonexistent.h>
4980 _ACEOF
4981 if { (ac_try="$ac_cpp conftest.$ac_ext"
4982 case "(($ac_try" in
4983   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4984   *) ac_try_echo=$ac_try;;
4985 esac
4986 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4987 $as_echo "$ac_try_echo") >&5
4988   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4989   ac_status=$?
4990   grep -v '^ *+' conftest.er1 >conftest.err
4991   rm -f conftest.er1
4992   cat conftest.err >&5
4993   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4994   (exit $ac_status); } >/dev/null && {
4995          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4996          test ! -s conftest.err
4997        }; then
4998   # Broken: success on invalid input.
4999 continue
5000 else
5001   $as_echo "$as_me: failed program was:" >&5
5002 sed 's/^/| /' conftest.$ac_ext >&5
5003
5004   # Passes both tests.
5005 ac_preproc_ok=:
5006 break
5007 fi
5008
5009 rm -f conftest.err conftest.$ac_ext
5010
5011 done
5012 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5013 rm -f conftest.err conftest.$ac_ext
5014 if $ac_preproc_ok; then
5015   break
5016 fi
5017
5018     done
5019     ac_cv_prog_CPP=$CPP
5020
5021 fi
5022   CPP=$ac_cv_prog_CPP
5023 else
5024   ac_cv_prog_CPP=$CPP
5025 fi
5026 { $as_echo "$as_me:$LINENO: result: $CPP" >&5
5027 $as_echo "$CPP" >&6; }
5028 ac_preproc_ok=false
5029 for ac_c_preproc_warn_flag in '' yes
5030 do
5031   # Use a header file that comes with gcc, so configuring glibc
5032   # with a fresh cross-compiler works.
5033   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5034   # <limits.h> exists even on freestanding compilers.
5035   # On the NeXT, cc -E runs the code through the compiler's parser,
5036   # not just through cpp. "Syntax error" is here to catch this case.
5037   cat >conftest.$ac_ext <<_ACEOF
5038 /* confdefs.h.  */
5039 _ACEOF
5040 cat confdefs.h >>conftest.$ac_ext
5041 cat >>conftest.$ac_ext <<_ACEOF
5042 /* end confdefs.h.  */
5043 #ifdef __STDC__
5044 # include <limits.h>
5045 #else
5046 # include <assert.h>
5047 #endif
5048                      Syntax error
5049 _ACEOF
5050 if { (ac_try="$ac_cpp conftest.$ac_ext"
5051 case "(($ac_try" in
5052   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5053   *) ac_try_echo=$ac_try;;
5054 esac
5055 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5056 $as_echo "$ac_try_echo") >&5
5057   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5058   ac_status=$?
5059   grep -v '^ *+' conftest.er1 >conftest.err
5060   rm -f conftest.er1
5061   cat conftest.err >&5
5062   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5063   (exit $ac_status); } >/dev/null && {
5064          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5065          test ! -s conftest.err
5066        }; then
5067   :
5068 else
5069   $as_echo "$as_me: failed program was:" >&5
5070 sed 's/^/| /' conftest.$ac_ext >&5
5071
5072   # Broken: fails on valid input.
5073 continue
5074 fi
5075
5076 rm -f conftest.err conftest.$ac_ext
5077
5078   # OK, works on sane cases.  Now check whether nonexistent headers
5079   # can be detected and how.
5080   cat >conftest.$ac_ext <<_ACEOF
5081 /* confdefs.h.  */
5082 _ACEOF
5083 cat confdefs.h >>conftest.$ac_ext
5084 cat >>conftest.$ac_ext <<_ACEOF
5085 /* end confdefs.h.  */
5086 #include <ac_nonexistent.h>
5087 _ACEOF
5088 if { (ac_try="$ac_cpp conftest.$ac_ext"
5089 case "(($ac_try" in
5090   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5091   *) ac_try_echo=$ac_try;;
5092 esac
5093 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5094 $as_echo "$ac_try_echo") >&5
5095   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5096   ac_status=$?
5097   grep -v '^ *+' conftest.er1 >conftest.err
5098   rm -f conftest.er1
5099   cat conftest.err >&5
5100   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5101   (exit $ac_status); } >/dev/null && {
5102          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5103          test ! -s conftest.err
5104        }; then
5105   # Broken: success on invalid input.
5106 continue
5107 else
5108   $as_echo "$as_me: failed program was:" >&5
5109 sed 's/^/| /' conftest.$ac_ext >&5
5110
5111   # Passes both tests.
5112 ac_preproc_ok=:
5113 break
5114 fi
5115
5116 rm -f conftest.err conftest.$ac_ext
5117
5118 done
5119 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5120 rm -f conftest.err conftest.$ac_ext
5121 if $ac_preproc_ok; then
5122   :
5123 else
5124   { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5125 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5126 { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
5127 See \`config.log' for more details." >&5
5128 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
5129 See \`config.log' for more details." >&2;}
5130    { (exit 1); exit 1; }; }; }
5131 fi
5132
5133 ac_ext=c
5134 ac_cpp='$CPP $CPPFLAGS'
5135 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5136 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5137 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5138
5139
5140
5141
5142 #
5143 # Set up TAS assembly code if needed; the template file has now had its
5144 # chance to request this.
5145 #
5146 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5147
5148
5149 if test "$need_tas" = yes ; then
5150   TAS=tas.o
5151 else
5152   TAS=""
5153 fi
5154
5155
5156
5157 #
5158 # Automatic dependency tracking
5159 #
5160
5161
5162 # Check whether --enable-depend was given.
5163 if test "${enable_depend+set}" = set; then
5164   enableval=$enable_depend;
5165   case $enableval in
5166     yes)
5167       autodepend=yes
5168       ;;
5169     no)
5170       :
5171       ;;
5172     *)
5173       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
5174 $as_echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
5175    { (exit 1); exit 1; }; }
5176       ;;
5177   esac
5178
5179 else
5180   enable_depend=no
5181
5182 fi
5183
5184
5185
5186
5187
5188 #
5189 # Enable assert checks
5190 #
5191
5192
5193 # Check whether --enable-cassert was given.
5194 if test "${enable_cassert+set}" = set; then
5195   enableval=$enable_cassert;
5196   case $enableval in
5197     yes)
5198
5199 cat >>confdefs.h <<\_ACEOF
5200 #define USE_ASSERT_CHECKING 1
5201 _ACEOF
5202
5203       ;;
5204     no)
5205       :
5206       ;;
5207     *)
5208       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
5209 $as_echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
5210    { (exit 1); exit 1; }; }
5211       ;;
5212   esac
5213
5214 else
5215   enable_cassert=no
5216
5217 fi
5218
5219
5220
5221
5222 #
5223 # Include directories
5224 #
5225 ac_save_IFS=$IFS
5226 IFS="${IFS}${PATH_SEPARATOR}"
5227 # SRCH_INC comes from the template file
5228 for dir in $with_includes $SRCH_INC; do
5229   if test -d "$dir"; then
5230     INCLUDES="$INCLUDES -I$dir"
5231   else
5232     { $as_echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
5233 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5234   fi
5235 done
5236 IFS=$ac_save_IFS
5237
5238
5239
5240 #
5241 # Library directories
5242 #
5243 ac_save_IFS=$IFS
5244 IFS="${IFS}${PATH_SEPARATOR}"
5245 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5246 for dir in $LIBRARY_DIRS $SRCH_LIB; do
5247   if test -d "$dir"; then
5248     LIBDIRS="$LIBDIRS -L$dir"
5249   else
5250     { $as_echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
5251 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5252   fi
5253 done
5254 IFS=$ac_save_IFS
5255
5256 #
5257 # Enable thread-safe client libraries
5258 #
5259 { $as_echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
5260 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
5261
5262
5263 # Check whether --enable-thread-safety was given.
5264 if test "${enable_thread_safety+set}" = set; then
5265   enableval=$enable_thread_safety;
5266   case $enableval in
5267     yes)
5268       :
5269       ;;
5270     no)
5271       :
5272       ;;
5273     *)
5274       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
5275 $as_echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
5276    { (exit 1); exit 1; }; }
5277       ;;
5278   esac
5279
5280 else
5281   enable_thread_safety=yes
5282
5283 fi
5284
5285
5286 if test "$enable_thread_safety" = yes; then
5287
5288 cat >>confdefs.h <<\_ACEOF
5289 #define ENABLE_THREAD_SAFETY 1
5290 _ACEOF
5291
5292 fi
5293 { $as_echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
5294 $as_echo "$enable_thread_safety" >&6; }
5295
5296
5297 #
5298 # Optionally build Tcl modules (PL/Tcl)
5299 #
5300 { $as_echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
5301 $as_echo_n "checking whether to build with Tcl... " >&6; }
5302
5303
5304
5305 # Check whether --with-tcl was given.
5306 if test "${with_tcl+set}" = set; then
5307   withval=$with_tcl;
5308   case $withval in
5309     yes)
5310       :
5311       ;;
5312     no)
5313       :
5314       ;;
5315     *)
5316       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
5317 $as_echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
5318    { (exit 1); exit 1; }; }
5319       ;;
5320   esac
5321
5322 else
5323   with_tcl=no
5324
5325 fi
5326
5327
5328 { $as_echo "$as_me:$LINENO: result: $with_tcl" >&5
5329 $as_echo "$with_tcl" >&6; }
5330
5331
5332 # We see if the path to the Tcl/Tk configuration scripts is specified.
5333 # This will override the use of tclsh to find the paths to search.
5334
5335
5336
5337
5338 # Check whether --with-tclconfig was given.
5339 if test "${with_tclconfig+set}" = set; then
5340   withval=$with_tclconfig;
5341   case $withval in
5342     yes)
5343       { { $as_echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
5344 $as_echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
5345    { (exit 1); exit 1; }; }
5346       ;;
5347     no)
5348       { { $as_echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
5349 $as_echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
5350    { (exit 1); exit 1; }; }
5351       ;;
5352     *)
5353
5354       ;;
5355   esac
5356
5357 fi
5358
5359
5360
5361 #
5362 # Optionally build Perl modules (PL/Perl)
5363 #
5364 { $as_echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
5365 $as_echo_n "checking whether to build Perl modules... " >&6; }
5366
5367
5368
5369 # Check whether --with-perl was given.
5370 if test "${with_perl+set}" = set; then
5371   withval=$with_perl;
5372   case $withval in
5373     yes)
5374       :
5375       ;;
5376     no)
5377       :
5378       ;;
5379     *)
5380       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
5381 $as_echo "$as_me: error: no argument expected for --with-perl option" >&2;}
5382    { (exit 1); exit 1; }; }
5383       ;;
5384   esac
5385
5386 else
5387   with_perl=no
5388
5389 fi
5390
5391
5392 { $as_echo "$as_me:$LINENO: result: $with_perl" >&5
5393 $as_echo "$with_perl" >&6; }
5394
5395
5396 #
5397 # Optionally build Python modules (PL/Python)
5398 #
5399 { $as_echo "$as_me:$LINENO: checking whether to build Python modules" >&5
5400 $as_echo_n "checking whether to build Python modules... " >&6; }
5401
5402
5403
5404 # Check whether --with-python was given.
5405 if test "${with_python+set}" = set; then
5406   withval=$with_python;
5407   case $withval in
5408     yes)
5409       :
5410       ;;
5411     no)
5412       :
5413       ;;
5414     *)
5415       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
5416 $as_echo "$as_me: error: no argument expected for --with-python option" >&2;}
5417    { (exit 1); exit 1; }; }
5418       ;;
5419   esac
5420
5421 else
5422   with_python=no
5423
5424 fi
5425
5426
5427 { $as_echo "$as_me:$LINENO: result: $with_python" >&5
5428 $as_echo "$with_python" >&6; }
5429
5430
5431 #
5432 # GSSAPI
5433 #
5434 { $as_echo "$as_me:$LINENO: checking whether to build with GSSAPI support" >&5
5435 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5436
5437
5438
5439 # Check whether --with-gssapi was given.
5440 if test "${with_gssapi+set}" = set; then
5441   withval=$with_gssapi;
5442   case $withval in
5443     yes)
5444
5445
5446 cat >>confdefs.h <<\_ACEOF
5447 #define ENABLE_GSS 1
5448 _ACEOF
5449
5450   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5451
5452       ;;
5453     no)
5454       :
5455       ;;
5456     *)
5457       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-gssapi option" >&5
5458 $as_echo "$as_me: error: no argument expected for --with-gssapi option" >&2;}
5459    { (exit 1); exit 1; }; }
5460       ;;
5461   esac
5462
5463 else
5464   with_gssapi=no
5465
5466 fi
5467
5468
5469 { $as_echo "$as_me:$LINENO: result: $with_gssapi" >&5
5470 $as_echo "$with_gssapi" >&6; }
5471
5472 #
5473 # Kerberos 5
5474 #
5475 { $as_echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
5476 $as_echo_n "checking whether to build with Kerberos 5 support... " >&6; }
5477
5478
5479
5480 # Check whether --with-krb5 was given.
5481 if test "${with_krb5+set}" = set; then
5482   withval=$with_krb5;
5483   case $withval in
5484     yes)
5485
5486
5487 cat >>confdefs.h <<\_ACEOF
5488 #define KRB5 1
5489 _ACEOF
5490
5491   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5492
5493       ;;
5494     no)
5495       :
5496       ;;
5497     *)
5498       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
5499 $as_echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
5500    { (exit 1); exit 1; }; }
5501       ;;
5502   esac
5503
5504 else
5505   with_krb5=no
5506
5507 fi
5508
5509
5510 { $as_echo "$as_me:$LINENO: result: $with_krb5" >&5
5511 $as_echo "$with_krb5" >&6; }
5512
5513
5514
5515
5516
5517 #
5518 # Kerberos configuration parameters
5519 #
5520
5521
5522
5523 # Check whether --with-krb-srvnam was given.
5524 if test "${with_krb_srvnam+set}" = set; then
5525   withval=$with_krb_srvnam;
5526   case $withval in
5527     yes)
5528       { { $as_echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
5529 $as_echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
5530    { (exit 1); exit 1; }; }
5531       ;;
5532     no)
5533       { { $as_echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
5534 $as_echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
5535    { (exit 1); exit 1; }; }
5536       ;;
5537     *)
5538
5539       ;;
5540   esac
5541
5542 else
5543   with_krb_srvnam="postgres"
5544 fi
5545
5546
5547
5548 cat >>confdefs.h <<_ACEOF
5549 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5550 _ACEOF
5551
5552
5553
5554 #
5555 # PAM
5556 #
5557 { $as_echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
5558 $as_echo_n "checking whether to build with PAM support... " >&6; }
5559
5560
5561
5562 # Check whether --with-pam was given.
5563 if test "${with_pam+set}" = set; then
5564   withval=$with_pam;
5565   case $withval in
5566     yes)
5567
5568 cat >>confdefs.h <<\_ACEOF
5569 #define USE_PAM 1
5570 _ACEOF
5571
5572       ;;
5573     no)
5574       :
5575       ;;
5576     *)
5577       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
5578 $as_echo "$as_me: error: no argument expected for --with-pam option" >&2;}
5579    { (exit 1); exit 1; }; }
5580       ;;
5581   esac
5582
5583 else
5584   with_pam=no
5585
5586 fi
5587
5588
5589 { $as_echo "$as_me:$LINENO: result: $with_pam" >&5
5590 $as_echo "$with_pam" >&6; }
5591
5592
5593 #
5594 # LDAP
5595 #
5596 { $as_echo "$as_me:$LINENO: checking whether to build with LDAP support" >&5
5597 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5598
5599
5600
5601 # Check whether --with-ldap was given.
5602 if test "${with_ldap+set}" = set; then
5603   withval=$with_ldap;
5604   case $withval in
5605     yes)
5606
5607 cat >>confdefs.h <<\_ACEOF
5608 #define USE_LDAP 1
5609 _ACEOF
5610
5611       ;;
5612     no)
5613       :
5614       ;;
5615     *)
5616       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-ldap option" >&5
5617 $as_echo "$as_me: error: no argument expected for --with-ldap option" >&2;}
5618    { (exit 1); exit 1; }; }
5619       ;;
5620   esac
5621
5622 else
5623   with_ldap=no
5624
5625 fi
5626
5627
5628 { $as_echo "$as_me:$LINENO: result: $with_ldap" >&5
5629 $as_echo "$with_ldap" >&6; }
5630
5631
5632 #
5633 # Bonjour
5634 #
5635 { $as_echo "$as_me:$LINENO: checking whether to build with Bonjour support" >&5
5636 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5637
5638
5639
5640 # Check whether --with-bonjour was given.
5641 if test "${with_bonjour+set}" = set; then
5642   withval=$with_bonjour;
5643   case $withval in
5644     yes)
5645
5646 cat >>confdefs.h <<\_ACEOF
5647 #define USE_BONJOUR 1
5648 _ACEOF
5649
5650       ;;
5651     no)
5652       :
5653       ;;
5654     *)
5655       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-bonjour option" >&5
5656 $as_echo "$as_me: error: no argument expected for --with-bonjour option" >&2;}
5657    { (exit 1); exit 1; }; }
5658       ;;
5659   esac
5660
5661 else
5662   with_bonjour=no
5663
5664 fi
5665
5666
5667 { $as_echo "$as_me:$LINENO: result: $with_bonjour" >&5
5668 $as_echo "$with_bonjour" >&6; }
5669
5670
5671 #
5672 # OpenSSL
5673 #
5674 { $as_echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
5675 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5676
5677
5678
5679 # Check whether --with-openssl was given.
5680 if test "${with_openssl+set}" = set; then
5681   withval=$with_openssl;
5682   case $withval in
5683     yes)
5684
5685 cat >>confdefs.h <<\_ACEOF
5686 #define USE_SSL 1
5687 _ACEOF
5688
5689       ;;
5690     no)
5691       :
5692       ;;
5693     *)
5694       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
5695 $as_echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
5696    { (exit 1); exit 1; }; }
5697       ;;
5698   esac
5699
5700 else
5701   with_openssl=no
5702
5703 fi
5704
5705
5706 { $as_echo "$as_me:$LINENO: result: $with_openssl" >&5
5707 $as_echo "$with_openssl" >&6; }
5708
5709
5710 #
5711 # SELinux
5712 #
5713 { $as_echo "$as_me:$LINENO: checking whether to build with SELinux support" >&5
5714 $as_echo_n "checking whether to build with SELinux support... " >&6; }
5715
5716
5717
5718 # Check whether --with-selinux was given.
5719 if test "${with_selinux+set}" = set; then
5720   withval=$with_selinux;
5721   case $withval in
5722     yes)
5723       :
5724       ;;
5725     no)
5726       :
5727       ;;
5728     *)
5729       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-selinux option" >&5
5730 $as_echo "$as_me: error: no argument expected for --with-selinux option" >&2;}
5731    { (exit 1); exit 1; }; }
5732       ;;
5733   esac
5734
5735 else
5736   with_selinux=no
5737
5738 fi
5739
5740
5741
5742 { $as_echo "$as_me:$LINENO: result: $with_selinux" >&5
5743 $as_echo "$with_selinux" >&6; }
5744
5745 #
5746 # Readline
5747 #
5748
5749
5750
5751 # Check whether --with-readline was given.
5752 if test "${with_readline+set}" = set; then
5753   withval=$with_readline;
5754   case $withval in
5755     yes)
5756       :
5757       ;;
5758     no)
5759       :
5760       ;;
5761     *)
5762       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
5763 $as_echo "$as_me: error: no argument expected for --with-readline option" >&2;}
5764    { (exit 1); exit 1; }; }
5765       ;;
5766   esac
5767
5768 else
5769   with_readline=yes
5770
5771 fi
5772
5773
5774 # readline on MinGW has problems with backslashes in psql and other bugs.
5775 # This is particularly a problem with non-US code pages.
5776 # Therefore disable its use until we understand the cause. 2004-07-20
5777 if test "$PORTNAME" = "win32"; then
5778   if test "$with_readline" = yes; then
5779     { $as_echo "$as_me:$LINENO: WARNING: *** Readline does not work on MinGW --- disabling" >&5
5780 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
5781     with_readline=no
5782   fi
5783 fi
5784
5785
5786 #
5787 # Prefer libedit
5788 #
5789
5790
5791
5792 # Check whether --with-libedit-preferred was given.
5793 if test "${with_libedit_preferred+set}" = set; then
5794   withval=$with_libedit_preferred;
5795   case $withval in
5796     yes)
5797       :
5798       ;;
5799     no)
5800       :
5801       ;;
5802     *)
5803       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-libedit-preferred option" >&5
5804 $as_echo "$as_me: error: no argument expected for --with-libedit-preferred option" >&2;}
5805    { (exit 1); exit 1; }; }
5806       ;;
5807   esac
5808
5809 else
5810   with_libedit_preferred=no
5811
5812 fi
5813
5814
5815
5816
5817 #
5818 # OSSP UUID library
5819 #
5820
5821
5822
5823 # Check whether --with-ossp-uuid was given.
5824 if test "${with_ossp_uuid+set}" = set; then
5825   withval=$with_ossp_uuid;
5826   case $withval in
5827     yes)
5828       :
5829       ;;
5830     no)
5831       :
5832       ;;
5833     *)
5834       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-ossp-uuid option" >&5
5835 $as_echo "$as_me: error: no argument expected for --with-ossp-uuid option" >&2;}
5836    { (exit 1); exit 1; }; }
5837       ;;
5838   esac
5839
5840 else
5841   with_ossp_uuid=no
5842
5843 fi
5844
5845
5846
5847
5848
5849 #
5850 # XML
5851 #
5852
5853
5854
5855 # Check whether --with-libxml was given.
5856 if test "${with_libxml+set}" = set; then
5857   withval=$with_libxml;
5858   case $withval in
5859     yes)
5860
5861 cat >>confdefs.h <<\_ACEOF
5862 #define USE_LIBXML 1
5863 _ACEOF
5864
5865       ;;
5866     no)
5867       :
5868       ;;
5869     *)
5870       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-libxml option" >&5
5871 $as_echo "$as_me: error: no argument expected for --with-libxml option" >&2;}
5872    { (exit 1); exit 1; }; }
5873       ;;
5874   esac
5875
5876 else
5877   with_libxml=no
5878
5879 fi
5880
5881
5882
5883 if test "$with_libxml" = yes ; then
5884   for ac_prog in xml2-config
5885 do
5886   # Extract the first word of "$ac_prog", so it can be a program name with args.
5887 set dummy $ac_prog; ac_word=$2
5888 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5889 $as_echo_n "checking for $ac_word... " >&6; }
5890 if test "${ac_cv_prog_XML2_CONFIG+set}" = set; then
5891   $as_echo_n "(cached) " >&6
5892 else
5893   if test -n "$XML2_CONFIG"; then
5894   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
5895 else
5896 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5897 for as_dir in $PATH
5898 do
5899   IFS=$as_save_IFS
5900   test -z "$as_dir" && as_dir=.
5901   for ac_exec_ext in '' $ac_executable_extensions; do
5902   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5903     ac_cv_prog_XML2_CONFIG="$ac_prog"
5904     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5905     break 2
5906   fi
5907 done
5908 done
5909 IFS=$as_save_IFS
5910
5911 fi
5912 fi
5913 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
5914 if test -n "$XML2_CONFIG"; then
5915   { $as_echo "$as_me:$LINENO: result: $XML2_CONFIG" >&5
5916 $as_echo "$XML2_CONFIG" >&6; }
5917 else
5918   { $as_echo "$as_me:$LINENO: result: no" >&5
5919 $as_echo "no" >&6; }
5920 fi
5921
5922
5923   test -n "$XML2_CONFIG" && break
5924 done
5925
5926   if test -n "$XML2_CONFIG"; then
5927     for pgac_option in `$XML2_CONFIG --cflags`; do
5928       case $pgac_option in
5929         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
5930       esac
5931     done
5932     for pgac_option in `$XML2_CONFIG --libs`; do
5933       case $pgac_option in
5934         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5935       esac
5936     done
5937   fi
5938 fi
5939
5940
5941
5942 #
5943 # XSLT
5944 #
5945
5946
5947
5948 # Check whether --with-libxslt was given.
5949 if test "${with_libxslt+set}" = set; then
5950   withval=$with_libxslt;
5951   case $withval in
5952     yes)
5953
5954 cat >>confdefs.h <<\_ACEOF
5955 #define USE_LIBXSLT 1
5956 _ACEOF
5957
5958       ;;
5959     no)
5960       :
5961       ;;
5962     *)
5963       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-libxslt option" >&5
5964 $as_echo "$as_me: error: no argument expected for --with-libxslt option" >&2;}
5965    { (exit 1); exit 1; }; }
5966       ;;
5967   esac
5968
5969 else
5970   with_libxslt=no
5971
5972 fi
5973
5974
5975
5976
5977
5978
5979 #
5980 # tzdata
5981 #
5982
5983
5984
5985 # Check whether --with-system-tzdata was given.
5986 if test "${with_system_tzdata+set}" = set; then
5987   withval=$with_system_tzdata;
5988   case $withval in
5989     yes)
5990       { { $as_echo "$as_me:$LINENO: error: argument required for --with-system-tzdata option" >&5
5991 $as_echo "$as_me: error: argument required for --with-system-tzdata option" >&2;}
5992    { (exit 1); exit 1; }; }
5993       ;;
5994     no)
5995       { { $as_echo "$as_me:$LINENO: error: argument required for --with-system-tzdata option" >&5
5996 $as_echo "$as_me: error: argument required for --with-system-tzdata option" >&2;}
5997    { (exit 1); exit 1; }; }
5998       ;;
5999     *)
6000
6001       ;;
6002   esac
6003
6004 fi
6005
6006
6007
6008
6009 #
6010 # Zlib
6011 #
6012
6013
6014
6015 # Check whether --with-zlib was given.
6016 if test "${with_zlib+set}" = set; then
6017   withval=$with_zlib;
6018   case $withval in
6019     yes)
6020       :
6021       ;;
6022     no)
6023       :
6024       ;;
6025     *)
6026       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
6027 $as_echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
6028    { (exit 1); exit 1; }; }
6029       ;;
6030   esac
6031
6032 else
6033   with_zlib=yes
6034
6035 fi
6036
6037
6038
6039
6040 #
6041 # Elf
6042 #
6043
6044 # Assume system is ELF if it predefines __ELF__ as 1,
6045 # otherwise believe host_os based default.
6046 case $host_os in
6047     freebsd1*|freebsd2*) elf=no;;
6048     freebsd3*|freebsd4*) elf=yes;;
6049 esac
6050
6051
6052 { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
6053 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6054 if test "${ac_cv_path_GREP+set}" = set; then
6055   $as_echo_n "(cached) " >&6
6056 else
6057   if test -z "$GREP"; then
6058   ac_path_GREP_found=false
6059   # Loop through the user's path and test for each of PROGNAME-LIST
6060   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6061 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6062 do
6063   IFS=$as_save_IFS
6064   test -z "$as_dir" && as_dir=.
6065   for ac_prog in grep ggrep; do
6066     for ac_exec_ext in '' $ac_executable_extensions; do
6067       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6068       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6069 # Check for GNU ac_path_GREP and select it if it is found.
6070   # Check for GNU $ac_path_GREP
6071 case `"$ac_path_GREP" --version 2>&1` in
6072 *GNU*)
6073   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6074 *)
6075   ac_count=0
6076   $as_echo_n 0123456789 >"conftest.in"
6077   while :
6078   do
6079     cat "conftest.in" "conftest.in" >"conftest.tmp"
6080     mv "conftest.tmp" "conftest.in"
6081     cp "conftest.in" "conftest.nl"
6082     $as_echo 'GREP' >> "conftest.nl"
6083     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6084     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6085     ac_count=`expr $ac_count + 1`
6086     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6087       # Best one so far, save it but keep looking for a better one
6088       ac_cv_path_GREP="$ac_path_GREP"
6089       ac_path_GREP_max=$ac_count
6090     fi
6091     # 10*(2^10) chars as input seems more than enough
6092     test $ac_count -gt 10 && break
6093   done
6094   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6095 esac
6096
6097       $ac_path_GREP_found && break 3
6098     done
6099   done
6100 done
6101 IFS=$as_save_IFS
6102   if test -z "$ac_cv_path_GREP"; then
6103     { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
6104 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
6105    { (exit 1); exit 1; }; }
6106   fi
6107 else
6108   ac_cv_path_GREP=$GREP
6109 fi
6110
6111 fi
6112 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
6113 $as_echo "$ac_cv_path_GREP" >&6; }
6114  GREP="$ac_cv_path_GREP"
6115
6116
6117 { $as_echo "$as_me:$LINENO: checking for egrep" >&5
6118 $as_echo_n "checking for egrep... " >&6; }
6119 if test "${ac_cv_path_EGREP+set}" = set; then
6120   $as_echo_n "(cached) " >&6
6121 else
6122   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6123    then ac_cv_path_EGREP="$GREP -E"
6124    else
6125      if test -z "$EGREP"; then
6126   ac_path_EGREP_found=false
6127   # Loop through the user's path and test for each of PROGNAME-LIST
6128   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6129 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6130 do
6131   IFS=$as_save_IFS
6132   test -z "$as_dir" && as_dir=.
6133   for ac_prog in egrep; do
6134     for ac_exec_ext in '' $ac_executable_extensions; do
6135       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6136       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6137 # Check for GNU ac_path_EGREP and select it if it is found.
6138   # Check for GNU $ac_path_EGREP
6139 case `"$ac_path_EGREP" --version 2>&1` in
6140 *GNU*)
6141   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6142 *)
6143   ac_count=0
6144   $as_echo_n 0123456789 >"conftest.in"
6145   while :
6146   do
6147     cat "conftest.in" "conftest.in" >"conftest.tmp"
6148     mv "conftest.tmp" "conftest.in"
6149     cp "conftest.in" "conftest.nl"
6150     $as_echo 'EGREP' >> "conftest.nl"
6151     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6152     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6153     ac_count=`expr $ac_count + 1`
6154     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6155       # Best one so far, save it but keep looking for a better one
6156       ac_cv_path_EGREP="$ac_path_EGREP"
6157       ac_path_EGREP_max=$ac_count
6158     fi
6159     # 10*(2^10) chars as input seems more than enough
6160     test $ac_count -gt 10 && break
6161   done
6162   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6163 esac
6164
6165       $ac_path_EGREP_found && break 3
6166     done
6167   done
6168 done
6169 IFS=$as_save_IFS
6170   if test -z "$ac_cv_path_EGREP"; then
6171     { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
6172 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
6173    { (exit 1); exit 1; }; }
6174   fi
6175 else
6176   ac_cv_path_EGREP=$EGREP
6177 fi
6178
6179    fi
6180 fi
6181 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
6182 $as_echo "$ac_cv_path_EGREP" >&6; }
6183  EGREP="$ac_cv_path_EGREP"
6184
6185
6186 cat >conftest.$ac_ext <<_ACEOF
6187 /* confdefs.h.  */
6188 _ACEOF
6189 cat confdefs.h >>conftest.$ac_ext
6190 cat >>conftest.$ac_ext <<_ACEOF
6191 /* end confdefs.h.  */
6192 #if __ELF__
6193   yes
6194 #endif
6195
6196 _ACEOF
6197 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6198   $EGREP "yes" >/dev/null 2>&1; then
6199   ELF_SYS=true
6200 else
6201   if test "X$elf" = "Xyes" ; then
6202   ELF_SYS=true
6203 else
6204   ELF_SYS=
6205 fi
6206 fi
6207 rm -f conftest*
6208
6209
6210
6211 #
6212 # Assignments
6213 #
6214
6215 CPPFLAGS="$CPPFLAGS $INCLUDES"
6216 LDFLAGS="$LDFLAGS $LIBDIRS"
6217
6218
6219
6220
6221
6222 # Check whether --with-gnu-ld was given.
6223 if test "${with_gnu_ld+set}" = set; then
6224   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6225 else
6226   with_gnu_ld=no
6227 fi
6228
6229 ac_prog=ld
6230 if test "$GCC" = yes; then
6231   # Check if gcc -print-prog-name=ld gives a path.
6232   { $as_echo "$as_me:$LINENO: checking for ld used by GCC" >&5
6233 $as_echo_n "checking for ld used by GCC... " >&6; }
6234   case $host in
6235   *-*-mingw*)
6236     # gcc leaves a trailing carriage return which upsets mingw
6237     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6238   *)
6239     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6240   esac
6241   case "$ac_prog" in
6242     # Accept absolute paths.
6243     [\\/]* | [A-Za-z]:[\\/]*)
6244       re_direlt='/[^/][^/]*/\.\./'
6245       # Canonicalize the path of ld
6246       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6247       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6248         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6249       done
6250       test -z "$LD" && LD="$ac_prog"
6251       ;;
6252   "")
6253     # If it fails, then pretend we aren't using GCC.
6254     ac_prog=ld
6255     ;;
6256   *)
6257     # If it is relative, then search for the first ld in PATH.
6258     with_gnu_ld=unknown
6259     ;;
6260   esac
6261 elif test "$with_gnu_ld" = yes; then
6262   { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
6263 $as_echo_n "checking for GNU ld... " >&6; }
6264 else
6265   { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5
6266 $as_echo_n "checking for non-GNU ld... " >&6; }
6267 fi
6268 if test "${ac_cv_path_LD+set}" = set; then
6269   $as_echo_n "(cached) " >&6
6270 else
6271   if test -z "$LD"; then
6272   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6273   for ac_dir in $PATH; do
6274     test -z "$ac_dir" && ac_dir=.
6275     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6276       ac_cv_path_LD="$ac_dir/$ac_prog"
6277       # Check to see if the program is GNU ld.  I'd rather use --version,
6278       # but apparently some GNU ld's only accept -v.
6279       # Break only if it was the GNU/non-GNU ld that we prefer.
6280       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6281         test "$with_gnu_ld" != no && break
6282       else
6283         test "$with_gnu_ld" != yes && break
6284       fi
6285     fi
6286   done
6287   IFS="$ac_save_ifs"
6288 else
6289   ac_cv_path_LD="$LD" # Let the user override the test with a path.
6290 fi
6291 fi
6292
6293 LD="$ac_cv_path_LD"
6294 if test -n "$LD"; then
6295   { $as_echo "$as_me:$LINENO: result: $LD" >&5
6296 $as_echo "$LD" >&6; }
6297 else
6298   { $as_echo "$as_me:$LINENO: result: no" >&5
6299 $as_echo "no" >&6; }
6300 fi
6301 test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
6302 $as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
6303    { (exit 1); exit 1; }; }
6304 { $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
6305 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6306 if test "${ac_cv_prog_gnu_ld+set}" = set; then
6307   $as_echo_n "(cached) " >&6
6308 else
6309   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6310 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6311   ac_cv_prog_gnu_ld=yes
6312 else
6313   ac_cv_prog_gnu_ld=no
6314 fi
6315 fi
6316 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
6317 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6318 with_gnu_ld=$ac_cv_prog_gnu_ld
6319
6320
6321
6322
6323 case $host_os in sysv5*)
6324   { $as_echo "$as_me:$LINENO: checking whether ld -R works" >&5
6325 $as_echo_n "checking whether ld -R works... " >&6; }
6326 if test "${pgac_cv_prog_ld_R+set}" = set; then
6327   $as_echo_n "(cached) " >&6
6328 else
6329
6330     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
6331     cat >conftest.$ac_ext <<_ACEOF
6332 /* confdefs.h.  */
6333 _ACEOF
6334 cat confdefs.h >>conftest.$ac_ext
6335 cat >>conftest.$ac_ext <<_ACEOF
6336 /* end confdefs.h.  */
6337
6338 int
6339 main ()
6340 {
6341
6342   ;
6343   return 0;
6344 }
6345 _ACEOF
6346 rm -f conftest.$ac_objext conftest$ac_exeext
6347 if { (ac_try="$ac_link"
6348 case "(($ac_try" in
6349   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6350   *) ac_try_echo=$ac_try;;
6351 esac
6352 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6353 $as_echo "$ac_try_echo") >&5
6354   (eval "$ac_link") 2>conftest.er1
6355   ac_status=$?
6356   grep -v '^ *+' conftest.er1 >conftest.err
6357   rm -f conftest.er1
6358   cat conftest.err >&5
6359   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6360   (exit $ac_status); } && {
6361          test -z "$ac_c_werror_flag" ||
6362          test ! -s conftest.err
6363        } && test -s conftest$ac_exeext && {
6364          test "$cross_compiling" = yes ||
6365          $as_test_x conftest$ac_exeext
6366        }; then
6367   pgac_cv_prog_ld_R=yes
6368 else
6369   $as_echo "$as_me: failed program was:" >&5
6370 sed 's/^/| /' conftest.$ac_ext >&5
6371
6372         pgac_cv_prog_ld_R=no
6373 fi
6374
6375 rm -rf conftest.dSYM
6376 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6377       conftest$ac_exeext conftest.$ac_ext
6378     LDFLAGS=$pgac_save_LDFLAGS
6379
6380 fi
6381 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
6382 $as_echo "$pgac_cv_prog_ld_R" >&6; }
6383   ld_R_works=$pgac_cv_prog_ld_R
6384
6385 esac
6386 if test -n "$ac_tool_prefix"; then
6387   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6388 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6389 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6390 $as_echo_n "checking for $ac_word... " >&6; }
6391 if test "${ac_cv_prog_RANLIB+set}" = set; then
6392   $as_echo_n "(cached) " >&6
6393 else
6394   if test -n "$RANLIB"; then
6395   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6396 else
6397 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6398 for as_dir in $PATH
6399 do
6400   IFS=$as_save_IFS
6401   test -z "$as_dir" && as_dir=.
6402   for ac_exec_ext in '' $ac_executable_extensions; do
6403   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6404     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6405     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6406     break 2
6407   fi
6408 done
6409 done
6410 IFS=$as_save_IFS
6411
6412 fi
6413 fi
6414 RANLIB=$ac_cv_prog_RANLIB
6415 if test -n "$RANLIB"; then
6416   { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
6417 $as_echo "$RANLIB" >&6; }
6418 else
6419   { $as_echo "$as_me:$LINENO: result: no" >&5
6420 $as_echo "no" >&6; }
6421 fi
6422
6423
6424 fi
6425 if test -z "$ac_cv_prog_RANLIB"; then
6426   ac_ct_RANLIB=$RANLIB
6427   # Extract the first word of "ranlib", so it can be a program name with args.
6428 set dummy ranlib; ac_word=$2
6429 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6430 $as_echo_n "checking for $ac_word... " >&6; }
6431 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
6432   $as_echo_n "(cached) " >&6
6433 else
6434   if test -n "$ac_ct_RANLIB"; then
6435   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6436 else
6437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6438 for as_dir in $PATH
6439 do
6440   IFS=$as_save_IFS
6441   test -z "$as_dir" && as_dir=.
6442   for ac_exec_ext in '' $ac_executable_extensions; do
6443   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6444     ac_cv_prog_ac_ct_RANLIB="ranlib"
6445     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6446     break 2
6447   fi
6448 done
6449 done
6450 IFS=$as_save_IFS
6451
6452 fi
6453 fi
6454 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6455 if test -n "$ac_ct_RANLIB"; then
6456   { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
6457 $as_echo "$ac_ct_RANLIB" >&6; }
6458 else
6459   { $as_echo "$as_me:$LINENO: result: no" >&5
6460 $as_echo "no" >&6; }
6461 fi
6462
6463   if test "x$ac_ct_RANLIB" = x; then
6464     RANLIB=":"
6465   else
6466     case $cross_compiling:$ac_tool_warned in
6467 yes:)
6468 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
6469 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6470 ac_tool_warned=yes ;;
6471 esac
6472     RANLIB=$ac_ct_RANLIB
6473   fi
6474 else
6475   RANLIB="$ac_cv_prog_RANLIB"
6476 fi
6477
6478
6479   if test -n "$ac_tool_prefix"; then
6480   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6481 set dummy ${ac_tool_prefix}strip; ac_word=$2
6482 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6483 $as_echo_n "checking for $ac_word... " >&6; }
6484 if test "${ac_cv_prog_STRIP+set}" = set; then
6485   $as_echo_n "(cached) " >&6
6486 else
6487   if test -n "$STRIP"; then
6488   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6489 else
6490 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6491 for as_dir in $PATH
6492 do
6493   IFS=$as_save_IFS
6494   test -z "$as_dir" && as_dir=.
6495   for ac_exec_ext in '' $ac_executable_extensions; do
6496   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6497     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6498     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6499     break 2
6500   fi
6501 done
6502 done
6503 IFS=$as_save_IFS
6504
6505 fi
6506 fi
6507 STRIP=$ac_cv_prog_STRIP
6508 if test -n "$STRIP"; then
6509   { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
6510 $as_echo "$STRIP" >&6; }
6511 else
6512   { $as_echo "$as_me:$LINENO: result: no" >&5
6513 $as_echo "no" >&6; }
6514 fi
6515
6516
6517 fi
6518 if test -z "$ac_cv_prog_STRIP"; then
6519   ac_ct_STRIP=$STRIP
6520   # Extract the first word of "strip", so it can be a program name with args.
6521 set dummy strip; ac_word=$2
6522 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6523 $as_echo_n "checking for $ac_word... " >&6; }
6524 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
6525   $as_echo_n "(cached) " >&6
6526 else
6527   if test -n "$ac_ct_STRIP"; then
6528   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6529 else
6530 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6531 for as_dir in $PATH
6532 do
6533   IFS=$as_save_IFS
6534   test -z "$as_dir" && as_dir=.
6535   for ac_exec_ext in '' $ac_executable_extensions; do
6536   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6537     ac_cv_prog_ac_ct_STRIP="strip"
6538     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6539     break 2
6540   fi
6541 done
6542 done
6543 IFS=$as_save_IFS
6544
6545 fi
6546 fi
6547 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6548 if test -n "$ac_ct_STRIP"; then
6549   { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
6550 $as_echo "$ac_ct_STRIP" >&6; }
6551 else
6552   { $as_echo "$as_me:$LINENO: result: no" >&5
6553 $as_echo "no" >&6; }
6554 fi
6555
6556   if test "x$ac_ct_STRIP" = x; then
6557     STRIP=":"
6558   else
6559     case $cross_compiling:$ac_tool_warned in
6560 yes:)
6561 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
6562 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6563 ac_tool_warned=yes ;;
6564 esac
6565     STRIP=$ac_ct_STRIP
6566   fi
6567 else
6568   STRIP="$ac_cv_prog_STRIP"
6569 fi
6570
6571
6572   { $as_echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
6573 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6574   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6575     STRIP_STATIC_LIB="$STRIP -x"
6576     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6577     { $as_echo "$as_me:$LINENO: result: yes" >&5
6578 $as_echo "yes" >&6; }
6579   else
6580     case $host_os in
6581       darwin*)
6582         STRIP="$STRIP -x"
6583         STRIP_STATIC_LIB=$STRIP
6584         STRIP_SHARED_LIB=$STRIP
6585         { $as_echo "$as_me:$LINENO: result: yes" >&5
6586 $as_echo "yes" >&6; }
6587         ;;
6588       *)
6589         STRIP_STATIC_LIB=:
6590         STRIP_SHARED_LIB=:
6591         { $as_echo "$as_me:$LINENO: result: no" >&5
6592 $as_echo "no" >&6; }
6593         ;;
6594     esac
6595   fi
6596
6597
6598
6599 if test -n "$ac_tool_prefix"; then
6600   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6601 set dummy ${ac_tool_prefix}ar; ac_word=$2
6602 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6603 $as_echo_n "checking for $ac_word... " >&6; }
6604 if test "${ac_cv_prog_AR+set}" = set; then
6605   $as_echo_n "(cached) " >&6
6606 else
6607   if test -n "$AR"; then
6608   ac_cv_prog_AR="$AR" # Let the user override the test.
6609 else
6610 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6611 for as_dir in $PATH
6612 do
6613   IFS=$as_save_IFS
6614   test -z "$as_dir" && as_dir=.
6615   for ac_exec_ext in '' $ac_executable_extensions; do
6616   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6617     ac_cv_prog_AR="${ac_tool_prefix}ar"
6618     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6619     break 2
6620   fi
6621 done
6622 done
6623 IFS=$as_save_IFS
6624
6625 fi
6626 fi
6627 AR=$ac_cv_prog_AR
6628 if test -n "$AR"; then
6629   { $as_echo "$as_me:$LINENO: result: $AR" >&5
6630 $as_echo "$AR" >&6; }
6631 else
6632   { $as_echo "$as_me:$LINENO: result: no" >&5
6633 $as_echo "no" >&6; }
6634 fi
6635
6636
6637 fi
6638 if test -z "$ac_cv_prog_AR"; then
6639   ac_ct_AR=$AR
6640   # Extract the first word of "ar", so it can be a program name with args.
6641 set dummy ar; ac_word=$2
6642 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6643 $as_echo_n "checking for $ac_word... " >&6; }
6644 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
6645   $as_echo_n "(cached) " >&6
6646 else
6647   if test -n "$ac_ct_AR"; then
6648   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6649 else
6650 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6651 for as_dir in $PATH
6652 do
6653   IFS=$as_save_IFS
6654   test -z "$as_dir" && as_dir=.
6655   for ac_exec_ext in '' $ac_executable_extensions; do
6656   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6657     ac_cv_prog_ac_ct_AR="ar"
6658     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6659     break 2
6660   fi
6661 done
6662 done
6663 IFS=$as_save_IFS
6664
6665 fi
6666 fi
6667 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6668 if test -n "$ac_ct_AR"; then
6669   { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
6670 $as_echo "$ac_ct_AR" >&6; }
6671 else
6672   { $as_echo "$as_me:$LINENO: result: no" >&5
6673 $as_echo "no" >&6; }
6674 fi
6675
6676   if test "x$ac_ct_AR" = x; then
6677     AR="ar"
6678   else
6679     case $cross_compiling:$ac_tool_warned in
6680 yes:)
6681 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
6682 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6683 ac_tool_warned=yes ;;
6684 esac
6685     AR=$ac_ct_AR
6686   fi
6687 else
6688   AR="$ac_cv_prog_AR"
6689 fi
6690
6691 if test "$PORTNAME" = "win32"; then
6692   if test -n "$ac_tool_prefix"; then
6693   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6694 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6695 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6696 $as_echo_n "checking for $ac_word... " >&6; }
6697 if test "${ac_cv_prog_DLLTOOL+set}" = set; then
6698   $as_echo_n "(cached) " >&6
6699 else
6700   if test -n "$DLLTOOL"; then
6701   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6702 else
6703 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6704 for as_dir in $PATH
6705 do
6706   IFS=$as_save_IFS
6707   test -z "$as_dir" && as_dir=.
6708   for ac_exec_ext in '' $ac_executable_extensions; do
6709   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6710     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6711     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6712     break 2
6713   fi
6714 done
6715 done
6716 IFS=$as_save_IFS
6717
6718 fi
6719 fi
6720 DLLTOOL=$ac_cv_prog_DLLTOOL
6721 if test -n "$DLLTOOL"; then
6722   { $as_echo "$as_me:$LINENO: result: $DLLTOOL" >&5
6723 $as_echo "$DLLTOOL" >&6; }
6724 else
6725   { $as_echo "$as_me:$LINENO: result: no" >&5
6726 $as_echo "no" >&6; }
6727 fi
6728
6729
6730 fi
6731 if test -z "$ac_cv_prog_DLLTOOL"; then
6732   ac_ct_DLLTOOL=$DLLTOOL
6733   # Extract the first word of "dlltool", so it can be a program name with args.
6734 set dummy dlltool; ac_word=$2
6735 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6736 $as_echo_n "checking for $ac_word... " >&6; }
6737 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
6738   $as_echo_n "(cached) " >&6
6739 else
6740   if test -n "$ac_ct_DLLTOOL"; then
6741   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6742 else
6743 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6744 for as_dir in $PATH
6745 do
6746   IFS=$as_save_IFS
6747   test -z "$as_dir" && as_dir=.
6748   for ac_exec_ext in '' $ac_executable_extensions; do
6749   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6750     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6751     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6752     break 2
6753   fi
6754 done
6755 done
6756 IFS=$as_save_IFS
6757
6758 fi
6759 fi
6760 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6761 if test -n "$ac_ct_DLLTOOL"; then
6762   { $as_echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
6763 $as_echo "$ac_ct_DLLTOOL" >&6; }
6764 else
6765   { $as_echo "$as_me:$LINENO: result: no" >&5
6766 $as_echo "no" >&6; }
6767 fi
6768
6769   if test "x$ac_ct_DLLTOOL" = x; then
6770     DLLTOOL="dlltool"
6771   else
6772     case $cross_compiling:$ac_tool_warned in
6773 yes:)
6774 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
6775 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6776 ac_tool_warned=yes ;;
6777 esac
6778     DLLTOOL=$ac_ct_DLLTOOL
6779   fi
6780 else
6781   DLLTOOL="$ac_cv_prog_DLLTOOL"
6782 fi
6783
6784   if test -n "$ac_tool_prefix"; then
6785   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
6786 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
6787 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6788 $as_echo_n "checking for $ac_word... " >&6; }
6789 if test "${ac_cv_prog_DLLWRAP+set}" = set; then
6790   $as_echo_n "(cached) " >&6
6791 else
6792   if test -n "$DLLWRAP"; then
6793   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
6794 else
6795 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6796 for as_dir in $PATH
6797 do
6798   IFS=$as_save_IFS
6799   test -z "$as_dir" && as_dir=.
6800   for ac_exec_ext in '' $ac_executable_extensions; do
6801   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6802     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
6803     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6804     break 2
6805   fi
6806 done
6807 done
6808 IFS=$as_save_IFS
6809
6810 fi
6811 fi
6812 DLLWRAP=$ac_cv_prog_DLLWRAP
6813 if test -n "$DLLWRAP"; then
6814   { $as_echo "$as_me:$LINENO: result: $DLLWRAP" >&5
6815 $as_echo "$DLLWRAP" >&6; }
6816 else
6817   { $as_echo "$as_me:$LINENO: result: no" >&5
6818 $as_echo "no" >&6; }
6819 fi
6820
6821
6822 fi
6823 if test -z "$ac_cv_prog_DLLWRAP"; then
6824   ac_ct_DLLWRAP=$DLLWRAP
6825   # Extract the first word of "dllwrap", so it can be a program name with args.
6826 set dummy dllwrap; ac_word=$2
6827 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6828 $as_echo_n "checking for $ac_word... " >&6; }
6829 if test "${ac_cv_prog_ac_ct_DLLWRAP+set}" = set; then
6830   $as_echo_n "(cached) " >&6
6831 else
6832   if test -n "$ac_ct_DLLWRAP"; then
6833   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
6834 else
6835 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6836 for as_dir in $PATH
6837 do
6838   IFS=$as_save_IFS
6839   test -z "$as_dir" && as_dir=.
6840   for ac_exec_ext in '' $ac_executable_extensions; do
6841   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6842     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
6843     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6844     break 2
6845   fi
6846 done
6847 done
6848 IFS=$as_save_IFS
6849
6850 fi
6851 fi
6852 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
6853 if test -n "$ac_ct_DLLWRAP"; then
6854   { $as_echo "$as_me:$LINENO: result: $ac_ct_DLLWRAP" >&5
6855 $as_echo "$ac_ct_DLLWRAP" >&6; }
6856 else
6857   { $as_echo "$as_me:$LINENO: result: no" >&5
6858 $as_echo "no" >&6; }
6859 fi
6860
6861   if test "x$ac_ct_DLLWRAP" = x; then
6862     DLLWRAP="dllwrap"
6863   else
6864     case $cross_compiling:$ac_tool_warned in
6865 yes:)
6866 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
6867 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6868 ac_tool_warned=yes ;;
6869 esac
6870     DLLWRAP=$ac_ct_DLLWRAP
6871   fi
6872 else
6873   DLLWRAP="$ac_cv_prog_DLLWRAP"
6874 fi
6875
6876   if test -n "$ac_tool_prefix"; then
6877   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6878 set dummy ${ac_tool_prefix}windres; ac_word=$2
6879 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6880 $as_echo_n "checking for $ac_word... " >&6; }
6881 if test "${ac_cv_prog_WINDRES+set}" = set; then
6882   $as_echo_n "(cached) " >&6
6883 else
6884   if test -n "$WINDRES"; then
6885   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6886 else
6887 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6888 for as_dir in $PATH
6889 do
6890   IFS=$as_save_IFS
6891   test -z "$as_dir" && as_dir=.
6892   for ac_exec_ext in '' $ac_executable_extensions; do
6893   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6894     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6895     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6896     break 2
6897   fi
6898 done
6899 done
6900 IFS=$as_save_IFS
6901
6902 fi
6903 fi
6904 WINDRES=$ac_cv_prog_WINDRES
6905 if test -n "$WINDRES"; then
6906   { $as_echo "$as_me:$LINENO: result: $WINDRES" >&5
6907 $as_echo "$WINDRES" >&6; }
6908 else
6909   { $as_echo "$as_me:$LINENO: result: no" >&5
6910 $as_echo "no" >&6; }
6911 fi
6912
6913
6914 fi
6915 if test -z "$ac_cv_prog_WINDRES"; then
6916   ac_ct_WINDRES=$WINDRES
6917   # Extract the first word of "windres", so it can be a program name with args.
6918 set dummy windres; ac_word=$2
6919 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6920 $as_echo_n "checking for $ac_word... " >&6; }
6921 if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then
6922   $as_echo_n "(cached) " >&6
6923 else
6924   if test -n "$ac_ct_WINDRES"; then
6925   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6926 else
6927 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6928 for as_dir in $PATH
6929 do
6930   IFS=$as_save_IFS
6931   test -z "$as_dir" && as_dir=.
6932   for ac_exec_ext in '' $ac_executable_extensions; do
6933   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6934     ac_cv_prog_ac_ct_WINDRES="windres"
6935     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6936     break 2
6937   fi
6938 done
6939 done
6940 IFS=$as_save_IFS
6941
6942 fi
6943 fi
6944 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6945 if test -n "$ac_ct_WINDRES"; then
6946   { $as_echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5
6947 $as_echo "$ac_ct_WINDRES" >&6; }
6948 else
6949   { $as_echo "$as_me:$LINENO: result: no" >&5
6950 $as_echo "no" >&6; }
6951 fi
6952
6953   if test "x$ac_ct_WINDRES" = x; then
6954     WINDRES="windres"
6955   else
6956     case $cross_compiling:$ac_tool_warned in
6957 yes:)
6958 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
6959 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6960 ac_tool_warned=yes ;;
6961 esac
6962     WINDRES=$ac_ct_WINDRES
6963   fi
6964 else
6965   WINDRES="$ac_cv_prog_WINDRES"
6966 fi
6967
6968 fi
6969
6970 # Find a good install program.  We prefer a C program (faster),
6971 # so one script is as good as another.  But avoid the broken or
6972 # incompatible versions:
6973 # SysV /etc/install, /usr/sbin/install
6974 # SunOS /usr/etc/install
6975 # IRIX /sbin/install
6976 # AIX /bin/install
6977 # AmigaOS /C/install, which installs bootblocks on floppy discs
6978 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6979 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
6980 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6981 # OS/2's system install, which has a completely different semantic
6982 # ./install, which can be erroneously created by make from ./install.sh.
6983 # Reject install programs that cannot install multiple files.
6984 { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
6985 $as_echo_n "checking for a BSD-compatible install... " >&6; }
6986 if test -z "$INSTALL"; then
6987 if test "${ac_cv_path_install+set}" = set; then
6988   $as_echo_n "(cached) " >&6
6989 else
6990   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6991 for as_dir in $PATH
6992 do
6993   IFS=$as_save_IFS
6994   test -z "$as_dir" && as_dir=.
6995   # Account for people who put trailing slashes in PATH elements.
6996 case $as_dir/ in
6997   ./ | .// | /cC/* | \
6998   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6999   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
7000   /usr/ucb/* ) ;;
7001   *)
7002     # OSF1 and SCO ODT 3.0 have their own names for install.
7003     # Don't use installbsd from OSF since it installs stuff as root
7004     # by default.
7005     for ac_prog in ginstall scoinst install; do
7006       for ac_exec_ext in '' $ac_executable_extensions; do
7007         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
7008           if test $ac_prog = install &&
7009             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7010             # AIX install.  It has an incompatible calling convention.
7011             :
7012           elif test $ac_prog = install &&
7013             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7014             # program-specific install script used by HP pwplus--don't use.
7015             :
7016           else
7017             rm -rf conftest.one conftest.two conftest.dir
7018             echo one > conftest.one
7019             echo two > conftest.two
7020             mkdir conftest.dir
7021             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7022               test -s conftest.one && test -s conftest.two &&
7023               test -s conftest.dir/conftest.one &&
7024               test -s conftest.dir/conftest.two
7025             then
7026               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7027               break 3
7028             fi
7029           fi
7030         fi
7031       done
7032     done
7033     ;;
7034 esac
7035
7036 done
7037 IFS=$as_save_IFS
7038
7039 rm -rf conftest.one conftest.two conftest.dir
7040
7041 fi
7042   if test "${ac_cv_path_install+set}" = set; then
7043     INSTALL=$ac_cv_path_install
7044   else
7045     # As a last resort, use the slow shell script.  Don't cache a
7046     # value for INSTALL within a source directory, because that will
7047     # break other packages using the cache if that directory is
7048     # removed, or if the value is a relative name.
7049     INSTALL=$ac_install_sh
7050   fi
7051 fi
7052 { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
7053 $as_echo "$INSTALL" >&6; }
7054
7055 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7056 # It thinks the first close brace ends the variable substitution.
7057 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7058
7059 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7060
7061 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7062
7063 # When Autoconf chooses install-sh as install program it tries to generate
7064 # a relative path to it in each makefile where it subsitutes it. This clashes
7065 # with our Makefile.global concept. This workaround helps.
7066 case $INSTALL in
7067   *install-sh*) install_bin='';;
7068   *) install_bin=$INSTALL;;
7069 esac
7070
7071
7072 # Extract the first word of "tar", so it can be a program name with args.
7073 set dummy tar; ac_word=$2
7074 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
7075 $as_echo_n "checking for $ac_word... " >&6; }
7076 if test "${ac_cv_path_TAR+set}" = set; then
7077   $as_echo_n "(cached) " >&6
7078 else
7079   case $TAR in
7080   [\\/]* | ?:[\\/]*)
7081   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
7082   ;;
7083   *)
7084   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7085 for as_dir in $PATH
7086 do
7087   IFS=$as_save_IFS
7088   test -z "$as_dir" && as_dir=.
7089   for ac_exec_ext in '' $ac_executable_extensions; do
7090   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7091     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
7092     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7093     break 2
7094   fi
7095 done
7096 done
7097 IFS=$as_save_IFS
7098
7099   ;;
7100 esac
7101 fi
7102 TAR=$ac_cv_path_TAR
7103 if test -n "$TAR"; then
7104   { $as_echo "$as_me:$LINENO: result: $TAR" >&5
7105 $as_echo "$TAR" >&6; }
7106 else
7107   { $as_echo "$as_me:$LINENO: result: no" >&5
7108 $as_echo "no" >&6; }
7109 fi
7110
7111
7112 { $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5
7113 $as_echo_n "checking whether ln -s works... " >&6; }
7114 LN_S=$as_ln_s
7115 if test "$LN_S" = "ln -s"; then
7116   { $as_echo "$as_me:$LINENO: result: yes" >&5
7117 $as_echo "yes" >&6; }
7118 else
7119   { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5
7120 $as_echo "no, using $LN_S" >&6; }
7121 fi
7122
7123 for ac_prog in gawk mawk nawk awk
7124 do
7125   # Extract the first word of "$ac_prog", so it can be a program name with args.
7126 set dummy $ac_prog; ac_word=$2
7127 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
7128 $as_echo_n "checking for $ac_word... " >&6; }
7129 if test "${ac_cv_prog_AWK+set}" = set; then
7130   $as_echo_n "(cached) " >&6
7131 else
7132   if test -n "$AWK"; then
7133   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7134 else
7135 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7136 for as_dir in $PATH
7137 do
7138   IFS=$as_save_IFS
7139   test -z "$as_dir" && as_dir=.
7140   for ac_exec_ext in '' $ac_executable_extensions; do
7141   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7142     ac_cv_prog_AWK="$ac_prog"
7143     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7144     break 2
7145   fi
7146 done
7147 done
7148 IFS=$as_save_IFS
7149
7150 fi
7151 fi
7152 AWK=$ac_cv_prog_AWK
7153 if test -n "$AWK"; then
7154   { $as_echo "$as_me:$LINENO: result: $AWK" >&5
7155 $as_echo "$AWK" >&6; }
7156 else
7157   { $as_echo "$as_me:$LINENO: result: no" >&5
7158 $as_echo "no" >&6; }
7159 fi
7160
7161
7162   test -n "$AWK" && break
7163 done
7164
7165 { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
7166 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7167 if test -z "$MKDIR_P"; then
7168   if test "${ac_cv_path_mkdir+set}" = set; then
7169   $as_echo_n "(cached) " >&6
7170 else
7171   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7172 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7173 do
7174   IFS=$as_save_IFS
7175   test -z "$as_dir" && as_dir=.
7176   for ac_prog in mkdir gmkdir; do
7177          for ac_exec_ext in '' $ac_executable_extensions; do
7178            { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
7179            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7180              'mkdir (GNU coreutils) '* | \
7181              'mkdir (coreutils) '* | \
7182              'mkdir (fileutils) '4.1*)
7183                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7184                break 3;;
7185            esac
7186          done
7187        done
7188 done
7189 IFS=$as_save_IFS
7190
7191 fi
7192
7193   if test "${ac_cv_path_mkdir+set}" = set; then
7194     MKDIR_P="$ac_cv_path_mkdir -p"
7195   else
7196     # As a last resort, use the slow shell script.  Don't cache a
7197     # value for MKDIR_P within a source directory, because that will
7198     # break other packages using the cache if that directory is
7199     # removed, or if the value is a relative name.
7200     test -d ./--version && rmdir ./--version
7201     MKDIR_P="$ac_install_sh -d"
7202   fi
7203 fi
7204 { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
7205 $as_echo "$MKDIR_P" >&6; }
7206
7207 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
7208 # a relative path to it in each makefile where it subsitutes it. This clashes
7209 # with our Makefile.global concept. This workaround helps.
7210 case $MKDIR_P in
7211   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
7212 esac
7213
7214 # Let the user override the search
7215 if test -z "$BISON"; then
7216   for ac_prog in bison
7217 do
7218   # Extract the first word of "$ac_prog", so it can be a program name with args.
7219 set dummy $ac_prog; ac_word=$2
7220 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
7221 $as_echo_n "checking for $ac_word... " >&6; }
7222 if test "${ac_cv_path_BISON+set}" = set; then
7223   $as_echo_n "(cached) " >&6
7224 else
7225   case $BISON in
7226   [\\/]* | ?:[\\/]*)
7227   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
7228   ;;
7229   *)
7230   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7231 for as_dir in $PATH
7232 do
7233   IFS=$as_save_IFS
7234   test -z "$as_dir" && as_dir=.
7235   for ac_exec_ext in '' $ac_executable_extensions; do
7236   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7237     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
7238     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7239     break 2
7240   fi
7241 done
7242 done
7243 IFS=$as_save_IFS
7244
7245   ;;
7246 esac
7247 fi
7248 BISON=$ac_cv_path_BISON
7249 if test -n "$BISON"; then
7250   { $as_echo "$as_me:$LINENO: result: $BISON" >&5
7251 $as_echo "$BISON" >&6; }
7252 else
7253   { $as_echo "$as_me:$LINENO: result: no" >&5
7254 $as_echo "no" >&6; }
7255 fi
7256
7257
7258   test -n "$BISON" && break
7259 done
7260
7261 fi
7262
7263 if test "$BISON"; then
7264   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7265   { $as_echo "$as_me:$LINENO: using $pgac_bison_version" >&5
7266 $as_echo "$as_me: using $pgac_bison_version" >&6;}
7267   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7268   then
7269     { $as_echo "$as_me:$LINENO: WARNING:
7270 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7271 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7272 $as_echo "$as_me: WARNING:
7273 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7274 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7275     BISON=""
7276   fi
7277 fi
7278
7279 if test -z "$BISON"; then
7280   { $as_echo "$as_me:$LINENO: WARNING:
7281 *** Without Bison you will not be able to build PostgreSQL from Git nor
7282 *** change any of the parser definition files.  You can obtain Bison from
7283 *** a GNU mirror site.  (If you are using the official distribution of
7284 *** PostgreSQL then you do not need to worry about this, because the Bison
7285 *** output is pre-generated.)" >&5
7286 $as_echo "$as_me: WARNING:
7287 *** Without Bison you will not be able to build PostgreSQL from Git nor
7288 *** change any of the parser definition files.  You can obtain Bison from
7289 *** a GNU mirror site.  (If you are using the official distribution of
7290 *** PostgreSQL then you do not need to worry about this, because the Bison
7291 *** output is pre-generated.)" >&2;}
7292 fi
7293 # We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
7294
7295
7296 { $as_echo "$as_me:$LINENO: checking for flex" >&5
7297 $as_echo_n "checking for flex... " >&6; }
7298 if test "${pgac_cv_path_flex+set}" = set; then
7299   $as_echo_n "(cached) " >&6
7300 else
7301   # Let the user override the test
7302 if test -n "$FLEX"; then
7303   pgac_cv_path_flex=$FLEX
7304 else
7305   pgac_save_IFS=$IFS
7306   IFS=$PATH_SEPARATOR
7307   for pgac_dir in $PATH; do
7308     IFS=$pgac_save_IFS
7309     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7310       pgac_dir=`pwd`
7311     fi
7312     for pgac_prog in flex lex; do
7313       pgac_candidate="$pgac_dir/$pgac_prog"
7314       if test -f "$pgac_candidate" \
7315         && $pgac_candidate --version </dev/null >/dev/null 2>&1
7316       then
7317         echo '%%'  > conftest.l
7318         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7319           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7320           if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 = 2 && $2 = 5 && $3 >= 31) exit 0; else exit 1;}'
7321           then
7322             pgac_cv_path_flex=$pgac_candidate
7323             break 2
7324           else
7325             { $as_echo "$as_me:$LINENO: WARNING:
7326 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7327 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7328 $as_echo "$as_me: WARNING:
7329 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7330 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7331           fi
7332         fi
7333       fi
7334     done
7335   done
7336   rm -f conftest.l lex.yy.c
7337   : ${pgac_cv_path_flex=no}
7338 fi
7339
7340 fi
7341 { $as_echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
7342 $as_echo "$pgac_cv_path_flex" >&6; }
7343 if test x"$pgac_cv_path_flex" = x"no"; then
7344   { $as_echo "$as_me:$LINENO: WARNING:
7345 *** Without Flex you will not be able to build PostgreSQL from Git nor
7346 *** change any of the scanner definition files.  You can obtain Flex from
7347 *** a GNU mirror site.  (If you are using the official distribution of
7348 *** PostgreSQL then you do not need to worry about this because the Flex
7349 *** output is pre-generated.)" >&5
7350 $as_echo "$as_me: WARNING:
7351 *** Without Flex you will not be able to build PostgreSQL from Git nor
7352 *** change any of the scanner definition files.  You can obtain Flex from
7353 *** a GNU mirror site.  (If you are using the official distribution of
7354 *** PostgreSQL then you do not need to worry about this because the Flex
7355 *** output is pre-generated.)" >&2;}
7356
7357   FLEX=
7358 else
7359   FLEX=$pgac_cv_path_flex
7360   pgac_flex_version=`$FLEX --version 2>/dev/null`
7361   { $as_echo "$as_me:$LINENO: using $pgac_flex_version" >&5
7362 $as_echo "$as_me: using $pgac_flex_version" >&6;}
7363 fi
7364
7365
7366
7367
7368
7369 # Let the user override the search
7370 if test -z "$PERL"; then
7371   # Extract the first word of "perl", so it can be a program name with args.
7372 set dummy perl; ac_word=$2
7373 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
7374 $as_echo_n "checking for $ac_word... " >&6; }
7375 if test "${ac_cv_path_PERL+set}" = set; then
7376   $as_echo_n "(cached) " >&6
7377 else
7378   case $PERL in
7379   [\\/]* | ?:[\\/]*)
7380   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7381   ;;
7382   *)
7383   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7384 for as_dir in $PATH
7385 do
7386   IFS=$as_save_IFS
7387   test -z "$as_dir" && as_dir=.
7388   for ac_exec_ext in '' $ac_executable_extensions; do
7389   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7390     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7391     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7392     break 2
7393   fi
7394 done
7395 done
7396 IFS=$as_save_IFS
7397
7398   ;;
7399 esac
7400 fi
7401 PERL=$ac_cv_path_PERL
7402 if test -n "$PERL"; then
7403   { $as_echo "$as_me:$LINENO: result: $PERL" >&5
7404 $as_echo "$PERL" >&6; }
7405 else
7406   { $as_echo "$as_me:$LINENO: result: no" >&5
7407 $as_echo "no" >&6; }
7408 fi
7409
7410
7411 fi
7412
7413 if test "$PERL"; then
7414   pgac_perl_version=`$PERL -v 2>/dev/null | sed -n 's/This is perl.*v[a-z ]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p'`
7415   { $as_echo "$as_me:$LINENO: using perl $pgac_perl_version" >&5
7416 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7417   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7418     $AWK '{ if ($1 = 5 && $2 >= 8) exit 1; else exit 0;}'
7419   then
7420     { $as_echo "$as_me:$LINENO: WARNING:
7421 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7422 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7423 $as_echo "$as_me: WARNING:
7424 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7425 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7426     PERL=""
7427   fi
7428 fi
7429
7430 if test -z "$PERL"; then
7431   { $as_echo "$as_me:$LINENO: WARNING:
7432 *** Without Perl you will not be able to build PostgreSQL from Git.
7433 *** You can obtain Perl from any CPAN mirror site.
7434 *** (If you are using the official distribution of PostgreSQL then you do not
7435 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7436 $as_echo "$as_me: WARNING:
7437 *** Without Perl you will not be able to build PostgreSQL from Git.
7438 *** You can obtain Perl from any CPAN mirror site.
7439 *** (If you are using the official distribution of PostgreSQL then you do not
7440 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7441 fi
7442
7443 if test "$with_perl" = yes; then
7444   if test -z "$PERL"; then
7445     { { $as_echo "$as_me:$LINENO: error: Perl not found" >&5
7446 $as_echo "$as_me: error: Perl not found" >&2;}
7447    { (exit 1); exit 1; }; }
7448   fi
7449
7450 { $as_echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
7451 $as_echo_n "checking for Perl archlibexp... " >&6; }
7452 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7453 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7454 { $as_echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
7455 $as_echo "$perl_archlibexp" >&6; }
7456 { $as_echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
7457 $as_echo_n "checking for Perl privlibexp... " >&6; }
7458 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7459 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7460 { $as_echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
7461 $as_echo "$perl_privlibexp" >&6; }
7462 { $as_echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
7463 $as_echo_n "checking for Perl useshrplib... " >&6; }
7464 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7465 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7466 { $as_echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
7467 $as_echo "$perl_useshrplib" >&6; }
7468
7469 { $as_echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
7470 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7471 if test "$PORTNAME" = "win32" ; then
7472 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7473 test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7474 else
7475 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7476 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7477 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7478 fi
7479 if test -z "$perl_embed_ldflags" ; then
7480         { $as_echo "$as_me:$LINENO: result: no" >&5
7481 $as_echo "no" >&6; }
7482         { { $as_echo "$as_me:$LINENO: error: could not determine flags for linking embedded Perl.
7483 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7484 installed." >&5
7485 $as_echo "$as_me: error: could not determine flags for linking embedded Perl.
7486 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7487 installed." >&2;}
7488    { (exit 1); exit 1; }; }
7489 else
7490         { $as_echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
7491 $as_echo "$perl_embed_ldflags" >&6; }
7492 fi
7493
7494 fi
7495
7496 if test "$with_python" = yes; then
7497   # Extract the first word of "python", so it can be a program name with args.
7498 set dummy python; ac_word=$2
7499 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
7500 $as_echo_n "checking for $ac_word... " >&6; }
7501 if test "${ac_cv_path_PYTHON+set}" = set; then
7502   $as_echo_n "(cached) " >&6
7503 else
7504   case $PYTHON in
7505   [\\/]* | ?:[\\/]*)
7506   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7507   ;;
7508   *)
7509   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7510 for as_dir in $PATH
7511 do
7512   IFS=$as_save_IFS
7513   test -z "$as_dir" && as_dir=.
7514   for ac_exec_ext in '' $ac_executable_extensions; do
7515   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7516     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7517     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7518     break 2
7519   fi
7520 done
7521 done
7522 IFS=$as_save_IFS
7523
7524   ;;
7525 esac
7526 fi
7527 PYTHON=$ac_cv_path_PYTHON
7528 if test -n "$PYTHON"; then
7529   { $as_echo "$as_me:$LINENO: result: $PYTHON" >&5
7530 $as_echo "$PYTHON" >&6; }
7531 else
7532   { $as_echo "$as_me:$LINENO: result: no" >&5
7533 $as_echo "no" >&6; }
7534 fi
7535
7536
7537 if test x"$PYTHON" = x""; then
7538   { { $as_echo "$as_me:$LINENO: error: Python not found" >&5
7539 $as_echo "$as_me: error: Python not found" >&2;}
7540    { (exit 1); exit 1; }; }
7541 fi
7542
7543
7544 { $as_echo "$as_me:$LINENO: checking for Python distutils module" >&5
7545 $as_echo_n "checking for Python distutils module... " >&6; }
7546 if "${PYTHON}" -c 'import distutils' 2>&5
7547 then
7548     { $as_echo "$as_me:$LINENO: result: yes" >&5
7549 $as_echo "yes" >&6; }
7550 else
7551     { $as_echo "$as_me:$LINENO: result: no" >&5
7552 $as_echo "no" >&6; }
7553     { { $as_echo "$as_me:$LINENO: error: distutils module not found" >&5
7554 $as_echo "$as_me: error: distutils module not found" >&2;}
7555    { (exit 1); exit 1; }; }
7556 fi
7557 { $as_echo "$as_me:$LINENO: checking Python configuration directory" >&5
7558 $as_echo_n "checking Python configuration directory... " >&6; }
7559 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7560 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7561 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7562 { $as_echo "$as_me:$LINENO: result: $python_configdir" >&5
7563 $as_echo "$python_configdir" >&6; }
7564
7565 { $as_echo "$as_me:$LINENO: checking Python include directories" >&5
7566 $as_echo_n "checking Python include directories... " >&6; }
7567 python_includespec=`${PYTHON} -c "
7568 import distutils.sysconfig
7569 a = '-I' + distutils.sysconfig.get_python_inc(False)
7570 b = '-I' + distutils.sysconfig.get_python_inc(True)
7571 if a == b:
7572     print(a)
7573 else:
7574     print(a + ' ' + b)"`
7575 { $as_echo "$as_me:$LINENO: result: $python_includespec" >&5
7576 $as_echo "$python_includespec" >&6; }
7577
7578
7579
7580 { $as_echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
7581 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7582
7583 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7584 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7585 python_so=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"`
7586 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
7587 python_framework=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('PYTHONFRAMEWORK'))))"`
7588 python_enable_shared=`${PYTHON} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars().get('Py_ENABLE_SHARED',0))"`
7589
7590 if test -n "$python_framework"; then
7591         python_frameworkprefix=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('PYTHONFRAMEWORKPREFIX'))))"`
7592         python_libspec="-F${python_frameworkprefix} -framework $python_framework"
7593         python_enable_shared=1
7594 elif test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7595 then
7596         # New way: use the official shared library
7597         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7598         python_libspec="-L${python_libdir} -l${ldlibrary}"
7599 else
7600         # Old way: use libpython from python_configdir
7601         python_libdir="${python_configdir}"
7602         # LDVERSION was introduced in Python 3.2.
7603         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
7604         if test x"${python_ldversion}" = x""; then
7605                 python_ldversion=$python_version
7606         fi
7607         python_libspec="-L${python_libdir} -lpython${python_ldversion}"
7608 fi
7609
7610 if test -z "$python_framework"; then
7611         python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
7612 fi
7613
7614 { $as_echo "$as_me:$LINENO: result: ${python_libspec} ${python_additional_libs}" >&5
7615 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
7616
7617
7618 # threaded python is not supported on OpenBSD
7619 { $as_echo "$as_me:$LINENO: checking whether Python is compiled with thread support" >&5
7620 $as_echo_n "checking whether Python is compiled with thread support... " >&6; }
7621 pythreads=`${PYTHON} -c "import sys; print(int('thread' in sys.builtin_module_names))"`
7622 if test "$pythreads" = "1"; then
7623   { $as_echo "$as_me:$LINENO: result: yes" >&5
7624 $as_echo "yes" >&6; }
7625   case $host_os in
7626   openbsd*)
7627     { { $as_echo "$as_me:$LINENO: error: threaded Python not supported on this platform" >&5
7628 $as_echo "$as_me: error: threaded Python not supported on this platform" >&2;}
7629    { (exit 1); exit 1; }; }
7630     ;;
7631   esac
7632 else
7633   { $as_echo "$as_me:$LINENO: result: no" >&5
7634 $as_echo "no" >&6; }
7635 fi
7636
7637
7638 fi
7639
7640 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
7641   # Extract the first word of "zic", so it can be a program name with args.
7642 set dummy zic; ac_word=$2
7643 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
7644 $as_echo_n "checking for $ac_word... " >&6; }
7645 if test "${ac_cv_path_ZIC+set}" = set; then
7646   $as_echo_n "(cached) " >&6
7647 else
7648   case $ZIC in
7649   [\\/]* | ?:[\\/]*)
7650   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
7651   ;;
7652   *)
7653   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7654 for as_dir in $PATH
7655 do
7656   IFS=$as_save_IFS
7657   test -z "$as_dir" && as_dir=.
7658   for ac_exec_ext in '' $ac_executable_extensions; do
7659   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7660     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
7661     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7662     break 2
7663   fi
7664 done
7665 done
7666 IFS=$as_save_IFS
7667
7668   ;;
7669 esac
7670 fi
7671 ZIC=$ac_cv_path_ZIC
7672 if test -n "$ZIC"; then
7673   { $as_echo "$as_me:$LINENO: result: $ZIC" >&5
7674 $as_echo "$ZIC" >&6; }
7675 else
7676   { $as_echo "$as_me:$LINENO: result: no" >&5
7677 $as_echo "no" >&6; }
7678 fi
7679
7680
7681   if test -z "$ZIC"; then
7682     { { $as_echo "$as_me:$LINENO: error:
7683 When cross-compiling, either use the option --with-system-tzdata to use
7684 existing time-zone data, or set the environment variable ZIC to a zic
7685 program to use during the build." >&5
7686 $as_echo "$as_me: error:
7687 When cross-compiling, either use the option --with-system-tzdata to use
7688 existing time-zone data, or set the environment variable ZIC to a zic
7689 program to use during the build." >&2;}
7690    { (exit 1); exit 1; }; }
7691   fi
7692 fi
7693
7694
7695 ##
7696 ## Libraries
7697 ##
7698 ## Most libraries are included only if they demonstrably provide a function
7699 ## we need, but libm is an exception: always include it, because there are
7700 ## too many compilers that play cute optimization games that will break
7701 ## probes for standard functions such as pow().
7702 ##
7703
7704
7705 { $as_echo "$as_me:$LINENO: checking for main in -lm" >&5
7706 $as_echo_n "checking for main in -lm... " >&6; }
7707 if test "${ac_cv_lib_m_main+set}" = set; then
7708   $as_echo_n "(cached) " >&6
7709 else
7710   ac_check_lib_save_LIBS=$LIBS
7711 LIBS="-lm  $LIBS"
7712 cat >conftest.$ac_ext <<_ACEOF
7713 /* confdefs.h.  */
7714 _ACEOF
7715 cat confdefs.h >>conftest.$ac_ext
7716 cat >>conftest.$ac_ext <<_ACEOF
7717 /* end confdefs.h.  */
7718
7719
7720 int
7721 main ()
7722 {
7723 return main ();
7724   ;
7725   return 0;
7726 }
7727 _ACEOF
7728 rm -f conftest.$ac_objext conftest$ac_exeext
7729 if { (ac_try="$ac_link"
7730 case "(($ac_try" in
7731   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7732   *) ac_try_echo=$ac_try;;
7733 esac
7734 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7735 $as_echo "$ac_try_echo") >&5
7736   (eval "$ac_link") 2>conftest.er1
7737   ac_status=$?
7738   grep -v '^ *+' conftest.er1 >conftest.err
7739   rm -f conftest.er1
7740   cat conftest.err >&5
7741   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7742   (exit $ac_status); } && {
7743          test -z "$ac_c_werror_flag" ||
7744          test ! -s conftest.err
7745        } && test -s conftest$ac_exeext && {
7746          test "$cross_compiling" = yes ||
7747          $as_test_x conftest$ac_exeext
7748        }; then
7749   ac_cv_lib_m_main=yes
7750 else
7751   $as_echo "$as_me: failed program was:" >&5
7752 sed 's/^/| /' conftest.$ac_ext >&5
7753
7754         ac_cv_lib_m_main=no
7755 fi
7756
7757 rm -rf conftest.dSYM
7758 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7759       conftest$ac_exeext conftest.$ac_ext
7760 LIBS=$ac_check_lib_save_LIBS
7761 fi
7762 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
7763 $as_echo "$ac_cv_lib_m_main" >&6; }
7764 if test "x$ac_cv_lib_m_main" = x""yes; then
7765   cat >>confdefs.h <<_ACEOF
7766 #define HAVE_LIBM 1
7767 _ACEOF
7768
7769   LIBS="-lm $LIBS"
7770
7771 fi
7772
7773 { $as_echo "$as_me:$LINENO: checking for library containing setproctitle" >&5
7774 $as_echo_n "checking for library containing setproctitle... " >&6; }
7775 if test "${ac_cv_search_setproctitle+set}" = set; then
7776   $as_echo_n "(cached) " >&6
7777 else
7778   ac_func_search_save_LIBS=$LIBS
7779 cat >conftest.$ac_ext <<_ACEOF
7780 /* confdefs.h.  */
7781 _ACEOF
7782 cat confdefs.h >>conftest.$ac_ext
7783 cat >>conftest.$ac_ext <<_ACEOF
7784 /* end confdefs.h.  */
7785
7786 /* Override any GCC internal prototype to avoid an error.
7787    Use char because int might match the return type of a GCC
7788    builtin and then its argument prototype would still apply.  */
7789 #ifdef __cplusplus
7790 extern "C"
7791 #endif
7792 char setproctitle ();
7793 int
7794 main ()
7795 {
7796 return setproctitle ();
7797   ;
7798   return 0;
7799 }
7800 _ACEOF
7801 for ac_lib in '' util; do
7802   if test -z "$ac_lib"; then
7803     ac_res="none required"
7804   else
7805     ac_res=-l$ac_lib
7806     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7807   fi
7808   rm -f conftest.$ac_objext conftest$ac_exeext
7809 if { (ac_try="$ac_link"
7810 case "(($ac_try" in
7811   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7812   *) ac_try_echo=$ac_try;;
7813 esac
7814 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7815 $as_echo "$ac_try_echo") >&5
7816   (eval "$ac_link") 2>conftest.er1
7817   ac_status=$?
7818   grep -v '^ *+' conftest.er1 >conftest.err
7819   rm -f conftest.er1
7820   cat conftest.err >&5
7821   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7822   (exit $ac_status); } && {
7823          test -z "$ac_c_werror_flag" ||
7824          test ! -s conftest.err
7825        } && test -s conftest$ac_exeext && {
7826          test "$cross_compiling" = yes ||
7827          $as_test_x conftest$ac_exeext
7828        }; then
7829   ac_cv_search_setproctitle=$ac_res
7830 else
7831   $as_echo "$as_me: failed program was:" >&5
7832 sed 's/^/| /' conftest.$ac_ext >&5
7833
7834
7835 fi
7836
7837 rm -rf conftest.dSYM
7838 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7839       conftest$ac_exeext
7840   if test "${ac_cv_search_setproctitle+set}" = set; then
7841   break
7842 fi
7843 done
7844 if test "${ac_cv_search_setproctitle+set}" = set; then
7845   :
7846 else
7847   ac_cv_search_setproctitle=no
7848 fi
7849 rm conftest.$ac_ext
7850 LIBS=$ac_func_search_save_LIBS
7851 fi
7852 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_setproctitle" >&5
7853 $as_echo "$ac_cv_search_setproctitle" >&6; }
7854 ac_res=$ac_cv_search_setproctitle
7855 if test "$ac_res" != no; then
7856   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7857
7858 fi
7859
7860 { $as_echo "$as_me:$LINENO: checking for library containing dlopen" >&5
7861 $as_echo_n "checking for library containing dlopen... " >&6; }
7862 if test "${ac_cv_search_dlopen+set}" = set; then
7863   $as_echo_n "(cached) " >&6
7864 else
7865   ac_func_search_save_LIBS=$LIBS
7866 cat >conftest.$ac_ext <<_ACEOF
7867 /* confdefs.h.  */
7868 _ACEOF
7869 cat confdefs.h >>conftest.$ac_ext
7870 cat >>conftest.$ac_ext <<_ACEOF
7871 /* end confdefs.h.  */
7872
7873 /* Override any GCC internal prototype to avoid an error.
7874    Use char because int might match the return type of a GCC
7875    builtin and then its argument prototype would still apply.  */
7876 #ifdef __cplusplus
7877 extern "C"
7878 #endif
7879 char dlopen ();
7880 int
7881 main ()
7882 {
7883 return dlopen ();
7884   ;
7885   return 0;
7886 }
7887 _ACEOF
7888 for ac_lib in '' dl; do
7889   if test -z "$ac_lib"; then
7890     ac_res="none required"
7891   else
7892     ac_res=-l$ac_lib
7893     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7894   fi
7895   rm -f conftest.$ac_objext conftest$ac_exeext
7896 if { (ac_try="$ac_link"
7897 case "(($ac_try" in
7898   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7899   *) ac_try_echo=$ac_try;;
7900 esac
7901 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7902 $as_echo "$ac_try_echo") >&5
7903   (eval "$ac_link") 2>conftest.er1
7904   ac_status=$?
7905   grep -v '^ *+' conftest.er1 >conftest.err
7906   rm -f conftest.er1
7907   cat conftest.err >&5
7908   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7909   (exit $ac_status); } && {
7910          test -z "$ac_c_werror_flag" ||
7911          test ! -s conftest.err
7912        } && test -s conftest$ac_exeext && {
7913          test "$cross_compiling" = yes ||
7914          $as_test_x conftest$ac_exeext
7915        }; then
7916   ac_cv_search_dlopen=$ac_res
7917 else
7918   $as_echo "$as_me: failed program was:" >&5
7919 sed 's/^/| /' conftest.$ac_ext >&5
7920
7921
7922 fi
7923
7924 rm -rf conftest.dSYM
7925 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7926       conftest$ac_exeext
7927   if test "${ac_cv_search_dlopen+set}" = set; then
7928   break
7929 fi
7930 done
7931 if test "${ac_cv_search_dlopen+set}" = set; then
7932   :
7933 else
7934   ac_cv_search_dlopen=no
7935 fi
7936 rm conftest.$ac_ext
7937 LIBS=$ac_func_search_save_LIBS
7938 fi
7939 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
7940 $as_echo "$ac_cv_search_dlopen" >&6; }
7941 ac_res=$ac_cv_search_dlopen
7942 if test "$ac_res" != no; then
7943   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7944
7945 fi
7946
7947 { $as_echo "$as_me:$LINENO: checking for library containing socket" >&5
7948 $as_echo_n "checking for library containing socket... " >&6; }
7949 if test "${ac_cv_search_socket+set}" = set; then
7950   $as_echo_n "(cached) " >&6
7951 else
7952   ac_func_search_save_LIBS=$LIBS
7953 cat >conftest.$ac_ext <<_ACEOF
7954 /* confdefs.h.  */
7955 _ACEOF
7956 cat confdefs.h >>conftest.$ac_ext
7957 cat >>conftest.$ac_ext <<_ACEOF
7958 /* end confdefs.h.  */
7959
7960 /* Override any GCC internal prototype to avoid an error.
7961    Use char because int might match the return type of a GCC
7962    builtin and then its argument prototype would still apply.  */
7963 #ifdef __cplusplus
7964 extern "C"
7965 #endif
7966 char socket ();
7967 int
7968 main ()
7969 {
7970 return socket ();
7971   ;
7972   return 0;
7973 }
7974 _ACEOF
7975 for ac_lib in '' socket wsock32; do
7976   if test -z "$ac_lib"; then
7977     ac_res="none required"
7978   else
7979     ac_res=-l$ac_lib
7980     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7981   fi
7982   rm -f conftest.$ac_objext conftest$ac_exeext
7983 if { (ac_try="$ac_link"
7984 case "(($ac_try" in
7985   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7986   *) ac_try_echo=$ac_try;;
7987 esac
7988 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7989 $as_echo "$ac_try_echo") >&5
7990   (eval "$ac_link") 2>conftest.er1
7991   ac_status=$?
7992   grep -v '^ *+' conftest.er1 >conftest.err
7993   rm -f conftest.er1
7994   cat conftest.err >&5
7995   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7996   (exit $ac_status); } && {
7997          test -z "$ac_c_werror_flag" ||
7998          test ! -s conftest.err
7999        } && test -s conftest$ac_exeext && {
8000          test "$cross_compiling" = yes ||
8001          $as_test_x conftest$ac_exeext
8002        }; then
8003   ac_cv_search_socket=$ac_res
8004 else
8005   $as_echo "$as_me: failed program was:" >&5
8006 sed 's/^/| /' conftest.$ac_ext >&5
8007
8008
8009 fi
8010
8011 rm -rf conftest.dSYM
8012 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8013       conftest$ac_exeext
8014   if test "${ac_cv_search_socket+set}" = set; then
8015   break
8016 fi
8017 done
8018 if test "${ac_cv_search_socket+set}" = set; then
8019   :
8020 else
8021   ac_cv_search_socket=no
8022 fi
8023 rm conftest.$ac_ext
8024 LIBS=$ac_func_search_save_LIBS
8025 fi
8026 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
8027 $as_echo "$ac_cv_search_socket" >&6; }
8028 ac_res=$ac_cv_search_socket
8029 if test "$ac_res" != no; then
8030   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8031
8032 fi
8033
8034 { $as_echo "$as_me:$LINENO: checking for library containing shl_load" >&5
8035 $as_echo_n "checking for library containing shl_load... " >&6; }
8036 if test "${ac_cv_search_shl_load+set}" = set; then
8037   $as_echo_n "(cached) " >&6
8038 else
8039   ac_func_search_save_LIBS=$LIBS
8040 cat >conftest.$ac_ext <<_ACEOF
8041 /* confdefs.h.  */
8042 _ACEOF
8043 cat confdefs.h >>conftest.$ac_ext
8044 cat >>conftest.$ac_ext <<_ACEOF
8045 /* end confdefs.h.  */
8046
8047 /* Override any GCC internal prototype to avoid an error.
8048    Use char because int might match the return type of a GCC
8049    builtin and then its argument prototype would still apply.  */
8050 #ifdef __cplusplus
8051 extern "C"
8052 #endif
8053 char shl_load ();
8054 int
8055 main ()
8056 {
8057 return shl_load ();
8058   ;
8059   return 0;
8060 }
8061 _ACEOF
8062 for ac_lib in '' dld; do
8063   if test -z "$ac_lib"; then
8064     ac_res="none required"
8065   else
8066     ac_res=-l$ac_lib
8067     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8068   fi
8069   rm -f conftest.$ac_objext conftest$ac_exeext
8070 if { (ac_try="$ac_link"
8071 case "(($ac_try" in
8072   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8073   *) ac_try_echo=$ac_try;;
8074 esac
8075 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8076 $as_echo "$ac_try_echo") >&5
8077   (eval "$ac_link") 2>conftest.er1
8078   ac_status=$?
8079   grep -v '^ *+' conftest.er1 >conftest.err
8080   rm -f conftest.er1
8081   cat conftest.err >&5
8082   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8083   (exit $ac_status); } && {
8084          test -z "$ac_c_werror_flag" ||
8085          test ! -s conftest.err
8086        } && test -s conftest$ac_exeext && {
8087          test "$cross_compiling" = yes ||
8088          $as_test_x conftest$ac_exeext
8089        }; then
8090   ac_cv_search_shl_load=$ac_res
8091 else
8092   $as_echo "$as_me: failed program was:" >&5
8093 sed 's/^/| /' conftest.$ac_ext >&5
8094
8095
8096 fi
8097
8098 rm -rf conftest.dSYM
8099 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8100       conftest$ac_exeext
8101   if test "${ac_cv_search_shl_load+set}" = set; then
8102   break
8103 fi
8104 done
8105 if test "${ac_cv_search_shl_load+set}" = set; then
8106   :
8107 else
8108   ac_cv_search_shl_load=no
8109 fi
8110 rm conftest.$ac_ext
8111 LIBS=$ac_func_search_save_LIBS
8112 fi
8113 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_shl_load" >&5
8114 $as_echo "$ac_cv_search_shl_load" >&6; }
8115 ac_res=$ac_cv_search_shl_load
8116 if test "$ac_res" != no; then
8117   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8118
8119 fi
8120
8121 # We only use libld in port/dynloader/aix.c
8122 case $host_os in
8123      aix*)
8124         { $as_echo "$as_me:$LINENO: checking for library containing ldopen" >&5
8125 $as_echo_n "checking for library containing ldopen... " >&6; }
8126 if test "${ac_cv_search_ldopen+set}" = set; then
8127   $as_echo_n "(cached) " >&6
8128 else
8129   ac_func_search_save_LIBS=$LIBS
8130 cat >conftest.$ac_ext <<_ACEOF
8131 /* confdefs.h.  */
8132 _ACEOF
8133 cat confdefs.h >>conftest.$ac_ext
8134 cat >>conftest.$ac_ext <<_ACEOF
8135 /* end confdefs.h.  */
8136
8137 /* Override any GCC internal prototype to avoid an error.
8138    Use char because int might match the return type of a GCC
8139    builtin and then its argument prototype would still apply.  */
8140 #ifdef __cplusplus
8141 extern "C"
8142 #endif
8143 char ldopen ();
8144 int
8145 main ()
8146 {
8147 return ldopen ();
8148   ;
8149   return 0;
8150 }
8151 _ACEOF
8152 for ac_lib in '' ld; do
8153   if test -z "$ac_lib"; then
8154     ac_res="none required"
8155   else
8156     ac_res=-l$ac_lib
8157     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8158   fi
8159   rm -f conftest.$ac_objext conftest$ac_exeext
8160 if { (ac_try="$ac_link"
8161 case "(($ac_try" in
8162   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8163   *) ac_try_echo=$ac_try;;
8164 esac
8165 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8166 $as_echo "$ac_try_echo") >&5
8167   (eval "$ac_link") 2>conftest.er1
8168   ac_status=$?
8169   grep -v '^ *+' conftest.er1 >conftest.err
8170   rm -f conftest.er1
8171   cat conftest.err >&5
8172   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8173   (exit $ac_status); } && {
8174          test -z "$ac_c_werror_flag" ||
8175          test ! -s conftest.err
8176        } && test -s conftest$ac_exeext && {
8177          test "$cross_compiling" = yes ||
8178          $as_test_x conftest$ac_exeext
8179        }; then
8180   ac_cv_search_ldopen=$ac_res
8181 else
8182   $as_echo "$as_me: failed program was:" >&5
8183 sed 's/^/| /' conftest.$ac_ext >&5
8184
8185
8186 fi
8187
8188 rm -rf conftest.dSYM
8189 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8190       conftest$ac_exeext
8191   if test "${ac_cv_search_ldopen+set}" = set; then
8192   break
8193 fi
8194 done
8195 if test "${ac_cv_search_ldopen+set}" = set; then
8196   :
8197 else
8198   ac_cv_search_ldopen=no
8199 fi
8200 rm conftest.$ac_ext
8201 LIBS=$ac_func_search_save_LIBS
8202 fi
8203 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_ldopen" >&5
8204 $as_echo "$ac_cv_search_ldopen" >&6; }
8205 ac_res=$ac_cv_search_ldopen
8206 if test "$ac_res" != no; then
8207   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8208
8209 fi
8210
8211         ;;
8212 esac
8213 { $as_echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
8214 $as_echo_n "checking for library containing getopt_long... " >&6; }
8215 if test "${ac_cv_search_getopt_long+set}" = set; then
8216   $as_echo_n "(cached) " >&6
8217 else
8218   ac_func_search_save_LIBS=$LIBS
8219 cat >conftest.$ac_ext <<_ACEOF
8220 /* confdefs.h.  */
8221 _ACEOF
8222 cat confdefs.h >>conftest.$ac_ext
8223 cat >>conftest.$ac_ext <<_ACEOF
8224 /* end confdefs.h.  */
8225
8226 /* Override any GCC internal prototype to avoid an error.
8227    Use char because int might match the return type of a GCC
8228    builtin and then its argument prototype would still apply.  */
8229 #ifdef __cplusplus
8230 extern "C"
8231 #endif
8232 char getopt_long ();
8233 int
8234 main ()
8235 {
8236 return getopt_long ();
8237   ;
8238   return 0;
8239 }
8240 _ACEOF
8241 for ac_lib in '' getopt gnugetopt; do
8242   if test -z "$ac_lib"; then
8243     ac_res="none required"
8244   else
8245     ac_res=-l$ac_lib
8246     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8247   fi
8248   rm -f conftest.$ac_objext conftest$ac_exeext
8249 if { (ac_try="$ac_link"
8250 case "(($ac_try" in
8251   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8252   *) ac_try_echo=$ac_try;;
8253 esac
8254 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8255 $as_echo "$ac_try_echo") >&5
8256   (eval "$ac_link") 2>conftest.er1
8257   ac_status=$?
8258   grep -v '^ *+' conftest.er1 >conftest.err
8259   rm -f conftest.er1
8260   cat conftest.err >&5
8261   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8262   (exit $ac_status); } && {
8263          test -z "$ac_c_werror_flag" ||
8264          test ! -s conftest.err
8265        } && test -s conftest$ac_exeext && {
8266          test "$cross_compiling" = yes ||
8267          $as_test_x conftest$ac_exeext
8268        }; then
8269   ac_cv_search_getopt_long=$ac_res
8270 else
8271   $as_echo "$as_me: failed program was:" >&5
8272 sed 's/^/| /' conftest.$ac_ext >&5
8273
8274
8275 fi
8276
8277 rm -rf conftest.dSYM
8278 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8279       conftest$ac_exeext
8280   if test "${ac_cv_search_getopt_long+set}" = set; then
8281   break
8282 fi
8283 done
8284 if test "${ac_cv_search_getopt_long+set}" = set; then
8285   :
8286 else
8287   ac_cv_search_getopt_long=no
8288 fi
8289 rm conftest.$ac_ext
8290 LIBS=$ac_func_search_save_LIBS
8291 fi
8292 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
8293 $as_echo "$ac_cv_search_getopt_long" >&6; }
8294 ac_res=$ac_cv_search_getopt_long
8295 if test "$ac_res" != no; then
8296   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8297
8298 fi
8299
8300 { $as_echo "$as_me:$LINENO: checking for library containing crypt" >&5
8301 $as_echo_n "checking for library containing crypt... " >&6; }
8302 if test "${ac_cv_search_crypt+set}" = set; then
8303   $as_echo_n "(cached) " >&6
8304 else
8305   ac_func_search_save_LIBS=$LIBS
8306 cat >conftest.$ac_ext <<_ACEOF
8307 /* confdefs.h.  */
8308 _ACEOF
8309 cat confdefs.h >>conftest.$ac_ext
8310 cat >>conftest.$ac_ext <<_ACEOF
8311 /* end confdefs.h.  */
8312
8313 /* Override any GCC internal prototype to avoid an error.
8314    Use char because int might match the return type of a GCC
8315    builtin and then its argument prototype would still apply.  */
8316 #ifdef __cplusplus
8317 extern "C"
8318 #endif
8319 char crypt ();
8320 int
8321 main ()
8322 {
8323 return crypt ();
8324   ;
8325   return 0;
8326 }
8327 _ACEOF
8328 for ac_lib in '' crypt; do
8329   if test -z "$ac_lib"; then
8330     ac_res="none required"
8331   else
8332     ac_res=-l$ac_lib
8333     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8334   fi
8335   rm -f conftest.$ac_objext conftest$ac_exeext
8336 if { (ac_try="$ac_link"
8337 case "(($ac_try" in
8338   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8339   *) ac_try_echo=$ac_try;;
8340 esac
8341 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8342 $as_echo "$ac_try_echo") >&5
8343   (eval "$ac_link") 2>conftest.er1
8344   ac_status=$?
8345   grep -v '^ *+' conftest.er1 >conftest.err
8346   rm -f conftest.er1
8347   cat conftest.err >&5
8348   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8349   (exit $ac_status); } && {
8350          test -z "$ac_c_werror_flag" ||
8351          test ! -s conftest.err
8352        } && test -s conftest$ac_exeext && {
8353          test "$cross_compiling" = yes ||
8354          $as_test_x conftest$ac_exeext
8355        }; then
8356   ac_cv_search_crypt=$ac_res
8357 else
8358   $as_echo "$as_me: failed program was:" >&5
8359 sed 's/^/| /' conftest.$ac_ext >&5
8360
8361
8362 fi
8363
8364 rm -rf conftest.dSYM
8365 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8366       conftest$ac_exeext
8367   if test "${ac_cv_search_crypt+set}" = set; then
8368   break
8369 fi
8370 done
8371 if test "${ac_cv_search_crypt+set}" = set; then
8372   :
8373 else
8374   ac_cv_search_crypt=no
8375 fi
8376 rm conftest.$ac_ext
8377 LIBS=$ac_func_search_save_LIBS
8378 fi
8379 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
8380 $as_echo "$ac_cv_search_crypt" >&6; }
8381 ac_res=$ac_cv_search_crypt
8382 if test "$ac_res" != no; then
8383   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8384
8385 fi
8386
8387 # Solaris:
8388 { $as_echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
8389 $as_echo_n "checking for library containing fdatasync... " >&6; }
8390 if test "${ac_cv_search_fdatasync+set}" = set; then
8391   $as_echo_n "(cached) " >&6
8392 else
8393   ac_func_search_save_LIBS=$LIBS
8394 cat >conftest.$ac_ext <<_ACEOF
8395 /* confdefs.h.  */
8396 _ACEOF
8397 cat confdefs.h >>conftest.$ac_ext
8398 cat >>conftest.$ac_ext <<_ACEOF
8399 /* end confdefs.h.  */
8400
8401 /* Override any GCC internal prototype to avoid an error.
8402    Use char because int might match the return type of a GCC
8403    builtin and then its argument prototype would still apply.  */
8404 #ifdef __cplusplus
8405 extern "C"
8406 #endif
8407 char fdatasync ();
8408 int
8409 main ()
8410 {
8411 return fdatasync ();
8412   ;
8413   return 0;
8414 }
8415 _ACEOF
8416 for ac_lib in '' rt posix4; do
8417   if test -z "$ac_lib"; then
8418     ac_res="none required"
8419   else
8420     ac_res=-l$ac_lib
8421     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8422   fi
8423   rm -f conftest.$ac_objext conftest$ac_exeext
8424 if { (ac_try="$ac_link"
8425 case "(($ac_try" in
8426   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8427   *) ac_try_echo=$ac_try;;
8428 esac
8429 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8430 $as_echo "$ac_try_echo") >&5
8431   (eval "$ac_link") 2>conftest.er1
8432   ac_status=$?
8433   grep -v '^ *+' conftest.er1 >conftest.err
8434   rm -f conftest.er1
8435   cat conftest.err >&5
8436   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8437   (exit $ac_status); } && {
8438          test -z "$ac_c_werror_flag" ||
8439          test ! -s conftest.err
8440        } && test -s conftest$ac_exeext && {
8441          test "$cross_compiling" = yes ||
8442          $as_test_x conftest$ac_exeext
8443        }; then
8444   ac_cv_search_fdatasync=$ac_res
8445 else
8446   $as_echo "$as_me: failed program was:" >&5
8447 sed 's/^/| /' conftest.$ac_ext >&5
8448
8449
8450 fi
8451
8452 rm -rf conftest.dSYM
8453 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8454       conftest$ac_exeext
8455   if test "${ac_cv_search_fdatasync+set}" = set; then
8456   break
8457 fi
8458 done
8459 if test "${ac_cv_search_fdatasync+set}" = set; then
8460   :
8461 else
8462   ac_cv_search_fdatasync=no
8463 fi
8464 rm conftest.$ac_ext
8465 LIBS=$ac_func_search_save_LIBS
8466 fi
8467 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
8468 $as_echo "$ac_cv_search_fdatasync" >&6; }
8469 ac_res=$ac_cv_search_fdatasync
8470 if test "$ac_res" != no; then
8471   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8472
8473 fi
8474
8475 # Required for thread_test.c on Solaris 2.5:
8476 # Other ports use it too (HP-UX) so test unconditionally
8477 { $as_echo "$as_me:$LINENO: checking for library containing gethostbyname_r" >&5
8478 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
8479 if test "${ac_cv_search_gethostbyname_r+set}" = set; then
8480   $as_echo_n "(cached) " >&6
8481 else
8482   ac_func_search_save_LIBS=$LIBS
8483 cat >conftest.$ac_ext <<_ACEOF
8484 /* confdefs.h.  */
8485 _ACEOF
8486 cat confdefs.h >>conftest.$ac_ext
8487 cat >>conftest.$ac_ext <<_ACEOF
8488 /* end confdefs.h.  */
8489
8490 /* Override any GCC internal prototype to avoid an error.
8491    Use char because int might match the return type of a GCC
8492    builtin and then its argument prototype would still apply.  */
8493 #ifdef __cplusplus
8494 extern "C"
8495 #endif
8496 char gethostbyname_r ();
8497 int
8498 main ()
8499 {
8500 return gethostbyname_r ();
8501   ;
8502   return 0;
8503 }
8504 _ACEOF
8505 for ac_lib in '' nsl; do
8506   if test -z "$ac_lib"; then
8507     ac_res="none required"
8508   else
8509     ac_res=-l$ac_lib
8510     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8511   fi
8512   rm -f conftest.$ac_objext conftest$ac_exeext
8513 if { (ac_try="$ac_link"
8514 case "(($ac_try" in
8515   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8516   *) ac_try_echo=$ac_try;;
8517 esac
8518 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8519 $as_echo "$ac_try_echo") >&5
8520   (eval "$ac_link") 2>conftest.er1
8521   ac_status=$?
8522   grep -v '^ *+' conftest.er1 >conftest.err
8523   rm -f conftest.er1
8524   cat conftest.err >&5
8525   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8526   (exit $ac_status); } && {
8527          test -z "$ac_c_werror_flag" ||
8528          test ! -s conftest.err
8529        } && test -s conftest$ac_exeext && {
8530          test "$cross_compiling" = yes ||
8531          $as_test_x conftest$ac_exeext
8532        }; then
8533   ac_cv_search_gethostbyname_r=$ac_res
8534 else
8535   $as_echo "$as_me: failed program was:" >&5
8536 sed 's/^/| /' conftest.$ac_ext >&5
8537
8538
8539 fi
8540
8541 rm -rf conftest.dSYM
8542 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8543       conftest$ac_exeext
8544   if test "${ac_cv_search_gethostbyname_r+set}" = set; then
8545   break
8546 fi
8547 done
8548 if test "${ac_cv_search_gethostbyname_r+set}" = set; then
8549   :
8550 else
8551   ac_cv_search_gethostbyname_r=no
8552 fi
8553 rm conftest.$ac_ext
8554 LIBS=$ac_func_search_save_LIBS
8555 fi
8556 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname_r" >&5
8557 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
8558 ac_res=$ac_cv_search_gethostbyname_r
8559 if test "$ac_res" != no; then
8560   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8561
8562 fi
8563
8564 # Cygwin:
8565 { $as_echo "$as_me:$LINENO: checking for library containing shmget" >&5
8566 $as_echo_n "checking for library containing shmget... " >&6; }
8567 if test "${ac_cv_search_shmget+set}" = set; then
8568   $as_echo_n "(cached) " >&6
8569 else
8570   ac_func_search_save_LIBS=$LIBS
8571 cat >conftest.$ac_ext <<_ACEOF
8572 /* confdefs.h.  */
8573 _ACEOF
8574 cat confdefs.h >>conftest.$ac_ext
8575 cat >>conftest.$ac_ext <<_ACEOF
8576 /* end confdefs.h.  */
8577
8578 /* Override any GCC internal prototype to avoid an error.
8579    Use char because int might match the return type of a GCC
8580    builtin and then its argument prototype would still apply.  */
8581 #ifdef __cplusplus
8582 extern "C"
8583 #endif
8584 char shmget ();
8585 int
8586 main ()
8587 {
8588 return shmget ();
8589   ;
8590   return 0;
8591 }
8592 _ACEOF
8593 for ac_lib in '' cygipc; do
8594   if test -z "$ac_lib"; then
8595     ac_res="none required"
8596   else
8597     ac_res=-l$ac_lib
8598     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8599   fi
8600   rm -f conftest.$ac_objext conftest$ac_exeext
8601 if { (ac_try="$ac_link"
8602 case "(($ac_try" in
8603   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8604   *) ac_try_echo=$ac_try;;
8605 esac
8606 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8607 $as_echo "$ac_try_echo") >&5
8608   (eval "$ac_link") 2>conftest.er1
8609   ac_status=$?
8610   grep -v '^ *+' conftest.er1 >conftest.err
8611   rm -f conftest.er1
8612   cat conftest.err >&5
8613   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8614   (exit $ac_status); } && {
8615          test -z "$ac_c_werror_flag" ||
8616          test ! -s conftest.err
8617        } && test -s conftest$ac_exeext && {
8618          test "$cross_compiling" = yes ||
8619          $as_test_x conftest$ac_exeext
8620        }; then
8621   ac_cv_search_shmget=$ac_res
8622 else
8623   $as_echo "$as_me: failed program was:" >&5
8624 sed 's/^/| /' conftest.$ac_ext >&5
8625
8626
8627 fi
8628
8629 rm -rf conftest.dSYM
8630 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8631       conftest$ac_exeext
8632   if test "${ac_cv_search_shmget+set}" = set; then
8633   break
8634 fi
8635 done
8636 if test "${ac_cv_search_shmget+set}" = set; then
8637   :
8638 else
8639   ac_cv_search_shmget=no
8640 fi
8641 rm conftest.$ac_ext
8642 LIBS=$ac_func_search_save_LIBS
8643 fi
8644 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_shmget" >&5
8645 $as_echo "$ac_cv_search_shmget" >&6; }
8646 ac_res=$ac_cv_search_shmget
8647 if test "$ac_res" != no; then
8648   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8649
8650 fi
8651
8652
8653 if test "$with_readline" = yes; then
8654
8655
8656 { $as_echo "$as_me:$LINENO: checking for library containing readline" >&5
8657 $as_echo_n "checking for library containing readline... " >&6; }
8658 if test "${pgac_cv_check_readline+set}" = set; then
8659   $as_echo_n "(cached) " >&6
8660 else
8661   pgac_cv_check_readline=no
8662 pgac_save_LIBS=$LIBS
8663 if test x"$with_libedit_preferred" != x"yes"
8664 then    READLINE_ORDER="-lreadline -ledit"
8665 else    READLINE_ORDER="-ledit -lreadline"
8666 fi
8667 for pgac_rllib in $READLINE_ORDER ; do
8668   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
8669     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
8670     cat >conftest.$ac_ext <<_ACEOF
8671 /* confdefs.h.  */
8672 _ACEOF
8673 cat confdefs.h >>conftest.$ac_ext
8674 cat >>conftest.$ac_ext <<_ACEOF
8675 /* end confdefs.h.  */
8676
8677 /* Override any GCC internal prototype to avoid an error.
8678    Use char because int might match the return type of a GCC
8679    builtin and then its argument prototype would still apply.  */
8680 #ifdef __cplusplus
8681 extern "C"
8682 #endif
8683 char readline ();
8684 int
8685 main ()
8686 {
8687 return readline ();
8688   ;
8689   return 0;
8690 }
8691 _ACEOF
8692 rm -f conftest.$ac_objext conftest$ac_exeext
8693 if { (ac_try="$ac_link"
8694 case "(($ac_try" in
8695   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8696   *) ac_try_echo=$ac_try;;
8697 esac
8698 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8699 $as_echo "$ac_try_echo") >&5
8700   (eval "$ac_link") 2>conftest.er1
8701   ac_status=$?
8702   grep -v '^ *+' conftest.er1 >conftest.err
8703   rm -f conftest.er1
8704   cat conftest.err >&5
8705   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8706   (exit $ac_status); } && {
8707          test -z "$ac_c_werror_flag" ||
8708          test ! -s conftest.err
8709        } && test -s conftest$ac_exeext && {
8710          test "$cross_compiling" = yes ||
8711          $as_test_x conftest$ac_exeext
8712        }; then
8713
8714       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
8715       # recognize dependent libraries; assume curses is needed if we didn't
8716       # find any dependency.
8717       case $host_os in
8718         netbsd* | openbsd* | irix*)
8719           if test x"$pgac_lib" = x"" ; then
8720             pgac_lib=" -lcurses"
8721           fi ;;
8722       esac
8723
8724       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
8725       break
8726
8727 else
8728   $as_echo "$as_me: failed program was:" >&5
8729 sed 's/^/| /' conftest.$ac_ext >&5
8730
8731
8732 fi
8733
8734 rm -rf conftest.dSYM
8735 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8736       conftest$ac_exeext conftest.$ac_ext
8737   done
8738   if test "$pgac_cv_check_readline" != no ; then
8739     break
8740   fi
8741 done
8742 LIBS=$pgac_save_LIBS
8743
8744 fi
8745 { $as_echo "$as_me:$LINENO: result: $pgac_cv_check_readline" >&5
8746 $as_echo "$pgac_cv_check_readline" >&6; }
8747 if test "$pgac_cv_check_readline" != no ; then
8748   LIBS="$pgac_cv_check_readline $LIBS"
8749
8750 cat >>confdefs.h <<\_ACEOF
8751 #define HAVE_LIBREADLINE 1
8752 _ACEOF
8753
8754 fi
8755
8756
8757   if test x"$pgac_cv_check_readline" = x"no"; then
8758     { { $as_echo "$as_me:$LINENO: error: readline library not found
8759 If you have readline already installed, see config.log for details on the
8760 failure.  It is possible the compiler isn't looking in the proper directory.
8761 Use --without-readline to disable readline support." >&5
8762 $as_echo "$as_me: error: readline library not found
8763 If you have readline already installed, see config.log for details on the
8764 failure.  It is possible the compiler isn't looking in the proper directory.
8765 Use --without-readline to disable readline support." >&2;}
8766    { (exit 1); exit 1; }; }
8767   fi
8768 fi
8769
8770 if test "$with_zlib" = yes; then
8771
8772 { $as_echo "$as_me:$LINENO: checking for inflate in -lz" >&5
8773 $as_echo_n "checking for inflate in -lz... " >&6; }
8774 if test "${ac_cv_lib_z_inflate+set}" = set; then
8775   $as_echo_n "(cached) " >&6
8776 else
8777   ac_check_lib_save_LIBS=$LIBS
8778 LIBS="-lz  $LIBS"
8779 cat >conftest.$ac_ext <<_ACEOF
8780 /* confdefs.h.  */
8781 _ACEOF
8782 cat confdefs.h >>conftest.$ac_ext
8783 cat >>conftest.$ac_ext <<_ACEOF
8784 /* end confdefs.h.  */
8785
8786 /* Override any GCC internal prototype to avoid an error.
8787    Use char because int might match the return type of a GCC
8788    builtin and then its argument prototype would still apply.  */
8789 #ifdef __cplusplus
8790 extern "C"
8791 #endif
8792 char inflate ();
8793 int
8794 main ()
8795 {
8796 return inflate ();
8797   ;
8798   return 0;
8799 }
8800 _ACEOF
8801 rm -f conftest.$ac_objext conftest$ac_exeext
8802 if { (ac_try="$ac_link"
8803 case "(($ac_try" in
8804   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8805   *) ac_try_echo=$ac_try;;
8806 esac
8807 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8808 $as_echo "$ac_try_echo") >&5
8809   (eval "$ac_link") 2>conftest.er1
8810   ac_status=$?
8811   grep -v '^ *+' conftest.er1 >conftest.err
8812   rm -f conftest.er1
8813   cat conftest.err >&5
8814   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8815   (exit $ac_status); } && {
8816          test -z "$ac_c_werror_flag" ||
8817          test ! -s conftest.err
8818        } && test -s conftest$ac_exeext && {
8819          test "$cross_compiling" = yes ||
8820          $as_test_x conftest$ac_exeext
8821        }; then
8822   ac_cv_lib_z_inflate=yes
8823 else
8824   $as_echo "$as_me: failed program was:" >&5
8825 sed 's/^/| /' conftest.$ac_ext >&5
8826
8827         ac_cv_lib_z_inflate=no
8828 fi
8829
8830 rm -rf conftest.dSYM
8831 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8832       conftest$ac_exeext conftest.$ac_ext
8833 LIBS=$ac_check_lib_save_LIBS
8834 fi
8835 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
8836 $as_echo "$ac_cv_lib_z_inflate" >&6; }
8837 if test "x$ac_cv_lib_z_inflate" = x""yes; then
8838   cat >>confdefs.h <<_ACEOF
8839 #define HAVE_LIBZ 1
8840 _ACEOF
8841
8842   LIBS="-lz $LIBS"
8843
8844 else
8845   { { $as_echo "$as_me:$LINENO: error: zlib library not found
8846 If you have zlib already installed, see config.log for details on the
8847 failure.  It is possible the compiler isn't looking in the proper directory.
8848 Use --without-zlib to disable zlib support." >&5
8849 $as_echo "$as_me: error: zlib library not found
8850 If you have zlib already installed, see config.log for details on the
8851 failure.  It is possible the compiler isn't looking in the proper directory.
8852 Use --without-zlib to disable zlib support." >&2;}
8853    { (exit 1); exit 1; }; }
8854 fi
8855
8856 fi
8857
8858 if test "$enable_spinlocks" = yes; then
8859
8860 cat >>confdefs.h <<\_ACEOF
8861 #define HAVE_SPINLOCKS 1
8862 _ACEOF
8863
8864 else
8865   { $as_echo "$as_me:$LINENO: WARNING:
8866 *** Not using spinlocks will cause poor performance." >&5
8867 $as_echo "$as_me: WARNING:
8868 *** Not using spinlocks will cause poor performance." >&2;}
8869 fi
8870
8871 if test "$with_gssapi" = yes ; then
8872   if test "$PORTNAME" != "win32"; then
8873     { $as_echo "$as_me:$LINENO: checking for library containing gss_init_sec_context" >&5
8874 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
8875 if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
8876   $as_echo_n "(cached) " >&6
8877 else
8878   ac_func_search_save_LIBS=$LIBS
8879 cat >conftest.$ac_ext <<_ACEOF
8880 /* confdefs.h.  */
8881 _ACEOF
8882 cat confdefs.h >>conftest.$ac_ext
8883 cat >>conftest.$ac_ext <<_ACEOF
8884 /* end confdefs.h.  */
8885
8886 /* Override any GCC internal prototype to avoid an error.
8887    Use char because int might match the return type of a GCC
8888    builtin and then its argument prototype would still apply.  */
8889 #ifdef __cplusplus
8890 extern "C"
8891 #endif
8892 char gss_init_sec_context ();
8893 int
8894 main ()
8895 {
8896 return gss_init_sec_context ();
8897   ;
8898   return 0;
8899 }
8900 _ACEOF
8901 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
8902   if test -z "$ac_lib"; then
8903     ac_res="none required"
8904   else
8905     ac_res=-l$ac_lib
8906     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8907   fi
8908   rm -f conftest.$ac_objext conftest$ac_exeext
8909 if { (ac_try="$ac_link"
8910 case "(($ac_try" in
8911   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8912   *) ac_try_echo=$ac_try;;
8913 esac
8914 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8915 $as_echo "$ac_try_echo") >&5
8916   (eval "$ac_link") 2>conftest.er1
8917   ac_status=$?
8918   grep -v '^ *+' conftest.er1 >conftest.err
8919   rm -f conftest.er1
8920   cat conftest.err >&5
8921   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8922   (exit $ac_status); } && {
8923          test -z "$ac_c_werror_flag" ||
8924          test ! -s conftest.err
8925        } && test -s conftest$ac_exeext && {
8926          test "$cross_compiling" = yes ||
8927          $as_test_x conftest$ac_exeext
8928        }; then
8929   ac_cv_search_gss_init_sec_context=$ac_res
8930 else
8931   $as_echo "$as_me: failed program was:" >&5
8932 sed 's/^/| /' conftest.$ac_ext >&5
8933
8934
8935 fi
8936
8937 rm -rf conftest.dSYM
8938 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8939       conftest$ac_exeext
8940   if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
8941   break
8942 fi
8943 done
8944 if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
8945   :
8946 else
8947   ac_cv_search_gss_init_sec_context=no
8948 fi
8949 rm conftest.$ac_ext
8950 LIBS=$ac_func_search_save_LIBS
8951 fi
8952 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_gss_init_sec_context" >&5
8953 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
8954 ac_res=$ac_cv_search_gss_init_sec_context
8955 if test "$ac_res" != no; then
8956   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8957
8958 else
8959   { { $as_echo "$as_me:$LINENO: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&5
8960 $as_echo "$as_me: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&2;}
8961    { (exit 1); exit 1; }; }
8962 fi
8963
8964   else
8965     LIBS="$LIBS -lgssapi32"
8966   fi
8967 fi
8968
8969 if test "$with_krb5" = yes ; then
8970   if test "$PORTNAME" != "win32"; then
8971      { $as_echo "$as_me:$LINENO: checking for library containing com_err" >&5
8972 $as_echo_n "checking for library containing com_err... " >&6; }
8973 if test "${ac_cv_search_com_err+set}" = set; then
8974   $as_echo_n "(cached) " >&6
8975 else
8976   ac_func_search_save_LIBS=$LIBS
8977 cat >conftest.$ac_ext <<_ACEOF
8978 /* confdefs.h.  */
8979 _ACEOF
8980 cat confdefs.h >>conftest.$ac_ext
8981 cat >>conftest.$ac_ext <<_ACEOF
8982 /* end confdefs.h.  */
8983
8984 /* Override any GCC internal prototype to avoid an error.
8985    Use char because int might match the return type of a GCC
8986    builtin and then its argument prototype would still apply.  */
8987 #ifdef __cplusplus
8988 extern "C"
8989 #endif
8990 char com_err ();
8991 int
8992 main ()
8993 {
8994 return com_err ();
8995   ;
8996   return 0;
8997 }
8998 _ACEOF
8999 for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' com_err 'com_err -lssl -lcrypto'; do
9000   if test -z "$ac_lib"; then
9001     ac_res="none required"
9002   else
9003     ac_res=-l$ac_lib
9004     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9005   fi
9006   rm -f conftest.$ac_objext conftest$ac_exeext
9007 if { (ac_try="$ac_link"
9008 case "(($ac_try" in
9009   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9010   *) ac_try_echo=$ac_try;;
9011 esac
9012 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9013 $as_echo "$ac_try_echo") >&5
9014   (eval "$ac_link") 2>conftest.er1
9015   ac_status=$?
9016   grep -v '^ *+' conftest.er1 >conftest.err
9017   rm -f conftest.er1
9018   cat conftest.err >&5
9019   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9020   (exit $ac_status); } && {
9021          test -z "$ac_c_werror_flag" ||
9022          test ! -s conftest.err
9023        } && test -s conftest$ac_exeext && {
9024          test "$cross_compiling" = yes ||
9025          $as_test_x conftest$ac_exeext
9026        }; then
9027   ac_cv_search_com_err=$ac_res
9028 else
9029   $as_echo "$as_me: failed program was:" >&5
9030 sed 's/^/| /' conftest.$ac_ext >&5
9031
9032
9033 fi
9034
9035 rm -rf conftest.dSYM
9036 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9037       conftest$ac_exeext
9038   if test "${ac_cv_search_com_err+set}" = set; then
9039   break
9040 fi
9041 done
9042 if test "${ac_cv_search_com_err+set}" = set; then
9043   :
9044 else
9045   ac_cv_search_com_err=no
9046 fi
9047 rm conftest.$ac_ext
9048 LIBS=$ac_func_search_save_LIBS
9049 fi
9050 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
9051 $as_echo "$ac_cv_search_com_err" >&6; }
9052 ac_res=$ac_cv_search_com_err
9053 if test "$ac_res" != no; then
9054   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9055
9056 else
9057   { { $as_echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
9058 $as_echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
9059    { (exit 1); exit 1; }; }
9060 fi
9061
9062      { $as_echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
9063 $as_echo_n "checking for library containing krb5_sendauth... " >&6; }
9064 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
9065   $as_echo_n "(cached) " >&6
9066 else
9067   ac_func_search_save_LIBS=$LIBS
9068 cat >conftest.$ac_ext <<_ACEOF
9069 /* confdefs.h.  */
9070 _ACEOF
9071 cat confdefs.h >>conftest.$ac_ext
9072 cat >>conftest.$ac_ext <<_ACEOF
9073 /* end confdefs.h.  */
9074
9075 /* Override any GCC internal prototype to avoid an error.
9076    Use char because int might match the return type of a GCC
9077    builtin and then its argument prototype would still apply.  */
9078 #ifdef __cplusplus
9079 extern "C"
9080 #endif
9081 char krb5_sendauth ();
9082 int
9083 main ()
9084 {
9085 return krb5_sendauth ();
9086   ;
9087   return 0;
9088 }
9089 _ACEOF
9090 for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'; do
9091   if test -z "$ac_lib"; then
9092     ac_res="none required"
9093   else
9094     ac_res=-l$ac_lib
9095     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9096   fi
9097   rm -f conftest.$ac_objext conftest$ac_exeext
9098 if { (ac_try="$ac_link"
9099 case "(($ac_try" in
9100   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9101   *) ac_try_echo=$ac_try;;
9102 esac
9103 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9104 $as_echo "$ac_try_echo") >&5
9105   (eval "$ac_link") 2>conftest.er1
9106   ac_status=$?
9107   grep -v '^ *+' conftest.er1 >conftest.err
9108   rm -f conftest.er1
9109   cat conftest.err >&5
9110   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9111   (exit $ac_status); } && {
9112          test -z "$ac_c_werror_flag" ||
9113          test ! -s conftest.err
9114        } && test -s conftest$ac_exeext && {
9115          test "$cross_compiling" = yes ||
9116          $as_test_x conftest$ac_exeext
9117        }; then
9118   ac_cv_search_krb5_sendauth=$ac_res
9119 else
9120   $as_echo "$as_me: failed program was:" >&5
9121 sed 's/^/| /' conftest.$ac_ext >&5
9122
9123
9124 fi
9125
9126 rm -rf conftest.dSYM
9127 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9128       conftest$ac_exeext
9129   if test "${ac_cv_search_krb5_sendauth+set}" = set; then
9130   break
9131 fi
9132 done
9133 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
9134   :
9135 else
9136   ac_cv_search_krb5_sendauth=no
9137 fi
9138 rm conftest.$ac_ext
9139 LIBS=$ac_func_search_save_LIBS
9140 fi
9141 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
9142 $as_echo "$ac_cv_search_krb5_sendauth" >&6; }
9143 ac_res=$ac_cv_search_krb5_sendauth
9144 if test "$ac_res" != no; then
9145   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9146
9147 else
9148   { { $as_echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
9149 $as_echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
9150    { (exit 1); exit 1; }; }
9151 fi
9152
9153   else
9154      { $as_echo "$as_me:$LINENO: checking for library containing com_err" >&5
9155 $as_echo_n "checking for library containing com_err... " >&6; }
9156 if test "${ac_cv_search_com_err+set}" = set; then
9157   $as_echo_n "(cached) " >&6
9158 else
9159   ac_func_search_save_LIBS=$LIBS
9160 cat >conftest.$ac_ext <<_ACEOF
9161 /* confdefs.h.  */
9162 _ACEOF
9163 cat confdefs.h >>conftest.$ac_ext
9164 cat >>conftest.$ac_ext <<_ACEOF
9165 /* end confdefs.h.  */
9166
9167 /* Override any GCC internal prototype to avoid an error.
9168    Use char because int might match the return type of a GCC
9169    builtin and then its argument prototype would still apply.  */
9170 #ifdef __cplusplus
9171 extern "C"
9172 #endif
9173 char com_err ();
9174 int
9175 main ()
9176 {
9177 return com_err ();
9178   ;
9179   return 0;
9180 }
9181 _ACEOF
9182 for ac_lib in '' 'comerr32 -lkrb5_32'; do
9183   if test -z "$ac_lib"; then
9184     ac_res="none required"
9185   else
9186     ac_res=-l$ac_lib
9187     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9188   fi
9189   rm -f conftest.$ac_objext conftest$ac_exeext
9190 if { (ac_try="$ac_link"
9191 case "(($ac_try" in
9192   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9193   *) ac_try_echo=$ac_try;;
9194 esac
9195 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9196 $as_echo "$ac_try_echo") >&5
9197   (eval "$ac_link") 2>conftest.er1
9198   ac_status=$?
9199   grep -v '^ *+' conftest.er1 >conftest.err
9200   rm -f conftest.er1
9201   cat conftest.err >&5
9202   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9203   (exit $ac_status); } && {
9204          test -z "$ac_c_werror_flag" ||
9205          test ! -s conftest.err
9206        } && test -s conftest$ac_exeext && {
9207          test "$cross_compiling" = yes ||
9208          $as_test_x conftest$ac_exeext
9209        }; then
9210   ac_cv_search_com_err=$ac_res
9211 else
9212   $as_echo "$as_me: failed program was:" >&5
9213 sed 's/^/| /' conftest.$ac_ext >&5
9214
9215
9216 fi
9217
9218 rm -rf conftest.dSYM
9219 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9220       conftest$ac_exeext
9221   if test "${ac_cv_search_com_err+set}" = set; then
9222   break
9223 fi
9224 done
9225 if test "${ac_cv_search_com_err+set}" = set; then
9226   :
9227 else
9228   ac_cv_search_com_err=no
9229 fi
9230 rm conftest.$ac_ext
9231 LIBS=$ac_func_search_save_LIBS
9232 fi
9233 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
9234 $as_echo "$ac_cv_search_com_err" >&6; }
9235 ac_res=$ac_cv_search_com_err
9236 if test "$ac_res" != no; then
9237   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9238
9239 else
9240   { { $as_echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
9241 $as_echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
9242    { (exit 1); exit 1; }; }
9243 fi
9244
9245   fi
9246 fi
9247
9248 if test "$with_openssl" = yes ; then
9249     if test "$PORTNAME" != "win32"; then
9250
9251 { $as_echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
9252 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
9253 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
9254   $as_echo_n "(cached) " >&6
9255 else
9256   ac_check_lib_save_LIBS=$LIBS
9257 LIBS="-lcrypto  $LIBS"
9258 cat >conftest.$ac_ext <<_ACEOF
9259 /* confdefs.h.  */
9260 _ACEOF
9261 cat confdefs.h >>conftest.$ac_ext
9262 cat >>conftest.$ac_ext <<_ACEOF
9263 /* end confdefs.h.  */
9264
9265 /* Override any GCC internal prototype to avoid an error.
9266    Use char because int might match the return type of a GCC
9267    builtin and then its argument prototype would still apply.  */
9268 #ifdef __cplusplus
9269 extern "C"
9270 #endif
9271 char CRYPTO_new_ex_data ();
9272 int
9273 main ()
9274 {
9275 return CRYPTO_new_ex_data ();
9276   ;
9277   return 0;
9278 }
9279 _ACEOF
9280 rm -f conftest.$ac_objext conftest$ac_exeext
9281 if { (ac_try="$ac_link"
9282 case "(($ac_try" in
9283   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9284   *) ac_try_echo=$ac_try;;
9285 esac
9286 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9287 $as_echo "$ac_try_echo") >&5
9288   (eval "$ac_link") 2>conftest.er1
9289   ac_status=$?
9290   grep -v '^ *+' conftest.er1 >conftest.err
9291   rm -f conftest.er1
9292   cat conftest.err >&5
9293   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9294   (exit $ac_status); } && {
9295          test -z "$ac_c_werror_flag" ||
9296          test ! -s conftest.err
9297        } && test -s conftest$ac_exeext && {
9298          test "$cross_compiling" = yes ||
9299          $as_test_x conftest$ac_exeext
9300        }; then
9301   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
9302 else
9303   $as_echo "$as_me: failed program was:" >&5
9304 sed 's/^/| /' conftest.$ac_ext >&5
9305
9306         ac_cv_lib_crypto_CRYPTO_new_ex_data=no
9307 fi
9308
9309 rm -rf conftest.dSYM
9310 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9311       conftest$ac_exeext conftest.$ac_ext
9312 LIBS=$ac_check_lib_save_LIBS
9313 fi
9314 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
9315 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
9316 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = x""yes; then
9317   cat >>confdefs.h <<_ACEOF
9318 #define HAVE_LIBCRYPTO 1
9319 _ACEOF
9320
9321   LIBS="-lcrypto $LIBS"
9322
9323 else
9324   { { $as_echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
9325 $as_echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
9326    { (exit 1); exit 1; }; }
9327 fi
9328
9329
9330 { $as_echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
9331 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
9332 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
9333   $as_echo_n "(cached) " >&6
9334 else
9335   ac_check_lib_save_LIBS=$LIBS
9336 LIBS="-lssl  $LIBS"
9337 cat >conftest.$ac_ext <<_ACEOF
9338 /* confdefs.h.  */
9339 _ACEOF
9340 cat confdefs.h >>conftest.$ac_ext
9341 cat >>conftest.$ac_ext <<_ACEOF
9342 /* end confdefs.h.  */
9343
9344 /* Override any GCC internal prototype to avoid an error.
9345    Use char because int might match the return type of a GCC
9346    builtin and then its argument prototype would still apply.  */
9347 #ifdef __cplusplus
9348 extern "C"
9349 #endif
9350 char SSL_library_init ();
9351 int
9352 main ()
9353 {
9354 return SSL_library_init ();
9355   ;
9356   return 0;
9357 }
9358 _ACEOF
9359 rm -f conftest.$ac_objext conftest$ac_exeext
9360 if { (ac_try="$ac_link"
9361 case "(($ac_try" in
9362   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9363   *) ac_try_echo=$ac_try;;
9364 esac
9365 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9366 $as_echo "$ac_try_echo") >&5
9367   (eval "$ac_link") 2>conftest.er1
9368   ac_status=$?
9369   grep -v '^ *+' conftest.er1 >conftest.err
9370   rm -f conftest.er1
9371   cat conftest.err >&5
9372   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9373   (exit $ac_status); } && {
9374          test -z "$ac_c_werror_flag" ||
9375          test ! -s conftest.err
9376        } && test -s conftest$ac_exeext && {
9377          test "$cross_compiling" = yes ||
9378          $as_test_x conftest$ac_exeext
9379        }; then
9380   ac_cv_lib_ssl_SSL_library_init=yes
9381 else
9382   $as_echo "$as_me: failed program was:" >&5
9383 sed 's/^/| /' conftest.$ac_ext >&5
9384
9385         ac_cv_lib_ssl_SSL_library_init=no
9386 fi
9387
9388 rm -rf conftest.dSYM
9389 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9390       conftest$ac_exeext conftest.$ac_ext
9391 LIBS=$ac_check_lib_save_LIBS
9392 fi
9393 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
9394 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
9395 if test "x$ac_cv_lib_ssl_SSL_library_init" = x""yes; then
9396   cat >>confdefs.h <<_ACEOF
9397 #define HAVE_LIBSSL 1
9398 _ACEOF
9399
9400   LIBS="-lssl $LIBS"
9401
9402 else
9403   { { $as_echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
9404 $as_echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
9405    { (exit 1); exit 1; }; }
9406 fi
9407
9408   else
9409      { $as_echo "$as_me:$LINENO: checking for library containing CRYPTO_new_ex_data" >&5
9410 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
9411 if test "${ac_cv_search_CRYPTO_new_ex_data+set}" = set; then
9412   $as_echo_n "(cached) " >&6
9413 else
9414   ac_func_search_save_LIBS=$LIBS
9415 cat >conftest.$ac_ext <<_ACEOF
9416 /* confdefs.h.  */
9417 _ACEOF
9418 cat confdefs.h >>conftest.$ac_ext
9419 cat >>conftest.$ac_ext <<_ACEOF
9420 /* end confdefs.h.  */
9421
9422 /* Override any GCC internal prototype to avoid an error.
9423    Use char because int might match the return type of a GCC
9424    builtin and then its argument prototype would still apply.  */
9425 #ifdef __cplusplus
9426 extern "C"
9427 #endif
9428 char CRYPTO_new_ex_data ();
9429 int
9430 main ()
9431 {
9432 return CRYPTO_new_ex_data ();
9433   ;
9434   return 0;
9435 }
9436 _ACEOF
9437 for ac_lib in '' eay32 crypto; do
9438   if test -z "$ac_lib"; then
9439     ac_res="none required"
9440   else
9441     ac_res=-l$ac_lib
9442     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9443   fi
9444   rm -f conftest.$ac_objext conftest$ac_exeext
9445 if { (ac_try="$ac_link"
9446 case "(($ac_try" in
9447   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9448   *) ac_try_echo=$ac_try;;
9449 esac
9450 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9451 $as_echo "$ac_try_echo") >&5
9452   (eval "$ac_link") 2>conftest.er1
9453   ac_status=$?
9454   grep -v '^ *+' conftest.er1 >conftest.err
9455   rm -f conftest.er1
9456   cat conftest.err >&5
9457   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9458   (exit $ac_status); } && {
9459          test -z "$ac_c_werror_flag" ||
9460          test ! -s conftest.err
9461        } && test -s conftest$ac_exeext && {
9462          test "$cross_compiling" = yes ||
9463          $as_test_x conftest$ac_exeext
9464        }; then
9465   ac_cv_search_CRYPTO_new_ex_data=$ac_res
9466 else
9467   $as_echo "$as_me: failed program was:" >&5
9468 sed 's/^/| /' conftest.$ac_ext >&5
9469
9470
9471 fi
9472
9473 rm -rf conftest.dSYM
9474 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9475       conftest$ac_exeext
9476   if test "${ac_cv_search_CRYPTO_new_ex_data+set}" = set; then
9477   break
9478 fi
9479 done
9480 if test "${ac_cv_search_CRYPTO_new_ex_data+set}" = set; then
9481   :
9482 else
9483   ac_cv_search_CRYPTO_new_ex_data=no
9484 fi
9485 rm conftest.$ac_ext
9486 LIBS=$ac_func_search_save_LIBS
9487 fi
9488 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
9489 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
9490 ac_res=$ac_cv_search_CRYPTO_new_ex_data
9491 if test "$ac_res" != no; then
9492   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9493
9494 else
9495   { { $as_echo "$as_me:$LINENO: error: library 'eay32' or 'crypto' is required for OpenSSL" >&5
9496 $as_echo "$as_me: error: library 'eay32' or 'crypto' is required for OpenSSL" >&2;}
9497    { (exit 1); exit 1; }; }
9498 fi
9499
9500      { $as_echo "$as_me:$LINENO: checking for library containing SSL_library_init" >&5
9501 $as_echo_n "checking for library containing SSL_library_init... " >&6; }
9502 if test "${ac_cv_search_SSL_library_init+set}" = set; then
9503   $as_echo_n "(cached) " >&6
9504 else
9505   ac_func_search_save_LIBS=$LIBS
9506 cat >conftest.$ac_ext <<_ACEOF
9507 /* confdefs.h.  */
9508 _ACEOF
9509 cat confdefs.h >>conftest.$ac_ext
9510 cat >>conftest.$ac_ext <<_ACEOF
9511 /* end confdefs.h.  */
9512
9513 /* Override any GCC internal prototype to avoid an error.
9514    Use char because int might match the return type of a GCC
9515    builtin and then its argument prototype would still apply.  */
9516 #ifdef __cplusplus
9517 extern "C"
9518 #endif
9519 char SSL_library_init ();
9520 int
9521 main ()
9522 {
9523 return SSL_library_init ();
9524   ;
9525   return 0;
9526 }
9527 _ACEOF
9528 for ac_lib in '' ssleay32 ssl; do
9529   if test -z "$ac_lib"; then
9530     ac_res="none required"
9531   else
9532     ac_res=-l$ac_lib
9533     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9534   fi
9535   rm -f conftest.$ac_objext conftest$ac_exeext
9536 if { (ac_try="$ac_link"
9537 case "(($ac_try" in
9538   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9539   *) ac_try_echo=$ac_try;;
9540 esac
9541 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9542 $as_echo "$ac_try_echo") >&5
9543   (eval "$ac_link") 2>conftest.er1
9544   ac_status=$?
9545   grep -v '^ *+' conftest.er1 >conftest.err
9546   rm -f conftest.er1
9547   cat conftest.err >&5
9548   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9549   (exit $ac_status); } && {
9550          test -z "$ac_c_werror_flag" ||
9551          test ! -s conftest.err
9552        } && test -s conftest$ac_exeext && {
9553          test "$cross_compiling" = yes ||
9554          $as_test_x conftest$ac_exeext
9555        }; then
9556   ac_cv_search_SSL_library_init=$ac_res
9557 else
9558   $as_echo "$as_me: failed program was:" >&5
9559 sed 's/^/| /' conftest.$ac_ext >&5
9560
9561
9562 fi
9563
9564 rm -rf conftest.dSYM
9565 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9566       conftest$ac_exeext
9567   if test "${ac_cv_search_SSL_library_init+set}" = set; then
9568   break
9569 fi
9570 done
9571 if test "${ac_cv_search_SSL_library_init+set}" = set; then
9572   :
9573 else
9574   ac_cv_search_SSL_library_init=no
9575 fi
9576 rm conftest.$ac_ext
9577 LIBS=$ac_func_search_save_LIBS
9578 fi
9579 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_SSL_library_init" >&5
9580 $as_echo "$ac_cv_search_SSL_library_init" >&6; }
9581 ac_res=$ac_cv_search_SSL_library_init
9582 if test "$ac_res" != no; then
9583   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9584
9585 else
9586   { { $as_echo "$as_me:$LINENO: error: library 'ssleay32' or 'ssl' is required for OpenSSL" >&5
9587 $as_echo "$as_me: error: library 'ssleay32' or 'ssl' is required for OpenSSL" >&2;}
9588    { (exit 1); exit 1; }; }
9589 fi
9590
9591   fi
9592 fi
9593
9594 if test "$with_pam" = yes ; then
9595
9596 { $as_echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
9597 $as_echo_n "checking for pam_start in -lpam... " >&6; }
9598 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
9599   $as_echo_n "(cached) " >&6
9600 else
9601   ac_check_lib_save_LIBS=$LIBS
9602 LIBS="-lpam  $LIBS"
9603 cat >conftest.$ac_ext <<_ACEOF
9604 /* confdefs.h.  */
9605 _ACEOF
9606 cat confdefs.h >>conftest.$ac_ext
9607 cat >>conftest.$ac_ext <<_ACEOF
9608 /* end confdefs.h.  */
9609
9610 /* Override any GCC internal prototype to avoid an error.
9611    Use char because int might match the return type of a GCC
9612    builtin and then its argument prototype would still apply.  */
9613 #ifdef __cplusplus
9614 extern "C"
9615 #endif
9616 char pam_start ();
9617 int
9618 main ()
9619 {
9620 return pam_start ();
9621   ;
9622   return 0;
9623 }
9624 _ACEOF
9625 rm -f conftest.$ac_objext conftest$ac_exeext
9626 if { (ac_try="$ac_link"
9627 case "(($ac_try" in
9628   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9629   *) ac_try_echo=$ac_try;;
9630 esac
9631 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9632 $as_echo "$ac_try_echo") >&5
9633   (eval "$ac_link") 2>conftest.er1
9634   ac_status=$?
9635   grep -v '^ *+' conftest.er1 >conftest.err
9636   rm -f conftest.er1
9637   cat conftest.err >&5
9638   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9639   (exit $ac_status); } && {
9640          test -z "$ac_c_werror_flag" ||
9641          test ! -s conftest.err
9642        } && test -s conftest$ac_exeext && {
9643          test "$cross_compiling" = yes ||
9644          $as_test_x conftest$ac_exeext
9645        }; then
9646   ac_cv_lib_pam_pam_start=yes
9647 else
9648   $as_echo "$as_me: failed program was:" >&5
9649 sed 's/^/| /' conftest.$ac_ext >&5
9650
9651         ac_cv_lib_pam_pam_start=no
9652 fi
9653
9654 rm -rf conftest.dSYM
9655 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9656       conftest$ac_exeext conftest.$ac_ext
9657 LIBS=$ac_check_lib_save_LIBS
9658 fi
9659 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
9660 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
9661 if test "x$ac_cv_lib_pam_pam_start" = x""yes; then
9662   cat >>confdefs.h <<_ACEOF
9663 #define HAVE_LIBPAM 1
9664 _ACEOF
9665
9666   LIBS="-lpam $LIBS"
9667
9668 else
9669   { { $as_echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
9670 $as_echo "$as_me: error: library 'pam' is required for PAM" >&2;}
9671    { (exit 1); exit 1; }; }
9672 fi
9673
9674 fi
9675
9676 if test "$with_libxml" = yes ; then
9677
9678 { $as_echo "$as_me:$LINENO: checking for xmlSaveToBuffer in -lxml2" >&5
9679 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
9680 if test "${ac_cv_lib_xml2_xmlSaveToBuffer+set}" = set; then
9681   $as_echo_n "(cached) " >&6
9682 else
9683   ac_check_lib_save_LIBS=$LIBS
9684 LIBS="-lxml2  $LIBS"
9685 cat >conftest.$ac_ext <<_ACEOF
9686 /* confdefs.h.  */
9687 _ACEOF
9688 cat confdefs.h >>conftest.$ac_ext
9689 cat >>conftest.$ac_ext <<_ACEOF
9690 /* end confdefs.h.  */
9691
9692 /* Override any GCC internal prototype to avoid an error.
9693    Use char because int might match the return type of a GCC
9694    builtin and then its argument prototype would still apply.  */
9695 #ifdef __cplusplus
9696 extern "C"
9697 #endif
9698 char xmlSaveToBuffer ();
9699 int
9700 main ()
9701 {
9702 return xmlSaveToBuffer ();
9703   ;
9704   return 0;
9705 }
9706 _ACEOF
9707 rm -f conftest.$ac_objext conftest$ac_exeext
9708 if { (ac_try="$ac_link"
9709 case "(($ac_try" in
9710   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9711   *) ac_try_echo=$ac_try;;
9712 esac
9713 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9714 $as_echo "$ac_try_echo") >&5
9715   (eval "$ac_link") 2>conftest.er1
9716   ac_status=$?
9717   grep -v '^ *+' conftest.er1 >conftest.err
9718   rm -f conftest.er1
9719   cat conftest.err >&5
9720   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9721   (exit $ac_status); } && {
9722          test -z "$ac_c_werror_flag" ||
9723          test ! -s conftest.err
9724        } && test -s conftest$ac_exeext && {
9725          test "$cross_compiling" = yes ||
9726          $as_test_x conftest$ac_exeext
9727        }; then
9728   ac_cv_lib_xml2_xmlSaveToBuffer=yes
9729 else
9730   $as_echo "$as_me: failed program was:" >&5
9731 sed 's/^/| /' conftest.$ac_ext >&5
9732
9733         ac_cv_lib_xml2_xmlSaveToBuffer=no
9734 fi
9735
9736 rm -rf conftest.dSYM
9737 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9738       conftest$ac_exeext conftest.$ac_ext
9739 LIBS=$ac_check_lib_save_LIBS
9740 fi
9741 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
9742 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
9743 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = x""yes; then
9744   cat >>confdefs.h <<_ACEOF
9745 #define HAVE_LIBXML2 1
9746 _ACEOF
9747
9748   LIBS="-lxml2 $LIBS"
9749
9750 else
9751   { { $as_echo "$as_me:$LINENO: error: library 'xml2' (version >= 2.6.23) is required for XML support" >&5
9752 $as_echo "$as_me: error: library 'xml2' (version >= 2.6.23) is required for XML support" >&2;}
9753    { (exit 1); exit 1; }; }
9754 fi
9755
9756 fi
9757
9758 if test "$with_libxslt" = yes ; then
9759
9760 { $as_echo "$as_me:$LINENO: checking for xsltCleanupGlobals in -lxslt" >&5
9761 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
9762 if test "${ac_cv_lib_xslt_xsltCleanupGlobals+set}" = set; then
9763   $as_echo_n "(cached) " >&6
9764 else
9765   ac_check_lib_save_LIBS=$LIBS
9766 LIBS="-lxslt  $LIBS"
9767 cat >conftest.$ac_ext <<_ACEOF
9768 /* confdefs.h.  */
9769 _ACEOF
9770 cat confdefs.h >>conftest.$ac_ext
9771 cat >>conftest.$ac_ext <<_ACEOF
9772 /* end confdefs.h.  */
9773
9774 /* Override any GCC internal prototype to avoid an error.
9775    Use char because int might match the return type of a GCC
9776    builtin and then its argument prototype would still apply.  */
9777 #ifdef __cplusplus
9778 extern "C"
9779 #endif
9780 char xsltCleanupGlobals ();
9781 int
9782 main ()
9783 {
9784 return xsltCleanupGlobals ();
9785   ;
9786   return 0;
9787 }
9788 _ACEOF
9789 rm -f conftest.$ac_objext conftest$ac_exeext
9790 if { (ac_try="$ac_link"
9791 case "(($ac_try" in
9792   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9793   *) ac_try_echo=$ac_try;;
9794 esac
9795 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9796 $as_echo "$ac_try_echo") >&5
9797   (eval "$ac_link") 2>conftest.er1
9798   ac_status=$?
9799   grep -v '^ *+' conftest.er1 >conftest.err
9800   rm -f conftest.er1
9801   cat conftest.err >&5
9802   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9803   (exit $ac_status); } && {
9804          test -z "$ac_c_werror_flag" ||
9805          test ! -s conftest.err
9806        } && test -s conftest$ac_exeext && {
9807          test "$cross_compiling" = yes ||
9808          $as_test_x conftest$ac_exeext
9809        }; then
9810   ac_cv_lib_xslt_xsltCleanupGlobals=yes
9811 else
9812   $as_echo "$as_me: failed program was:" >&5
9813 sed 's/^/| /' conftest.$ac_ext >&5
9814
9815         ac_cv_lib_xslt_xsltCleanupGlobals=no
9816 fi
9817
9818 rm -rf conftest.dSYM
9819 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9820       conftest$ac_exeext conftest.$ac_ext
9821 LIBS=$ac_check_lib_save_LIBS
9822 fi
9823 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
9824 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
9825 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = x""yes; then
9826   cat >>confdefs.h <<_ACEOF
9827 #define HAVE_LIBXSLT 1
9828 _ACEOF
9829
9830   LIBS="-lxslt $LIBS"
9831
9832 else
9833   { { $as_echo "$as_me:$LINENO: error: library 'xslt' is required for XSLT support" >&5
9834 $as_echo "$as_me: error: library 'xslt' is required for XSLT support" >&2;}
9835    { (exit 1); exit 1; }; }
9836 fi
9837
9838 fi
9839
9840 # for contrib/sepgsql
9841 if test "$with_selinux" = yes; then
9842
9843 { $as_echo "$as_me:$LINENO: checking for security_compute_create_name in -lselinux" >&5
9844 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
9845 if test "${ac_cv_lib_selinux_security_compute_create_name+set}" = set; then
9846   $as_echo_n "(cached) " >&6
9847 else
9848   ac_check_lib_save_LIBS=$LIBS
9849 LIBS="-lselinux  $LIBS"
9850 cat >conftest.$ac_ext <<_ACEOF
9851 /* confdefs.h.  */
9852 _ACEOF
9853 cat confdefs.h >>conftest.$ac_ext
9854 cat >>conftest.$ac_ext <<_ACEOF
9855 /* end confdefs.h.  */
9856
9857 /* Override any GCC internal prototype to avoid an error.
9858    Use char because int might match the return type of a GCC
9859    builtin and then its argument prototype would still apply.  */
9860 #ifdef __cplusplus
9861 extern "C"
9862 #endif
9863 char security_compute_create_name ();
9864 int
9865 main ()
9866 {
9867 return security_compute_create_name ();
9868   ;
9869   return 0;
9870 }
9871 _ACEOF
9872 rm -f conftest.$ac_objext conftest$ac_exeext
9873 if { (ac_try="$ac_link"
9874 case "(($ac_try" in
9875   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9876   *) ac_try_echo=$ac_try;;
9877 esac
9878 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9879 $as_echo "$ac_try_echo") >&5
9880   (eval "$ac_link") 2>conftest.er1
9881   ac_status=$?
9882   grep -v '^ *+' conftest.er1 >conftest.err
9883   rm -f conftest.er1
9884   cat conftest.err >&5
9885   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9886   (exit $ac_status); } && {
9887          test -z "$ac_c_werror_flag" ||
9888          test ! -s conftest.err
9889        } && test -s conftest$ac_exeext && {
9890          test "$cross_compiling" = yes ||
9891          $as_test_x conftest$ac_exeext
9892        }; then
9893   ac_cv_lib_selinux_security_compute_create_name=yes
9894 else
9895   $as_echo "$as_me: failed program was:" >&5
9896 sed 's/^/| /' conftest.$ac_ext >&5
9897
9898         ac_cv_lib_selinux_security_compute_create_name=no
9899 fi
9900
9901 rm -rf conftest.dSYM
9902 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9903       conftest$ac_exeext conftest.$ac_ext
9904 LIBS=$ac_check_lib_save_LIBS
9905 fi
9906 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
9907 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
9908 if test "x$ac_cv_lib_selinux_security_compute_create_name" = x""yes; then
9909   cat >>confdefs.h <<_ACEOF
9910 #define HAVE_LIBSELINUX 1
9911 _ACEOF
9912
9913   LIBS="-lselinux $LIBS"
9914
9915 else
9916   { { $as_echo "$as_me:$LINENO: error: library 'libselinux', version 2.1.10 or newer, is required for SELinux support" >&5
9917 $as_echo "$as_me: error: library 'libselinux', version 2.1.10 or newer, is required for SELinux support" >&2;}
9918    { (exit 1); exit 1; }; }
9919 fi
9920
9921 fi
9922
9923 # for contrib/uuid-ossp
9924 if test "$with_ossp_uuid" = yes ; then
9925   { $as_echo "$as_me:$LINENO: checking for uuid_export in -lossp-uuid" >&5
9926 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
9927 if test "${ac_cv_lib_ossp_uuid_uuid_export+set}" = set; then
9928   $as_echo_n "(cached) " >&6
9929 else
9930   ac_check_lib_save_LIBS=$LIBS
9931 LIBS="-lossp-uuid  $LIBS"
9932 cat >conftest.$ac_ext <<_ACEOF
9933 /* confdefs.h.  */
9934 _ACEOF
9935 cat confdefs.h >>conftest.$ac_ext
9936 cat >>conftest.$ac_ext <<_ACEOF
9937 /* end confdefs.h.  */
9938
9939 /* Override any GCC internal prototype to avoid an error.
9940    Use char because int might match the return type of a GCC
9941    builtin and then its argument prototype would still apply.  */
9942 #ifdef __cplusplus
9943 extern "C"
9944 #endif
9945 char uuid_export ();
9946 int
9947 main ()
9948 {
9949 return uuid_export ();
9950   ;
9951   return 0;
9952 }
9953 _ACEOF
9954 rm -f conftest.$ac_objext conftest$ac_exeext
9955 if { (ac_try="$ac_link"
9956 case "(($ac_try" in
9957   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9958   *) ac_try_echo=$ac_try;;
9959 esac
9960 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9961 $as_echo "$ac_try_echo") >&5
9962   (eval "$ac_link") 2>conftest.er1
9963   ac_status=$?
9964   grep -v '^ *+' conftest.er1 >conftest.err
9965   rm -f conftest.er1
9966   cat conftest.err >&5
9967   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9968   (exit $ac_status); } && {
9969          test -z "$ac_c_werror_flag" ||
9970          test ! -s conftest.err
9971        } && test -s conftest$ac_exeext && {
9972          test "$cross_compiling" = yes ||
9973          $as_test_x conftest$ac_exeext
9974        }; then
9975   ac_cv_lib_ossp_uuid_uuid_export=yes
9976 else
9977   $as_echo "$as_me: failed program was:" >&5
9978 sed 's/^/| /' conftest.$ac_ext >&5
9979
9980         ac_cv_lib_ossp_uuid_uuid_export=no
9981 fi
9982
9983 rm -rf conftest.dSYM
9984 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9985       conftest$ac_exeext conftest.$ac_ext
9986 LIBS=$ac_check_lib_save_LIBS
9987 fi
9988 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
9989 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
9990 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = x""yes; then
9991   OSSP_UUID_LIBS="-lossp-uuid"
9992 else
9993   { $as_echo "$as_me:$LINENO: checking for uuid_export in -luuid" >&5
9994 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
9995 if test "${ac_cv_lib_uuid_uuid_export+set}" = set; then
9996   $as_echo_n "(cached) " >&6
9997 else
9998   ac_check_lib_save_LIBS=$LIBS
9999 LIBS="-luuid  $LIBS"
10000 cat >conftest.$ac_ext <<_ACEOF
10001 /* confdefs.h.  */
10002 _ACEOF
10003 cat confdefs.h >>conftest.$ac_ext
10004 cat >>conftest.$ac_ext <<_ACEOF
10005 /* end confdefs.h.  */
10006
10007 /* Override any GCC internal prototype to avoid an error.
10008    Use char because int might match the return type of a GCC
10009    builtin and then its argument prototype would still apply.  */
10010 #ifdef __cplusplus
10011 extern "C"
10012 #endif
10013 char uuid_export ();
10014 int
10015 main ()
10016 {
10017 return uuid_export ();
10018   ;
10019   return 0;
10020 }
10021 _ACEOF
10022 rm -f conftest.$ac_objext conftest$ac_exeext
10023 if { (ac_try="$ac_link"
10024 case "(($ac_try" in
10025   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10026   *) ac_try_echo=$ac_try;;
10027 esac
10028 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10029 $as_echo "$ac_try_echo") >&5
10030   (eval "$ac_link") 2>conftest.er1
10031   ac_status=$?
10032   grep -v '^ *+' conftest.er1 >conftest.err
10033   rm -f conftest.er1
10034   cat conftest.err >&5
10035   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10036   (exit $ac_status); } && {
10037          test -z "$ac_c_werror_flag" ||
10038          test ! -s conftest.err
10039        } && test -s conftest$ac_exeext && {
10040          test "$cross_compiling" = yes ||
10041          $as_test_x conftest$ac_exeext
10042        }; then
10043   ac_cv_lib_uuid_uuid_export=yes
10044 else
10045   $as_echo "$as_me: failed program was:" >&5
10046 sed 's/^/| /' conftest.$ac_ext >&5
10047
10048         ac_cv_lib_uuid_uuid_export=no
10049 fi
10050
10051 rm -rf conftest.dSYM
10052 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10053       conftest$ac_exeext conftest.$ac_ext
10054 LIBS=$ac_check_lib_save_LIBS
10055 fi
10056 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_export" >&5
10057 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
10058 if test "x$ac_cv_lib_uuid_uuid_export" = x""yes; then
10059   OSSP_UUID_LIBS="-luuid"
10060 else
10061   { { $as_echo "$as_me:$LINENO: error: library 'ossp-uuid' or 'uuid' is required for OSSP-UUID" >&5
10062 $as_echo "$as_me: error: library 'ossp-uuid' or 'uuid' is required for OSSP-UUID" >&2;}
10063    { (exit 1); exit 1; }; }
10064 fi
10065
10066 fi
10067
10068 fi
10069
10070
10071
10072 ##
10073 ## Header files
10074 ##
10075
10076 { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
10077 $as_echo_n "checking for ANSI C header files... " >&6; }
10078 if test "${ac_cv_header_stdc+set}" = set; then
10079   $as_echo_n "(cached) " >&6
10080 else
10081   cat >conftest.$ac_ext <<_ACEOF
10082 /* confdefs.h.  */
10083 _ACEOF
10084 cat confdefs.h >>conftest.$ac_ext
10085 cat >>conftest.$ac_ext <<_ACEOF
10086 /* end confdefs.h.  */
10087 #include <stdlib.h>
10088 #include <stdarg.h>
10089 #include <string.h>
10090 #include <float.h>
10091
10092 int
10093 main ()
10094 {
10095
10096   ;
10097   return 0;
10098 }
10099 _ACEOF
10100 rm -f conftest.$ac_objext
10101 if { (ac_try="$ac_compile"
10102 case "(($ac_try" in
10103   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10104   *) ac_try_echo=$ac_try;;
10105 esac
10106 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10107 $as_echo "$ac_try_echo") >&5
10108   (eval "$ac_compile") 2>conftest.er1
10109   ac_status=$?
10110   grep -v '^ *+' conftest.er1 >conftest.err
10111   rm -f conftest.er1
10112   cat conftest.err >&5
10113   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10114   (exit $ac_status); } && {
10115          test -z "$ac_c_werror_flag" ||
10116          test ! -s conftest.err
10117        } && test -s conftest.$ac_objext; then
10118   ac_cv_header_stdc=yes
10119 else
10120   $as_echo "$as_me: failed program was:" >&5
10121 sed 's/^/| /' conftest.$ac_ext >&5
10122
10123         ac_cv_header_stdc=no
10124 fi
10125
10126 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10127
10128 if test $ac_cv_header_stdc = yes; then
10129   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10130   cat >conftest.$ac_ext <<_ACEOF
10131 /* confdefs.h.  */
10132 _ACEOF
10133 cat confdefs.h >>conftest.$ac_ext
10134 cat >>conftest.$ac_ext <<_ACEOF
10135 /* end confdefs.h.  */
10136 #include <string.h>
10137
10138 _ACEOF
10139 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10140   $EGREP "memchr" >/dev/null 2>&1; then
10141   :
10142 else
10143   ac_cv_header_stdc=no
10144 fi
10145 rm -f conftest*
10146
10147 fi
10148
10149 if test $ac_cv_header_stdc = yes; then
10150   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10151   cat >conftest.$ac_ext <<_ACEOF
10152 /* confdefs.h.  */
10153 _ACEOF
10154 cat confdefs.h >>conftest.$ac_ext
10155 cat >>conftest.$ac_ext <<_ACEOF
10156 /* end confdefs.h.  */
10157 #include <stdlib.h>
10158
10159 _ACEOF
10160 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10161   $EGREP "free" >/dev/null 2>&1; then
10162   :
10163 else
10164   ac_cv_header_stdc=no
10165 fi
10166 rm -f conftest*
10167
10168 fi
10169
10170 if test $ac_cv_header_stdc = yes; then
10171   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10172   if test "$cross_compiling" = yes; then
10173   :
10174 else
10175   cat >conftest.$ac_ext <<_ACEOF
10176 /* confdefs.h.  */
10177 _ACEOF
10178 cat confdefs.h >>conftest.$ac_ext
10179 cat >>conftest.$ac_ext <<_ACEOF
10180 /* end confdefs.h.  */
10181 #include <ctype.h>
10182 #include <stdlib.h>
10183 #if ((' ' & 0x0FF) == 0x020)
10184 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10185 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10186 #else
10187 # define ISLOWER(c) \
10188                    (('a' <= (c) && (c) <= 'i') \
10189                      || ('j' <= (c) && (c) <= 'r') \
10190                      || ('s' <= (c) && (c) <= 'z'))
10191 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10192 #endif
10193
10194 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10195 int
10196 main ()
10197 {
10198   int i;
10199   for (i = 0; i < 256; i++)
10200     if (XOR (islower (i), ISLOWER (i))
10201         || toupper (i) != TOUPPER (i))
10202       return 2;
10203   return 0;
10204 }
10205 _ACEOF
10206 rm -f conftest$ac_exeext
10207 if { (ac_try="$ac_link"
10208 case "(($ac_try" in
10209   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10210   *) ac_try_echo=$ac_try;;
10211 esac
10212 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10213 $as_echo "$ac_try_echo") >&5
10214   (eval "$ac_link") 2>&5
10215   ac_status=$?
10216   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10217   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10218   { (case "(($ac_try" in
10219   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10220   *) ac_try_echo=$ac_try;;
10221 esac
10222 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10223 $as_echo "$ac_try_echo") >&5
10224   (eval "$ac_try") 2>&5
10225   ac_status=$?
10226   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10227   (exit $ac_status); }; }; then
10228   :
10229 else
10230   $as_echo "$as_me: program exited with status $ac_status" >&5
10231 $as_echo "$as_me: failed program was:" >&5
10232 sed 's/^/| /' conftest.$ac_ext >&5
10233
10234 ( exit $ac_status )
10235 ac_cv_header_stdc=no
10236 fi
10237 rm -rf conftest.dSYM
10238 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10239 fi
10240
10241
10242 fi
10243 fi
10244 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
10245 $as_echo "$ac_cv_header_stdc" >&6; }
10246 if test $ac_cv_header_stdc = yes; then
10247
10248 cat >>confdefs.h <<\_ACEOF
10249 #define STDC_HEADERS 1
10250 _ACEOF
10251
10252 fi
10253
10254 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10265                   inttypes.h stdint.h unistd.h
10266 do
10267 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10268 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10269 $as_echo_n "checking for $ac_header... " >&6; }
10270 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10271   $as_echo_n "(cached) " >&6
10272 else
10273   cat >conftest.$ac_ext <<_ACEOF
10274 /* confdefs.h.  */
10275 _ACEOF
10276 cat confdefs.h >>conftest.$ac_ext
10277 cat >>conftest.$ac_ext <<_ACEOF
10278 /* end confdefs.h.  */
10279 $ac_includes_default
10280
10281 #include <$ac_header>
10282 _ACEOF
10283 rm -f conftest.$ac_objext
10284 if { (ac_try="$ac_compile"
10285 case "(($ac_try" in
10286   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10287   *) ac_try_echo=$ac_try;;
10288 esac
10289 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10290 $as_echo "$ac_try_echo") >&5
10291   (eval "$ac_compile") 2>conftest.er1
10292   ac_status=$?
10293   grep -v '^ *+' conftest.er1 >conftest.err
10294   rm -f conftest.er1
10295   cat conftest.err >&5
10296   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10297   (exit $ac_status); } && {
10298          test -z "$ac_c_werror_flag" ||
10299          test ! -s conftest.err
10300        } && test -s conftest.$ac_objext; then
10301   eval "$as_ac_Header=yes"
10302 else
10303   $as_echo "$as_me: failed program was:" >&5
10304 sed 's/^/| /' conftest.$ac_ext >&5
10305
10306         eval "$as_ac_Header=no"
10307 fi
10308
10309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10310 fi
10311 ac_res=`eval 'as_val=${'$as_ac_Header'}
10312                  $as_echo "$as_val"'`
10313                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10314 $as_echo "$ac_res" >&6; }
10315 as_val=`eval 'as_val=${'$as_ac_Header'}
10316                  $as_echo "$as_val"'`
10317    if test "x$as_val" = x""yes; then
10318   cat >>confdefs.h <<_ACEOF
10319 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10320 _ACEOF
10321
10322 fi
10323
10324 done
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355 for ac_header in crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h poll.h pwd.h sys/ioctl.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/socket.h sys/sockio.h sys/tas.h sys/time.h sys/ucred.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
10356 do
10357 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10358 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10359   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10360 $as_echo_n "checking for $ac_header... " >&6; }
10361 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10362   $as_echo_n "(cached) " >&6
10363 fi
10364 ac_res=`eval 'as_val=${'$as_ac_Header'}
10365                  $as_echo "$as_val"'`
10366                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10367 $as_echo "$ac_res" >&6; }
10368 else
10369   # Is the header compilable?
10370 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
10371 $as_echo_n "checking $ac_header usability... " >&6; }
10372 cat >conftest.$ac_ext <<_ACEOF
10373 /* confdefs.h.  */
10374 _ACEOF
10375 cat confdefs.h >>conftest.$ac_ext
10376 cat >>conftest.$ac_ext <<_ACEOF
10377 /* end confdefs.h.  */
10378 $ac_includes_default
10379 #include <$ac_header>
10380 _ACEOF
10381 rm -f conftest.$ac_objext
10382 if { (ac_try="$ac_compile"
10383 case "(($ac_try" in
10384   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10385   *) ac_try_echo=$ac_try;;
10386 esac
10387 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10388 $as_echo "$ac_try_echo") >&5
10389   (eval "$ac_compile") 2>conftest.er1
10390   ac_status=$?
10391   grep -v '^ *+' conftest.er1 >conftest.err
10392   rm -f conftest.er1
10393   cat conftest.err >&5
10394   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10395   (exit $ac_status); } && {
10396          test -z "$ac_c_werror_flag" ||
10397          test ! -s conftest.err
10398        } && test -s conftest.$ac_objext; then
10399   ac_header_compiler=yes
10400 else
10401   $as_echo "$as_me: failed program was:" >&5
10402 sed 's/^/| /' conftest.$ac_ext >&5
10403
10404         ac_header_compiler=no
10405 fi
10406
10407 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10408 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10409 $as_echo "$ac_header_compiler" >&6; }
10410
10411 # Is the header present?
10412 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
10413 $as_echo_n "checking $ac_header presence... " >&6; }
10414 cat >conftest.$ac_ext <<_ACEOF
10415 /* confdefs.h.  */
10416 _ACEOF
10417 cat confdefs.h >>conftest.$ac_ext
10418 cat >>conftest.$ac_ext <<_ACEOF
10419 /* end confdefs.h.  */
10420 #include <$ac_header>
10421 _ACEOF
10422 if { (ac_try="$ac_cpp conftest.$ac_ext"
10423 case "(($ac_try" in
10424   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10425   *) ac_try_echo=$ac_try;;
10426 esac
10427 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10428 $as_echo "$ac_try_echo") >&5
10429   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10430   ac_status=$?
10431   grep -v '^ *+' conftest.er1 >conftest.err
10432   rm -f conftest.er1
10433   cat conftest.err >&5
10434   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10435   (exit $ac_status); } >/dev/null && {
10436          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10437          test ! -s conftest.err
10438        }; then
10439   ac_header_preproc=yes
10440 else
10441   $as_echo "$as_me: failed program was:" >&5
10442 sed 's/^/| /' conftest.$ac_ext >&5
10443
10444   ac_header_preproc=no
10445 fi
10446
10447 rm -f conftest.err conftest.$ac_ext
10448 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10449 $as_echo "$ac_header_preproc" >&6; }
10450
10451 # So?  What about this header?
10452 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10453   yes:no: )
10454     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10455 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10456     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10457 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10458     ac_header_preproc=yes
10459     ;;
10460   no:yes:* )
10461     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10462 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10463     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10464 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10465     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10466 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10467     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10468 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10469     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10470 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10471     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10472 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10473     ( cat <<\_ASBOX
10474 ## ---------------------------------------- ##
10475 ## Report this to pgsql-bugs@postgresql.org ##
10476 ## ---------------------------------------- ##
10477 _ASBOX
10478      ) | sed "s/^/$as_me: WARNING:     /" >&2
10479     ;;
10480 esac
10481 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10482 $as_echo_n "checking for $ac_header... " >&6; }
10483 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10484   $as_echo_n "(cached) " >&6
10485 else
10486   eval "$as_ac_Header=\$ac_header_preproc"
10487 fi
10488 ac_res=`eval 'as_val=${'$as_ac_Header'}
10489                  $as_echo "$as_val"'`
10490                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10491 $as_echo "$ac_res" >&6; }
10492
10493 fi
10494 as_val=`eval 'as_val=${'$as_ac_Header'}
10495                  $as_echo "$as_val"'`
10496    if test "x$as_val" = x""yes; then
10497   cat >>confdefs.h <<_ACEOF
10498 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10499 _ACEOF
10500
10501 fi
10502
10503 done
10504
10505
10506 # On BSD, cpp test for net/if.h will fail unless sys/socket.h
10507 # is included first.
10508
10509 for ac_header in net/if.h
10510 do
10511 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10512 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10513 $as_echo_n "checking for $ac_header... " >&6; }
10514 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10515   $as_echo_n "(cached) " >&6
10516 else
10517   cat >conftest.$ac_ext <<_ACEOF
10518 /* confdefs.h.  */
10519 _ACEOF
10520 cat confdefs.h >>conftest.$ac_ext
10521 cat >>conftest.$ac_ext <<_ACEOF
10522 /* end confdefs.h.  */
10523 $ac_includes_default
10524 #ifdef HAVE_SYS_SOCKET_H
10525 #include <sys/socket.h>
10526 #endif
10527
10528
10529 #include <$ac_header>
10530 _ACEOF
10531 rm -f conftest.$ac_objext
10532 if { (ac_try="$ac_compile"
10533 case "(($ac_try" in
10534   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10535   *) ac_try_echo=$ac_try;;
10536 esac
10537 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10538 $as_echo "$ac_try_echo") >&5
10539   (eval "$ac_compile") 2>conftest.er1
10540   ac_status=$?
10541   grep -v '^ *+' conftest.er1 >conftest.err
10542   rm -f conftest.er1
10543   cat conftest.err >&5
10544   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10545   (exit $ac_status); } && {
10546          test -z "$ac_c_werror_flag" ||
10547          test ! -s conftest.err
10548        } && test -s conftest.$ac_objext; then
10549   eval "$as_ac_Header=yes"
10550 else
10551   $as_echo "$as_me: failed program was:" >&5
10552 sed 's/^/| /' conftest.$ac_ext >&5
10553
10554         eval "$as_ac_Header=no"
10555 fi
10556
10557 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10558 fi
10559 ac_res=`eval 'as_val=${'$as_ac_Header'}
10560                  $as_echo "$as_val"'`
10561                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10562 $as_echo "$ac_res" >&6; }
10563 as_val=`eval 'as_val=${'$as_ac_Header'}
10564                  $as_echo "$as_val"'`
10565    if test "x$as_val" = x""yes; then
10566   cat >>confdefs.h <<_ACEOF
10567 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10568 _ACEOF
10569
10570 fi
10571
10572 done
10573
10574
10575 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
10576 # netinet/in.h is included first.
10577
10578 for ac_header in netinet/in.h
10579 do
10580 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10581 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10582   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10583 $as_echo_n "checking for $ac_header... " >&6; }
10584 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10585   $as_echo_n "(cached) " >&6
10586 fi
10587 ac_res=`eval 'as_val=${'$as_ac_Header'}
10588                  $as_echo "$as_val"'`
10589                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10590 $as_echo "$ac_res" >&6; }
10591 else
10592   # Is the header compilable?
10593 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
10594 $as_echo_n "checking $ac_header usability... " >&6; }
10595 cat >conftest.$ac_ext <<_ACEOF
10596 /* confdefs.h.  */
10597 _ACEOF
10598 cat confdefs.h >>conftest.$ac_ext
10599 cat >>conftest.$ac_ext <<_ACEOF
10600 /* end confdefs.h.  */
10601 $ac_includes_default
10602 #include <$ac_header>
10603 _ACEOF
10604 rm -f conftest.$ac_objext
10605 if { (ac_try="$ac_compile"
10606 case "(($ac_try" in
10607   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10608   *) ac_try_echo=$ac_try;;
10609 esac
10610 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10611 $as_echo "$ac_try_echo") >&5
10612   (eval "$ac_compile") 2>conftest.er1
10613   ac_status=$?
10614   grep -v '^ *+' conftest.er1 >conftest.err
10615   rm -f conftest.er1
10616   cat conftest.err >&5
10617   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10618   (exit $ac_status); } && {
10619          test -z "$ac_c_werror_flag" ||
10620          test ! -s conftest.err
10621        } && test -s conftest.$ac_objext; then
10622   ac_header_compiler=yes
10623 else
10624   $as_echo "$as_me: failed program was:" >&5
10625 sed 's/^/| /' conftest.$ac_ext >&5
10626
10627         ac_header_compiler=no
10628 fi
10629
10630 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10631 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10632 $as_echo "$ac_header_compiler" >&6; }
10633
10634 # Is the header present?
10635 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
10636 $as_echo_n "checking $ac_header presence... " >&6; }
10637 cat >conftest.$ac_ext <<_ACEOF
10638 /* confdefs.h.  */
10639 _ACEOF
10640 cat confdefs.h >>conftest.$ac_ext
10641 cat >>conftest.$ac_ext <<_ACEOF
10642 /* end confdefs.h.  */
10643 #include <$ac_header>
10644 _ACEOF
10645 if { (ac_try="$ac_cpp conftest.$ac_ext"
10646 case "(($ac_try" in
10647   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10648   *) ac_try_echo=$ac_try;;
10649 esac
10650 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10651 $as_echo "$ac_try_echo") >&5
10652   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10653   ac_status=$?
10654   grep -v '^ *+' conftest.er1 >conftest.err
10655   rm -f conftest.er1
10656   cat conftest.err >&5
10657   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10658   (exit $ac_status); } >/dev/null && {
10659          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10660          test ! -s conftest.err
10661        }; then
10662   ac_header_preproc=yes
10663 else
10664   $as_echo "$as_me: failed program was:" >&5
10665 sed 's/^/| /' conftest.$ac_ext >&5
10666
10667   ac_header_preproc=no
10668 fi
10669
10670 rm -f conftest.err conftest.$ac_ext
10671 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10672 $as_echo "$ac_header_preproc" >&6; }
10673
10674 # So?  What about this header?
10675 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10676   yes:no: )
10677     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10678 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10679     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10680 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10681     ac_header_preproc=yes
10682     ;;
10683   no:yes:* )
10684     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10685 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10686     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10687 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10688     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10689 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10690     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10691 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10692     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10693 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10694     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10695 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10696     ( cat <<\_ASBOX
10697 ## ---------------------------------------- ##
10698 ## Report this to pgsql-bugs@postgresql.org ##
10699 ## ---------------------------------------- ##
10700 _ASBOX
10701      ) | sed "s/^/$as_me: WARNING:     /" >&2
10702     ;;
10703 esac
10704 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10705 $as_echo_n "checking for $ac_header... " >&6; }
10706 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10707   $as_echo_n "(cached) " >&6
10708 else
10709   eval "$as_ac_Header=\$ac_header_preproc"
10710 fi
10711 ac_res=`eval 'as_val=${'$as_ac_Header'}
10712                  $as_echo "$as_val"'`
10713                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10714 $as_echo "$ac_res" >&6; }
10715
10716 fi
10717 as_val=`eval 'as_val=${'$as_ac_Header'}
10718                  $as_echo "$as_val"'`
10719    if test "x$as_val" = x""yes; then
10720   cat >>confdefs.h <<_ACEOF
10721 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10722 _ACEOF
10723
10724 fi
10725
10726 done
10727
10728
10729 for ac_header in netinet/tcp.h
10730 do
10731 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10732 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10733 $as_echo_n "checking for $ac_header... " >&6; }
10734 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10735   $as_echo_n "(cached) " >&6
10736 else
10737   cat >conftest.$ac_ext <<_ACEOF
10738 /* confdefs.h.  */
10739 _ACEOF
10740 cat confdefs.h >>conftest.$ac_ext
10741 cat >>conftest.$ac_ext <<_ACEOF
10742 /* end confdefs.h.  */
10743 $ac_includes_default
10744 #ifdef HAVE_NETINET_IN_H
10745 #include <netinet/in.h>
10746 #endif
10747
10748
10749 #include <$ac_header>
10750 _ACEOF
10751 rm -f conftest.$ac_objext
10752 if { (ac_try="$ac_compile"
10753 case "(($ac_try" in
10754   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10755   *) ac_try_echo=$ac_try;;
10756 esac
10757 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10758 $as_echo "$ac_try_echo") >&5
10759   (eval "$ac_compile") 2>conftest.er1
10760   ac_status=$?
10761   grep -v '^ *+' conftest.er1 >conftest.err
10762   rm -f conftest.er1
10763   cat conftest.err >&5
10764   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10765   (exit $ac_status); } && {
10766          test -z "$ac_c_werror_flag" ||
10767          test ! -s conftest.err
10768        } && test -s conftest.$ac_objext; then
10769   eval "$as_ac_Header=yes"
10770 else
10771   $as_echo "$as_me: failed program was:" >&5
10772 sed 's/^/| /' conftest.$ac_ext >&5
10773
10774         eval "$as_ac_Header=no"
10775 fi
10776
10777 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10778 fi
10779 ac_res=`eval 'as_val=${'$as_ac_Header'}
10780                  $as_echo "$as_val"'`
10781                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10782 $as_echo "$ac_res" >&6; }
10783 as_val=`eval 'as_val=${'$as_ac_Header'}
10784                  $as_echo "$as_val"'`
10785    if test "x$as_val" = x""yes; then
10786   cat >>confdefs.h <<_ACEOF
10787 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10788 _ACEOF
10789
10790 fi
10791
10792 done
10793
10794
10795 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
10796
10797 for ac_header in readline/readline.h
10798 do
10799 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10800 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10801   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10802 $as_echo_n "checking for $ac_header... " >&6; }
10803 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10804   $as_echo_n "(cached) " >&6
10805 fi
10806 ac_res=`eval 'as_val=${'$as_ac_Header'}
10807                  $as_echo "$as_val"'`
10808                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10809 $as_echo "$ac_res" >&6; }
10810 else
10811   # Is the header compilable?
10812 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
10813 $as_echo_n "checking $ac_header usability... " >&6; }
10814 cat >conftest.$ac_ext <<_ACEOF
10815 /* confdefs.h.  */
10816 _ACEOF
10817 cat confdefs.h >>conftest.$ac_ext
10818 cat >>conftest.$ac_ext <<_ACEOF
10819 /* end confdefs.h.  */
10820 $ac_includes_default
10821 #include <$ac_header>
10822 _ACEOF
10823 rm -f conftest.$ac_objext
10824 if { (ac_try="$ac_compile"
10825 case "(($ac_try" in
10826   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10827   *) ac_try_echo=$ac_try;;
10828 esac
10829 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10830 $as_echo "$ac_try_echo") >&5
10831   (eval "$ac_compile") 2>conftest.er1
10832   ac_status=$?
10833   grep -v '^ *+' conftest.er1 >conftest.err
10834   rm -f conftest.er1
10835   cat conftest.err >&5
10836   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10837   (exit $ac_status); } && {
10838          test -z "$ac_c_werror_flag" ||
10839          test ! -s conftest.err
10840        } && test -s conftest.$ac_objext; then
10841   ac_header_compiler=yes
10842 else
10843   $as_echo "$as_me: failed program was:" >&5
10844 sed 's/^/| /' conftest.$ac_ext >&5
10845
10846         ac_header_compiler=no
10847 fi
10848
10849 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10850 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10851 $as_echo "$ac_header_compiler" >&6; }
10852
10853 # Is the header present?
10854 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
10855 $as_echo_n "checking $ac_header presence... " >&6; }
10856 cat >conftest.$ac_ext <<_ACEOF
10857 /* confdefs.h.  */
10858 _ACEOF
10859 cat confdefs.h >>conftest.$ac_ext
10860 cat >>conftest.$ac_ext <<_ACEOF
10861 /* end confdefs.h.  */
10862 #include <$ac_header>
10863 _ACEOF
10864 if { (ac_try="$ac_cpp conftest.$ac_ext"
10865 case "(($ac_try" in
10866   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10867   *) ac_try_echo=$ac_try;;
10868 esac
10869 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10870 $as_echo "$ac_try_echo") >&5
10871   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10872   ac_status=$?
10873   grep -v '^ *+' conftest.er1 >conftest.err
10874   rm -f conftest.er1
10875   cat conftest.err >&5
10876   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10877   (exit $ac_status); } >/dev/null && {
10878          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10879          test ! -s conftest.err
10880        }; then
10881   ac_header_preproc=yes
10882 else
10883   $as_echo "$as_me: failed program was:" >&5
10884 sed 's/^/| /' conftest.$ac_ext >&5
10885
10886   ac_header_preproc=no
10887 fi
10888
10889 rm -f conftest.err conftest.$ac_ext
10890 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10891 $as_echo "$ac_header_preproc" >&6; }
10892
10893 # So?  What about this header?
10894 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10895   yes:no: )
10896     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10897 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10898     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10899 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10900     ac_header_preproc=yes
10901     ;;
10902   no:yes:* )
10903     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10904 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10905     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10906 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10907     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10908 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10909     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10910 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10911     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10912 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10913     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10914 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10915     ( cat <<\_ASBOX
10916 ## ---------------------------------------- ##
10917 ## Report this to pgsql-bugs@postgresql.org ##
10918 ## ---------------------------------------- ##
10919 _ASBOX
10920      ) | sed "s/^/$as_me: WARNING:     /" >&2
10921     ;;
10922 esac
10923 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10924 $as_echo_n "checking for $ac_header... " >&6; }
10925 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10926   $as_echo_n "(cached) " >&6
10927 else
10928   eval "$as_ac_Header=\$ac_header_preproc"
10929 fi
10930 ac_res=`eval 'as_val=${'$as_ac_Header'}
10931                  $as_echo "$as_val"'`
10932                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10933 $as_echo "$ac_res" >&6; }
10934
10935 fi
10936 as_val=`eval 'as_val=${'$as_ac_Header'}
10937                  $as_echo "$as_val"'`
10938    if test "x$as_val" = x""yes; then
10939   cat >>confdefs.h <<_ACEOF
10940 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10941 _ACEOF
10942
10943 else
10944
10945 for ac_header in readline.h
10946 do
10947 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10948 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10949   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10950 $as_echo_n "checking for $ac_header... " >&6; }
10951 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10952   $as_echo_n "(cached) " >&6
10953 fi
10954 ac_res=`eval 'as_val=${'$as_ac_Header'}
10955                  $as_echo "$as_val"'`
10956                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10957 $as_echo "$ac_res" >&6; }
10958 else
10959   # Is the header compilable?
10960 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
10961 $as_echo_n "checking $ac_header usability... " >&6; }
10962 cat >conftest.$ac_ext <<_ACEOF
10963 /* confdefs.h.  */
10964 _ACEOF
10965 cat confdefs.h >>conftest.$ac_ext
10966 cat >>conftest.$ac_ext <<_ACEOF
10967 /* end confdefs.h.  */
10968 $ac_includes_default
10969 #include <$ac_header>
10970 _ACEOF
10971 rm -f conftest.$ac_objext
10972 if { (ac_try="$ac_compile"
10973 case "(($ac_try" in
10974   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10975   *) ac_try_echo=$ac_try;;
10976 esac
10977 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10978 $as_echo "$ac_try_echo") >&5
10979   (eval "$ac_compile") 2>conftest.er1
10980   ac_status=$?
10981   grep -v '^ *+' conftest.er1 >conftest.err
10982   rm -f conftest.er1
10983   cat conftest.err >&5
10984   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10985   (exit $ac_status); } && {
10986          test -z "$ac_c_werror_flag" ||
10987          test ! -s conftest.err
10988        } && test -s conftest.$ac_objext; then
10989   ac_header_compiler=yes
10990 else
10991   $as_echo "$as_me: failed program was:" >&5
10992 sed 's/^/| /' conftest.$ac_ext >&5
10993
10994         ac_header_compiler=no
10995 fi
10996
10997 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10998 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10999 $as_echo "$ac_header_compiler" >&6; }
11000
11001 # Is the header present?
11002 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11003 $as_echo_n "checking $ac_header presence... " >&6; }
11004 cat >conftest.$ac_ext <<_ACEOF
11005 /* confdefs.h.  */
11006 _ACEOF
11007 cat confdefs.h >>conftest.$ac_ext
11008 cat >>conftest.$ac_ext <<_ACEOF
11009 /* end confdefs.h.  */
11010 #include <$ac_header>
11011 _ACEOF
11012 if { (ac_try="$ac_cpp conftest.$ac_ext"
11013 case "(($ac_try" in
11014   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11015   *) ac_try_echo=$ac_try;;
11016 esac
11017 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11018 $as_echo "$ac_try_echo") >&5
11019   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11020   ac_status=$?
11021   grep -v '^ *+' conftest.er1 >conftest.err
11022   rm -f conftest.er1
11023   cat conftest.err >&5
11024   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11025   (exit $ac_status); } >/dev/null && {
11026          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11027          test ! -s conftest.err
11028        }; then
11029   ac_header_preproc=yes
11030 else
11031   $as_echo "$as_me: failed program was:" >&5
11032 sed 's/^/| /' conftest.$ac_ext >&5
11033
11034   ac_header_preproc=no
11035 fi
11036
11037 rm -f conftest.err conftest.$ac_ext
11038 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11039 $as_echo "$ac_header_preproc" >&6; }
11040
11041 # So?  What about this header?
11042 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11043   yes:no: )
11044     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11045 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11046     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11047 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11048     ac_header_preproc=yes
11049     ;;
11050   no:yes:* )
11051     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11052 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11053     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11054 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11055     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11056 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11057     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11058 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11059     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11060 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11061     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11062 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11063     ( cat <<\_ASBOX
11064 ## ---------------------------------------- ##
11065 ## Report this to pgsql-bugs@postgresql.org ##
11066 ## ---------------------------------------- ##
11067 _ASBOX
11068      ) | sed "s/^/$as_me: WARNING:     /" >&2
11069     ;;
11070 esac
11071 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11072 $as_echo_n "checking for $ac_header... " >&6; }
11073 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11074   $as_echo_n "(cached) " >&6
11075 else
11076   eval "$as_ac_Header=\$ac_header_preproc"
11077 fi
11078 ac_res=`eval 'as_val=${'$as_ac_Header'}
11079                  $as_echo "$as_val"'`
11080                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11081 $as_echo "$ac_res" >&6; }
11082
11083 fi
11084 as_val=`eval 'as_val=${'$as_ac_Header'}
11085                  $as_echo "$as_val"'`
11086    if test "x$as_val" = x""yes; then
11087   cat >>confdefs.h <<_ACEOF
11088 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11089 _ACEOF
11090
11091 else
11092   { { $as_echo "$as_me:$LINENO: error: readline header not found
11093 If you have readline already installed, see config.log for details on the
11094 failure.  It is possible the compiler isn't looking in the proper directory.
11095 Use --without-readline to disable readline support." >&5
11096 $as_echo "$as_me: error: readline header not found
11097 If you have readline already installed, see config.log for details on the
11098 failure.  It is possible the compiler isn't looking in the proper directory.
11099 Use --without-readline to disable readline support." >&2;}
11100    { (exit 1); exit 1; }; }
11101 fi
11102
11103 done
11104
11105 fi
11106
11107 done
11108
11109
11110 for ac_header in readline/history.h
11111 do
11112 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11113 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11114   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11115 $as_echo_n "checking for $ac_header... " >&6; }
11116 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11117   $as_echo_n "(cached) " >&6
11118 fi
11119 ac_res=`eval 'as_val=${'$as_ac_Header'}
11120                  $as_echo "$as_val"'`
11121                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11122 $as_echo "$ac_res" >&6; }
11123 else
11124   # Is the header compilable?
11125 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
11126 $as_echo_n "checking $ac_header usability... " >&6; }
11127 cat >conftest.$ac_ext <<_ACEOF
11128 /* confdefs.h.  */
11129 _ACEOF
11130 cat confdefs.h >>conftest.$ac_ext
11131 cat >>conftest.$ac_ext <<_ACEOF
11132 /* end confdefs.h.  */
11133 $ac_includes_default
11134 #include <$ac_header>
11135 _ACEOF
11136 rm -f conftest.$ac_objext
11137 if { (ac_try="$ac_compile"
11138 case "(($ac_try" in
11139   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11140   *) ac_try_echo=$ac_try;;
11141 esac
11142 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11143 $as_echo "$ac_try_echo") >&5
11144   (eval "$ac_compile") 2>conftest.er1
11145   ac_status=$?
11146   grep -v '^ *+' conftest.er1 >conftest.err
11147   rm -f conftest.er1
11148   cat conftest.err >&5
11149   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11150   (exit $ac_status); } && {
11151          test -z "$ac_c_werror_flag" ||
11152          test ! -s conftest.err
11153        } && test -s conftest.$ac_objext; then
11154   ac_header_compiler=yes
11155 else
11156   $as_echo "$as_me: failed program was:" >&5
11157 sed 's/^/| /' conftest.$ac_ext >&5
11158
11159         ac_header_compiler=no
11160 fi
11161
11162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11163 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11164 $as_echo "$ac_header_compiler" >&6; }
11165
11166 # Is the header present?
11167 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11168 $as_echo_n "checking $ac_header presence... " >&6; }
11169 cat >conftest.$ac_ext <<_ACEOF
11170 /* confdefs.h.  */
11171 _ACEOF
11172 cat confdefs.h >>conftest.$ac_ext
11173 cat >>conftest.$ac_ext <<_ACEOF
11174 /* end confdefs.h.  */
11175 #include <$ac_header>
11176 _ACEOF
11177 if { (ac_try="$ac_cpp conftest.$ac_ext"
11178 case "(($ac_try" in
11179   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11180   *) ac_try_echo=$ac_try;;
11181 esac
11182 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11183 $as_echo "$ac_try_echo") >&5
11184   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11185   ac_status=$?
11186   grep -v '^ *+' conftest.er1 >conftest.err
11187   rm -f conftest.er1
11188   cat conftest.err >&5
11189   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11190   (exit $ac_status); } >/dev/null && {
11191          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11192          test ! -s conftest.err
11193        }; then
11194   ac_header_preproc=yes
11195 else
11196   $as_echo "$as_me: failed program was:" >&5
11197 sed 's/^/| /' conftest.$ac_ext >&5
11198
11199   ac_header_preproc=no
11200 fi
11201
11202 rm -f conftest.err conftest.$ac_ext
11203 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11204 $as_echo "$ac_header_preproc" >&6; }
11205
11206 # So?  What about this header?
11207 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11208   yes:no: )
11209     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11210 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11211     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11212 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11213     ac_header_preproc=yes
11214     ;;
11215   no:yes:* )
11216     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11217 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11218     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11219 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11220     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11221 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11222     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11223 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11224     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11225 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11226     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11227 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11228     ( cat <<\_ASBOX
11229 ## ---------------------------------------- ##
11230 ## Report this to pgsql-bugs@postgresql.org ##
11231 ## ---------------------------------------- ##
11232 _ASBOX
11233      ) | sed "s/^/$as_me: WARNING:     /" >&2
11234     ;;
11235 esac
11236 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11237 $as_echo_n "checking for $ac_header... " >&6; }
11238 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11239   $as_echo_n "(cached) " >&6
11240 else
11241   eval "$as_ac_Header=\$ac_header_preproc"
11242 fi
11243 ac_res=`eval 'as_val=${'$as_ac_Header'}
11244                  $as_echo "$as_val"'`
11245                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11246 $as_echo "$ac_res" >&6; }
11247
11248 fi
11249 as_val=`eval 'as_val=${'$as_ac_Header'}
11250                  $as_echo "$as_val"'`
11251    if test "x$as_val" = x""yes; then
11252   cat >>confdefs.h <<_ACEOF
11253 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11254 _ACEOF
11255
11256 else
11257
11258 for ac_header in history.h
11259 do
11260 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11261 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11262   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11263 $as_echo_n "checking for $ac_header... " >&6; }
11264 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11265   $as_echo_n "(cached) " >&6
11266 fi
11267 ac_res=`eval 'as_val=${'$as_ac_Header'}
11268                  $as_echo "$as_val"'`
11269                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11270 $as_echo "$ac_res" >&6; }
11271 else
11272   # Is the header compilable?
11273 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
11274 $as_echo_n "checking $ac_header usability... " >&6; }
11275 cat >conftest.$ac_ext <<_ACEOF
11276 /* confdefs.h.  */
11277 _ACEOF
11278 cat confdefs.h >>conftest.$ac_ext
11279 cat >>conftest.$ac_ext <<_ACEOF
11280 /* end confdefs.h.  */
11281 $ac_includes_default
11282 #include <$ac_header>
11283 _ACEOF
11284 rm -f conftest.$ac_objext
11285 if { (ac_try="$ac_compile"
11286 case "(($ac_try" in
11287   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11288   *) ac_try_echo=$ac_try;;
11289 esac
11290 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11291 $as_echo "$ac_try_echo") >&5
11292   (eval "$ac_compile") 2>conftest.er1
11293   ac_status=$?
11294   grep -v '^ *+' conftest.er1 >conftest.err
11295   rm -f conftest.er1
11296   cat conftest.err >&5
11297   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11298   (exit $ac_status); } && {
11299          test -z "$ac_c_werror_flag" ||
11300          test ! -s conftest.err
11301        } && test -s conftest.$ac_objext; then
11302   ac_header_compiler=yes
11303 else
11304   $as_echo "$as_me: failed program was:" >&5
11305 sed 's/^/| /' conftest.$ac_ext >&5
11306
11307         ac_header_compiler=no
11308 fi
11309
11310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11311 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11312 $as_echo "$ac_header_compiler" >&6; }
11313
11314 # Is the header present?
11315 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11316 $as_echo_n "checking $ac_header presence... " >&6; }
11317 cat >conftest.$ac_ext <<_ACEOF
11318 /* confdefs.h.  */
11319 _ACEOF
11320 cat confdefs.h >>conftest.$ac_ext
11321 cat >>conftest.$ac_ext <<_ACEOF
11322 /* end confdefs.h.  */
11323 #include <$ac_header>
11324 _ACEOF
11325 if { (ac_try="$ac_cpp conftest.$ac_ext"
11326 case "(($ac_try" in
11327   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11328   *) ac_try_echo=$ac_try;;
11329 esac
11330 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11331 $as_echo "$ac_try_echo") >&5
11332   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11333   ac_status=$?
11334   grep -v '^ *+' conftest.er1 >conftest.err
11335   rm -f conftest.er1
11336   cat conftest.err >&5
11337   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11338   (exit $ac_status); } >/dev/null && {
11339          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11340          test ! -s conftest.err
11341        }; then
11342   ac_header_preproc=yes
11343 else
11344   $as_echo "$as_me: failed program was:" >&5
11345 sed 's/^/| /' conftest.$ac_ext >&5
11346
11347   ac_header_preproc=no
11348 fi
11349
11350 rm -f conftest.err conftest.$ac_ext
11351 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11352 $as_echo "$ac_header_preproc" >&6; }
11353
11354 # So?  What about this header?
11355 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11356   yes:no: )
11357     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11358 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11359     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11360 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11361     ac_header_preproc=yes
11362     ;;
11363   no:yes:* )
11364     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11365 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11366     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11367 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11368     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11369 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11370     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11371 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11372     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11373 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11374     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11375 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11376     ( cat <<\_ASBOX
11377 ## ---------------------------------------- ##
11378 ## Report this to pgsql-bugs@postgresql.org ##
11379 ## ---------------------------------------- ##
11380 _ASBOX
11381      ) | sed "s/^/$as_me: WARNING:     /" >&2
11382     ;;
11383 esac
11384 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11385 $as_echo_n "checking for $ac_header... " >&6; }
11386 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11387   $as_echo_n "(cached) " >&6
11388 else
11389   eval "$as_ac_Header=\$ac_header_preproc"
11390 fi
11391 ac_res=`eval 'as_val=${'$as_ac_Header'}
11392                  $as_echo "$as_val"'`
11393                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11394 $as_echo "$ac_res" >&6; }
11395
11396 fi
11397 as_val=`eval 'as_val=${'$as_ac_Header'}
11398                  $as_echo "$as_val"'`
11399    if test "x$as_val" = x""yes; then
11400   cat >>confdefs.h <<_ACEOF
11401 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11402 _ACEOF
11403
11404 else
11405   { { $as_echo "$as_me:$LINENO: error: history header not found
11406 If you have readline already installed, see config.log for details on the
11407 failure.  It is possible the compiler isn't looking in the proper directory.
11408 Use --without-readline to disable readline support." >&5
11409 $as_echo "$as_me: error: history header not found
11410 If you have readline already installed, see config.log for details on the
11411 failure.  It is possible the compiler isn't looking in the proper directory.
11412 Use --without-readline to disable readline support." >&2;}
11413    { (exit 1); exit 1; }; }
11414 fi
11415
11416 done
11417
11418 fi
11419
11420 done
11421
11422 fi
11423
11424 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
11425 # Some installations of libedit usurp /usr/include/readline/, which seems
11426 # bad practice, since in combined installations readline will have its headers
11427 # there.  We might have to resort to AC_EGREP checks to make sure we found
11428 # the proper header...
11429
11430 for ac_header in editline/readline.h
11431 do
11432 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11433 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11434   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11435 $as_echo_n "checking for $ac_header... " >&6; }
11436 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11437   $as_echo_n "(cached) " >&6
11438 fi
11439 ac_res=`eval 'as_val=${'$as_ac_Header'}
11440                  $as_echo "$as_val"'`
11441                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11442 $as_echo "$ac_res" >&6; }
11443 else
11444   # Is the header compilable?
11445 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
11446 $as_echo_n "checking $ac_header usability... " >&6; }
11447 cat >conftest.$ac_ext <<_ACEOF
11448 /* confdefs.h.  */
11449 _ACEOF
11450 cat confdefs.h >>conftest.$ac_ext
11451 cat >>conftest.$ac_ext <<_ACEOF
11452 /* end confdefs.h.  */
11453 $ac_includes_default
11454 #include <$ac_header>
11455 _ACEOF
11456 rm -f conftest.$ac_objext
11457 if { (ac_try="$ac_compile"
11458 case "(($ac_try" in
11459   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11460   *) ac_try_echo=$ac_try;;
11461 esac
11462 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11463 $as_echo "$ac_try_echo") >&5
11464   (eval "$ac_compile") 2>conftest.er1
11465   ac_status=$?
11466   grep -v '^ *+' conftest.er1 >conftest.err
11467   rm -f conftest.er1
11468   cat conftest.err >&5
11469   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11470   (exit $ac_status); } && {
11471          test -z "$ac_c_werror_flag" ||
11472          test ! -s conftest.err
11473        } && test -s conftest.$ac_objext; then
11474   ac_header_compiler=yes
11475 else
11476   $as_echo "$as_me: failed program was:" >&5
11477 sed 's/^/| /' conftest.$ac_ext >&5
11478
11479         ac_header_compiler=no
11480 fi
11481
11482 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11483 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11484 $as_echo "$ac_header_compiler" >&6; }
11485
11486 # Is the header present?
11487 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11488 $as_echo_n "checking $ac_header presence... " >&6; }
11489 cat >conftest.$ac_ext <<_ACEOF
11490 /* confdefs.h.  */
11491 _ACEOF
11492 cat confdefs.h >>conftest.$ac_ext
11493 cat >>conftest.$ac_ext <<_ACEOF
11494 /* end confdefs.h.  */
11495 #include <$ac_header>
11496 _ACEOF
11497 if { (ac_try="$ac_cpp conftest.$ac_ext"
11498 case "(($ac_try" in
11499   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11500   *) ac_try_echo=$ac_try;;
11501 esac
11502 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11503 $as_echo "$ac_try_echo") >&5
11504   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11505   ac_status=$?
11506   grep -v '^ *+' conftest.er1 >conftest.err
11507   rm -f conftest.er1
11508   cat conftest.err >&5
11509   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11510   (exit $ac_status); } >/dev/null && {
11511          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11512          test ! -s conftest.err
11513        }; then
11514   ac_header_preproc=yes
11515 else
11516   $as_echo "$as_me: failed program was:" >&5
11517 sed 's/^/| /' conftest.$ac_ext >&5
11518
11519   ac_header_preproc=no
11520 fi
11521
11522 rm -f conftest.err conftest.$ac_ext
11523 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11524 $as_echo "$ac_header_preproc" >&6; }
11525
11526 # So?  What about this header?
11527 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11528   yes:no: )
11529     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11530 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11531     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11532 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11533     ac_header_preproc=yes
11534     ;;
11535   no:yes:* )
11536     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11537 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11538     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11539 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11540     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11541 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11542     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11543 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11544     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11545 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11546     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11547 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11548     ( cat <<\_ASBOX
11549 ## ---------------------------------------- ##
11550 ## Report this to pgsql-bugs@postgresql.org ##
11551 ## ---------------------------------------- ##
11552 _ASBOX
11553      ) | sed "s/^/$as_me: WARNING:     /" >&2
11554     ;;
11555 esac
11556 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11557 $as_echo_n "checking for $ac_header... " >&6; }
11558 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11559   $as_echo_n "(cached) " >&6
11560 else
11561   eval "$as_ac_Header=\$ac_header_preproc"
11562 fi
11563 ac_res=`eval 'as_val=${'$as_ac_Header'}
11564                  $as_echo "$as_val"'`
11565                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11566 $as_echo "$ac_res" >&6; }
11567
11568 fi
11569 as_val=`eval 'as_val=${'$as_ac_Header'}
11570                  $as_echo "$as_val"'`
11571    if test "x$as_val" = x""yes; then
11572   cat >>confdefs.h <<_ACEOF
11573 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11574 _ACEOF
11575
11576 else
11577
11578 for ac_header in readline.h
11579 do
11580 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11581 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11582   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11583 $as_echo_n "checking for $ac_header... " >&6; }
11584 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11585   $as_echo_n "(cached) " >&6
11586 fi
11587 ac_res=`eval 'as_val=${'$as_ac_Header'}
11588                  $as_echo "$as_val"'`
11589                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11590 $as_echo "$ac_res" >&6; }
11591 else
11592   # Is the header compilable?
11593 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
11594 $as_echo_n "checking $ac_header usability... " >&6; }
11595 cat >conftest.$ac_ext <<_ACEOF
11596 /* confdefs.h.  */
11597 _ACEOF
11598 cat confdefs.h >>conftest.$ac_ext
11599 cat >>conftest.$ac_ext <<_ACEOF
11600 /* end confdefs.h.  */
11601 $ac_includes_default
11602 #include <$ac_header>
11603 _ACEOF
11604 rm -f conftest.$ac_objext
11605 if { (ac_try="$ac_compile"
11606 case "(($ac_try" in
11607   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11608   *) ac_try_echo=$ac_try;;
11609 esac
11610 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11611 $as_echo "$ac_try_echo") >&5
11612   (eval "$ac_compile") 2>conftest.er1
11613   ac_status=$?
11614   grep -v '^ *+' conftest.er1 >conftest.err
11615   rm -f conftest.er1
11616   cat conftest.err >&5
11617   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11618   (exit $ac_status); } && {
11619          test -z "$ac_c_werror_flag" ||
11620          test ! -s conftest.err
11621        } && test -s conftest.$ac_objext; then
11622   ac_header_compiler=yes
11623 else
11624   $as_echo "$as_me: failed program was:" >&5
11625 sed 's/^/| /' conftest.$ac_ext >&5
11626
11627         ac_header_compiler=no
11628 fi
11629
11630 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11631 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11632 $as_echo "$ac_header_compiler" >&6; }
11633
11634 # Is the header present?
11635 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11636 $as_echo_n "checking $ac_header presence... " >&6; }
11637 cat >conftest.$ac_ext <<_ACEOF
11638 /* confdefs.h.  */
11639 _ACEOF
11640 cat confdefs.h >>conftest.$ac_ext
11641 cat >>conftest.$ac_ext <<_ACEOF
11642 /* end confdefs.h.  */
11643 #include <$ac_header>
11644 _ACEOF
11645 if { (ac_try="$ac_cpp conftest.$ac_ext"
11646 case "(($ac_try" in
11647   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11648   *) ac_try_echo=$ac_try;;
11649 esac
11650 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11651 $as_echo "$ac_try_echo") >&5
11652   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11653   ac_status=$?
11654   grep -v '^ *+' conftest.er1 >conftest.err
11655   rm -f conftest.er1
11656   cat conftest.err >&5
11657   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11658   (exit $ac_status); } >/dev/null && {
11659          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11660          test ! -s conftest.err
11661        }; then
11662   ac_header_preproc=yes
11663 else
11664   $as_echo "$as_me: failed program was:" >&5
11665 sed 's/^/| /' conftest.$ac_ext >&5
11666
11667   ac_header_preproc=no
11668 fi
11669
11670 rm -f conftest.err conftest.$ac_ext
11671 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11672 $as_echo "$ac_header_preproc" >&6; }
11673
11674 # So?  What about this header?
11675 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11676   yes:no: )
11677     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11678 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11679     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11680 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11681     ac_header_preproc=yes
11682     ;;
11683   no:yes:* )
11684     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11685 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11686     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11687 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11688     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11689 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11690     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11691 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11692     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11693 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11694     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11695 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11696     ( cat <<\_ASBOX
11697 ## ---------------------------------------- ##
11698 ## Report this to pgsql-bugs@postgresql.org ##
11699 ## ---------------------------------------- ##
11700 _ASBOX
11701      ) | sed "s/^/$as_me: WARNING:     /" >&2
11702     ;;
11703 esac
11704 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11705 $as_echo_n "checking for $ac_header... " >&6; }
11706 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11707   $as_echo_n "(cached) " >&6
11708 else
11709   eval "$as_ac_Header=\$ac_header_preproc"
11710 fi
11711 ac_res=`eval 'as_val=${'$as_ac_Header'}
11712                  $as_echo "$as_val"'`
11713                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11714 $as_echo "$ac_res" >&6; }
11715
11716 fi
11717 as_val=`eval 'as_val=${'$as_ac_Header'}
11718                  $as_echo "$as_val"'`
11719    if test "x$as_val" = x""yes; then
11720   cat >>confdefs.h <<_ACEOF
11721 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11722 _ACEOF
11723
11724 else
11725
11726 for ac_header in readline/readline.h
11727 do
11728 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11729 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11730   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11731 $as_echo_n "checking for $ac_header... " >&6; }
11732 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11733   $as_echo_n "(cached) " >&6
11734 fi
11735 ac_res=`eval 'as_val=${'$as_ac_Header'}
11736                  $as_echo "$as_val"'`
11737                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11738 $as_echo "$ac_res" >&6; }
11739 else
11740   # Is the header compilable?
11741 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
11742 $as_echo_n "checking $ac_header usability... " >&6; }
11743 cat >conftest.$ac_ext <<_ACEOF
11744 /* confdefs.h.  */
11745 _ACEOF
11746 cat confdefs.h >>conftest.$ac_ext
11747 cat >>conftest.$ac_ext <<_ACEOF
11748 /* end confdefs.h.  */
11749 $ac_includes_default
11750 #include <$ac_header>
11751 _ACEOF
11752 rm -f conftest.$ac_objext
11753 if { (ac_try="$ac_compile"
11754 case "(($ac_try" in
11755   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11756   *) ac_try_echo=$ac_try;;
11757 esac
11758 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11759 $as_echo "$ac_try_echo") >&5
11760   (eval "$ac_compile") 2>conftest.er1
11761   ac_status=$?
11762   grep -v '^ *+' conftest.er1 >conftest.err
11763   rm -f conftest.er1
11764   cat conftest.err >&5
11765   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11766   (exit $ac_status); } && {
11767          test -z "$ac_c_werror_flag" ||
11768          test ! -s conftest.err
11769        } && test -s conftest.$ac_objext; then
11770   ac_header_compiler=yes
11771 else
11772   $as_echo "$as_me: failed program was:" >&5
11773 sed 's/^/| /' conftest.$ac_ext >&5
11774
11775         ac_header_compiler=no
11776 fi
11777
11778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11779 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11780 $as_echo "$ac_header_compiler" >&6; }
11781
11782 # Is the header present?
11783 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11784 $as_echo_n "checking $ac_header presence... " >&6; }
11785 cat >conftest.$ac_ext <<_ACEOF
11786 /* confdefs.h.  */
11787 _ACEOF
11788 cat confdefs.h >>conftest.$ac_ext
11789 cat >>conftest.$ac_ext <<_ACEOF
11790 /* end confdefs.h.  */
11791 #include <$ac_header>
11792 _ACEOF
11793 if { (ac_try="$ac_cpp conftest.$ac_ext"
11794 case "(($ac_try" in
11795   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11796   *) ac_try_echo=$ac_try;;
11797 esac
11798 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11799 $as_echo "$ac_try_echo") >&5
11800   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11801   ac_status=$?
11802   grep -v '^ *+' conftest.er1 >conftest.err
11803   rm -f conftest.er1
11804   cat conftest.err >&5
11805   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11806   (exit $ac_status); } >/dev/null && {
11807          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11808          test ! -s conftest.err
11809        }; then
11810   ac_header_preproc=yes
11811 else
11812   $as_echo "$as_me: failed program was:" >&5
11813 sed 's/^/| /' conftest.$ac_ext >&5
11814
11815   ac_header_preproc=no
11816 fi
11817
11818 rm -f conftest.err conftest.$ac_ext
11819 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11820 $as_echo "$ac_header_preproc" >&6; }
11821
11822 # So?  What about this header?
11823 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11824   yes:no: )
11825     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11826 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11827     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11828 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11829     ac_header_preproc=yes
11830     ;;
11831   no:yes:* )
11832     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11833 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11834     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11835 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11836     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11837 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11838     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11839 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11840     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11841 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11842     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11843 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11844     ( cat <<\_ASBOX
11845 ## ---------------------------------------- ##
11846 ## Report this to pgsql-bugs@postgresql.org ##
11847 ## ---------------------------------------- ##
11848 _ASBOX
11849      ) | sed "s/^/$as_me: WARNING:     /" >&2
11850     ;;
11851 esac
11852 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11853 $as_echo_n "checking for $ac_header... " >&6; }
11854 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11855   $as_echo_n "(cached) " >&6
11856 else
11857   eval "$as_ac_Header=\$ac_header_preproc"
11858 fi
11859 ac_res=`eval 'as_val=${'$as_ac_Header'}
11860                  $as_echo "$as_val"'`
11861                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11862 $as_echo "$ac_res" >&6; }
11863
11864 fi
11865 as_val=`eval 'as_val=${'$as_ac_Header'}
11866                  $as_echo "$as_val"'`
11867    if test "x$as_val" = x""yes; then
11868   cat >>confdefs.h <<_ACEOF
11869 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11870 _ACEOF
11871
11872 else
11873   { { $as_echo "$as_me:$LINENO: error: readline header not found
11874 If you have libedit already installed, see config.log for details on the
11875 failure.  It is possible the compiler isn't looking in the proper directory.
11876 Use --without-readline to disable libedit support." >&5
11877 $as_echo "$as_me: error: readline header not found
11878 If you have libedit already installed, see config.log for details on the
11879 failure.  It is possible the compiler isn't looking in the proper directory.
11880 Use --without-readline to disable libedit support." >&2;}
11881    { (exit 1); exit 1; }; }
11882 fi
11883
11884 done
11885
11886 fi
11887
11888 done
11889
11890 fi
11891
11892 done
11893
11894 # Note: in a libedit installation, history.h is sometimes a dummy, and may
11895 # not be there at all.  Hence, don't complain if not found.  We must check
11896 # though, since in yet other versions it is an independent header.
11897
11898 for ac_header in editline/history.h
11899 do
11900 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11901 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11902   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11903 $as_echo_n "checking for $ac_header... " >&6; }
11904 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11905   $as_echo_n "(cached) " >&6
11906 fi
11907 ac_res=`eval 'as_val=${'$as_ac_Header'}
11908                  $as_echo "$as_val"'`
11909                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11910 $as_echo "$ac_res" >&6; }
11911 else
11912   # Is the header compilable?
11913 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
11914 $as_echo_n "checking $ac_header usability... " >&6; }
11915 cat >conftest.$ac_ext <<_ACEOF
11916 /* confdefs.h.  */
11917 _ACEOF
11918 cat confdefs.h >>conftest.$ac_ext
11919 cat >>conftest.$ac_ext <<_ACEOF
11920 /* end confdefs.h.  */
11921 $ac_includes_default
11922 #include <$ac_header>
11923 _ACEOF
11924 rm -f conftest.$ac_objext
11925 if { (ac_try="$ac_compile"
11926 case "(($ac_try" in
11927   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11928   *) ac_try_echo=$ac_try;;
11929 esac
11930 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11931 $as_echo "$ac_try_echo") >&5
11932   (eval "$ac_compile") 2>conftest.er1
11933   ac_status=$?
11934   grep -v '^ *+' conftest.er1 >conftest.err
11935   rm -f conftest.er1
11936   cat conftest.err >&5
11937   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11938   (exit $ac_status); } && {
11939          test -z "$ac_c_werror_flag" ||
11940          test ! -s conftest.err
11941        } && test -s conftest.$ac_objext; then
11942   ac_header_compiler=yes
11943 else
11944   $as_echo "$as_me: failed program was:" >&5
11945 sed 's/^/| /' conftest.$ac_ext >&5
11946
11947         ac_header_compiler=no
11948 fi
11949
11950 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11951 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11952 $as_echo "$ac_header_compiler" >&6; }
11953
11954 # Is the header present?
11955 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11956 $as_echo_n "checking $ac_header presence... " >&6; }
11957 cat >conftest.$ac_ext <<_ACEOF
11958 /* confdefs.h.  */
11959 _ACEOF
11960 cat confdefs.h >>conftest.$ac_ext
11961 cat >>conftest.$ac_ext <<_ACEOF
11962 /* end confdefs.h.  */
11963 #include <$ac_header>
11964 _ACEOF
11965 if { (ac_try="$ac_cpp conftest.$ac_ext"
11966 case "(($ac_try" in
11967   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11968   *) ac_try_echo=$ac_try;;
11969 esac
11970 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11971 $as_echo "$ac_try_echo") >&5
11972   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11973   ac_status=$?
11974   grep -v '^ *+' conftest.er1 >conftest.err
11975   rm -f conftest.er1
11976   cat conftest.err >&5
11977   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11978   (exit $ac_status); } >/dev/null && {
11979          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11980          test ! -s conftest.err
11981        }; then
11982   ac_header_preproc=yes
11983 else
11984   $as_echo "$as_me: failed program was:" >&5
11985 sed 's/^/| /' conftest.$ac_ext >&5
11986
11987   ac_header_preproc=no
11988 fi
11989
11990 rm -f conftest.err conftest.$ac_ext
11991 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11992 $as_echo "$ac_header_preproc" >&6; }
11993
11994 # So?  What about this header?
11995 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11996   yes:no: )
11997     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11998 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11999     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12000 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12001     ac_header_preproc=yes
12002     ;;
12003   no:yes:* )
12004     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12005 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12006     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12007 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12008     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12009 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12010     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12011 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12012     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12013 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12014     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12015 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12016     ( cat <<\_ASBOX
12017 ## ---------------------------------------- ##
12018 ## Report this to pgsql-bugs@postgresql.org ##
12019 ## ---------------------------------------- ##
12020 _ASBOX
12021      ) | sed "s/^/$as_me: WARNING:     /" >&2
12022     ;;
12023 esac
12024 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12025 $as_echo_n "checking for $ac_header... " >&6; }
12026 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12027   $as_echo_n "(cached) " >&6
12028 else
12029   eval "$as_ac_Header=\$ac_header_preproc"
12030 fi
12031 ac_res=`eval 'as_val=${'$as_ac_Header'}
12032                  $as_echo "$as_val"'`
12033                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12034 $as_echo "$ac_res" >&6; }
12035
12036 fi
12037 as_val=`eval 'as_val=${'$as_ac_Header'}
12038                  $as_echo "$as_val"'`
12039    if test "x$as_val" = x""yes; then
12040   cat >>confdefs.h <<_ACEOF
12041 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12042 _ACEOF
12043
12044 else
12045
12046 for ac_header in history.h
12047 do
12048 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12049 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12050   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12051 $as_echo_n "checking for $ac_header... " >&6; }
12052 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12053   $as_echo_n "(cached) " >&6
12054 fi
12055 ac_res=`eval 'as_val=${'$as_ac_Header'}
12056                  $as_echo "$as_val"'`
12057                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12058 $as_echo "$ac_res" >&6; }
12059 else
12060   # Is the header compilable?
12061 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
12062 $as_echo_n "checking $ac_header usability... " >&6; }
12063 cat >conftest.$ac_ext <<_ACEOF
12064 /* confdefs.h.  */
12065 _ACEOF
12066 cat confdefs.h >>conftest.$ac_ext
12067 cat >>conftest.$ac_ext <<_ACEOF
12068 /* end confdefs.h.  */
12069 $ac_includes_default
12070 #include <$ac_header>
12071 _ACEOF
12072 rm -f conftest.$ac_objext
12073 if { (ac_try="$ac_compile"
12074 case "(($ac_try" in
12075   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12076   *) ac_try_echo=$ac_try;;
12077 esac
12078 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12079 $as_echo "$ac_try_echo") >&5
12080   (eval "$ac_compile") 2>conftest.er1
12081   ac_status=$?
12082   grep -v '^ *+' conftest.er1 >conftest.err
12083   rm -f conftest.er1
12084   cat conftest.err >&5
12085   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12086   (exit $ac_status); } && {
12087          test -z "$ac_c_werror_flag" ||
12088          test ! -s conftest.err
12089        } && test -s conftest.$ac_objext; then
12090   ac_header_compiler=yes
12091 else
12092   $as_echo "$as_me: failed program was:" >&5
12093 sed 's/^/| /' conftest.$ac_ext >&5
12094
12095         ac_header_compiler=no
12096 fi
12097
12098 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12099 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12100 $as_echo "$ac_header_compiler" >&6; }
12101
12102 # Is the header present?
12103 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
12104 $as_echo_n "checking $ac_header presence... " >&6; }
12105 cat >conftest.$ac_ext <<_ACEOF
12106 /* confdefs.h.  */
12107 _ACEOF
12108 cat confdefs.h >>conftest.$ac_ext
12109 cat >>conftest.$ac_ext <<_ACEOF
12110 /* end confdefs.h.  */
12111 #include <$ac_header>
12112 _ACEOF
12113 if { (ac_try="$ac_cpp conftest.$ac_ext"
12114 case "(($ac_try" in
12115   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12116   *) ac_try_echo=$ac_try;;
12117 esac
12118 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12119 $as_echo "$ac_try_echo") >&5
12120   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12121   ac_status=$?
12122   grep -v '^ *+' conftest.er1 >conftest.err
12123   rm -f conftest.er1
12124   cat conftest.err >&5
12125   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12126   (exit $ac_status); } >/dev/null && {
12127          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12128          test ! -s conftest.err
12129        }; then
12130   ac_header_preproc=yes
12131 else
12132   $as_echo "$as_me: failed program was:" >&5
12133 sed 's/^/| /' conftest.$ac_ext >&5
12134
12135   ac_header_preproc=no
12136 fi
12137
12138 rm -f conftest.err conftest.$ac_ext
12139 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12140 $as_echo "$ac_header_preproc" >&6; }
12141
12142 # So?  What about this header?
12143 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12144   yes:no: )
12145     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12146 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12147     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12148 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12149     ac_header_preproc=yes
12150     ;;
12151   no:yes:* )
12152     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12153 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12154     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12155 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12156     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12157 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12158     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12159 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12160     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12161 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12162     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12163 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12164     ( cat <<\_ASBOX
12165 ## ---------------------------------------- ##
12166 ## Report this to pgsql-bugs@postgresql.org ##
12167 ## ---------------------------------------- ##
12168 _ASBOX
12169      ) | sed "s/^/$as_me: WARNING:     /" >&2
12170     ;;
12171 esac
12172 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12173 $as_echo_n "checking for $ac_header... " >&6; }
12174 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12175   $as_echo_n "(cached) " >&6
12176 else
12177   eval "$as_ac_Header=\$ac_header_preproc"
12178 fi
12179 ac_res=`eval 'as_val=${'$as_ac_Header'}
12180                  $as_echo "$as_val"'`
12181                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12182 $as_echo "$ac_res" >&6; }
12183
12184 fi
12185 as_val=`eval 'as_val=${'$as_ac_Header'}
12186                  $as_echo "$as_val"'`
12187    if test "x$as_val" = x""yes; then
12188   cat >>confdefs.h <<_ACEOF
12189 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12190 _ACEOF
12191
12192 else
12193
12194 for ac_header in readline/history.h
12195 do
12196 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12197 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12198   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12199 $as_echo_n "checking for $ac_header... " >&6; }
12200 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12201   $as_echo_n "(cached) " >&6
12202 fi
12203 ac_res=`eval 'as_val=${'$as_ac_Header'}
12204                  $as_echo "$as_val"'`
12205                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12206 $as_echo "$ac_res" >&6; }
12207 else
12208   # Is the header compilable?
12209 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
12210 $as_echo_n "checking $ac_header usability... " >&6; }
12211 cat >conftest.$ac_ext <<_ACEOF
12212 /* confdefs.h.  */
12213 _ACEOF
12214 cat confdefs.h >>conftest.$ac_ext
12215 cat >>conftest.$ac_ext <<_ACEOF
12216 /* end confdefs.h.  */
12217 $ac_includes_default
12218 #include <$ac_header>
12219 _ACEOF
12220 rm -f conftest.$ac_objext
12221 if { (ac_try="$ac_compile"
12222 case "(($ac_try" in
12223   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12224   *) ac_try_echo=$ac_try;;
12225 esac
12226 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12227 $as_echo "$ac_try_echo") >&5
12228   (eval "$ac_compile") 2>conftest.er1
12229   ac_status=$?
12230   grep -v '^ *+' conftest.er1 >conftest.err
12231   rm -f conftest.er1
12232   cat conftest.err >&5
12233   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12234   (exit $ac_status); } && {
12235          test -z "$ac_c_werror_flag" ||
12236          test ! -s conftest.err
12237        } && test -s conftest.$ac_objext; then
12238   ac_header_compiler=yes
12239 else
12240   $as_echo "$as_me: failed program was:" >&5
12241 sed 's/^/| /' conftest.$ac_ext >&5
12242
12243         ac_header_compiler=no
12244 fi
12245
12246 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12247 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12248 $as_echo "$ac_header_compiler" >&6; }
12249
12250 # Is the header present?
12251 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
12252 $as_echo_n "checking $ac_header presence... " >&6; }
12253 cat >conftest.$ac_ext <<_ACEOF
12254 /* confdefs.h.  */
12255 _ACEOF
12256 cat confdefs.h >>conftest.$ac_ext
12257 cat >>conftest.$ac_ext <<_ACEOF
12258 /* end confdefs.h.  */
12259 #include <$ac_header>
12260 _ACEOF
12261 if { (ac_try="$ac_cpp conftest.$ac_ext"
12262 case "(($ac_try" in
12263   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12264   *) ac_try_echo=$ac_try;;
12265 esac
12266 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12267 $as_echo "$ac_try_echo") >&5
12268   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12269   ac_status=$?
12270   grep -v '^ *+' conftest.er1 >conftest.err
12271   rm -f conftest.er1
12272   cat conftest.err >&5
12273   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12274   (exit $ac_status); } >/dev/null && {
12275          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12276          test ! -s conftest.err
12277        }; then
12278   ac_header_preproc=yes
12279 else
12280   $as_echo "$as_me: failed program was:" >&5
12281 sed 's/^/| /' conftest.$ac_ext >&5
12282
12283   ac_header_preproc=no
12284 fi
12285
12286 rm -f conftest.err conftest.$ac_ext
12287 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12288 $as_echo "$ac_header_preproc" >&6; }
12289
12290 # So?  What about this header?
12291 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12292   yes:no: )
12293     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12294 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12295     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12296 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12297     ac_header_preproc=yes
12298     ;;
12299   no:yes:* )
12300     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12301 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12302     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12303 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12304     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12305 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12306     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12307 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12308     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12309 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12310     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12311 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12312     ( cat <<\_ASBOX
12313 ## ---------------------------------------- ##
12314 ## Report this to pgsql-bugs@postgresql.org ##
12315 ## ---------------------------------------- ##
12316 _ASBOX
12317      ) | sed "s/^/$as_me: WARNING:     /" >&2
12318     ;;
12319 esac
12320 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12321 $as_echo_n "checking for $ac_header... " >&6; }
12322 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12323   $as_echo_n "(cached) " >&6
12324 else
12325   eval "$as_ac_Header=\$ac_header_preproc"
12326 fi
12327 ac_res=`eval 'as_val=${'$as_ac_Header'}
12328                  $as_echo "$as_val"'`
12329                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12330 $as_echo "$ac_res" >&6; }
12331
12332 fi
12333 as_val=`eval 'as_val=${'$as_ac_Header'}
12334                  $as_echo "$as_val"'`
12335    if test "x$as_val" = x""yes; then
12336   cat >>confdefs.h <<_ACEOF
12337 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12338 _ACEOF
12339
12340 fi
12341
12342 done
12343
12344 fi
12345
12346 done
12347
12348 fi
12349
12350 done
12351
12352 fi
12353
12354 if test "$with_zlib" = yes; then
12355   if test "${ac_cv_header_zlib_h+set}" = set; then
12356   { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
12357 $as_echo_n "checking for zlib.h... " >&6; }
12358 if test "${ac_cv_header_zlib_h+set}" = set; then
12359   $as_echo_n "(cached) " >&6
12360 fi
12361 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
12362 $as_echo "$ac_cv_header_zlib_h" >&6; }
12363 else
12364   # Is the header compilable?
12365 { $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5
12366 $as_echo_n "checking zlib.h usability... " >&6; }
12367 cat >conftest.$ac_ext <<_ACEOF
12368 /* confdefs.h.  */
12369 _ACEOF
12370 cat confdefs.h >>conftest.$ac_ext
12371 cat >>conftest.$ac_ext <<_ACEOF
12372 /* end confdefs.h.  */
12373 $ac_includes_default
12374 #include <zlib.h>
12375 _ACEOF
12376 rm -f conftest.$ac_objext
12377 if { (ac_try="$ac_compile"
12378 case "(($ac_try" in
12379   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12380   *) ac_try_echo=$ac_try;;
12381 esac
12382 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12383 $as_echo "$ac_try_echo") >&5
12384   (eval "$ac_compile") 2>conftest.er1
12385   ac_status=$?
12386   grep -v '^ *+' conftest.er1 >conftest.err
12387   rm -f conftest.er1
12388   cat conftest.err >&5
12389   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12390   (exit $ac_status); } && {
12391          test -z "$ac_c_werror_flag" ||
12392          test ! -s conftest.err
12393        } && test -s conftest.$ac_objext; then
12394   ac_header_compiler=yes
12395 else
12396   $as_echo "$as_me: failed program was:" >&5
12397 sed 's/^/| /' conftest.$ac_ext >&5
12398
12399         ac_header_compiler=no
12400 fi
12401
12402 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12403 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12404 $as_echo "$ac_header_compiler" >&6; }
12405
12406 # Is the header present?
12407 { $as_echo "$as_me:$LINENO: checking zlib.h presence" >&5
12408 $as_echo_n "checking zlib.h presence... " >&6; }
12409 cat >conftest.$ac_ext <<_ACEOF
12410 /* confdefs.h.  */
12411 _ACEOF
12412 cat confdefs.h >>conftest.$ac_ext
12413 cat >>conftest.$ac_ext <<_ACEOF
12414 /* end confdefs.h.  */
12415 #include <zlib.h>
12416 _ACEOF
12417 if { (ac_try="$ac_cpp conftest.$ac_ext"
12418 case "(($ac_try" in
12419   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12420   *) ac_try_echo=$ac_try;;
12421 esac
12422 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12423 $as_echo "$ac_try_echo") >&5
12424   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12425   ac_status=$?
12426   grep -v '^ *+' conftest.er1 >conftest.err
12427   rm -f conftest.er1
12428   cat conftest.err >&5
12429   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12430   (exit $ac_status); } >/dev/null && {
12431          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12432          test ! -s conftest.err
12433        }; then
12434   ac_header_preproc=yes
12435 else
12436   $as_echo "$as_me: failed program was:" >&5
12437 sed 's/^/| /' conftest.$ac_ext >&5
12438
12439   ac_header_preproc=no
12440 fi
12441
12442 rm -f conftest.err conftest.$ac_ext
12443 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12444 $as_echo "$ac_header_preproc" >&6; }
12445
12446 # So?  What about this header?
12447 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12448   yes:no: )
12449     { $as_echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
12450 $as_echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12451     { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
12452 $as_echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
12453     ac_header_preproc=yes
12454     ;;
12455   no:yes:* )
12456     { $as_echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
12457 $as_echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
12458     { $as_echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
12459 $as_echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
12460     { $as_echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
12461 $as_echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
12462     { $as_echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
12463 $as_echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
12464     { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
12465 $as_echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
12466     { $as_echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
12467 $as_echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
12468     ( cat <<\_ASBOX
12469 ## ---------------------------------------- ##
12470 ## Report this to pgsql-bugs@postgresql.org ##
12471 ## ---------------------------------------- ##
12472 _ASBOX
12473      ) | sed "s/^/$as_me: WARNING:     /" >&2
12474     ;;
12475 esac
12476 { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
12477 $as_echo_n "checking for zlib.h... " >&6; }
12478 if test "${ac_cv_header_zlib_h+set}" = set; then
12479   $as_echo_n "(cached) " >&6
12480 else
12481   ac_cv_header_zlib_h=$ac_header_preproc
12482 fi
12483 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
12484 $as_echo "$ac_cv_header_zlib_h" >&6; }
12485
12486 fi
12487 if test "x$ac_cv_header_zlib_h" = x""yes; then
12488   :
12489 else
12490   { { $as_echo "$as_me:$LINENO: error: zlib header not found
12491 If you have zlib already installed, see config.log for details on the
12492 failure.  It is possible the compiler isn't looking in the proper directory.
12493 Use --without-zlib to disable zlib support." >&5
12494 $as_echo "$as_me: error: zlib header not found
12495 If you have zlib already installed, see config.log for details on the
12496 failure.  It is possible the compiler isn't looking in the proper directory.
12497 Use --without-zlib to disable zlib support." >&2;}
12498    { (exit 1); exit 1; }; }
12499 fi
12500
12501
12502 fi
12503
12504 if test "$with_gssapi" = yes ; then
12505
12506 for ac_header in gssapi/gssapi.h
12507 do
12508 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12509 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12510   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12511 $as_echo_n "checking for $ac_header... " >&6; }
12512 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12513   $as_echo_n "(cached) " >&6
12514 fi
12515 ac_res=`eval 'as_val=${'$as_ac_Header'}
12516                  $as_echo "$as_val"'`
12517                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12518 $as_echo "$ac_res" >&6; }
12519 else
12520   # Is the header compilable?
12521 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
12522 $as_echo_n "checking $ac_header usability... " >&6; }
12523 cat >conftest.$ac_ext <<_ACEOF
12524 /* confdefs.h.  */
12525 _ACEOF
12526 cat confdefs.h >>conftest.$ac_ext
12527 cat >>conftest.$ac_ext <<_ACEOF
12528 /* end confdefs.h.  */
12529 $ac_includes_default
12530 #include <$ac_header>
12531 _ACEOF
12532 rm -f conftest.$ac_objext
12533 if { (ac_try="$ac_compile"
12534 case "(($ac_try" in
12535   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12536   *) ac_try_echo=$ac_try;;
12537 esac
12538 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12539 $as_echo "$ac_try_echo") >&5
12540   (eval "$ac_compile") 2>conftest.er1
12541   ac_status=$?
12542   grep -v '^ *+' conftest.er1 >conftest.err
12543   rm -f conftest.er1
12544   cat conftest.err >&5
12545   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12546   (exit $ac_status); } && {
12547          test -z "$ac_c_werror_flag" ||
12548          test ! -s conftest.err
12549        } && test -s conftest.$ac_objext; then
12550   ac_header_compiler=yes
12551 else
12552   $as_echo "$as_me: failed program was:" >&5
12553 sed 's/^/| /' conftest.$ac_ext >&5
12554
12555         ac_header_compiler=no
12556 fi
12557
12558 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12559 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12560 $as_echo "$ac_header_compiler" >&6; }
12561
12562 # Is the header present?
12563 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
12564 $as_echo_n "checking $ac_header presence... " >&6; }
12565 cat >conftest.$ac_ext <<_ACEOF
12566 /* confdefs.h.  */
12567 _ACEOF
12568 cat confdefs.h >>conftest.$ac_ext
12569 cat >>conftest.$ac_ext <<_ACEOF
12570 /* end confdefs.h.  */
12571 #include <$ac_header>
12572 _ACEOF
12573 if { (ac_try="$ac_cpp conftest.$ac_ext"
12574 case "(($ac_try" in
12575   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12576   *) ac_try_echo=$ac_try;;
12577 esac
12578 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12579 $as_echo "$ac_try_echo") >&5
12580   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12581   ac_status=$?
12582   grep -v '^ *+' conftest.er1 >conftest.err
12583   rm -f conftest.er1
12584   cat conftest.err >&5
12585   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12586   (exit $ac_status); } >/dev/null && {
12587          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12588          test ! -s conftest.err
12589        }; then
12590   ac_header_preproc=yes
12591 else
12592   $as_echo "$as_me: failed program was:" >&5
12593 sed 's/^/| /' conftest.$ac_ext >&5
12594
12595   ac_header_preproc=no
12596 fi
12597
12598 rm -f conftest.err conftest.$ac_ext
12599 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12600 $as_echo "$ac_header_preproc" >&6; }
12601
12602 # So?  What about this header?
12603 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12604   yes:no: )
12605     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12606 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12607     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12608 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12609     ac_header_preproc=yes
12610     ;;
12611   no:yes:* )
12612     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12613 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12614     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12615 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12616     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12617 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12618     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12619 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12620     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12621 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12622     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12623 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12624     ( cat <<\_ASBOX
12625 ## ---------------------------------------- ##
12626 ## Report this to pgsql-bugs@postgresql.org ##
12627 ## ---------------------------------------- ##
12628 _ASBOX
12629      ) | sed "s/^/$as_me: WARNING:     /" >&2
12630     ;;
12631 esac
12632 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12633 $as_echo_n "checking for $ac_header... " >&6; }
12634 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12635   $as_echo_n "(cached) " >&6
12636 else
12637   eval "$as_ac_Header=\$ac_header_preproc"
12638 fi
12639 ac_res=`eval 'as_val=${'$as_ac_Header'}
12640                  $as_echo "$as_val"'`
12641                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12642 $as_echo "$ac_res" >&6; }
12643
12644 fi
12645 as_val=`eval 'as_val=${'$as_ac_Header'}
12646                  $as_echo "$as_val"'`
12647    if test "x$as_val" = x""yes; then
12648   cat >>confdefs.h <<_ACEOF
12649 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12650 _ACEOF
12651
12652 else
12653
12654 for ac_header in gssapi.h
12655 do
12656 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12657 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12658   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12659 $as_echo_n "checking for $ac_header... " >&6; }
12660 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12661   $as_echo_n "(cached) " >&6
12662 fi
12663 ac_res=`eval 'as_val=${'$as_ac_Header'}
12664                  $as_echo "$as_val"'`
12665                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12666 $as_echo "$ac_res" >&6; }
12667 else
12668   # Is the header compilable?
12669 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
12670 $as_echo_n "checking $ac_header usability... " >&6; }
12671 cat >conftest.$ac_ext <<_ACEOF
12672 /* confdefs.h.  */
12673 _ACEOF
12674 cat confdefs.h >>conftest.$ac_ext
12675 cat >>conftest.$ac_ext <<_ACEOF
12676 /* end confdefs.h.  */
12677 $ac_includes_default
12678 #include <$ac_header>
12679 _ACEOF
12680 rm -f conftest.$ac_objext
12681 if { (ac_try="$ac_compile"
12682 case "(($ac_try" in
12683   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12684   *) ac_try_echo=$ac_try;;
12685 esac
12686 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12687 $as_echo "$ac_try_echo") >&5
12688   (eval "$ac_compile") 2>conftest.er1
12689   ac_status=$?
12690   grep -v '^ *+' conftest.er1 >conftest.err
12691   rm -f conftest.er1
12692   cat conftest.err >&5
12693   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12694   (exit $ac_status); } && {
12695          test -z "$ac_c_werror_flag" ||
12696          test ! -s conftest.err
12697        } && test -s conftest.$ac_objext; then
12698   ac_header_compiler=yes
12699 else
12700   $as_echo "$as_me: failed program was:" >&5
12701 sed 's/^/| /' conftest.$ac_ext >&5
12702
12703         ac_header_compiler=no
12704 fi
12705
12706 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12707 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12708 $as_echo "$ac_header_compiler" >&6; }
12709
12710 # Is the header present?
12711 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
12712 $as_echo_n "checking $ac_header presence... " >&6; }
12713 cat >conftest.$ac_ext <<_ACEOF
12714 /* confdefs.h.  */
12715 _ACEOF
12716 cat confdefs.h >>conftest.$ac_ext
12717 cat >>conftest.$ac_ext <<_ACEOF
12718 /* end confdefs.h.  */
12719 #include <$ac_header>
12720 _ACEOF
12721 if { (ac_try="$ac_cpp conftest.$ac_ext"
12722 case "(($ac_try" in
12723   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12724   *) ac_try_echo=$ac_try;;
12725 esac
12726 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12727 $as_echo "$ac_try_echo") >&5
12728   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12729   ac_status=$?
12730   grep -v '^ *+' conftest.er1 >conftest.err
12731   rm -f conftest.er1
12732   cat conftest.err >&5
12733   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12734   (exit $ac_status); } >/dev/null && {
12735          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12736          test ! -s conftest.err
12737        }; then
12738   ac_header_preproc=yes
12739 else
12740   $as_echo "$as_me: failed program was:" >&5
12741 sed 's/^/| /' conftest.$ac_ext >&5
12742
12743   ac_header_preproc=no
12744 fi
12745
12746 rm -f conftest.err conftest.$ac_ext
12747 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12748 $as_echo "$ac_header_preproc" >&6; }
12749
12750 # So?  What about this header?
12751 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12752   yes:no: )
12753     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12754 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12755     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12756 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12757     ac_header_preproc=yes
12758     ;;
12759   no:yes:* )
12760     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12761 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12762     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12763 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12764     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12765 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12766     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12767 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12768     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12769 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12770     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12771 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12772     ( cat <<\_ASBOX
12773 ## ---------------------------------------- ##
12774 ## Report this to pgsql-bugs@postgresql.org ##
12775 ## ---------------------------------------- ##
12776 _ASBOX
12777      ) | sed "s/^/$as_me: WARNING:     /" >&2
12778     ;;
12779 esac
12780 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12781 $as_echo_n "checking for $ac_header... " >&6; }
12782 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12783   $as_echo_n "(cached) " >&6
12784 else
12785   eval "$as_ac_Header=\$ac_header_preproc"
12786 fi
12787 ac_res=`eval 'as_val=${'$as_ac_Header'}
12788                  $as_echo "$as_val"'`
12789                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12790 $as_echo "$ac_res" >&6; }
12791
12792 fi
12793 as_val=`eval 'as_val=${'$as_ac_Header'}
12794                  $as_echo "$as_val"'`
12795    if test "x$as_val" = x""yes; then
12796   cat >>confdefs.h <<_ACEOF
12797 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12798 _ACEOF
12799
12800 else
12801   { { $as_echo "$as_me:$LINENO: error: gssapi.h header file is required for GSSAPI" >&5
12802 $as_echo "$as_me: error: gssapi.h header file is required for GSSAPI" >&2;}
12803    { (exit 1); exit 1; }; }
12804 fi
12805
12806 done
12807
12808 fi
12809
12810 done
12811
12812 fi
12813
12814 if test "$with_krb5" = yes ; then
12815   if test "${ac_cv_header_krb5_h+set}" = set; then
12816   { $as_echo "$as_me:$LINENO: checking for krb5.h" >&5
12817 $as_echo_n "checking for krb5.h... " >&6; }
12818 if test "${ac_cv_header_krb5_h+set}" = set; then
12819   $as_echo_n "(cached) " >&6
12820 fi
12821 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
12822 $as_echo "$ac_cv_header_krb5_h" >&6; }
12823 else
12824   # Is the header compilable?
12825 { $as_echo "$as_me:$LINENO: checking krb5.h usability" >&5
12826 $as_echo_n "checking krb5.h usability... " >&6; }
12827 cat >conftest.$ac_ext <<_ACEOF
12828 /* confdefs.h.  */
12829 _ACEOF
12830 cat confdefs.h >>conftest.$ac_ext
12831 cat >>conftest.$ac_ext <<_ACEOF
12832 /* end confdefs.h.  */
12833 $ac_includes_default
12834 #include <krb5.h>
12835 _ACEOF
12836 rm -f conftest.$ac_objext
12837 if { (ac_try="$ac_compile"
12838 case "(($ac_try" in
12839   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12840   *) ac_try_echo=$ac_try;;
12841 esac
12842 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12843 $as_echo "$ac_try_echo") >&5
12844   (eval "$ac_compile") 2>conftest.er1
12845   ac_status=$?
12846   grep -v '^ *+' conftest.er1 >conftest.err
12847   rm -f conftest.er1
12848   cat conftest.err >&5
12849   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12850   (exit $ac_status); } && {
12851          test -z "$ac_c_werror_flag" ||
12852          test ! -s conftest.err
12853        } && test -s conftest.$ac_objext; then
12854   ac_header_compiler=yes
12855 else
12856   $as_echo "$as_me: failed program was:" >&5
12857 sed 's/^/| /' conftest.$ac_ext >&5
12858
12859         ac_header_compiler=no
12860 fi
12861
12862 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12863 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12864 $as_echo "$ac_header_compiler" >&6; }
12865
12866 # Is the header present?
12867 { $as_echo "$as_me:$LINENO: checking krb5.h presence" >&5
12868 $as_echo_n "checking krb5.h presence... " >&6; }
12869 cat >conftest.$ac_ext <<_ACEOF
12870 /* confdefs.h.  */
12871 _ACEOF
12872 cat confdefs.h >>conftest.$ac_ext
12873 cat >>conftest.$ac_ext <<_ACEOF
12874 /* end confdefs.h.  */
12875 #include <krb5.h>
12876 _ACEOF
12877 if { (ac_try="$ac_cpp conftest.$ac_ext"
12878 case "(($ac_try" in
12879   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12880   *) ac_try_echo=$ac_try;;
12881 esac
12882 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12883 $as_echo "$ac_try_echo") >&5
12884   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12885   ac_status=$?
12886   grep -v '^ *+' conftest.er1 >conftest.err
12887   rm -f conftest.er1
12888   cat conftest.err >&5
12889   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12890   (exit $ac_status); } >/dev/null && {
12891          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12892          test ! -s conftest.err
12893        }; then
12894   ac_header_preproc=yes
12895 else
12896   $as_echo "$as_me: failed program was:" >&5
12897 sed 's/^/| /' conftest.$ac_ext >&5
12898
12899   ac_header_preproc=no
12900 fi
12901
12902 rm -f conftest.err conftest.$ac_ext
12903 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12904 $as_echo "$ac_header_preproc" >&6; }
12905
12906 # So?  What about this header?
12907 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12908   yes:no: )
12909     { $as_echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
12910 $as_echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12911     { $as_echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the compiler's result" >&5
12912 $as_echo "$as_me: WARNING: krb5.h: proceeding with the compiler's result" >&2;}
12913     ac_header_preproc=yes
12914     ;;
12915   no:yes:* )
12916     { $as_echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
12917 $as_echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
12918     { $as_echo "$as_me:$LINENO: WARNING: krb5.h:     check for missing prerequisite headers?" >&5
12919 $as_echo "$as_me: WARNING: krb5.h:     check for missing prerequisite headers?" >&2;}
12920     { $as_echo "$as_me:$LINENO: WARNING: krb5.h: see the Autoconf documentation" >&5
12921 $as_echo "$as_me: WARNING: krb5.h: see the Autoconf documentation" >&2;}
12922     { $as_echo "$as_me:$LINENO: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
12923 $as_echo "$as_me: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
12924     { $as_echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
12925 $as_echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
12926     { $as_echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
12927 $as_echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
12928     ( cat <<\_ASBOX
12929 ## ---------------------------------------- ##
12930 ## Report this to pgsql-bugs@postgresql.org ##
12931 ## ---------------------------------------- ##
12932 _ASBOX
12933      ) | sed "s/^/$as_me: WARNING:     /" >&2
12934     ;;
12935 esac
12936 { $as_echo "$as_me:$LINENO: checking for krb5.h" >&5
12937 $as_echo_n "checking for krb5.h... " >&6; }
12938 if test "${ac_cv_header_krb5_h+set}" = set; then
12939   $as_echo_n "(cached) " >&6
12940 else
12941   ac_cv_header_krb5_h=$ac_header_preproc
12942 fi
12943 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
12944 $as_echo "$ac_cv_header_krb5_h" >&6; }
12945
12946 fi
12947 if test "x$ac_cv_header_krb5_h" = x""yes; then
12948   :
12949 else
12950   { { $as_echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
12951 $as_echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
12952    { (exit 1); exit 1; }; }
12953 fi
12954
12955
12956 fi
12957
12958 if test "$with_openssl" = yes ; then
12959   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
12960   { $as_echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
12961 $as_echo_n "checking for openssl/ssl.h... " >&6; }
12962 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
12963   $as_echo_n "(cached) " >&6
12964 fi
12965 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
12966 $as_echo "$ac_cv_header_openssl_ssl_h" >&6; }
12967 else
12968   # Is the header compilable?
12969 { $as_echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
12970 $as_echo_n "checking openssl/ssl.h usability... " >&6; }
12971 cat >conftest.$ac_ext <<_ACEOF
12972 /* confdefs.h.  */
12973 _ACEOF
12974 cat confdefs.h >>conftest.$ac_ext
12975 cat >>conftest.$ac_ext <<_ACEOF
12976 /* end confdefs.h.  */
12977 $ac_includes_default
12978 #include <openssl/ssl.h>
12979 _ACEOF
12980 rm -f conftest.$ac_objext
12981 if { (ac_try="$ac_compile"
12982 case "(($ac_try" in
12983   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12984   *) ac_try_echo=$ac_try;;
12985 esac
12986 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12987 $as_echo "$ac_try_echo") >&5
12988   (eval "$ac_compile") 2>conftest.er1
12989   ac_status=$?
12990   grep -v '^ *+' conftest.er1 >conftest.err
12991   rm -f conftest.er1
12992   cat conftest.err >&5
12993   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12994   (exit $ac_status); } && {
12995          test -z "$ac_c_werror_flag" ||
12996          test ! -s conftest.err
12997        } && test -s conftest.$ac_objext; then
12998   ac_header_compiler=yes
12999 else
13000   $as_echo "$as_me: failed program was:" >&5
13001 sed 's/^/| /' conftest.$ac_ext >&5
13002
13003         ac_header_compiler=no
13004 fi
13005
13006 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13007 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13008 $as_echo "$ac_header_compiler" >&6; }
13009
13010 # Is the header present?
13011 { $as_echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
13012 $as_echo_n "checking openssl/ssl.h presence... " >&6; }
13013 cat >conftest.$ac_ext <<_ACEOF
13014 /* confdefs.h.  */
13015 _ACEOF
13016 cat confdefs.h >>conftest.$ac_ext
13017 cat >>conftest.$ac_ext <<_ACEOF
13018 /* end confdefs.h.  */
13019 #include <openssl/ssl.h>
13020 _ACEOF
13021 if { (ac_try="$ac_cpp conftest.$ac_ext"
13022 case "(($ac_try" in
13023   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13024   *) ac_try_echo=$ac_try;;
13025 esac
13026 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13027 $as_echo "$ac_try_echo") >&5
13028   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13029   ac_status=$?
13030   grep -v '^ *+' conftest.er1 >conftest.err
13031   rm -f conftest.er1
13032   cat conftest.err >&5
13033   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13034   (exit $ac_status); } >/dev/null && {
13035          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13036          test ! -s conftest.err
13037        }; then
13038   ac_header_preproc=yes
13039 else
13040   $as_echo "$as_me: failed program was:" >&5
13041 sed 's/^/| /' conftest.$ac_ext >&5
13042
13043   ac_header_preproc=no
13044 fi
13045
13046 rm -f conftest.err conftest.$ac_ext
13047 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13048 $as_echo "$ac_header_preproc" >&6; }
13049
13050 # So?  What about this header?
13051 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13052   yes:no: )
13053     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
13054 $as_echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13055     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
13056 $as_echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
13057     ac_header_preproc=yes
13058     ;;
13059   no:yes:* )
13060     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
13061 $as_echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
13062     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
13063 $as_echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
13064     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
13065 $as_echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
13066     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
13067 $as_echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
13068     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
13069 $as_echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
13070     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
13071 $as_echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
13072     ( cat <<\_ASBOX
13073 ## ---------------------------------------- ##
13074 ## Report this to pgsql-bugs@postgresql.org ##
13075 ## ---------------------------------------- ##
13076 _ASBOX
13077      ) | sed "s/^/$as_me: WARNING:     /" >&2
13078     ;;
13079 esac
13080 { $as_echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
13081 $as_echo_n "checking for openssl/ssl.h... " >&6; }
13082 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
13083   $as_echo_n "(cached) " >&6
13084 else
13085   ac_cv_header_openssl_ssl_h=$ac_header_preproc
13086 fi
13087 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
13088 $as_echo "$ac_cv_header_openssl_ssl_h" >&6; }
13089
13090 fi
13091 if test "x$ac_cv_header_openssl_ssl_h" = x""yes; then
13092   :
13093 else
13094   { { $as_echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
13095 $as_echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
13096    { (exit 1); exit 1; }; }
13097 fi
13098
13099
13100   if test "${ac_cv_header_openssl_err_h+set}" = set; then
13101   { $as_echo "$as_me:$LINENO: checking for openssl/err.h" >&5
13102 $as_echo_n "checking for openssl/err.h... " >&6; }
13103 if test "${ac_cv_header_openssl_err_h+set}" = set; then
13104   $as_echo_n "(cached) " >&6
13105 fi
13106 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
13107 $as_echo "$ac_cv_header_openssl_err_h" >&6; }
13108 else
13109   # Is the header compilable?
13110 { $as_echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
13111 $as_echo_n "checking openssl/err.h usability... " >&6; }
13112 cat >conftest.$ac_ext <<_ACEOF
13113 /* confdefs.h.  */
13114 _ACEOF
13115 cat confdefs.h >>conftest.$ac_ext
13116 cat >>conftest.$ac_ext <<_ACEOF
13117 /* end confdefs.h.  */
13118 $ac_includes_default
13119 #include <openssl/err.h>
13120 _ACEOF
13121 rm -f conftest.$ac_objext
13122 if { (ac_try="$ac_compile"
13123 case "(($ac_try" in
13124   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13125   *) ac_try_echo=$ac_try;;
13126 esac
13127 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13128 $as_echo "$ac_try_echo") >&5
13129   (eval "$ac_compile") 2>conftest.er1
13130   ac_status=$?
13131   grep -v '^ *+' conftest.er1 >conftest.err
13132   rm -f conftest.er1
13133   cat conftest.err >&5
13134   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13135   (exit $ac_status); } && {
13136          test -z "$ac_c_werror_flag" ||
13137          test ! -s conftest.err
13138        } && test -s conftest.$ac_objext; then
13139   ac_header_compiler=yes
13140 else
13141   $as_echo "$as_me: failed program was:" >&5
13142 sed 's/^/| /' conftest.$ac_ext >&5
13143
13144         ac_header_compiler=no
13145 fi
13146
13147 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13148 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13149 $as_echo "$ac_header_compiler" >&6; }
13150
13151 # Is the header present?
13152 { $as_echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
13153 $as_echo_n "checking openssl/err.h presence... " >&6; }
13154 cat >conftest.$ac_ext <<_ACEOF
13155 /* confdefs.h.  */
13156 _ACEOF
13157 cat confdefs.h >>conftest.$ac_ext
13158 cat >>conftest.$ac_ext <<_ACEOF
13159 /* end confdefs.h.  */
13160 #include <openssl/err.h>
13161 _ACEOF
13162 if { (ac_try="$ac_cpp conftest.$ac_ext"
13163 case "(($ac_try" in
13164   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13165   *) ac_try_echo=$ac_try;;
13166 esac
13167 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13168 $as_echo "$ac_try_echo") >&5
13169   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13170   ac_status=$?
13171   grep -v '^ *+' conftest.er1 >conftest.err
13172   rm -f conftest.er1
13173   cat conftest.err >&5
13174   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13175   (exit $ac_status); } >/dev/null && {
13176          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13177          test ! -s conftest.err
13178        }; then
13179   ac_header_preproc=yes
13180 else
13181   $as_echo "$as_me: failed program was:" >&5
13182 sed 's/^/| /' conftest.$ac_ext >&5
13183
13184   ac_header_preproc=no
13185 fi
13186
13187 rm -f conftest.err conftest.$ac_ext
13188 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13189 $as_echo "$ac_header_preproc" >&6; }
13190
13191 # So?  What about this header?
13192 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13193   yes:no: )
13194     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
13195 $as_echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13196     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5
13197 $as_echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;}
13198     ac_header_preproc=yes
13199     ;;
13200   no:yes:* )
13201     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
13202 $as_echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
13203     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&5
13204 $as_echo "$as_me: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&2;}
13205     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5
13206 $as_echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;}
13207     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&5
13208 $as_echo "$as_me: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&2;}
13209     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
13210 $as_echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;}
13211     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5
13212 $as_echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;}
13213     ( cat <<\_ASBOX
13214 ## ---------------------------------------- ##
13215 ## Report this to pgsql-bugs@postgresql.org ##
13216 ## ---------------------------------------- ##
13217 _ASBOX
13218      ) | sed "s/^/$as_me: WARNING:     /" >&2
13219     ;;
13220 esac
13221 { $as_echo "$as_me:$LINENO: checking for openssl/err.h" >&5
13222 $as_echo_n "checking for openssl/err.h... " >&6; }
13223 if test "${ac_cv_header_openssl_err_h+set}" = set; then
13224   $as_echo_n "(cached) " >&6
13225 else
13226   ac_cv_header_openssl_err_h=$ac_header_preproc
13227 fi
13228 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
13229 $as_echo "$ac_cv_header_openssl_err_h" >&6; }
13230
13231 fi
13232 if test "x$ac_cv_header_openssl_err_h" = x""yes; then
13233   :
13234 else
13235   { { $as_echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
13236 $as_echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
13237    { (exit 1); exit 1; }; }
13238 fi
13239
13240
13241 fi
13242
13243 if test "$with_pam" = yes ; then
13244
13245 for ac_header in security/pam_appl.h
13246 do
13247 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13248 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13249   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13250 $as_echo_n "checking for $ac_header... " >&6; }
13251 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13252   $as_echo_n "(cached) " >&6
13253 fi
13254 ac_res=`eval 'as_val=${'$as_ac_Header'}
13255                  $as_echo "$as_val"'`
13256                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13257 $as_echo "$ac_res" >&6; }
13258 else
13259   # Is the header compilable?
13260 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
13261 $as_echo_n "checking $ac_header usability... " >&6; }
13262 cat >conftest.$ac_ext <<_ACEOF
13263 /* confdefs.h.  */
13264 _ACEOF
13265 cat confdefs.h >>conftest.$ac_ext
13266 cat >>conftest.$ac_ext <<_ACEOF
13267 /* end confdefs.h.  */
13268 $ac_includes_default
13269 #include <$ac_header>
13270 _ACEOF
13271 rm -f conftest.$ac_objext
13272 if { (ac_try="$ac_compile"
13273 case "(($ac_try" in
13274   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13275   *) ac_try_echo=$ac_try;;
13276 esac
13277 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13278 $as_echo "$ac_try_echo") >&5
13279   (eval "$ac_compile") 2>conftest.er1
13280   ac_status=$?
13281   grep -v '^ *+' conftest.er1 >conftest.err
13282   rm -f conftest.er1
13283   cat conftest.err >&5
13284   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13285   (exit $ac_status); } && {
13286          test -z "$ac_c_werror_flag" ||
13287          test ! -s conftest.err
13288        } && test -s conftest.$ac_objext; then
13289   ac_header_compiler=yes
13290 else
13291   $as_echo "$as_me: failed program was:" >&5
13292 sed 's/^/| /' conftest.$ac_ext >&5
13293
13294         ac_header_compiler=no
13295 fi
13296
13297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13298 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13299 $as_echo "$ac_header_compiler" >&6; }
13300
13301 # Is the header present?
13302 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
13303 $as_echo_n "checking $ac_header presence... " >&6; }
13304 cat >conftest.$ac_ext <<_ACEOF
13305 /* confdefs.h.  */
13306 _ACEOF
13307 cat confdefs.h >>conftest.$ac_ext
13308 cat >>conftest.$ac_ext <<_ACEOF
13309 /* end confdefs.h.  */
13310 #include <$ac_header>
13311 _ACEOF
13312 if { (ac_try="$ac_cpp conftest.$ac_ext"
13313 case "(($ac_try" in
13314   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13315   *) ac_try_echo=$ac_try;;
13316 esac
13317 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13318 $as_echo "$ac_try_echo") >&5
13319   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13320   ac_status=$?
13321   grep -v '^ *+' conftest.er1 >conftest.err
13322   rm -f conftest.er1
13323   cat conftest.err >&5
13324   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13325   (exit $ac_status); } >/dev/null && {
13326          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13327          test ! -s conftest.err
13328        }; then
13329   ac_header_preproc=yes
13330 else
13331   $as_echo "$as_me: failed program was:" >&5
13332 sed 's/^/| /' conftest.$ac_ext >&5
13333
13334   ac_header_preproc=no
13335 fi
13336
13337 rm -f conftest.err conftest.$ac_ext
13338 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13339 $as_echo "$ac_header_preproc" >&6; }
13340
13341 # So?  What about this header?
13342 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13343   yes:no: )
13344     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13345 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13346     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13347 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13348     ac_header_preproc=yes
13349     ;;
13350   no:yes:* )
13351     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13352 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13353     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13354 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13355     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13356 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13357     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13358 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13359     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13360 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13361     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13362 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13363     ( cat <<\_ASBOX
13364 ## ---------------------------------------- ##
13365 ## Report this to pgsql-bugs@postgresql.org ##
13366 ## ---------------------------------------- ##
13367 _ASBOX
13368      ) | sed "s/^/$as_me: WARNING:     /" >&2
13369     ;;
13370 esac
13371 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13372 $as_echo_n "checking for $ac_header... " >&6; }
13373 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13374   $as_echo_n "(cached) " >&6
13375 else
13376   eval "$as_ac_Header=\$ac_header_preproc"
13377 fi
13378 ac_res=`eval 'as_val=${'$as_ac_Header'}
13379                  $as_echo "$as_val"'`
13380                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13381 $as_echo "$ac_res" >&6; }
13382
13383 fi
13384 as_val=`eval 'as_val=${'$as_ac_Header'}
13385                  $as_echo "$as_val"'`
13386    if test "x$as_val" = x""yes; then
13387   cat >>confdefs.h <<_ACEOF
13388 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13389 _ACEOF
13390
13391 else
13392
13393 for ac_header in pam/pam_appl.h
13394 do
13395 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13396 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13397   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13398 $as_echo_n "checking for $ac_header... " >&6; }
13399 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13400   $as_echo_n "(cached) " >&6
13401 fi
13402 ac_res=`eval 'as_val=${'$as_ac_Header'}
13403                  $as_echo "$as_val"'`
13404                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13405 $as_echo "$ac_res" >&6; }
13406 else
13407   # Is the header compilable?
13408 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
13409 $as_echo_n "checking $ac_header usability... " >&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 $ac_includes_default
13417 #include <$ac_header>
13418 _ACEOF
13419 rm -f conftest.$ac_objext
13420 if { (ac_try="$ac_compile"
13421 case "(($ac_try" in
13422   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13423   *) ac_try_echo=$ac_try;;
13424 esac
13425 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13426 $as_echo "$ac_try_echo") >&5
13427   (eval "$ac_compile") 2>conftest.er1
13428   ac_status=$?
13429   grep -v '^ *+' conftest.er1 >conftest.err
13430   rm -f conftest.er1
13431   cat conftest.err >&5
13432   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13433   (exit $ac_status); } && {
13434          test -z "$ac_c_werror_flag" ||
13435          test ! -s conftest.err
13436        } && test -s conftest.$ac_objext; then
13437   ac_header_compiler=yes
13438 else
13439   $as_echo "$as_me: failed program was:" >&5
13440 sed 's/^/| /' conftest.$ac_ext >&5
13441
13442         ac_header_compiler=no
13443 fi
13444
13445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13446 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13447 $as_echo "$ac_header_compiler" >&6; }
13448
13449 # Is the header present?
13450 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
13451 $as_echo_n "checking $ac_header presence... " >&6; }
13452 cat >conftest.$ac_ext <<_ACEOF
13453 /* confdefs.h.  */
13454 _ACEOF
13455 cat confdefs.h >>conftest.$ac_ext
13456 cat >>conftest.$ac_ext <<_ACEOF
13457 /* end confdefs.h.  */
13458 #include <$ac_header>
13459 _ACEOF
13460 if { (ac_try="$ac_cpp conftest.$ac_ext"
13461 case "(($ac_try" in
13462   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13463   *) ac_try_echo=$ac_try;;
13464 esac
13465 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13466 $as_echo "$ac_try_echo") >&5
13467   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13468   ac_status=$?
13469   grep -v '^ *+' conftest.er1 >conftest.err
13470   rm -f conftest.er1
13471   cat conftest.err >&5
13472   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13473   (exit $ac_status); } >/dev/null && {
13474          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13475          test ! -s conftest.err
13476        }; then
13477   ac_header_preproc=yes
13478 else
13479   $as_echo "$as_me: failed program was:" >&5
13480 sed 's/^/| /' conftest.$ac_ext >&5
13481
13482   ac_header_preproc=no
13483 fi
13484
13485 rm -f conftest.err conftest.$ac_ext
13486 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13487 $as_echo "$ac_header_preproc" >&6; }
13488
13489 # So?  What about this header?
13490 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13491   yes:no: )
13492     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13493 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13494     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13495 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13496     ac_header_preproc=yes
13497     ;;
13498   no:yes:* )
13499     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13500 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13501     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13502 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13503     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13504 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13505     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13506 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13507     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13508 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13509     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13510 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13511     ( cat <<\_ASBOX
13512 ## ---------------------------------------- ##
13513 ## Report this to pgsql-bugs@postgresql.org ##
13514 ## ---------------------------------------- ##
13515 _ASBOX
13516      ) | sed "s/^/$as_me: WARNING:     /" >&2
13517     ;;
13518 esac
13519 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13520 $as_echo_n "checking for $ac_header... " >&6; }
13521 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13522   $as_echo_n "(cached) " >&6
13523 else
13524   eval "$as_ac_Header=\$ac_header_preproc"
13525 fi
13526 ac_res=`eval 'as_val=${'$as_ac_Header'}
13527                  $as_echo "$as_val"'`
13528                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13529 $as_echo "$ac_res" >&6; }
13530
13531 fi
13532 as_val=`eval 'as_val=${'$as_ac_Header'}
13533                  $as_echo "$as_val"'`
13534    if test "x$as_val" = x""yes; then
13535   cat >>confdefs.h <<_ACEOF
13536 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13537 _ACEOF
13538
13539 else
13540   { { $as_echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
13541 $as_echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
13542    { (exit 1); exit 1; }; }
13543 fi
13544
13545 done
13546
13547 fi
13548
13549 done
13550
13551 fi
13552
13553 if test "$with_libxml" = yes ; then
13554   if test "${ac_cv_header_libxml_parser_h+set}" = set; then
13555   { $as_echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
13556 $as_echo_n "checking for libxml/parser.h... " >&6; }
13557 if test "${ac_cv_header_libxml_parser_h+set}" = set; then
13558   $as_echo_n "(cached) " >&6
13559 fi
13560 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
13561 $as_echo "$ac_cv_header_libxml_parser_h" >&6; }
13562 else
13563   # Is the header compilable?
13564 { $as_echo "$as_me:$LINENO: checking libxml/parser.h usability" >&5
13565 $as_echo_n "checking libxml/parser.h usability... " >&6; }
13566 cat >conftest.$ac_ext <<_ACEOF
13567 /* confdefs.h.  */
13568 _ACEOF
13569 cat confdefs.h >>conftest.$ac_ext
13570 cat >>conftest.$ac_ext <<_ACEOF
13571 /* end confdefs.h.  */
13572 $ac_includes_default
13573 #include <libxml/parser.h>
13574 _ACEOF
13575 rm -f conftest.$ac_objext
13576 if { (ac_try="$ac_compile"
13577 case "(($ac_try" in
13578   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13579   *) ac_try_echo=$ac_try;;
13580 esac
13581 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13582 $as_echo "$ac_try_echo") >&5
13583   (eval "$ac_compile") 2>conftest.er1
13584   ac_status=$?
13585   grep -v '^ *+' conftest.er1 >conftest.err
13586   rm -f conftest.er1
13587   cat conftest.err >&5
13588   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13589   (exit $ac_status); } && {
13590          test -z "$ac_c_werror_flag" ||
13591          test ! -s conftest.err
13592        } && test -s conftest.$ac_objext; then
13593   ac_header_compiler=yes
13594 else
13595   $as_echo "$as_me: failed program was:" >&5
13596 sed 's/^/| /' conftest.$ac_ext >&5
13597
13598         ac_header_compiler=no
13599 fi
13600
13601 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13602 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13603 $as_echo "$ac_header_compiler" >&6; }
13604
13605 # Is the header present?
13606 { $as_echo "$as_me:$LINENO: checking libxml/parser.h presence" >&5
13607 $as_echo_n "checking libxml/parser.h presence... " >&6; }
13608 cat >conftest.$ac_ext <<_ACEOF
13609 /* confdefs.h.  */
13610 _ACEOF
13611 cat confdefs.h >>conftest.$ac_ext
13612 cat >>conftest.$ac_ext <<_ACEOF
13613 /* end confdefs.h.  */
13614 #include <libxml/parser.h>
13615 _ACEOF
13616 if { (ac_try="$ac_cpp conftest.$ac_ext"
13617 case "(($ac_try" in
13618   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13619   *) ac_try_echo=$ac_try;;
13620 esac
13621 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13622 $as_echo "$ac_try_echo") >&5
13623   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13624   ac_status=$?
13625   grep -v '^ *+' conftest.er1 >conftest.err
13626   rm -f conftest.er1
13627   cat conftest.err >&5
13628   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13629   (exit $ac_status); } >/dev/null && {
13630          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13631          test ! -s conftest.err
13632        }; then
13633   ac_header_preproc=yes
13634 else
13635   $as_echo "$as_me: failed program was:" >&5
13636 sed 's/^/| /' conftest.$ac_ext >&5
13637
13638   ac_header_preproc=no
13639 fi
13640
13641 rm -f conftest.err conftest.$ac_ext
13642 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13643 $as_echo "$ac_header_preproc" >&6; }
13644
13645 # So?  What about this header?
13646 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13647   yes:no: )
13648     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&5
13649 $as_echo "$as_me: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13650     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the compiler's result" >&5
13651 $as_echo "$as_me: WARNING: libxml/parser.h: proceeding with the compiler's result" >&2;}
13652     ac_header_preproc=yes
13653     ;;
13654   no:yes:* )
13655     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: present but cannot be compiled" >&5
13656 $as_echo "$as_me: WARNING: libxml/parser.h: present but cannot be compiled" >&2;}
13657     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&5
13658 $as_echo "$as_me: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&2;}
13659     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: see the Autoconf documentation" >&5
13660 $as_echo "$as_me: WARNING: libxml/parser.h: see the Autoconf documentation" >&2;}
13661     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&5
13662 $as_echo "$as_me: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&2;}
13663     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&5
13664 $as_echo "$as_me: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&2;}
13665     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&5
13666 $as_echo "$as_me: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&2;}
13667     ( cat <<\_ASBOX
13668 ## ---------------------------------------- ##
13669 ## Report this to pgsql-bugs@postgresql.org ##
13670 ## ---------------------------------------- ##
13671 _ASBOX
13672      ) | sed "s/^/$as_me: WARNING:     /" >&2
13673     ;;
13674 esac
13675 { $as_echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
13676 $as_echo_n "checking for libxml/parser.h... " >&6; }
13677 if test "${ac_cv_header_libxml_parser_h+set}" = set; then
13678   $as_echo_n "(cached) " >&6
13679 else
13680   ac_cv_header_libxml_parser_h=$ac_header_preproc
13681 fi
13682 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
13683 $as_echo "$ac_cv_header_libxml_parser_h" >&6; }
13684
13685 fi
13686 if test "x$ac_cv_header_libxml_parser_h" = x""yes; then
13687   :
13688 else
13689   { { $as_echo "$as_me:$LINENO: error: header file <libxml/parser.h> is required for XML support" >&5
13690 $as_echo "$as_me: error: header file <libxml/parser.h> is required for XML support" >&2;}
13691    { (exit 1); exit 1; }; }
13692 fi
13693
13694
13695 fi
13696
13697 if test "$with_libxslt" = yes ; then
13698   if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
13699   { $as_echo "$as_me:$LINENO: checking for libxslt/xslt.h" >&5
13700 $as_echo_n "checking for libxslt/xslt.h... " >&6; }
13701 if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
13702   $as_echo_n "(cached) " >&6
13703 fi
13704 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libxslt_xslt_h" >&5
13705 $as_echo "$ac_cv_header_libxslt_xslt_h" >&6; }
13706 else
13707   # Is the header compilable?
13708 { $as_echo "$as_me:$LINENO: checking libxslt/xslt.h usability" >&5
13709 $as_echo_n "checking libxslt/xslt.h usability... " >&6; }
13710 cat >conftest.$ac_ext <<_ACEOF
13711 /* confdefs.h.  */
13712 _ACEOF
13713 cat confdefs.h >>conftest.$ac_ext
13714 cat >>conftest.$ac_ext <<_ACEOF
13715 /* end confdefs.h.  */
13716 $ac_includes_default
13717 #include <libxslt/xslt.h>
13718 _ACEOF
13719 rm -f conftest.$ac_objext
13720 if { (ac_try="$ac_compile"
13721 case "(($ac_try" in
13722   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13723   *) ac_try_echo=$ac_try;;
13724 esac
13725 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13726 $as_echo "$ac_try_echo") >&5
13727   (eval "$ac_compile") 2>conftest.er1
13728   ac_status=$?
13729   grep -v '^ *+' conftest.er1 >conftest.err
13730   rm -f conftest.er1
13731   cat conftest.err >&5
13732   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13733   (exit $ac_status); } && {
13734          test -z "$ac_c_werror_flag" ||
13735          test ! -s conftest.err
13736        } && test -s conftest.$ac_objext; then
13737   ac_header_compiler=yes
13738 else
13739   $as_echo "$as_me: failed program was:" >&5
13740 sed 's/^/| /' conftest.$ac_ext >&5
13741
13742         ac_header_compiler=no
13743 fi
13744
13745 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13746 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13747 $as_echo "$ac_header_compiler" >&6; }
13748
13749 # Is the header present?
13750 { $as_echo "$as_me:$LINENO: checking libxslt/xslt.h presence" >&5
13751 $as_echo_n "checking libxslt/xslt.h presence... " >&6; }
13752 cat >conftest.$ac_ext <<_ACEOF
13753 /* confdefs.h.  */
13754 _ACEOF
13755 cat confdefs.h >>conftest.$ac_ext
13756 cat >>conftest.$ac_ext <<_ACEOF
13757 /* end confdefs.h.  */
13758 #include <libxslt/xslt.h>
13759 _ACEOF
13760 if { (ac_try="$ac_cpp conftest.$ac_ext"
13761 case "(($ac_try" in
13762   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13763   *) ac_try_echo=$ac_try;;
13764 esac
13765 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13766 $as_echo "$ac_try_echo") >&5
13767   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13768   ac_status=$?
13769   grep -v '^ *+' conftest.er1 >conftest.err
13770   rm -f conftest.er1
13771   cat conftest.err >&5
13772   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13773   (exit $ac_status); } >/dev/null && {
13774          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13775          test ! -s conftest.err
13776        }; then
13777   ac_header_preproc=yes
13778 else
13779   $as_echo "$as_me: failed program was:" >&5
13780 sed 's/^/| /' conftest.$ac_ext >&5
13781
13782   ac_header_preproc=no
13783 fi
13784
13785 rm -f conftest.err conftest.$ac_ext
13786 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13787 $as_echo "$ac_header_preproc" >&6; }
13788
13789 # So?  What about this header?
13790 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13791   yes:no: )
13792     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: accepted by the compiler, rejected by the preprocessor!" >&5
13793 $as_echo "$as_me: WARNING: libxslt/xslt.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13794     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: proceeding with the compiler's result" >&5
13795 $as_echo "$as_me: WARNING: libxslt/xslt.h: proceeding with the compiler's result" >&2;}
13796     ac_header_preproc=yes
13797     ;;
13798   no:yes:* )
13799     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: present but cannot be compiled" >&5
13800 $as_echo "$as_me: WARNING: libxslt/xslt.h: present but cannot be compiled" >&2;}
13801     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h:     check for missing prerequisite headers?" >&5
13802 $as_echo "$as_me: WARNING: libxslt/xslt.h:     check for missing prerequisite headers?" >&2;}
13803     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: see the Autoconf documentation" >&5
13804 $as_echo "$as_me: WARNING: libxslt/xslt.h: see the Autoconf documentation" >&2;}
13805     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h:     section \"Present But Cannot Be Compiled\"" >&5
13806 $as_echo "$as_me: WARNING: libxslt/xslt.h:     section \"Present But Cannot Be Compiled\"" >&2;}
13807     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: proceeding with the preprocessor's result" >&5
13808 $as_echo "$as_me: WARNING: libxslt/xslt.h: proceeding with the preprocessor's result" >&2;}
13809     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: in the future, the compiler will take precedence" >&5
13810 $as_echo "$as_me: WARNING: libxslt/xslt.h: in the future, the compiler will take precedence" >&2;}
13811     ( cat <<\_ASBOX
13812 ## ---------------------------------------- ##
13813 ## Report this to pgsql-bugs@postgresql.org ##
13814 ## ---------------------------------------- ##
13815 _ASBOX
13816      ) | sed "s/^/$as_me: WARNING:     /" >&2
13817     ;;
13818 esac
13819 { $as_echo "$as_me:$LINENO: checking for libxslt/xslt.h" >&5
13820 $as_echo_n "checking for libxslt/xslt.h... " >&6; }
13821 if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
13822   $as_echo_n "(cached) " >&6
13823 else
13824   ac_cv_header_libxslt_xslt_h=$ac_header_preproc
13825 fi
13826 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libxslt_xslt_h" >&5
13827 $as_echo "$ac_cv_header_libxslt_xslt_h" >&6; }
13828
13829 fi
13830 if test "x$ac_cv_header_libxslt_xslt_h" = x""yes; then
13831   :
13832 else
13833   { { $as_echo "$as_me:$LINENO: error: header file <libxslt/xslt.h> is required for XSLT support" >&5
13834 $as_echo "$as_me: error: header file <libxslt/xslt.h> is required for XSLT support" >&2;}
13835    { (exit 1); exit 1; }; }
13836 fi
13837
13838
13839 fi
13840
13841 if test "$with_ldap" = yes ; then
13842   if test "$PORTNAME" != "win32"; then
13843
13844 for ac_header in ldap.h
13845 do
13846 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13847 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13848   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13849 $as_echo_n "checking for $ac_header... " >&6; }
13850 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13851   $as_echo_n "(cached) " >&6
13852 fi
13853 ac_res=`eval 'as_val=${'$as_ac_Header'}
13854                  $as_echo "$as_val"'`
13855                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13856 $as_echo "$ac_res" >&6; }
13857 else
13858   # Is the header compilable?
13859 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
13860 $as_echo_n "checking $ac_header usability... " >&6; }
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 $ac_includes_default
13868 #include <$ac_header>
13869 _ACEOF
13870 rm -f conftest.$ac_objext
13871 if { (ac_try="$ac_compile"
13872 case "(($ac_try" in
13873   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13874   *) ac_try_echo=$ac_try;;
13875 esac
13876 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13877 $as_echo "$ac_try_echo") >&5
13878   (eval "$ac_compile") 2>conftest.er1
13879   ac_status=$?
13880   grep -v '^ *+' conftest.er1 >conftest.err
13881   rm -f conftest.er1
13882   cat conftest.err >&5
13883   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13884   (exit $ac_status); } && {
13885          test -z "$ac_c_werror_flag" ||
13886          test ! -s conftest.err
13887        } && test -s conftest.$ac_objext; then
13888   ac_header_compiler=yes
13889 else
13890   $as_echo "$as_me: failed program was:" >&5
13891 sed 's/^/| /' conftest.$ac_ext >&5
13892
13893         ac_header_compiler=no
13894 fi
13895
13896 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13897 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13898 $as_echo "$ac_header_compiler" >&6; }
13899
13900 # Is the header present?
13901 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
13902 $as_echo_n "checking $ac_header presence... " >&6; }
13903 cat >conftest.$ac_ext <<_ACEOF
13904 /* confdefs.h.  */
13905 _ACEOF
13906 cat confdefs.h >>conftest.$ac_ext
13907 cat >>conftest.$ac_ext <<_ACEOF
13908 /* end confdefs.h.  */
13909 #include <$ac_header>
13910 _ACEOF
13911 if { (ac_try="$ac_cpp conftest.$ac_ext"
13912 case "(($ac_try" in
13913   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13914   *) ac_try_echo=$ac_try;;
13915 esac
13916 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13917 $as_echo "$ac_try_echo") >&5
13918   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13919   ac_status=$?
13920   grep -v '^ *+' conftest.er1 >conftest.err
13921   rm -f conftest.er1
13922   cat conftest.err >&5
13923   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13924   (exit $ac_status); } >/dev/null && {
13925          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13926          test ! -s conftest.err
13927        }; then
13928   ac_header_preproc=yes
13929 else
13930   $as_echo "$as_me: failed program was:" >&5
13931 sed 's/^/| /' conftest.$ac_ext >&5
13932
13933   ac_header_preproc=no
13934 fi
13935
13936 rm -f conftest.err conftest.$ac_ext
13937 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13938 $as_echo "$ac_header_preproc" >&6; }
13939
13940 # So?  What about this header?
13941 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13942   yes:no: )
13943     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13944 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13945     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13946 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13947     ac_header_preproc=yes
13948     ;;
13949   no:yes:* )
13950     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13951 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13952     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13953 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13954     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13955 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13956     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13957 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13958     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13959 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13960     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13961 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13962     ( cat <<\_ASBOX
13963 ## ---------------------------------------- ##
13964 ## Report this to pgsql-bugs@postgresql.org ##
13965 ## ---------------------------------------- ##
13966 _ASBOX
13967      ) | sed "s/^/$as_me: WARNING:     /" >&2
13968     ;;
13969 esac
13970 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13971 $as_echo_n "checking for $ac_header... " >&6; }
13972 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13973   $as_echo_n "(cached) " >&6
13974 else
13975   eval "$as_ac_Header=\$ac_header_preproc"
13976 fi
13977 ac_res=`eval 'as_val=${'$as_ac_Header'}
13978                  $as_echo "$as_val"'`
13979                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13980 $as_echo "$ac_res" >&6; }
13981
13982 fi
13983 as_val=`eval 'as_val=${'$as_ac_Header'}
13984                  $as_echo "$as_val"'`
13985    if test "x$as_val" = x""yes; then
13986   cat >>confdefs.h <<_ACEOF
13987 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13988 _ACEOF
13989
13990 else
13991   { { $as_echo "$as_me:$LINENO: error: header file <ldap.h> is required for LDAP" >&5
13992 $as_echo "$as_me: error: header file <ldap.h> is required for LDAP" >&2;}
13993    { (exit 1); exit 1; }; }
13994 fi
13995
13996 done
13997
13998   else
13999
14000 for ac_header in winldap.h
14001 do
14002 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14003 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
14004 $as_echo_n "checking for $ac_header... " >&6; }
14005 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14006   $as_echo_n "(cached) " >&6
14007 else
14008   cat >conftest.$ac_ext <<_ACEOF
14009 /* confdefs.h.  */
14010 _ACEOF
14011 cat confdefs.h >>conftest.$ac_ext
14012 cat >>conftest.$ac_ext <<_ACEOF
14013 /* end confdefs.h.  */
14014 $ac_includes_default
14015 #include <windows.h>
14016
14017
14018 #include <$ac_header>
14019 _ACEOF
14020 rm -f conftest.$ac_objext
14021 if { (ac_try="$ac_compile"
14022 case "(($ac_try" in
14023   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14024   *) ac_try_echo=$ac_try;;
14025 esac
14026 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14027 $as_echo "$ac_try_echo") >&5
14028   (eval "$ac_compile") 2>conftest.er1
14029   ac_status=$?
14030   grep -v '^ *+' conftest.er1 >conftest.err
14031   rm -f conftest.er1
14032   cat conftest.err >&5
14033   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14034   (exit $ac_status); } && {
14035          test -z "$ac_c_werror_flag" ||
14036          test ! -s conftest.err
14037        } && test -s conftest.$ac_objext; then
14038   eval "$as_ac_Header=yes"
14039 else
14040   $as_echo "$as_me: failed program was:" >&5
14041 sed 's/^/| /' conftest.$ac_ext >&5
14042
14043         eval "$as_ac_Header=no"
14044 fi
14045
14046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14047 fi
14048 ac_res=`eval 'as_val=${'$as_ac_Header'}
14049                  $as_echo "$as_val"'`
14050                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
14051 $as_echo "$ac_res" >&6; }
14052 as_val=`eval 'as_val=${'$as_ac_Header'}
14053                  $as_echo "$as_val"'`
14054    if test "x$as_val" = x""yes; then
14055   cat >>confdefs.h <<_ACEOF
14056 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14057 _ACEOF
14058
14059 else
14060   { { $as_echo "$as_me:$LINENO: error: header file <winldap.h> is required for LDAP" >&5
14061 $as_echo "$as_me: error: header file <winldap.h> is required for LDAP" >&2;}
14062    { (exit 1); exit 1; }; }
14063 fi
14064
14065 done
14066
14067   fi
14068 fi
14069
14070 if test "$with_bonjour" = yes ; then
14071   if test "${ac_cv_header_dns_sd_h+set}" = set; then
14072   { $as_echo "$as_me:$LINENO: checking for dns_sd.h" >&5
14073 $as_echo_n "checking for dns_sd.h... " >&6; }
14074 if test "${ac_cv_header_dns_sd_h+set}" = set; then
14075   $as_echo_n "(cached) " >&6
14076 fi
14077 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_dns_sd_h" >&5
14078 $as_echo "$ac_cv_header_dns_sd_h" >&6; }
14079 else
14080   # Is the header compilable?
14081 { $as_echo "$as_me:$LINENO: checking dns_sd.h usability" >&5
14082 $as_echo_n "checking dns_sd.h usability... " >&6; }
14083 cat >conftest.$ac_ext <<_ACEOF
14084 /* confdefs.h.  */
14085 _ACEOF
14086 cat confdefs.h >>conftest.$ac_ext
14087 cat >>conftest.$ac_ext <<_ACEOF
14088 /* end confdefs.h.  */
14089 $ac_includes_default
14090 #include <dns_sd.h>
14091 _ACEOF
14092 rm -f conftest.$ac_objext
14093 if { (ac_try="$ac_compile"
14094 case "(($ac_try" in
14095   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14096   *) ac_try_echo=$ac_try;;
14097 esac
14098 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14099 $as_echo "$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   $as_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   ac_header_compiler=yes
14111 else
14112   $as_echo "$as_me: failed program was:" >&5
14113 sed 's/^/| /' conftest.$ac_ext >&5
14114
14115         ac_header_compiler=no
14116 fi
14117
14118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14119 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14120 $as_echo "$ac_header_compiler" >&6; }
14121
14122 # Is the header present?
14123 { $as_echo "$as_me:$LINENO: checking dns_sd.h presence" >&5
14124 $as_echo_n "checking dns_sd.h presence... " >&6; }
14125 cat >conftest.$ac_ext <<_ACEOF
14126 /* confdefs.h.  */
14127 _ACEOF
14128 cat confdefs.h >>conftest.$ac_ext
14129 cat >>conftest.$ac_ext <<_ACEOF
14130 /* end confdefs.h.  */
14131 #include <dns_sd.h>
14132 _ACEOF
14133 if { (ac_try="$ac_cpp conftest.$ac_ext"
14134 case "(($ac_try" in
14135   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14136   *) ac_try_echo=$ac_try;;
14137 esac
14138 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14139 $as_echo "$ac_try_echo") >&5
14140   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14141   ac_status=$?
14142   grep -v '^ *+' conftest.er1 >conftest.err
14143   rm -f conftest.er1
14144   cat conftest.err >&5
14145   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14146   (exit $ac_status); } >/dev/null && {
14147          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14148          test ! -s conftest.err
14149        }; then
14150   ac_header_preproc=yes
14151 else
14152   $as_echo "$as_me: failed program was:" >&5
14153 sed 's/^/| /' conftest.$ac_ext >&5
14154
14155   ac_header_preproc=no
14156 fi
14157
14158 rm -f conftest.err conftest.$ac_ext
14159 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14160 $as_echo "$ac_header_preproc" >&6; }
14161
14162 # So?  What about this header?
14163 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14164   yes:no: )
14165     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h: accepted by the compiler, rejected by the preprocessor!" >&5
14166 $as_echo "$as_me: WARNING: dns_sd.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14167     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h: proceeding with the compiler's result" >&5
14168 $as_echo "$as_me: WARNING: dns_sd.h: proceeding with the compiler's result" >&2;}
14169     ac_header_preproc=yes
14170     ;;
14171   no:yes:* )
14172     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h: present but cannot be compiled" >&5
14173 $as_echo "$as_me: WARNING: dns_sd.h: present but cannot be compiled" >&2;}
14174     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h:     check for missing prerequisite headers?" >&5
14175 $as_echo "$as_me: WARNING: dns_sd.h:     check for missing prerequisite headers?" >&2;}
14176     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h: see the Autoconf documentation" >&5
14177 $as_echo "$as_me: WARNING: dns_sd.h: see the Autoconf documentation" >&2;}
14178     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h:     section \"Present But Cannot Be Compiled\"" >&5
14179 $as_echo "$as_me: WARNING: dns_sd.h:     section \"Present But Cannot Be Compiled\"" >&2;}
14180     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h: proceeding with the preprocessor's result" >&5
14181 $as_echo "$as_me: WARNING: dns_sd.h: proceeding with the preprocessor's result" >&2;}
14182     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h: in the future, the compiler will take precedence" >&5
14183 $as_echo "$as_me: WARNING: dns_sd.h: in the future, the compiler will take precedence" >&2;}
14184     ( cat <<\_ASBOX
14185 ## ---------------------------------------- ##
14186 ## Report this to pgsql-bugs@postgresql.org ##
14187 ## ---------------------------------------- ##
14188 _ASBOX
14189      ) | sed "s/^/$as_me: WARNING:     /" >&2
14190     ;;
14191 esac
14192 { $as_echo "$as_me:$LINENO: checking for dns_sd.h" >&5
14193 $as_echo_n "checking for dns_sd.h... " >&6; }
14194 if test "${ac_cv_header_dns_sd_h+set}" = set; then
14195   $as_echo_n "(cached) " >&6
14196 else
14197   ac_cv_header_dns_sd_h=$ac_header_preproc
14198 fi
14199 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_dns_sd_h" >&5
14200 $as_echo "$ac_cv_header_dns_sd_h" >&6; }
14201
14202 fi
14203 if test "x$ac_cv_header_dns_sd_h" = x""yes; then
14204   :
14205 else
14206   { { $as_echo "$as_me:$LINENO: error: header file <dns_sd.h> is required for Bonjour" >&5
14207 $as_echo "$as_me: error: header file <dns_sd.h> is required for Bonjour" >&2;}
14208    { (exit 1); exit 1; }; }
14209 fi
14210
14211
14212 fi
14213
14214 # for contrib/uuid-ossp
14215 if test "$with_ossp_uuid" = yes ; then
14216
14217 for ac_header in ossp/uuid.h
14218 do
14219 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14220 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14221   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
14222 $as_echo_n "checking for $ac_header... " >&6; }
14223 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14224   $as_echo_n "(cached) " >&6
14225 fi
14226 ac_res=`eval 'as_val=${'$as_ac_Header'}
14227                  $as_echo "$as_val"'`
14228                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
14229 $as_echo "$ac_res" >&6; }
14230 else
14231   # Is the header compilable?
14232 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
14233 $as_echo_n "checking $ac_header usability... " >&6; }
14234 cat >conftest.$ac_ext <<_ACEOF
14235 /* confdefs.h.  */
14236 _ACEOF
14237 cat confdefs.h >>conftest.$ac_ext
14238 cat >>conftest.$ac_ext <<_ACEOF
14239 /* end confdefs.h.  */
14240 $ac_includes_default
14241 #include <$ac_header>
14242 _ACEOF
14243 rm -f conftest.$ac_objext
14244 if { (ac_try="$ac_compile"
14245 case "(($ac_try" in
14246   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14247   *) ac_try_echo=$ac_try;;
14248 esac
14249 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14250 $as_echo "$ac_try_echo") >&5
14251   (eval "$ac_compile") 2>conftest.er1
14252   ac_status=$?
14253   grep -v '^ *+' conftest.er1 >conftest.err
14254   rm -f conftest.er1
14255   cat conftest.err >&5
14256   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14257   (exit $ac_status); } && {
14258          test -z "$ac_c_werror_flag" ||
14259          test ! -s conftest.err
14260        } && test -s conftest.$ac_objext; then
14261   ac_header_compiler=yes
14262 else
14263   $as_echo "$as_me: failed program was:" >&5
14264 sed 's/^/| /' conftest.$ac_ext >&5
14265
14266         ac_header_compiler=no
14267 fi
14268
14269 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14270 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14271 $as_echo "$ac_header_compiler" >&6; }
14272
14273 # Is the header present?
14274 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
14275 $as_echo_n "checking $ac_header presence... " >&6; }
14276 cat >conftest.$ac_ext <<_ACEOF
14277 /* confdefs.h.  */
14278 _ACEOF
14279 cat confdefs.h >>conftest.$ac_ext
14280 cat >>conftest.$ac_ext <<_ACEOF
14281 /* end confdefs.h.  */
14282 #include <$ac_header>
14283 _ACEOF
14284 if { (ac_try="$ac_cpp conftest.$ac_ext"
14285 case "(($ac_try" in
14286   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14287   *) ac_try_echo=$ac_try;;
14288 esac
14289 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14290 $as_echo "$ac_try_echo") >&5
14291   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14292   ac_status=$?
14293   grep -v '^ *+' conftest.er1 >conftest.err
14294   rm -f conftest.er1
14295   cat conftest.err >&5
14296   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14297   (exit $ac_status); } >/dev/null && {
14298          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14299          test ! -s conftest.err
14300        }; then
14301   ac_header_preproc=yes
14302 else
14303   $as_echo "$as_me: failed program was:" >&5
14304 sed 's/^/| /' conftest.$ac_ext >&5
14305
14306   ac_header_preproc=no
14307 fi
14308
14309 rm -f conftest.err conftest.$ac_ext
14310 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14311 $as_echo "$ac_header_preproc" >&6; }
14312
14313 # So?  What about this header?
14314 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14315   yes:no: )
14316     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14317 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14318     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14319 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14320     ac_header_preproc=yes
14321     ;;
14322   no:yes:* )
14323     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14324 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14325     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
14326 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
14327     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14328 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14329     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
14330 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
14331     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14332 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14333     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14334 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14335     ( cat <<\_ASBOX
14336 ## ---------------------------------------- ##
14337 ## Report this to pgsql-bugs@postgresql.org ##
14338 ## ---------------------------------------- ##
14339 _ASBOX
14340      ) | sed "s/^/$as_me: WARNING:     /" >&2
14341     ;;
14342 esac
14343 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
14344 $as_echo_n "checking for $ac_header... " >&6; }
14345 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14346   $as_echo_n "(cached) " >&6
14347 else
14348   eval "$as_ac_Header=\$ac_header_preproc"
14349 fi
14350 ac_res=`eval 'as_val=${'$as_ac_Header'}
14351                  $as_echo "$as_val"'`
14352                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
14353 $as_echo "$ac_res" >&6; }
14354
14355 fi
14356 as_val=`eval 'as_val=${'$as_ac_Header'}
14357                  $as_echo "$as_val"'`
14358    if test "x$as_val" = x""yes; then
14359   cat >>confdefs.h <<_ACEOF
14360 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14361 _ACEOF
14362
14363 else
14364
14365
14366 for ac_header in uuid.h
14367 do
14368 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14369 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14370   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
14371 $as_echo_n "checking for $ac_header... " >&6; }
14372 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14373   $as_echo_n "(cached) " >&6
14374 fi
14375 ac_res=`eval 'as_val=${'$as_ac_Header'}
14376                  $as_echo "$as_val"'`
14377                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
14378 $as_echo "$ac_res" >&6; }
14379 else
14380   # Is the header compilable?
14381 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
14382 $as_echo_n "checking $ac_header usability... " >&6; }
14383 cat >conftest.$ac_ext <<_ACEOF
14384 /* confdefs.h.  */
14385 _ACEOF
14386 cat confdefs.h >>conftest.$ac_ext
14387 cat >>conftest.$ac_ext <<_ACEOF
14388 /* end confdefs.h.  */
14389 $ac_includes_default
14390 #include <$ac_header>
14391 _ACEOF
14392 rm -f conftest.$ac_objext
14393 if { (ac_try="$ac_compile"
14394 case "(($ac_try" in
14395   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14396   *) ac_try_echo=$ac_try;;
14397 esac
14398 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14399 $as_echo "$ac_try_echo") >&5
14400   (eval "$ac_compile") 2>conftest.er1
14401   ac_status=$?
14402   grep -v '^ *+' conftest.er1 >conftest.err
14403   rm -f conftest.er1
14404   cat conftest.err >&5
14405   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14406   (exit $ac_status); } && {
14407          test -z "$ac_c_werror_flag" ||
14408          test ! -s conftest.err
14409        } && test -s conftest.$ac_objext; then
14410   ac_header_compiler=yes
14411 else
14412   $as_echo "$as_me: failed program was:" >&5
14413 sed 's/^/| /' conftest.$ac_ext >&5
14414
14415         ac_header_compiler=no
14416 fi
14417
14418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14419 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14420 $as_echo "$ac_header_compiler" >&6; }
14421
14422 # Is the header present?
14423 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
14424 $as_echo_n "checking $ac_header presence... " >&6; }
14425 cat >conftest.$ac_ext <<_ACEOF
14426 /* confdefs.h.  */
14427 _ACEOF
14428 cat confdefs.h >>conftest.$ac_ext
14429 cat >>conftest.$ac_ext <<_ACEOF
14430 /* end confdefs.h.  */
14431 #include <$ac_header>
14432 _ACEOF
14433 if { (ac_try="$ac_cpp conftest.$ac_ext"
14434 case "(($ac_try" in
14435   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14436   *) ac_try_echo=$ac_try;;
14437 esac
14438 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14439 $as_echo "$ac_try_echo") >&5
14440   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14441   ac_status=$?
14442   grep -v '^ *+' conftest.er1 >conftest.err
14443   rm -f conftest.er1
14444   cat conftest.err >&5
14445   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14446   (exit $ac_status); } >/dev/null && {
14447          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14448          test ! -s conftest.err
14449        }; then
14450   ac_header_preproc=yes
14451 else
14452   $as_echo "$as_me: failed program was:" >&5
14453 sed 's/^/| /' conftest.$ac_ext >&5
14454
14455   ac_header_preproc=no
14456 fi
14457
14458 rm -f conftest.err conftest.$ac_ext
14459 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14460 $as_echo "$ac_header_preproc" >&6; }
14461
14462 # So?  What about this header?
14463 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14464   yes:no: )
14465     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14466 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14467     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14468 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14469     ac_header_preproc=yes
14470     ;;
14471   no:yes:* )
14472     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14473 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14474     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
14475 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
14476     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14477 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14478     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
14479 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
14480     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14481 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14482     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14483 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14484     ( cat <<\_ASBOX
14485 ## ---------------------------------------- ##
14486 ## Report this to pgsql-bugs@postgresql.org ##
14487 ## ---------------------------------------- ##
14488 _ASBOX
14489      ) | sed "s/^/$as_me: WARNING:     /" >&2
14490     ;;
14491 esac
14492 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
14493 $as_echo_n "checking for $ac_header... " >&6; }
14494 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14495   $as_echo_n "(cached) " >&6
14496 else
14497   eval "$as_ac_Header=\$ac_header_preproc"
14498 fi
14499 ac_res=`eval 'as_val=${'$as_ac_Header'}
14500                  $as_echo "$as_val"'`
14501                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
14502 $as_echo "$ac_res" >&6; }
14503
14504 fi
14505 as_val=`eval 'as_val=${'$as_ac_Header'}
14506                  $as_echo "$as_val"'`
14507    if test "x$as_val" = x""yes; then
14508   cat >>confdefs.h <<_ACEOF
14509 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14510 _ACEOF
14511
14512 else
14513   { { $as_echo "$as_me:$LINENO: error: header file <ossp/uuid.h> or <uuid.h> is required for OSSP-UUID" >&5
14514 $as_echo "$as_me: error: header file <ossp/uuid.h> or <uuid.h> is required for OSSP-UUID" >&2;}
14515    { (exit 1); exit 1; }; }
14516 fi
14517
14518 done
14519
14520 fi
14521
14522 done
14523
14524 fi
14525
14526 if test "$PORTNAME" = "win32" ; then
14527
14528 for ac_header in crtdefs.h
14529 do
14530 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14531 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14532   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
14533 $as_echo_n "checking for $ac_header... " >&6; }
14534 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14535   $as_echo_n "(cached) " >&6
14536 fi
14537 ac_res=`eval 'as_val=${'$as_ac_Header'}
14538                  $as_echo "$as_val"'`
14539                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
14540 $as_echo "$ac_res" >&6; }
14541 else
14542   # Is the header compilable?
14543 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
14544 $as_echo_n "checking $ac_header usability... " >&6; }
14545 cat >conftest.$ac_ext <<_ACEOF
14546 /* confdefs.h.  */
14547 _ACEOF
14548 cat confdefs.h >>conftest.$ac_ext
14549 cat >>conftest.$ac_ext <<_ACEOF
14550 /* end confdefs.h.  */
14551 $ac_includes_default
14552 #include <$ac_header>
14553 _ACEOF
14554 rm -f conftest.$ac_objext
14555 if { (ac_try="$ac_compile"
14556 case "(($ac_try" in
14557   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14558   *) ac_try_echo=$ac_try;;
14559 esac
14560 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14561 $as_echo "$ac_try_echo") >&5
14562   (eval "$ac_compile") 2>conftest.er1
14563   ac_status=$?
14564   grep -v '^ *+' conftest.er1 >conftest.err
14565   rm -f conftest.er1
14566   cat conftest.err >&5
14567   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14568   (exit $ac_status); } && {
14569          test -z "$ac_c_werror_flag" ||
14570          test ! -s conftest.err
14571        } && test -s conftest.$ac_objext; then
14572   ac_header_compiler=yes
14573 else
14574   $as_echo "$as_me: failed program was:" >&5
14575 sed 's/^/| /' conftest.$ac_ext >&5
14576
14577         ac_header_compiler=no
14578 fi
14579
14580 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14581 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14582 $as_echo "$ac_header_compiler" >&6; }
14583
14584 # Is the header present?
14585 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
14586 $as_echo_n "checking $ac_header presence... " >&6; }
14587 cat >conftest.$ac_ext <<_ACEOF
14588 /* confdefs.h.  */
14589 _ACEOF
14590 cat confdefs.h >>conftest.$ac_ext
14591 cat >>conftest.$ac_ext <<_ACEOF
14592 /* end confdefs.h.  */
14593 #include <$ac_header>
14594 _ACEOF
14595 if { (ac_try="$ac_cpp conftest.$ac_ext"
14596 case "(($ac_try" in
14597   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14598   *) ac_try_echo=$ac_try;;
14599 esac
14600 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14601 $as_echo "$ac_try_echo") >&5
14602   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14603   ac_status=$?
14604   grep -v '^ *+' conftest.er1 >conftest.err
14605   rm -f conftest.er1
14606   cat conftest.err >&5
14607   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14608   (exit $ac_status); } >/dev/null && {
14609          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14610          test ! -s conftest.err
14611        }; then
14612   ac_header_preproc=yes
14613 else
14614   $as_echo "$as_me: failed program was:" >&5
14615 sed 's/^/| /' conftest.$ac_ext >&5
14616
14617   ac_header_preproc=no
14618 fi
14619
14620 rm -f conftest.err conftest.$ac_ext
14621 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14622 $as_echo "$ac_header_preproc" >&6; }
14623
14624 # So?  What about this header?
14625 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14626   yes:no: )
14627     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14628 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14629     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14630 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14631     ac_header_preproc=yes
14632     ;;
14633   no:yes:* )
14634     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14635 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14636     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
14637 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
14638     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14639 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14640     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
14641 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
14642     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14643 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14644     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14645 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14646     ( cat <<\_ASBOX
14647 ## ---------------------------------------- ##
14648 ## Report this to pgsql-bugs@postgresql.org ##
14649 ## ---------------------------------------- ##
14650 _ASBOX
14651      ) | sed "s/^/$as_me: WARNING:     /" >&2
14652     ;;
14653 esac
14654 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
14655 $as_echo_n "checking for $ac_header... " >&6; }
14656 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14657   $as_echo_n "(cached) " >&6
14658 else
14659   eval "$as_ac_Header=\$ac_header_preproc"
14660 fi
14661 ac_res=`eval 'as_val=${'$as_ac_Header'}
14662                  $as_echo "$as_val"'`
14663                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
14664 $as_echo "$ac_res" >&6; }
14665
14666 fi
14667 as_val=`eval 'as_val=${'$as_ac_Header'}
14668                  $as_echo "$as_val"'`
14669    if test "x$as_val" = x""yes; then
14670   cat >>confdefs.h <<_ACEOF
14671 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14672 _ACEOF
14673
14674 fi
14675
14676 done
14677
14678 fi
14679
14680 ##
14681 ## Types, structures, compiler characteristics
14682 ##
14683
14684
14685  { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
14686 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
14687 if test "${ac_cv_c_bigendian+set}" = set; then
14688   $as_echo_n "(cached) " >&6
14689 else
14690   ac_cv_c_bigendian=unknown
14691     # See if we're dealing with a universal compiler.
14692     cat >conftest.$ac_ext <<_ACEOF
14693 /* confdefs.h.  */
14694 _ACEOF
14695 cat confdefs.h >>conftest.$ac_ext
14696 cat >>conftest.$ac_ext <<_ACEOF
14697 /* end confdefs.h.  */
14698 #ifndef __APPLE_CC__
14699                not a universal capable compiler
14700              #endif
14701              typedef int dummy;
14702
14703 _ACEOF
14704 rm -f conftest.$ac_objext
14705 if { (ac_try="$ac_compile"
14706 case "(($ac_try" in
14707   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14708   *) ac_try_echo=$ac_try;;
14709 esac
14710 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14711 $as_echo "$ac_try_echo") >&5
14712   (eval "$ac_compile") 2>conftest.er1
14713   ac_status=$?
14714   grep -v '^ *+' conftest.er1 >conftest.err
14715   rm -f conftest.er1
14716   cat conftest.err >&5
14717   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14718   (exit $ac_status); } && {
14719          test -z "$ac_c_werror_flag" ||
14720          test ! -s conftest.err
14721        } && test -s conftest.$ac_objext; then
14722
14723         # Check for potential -arch flags.  It is not universal unless
14724         # there are some -arch flags.  Note that *ppc* also matches
14725         # ppc64.  This check is also rather less than ideal.
14726         case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in  #(
14727           *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
14728         esac
14729 else
14730   $as_echo "$as_me: failed program was:" >&5
14731 sed 's/^/| /' conftest.$ac_ext >&5
14732
14733
14734 fi
14735
14736 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14737     if test $ac_cv_c_bigendian = unknown; then
14738       # See if sys/param.h defines the BYTE_ORDER macro.
14739       cat >conftest.$ac_ext <<_ACEOF
14740 /* confdefs.h.  */
14741 _ACEOF
14742 cat confdefs.h >>conftest.$ac_ext
14743 cat >>conftest.$ac_ext <<_ACEOF
14744 /* end confdefs.h.  */
14745 #include <sys/types.h>
14746              #include <sys/param.h>
14747
14748 int
14749 main ()
14750 {
14751 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14752                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14753                      && LITTLE_ENDIAN)
14754               bogus endian macros
14755              #endif
14756
14757   ;
14758   return 0;
14759 }
14760 _ACEOF
14761 rm -f conftest.$ac_objext
14762 if { (ac_try="$ac_compile"
14763 case "(($ac_try" in
14764   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14765   *) ac_try_echo=$ac_try;;
14766 esac
14767 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14768 $as_echo "$ac_try_echo") >&5
14769   (eval "$ac_compile") 2>conftest.er1
14770   ac_status=$?
14771   grep -v '^ *+' conftest.er1 >conftest.err
14772   rm -f conftest.er1
14773   cat conftest.err >&5
14774   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14775   (exit $ac_status); } && {
14776          test -z "$ac_c_werror_flag" ||
14777          test ! -s conftest.err
14778        } && test -s conftest.$ac_objext; then
14779   # It does; now see whether it defined to BIG_ENDIAN or not.
14780          cat >conftest.$ac_ext <<_ACEOF
14781 /* confdefs.h.  */
14782 _ACEOF
14783 cat confdefs.h >>conftest.$ac_ext
14784 cat >>conftest.$ac_ext <<_ACEOF
14785 /* end confdefs.h.  */
14786 #include <sys/types.h>
14787                 #include <sys/param.h>
14788
14789 int
14790 main ()
14791 {
14792 #if BYTE_ORDER != BIG_ENDIAN
14793                  not big endian
14794                 #endif
14795
14796   ;
14797   return 0;
14798 }
14799 _ACEOF
14800 rm -f conftest.$ac_objext
14801 if { (ac_try="$ac_compile"
14802 case "(($ac_try" in
14803   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14804   *) ac_try_echo=$ac_try;;
14805 esac
14806 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14807 $as_echo "$ac_try_echo") >&5
14808   (eval "$ac_compile") 2>conftest.er1
14809   ac_status=$?
14810   grep -v '^ *+' conftest.er1 >conftest.err
14811   rm -f conftest.er1
14812   cat conftest.err >&5
14813   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14814   (exit $ac_status); } && {
14815          test -z "$ac_c_werror_flag" ||
14816          test ! -s conftest.err
14817        } && test -s conftest.$ac_objext; then
14818   ac_cv_c_bigendian=yes
14819 else
14820   $as_echo "$as_me: failed program was:" >&5
14821 sed 's/^/| /' conftest.$ac_ext >&5
14822
14823         ac_cv_c_bigendian=no
14824 fi
14825
14826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14827 else
14828   $as_echo "$as_me: failed program was:" >&5
14829 sed 's/^/| /' conftest.$ac_ext >&5
14830
14831
14832 fi
14833
14834 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14835     fi
14836     if test $ac_cv_c_bigendian = unknown; then
14837       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14838       cat >conftest.$ac_ext <<_ACEOF
14839 /* confdefs.h.  */
14840 _ACEOF
14841 cat confdefs.h >>conftest.$ac_ext
14842 cat >>conftest.$ac_ext <<_ACEOF
14843 /* end confdefs.h.  */
14844 #include <limits.h>
14845
14846 int
14847 main ()
14848 {
14849 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14850               bogus endian macros
14851              #endif
14852
14853   ;
14854   return 0;
14855 }
14856 _ACEOF
14857 rm -f conftest.$ac_objext
14858 if { (ac_try="$ac_compile"
14859 case "(($ac_try" in
14860   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14861   *) ac_try_echo=$ac_try;;
14862 esac
14863 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14864 $as_echo "$ac_try_echo") >&5
14865   (eval "$ac_compile") 2>conftest.er1
14866   ac_status=$?
14867   grep -v '^ *+' conftest.er1 >conftest.err
14868   rm -f conftest.er1
14869   cat conftest.err >&5
14870   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14871   (exit $ac_status); } && {
14872          test -z "$ac_c_werror_flag" ||
14873          test ! -s conftest.err
14874        } && test -s conftest.$ac_objext; then
14875   # It does; now see whether it defined to _BIG_ENDIAN or not.
14876          cat >conftest.$ac_ext <<_ACEOF
14877 /* confdefs.h.  */
14878 _ACEOF
14879 cat confdefs.h >>conftest.$ac_ext
14880 cat >>conftest.$ac_ext <<_ACEOF
14881 /* end confdefs.h.  */
14882 #include <limits.h>
14883
14884 int
14885 main ()
14886 {
14887 #ifndef _BIG_ENDIAN
14888                  not big endian
14889                 #endif
14890
14891   ;
14892   return 0;
14893 }
14894 _ACEOF
14895 rm -f conftest.$ac_objext
14896 if { (ac_try="$ac_compile"
14897 case "(($ac_try" in
14898   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14899   *) ac_try_echo=$ac_try;;
14900 esac
14901 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14902 $as_echo "$ac_try_echo") >&5
14903   (eval "$ac_compile") 2>conftest.er1
14904   ac_status=$?
14905   grep -v '^ *+' conftest.er1 >conftest.err
14906   rm -f conftest.er1
14907   cat conftest.err >&5
14908   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14909   (exit $ac_status); } && {
14910          test -z "$ac_c_werror_flag" ||
14911          test ! -s conftest.err
14912        } && test -s conftest.$ac_objext; then
14913   ac_cv_c_bigendian=yes
14914 else
14915   $as_echo "$as_me: failed program was:" >&5
14916 sed 's/^/| /' conftest.$ac_ext >&5
14917
14918         ac_cv_c_bigendian=no
14919 fi
14920
14921 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14922 else
14923   $as_echo "$as_me: failed program was:" >&5
14924 sed 's/^/| /' conftest.$ac_ext >&5
14925
14926
14927 fi
14928
14929 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14930     fi
14931     if test $ac_cv_c_bigendian = unknown; then
14932       # Compile a test program.
14933       if test "$cross_compiling" = yes; then
14934   # Try to guess by grepping values from an object file.
14935          cat >conftest.$ac_ext <<_ACEOF
14936 /* confdefs.h.  */
14937 _ACEOF
14938 cat confdefs.h >>conftest.$ac_ext
14939 cat >>conftest.$ac_ext <<_ACEOF
14940 /* end confdefs.h.  */
14941 short int ascii_mm[] =
14942                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14943                 short int ascii_ii[] =
14944                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14945                 int use_ascii (int i) {
14946                   return ascii_mm[i] + ascii_ii[i];
14947                 }
14948                 short int ebcdic_ii[] =
14949                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14950                 short int ebcdic_mm[] =
14951                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14952                 int use_ebcdic (int i) {
14953                   return ebcdic_mm[i] + ebcdic_ii[i];
14954                 }
14955                 extern int foo;
14956
14957 int
14958 main ()
14959 {
14960 return use_ascii (foo) == use_ebcdic (foo);
14961   ;
14962   return 0;
14963 }
14964 _ACEOF
14965 rm -f conftest.$ac_objext
14966 if { (ac_try="$ac_compile"
14967 case "(($ac_try" in
14968   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14969   *) ac_try_echo=$ac_try;;
14970 esac
14971 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14972 $as_echo "$ac_try_echo") >&5
14973   (eval "$ac_compile") 2>conftest.er1
14974   ac_status=$?
14975   grep -v '^ *+' conftest.er1 >conftest.err
14976   rm -f conftest.er1
14977   cat conftest.err >&5
14978   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14979   (exit $ac_status); } && {
14980          test -z "$ac_c_werror_flag" ||
14981          test ! -s conftest.err
14982        } && test -s conftest.$ac_objext; then
14983   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14984               ac_cv_c_bigendian=yes
14985             fi
14986             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14987               if test "$ac_cv_c_bigendian" = unknown; then
14988                 ac_cv_c_bigendian=no
14989               else
14990                 # finding both strings is unlikely to happen, but who knows?
14991                 ac_cv_c_bigendian=unknown
14992               fi
14993             fi
14994 else
14995   $as_echo "$as_me: failed program was:" >&5
14996 sed 's/^/| /' conftest.$ac_ext >&5
14997
14998
14999 fi
15000
15001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15002 else
15003   cat >conftest.$ac_ext <<_ACEOF
15004 /* confdefs.h.  */
15005 _ACEOF
15006 cat confdefs.h >>conftest.$ac_ext
15007 cat >>conftest.$ac_ext <<_ACEOF
15008 /* end confdefs.h.  */
15009 $ac_includes_default
15010 int
15011 main ()
15012 {
15013
15014              /* Are we little or big endian?  From Harbison&Steele.  */
15015              union
15016              {
15017                long int l;
15018                char c[sizeof (long int)];
15019              } u;
15020              u.l = 1;
15021              return u.c[sizeof (long int) - 1] == 1;
15022
15023   ;
15024   return 0;
15025 }
15026 _ACEOF
15027 rm -f conftest$ac_exeext
15028 if { (ac_try="$ac_link"
15029 case "(($ac_try" in
15030   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15031   *) ac_try_echo=$ac_try;;
15032 esac
15033 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15034 $as_echo "$ac_try_echo") >&5
15035   (eval "$ac_link") 2>&5
15036   ac_status=$?
15037   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15038   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15039   { (case "(($ac_try" in
15040   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15041   *) ac_try_echo=$ac_try;;
15042 esac
15043 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15044 $as_echo "$ac_try_echo") >&5
15045   (eval "$ac_try") 2>&5
15046   ac_status=$?
15047   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15048   (exit $ac_status); }; }; then
15049   ac_cv_c_bigendian=no
15050 else
15051   $as_echo "$as_me: program exited with status $ac_status" >&5
15052 $as_echo "$as_me: failed program was:" >&5
15053 sed 's/^/| /' conftest.$ac_ext >&5
15054
15055 ( exit $ac_status )
15056 ac_cv_c_bigendian=yes
15057 fi
15058 rm -rf conftest.dSYM
15059 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15060 fi
15061
15062
15063     fi
15064 fi
15065 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15066 $as_echo "$ac_cv_c_bigendian" >&6; }
15067  case $ac_cv_c_bigendian in #(
15068    yes)
15069      cat >>confdefs.h <<\_ACEOF
15070 #define WORDS_BIGENDIAN 1
15071 _ACEOF
15072 ;; #(
15073    no)
15074       ;; #(
15075    universal)
15076
15077 cat >>confdefs.h <<\_ACEOF
15078 #define AC_APPLE_UNIVERSAL_BUILD 1
15079 _ACEOF
15080
15081      ;; #(
15082    *)
15083      { { $as_echo "$as_me:$LINENO: error: unknown endianness
15084  presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15085 $as_echo "$as_me: error: unknown endianness
15086  presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15087    { (exit 1); exit 1; }; } ;;
15088  esac
15089
15090 { $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
15091 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
15092 if test "${ac_cv_c_const+set}" = set; then
15093   $as_echo_n "(cached) " >&6
15094 else
15095   cat >conftest.$ac_ext <<_ACEOF
15096 /* confdefs.h.  */
15097 _ACEOF
15098 cat confdefs.h >>conftest.$ac_ext
15099 cat >>conftest.$ac_ext <<_ACEOF
15100 /* end confdefs.h.  */
15101
15102 int
15103 main ()
15104 {
15105 /* FIXME: Include the comments suggested by Paul. */
15106 #ifndef __cplusplus
15107   /* Ultrix mips cc rejects this.  */
15108   typedef int charset[2];
15109   const charset cs;
15110   /* SunOS 4.1.1 cc rejects this.  */
15111   char const *const *pcpcc;
15112   char **ppc;
15113   /* NEC SVR4.0.2 mips cc rejects this.  */
15114   struct point {int x, y;};
15115   static struct point const zero = {0,0};
15116   /* AIX XL C 1.02.0.0 rejects this.
15117      It does not let you subtract one const X* pointer from another in
15118      an arm of an if-expression whose if-part is not a constant
15119      expression */
15120   const char *g = "string";
15121   pcpcc = &g + (g ? g-g : 0);
15122   /* HPUX 7.0 cc rejects these. */
15123   ++pcpcc;
15124   ppc = (char**) pcpcc;
15125   pcpcc = (char const *const *) ppc;
15126   { /* SCO 3.2v4 cc rejects this.  */
15127     char *t;
15128     char const *s = 0 ? (char *) 0 : (char const *) 0;
15129
15130     *t++ = 0;
15131     if (s) return 0;
15132   }
15133   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15134     int x[] = {25, 17};
15135     const int *foo = &x[0];
15136     ++foo;
15137   }
15138   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15139     typedef const int *iptr;
15140     iptr p = 0;
15141     ++p;
15142   }
15143   { /* AIX XL C 1.02.0.0 rejects this saying
15144        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15145     struct s { int j; const int *ap[3]; };
15146     struct s *b; b->j = 5;
15147   }
15148   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15149     const int foo = 10;
15150     if (!foo) return 0;
15151   }
15152   return !cs[0] && !zero.x;
15153 #endif
15154
15155   ;
15156   return 0;
15157 }
15158 _ACEOF
15159 rm -f conftest.$ac_objext
15160 if { (ac_try="$ac_compile"
15161 case "(($ac_try" in
15162   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15163   *) ac_try_echo=$ac_try;;
15164 esac
15165 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15166 $as_echo "$ac_try_echo") >&5
15167   (eval "$ac_compile") 2>conftest.er1
15168   ac_status=$?
15169   grep -v '^ *+' conftest.er1 >conftest.err
15170   rm -f conftest.er1
15171   cat conftest.err >&5
15172   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15173   (exit $ac_status); } && {
15174          test -z "$ac_c_werror_flag" ||
15175          test ! -s conftest.err
15176        } && test -s conftest.$ac_objext; then
15177   ac_cv_c_const=yes
15178 else
15179   $as_echo "$as_me: failed program was:" >&5
15180 sed 's/^/| /' conftest.$ac_ext >&5
15181
15182         ac_cv_c_const=no
15183 fi
15184
15185 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15186 fi
15187 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
15188 $as_echo "$ac_cv_c_const" >&6; }
15189 if test $ac_cv_c_const = no; then
15190
15191 cat >>confdefs.h <<\_ACEOF
15192 #define const /**/
15193 _ACEOF
15194
15195 fi
15196
15197 { $as_echo "$as_me:$LINENO: checking for inline" >&5
15198 $as_echo_n "checking for inline... " >&6; }
15199 if test "${ac_cv_c_inline+set}" = set; then
15200   $as_echo_n "(cached) " >&6
15201 else
15202   ac_cv_c_inline=no
15203 for ac_kw in inline __inline__ __inline; do
15204   cat >conftest.$ac_ext <<_ACEOF
15205 /* confdefs.h.  */
15206 _ACEOF
15207 cat confdefs.h >>conftest.$ac_ext
15208 cat >>conftest.$ac_ext <<_ACEOF
15209 /* end confdefs.h.  */
15210 #ifndef __cplusplus
15211 typedef int foo_t;
15212 static $ac_kw foo_t static_foo () {return 0; }
15213 $ac_kw foo_t foo () {return 0; }
15214 #endif
15215
15216 _ACEOF
15217 rm -f conftest.$ac_objext
15218 if { (ac_try="$ac_compile"
15219 case "(($ac_try" in
15220   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15221   *) ac_try_echo=$ac_try;;
15222 esac
15223 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15224 $as_echo "$ac_try_echo") >&5
15225   (eval "$ac_compile") 2>conftest.er1
15226   ac_status=$?
15227   grep -v '^ *+' conftest.er1 >conftest.err
15228   rm -f conftest.er1
15229   cat conftest.err >&5
15230   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15231   (exit $ac_status); } && {
15232          test -z "$ac_c_werror_flag" ||
15233          test ! -s conftest.err
15234        } && test -s conftest.$ac_objext; then
15235   ac_cv_c_inline=$ac_kw
15236 else
15237   $as_echo "$as_me: failed program was:" >&5
15238 sed 's/^/| /' conftest.$ac_ext >&5
15239
15240
15241 fi
15242
15243 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15244   test "$ac_cv_c_inline" != no && break
15245 done
15246
15247 fi
15248 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
15249 $as_echo "$ac_cv_c_inline" >&6; }
15250
15251
15252 case $ac_cv_c_inline in
15253   inline | yes) ;;
15254   *)
15255     case $ac_cv_c_inline in
15256       no) ac_val=;;
15257       *) ac_val=$ac_cv_c_inline;;
15258     esac
15259     cat >>confdefs.h <<_ACEOF
15260 #ifndef __cplusplus
15261 #define inline $ac_val
15262 #endif
15263 _ACEOF
15264     ;;
15265 esac
15266
15267 { $as_echo "$as_me:$LINENO: checking for quiet inline (no complaint if unreferenced)" >&5
15268 $as_echo_n "checking for quiet inline (no complaint if unreferenced)... " >&6; }
15269 if test "${pgac_cv_c_inline_quietly+set}" = set; then
15270   $as_echo_n "(cached) " >&6
15271 else
15272   pgac_cv_c_inline_quietly=no
15273   if test "$ac_cv_c_inline" != no; then
15274     pgac_c_inline_save_werror=$ac_c_werror_flag
15275     ac_c_werror_flag=yes
15276     cat >conftest.$ac_ext <<_ACEOF
15277 /* confdefs.h.  */
15278 _ACEOF
15279 cat confdefs.h >>conftest.$ac_ext
15280 cat >>conftest.$ac_ext <<_ACEOF
15281 /* end confdefs.h.  */
15282 static inline int fun () {return 0;}
15283 int
15284 main ()
15285 {
15286
15287   ;
15288   return 0;
15289 }
15290 _ACEOF
15291 rm -f conftest.$ac_objext conftest$ac_exeext
15292 if { (ac_try="$ac_link"
15293 case "(($ac_try" in
15294   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15295   *) ac_try_echo=$ac_try;;
15296 esac
15297 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15298 $as_echo "$ac_try_echo") >&5
15299   (eval "$ac_link") 2>conftest.er1
15300   ac_status=$?
15301   grep -v '^ *+' conftest.er1 >conftest.err
15302   rm -f conftest.er1
15303   cat conftest.err >&5
15304   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15305   (exit $ac_status); } && {
15306          test -z "$ac_c_werror_flag" ||
15307          test ! -s conftest.err
15308        } && test -s conftest$ac_exeext && {
15309          test "$cross_compiling" = yes ||
15310          $as_test_x conftest$ac_exeext
15311        }; then
15312   pgac_cv_c_inline_quietly=yes
15313 else
15314   $as_echo "$as_me: failed program was:" >&5
15315 sed 's/^/| /' conftest.$ac_ext >&5
15316
15317
15318 fi
15319
15320 rm -rf conftest.dSYM
15321 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15322       conftest$ac_exeext conftest.$ac_ext
15323     ac_c_werror_flag=$pgac_c_inline_save_werror
15324   fi
15325 fi
15326 { $as_echo "$as_me:$LINENO: result: $pgac_cv_c_inline_quietly" >&5
15327 $as_echo "$pgac_cv_c_inline_quietly" >&6; }
15328 if test "$pgac_cv_c_inline_quietly" != no; then
15329
15330 cat >>confdefs.h <<_ACEOF
15331 #define PG_USE_INLINE 1
15332 _ACEOF
15333
15334 fi
15335
15336 { $as_echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
15337 $as_echo_n "checking for preprocessor stringizing operator... " >&6; }
15338 if test "${ac_cv_c_stringize+set}" = set; then
15339   $as_echo_n "(cached) " >&6
15340 else
15341   cat >conftest.$ac_ext <<_ACEOF
15342 /* confdefs.h.  */
15343 _ACEOF
15344 cat confdefs.h >>conftest.$ac_ext
15345 cat >>conftest.$ac_ext <<_ACEOF
15346 /* end confdefs.h.  */
15347 #define x(y) #y
15348
15349 char *s = x(teststring);
15350 _ACEOF
15351 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15352   $EGREP "#teststring" >/dev/null 2>&1; then
15353   ac_cv_c_stringize=no
15354 else
15355   ac_cv_c_stringize=yes
15356 fi
15357 rm -f conftest*
15358
15359 fi
15360 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
15361 $as_echo "$ac_cv_c_stringize" >&6; }
15362 if test $ac_cv_c_stringize = yes; then
15363
15364 cat >>confdefs.h <<\_ACEOF
15365 #define HAVE_STRINGIZE 1
15366 _ACEOF
15367
15368 fi
15369
15370
15371   { $as_echo "$as_me:$LINENO: checking for flexible array members" >&5
15372 $as_echo_n "checking for flexible array members... " >&6; }
15373 if test "${ac_cv_c_flexmember+set}" = set; then
15374   $as_echo_n "(cached) " >&6
15375 else
15376   cat >conftest.$ac_ext <<_ACEOF
15377 /* confdefs.h.  */
15378 _ACEOF
15379 cat confdefs.h >>conftest.$ac_ext
15380 cat >>conftest.$ac_ext <<_ACEOF
15381 /* end confdefs.h.  */
15382 #include <stdlib.h>
15383             #include <stdio.h>
15384             #include <stddef.h>
15385             struct s { int n; double d[]; };
15386 int
15387 main ()
15388 {
15389 int m = getchar ();
15390             struct s *p = malloc (offsetof (struct s, d)
15391                                   + m * sizeof (double));
15392             p->d[0] = 0.0;
15393             return p->d != (double *) NULL;
15394   ;
15395   return 0;
15396 }
15397 _ACEOF
15398 rm -f conftest.$ac_objext
15399 if { (ac_try="$ac_compile"
15400 case "(($ac_try" in
15401   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15402   *) ac_try_echo=$ac_try;;
15403 esac
15404 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15405 $as_echo "$ac_try_echo") >&5
15406   (eval "$ac_compile") 2>conftest.er1
15407   ac_status=$?
15408   grep -v '^ *+' conftest.er1 >conftest.err
15409   rm -f conftest.er1
15410   cat conftest.err >&5
15411   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15412   (exit $ac_status); } && {
15413          test -z "$ac_c_werror_flag" ||
15414          test ! -s conftest.err
15415        } && test -s conftest.$ac_objext; then
15416   ac_cv_c_flexmember=yes
15417 else
15418   $as_echo "$as_me: failed program was:" >&5
15419 sed 's/^/| /' conftest.$ac_ext >&5
15420
15421         ac_cv_c_flexmember=no
15422 fi
15423
15424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15425 fi
15426 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_flexmember" >&5
15427 $as_echo "$ac_cv_c_flexmember" >&6; }
15428   if test $ac_cv_c_flexmember = yes; then
15429
15430 cat >>confdefs.h <<\_ACEOF
15431 #define FLEXIBLE_ARRAY_MEMBER /**/
15432 _ACEOF
15433
15434   else
15435     cat >>confdefs.h <<\_ACEOF
15436 #define FLEXIBLE_ARRAY_MEMBER 1
15437 _ACEOF
15438
15439   fi
15440
15441 { $as_echo "$as_me:$LINENO: checking for signed types" >&5
15442 $as_echo_n "checking for signed types... " >&6; }
15443 if test "${pgac_cv_c_signed+set}" = set; then
15444   $as_echo_n "(cached) " >&6
15445 else
15446   cat >conftest.$ac_ext <<_ACEOF
15447 /* confdefs.h.  */
15448 _ACEOF
15449 cat confdefs.h >>conftest.$ac_ext
15450 cat >>conftest.$ac_ext <<_ACEOF
15451 /* end confdefs.h.  */
15452
15453 int
15454 main ()
15455 {
15456 signed char c; signed short s; signed int i;
15457   ;
15458   return 0;
15459 }
15460 _ACEOF
15461 rm -f conftest.$ac_objext
15462 if { (ac_try="$ac_compile"
15463 case "(($ac_try" in
15464   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15465   *) ac_try_echo=$ac_try;;
15466 esac
15467 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15468 $as_echo "$ac_try_echo") >&5
15469   (eval "$ac_compile") 2>conftest.er1
15470   ac_status=$?
15471   grep -v '^ *+' conftest.er1 >conftest.err
15472   rm -f conftest.er1
15473   cat conftest.err >&5
15474   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15475   (exit $ac_status); } && {
15476          test -z "$ac_c_werror_flag" ||
15477          test ! -s conftest.err
15478        } && test -s conftest.$ac_objext; then
15479   pgac_cv_c_signed=yes
15480 else
15481   $as_echo "$as_me: failed program was:" >&5
15482 sed 's/^/| /' conftest.$ac_ext >&5
15483
15484         pgac_cv_c_signed=no
15485 fi
15486
15487 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15488 fi
15489 { $as_echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
15490 $as_echo "$pgac_cv_c_signed" >&6; }
15491 if test x"$pgac_cv_c_signed" = xno ; then
15492
15493 cat >>confdefs.h <<\_ACEOF
15494 #define signed /**/
15495 _ACEOF
15496
15497 fi
15498 { $as_echo "$as_me:$LINENO: checking for working volatile" >&5
15499 $as_echo_n "checking for working volatile... " >&6; }
15500 if test "${ac_cv_c_volatile+set}" = set; then
15501   $as_echo_n "(cached) " >&6
15502 else
15503   cat >conftest.$ac_ext <<_ACEOF
15504 /* confdefs.h.  */
15505 _ACEOF
15506 cat confdefs.h >>conftest.$ac_ext
15507 cat >>conftest.$ac_ext <<_ACEOF
15508 /* end confdefs.h.  */
15509
15510 int
15511 main ()
15512 {
15513
15514 volatile int x;
15515 int * volatile y = (int *) 0;
15516 return !x && !y;
15517   ;
15518   return 0;
15519 }
15520 _ACEOF
15521 rm -f conftest.$ac_objext
15522 if { (ac_try="$ac_compile"
15523 case "(($ac_try" in
15524   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15525   *) ac_try_echo=$ac_try;;
15526 esac
15527 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15528 $as_echo "$ac_try_echo") >&5
15529   (eval "$ac_compile") 2>conftest.er1
15530   ac_status=$?
15531   grep -v '^ *+' conftest.er1 >conftest.err
15532   rm -f conftest.er1
15533   cat conftest.err >&5
15534   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15535   (exit $ac_status); } && {
15536          test -z "$ac_c_werror_flag" ||
15537          test ! -s conftest.err
15538        } && test -s conftest.$ac_objext; then
15539   ac_cv_c_volatile=yes
15540 else
15541   $as_echo "$as_me: failed program was:" >&5
15542 sed 's/^/| /' conftest.$ac_ext >&5
15543
15544         ac_cv_c_volatile=no
15545 fi
15546
15547 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15548 fi
15549 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
15550 $as_echo "$ac_cv_c_volatile" >&6; }
15551 if test $ac_cv_c_volatile = no; then
15552
15553 cat >>confdefs.h <<\_ACEOF
15554 #define volatile /**/
15555 _ACEOF
15556
15557 fi
15558
15559 { $as_echo "$as_me:$LINENO: checking for __func__" >&5
15560 $as_echo_n "checking for __func__... " >&6; }
15561 if test "${pgac_cv_funcname_func_support+set}" = set; then
15562   $as_echo_n "(cached) " >&6
15563 else
15564   cat >conftest.$ac_ext <<_ACEOF
15565 /* confdefs.h.  */
15566 _ACEOF
15567 cat confdefs.h >>conftest.$ac_ext
15568 cat >>conftest.$ac_ext <<_ACEOF
15569 /* end confdefs.h.  */
15570 #include <stdio.h>
15571 int
15572 main ()
15573 {
15574 printf("%s\n", __func__);
15575   ;
15576   return 0;
15577 }
15578 _ACEOF
15579 rm -f conftest.$ac_objext
15580 if { (ac_try="$ac_compile"
15581 case "(($ac_try" in
15582   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15583   *) ac_try_echo=$ac_try;;
15584 esac
15585 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15586 $as_echo "$ac_try_echo") >&5
15587   (eval "$ac_compile") 2>conftest.er1
15588   ac_status=$?
15589   grep -v '^ *+' conftest.er1 >conftest.err
15590   rm -f conftest.er1
15591   cat conftest.err >&5
15592   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15593   (exit $ac_status); } && {
15594          test -z "$ac_c_werror_flag" ||
15595          test ! -s conftest.err
15596        } && test -s conftest.$ac_objext; then
15597   pgac_cv_funcname_func_support=yes
15598 else
15599   $as_echo "$as_me: failed program was:" >&5
15600 sed 's/^/| /' conftest.$ac_ext >&5
15601
15602         pgac_cv_funcname_func_support=no
15603 fi
15604
15605 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15606 fi
15607 { $as_echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
15608 $as_echo "$pgac_cv_funcname_func_support" >&6; }
15609 if test x"$pgac_cv_funcname_func_support" = xyes ; then
15610
15611 cat >>confdefs.h <<\_ACEOF
15612 #define HAVE_FUNCNAME__FUNC 1
15613 _ACEOF
15614
15615 else
15616 { $as_echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
15617 $as_echo_n "checking for __FUNCTION__... " >&6; }
15618 if test "${pgac_cv_funcname_function_support+set}" = set; then
15619   $as_echo_n "(cached) " >&6
15620 else
15621   cat >conftest.$ac_ext <<_ACEOF
15622 /* confdefs.h.  */
15623 _ACEOF
15624 cat confdefs.h >>conftest.$ac_ext
15625 cat >>conftest.$ac_ext <<_ACEOF
15626 /* end confdefs.h.  */
15627 #include <stdio.h>
15628 int
15629 main ()
15630 {
15631 printf("%s\n", __FUNCTION__);
15632   ;
15633   return 0;
15634 }
15635 _ACEOF
15636 rm -f conftest.$ac_objext
15637 if { (ac_try="$ac_compile"
15638 case "(($ac_try" in
15639   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15640   *) ac_try_echo=$ac_try;;
15641 esac
15642 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15643 $as_echo "$ac_try_echo") >&5
15644   (eval "$ac_compile") 2>conftest.er1
15645   ac_status=$?
15646   grep -v '^ *+' conftest.er1 >conftest.err
15647   rm -f conftest.er1
15648   cat conftest.err >&5
15649   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15650   (exit $ac_status); } && {
15651          test -z "$ac_c_werror_flag" ||
15652          test ! -s conftest.err
15653        } && test -s conftest.$ac_objext; then
15654   pgac_cv_funcname_function_support=yes
15655 else
15656   $as_echo "$as_me: failed program was:" >&5
15657 sed 's/^/| /' conftest.$ac_ext >&5
15658
15659         pgac_cv_funcname_function_support=no
15660 fi
15661
15662 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15663 fi
15664 { $as_echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
15665 $as_echo "$pgac_cv_funcname_function_support" >&6; }
15666 if test x"$pgac_cv_funcname_function_support" = xyes ; then
15667
15668 cat >>confdefs.h <<\_ACEOF
15669 #define HAVE_FUNCNAME__FUNCTION 1
15670 _ACEOF
15671
15672 fi
15673 fi
15674 { $as_echo "$as_me:$LINENO: checking for _Static_assert" >&5
15675 $as_echo_n "checking for _Static_assert... " >&6; }
15676 if test "${pgac_cv__static_assert+set}" = set; then
15677   $as_echo_n "(cached) " >&6
15678 else
15679   cat >conftest.$ac_ext <<_ACEOF
15680 /* confdefs.h.  */
15681 _ACEOF
15682 cat confdefs.h >>conftest.$ac_ext
15683 cat >>conftest.$ac_ext <<_ACEOF
15684 /* end confdefs.h.  */
15685
15686 int
15687 main ()
15688 {
15689 ({ _Static_assert(1, "foo"); })
15690   ;
15691   return 0;
15692 }
15693 _ACEOF
15694 rm -f conftest.$ac_objext conftest$ac_exeext
15695 if { (ac_try="$ac_link"
15696 case "(($ac_try" in
15697   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15698   *) ac_try_echo=$ac_try;;
15699 esac
15700 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15701 $as_echo "$ac_try_echo") >&5
15702   (eval "$ac_link") 2>conftest.er1
15703   ac_status=$?
15704   grep -v '^ *+' conftest.er1 >conftest.err
15705   rm -f conftest.er1
15706   cat conftest.err >&5
15707   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15708   (exit $ac_status); } && {
15709          test -z "$ac_c_werror_flag" ||
15710          test ! -s conftest.err
15711        } && test -s conftest$ac_exeext && {
15712          test "$cross_compiling" = yes ||
15713          $as_test_x conftest$ac_exeext
15714        }; then
15715   pgac_cv__static_assert=yes
15716 else
15717   $as_echo "$as_me: failed program was:" >&5
15718 sed 's/^/| /' conftest.$ac_ext >&5
15719
15720         pgac_cv__static_assert=no
15721 fi
15722
15723 rm -rf conftest.dSYM
15724 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15725       conftest$ac_exeext conftest.$ac_ext
15726 fi
15727 { $as_echo "$as_me:$LINENO: result: $pgac_cv__static_assert" >&5
15728 $as_echo "$pgac_cv__static_assert" >&6; }
15729 if test x"$pgac_cv__static_assert" = xyes ; then
15730
15731 cat >>confdefs.h <<\_ACEOF
15732 #define HAVE__STATIC_ASSERT 1
15733 _ACEOF
15734
15735 fi
15736 { $as_echo "$as_me:$LINENO: checking for __builtin_types_compatible_p" >&5
15737 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
15738 if test "${pgac_cv__types_compatible+set}" = set; then
15739   $as_echo_n "(cached) " >&6
15740 else
15741   cat >conftest.$ac_ext <<_ACEOF
15742 /* confdefs.h.  */
15743 _ACEOF
15744 cat confdefs.h >>conftest.$ac_ext
15745 cat >>conftest.$ac_ext <<_ACEOF
15746 /* end confdefs.h.  */
15747
15748 int
15749 main ()
15750 {
15751  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
15752   ;
15753   return 0;
15754 }
15755 _ACEOF
15756 rm -f conftest.$ac_objext
15757 if { (ac_try="$ac_compile"
15758 case "(($ac_try" in
15759   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15760   *) ac_try_echo=$ac_try;;
15761 esac
15762 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15763 $as_echo "$ac_try_echo") >&5
15764   (eval "$ac_compile") 2>conftest.er1
15765   ac_status=$?
15766   grep -v '^ *+' conftest.er1 >conftest.err
15767   rm -f conftest.er1
15768   cat conftest.err >&5
15769   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15770   (exit $ac_status); } && {
15771          test -z "$ac_c_werror_flag" ||
15772          test ! -s conftest.err
15773        } && test -s conftest.$ac_objext; then
15774   pgac_cv__types_compatible=yes
15775 else
15776   $as_echo "$as_me: failed program was:" >&5
15777 sed 's/^/| /' conftest.$ac_ext >&5
15778
15779         pgac_cv__types_compatible=no
15780 fi
15781
15782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15783 fi
15784 { $as_echo "$as_me:$LINENO: result: $pgac_cv__types_compatible" >&5
15785 $as_echo "$pgac_cv__types_compatible" >&6; }
15786 if test x"$pgac_cv__types_compatible" = xyes ; then
15787
15788 cat >>confdefs.h <<\_ACEOF
15789 #define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1
15790 _ACEOF
15791
15792 fi
15793 { $as_echo "$as_me:$LINENO: checking for __builtin_constant_p" >&5
15794 $as_echo_n "checking for __builtin_constant_p... " >&6; }
15795 if test "${pgac_cv__builtin_constant_p+set}" = set; then
15796   $as_echo_n "(cached) " >&6
15797 else
15798   cat >conftest.$ac_ext <<_ACEOF
15799 /* confdefs.h.  */
15800 _ACEOF
15801 cat confdefs.h >>conftest.$ac_ext
15802 cat >>conftest.$ac_ext <<_ACEOF
15803 /* end confdefs.h.  */
15804 static int x; static int y[__builtin_constant_p(x) ? x : 1];
15805 int
15806 main ()
15807 {
15808
15809   ;
15810   return 0;
15811 }
15812 _ACEOF
15813 rm -f conftest.$ac_objext
15814 if { (ac_try="$ac_compile"
15815 case "(($ac_try" in
15816   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15817   *) ac_try_echo=$ac_try;;
15818 esac
15819 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15820 $as_echo "$ac_try_echo") >&5
15821   (eval "$ac_compile") 2>conftest.er1
15822   ac_status=$?
15823   grep -v '^ *+' conftest.er1 >conftest.err
15824   rm -f conftest.er1
15825   cat conftest.err >&5
15826   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15827   (exit $ac_status); } && {
15828          test -z "$ac_c_werror_flag" ||
15829          test ! -s conftest.err
15830        } && test -s conftest.$ac_objext; then
15831   pgac_cv__builtin_constant_p=yes
15832 else
15833   $as_echo "$as_me: failed program was:" >&5
15834 sed 's/^/| /' conftest.$ac_ext >&5
15835
15836         pgac_cv__builtin_constant_p=no
15837 fi
15838
15839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15840 fi
15841 { $as_echo "$as_me:$LINENO: result: $pgac_cv__builtin_constant_p" >&5
15842 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
15843 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
15844
15845 cat >>confdefs.h <<\_ACEOF
15846 #define HAVE__BUILTIN_CONSTANT_P 1
15847 _ACEOF
15848
15849 fi
15850 { $as_echo "$as_me:$LINENO: checking for __builtin_unreachable" >&5
15851 $as_echo_n "checking for __builtin_unreachable... " >&6; }
15852 if test "${pgac_cv__builtin_unreachable+set}" = set; then
15853   $as_echo_n "(cached) " >&6
15854 else
15855   cat >conftest.$ac_ext <<_ACEOF
15856 /* confdefs.h.  */
15857 _ACEOF
15858 cat confdefs.h >>conftest.$ac_ext
15859 cat >>conftest.$ac_ext <<_ACEOF
15860 /* end confdefs.h.  */
15861
15862 int
15863 main ()
15864 {
15865 __builtin_unreachable();
15866   ;
15867   return 0;
15868 }
15869 _ACEOF
15870 rm -f conftest.$ac_objext conftest$ac_exeext
15871 if { (ac_try="$ac_link"
15872 case "(($ac_try" in
15873   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15874   *) ac_try_echo=$ac_try;;
15875 esac
15876 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15877 $as_echo "$ac_try_echo") >&5
15878   (eval "$ac_link") 2>conftest.er1
15879   ac_status=$?
15880   grep -v '^ *+' conftest.er1 >conftest.err
15881   rm -f conftest.er1
15882   cat conftest.err >&5
15883   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15884   (exit $ac_status); } && {
15885          test -z "$ac_c_werror_flag" ||
15886          test ! -s conftest.err
15887        } && test -s conftest$ac_exeext && {
15888          test "$cross_compiling" = yes ||
15889          $as_test_x conftest$ac_exeext
15890        }; then
15891   pgac_cv__builtin_unreachable=yes
15892 else
15893   $as_echo "$as_me: failed program was:" >&5
15894 sed 's/^/| /' conftest.$ac_ext >&5
15895
15896         pgac_cv__builtin_unreachable=no
15897 fi
15898
15899 rm -rf conftest.dSYM
15900 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15901       conftest$ac_exeext conftest.$ac_ext
15902 fi
15903 { $as_echo "$as_me:$LINENO: result: $pgac_cv__builtin_unreachable" >&5
15904 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
15905 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
15906
15907 cat >>confdefs.h <<\_ACEOF
15908 #define HAVE__BUILTIN_UNREACHABLE 1
15909 _ACEOF
15910
15911 fi
15912 { $as_echo "$as_me:$LINENO: checking for __VA_ARGS__" >&5
15913 $as_echo_n "checking for __VA_ARGS__... " >&6; }
15914 if test "${pgac_cv__va_args+set}" = set; then
15915   $as_echo_n "(cached) " >&6
15916 else
15917   cat >conftest.$ac_ext <<_ACEOF
15918 /* confdefs.h.  */
15919 _ACEOF
15920 cat confdefs.h >>conftest.$ac_ext
15921 cat >>conftest.$ac_ext <<_ACEOF
15922 /* end confdefs.h.  */
15923 #include <stdio.h>
15924 int
15925 main ()
15926 {
15927 #define debug(...) fprintf(stderr, __VA_ARGS__)
15928 debug("%s", "blarg");
15929
15930   ;
15931   return 0;
15932 }
15933 _ACEOF
15934 rm -f conftest.$ac_objext
15935 if { (ac_try="$ac_compile"
15936 case "(($ac_try" in
15937   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15938   *) ac_try_echo=$ac_try;;
15939 esac
15940 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15941 $as_echo "$ac_try_echo") >&5
15942   (eval "$ac_compile") 2>conftest.er1
15943   ac_status=$?
15944   grep -v '^ *+' conftest.er1 >conftest.err
15945   rm -f conftest.er1
15946   cat conftest.err >&5
15947   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15948   (exit $ac_status); } && {
15949          test -z "$ac_c_werror_flag" ||
15950          test ! -s conftest.err
15951        } && test -s conftest.$ac_objext; then
15952   pgac_cv__va_args=yes
15953 else
15954   $as_echo "$as_me: failed program was:" >&5
15955 sed 's/^/| /' conftest.$ac_ext >&5
15956
15957         pgac_cv__va_args=no
15958 fi
15959
15960 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15961 fi
15962 { $as_echo "$as_me:$LINENO: result: $pgac_cv__va_args" >&5
15963 $as_echo "$pgac_cv__va_args" >&6; }
15964 if test x"$pgac_cv__va_args" = xyes ; then
15965
15966 cat >>confdefs.h <<\_ACEOF
15967 #define HAVE__VA_ARGS 1
15968 _ACEOF
15969
15970 fi
15971 { $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
15972 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
15973 if test "${ac_cv_struct_tm+set}" = set; then
15974   $as_echo_n "(cached) " >&6
15975 else
15976   cat >conftest.$ac_ext <<_ACEOF
15977 /* confdefs.h.  */
15978 _ACEOF
15979 cat confdefs.h >>conftest.$ac_ext
15980 cat >>conftest.$ac_ext <<_ACEOF
15981 /* end confdefs.h.  */
15982 #include <sys/types.h>
15983 #include <time.h>
15984
15985 int
15986 main ()
15987 {
15988 struct tm tm;
15989                                      int *p = &tm.tm_sec;
15990                                      return !p;
15991   ;
15992   return 0;
15993 }
15994 _ACEOF
15995 rm -f conftest.$ac_objext
15996 if { (ac_try="$ac_compile"
15997 case "(($ac_try" in
15998   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15999   *) ac_try_echo=$ac_try;;
16000 esac
16001 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16002 $as_echo "$ac_try_echo") >&5
16003   (eval "$ac_compile") 2>conftest.er1
16004   ac_status=$?
16005   grep -v '^ *+' conftest.er1 >conftest.err
16006   rm -f conftest.er1
16007   cat conftest.err >&5
16008   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16009   (exit $ac_status); } && {
16010          test -z "$ac_c_werror_flag" ||
16011          test ! -s conftest.err
16012        } && test -s conftest.$ac_objext; then
16013   ac_cv_struct_tm=time.h
16014 else
16015   $as_echo "$as_me: failed program was:" >&5
16016 sed 's/^/| /' conftest.$ac_ext >&5
16017
16018         ac_cv_struct_tm=sys/time.h
16019 fi
16020
16021 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16022 fi
16023 { $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
16024 $as_echo "$ac_cv_struct_tm" >&6; }
16025 if test $ac_cv_struct_tm = sys/time.h; then
16026
16027 cat >>confdefs.h <<\_ACEOF
16028 #define TM_IN_SYS_TIME 1
16029 _ACEOF
16030
16031 fi
16032
16033 { $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
16034 $as_echo_n "checking for struct tm.tm_zone... " >&6; }
16035 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
16036   $as_echo_n "(cached) " >&6
16037 else
16038   cat >conftest.$ac_ext <<_ACEOF
16039 /* confdefs.h.  */
16040 _ACEOF
16041 cat confdefs.h >>conftest.$ac_ext
16042 cat >>conftest.$ac_ext <<_ACEOF
16043 /* end confdefs.h.  */
16044 #include <sys/types.h>
16045 #include <$ac_cv_struct_tm>
16046
16047
16048 int
16049 main ()
16050 {
16051 static struct tm ac_aggr;
16052 if (ac_aggr.tm_zone)
16053 return 0;
16054   ;
16055   return 0;
16056 }
16057 _ACEOF
16058 rm -f conftest.$ac_objext
16059 if { (ac_try="$ac_compile"
16060 case "(($ac_try" in
16061   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16062   *) ac_try_echo=$ac_try;;
16063 esac
16064 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16065 $as_echo "$ac_try_echo") >&5
16066   (eval "$ac_compile") 2>conftest.er1
16067   ac_status=$?
16068   grep -v '^ *+' conftest.er1 >conftest.err
16069   rm -f conftest.er1
16070   cat conftest.err >&5
16071   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16072   (exit $ac_status); } && {
16073          test -z "$ac_c_werror_flag" ||
16074          test ! -s conftest.err
16075        } && test -s conftest.$ac_objext; then
16076   ac_cv_member_struct_tm_tm_zone=yes
16077 else
16078   $as_echo "$as_me: failed program was:" >&5
16079 sed 's/^/| /' conftest.$ac_ext >&5
16080
16081         cat >conftest.$ac_ext <<_ACEOF
16082 /* confdefs.h.  */
16083 _ACEOF
16084 cat confdefs.h >>conftest.$ac_ext
16085 cat >>conftest.$ac_ext <<_ACEOF
16086 /* end confdefs.h.  */
16087 #include <sys/types.h>
16088 #include <$ac_cv_struct_tm>
16089
16090
16091 int
16092 main ()
16093 {
16094 static struct tm ac_aggr;
16095 if (sizeof ac_aggr.tm_zone)
16096 return 0;
16097   ;
16098   return 0;
16099 }
16100 _ACEOF
16101 rm -f conftest.$ac_objext
16102 if { (ac_try="$ac_compile"
16103 case "(($ac_try" in
16104   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16105   *) ac_try_echo=$ac_try;;
16106 esac
16107 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16108 $as_echo "$ac_try_echo") >&5
16109   (eval "$ac_compile") 2>conftest.er1
16110   ac_status=$?
16111   grep -v '^ *+' conftest.er1 >conftest.err
16112   rm -f conftest.er1
16113   cat conftest.err >&5
16114   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16115   (exit $ac_status); } && {
16116          test -z "$ac_c_werror_flag" ||
16117          test ! -s conftest.err
16118        } && test -s conftest.$ac_objext; then
16119   ac_cv_member_struct_tm_tm_zone=yes
16120 else
16121   $as_echo "$as_me: failed program was:" >&5
16122 sed 's/^/| /' conftest.$ac_ext >&5
16123
16124         ac_cv_member_struct_tm_tm_zone=no
16125 fi
16126
16127 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16128 fi
16129
16130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16131 fi
16132 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
16133 $as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; }
16134 if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then
16135
16136 cat >>confdefs.h <<_ACEOF
16137 #define HAVE_STRUCT_TM_TM_ZONE 1
16138 _ACEOF
16139
16140
16141 fi
16142
16143 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
16144
16145 cat >>confdefs.h <<\_ACEOF
16146 #define HAVE_TM_ZONE 1
16147 _ACEOF
16148
16149 fi
16150 { $as_echo "$as_me:$LINENO: checking for tzname" >&5
16151 $as_echo_n "checking for tzname... " >&6; }
16152 if test "${ac_cv_var_tzname+set}" = set; then
16153   $as_echo_n "(cached) " >&6
16154 else
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 #include <time.h>
16162 #ifndef tzname /* For SGI.  */
16163 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
16164 #endif
16165
16166 int
16167 main ()
16168 {
16169 atoi(*tzname);
16170   ;
16171   return 0;
16172 }
16173 _ACEOF
16174 rm -f conftest.$ac_objext conftest$ac_exeext
16175 if { (ac_try="$ac_link"
16176 case "(($ac_try" in
16177   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16178   *) ac_try_echo=$ac_try;;
16179 esac
16180 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16181 $as_echo "$ac_try_echo") >&5
16182   (eval "$ac_link") 2>conftest.er1
16183   ac_status=$?
16184   grep -v '^ *+' conftest.er1 >conftest.err
16185   rm -f conftest.er1
16186   cat conftest.err >&5
16187   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16188   (exit $ac_status); } && {
16189          test -z "$ac_c_werror_flag" ||
16190          test ! -s conftest.err
16191        } && test -s conftest$ac_exeext && {
16192          test "$cross_compiling" = yes ||
16193          $as_test_x conftest$ac_exeext
16194        }; then
16195   ac_cv_var_tzname=yes
16196 else
16197   $as_echo "$as_me: failed program was:" >&5
16198 sed 's/^/| /' conftest.$ac_ext >&5
16199
16200         ac_cv_var_tzname=no
16201 fi
16202
16203 rm -rf conftest.dSYM
16204 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16205       conftest$ac_exeext conftest.$ac_ext
16206 fi
16207 { $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
16208 $as_echo "$ac_cv_var_tzname" >&6; }
16209 if test $ac_cv_var_tzname = yes; then
16210
16211 cat >>confdefs.h <<\_ACEOF
16212 #define HAVE_TZNAME 1
16213 _ACEOF
16214
16215 fi
16216
16217 { $as_echo "$as_me:$LINENO: checking for union semun" >&5
16218 $as_echo_n "checking for union semun... " >&6; }
16219 if test "${ac_cv_type_union_semun+set}" = set; then
16220   $as_echo_n "(cached) " >&6
16221 else
16222   ac_cv_type_union_semun=no
16223 cat >conftest.$ac_ext <<_ACEOF
16224 /* confdefs.h.  */
16225 _ACEOF
16226 cat confdefs.h >>conftest.$ac_ext
16227 cat >>conftest.$ac_ext <<_ACEOF
16228 /* end confdefs.h.  */
16229 #include <sys/types.h>
16230 #include <sys/ipc.h>
16231 #include <sys/sem.h>
16232
16233 int
16234 main ()
16235 {
16236 if (sizeof (union semun))
16237        return 0;
16238   ;
16239   return 0;
16240 }
16241 _ACEOF
16242 rm -f conftest.$ac_objext
16243 if { (ac_try="$ac_compile"
16244 case "(($ac_try" in
16245   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16246   *) ac_try_echo=$ac_try;;
16247 esac
16248 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16249 $as_echo "$ac_try_echo") >&5
16250   (eval "$ac_compile") 2>conftest.er1
16251   ac_status=$?
16252   grep -v '^ *+' conftest.er1 >conftest.err
16253   rm -f conftest.er1
16254   cat conftest.err >&5
16255   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16256   (exit $ac_status); } && {
16257          test -z "$ac_c_werror_flag" ||
16258          test ! -s conftest.err
16259        } && test -s conftest.$ac_objext; then
16260   cat >conftest.$ac_ext <<_ACEOF
16261 /* confdefs.h.  */
16262 _ACEOF
16263 cat confdefs.h >>conftest.$ac_ext
16264 cat >>conftest.$ac_ext <<_ACEOF
16265 /* end confdefs.h.  */
16266 #include <sys/types.h>
16267 #include <sys/ipc.h>
16268 #include <sys/sem.h>
16269
16270 int
16271 main ()
16272 {
16273 if (sizeof ((union semun)))
16274           return 0;
16275   ;
16276   return 0;
16277 }
16278 _ACEOF
16279 rm -f conftest.$ac_objext
16280 if { (ac_try="$ac_compile"
16281 case "(($ac_try" in
16282   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16283   *) ac_try_echo=$ac_try;;
16284 esac
16285 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16286 $as_echo "$ac_try_echo") >&5
16287   (eval "$ac_compile") 2>conftest.er1
16288   ac_status=$?
16289   grep -v '^ *+' conftest.er1 >conftest.err
16290   rm -f conftest.er1
16291   cat conftest.err >&5
16292   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16293   (exit $ac_status); } && {
16294          test -z "$ac_c_werror_flag" ||
16295          test ! -s conftest.err
16296        } && test -s conftest.$ac_objext; then
16297   :
16298 else
16299   $as_echo "$as_me: failed program was:" >&5
16300 sed 's/^/| /' conftest.$ac_ext >&5
16301
16302         ac_cv_type_union_semun=yes
16303 fi
16304
16305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16306 else
16307   $as_echo "$as_me: failed program was:" >&5
16308 sed 's/^/| /' conftest.$ac_ext >&5
16309
16310
16311 fi
16312
16313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16314 fi
16315 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
16316 $as_echo "$ac_cv_type_union_semun" >&6; }
16317 if test "x$ac_cv_type_union_semun" = x""yes; then
16318
16319 cat >>confdefs.h <<_ACEOF
16320 #define HAVE_UNION_SEMUN 1
16321 _ACEOF
16322
16323
16324 fi
16325
16326 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
16327 $as_echo_n "checking for struct sockaddr_un... " >&6; }
16328 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
16329   $as_echo_n "(cached) " >&6
16330 else
16331   ac_cv_type_struct_sockaddr_un=no
16332 cat >conftest.$ac_ext <<_ACEOF
16333 /* confdefs.h.  */
16334 _ACEOF
16335 cat confdefs.h >>conftest.$ac_ext
16336 cat >>conftest.$ac_ext <<_ACEOF
16337 /* end confdefs.h.  */
16338 #include <sys/types.h>
16339 #ifdef HAVE_SYS_UN_H
16340 #include <sys/un.h>
16341 #endif
16342
16343
16344 int
16345 main ()
16346 {
16347 if (sizeof (struct sockaddr_un))
16348        return 0;
16349   ;
16350   return 0;
16351 }
16352 _ACEOF
16353 rm -f conftest.$ac_objext
16354 if { (ac_try="$ac_compile"
16355 case "(($ac_try" in
16356   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16357   *) ac_try_echo=$ac_try;;
16358 esac
16359 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16360 $as_echo "$ac_try_echo") >&5
16361   (eval "$ac_compile") 2>conftest.er1
16362   ac_status=$?
16363   grep -v '^ *+' conftest.er1 >conftest.err
16364   rm -f conftest.er1
16365   cat conftest.err >&5
16366   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16367   (exit $ac_status); } && {
16368          test -z "$ac_c_werror_flag" ||
16369          test ! -s conftest.err
16370        } && test -s conftest.$ac_objext; then
16371   cat >conftest.$ac_ext <<_ACEOF
16372 /* confdefs.h.  */
16373 _ACEOF
16374 cat confdefs.h >>conftest.$ac_ext
16375 cat >>conftest.$ac_ext <<_ACEOF
16376 /* end confdefs.h.  */
16377 #include <sys/types.h>
16378 #ifdef HAVE_SYS_UN_H
16379 #include <sys/un.h>
16380 #endif
16381
16382
16383 int
16384 main ()
16385 {
16386 if (sizeof ((struct sockaddr_un)))
16387           return 0;
16388   ;
16389   return 0;
16390 }
16391 _ACEOF
16392 rm -f conftest.$ac_objext
16393 if { (ac_try="$ac_compile"
16394 case "(($ac_try" in
16395   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16396   *) ac_try_echo=$ac_try;;
16397 esac
16398 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16399 $as_echo "$ac_try_echo") >&5
16400   (eval "$ac_compile") 2>conftest.er1
16401   ac_status=$?
16402   grep -v '^ *+' conftest.er1 >conftest.err
16403   rm -f conftest.er1
16404   cat conftest.err >&5
16405   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16406   (exit $ac_status); } && {
16407          test -z "$ac_c_werror_flag" ||
16408          test ! -s conftest.err
16409        } && test -s conftest.$ac_objext; then
16410   :
16411 else
16412   $as_echo "$as_me: failed program was:" >&5
16413 sed 's/^/| /' conftest.$ac_ext >&5
16414
16415         ac_cv_type_struct_sockaddr_un=yes
16416 fi
16417
16418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16419 else
16420   $as_echo "$as_me: failed program was:" >&5
16421 sed 's/^/| /' conftest.$ac_ext >&5
16422
16423
16424 fi
16425
16426 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16427 fi
16428 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
16429 $as_echo "$ac_cv_type_struct_sockaddr_un" >&6; }
16430 if test "x$ac_cv_type_struct_sockaddr_un" = x""yes; then
16431
16432 cat >>confdefs.h <<\_ACEOF
16433 #define HAVE_UNIX_SOCKETS 1
16434 _ACEOF
16435
16436 fi
16437
16438 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
16439 $as_echo_n "checking for struct sockaddr_storage... " >&6; }
16440 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
16441   $as_echo_n "(cached) " >&6
16442 else
16443   ac_cv_type_struct_sockaddr_storage=no
16444 cat >conftest.$ac_ext <<_ACEOF
16445 /* confdefs.h.  */
16446 _ACEOF
16447 cat confdefs.h >>conftest.$ac_ext
16448 cat >>conftest.$ac_ext <<_ACEOF
16449 /* end confdefs.h.  */
16450 #include <sys/types.h>
16451 #ifdef HAVE_SYS_SOCKET_H
16452 #include <sys/socket.h>
16453 #endif
16454
16455
16456 int
16457 main ()
16458 {
16459 if (sizeof (struct sockaddr_storage))
16460        return 0;
16461   ;
16462   return 0;
16463 }
16464 _ACEOF
16465 rm -f conftest.$ac_objext
16466 if { (ac_try="$ac_compile"
16467 case "(($ac_try" in
16468   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16469   *) ac_try_echo=$ac_try;;
16470 esac
16471 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16472 $as_echo "$ac_try_echo") >&5
16473   (eval "$ac_compile") 2>conftest.er1
16474   ac_status=$?
16475   grep -v '^ *+' conftest.er1 >conftest.err
16476   rm -f conftest.er1
16477   cat conftest.err >&5
16478   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16479   (exit $ac_status); } && {
16480          test -z "$ac_c_werror_flag" ||
16481          test ! -s conftest.err
16482        } && test -s conftest.$ac_objext; then
16483   cat >conftest.$ac_ext <<_ACEOF
16484 /* confdefs.h.  */
16485 _ACEOF
16486 cat confdefs.h >>conftest.$ac_ext
16487 cat >>conftest.$ac_ext <<_ACEOF
16488 /* end confdefs.h.  */
16489 #include <sys/types.h>
16490 #ifdef HAVE_SYS_SOCKET_H
16491 #include <sys/socket.h>
16492 #endif
16493
16494
16495 int
16496 main ()
16497 {
16498 if (sizeof ((struct sockaddr_storage)))
16499           return 0;
16500   ;
16501   return 0;
16502 }
16503 _ACEOF
16504 rm -f conftest.$ac_objext
16505 if { (ac_try="$ac_compile"
16506 case "(($ac_try" in
16507   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16508   *) ac_try_echo=$ac_try;;
16509 esac
16510 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16511 $as_echo "$ac_try_echo") >&5
16512   (eval "$ac_compile") 2>conftest.er1
16513   ac_status=$?
16514   grep -v '^ *+' conftest.er1 >conftest.err
16515   rm -f conftest.er1
16516   cat conftest.err >&5
16517   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16518   (exit $ac_status); } && {
16519          test -z "$ac_c_werror_flag" ||
16520          test ! -s conftest.err
16521        } && test -s conftest.$ac_objext; then
16522   :
16523 else
16524   $as_echo "$as_me: failed program was:" >&5
16525 sed 's/^/| /' conftest.$ac_ext >&5
16526
16527         ac_cv_type_struct_sockaddr_storage=yes
16528 fi
16529
16530 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16531 else
16532   $as_echo "$as_me: failed program was:" >&5
16533 sed 's/^/| /' conftest.$ac_ext >&5
16534
16535
16536 fi
16537
16538 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16539 fi
16540 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
16541 $as_echo "$ac_cv_type_struct_sockaddr_storage" >&6; }
16542 if test "x$ac_cv_type_struct_sockaddr_storage" = x""yes; then
16543
16544 cat >>confdefs.h <<_ACEOF
16545 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
16546 _ACEOF
16547
16548
16549 fi
16550
16551 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
16552 $as_echo_n "checking for struct sockaddr_storage.ss_family... " >&6; }
16553 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
16554   $as_echo_n "(cached) " >&6
16555 else
16556   cat >conftest.$ac_ext <<_ACEOF
16557 /* confdefs.h.  */
16558 _ACEOF
16559 cat confdefs.h >>conftest.$ac_ext
16560 cat >>conftest.$ac_ext <<_ACEOF
16561 /* end confdefs.h.  */
16562 #include <sys/types.h>
16563 #ifdef HAVE_SYS_SOCKET_H
16564 #include <sys/socket.h>
16565 #endif
16566
16567
16568 int
16569 main ()
16570 {
16571 static struct sockaddr_storage ac_aggr;
16572 if (ac_aggr.ss_family)
16573 return 0;
16574   ;
16575   return 0;
16576 }
16577 _ACEOF
16578 rm -f conftest.$ac_objext
16579 if { (ac_try="$ac_compile"
16580 case "(($ac_try" in
16581   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16582   *) ac_try_echo=$ac_try;;
16583 esac
16584 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16585 $as_echo "$ac_try_echo") >&5
16586   (eval "$ac_compile") 2>conftest.er1
16587   ac_status=$?
16588   grep -v '^ *+' conftest.er1 >conftest.err
16589   rm -f conftest.er1
16590   cat conftest.err >&5
16591   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16592   (exit $ac_status); } && {
16593          test -z "$ac_c_werror_flag" ||
16594          test ! -s conftest.err
16595        } && test -s conftest.$ac_objext; then
16596   ac_cv_member_struct_sockaddr_storage_ss_family=yes
16597 else
16598   $as_echo "$as_me: failed program was:" >&5
16599 sed 's/^/| /' conftest.$ac_ext >&5
16600
16601         cat >conftest.$ac_ext <<_ACEOF
16602 /* confdefs.h.  */
16603 _ACEOF
16604 cat confdefs.h >>conftest.$ac_ext
16605 cat >>conftest.$ac_ext <<_ACEOF
16606 /* end confdefs.h.  */
16607 #include <sys/types.h>
16608 #ifdef HAVE_SYS_SOCKET_H
16609 #include <sys/socket.h>
16610 #endif
16611
16612
16613 int
16614 main ()
16615 {
16616 static struct sockaddr_storage ac_aggr;
16617 if (sizeof ac_aggr.ss_family)
16618 return 0;
16619   ;
16620   return 0;
16621 }
16622 _ACEOF
16623 rm -f conftest.$ac_objext
16624 if { (ac_try="$ac_compile"
16625 case "(($ac_try" in
16626   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16627   *) ac_try_echo=$ac_try;;
16628 esac
16629 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16630 $as_echo "$ac_try_echo") >&5
16631   (eval "$ac_compile") 2>conftest.er1
16632   ac_status=$?
16633   grep -v '^ *+' conftest.er1 >conftest.err
16634   rm -f conftest.er1
16635   cat conftest.err >&5
16636   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16637   (exit $ac_status); } && {
16638          test -z "$ac_c_werror_flag" ||
16639          test ! -s conftest.err
16640        } && test -s conftest.$ac_objext; then
16641   ac_cv_member_struct_sockaddr_storage_ss_family=yes
16642 else
16643   $as_echo "$as_me: failed program was:" >&5
16644 sed 's/^/| /' conftest.$ac_ext >&5
16645
16646         ac_cv_member_struct_sockaddr_storage_ss_family=no
16647 fi
16648
16649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16650 fi
16651
16652 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16653 fi
16654 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
16655 $as_echo "$ac_cv_member_struct_sockaddr_storage_ss_family" >&6; }
16656 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = x""yes; then
16657
16658 cat >>confdefs.h <<_ACEOF
16659 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
16660 _ACEOF
16661
16662
16663 fi
16664 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
16665 $as_echo_n "checking for struct sockaddr_storage.__ss_family... " >&6; }
16666 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
16667   $as_echo_n "(cached) " >&6
16668 else
16669   cat >conftest.$ac_ext <<_ACEOF
16670 /* confdefs.h.  */
16671 _ACEOF
16672 cat confdefs.h >>conftest.$ac_ext
16673 cat >>conftest.$ac_ext <<_ACEOF
16674 /* end confdefs.h.  */
16675 #include <sys/types.h>
16676 #ifdef HAVE_SYS_SOCKET_H
16677 #include <sys/socket.h>
16678 #endif
16679
16680
16681 int
16682 main ()
16683 {
16684 static struct sockaddr_storage ac_aggr;
16685 if (ac_aggr.__ss_family)
16686 return 0;
16687   ;
16688   return 0;
16689 }
16690 _ACEOF
16691 rm -f conftest.$ac_objext
16692 if { (ac_try="$ac_compile"
16693 case "(($ac_try" in
16694   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16695   *) ac_try_echo=$ac_try;;
16696 esac
16697 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16698 $as_echo "$ac_try_echo") >&5
16699   (eval "$ac_compile") 2>conftest.er1
16700   ac_status=$?
16701   grep -v '^ *+' conftest.er1 >conftest.err
16702   rm -f conftest.er1
16703   cat conftest.err >&5
16704   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16705   (exit $ac_status); } && {
16706          test -z "$ac_c_werror_flag" ||
16707          test ! -s conftest.err
16708        } && test -s conftest.$ac_objext; then
16709   ac_cv_member_struct_sockaddr_storage___ss_family=yes
16710 else
16711   $as_echo "$as_me: failed program was:" >&5
16712 sed 's/^/| /' conftest.$ac_ext >&5
16713
16714         cat >conftest.$ac_ext <<_ACEOF
16715 /* confdefs.h.  */
16716 _ACEOF
16717 cat confdefs.h >>conftest.$ac_ext
16718 cat >>conftest.$ac_ext <<_ACEOF
16719 /* end confdefs.h.  */
16720 #include <sys/types.h>
16721 #ifdef HAVE_SYS_SOCKET_H
16722 #include <sys/socket.h>
16723 #endif
16724
16725
16726 int
16727 main ()
16728 {
16729 static struct sockaddr_storage ac_aggr;
16730 if (sizeof ac_aggr.__ss_family)
16731 return 0;
16732   ;
16733   return 0;
16734 }
16735 _ACEOF
16736 rm -f conftest.$ac_objext
16737 if { (ac_try="$ac_compile"
16738 case "(($ac_try" in
16739   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16740   *) ac_try_echo=$ac_try;;
16741 esac
16742 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16743 $as_echo "$ac_try_echo") >&5
16744   (eval "$ac_compile") 2>conftest.er1
16745   ac_status=$?
16746   grep -v '^ *+' conftest.er1 >conftest.err
16747   rm -f conftest.er1
16748   cat conftest.err >&5
16749   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16750   (exit $ac_status); } && {
16751          test -z "$ac_c_werror_flag" ||
16752          test ! -s conftest.err
16753        } && test -s conftest.$ac_objext; then
16754   ac_cv_member_struct_sockaddr_storage___ss_family=yes
16755 else
16756   $as_echo "$as_me: failed program was:" >&5
16757 sed 's/^/| /' conftest.$ac_ext >&5
16758
16759         ac_cv_member_struct_sockaddr_storage___ss_family=no
16760 fi
16761
16762 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16763 fi
16764
16765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16766 fi
16767 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
16768 $as_echo "$ac_cv_member_struct_sockaddr_storage___ss_family" >&6; }
16769 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = x""yes; then
16770
16771 cat >>confdefs.h <<_ACEOF
16772 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
16773 _ACEOF
16774
16775
16776 fi
16777 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
16778 $as_echo_n "checking for struct sockaddr_storage.ss_len... " >&6; }
16779 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
16780   $as_echo_n "(cached) " >&6
16781 else
16782   cat >conftest.$ac_ext <<_ACEOF
16783 /* confdefs.h.  */
16784 _ACEOF
16785 cat confdefs.h >>conftest.$ac_ext
16786 cat >>conftest.$ac_ext <<_ACEOF
16787 /* end confdefs.h.  */
16788 #include <sys/types.h>
16789 #ifdef HAVE_SYS_SOCKET_H
16790 #include <sys/socket.h>
16791 #endif
16792
16793
16794 int
16795 main ()
16796 {
16797 static struct sockaddr_storage ac_aggr;
16798 if (ac_aggr.ss_len)
16799 return 0;
16800   ;
16801   return 0;
16802 }
16803 _ACEOF
16804 rm -f conftest.$ac_objext
16805 if { (ac_try="$ac_compile"
16806 case "(($ac_try" in
16807   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16808   *) ac_try_echo=$ac_try;;
16809 esac
16810 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16811 $as_echo "$ac_try_echo") >&5
16812   (eval "$ac_compile") 2>conftest.er1
16813   ac_status=$?
16814   grep -v '^ *+' conftest.er1 >conftest.err
16815   rm -f conftest.er1
16816   cat conftest.err >&5
16817   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16818   (exit $ac_status); } && {
16819          test -z "$ac_c_werror_flag" ||
16820          test ! -s conftest.err
16821        } && test -s conftest.$ac_objext; then
16822   ac_cv_member_struct_sockaddr_storage_ss_len=yes
16823 else
16824   $as_echo "$as_me: failed program was:" >&5
16825 sed 's/^/| /' conftest.$ac_ext >&5
16826
16827         cat >conftest.$ac_ext <<_ACEOF
16828 /* confdefs.h.  */
16829 _ACEOF
16830 cat confdefs.h >>conftest.$ac_ext
16831 cat >>conftest.$ac_ext <<_ACEOF
16832 /* end confdefs.h.  */
16833 #include <sys/types.h>
16834 #ifdef HAVE_SYS_SOCKET_H
16835 #include <sys/socket.h>
16836 #endif
16837
16838
16839 int
16840 main ()
16841 {
16842 static struct sockaddr_storage ac_aggr;
16843 if (sizeof ac_aggr.ss_len)
16844 return 0;
16845   ;
16846   return 0;
16847 }
16848 _ACEOF
16849 rm -f conftest.$ac_objext
16850 if { (ac_try="$ac_compile"
16851 case "(($ac_try" in
16852   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16853   *) ac_try_echo=$ac_try;;
16854 esac
16855 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16856 $as_echo "$ac_try_echo") >&5
16857   (eval "$ac_compile") 2>conftest.er1
16858   ac_status=$?
16859   grep -v '^ *+' conftest.er1 >conftest.err
16860   rm -f conftest.er1
16861   cat conftest.err >&5
16862   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16863   (exit $ac_status); } && {
16864          test -z "$ac_c_werror_flag" ||
16865          test ! -s conftest.err
16866        } && test -s conftest.$ac_objext; then
16867   ac_cv_member_struct_sockaddr_storage_ss_len=yes
16868 else
16869   $as_echo "$as_me: failed program was:" >&5
16870 sed 's/^/| /' conftest.$ac_ext >&5
16871
16872         ac_cv_member_struct_sockaddr_storage_ss_len=no
16873 fi
16874
16875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16876 fi
16877
16878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16879 fi
16880 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
16881 $as_echo "$ac_cv_member_struct_sockaddr_storage_ss_len" >&6; }
16882 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = x""yes; then
16883
16884 cat >>confdefs.h <<_ACEOF
16885 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
16886 _ACEOF
16887
16888
16889 fi
16890 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
16891 $as_echo_n "checking for struct sockaddr_storage.__ss_len... " >&6; }
16892 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
16893   $as_echo_n "(cached) " >&6
16894 else
16895   cat >conftest.$ac_ext <<_ACEOF
16896 /* confdefs.h.  */
16897 _ACEOF
16898 cat confdefs.h >>conftest.$ac_ext
16899 cat >>conftest.$ac_ext <<_ACEOF
16900 /* end confdefs.h.  */
16901 #include <sys/types.h>
16902 #ifdef HAVE_SYS_SOCKET_H
16903 #include <sys/socket.h>
16904 #endif
16905
16906
16907 int
16908 main ()
16909 {
16910 static struct sockaddr_storage ac_aggr;
16911 if (ac_aggr.__ss_len)
16912 return 0;
16913   ;
16914   return 0;
16915 }
16916 _ACEOF
16917 rm -f conftest.$ac_objext
16918 if { (ac_try="$ac_compile"
16919 case "(($ac_try" in
16920   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16921   *) ac_try_echo=$ac_try;;
16922 esac
16923 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16924 $as_echo "$ac_try_echo") >&5
16925   (eval "$ac_compile") 2>conftest.er1
16926   ac_status=$?
16927   grep -v '^ *+' conftest.er1 >conftest.err
16928   rm -f conftest.er1
16929   cat conftest.err >&5
16930   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16931   (exit $ac_status); } && {
16932          test -z "$ac_c_werror_flag" ||
16933          test ! -s conftest.err
16934        } && test -s conftest.$ac_objext; then
16935   ac_cv_member_struct_sockaddr_storage___ss_len=yes
16936 else
16937   $as_echo "$as_me: failed program was:" >&5
16938 sed 's/^/| /' conftest.$ac_ext >&5
16939
16940         cat >conftest.$ac_ext <<_ACEOF
16941 /* confdefs.h.  */
16942 _ACEOF
16943 cat confdefs.h >>conftest.$ac_ext
16944 cat >>conftest.$ac_ext <<_ACEOF
16945 /* end confdefs.h.  */
16946 #include <sys/types.h>
16947 #ifdef HAVE_SYS_SOCKET_H
16948 #include <sys/socket.h>
16949 #endif
16950
16951
16952 int
16953 main ()
16954 {
16955 static struct sockaddr_storage ac_aggr;
16956 if (sizeof ac_aggr.__ss_len)
16957 return 0;
16958   ;
16959   return 0;
16960 }
16961 _ACEOF
16962 rm -f conftest.$ac_objext
16963 if { (ac_try="$ac_compile"
16964 case "(($ac_try" in
16965   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16966   *) ac_try_echo=$ac_try;;
16967 esac
16968 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16969 $as_echo "$ac_try_echo") >&5
16970   (eval "$ac_compile") 2>conftest.er1
16971   ac_status=$?
16972   grep -v '^ *+' conftest.er1 >conftest.err
16973   rm -f conftest.er1
16974   cat conftest.err >&5
16975   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16976   (exit $ac_status); } && {
16977          test -z "$ac_c_werror_flag" ||
16978          test ! -s conftest.err
16979        } && test -s conftest.$ac_objext; then
16980   ac_cv_member_struct_sockaddr_storage___ss_len=yes
16981 else
16982   $as_echo "$as_me: failed program was:" >&5
16983 sed 's/^/| /' conftest.$ac_ext >&5
16984
16985         ac_cv_member_struct_sockaddr_storage___ss_len=no
16986 fi
16987
16988 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16989 fi
16990
16991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16992 fi
16993 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
16994 $as_echo "$ac_cv_member_struct_sockaddr_storage___ss_len" >&6; }
16995 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = x""yes; then
16996
16997 cat >>confdefs.h <<_ACEOF
16998 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
16999 _ACEOF
17000
17001
17002 fi
17003 { $as_echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
17004 $as_echo_n "checking for struct sockaddr.sa_len... " >&6; }
17005 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
17006   $as_echo_n "(cached) " >&6
17007 else
17008   cat >conftest.$ac_ext <<_ACEOF
17009 /* confdefs.h.  */
17010 _ACEOF
17011 cat confdefs.h >>conftest.$ac_ext
17012 cat >>conftest.$ac_ext <<_ACEOF
17013 /* end confdefs.h.  */
17014 #include <sys/types.h>
17015 #ifdef HAVE_SYS_SOCKET_H
17016 #include <sys/socket.h>
17017 #endif
17018
17019
17020 int
17021 main ()
17022 {
17023 static struct sockaddr ac_aggr;
17024 if (ac_aggr.sa_len)
17025 return 0;
17026   ;
17027   return 0;
17028 }
17029 _ACEOF
17030 rm -f conftest.$ac_objext
17031 if { (ac_try="$ac_compile"
17032 case "(($ac_try" in
17033   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17034   *) ac_try_echo=$ac_try;;
17035 esac
17036 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17037 $as_echo "$ac_try_echo") >&5
17038   (eval "$ac_compile") 2>conftest.er1
17039   ac_status=$?
17040   grep -v '^ *+' conftest.er1 >conftest.err
17041   rm -f conftest.er1
17042   cat conftest.err >&5
17043   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17044   (exit $ac_status); } && {
17045          test -z "$ac_c_werror_flag" ||
17046          test ! -s conftest.err
17047        } && test -s conftest.$ac_objext; then
17048   ac_cv_member_struct_sockaddr_sa_len=yes
17049 else
17050   $as_echo "$as_me: failed program was:" >&5
17051 sed 's/^/| /' conftest.$ac_ext >&5
17052
17053         cat >conftest.$ac_ext <<_ACEOF
17054 /* confdefs.h.  */
17055 _ACEOF
17056 cat confdefs.h >>conftest.$ac_ext
17057 cat >>conftest.$ac_ext <<_ACEOF
17058 /* end confdefs.h.  */
17059 #include <sys/types.h>
17060 #ifdef HAVE_SYS_SOCKET_H
17061 #include <sys/socket.h>
17062 #endif
17063
17064
17065 int
17066 main ()
17067 {
17068 static struct sockaddr ac_aggr;
17069 if (sizeof ac_aggr.sa_len)
17070 return 0;
17071   ;
17072   return 0;
17073 }
17074 _ACEOF
17075 rm -f conftest.$ac_objext
17076 if { (ac_try="$ac_compile"
17077 case "(($ac_try" in
17078   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17079   *) ac_try_echo=$ac_try;;
17080 esac
17081 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17082 $as_echo "$ac_try_echo") >&5
17083   (eval "$ac_compile") 2>conftest.er1
17084   ac_status=$?
17085   grep -v '^ *+' conftest.er1 >conftest.err
17086   rm -f conftest.er1
17087   cat conftest.err >&5
17088   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17089   (exit $ac_status); } && {
17090          test -z "$ac_c_werror_flag" ||
17091          test ! -s conftest.err
17092        } && test -s conftest.$ac_objext; then
17093   ac_cv_member_struct_sockaddr_sa_len=yes
17094 else
17095   $as_echo "$as_me: failed program was:" >&5
17096 sed 's/^/| /' conftest.$ac_ext >&5
17097
17098         ac_cv_member_struct_sockaddr_sa_len=no
17099 fi
17100
17101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17102 fi
17103
17104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17105 fi
17106 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
17107 $as_echo "$ac_cv_member_struct_sockaddr_sa_len" >&6; }
17108 if test "x$ac_cv_member_struct_sockaddr_sa_len" = x""yes; then
17109
17110 cat >>confdefs.h <<_ACEOF
17111 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
17112 _ACEOF
17113
17114
17115 fi
17116
17117 { $as_echo "$as_me:$LINENO: checking for struct addrinfo" >&5
17118 $as_echo_n "checking for struct addrinfo... " >&6; }
17119 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
17120   $as_echo_n "(cached) " >&6
17121 else
17122   ac_cv_type_struct_addrinfo=no
17123 cat >conftest.$ac_ext <<_ACEOF
17124 /* confdefs.h.  */
17125 _ACEOF
17126 cat confdefs.h >>conftest.$ac_ext
17127 cat >>conftest.$ac_ext <<_ACEOF
17128 /* end confdefs.h.  */
17129 #include <sys/types.h>
17130 #include <sys/socket.h>
17131 #include <netdb.h>
17132
17133
17134 int
17135 main ()
17136 {
17137 if (sizeof (struct addrinfo))
17138        return 0;
17139   ;
17140   return 0;
17141 }
17142 _ACEOF
17143 rm -f conftest.$ac_objext
17144 if { (ac_try="$ac_compile"
17145 case "(($ac_try" in
17146   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17147   *) ac_try_echo=$ac_try;;
17148 esac
17149 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17150 $as_echo "$ac_try_echo") >&5
17151   (eval "$ac_compile") 2>conftest.er1
17152   ac_status=$?
17153   grep -v '^ *+' conftest.er1 >conftest.err
17154   rm -f conftest.er1
17155   cat conftest.err >&5
17156   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17157   (exit $ac_status); } && {
17158          test -z "$ac_c_werror_flag" ||
17159          test ! -s conftest.err
17160        } && test -s conftest.$ac_objext; then
17161   cat >conftest.$ac_ext <<_ACEOF
17162 /* confdefs.h.  */
17163 _ACEOF
17164 cat confdefs.h >>conftest.$ac_ext
17165 cat >>conftest.$ac_ext <<_ACEOF
17166 /* end confdefs.h.  */
17167 #include <sys/types.h>
17168 #include <sys/socket.h>
17169 #include <netdb.h>
17170
17171
17172 int
17173 main ()
17174 {
17175 if (sizeof ((struct addrinfo)))
17176           return 0;
17177   ;
17178   return 0;
17179 }
17180 _ACEOF
17181 rm -f conftest.$ac_objext
17182 if { (ac_try="$ac_compile"
17183 case "(($ac_try" in
17184   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17185   *) ac_try_echo=$ac_try;;
17186 esac
17187 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17188 $as_echo "$ac_try_echo") >&5
17189   (eval "$ac_compile") 2>conftest.er1
17190   ac_status=$?
17191   grep -v '^ *+' conftest.er1 >conftest.err
17192   rm -f conftest.er1
17193   cat conftest.err >&5
17194   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17195   (exit $ac_status); } && {
17196          test -z "$ac_c_werror_flag" ||
17197          test ! -s conftest.err
17198        } && test -s conftest.$ac_objext; then
17199   :
17200 else
17201   $as_echo "$as_me: failed program was:" >&5
17202 sed 's/^/| /' conftest.$ac_ext >&5
17203
17204         ac_cv_type_struct_addrinfo=yes
17205 fi
17206
17207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17208 else
17209   $as_echo "$as_me: failed program was:" >&5
17210 sed 's/^/| /' conftest.$ac_ext >&5
17211
17212
17213 fi
17214
17215 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17216 fi
17217 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
17218 $as_echo "$ac_cv_type_struct_addrinfo" >&6; }
17219 if test "x$ac_cv_type_struct_addrinfo" = x""yes; then
17220
17221 cat >>confdefs.h <<_ACEOF
17222 #define HAVE_STRUCT_ADDRINFO 1
17223 _ACEOF
17224
17225
17226 fi
17227
17228
17229   { $as_echo "$as_me:$LINENO: checking for intptr_t" >&5
17230 $as_echo_n "checking for intptr_t... " >&6; }
17231 if test "${ac_cv_type_intptr_t+set}" = set; then
17232   $as_echo_n "(cached) " >&6
17233 else
17234   ac_cv_type_intptr_t=no
17235 cat >conftest.$ac_ext <<_ACEOF
17236 /* confdefs.h.  */
17237 _ACEOF
17238 cat confdefs.h >>conftest.$ac_ext
17239 cat >>conftest.$ac_ext <<_ACEOF
17240 /* end confdefs.h.  */
17241 $ac_includes_default
17242 int
17243 main ()
17244 {
17245 if (sizeof (intptr_t))
17246        return 0;
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17258 $as_echo "$ac_try_echo") >&5
17259   (eval "$ac_compile") 2>conftest.er1
17260   ac_status=$?
17261   grep -v '^ *+' conftest.er1 >conftest.err
17262   rm -f conftest.er1
17263   cat conftest.err >&5
17264   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17265   (exit $ac_status); } && {
17266          test -z "$ac_c_werror_flag" ||
17267          test ! -s conftest.err
17268        } && test -s conftest.$ac_objext; then
17269   cat >conftest.$ac_ext <<_ACEOF
17270 /* confdefs.h.  */
17271 _ACEOF
17272 cat confdefs.h >>conftest.$ac_ext
17273 cat >>conftest.$ac_ext <<_ACEOF
17274 /* end confdefs.h.  */
17275 $ac_includes_default
17276 int
17277 main ()
17278 {
17279 if (sizeof ((intptr_t)))
17280           return 0;
17281   ;
17282   return 0;
17283 }
17284 _ACEOF
17285 rm -f conftest.$ac_objext
17286 if { (ac_try="$ac_compile"
17287 case "(($ac_try" in
17288   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17289   *) ac_try_echo=$ac_try;;
17290 esac
17291 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17292 $as_echo "$ac_try_echo") >&5
17293   (eval "$ac_compile") 2>conftest.er1
17294   ac_status=$?
17295   grep -v '^ *+' conftest.er1 >conftest.err
17296   rm -f conftest.er1
17297   cat conftest.err >&5
17298   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17299   (exit $ac_status); } && {
17300          test -z "$ac_c_werror_flag" ||
17301          test ! -s conftest.err
17302        } && test -s conftest.$ac_objext; then
17303   :
17304 else
17305   $as_echo "$as_me: failed program was:" >&5
17306 sed 's/^/| /' conftest.$ac_ext >&5
17307
17308         ac_cv_type_intptr_t=yes
17309 fi
17310
17311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17312 else
17313   $as_echo "$as_me: failed program was:" >&5
17314 sed 's/^/| /' conftest.$ac_ext >&5
17315
17316
17317 fi
17318
17319 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17320 fi
17321 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5
17322 $as_echo "$ac_cv_type_intptr_t" >&6; }
17323 if test "x$ac_cv_type_intptr_t" = x""yes; then
17324
17325 cat >>confdefs.h <<\_ACEOF
17326 #define HAVE_INTPTR_T 1
17327 _ACEOF
17328
17329 else
17330   for ac_type in 'int' 'long int' 'long long int'; do
17331        cat >conftest.$ac_ext <<_ACEOF
17332 /* confdefs.h.  */
17333 _ACEOF
17334 cat confdefs.h >>conftest.$ac_ext
17335 cat >>conftest.$ac_ext <<_ACEOF
17336 /* end confdefs.h.  */
17337 $ac_includes_default
17338 int
17339 main ()
17340 {
17341 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
17342 test_array [0] = 0
17343
17344   ;
17345   return 0;
17346 }
17347 _ACEOF
17348 rm -f conftest.$ac_objext
17349 if { (ac_try="$ac_compile"
17350 case "(($ac_try" in
17351   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17352   *) ac_try_echo=$ac_try;;
17353 esac
17354 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17355 $as_echo "$ac_try_echo") >&5
17356   (eval "$ac_compile") 2>conftest.er1
17357   ac_status=$?
17358   grep -v '^ *+' conftest.er1 >conftest.err
17359   rm -f conftest.er1
17360   cat conftest.err >&5
17361   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17362   (exit $ac_status); } && {
17363          test -z "$ac_c_werror_flag" ||
17364          test ! -s conftest.err
17365        } && test -s conftest.$ac_objext; then
17366
17367 cat >>confdefs.h <<_ACEOF
17368 #define intptr_t $ac_type
17369 _ACEOF
17370
17371           ac_type=
17372 else
17373   $as_echo "$as_me: failed program was:" >&5
17374 sed 's/^/| /' conftest.$ac_ext >&5
17375
17376
17377 fi
17378
17379 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17380        test -z "$ac_type" && break
17381      done
17382 fi
17383
17384
17385
17386   { $as_echo "$as_me:$LINENO: checking for uintptr_t" >&5
17387 $as_echo_n "checking for uintptr_t... " >&6; }
17388 if test "${ac_cv_type_uintptr_t+set}" = set; then
17389   $as_echo_n "(cached) " >&6
17390 else
17391   ac_cv_type_uintptr_t=no
17392 cat >conftest.$ac_ext <<_ACEOF
17393 /* confdefs.h.  */
17394 _ACEOF
17395 cat confdefs.h >>conftest.$ac_ext
17396 cat >>conftest.$ac_ext <<_ACEOF
17397 /* end confdefs.h.  */
17398 $ac_includes_default
17399 int
17400 main ()
17401 {
17402 if (sizeof (uintptr_t))
17403        return 0;
17404   ;
17405   return 0;
17406 }
17407 _ACEOF
17408 rm -f conftest.$ac_objext
17409 if { (ac_try="$ac_compile"
17410 case "(($ac_try" in
17411   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17412   *) ac_try_echo=$ac_try;;
17413 esac
17414 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17415 $as_echo "$ac_try_echo") >&5
17416   (eval "$ac_compile") 2>conftest.er1
17417   ac_status=$?
17418   grep -v '^ *+' conftest.er1 >conftest.err
17419   rm -f conftest.er1
17420   cat conftest.err >&5
17421   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17422   (exit $ac_status); } && {
17423          test -z "$ac_c_werror_flag" ||
17424          test ! -s conftest.err
17425        } && test -s conftest.$ac_objext; then
17426   cat >conftest.$ac_ext <<_ACEOF
17427 /* confdefs.h.  */
17428 _ACEOF
17429 cat confdefs.h >>conftest.$ac_ext
17430 cat >>conftest.$ac_ext <<_ACEOF
17431 /* end confdefs.h.  */
17432 $ac_includes_default
17433 int
17434 main ()
17435 {
17436 if (sizeof ((uintptr_t)))
17437           return 0;
17438   ;
17439   return 0;
17440 }
17441 _ACEOF
17442 rm -f conftest.$ac_objext
17443 if { (ac_try="$ac_compile"
17444 case "(($ac_try" in
17445   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17446   *) ac_try_echo=$ac_try;;
17447 esac
17448 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17449 $as_echo "$ac_try_echo") >&5
17450   (eval "$ac_compile") 2>conftest.er1
17451   ac_status=$?
17452   grep -v '^ *+' conftest.er1 >conftest.err
17453   rm -f conftest.er1
17454   cat conftest.err >&5
17455   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17456   (exit $ac_status); } && {
17457          test -z "$ac_c_werror_flag" ||
17458          test ! -s conftest.err
17459        } && test -s conftest.$ac_objext; then
17460   :
17461 else
17462   $as_echo "$as_me: failed program was:" >&5
17463 sed 's/^/| /' conftest.$ac_ext >&5
17464
17465         ac_cv_type_uintptr_t=yes
17466 fi
17467
17468 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17469 else
17470   $as_echo "$as_me: failed program was:" >&5
17471 sed 's/^/| /' conftest.$ac_ext >&5
17472
17473
17474 fi
17475
17476 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17477 fi
17478 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
17479 $as_echo "$ac_cv_type_uintptr_t" >&6; }
17480 if test "x$ac_cv_type_uintptr_t" = x""yes; then
17481
17482 cat >>confdefs.h <<\_ACEOF
17483 #define HAVE_UINTPTR_T 1
17484 _ACEOF
17485
17486 else
17487   for ac_type in 'unsigned int' 'unsigned long int' \
17488         'unsigned long long int'; do
17489        cat >conftest.$ac_ext <<_ACEOF
17490 /* confdefs.h.  */
17491 _ACEOF
17492 cat confdefs.h >>conftest.$ac_ext
17493 cat >>conftest.$ac_ext <<_ACEOF
17494 /* end confdefs.h.  */
17495 $ac_includes_default
17496 int
17497 main ()
17498 {
17499 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
17500 test_array [0] = 0
17501
17502   ;
17503   return 0;
17504 }
17505 _ACEOF
17506 rm -f conftest.$ac_objext
17507 if { (ac_try="$ac_compile"
17508 case "(($ac_try" in
17509   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17510   *) ac_try_echo=$ac_try;;
17511 esac
17512 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17513 $as_echo "$ac_try_echo") >&5
17514   (eval "$ac_compile") 2>conftest.er1
17515   ac_status=$?
17516   grep -v '^ *+' conftest.er1 >conftest.err
17517   rm -f conftest.er1
17518   cat conftest.err >&5
17519   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17520   (exit $ac_status); } && {
17521          test -z "$ac_c_werror_flag" ||
17522          test ! -s conftest.err
17523        } && test -s conftest.$ac_objext; then
17524
17525 cat >>confdefs.h <<_ACEOF
17526 #define uintptr_t $ac_type
17527 _ACEOF
17528
17529           ac_type=
17530 else
17531   $as_echo "$as_me: failed program was:" >&5
17532 sed 's/^/| /' conftest.$ac_ext >&5
17533
17534
17535 fi
17536
17537 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17538        test -z "$ac_type" && break
17539      done
17540 fi
17541
17542
17543
17544   { $as_echo "$as_me:$LINENO: checking for long long int" >&5
17545 $as_echo_n "checking for long long int... " >&6; }
17546 if test "${ac_cv_type_long_long_int+set}" = set; then
17547   $as_echo_n "(cached) " >&6
17548 else
17549   cat >conftest.$ac_ext <<_ACEOF
17550
17551   /* confdefs.h.  */
17552 _ACEOF
17553 cat confdefs.h >>conftest.$ac_ext
17554 cat >>conftest.$ac_ext <<_ACEOF
17555 /* end confdefs.h.  */
17556 /* For now, do not test the preprocessor; as of 2007 there are too many
17557          implementations with broken preprocessors.  Perhaps this can
17558          be revisited in 2012.  In the meantime, code should not expect
17559          #if to work with literals wider than 32 bits.  */
17560       /* Test literals.  */
17561       long long int ll = 9223372036854775807ll;
17562       long long int nll = -9223372036854775807LL;
17563       unsigned long long int ull = 18446744073709551615ULL;
17564       /* Test constant expressions.   */
17565       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
17566                      ? 1 : -1)];
17567       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
17568                      ? 1 : -1)];
17569       int i = 63;
17570 int
17571 main ()
17572 {
17573 /* Test availability of runtime routines for shift and division.  */
17574       long long int llmax = 9223372036854775807ll;
17575       unsigned long long int ullmax = 18446744073709551615ull;
17576       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
17577               | (llmax / ll) | (llmax % ll)
17578               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
17579               | (ullmax / ull) | (ullmax % ull));
17580   ;
17581   return 0;
17582 }
17583
17584 _ACEOF
17585 rm -f conftest.$ac_objext conftest$ac_exeext
17586 if { (ac_try="$ac_link"
17587 case "(($ac_try" in
17588   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17589   *) ac_try_echo=$ac_try;;
17590 esac
17591 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17592 $as_echo "$ac_try_echo") >&5
17593   (eval "$ac_link") 2>conftest.er1
17594   ac_status=$?
17595   grep -v '^ *+' conftest.er1 >conftest.err
17596   rm -f conftest.er1
17597   cat conftest.err >&5
17598   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17599   (exit $ac_status); } && {
17600          test -z "$ac_c_werror_flag" ||
17601          test ! -s conftest.err
17602        } && test -s conftest$ac_exeext && {
17603          test "$cross_compiling" = yes ||
17604          $as_test_x conftest$ac_exeext
17605        }; then
17606                         if test "$cross_compiling" = yes; then
17607   ac_cv_type_long_long_int=yes
17608 else
17609   cat >conftest.$ac_ext <<_ACEOF
17610 /* confdefs.h.  */
17611 _ACEOF
17612 cat confdefs.h >>conftest.$ac_ext
17613 cat >>conftest.$ac_ext <<_ACEOF
17614 /* end confdefs.h.  */
17615 #include <limits.h>
17616                #ifndef LLONG_MAX
17617                # define HALF \
17618                         (1LL << (sizeof (long long int) * CHAR_BIT - 2))
17619                # define LLONG_MAX (HALF - 1 + HALF)
17620                #endif
17621 int
17622 main ()
17623 {
17624 long long int n = 1;
17625                int i;
17626                for (i = 0; ; i++)
17627                  {
17628                    long long int m = n << i;
17629                    if (m >> i != n)
17630                      return 1;
17631                    if (LLONG_MAX / 2 < m)
17632                      break;
17633                  }
17634                return 0;
17635   ;
17636   return 0;
17637 }
17638 _ACEOF
17639 rm -f conftest$ac_exeext
17640 if { (ac_try="$ac_link"
17641 case "(($ac_try" in
17642   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17643   *) ac_try_echo=$ac_try;;
17644 esac
17645 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17646 $as_echo "$ac_try_echo") >&5
17647   (eval "$ac_link") 2>&5
17648   ac_status=$?
17649   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17650   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17651   { (case "(($ac_try" in
17652   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17653   *) ac_try_echo=$ac_try;;
17654 esac
17655 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17656 $as_echo "$ac_try_echo") >&5
17657   (eval "$ac_try") 2>&5
17658   ac_status=$?
17659   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17660   (exit $ac_status); }; }; then
17661   ac_cv_type_long_long_int=yes
17662 else
17663   $as_echo "$as_me: program exited with status $ac_status" >&5
17664 $as_echo "$as_me: failed program was:" >&5
17665 sed 's/^/| /' conftest.$ac_ext >&5
17666
17667 ( exit $ac_status )
17668 ac_cv_type_long_long_int=no
17669 fi
17670 rm -rf conftest.dSYM
17671 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17672 fi
17673
17674
17675 else
17676   $as_echo "$as_me: failed program was:" >&5
17677 sed 's/^/| /' conftest.$ac_ext >&5
17678
17679         ac_cv_type_long_long_int=no
17680 fi
17681
17682 rm -rf conftest.dSYM
17683 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17684       conftest$ac_exeext conftest.$ac_ext
17685 fi
17686 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
17687 $as_echo "$ac_cv_type_long_long_int" >&6; }
17688   if test $ac_cv_type_long_long_int = yes; then
17689
17690 cat >>confdefs.h <<\_ACEOF
17691 #define HAVE_LONG_LONG_INT 1
17692 _ACEOF
17693
17694   fi
17695
17696
17697 { $as_echo "$as_me:$LINENO: checking for locale_t" >&5
17698 $as_echo_n "checking for locale_t... " >&6; }
17699 if test "${pgac_cv_type_locale_t+set}" = set; then
17700   $as_echo_n "(cached) " >&6
17701 else
17702   cat >conftest.$ac_ext <<_ACEOF
17703 /* confdefs.h.  */
17704 _ACEOF
17705 cat confdefs.h >>conftest.$ac_ext
17706 cat >>conftest.$ac_ext <<_ACEOF
17707 /* end confdefs.h.  */
17708 #include <locale.h>
17709 locale_t x;
17710 int
17711 main ()
17712 {
17713
17714   ;
17715   return 0;
17716 }
17717 _ACEOF
17718 rm -f conftest.$ac_objext
17719 if { (ac_try="$ac_compile"
17720 case "(($ac_try" in
17721   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17722   *) ac_try_echo=$ac_try;;
17723 esac
17724 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17725 $as_echo "$ac_try_echo") >&5
17726   (eval "$ac_compile") 2>conftest.er1
17727   ac_status=$?
17728   grep -v '^ *+' conftest.er1 >conftest.err
17729   rm -f conftest.er1
17730   cat conftest.err >&5
17731   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17732   (exit $ac_status); } && {
17733          test -z "$ac_c_werror_flag" ||
17734          test ! -s conftest.err
17735        } && test -s conftest.$ac_objext; then
17736   pgac_cv_type_locale_t=yes
17737 else
17738   $as_echo "$as_me: failed program was:" >&5
17739 sed 's/^/| /' conftest.$ac_ext >&5
17740
17741         cat >conftest.$ac_ext <<_ACEOF
17742 /* confdefs.h.  */
17743 _ACEOF
17744 cat confdefs.h >>conftest.$ac_ext
17745 cat >>conftest.$ac_ext <<_ACEOF
17746 /* end confdefs.h.  */
17747 #include <xlocale.h>
17748 locale_t x;
17749 int
17750 main ()
17751 {
17752
17753   ;
17754   return 0;
17755 }
17756 _ACEOF
17757 rm -f conftest.$ac_objext
17758 if { (ac_try="$ac_compile"
17759 case "(($ac_try" in
17760   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17761   *) ac_try_echo=$ac_try;;
17762 esac
17763 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17764 $as_echo "$ac_try_echo") >&5
17765   (eval "$ac_compile") 2>conftest.er1
17766   ac_status=$?
17767   grep -v '^ *+' conftest.er1 >conftest.err
17768   rm -f conftest.er1
17769   cat conftest.err >&5
17770   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17771   (exit $ac_status); } && {
17772          test -z "$ac_c_werror_flag" ||
17773          test ! -s conftest.err
17774        } && test -s conftest.$ac_objext; then
17775   pgac_cv_type_locale_t='yes (in xlocale.h)'
17776 else
17777   $as_echo "$as_me: failed program was:" >&5
17778 sed 's/^/| /' conftest.$ac_ext >&5
17779
17780         pgac_cv_type_locale_t=no
17781 fi
17782
17783 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17784 fi
17785
17786 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17787 fi
17788 { $as_echo "$as_me:$LINENO: result: $pgac_cv_type_locale_t" >&5
17789 $as_echo "$pgac_cv_type_locale_t" >&6; }
17790 if test "$pgac_cv_type_locale_t" != no; then
17791
17792 cat >>confdefs.h <<\_ACEOF
17793 #define HAVE_LOCALE_T 1
17794 _ACEOF
17795
17796 fi
17797 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
17798
17799 cat >>confdefs.h <<\_ACEOF
17800 #define LOCALE_T_IN_XLOCALE 1
17801 _ACEOF
17802
17803 fi
17804
17805 { $as_echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
17806 $as_echo_n "checking for struct cmsgcred... " >&6; }
17807 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
17808   $as_echo_n "(cached) " >&6
17809 else
17810   ac_cv_type_struct_cmsgcred=no
17811 cat >conftest.$ac_ext <<_ACEOF
17812 /* confdefs.h.  */
17813 _ACEOF
17814 cat confdefs.h >>conftest.$ac_ext
17815 cat >>conftest.$ac_ext <<_ACEOF
17816 /* end confdefs.h.  */
17817 #include <sys/socket.h>
17818 #ifdef HAVE_SYS_UCRED_H
17819 #include <sys/ucred.h>
17820 #endif
17821
17822 int
17823 main ()
17824 {
17825 if (sizeof (struct cmsgcred))
17826        return 0;
17827   ;
17828   return 0;
17829 }
17830 _ACEOF
17831 rm -f conftest.$ac_objext
17832 if { (ac_try="$ac_compile"
17833 case "(($ac_try" in
17834   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17835   *) ac_try_echo=$ac_try;;
17836 esac
17837 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17838 $as_echo "$ac_try_echo") >&5
17839   (eval "$ac_compile") 2>conftest.er1
17840   ac_status=$?
17841   grep -v '^ *+' conftest.er1 >conftest.err
17842   rm -f conftest.er1
17843   cat conftest.err >&5
17844   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17845   (exit $ac_status); } && {
17846          test -z "$ac_c_werror_flag" ||
17847          test ! -s conftest.err
17848        } && test -s conftest.$ac_objext; then
17849   cat >conftest.$ac_ext <<_ACEOF
17850 /* confdefs.h.  */
17851 _ACEOF
17852 cat confdefs.h >>conftest.$ac_ext
17853 cat >>conftest.$ac_ext <<_ACEOF
17854 /* end confdefs.h.  */
17855 #include <sys/socket.h>
17856 #ifdef HAVE_SYS_UCRED_H
17857 #include <sys/ucred.h>
17858 #endif
17859
17860 int
17861 main ()
17862 {
17863 if (sizeof ((struct cmsgcred)))
17864           return 0;
17865   ;
17866   return 0;
17867 }
17868 _ACEOF
17869 rm -f conftest.$ac_objext
17870 if { (ac_try="$ac_compile"
17871 case "(($ac_try" in
17872   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17873   *) ac_try_echo=$ac_try;;
17874 esac
17875 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17876 $as_echo "$ac_try_echo") >&5
17877   (eval "$ac_compile") 2>conftest.er1
17878   ac_status=$?
17879   grep -v '^ *+' conftest.er1 >conftest.err
17880   rm -f conftest.er1
17881   cat conftest.err >&5
17882   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17883   (exit $ac_status); } && {
17884          test -z "$ac_c_werror_flag" ||
17885          test ! -s conftest.err
17886        } && test -s conftest.$ac_objext; then
17887   :
17888 else
17889   $as_echo "$as_me: failed program was:" >&5
17890 sed 's/^/| /' conftest.$ac_ext >&5
17891
17892         ac_cv_type_struct_cmsgcred=yes
17893 fi
17894
17895 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17896 else
17897   $as_echo "$as_me: failed program was:" >&5
17898 sed 's/^/| /' conftest.$ac_ext >&5
17899
17900
17901 fi
17902
17903 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17904 fi
17905 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
17906 $as_echo "$ac_cv_type_struct_cmsgcred" >&6; }
17907 if test "x$ac_cv_type_struct_cmsgcred" = x""yes; then
17908
17909 cat >>confdefs.h <<_ACEOF
17910 #define HAVE_STRUCT_CMSGCRED 1
17911 _ACEOF
17912
17913
17914 fi
17915
17916
17917 { $as_echo "$as_me:$LINENO: checking for struct option" >&5
17918 $as_echo_n "checking for struct option... " >&6; }
17919 if test "${ac_cv_type_struct_option+set}" = set; then
17920   $as_echo_n "(cached) " >&6
17921 else
17922   ac_cv_type_struct_option=no
17923 cat >conftest.$ac_ext <<_ACEOF
17924 /* confdefs.h.  */
17925 _ACEOF
17926 cat confdefs.h >>conftest.$ac_ext
17927 cat >>conftest.$ac_ext <<_ACEOF
17928 /* end confdefs.h.  */
17929 #ifdef HAVE_GETOPT_H
17930 #include <getopt.h>
17931 #endif
17932
17933 int
17934 main ()
17935 {
17936 if (sizeof (struct option))
17937        return 0;
17938   ;
17939   return 0;
17940 }
17941 _ACEOF
17942 rm -f conftest.$ac_objext
17943 if { (ac_try="$ac_compile"
17944 case "(($ac_try" in
17945   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17946   *) ac_try_echo=$ac_try;;
17947 esac
17948 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17949 $as_echo "$ac_try_echo") >&5
17950   (eval "$ac_compile") 2>conftest.er1
17951   ac_status=$?
17952   grep -v '^ *+' conftest.er1 >conftest.err
17953   rm -f conftest.er1
17954   cat conftest.err >&5
17955   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17956   (exit $ac_status); } && {
17957          test -z "$ac_c_werror_flag" ||
17958          test ! -s conftest.err
17959        } && test -s conftest.$ac_objext; then
17960   cat >conftest.$ac_ext <<_ACEOF
17961 /* confdefs.h.  */
17962 _ACEOF
17963 cat confdefs.h >>conftest.$ac_ext
17964 cat >>conftest.$ac_ext <<_ACEOF
17965 /* end confdefs.h.  */
17966 #ifdef HAVE_GETOPT_H
17967 #include <getopt.h>
17968 #endif
17969
17970 int
17971 main ()
17972 {
17973 if (sizeof ((struct option)))
17974           return 0;
17975   ;
17976   return 0;
17977 }
17978 _ACEOF
17979 rm -f conftest.$ac_objext
17980 if { (ac_try="$ac_compile"
17981 case "(($ac_try" in
17982   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17983   *) ac_try_echo=$ac_try;;
17984 esac
17985 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17986 $as_echo "$ac_try_echo") >&5
17987   (eval "$ac_compile") 2>conftest.er1
17988   ac_status=$?
17989   grep -v '^ *+' conftest.er1 >conftest.err
17990   rm -f conftest.er1
17991   cat conftest.err >&5
17992   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17993   (exit $ac_status); } && {
17994          test -z "$ac_c_werror_flag" ||
17995          test ! -s conftest.err
17996        } && test -s conftest.$ac_objext; then
17997   :
17998 else
17999   $as_echo "$as_me: failed program was:" >&5
18000 sed 's/^/| /' conftest.$ac_ext >&5
18001
18002         ac_cv_type_struct_option=yes
18003 fi
18004
18005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18006 else
18007   $as_echo "$as_me: failed program was:" >&5
18008 sed 's/^/| /' conftest.$ac_ext >&5
18009
18010
18011 fi
18012
18013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18014 fi
18015 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
18016 $as_echo "$ac_cv_type_struct_option" >&6; }
18017 if test "x$ac_cv_type_struct_option" = x""yes; then
18018
18019 cat >>confdefs.h <<_ACEOF
18020 #define HAVE_STRUCT_OPTION 1
18021 _ACEOF
18022
18023
18024 fi
18025
18026
18027 if test "$with_zlib" = yes; then
18028   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
18029   # did not).  While we could work around the lack of z_streamp, it
18030   # seems unwise to encourage people to use such old zlib versions...
18031   { $as_echo "$as_me:$LINENO: checking for z_streamp" >&5
18032 $as_echo_n "checking for z_streamp... " >&6; }
18033 if test "${ac_cv_type_z_streamp+set}" = set; then
18034   $as_echo_n "(cached) " >&6
18035 else
18036   ac_cv_type_z_streamp=no
18037 cat >conftest.$ac_ext <<_ACEOF
18038 /* confdefs.h.  */
18039 _ACEOF
18040 cat confdefs.h >>conftest.$ac_ext
18041 cat >>conftest.$ac_ext <<_ACEOF
18042 /* end confdefs.h.  */
18043 #include <zlib.h>
18044
18045 int
18046 main ()
18047 {
18048 if (sizeof (z_streamp))
18049        return 0;
18050   ;
18051   return 0;
18052 }
18053 _ACEOF
18054 rm -f conftest.$ac_objext
18055 if { (ac_try="$ac_compile"
18056 case "(($ac_try" in
18057   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18058   *) ac_try_echo=$ac_try;;
18059 esac
18060 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18061 $as_echo "$ac_try_echo") >&5
18062   (eval "$ac_compile") 2>conftest.er1
18063   ac_status=$?
18064   grep -v '^ *+' conftest.er1 >conftest.err
18065   rm -f conftest.er1
18066   cat conftest.err >&5
18067   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18068   (exit $ac_status); } && {
18069          test -z "$ac_c_werror_flag" ||
18070          test ! -s conftest.err
18071        } && test -s conftest.$ac_objext; then
18072   cat >conftest.$ac_ext <<_ACEOF
18073 /* confdefs.h.  */
18074 _ACEOF
18075 cat confdefs.h >>conftest.$ac_ext
18076 cat >>conftest.$ac_ext <<_ACEOF
18077 /* end confdefs.h.  */
18078 #include <zlib.h>
18079
18080 int
18081 main ()
18082 {
18083 if (sizeof ((z_streamp)))
18084           return 0;
18085   ;
18086   return 0;
18087 }
18088 _ACEOF
18089 rm -f conftest.$ac_objext
18090 if { (ac_try="$ac_compile"
18091 case "(($ac_try" in
18092   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18093   *) ac_try_echo=$ac_try;;
18094 esac
18095 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18096 $as_echo "$ac_try_echo") >&5
18097   (eval "$ac_compile") 2>conftest.er1
18098   ac_status=$?
18099   grep -v '^ *+' conftest.er1 >conftest.err
18100   rm -f conftest.er1
18101   cat conftest.err >&5
18102   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18103   (exit $ac_status); } && {
18104          test -z "$ac_c_werror_flag" ||
18105          test ! -s conftest.err
18106        } && test -s conftest.$ac_objext; then
18107   :
18108 else
18109   $as_echo "$as_me: failed program was:" >&5
18110 sed 's/^/| /' conftest.$ac_ext >&5
18111
18112         ac_cv_type_z_streamp=yes
18113 fi
18114
18115 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18116 else
18117   $as_echo "$as_me: failed program was:" >&5
18118 sed 's/^/| /' conftest.$ac_ext >&5
18119
18120
18121 fi
18122
18123 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18124 fi
18125 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
18126 $as_echo "$ac_cv_type_z_streamp" >&6; }
18127 if test "x$ac_cv_type_z_streamp" = x""yes; then
18128   :
18129 else
18130   { { $as_echo "$as_me:$LINENO: error: zlib version is too old
18131 Use --without-zlib to disable zlib support." >&5
18132 $as_echo "$as_me: error: zlib version is too old
18133 Use --without-zlib to disable zlib support." >&2;}
18134    { (exit 1); exit 1; }; }
18135 fi
18136
18137 fi
18138
18139 if test "$with_krb5" = yes; then
18140 # Check for differences between MIT and Heimdal (KTH) releases
18141   { $as_echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
18142 $as_echo_n "checking for krb5_ticket.enc_part2... " >&6; }
18143 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
18144   $as_echo_n "(cached) " >&6
18145 else
18146   cat >conftest.$ac_ext <<_ACEOF
18147 /* confdefs.h.  */
18148 _ACEOF
18149 cat confdefs.h >>conftest.$ac_ext
18150 cat >>conftest.$ac_ext <<_ACEOF
18151 /* end confdefs.h.  */
18152 #include <krb5.h>
18153
18154 int
18155 main ()
18156 {
18157 static krb5_ticket ac_aggr;
18158 if (ac_aggr.enc_part2)
18159 return 0;
18160   ;
18161   return 0;
18162 }
18163 _ACEOF
18164 rm -f conftest.$ac_objext
18165 if { (ac_try="$ac_compile"
18166 case "(($ac_try" in
18167   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18168   *) ac_try_echo=$ac_try;;
18169 esac
18170 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18171 $as_echo "$ac_try_echo") >&5
18172   (eval "$ac_compile") 2>conftest.er1
18173   ac_status=$?
18174   grep -v '^ *+' conftest.er1 >conftest.err
18175   rm -f conftest.er1
18176   cat conftest.err >&5
18177   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18178   (exit $ac_status); } && {
18179          test -z "$ac_c_werror_flag" ||
18180          test ! -s conftest.err
18181        } && test -s conftest.$ac_objext; then
18182   ac_cv_member_krb5_ticket_enc_part2=yes
18183 else
18184   $as_echo "$as_me: failed program was:" >&5
18185 sed 's/^/| /' conftest.$ac_ext >&5
18186
18187         cat >conftest.$ac_ext <<_ACEOF
18188 /* confdefs.h.  */
18189 _ACEOF
18190 cat confdefs.h >>conftest.$ac_ext
18191 cat >>conftest.$ac_ext <<_ACEOF
18192 /* end confdefs.h.  */
18193 #include <krb5.h>
18194
18195 int
18196 main ()
18197 {
18198 static krb5_ticket ac_aggr;
18199 if (sizeof ac_aggr.enc_part2)
18200 return 0;
18201   ;
18202   return 0;
18203 }
18204 _ACEOF
18205 rm -f conftest.$ac_objext
18206 if { (ac_try="$ac_compile"
18207 case "(($ac_try" in
18208   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18209   *) ac_try_echo=$ac_try;;
18210 esac
18211 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18212 $as_echo "$ac_try_echo") >&5
18213   (eval "$ac_compile") 2>conftest.er1
18214   ac_status=$?
18215   grep -v '^ *+' conftest.er1 >conftest.err
18216   rm -f conftest.er1
18217   cat conftest.err >&5
18218   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18219   (exit $ac_status); } && {
18220          test -z "$ac_c_werror_flag" ||
18221          test ! -s conftest.err
18222        } && test -s conftest.$ac_objext; then
18223   ac_cv_member_krb5_ticket_enc_part2=yes
18224 else
18225   $as_echo "$as_me: failed program was:" >&5
18226 sed 's/^/| /' conftest.$ac_ext >&5
18227
18228         ac_cv_member_krb5_ticket_enc_part2=no
18229 fi
18230
18231 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18232 fi
18233
18234 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18235 fi
18236 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
18237 $as_echo "$ac_cv_member_krb5_ticket_enc_part2" >&6; }
18238 if test "x$ac_cv_member_krb5_ticket_enc_part2" = x""yes; then
18239
18240 cat >>confdefs.h <<_ACEOF
18241 #define HAVE_KRB5_TICKET_ENC_PART2 1
18242 _ACEOF
18243
18244
18245 else
18246   { $as_echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
18247 $as_echo_n "checking for krb5_ticket.client... " >&6; }
18248 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
18249   $as_echo_n "(cached) " >&6
18250 else
18251   cat >conftest.$ac_ext <<_ACEOF
18252 /* confdefs.h.  */
18253 _ACEOF
18254 cat confdefs.h >>conftest.$ac_ext
18255 cat >>conftest.$ac_ext <<_ACEOF
18256 /* end confdefs.h.  */
18257 #include <krb5.h>
18258
18259 int
18260 main ()
18261 {
18262 static krb5_ticket ac_aggr;
18263 if (ac_aggr.client)
18264 return 0;
18265   ;
18266   return 0;
18267 }
18268 _ACEOF
18269 rm -f conftest.$ac_objext
18270 if { (ac_try="$ac_compile"
18271 case "(($ac_try" in
18272   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18273   *) ac_try_echo=$ac_try;;
18274 esac
18275 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18276 $as_echo "$ac_try_echo") >&5
18277   (eval "$ac_compile") 2>conftest.er1
18278   ac_status=$?
18279   grep -v '^ *+' conftest.er1 >conftest.err
18280   rm -f conftest.er1
18281   cat conftest.err >&5
18282   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18283   (exit $ac_status); } && {
18284          test -z "$ac_c_werror_flag" ||
18285          test ! -s conftest.err
18286        } && test -s conftest.$ac_objext; then
18287   ac_cv_member_krb5_ticket_client=yes
18288 else
18289   $as_echo "$as_me: failed program was:" >&5
18290 sed 's/^/| /' conftest.$ac_ext >&5
18291
18292         cat >conftest.$ac_ext <<_ACEOF
18293 /* confdefs.h.  */
18294 _ACEOF
18295 cat confdefs.h >>conftest.$ac_ext
18296 cat >>conftest.$ac_ext <<_ACEOF
18297 /* end confdefs.h.  */
18298 #include <krb5.h>
18299
18300 int
18301 main ()
18302 {
18303 static krb5_ticket ac_aggr;
18304 if (sizeof ac_aggr.client)
18305 return 0;
18306   ;
18307   return 0;
18308 }
18309 _ACEOF
18310 rm -f conftest.$ac_objext
18311 if { (ac_try="$ac_compile"
18312 case "(($ac_try" in
18313   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18314   *) ac_try_echo=$ac_try;;
18315 esac
18316 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18317 $as_echo "$ac_try_echo") >&5
18318   (eval "$ac_compile") 2>conftest.er1
18319   ac_status=$?
18320   grep -v '^ *+' conftest.er1 >conftest.err
18321   rm -f conftest.er1
18322   cat conftest.err >&5
18323   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18324   (exit $ac_status); } && {
18325          test -z "$ac_c_werror_flag" ||
18326          test ! -s conftest.err
18327        } && test -s conftest.$ac_objext; then
18328   ac_cv_member_krb5_ticket_client=yes
18329 else
18330   $as_echo "$as_me: failed program was:" >&5
18331 sed 's/^/| /' conftest.$ac_ext >&5
18332
18333         ac_cv_member_krb5_ticket_client=no
18334 fi
18335
18336 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18337 fi
18338
18339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18340 fi
18341 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
18342 $as_echo "$ac_cv_member_krb5_ticket_client" >&6; }
18343 if test "x$ac_cv_member_krb5_ticket_client" = x""yes; then
18344
18345 cat >>confdefs.h <<_ACEOF
18346 #define HAVE_KRB5_TICKET_CLIENT 1
18347 _ACEOF
18348
18349
18350 else
18351   { { $as_echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
18352 $as_echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
18353    { (exit 1); exit 1; }; }
18354 fi
18355
18356 fi
18357
18358   { $as_echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
18359 $as_echo_n "checking for krb5_error.text.data... " >&6; }
18360 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
18361   $as_echo_n "(cached) " >&6
18362 else
18363   cat >conftest.$ac_ext <<_ACEOF
18364 /* confdefs.h.  */
18365 _ACEOF
18366 cat confdefs.h >>conftest.$ac_ext
18367 cat >>conftest.$ac_ext <<_ACEOF
18368 /* end confdefs.h.  */
18369 #include <krb5.h>
18370
18371 int
18372 main ()
18373 {
18374 static krb5_error ac_aggr;
18375 if (ac_aggr.text.data)
18376 return 0;
18377   ;
18378   return 0;
18379 }
18380 _ACEOF
18381 rm -f conftest.$ac_objext
18382 if { (ac_try="$ac_compile"
18383 case "(($ac_try" in
18384   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18385   *) ac_try_echo=$ac_try;;
18386 esac
18387 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18388 $as_echo "$ac_try_echo") >&5
18389   (eval "$ac_compile") 2>conftest.er1
18390   ac_status=$?
18391   grep -v '^ *+' conftest.er1 >conftest.err
18392   rm -f conftest.er1
18393   cat conftest.err >&5
18394   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18395   (exit $ac_status); } && {
18396          test -z "$ac_c_werror_flag" ||
18397          test ! -s conftest.err
18398        } && test -s conftest.$ac_objext; then
18399   ac_cv_member_krb5_error_text_data=yes
18400 else
18401   $as_echo "$as_me: failed program was:" >&5
18402 sed 's/^/| /' conftest.$ac_ext >&5
18403
18404         cat >conftest.$ac_ext <<_ACEOF
18405 /* confdefs.h.  */
18406 _ACEOF
18407 cat confdefs.h >>conftest.$ac_ext
18408 cat >>conftest.$ac_ext <<_ACEOF
18409 /* end confdefs.h.  */
18410 #include <krb5.h>
18411
18412 int
18413 main ()
18414 {
18415 static krb5_error ac_aggr;
18416 if (sizeof ac_aggr.text.data)
18417 return 0;
18418   ;
18419   return 0;
18420 }
18421 _ACEOF
18422 rm -f conftest.$ac_objext
18423 if { (ac_try="$ac_compile"
18424 case "(($ac_try" in
18425   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18426   *) ac_try_echo=$ac_try;;
18427 esac
18428 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18429 $as_echo "$ac_try_echo") >&5
18430   (eval "$ac_compile") 2>conftest.er1
18431   ac_status=$?
18432   grep -v '^ *+' conftest.er1 >conftest.err
18433   rm -f conftest.er1
18434   cat conftest.err >&5
18435   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18436   (exit $ac_status); } && {
18437          test -z "$ac_c_werror_flag" ||
18438          test ! -s conftest.err
18439        } && test -s conftest.$ac_objext; then
18440   ac_cv_member_krb5_error_text_data=yes
18441 else
18442   $as_echo "$as_me: failed program was:" >&5
18443 sed 's/^/| /' conftest.$ac_ext >&5
18444
18445         ac_cv_member_krb5_error_text_data=no
18446 fi
18447
18448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18449 fi
18450
18451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18452 fi
18453 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
18454 $as_echo "$ac_cv_member_krb5_error_text_data" >&6; }
18455 if test "x$ac_cv_member_krb5_error_text_data" = x""yes; then
18456
18457 cat >>confdefs.h <<_ACEOF
18458 #define HAVE_KRB5_ERROR_TEXT_DATA 1
18459 _ACEOF
18460
18461
18462 else
18463   { $as_echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
18464 $as_echo_n "checking for krb5_error.e_data... " >&6; }
18465 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
18466   $as_echo_n "(cached) " >&6
18467 else
18468   cat >conftest.$ac_ext <<_ACEOF
18469 /* confdefs.h.  */
18470 _ACEOF
18471 cat confdefs.h >>conftest.$ac_ext
18472 cat >>conftest.$ac_ext <<_ACEOF
18473 /* end confdefs.h.  */
18474 #include <krb5.h>
18475
18476 int
18477 main ()
18478 {
18479 static krb5_error ac_aggr;
18480 if (ac_aggr.e_data)
18481 return 0;
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18493 $as_echo "$ac_try_echo") >&5
18494   (eval "$ac_compile") 2>conftest.er1
18495   ac_status=$?
18496   grep -v '^ *+' conftest.er1 >conftest.err
18497   rm -f conftest.er1
18498   cat conftest.err >&5
18499   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18500   (exit $ac_status); } && {
18501          test -z "$ac_c_werror_flag" ||
18502          test ! -s conftest.err
18503        } && test -s conftest.$ac_objext; then
18504   ac_cv_member_krb5_error_e_data=yes
18505 else
18506   $as_echo "$as_me: failed program was:" >&5
18507 sed 's/^/| /' conftest.$ac_ext >&5
18508
18509         cat >conftest.$ac_ext <<_ACEOF
18510 /* confdefs.h.  */
18511 _ACEOF
18512 cat confdefs.h >>conftest.$ac_ext
18513 cat >>conftest.$ac_ext <<_ACEOF
18514 /* end confdefs.h.  */
18515 #include <krb5.h>
18516
18517 int
18518 main ()
18519 {
18520 static krb5_error ac_aggr;
18521 if (sizeof ac_aggr.e_data)
18522 return 0;
18523   ;
18524   return 0;
18525 }
18526 _ACEOF
18527 rm -f conftest.$ac_objext
18528 if { (ac_try="$ac_compile"
18529 case "(($ac_try" in
18530   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18531   *) ac_try_echo=$ac_try;;
18532 esac
18533 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18534 $as_echo "$ac_try_echo") >&5
18535   (eval "$ac_compile") 2>conftest.er1
18536   ac_status=$?
18537   grep -v '^ *+' conftest.er1 >conftest.err
18538   rm -f conftest.er1
18539   cat conftest.err >&5
18540   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18541   (exit $ac_status); } && {
18542          test -z "$ac_c_werror_flag" ||
18543          test ! -s conftest.err
18544        } && test -s conftest.$ac_objext; then
18545   ac_cv_member_krb5_error_e_data=yes
18546 else
18547   $as_echo "$as_me: failed program was:" >&5
18548 sed 's/^/| /' conftest.$ac_ext >&5
18549
18550         ac_cv_member_krb5_error_e_data=no
18551 fi
18552
18553 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18554 fi
18555
18556 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18557 fi
18558 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
18559 $as_echo "$ac_cv_member_krb5_error_e_data" >&6; }
18560 if test "x$ac_cv_member_krb5_error_e_data" = x""yes; then
18561
18562 cat >>confdefs.h <<_ACEOF
18563 #define HAVE_KRB5_ERROR_E_DATA 1
18564 _ACEOF
18565
18566
18567 else
18568   { { $as_echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
18569 $as_echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
18570    { (exit 1); exit 1; }; }
18571 fi
18572
18573 fi
18574
18575
18576 # Win32 requires headers to be loaded for __stdcall, so can't use
18577 # AC_CHECK_FUNCS here.
18578   { $as_echo "$as_me:$LINENO: checking for krb5_free_unparsed_name" >&5
18579 $as_echo_n "checking for krb5_free_unparsed_name... " >&6; }
18580   cat >conftest.$ac_ext <<_ACEOF
18581 /* confdefs.h.  */
18582 _ACEOF
18583 cat confdefs.h >>conftest.$ac_ext
18584 cat >>conftest.$ac_ext <<_ACEOF
18585 /* end confdefs.h.  */
18586 #include <krb5.h>
18587 int
18588 main ()
18589 {
18590 krb5_free_unparsed_name(NULL,NULL);
18591   ;
18592   return 0;
18593 }
18594 _ACEOF
18595 rm -f conftest.$ac_objext conftest$ac_exeext
18596 if { (ac_try="$ac_link"
18597 case "(($ac_try" in
18598   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18599   *) ac_try_echo=$ac_try;;
18600 esac
18601 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18602 $as_echo "$ac_try_echo") >&5
18603   (eval "$ac_link") 2>conftest.er1
18604   ac_status=$?
18605   grep -v '^ *+' conftest.er1 >conftest.err
18606   rm -f conftest.er1
18607   cat conftest.err >&5
18608   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18609   (exit $ac_status); } && {
18610          test -z "$ac_c_werror_flag" ||
18611          test ! -s conftest.err
18612        } && test -s conftest$ac_exeext && {
18613          test "$cross_compiling" = yes ||
18614          $as_test_x conftest$ac_exeext
18615        }; then
18616
18617 cat >>confdefs.h <<\_ACEOF
18618 #define HAVE_KRB5_FREE_UNPARSED_NAME 1
18619 _ACEOF
18620
18621 { $as_echo "$as_me:$LINENO: result: yes" >&5
18622 $as_echo "yes" >&6; }
18623 else
18624   $as_echo "$as_me: failed program was:" >&5
18625 sed 's/^/| /' conftest.$ac_ext >&5
18626
18627         { $as_echo "$as_me:$LINENO: result: no" >&5
18628 $as_echo "no" >&6; }
18629 fi
18630
18631 rm -rf conftest.dSYM
18632 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18633       conftest$ac_exeext conftest.$ac_ext
18634 fi
18635
18636 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
18637 case $host_cpu in
18638   ppc*|powerpc*)
18639     { $as_echo "$as_me:$LINENO: checking whether assembler supports lwarx hint bit" >&5
18640 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
18641     cat >conftest.$ac_ext <<_ACEOF
18642 /* confdefs.h.  */
18643 _ACEOF
18644 cat confdefs.h >>conftest.$ac_ext
18645 cat >>conftest.$ac_ext <<_ACEOF
18646 /* end confdefs.h.  */
18647
18648 int
18649 main ()
18650 {
18651 int a = 0; int *p = &a; int r;
18652          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
18653   ;
18654   return 0;
18655 }
18656 _ACEOF
18657 rm -f conftest.$ac_objext
18658 if { (ac_try="$ac_compile"
18659 case "(($ac_try" in
18660   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18661   *) ac_try_echo=$ac_try;;
18662 esac
18663 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18664 $as_echo "$ac_try_echo") >&5
18665   (eval "$ac_compile") 2>conftest.er1
18666   ac_status=$?
18667   grep -v '^ *+' conftest.er1 >conftest.err
18668   rm -f conftest.er1
18669   cat conftest.err >&5
18670   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18671   (exit $ac_status); } && {
18672          test -z "$ac_c_werror_flag" ||
18673          test ! -s conftest.err
18674        } && test -s conftest.$ac_objext; then
18675   pgac_cv_have_ppc_mutex_hint=yes
18676 else
18677   $as_echo "$as_me: failed program was:" >&5
18678 sed 's/^/| /' conftest.$ac_ext >&5
18679
18680         pgac_cv_have_ppc_mutex_hint=no
18681 fi
18682
18683 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18684     { $as_echo "$as_me:$LINENO: result: $pgac_cv_have_ppc_mutex_hint" >&5
18685 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
18686     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
18687
18688 cat >>confdefs.h <<\_ACEOF
18689 #define HAVE_PPC_LWARX_MUTEX_HINT 1
18690 _ACEOF
18691
18692     fi
18693   ;;
18694 esac
18695
18696 # Check largefile support.  You might think this is a system service not a
18697 # compiler characteristic, but you'd be wrong.  We must check this before
18698 # probing existence of related functions such as fseeko, since the largefile
18699 # defines can affect what is generated for that.
18700 if test "$PORTNAME" != "win32"; then
18701    # Check whether --enable-largefile was given.
18702 if test "${enable_largefile+set}" = set; then
18703   enableval=$enable_largefile;
18704 fi
18705
18706 if test "$enable_largefile" != no; then
18707
18708   { $as_echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
18709 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
18710 if test "${ac_cv_sys_largefile_CC+set}" = set; then
18711   $as_echo_n "(cached) " >&6
18712 else
18713   ac_cv_sys_largefile_CC=no
18714      if test "$GCC" != yes; then
18715        ac_save_CC=$CC
18716        while :; do
18717          # IRIX 6.2 and later do not support large files by default,
18718          # so use the C compiler's -n32 option if that helps.
18719          cat >conftest.$ac_ext <<_ACEOF
18720 /* confdefs.h.  */
18721 _ACEOF
18722 cat confdefs.h >>conftest.$ac_ext
18723 cat >>conftest.$ac_ext <<_ACEOF
18724 /* end confdefs.h.  */
18725 #include <sys/types.h>
18726  /* Check that off_t can represent 2**63 - 1 correctly.
18727     We can't simply define LARGE_OFF_T to be 9223372036854775807,
18728     since some C++ compilers masquerading as C compilers
18729     incorrectly reject 9223372036854775807.  */
18730 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
18731   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
18732                        && LARGE_OFF_T % 2147483647 == 1)
18733                       ? 1 : -1];
18734 int
18735 main ()
18736 {
18737
18738   ;
18739   return 0;
18740 }
18741 _ACEOF
18742          rm -f conftest.$ac_objext
18743 if { (ac_try="$ac_compile"
18744 case "(($ac_try" in
18745   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18746   *) ac_try_echo=$ac_try;;
18747 esac
18748 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18749 $as_echo "$ac_try_echo") >&5
18750   (eval "$ac_compile") 2>conftest.er1
18751   ac_status=$?
18752   grep -v '^ *+' conftest.er1 >conftest.err
18753   rm -f conftest.er1
18754   cat conftest.err >&5
18755   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18756   (exit $ac_status); } && {
18757          test -z "$ac_c_werror_flag" ||
18758          test ! -s conftest.err
18759        } && test -s conftest.$ac_objext; then
18760   break
18761 else
18762   $as_echo "$as_me: failed program was:" >&5
18763 sed 's/^/| /' conftest.$ac_ext >&5
18764
18765
18766 fi
18767
18768 rm -f core conftest.err conftest.$ac_objext
18769          CC="$CC -n32"
18770          rm -f conftest.$ac_objext
18771 if { (ac_try="$ac_compile"
18772 case "(($ac_try" in
18773   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18774   *) ac_try_echo=$ac_try;;
18775 esac
18776 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18777 $as_echo "$ac_try_echo") >&5
18778   (eval "$ac_compile") 2>conftest.er1
18779   ac_status=$?
18780   grep -v '^ *+' conftest.er1 >conftest.err
18781   rm -f conftest.er1
18782   cat conftest.err >&5
18783   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18784   (exit $ac_status); } && {
18785          test -z "$ac_c_werror_flag" ||
18786          test ! -s conftest.err
18787        } && test -s conftest.$ac_objext; then
18788   ac_cv_sys_largefile_CC=' -n32'; break
18789 else
18790   $as_echo "$as_me: failed program was:" >&5
18791 sed 's/^/| /' conftest.$ac_ext >&5
18792
18793
18794 fi
18795
18796 rm -f core conftest.err conftest.$ac_objext
18797          break
18798        done
18799        CC=$ac_save_CC
18800        rm -f conftest.$ac_ext
18801     fi
18802 fi
18803 { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
18804 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
18805   if test "$ac_cv_sys_largefile_CC" != no; then
18806     CC=$CC$ac_cv_sys_largefile_CC
18807   fi
18808
18809   { $as_echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
18810 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
18811 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
18812   $as_echo_n "(cached) " >&6
18813 else
18814   while :; do
18815   cat >conftest.$ac_ext <<_ACEOF
18816 /* confdefs.h.  */
18817 _ACEOF
18818 cat confdefs.h >>conftest.$ac_ext
18819 cat >>conftest.$ac_ext <<_ACEOF
18820 /* end confdefs.h.  */
18821 #include <sys/types.h>
18822  /* Check that off_t can represent 2**63 - 1 correctly.
18823     We can't simply define LARGE_OFF_T to be 9223372036854775807,
18824     since some C++ compilers masquerading as C compilers
18825     incorrectly reject 9223372036854775807.  */
18826 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
18827   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
18828                        && LARGE_OFF_T % 2147483647 == 1)
18829                       ? 1 : -1];
18830 int
18831 main ()
18832 {
18833
18834   ;
18835   return 0;
18836 }
18837 _ACEOF
18838 rm -f conftest.$ac_objext
18839 if { (ac_try="$ac_compile"
18840 case "(($ac_try" in
18841   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18842   *) ac_try_echo=$ac_try;;
18843 esac
18844 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18845 $as_echo "$ac_try_echo") >&5
18846   (eval "$ac_compile") 2>conftest.er1
18847   ac_status=$?
18848   grep -v '^ *+' conftest.er1 >conftest.err
18849   rm -f conftest.er1
18850   cat conftest.err >&5
18851   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18852   (exit $ac_status); } && {
18853          test -z "$ac_c_werror_flag" ||
18854          test ! -s conftest.err
18855        } && test -s conftest.$ac_objext; then
18856   ac_cv_sys_file_offset_bits=no; break
18857 else
18858   $as_echo "$as_me: failed program was:" >&5
18859 sed 's/^/| /' conftest.$ac_ext >&5
18860
18861
18862 fi
18863
18864 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18865   cat >conftest.$ac_ext <<_ACEOF
18866 /* confdefs.h.  */
18867 _ACEOF
18868 cat confdefs.h >>conftest.$ac_ext
18869 cat >>conftest.$ac_ext <<_ACEOF
18870 /* end confdefs.h.  */
18871 #define _FILE_OFFSET_BITS 64
18872 #include <sys/types.h>
18873  /* Check that off_t can represent 2**63 - 1 correctly.
18874     We can't simply define LARGE_OFF_T to be 9223372036854775807,
18875     since some C++ compilers masquerading as C compilers
18876     incorrectly reject 9223372036854775807.  */
18877 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
18878   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
18879                        && LARGE_OFF_T % 2147483647 == 1)
18880                       ? 1 : -1];
18881 int
18882 main ()
18883 {
18884
18885   ;
18886   return 0;
18887 }
18888 _ACEOF
18889 rm -f conftest.$ac_objext
18890 if { (ac_try="$ac_compile"
18891 case "(($ac_try" in
18892   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18893   *) ac_try_echo=$ac_try;;
18894 esac
18895 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18896 $as_echo "$ac_try_echo") >&5
18897   (eval "$ac_compile") 2>conftest.er1
18898   ac_status=$?
18899   grep -v '^ *+' conftest.er1 >conftest.err
18900   rm -f conftest.er1
18901   cat conftest.err >&5
18902   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18903   (exit $ac_status); } && {
18904          test -z "$ac_c_werror_flag" ||
18905          test ! -s conftest.err
18906        } && test -s conftest.$ac_objext; then
18907   ac_cv_sys_file_offset_bits=64; break
18908 else
18909   $as_echo "$as_me: failed program was:" >&5
18910 sed 's/^/| /' conftest.$ac_ext >&5
18911
18912
18913 fi
18914
18915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18916   ac_cv_sys_file_offset_bits=unknown
18917   break
18918 done
18919 fi
18920 { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
18921 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
18922 case $ac_cv_sys_file_offset_bits in #(
18923   no | unknown) ;;
18924   *)
18925 cat >>confdefs.h <<_ACEOF
18926 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
18927 _ACEOF
18928 ;;
18929 esac
18930 rm -rf conftest*
18931   if test $ac_cv_sys_file_offset_bits = unknown; then
18932     { $as_echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
18933 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
18934 if test "${ac_cv_sys_large_files+set}" = set; then
18935   $as_echo_n "(cached) " >&6
18936 else
18937   while :; do
18938   cat >conftest.$ac_ext <<_ACEOF
18939 /* confdefs.h.  */
18940 _ACEOF
18941 cat confdefs.h >>conftest.$ac_ext
18942 cat >>conftest.$ac_ext <<_ACEOF
18943 /* end confdefs.h.  */
18944 #include <sys/types.h>
18945  /* Check that off_t can represent 2**63 - 1 correctly.
18946     We can't simply define LARGE_OFF_T to be 9223372036854775807,
18947     since some C++ compilers masquerading as C compilers
18948     incorrectly reject 9223372036854775807.  */
18949 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
18950   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
18951                        && LARGE_OFF_T % 2147483647 == 1)
18952                       ? 1 : -1];
18953 int
18954 main ()
18955 {
18956
18957   ;
18958   return 0;
18959 }
18960 _ACEOF
18961 rm -f conftest.$ac_objext
18962 if { (ac_try="$ac_compile"
18963 case "(($ac_try" in
18964   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18965   *) ac_try_echo=$ac_try;;
18966 esac
18967 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18968 $as_echo "$ac_try_echo") >&5
18969   (eval "$ac_compile") 2>conftest.er1
18970   ac_status=$?
18971   grep -v '^ *+' conftest.er1 >conftest.err
18972   rm -f conftest.er1
18973   cat conftest.err >&5
18974   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18975   (exit $ac_status); } && {
18976          test -z "$ac_c_werror_flag" ||
18977          test ! -s conftest.err
18978        } && test -s conftest.$ac_objext; then
18979   ac_cv_sys_large_files=no; break
18980 else
18981   $as_echo "$as_me: failed program was:" >&5
18982 sed 's/^/| /' conftest.$ac_ext >&5
18983
18984
18985 fi
18986
18987 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18988   cat >conftest.$ac_ext <<_ACEOF
18989 /* confdefs.h.  */
18990 _ACEOF
18991 cat confdefs.h >>conftest.$ac_ext
18992 cat >>conftest.$ac_ext <<_ACEOF
18993 /* end confdefs.h.  */
18994 #define _LARGE_FILES 1
18995 #include <sys/types.h>
18996  /* Check that off_t can represent 2**63 - 1 correctly.
18997     We can't simply define LARGE_OFF_T to be 9223372036854775807,
18998     since some C++ compilers masquerading as C compilers
18999     incorrectly reject 9223372036854775807.  */
19000 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
19001   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
19002                        && LARGE_OFF_T % 2147483647 == 1)
19003                       ? 1 : -1];
19004 int
19005 main ()
19006 {
19007
19008   ;
19009   return 0;
19010 }
19011 _ACEOF
19012 rm -f conftest.$ac_objext
19013 if { (ac_try="$ac_compile"
19014 case "(($ac_try" in
19015   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19016   *) ac_try_echo=$ac_try;;
19017 esac
19018 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19019 $as_echo "$ac_try_echo") >&5
19020   (eval "$ac_compile") 2>conftest.er1
19021   ac_status=$?
19022   grep -v '^ *+' conftest.er1 >conftest.err
19023   rm -f conftest.er1
19024   cat conftest.err >&5
19025   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19026   (exit $ac_status); } && {
19027          test -z "$ac_c_werror_flag" ||
19028          test ! -s conftest.err
19029        } && test -s conftest.$ac_objext; then
19030   ac_cv_sys_large_files=1; break
19031 else
19032   $as_echo "$as_me: failed program was:" >&5
19033 sed 's/^/| /' conftest.$ac_ext >&5
19034
19035
19036 fi
19037
19038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19039   ac_cv_sys_large_files=unknown
19040   break
19041 done
19042 fi
19043 { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
19044 $as_echo "$ac_cv_sys_large_files" >&6; }
19045 case $ac_cv_sys_large_files in #(
19046   no | unknown) ;;
19047   *)
19048 cat >>confdefs.h <<_ACEOF
19049 #define _LARGE_FILES $ac_cv_sys_large_files
19050 _ACEOF
19051 ;;
19052 esac
19053 rm -rf conftest*
19054   fi
19055 fi
19056
19057 fi
19058
19059 # Check for largefile support (must be after AC_SYS_LARGEFILE)
19060 # The cast to long int works around a bug in the HP C Compiler
19061 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19062 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
19063 # This bug is HP SR number 8606223364.
19064 { $as_echo "$as_me:$LINENO: checking size of off_t" >&5
19065 $as_echo_n "checking size of off_t... " >&6; }
19066 if test "${ac_cv_sizeof_off_t+set}" = set; then
19067   $as_echo_n "(cached) " >&6
19068 else
19069   if test "$cross_compiling" = yes; then
19070   # Depending upon the size, compute the lo and hi bounds.
19071 cat >conftest.$ac_ext <<_ACEOF
19072 /* confdefs.h.  */
19073 _ACEOF
19074 cat confdefs.h >>conftest.$ac_ext
19075 cat >>conftest.$ac_ext <<_ACEOF
19076 /* end confdefs.h.  */
19077 $ac_includes_default
19078 int
19079 main ()
19080 {
19081 static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= 0)];
19082 test_array [0] = 0
19083
19084   ;
19085   return 0;
19086 }
19087 _ACEOF
19088 rm -f conftest.$ac_objext
19089 if { (ac_try="$ac_compile"
19090 case "(($ac_try" in
19091   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19092   *) ac_try_echo=$ac_try;;
19093 esac
19094 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19095 $as_echo "$ac_try_echo") >&5
19096   (eval "$ac_compile") 2>conftest.er1
19097   ac_status=$?
19098   grep -v '^ *+' conftest.er1 >conftest.err
19099   rm -f conftest.er1
19100   cat conftest.err >&5
19101   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19102   (exit $ac_status); } && {
19103          test -z "$ac_c_werror_flag" ||
19104          test ! -s conftest.err
19105        } && test -s conftest.$ac_objext; then
19106   ac_lo=0 ac_mid=0
19107   while :; do
19108     cat >conftest.$ac_ext <<_ACEOF
19109 /* confdefs.h.  */
19110 _ACEOF
19111 cat confdefs.h >>conftest.$ac_ext
19112 cat >>conftest.$ac_ext <<_ACEOF
19113 /* end confdefs.h.  */
19114 $ac_includes_default
19115 int
19116 main ()
19117 {
19118 static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)];
19119 test_array [0] = 0
19120
19121   ;
19122   return 0;
19123 }
19124 _ACEOF
19125 rm -f conftest.$ac_objext
19126 if { (ac_try="$ac_compile"
19127 case "(($ac_try" in
19128   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19129   *) ac_try_echo=$ac_try;;
19130 esac
19131 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19132 $as_echo "$ac_try_echo") >&5
19133   (eval "$ac_compile") 2>conftest.er1
19134   ac_status=$?
19135   grep -v '^ *+' conftest.er1 >conftest.err
19136   rm -f conftest.er1
19137   cat conftest.err >&5
19138   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19139   (exit $ac_status); } && {
19140          test -z "$ac_c_werror_flag" ||
19141          test ! -s conftest.err
19142        } && test -s conftest.$ac_objext; then
19143   ac_hi=$ac_mid; break
19144 else
19145   $as_echo "$as_me: failed program was:" >&5
19146 sed 's/^/| /' conftest.$ac_ext >&5
19147
19148         ac_lo=`expr $ac_mid + 1`
19149                         if test $ac_lo -le $ac_mid; then
19150                           ac_lo= ac_hi=
19151                           break
19152                         fi
19153                         ac_mid=`expr 2 '*' $ac_mid + 1`
19154 fi
19155
19156 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19157   done
19158 else
19159   $as_echo "$as_me: failed program was:" >&5
19160 sed 's/^/| /' conftest.$ac_ext >&5
19161
19162         cat >conftest.$ac_ext <<_ACEOF
19163 /* confdefs.h.  */
19164 _ACEOF
19165 cat confdefs.h >>conftest.$ac_ext
19166 cat >>conftest.$ac_ext <<_ACEOF
19167 /* end confdefs.h.  */
19168 $ac_includes_default
19169 int
19170 main ()
19171 {
19172 static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) < 0)];
19173 test_array [0] = 0
19174
19175   ;
19176   return 0;
19177 }
19178 _ACEOF
19179 rm -f conftest.$ac_objext
19180 if { (ac_try="$ac_compile"
19181 case "(($ac_try" in
19182   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19183   *) ac_try_echo=$ac_try;;
19184 esac
19185 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19186 $as_echo "$ac_try_echo") >&5
19187   (eval "$ac_compile") 2>conftest.er1
19188   ac_status=$?
19189   grep -v '^ *+' conftest.er1 >conftest.err
19190   rm -f conftest.er1
19191   cat conftest.err >&5
19192   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19193   (exit $ac_status); } && {
19194          test -z "$ac_c_werror_flag" ||
19195          test ! -s conftest.err
19196        } && test -s conftest.$ac_objext; then
19197   ac_hi=-1 ac_mid=-1
19198   while :; do
19199     cat >conftest.$ac_ext <<_ACEOF
19200 /* confdefs.h.  */
19201 _ACEOF
19202 cat confdefs.h >>conftest.$ac_ext
19203 cat >>conftest.$ac_ext <<_ACEOF
19204 /* end confdefs.h.  */
19205 $ac_includes_default
19206 int
19207 main ()
19208 {
19209 static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= $ac_mid)];
19210 test_array [0] = 0
19211
19212   ;
19213   return 0;
19214 }
19215 _ACEOF
19216 rm -f conftest.$ac_objext
19217 if { (ac_try="$ac_compile"
19218 case "(($ac_try" in
19219   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19220   *) ac_try_echo=$ac_try;;
19221 esac
19222 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19223 $as_echo "$ac_try_echo") >&5
19224   (eval "$ac_compile") 2>conftest.er1
19225   ac_status=$?
19226   grep -v '^ *+' conftest.er1 >conftest.err
19227   rm -f conftest.er1
19228   cat conftest.err >&5
19229   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19230   (exit $ac_status); } && {
19231          test -z "$ac_c_werror_flag" ||
19232          test ! -s conftest.err
19233        } && test -s conftest.$ac_objext; then
19234   ac_lo=$ac_mid; break
19235 else
19236   $as_echo "$as_me: failed program was:" >&5
19237 sed 's/^/| /' conftest.$ac_ext >&5
19238
19239         ac_hi=`expr '(' $ac_mid ')' - 1`
19240                         if test $ac_mid -le $ac_hi; then
19241                           ac_lo= ac_hi=
19242                           break
19243                         fi
19244                         ac_mid=`expr 2 '*' $ac_mid`
19245 fi
19246
19247 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19248   done
19249 else
19250   $as_echo "$as_me: failed program was:" >&5
19251 sed 's/^/| /' conftest.$ac_ext >&5
19252
19253         ac_lo= ac_hi=
19254 fi
19255
19256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19257 fi
19258
19259 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19260 # Binary search between lo and hi bounds.
19261 while test "x$ac_lo" != "x$ac_hi"; do
19262   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19263   cat >conftest.$ac_ext <<_ACEOF
19264 /* confdefs.h.  */
19265 _ACEOF
19266 cat confdefs.h >>conftest.$ac_ext
19267 cat >>conftest.$ac_ext <<_ACEOF
19268 /* end confdefs.h.  */
19269 $ac_includes_default
19270 int
19271 main ()
19272 {
19273 static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)];
19274 test_array [0] = 0
19275
19276   ;
19277   return 0;
19278 }
19279 _ACEOF
19280 rm -f conftest.$ac_objext
19281 if { (ac_try="$ac_compile"
19282 case "(($ac_try" in
19283   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19284   *) ac_try_echo=$ac_try;;
19285 esac
19286 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19287 $as_echo "$ac_try_echo") >&5
19288   (eval "$ac_compile") 2>conftest.er1
19289   ac_status=$?
19290   grep -v '^ *+' conftest.er1 >conftest.err
19291   rm -f conftest.er1
19292   cat conftest.err >&5
19293   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19294   (exit $ac_status); } && {
19295          test -z "$ac_c_werror_flag" ||
19296          test ! -s conftest.err
19297        } && test -s conftest.$ac_objext; then
19298   ac_hi=$ac_mid
19299 else
19300   $as_echo "$as_me: failed program was:" >&5
19301 sed 's/^/| /' conftest.$ac_ext >&5
19302
19303         ac_lo=`expr '(' $ac_mid ')' + 1`
19304 fi
19305
19306 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19307 done
19308 case $ac_lo in
19309 ?*) ac_cv_sizeof_off_t=$ac_lo;;
19310 '') if test "$ac_cv_type_off_t" = yes; then
19311      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
19312 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19313 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
19314 See \`config.log' for more details." >&5
19315 $as_echo "$as_me: error: cannot compute sizeof (off_t)
19316 See \`config.log' for more details." >&2;}
19317    { (exit 77); exit 77; }; }; }
19318    else
19319      ac_cv_sizeof_off_t=0
19320    fi ;;
19321 esac
19322 else
19323   cat >conftest.$ac_ext <<_ACEOF
19324 /* confdefs.h.  */
19325 _ACEOF
19326 cat confdefs.h >>conftest.$ac_ext
19327 cat >>conftest.$ac_ext <<_ACEOF
19328 /* end confdefs.h.  */
19329 $ac_includes_default
19330 static long int longval () { return (long int) (sizeof (off_t)); }
19331 static unsigned long int ulongval () { return (long int) (sizeof (off_t)); }
19332 #include <stdio.h>
19333 #include <stdlib.h>
19334 int
19335 main ()
19336 {
19337
19338   FILE *f = fopen ("conftest.val", "w");
19339   if (! f)
19340     return 1;
19341   if (((long int) (sizeof (off_t))) < 0)
19342     {
19343       long int i = longval ();
19344       if (i != ((long int) (sizeof (off_t))))
19345         return 1;
19346       fprintf (f, "%ld", i);
19347     }
19348   else
19349     {
19350       unsigned long int i = ulongval ();
19351       if (i != ((long int) (sizeof (off_t))))
19352         return 1;
19353       fprintf (f, "%lu", i);
19354     }
19355   /* Do not output a trailing newline, as this causes \r\n confusion
19356      on some platforms.  */
19357   return ferror (f) || fclose (f) != 0;
19358
19359   ;
19360   return 0;
19361 }
19362 _ACEOF
19363 rm -f conftest$ac_exeext
19364 if { (ac_try="$ac_link"
19365 case "(($ac_try" in
19366   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19367   *) ac_try_echo=$ac_try;;
19368 esac
19369 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19370 $as_echo "$ac_try_echo") >&5
19371   (eval "$ac_link") 2>&5
19372   ac_status=$?
19373   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19374   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19375   { (case "(($ac_try" in
19376   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19377   *) ac_try_echo=$ac_try;;
19378 esac
19379 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19380 $as_echo "$ac_try_echo") >&5
19381   (eval "$ac_try") 2>&5
19382   ac_status=$?
19383   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19384   (exit $ac_status); }; }; then
19385   ac_cv_sizeof_off_t=`cat conftest.val`
19386 else
19387   $as_echo "$as_me: program exited with status $ac_status" >&5
19388 $as_echo "$as_me: failed program was:" >&5
19389 sed 's/^/| /' conftest.$ac_ext >&5
19390
19391 ( exit $ac_status )
19392 if test "$ac_cv_type_off_t" = yes; then
19393      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
19394 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19395 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
19396 See \`config.log' for more details." >&5
19397 $as_echo "$as_me: error: cannot compute sizeof (off_t)
19398 See \`config.log' for more details." >&2;}
19399    { (exit 77); exit 77; }; }; }
19400    else
19401      ac_cv_sizeof_off_t=0
19402    fi
19403 fi
19404 rm -rf conftest.dSYM
19405 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19406 fi
19407 rm -f conftest.val
19408 fi
19409 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
19410 $as_echo "$ac_cv_sizeof_off_t" >&6; }
19411
19412
19413
19414 cat >>confdefs.h <<_ACEOF
19415 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
19416 _ACEOF
19417
19418
19419
19420 # If we don't have largefile support, can't handle segsize >= 2GB.
19421 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
19422    { { $as_echo "$as_me:$LINENO: error: Large file support is not enabled. Segment size cannot be larger than 1GB." >&5
19423 $as_echo "$as_me: error: Large file support is not enabled. Segment size cannot be larger than 1GB." >&2;}
19424    { (exit 1); exit 1; }; }
19425 fi
19426
19427
19428 ##
19429 ## Functions, global variables
19430 ##
19431
19432 { $as_echo "$as_me:$LINENO: checking for int timezone" >&5
19433 $as_echo_n "checking for int timezone... " >&6; }
19434 if test "${pgac_cv_var_int_timezone+set}" = set; then
19435   $as_echo_n "(cached) " >&6
19436 else
19437   cat >conftest.$ac_ext <<_ACEOF
19438 /* confdefs.h.  */
19439 _ACEOF
19440 cat confdefs.h >>conftest.$ac_ext
19441 cat >>conftest.$ac_ext <<_ACEOF
19442 /* end confdefs.h.  */
19443 #include <time.h>
19444 int res;
19445 int
19446 main ()
19447 {
19448 #ifndef __CYGWIN__
19449 res = timezone / 60;
19450 #else
19451 res = _timezone / 60;
19452 #endif
19453   ;
19454   return 0;
19455 }
19456 _ACEOF
19457 rm -f conftest.$ac_objext conftest$ac_exeext
19458 if { (ac_try="$ac_link"
19459 case "(($ac_try" in
19460   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19461   *) ac_try_echo=$ac_try;;
19462 esac
19463 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19464 $as_echo "$ac_try_echo") >&5
19465   (eval "$ac_link") 2>conftest.er1
19466   ac_status=$?
19467   grep -v '^ *+' conftest.er1 >conftest.err
19468   rm -f conftest.er1
19469   cat conftest.err >&5
19470   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19471   (exit $ac_status); } && {
19472          test -z "$ac_c_werror_flag" ||
19473          test ! -s conftest.err
19474        } && test -s conftest$ac_exeext && {
19475          test "$cross_compiling" = yes ||
19476          $as_test_x conftest$ac_exeext
19477        }; then
19478   pgac_cv_var_int_timezone=yes
19479 else
19480   $as_echo "$as_me: failed program was:" >&5
19481 sed 's/^/| /' conftest.$ac_ext >&5
19482
19483         pgac_cv_var_int_timezone=no
19484 fi
19485
19486 rm -rf conftest.dSYM
19487 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19488       conftest$ac_exeext conftest.$ac_ext
19489 fi
19490 { $as_echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
19491 $as_echo "$pgac_cv_var_int_timezone" >&6; }
19492 if test x"$pgac_cv_var_int_timezone" = xyes ; then
19493
19494 cat >>confdefs.h <<\_ACEOF
19495 #define HAVE_INT_TIMEZONE 1
19496 _ACEOF
19497
19498 fi
19499 { $as_echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
19500 $as_echo_n "checking types of arguments for accept()... " >&6; }
19501  if test "${ac_cv_func_accept_return+set}" = set; then
19502   $as_echo_n "(cached) " >&6
19503 else
19504    if test "${ac_cv_func_accept_arg1+set}" = set; then
19505   $as_echo_n "(cached) " >&6
19506 else
19507     if test "${ac_cv_func_accept_arg2+set}" = set; then
19508   $as_echo_n "(cached) " >&6
19509 else
19510      if test "${ac_cv_func_accept_arg3+set}" = set; then
19511   $as_echo_n "(cached) " >&6
19512 else
19513       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
19514       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
19515        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
19516         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
19517          cat >conftest.$ac_ext <<_ACEOF
19518 /* confdefs.h.  */
19519 _ACEOF
19520 cat confdefs.h >>conftest.$ac_ext
19521 cat >>conftest.$ac_ext <<_ACEOF
19522 /* end confdefs.h.  */
19523 #ifdef HAVE_SYS_TYPES_H
19524 #include <sys/types.h>
19525 #endif
19526 #ifdef HAVE_SYS_SOCKET_H
19527 #include <sys/socket.h>
19528 #endif
19529 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
19530 int
19531 main ()
19532 {
19533
19534   ;
19535   return 0;
19536 }
19537 _ACEOF
19538 rm -f conftest.$ac_objext
19539 if { (ac_try="$ac_compile"
19540 case "(($ac_try" in
19541   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19542   *) ac_try_echo=$ac_try;;
19543 esac
19544 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19545 $as_echo "$ac_try_echo") >&5
19546   (eval "$ac_compile") 2>conftest.er1
19547   ac_status=$?
19548   grep -v '^ *+' conftest.er1 >conftest.err
19549   rm -f conftest.er1
19550   cat conftest.err >&5
19551   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19552   (exit $ac_status); } && {
19553          test -z "$ac_c_werror_flag" ||
19554          test ! -s conftest.err
19555        } && test -s conftest.$ac_objext; then
19556   ac_not_found=no; break 4
19557 else
19558   $as_echo "$as_me: failed program was:" >&5
19559 sed 's/^/| /' conftest.$ac_ext >&5
19560
19561         ac_not_found=yes
19562 fi
19563
19564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19565        done
19566       done
19567      done
19568     done
19569     if test "$ac_not_found" = yes; then
19570       { { $as_echo "$as_me:$LINENO: error: could not determine argument types" >&5
19571 $as_echo "$as_me: error: could not determine argument types" >&2;}
19572    { (exit 1); exit 1; }; }
19573     fi
19574     if test "$ac_cv_func_accept_arg3" = "void"; then
19575       ac_cv_func_accept_arg3=int
19576     fi
19577
19578 fi
19579
19580 fi
19581
19582 fi
19583
19584 fi
19585  { $as_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
19586 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
19587
19588 cat >>confdefs.h <<_ACEOF
19589 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
19590 _ACEOF
19591
19592
19593 cat >>confdefs.h <<_ACEOF
19594 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
19595 _ACEOF
19596
19597
19598 cat >>confdefs.h <<_ACEOF
19599 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
19600 _ACEOF
19601
19602
19603 cat >>confdefs.h <<_ACEOF
19604 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
19605 _ACEOF
19606
19607
19608 { $as_echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
19609 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
19610 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
19611   $as_echo_n "(cached) " >&6
19612 else
19613   cat >conftest.$ac_ext <<_ACEOF
19614 /* confdefs.h.  */
19615 _ACEOF
19616 cat confdefs.h >>conftest.$ac_ext
19617 cat >>conftest.$ac_ext <<_ACEOF
19618 /* end confdefs.h.  */
19619 #include <sys/time.h>
19620 int
19621 main ()
19622 {
19623 struct timeval *tp;
19624 struct timezone *tzp;
19625 gettimeofday(tp,tzp);
19626   ;
19627   return 0;
19628 }
19629 _ACEOF
19630 rm -f conftest.$ac_objext
19631 if { (ac_try="$ac_compile"
19632 case "(($ac_try" in
19633   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19634   *) ac_try_echo=$ac_try;;
19635 esac
19636 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19637 $as_echo "$ac_try_echo") >&5
19638   (eval "$ac_compile") 2>conftest.er1
19639   ac_status=$?
19640   grep -v '^ *+' conftest.er1 >conftest.err
19641   rm -f conftest.er1
19642   cat conftest.err >&5
19643   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19644   (exit $ac_status); } && {
19645          test -z "$ac_c_werror_flag" ||
19646          test ! -s conftest.err
19647        } && test -s conftest.$ac_objext; then
19648   pgac_cv_func_gettimeofday_1arg=no
19649 else
19650   $as_echo "$as_me: failed program was:" >&5
19651 sed 's/^/| /' conftest.$ac_ext >&5
19652
19653         pgac_cv_func_gettimeofday_1arg=yes
19654 fi
19655
19656 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19657 fi
19658 { $as_echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
19659 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
19660 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
19661
19662 cat >>confdefs.h <<\_ACEOF
19663 #define GETTIMEOFDAY_1ARG 1
19664 _ACEOF
19665
19666 fi
19667
19668
19669
19670 # Some versions of libedit contain strlcpy(), setproctitle(), and other
19671 # symbols that that library has no business exposing to the world.  Pending
19672 # acquisition of a clue by those developers, ignore libedit (including its
19673 # possible alias of libreadline) while checking for everything else.
19674 LIBS_including_readline="$LIBS"
19675 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
19676
19677
19678
19679
19680
19681
19682
19683
19684
19685
19686
19687
19688
19689
19690
19691
19692
19693
19694
19695
19696
19697
19698
19699 for ac_func in cbrt dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate pstat readlink setproctitle setsid sigprocmask symlink sync_file_range towlower utime utimes wcstombs wcstombs_l
19700 do
19701 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19702 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19703 $as_echo_n "checking for $ac_func... " >&6; }
19704 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
19705   $as_echo_n "(cached) " >&6
19706 else
19707   cat >conftest.$ac_ext <<_ACEOF
19708 /* confdefs.h.  */
19709 _ACEOF
19710 cat confdefs.h >>conftest.$ac_ext
19711 cat >>conftest.$ac_ext <<_ACEOF
19712 /* end confdefs.h.  */
19713 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19714    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
19715 #define $ac_func innocuous_$ac_func
19716
19717 /* System header to define __stub macros and hopefully few prototypes,
19718     which can conflict with char $ac_func (); below.
19719     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19720     <limits.h> exists even on freestanding compilers.  */
19721
19722 #ifdef __STDC__
19723 # include <limits.h>
19724 #else
19725 # include <assert.h>
19726 #endif
19727
19728 #undef $ac_func
19729
19730 /* Override any GCC internal prototype to avoid an error.
19731    Use char because int might match the return type of a GCC
19732    builtin and then its argument prototype would still apply.  */
19733 #ifdef __cplusplus
19734 extern "C"
19735 #endif
19736 char $ac_func ();
19737 /* The GNU C library defines this for functions which it implements
19738     to always fail with ENOSYS.  Some functions are actually named
19739     something starting with __ and the normal name is an alias.  */
19740 #if defined __stub_$ac_func || defined __stub___$ac_func
19741 choke me
19742 #endif
19743
19744 int
19745 main ()
19746 {
19747 return $ac_func ();
19748   ;
19749   return 0;
19750 }
19751 _ACEOF
19752 rm -f conftest.$ac_objext conftest$ac_exeext
19753 if { (ac_try="$ac_link"
19754 case "(($ac_try" in
19755   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19756   *) ac_try_echo=$ac_try;;
19757 esac
19758 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19759 $as_echo "$ac_try_echo") >&5
19760   (eval "$ac_link") 2>conftest.er1
19761   ac_status=$?
19762   grep -v '^ *+' conftest.er1 >conftest.err
19763   rm -f conftest.er1
19764   cat conftest.err >&5
19765   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19766   (exit $ac_status); } && {
19767          test -z "$ac_c_werror_flag" ||
19768          test ! -s conftest.err
19769        } && test -s conftest$ac_exeext && {
19770          test "$cross_compiling" = yes ||
19771          $as_test_x conftest$ac_exeext
19772        }; then
19773   eval "$as_ac_var=yes"
19774 else
19775   $as_echo "$as_me: failed program was:" >&5
19776 sed 's/^/| /' conftest.$ac_ext >&5
19777
19778         eval "$as_ac_var=no"
19779 fi
19780
19781 rm -rf conftest.dSYM
19782 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19783       conftest$ac_exeext conftest.$ac_ext
19784 fi
19785 ac_res=`eval 'as_val=${'$as_ac_var'}
19786                  $as_echo "$as_val"'`
19787                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19788 $as_echo "$ac_res" >&6; }
19789 as_val=`eval 'as_val=${'$as_ac_var'}
19790                  $as_echo "$as_val"'`
19791    if test "x$as_val" = x""yes; then
19792   cat >>confdefs.h <<_ACEOF
19793 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19794 _ACEOF
19795
19796 fi
19797 done
19798
19799
19800
19801 for ac_func in fseeko
19802 do
19803 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19804 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19805 $as_echo_n "checking for $ac_func... " >&6; }
19806 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
19807   $as_echo_n "(cached) " >&6
19808 else
19809   cat >conftest.$ac_ext <<_ACEOF
19810 /* confdefs.h.  */
19811 _ACEOF
19812 cat confdefs.h >>conftest.$ac_ext
19813 cat >>conftest.$ac_ext <<_ACEOF
19814 /* end confdefs.h.  */
19815 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19816    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
19817 #define $ac_func innocuous_$ac_func
19818
19819 /* System header to define __stub macros and hopefully few prototypes,
19820     which can conflict with char $ac_func (); below.
19821     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19822     <limits.h> exists even on freestanding compilers.  */
19823
19824 #ifdef __STDC__
19825 # include <limits.h>
19826 #else
19827 # include <assert.h>
19828 #endif
19829
19830 #undef $ac_func
19831
19832 /* Override any GCC internal prototype to avoid an error.
19833    Use char because int might match the return type of a GCC
19834    builtin and then its argument prototype would still apply.  */
19835 #ifdef __cplusplus
19836 extern "C"
19837 #endif
19838 char $ac_func ();
19839 /* The GNU C library defines this for functions which it implements
19840     to always fail with ENOSYS.  Some functions are actually named
19841     something starting with __ and the normal name is an alias.  */
19842 #if defined __stub_$ac_func || defined __stub___$ac_func
19843 choke me
19844 #endif
19845
19846 int
19847 main ()
19848 {
19849 return $ac_func ();
19850   ;
19851   return 0;
19852 }
19853 _ACEOF
19854 rm -f conftest.$ac_objext conftest$ac_exeext
19855 if { (ac_try="$ac_link"
19856 case "(($ac_try" in
19857   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19858   *) ac_try_echo=$ac_try;;
19859 esac
19860 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19861 $as_echo "$ac_try_echo") >&5
19862   (eval "$ac_link") 2>conftest.er1
19863   ac_status=$?
19864   grep -v '^ *+' conftest.er1 >conftest.err
19865   rm -f conftest.er1
19866   cat conftest.err >&5
19867   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19868   (exit $ac_status); } && {
19869          test -z "$ac_c_werror_flag" ||
19870          test ! -s conftest.err
19871        } && test -s conftest$ac_exeext && {
19872          test "$cross_compiling" = yes ||
19873          $as_test_x conftest$ac_exeext
19874        }; then
19875   eval "$as_ac_var=yes"
19876 else
19877   $as_echo "$as_me: failed program was:" >&5
19878 sed 's/^/| /' conftest.$ac_ext >&5
19879
19880         eval "$as_ac_var=no"
19881 fi
19882
19883 rm -rf conftest.dSYM
19884 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19885       conftest$ac_exeext conftest.$ac_ext
19886 fi
19887 ac_res=`eval 'as_val=${'$as_ac_var'}
19888                  $as_echo "$as_val"'`
19889                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19890 $as_echo "$ac_res" >&6; }
19891 as_val=`eval 'as_val=${'$as_ac_var'}
19892                  $as_echo "$as_val"'`
19893    if test "x$as_val" = x""yes; then
19894   cat >>confdefs.h <<_ACEOF
19895 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19896 _ACEOF
19897
19898 else
19899   case " $LIBOBJS " in
19900   *" $ac_func.$ac_objext "* ) ;;
19901   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19902  ;;
19903 esac
19904
19905 fi
19906 done
19907
19908
19909 case $host_os in
19910         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
19911         # Mingw uses macros to access Win32 API calls
19912         netbsd*|mingw*)
19913
19914 cat >>confdefs.h <<\_ACEOF
19915 #define HAVE_FSEEKO 1
19916 _ACEOF
19917
19918                 ac_cv_func_fseeko=yes;;
19919         *)
19920                 { $as_echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
19921 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
19922 if test "${ac_cv_sys_largefile_source+set}" = set; then
19923   $as_echo_n "(cached) " >&6
19924 else
19925   while :; do
19926   cat >conftest.$ac_ext <<_ACEOF
19927 /* confdefs.h.  */
19928 _ACEOF
19929 cat confdefs.h >>conftest.$ac_ext
19930 cat >>conftest.$ac_ext <<_ACEOF
19931 /* end confdefs.h.  */
19932 #include <sys/types.h> /* for off_t */
19933      #include <stdio.h>
19934 int
19935 main ()
19936 {
19937 int (*fp) (FILE *, off_t, int) = fseeko;
19938      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
19939   ;
19940   return 0;
19941 }
19942 _ACEOF
19943 rm -f conftest.$ac_objext conftest$ac_exeext
19944 if { (ac_try="$ac_link"
19945 case "(($ac_try" in
19946   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19947   *) ac_try_echo=$ac_try;;
19948 esac
19949 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19950 $as_echo "$ac_try_echo") >&5
19951   (eval "$ac_link") 2>conftest.er1
19952   ac_status=$?
19953   grep -v '^ *+' conftest.er1 >conftest.err
19954   rm -f conftest.er1
19955   cat conftest.err >&5
19956   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19957   (exit $ac_status); } && {
19958          test -z "$ac_c_werror_flag" ||
19959          test ! -s conftest.err
19960        } && test -s conftest$ac_exeext && {
19961          test "$cross_compiling" = yes ||
19962          $as_test_x conftest$ac_exeext
19963        }; then
19964   ac_cv_sys_largefile_source=no; break
19965 else
19966   $as_echo "$as_me: failed program was:" >&5
19967 sed 's/^/| /' conftest.$ac_ext >&5
19968
19969
19970 fi
19971
19972 rm -rf conftest.dSYM
19973 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19974       conftest$ac_exeext conftest.$ac_ext
19975   cat >conftest.$ac_ext <<_ACEOF
19976 /* confdefs.h.  */
19977 _ACEOF
19978 cat confdefs.h >>conftest.$ac_ext
19979 cat >>conftest.$ac_ext <<_ACEOF
19980 /* end confdefs.h.  */
19981 #define _LARGEFILE_SOURCE 1
19982 #include <sys/types.h> /* for off_t */
19983      #include <stdio.h>
19984 int
19985 main ()
19986 {
19987 int (*fp) (FILE *, off_t, int) = fseeko;
19988      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
19989   ;
19990   return 0;
19991 }
19992 _ACEOF
19993 rm -f conftest.$ac_objext conftest$ac_exeext
19994 if { (ac_try="$ac_link"
19995 case "(($ac_try" in
19996   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19997   *) ac_try_echo=$ac_try;;
19998 esac
19999 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20000 $as_echo "$ac_try_echo") >&5
20001   (eval "$ac_link") 2>conftest.er1
20002   ac_status=$?
20003   grep -v '^ *+' conftest.er1 >conftest.err
20004   rm -f conftest.er1
20005   cat conftest.err >&5
20006   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20007   (exit $ac_status); } && {
20008          test -z "$ac_c_werror_flag" ||
20009          test ! -s conftest.err
20010        } && test -s conftest$ac_exeext && {
20011          test "$cross_compiling" = yes ||
20012          $as_test_x conftest$ac_exeext
20013        }; then
20014   ac_cv_sys_largefile_source=1; break
20015 else
20016   $as_echo "$as_me: failed program was:" >&5
20017 sed 's/^/| /' conftest.$ac_ext >&5
20018
20019
20020 fi
20021
20022 rm -rf conftest.dSYM
20023 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20024       conftest$ac_exeext conftest.$ac_ext
20025   ac_cv_sys_largefile_source=unknown
20026   break
20027 done
20028 fi
20029 { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
20030 $as_echo "$ac_cv_sys_largefile_source" >&6; }
20031 case $ac_cv_sys_largefile_source in #(
20032   no | unknown) ;;
20033   *)
20034 cat >>confdefs.h <<_ACEOF
20035 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
20036 _ACEOF
20037 ;;
20038 esac
20039 rm -rf conftest*
20040
20041 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
20042 # in glibc 2.1.3, but that breaks too many other things.
20043 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
20044 if test $ac_cv_sys_largefile_source != unknown; then
20045
20046 cat >>confdefs.h <<\_ACEOF
20047 #define HAVE_FSEEKO 1
20048 _ACEOF
20049
20050 fi
20051 ;;
20052 esac
20053
20054 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
20055 # by calling it, 2009-04-02
20056 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
20057 if test "$PORTNAME" != "solaris"; then
20058
20059 for ac_func in posix_fadvise
20060 do
20061 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20062 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20063 $as_echo_n "checking for $ac_func... " >&6; }
20064 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20065   $as_echo_n "(cached) " >&6
20066 else
20067   cat >conftest.$ac_ext <<_ACEOF
20068 /* confdefs.h.  */
20069 _ACEOF
20070 cat confdefs.h >>conftest.$ac_ext
20071 cat >>conftest.$ac_ext <<_ACEOF
20072 /* end confdefs.h.  */
20073 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20074    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
20075 #define $ac_func innocuous_$ac_func
20076
20077 /* System header to define __stub macros and hopefully few prototypes,
20078     which can conflict with char $ac_func (); below.
20079     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20080     <limits.h> exists even on freestanding compilers.  */
20081
20082 #ifdef __STDC__
20083 # include <limits.h>
20084 #else
20085 # include <assert.h>
20086 #endif
20087
20088 #undef $ac_func
20089
20090 /* Override any GCC internal prototype to avoid an error.
20091    Use char because int might match the return type of a GCC
20092    builtin and then its argument prototype would still apply.  */
20093 #ifdef __cplusplus
20094 extern "C"
20095 #endif
20096 char $ac_func ();
20097 /* The GNU C library defines this for functions which it implements
20098     to always fail with ENOSYS.  Some functions are actually named
20099     something starting with __ and the normal name is an alias.  */
20100 #if defined __stub_$ac_func || defined __stub___$ac_func
20101 choke me
20102 #endif
20103
20104 int
20105 main ()
20106 {
20107 return $ac_func ();
20108   ;
20109   return 0;
20110 }
20111 _ACEOF
20112 rm -f conftest.$ac_objext conftest$ac_exeext
20113 if { (ac_try="$ac_link"
20114 case "(($ac_try" in
20115   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20116   *) ac_try_echo=$ac_try;;
20117 esac
20118 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20119 $as_echo "$ac_try_echo") >&5
20120   (eval "$ac_link") 2>conftest.er1
20121   ac_status=$?
20122   grep -v '^ *+' conftest.er1 >conftest.err
20123   rm -f conftest.er1
20124   cat conftest.err >&5
20125   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20126   (exit $ac_status); } && {
20127          test -z "$ac_c_werror_flag" ||
20128          test ! -s conftest.err
20129        } && test -s conftest$ac_exeext && {
20130          test "$cross_compiling" = yes ||
20131          $as_test_x conftest$ac_exeext
20132        }; then
20133   eval "$as_ac_var=yes"
20134 else
20135   $as_echo "$as_me: failed program was:" >&5
20136 sed 's/^/| /' conftest.$ac_ext >&5
20137
20138         eval "$as_ac_var=no"
20139 fi
20140
20141 rm -rf conftest.dSYM
20142 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20143       conftest$ac_exeext conftest.$ac_ext
20144 fi
20145 ac_res=`eval 'as_val=${'$as_ac_var'}
20146                  $as_echo "$as_val"'`
20147                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20148 $as_echo "$ac_res" >&6; }
20149 as_val=`eval 'as_val=${'$as_ac_var'}
20150                  $as_echo "$as_val"'`
20151    if test "x$as_val" = x""yes; then
20152   cat >>confdefs.h <<_ACEOF
20153 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20154 _ACEOF
20155
20156 fi
20157 done
20158
20159 { $as_echo "$as_me:$LINENO: checking whether posix_fadvise is declared" >&5
20160 $as_echo_n "checking whether posix_fadvise is declared... " >&6; }
20161 if test "${ac_cv_have_decl_posix_fadvise+set}" = set; then
20162   $as_echo_n "(cached) " >&6
20163 else
20164   cat >conftest.$ac_ext <<_ACEOF
20165 /* confdefs.h.  */
20166 _ACEOF
20167 cat confdefs.h >>conftest.$ac_ext
20168 cat >>conftest.$ac_ext <<_ACEOF
20169 /* end confdefs.h.  */
20170 #include <fcntl.h>
20171
20172 int
20173 main ()
20174 {
20175 #ifndef posix_fadvise
20176   (void) posix_fadvise;
20177 #endif
20178
20179   ;
20180   return 0;
20181 }
20182 _ACEOF
20183 rm -f conftest.$ac_objext
20184 if { (ac_try="$ac_compile"
20185 case "(($ac_try" in
20186   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20187   *) ac_try_echo=$ac_try;;
20188 esac
20189 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20190 $as_echo "$ac_try_echo") >&5
20191   (eval "$ac_compile") 2>conftest.er1
20192   ac_status=$?
20193   grep -v '^ *+' conftest.er1 >conftest.err
20194   rm -f conftest.er1
20195   cat conftest.err >&5
20196   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20197   (exit $ac_status); } && {
20198          test -z "$ac_c_werror_flag" ||
20199          test ! -s conftest.err
20200        } && test -s conftest.$ac_objext; then
20201   ac_cv_have_decl_posix_fadvise=yes
20202 else
20203   $as_echo "$as_me: failed program was:" >&5
20204 sed 's/^/| /' conftest.$ac_ext >&5
20205
20206         ac_cv_have_decl_posix_fadvise=no
20207 fi
20208
20209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20210 fi
20211 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix_fadvise" >&5
20212 $as_echo "$ac_cv_have_decl_posix_fadvise" >&6; }
20213 if test "x$ac_cv_have_decl_posix_fadvise" = x""yes; then
20214
20215 cat >>confdefs.h <<_ACEOF
20216 #define HAVE_DECL_POSIX_FADVISE 1
20217 _ACEOF
20218
20219
20220 else
20221   cat >>confdefs.h <<_ACEOF
20222 #define HAVE_DECL_POSIX_FADVISE 0
20223 _ACEOF
20224
20225
20226 fi
20227
20228
20229 fi
20230
20231 { $as_echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
20232 $as_echo_n "checking whether fdatasync is declared... " >&6; }
20233 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
20234   $as_echo_n "(cached) " >&6
20235 else
20236   cat >conftest.$ac_ext <<_ACEOF
20237 /* confdefs.h.  */
20238 _ACEOF
20239 cat confdefs.h >>conftest.$ac_ext
20240 cat >>conftest.$ac_ext <<_ACEOF
20241 /* end confdefs.h.  */
20242 #include <unistd.h>
20243
20244 int
20245 main ()
20246 {
20247 #ifndef fdatasync
20248   (void) fdatasync;
20249 #endif
20250
20251   ;
20252   return 0;
20253 }
20254 _ACEOF
20255 rm -f conftest.$ac_objext
20256 if { (ac_try="$ac_compile"
20257 case "(($ac_try" in
20258   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20259   *) ac_try_echo=$ac_try;;
20260 esac
20261 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20262 $as_echo "$ac_try_echo") >&5
20263   (eval "$ac_compile") 2>conftest.er1
20264   ac_status=$?
20265   grep -v '^ *+' conftest.er1 >conftest.err
20266   rm -f conftest.er1
20267   cat conftest.err >&5
20268   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20269   (exit $ac_status); } && {
20270          test -z "$ac_c_werror_flag" ||
20271          test ! -s conftest.err
20272        } && test -s conftest.$ac_objext; then
20273   ac_cv_have_decl_fdatasync=yes
20274 else
20275   $as_echo "$as_me: failed program was:" >&5
20276 sed 's/^/| /' conftest.$ac_ext >&5
20277
20278         ac_cv_have_decl_fdatasync=no
20279 fi
20280
20281 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20282 fi
20283 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
20284 $as_echo "$ac_cv_have_decl_fdatasync" >&6; }
20285 if test "x$ac_cv_have_decl_fdatasync" = x""yes; then
20286
20287 cat >>confdefs.h <<_ACEOF
20288 #define HAVE_DECL_FDATASYNC 1
20289 _ACEOF
20290
20291
20292 else
20293   cat >>confdefs.h <<_ACEOF
20294 #define HAVE_DECL_FDATASYNC 0
20295 _ACEOF
20296
20297
20298 fi
20299
20300
20301 { $as_echo "$as_me:$LINENO: checking whether strlcat is declared" >&5
20302 $as_echo_n "checking whether strlcat is declared... " >&6; }
20303 if test "${ac_cv_have_decl_strlcat+set}" = set; then
20304   $as_echo_n "(cached) " >&6
20305 else
20306   cat >conftest.$ac_ext <<_ACEOF
20307 /* confdefs.h.  */
20308 _ACEOF
20309 cat confdefs.h >>conftest.$ac_ext
20310 cat >>conftest.$ac_ext <<_ACEOF
20311 /* end confdefs.h.  */
20312 $ac_includes_default
20313 int
20314 main ()
20315 {
20316 #ifndef strlcat
20317   (void) strlcat;
20318 #endif
20319
20320   ;
20321   return 0;
20322 }
20323 _ACEOF
20324 rm -f conftest.$ac_objext
20325 if { (ac_try="$ac_compile"
20326 case "(($ac_try" in
20327   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20328   *) ac_try_echo=$ac_try;;
20329 esac
20330 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20331 $as_echo "$ac_try_echo") >&5
20332   (eval "$ac_compile") 2>conftest.er1
20333   ac_status=$?
20334   grep -v '^ *+' conftest.er1 >conftest.err
20335   rm -f conftest.er1
20336   cat conftest.err >&5
20337   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20338   (exit $ac_status); } && {
20339          test -z "$ac_c_werror_flag" ||
20340          test ! -s conftest.err
20341        } && test -s conftest.$ac_objext; then
20342   ac_cv_have_decl_strlcat=yes
20343 else
20344   $as_echo "$as_me: failed program was:" >&5
20345 sed 's/^/| /' conftest.$ac_ext >&5
20346
20347         ac_cv_have_decl_strlcat=no
20348 fi
20349
20350 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20351 fi
20352 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcat" >&5
20353 $as_echo "$ac_cv_have_decl_strlcat" >&6; }
20354 if test "x$ac_cv_have_decl_strlcat" = x""yes; then
20355
20356 cat >>confdefs.h <<_ACEOF
20357 #define HAVE_DECL_STRLCAT 1
20358 _ACEOF
20359
20360
20361 else
20362   cat >>confdefs.h <<_ACEOF
20363 #define HAVE_DECL_STRLCAT 0
20364 _ACEOF
20365
20366
20367 fi
20368 { $as_echo "$as_me:$LINENO: checking whether strlcpy is declared" >&5
20369 $as_echo_n "checking whether strlcpy is declared... " >&6; }
20370 if test "${ac_cv_have_decl_strlcpy+set}" = set; then
20371   $as_echo_n "(cached) " >&6
20372 else
20373   cat >conftest.$ac_ext <<_ACEOF
20374 /* confdefs.h.  */
20375 _ACEOF
20376 cat confdefs.h >>conftest.$ac_ext
20377 cat >>conftest.$ac_ext <<_ACEOF
20378 /* end confdefs.h.  */
20379 $ac_includes_default
20380 int
20381 main ()
20382 {
20383 #ifndef strlcpy
20384   (void) strlcpy;
20385 #endif
20386
20387   ;
20388   return 0;
20389 }
20390 _ACEOF
20391 rm -f conftest.$ac_objext
20392 if { (ac_try="$ac_compile"
20393 case "(($ac_try" in
20394   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20395   *) ac_try_echo=$ac_try;;
20396 esac
20397 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20398 $as_echo "$ac_try_echo") >&5
20399   (eval "$ac_compile") 2>conftest.er1
20400   ac_status=$?
20401   grep -v '^ *+' conftest.er1 >conftest.err
20402   rm -f conftest.er1
20403   cat conftest.err >&5
20404   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20405   (exit $ac_status); } && {
20406          test -z "$ac_c_werror_flag" ||
20407          test ! -s conftest.err
20408        } && test -s conftest.$ac_objext; then
20409   ac_cv_have_decl_strlcpy=yes
20410 else
20411   $as_echo "$as_me: failed program was:" >&5
20412 sed 's/^/| /' conftest.$ac_ext >&5
20413
20414         ac_cv_have_decl_strlcpy=no
20415 fi
20416
20417 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20418 fi
20419 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcpy" >&5
20420 $as_echo "$ac_cv_have_decl_strlcpy" >&6; }
20421 if test "x$ac_cv_have_decl_strlcpy" = x""yes; then
20422
20423 cat >>confdefs.h <<_ACEOF
20424 #define HAVE_DECL_STRLCPY 1
20425 _ACEOF
20426
20427
20428 else
20429   cat >>confdefs.h <<_ACEOF
20430 #define HAVE_DECL_STRLCPY 0
20431 _ACEOF
20432
20433
20434 fi
20435
20436
20437 # This is probably only present on Darwin, but may as well check always
20438 { $as_echo "$as_me:$LINENO: checking whether F_FULLFSYNC is declared" >&5
20439 $as_echo_n "checking whether F_FULLFSYNC is declared... " >&6; }
20440 if test "${ac_cv_have_decl_F_FULLFSYNC+set}" = set; then
20441   $as_echo_n "(cached) " >&6
20442 else
20443   cat >conftest.$ac_ext <<_ACEOF
20444 /* confdefs.h.  */
20445 _ACEOF
20446 cat confdefs.h >>conftest.$ac_ext
20447 cat >>conftest.$ac_ext <<_ACEOF
20448 /* end confdefs.h.  */
20449 #include <fcntl.h>
20450
20451 int
20452 main ()
20453 {
20454 #ifndef F_FULLFSYNC
20455   (void) F_FULLFSYNC;
20456 #endif
20457
20458   ;
20459   return 0;
20460 }
20461 _ACEOF
20462 rm -f conftest.$ac_objext
20463 if { (ac_try="$ac_compile"
20464 case "(($ac_try" in
20465   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20466   *) ac_try_echo=$ac_try;;
20467 esac
20468 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20469 $as_echo "$ac_try_echo") >&5
20470   (eval "$ac_compile") 2>conftest.er1
20471   ac_status=$?
20472   grep -v '^ *+' conftest.er1 >conftest.err
20473   rm -f conftest.er1
20474   cat conftest.err >&5
20475   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20476   (exit $ac_status); } && {
20477          test -z "$ac_c_werror_flag" ||
20478          test ! -s conftest.err
20479        } && test -s conftest.$ac_objext; then
20480   ac_cv_have_decl_F_FULLFSYNC=yes
20481 else
20482   $as_echo "$as_me: failed program was:" >&5
20483 sed 's/^/| /' conftest.$ac_ext >&5
20484
20485         ac_cv_have_decl_F_FULLFSYNC=no
20486 fi
20487
20488 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20489 fi
20490 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_FULLFSYNC" >&5
20491 $as_echo "$ac_cv_have_decl_F_FULLFSYNC" >&6; }
20492 if test "x$ac_cv_have_decl_F_FULLFSYNC" = x""yes; then
20493
20494 cat >>confdefs.h <<_ACEOF
20495 #define HAVE_DECL_F_FULLFSYNC 1
20496 _ACEOF
20497
20498
20499 else
20500   cat >>confdefs.h <<_ACEOF
20501 #define HAVE_DECL_F_FULLFSYNC 0
20502 _ACEOF
20503
20504
20505 fi
20506
20507
20508
20509 HAVE_IPV6=no
20510 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
20511 $as_echo_n "checking for struct sockaddr_in6... " >&6; }
20512 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
20513   $as_echo_n "(cached) " >&6
20514 else
20515   ac_cv_type_struct_sockaddr_in6=no
20516 cat >conftest.$ac_ext <<_ACEOF
20517 /* confdefs.h.  */
20518 _ACEOF
20519 cat confdefs.h >>conftest.$ac_ext
20520 cat >>conftest.$ac_ext <<_ACEOF
20521 /* end confdefs.h.  */
20522 $ac_includes_default
20523 #include <netinet/in.h>
20524
20525 int
20526 main ()
20527 {
20528 if (sizeof (struct sockaddr_in6))
20529        return 0;
20530   ;
20531   return 0;
20532 }
20533 _ACEOF
20534 rm -f conftest.$ac_objext
20535 if { (ac_try="$ac_compile"
20536 case "(($ac_try" in
20537   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20538   *) ac_try_echo=$ac_try;;
20539 esac
20540 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20541 $as_echo "$ac_try_echo") >&5
20542   (eval "$ac_compile") 2>conftest.er1
20543   ac_status=$?
20544   grep -v '^ *+' conftest.er1 >conftest.err
20545   rm -f conftest.er1
20546   cat conftest.err >&5
20547   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20548   (exit $ac_status); } && {
20549          test -z "$ac_c_werror_flag" ||
20550          test ! -s conftest.err
20551        } && test -s conftest.$ac_objext; then
20552   cat >conftest.$ac_ext <<_ACEOF
20553 /* confdefs.h.  */
20554 _ACEOF
20555 cat confdefs.h >>conftest.$ac_ext
20556 cat >>conftest.$ac_ext <<_ACEOF
20557 /* end confdefs.h.  */
20558 $ac_includes_default
20559 #include <netinet/in.h>
20560
20561 int
20562 main ()
20563 {
20564 if (sizeof ((struct sockaddr_in6)))
20565           return 0;
20566   ;
20567   return 0;
20568 }
20569 _ACEOF
20570 rm -f conftest.$ac_objext
20571 if { (ac_try="$ac_compile"
20572 case "(($ac_try" in
20573   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20574   *) ac_try_echo=$ac_try;;
20575 esac
20576 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20577 $as_echo "$ac_try_echo") >&5
20578   (eval "$ac_compile") 2>conftest.er1
20579   ac_status=$?
20580   grep -v '^ *+' conftest.er1 >conftest.err
20581   rm -f conftest.er1
20582   cat conftest.err >&5
20583   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20584   (exit $ac_status); } && {
20585          test -z "$ac_c_werror_flag" ||
20586          test ! -s conftest.err
20587        } && test -s conftest.$ac_objext; then
20588   :
20589 else
20590   $as_echo "$as_me: failed program was:" >&5
20591 sed 's/^/| /' conftest.$ac_ext >&5
20592
20593         ac_cv_type_struct_sockaddr_in6=yes
20594 fi
20595
20596 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20597 else
20598   $as_echo "$as_me: failed program was:" >&5
20599 sed 's/^/| /' conftest.$ac_ext >&5
20600
20601
20602 fi
20603
20604 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20605 fi
20606 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
20607 $as_echo "$ac_cv_type_struct_sockaddr_in6" >&6; }
20608 if test "x$ac_cv_type_struct_sockaddr_in6" = x""yes; then
20609
20610 cat >>confdefs.h <<\_ACEOF
20611 #define HAVE_IPV6 1
20612 _ACEOF
20613
20614          HAVE_IPV6=yes
20615 fi
20616
20617
20618
20619 { $as_echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
20620 $as_echo_n "checking for PS_STRINGS... " >&6; }
20621 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
20622   $as_echo_n "(cached) " >&6
20623 else
20624   cat >conftest.$ac_ext <<_ACEOF
20625 /* confdefs.h.  */
20626 _ACEOF
20627 cat confdefs.h >>conftest.$ac_ext
20628 cat >>conftest.$ac_ext <<_ACEOF
20629 /* end confdefs.h.  */
20630 #include <machine/vmparam.h>
20631 #include <sys/exec.h>
20632
20633 int
20634 main ()
20635 {
20636 PS_STRINGS->ps_nargvstr = 1;
20637 PS_STRINGS->ps_argvstr = "foo";
20638   ;
20639   return 0;
20640 }
20641 _ACEOF
20642 rm -f conftest.$ac_objext conftest$ac_exeext
20643 if { (ac_try="$ac_link"
20644 case "(($ac_try" in
20645   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20646   *) ac_try_echo=$ac_try;;
20647 esac
20648 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20649 $as_echo "$ac_try_echo") >&5
20650   (eval "$ac_link") 2>conftest.er1
20651   ac_status=$?
20652   grep -v '^ *+' conftest.er1 >conftest.err
20653   rm -f conftest.er1
20654   cat conftest.err >&5
20655   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20656   (exit $ac_status); } && {
20657          test -z "$ac_c_werror_flag" ||
20658          test ! -s conftest.err
20659        } && test -s conftest$ac_exeext && {
20660          test "$cross_compiling" = yes ||
20661          $as_test_x conftest$ac_exeext
20662        }; then
20663   pgac_cv_var_PS_STRINGS=yes
20664 else
20665   $as_echo "$as_me: failed program was:" >&5
20666 sed 's/^/| /' conftest.$ac_ext >&5
20667
20668         pgac_cv_var_PS_STRINGS=no
20669 fi
20670
20671 rm -rf conftest.dSYM
20672 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20673       conftest$ac_exeext conftest.$ac_ext
20674 fi
20675 { $as_echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
20676 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
20677 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
20678
20679 cat >>confdefs.h <<\_ACEOF
20680 #define HAVE_PS_STRINGS 1
20681 _ACEOF
20682
20683 fi
20684
20685
20686 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
20687 # is missing.  Yes, there are machines that have only one.  We may
20688 # also decide to use snprintf.c if snprintf() is present but does not
20689 # have all the features we need --- see below.
20690
20691 if test "$PORTNAME" = "win32"; then
20692   # Win32 gets snprintf.c built unconditionally.
20693   #
20694   # To properly translate all NLS languages strings, we must support the
20695   # *printf() %$ format, which allows *printf() arguments to be selected
20696   # by position in the translated string.
20697   #
20698   # libintl versions < 0.13 use the native *printf() functions, and Win32
20699   # *printf() doesn't understand %$, so we must use our /port versions,
20700   # which do understand %$. libintl versions >= 0.13 include their own
20701   # *printf versions on Win32.  The libintl 0.13 release note text is:
20702   #
20703   #   C format strings with positions, as they arise when a translator
20704   #   needs to reorder a sentence, are now supported on all platforms.
20705   #   On those few platforms (NetBSD and Woe32) for which the native
20706   #   printf()/fprintf()/... functions don't support such format
20707   #   strings, replacements are provided through <libintl.h>.
20708   #
20709   # We could use libintl >= 0.13's *printf() if we were sure that we had
20710   # a litint >= 0.13 at runtime, but seeing that there is no clean way
20711   # to guarantee that, it is best to just use our own, so we are sure to
20712   # get %$ support. In include/port.h we disable the *printf() macros
20713   # that might have been defined by libintl.
20714   #
20715   # We do this unconditionally whether NLS is used or not so we are sure
20716   # that all Win32 libraries and binaries behave the same.
20717   pgac_need_repl_snprintf=yes
20718 else
20719   pgac_need_repl_snprintf=no
20720
20721 for ac_func in snprintf
20722 do
20723 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20724 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20725 $as_echo_n "checking for $ac_func... " >&6; }
20726 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20727   $as_echo_n "(cached) " >&6
20728 else
20729   cat >conftest.$ac_ext <<_ACEOF
20730 /* confdefs.h.  */
20731 _ACEOF
20732 cat confdefs.h >>conftest.$ac_ext
20733 cat >>conftest.$ac_ext <<_ACEOF
20734 /* end confdefs.h.  */
20735 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20736    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
20737 #define $ac_func innocuous_$ac_func
20738
20739 /* System header to define __stub macros and hopefully few prototypes,
20740     which can conflict with char $ac_func (); below.
20741     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20742     <limits.h> exists even on freestanding compilers.  */
20743
20744 #ifdef __STDC__
20745 # include <limits.h>
20746 #else
20747 # include <assert.h>
20748 #endif
20749
20750 #undef $ac_func
20751
20752 /* Override any GCC internal prototype to avoid an error.
20753    Use char because int might match the return type of a GCC
20754    builtin and then its argument prototype would still apply.  */
20755 #ifdef __cplusplus
20756 extern "C"
20757 #endif
20758 char $ac_func ();
20759 /* The GNU C library defines this for functions which it implements
20760     to always fail with ENOSYS.  Some functions are actually named
20761     something starting with __ and the normal name is an alias.  */
20762 #if defined __stub_$ac_func || defined __stub___$ac_func
20763 choke me
20764 #endif
20765
20766 int
20767 main ()
20768 {
20769 return $ac_func ();
20770   ;
20771   return 0;
20772 }
20773 _ACEOF
20774 rm -f conftest.$ac_objext conftest$ac_exeext
20775 if { (ac_try="$ac_link"
20776 case "(($ac_try" in
20777   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20778   *) ac_try_echo=$ac_try;;
20779 esac
20780 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20781 $as_echo "$ac_try_echo") >&5
20782   (eval "$ac_link") 2>conftest.er1
20783   ac_status=$?
20784   grep -v '^ *+' conftest.er1 >conftest.err
20785   rm -f conftest.er1
20786   cat conftest.err >&5
20787   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20788   (exit $ac_status); } && {
20789          test -z "$ac_c_werror_flag" ||
20790          test ! -s conftest.err
20791        } && test -s conftest$ac_exeext && {
20792          test "$cross_compiling" = yes ||
20793          $as_test_x conftest$ac_exeext
20794        }; then
20795   eval "$as_ac_var=yes"
20796 else
20797   $as_echo "$as_me: failed program was:" >&5
20798 sed 's/^/| /' conftest.$ac_ext >&5
20799
20800         eval "$as_ac_var=no"
20801 fi
20802
20803 rm -rf conftest.dSYM
20804 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20805       conftest$ac_exeext conftest.$ac_ext
20806 fi
20807 ac_res=`eval 'as_val=${'$as_ac_var'}
20808                  $as_echo "$as_val"'`
20809                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20810 $as_echo "$ac_res" >&6; }
20811 as_val=`eval 'as_val=${'$as_ac_var'}
20812                  $as_echo "$as_val"'`
20813    if test "x$as_val" = x""yes; then
20814   cat >>confdefs.h <<_ACEOF
20815 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20816 _ACEOF
20817
20818 else
20819   pgac_need_repl_snprintf=yes
20820 fi
20821 done
20822
20823
20824 for ac_func in vsnprintf
20825 do
20826 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20827 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20828 $as_echo_n "checking for $ac_func... " >&6; }
20829 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20830   $as_echo_n "(cached) " >&6
20831 else
20832   cat >conftest.$ac_ext <<_ACEOF
20833 /* confdefs.h.  */
20834 _ACEOF
20835 cat confdefs.h >>conftest.$ac_ext
20836 cat >>conftest.$ac_ext <<_ACEOF
20837 /* end confdefs.h.  */
20838 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20839    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
20840 #define $ac_func innocuous_$ac_func
20841
20842 /* System header to define __stub macros and hopefully few prototypes,
20843     which can conflict with char $ac_func (); below.
20844     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20845     <limits.h> exists even on freestanding compilers.  */
20846
20847 #ifdef __STDC__
20848 # include <limits.h>
20849 #else
20850 # include <assert.h>
20851 #endif
20852
20853 #undef $ac_func
20854
20855 /* Override any GCC internal prototype to avoid an error.
20856    Use char because int might match the return type of a GCC
20857    builtin and then its argument prototype would still apply.  */
20858 #ifdef __cplusplus
20859 extern "C"
20860 #endif
20861 char $ac_func ();
20862 /* The GNU C library defines this for functions which it implements
20863     to always fail with ENOSYS.  Some functions are actually named
20864     something starting with __ and the normal name is an alias.  */
20865 #if defined __stub_$ac_func || defined __stub___$ac_func
20866 choke me
20867 #endif
20868
20869 int
20870 main ()
20871 {
20872 return $ac_func ();
20873   ;
20874   return 0;
20875 }
20876 _ACEOF
20877 rm -f conftest.$ac_objext conftest$ac_exeext
20878 if { (ac_try="$ac_link"
20879 case "(($ac_try" in
20880   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20881   *) ac_try_echo=$ac_try;;
20882 esac
20883 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20884 $as_echo "$ac_try_echo") >&5
20885   (eval "$ac_link") 2>conftest.er1
20886   ac_status=$?
20887   grep -v '^ *+' conftest.er1 >conftest.err
20888   rm -f conftest.er1
20889   cat conftest.err >&5
20890   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20891   (exit $ac_status); } && {
20892          test -z "$ac_c_werror_flag" ||
20893          test ! -s conftest.err
20894        } && test -s conftest$ac_exeext && {
20895          test "$cross_compiling" = yes ||
20896          $as_test_x conftest$ac_exeext
20897        }; then
20898   eval "$as_ac_var=yes"
20899 else
20900   $as_echo "$as_me: failed program was:" >&5
20901 sed 's/^/| /' conftest.$ac_ext >&5
20902
20903         eval "$as_ac_var=no"
20904 fi
20905
20906 rm -rf conftest.dSYM
20907 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20908       conftest$ac_exeext conftest.$ac_ext
20909 fi
20910 ac_res=`eval 'as_val=${'$as_ac_var'}
20911                  $as_echo "$as_val"'`
20912                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20913 $as_echo "$ac_res" >&6; }
20914 as_val=`eval 'as_val=${'$as_ac_var'}
20915                  $as_echo "$as_val"'`
20916    if test "x$as_val" = x""yes; then
20917   cat >>confdefs.h <<_ACEOF
20918 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20919 _ACEOF
20920
20921 else
20922   pgac_need_repl_snprintf=yes
20923 fi
20924 done
20925
20926 fi
20927
20928
20929 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
20930 # include/c.h will provide declarations.  Note this is a separate test
20931 # from whether the functions exist in the C library --- there are
20932 # systems that have the functions but don't bother to declare them :-(
20933
20934 { $as_echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
20935 $as_echo_n "checking whether snprintf is declared... " >&6; }
20936 if test "${ac_cv_have_decl_snprintf+set}" = set; then
20937   $as_echo_n "(cached) " >&6
20938 else
20939   cat >conftest.$ac_ext <<_ACEOF
20940 /* confdefs.h.  */
20941 _ACEOF
20942 cat confdefs.h >>conftest.$ac_ext
20943 cat >>conftest.$ac_ext <<_ACEOF
20944 /* end confdefs.h.  */
20945 $ac_includes_default
20946 int
20947 main ()
20948 {
20949 #ifndef snprintf
20950   (void) snprintf;
20951 #endif
20952
20953   ;
20954   return 0;
20955 }
20956 _ACEOF
20957 rm -f conftest.$ac_objext
20958 if { (ac_try="$ac_compile"
20959 case "(($ac_try" in
20960   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20961   *) ac_try_echo=$ac_try;;
20962 esac
20963 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20964 $as_echo "$ac_try_echo") >&5
20965   (eval "$ac_compile") 2>conftest.er1
20966   ac_status=$?
20967   grep -v '^ *+' conftest.er1 >conftest.err
20968   rm -f conftest.er1
20969   cat conftest.err >&5
20970   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20971   (exit $ac_status); } && {
20972          test -z "$ac_c_werror_flag" ||
20973          test ! -s conftest.err
20974        } && test -s conftest.$ac_objext; then
20975   ac_cv_have_decl_snprintf=yes
20976 else
20977   $as_echo "$as_me: failed program was:" >&5
20978 sed 's/^/| /' conftest.$ac_ext >&5
20979
20980         ac_cv_have_decl_snprintf=no
20981 fi
20982
20983 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20984 fi
20985 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
20986 $as_echo "$ac_cv_have_decl_snprintf" >&6; }
20987 if test "x$ac_cv_have_decl_snprintf" = x""yes; then
20988
20989 cat >>confdefs.h <<_ACEOF
20990 #define HAVE_DECL_SNPRINTF 1
20991 _ACEOF
20992
20993
20994 else
20995   cat >>confdefs.h <<_ACEOF
20996 #define HAVE_DECL_SNPRINTF 0
20997 _ACEOF
20998
20999
21000 fi
21001 { $as_echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
21002 $as_echo_n "checking whether vsnprintf is declared... " >&6; }
21003 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
21004   $as_echo_n "(cached) " >&6
21005 else
21006   cat >conftest.$ac_ext <<_ACEOF
21007 /* confdefs.h.  */
21008 _ACEOF
21009 cat confdefs.h >>conftest.$ac_ext
21010 cat >>conftest.$ac_ext <<_ACEOF
21011 /* end confdefs.h.  */
21012 $ac_includes_default
21013 int
21014 main ()
21015 {
21016 #ifndef vsnprintf
21017   (void) vsnprintf;
21018 #endif
21019
21020   ;
21021   return 0;
21022 }
21023 _ACEOF
21024 rm -f conftest.$ac_objext
21025 if { (ac_try="$ac_compile"
21026 case "(($ac_try" in
21027   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21028   *) ac_try_echo=$ac_try;;
21029 esac
21030 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21031 $as_echo "$ac_try_echo") >&5
21032   (eval "$ac_compile") 2>conftest.er1
21033   ac_status=$?
21034   grep -v '^ *+' conftest.er1 >conftest.err
21035   rm -f conftest.er1
21036   cat conftest.err >&5
21037   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21038   (exit $ac_status); } && {
21039          test -z "$ac_c_werror_flag" ||
21040          test ! -s conftest.err
21041        } && test -s conftest.$ac_objext; then
21042   ac_cv_have_decl_vsnprintf=yes
21043 else
21044   $as_echo "$as_me: failed program was:" >&5
21045 sed 's/^/| /' conftest.$ac_ext >&5
21046
21047         ac_cv_have_decl_vsnprintf=no
21048 fi
21049
21050 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21051 fi
21052 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
21053 $as_echo "$ac_cv_have_decl_vsnprintf" >&6; }
21054 if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then
21055
21056 cat >>confdefs.h <<_ACEOF
21057 #define HAVE_DECL_VSNPRINTF 1
21058 _ACEOF
21059
21060
21061 else
21062   cat >>confdefs.h <<_ACEOF
21063 #define HAVE_DECL_VSNPRINTF 0
21064 _ACEOF
21065
21066
21067 fi
21068
21069
21070
21071
21072 { $as_echo "$as_me:$LINENO: checking for isinf" >&5
21073 $as_echo_n "checking for isinf... " >&6; }
21074 if test "${ac_cv_func_isinf+set}" = set; then
21075   $as_echo_n "(cached) " >&6
21076 else
21077   cat >conftest.$ac_ext <<_ACEOF
21078 /* confdefs.h.  */
21079 _ACEOF
21080 cat confdefs.h >>conftest.$ac_ext
21081 cat >>conftest.$ac_ext <<_ACEOF
21082 /* end confdefs.h.  */
21083
21084 #include <math.h>
21085 double glob_double;
21086
21087 int
21088 main ()
21089 {
21090 return isinf(glob_double) ? 0 : 1;
21091   ;
21092   return 0;
21093 }
21094 _ACEOF
21095 rm -f conftest.$ac_objext conftest$ac_exeext
21096 if { (ac_try="$ac_link"
21097 case "(($ac_try" in
21098   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21099   *) ac_try_echo=$ac_try;;
21100 esac
21101 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21102 $as_echo "$ac_try_echo") >&5
21103   (eval "$ac_link") 2>conftest.er1
21104   ac_status=$?
21105   grep -v '^ *+' conftest.er1 >conftest.err
21106   rm -f conftest.er1
21107   cat conftest.err >&5
21108   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21109   (exit $ac_status); } && {
21110          test -z "$ac_c_werror_flag" ||
21111          test ! -s conftest.err
21112        } && test -s conftest$ac_exeext && {
21113          test "$cross_compiling" = yes ||
21114          $as_test_x conftest$ac_exeext
21115        }; then
21116   ac_cv_func_isinf=yes
21117 else
21118   $as_echo "$as_me: failed program was:" >&5
21119 sed 's/^/| /' conftest.$ac_ext >&5
21120
21121         ac_cv_func_isinf=no
21122 fi
21123
21124 rm -rf conftest.dSYM
21125 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21126       conftest$ac_exeext conftest.$ac_ext
21127 fi
21128 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
21129 $as_echo "$ac_cv_func_isinf" >&6; }
21130
21131 if test $ac_cv_func_isinf = yes ; then
21132
21133 cat >>confdefs.h <<\_ACEOF
21134 #define HAVE_ISINF 1
21135 _ACEOF
21136
21137 else
21138   case " $LIBOBJS " in
21139   *" isinf.$ac_objext "* ) ;;
21140   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
21141  ;;
21142 esac
21143
21144   # Look for a way to implement a substitute for isinf()
21145
21146
21147
21148
21149 for ac_func in fpclass fp_class fp_class_d class
21150 do
21151 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21152 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21153 $as_echo_n "checking for $ac_func... " >&6; }
21154 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21155   $as_echo_n "(cached) " >&6
21156 else
21157   cat >conftest.$ac_ext <<_ACEOF
21158 /* confdefs.h.  */
21159 _ACEOF
21160 cat confdefs.h >>conftest.$ac_ext
21161 cat >>conftest.$ac_ext <<_ACEOF
21162 /* end confdefs.h.  */
21163 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21164    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21165 #define $ac_func innocuous_$ac_func
21166
21167 /* System header to define __stub macros and hopefully few prototypes,
21168     which can conflict with char $ac_func (); below.
21169     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21170     <limits.h> exists even on freestanding compilers.  */
21171
21172 #ifdef __STDC__
21173 # include <limits.h>
21174 #else
21175 # include <assert.h>
21176 #endif
21177
21178 #undef $ac_func
21179
21180 /* Override any GCC internal prototype to avoid an error.
21181    Use char because int might match the return type of a GCC
21182    builtin and then its argument prototype would still apply.  */
21183 #ifdef __cplusplus
21184 extern "C"
21185 #endif
21186 char $ac_func ();
21187 /* The GNU C library defines this for functions which it implements
21188     to always fail with ENOSYS.  Some functions are actually named
21189     something starting with __ and the normal name is an alias.  */
21190 #if defined __stub_$ac_func || defined __stub___$ac_func
21191 choke me
21192 #endif
21193
21194 int
21195 main ()
21196 {
21197 return $ac_func ();
21198   ;
21199   return 0;
21200 }
21201 _ACEOF
21202 rm -f conftest.$ac_objext conftest$ac_exeext
21203 if { (ac_try="$ac_link"
21204 case "(($ac_try" in
21205   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21206   *) ac_try_echo=$ac_try;;
21207 esac
21208 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21209 $as_echo "$ac_try_echo") >&5
21210   (eval "$ac_link") 2>conftest.er1
21211   ac_status=$?
21212   grep -v '^ *+' conftest.er1 >conftest.err
21213   rm -f conftest.er1
21214   cat conftest.err >&5
21215   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21216   (exit $ac_status); } && {
21217          test -z "$ac_c_werror_flag" ||
21218          test ! -s conftest.err
21219        } && test -s conftest$ac_exeext && {
21220          test "$cross_compiling" = yes ||
21221          $as_test_x conftest$ac_exeext
21222        }; then
21223   eval "$as_ac_var=yes"
21224 else
21225   $as_echo "$as_me: failed program was:" >&5
21226 sed 's/^/| /' conftest.$ac_ext >&5
21227
21228         eval "$as_ac_var=no"
21229 fi
21230
21231 rm -rf conftest.dSYM
21232 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21233       conftest$ac_exeext conftest.$ac_ext
21234 fi
21235 ac_res=`eval 'as_val=${'$as_ac_var'}
21236                  $as_echo "$as_val"'`
21237                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21238 $as_echo "$ac_res" >&6; }
21239 as_val=`eval 'as_val=${'$as_ac_var'}
21240                  $as_echo "$as_val"'`
21241    if test "x$as_val" = x""yes; then
21242   cat >>confdefs.h <<_ACEOF
21243 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21244 _ACEOF
21245  break
21246 fi
21247 done
21248
21249 fi
21250
21251
21252
21253
21254
21255
21256
21257
21258
21259
21260
21261
21262 for ac_func in crypt fls getopt getrusage inet_aton random rint srandom strerror strlcat strlcpy
21263 do
21264 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21265 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21266 $as_echo_n "checking for $ac_func... " >&6; }
21267 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21268   $as_echo_n "(cached) " >&6
21269 else
21270   cat >conftest.$ac_ext <<_ACEOF
21271 /* confdefs.h.  */
21272 _ACEOF
21273 cat confdefs.h >>conftest.$ac_ext
21274 cat >>conftest.$ac_ext <<_ACEOF
21275 /* end confdefs.h.  */
21276 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21277    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21278 #define $ac_func innocuous_$ac_func
21279
21280 /* System header to define __stub macros and hopefully few prototypes,
21281     which can conflict with char $ac_func (); below.
21282     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21283     <limits.h> exists even on freestanding compilers.  */
21284
21285 #ifdef __STDC__
21286 # include <limits.h>
21287 #else
21288 # include <assert.h>
21289 #endif
21290
21291 #undef $ac_func
21292
21293 /* Override any GCC internal prototype to avoid an error.
21294    Use char because int might match the return type of a GCC
21295    builtin and then its argument prototype would still apply.  */
21296 #ifdef __cplusplus
21297 extern "C"
21298 #endif
21299 char $ac_func ();
21300 /* The GNU C library defines this for functions which it implements
21301     to always fail with ENOSYS.  Some functions are actually named
21302     something starting with __ and the normal name is an alias.  */
21303 #if defined __stub_$ac_func || defined __stub___$ac_func
21304 choke me
21305 #endif
21306
21307 int
21308 main ()
21309 {
21310 return $ac_func ();
21311   ;
21312   return 0;
21313 }
21314 _ACEOF
21315 rm -f conftest.$ac_objext conftest$ac_exeext
21316 if { (ac_try="$ac_link"
21317 case "(($ac_try" in
21318   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21319   *) ac_try_echo=$ac_try;;
21320 esac
21321 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21322 $as_echo "$ac_try_echo") >&5
21323   (eval "$ac_link") 2>conftest.er1
21324   ac_status=$?
21325   grep -v '^ *+' conftest.er1 >conftest.err
21326   rm -f conftest.er1
21327   cat conftest.err >&5
21328   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21329   (exit $ac_status); } && {
21330          test -z "$ac_c_werror_flag" ||
21331          test ! -s conftest.err
21332        } && test -s conftest$ac_exeext && {
21333          test "$cross_compiling" = yes ||
21334          $as_test_x conftest$ac_exeext
21335        }; then
21336   eval "$as_ac_var=yes"
21337 else
21338   $as_echo "$as_me: failed program was:" >&5
21339 sed 's/^/| /' conftest.$ac_ext >&5
21340
21341         eval "$as_ac_var=no"
21342 fi
21343
21344 rm -rf conftest.dSYM
21345 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21346       conftest$ac_exeext conftest.$ac_ext
21347 fi
21348 ac_res=`eval 'as_val=${'$as_ac_var'}
21349                  $as_echo "$as_val"'`
21350                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21351 $as_echo "$ac_res" >&6; }
21352 as_val=`eval 'as_val=${'$as_ac_var'}
21353                  $as_echo "$as_val"'`
21354    if test "x$as_val" = x""yes; then
21355   cat >>confdefs.h <<_ACEOF
21356 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21357 _ACEOF
21358
21359 else
21360   case " $LIBOBJS " in
21361   *" $ac_func.$ac_objext "* ) ;;
21362   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21363  ;;
21364 esac
21365
21366 fi
21367 done
21368
21369
21370
21371 case $host_os in
21372
21373         # Windows uses a specialised env handler
21374         # and doesn't need a replacement getpeereid because it doesn't use
21375         # Unix sockets.
21376         mingw*)
21377
21378 cat >>confdefs.h <<\_ACEOF
21379 #define HAVE_UNSETENV 1
21380 _ACEOF
21381
21382
21383 cat >>confdefs.h <<\_ACEOF
21384 #define HAVE_GETPEEREID 1
21385 _ACEOF
21386
21387                 ac_cv_func_unsetenv=yes
21388                 ac_cv_func_getpeereid=yes;;
21389         *)
21390
21391
21392 for ac_func in unsetenv getpeereid
21393 do
21394 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21395 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21396 $as_echo_n "checking for $ac_func... " >&6; }
21397 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21398   $as_echo_n "(cached) " >&6
21399 else
21400   cat >conftest.$ac_ext <<_ACEOF
21401 /* confdefs.h.  */
21402 _ACEOF
21403 cat confdefs.h >>conftest.$ac_ext
21404 cat >>conftest.$ac_ext <<_ACEOF
21405 /* end confdefs.h.  */
21406 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21407    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21408 #define $ac_func innocuous_$ac_func
21409
21410 /* System header to define __stub macros and hopefully few prototypes,
21411     which can conflict with char $ac_func (); below.
21412     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21413     <limits.h> exists even on freestanding compilers.  */
21414
21415 #ifdef __STDC__
21416 # include <limits.h>
21417 #else
21418 # include <assert.h>
21419 #endif
21420
21421 #undef $ac_func
21422
21423 /* Override any GCC internal prototype to avoid an error.
21424    Use char because int might match the return type of a GCC
21425    builtin and then its argument prototype would still apply.  */
21426 #ifdef __cplusplus
21427 extern "C"
21428 #endif
21429 char $ac_func ();
21430 /* The GNU C library defines this for functions which it implements
21431     to always fail with ENOSYS.  Some functions are actually named
21432     something starting with __ and the normal name is an alias.  */
21433 #if defined __stub_$ac_func || defined __stub___$ac_func
21434 choke me
21435 #endif
21436
21437 int
21438 main ()
21439 {
21440 return $ac_func ();
21441   ;
21442   return 0;
21443 }
21444 _ACEOF
21445 rm -f conftest.$ac_objext conftest$ac_exeext
21446 if { (ac_try="$ac_link"
21447 case "(($ac_try" in
21448   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21449   *) ac_try_echo=$ac_try;;
21450 esac
21451 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21452 $as_echo "$ac_try_echo") >&5
21453   (eval "$ac_link") 2>conftest.er1
21454   ac_status=$?
21455   grep -v '^ *+' conftest.er1 >conftest.err
21456   rm -f conftest.er1
21457   cat conftest.err >&5
21458   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21459   (exit $ac_status); } && {
21460          test -z "$ac_c_werror_flag" ||
21461          test ! -s conftest.err
21462        } && test -s conftest$ac_exeext && {
21463          test "$cross_compiling" = yes ||
21464          $as_test_x conftest$ac_exeext
21465        }; then
21466   eval "$as_ac_var=yes"
21467 else
21468   $as_echo "$as_me: failed program was:" >&5
21469 sed 's/^/| /' conftest.$ac_ext >&5
21470
21471         eval "$as_ac_var=no"
21472 fi
21473
21474 rm -rf conftest.dSYM
21475 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21476       conftest$ac_exeext conftest.$ac_ext
21477 fi
21478 ac_res=`eval 'as_val=${'$as_ac_var'}
21479                  $as_echo "$as_val"'`
21480                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21481 $as_echo "$ac_res" >&6; }
21482 as_val=`eval 'as_val=${'$as_ac_var'}
21483                  $as_echo "$as_val"'`
21484    if test "x$as_val" = x""yes; then
21485   cat >>confdefs.h <<_ACEOF
21486 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21487 _ACEOF
21488
21489 else
21490   case " $LIBOBJS " in
21491   *" $ac_func.$ac_objext "* ) ;;
21492   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21493  ;;
21494 esac
21495
21496 fi
21497 done
21498
21499
21500                 ;;
21501 esac
21502
21503 # System's version of getaddrinfo(), if any, may be used only if we found
21504 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
21505 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
21506 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
21507 # because we want to use our own getaddrinfo.c on Windows anyway.)
21508 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
21509
21510 for ac_func in getaddrinfo
21511 do
21512 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21513 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21514 $as_echo_n "checking for $ac_func... " >&6; }
21515 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21516   $as_echo_n "(cached) " >&6
21517 else
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 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21525    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21526 #define $ac_func innocuous_$ac_func
21527
21528 /* System header to define __stub macros and hopefully few prototypes,
21529     which can conflict with char $ac_func (); below.
21530     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21531     <limits.h> exists even on freestanding compilers.  */
21532
21533 #ifdef __STDC__
21534 # include <limits.h>
21535 #else
21536 # include <assert.h>
21537 #endif
21538
21539 #undef $ac_func
21540
21541 /* Override any GCC internal prototype to avoid an error.
21542    Use char because int might match the return type of a GCC
21543    builtin and then its argument prototype would still apply.  */
21544 #ifdef __cplusplus
21545 extern "C"
21546 #endif
21547 char $ac_func ();
21548 /* The GNU C library defines this for functions which it implements
21549     to always fail with ENOSYS.  Some functions are actually named
21550     something starting with __ and the normal name is an alias.  */
21551 #if defined __stub_$ac_func || defined __stub___$ac_func
21552 choke me
21553 #endif
21554
21555 int
21556 main ()
21557 {
21558 return $ac_func ();
21559   ;
21560   return 0;
21561 }
21562 _ACEOF
21563 rm -f conftest.$ac_objext conftest$ac_exeext
21564 if { (ac_try="$ac_link"
21565 case "(($ac_try" in
21566   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21567   *) ac_try_echo=$ac_try;;
21568 esac
21569 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21570 $as_echo "$ac_try_echo") >&5
21571   (eval "$ac_link") 2>conftest.er1
21572   ac_status=$?
21573   grep -v '^ *+' conftest.er1 >conftest.err
21574   rm -f conftest.er1
21575   cat conftest.err >&5
21576   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21577   (exit $ac_status); } && {
21578          test -z "$ac_c_werror_flag" ||
21579          test ! -s conftest.err
21580        } && test -s conftest$ac_exeext && {
21581          test "$cross_compiling" = yes ||
21582          $as_test_x conftest$ac_exeext
21583        }; then
21584   eval "$as_ac_var=yes"
21585 else
21586   $as_echo "$as_me: failed program was:" >&5
21587 sed 's/^/| /' conftest.$ac_ext >&5
21588
21589         eval "$as_ac_var=no"
21590 fi
21591
21592 rm -rf conftest.dSYM
21593 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21594       conftest$ac_exeext conftest.$ac_ext
21595 fi
21596 ac_res=`eval 'as_val=${'$as_ac_var'}
21597                  $as_echo "$as_val"'`
21598                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21599 $as_echo "$ac_res" >&6; }
21600 as_val=`eval 'as_val=${'$as_ac_var'}
21601                  $as_echo "$as_val"'`
21602    if test "x$as_val" = x""yes; then
21603   cat >>confdefs.h <<_ACEOF
21604 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21605 _ACEOF
21606
21607 else
21608   case " $LIBOBJS " in
21609   *" $ac_func.$ac_objext "* ) ;;
21610   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21611  ;;
21612 esac
21613
21614 fi
21615 done
21616
21617
21618 else
21619   case " $LIBOBJS " in
21620   *" getaddrinfo.$ac_objext "* ) ;;
21621   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
21622  ;;
21623 esac
21624
21625 fi
21626
21627 # Similarly, use system's getopt_long() only if system provides struct option.
21628 if test x"$ac_cv_type_struct_option" = xyes ; then
21629
21630 for ac_func in getopt_long
21631 do
21632 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21633 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21634 $as_echo_n "checking for $ac_func... " >&6; }
21635 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21636   $as_echo_n "(cached) " >&6
21637 else
21638   cat >conftest.$ac_ext <<_ACEOF
21639 /* confdefs.h.  */
21640 _ACEOF
21641 cat confdefs.h >>conftest.$ac_ext
21642 cat >>conftest.$ac_ext <<_ACEOF
21643 /* end confdefs.h.  */
21644 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21645    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21646 #define $ac_func innocuous_$ac_func
21647
21648 /* System header to define __stub macros and hopefully few prototypes,
21649     which can conflict with char $ac_func (); below.
21650     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21651     <limits.h> exists even on freestanding compilers.  */
21652
21653 #ifdef __STDC__
21654 # include <limits.h>
21655 #else
21656 # include <assert.h>
21657 #endif
21658
21659 #undef $ac_func
21660
21661 /* Override any GCC internal prototype to avoid an error.
21662    Use char because int might match the return type of a GCC
21663    builtin and then its argument prototype would still apply.  */
21664 #ifdef __cplusplus
21665 extern "C"
21666 #endif
21667 char $ac_func ();
21668 /* The GNU C library defines this for functions which it implements
21669     to always fail with ENOSYS.  Some functions are actually named
21670     something starting with __ and the normal name is an alias.  */
21671 #if defined __stub_$ac_func || defined __stub___$ac_func
21672 choke me
21673 #endif
21674
21675 int
21676 main ()
21677 {
21678 return $ac_func ();
21679   ;
21680   return 0;
21681 }
21682 _ACEOF
21683 rm -f conftest.$ac_objext conftest$ac_exeext
21684 if { (ac_try="$ac_link"
21685 case "(($ac_try" in
21686   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21687   *) ac_try_echo=$ac_try;;
21688 esac
21689 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21690 $as_echo "$ac_try_echo") >&5
21691   (eval "$ac_link") 2>conftest.er1
21692   ac_status=$?
21693   grep -v '^ *+' conftest.er1 >conftest.err
21694   rm -f conftest.er1
21695   cat conftest.err >&5
21696   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21697   (exit $ac_status); } && {
21698          test -z "$ac_c_werror_flag" ||
21699          test ! -s conftest.err
21700        } && test -s conftest$ac_exeext && {
21701          test "$cross_compiling" = yes ||
21702          $as_test_x conftest$ac_exeext
21703        }; then
21704   eval "$as_ac_var=yes"
21705 else
21706   $as_echo "$as_me: failed program was:" >&5
21707 sed 's/^/| /' conftest.$ac_ext >&5
21708
21709         eval "$as_ac_var=no"
21710 fi
21711
21712 rm -rf conftest.dSYM
21713 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21714       conftest$ac_exeext conftest.$ac_ext
21715 fi
21716 ac_res=`eval 'as_val=${'$as_ac_var'}
21717                  $as_echo "$as_val"'`
21718                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21719 $as_echo "$ac_res" >&6; }
21720 as_val=`eval 'as_val=${'$as_ac_var'}
21721                  $as_echo "$as_val"'`
21722    if test "x$as_val" = x""yes; then
21723   cat >>confdefs.h <<_ACEOF
21724 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21725 _ACEOF
21726
21727 else
21728   case " $LIBOBJS " in
21729   *" $ac_func.$ac_objext "* ) ;;
21730   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21731  ;;
21732 esac
21733
21734 fi
21735 done
21736
21737
21738 else
21739   case " $LIBOBJS " in
21740   *" getopt_long.$ac_objext "* ) ;;
21741   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
21742  ;;
21743 esac
21744
21745 fi
21746
21747 # Solaris' getopt() doesn't do what we want for long options, so always use
21748 # our version on that platform.
21749 if test "$PORTNAME" = "solaris"; then
21750   case " $LIBOBJS " in
21751   *" getopt.$ac_objext "* ) ;;
21752   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
21753  ;;
21754 esac
21755
21756 fi
21757
21758 # mingw has adopted a GNU-centric interpretation of optind/optreset,
21759 # so always use our version on Windows.
21760 if test "$PORTNAME" = "win32"; then
21761   case " $LIBOBJS " in
21762   *" getopt.$ac_objext "* ) ;;
21763   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
21764  ;;
21765 esac
21766
21767   case " $LIBOBJS " in
21768   *" getopt_long.$ac_objext "* ) ;;
21769   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
21770  ;;
21771 esac
21772
21773 fi
21774
21775 # Win32 support
21776 if test "$PORTNAME" = "win32"; then
21777
21778 for ac_func in gettimeofday
21779 do
21780 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21781 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21782 $as_echo_n "checking for $ac_func... " >&6; }
21783 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21784   $as_echo_n "(cached) " >&6
21785 else
21786   cat >conftest.$ac_ext <<_ACEOF
21787 /* confdefs.h.  */
21788 _ACEOF
21789 cat confdefs.h >>conftest.$ac_ext
21790 cat >>conftest.$ac_ext <<_ACEOF
21791 /* end confdefs.h.  */
21792 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21793    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21794 #define $ac_func innocuous_$ac_func
21795
21796 /* System header to define __stub macros and hopefully few prototypes,
21797     which can conflict with char $ac_func (); below.
21798     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21799     <limits.h> exists even on freestanding compilers.  */
21800
21801 #ifdef __STDC__
21802 # include <limits.h>
21803 #else
21804 # include <assert.h>
21805 #endif
21806
21807 #undef $ac_func
21808
21809 /* Override any GCC internal prototype to avoid an error.
21810    Use char because int might match the return type of a GCC
21811    builtin and then its argument prototype would still apply.  */
21812 #ifdef __cplusplus
21813 extern "C"
21814 #endif
21815 char $ac_func ();
21816 /* The GNU C library defines this for functions which it implements
21817     to always fail with ENOSYS.  Some functions are actually named
21818     something starting with __ and the normal name is an alias.  */
21819 #if defined __stub_$ac_func || defined __stub___$ac_func
21820 choke me
21821 #endif
21822
21823 int
21824 main ()
21825 {
21826 return $ac_func ();
21827   ;
21828   return 0;
21829 }
21830 _ACEOF
21831 rm -f conftest.$ac_objext conftest$ac_exeext
21832 if { (ac_try="$ac_link"
21833 case "(($ac_try" in
21834   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21835   *) ac_try_echo=$ac_try;;
21836 esac
21837 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21838 $as_echo "$ac_try_echo") >&5
21839   (eval "$ac_link") 2>conftest.er1
21840   ac_status=$?
21841   grep -v '^ *+' conftest.er1 >conftest.err
21842   rm -f conftest.er1
21843   cat conftest.err >&5
21844   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21845   (exit $ac_status); } && {
21846          test -z "$ac_c_werror_flag" ||
21847          test ! -s conftest.err
21848        } && test -s conftest$ac_exeext && {
21849          test "$cross_compiling" = yes ||
21850          $as_test_x conftest$ac_exeext
21851        }; then
21852   eval "$as_ac_var=yes"
21853 else
21854   $as_echo "$as_me: failed program was:" >&5
21855 sed 's/^/| /' conftest.$ac_ext >&5
21856
21857         eval "$as_ac_var=no"
21858 fi
21859
21860 rm -rf conftest.dSYM
21861 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21862       conftest$ac_exeext conftest.$ac_ext
21863 fi
21864 ac_res=`eval 'as_val=${'$as_ac_var'}
21865                  $as_echo "$as_val"'`
21866                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21867 $as_echo "$ac_res" >&6; }
21868 as_val=`eval 'as_val=${'$as_ac_var'}
21869                  $as_echo "$as_val"'`
21870    if test "x$as_val" = x""yes; then
21871   cat >>confdefs.h <<_ACEOF
21872 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21873 _ACEOF
21874
21875 else
21876   case " $LIBOBJS " in
21877   *" $ac_func.$ac_objext "* ) ;;
21878   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21879  ;;
21880 esac
21881
21882 fi
21883 done
21884
21885
21886   case " $LIBOBJS " in
21887   *" kill.$ac_objext "* ) ;;
21888   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
21889  ;;
21890 esac
21891
21892   case " $LIBOBJS " in
21893   *" open.$ac_objext "* ) ;;
21894   *) LIBOBJS="$LIBOBJS open.$ac_objext"
21895  ;;
21896 esac
21897
21898   case " $LIBOBJS " in
21899   *" win32env.$ac_objext "* ) ;;
21900   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
21901  ;;
21902 esac
21903
21904   case " $LIBOBJS " in
21905   *" win32error.$ac_objext "* ) ;;
21906   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
21907  ;;
21908 esac
21909
21910   case " $LIBOBJS " in
21911   *" win32setlocale.$ac_objext "* ) ;;
21912   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
21913  ;;
21914 esac
21915
21916
21917 cat >>confdefs.h <<\_ACEOF
21918 #define HAVE_SYMLINK 1
21919 _ACEOF
21920
21921   { $as_echo "$as_me:$LINENO: checking for MINIDUMP_TYPE" >&5
21922 $as_echo_n "checking for MINIDUMP_TYPE... " >&6; }
21923 if test "${ac_cv_type_MINIDUMP_TYPE+set}" = set; then
21924   $as_echo_n "(cached) " >&6
21925 else
21926   ac_cv_type_MINIDUMP_TYPE=no
21927 cat >conftest.$ac_ext <<_ACEOF
21928 /* confdefs.h.  */
21929 _ACEOF
21930 cat confdefs.h >>conftest.$ac_ext
21931 cat >>conftest.$ac_ext <<_ACEOF
21932 /* end confdefs.h.  */
21933
21934 #define WIN32_LEAN_AND_MEAN
21935 #include <windows.h>
21936 #include <string.h>
21937 #include <dbghelp.h>
21938
21939 int
21940 main ()
21941 {
21942 if (sizeof (MINIDUMP_TYPE))
21943        return 0;
21944   ;
21945   return 0;
21946 }
21947 _ACEOF
21948 rm -f conftest.$ac_objext
21949 if { (ac_try="$ac_compile"
21950 case "(($ac_try" in
21951   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21952   *) ac_try_echo=$ac_try;;
21953 esac
21954 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21955 $as_echo "$ac_try_echo") >&5
21956   (eval "$ac_compile") 2>conftest.er1
21957   ac_status=$?
21958   grep -v '^ *+' conftest.er1 >conftest.err
21959   rm -f conftest.er1
21960   cat conftest.err >&5
21961   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21962   (exit $ac_status); } && {
21963          test -z "$ac_c_werror_flag" ||
21964          test ! -s conftest.err
21965        } && test -s conftest.$ac_objext; then
21966   cat >conftest.$ac_ext <<_ACEOF
21967 /* confdefs.h.  */
21968 _ACEOF
21969 cat confdefs.h >>conftest.$ac_ext
21970 cat >>conftest.$ac_ext <<_ACEOF
21971 /* end confdefs.h.  */
21972
21973 #define WIN32_LEAN_AND_MEAN
21974 #include <windows.h>
21975 #include <string.h>
21976 #include <dbghelp.h>
21977
21978 int
21979 main ()
21980 {
21981 if (sizeof ((MINIDUMP_TYPE)))
21982           return 0;
21983   ;
21984   return 0;
21985 }
21986 _ACEOF
21987 rm -f conftest.$ac_objext
21988 if { (ac_try="$ac_compile"
21989 case "(($ac_try" in
21990   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21991   *) ac_try_echo=$ac_try;;
21992 esac
21993 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21994 $as_echo "$ac_try_echo") >&5
21995   (eval "$ac_compile") 2>conftest.er1
21996   ac_status=$?
21997   grep -v '^ *+' conftest.er1 >conftest.err
21998   rm -f conftest.er1
21999   cat conftest.err >&5
22000   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22001   (exit $ac_status); } && {
22002          test -z "$ac_c_werror_flag" ||
22003          test ! -s conftest.err
22004        } && test -s conftest.$ac_objext; then
22005   :
22006 else
22007   $as_echo "$as_me: failed program was:" >&5
22008 sed 's/^/| /' conftest.$ac_ext >&5
22009
22010         ac_cv_type_MINIDUMP_TYPE=yes
22011 fi
22012
22013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22014 else
22015   $as_echo "$as_me: failed program was:" >&5
22016 sed 's/^/| /' conftest.$ac_ext >&5
22017
22018
22019 fi
22020
22021 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22022 fi
22023 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_MINIDUMP_TYPE" >&5
22024 $as_echo "$ac_cv_type_MINIDUMP_TYPE" >&6; }
22025 if test "x$ac_cv_type_MINIDUMP_TYPE" = x""yes; then
22026
22027 cat >>confdefs.h <<_ACEOF
22028 #define HAVE_MINIDUMP_TYPE 1
22029 _ACEOF
22030
22031 pgac_minidump_type=yes
22032 else
22033   pgac_minidump_type=no
22034 fi
22035
22036 fi
22037 if test x"$pgac_minidump_type" = x"yes" ; then
22038   have_win32_dbghelp=yes
22039
22040 else
22041   have_win32_dbghelp=no
22042
22043 fi
22044
22045 { $as_echo "$as_me:$LINENO: checking for sigsetjmp" >&5
22046 $as_echo_n "checking for sigsetjmp... " >&6; }
22047 if test "${pgac_cv_func_sigsetjmp+set}" = set; then
22048   $as_echo_n "(cached) " >&6
22049 else
22050   cat >conftest.$ac_ext <<_ACEOF
22051 /* confdefs.h.  */
22052 _ACEOF
22053 cat confdefs.h >>conftest.$ac_ext
22054 cat >>conftest.$ac_ext <<_ACEOF
22055 /* end confdefs.h.  */
22056 #include <setjmp.h>
22057 int
22058 main ()
22059 {
22060 sigjmp_buf x; sigsetjmp(x, 1);
22061   ;
22062   return 0;
22063 }
22064 _ACEOF
22065 rm -f conftest.$ac_objext conftest$ac_exeext
22066 if { (ac_try="$ac_link"
22067 case "(($ac_try" in
22068   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22069   *) ac_try_echo=$ac_try;;
22070 esac
22071 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22072 $as_echo "$ac_try_echo") >&5
22073   (eval "$ac_link") 2>conftest.er1
22074   ac_status=$?
22075   grep -v '^ *+' conftest.er1 >conftest.err
22076   rm -f conftest.er1
22077   cat conftest.err >&5
22078   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22079   (exit $ac_status); } && {
22080          test -z "$ac_c_werror_flag" ||
22081          test ! -s conftest.err
22082        } && test -s conftest$ac_exeext && {
22083          test "$cross_compiling" = yes ||
22084          $as_test_x conftest$ac_exeext
22085        }; then
22086   pgac_cv_func_sigsetjmp=yes
22087 else
22088   $as_echo "$as_me: failed program was:" >&5
22089 sed 's/^/| /' conftest.$ac_ext >&5
22090
22091         pgac_cv_func_sigsetjmp=no
22092 fi
22093
22094 rm -rf conftest.dSYM
22095 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22096       conftest$ac_exeext conftest.$ac_ext
22097 fi
22098 { $as_echo "$as_me:$LINENO: result: $pgac_cv_func_sigsetjmp" >&5
22099 $as_echo "$pgac_cv_func_sigsetjmp" >&6; }
22100 if test x"$pgac_cv_func_sigsetjmp" = x"yes"; then
22101
22102 cat >>confdefs.h <<\_ACEOF
22103 #define HAVE_SIGSETJMP 1
22104 _ACEOF
22105
22106 fi
22107
22108 { $as_echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
22109 $as_echo_n "checking whether sys_siglist is declared... " >&6; }
22110 if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
22111   $as_echo_n "(cached) " >&6
22112 else
22113   cat >conftest.$ac_ext <<_ACEOF
22114 /* confdefs.h.  */
22115 _ACEOF
22116 cat confdefs.h >>conftest.$ac_ext
22117 cat >>conftest.$ac_ext <<_ACEOF
22118 /* end confdefs.h.  */
22119 #include <signal.h>
22120 /* NetBSD declares sys_siglist in unistd.h.  */
22121 #ifdef HAVE_UNISTD_H
22122 # include <unistd.h>
22123 #endif
22124
22125
22126 int
22127 main ()
22128 {
22129 #ifndef sys_siglist
22130   (void) sys_siglist;
22131 #endif
22132
22133   ;
22134   return 0;
22135 }
22136 _ACEOF
22137 rm -f conftest.$ac_objext
22138 if { (ac_try="$ac_compile"
22139 case "(($ac_try" in
22140   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22141   *) ac_try_echo=$ac_try;;
22142 esac
22143 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22144 $as_echo "$ac_try_echo") >&5
22145   (eval "$ac_compile") 2>conftest.er1
22146   ac_status=$?
22147   grep -v '^ *+' conftest.er1 >conftest.err
22148   rm -f conftest.er1
22149   cat conftest.err >&5
22150   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22151   (exit $ac_status); } && {
22152          test -z "$ac_c_werror_flag" ||
22153          test ! -s conftest.err
22154        } && test -s conftest.$ac_objext; then
22155   ac_cv_have_decl_sys_siglist=yes
22156 else
22157   $as_echo "$as_me: failed program was:" >&5
22158 sed 's/^/| /' conftest.$ac_ext >&5
22159
22160         ac_cv_have_decl_sys_siglist=no
22161 fi
22162
22163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22164 fi
22165 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
22166 $as_echo "$ac_cv_have_decl_sys_siglist" >&6; }
22167 if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then
22168
22169 cat >>confdefs.h <<_ACEOF
22170 #define HAVE_DECL_SYS_SIGLIST 1
22171 _ACEOF
22172
22173
22174 else
22175   cat >>confdefs.h <<_ACEOF
22176 #define HAVE_DECL_SYS_SIGLIST 0
22177 _ACEOF
22178
22179
22180 fi
22181
22182
22183
22184
22185 { $as_echo "$as_me:$LINENO: checking for syslog" >&5
22186 $as_echo_n "checking for syslog... " >&6; }
22187 if test "${ac_cv_func_syslog+set}" = set; then
22188   $as_echo_n "(cached) " >&6
22189 else
22190   cat >conftest.$ac_ext <<_ACEOF
22191 /* confdefs.h.  */
22192 _ACEOF
22193 cat confdefs.h >>conftest.$ac_ext
22194 cat >>conftest.$ac_ext <<_ACEOF
22195 /* end confdefs.h.  */
22196 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
22197    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
22198 #define syslog innocuous_syslog
22199
22200 /* System header to define __stub macros and hopefully few prototypes,
22201     which can conflict with char syslog (); below.
22202     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22203     <limits.h> exists even on freestanding compilers.  */
22204
22205 #ifdef __STDC__
22206 # include <limits.h>
22207 #else
22208 # include <assert.h>
22209 #endif
22210
22211 #undef syslog
22212
22213 /* Override any GCC internal prototype to avoid an error.
22214    Use char because int might match the return type of a GCC
22215    builtin and then its argument prototype would still apply.  */
22216 #ifdef __cplusplus
22217 extern "C"
22218 #endif
22219 char syslog ();
22220 /* The GNU C library defines this for functions which it implements
22221     to always fail with ENOSYS.  Some functions are actually named
22222     something starting with __ and the normal name is an alias.  */
22223 #if defined __stub_syslog || defined __stub___syslog
22224 choke me
22225 #endif
22226
22227 int
22228 main ()
22229 {
22230 return syslog ();
22231   ;
22232   return 0;
22233 }
22234 _ACEOF
22235 rm -f conftest.$ac_objext conftest$ac_exeext
22236 if { (ac_try="$ac_link"
22237 case "(($ac_try" in
22238   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22239   *) ac_try_echo=$ac_try;;
22240 esac
22241 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22242 $as_echo "$ac_try_echo") >&5
22243   (eval "$ac_link") 2>conftest.er1
22244   ac_status=$?
22245   grep -v '^ *+' conftest.er1 >conftest.err
22246   rm -f conftest.er1
22247   cat conftest.err >&5
22248   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22249   (exit $ac_status); } && {
22250          test -z "$ac_c_werror_flag" ||
22251          test ! -s conftest.err
22252        } && test -s conftest$ac_exeext && {
22253          test "$cross_compiling" = yes ||
22254          $as_test_x conftest$ac_exeext
22255        }; then
22256   ac_cv_func_syslog=yes
22257 else
22258   $as_echo "$as_me: failed program was:" >&5
22259 sed 's/^/| /' conftest.$ac_ext >&5
22260
22261         ac_cv_func_syslog=no
22262 fi
22263
22264 rm -rf conftest.dSYM
22265 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22266       conftest$ac_exeext conftest.$ac_ext
22267 fi
22268 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
22269 $as_echo "$ac_cv_func_syslog" >&6; }
22270 if test "x$ac_cv_func_syslog" = x""yes; then
22271   if test "${ac_cv_header_syslog_h+set}" = set; then
22272   { $as_echo "$as_me:$LINENO: checking for syslog.h" >&5
22273 $as_echo_n "checking for syslog.h... " >&6; }
22274 if test "${ac_cv_header_syslog_h+set}" = set; then
22275   $as_echo_n "(cached) " >&6
22276 fi
22277 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
22278 $as_echo "$ac_cv_header_syslog_h" >&6; }
22279 else
22280   # Is the header compilable?
22281 { $as_echo "$as_me:$LINENO: checking syslog.h usability" >&5
22282 $as_echo_n "checking syslog.h usability... " >&6; }
22283 cat >conftest.$ac_ext <<_ACEOF
22284 /* confdefs.h.  */
22285 _ACEOF
22286 cat confdefs.h >>conftest.$ac_ext
22287 cat >>conftest.$ac_ext <<_ACEOF
22288 /* end confdefs.h.  */
22289 $ac_includes_default
22290 #include <syslog.h>
22291 _ACEOF
22292 rm -f conftest.$ac_objext
22293 if { (ac_try="$ac_compile"
22294 case "(($ac_try" in
22295   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22296   *) ac_try_echo=$ac_try;;
22297 esac
22298 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22299 $as_echo "$ac_try_echo") >&5
22300   (eval "$ac_compile") 2>conftest.er1
22301   ac_status=$?
22302   grep -v '^ *+' conftest.er1 >conftest.err
22303   rm -f conftest.er1
22304   cat conftest.err >&5
22305   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22306   (exit $ac_status); } && {
22307          test -z "$ac_c_werror_flag" ||
22308          test ! -s conftest.err
22309        } && test -s conftest.$ac_objext; then
22310   ac_header_compiler=yes
22311 else
22312   $as_echo "$as_me: failed program was:" >&5
22313 sed 's/^/| /' conftest.$ac_ext >&5
22314
22315         ac_header_compiler=no
22316 fi
22317
22318 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22319 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22320 $as_echo "$ac_header_compiler" >&6; }
22321
22322 # Is the header present?
22323 { $as_echo "$as_me:$LINENO: checking syslog.h presence" >&5
22324 $as_echo_n "checking syslog.h presence... " >&6; }
22325 cat >conftest.$ac_ext <<_ACEOF
22326 /* confdefs.h.  */
22327 _ACEOF
22328 cat confdefs.h >>conftest.$ac_ext
22329 cat >>conftest.$ac_ext <<_ACEOF
22330 /* end confdefs.h.  */
22331 #include <syslog.h>
22332 _ACEOF
22333 if { (ac_try="$ac_cpp conftest.$ac_ext"
22334 case "(($ac_try" in
22335   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22336   *) ac_try_echo=$ac_try;;
22337 esac
22338 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22339 $as_echo "$ac_try_echo") >&5
22340   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
22341   ac_status=$?
22342   grep -v '^ *+' conftest.er1 >conftest.err
22343   rm -f conftest.er1
22344   cat conftest.err >&5
22345   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22346   (exit $ac_status); } >/dev/null && {
22347          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22348          test ! -s conftest.err
22349        }; then
22350   ac_header_preproc=yes
22351 else
22352   $as_echo "$as_me: failed program was:" >&5
22353 sed 's/^/| /' conftest.$ac_ext >&5
22354
22355   ac_header_preproc=no
22356 fi
22357
22358 rm -f conftest.err conftest.$ac_ext
22359 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22360 $as_echo "$ac_header_preproc" >&6; }
22361
22362 # So?  What about this header?
22363 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22364   yes:no: )
22365     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
22366 $as_echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22367     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
22368 $as_echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
22369     ac_header_preproc=yes
22370     ;;
22371   no:yes:* )
22372     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
22373 $as_echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
22374     { $as_echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
22375 $as_echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
22376     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
22377 $as_echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
22378     { $as_echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
22379 $as_echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22380     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
22381 $as_echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
22382     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
22383 $as_echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
22384     ( cat <<\_ASBOX
22385 ## ---------------------------------------- ##
22386 ## Report this to pgsql-bugs@postgresql.org ##
22387 ## ---------------------------------------- ##
22388 _ASBOX
22389      ) | sed "s/^/$as_me: WARNING:     /" >&2
22390     ;;
22391 esac
22392 { $as_echo "$as_me:$LINENO: checking for syslog.h" >&5
22393 $as_echo_n "checking for syslog.h... " >&6; }
22394 if test "${ac_cv_header_syslog_h+set}" = set; then
22395   $as_echo_n "(cached) " >&6
22396 else
22397   ac_cv_header_syslog_h=$ac_header_preproc
22398 fi
22399 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
22400 $as_echo "$ac_cv_header_syslog_h" >&6; }
22401
22402 fi
22403 if test "x$ac_cv_header_syslog_h" = x""yes; then
22404
22405 cat >>confdefs.h <<\_ACEOF
22406 #define HAVE_SYSLOG 1
22407 _ACEOF
22408
22409 fi
22410
22411
22412 fi
22413
22414
22415 { $as_echo "$as_me:$LINENO: checking for opterr" >&5
22416 $as_echo_n "checking for opterr... " >&6; }
22417 if test "${pgac_cv_var_int_opterr+set}" = set; then
22418   $as_echo_n "(cached) " >&6
22419 else
22420   cat >conftest.$ac_ext <<_ACEOF
22421 /* confdefs.h.  */
22422 _ACEOF
22423 cat confdefs.h >>conftest.$ac_ext
22424 cat >>conftest.$ac_ext <<_ACEOF
22425 /* end confdefs.h.  */
22426 #include <unistd.h>
22427 int
22428 main ()
22429 {
22430 extern int opterr; opterr = 1;
22431   ;
22432   return 0;
22433 }
22434 _ACEOF
22435 rm -f conftest.$ac_objext conftest$ac_exeext
22436 if { (ac_try="$ac_link"
22437 case "(($ac_try" in
22438   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22439   *) ac_try_echo=$ac_try;;
22440 esac
22441 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22442 $as_echo "$ac_try_echo") >&5
22443   (eval "$ac_link") 2>conftest.er1
22444   ac_status=$?
22445   grep -v '^ *+' conftest.er1 >conftest.err
22446   rm -f conftest.er1
22447   cat conftest.err >&5
22448   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22449   (exit $ac_status); } && {
22450          test -z "$ac_c_werror_flag" ||
22451          test ! -s conftest.err
22452        } && test -s conftest$ac_exeext && {
22453          test "$cross_compiling" = yes ||
22454          $as_test_x conftest$ac_exeext
22455        }; then
22456   pgac_cv_var_int_opterr=yes
22457 else
22458   $as_echo "$as_me: failed program was:" >&5
22459 sed 's/^/| /' conftest.$ac_ext >&5
22460
22461         pgac_cv_var_int_opterr=no
22462 fi
22463
22464 rm -rf conftest.dSYM
22465 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22466       conftest$ac_exeext conftest.$ac_ext
22467 fi
22468 { $as_echo "$as_me:$LINENO: result: $pgac_cv_var_int_opterr" >&5
22469 $as_echo "$pgac_cv_var_int_opterr" >&6; }
22470 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
22471
22472 cat >>confdefs.h <<\_ACEOF
22473 #define HAVE_INT_OPTERR 1
22474 _ACEOF
22475
22476 fi
22477
22478 { $as_echo "$as_me:$LINENO: checking for optreset" >&5
22479 $as_echo_n "checking for optreset... " >&6; }
22480 if test "${pgac_cv_var_int_optreset+set}" = set; then
22481   $as_echo_n "(cached) " >&6
22482 else
22483   cat >conftest.$ac_ext <<_ACEOF
22484 /* confdefs.h.  */
22485 _ACEOF
22486 cat confdefs.h >>conftest.$ac_ext
22487 cat >>conftest.$ac_ext <<_ACEOF
22488 /* end confdefs.h.  */
22489 #include <unistd.h>
22490 int
22491 main ()
22492 {
22493 extern int optreset; optreset = 1;
22494   ;
22495   return 0;
22496 }
22497 _ACEOF
22498 rm -f conftest.$ac_objext conftest$ac_exeext
22499 if { (ac_try="$ac_link"
22500 case "(($ac_try" in
22501   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22502   *) ac_try_echo=$ac_try;;
22503 esac
22504 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22505 $as_echo "$ac_try_echo") >&5
22506   (eval "$ac_link") 2>conftest.er1
22507   ac_status=$?
22508   grep -v '^ *+' conftest.er1 >conftest.err
22509   rm -f conftest.er1
22510   cat conftest.err >&5
22511   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22512   (exit $ac_status); } && {
22513          test -z "$ac_c_werror_flag" ||
22514          test ! -s conftest.err
22515        } && test -s conftest$ac_exeext && {
22516          test "$cross_compiling" = yes ||
22517          $as_test_x conftest$ac_exeext
22518        }; then
22519   pgac_cv_var_int_optreset=yes
22520 else
22521   $as_echo "$as_me: failed program was:" >&5
22522 sed 's/^/| /' conftest.$ac_ext >&5
22523
22524         pgac_cv_var_int_optreset=no
22525 fi
22526
22527 rm -rf conftest.dSYM
22528 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22529       conftest$ac_exeext conftest.$ac_ext
22530 fi
22531 { $as_echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
22532 $as_echo "$pgac_cv_var_int_optreset" >&6; }
22533 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
22534
22535 cat >>confdefs.h <<\_ACEOF
22536 #define HAVE_INT_OPTRESET 1
22537 _ACEOF
22538
22539 fi
22540
22541
22542
22543 for ac_func in strtoll strtoq
22544 do
22545 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22546 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
22547 $as_echo_n "checking for $ac_func... " >&6; }
22548 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
22549   $as_echo_n "(cached) " >&6
22550 else
22551   cat >conftest.$ac_ext <<_ACEOF
22552 /* confdefs.h.  */
22553 _ACEOF
22554 cat confdefs.h >>conftest.$ac_ext
22555 cat >>conftest.$ac_ext <<_ACEOF
22556 /* end confdefs.h.  */
22557 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22558    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
22559 #define $ac_func innocuous_$ac_func
22560
22561 /* System header to define __stub macros and hopefully few prototypes,
22562     which can conflict with char $ac_func (); below.
22563     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22564     <limits.h> exists even on freestanding compilers.  */
22565
22566 #ifdef __STDC__
22567 # include <limits.h>
22568 #else
22569 # include <assert.h>
22570 #endif
22571
22572 #undef $ac_func
22573
22574 /* Override any GCC internal prototype to avoid an error.
22575    Use char because int might match the return type of a GCC
22576    builtin and then its argument prototype would still apply.  */
22577 #ifdef __cplusplus
22578 extern "C"
22579 #endif
22580 char $ac_func ();
22581 /* The GNU C library defines this for functions which it implements
22582     to always fail with ENOSYS.  Some functions are actually named
22583     something starting with __ and the normal name is an alias.  */
22584 #if defined __stub_$ac_func || defined __stub___$ac_func
22585 choke me
22586 #endif
22587
22588 int
22589 main ()
22590 {
22591 return $ac_func ();
22592   ;
22593   return 0;
22594 }
22595 _ACEOF
22596 rm -f conftest.$ac_objext conftest$ac_exeext
22597 if { (ac_try="$ac_link"
22598 case "(($ac_try" in
22599   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22600   *) ac_try_echo=$ac_try;;
22601 esac
22602 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22603 $as_echo "$ac_try_echo") >&5
22604   (eval "$ac_link") 2>conftest.er1
22605   ac_status=$?
22606   grep -v '^ *+' conftest.er1 >conftest.err
22607   rm -f conftest.er1
22608   cat conftest.err >&5
22609   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22610   (exit $ac_status); } && {
22611          test -z "$ac_c_werror_flag" ||
22612          test ! -s conftest.err
22613        } && test -s conftest$ac_exeext && {
22614          test "$cross_compiling" = yes ||
22615          $as_test_x conftest$ac_exeext
22616        }; then
22617   eval "$as_ac_var=yes"
22618 else
22619   $as_echo "$as_me: failed program was:" >&5
22620 sed 's/^/| /' conftest.$ac_ext >&5
22621
22622         eval "$as_ac_var=no"
22623 fi
22624
22625 rm -rf conftest.dSYM
22626 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22627       conftest$ac_exeext conftest.$ac_ext
22628 fi
22629 ac_res=`eval 'as_val=${'$as_ac_var'}
22630                  $as_echo "$as_val"'`
22631                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
22632 $as_echo "$ac_res" >&6; }
22633 as_val=`eval 'as_val=${'$as_ac_var'}
22634                  $as_echo "$as_val"'`
22635    if test "x$as_val" = x""yes; then
22636   cat >>confdefs.h <<_ACEOF
22637 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22638 _ACEOF
22639  break
22640 fi
22641 done
22642
22643
22644
22645 for ac_func in strtoull strtouq
22646 do
22647 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22648 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
22649 $as_echo_n "checking for $ac_func... " >&6; }
22650 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
22651   $as_echo_n "(cached) " >&6
22652 else
22653   cat >conftest.$ac_ext <<_ACEOF
22654 /* confdefs.h.  */
22655 _ACEOF
22656 cat confdefs.h >>conftest.$ac_ext
22657 cat >>conftest.$ac_ext <<_ACEOF
22658 /* end confdefs.h.  */
22659 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22660    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
22661 #define $ac_func innocuous_$ac_func
22662
22663 /* System header to define __stub macros and hopefully few prototypes,
22664     which can conflict with char $ac_func (); below.
22665     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22666     <limits.h> exists even on freestanding compilers.  */
22667
22668 #ifdef __STDC__
22669 # include <limits.h>
22670 #else
22671 # include <assert.h>
22672 #endif
22673
22674 #undef $ac_func
22675
22676 /* Override any GCC internal prototype to avoid an error.
22677    Use char because int might match the return type of a GCC
22678    builtin and then its argument prototype would still apply.  */
22679 #ifdef __cplusplus
22680 extern "C"
22681 #endif
22682 char $ac_func ();
22683 /* The GNU C library defines this for functions which it implements
22684     to always fail with ENOSYS.  Some functions are actually named
22685     something starting with __ and the normal name is an alias.  */
22686 #if defined __stub_$ac_func || defined __stub___$ac_func
22687 choke me
22688 #endif
22689
22690 int
22691 main ()
22692 {
22693 return $ac_func ();
22694   ;
22695   return 0;
22696 }
22697 _ACEOF
22698 rm -f conftest.$ac_objext conftest$ac_exeext
22699 if { (ac_try="$ac_link"
22700 case "(($ac_try" in
22701   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22702   *) ac_try_echo=$ac_try;;
22703 esac
22704 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22705 $as_echo "$ac_try_echo") >&5
22706   (eval "$ac_link") 2>conftest.er1
22707   ac_status=$?
22708   grep -v '^ *+' conftest.er1 >conftest.err
22709   rm -f conftest.er1
22710   cat conftest.err >&5
22711   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22712   (exit $ac_status); } && {
22713          test -z "$ac_c_werror_flag" ||
22714          test ! -s conftest.err
22715        } && test -s conftest$ac_exeext && {
22716          test "$cross_compiling" = yes ||
22717          $as_test_x conftest$ac_exeext
22718        }; then
22719   eval "$as_ac_var=yes"
22720 else
22721   $as_echo "$as_me: failed program was:" >&5
22722 sed 's/^/| /' conftest.$ac_ext >&5
22723
22724         eval "$as_ac_var=no"
22725 fi
22726
22727 rm -rf conftest.dSYM
22728 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22729       conftest$ac_exeext conftest.$ac_ext
22730 fi
22731 ac_res=`eval 'as_val=${'$as_ac_var'}
22732                  $as_echo "$as_val"'`
22733                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
22734 $as_echo "$ac_res" >&6; }
22735 as_val=`eval 'as_val=${'$as_ac_var'}
22736                  $as_echo "$as_val"'`
22737    if test "x$as_val" = x""yes; then
22738   cat >>confdefs.h <<_ACEOF
22739 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22740 _ACEOF
22741  break
22742 fi
22743 done
22744
22745
22746 { $as_echo "$as_me:$LINENO: checking for builtin locking functions" >&5
22747 $as_echo_n "checking for builtin locking functions... " >&6; }
22748 if test "${pgac_cv_gcc_int_atomics+set}" = set; then
22749   $as_echo_n "(cached) " >&6
22750 else
22751   cat >conftest.$ac_ext <<_ACEOF
22752 /* confdefs.h.  */
22753 _ACEOF
22754 cat confdefs.h >>conftest.$ac_ext
22755 cat >>conftest.$ac_ext <<_ACEOF
22756 /* end confdefs.h.  */
22757
22758 int
22759 main ()
22760 {
22761 int lock = 0;
22762    __sync_lock_test_and_set(&lock, 1);
22763    __sync_lock_release(&lock);
22764   ;
22765   return 0;
22766 }
22767 _ACEOF
22768 rm -f conftest.$ac_objext conftest$ac_exeext
22769 if { (ac_try="$ac_link"
22770 case "(($ac_try" in
22771   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22772   *) ac_try_echo=$ac_try;;
22773 esac
22774 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22775 $as_echo "$ac_try_echo") >&5
22776   (eval "$ac_link") 2>conftest.er1
22777   ac_status=$?
22778   grep -v '^ *+' conftest.er1 >conftest.err
22779   rm -f conftest.er1
22780   cat conftest.err >&5
22781   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22782   (exit $ac_status); } && {
22783          test -z "$ac_c_werror_flag" ||
22784          test ! -s conftest.err
22785        } && test -s conftest$ac_exeext && {
22786          test "$cross_compiling" = yes ||
22787          $as_test_x conftest$ac_exeext
22788        }; then
22789   pgac_cv_gcc_int_atomics="yes"
22790 else
22791   $as_echo "$as_me: failed program was:" >&5
22792 sed 's/^/| /' conftest.$ac_ext >&5
22793
22794         pgac_cv_gcc_int_atomics="no"
22795 fi
22796
22797 rm -rf conftest.dSYM
22798 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22799       conftest$ac_exeext conftest.$ac_ext
22800 fi
22801 { $as_echo "$as_me:$LINENO: result: $pgac_cv_gcc_int_atomics" >&5
22802 $as_echo "$pgac_cv_gcc_int_atomics" >&6; }
22803 if test x"$pgac_cv_gcc_int_atomics" = x"yes"; then
22804
22805 cat >>confdefs.h <<\_ACEOF
22806 #define HAVE_GCC_INT_ATOMICS 1
22807 _ACEOF
22808
22809 fi
22810
22811 # Lastly, restore full LIBS list and check for readline/libedit symbols
22812 LIBS="$LIBS_including_readline"
22813
22814 if test "$with_readline" = yes; then
22815   { $as_echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
22816 $as_echo_n "checking for rl_completion_append_character... " >&6; }
22817 if test "${pgac_cv_var_rl_completion_append_character+set}" = set; then
22818   $as_echo_n "(cached) " >&6
22819 else
22820   cat >conftest.$ac_ext <<_ACEOF
22821 /* confdefs.h.  */
22822 _ACEOF
22823 cat confdefs.h >>conftest.$ac_ext
22824 cat >>conftest.$ac_ext <<_ACEOF
22825 /* end confdefs.h.  */
22826 #include <stdio.h>
22827 #ifdef HAVE_READLINE_READLINE_H
22828 # include <readline/readline.h>
22829 #elif defined(HAVE_READLINE_H)
22830 # include <readline.h>
22831 #endif
22832
22833 int
22834 main ()
22835 {
22836 rl_completion_append_character = 'x';
22837   ;
22838   return 0;
22839 }
22840 _ACEOF
22841 rm -f conftest.$ac_objext conftest$ac_exeext
22842 if { (ac_try="$ac_link"
22843 case "(($ac_try" in
22844   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22845   *) ac_try_echo=$ac_try;;
22846 esac
22847 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22848 $as_echo "$ac_try_echo") >&5
22849   (eval "$ac_link") 2>conftest.er1
22850   ac_status=$?
22851   grep -v '^ *+' conftest.er1 >conftest.err
22852   rm -f conftest.er1
22853   cat conftest.err >&5
22854   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22855   (exit $ac_status); } && {
22856          test -z "$ac_c_werror_flag" ||
22857          test ! -s conftest.err
22858        } && test -s conftest$ac_exeext && {
22859          test "$cross_compiling" = yes ||
22860          $as_test_x conftest$ac_exeext
22861        }; then
22862   pgac_cv_var_rl_completion_append_character=yes
22863 else
22864   $as_echo "$as_me: failed program was:" >&5
22865 sed 's/^/| /' conftest.$ac_ext >&5
22866
22867         pgac_cv_var_rl_completion_append_character=no
22868 fi
22869
22870 rm -rf conftest.dSYM
22871 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22872       conftest$ac_exeext conftest.$ac_ext
22873 fi
22874 { $as_echo "$as_me:$LINENO: result: $pgac_cv_var_rl_completion_append_character" >&5
22875 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
22876 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
22877
22878 cat >>confdefs.h <<\_ACEOF
22879 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
22880 _ACEOF
22881
22882 fi
22883
22884
22885 for ac_func in rl_completion_matches rl_filename_completion_function
22886 do
22887 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22888 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
22889 $as_echo_n "checking for $ac_func... " >&6; }
22890 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
22891   $as_echo_n "(cached) " >&6
22892 else
22893   cat >conftest.$ac_ext <<_ACEOF
22894 /* confdefs.h.  */
22895 _ACEOF
22896 cat confdefs.h >>conftest.$ac_ext
22897 cat >>conftest.$ac_ext <<_ACEOF
22898 /* end confdefs.h.  */
22899 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22900    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
22901 #define $ac_func innocuous_$ac_func
22902
22903 /* System header to define __stub macros and hopefully few prototypes,
22904     which can conflict with char $ac_func (); below.
22905     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22906     <limits.h> exists even on freestanding compilers.  */
22907
22908 #ifdef __STDC__
22909 # include <limits.h>
22910 #else
22911 # include <assert.h>
22912 #endif
22913
22914 #undef $ac_func
22915
22916 /* Override any GCC internal prototype to avoid an error.
22917    Use char because int might match the return type of a GCC
22918    builtin and then its argument prototype would still apply.  */
22919 #ifdef __cplusplus
22920 extern "C"
22921 #endif
22922 char $ac_func ();
22923 /* The GNU C library defines this for functions which it implements
22924     to always fail with ENOSYS.  Some functions are actually named
22925     something starting with __ and the normal name is an alias.  */
22926 #if defined __stub_$ac_func || defined __stub___$ac_func
22927 choke me
22928 #endif
22929
22930 int
22931 main ()
22932 {
22933 return $ac_func ();
22934   ;
22935   return 0;
22936 }
22937 _ACEOF
22938 rm -f conftest.$ac_objext conftest$ac_exeext
22939 if { (ac_try="$ac_link"
22940 case "(($ac_try" in
22941   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22942   *) ac_try_echo=$ac_try;;
22943 esac
22944 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22945 $as_echo "$ac_try_echo") >&5
22946   (eval "$ac_link") 2>conftest.er1
22947   ac_status=$?
22948   grep -v '^ *+' conftest.er1 >conftest.err
22949   rm -f conftest.er1
22950   cat conftest.err >&5
22951   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22952   (exit $ac_status); } && {
22953          test -z "$ac_c_werror_flag" ||
22954          test ! -s conftest.err
22955        } && test -s conftest$ac_exeext && {
22956          test "$cross_compiling" = yes ||
22957          $as_test_x conftest$ac_exeext
22958        }; then
22959   eval "$as_ac_var=yes"
22960 else
22961   $as_echo "$as_me: failed program was:" >&5
22962 sed 's/^/| /' conftest.$ac_ext >&5
22963
22964         eval "$as_ac_var=no"
22965 fi
22966
22967 rm -rf conftest.dSYM
22968 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22969       conftest$ac_exeext conftest.$ac_ext
22970 fi
22971 ac_res=`eval 'as_val=${'$as_ac_var'}
22972                  $as_echo "$as_val"'`
22973                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
22974 $as_echo "$ac_res" >&6; }
22975 as_val=`eval 'as_val=${'$as_ac_var'}
22976                  $as_echo "$as_val"'`
22977    if test "x$as_val" = x""yes; then
22978   cat >>confdefs.h <<_ACEOF
22979 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22980 _ACEOF
22981
22982 fi
22983 done
22984
22985
22986
22987 for ac_func in append_history history_truncate_file
22988 do
22989 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22990 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
22991 $as_echo_n "checking for $ac_func... " >&6; }
22992 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
22993   $as_echo_n "(cached) " >&6
22994 else
22995   cat >conftest.$ac_ext <<_ACEOF
22996 /* confdefs.h.  */
22997 _ACEOF
22998 cat confdefs.h >>conftest.$ac_ext
22999 cat >>conftest.$ac_ext <<_ACEOF
23000 /* end confdefs.h.  */
23001 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23002    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
23003 #define $ac_func innocuous_$ac_func
23004
23005 /* System header to define __stub macros and hopefully few prototypes,
23006     which can conflict with char $ac_func (); below.
23007     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23008     <limits.h> exists even on freestanding compilers.  */
23009
23010 #ifdef __STDC__
23011 # include <limits.h>
23012 #else
23013 # include <assert.h>
23014 #endif
23015
23016 #undef $ac_func
23017
23018 /* Override any GCC internal prototype to avoid an error.
23019    Use char because int might match the return type of a GCC
23020    builtin and then its argument prototype would still apply.  */
23021 #ifdef __cplusplus
23022 extern "C"
23023 #endif
23024 char $ac_func ();
23025 /* The GNU C library defines this for functions which it implements
23026     to always fail with ENOSYS.  Some functions are actually named
23027     something starting with __ and the normal name is an alias.  */
23028 #if defined __stub_$ac_func || defined __stub___$ac_func
23029 choke me
23030 #endif
23031
23032 int
23033 main ()
23034 {
23035 return $ac_func ();
23036   ;
23037   return 0;
23038 }
23039 _ACEOF
23040 rm -f conftest.$ac_objext conftest$ac_exeext
23041 if { (ac_try="$ac_link"
23042 case "(($ac_try" in
23043   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23044   *) ac_try_echo=$ac_try;;
23045 esac
23046 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23047 $as_echo "$ac_try_echo") >&5
23048   (eval "$ac_link") 2>conftest.er1
23049   ac_status=$?
23050   grep -v '^ *+' conftest.er1 >conftest.err
23051   rm -f conftest.er1
23052   cat conftest.err >&5
23053   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23054   (exit $ac_status); } && {
23055          test -z "$ac_c_werror_flag" ||
23056          test ! -s conftest.err
23057        } && test -s conftest$ac_exeext && {
23058          test "$cross_compiling" = yes ||
23059          $as_test_x conftest$ac_exeext
23060        }; then
23061   eval "$as_ac_var=yes"
23062 else
23063   $as_echo "$as_me: failed program was:" >&5
23064 sed 's/^/| /' conftest.$ac_ext >&5
23065
23066         eval "$as_ac_var=no"
23067 fi
23068
23069 rm -rf conftest.dSYM
23070 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23071       conftest$ac_exeext conftest.$ac_ext
23072 fi
23073 ac_res=`eval 'as_val=${'$as_ac_var'}
23074                  $as_echo "$as_val"'`
23075                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
23076 $as_echo "$ac_res" >&6; }
23077 as_val=`eval 'as_val=${'$as_ac_var'}
23078                  $as_echo "$as_val"'`
23079    if test "x$as_val" = x""yes; then
23080   cat >>confdefs.h <<_ACEOF
23081 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23082 _ACEOF
23083
23084 fi
23085 done
23086
23087 fi
23088
23089
23090 #
23091 # Pthreads
23092 #
23093 # For each platform, we need to know about any special compile and link
23094 # libraries, and whether the normal C function names are thread-safe.
23095 # See the comment at the top of src/port/thread.c for more information.
23096 # WIN32 doesn't need the pthread tests;  it always uses threads
23097 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
23098
23099
23100
23101 ac_ext=c
23102 ac_cpp='$CPP $CPPFLAGS'
23103 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23104 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23105 ac_compiler_gnu=$ac_cv_c_compiler_gnu
23106
23107 acx_pthread_ok=no
23108
23109 # We used to check for pthread.h first, but this fails if pthread.h
23110 # requires special compiler flags (e.g. on True64 or Sequent).
23111 # It gets checked for in the link test anyway.
23112
23113 # First of all, check if the user has set any of the PTHREAD_LIBS,
23114 # etcetera environment variables, and if threads linking works using
23115 # them:
23116 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
23117         save_CFLAGS="$CFLAGS"
23118         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
23119         save_LIBS="$LIBS"
23120         LIBS="$PTHREAD_LIBS $LIBS"
23121         { $as_echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
23122 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
23123         cat >conftest.$ac_ext <<_ACEOF
23124 /* confdefs.h.  */
23125 _ACEOF
23126 cat confdefs.h >>conftest.$ac_ext
23127 cat >>conftest.$ac_ext <<_ACEOF
23128 /* end confdefs.h.  */
23129
23130 /* Override any GCC internal prototype to avoid an error.
23131    Use char because int might match the return type of a GCC
23132    builtin and then its argument prototype would still apply.  */
23133 #ifdef __cplusplus
23134 extern "C"
23135 #endif
23136 char pthread_join ();
23137 int
23138 main ()
23139 {
23140 return pthread_join ();
23141   ;
23142   return 0;
23143 }
23144 _ACEOF
23145 rm -f conftest.$ac_objext conftest$ac_exeext
23146 if { (ac_try="$ac_link"
23147 case "(($ac_try" in
23148   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23149   *) ac_try_echo=$ac_try;;
23150 esac
23151 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23152 $as_echo "$ac_try_echo") >&5
23153   (eval "$ac_link") 2>conftest.er1
23154   ac_status=$?
23155   grep -v '^ *+' conftest.er1 >conftest.err
23156   rm -f conftest.er1
23157   cat conftest.err >&5
23158   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23159   (exit $ac_status); } && {
23160          test -z "$ac_c_werror_flag" ||
23161          test ! -s conftest.err
23162        } && test -s conftest$ac_exeext && {
23163          test "$cross_compiling" = yes ||
23164          $as_test_x conftest$ac_exeext
23165        }; then
23166   acx_pthread_ok=yes
23167 else
23168   $as_echo "$as_me: failed program was:" >&5
23169 sed 's/^/| /' conftest.$ac_ext >&5
23170
23171
23172 fi
23173
23174 rm -rf conftest.dSYM
23175 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23176       conftest$ac_exeext conftest.$ac_ext
23177         { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
23178 $as_echo "$acx_pthread_ok" >&6; }
23179         if test x"$acx_pthread_ok" = xno; then
23180                 PTHREAD_LIBS=""
23181                 PTHREAD_CFLAGS=""
23182         fi
23183         LIBS="$save_LIBS"
23184         CFLAGS="$save_CFLAGS"
23185 fi
23186
23187 # We must check for the threads library under a number of different
23188 # names; the ordering is very important because some systems
23189 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
23190 # libraries is broken (non-POSIX).
23191
23192 # Create a list of thread flags to try.  Items starting with a "-" are
23193 # C compiler flags, and other items are library names, except for "none"
23194 # which indicates that we try without any flags at all, and "pthread-config"
23195 # which is a program returning the flags for the Pth emulation library.
23196
23197 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
23198
23199 # The ordering *is* (sometimes) important.  Some notes on the
23200 # individual items follow:
23201
23202 # pthreads: AIX (must check this before -lpthread)
23203 # none: in case threads are in libc; should be tried before -Kthread and
23204 #       other compiler flags to prevent continual compiler warnings
23205 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
23206 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
23207 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
23208 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
23209 # -pthreads: Solaris/gcc
23210 # -mthreads: Mingw32/gcc, Lynx/gcc
23211 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
23212 #      doesn't hurt to check since this sometimes defines pthreads too;
23213 #      also defines -D_REENTRANT)
23214 # pthread: Linux, etcetera
23215 # --thread-safe: KAI C++
23216 # pthread-config: use pthread-config program (for GNU Pth library)
23217
23218 case "${host_cpu}-${host_os}" in
23219         *solaris*)
23220
23221         # On Solaris (at least, for some versions), libc contains stubbed
23222         # (non-functional) versions of the pthreads routines, so link-based
23223         # tests will erroneously succeed.  (We need to link with -pthread or
23224         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
23225         # a function called by this macro, so we could check for that, but
23226         # who knows whether they'll stub that too in a future libc.)  So,
23227         # we'll just look for -pthreads and -lpthread first:
23228
23229         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
23230         ;;
23231 esac
23232
23233 if test x"$acx_pthread_ok" = xno; then
23234 for flag in $acx_pthread_flags; do
23235
23236         tryPTHREAD_CFLAGS=""
23237         tryPTHREAD_LIBS=""
23238         case $flag in
23239                 none)
23240                 { $as_echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
23241 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
23242                 ;;
23243
23244                 -*)
23245                 { $as_echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
23246 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
23247                 tryPTHREAD_CFLAGS="$flag"
23248                 ;;
23249
23250                 pthread-config)
23251                 # skip this if we already have flags defined, for PostgreSQL
23252                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
23253                 # Extract the first word of "pthread-config", so it can be a program name with args.
23254 set dummy pthread-config; ac_word=$2
23255 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
23256 $as_echo_n "checking for $ac_word... " >&6; }
23257 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
23258   $as_echo_n "(cached) " >&6
23259 else
23260   if test -n "$acx_pthread_config"; then
23261   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
23262 else
23263 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23264 for as_dir in $PATH
23265 do
23266   IFS=$as_save_IFS
23267   test -z "$as_dir" && as_dir=.
23268   for ac_exec_ext in '' $ac_executable_extensions; do
23269   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23270     ac_cv_prog_acx_pthread_config="yes"
23271     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
23272     break 2
23273   fi
23274 done
23275 done
23276 IFS=$as_save_IFS
23277
23278   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
23279 fi
23280 fi
23281 acx_pthread_config=$ac_cv_prog_acx_pthread_config
23282 if test -n "$acx_pthread_config"; then
23283   { $as_echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
23284 $as_echo "$acx_pthread_config" >&6; }
23285 else
23286   { $as_echo "$as_me:$LINENO: result: no" >&5
23287 $as_echo "no" >&6; }
23288 fi
23289
23290
23291                 if test x"$acx_pthread_config" = xno; then continue; fi
23292                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
23293                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
23294                 ;;
23295
23296                 *)
23297                 { $as_echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
23298 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
23299                 tryPTHREAD_LIBS="-l$flag"
23300                 ;;
23301         esac
23302
23303         save_LIBS="$LIBS"
23304         save_CFLAGS="$CFLAGS"
23305         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
23306         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
23307
23308         # Check for various functions.  We must include pthread.h,
23309         # since some functions may be macros.  (On the Sequent, we
23310         # need a special flag -Kthread to make this header compile.)
23311         # We check for pthread_join because it is in -lpthread on IRIX
23312         # while pthread_create is in libc.  We check for pthread_attr_init
23313         # due to DEC craziness with -lpthreads.  We check for
23314         # pthread_cleanup_push because it is one of the few pthread
23315         # functions on Solaris that doesn't have a non-functional libc stub.
23316         # We try pthread_create on general principles.
23317         cat >conftest.$ac_ext <<_ACEOF
23318 /* confdefs.h.  */
23319 _ACEOF
23320 cat confdefs.h >>conftest.$ac_ext
23321 cat >>conftest.$ac_ext <<_ACEOF
23322 /* end confdefs.h.  */
23323 #include <pthread.h>
23324 int
23325 main ()
23326 {
23327 pthread_t th; pthread_join(th, 0);
23328                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
23329                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
23330   ;
23331   return 0;
23332 }
23333 _ACEOF
23334 rm -f conftest.$ac_objext conftest$ac_exeext
23335 if { (ac_try="$ac_link"
23336 case "(($ac_try" in
23337   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23338   *) ac_try_echo=$ac_try;;
23339 esac
23340 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23341 $as_echo "$ac_try_echo") >&5
23342   (eval "$ac_link") 2>conftest.er1
23343   ac_status=$?
23344   grep -v '^ *+' conftest.er1 >conftest.err
23345   rm -f conftest.er1
23346   cat conftest.err >&5
23347   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23348   (exit $ac_status); } && {
23349          test -z "$ac_c_werror_flag" ||
23350          test ! -s conftest.err
23351        } && test -s conftest$ac_exeext && {
23352          test "$cross_compiling" = yes ||
23353          $as_test_x conftest$ac_exeext
23354        }; then
23355   acx_pthread_ok=yes
23356 else
23357   $as_echo "$as_me: failed program was:" >&5
23358 sed 's/^/| /' conftest.$ac_ext >&5
23359
23360         acx_pthread_ok=no
23361 fi
23362
23363 rm -rf conftest.dSYM
23364 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23365       conftest$ac_exeext conftest.$ac_ext
23366
23367         if test "x$acx_pthread_ok" = xyes; then
23368             # Don't use options that are ignored by the compiler.
23369             # We find them by checking stderror.
23370             cat >conftest.$ac_ext <<_ACEOF
23371 int
23372 main (int argc, char **argv)
23373 {
23374   (void) argc;
23375   (void) argv;
23376   return 0;
23377 }
23378 _ACEOF
23379             rm -f conftest.$ac_objext conftest$ac_exeext
23380             # Check both linking and compiling, because they might tolerate different options.
23381             if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval $ac_compile 2>&1 1>&5)`" = ""; then
23382                 # we continue with more flags because Linux needs -lpthread
23383                 # for libpq builds on PostgreSQL.  The test above only
23384                 # tests for building binaries, not shared libraries.
23385                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
23386                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
23387             else   acx_pthread_ok=no
23388             fi
23389         fi
23390
23391         LIBS="$save_LIBS"
23392         CFLAGS="$save_CFLAGS"
23393
23394         { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
23395 $as_echo "$acx_pthread_ok" >&6; }
23396 done
23397 fi
23398
23399 # Various other checks:
23400 if test "x$acx_pthread_ok" = xyes; then
23401         save_LIBS="$LIBS"
23402         LIBS="$PTHREAD_LIBS $LIBS"
23403         save_CFLAGS="$CFLAGS"
23404         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
23405
23406         # Detect AIX lossage: threads are created detached by default
23407         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
23408         { $as_echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
23409 $as_echo_n "checking for joinable pthread attribute... " >&6; }
23410         cat >conftest.$ac_ext <<_ACEOF
23411 /* confdefs.h.  */
23412 _ACEOF
23413 cat confdefs.h >>conftest.$ac_ext
23414 cat >>conftest.$ac_ext <<_ACEOF
23415 /* end confdefs.h.  */
23416 #include <pthread.h>
23417 int
23418 main ()
23419 {
23420 int attr=PTHREAD_CREATE_JOINABLE;
23421   ;
23422   return 0;
23423 }
23424 _ACEOF
23425 rm -f conftest.$ac_objext conftest$ac_exeext
23426 if { (ac_try="$ac_link"
23427 case "(($ac_try" in
23428   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23429   *) ac_try_echo=$ac_try;;
23430 esac
23431 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23432 $as_echo "$ac_try_echo") >&5
23433   (eval "$ac_link") 2>conftest.er1
23434   ac_status=$?
23435   grep -v '^ *+' conftest.er1 >conftest.err
23436   rm -f conftest.er1
23437   cat conftest.err >&5
23438   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23439   (exit $ac_status); } && {
23440          test -z "$ac_c_werror_flag" ||
23441          test ! -s conftest.err
23442        } && test -s conftest$ac_exeext && {
23443          test "$cross_compiling" = yes ||
23444          $as_test_x conftest$ac_exeext
23445        }; then
23446   ok=PTHREAD_CREATE_JOINABLE
23447 else
23448   $as_echo "$as_me: failed program was:" >&5
23449 sed 's/^/| /' conftest.$ac_ext >&5
23450
23451         ok=unknown
23452 fi
23453
23454 rm -rf conftest.dSYM
23455 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23456       conftest$ac_exeext conftest.$ac_ext
23457         if test x"$ok" = xunknown; then
23458                 cat >conftest.$ac_ext <<_ACEOF
23459 /* confdefs.h.  */
23460 _ACEOF
23461 cat confdefs.h >>conftest.$ac_ext
23462 cat >>conftest.$ac_ext <<_ACEOF
23463 /* end confdefs.h.  */
23464 #include <pthread.h>
23465 int
23466 main ()
23467 {
23468 int attr=PTHREAD_CREATE_UNDETACHED;
23469   ;
23470   return 0;
23471 }
23472 _ACEOF
23473 rm -f conftest.$ac_objext conftest$ac_exeext
23474 if { (ac_try="$ac_link"
23475 case "(($ac_try" in
23476   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23477   *) ac_try_echo=$ac_try;;
23478 esac
23479 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23480 $as_echo "$ac_try_echo") >&5
23481   (eval "$ac_link") 2>conftest.er1
23482   ac_status=$?
23483   grep -v '^ *+' conftest.er1 >conftest.err
23484   rm -f conftest.er1
23485   cat conftest.err >&5
23486   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23487   (exit $ac_status); } && {
23488          test -z "$ac_c_werror_flag" ||
23489          test ! -s conftest.err
23490        } && test -s conftest$ac_exeext && {
23491          test "$cross_compiling" = yes ||
23492          $as_test_x conftest$ac_exeext
23493        }; then
23494   ok=PTHREAD_CREATE_UNDETACHED
23495 else
23496   $as_echo "$as_me: failed program was:" >&5
23497 sed 's/^/| /' conftest.$ac_ext >&5
23498
23499         ok=unknown
23500 fi
23501
23502 rm -rf conftest.dSYM
23503 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23504       conftest$ac_exeext conftest.$ac_ext
23505         fi
23506         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
23507
23508 cat >>confdefs.h <<\_ACEOF
23509 #define PTHREAD_CREATE_JOINABLE $ok
23510 _ACEOF
23511
23512         fi
23513         { $as_echo "$as_me:$LINENO: result: ${ok}" >&5
23514 $as_echo "${ok}" >&6; }
23515         if test x"$ok" = xunknown; then
23516                 { $as_echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
23517 $as_echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
23518         fi
23519
23520         { $as_echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
23521 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
23522         flag=no
23523 # We always add these in PostgreSQL
23524 #       case "${host_cpu}-${host_os}" in
23525 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
23526 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
23527 #       esac
23528         { $as_echo "$as_me:$LINENO: result: ${flag}" >&5
23529 $as_echo "${flag}" >&6; }
23530         if test "x$flag" != xno; then
23531                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
23532         fi
23533
23534         LIBS="$save_LIBS"
23535         CFLAGS="$save_CFLAGS"
23536
23537 # Supporting cc_r would require a special CC in all places that
23538 # use libpq, and that is ugly, so we don't do it.  Users can still
23539 # define their compiler as cc_r to do thread builds of everything.
23540         # More AIX lossage: must compile with cc_r
23541         # Extract the first word of "cc_r", so it can be a program name with args.
23542 set dummy cc_r; ac_word=$2
23543 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
23544 $as_echo_n "checking for $ac_word... " >&6; }
23545 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
23546   $as_echo_n "(cached) " >&6
23547 else
23548   if test -n "$PTHREAD_CC"; then
23549   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
23550 else
23551 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23552 for as_dir in $PATH
23553 do
23554   IFS=$as_save_IFS
23555   test -z "$as_dir" && as_dir=.
23556   for ac_exec_ext in '' $ac_executable_extensions; do
23557   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23558     ac_cv_prog_PTHREAD_CC="cc_r"
23559     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
23560     break 2
23561   fi
23562 done
23563 done
23564 IFS=$as_save_IFS
23565
23566   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
23567 fi
23568 fi
23569 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
23570 if test -n "$PTHREAD_CC"; then
23571   { $as_echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
23572 $as_echo "$PTHREAD_CC" >&6; }
23573 else
23574   { $as_echo "$as_me:$LINENO: result: no" >&5
23575 $as_echo "no" >&6; }
23576 fi
23577
23578
23579 else
23580         PTHREAD_CC="$CC"
23581 fi
23582
23583
23584
23585
23586
23587 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
23588 if test x"$acx_pthread_ok" = xyes; then
23589
23590 cat >>confdefs.h <<\_ACEOF
23591 #define HAVE_PTHREAD 1
23592 _ACEOF
23593
23594         :
23595 else
23596         acx_pthread_ok=no
23597
23598 fi
23599 ac_ext=c
23600 ac_cpp='$CPP $CPPFLAGS'
23601 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23602 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23603 ac_compiler_gnu=$ac_cv_c_compiler_gnu
23604
23605         # set thread flags
23606
23607 # Some platforms use these, so just define them.  They can't hurt if they
23608 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
23609 # enables 5-arg getpwuid_r, among other things.
23610 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
23611
23612
23613 # At this point, we don't want to muck with the compiler name for threading.
23614 # Let's see who fails, perhaps AIX.  2004-04-23
23615 if test "$PTHREAD_CC" != "$CC"; then
23616 { { $as_echo "$as_me:$LINENO: error:
23617 PostgreSQL does not support platforms that require a special compiler
23618 for thread safety;  use --disable-thread-safety to disable thread safety." >&5
23619 $as_echo "$as_me: error:
23620 PostgreSQL does not support platforms that require a special compiler
23621 for thread safety;  use --disable-thread-safety to disable thread safety." >&2;}
23622    { (exit 1); exit 1; }; }
23623 fi
23624
23625 # Check for *_r functions
23626 _CFLAGS="$CFLAGS"
23627 _LIBS="$LIBS"
23628 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
23629 LIBS="$LIBS $PTHREAD_LIBS"
23630
23631 if test "$PORTNAME" != "win32"; then
23632 if test "${ac_cv_header_pthread_h+set}" = set; then
23633   { $as_echo "$as_me:$LINENO: checking for pthread.h" >&5
23634 $as_echo_n "checking for pthread.h... " >&6; }
23635 if test "${ac_cv_header_pthread_h+set}" = set; then
23636   $as_echo_n "(cached) " >&6
23637 fi
23638 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
23639 $as_echo "$ac_cv_header_pthread_h" >&6; }
23640 else
23641   # Is the header compilable?
23642 { $as_echo "$as_me:$LINENO: checking pthread.h usability" >&5
23643 $as_echo_n "checking pthread.h usability... " >&6; }
23644 cat >conftest.$ac_ext <<_ACEOF
23645 /* confdefs.h.  */
23646 _ACEOF
23647 cat confdefs.h >>conftest.$ac_ext
23648 cat >>conftest.$ac_ext <<_ACEOF
23649 /* end confdefs.h.  */
23650 $ac_includes_default
23651 #include <pthread.h>
23652 _ACEOF
23653 rm -f conftest.$ac_objext
23654 if { (ac_try="$ac_compile"
23655 case "(($ac_try" in
23656   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23657   *) ac_try_echo=$ac_try;;
23658 esac
23659 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23660 $as_echo "$ac_try_echo") >&5
23661   (eval "$ac_compile") 2>conftest.er1
23662   ac_status=$?
23663   grep -v '^ *+' conftest.er1 >conftest.err
23664   rm -f conftest.er1
23665   cat conftest.err >&5
23666   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23667   (exit $ac_status); } && {
23668          test -z "$ac_c_werror_flag" ||
23669          test ! -s conftest.err
23670        } && test -s conftest.$ac_objext; then
23671   ac_header_compiler=yes
23672 else
23673   $as_echo "$as_me: failed program was:" >&5
23674 sed 's/^/| /' conftest.$ac_ext >&5
23675
23676         ac_header_compiler=no
23677 fi
23678
23679 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23680 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23681 $as_echo "$ac_header_compiler" >&6; }
23682
23683 # Is the header present?
23684 { $as_echo "$as_me:$LINENO: checking pthread.h presence" >&5
23685 $as_echo_n "checking pthread.h presence... " >&6; }
23686 cat >conftest.$ac_ext <<_ACEOF
23687 /* confdefs.h.  */
23688 _ACEOF
23689 cat confdefs.h >>conftest.$ac_ext
23690 cat >>conftest.$ac_ext <<_ACEOF
23691 /* end confdefs.h.  */
23692 #include <pthread.h>
23693 _ACEOF
23694 if { (ac_try="$ac_cpp conftest.$ac_ext"
23695 case "(($ac_try" in
23696   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23697   *) ac_try_echo=$ac_try;;
23698 esac
23699 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23700 $as_echo "$ac_try_echo") >&5
23701   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23702   ac_status=$?
23703   grep -v '^ *+' conftest.er1 >conftest.err
23704   rm -f conftest.er1
23705   cat conftest.err >&5
23706   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23707   (exit $ac_status); } >/dev/null && {
23708          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23709          test ! -s conftest.err
23710        }; then
23711   ac_header_preproc=yes
23712 else
23713   $as_echo "$as_me: failed program was:" >&5
23714 sed 's/^/| /' conftest.$ac_ext >&5
23715
23716   ac_header_preproc=no
23717 fi
23718
23719 rm -f conftest.err conftest.$ac_ext
23720 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23721 $as_echo "$ac_header_preproc" >&6; }
23722
23723 # So?  What about this header?
23724 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23725   yes:no: )
23726     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
23727 $as_echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23728     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
23729 $as_echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
23730     ac_header_preproc=yes
23731     ;;
23732   no:yes:* )
23733     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
23734 $as_echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
23735     { $as_echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
23736 $as_echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
23737     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
23738 $as_echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
23739     { $as_echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
23740 $as_echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
23741     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
23742 $as_echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
23743     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
23744 $as_echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
23745     ( cat <<\_ASBOX
23746 ## ---------------------------------------- ##
23747 ## Report this to pgsql-bugs@postgresql.org ##
23748 ## ---------------------------------------- ##
23749 _ASBOX
23750      ) | sed "s/^/$as_me: WARNING:     /" >&2
23751     ;;
23752 esac
23753 { $as_echo "$as_me:$LINENO: checking for pthread.h" >&5
23754 $as_echo_n "checking for pthread.h... " >&6; }
23755 if test "${ac_cv_header_pthread_h+set}" = set; then
23756   $as_echo_n "(cached) " >&6
23757 else
23758   ac_cv_header_pthread_h=$ac_header_preproc
23759 fi
23760 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
23761 $as_echo "$ac_cv_header_pthread_h" >&6; }
23762
23763 fi
23764 if test "x$ac_cv_header_pthread_h" = x""yes; then
23765   :
23766 else
23767   { { $as_echo "$as_me:$LINENO: error:
23768 pthread.h not found;  use --disable-thread-safety to disable thread safety" >&5
23769 $as_echo "$as_me: error:
23770 pthread.h not found;  use --disable-thread-safety to disable thread safety" >&2;}
23771    { (exit 1); exit 1; }; }
23772 fi
23773
23774
23775 fi
23776
23777
23778
23779
23780 for ac_func in strerror_r getpwuid_r gethostbyname_r
23781 do
23782 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23783 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
23784 $as_echo_n "checking for $ac_func... " >&6; }
23785 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
23786   $as_echo_n "(cached) " >&6
23787 else
23788   cat >conftest.$ac_ext <<_ACEOF
23789 /* confdefs.h.  */
23790 _ACEOF
23791 cat confdefs.h >>conftest.$ac_ext
23792 cat >>conftest.$ac_ext <<_ACEOF
23793 /* end confdefs.h.  */
23794 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23795    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
23796 #define $ac_func innocuous_$ac_func
23797
23798 /* System header to define __stub macros and hopefully few prototypes,
23799     which can conflict with char $ac_func (); below.
23800     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23801     <limits.h> exists even on freestanding compilers.  */
23802
23803 #ifdef __STDC__
23804 # include <limits.h>
23805 #else
23806 # include <assert.h>
23807 #endif
23808
23809 #undef $ac_func
23810
23811 /* Override any GCC internal prototype to avoid an error.
23812    Use char because int might match the return type of a GCC
23813    builtin and then its argument prototype would still apply.  */
23814 #ifdef __cplusplus
23815 extern "C"
23816 #endif
23817 char $ac_func ();
23818 /* The GNU C library defines this for functions which it implements
23819     to always fail with ENOSYS.  Some functions are actually named
23820     something starting with __ and the normal name is an alias.  */
23821 #if defined __stub_$ac_func || defined __stub___$ac_func
23822 choke me
23823 #endif
23824
23825 int
23826 main ()
23827 {
23828 return $ac_func ();
23829   ;
23830   return 0;
23831 }
23832 _ACEOF
23833 rm -f conftest.$ac_objext conftest$ac_exeext
23834 if { (ac_try="$ac_link"
23835 case "(($ac_try" in
23836   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23837   *) ac_try_echo=$ac_try;;
23838 esac
23839 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23840 $as_echo "$ac_try_echo") >&5
23841   (eval "$ac_link") 2>conftest.er1
23842   ac_status=$?
23843   grep -v '^ *+' conftest.er1 >conftest.err
23844   rm -f conftest.er1
23845   cat conftest.err >&5
23846   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23847   (exit $ac_status); } && {
23848          test -z "$ac_c_werror_flag" ||
23849          test ! -s conftest.err
23850        } && test -s conftest$ac_exeext && {
23851          test "$cross_compiling" = yes ||
23852          $as_test_x conftest$ac_exeext
23853        }; then
23854   eval "$as_ac_var=yes"
23855 else
23856   $as_echo "$as_me: failed program was:" >&5
23857 sed 's/^/| /' conftest.$ac_ext >&5
23858
23859         eval "$as_ac_var=no"
23860 fi
23861
23862 rm -rf conftest.dSYM
23863 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23864       conftest$ac_exeext conftest.$ac_ext
23865 fi
23866 ac_res=`eval 'as_val=${'$as_ac_var'}
23867                  $as_echo "$as_val"'`
23868                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
23869 $as_echo "$ac_res" >&6; }
23870 as_val=`eval 'as_val=${'$as_ac_var'}
23871                  $as_echo "$as_val"'`
23872    if test "x$as_val" = x""yes; then
23873   cat >>confdefs.h <<_ACEOF
23874 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23875 _ACEOF
23876
23877 fi
23878 done
23879
23880
23881 # Do test here with the proper thread flags
23882 { $as_echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
23883 $as_echo_n "checking whether getpwuid_r takes a fifth argument... " >&6; }
23884 if test "${pgac_cv_func_getpwuid_r_5arg+set}" = set; then
23885   $as_echo_n "(cached) " >&6
23886 else
23887   cat >conftest.$ac_ext <<_ACEOF
23888 /* confdefs.h.  */
23889 _ACEOF
23890 cat confdefs.h >>conftest.$ac_ext
23891 cat >>conftest.$ac_ext <<_ACEOF
23892 /* end confdefs.h.  */
23893 #include <sys/types.h>
23894 #include <pwd.h>
23895 int
23896 main ()
23897 {
23898 uid_t uid;
23899 struct passwd *space;
23900 char *buf;
23901 size_t bufsize;
23902 struct passwd **result;
23903 getpwuid_r(uid, space, buf, bufsize, result);
23904   ;
23905   return 0;
23906 }
23907 _ACEOF
23908 rm -f conftest.$ac_objext
23909 if { (ac_try="$ac_compile"
23910 case "(($ac_try" in
23911   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23912   *) ac_try_echo=$ac_try;;
23913 esac
23914 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23915 $as_echo "$ac_try_echo") >&5
23916   (eval "$ac_compile") 2>conftest.er1
23917   ac_status=$?
23918   grep -v '^ *+' conftest.er1 >conftest.err
23919   rm -f conftest.er1
23920   cat conftest.err >&5
23921   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23922   (exit $ac_status); } && {
23923          test -z "$ac_c_werror_flag" ||
23924          test ! -s conftest.err
23925        } && test -s conftest.$ac_objext; then
23926   pgac_cv_func_getpwuid_r_5arg=yes
23927 else
23928   $as_echo "$as_me: failed program was:" >&5
23929 sed 's/^/| /' conftest.$ac_ext >&5
23930
23931         pgac_cv_func_getpwuid_r_5arg=no
23932 fi
23933
23934 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23935 fi
23936 { $as_echo "$as_me:$LINENO: result: $pgac_cv_func_getpwuid_r_5arg" >&5
23937 $as_echo "$pgac_cv_func_getpwuid_r_5arg" >&6; }
23938 if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
23939
23940 cat >>confdefs.h <<\_ACEOF
23941 #define GETPWUID_R_5ARG 1
23942 _ACEOF
23943
23944 fi
23945
23946 { $as_echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
23947 $as_echo_n "checking whether strerror_r returns int... " >&6; }
23948 if test "${pgac_cv_func_strerror_r_int+set}" = set; then
23949   $as_echo_n "(cached) " >&6
23950 else
23951   cat >conftest.$ac_ext <<_ACEOF
23952 /* confdefs.h.  */
23953 _ACEOF
23954 cat confdefs.h >>conftest.$ac_ext
23955 cat >>conftest.$ac_ext <<_ACEOF
23956 /* end confdefs.h.  */
23957 #include <string.h>
23958 int
23959 main ()
23960 {
23961 #ifndef _AIX
23962 int strerror_r(int, char *, size_t);
23963 #else
23964 /* Older AIX has 'int' for the third argument so we don't test the args. */
23965 int strerror_r();
23966 #endif
23967   ;
23968   return 0;
23969 }
23970 _ACEOF
23971 rm -f conftest.$ac_objext
23972 if { (ac_try="$ac_compile"
23973 case "(($ac_try" in
23974   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23975   *) ac_try_echo=$ac_try;;
23976 esac
23977 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23978 $as_echo "$ac_try_echo") >&5
23979   (eval "$ac_compile") 2>conftest.er1
23980   ac_status=$?
23981   grep -v '^ *+' conftest.er1 >conftest.err
23982   rm -f conftest.er1
23983   cat conftest.err >&5
23984   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23985   (exit $ac_status); } && {
23986          test -z "$ac_c_werror_flag" ||
23987          test ! -s conftest.err
23988        } && test -s conftest.$ac_objext; then
23989   pgac_cv_func_strerror_r_int=yes
23990 else
23991   $as_echo "$as_me: failed program was:" >&5
23992 sed 's/^/| /' conftest.$ac_ext >&5
23993
23994         pgac_cv_func_strerror_r_int=no
23995 fi
23996
23997 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23998 fi
23999 { $as_echo "$as_me:$LINENO: result: $pgac_cv_func_strerror_r_int" >&5
24000 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
24001 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
24002
24003 cat >>confdefs.h <<\_ACEOF
24004 #define STRERROR_R_INT 1
24005 _ACEOF
24006
24007 fi
24008
24009
24010 CFLAGS="$_CFLAGS"
24011 LIBS="$_LIBS"
24012
24013 else
24014 # do not use values from template file
24015 PTHREAD_CFLAGS=
24016 PTHREAD_LIBS=
24017 fi
24018
24019
24020
24021
24022
24023 # We can test for libldap_r only after we know PTHREAD_LIBS
24024 if test "$with_ldap" = yes ; then
24025   _LIBS="$LIBS"
24026   if test "$PORTNAME" != "win32"; then
24027
24028 { $as_echo "$as_me:$LINENO: checking for ldap_bind in -lldap" >&5
24029 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
24030 if test "${ac_cv_lib_ldap_ldap_bind+set}" = set; then
24031   $as_echo_n "(cached) " >&6
24032 else
24033   ac_check_lib_save_LIBS=$LIBS
24034 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
24035 cat >conftest.$ac_ext <<_ACEOF
24036 /* confdefs.h.  */
24037 _ACEOF
24038 cat confdefs.h >>conftest.$ac_ext
24039 cat >>conftest.$ac_ext <<_ACEOF
24040 /* end confdefs.h.  */
24041
24042 /* Override any GCC internal prototype to avoid an error.
24043    Use char because int might match the return type of a GCC
24044    builtin and then its argument prototype would still apply.  */
24045 #ifdef __cplusplus
24046 extern "C"
24047 #endif
24048 char ldap_bind ();
24049 int
24050 main ()
24051 {
24052 return ldap_bind ();
24053   ;
24054   return 0;
24055 }
24056 _ACEOF
24057 rm -f conftest.$ac_objext conftest$ac_exeext
24058 if { (ac_try="$ac_link"
24059 case "(($ac_try" in
24060   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24061   *) ac_try_echo=$ac_try;;
24062 esac
24063 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24064 $as_echo "$ac_try_echo") >&5
24065   (eval "$ac_link") 2>conftest.er1
24066   ac_status=$?
24067   grep -v '^ *+' conftest.er1 >conftest.err
24068   rm -f conftest.er1
24069   cat conftest.err >&5
24070   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24071   (exit $ac_status); } && {
24072          test -z "$ac_c_werror_flag" ||
24073          test ! -s conftest.err
24074        } && test -s conftest$ac_exeext && {
24075          test "$cross_compiling" = yes ||
24076          $as_test_x conftest$ac_exeext
24077        }; then
24078   ac_cv_lib_ldap_ldap_bind=yes
24079 else
24080   $as_echo "$as_me: failed program was:" >&5
24081 sed 's/^/| /' conftest.$ac_ext >&5
24082
24083         ac_cv_lib_ldap_ldap_bind=no
24084 fi
24085
24086 rm -rf conftest.dSYM
24087 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24088       conftest$ac_exeext conftest.$ac_ext
24089 LIBS=$ac_check_lib_save_LIBS
24090 fi
24091 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_bind" >&5
24092 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
24093 if test "x$ac_cv_lib_ldap_ldap_bind" = x""yes; then
24094   cat >>confdefs.h <<_ACEOF
24095 #define HAVE_LIBLDAP 1
24096 _ACEOF
24097
24098   LIBS="-lldap $LIBS"
24099
24100 else
24101   { { $as_echo "$as_me:$LINENO: error: library 'ldap' is required for LDAP" >&5
24102 $as_echo "$as_me: error: library 'ldap' is required for LDAP" >&2;}
24103    { (exit 1); exit 1; }; }
24104 fi
24105
24106     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
24107     if test "$enable_thread_safety" = yes; then
24108       # on some platforms ldap_r fails to link without PTHREAD_LIBS
24109
24110 { $as_echo "$as_me:$LINENO: checking for ldap_simple_bind in -lldap_r" >&5
24111 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
24112 if test "${ac_cv_lib_ldap_r_ldap_simple_bind+set}" = set; then
24113   $as_echo_n "(cached) " >&6
24114 else
24115   ac_check_lib_save_LIBS=$LIBS
24116 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
24117 cat >conftest.$ac_ext <<_ACEOF
24118 /* confdefs.h.  */
24119 _ACEOF
24120 cat confdefs.h >>conftest.$ac_ext
24121 cat >>conftest.$ac_ext <<_ACEOF
24122 /* end confdefs.h.  */
24123
24124 /* Override any GCC internal prototype to avoid an error.
24125    Use char because int might match the return type of a GCC
24126    builtin and then its argument prototype would still apply.  */
24127 #ifdef __cplusplus
24128 extern "C"
24129 #endif
24130 char ldap_simple_bind ();
24131 int
24132 main ()
24133 {
24134 return ldap_simple_bind ();
24135   ;
24136   return 0;
24137 }
24138 _ACEOF
24139 rm -f conftest.$ac_objext conftest$ac_exeext
24140 if { (ac_try="$ac_link"
24141 case "(($ac_try" in
24142   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24143   *) ac_try_echo=$ac_try;;
24144 esac
24145 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24146 $as_echo "$ac_try_echo") >&5
24147   (eval "$ac_link") 2>conftest.er1
24148   ac_status=$?
24149   grep -v '^ *+' conftest.er1 >conftest.err
24150   rm -f conftest.er1
24151   cat conftest.err >&5
24152   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24153   (exit $ac_status); } && {
24154          test -z "$ac_c_werror_flag" ||
24155          test ! -s conftest.err
24156        } && test -s conftest$ac_exeext && {
24157          test "$cross_compiling" = yes ||
24158          $as_test_x conftest$ac_exeext
24159        }; then
24160   ac_cv_lib_ldap_r_ldap_simple_bind=yes
24161 else
24162   $as_echo "$as_me: failed program was:" >&5
24163 sed 's/^/| /' conftest.$ac_ext >&5
24164
24165         ac_cv_lib_ldap_r_ldap_simple_bind=no
24166 fi
24167
24168 rm -rf conftest.dSYM
24169 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24170       conftest$ac_exeext conftest.$ac_ext
24171 LIBS=$ac_check_lib_save_LIBS
24172 fi
24173 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
24174 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
24175 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = x""yes; then
24176   cat >>confdefs.h <<_ACEOF
24177 #define HAVE_LIBLDAP_R 1
24178 _ACEOF
24179
24180   LIBS="-lldap_r $LIBS"
24181
24182 else
24183   { { $as_echo "$as_me:$LINENO: error: library 'ldap_r' is required for LDAP" >&5
24184 $as_echo "$as_me: error: library 'ldap_r' is required for LDAP" >&2;}
24185    { (exit 1); exit 1; }; }
24186 fi
24187
24188       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
24189     else
24190       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
24191     fi
24192   else
24193
24194 { $as_echo "$as_me:$LINENO: checking for ldap_bind in -lwldap32" >&5
24195 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
24196 if test "${ac_cv_lib_wldap32_ldap_bind+set}" = set; then
24197   $as_echo_n "(cached) " >&6
24198 else
24199   ac_check_lib_save_LIBS=$LIBS
24200 LIBS="-lwldap32  $LIBS"
24201 cat >conftest.$ac_ext <<_ACEOF
24202 /* confdefs.h.  */
24203 _ACEOF
24204 cat confdefs.h >>conftest.$ac_ext
24205 cat >>conftest.$ac_ext <<_ACEOF
24206 /* end confdefs.h.  */
24207
24208 /* Override any GCC internal prototype to avoid an error.
24209    Use char because int might match the return type of a GCC
24210    builtin and then its argument prototype would still apply.  */
24211 #ifdef __cplusplus
24212 extern "C"
24213 #endif
24214 char ldap_bind ();
24215 int
24216 main ()
24217 {
24218 return ldap_bind ();
24219   ;
24220   return 0;
24221 }
24222 _ACEOF
24223 rm -f conftest.$ac_objext conftest$ac_exeext
24224 if { (ac_try="$ac_link"
24225 case "(($ac_try" in
24226   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24227   *) ac_try_echo=$ac_try;;
24228 esac
24229 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24230 $as_echo "$ac_try_echo") >&5
24231   (eval "$ac_link") 2>conftest.er1
24232   ac_status=$?
24233   grep -v '^ *+' conftest.er1 >conftest.err
24234   rm -f conftest.er1
24235   cat conftest.err >&5
24236   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24237   (exit $ac_status); } && {
24238          test -z "$ac_c_werror_flag" ||
24239          test ! -s conftest.err
24240        } && test -s conftest$ac_exeext && {
24241          test "$cross_compiling" = yes ||
24242          $as_test_x conftest$ac_exeext
24243        }; then
24244   ac_cv_lib_wldap32_ldap_bind=yes
24245 else
24246   $as_echo "$as_me: failed program was:" >&5
24247 sed 's/^/| /' conftest.$ac_ext >&5
24248
24249         ac_cv_lib_wldap32_ldap_bind=no
24250 fi
24251
24252 rm -rf conftest.dSYM
24253 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24254       conftest$ac_exeext conftest.$ac_ext
24255 LIBS=$ac_check_lib_save_LIBS
24256 fi
24257 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_wldap32_ldap_bind" >&5
24258 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
24259 if test "x$ac_cv_lib_wldap32_ldap_bind" = x""yes; then
24260   cat >>confdefs.h <<_ACEOF
24261 #define HAVE_LIBWLDAP32 1
24262 _ACEOF
24263
24264   LIBS="-lwldap32 $LIBS"
24265
24266 else
24267   { { $as_echo "$as_me:$LINENO: error: library 'wldap32' is required for LDAP" >&5
24268 $as_echo "$as_me: error: library 'wldap32' is required for LDAP" >&2;}
24269    { (exit 1); exit 1; }; }
24270 fi
24271
24272     LDAP_LIBS_FE="-lwldap32"
24273     LDAP_LIBS_BE="-lwldap32"
24274   fi
24275   LIBS="$_LIBS"
24276 fi
24277
24278
24279
24280
24281 # This test makes sure that run tests work at all.  Sometimes a shared
24282 # library is found by the linker, but the runtime linker can't find it.
24283 # This check should come after all modifications of compiler or linker
24284 # variables, and before any other run tests.
24285 { $as_echo "$as_me:$LINENO: checking test program" >&5
24286 $as_echo_n "checking test program... " >&6; }
24287 if test "$cross_compiling" = yes; then
24288   { $as_echo "$as_me:$LINENO: result: cross-compiling" >&5
24289 $as_echo "cross-compiling" >&6; }
24290 else
24291   cat >conftest.$ac_ext <<_ACEOF
24292 /* confdefs.h.  */
24293 _ACEOF
24294 cat confdefs.h >>conftest.$ac_ext
24295 cat >>conftest.$ac_ext <<_ACEOF
24296 /* end confdefs.h.  */
24297 int main() { return 0; }
24298 _ACEOF
24299 rm -f conftest$ac_exeext
24300 if { (ac_try="$ac_link"
24301 case "(($ac_try" in
24302   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24303   *) ac_try_echo=$ac_try;;
24304 esac
24305 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24306 $as_echo "$ac_try_echo") >&5
24307   (eval "$ac_link") 2>&5
24308   ac_status=$?
24309   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24310   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24311   { (case "(($ac_try" in
24312   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24313   *) ac_try_echo=$ac_try;;
24314 esac
24315 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24316 $as_echo "$ac_try_echo") >&5
24317   (eval "$ac_try") 2>&5
24318   ac_status=$?
24319   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24320   (exit $ac_status); }; }; then
24321   { $as_echo "$as_me:$LINENO: result: ok" >&5
24322 $as_echo "ok" >&6; }
24323 else
24324   $as_echo "$as_me: program exited with status $ac_status" >&5
24325 $as_echo "$as_me: failed program was:" >&5
24326 sed 's/^/| /' conftest.$ac_ext >&5
24327
24328 ( exit $ac_status )
24329 { $as_echo "$as_me:$LINENO: result: failed" >&5
24330 $as_echo "failed" >&6; }
24331 { { $as_echo "$as_me:$LINENO: error:
24332 Could not execute a simple test program.  This may be a problem
24333 related to locating shared libraries.  Check the file 'config.log'
24334 for the exact reason." >&5
24335 $as_echo "$as_me: error:
24336 Could not execute a simple test program.  This may be a problem
24337 related to locating shared libraries.  Check the file 'config.log'
24338 for the exact reason." >&2;}
24339    { (exit 1); exit 1; }; }
24340 fi
24341 rm -rf conftest.dSYM
24342 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24343 fi
24344
24345
24346
24347 # --------------------
24348 # Run tests below here
24349 # --------------------
24350
24351 # Force use of our snprintf if system's doesn't do arg control
24352 # See comment above at snprintf test for details.
24353 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
24354   { $as_echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
24355 $as_echo_n "checking whether printf supports argument control... " >&6; }
24356 if test "${pgac_cv_printf_arg_control+set}" = set; then
24357   $as_echo_n "(cached) " >&6
24358 else
24359   if test "$cross_compiling" = yes; then
24360   pgac_cv_printf_arg_control=cross
24361 else
24362   cat >conftest.$ac_ext <<_ACEOF
24363 /* confdefs.h.  */
24364 _ACEOF
24365 cat confdefs.h >>conftest.$ac_ext
24366 cat >>conftest.$ac_ext <<_ACEOF
24367 /* end confdefs.h.  */
24368 #include <stdio.h>
24369 #include <string.h>
24370
24371 int main()
24372 {
24373   char buf[100];
24374
24375   /* can it swap arguments? */
24376   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
24377   if (strcmp(buf, "4 3") != 0)
24378     return 1;
24379   return 0;
24380 }
24381 _ACEOF
24382 rm -f conftest$ac_exeext
24383 if { (ac_try="$ac_link"
24384 case "(($ac_try" in
24385   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24386   *) ac_try_echo=$ac_try;;
24387 esac
24388 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24389 $as_echo "$ac_try_echo") >&5
24390   (eval "$ac_link") 2>&5
24391   ac_status=$?
24392   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24393   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24394   { (case "(($ac_try" in
24395   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24396   *) ac_try_echo=$ac_try;;
24397 esac
24398 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24399 $as_echo "$ac_try_echo") >&5
24400   (eval "$ac_try") 2>&5
24401   ac_status=$?
24402   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24403   (exit $ac_status); }; }; then
24404   pgac_cv_printf_arg_control=yes
24405 else
24406   $as_echo "$as_me: program exited with status $ac_status" >&5
24407 $as_echo "$as_me: failed program was:" >&5
24408 sed 's/^/| /' conftest.$ac_ext >&5
24409
24410 ( exit $ac_status )
24411 pgac_cv_printf_arg_control=no
24412 fi
24413 rm -rf conftest.dSYM
24414 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24415 fi
24416
24417
24418
24419 fi
24420 { $as_echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
24421 $as_echo "$pgac_cv_printf_arg_control" >&6; }
24422
24423   if test $pgac_cv_printf_arg_control != yes ; then
24424     pgac_need_repl_snprintf=yes
24425   fi
24426 fi
24427
24428
24429
24430
24431 { $as_echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
24432 $as_echo_n "checking whether long int is 64 bits... " >&6; }
24433 if test "${pgac_cv_type_long_int_64+set}" = set; then
24434   $as_echo_n "(cached) " >&6
24435 else
24436   if test "$cross_compiling" = yes; then
24437   # If cross-compiling, check the size reported by the compiler and
24438 # trust that the arithmetic works.
24439 cat >conftest.$ac_ext <<_ACEOF
24440 /* confdefs.h.  */
24441 _ACEOF
24442 cat confdefs.h >>conftest.$ac_ext
24443 cat >>conftest.$ac_ext <<_ACEOF
24444 /* end confdefs.h.  */
24445
24446 int
24447 main ()
24448 {
24449 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
24450 test_array [0] = 0
24451
24452   ;
24453   return 0;
24454 }
24455 _ACEOF
24456 rm -f conftest.$ac_objext
24457 if { (ac_try="$ac_compile"
24458 case "(($ac_try" in
24459   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24460   *) ac_try_echo=$ac_try;;
24461 esac
24462 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24463 $as_echo "$ac_try_echo") >&5
24464   (eval "$ac_compile") 2>conftest.er1
24465   ac_status=$?
24466   grep -v '^ *+' conftest.er1 >conftest.err
24467   rm -f conftest.er1
24468   cat conftest.err >&5
24469   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24470   (exit $ac_status); } && {
24471          test -z "$ac_c_werror_flag" ||
24472          test ! -s conftest.err
24473        } && test -s conftest.$ac_objext; then
24474   pgac_cv_type_long_int_64=yes
24475 else
24476   $as_echo "$as_me: failed program was:" >&5
24477 sed 's/^/| /' conftest.$ac_ext >&5
24478
24479         pgac_cv_type_long_int_64=no
24480 fi
24481
24482 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24483 else
24484   cat >conftest.$ac_ext <<_ACEOF
24485 /* confdefs.h.  */
24486 _ACEOF
24487 cat confdefs.h >>conftest.$ac_ext
24488 cat >>conftest.$ac_ext <<_ACEOF
24489 /* end confdefs.h.  */
24490 typedef long int ac_int64;
24491
24492 /*
24493  * These are globals to discourage the compiler from folding all the
24494  * arithmetic tests down to compile-time constants.
24495  */
24496 ac_int64 a = 20000001;
24497 ac_int64 b = 40000005;
24498
24499 int does_int64_work()
24500 {
24501   ac_int64 c,d;
24502
24503   if (sizeof(ac_int64) != 8)
24504     return 0;                   /* definitely not the right size */
24505
24506   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
24507   c = a * b;
24508   d = (c + b) / b;
24509   if (d != a+1)
24510     return 0;
24511   return 1;
24512 }
24513 main() {
24514   exit(! does_int64_work());
24515 }
24516 _ACEOF
24517 rm -f conftest$ac_exeext
24518 if { (ac_try="$ac_link"
24519 case "(($ac_try" in
24520   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24521   *) ac_try_echo=$ac_try;;
24522 esac
24523 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24524 $as_echo "$ac_try_echo") >&5
24525   (eval "$ac_link") 2>&5
24526   ac_status=$?
24527   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24528   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24529   { (case "(($ac_try" in
24530   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24531   *) ac_try_echo=$ac_try;;
24532 esac
24533 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24534 $as_echo "$ac_try_echo") >&5
24535   (eval "$ac_try") 2>&5
24536   ac_status=$?
24537   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24538   (exit $ac_status); }; }; then
24539   pgac_cv_type_long_int_64=yes
24540 else
24541   $as_echo "$as_me: program exited with status $ac_status" >&5
24542 $as_echo "$as_me: failed program was:" >&5
24543 sed 's/^/| /' conftest.$ac_ext >&5
24544
24545 ( exit $ac_status )
24546 pgac_cv_type_long_int_64=no
24547 fi
24548 rm -rf conftest.dSYM
24549 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24550 fi
24551
24552
24553 fi
24554 { $as_echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
24555 $as_echo "$pgac_cv_type_long_int_64" >&6; }
24556
24557 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
24558 if test x"$pgac_cv_type_long_int_64" = xyes ; then
24559
24560 cat >>confdefs.h <<\_ACEOF
24561 #define HAVE_LONG_INT_64 1
24562 _ACEOF
24563
24564 fi
24565
24566
24567 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
24568   pg_int64_type="long int"
24569 else
24570   { $as_echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
24571 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
24572 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
24573   $as_echo_n "(cached) " >&6
24574 else
24575   if test "$cross_compiling" = yes; then
24576   # If cross-compiling, check the size reported by the compiler and
24577 # trust that the arithmetic works.
24578 cat >conftest.$ac_ext <<_ACEOF
24579 /* confdefs.h.  */
24580 _ACEOF
24581 cat confdefs.h >>conftest.$ac_ext
24582 cat >>conftest.$ac_ext <<_ACEOF
24583 /* end confdefs.h.  */
24584
24585 int
24586 main ()
24587 {
24588 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
24589 test_array [0] = 0
24590
24591   ;
24592   return 0;
24593 }
24594 _ACEOF
24595 rm -f conftest.$ac_objext
24596 if { (ac_try="$ac_compile"
24597 case "(($ac_try" in
24598   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24599   *) ac_try_echo=$ac_try;;
24600 esac
24601 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24602 $as_echo "$ac_try_echo") >&5
24603   (eval "$ac_compile") 2>conftest.er1
24604   ac_status=$?
24605   grep -v '^ *+' conftest.er1 >conftest.err
24606   rm -f conftest.er1
24607   cat conftest.err >&5
24608   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24609   (exit $ac_status); } && {
24610          test -z "$ac_c_werror_flag" ||
24611          test ! -s conftest.err
24612        } && test -s conftest.$ac_objext; then
24613   pgac_cv_type_long_long_int_64=yes
24614 else
24615   $as_echo "$as_me: failed program was:" >&5
24616 sed 's/^/| /' conftest.$ac_ext >&5
24617
24618         pgac_cv_type_long_long_int_64=no
24619 fi
24620
24621 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24622 else
24623   cat >conftest.$ac_ext <<_ACEOF
24624 /* confdefs.h.  */
24625 _ACEOF
24626 cat confdefs.h >>conftest.$ac_ext
24627 cat >>conftest.$ac_ext <<_ACEOF
24628 /* end confdefs.h.  */
24629 typedef long long int ac_int64;
24630
24631 /*
24632  * These are globals to discourage the compiler from folding all the
24633  * arithmetic tests down to compile-time constants.
24634  */
24635 ac_int64 a = 20000001;
24636 ac_int64 b = 40000005;
24637
24638 int does_int64_work()
24639 {
24640   ac_int64 c,d;
24641
24642   if (sizeof(ac_int64) != 8)
24643     return 0;                   /* definitely not the right size */
24644
24645   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
24646   c = a * b;
24647   d = (c + b) / b;
24648   if (d != a+1)
24649     return 0;
24650   return 1;
24651 }
24652 main() {
24653   exit(! does_int64_work());
24654 }
24655 _ACEOF
24656 rm -f conftest$ac_exeext
24657 if { (ac_try="$ac_link"
24658 case "(($ac_try" in
24659   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24660   *) ac_try_echo=$ac_try;;
24661 esac
24662 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24663 $as_echo "$ac_try_echo") >&5
24664   (eval "$ac_link") 2>&5
24665   ac_status=$?
24666   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24667   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24668   { (case "(($ac_try" in
24669   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24670   *) ac_try_echo=$ac_try;;
24671 esac
24672 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24673 $as_echo "$ac_try_echo") >&5
24674   (eval "$ac_try") 2>&5
24675   ac_status=$?
24676   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24677   (exit $ac_status); }; }; then
24678   pgac_cv_type_long_long_int_64=yes
24679 else
24680   $as_echo "$as_me: program exited with status $ac_status" >&5
24681 $as_echo "$as_me: failed program was:" >&5
24682 sed 's/^/| /' conftest.$ac_ext >&5
24683
24684 ( exit $ac_status )
24685 pgac_cv_type_long_long_int_64=no
24686 fi
24687 rm -rf conftest.dSYM
24688 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24689 fi
24690
24691
24692 fi
24693 { $as_echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
24694 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
24695
24696 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
24697 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
24698
24699 cat >>confdefs.h <<\_ACEOF
24700 #define HAVE_LONG_LONG_INT_64 1
24701 _ACEOF
24702
24703 fi
24704
24705   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
24706     pg_int64_type="long long int"
24707   else
24708     { { $as_echo "$as_me:$LINENO: error: Cannot find a working 64-bit integer type." >&5
24709 $as_echo "$as_me: error: Cannot find a working 64-bit integer type." >&2;}
24710    { (exit 1); exit 1; }; }
24711   fi
24712 fi
24713
24714
24715 cat >>confdefs.h <<_ACEOF
24716 #define PG_INT64_TYPE $pg_int64_type
24717 _ACEOF
24718
24719
24720
24721 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
24722   cat >conftest.$ac_ext <<_ACEOF
24723 /* confdefs.h.  */
24724 _ACEOF
24725 cat confdefs.h >>conftest.$ac_ext
24726 cat >>conftest.$ac_ext <<_ACEOF
24727 /* end confdefs.h.  */
24728
24729 #define INT64CONST(x)  x##LL
24730 long long int foo = INT64CONST(0x1234567890123456);
24731
24732 int
24733 main ()
24734 {
24735
24736   ;
24737   return 0;
24738 }
24739 _ACEOF
24740 rm -f conftest.$ac_objext
24741 if { (ac_try="$ac_compile"
24742 case "(($ac_try" in
24743   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24744   *) ac_try_echo=$ac_try;;
24745 esac
24746 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24747 $as_echo "$ac_try_echo") >&5
24748   (eval "$ac_compile") 2>conftest.er1
24749   ac_status=$?
24750   grep -v '^ *+' conftest.er1 >conftest.err
24751   rm -f conftest.er1
24752   cat conftest.err >&5
24753   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24754   (exit $ac_status); } && {
24755          test -z "$ac_c_werror_flag" ||
24756          test ! -s conftest.err
24757        } && test -s conftest.$ac_objext; then
24758
24759 cat >>confdefs.h <<\_ACEOF
24760 #define HAVE_LL_CONSTANTS 1
24761 _ACEOF
24762
24763 else
24764   $as_echo "$as_me: failed program was:" >&5
24765 sed 's/^/| /' conftest.$ac_ext >&5
24766
24767
24768 fi
24769
24770 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24771 fi
24772
24773
24774 # If we found "long int" is 64 bits, assume snprintf handles it.  If
24775 # we found we need to use "long long int", better check.  We cope with
24776 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
24777 # work, fall back to our own snprintf emulation (which we know uses %lld).
24778
24779 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
24780   if test $pgac_need_repl_snprintf = no; then
24781     { $as_echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
24782 $as_echo_n "checking snprintf format for long long int... " >&6; }
24783 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
24784   $as_echo_n "(cached) " >&6
24785 else
24786   for pgac_format in '%lld' '%qd' '%I64d'; do
24787 if test "$cross_compiling" = yes; then
24788   pgac_cv_snprintf_long_long_int_format=cross; break
24789 else
24790   cat >conftest.$ac_ext <<_ACEOF
24791 /* confdefs.h.  */
24792 _ACEOF
24793 cat confdefs.h >>conftest.$ac_ext
24794 cat >>conftest.$ac_ext <<_ACEOF
24795 /* end confdefs.h.  */
24796 #include <stdio.h>
24797 typedef long long int ac_int64;
24798 #define INT64_FORMAT "$pgac_format"
24799
24800 ac_int64 a = 20000001;
24801 ac_int64 b = 40000005;
24802
24803 int does_int64_snprintf_work()
24804 {
24805   ac_int64 c;
24806   char buf[100];
24807
24808   if (sizeof(ac_int64) != 8)
24809     return 0;                   /* doesn't look like the right size */
24810
24811   c = a * b;
24812   snprintf(buf, 100, INT64_FORMAT, c);
24813   if (strcmp(buf, "800000140000005") != 0)
24814     return 0;                   /* either multiply or snprintf is busted */
24815   return 1;
24816 }
24817 main() {
24818   exit(! does_int64_snprintf_work());
24819 }
24820 _ACEOF
24821 rm -f conftest$ac_exeext
24822 if { (ac_try="$ac_link"
24823 case "(($ac_try" in
24824   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24825   *) ac_try_echo=$ac_try;;
24826 esac
24827 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24828 $as_echo "$ac_try_echo") >&5
24829   (eval "$ac_link") 2>&5
24830   ac_status=$?
24831   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24832   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24833   { (case "(($ac_try" in
24834   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24835   *) ac_try_echo=$ac_try;;
24836 esac
24837 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24838 $as_echo "$ac_try_echo") >&5
24839   (eval "$ac_try") 2>&5
24840   ac_status=$?
24841   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24842   (exit $ac_status); }; }; then
24843   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
24844 else
24845   $as_echo "$as_me: program exited with status $ac_status" >&5
24846 $as_echo "$as_me: failed program was:" >&5
24847 sed 's/^/| /' conftest.$ac_ext >&5
24848
24849 fi
24850 rm -rf conftest.dSYM
24851 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24852 fi
24853
24854
24855 done
24856 fi
24857
24858 LONG_LONG_INT_FORMAT=''
24859
24860 case $pgac_cv_snprintf_long_long_int_format in
24861   cross) { $as_echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
24862 $as_echo "cannot test (not on host machine)" >&6; };;
24863   ?*)    { $as_echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
24864 $as_echo "$pgac_cv_snprintf_long_long_int_format" >&6; }
24865          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
24866   *)     { $as_echo "$as_me:$LINENO: result: none" >&5
24867 $as_echo "none" >&6; };;
24868 esac
24869     if test "$LONG_LONG_INT_FORMAT" = ""; then
24870       # Force usage of our own snprintf, since system snprintf is broken
24871       pgac_need_repl_snprintf=yes
24872       LONG_LONG_INT_FORMAT='%lld'
24873     fi
24874   else
24875     # Here if we previously decided we needed to use our own snprintf
24876     LONG_LONG_INT_FORMAT='%lld'
24877   fi
24878   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
24879   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
24880   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
24881 else
24882   # Here if we are not using 'long long int' at all
24883   INT64_FORMAT='"%ld"'
24884   UINT64_FORMAT='"%lu"'
24885 fi
24886
24887
24888 cat >>confdefs.h <<_ACEOF
24889 #define INT64_FORMAT $INT64_FORMAT
24890 _ACEOF
24891
24892
24893
24894 cat >>confdefs.h <<_ACEOF
24895 #define UINT64_FORMAT $UINT64_FORMAT
24896 _ACEOF
24897
24898
24899 # Now we have checked all the reasons to replace snprintf
24900 if test $pgac_need_repl_snprintf = yes; then
24901
24902 cat >>confdefs.h <<\_ACEOF
24903 #define USE_REPL_SNPRINTF 1
24904 _ACEOF
24905
24906   case " $LIBOBJS " in
24907   *" snprintf.$ac_objext "* ) ;;
24908   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
24909  ;;
24910 esac
24911
24912 fi
24913
24914 # Check size of void *, size_t (enables tweaks for > 32bit address space)
24915 # The cast to long int works around a bug in the HP C Compiler
24916 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24917 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24918 # This bug is HP SR number 8606223364.
24919 { $as_echo "$as_me:$LINENO: checking size of void *" >&5
24920 $as_echo_n "checking size of void *... " >&6; }
24921 if test "${ac_cv_sizeof_void_p+set}" = set; then
24922   $as_echo_n "(cached) " >&6
24923 else
24924   if test "$cross_compiling" = yes; then
24925   # Depending upon the size, compute the lo and hi bounds.
24926 cat >conftest.$ac_ext <<_ACEOF
24927 /* confdefs.h.  */
24928 _ACEOF
24929 cat confdefs.h >>conftest.$ac_ext
24930 cat >>conftest.$ac_ext <<_ACEOF
24931 /* end confdefs.h.  */
24932 $ac_includes_default
24933 int
24934 main ()
24935 {
24936 static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= 0)];
24937 test_array [0] = 0
24938
24939   ;
24940   return 0;
24941 }
24942 _ACEOF
24943 rm -f conftest.$ac_objext
24944 if { (ac_try="$ac_compile"
24945 case "(($ac_try" in
24946   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24947   *) ac_try_echo=$ac_try;;
24948 esac
24949 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24950 $as_echo "$ac_try_echo") >&5
24951   (eval "$ac_compile") 2>conftest.er1
24952   ac_status=$?
24953   grep -v '^ *+' conftest.er1 >conftest.err
24954   rm -f conftest.er1
24955   cat conftest.err >&5
24956   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24957   (exit $ac_status); } && {
24958          test -z "$ac_c_werror_flag" ||
24959          test ! -s conftest.err
24960        } && test -s conftest.$ac_objext; then
24961   ac_lo=0 ac_mid=0
24962   while :; do
24963     cat >conftest.$ac_ext <<_ACEOF
24964 /* confdefs.h.  */
24965 _ACEOF
24966 cat confdefs.h >>conftest.$ac_ext
24967 cat >>conftest.$ac_ext <<_ACEOF
24968 /* end confdefs.h.  */
24969 $ac_includes_default
24970 int
24971 main ()
24972 {
24973 static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
24974 test_array [0] = 0
24975
24976   ;
24977   return 0;
24978 }
24979 _ACEOF
24980 rm -f conftest.$ac_objext
24981 if { (ac_try="$ac_compile"
24982 case "(($ac_try" in
24983   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24984   *) ac_try_echo=$ac_try;;
24985 esac
24986 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24987 $as_echo "$ac_try_echo") >&5
24988   (eval "$ac_compile") 2>conftest.er1
24989   ac_status=$?
24990   grep -v '^ *+' conftest.er1 >conftest.err
24991   rm -f conftest.er1
24992   cat conftest.err >&5
24993   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24994   (exit $ac_status); } && {
24995          test -z "$ac_c_werror_flag" ||
24996          test ! -s conftest.err
24997        } && test -s conftest.$ac_objext; then
24998   ac_hi=$ac_mid; break
24999 else
25000   $as_echo "$as_me: failed program was:" >&5
25001 sed 's/^/| /' conftest.$ac_ext >&5
25002
25003         ac_lo=`expr $ac_mid + 1`
25004                         if test $ac_lo -le $ac_mid; then
25005                           ac_lo= ac_hi=
25006                           break
25007                         fi
25008                         ac_mid=`expr 2 '*' $ac_mid + 1`
25009 fi
25010
25011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25012   done
25013 else
25014   $as_echo "$as_me: failed program was:" >&5
25015 sed 's/^/| /' conftest.$ac_ext >&5
25016
25017         cat >conftest.$ac_ext <<_ACEOF
25018 /* confdefs.h.  */
25019 _ACEOF
25020 cat confdefs.h >>conftest.$ac_ext
25021 cat >>conftest.$ac_ext <<_ACEOF
25022 /* end confdefs.h.  */
25023 $ac_includes_default
25024 int
25025 main ()
25026 {
25027 static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)];
25028 test_array [0] = 0
25029
25030   ;
25031   return 0;
25032 }
25033 _ACEOF
25034 rm -f conftest.$ac_objext
25035 if { (ac_try="$ac_compile"
25036 case "(($ac_try" in
25037   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25038   *) ac_try_echo=$ac_try;;
25039 esac
25040 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25041 $as_echo "$ac_try_echo") >&5
25042   (eval "$ac_compile") 2>conftest.er1
25043   ac_status=$?
25044   grep -v '^ *+' conftest.er1 >conftest.err
25045   rm -f conftest.er1
25046   cat conftest.err >&5
25047   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25048   (exit $ac_status); } && {
25049          test -z "$ac_c_werror_flag" ||
25050          test ! -s conftest.err
25051        } && test -s conftest.$ac_objext; then
25052   ac_hi=-1 ac_mid=-1
25053   while :; do
25054     cat >conftest.$ac_ext <<_ACEOF
25055 /* confdefs.h.  */
25056 _ACEOF
25057 cat confdefs.h >>conftest.$ac_ext
25058 cat >>conftest.$ac_ext <<_ACEOF
25059 /* end confdefs.h.  */
25060 $ac_includes_default
25061 int
25062 main ()
25063 {
25064 static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $ac_mid)];
25065 test_array [0] = 0
25066
25067   ;
25068   return 0;
25069 }
25070 _ACEOF
25071 rm -f conftest.$ac_objext
25072 if { (ac_try="$ac_compile"
25073 case "(($ac_try" in
25074   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25075   *) ac_try_echo=$ac_try;;
25076 esac
25077 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25078 $as_echo "$ac_try_echo") >&5
25079   (eval "$ac_compile") 2>conftest.er1
25080   ac_status=$?
25081   grep -v '^ *+' conftest.er1 >conftest.err
25082   rm -f conftest.er1
25083   cat conftest.err >&5
25084   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25085   (exit $ac_status); } && {
25086          test -z "$ac_c_werror_flag" ||
25087          test ! -s conftest.err
25088        } && test -s conftest.$ac_objext; then
25089   ac_lo=$ac_mid; break
25090 else
25091   $as_echo "$as_me: failed program was:" >&5
25092 sed 's/^/| /' conftest.$ac_ext >&5
25093
25094         ac_hi=`expr '(' $ac_mid ')' - 1`
25095                         if test $ac_mid -le $ac_hi; then
25096                           ac_lo= ac_hi=
25097                           break
25098                         fi
25099                         ac_mid=`expr 2 '*' $ac_mid`
25100 fi
25101
25102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25103   done
25104 else
25105   $as_echo "$as_me: failed program was:" >&5
25106 sed 's/^/| /' conftest.$ac_ext >&5
25107
25108         ac_lo= ac_hi=
25109 fi
25110
25111 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25112 fi
25113
25114 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25115 # Binary search between lo and hi bounds.
25116 while test "x$ac_lo" != "x$ac_hi"; do
25117   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25118   cat >conftest.$ac_ext <<_ACEOF
25119 /* confdefs.h.  */
25120 _ACEOF
25121 cat confdefs.h >>conftest.$ac_ext
25122 cat >>conftest.$ac_ext <<_ACEOF
25123 /* end confdefs.h.  */
25124 $ac_includes_default
25125 int
25126 main ()
25127 {
25128 static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
25129 test_array [0] = 0
25130
25131   ;
25132   return 0;
25133 }
25134 _ACEOF
25135 rm -f conftest.$ac_objext
25136 if { (ac_try="$ac_compile"
25137 case "(($ac_try" in
25138   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25139   *) ac_try_echo=$ac_try;;
25140 esac
25141 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25142 $as_echo "$ac_try_echo") >&5
25143   (eval "$ac_compile") 2>conftest.er1
25144   ac_status=$?
25145   grep -v '^ *+' conftest.er1 >conftest.err
25146   rm -f conftest.er1
25147   cat conftest.err >&5
25148   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25149   (exit $ac_status); } && {
25150          test -z "$ac_c_werror_flag" ||
25151          test ! -s conftest.err
25152        } && test -s conftest.$ac_objext; then
25153   ac_hi=$ac_mid
25154 else
25155   $as_echo "$as_me: failed program was:" >&5
25156 sed 's/^/| /' conftest.$ac_ext >&5
25157
25158         ac_lo=`expr '(' $ac_mid ')' + 1`
25159 fi
25160
25161 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25162 done
25163 case $ac_lo in
25164 ?*) ac_cv_sizeof_void_p=$ac_lo;;
25165 '') if test "$ac_cv_type_void_p" = yes; then
25166      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25167 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25168 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
25169 See \`config.log' for more details." >&5
25170 $as_echo "$as_me: error: cannot compute sizeof (void *)
25171 See \`config.log' for more details." >&2;}
25172    { (exit 77); exit 77; }; }; }
25173    else
25174      ac_cv_sizeof_void_p=0
25175    fi ;;
25176 esac
25177 else
25178   cat >conftest.$ac_ext <<_ACEOF
25179 /* confdefs.h.  */
25180 _ACEOF
25181 cat confdefs.h >>conftest.$ac_ext
25182 cat >>conftest.$ac_ext <<_ACEOF
25183 /* end confdefs.h.  */
25184 $ac_includes_default
25185 static long int longval () { return (long int) (sizeof (void *)); }
25186 static unsigned long int ulongval () { return (long int) (sizeof (void *)); }
25187 #include <stdio.h>
25188 #include <stdlib.h>
25189 int
25190 main ()
25191 {
25192
25193   FILE *f = fopen ("conftest.val", "w");
25194   if (! f)
25195     return 1;
25196   if (((long int) (sizeof (void *))) < 0)
25197     {
25198       long int i = longval ();
25199       if (i != ((long int) (sizeof (void *))))
25200         return 1;
25201       fprintf (f, "%ld", i);
25202     }
25203   else
25204     {
25205       unsigned long int i = ulongval ();
25206       if (i != ((long int) (sizeof (void *))))
25207         return 1;
25208       fprintf (f, "%lu", i);
25209     }
25210   /* Do not output a trailing newline, as this causes \r\n confusion
25211      on some platforms.  */
25212   return ferror (f) || fclose (f) != 0;
25213
25214   ;
25215   return 0;
25216 }
25217 _ACEOF
25218 rm -f conftest$ac_exeext
25219 if { (ac_try="$ac_link"
25220 case "(($ac_try" in
25221   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25222   *) ac_try_echo=$ac_try;;
25223 esac
25224 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25225 $as_echo "$ac_try_echo") >&5
25226   (eval "$ac_link") 2>&5
25227   ac_status=$?
25228   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25229   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25230   { (case "(($ac_try" in
25231   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25232   *) ac_try_echo=$ac_try;;
25233 esac
25234 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25235 $as_echo "$ac_try_echo") >&5
25236   (eval "$ac_try") 2>&5
25237   ac_status=$?
25238   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25239   (exit $ac_status); }; }; then
25240   ac_cv_sizeof_void_p=`cat conftest.val`
25241 else
25242   $as_echo "$as_me: program exited with status $ac_status" >&5
25243 $as_echo "$as_me: failed program was:" >&5
25244 sed 's/^/| /' conftest.$ac_ext >&5
25245
25246 ( exit $ac_status )
25247 if test "$ac_cv_type_void_p" = yes; then
25248      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25249 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25250 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
25251 See \`config.log' for more details." >&5
25252 $as_echo "$as_me: error: cannot compute sizeof (void *)
25253 See \`config.log' for more details." >&2;}
25254    { (exit 77); exit 77; }; }; }
25255    else
25256      ac_cv_sizeof_void_p=0
25257    fi
25258 fi
25259 rm -rf conftest.dSYM
25260 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25261 fi
25262 rm -f conftest.val
25263 fi
25264 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
25265 $as_echo "$ac_cv_sizeof_void_p" >&6; }
25266
25267
25268
25269 cat >>confdefs.h <<_ACEOF
25270 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
25271 _ACEOF
25272
25273
25274 # The cast to long int works around a bug in the HP C Compiler
25275 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
25276 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
25277 # This bug is HP SR number 8606223364.
25278 { $as_echo "$as_me:$LINENO: checking size of size_t" >&5
25279 $as_echo_n "checking size of size_t... " >&6; }
25280 if test "${ac_cv_sizeof_size_t+set}" = set; then
25281   $as_echo_n "(cached) " >&6
25282 else
25283   if test "$cross_compiling" = yes; then
25284   # Depending upon the size, compute the lo and hi bounds.
25285 cat >conftest.$ac_ext <<_ACEOF
25286 /* confdefs.h.  */
25287 _ACEOF
25288 cat confdefs.h >>conftest.$ac_ext
25289 cat >>conftest.$ac_ext <<_ACEOF
25290 /* end confdefs.h.  */
25291 $ac_includes_default
25292 int
25293 main ()
25294 {
25295 static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= 0)];
25296 test_array [0] = 0
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25309 $as_echo "$ac_try_echo") >&5
25310   (eval "$ac_compile") 2>conftest.er1
25311   ac_status=$?
25312   grep -v '^ *+' conftest.er1 >conftest.err
25313   rm -f conftest.er1
25314   cat conftest.err >&5
25315   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25316   (exit $ac_status); } && {
25317          test -z "$ac_c_werror_flag" ||
25318          test ! -s conftest.err
25319        } && test -s conftest.$ac_objext; then
25320   ac_lo=0 ac_mid=0
25321   while :; do
25322     cat >conftest.$ac_ext <<_ACEOF
25323 /* confdefs.h.  */
25324 _ACEOF
25325 cat confdefs.h >>conftest.$ac_ext
25326 cat >>conftest.$ac_ext <<_ACEOF
25327 /* end confdefs.h.  */
25328 $ac_includes_default
25329 int
25330 main ()
25331 {
25332 static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
25333 test_array [0] = 0
25334
25335   ;
25336   return 0;
25337 }
25338 _ACEOF
25339 rm -f conftest.$ac_objext
25340 if { (ac_try="$ac_compile"
25341 case "(($ac_try" in
25342   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25343   *) ac_try_echo=$ac_try;;
25344 esac
25345 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25346 $as_echo "$ac_try_echo") >&5
25347   (eval "$ac_compile") 2>conftest.er1
25348   ac_status=$?
25349   grep -v '^ *+' conftest.er1 >conftest.err
25350   rm -f conftest.er1
25351   cat conftest.err >&5
25352   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25353   (exit $ac_status); } && {
25354          test -z "$ac_c_werror_flag" ||
25355          test ! -s conftest.err
25356        } && test -s conftest.$ac_objext; then
25357   ac_hi=$ac_mid; break
25358 else
25359   $as_echo "$as_me: failed program was:" >&5
25360 sed 's/^/| /' conftest.$ac_ext >&5
25361
25362         ac_lo=`expr $ac_mid + 1`
25363                         if test $ac_lo -le $ac_mid; then
25364                           ac_lo= ac_hi=
25365                           break
25366                         fi
25367                         ac_mid=`expr 2 '*' $ac_mid + 1`
25368 fi
25369
25370 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25371   done
25372 else
25373   $as_echo "$as_me: failed program was:" >&5
25374 sed 's/^/| /' conftest.$ac_ext >&5
25375
25376         cat >conftest.$ac_ext <<_ACEOF
25377 /* confdefs.h.  */
25378 _ACEOF
25379 cat confdefs.h >>conftest.$ac_ext
25380 cat >>conftest.$ac_ext <<_ACEOF
25381 /* end confdefs.h.  */
25382 $ac_includes_default
25383 int
25384 main ()
25385 {
25386 static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) < 0)];
25387 test_array [0] = 0
25388
25389   ;
25390   return 0;
25391 }
25392 _ACEOF
25393 rm -f conftest.$ac_objext
25394 if { (ac_try="$ac_compile"
25395 case "(($ac_try" in
25396   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25397   *) ac_try_echo=$ac_try;;
25398 esac
25399 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25400 $as_echo "$ac_try_echo") >&5
25401   (eval "$ac_compile") 2>conftest.er1
25402   ac_status=$?
25403   grep -v '^ *+' conftest.er1 >conftest.err
25404   rm -f conftest.er1
25405   cat conftest.err >&5
25406   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25407   (exit $ac_status); } && {
25408          test -z "$ac_c_werror_flag" ||
25409          test ! -s conftest.err
25410        } && test -s conftest.$ac_objext; then
25411   ac_hi=-1 ac_mid=-1
25412   while :; do
25413     cat >conftest.$ac_ext <<_ACEOF
25414 /* confdefs.h.  */
25415 _ACEOF
25416 cat confdefs.h >>conftest.$ac_ext
25417 cat >>conftest.$ac_ext <<_ACEOF
25418 /* end confdefs.h.  */
25419 $ac_includes_default
25420 int
25421 main ()
25422 {
25423 static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= $ac_mid)];
25424 test_array [0] = 0
25425
25426   ;
25427   return 0;
25428 }
25429 _ACEOF
25430 rm -f conftest.$ac_objext
25431 if { (ac_try="$ac_compile"
25432 case "(($ac_try" in
25433   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25434   *) ac_try_echo=$ac_try;;
25435 esac
25436 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25437 $as_echo "$ac_try_echo") >&5
25438   (eval "$ac_compile") 2>conftest.er1
25439   ac_status=$?
25440   grep -v '^ *+' conftest.er1 >conftest.err
25441   rm -f conftest.er1
25442   cat conftest.err >&5
25443   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25444   (exit $ac_status); } && {
25445          test -z "$ac_c_werror_flag" ||
25446          test ! -s conftest.err
25447        } && test -s conftest.$ac_objext; then
25448   ac_lo=$ac_mid; break
25449 else
25450   $as_echo "$as_me: failed program was:" >&5
25451 sed 's/^/| /' conftest.$ac_ext >&5
25452
25453         ac_hi=`expr '(' $ac_mid ')' - 1`
25454                         if test $ac_mid -le $ac_hi; then
25455                           ac_lo= ac_hi=
25456                           break
25457                         fi
25458                         ac_mid=`expr 2 '*' $ac_mid`
25459 fi
25460
25461 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25462   done
25463 else
25464   $as_echo "$as_me: failed program was:" >&5
25465 sed 's/^/| /' conftest.$ac_ext >&5
25466
25467         ac_lo= ac_hi=
25468 fi
25469
25470 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25471 fi
25472
25473 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25474 # Binary search between lo and hi bounds.
25475 while test "x$ac_lo" != "x$ac_hi"; do
25476   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25477   cat >conftest.$ac_ext <<_ACEOF
25478 /* confdefs.h.  */
25479 _ACEOF
25480 cat confdefs.h >>conftest.$ac_ext
25481 cat >>conftest.$ac_ext <<_ACEOF
25482 /* end confdefs.h.  */
25483 $ac_includes_default
25484 int
25485 main ()
25486 {
25487 static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
25488 test_array [0] = 0
25489
25490   ;
25491   return 0;
25492 }
25493 _ACEOF
25494 rm -f conftest.$ac_objext
25495 if { (ac_try="$ac_compile"
25496 case "(($ac_try" in
25497   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25498   *) ac_try_echo=$ac_try;;
25499 esac
25500 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25501 $as_echo "$ac_try_echo") >&5
25502   (eval "$ac_compile") 2>conftest.er1
25503   ac_status=$?
25504   grep -v '^ *+' conftest.er1 >conftest.err
25505   rm -f conftest.er1
25506   cat conftest.err >&5
25507   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25508   (exit $ac_status); } && {
25509          test -z "$ac_c_werror_flag" ||
25510          test ! -s conftest.err
25511        } && test -s conftest.$ac_objext; then
25512   ac_hi=$ac_mid
25513 else
25514   $as_echo "$as_me: failed program was:" >&5
25515 sed 's/^/| /' conftest.$ac_ext >&5
25516
25517         ac_lo=`expr '(' $ac_mid ')' + 1`
25518 fi
25519
25520 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25521 done
25522 case $ac_lo in
25523 ?*) ac_cv_sizeof_size_t=$ac_lo;;
25524 '') if test "$ac_cv_type_size_t" = yes; then
25525      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25526 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25527 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
25528 See \`config.log' for more details." >&5
25529 $as_echo "$as_me: error: cannot compute sizeof (size_t)
25530 See \`config.log' for more details." >&2;}
25531    { (exit 77); exit 77; }; }; }
25532    else
25533      ac_cv_sizeof_size_t=0
25534    fi ;;
25535 esac
25536 else
25537   cat >conftest.$ac_ext <<_ACEOF
25538 /* confdefs.h.  */
25539 _ACEOF
25540 cat confdefs.h >>conftest.$ac_ext
25541 cat >>conftest.$ac_ext <<_ACEOF
25542 /* end confdefs.h.  */
25543 $ac_includes_default
25544 static long int longval () { return (long int) (sizeof (size_t)); }
25545 static unsigned long int ulongval () { return (long int) (sizeof (size_t)); }
25546 #include <stdio.h>
25547 #include <stdlib.h>
25548 int
25549 main ()
25550 {
25551
25552   FILE *f = fopen ("conftest.val", "w");
25553   if (! f)
25554     return 1;
25555   if (((long int) (sizeof (size_t))) < 0)
25556     {
25557       long int i = longval ();
25558       if (i != ((long int) (sizeof (size_t))))
25559         return 1;
25560       fprintf (f, "%ld", i);
25561     }
25562   else
25563     {
25564       unsigned long int i = ulongval ();
25565       if (i != ((long int) (sizeof (size_t))))
25566         return 1;
25567       fprintf (f, "%lu", i);
25568     }
25569   /* Do not output a trailing newline, as this causes \r\n confusion
25570      on some platforms.  */
25571   return ferror (f) || fclose (f) != 0;
25572
25573   ;
25574   return 0;
25575 }
25576 _ACEOF
25577 rm -f conftest$ac_exeext
25578 if { (ac_try="$ac_link"
25579 case "(($ac_try" in
25580   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25581   *) ac_try_echo=$ac_try;;
25582 esac
25583 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25584 $as_echo "$ac_try_echo") >&5
25585   (eval "$ac_link") 2>&5
25586   ac_status=$?
25587   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25588   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25589   { (case "(($ac_try" in
25590   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25591   *) ac_try_echo=$ac_try;;
25592 esac
25593 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25594 $as_echo "$ac_try_echo") >&5
25595   (eval "$ac_try") 2>&5
25596   ac_status=$?
25597   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25598   (exit $ac_status); }; }; then
25599   ac_cv_sizeof_size_t=`cat conftest.val`
25600 else
25601   $as_echo "$as_me: program exited with status $ac_status" >&5
25602 $as_echo "$as_me: failed program was:" >&5
25603 sed 's/^/| /' conftest.$ac_ext >&5
25604
25605 ( exit $ac_status )
25606 if test "$ac_cv_type_size_t" = yes; then
25607      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25608 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25609 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
25610 See \`config.log' for more details." >&5
25611 $as_echo "$as_me: error: cannot compute sizeof (size_t)
25612 See \`config.log' for more details." >&2;}
25613    { (exit 77); exit 77; }; }; }
25614    else
25615      ac_cv_sizeof_size_t=0
25616    fi
25617 fi
25618 rm -rf conftest.dSYM
25619 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25620 fi
25621 rm -f conftest.val
25622 fi
25623 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
25624 $as_echo "$ac_cv_sizeof_size_t" >&6; }
25625
25626
25627
25628 cat >>confdefs.h <<_ACEOF
25629 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
25630 _ACEOF
25631
25632
25633 # The cast to long int works around a bug in the HP C Compiler
25634 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
25635 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
25636 # This bug is HP SR number 8606223364.
25637 { $as_echo "$as_me:$LINENO: checking size of long" >&5
25638 $as_echo_n "checking size of long... " >&6; }
25639 if test "${ac_cv_sizeof_long+set}" = set; then
25640   $as_echo_n "(cached) " >&6
25641 else
25642   if test "$cross_compiling" = yes; then
25643   # Depending upon the size, compute the lo and hi bounds.
25644 cat >conftest.$ac_ext <<_ACEOF
25645 /* confdefs.h.  */
25646 _ACEOF
25647 cat confdefs.h >>conftest.$ac_ext
25648 cat >>conftest.$ac_ext <<_ACEOF
25649 /* end confdefs.h.  */
25650 $ac_includes_default
25651 int
25652 main ()
25653 {
25654 static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
25655 test_array [0] = 0
25656
25657   ;
25658   return 0;
25659 }
25660 _ACEOF
25661 rm -f conftest.$ac_objext
25662 if { (ac_try="$ac_compile"
25663 case "(($ac_try" in
25664   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25665   *) ac_try_echo=$ac_try;;
25666 esac
25667 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25668 $as_echo "$ac_try_echo") >&5
25669   (eval "$ac_compile") 2>conftest.er1
25670   ac_status=$?
25671   grep -v '^ *+' conftest.er1 >conftest.err
25672   rm -f conftest.er1
25673   cat conftest.err >&5
25674   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25675   (exit $ac_status); } && {
25676          test -z "$ac_c_werror_flag" ||
25677          test ! -s conftest.err
25678        } && test -s conftest.$ac_objext; then
25679   ac_lo=0 ac_mid=0
25680   while :; do
25681     cat >conftest.$ac_ext <<_ACEOF
25682 /* confdefs.h.  */
25683 _ACEOF
25684 cat confdefs.h >>conftest.$ac_ext
25685 cat >>conftest.$ac_ext <<_ACEOF
25686 /* end confdefs.h.  */
25687 $ac_includes_default
25688 int
25689 main ()
25690 {
25691 static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
25692 test_array [0] = 0
25693
25694   ;
25695   return 0;
25696 }
25697 _ACEOF
25698 rm -f conftest.$ac_objext
25699 if { (ac_try="$ac_compile"
25700 case "(($ac_try" in
25701   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25702   *) ac_try_echo=$ac_try;;
25703 esac
25704 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25705 $as_echo "$ac_try_echo") >&5
25706   (eval "$ac_compile") 2>conftest.er1
25707   ac_status=$?
25708   grep -v '^ *+' conftest.er1 >conftest.err
25709   rm -f conftest.er1
25710   cat conftest.err >&5
25711   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25712   (exit $ac_status); } && {
25713          test -z "$ac_c_werror_flag" ||
25714          test ! -s conftest.err
25715        } && test -s conftest.$ac_objext; then
25716   ac_hi=$ac_mid; break
25717 else
25718   $as_echo "$as_me: failed program was:" >&5
25719 sed 's/^/| /' conftest.$ac_ext >&5
25720
25721         ac_lo=`expr $ac_mid + 1`
25722                         if test $ac_lo -le $ac_mid; then
25723                           ac_lo= ac_hi=
25724                           break
25725                         fi
25726                         ac_mid=`expr 2 '*' $ac_mid + 1`
25727 fi
25728
25729 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25730   done
25731 else
25732   $as_echo "$as_me: failed program was:" >&5
25733 sed 's/^/| /' conftest.$ac_ext >&5
25734
25735         cat >conftest.$ac_ext <<_ACEOF
25736 /* confdefs.h.  */
25737 _ACEOF
25738 cat confdefs.h >>conftest.$ac_ext
25739 cat >>conftest.$ac_ext <<_ACEOF
25740 /* end confdefs.h.  */
25741 $ac_includes_default
25742 int
25743 main ()
25744 {
25745 static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
25746 test_array [0] = 0
25747
25748   ;
25749   return 0;
25750 }
25751 _ACEOF
25752 rm -f conftest.$ac_objext
25753 if { (ac_try="$ac_compile"
25754 case "(($ac_try" in
25755   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25756   *) ac_try_echo=$ac_try;;
25757 esac
25758 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25759 $as_echo "$ac_try_echo") >&5
25760   (eval "$ac_compile") 2>conftest.er1
25761   ac_status=$?
25762   grep -v '^ *+' conftest.er1 >conftest.err
25763   rm -f conftest.er1
25764   cat conftest.err >&5
25765   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25766   (exit $ac_status); } && {
25767          test -z "$ac_c_werror_flag" ||
25768          test ! -s conftest.err
25769        } && test -s conftest.$ac_objext; then
25770   ac_hi=-1 ac_mid=-1
25771   while :; do
25772     cat >conftest.$ac_ext <<_ACEOF
25773 /* confdefs.h.  */
25774 _ACEOF
25775 cat confdefs.h >>conftest.$ac_ext
25776 cat >>conftest.$ac_ext <<_ACEOF
25777 /* end confdefs.h.  */
25778 $ac_includes_default
25779 int
25780 main ()
25781 {
25782 static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
25783 test_array [0] = 0
25784
25785   ;
25786   return 0;
25787 }
25788 _ACEOF
25789 rm -f conftest.$ac_objext
25790 if { (ac_try="$ac_compile"
25791 case "(($ac_try" in
25792   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25793   *) ac_try_echo=$ac_try;;
25794 esac
25795 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25796 $as_echo "$ac_try_echo") >&5
25797   (eval "$ac_compile") 2>conftest.er1
25798   ac_status=$?
25799   grep -v '^ *+' conftest.er1 >conftest.err
25800   rm -f conftest.er1
25801   cat conftest.err >&5
25802   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25803   (exit $ac_status); } && {
25804          test -z "$ac_c_werror_flag" ||
25805          test ! -s conftest.err
25806        } && test -s conftest.$ac_objext; then
25807   ac_lo=$ac_mid; break
25808 else
25809   $as_echo "$as_me: failed program was:" >&5
25810 sed 's/^/| /' conftest.$ac_ext >&5
25811
25812         ac_hi=`expr '(' $ac_mid ')' - 1`
25813                         if test $ac_mid -le $ac_hi; then
25814                           ac_lo= ac_hi=
25815                           break
25816                         fi
25817                         ac_mid=`expr 2 '*' $ac_mid`
25818 fi
25819
25820 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25821   done
25822 else
25823   $as_echo "$as_me: failed program was:" >&5
25824 sed 's/^/| /' conftest.$ac_ext >&5
25825
25826         ac_lo= ac_hi=
25827 fi
25828
25829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25830 fi
25831
25832 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25833 # Binary search between lo and hi bounds.
25834 while test "x$ac_lo" != "x$ac_hi"; do
25835   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25836   cat >conftest.$ac_ext <<_ACEOF
25837 /* confdefs.h.  */
25838 _ACEOF
25839 cat confdefs.h >>conftest.$ac_ext
25840 cat >>conftest.$ac_ext <<_ACEOF
25841 /* end confdefs.h.  */
25842 $ac_includes_default
25843 int
25844 main ()
25845 {
25846 static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
25847 test_array [0] = 0
25848
25849   ;
25850   return 0;
25851 }
25852 _ACEOF
25853 rm -f conftest.$ac_objext
25854 if { (ac_try="$ac_compile"
25855 case "(($ac_try" in
25856   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25857   *) ac_try_echo=$ac_try;;
25858 esac
25859 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25860 $as_echo "$ac_try_echo") >&5
25861   (eval "$ac_compile") 2>conftest.er1
25862   ac_status=$?
25863   grep -v '^ *+' conftest.er1 >conftest.err
25864   rm -f conftest.er1
25865   cat conftest.err >&5
25866   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25867   (exit $ac_status); } && {
25868          test -z "$ac_c_werror_flag" ||
25869          test ! -s conftest.err
25870        } && test -s conftest.$ac_objext; then
25871   ac_hi=$ac_mid
25872 else
25873   $as_echo "$as_me: failed program was:" >&5
25874 sed 's/^/| /' conftest.$ac_ext >&5
25875
25876         ac_lo=`expr '(' $ac_mid ')' + 1`
25877 fi
25878
25879 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25880 done
25881 case $ac_lo in
25882 ?*) ac_cv_sizeof_long=$ac_lo;;
25883 '') if test "$ac_cv_type_long" = yes; then
25884      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25885 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25886 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
25887 See \`config.log' for more details." >&5
25888 $as_echo "$as_me: error: cannot compute sizeof (long)
25889 See \`config.log' for more details." >&2;}
25890    { (exit 77); exit 77; }; }; }
25891    else
25892      ac_cv_sizeof_long=0
25893    fi ;;
25894 esac
25895 else
25896   cat >conftest.$ac_ext <<_ACEOF
25897 /* confdefs.h.  */
25898 _ACEOF
25899 cat confdefs.h >>conftest.$ac_ext
25900 cat >>conftest.$ac_ext <<_ACEOF
25901 /* end confdefs.h.  */
25902 $ac_includes_default
25903 static long int longval () { return (long int) (sizeof (long)); }
25904 static unsigned long int ulongval () { return (long int) (sizeof (long)); }
25905 #include <stdio.h>
25906 #include <stdlib.h>
25907 int
25908 main ()
25909 {
25910
25911   FILE *f = fopen ("conftest.val", "w");
25912   if (! f)
25913     return 1;
25914   if (((long int) (sizeof (long))) < 0)
25915     {
25916       long int i = longval ();
25917       if (i != ((long int) (sizeof (long))))
25918         return 1;
25919       fprintf (f, "%ld", i);
25920     }
25921   else
25922     {
25923       unsigned long int i = ulongval ();
25924       if (i != ((long int) (sizeof (long))))
25925         return 1;
25926       fprintf (f, "%lu", i);
25927     }
25928   /* Do not output a trailing newline, as this causes \r\n confusion
25929      on some platforms.  */
25930   return ferror (f) || fclose (f) != 0;
25931
25932   ;
25933   return 0;
25934 }
25935 _ACEOF
25936 rm -f conftest$ac_exeext
25937 if { (ac_try="$ac_link"
25938 case "(($ac_try" in
25939   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25940   *) ac_try_echo=$ac_try;;
25941 esac
25942 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25943 $as_echo "$ac_try_echo") >&5
25944   (eval "$ac_link") 2>&5
25945   ac_status=$?
25946   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25947   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25948   { (case "(($ac_try" in
25949   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25950   *) ac_try_echo=$ac_try;;
25951 esac
25952 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25953 $as_echo "$ac_try_echo") >&5
25954   (eval "$ac_try") 2>&5
25955   ac_status=$?
25956   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25957   (exit $ac_status); }; }; then
25958   ac_cv_sizeof_long=`cat conftest.val`
25959 else
25960   $as_echo "$as_me: program exited with status $ac_status" >&5
25961 $as_echo "$as_me: failed program was:" >&5
25962 sed 's/^/| /' conftest.$ac_ext >&5
25963
25964 ( exit $ac_status )
25965 if test "$ac_cv_type_long" = yes; then
25966      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25967 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25968 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
25969 See \`config.log' for more details." >&5
25970 $as_echo "$as_me: error: cannot compute sizeof (long)
25971 See \`config.log' for more details." >&2;}
25972    { (exit 77); exit 77; }; }; }
25973    else
25974      ac_cv_sizeof_long=0
25975    fi
25976 fi
25977 rm -rf conftest.dSYM
25978 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25979 fi
25980 rm -f conftest.val
25981 fi
25982 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
25983 $as_echo "$ac_cv_sizeof_long" >&6; }
25984
25985
25986
25987 cat >>confdefs.h <<_ACEOF
25988 #define SIZEOF_LONG $ac_cv_sizeof_long
25989 _ACEOF
25990
25991
25992
25993 # Decide whether float4 is passed by value: user-selectable, enabled by default
25994 { $as_echo "$as_me:$LINENO: checking whether to build with float4 passed by value" >&5
25995 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
25996
25997
25998 # Check whether --enable-float4-byval was given.
25999 if test "${enable_float4_byval+set}" = set; then
26000   enableval=$enable_float4_byval;
26001   case $enableval in
26002     yes)
26003
26004 cat >>confdefs.h <<\_ACEOF
26005 #define USE_FLOAT4_BYVAL 1
26006 _ACEOF
26007
26008                float4passbyval=true
26009       ;;
26010     no)
26011       float4passbyval=false
26012       ;;
26013     *)
26014       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-float4-byval option" >&5
26015 $as_echo "$as_me: error: no argument expected for --enable-float4-byval option" >&2;}
26016    { (exit 1); exit 1; }; }
26017       ;;
26018   esac
26019
26020 else
26021   enable_float4_byval=yes
26022
26023 cat >>confdefs.h <<\_ACEOF
26024 #define USE_FLOAT4_BYVAL 1
26025 _ACEOF
26026
26027                float4passbyval=true
26028 fi
26029
26030
26031 { $as_echo "$as_me:$LINENO: result: $enable_float4_byval" >&5
26032 $as_echo "$enable_float4_byval" >&6; }
26033
26034 cat >>confdefs.h <<_ACEOF
26035 #define FLOAT4PASSBYVAL $float4passbyval
26036 _ACEOF
26037
26038
26039 # Decide whether float8 is passed by value.
26040 # Note: this setting also controls int8 and related types such as timestamp.
26041 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
26042 # If not, trying to select it is an error.
26043 { $as_echo "$as_me:$LINENO: checking whether to build with float8 passed by value" >&5
26044 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
26045 if test $ac_cv_sizeof_void_p -ge 8 ; then
26046
26047
26048 # Check whether --enable-float8-byval was given.
26049 if test "${enable_float8_byval+set}" = set; then
26050   enableval=$enable_float8_byval;
26051   case $enableval in
26052     yes)
26053       :
26054       ;;
26055     no)
26056       :
26057       ;;
26058     *)
26059       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-float8-byval option" >&5
26060 $as_echo "$as_me: error: no argument expected for --enable-float8-byval option" >&2;}
26061    { (exit 1); exit 1; }; }
26062       ;;
26063   esac
26064
26065 else
26066   enable_float8_byval=yes
26067
26068 fi
26069
26070
26071 else
26072
26073
26074 # Check whether --enable-float8-byval was given.
26075 if test "${enable_float8_byval+set}" = set; then
26076   enableval=$enable_float8_byval;
26077   case $enableval in
26078     yes)
26079       :
26080       ;;
26081     no)
26082       :
26083       ;;
26084     *)
26085       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-float8-byval option" >&5
26086 $as_echo "$as_me: error: no argument expected for --enable-float8-byval option" >&2;}
26087    { (exit 1); exit 1; }; }
26088       ;;
26089   esac
26090
26091 else
26092   enable_float8_byval=no
26093
26094 fi
26095
26096
26097   if test "$enable_float8_byval" = yes ; then
26098     { { $as_echo "$as_me:$LINENO: error: --enable-float8-byval is not supported on 32-bit platforms." >&5
26099 $as_echo "$as_me: error: --enable-float8-byval is not supported on 32-bit platforms." >&2;}
26100    { (exit 1); exit 1; }; }
26101   fi
26102 fi
26103 if test "$enable_float8_byval" = yes ; then
26104
26105 cat >>confdefs.h <<\_ACEOF
26106 #define USE_FLOAT8_BYVAL 1
26107 _ACEOF
26108
26109   float8passbyval=true
26110 else
26111   float8passbyval=false
26112 fi
26113 { $as_echo "$as_me:$LINENO: result: $enable_float8_byval" >&5
26114 $as_echo "$enable_float8_byval" >&6; }
26115
26116 cat >>confdefs.h <<_ACEOF
26117 #define FLOAT8PASSBYVAL $float8passbyval
26118 _ACEOF
26119
26120
26121 # Determine memory alignment requirements for the basic C data types.
26122
26123 # The cast to long int works around a bug in the HP C Compiler,
26124 # see AC_CHECK_SIZEOF for more information.
26125 { $as_echo "$as_me:$LINENO: checking alignment of short" >&5
26126 $as_echo_n "checking alignment of short... " >&6; }
26127 if test "${ac_cv_alignof_short+set}" = set; then
26128   $as_echo_n "(cached) " >&6
26129 else
26130   if test "$cross_compiling" = yes; then
26131   # Depending upon the size, compute the lo and hi bounds.
26132 cat >conftest.$ac_ext <<_ACEOF
26133 /* confdefs.h.  */
26134 _ACEOF
26135 cat confdefs.h >>conftest.$ac_ext
26136 cat >>conftest.$ac_ext <<_ACEOF
26137 /* end confdefs.h.  */
26138 $ac_includes_default
26139 #ifndef offsetof
26140 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26141 #endif
26142 typedef struct { char x; short y; } ac__type_alignof_;
26143 int
26144 main ()
26145 {
26146 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
26147 test_array [0] = 0
26148
26149   ;
26150   return 0;
26151 }
26152 _ACEOF
26153 rm -f conftest.$ac_objext
26154 if { (ac_try="$ac_compile"
26155 case "(($ac_try" in
26156   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26157   *) ac_try_echo=$ac_try;;
26158 esac
26159 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26160 $as_echo "$ac_try_echo") >&5
26161   (eval "$ac_compile") 2>conftest.er1
26162   ac_status=$?
26163   grep -v '^ *+' conftest.er1 >conftest.err
26164   rm -f conftest.er1
26165   cat conftest.err >&5
26166   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26167   (exit $ac_status); } && {
26168          test -z "$ac_c_werror_flag" ||
26169          test ! -s conftest.err
26170        } && test -s conftest.$ac_objext; then
26171   ac_lo=0 ac_mid=0
26172   while :; do
26173     cat >conftest.$ac_ext <<_ACEOF
26174 /* confdefs.h.  */
26175 _ACEOF
26176 cat confdefs.h >>conftest.$ac_ext
26177 cat >>conftest.$ac_ext <<_ACEOF
26178 /* end confdefs.h.  */
26179 $ac_includes_default
26180 #ifndef offsetof
26181 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26182 #endif
26183 typedef struct { char x; short y; } ac__type_alignof_;
26184 int
26185 main ()
26186 {
26187 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
26188 test_array [0] = 0
26189
26190   ;
26191   return 0;
26192 }
26193 _ACEOF
26194 rm -f conftest.$ac_objext
26195 if { (ac_try="$ac_compile"
26196 case "(($ac_try" in
26197   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26198   *) ac_try_echo=$ac_try;;
26199 esac
26200 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26201 $as_echo "$ac_try_echo") >&5
26202   (eval "$ac_compile") 2>conftest.er1
26203   ac_status=$?
26204   grep -v '^ *+' conftest.er1 >conftest.err
26205   rm -f conftest.er1
26206   cat conftest.err >&5
26207   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26208   (exit $ac_status); } && {
26209          test -z "$ac_c_werror_flag" ||
26210          test ! -s conftest.err
26211        } && test -s conftest.$ac_objext; then
26212   ac_hi=$ac_mid; break
26213 else
26214   $as_echo "$as_me: failed program was:" >&5
26215 sed 's/^/| /' conftest.$ac_ext >&5
26216
26217         ac_lo=`expr $ac_mid + 1`
26218                         if test $ac_lo -le $ac_mid; then
26219                           ac_lo= ac_hi=
26220                           break
26221                         fi
26222                         ac_mid=`expr 2 '*' $ac_mid + 1`
26223 fi
26224
26225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26226   done
26227 else
26228   $as_echo "$as_me: failed program was:" >&5
26229 sed 's/^/| /' conftest.$ac_ext >&5
26230
26231         cat >conftest.$ac_ext <<_ACEOF
26232 /* confdefs.h.  */
26233 _ACEOF
26234 cat confdefs.h >>conftest.$ac_ext
26235 cat >>conftest.$ac_ext <<_ACEOF
26236 /* end confdefs.h.  */
26237 $ac_includes_default
26238 #ifndef offsetof
26239 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26240 #endif
26241 typedef struct { char x; short y; } ac__type_alignof_;
26242 int
26243 main ()
26244 {
26245 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
26246 test_array [0] = 0
26247
26248   ;
26249   return 0;
26250 }
26251 _ACEOF
26252 rm -f conftest.$ac_objext
26253 if { (ac_try="$ac_compile"
26254 case "(($ac_try" in
26255   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26256   *) ac_try_echo=$ac_try;;
26257 esac
26258 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26259 $as_echo "$ac_try_echo") >&5
26260   (eval "$ac_compile") 2>conftest.er1
26261   ac_status=$?
26262   grep -v '^ *+' conftest.er1 >conftest.err
26263   rm -f conftest.er1
26264   cat conftest.err >&5
26265   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26266   (exit $ac_status); } && {
26267          test -z "$ac_c_werror_flag" ||
26268          test ! -s conftest.err
26269        } && test -s conftest.$ac_objext; then
26270   ac_hi=-1 ac_mid=-1
26271   while :; do
26272     cat >conftest.$ac_ext <<_ACEOF
26273 /* confdefs.h.  */
26274 _ACEOF
26275 cat confdefs.h >>conftest.$ac_ext
26276 cat >>conftest.$ac_ext <<_ACEOF
26277 /* end confdefs.h.  */
26278 $ac_includes_default
26279 #ifndef offsetof
26280 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26281 #endif
26282 typedef struct { char x; short y; } ac__type_alignof_;
26283 int
26284 main ()
26285 {
26286 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
26287 test_array [0] = 0
26288
26289   ;
26290   return 0;
26291 }
26292 _ACEOF
26293 rm -f conftest.$ac_objext
26294 if { (ac_try="$ac_compile"
26295 case "(($ac_try" in
26296   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26297   *) ac_try_echo=$ac_try;;
26298 esac
26299 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26300 $as_echo "$ac_try_echo") >&5
26301   (eval "$ac_compile") 2>conftest.er1
26302   ac_status=$?
26303   grep -v '^ *+' conftest.er1 >conftest.err
26304   rm -f conftest.er1
26305   cat conftest.err >&5
26306   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26307   (exit $ac_status); } && {
26308          test -z "$ac_c_werror_flag" ||
26309          test ! -s conftest.err
26310        } && test -s conftest.$ac_objext; then
26311   ac_lo=$ac_mid; break
26312 else
26313   $as_echo "$as_me: failed program was:" >&5
26314 sed 's/^/| /' conftest.$ac_ext >&5
26315
26316         ac_hi=`expr '(' $ac_mid ')' - 1`
26317                         if test $ac_mid -le $ac_hi; then
26318                           ac_lo= ac_hi=
26319                           break
26320                         fi
26321                         ac_mid=`expr 2 '*' $ac_mid`
26322 fi
26323
26324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26325   done
26326 else
26327   $as_echo "$as_me: failed program was:" >&5
26328 sed 's/^/| /' conftest.$ac_ext >&5
26329
26330         ac_lo= ac_hi=
26331 fi
26332
26333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26334 fi
26335
26336 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26337 # Binary search between lo and hi bounds.
26338 while test "x$ac_lo" != "x$ac_hi"; do
26339   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
26340   cat >conftest.$ac_ext <<_ACEOF
26341 /* confdefs.h.  */
26342 _ACEOF
26343 cat confdefs.h >>conftest.$ac_ext
26344 cat >>conftest.$ac_ext <<_ACEOF
26345 /* end confdefs.h.  */
26346 $ac_includes_default
26347 #ifndef offsetof
26348 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26349 #endif
26350 typedef struct { char x; short y; } ac__type_alignof_;
26351 int
26352 main ()
26353 {
26354 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
26355 test_array [0] = 0
26356
26357   ;
26358   return 0;
26359 }
26360 _ACEOF
26361 rm -f conftest.$ac_objext
26362 if { (ac_try="$ac_compile"
26363 case "(($ac_try" in
26364   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26365   *) ac_try_echo=$ac_try;;
26366 esac
26367 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26368 $as_echo "$ac_try_echo") >&5
26369   (eval "$ac_compile") 2>conftest.er1
26370   ac_status=$?
26371   grep -v '^ *+' conftest.er1 >conftest.err
26372   rm -f conftest.er1
26373   cat conftest.err >&5
26374   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26375   (exit $ac_status); } && {
26376          test -z "$ac_c_werror_flag" ||
26377          test ! -s conftest.err
26378        } && test -s conftest.$ac_objext; then
26379   ac_hi=$ac_mid
26380 else
26381   $as_echo "$as_me: failed program was:" >&5
26382 sed 's/^/| /' conftest.$ac_ext >&5
26383
26384         ac_lo=`expr '(' $ac_mid ')' + 1`
26385 fi
26386
26387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26388 done
26389 case $ac_lo in
26390 ?*) ac_cv_alignof_short=$ac_lo;;
26391 '') if test "$ac_cv_type_short" = yes; then
26392      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
26393 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26394 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of short
26395 See \`config.log' for more details." >&5
26396 $as_echo "$as_me: error: cannot compute alignment of short
26397 See \`config.log' for more details." >&2;}
26398    { (exit 77); exit 77; }; }; }
26399    else
26400      ac_cv_alignof_short=0
26401    fi ;;
26402 esac
26403 else
26404   cat >conftest.$ac_ext <<_ACEOF
26405 /* confdefs.h.  */
26406 _ACEOF
26407 cat confdefs.h >>conftest.$ac_ext
26408 cat >>conftest.$ac_ext <<_ACEOF
26409 /* end confdefs.h.  */
26410 $ac_includes_default
26411 #ifndef offsetof
26412 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26413 #endif
26414 typedef struct { char x; short y; } ac__type_alignof_;
26415 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
26416 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
26417 #include <stdio.h>
26418 #include <stdlib.h>
26419 int
26420 main ()
26421 {
26422
26423   FILE *f = fopen ("conftest.val", "w");
26424   if (! f)
26425     return 1;
26426   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
26427     {
26428       long int i = longval ();
26429       if (i != ((long int) offsetof (ac__type_alignof_, y)))
26430         return 1;
26431       fprintf (f, "%ld", i);
26432     }
26433   else
26434     {
26435       unsigned long int i = ulongval ();
26436       if (i != ((long int) offsetof (ac__type_alignof_, y)))
26437         return 1;
26438       fprintf (f, "%lu", i);
26439     }
26440   /* Do not output a trailing newline, as this causes \r\n confusion
26441      on some platforms.  */
26442   return ferror (f) || fclose (f) != 0;
26443
26444   ;
26445   return 0;
26446 }
26447 _ACEOF
26448 rm -f conftest$ac_exeext
26449 if { (ac_try="$ac_link"
26450 case "(($ac_try" in
26451   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26452   *) ac_try_echo=$ac_try;;
26453 esac
26454 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26455 $as_echo "$ac_try_echo") >&5
26456   (eval "$ac_link") 2>&5
26457   ac_status=$?
26458   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26459   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26460   { (case "(($ac_try" in
26461   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26462   *) ac_try_echo=$ac_try;;
26463 esac
26464 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26465 $as_echo "$ac_try_echo") >&5
26466   (eval "$ac_try") 2>&5
26467   ac_status=$?
26468   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26469   (exit $ac_status); }; }; then
26470   ac_cv_alignof_short=`cat conftest.val`
26471 else
26472   $as_echo "$as_me: program exited with status $ac_status" >&5
26473 $as_echo "$as_me: failed program was:" >&5
26474 sed 's/^/| /' conftest.$ac_ext >&5
26475
26476 ( exit $ac_status )
26477 if test "$ac_cv_type_short" = yes; then
26478      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
26479 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26480 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of short
26481 See \`config.log' for more details." >&5
26482 $as_echo "$as_me: error: cannot compute alignment of short
26483 See \`config.log' for more details." >&2;}
26484    { (exit 77); exit 77; }; }; }
26485    else
26486      ac_cv_alignof_short=0
26487    fi
26488 fi
26489 rm -rf conftest.dSYM
26490 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26491 fi
26492 rm -f conftest.val
26493 fi
26494 { $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_short" >&5
26495 $as_echo "$ac_cv_alignof_short" >&6; }
26496
26497
26498
26499 cat >>confdefs.h <<_ACEOF
26500 #define ALIGNOF_SHORT $ac_cv_alignof_short
26501 _ACEOF
26502
26503
26504 # The cast to long int works around a bug in the HP C Compiler,
26505 # see AC_CHECK_SIZEOF for more information.
26506 { $as_echo "$as_me:$LINENO: checking alignment of int" >&5
26507 $as_echo_n "checking alignment of int... " >&6; }
26508 if test "${ac_cv_alignof_int+set}" = set; then
26509   $as_echo_n "(cached) " >&6
26510 else
26511   if test "$cross_compiling" = yes; then
26512   # Depending upon the size, compute the lo and hi bounds.
26513 cat >conftest.$ac_ext <<_ACEOF
26514 /* confdefs.h.  */
26515 _ACEOF
26516 cat confdefs.h >>conftest.$ac_ext
26517 cat >>conftest.$ac_ext <<_ACEOF
26518 /* end confdefs.h.  */
26519 $ac_includes_default
26520 #ifndef offsetof
26521 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26522 #endif
26523 typedef struct { char x; int y; } ac__type_alignof_;
26524 int
26525 main ()
26526 {
26527 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
26528 test_array [0] = 0
26529
26530   ;
26531   return 0;
26532 }
26533 _ACEOF
26534 rm -f conftest.$ac_objext
26535 if { (ac_try="$ac_compile"
26536 case "(($ac_try" in
26537   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26538   *) ac_try_echo=$ac_try;;
26539 esac
26540 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26541 $as_echo "$ac_try_echo") >&5
26542   (eval "$ac_compile") 2>conftest.er1
26543   ac_status=$?
26544   grep -v '^ *+' conftest.er1 >conftest.err
26545   rm -f conftest.er1
26546   cat conftest.err >&5
26547   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26548   (exit $ac_status); } && {
26549          test -z "$ac_c_werror_flag" ||
26550          test ! -s conftest.err
26551        } && test -s conftest.$ac_objext; then
26552   ac_lo=0 ac_mid=0
26553   while :; do
26554     cat >conftest.$ac_ext <<_ACEOF
26555 /* confdefs.h.  */
26556 _ACEOF
26557 cat confdefs.h >>conftest.$ac_ext
26558 cat >>conftest.$ac_ext <<_ACEOF
26559 /* end confdefs.h.  */
26560 $ac_includes_default
26561 #ifndef offsetof
26562 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26563 #endif
26564 typedef struct { char x; int y; } ac__type_alignof_;
26565 int
26566 main ()
26567 {
26568 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
26569 test_array [0] = 0
26570
26571   ;
26572   return 0;
26573 }
26574 _ACEOF
26575 rm -f conftest.$ac_objext
26576 if { (ac_try="$ac_compile"
26577 case "(($ac_try" in
26578   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26579   *) ac_try_echo=$ac_try;;
26580 esac
26581 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26582 $as_echo "$ac_try_echo") >&5
26583   (eval "$ac_compile") 2>conftest.er1
26584   ac_status=$?
26585   grep -v '^ *+' conftest.er1 >conftest.err
26586   rm -f conftest.er1
26587   cat conftest.err >&5
26588   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26589   (exit $ac_status); } && {
26590          test -z "$ac_c_werror_flag" ||
26591          test ! -s conftest.err
26592        } && test -s conftest.$ac_objext; then
26593   ac_hi=$ac_mid; break
26594 else
26595   $as_echo "$as_me: failed program was:" >&5
26596 sed 's/^/| /' conftest.$ac_ext >&5
26597
26598         ac_lo=`expr $ac_mid + 1`
26599                         if test $ac_lo -le $ac_mid; then
26600                           ac_lo= ac_hi=
26601                           break
26602                         fi
26603                         ac_mid=`expr 2 '*' $ac_mid + 1`
26604 fi
26605
26606 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26607   done
26608 else
26609   $as_echo "$as_me: failed program was:" >&5
26610 sed 's/^/| /' conftest.$ac_ext >&5
26611
26612         cat >conftest.$ac_ext <<_ACEOF
26613 /* confdefs.h.  */
26614 _ACEOF
26615 cat confdefs.h >>conftest.$ac_ext
26616 cat >>conftest.$ac_ext <<_ACEOF
26617 /* end confdefs.h.  */
26618 $ac_includes_default
26619 #ifndef offsetof
26620 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26621 #endif
26622 typedef struct { char x; int y; } ac__type_alignof_;
26623 int
26624 main ()
26625 {
26626 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
26627 test_array [0] = 0
26628
26629   ;
26630   return 0;
26631 }
26632 _ACEOF
26633 rm -f conftest.$ac_objext
26634 if { (ac_try="$ac_compile"
26635 case "(($ac_try" in
26636   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26637   *) ac_try_echo=$ac_try;;
26638 esac
26639 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26640 $as_echo "$ac_try_echo") >&5
26641   (eval "$ac_compile") 2>conftest.er1
26642   ac_status=$?
26643   grep -v '^ *+' conftest.er1 >conftest.err
26644   rm -f conftest.er1
26645   cat conftest.err >&5
26646   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26647   (exit $ac_status); } && {
26648          test -z "$ac_c_werror_flag" ||
26649          test ! -s conftest.err
26650        } && test -s conftest.$ac_objext; then
26651   ac_hi=-1 ac_mid=-1
26652   while :; do
26653     cat >conftest.$ac_ext <<_ACEOF
26654 /* confdefs.h.  */
26655 _ACEOF
26656 cat confdefs.h >>conftest.$ac_ext
26657 cat >>conftest.$ac_ext <<_ACEOF
26658 /* end confdefs.h.  */
26659 $ac_includes_default
26660 #ifndef offsetof
26661 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26662 #endif
26663 typedef struct { char x; int y; } ac__type_alignof_;
26664 int
26665 main ()
26666 {
26667 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
26668 test_array [0] = 0
26669
26670   ;
26671   return 0;
26672 }
26673 _ACEOF
26674 rm -f conftest.$ac_objext
26675 if { (ac_try="$ac_compile"
26676 case "(($ac_try" in
26677   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26678   *) ac_try_echo=$ac_try;;
26679 esac
26680 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26681 $as_echo "$ac_try_echo") >&5
26682   (eval "$ac_compile") 2>conftest.er1
26683   ac_status=$?
26684   grep -v '^ *+' conftest.er1 >conftest.err
26685   rm -f conftest.er1
26686   cat conftest.err >&5
26687   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26688   (exit $ac_status); } && {
26689          test -z "$ac_c_werror_flag" ||
26690          test ! -s conftest.err
26691        } && test -s conftest.$ac_objext; then
26692   ac_lo=$ac_mid; break
26693 else
26694   $as_echo "$as_me: failed program was:" >&5
26695 sed 's/^/| /' conftest.$ac_ext >&5
26696
26697         ac_hi=`expr '(' $ac_mid ')' - 1`
26698                         if test $ac_mid -le $ac_hi; then
26699                           ac_lo= ac_hi=
26700                           break
26701                         fi
26702                         ac_mid=`expr 2 '*' $ac_mid`
26703 fi
26704
26705 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26706   done
26707 else
26708   $as_echo "$as_me: failed program was:" >&5
26709 sed 's/^/| /' conftest.$ac_ext >&5
26710
26711         ac_lo= ac_hi=
26712 fi
26713
26714 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26715 fi
26716
26717 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26718 # Binary search between lo and hi bounds.
26719 while test "x$ac_lo" != "x$ac_hi"; do
26720   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
26721   cat >conftest.$ac_ext <<_ACEOF
26722 /* confdefs.h.  */
26723 _ACEOF
26724 cat confdefs.h >>conftest.$ac_ext
26725 cat >>conftest.$ac_ext <<_ACEOF
26726 /* end confdefs.h.  */
26727 $ac_includes_default
26728 #ifndef offsetof
26729 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26730 #endif
26731 typedef struct { char x; int y; } ac__type_alignof_;
26732 int
26733 main ()
26734 {
26735 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
26736 test_array [0] = 0
26737
26738   ;
26739   return 0;
26740 }
26741 _ACEOF
26742 rm -f conftest.$ac_objext
26743 if { (ac_try="$ac_compile"
26744 case "(($ac_try" in
26745   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26746   *) ac_try_echo=$ac_try;;
26747 esac
26748 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26749 $as_echo "$ac_try_echo") >&5
26750   (eval "$ac_compile") 2>conftest.er1
26751   ac_status=$?
26752   grep -v '^ *+' conftest.er1 >conftest.err
26753   rm -f conftest.er1
26754   cat conftest.err >&5
26755   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26756   (exit $ac_status); } && {
26757          test -z "$ac_c_werror_flag" ||
26758          test ! -s conftest.err
26759        } && test -s conftest.$ac_objext; then
26760   ac_hi=$ac_mid
26761 else
26762   $as_echo "$as_me: failed program was:" >&5
26763 sed 's/^/| /' conftest.$ac_ext >&5
26764
26765         ac_lo=`expr '(' $ac_mid ')' + 1`
26766 fi
26767
26768 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26769 done
26770 case $ac_lo in
26771 ?*) ac_cv_alignof_int=$ac_lo;;
26772 '') if test "$ac_cv_type_int" = yes; then
26773      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
26774 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26775 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of int
26776 See \`config.log' for more details." >&5
26777 $as_echo "$as_me: error: cannot compute alignment of int
26778 See \`config.log' for more details." >&2;}
26779    { (exit 77); exit 77; }; }; }
26780    else
26781      ac_cv_alignof_int=0
26782    fi ;;
26783 esac
26784 else
26785   cat >conftest.$ac_ext <<_ACEOF
26786 /* confdefs.h.  */
26787 _ACEOF
26788 cat confdefs.h >>conftest.$ac_ext
26789 cat >>conftest.$ac_ext <<_ACEOF
26790 /* end confdefs.h.  */
26791 $ac_includes_default
26792 #ifndef offsetof
26793 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26794 #endif
26795 typedef struct { char x; int y; } ac__type_alignof_;
26796 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
26797 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
26798 #include <stdio.h>
26799 #include <stdlib.h>
26800 int
26801 main ()
26802 {
26803
26804   FILE *f = fopen ("conftest.val", "w");
26805   if (! f)
26806     return 1;
26807   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
26808     {
26809       long int i = longval ();
26810       if (i != ((long int) offsetof (ac__type_alignof_, y)))
26811         return 1;
26812       fprintf (f, "%ld", i);
26813     }
26814   else
26815     {
26816       unsigned long int i = ulongval ();
26817       if (i != ((long int) offsetof (ac__type_alignof_, y)))
26818         return 1;
26819       fprintf (f, "%lu", i);
26820     }
26821   /* Do not output a trailing newline, as this causes \r\n confusion
26822      on some platforms.  */
26823   return ferror (f) || fclose (f) != 0;
26824
26825   ;
26826   return 0;
26827 }
26828 _ACEOF
26829 rm -f conftest$ac_exeext
26830 if { (ac_try="$ac_link"
26831 case "(($ac_try" in
26832   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26833   *) ac_try_echo=$ac_try;;
26834 esac
26835 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26836 $as_echo "$ac_try_echo") >&5
26837   (eval "$ac_link") 2>&5
26838   ac_status=$?
26839   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26840   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26841   { (case "(($ac_try" in
26842   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26843   *) ac_try_echo=$ac_try;;
26844 esac
26845 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26846 $as_echo "$ac_try_echo") >&5
26847   (eval "$ac_try") 2>&5
26848   ac_status=$?
26849   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26850   (exit $ac_status); }; }; then
26851   ac_cv_alignof_int=`cat conftest.val`
26852 else
26853   $as_echo "$as_me: program exited with status $ac_status" >&5
26854 $as_echo "$as_me: failed program was:" >&5
26855 sed 's/^/| /' conftest.$ac_ext >&5
26856
26857 ( exit $ac_status )
26858 if test "$ac_cv_type_int" = yes; then
26859      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
26860 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26861 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of int
26862 See \`config.log' for more details." >&5
26863 $as_echo "$as_me: error: cannot compute alignment of int
26864 See \`config.log' for more details." >&2;}
26865    { (exit 77); exit 77; }; }; }
26866    else
26867      ac_cv_alignof_int=0
26868    fi
26869 fi
26870 rm -rf conftest.dSYM
26871 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26872 fi
26873 rm -f conftest.val
26874 fi
26875 { $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_int" >&5
26876 $as_echo "$ac_cv_alignof_int" >&6; }
26877
26878
26879
26880 cat >>confdefs.h <<_ACEOF
26881 #define ALIGNOF_INT $ac_cv_alignof_int
26882 _ACEOF
26883
26884
26885 # The cast to long int works around a bug in the HP C Compiler,
26886 # see AC_CHECK_SIZEOF for more information.
26887 { $as_echo "$as_me:$LINENO: checking alignment of long" >&5
26888 $as_echo_n "checking alignment of long... " >&6; }
26889 if test "${ac_cv_alignof_long+set}" = set; then
26890   $as_echo_n "(cached) " >&6
26891 else
26892   if test "$cross_compiling" = yes; then
26893   # Depending upon the size, compute the lo and hi bounds.
26894 cat >conftest.$ac_ext <<_ACEOF
26895 /* confdefs.h.  */
26896 _ACEOF
26897 cat confdefs.h >>conftest.$ac_ext
26898 cat >>conftest.$ac_ext <<_ACEOF
26899 /* end confdefs.h.  */
26900 $ac_includes_default
26901 #ifndef offsetof
26902 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26903 #endif
26904 typedef struct { char x; long y; } ac__type_alignof_;
26905 int
26906 main ()
26907 {
26908 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
26909 test_array [0] = 0
26910
26911   ;
26912   return 0;
26913 }
26914 _ACEOF
26915 rm -f conftest.$ac_objext
26916 if { (ac_try="$ac_compile"
26917 case "(($ac_try" in
26918   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26919   *) ac_try_echo=$ac_try;;
26920 esac
26921 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26922 $as_echo "$ac_try_echo") >&5
26923   (eval "$ac_compile") 2>conftest.er1
26924   ac_status=$?
26925   grep -v '^ *+' conftest.er1 >conftest.err
26926   rm -f conftest.er1
26927   cat conftest.err >&5
26928   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26929   (exit $ac_status); } && {
26930          test -z "$ac_c_werror_flag" ||
26931          test ! -s conftest.err
26932        } && test -s conftest.$ac_objext; then
26933   ac_lo=0 ac_mid=0
26934   while :; do
26935     cat >conftest.$ac_ext <<_ACEOF
26936 /* confdefs.h.  */
26937 _ACEOF
26938 cat confdefs.h >>conftest.$ac_ext
26939 cat >>conftest.$ac_ext <<_ACEOF
26940 /* end confdefs.h.  */
26941 $ac_includes_default
26942 #ifndef offsetof
26943 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26944 #endif
26945 typedef struct { char x; long y; } ac__type_alignof_;
26946 int
26947 main ()
26948 {
26949 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
26950 test_array [0] = 0
26951
26952   ;
26953   return 0;
26954 }
26955 _ACEOF
26956 rm -f conftest.$ac_objext
26957 if { (ac_try="$ac_compile"
26958 case "(($ac_try" in
26959   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26960   *) ac_try_echo=$ac_try;;
26961 esac
26962 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26963 $as_echo "$ac_try_echo") >&5
26964   (eval "$ac_compile") 2>conftest.er1
26965   ac_status=$?
26966   grep -v '^ *+' conftest.er1 >conftest.err
26967   rm -f conftest.er1
26968   cat conftest.err >&5
26969   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26970   (exit $ac_status); } && {
26971          test -z "$ac_c_werror_flag" ||
26972          test ! -s conftest.err
26973        } && test -s conftest.$ac_objext; then
26974   ac_hi=$ac_mid; break
26975 else
26976   $as_echo "$as_me: failed program was:" >&5
26977 sed 's/^/| /' conftest.$ac_ext >&5
26978
26979         ac_lo=`expr $ac_mid + 1`
26980                         if test $ac_lo -le $ac_mid; then
26981                           ac_lo= ac_hi=
26982                           break
26983                         fi
26984                         ac_mid=`expr 2 '*' $ac_mid + 1`
26985 fi
26986
26987 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26988   done
26989 else
26990   $as_echo "$as_me: failed program was:" >&5
26991 sed 's/^/| /' conftest.$ac_ext >&5
26992
26993         cat >conftest.$ac_ext <<_ACEOF
26994 /* confdefs.h.  */
26995 _ACEOF
26996 cat confdefs.h >>conftest.$ac_ext
26997 cat >>conftest.$ac_ext <<_ACEOF
26998 /* end confdefs.h.  */
26999 $ac_includes_default
27000 #ifndef offsetof
27001 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27002 #endif
27003 typedef struct { char x; long y; } ac__type_alignof_;
27004 int
27005 main ()
27006 {
27007 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
27008 test_array [0] = 0
27009
27010   ;
27011   return 0;
27012 }
27013 _ACEOF
27014 rm -f conftest.$ac_objext
27015 if { (ac_try="$ac_compile"
27016 case "(($ac_try" in
27017   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27018   *) ac_try_echo=$ac_try;;
27019 esac
27020 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27021 $as_echo "$ac_try_echo") >&5
27022   (eval "$ac_compile") 2>conftest.er1
27023   ac_status=$?
27024   grep -v '^ *+' conftest.er1 >conftest.err
27025   rm -f conftest.er1
27026   cat conftest.err >&5
27027   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27028   (exit $ac_status); } && {
27029          test -z "$ac_c_werror_flag" ||
27030          test ! -s conftest.err
27031        } && test -s conftest.$ac_objext; then
27032   ac_hi=-1 ac_mid=-1
27033   while :; do
27034     cat >conftest.$ac_ext <<_ACEOF
27035 /* confdefs.h.  */
27036 _ACEOF
27037 cat confdefs.h >>conftest.$ac_ext
27038 cat >>conftest.$ac_ext <<_ACEOF
27039 /* end confdefs.h.  */
27040 $ac_includes_default
27041 #ifndef offsetof
27042 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27043 #endif
27044 typedef struct { char x; long y; } ac__type_alignof_;
27045 int
27046 main ()
27047 {
27048 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
27049 test_array [0] = 0
27050
27051   ;
27052   return 0;
27053 }
27054 _ACEOF
27055 rm -f conftest.$ac_objext
27056 if { (ac_try="$ac_compile"
27057 case "(($ac_try" in
27058   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27059   *) ac_try_echo=$ac_try;;
27060 esac
27061 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27062 $as_echo "$ac_try_echo") >&5
27063   (eval "$ac_compile") 2>conftest.er1
27064   ac_status=$?
27065   grep -v '^ *+' conftest.er1 >conftest.err
27066   rm -f conftest.er1
27067   cat conftest.err >&5
27068   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27069   (exit $ac_status); } && {
27070          test -z "$ac_c_werror_flag" ||
27071          test ! -s conftest.err
27072        } && test -s conftest.$ac_objext; then
27073   ac_lo=$ac_mid; break
27074 else
27075   $as_echo "$as_me: failed program was:" >&5
27076 sed 's/^/| /' conftest.$ac_ext >&5
27077
27078         ac_hi=`expr '(' $ac_mid ')' - 1`
27079                         if test $ac_mid -le $ac_hi; then
27080                           ac_lo= ac_hi=
27081                           break
27082                         fi
27083                         ac_mid=`expr 2 '*' $ac_mid`
27084 fi
27085
27086 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27087   done
27088 else
27089   $as_echo "$as_me: failed program was:" >&5
27090 sed 's/^/| /' conftest.$ac_ext >&5
27091
27092         ac_lo= ac_hi=
27093 fi
27094
27095 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27096 fi
27097
27098 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27099 # Binary search between lo and hi bounds.
27100 while test "x$ac_lo" != "x$ac_hi"; do
27101   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
27102   cat >conftest.$ac_ext <<_ACEOF
27103 /* confdefs.h.  */
27104 _ACEOF
27105 cat confdefs.h >>conftest.$ac_ext
27106 cat >>conftest.$ac_ext <<_ACEOF
27107 /* end confdefs.h.  */
27108 $ac_includes_default
27109 #ifndef offsetof
27110 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27111 #endif
27112 typedef struct { char x; long y; } ac__type_alignof_;
27113 int
27114 main ()
27115 {
27116 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
27117 test_array [0] = 0
27118
27119   ;
27120   return 0;
27121 }
27122 _ACEOF
27123 rm -f conftest.$ac_objext
27124 if { (ac_try="$ac_compile"
27125 case "(($ac_try" in
27126   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27127   *) ac_try_echo=$ac_try;;
27128 esac
27129 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27130 $as_echo "$ac_try_echo") >&5
27131   (eval "$ac_compile") 2>conftest.er1
27132   ac_status=$?
27133   grep -v '^ *+' conftest.er1 >conftest.err
27134   rm -f conftest.er1
27135   cat conftest.err >&5
27136   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27137   (exit $ac_status); } && {
27138          test -z "$ac_c_werror_flag" ||
27139          test ! -s conftest.err
27140        } && test -s conftest.$ac_objext; then
27141   ac_hi=$ac_mid
27142 else
27143   $as_echo "$as_me: failed program was:" >&5
27144 sed 's/^/| /' conftest.$ac_ext >&5
27145
27146         ac_lo=`expr '(' $ac_mid ')' + 1`
27147 fi
27148
27149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27150 done
27151 case $ac_lo in
27152 ?*) ac_cv_alignof_long=$ac_lo;;
27153 '') if test "$ac_cv_type_long" = yes; then
27154      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
27155 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27156 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long
27157 See \`config.log' for more details." >&5
27158 $as_echo "$as_me: error: cannot compute alignment of long
27159 See \`config.log' for more details." >&2;}
27160    { (exit 77); exit 77; }; }; }
27161    else
27162      ac_cv_alignof_long=0
27163    fi ;;
27164 esac
27165 else
27166   cat >conftest.$ac_ext <<_ACEOF
27167 /* confdefs.h.  */
27168 _ACEOF
27169 cat confdefs.h >>conftest.$ac_ext
27170 cat >>conftest.$ac_ext <<_ACEOF
27171 /* end confdefs.h.  */
27172 $ac_includes_default
27173 #ifndef offsetof
27174 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27175 #endif
27176 typedef struct { char x; long y; } ac__type_alignof_;
27177 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
27178 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
27179 #include <stdio.h>
27180 #include <stdlib.h>
27181 int
27182 main ()
27183 {
27184
27185   FILE *f = fopen ("conftest.val", "w");
27186   if (! f)
27187     return 1;
27188   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
27189     {
27190       long int i = longval ();
27191       if (i != ((long int) offsetof (ac__type_alignof_, y)))
27192         return 1;
27193       fprintf (f, "%ld", i);
27194     }
27195   else
27196     {
27197       unsigned long int i = ulongval ();
27198       if (i != ((long int) offsetof (ac__type_alignof_, y)))
27199         return 1;
27200       fprintf (f, "%lu", i);
27201     }
27202   /* Do not output a trailing newline, as this causes \r\n confusion
27203      on some platforms.  */
27204   return ferror (f) || fclose (f) != 0;
27205
27206   ;
27207   return 0;
27208 }
27209 _ACEOF
27210 rm -f conftest$ac_exeext
27211 if { (ac_try="$ac_link"
27212 case "(($ac_try" in
27213   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27214   *) ac_try_echo=$ac_try;;
27215 esac
27216 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27217 $as_echo "$ac_try_echo") >&5
27218   (eval "$ac_link") 2>&5
27219   ac_status=$?
27220   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27221   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27222   { (case "(($ac_try" in
27223   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27224   *) ac_try_echo=$ac_try;;
27225 esac
27226 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27227 $as_echo "$ac_try_echo") >&5
27228   (eval "$ac_try") 2>&5
27229   ac_status=$?
27230   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27231   (exit $ac_status); }; }; then
27232   ac_cv_alignof_long=`cat conftest.val`
27233 else
27234   $as_echo "$as_me: program exited with status $ac_status" >&5
27235 $as_echo "$as_me: failed program was:" >&5
27236 sed 's/^/| /' conftest.$ac_ext >&5
27237
27238 ( exit $ac_status )
27239 if test "$ac_cv_type_long" = yes; then
27240      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
27241 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27242 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long
27243 See \`config.log' for more details." >&5
27244 $as_echo "$as_me: error: cannot compute alignment of long
27245 See \`config.log' for more details." >&2;}
27246    { (exit 77); exit 77; }; }; }
27247    else
27248      ac_cv_alignof_long=0
27249    fi
27250 fi
27251 rm -rf conftest.dSYM
27252 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27253 fi
27254 rm -f conftest.val
27255 fi
27256 { $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_long" >&5
27257 $as_echo "$ac_cv_alignof_long" >&6; }
27258
27259
27260
27261 cat >>confdefs.h <<_ACEOF
27262 #define ALIGNOF_LONG $ac_cv_alignof_long
27263 _ACEOF
27264
27265
27266 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
27267   # The cast to long int works around a bug in the HP C Compiler,
27268 # see AC_CHECK_SIZEOF for more information.
27269 { $as_echo "$as_me:$LINENO: checking alignment of long long int" >&5
27270 $as_echo_n "checking alignment of long long int... " >&6; }
27271 if test "${ac_cv_alignof_long_long_int+set}" = set; then
27272   $as_echo_n "(cached) " >&6
27273 else
27274   if test "$cross_compiling" = yes; then
27275   # Depending upon the size, compute the lo and hi bounds.
27276 cat >conftest.$ac_ext <<_ACEOF
27277 /* confdefs.h.  */
27278 _ACEOF
27279 cat confdefs.h >>conftest.$ac_ext
27280 cat >>conftest.$ac_ext <<_ACEOF
27281 /* end confdefs.h.  */
27282 $ac_includes_default
27283 #ifndef offsetof
27284 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27285 #endif
27286 typedef struct { char x; long long int y; } ac__type_alignof_;
27287 int
27288 main ()
27289 {
27290 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
27291 test_array [0] = 0
27292
27293   ;
27294   return 0;
27295 }
27296 _ACEOF
27297 rm -f conftest.$ac_objext
27298 if { (ac_try="$ac_compile"
27299 case "(($ac_try" in
27300   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27301   *) ac_try_echo=$ac_try;;
27302 esac
27303 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27304 $as_echo "$ac_try_echo") >&5
27305   (eval "$ac_compile") 2>conftest.er1
27306   ac_status=$?
27307   grep -v '^ *+' conftest.er1 >conftest.err
27308   rm -f conftest.er1
27309   cat conftest.err >&5
27310   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27311   (exit $ac_status); } && {
27312          test -z "$ac_c_werror_flag" ||
27313          test ! -s conftest.err
27314        } && test -s conftest.$ac_objext; then
27315   ac_lo=0 ac_mid=0
27316   while :; do
27317     cat >conftest.$ac_ext <<_ACEOF
27318 /* confdefs.h.  */
27319 _ACEOF
27320 cat confdefs.h >>conftest.$ac_ext
27321 cat >>conftest.$ac_ext <<_ACEOF
27322 /* end confdefs.h.  */
27323 $ac_includes_default
27324 #ifndef offsetof
27325 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27326 #endif
27327 typedef struct { char x; long long int y; } ac__type_alignof_;
27328 int
27329 main ()
27330 {
27331 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
27332 test_array [0] = 0
27333
27334   ;
27335   return 0;
27336 }
27337 _ACEOF
27338 rm -f conftest.$ac_objext
27339 if { (ac_try="$ac_compile"
27340 case "(($ac_try" in
27341   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27342   *) ac_try_echo=$ac_try;;
27343 esac
27344 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27345 $as_echo "$ac_try_echo") >&5
27346   (eval "$ac_compile") 2>conftest.er1
27347   ac_status=$?
27348   grep -v '^ *+' conftest.er1 >conftest.err
27349   rm -f conftest.er1
27350   cat conftest.err >&5
27351   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27352   (exit $ac_status); } && {
27353          test -z "$ac_c_werror_flag" ||
27354          test ! -s conftest.err
27355        } && test -s conftest.$ac_objext; then
27356   ac_hi=$ac_mid; break
27357 else
27358   $as_echo "$as_me: failed program was:" >&5
27359 sed 's/^/| /' conftest.$ac_ext >&5
27360
27361         ac_lo=`expr $ac_mid + 1`
27362                         if test $ac_lo -le $ac_mid; then
27363                           ac_lo= ac_hi=
27364                           break
27365                         fi
27366                         ac_mid=`expr 2 '*' $ac_mid + 1`
27367 fi
27368
27369 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27370   done
27371 else
27372   $as_echo "$as_me: failed program was:" >&5
27373 sed 's/^/| /' conftest.$ac_ext >&5
27374
27375         cat >conftest.$ac_ext <<_ACEOF
27376 /* confdefs.h.  */
27377 _ACEOF
27378 cat confdefs.h >>conftest.$ac_ext
27379 cat >>conftest.$ac_ext <<_ACEOF
27380 /* end confdefs.h.  */
27381 $ac_includes_default
27382 #ifndef offsetof
27383 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27384 #endif
27385 typedef struct { char x; long long int y; } ac__type_alignof_;
27386 int
27387 main ()
27388 {
27389 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
27390 test_array [0] = 0
27391
27392   ;
27393   return 0;
27394 }
27395 _ACEOF
27396 rm -f conftest.$ac_objext
27397 if { (ac_try="$ac_compile"
27398 case "(($ac_try" in
27399   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27400   *) ac_try_echo=$ac_try;;
27401 esac
27402 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27403 $as_echo "$ac_try_echo") >&5
27404   (eval "$ac_compile") 2>conftest.er1
27405   ac_status=$?
27406   grep -v '^ *+' conftest.er1 >conftest.err
27407   rm -f conftest.er1
27408   cat conftest.err >&5
27409   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27410   (exit $ac_status); } && {
27411          test -z "$ac_c_werror_flag" ||
27412          test ! -s conftest.err
27413        } && test -s conftest.$ac_objext; then
27414   ac_hi=-1 ac_mid=-1
27415   while :; do
27416     cat >conftest.$ac_ext <<_ACEOF
27417 /* confdefs.h.  */
27418 _ACEOF
27419 cat confdefs.h >>conftest.$ac_ext
27420 cat >>conftest.$ac_ext <<_ACEOF
27421 /* end confdefs.h.  */
27422 $ac_includes_default
27423 #ifndef offsetof
27424 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27425 #endif
27426 typedef struct { char x; long long int y; } ac__type_alignof_;
27427 int
27428 main ()
27429 {
27430 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
27431 test_array [0] = 0
27432
27433   ;
27434   return 0;
27435 }
27436 _ACEOF
27437 rm -f conftest.$ac_objext
27438 if { (ac_try="$ac_compile"
27439 case "(($ac_try" in
27440   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27441   *) ac_try_echo=$ac_try;;
27442 esac
27443 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27444 $as_echo "$ac_try_echo") >&5
27445   (eval "$ac_compile") 2>conftest.er1
27446   ac_status=$?
27447   grep -v '^ *+' conftest.er1 >conftest.err
27448   rm -f conftest.er1
27449   cat conftest.err >&5
27450   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27451   (exit $ac_status); } && {
27452          test -z "$ac_c_werror_flag" ||
27453          test ! -s conftest.err
27454        } && test -s conftest.$ac_objext; then
27455   ac_lo=$ac_mid; break
27456 else
27457   $as_echo "$as_me: failed program was:" >&5
27458 sed 's/^/| /' conftest.$ac_ext >&5
27459
27460         ac_hi=`expr '(' $ac_mid ')' - 1`
27461                         if test $ac_mid -le $ac_hi; then
27462                           ac_lo= ac_hi=
27463                           break
27464                         fi
27465                         ac_mid=`expr 2 '*' $ac_mid`
27466 fi
27467
27468 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27469   done
27470 else
27471   $as_echo "$as_me: failed program was:" >&5
27472 sed 's/^/| /' conftest.$ac_ext >&5
27473
27474         ac_lo= ac_hi=
27475 fi
27476
27477 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27478 fi
27479
27480 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27481 # Binary search between lo and hi bounds.
27482 while test "x$ac_lo" != "x$ac_hi"; do
27483   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
27484   cat >conftest.$ac_ext <<_ACEOF
27485 /* confdefs.h.  */
27486 _ACEOF
27487 cat confdefs.h >>conftest.$ac_ext
27488 cat >>conftest.$ac_ext <<_ACEOF
27489 /* end confdefs.h.  */
27490 $ac_includes_default
27491 #ifndef offsetof
27492 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27493 #endif
27494 typedef struct { char x; long long int y; } ac__type_alignof_;
27495 int
27496 main ()
27497 {
27498 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
27499 test_array [0] = 0
27500
27501   ;
27502   return 0;
27503 }
27504 _ACEOF
27505 rm -f conftest.$ac_objext
27506 if { (ac_try="$ac_compile"
27507 case "(($ac_try" in
27508   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27509   *) ac_try_echo=$ac_try;;
27510 esac
27511 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27512 $as_echo "$ac_try_echo") >&5
27513   (eval "$ac_compile") 2>conftest.er1
27514   ac_status=$?
27515   grep -v '^ *+' conftest.er1 >conftest.err
27516   rm -f conftest.er1
27517   cat conftest.err >&5
27518   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27519   (exit $ac_status); } && {
27520          test -z "$ac_c_werror_flag" ||
27521          test ! -s conftest.err
27522        } && test -s conftest.$ac_objext; then
27523   ac_hi=$ac_mid
27524 else
27525   $as_echo "$as_me: failed program was:" >&5
27526 sed 's/^/| /' conftest.$ac_ext >&5
27527
27528         ac_lo=`expr '(' $ac_mid ')' + 1`
27529 fi
27530
27531 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27532 done
27533 case $ac_lo in
27534 ?*) ac_cv_alignof_long_long_int=$ac_lo;;
27535 '') if test "$ac_cv_type_long_long_int" = yes; then
27536      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
27537 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27538 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long long int
27539 See \`config.log' for more details." >&5
27540 $as_echo "$as_me: error: cannot compute alignment of long long int
27541 See \`config.log' for more details." >&2;}
27542    { (exit 77); exit 77; }; }; }
27543    else
27544      ac_cv_alignof_long_long_int=0
27545    fi ;;
27546 esac
27547 else
27548   cat >conftest.$ac_ext <<_ACEOF
27549 /* confdefs.h.  */
27550 _ACEOF
27551 cat confdefs.h >>conftest.$ac_ext
27552 cat >>conftest.$ac_ext <<_ACEOF
27553 /* end confdefs.h.  */
27554 $ac_includes_default
27555 #ifndef offsetof
27556 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27557 #endif
27558 typedef struct { char x; long long int y; } ac__type_alignof_;
27559 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
27560 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
27561 #include <stdio.h>
27562 #include <stdlib.h>
27563 int
27564 main ()
27565 {
27566
27567   FILE *f = fopen ("conftest.val", "w");
27568   if (! f)
27569     return 1;
27570   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
27571     {
27572       long int i = longval ();
27573       if (i != ((long int) offsetof (ac__type_alignof_, y)))
27574         return 1;
27575       fprintf (f, "%ld", i);
27576     }
27577   else
27578     {
27579       unsigned long int i = ulongval ();
27580       if (i != ((long int) offsetof (ac__type_alignof_, y)))
27581         return 1;
27582       fprintf (f, "%lu", i);
27583     }
27584   /* Do not output a trailing newline, as this causes \r\n confusion
27585      on some platforms.  */
27586   return ferror (f) || fclose (f) != 0;
27587
27588   ;
27589   return 0;
27590 }
27591 _ACEOF
27592 rm -f conftest$ac_exeext
27593 if { (ac_try="$ac_link"
27594 case "(($ac_try" in
27595   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27596   *) ac_try_echo=$ac_try;;
27597 esac
27598 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27599 $as_echo "$ac_try_echo") >&5
27600   (eval "$ac_link") 2>&5
27601   ac_status=$?
27602   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27603   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27604   { (case "(($ac_try" in
27605   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27606   *) ac_try_echo=$ac_try;;
27607 esac
27608 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27609 $as_echo "$ac_try_echo") >&5
27610   (eval "$ac_try") 2>&5
27611   ac_status=$?
27612   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27613   (exit $ac_status); }; }; then
27614   ac_cv_alignof_long_long_int=`cat conftest.val`
27615 else
27616   $as_echo "$as_me: program exited with status $ac_status" >&5
27617 $as_echo "$as_me: failed program was:" >&5
27618 sed 's/^/| /' conftest.$ac_ext >&5
27619
27620 ( exit $ac_status )
27621 if test "$ac_cv_type_long_long_int" = yes; then
27622      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
27623 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27624 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long long int
27625 See \`config.log' for more details." >&5
27626 $as_echo "$as_me: error: cannot compute alignment of long long int
27627 See \`config.log' for more details." >&2;}
27628    { (exit 77); exit 77; }; }; }
27629    else
27630      ac_cv_alignof_long_long_int=0
27631    fi
27632 fi
27633 rm -rf conftest.dSYM
27634 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27635 fi
27636 rm -f conftest.val
27637 fi
27638 { $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_long_long_int" >&5
27639 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
27640
27641
27642
27643 cat >>confdefs.h <<_ACEOF
27644 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
27645 _ACEOF
27646
27647
27648 fi
27649 # The cast to long int works around a bug in the HP C Compiler,
27650 # see AC_CHECK_SIZEOF for more information.
27651 { $as_echo "$as_me:$LINENO: checking alignment of double" >&5
27652 $as_echo_n "checking alignment of double... " >&6; }
27653 if test "${ac_cv_alignof_double+set}" = set; then
27654   $as_echo_n "(cached) " >&6
27655 else
27656   if test "$cross_compiling" = yes; then
27657   # Depending upon the size, compute the lo and hi bounds.
27658 cat >conftest.$ac_ext <<_ACEOF
27659 /* confdefs.h.  */
27660 _ACEOF
27661 cat confdefs.h >>conftest.$ac_ext
27662 cat >>conftest.$ac_ext <<_ACEOF
27663 /* end confdefs.h.  */
27664 $ac_includes_default
27665 #ifndef offsetof
27666 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27667 #endif
27668 typedef struct { char x; double y; } ac__type_alignof_;
27669 int
27670 main ()
27671 {
27672 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
27673 test_array [0] = 0
27674
27675   ;
27676   return 0;
27677 }
27678 _ACEOF
27679 rm -f conftest.$ac_objext
27680 if { (ac_try="$ac_compile"
27681 case "(($ac_try" in
27682   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27683   *) ac_try_echo=$ac_try;;
27684 esac
27685 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27686 $as_echo "$ac_try_echo") >&5
27687   (eval "$ac_compile") 2>conftest.er1
27688   ac_status=$?
27689   grep -v '^ *+' conftest.er1 >conftest.err
27690   rm -f conftest.er1
27691   cat conftest.err >&5
27692   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27693   (exit $ac_status); } && {
27694          test -z "$ac_c_werror_flag" ||
27695          test ! -s conftest.err
27696        } && test -s conftest.$ac_objext; then
27697   ac_lo=0 ac_mid=0
27698   while :; do
27699     cat >conftest.$ac_ext <<_ACEOF
27700 /* confdefs.h.  */
27701 _ACEOF
27702 cat confdefs.h >>conftest.$ac_ext
27703 cat >>conftest.$ac_ext <<_ACEOF
27704 /* end confdefs.h.  */
27705 $ac_includes_default
27706 #ifndef offsetof
27707 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27708 #endif
27709 typedef struct { char x; double y; } ac__type_alignof_;
27710 int
27711 main ()
27712 {
27713 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
27714 test_array [0] = 0
27715
27716   ;
27717   return 0;
27718 }
27719 _ACEOF
27720 rm -f conftest.$ac_objext
27721 if { (ac_try="$ac_compile"
27722 case "(($ac_try" in
27723   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27724   *) ac_try_echo=$ac_try;;
27725 esac
27726 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27727 $as_echo "$ac_try_echo") >&5
27728   (eval "$ac_compile") 2>conftest.er1
27729   ac_status=$?
27730   grep -v '^ *+' conftest.er1 >conftest.err
27731   rm -f conftest.er1
27732   cat conftest.err >&5
27733   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27734   (exit $ac_status); } && {
27735          test -z "$ac_c_werror_flag" ||
27736          test ! -s conftest.err
27737        } && test -s conftest.$ac_objext; then
27738   ac_hi=$ac_mid; break
27739 else
27740   $as_echo "$as_me: failed program was:" >&5
27741 sed 's/^/| /' conftest.$ac_ext >&5
27742
27743         ac_lo=`expr $ac_mid + 1`
27744                         if test $ac_lo -le $ac_mid; then
27745                           ac_lo= ac_hi=
27746                           break
27747                         fi
27748                         ac_mid=`expr 2 '*' $ac_mid + 1`
27749 fi
27750
27751 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27752   done
27753 else
27754   $as_echo "$as_me: failed program was:" >&5
27755 sed 's/^/| /' conftest.$ac_ext >&5
27756
27757         cat >conftest.$ac_ext <<_ACEOF
27758 /* confdefs.h.  */
27759 _ACEOF
27760 cat confdefs.h >>conftest.$ac_ext
27761 cat >>conftest.$ac_ext <<_ACEOF
27762 /* end confdefs.h.  */
27763 $ac_includes_default
27764 #ifndef offsetof
27765 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27766 #endif
27767 typedef struct { char x; double y; } ac__type_alignof_;
27768 int
27769 main ()
27770 {
27771 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
27772 test_array [0] = 0
27773
27774   ;
27775   return 0;
27776 }
27777 _ACEOF
27778 rm -f conftest.$ac_objext
27779 if { (ac_try="$ac_compile"
27780 case "(($ac_try" in
27781   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27782   *) ac_try_echo=$ac_try;;
27783 esac
27784 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27785 $as_echo "$ac_try_echo") >&5
27786   (eval "$ac_compile") 2>conftest.er1
27787   ac_status=$?
27788   grep -v '^ *+' conftest.er1 >conftest.err
27789   rm -f conftest.er1
27790   cat conftest.err >&5
27791   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27792   (exit $ac_status); } && {
27793          test -z "$ac_c_werror_flag" ||
27794          test ! -s conftest.err
27795        } && test -s conftest.$ac_objext; then
27796   ac_hi=-1 ac_mid=-1
27797   while :; do
27798     cat >conftest.$ac_ext <<_ACEOF
27799 /* confdefs.h.  */
27800 _ACEOF
27801 cat confdefs.h >>conftest.$ac_ext
27802 cat >>conftest.$ac_ext <<_ACEOF
27803 /* end confdefs.h.  */
27804 $ac_includes_default
27805 #ifndef offsetof
27806 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27807 #endif
27808 typedef struct { char x; double y; } ac__type_alignof_;
27809 int
27810 main ()
27811 {
27812 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
27813 test_array [0] = 0
27814
27815   ;
27816   return 0;
27817 }
27818 _ACEOF
27819 rm -f conftest.$ac_objext
27820 if { (ac_try="$ac_compile"
27821 case "(($ac_try" in
27822   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27823   *) ac_try_echo=$ac_try;;
27824 esac
27825 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27826 $as_echo "$ac_try_echo") >&5
27827   (eval "$ac_compile") 2>conftest.er1
27828   ac_status=$?
27829   grep -v '^ *+' conftest.er1 >conftest.err
27830   rm -f conftest.er1
27831   cat conftest.err >&5
27832   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27833   (exit $ac_status); } && {
27834          test -z "$ac_c_werror_flag" ||
27835          test ! -s conftest.err
27836        } && test -s conftest.$ac_objext; then
27837   ac_lo=$ac_mid; break
27838 else
27839   $as_echo "$as_me: failed program was:" >&5
27840 sed 's/^/| /' conftest.$ac_ext >&5
27841
27842         ac_hi=`expr '(' $ac_mid ')' - 1`
27843                         if test $ac_mid -le $ac_hi; then
27844                           ac_lo= ac_hi=
27845                           break
27846                         fi
27847                         ac_mid=`expr 2 '*' $ac_mid`
27848 fi
27849
27850 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27851   done
27852 else
27853   $as_echo "$as_me: failed program was:" >&5
27854 sed 's/^/| /' conftest.$ac_ext >&5
27855
27856         ac_lo= ac_hi=
27857 fi
27858
27859 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27860 fi
27861
27862 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27863 # Binary search between lo and hi bounds.
27864 while test "x$ac_lo" != "x$ac_hi"; do
27865   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
27866   cat >conftest.$ac_ext <<_ACEOF
27867 /* confdefs.h.  */
27868 _ACEOF
27869 cat confdefs.h >>conftest.$ac_ext
27870 cat >>conftest.$ac_ext <<_ACEOF
27871 /* end confdefs.h.  */
27872 $ac_includes_default
27873 #ifndef offsetof
27874 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27875 #endif
27876 typedef struct { char x; double y; } ac__type_alignof_;
27877 int
27878 main ()
27879 {
27880 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
27881 test_array [0] = 0
27882
27883   ;
27884   return 0;
27885 }
27886 _ACEOF
27887 rm -f conftest.$ac_objext
27888 if { (ac_try="$ac_compile"
27889 case "(($ac_try" in
27890   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27891   *) ac_try_echo=$ac_try;;
27892 esac
27893 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27894 $as_echo "$ac_try_echo") >&5
27895   (eval "$ac_compile") 2>conftest.er1
27896   ac_status=$?
27897   grep -v '^ *+' conftest.er1 >conftest.err
27898   rm -f conftest.er1
27899   cat conftest.err >&5
27900   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27901   (exit $ac_status); } && {
27902          test -z "$ac_c_werror_flag" ||
27903          test ! -s conftest.err
27904        } && test -s conftest.$ac_objext; then
27905   ac_hi=$ac_mid
27906 else
27907   $as_echo "$as_me: failed program was:" >&5
27908 sed 's/^/| /' conftest.$ac_ext >&5
27909
27910         ac_lo=`expr '(' $ac_mid ')' + 1`
27911 fi
27912
27913 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27914 done
27915 case $ac_lo in
27916 ?*) ac_cv_alignof_double=$ac_lo;;
27917 '') if test "$ac_cv_type_double" = yes; then
27918      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
27919 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27920 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of double
27921 See \`config.log' for more details." >&5
27922 $as_echo "$as_me: error: cannot compute alignment of double
27923 See \`config.log' for more details." >&2;}
27924    { (exit 77); exit 77; }; }; }
27925    else
27926      ac_cv_alignof_double=0
27927    fi ;;
27928 esac
27929 else
27930   cat >conftest.$ac_ext <<_ACEOF
27931 /* confdefs.h.  */
27932 _ACEOF
27933 cat confdefs.h >>conftest.$ac_ext
27934 cat >>conftest.$ac_ext <<_ACEOF
27935 /* end confdefs.h.  */
27936 $ac_includes_default
27937 #ifndef offsetof
27938 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27939 #endif
27940 typedef struct { char x; double y; } ac__type_alignof_;
27941 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
27942 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
27943 #include <stdio.h>
27944 #include <stdlib.h>
27945 int
27946 main ()
27947 {
27948
27949   FILE *f = fopen ("conftest.val", "w");
27950   if (! f)
27951     return 1;
27952   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
27953     {
27954       long int i = longval ();
27955       if (i != ((long int) offsetof (ac__type_alignof_, y)))
27956         return 1;
27957       fprintf (f, "%ld", i);
27958     }
27959   else
27960     {
27961       unsigned long int i = ulongval ();
27962       if (i != ((long int) offsetof (ac__type_alignof_, y)))
27963         return 1;
27964       fprintf (f, "%lu", i);
27965     }
27966   /* Do not output a trailing newline, as this causes \r\n confusion
27967      on some platforms.  */
27968   return ferror (f) || fclose (f) != 0;
27969
27970   ;
27971   return 0;
27972 }
27973 _ACEOF
27974 rm -f conftest$ac_exeext
27975 if { (ac_try="$ac_link"
27976 case "(($ac_try" in
27977   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27978   *) ac_try_echo=$ac_try;;
27979 esac
27980 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27981 $as_echo "$ac_try_echo") >&5
27982   (eval "$ac_link") 2>&5
27983   ac_status=$?
27984   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27985   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27986   { (case "(($ac_try" in
27987   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27988   *) ac_try_echo=$ac_try;;
27989 esac
27990 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27991 $as_echo "$ac_try_echo") >&5
27992   (eval "$ac_try") 2>&5
27993   ac_status=$?
27994   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27995   (exit $ac_status); }; }; then
27996   ac_cv_alignof_double=`cat conftest.val`
27997 else
27998   $as_echo "$as_me: program exited with status $ac_status" >&5
27999 $as_echo "$as_me: failed program was:" >&5
28000 sed 's/^/| /' conftest.$ac_ext >&5
28001
28002 ( exit $ac_status )
28003 if test "$ac_cv_type_double" = yes; then
28004      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
28005 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28006 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of double
28007 See \`config.log' for more details." >&5
28008 $as_echo "$as_me: error: cannot compute alignment of double
28009 See \`config.log' for more details." >&2;}
28010    { (exit 77); exit 77; }; }; }
28011    else
28012      ac_cv_alignof_double=0
28013    fi
28014 fi
28015 rm -rf conftest.dSYM
28016 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
28017 fi
28018 rm -f conftest.val
28019 fi
28020 { $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_double" >&5
28021 $as_echo "$ac_cv_alignof_double" >&6; }
28022
28023
28024
28025 cat >>confdefs.h <<_ACEOF
28026 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
28027 _ACEOF
28028
28029
28030
28031 # Compute maximum alignment of any basic type.
28032 # We assume long's alignment is at least as strong as char, short, or int;
28033 # but we must check long long (if it exists) and double.
28034
28035 MAX_ALIGNOF=$ac_cv_alignof_long
28036 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
28037   MAX_ALIGNOF=$ac_cv_alignof_double
28038 fi
28039 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
28040   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
28041 fi
28042
28043 cat >>confdefs.h <<_ACEOF
28044 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
28045 _ACEOF
28046
28047
28048
28049 # Some platforms predefine the types int8, int16, etc.  Only check
28050 # a (hopefully) representative subset.
28051 { $as_echo "$as_me:$LINENO: checking for int8" >&5
28052 $as_echo_n "checking for int8... " >&6; }
28053 if test "${ac_cv_type_int8+set}" = set; then
28054   $as_echo_n "(cached) " >&6
28055 else
28056   ac_cv_type_int8=no
28057 cat >conftest.$ac_ext <<_ACEOF
28058 /* confdefs.h.  */
28059 _ACEOF
28060 cat confdefs.h >>conftest.$ac_ext
28061 cat >>conftest.$ac_ext <<_ACEOF
28062 /* end confdefs.h.  */
28063 #include <stdio.h>
28064
28065 int
28066 main ()
28067 {
28068 if (sizeof (int8))
28069        return 0;
28070   ;
28071   return 0;
28072 }
28073 _ACEOF
28074 rm -f conftest.$ac_objext
28075 if { (ac_try="$ac_compile"
28076 case "(($ac_try" in
28077   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28078   *) ac_try_echo=$ac_try;;
28079 esac
28080 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28081 $as_echo "$ac_try_echo") >&5
28082   (eval "$ac_compile") 2>conftest.er1
28083   ac_status=$?
28084   grep -v '^ *+' conftest.er1 >conftest.err
28085   rm -f conftest.er1
28086   cat conftest.err >&5
28087   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28088   (exit $ac_status); } && {
28089          test -z "$ac_c_werror_flag" ||
28090          test ! -s conftest.err
28091        } && test -s conftest.$ac_objext; then
28092   cat >conftest.$ac_ext <<_ACEOF
28093 /* confdefs.h.  */
28094 _ACEOF
28095 cat confdefs.h >>conftest.$ac_ext
28096 cat >>conftest.$ac_ext <<_ACEOF
28097 /* end confdefs.h.  */
28098 #include <stdio.h>
28099
28100 int
28101 main ()
28102 {
28103 if (sizeof ((int8)))
28104           return 0;
28105   ;
28106   return 0;
28107 }
28108 _ACEOF
28109 rm -f conftest.$ac_objext
28110 if { (ac_try="$ac_compile"
28111 case "(($ac_try" in
28112   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28113   *) ac_try_echo=$ac_try;;
28114 esac
28115 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28116 $as_echo "$ac_try_echo") >&5
28117   (eval "$ac_compile") 2>conftest.er1
28118   ac_status=$?
28119   grep -v '^ *+' conftest.er1 >conftest.err
28120   rm -f conftest.er1
28121   cat conftest.err >&5
28122   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28123   (exit $ac_status); } && {
28124          test -z "$ac_c_werror_flag" ||
28125          test ! -s conftest.err
28126        } && test -s conftest.$ac_objext; then
28127   :
28128 else
28129   $as_echo "$as_me: failed program was:" >&5
28130 sed 's/^/| /' conftest.$ac_ext >&5
28131
28132         ac_cv_type_int8=yes
28133 fi
28134
28135 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28136 else
28137   $as_echo "$as_me: failed program was:" >&5
28138 sed 's/^/| /' conftest.$ac_ext >&5
28139
28140
28141 fi
28142
28143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28144 fi
28145 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
28146 $as_echo "$ac_cv_type_int8" >&6; }
28147 if test "x$ac_cv_type_int8" = x""yes; then
28148
28149 cat >>confdefs.h <<_ACEOF
28150 #define HAVE_INT8 1
28151 _ACEOF
28152
28153
28154 fi
28155 { $as_echo "$as_me:$LINENO: checking for uint8" >&5
28156 $as_echo_n "checking for uint8... " >&6; }
28157 if test "${ac_cv_type_uint8+set}" = set; then
28158   $as_echo_n "(cached) " >&6
28159 else
28160   ac_cv_type_uint8=no
28161 cat >conftest.$ac_ext <<_ACEOF
28162 /* confdefs.h.  */
28163 _ACEOF
28164 cat confdefs.h >>conftest.$ac_ext
28165 cat >>conftest.$ac_ext <<_ACEOF
28166 /* end confdefs.h.  */
28167 #include <stdio.h>
28168
28169 int
28170 main ()
28171 {
28172 if (sizeof (uint8))
28173        return 0;
28174   ;
28175   return 0;
28176 }
28177 _ACEOF
28178 rm -f conftest.$ac_objext
28179 if { (ac_try="$ac_compile"
28180 case "(($ac_try" in
28181   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28182   *) ac_try_echo=$ac_try;;
28183 esac
28184 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28185 $as_echo "$ac_try_echo") >&5
28186   (eval "$ac_compile") 2>conftest.er1
28187   ac_status=$?
28188   grep -v '^ *+' conftest.er1 >conftest.err
28189   rm -f conftest.er1
28190   cat conftest.err >&5
28191   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28192   (exit $ac_status); } && {
28193          test -z "$ac_c_werror_flag" ||
28194          test ! -s conftest.err
28195        } && test -s conftest.$ac_objext; then
28196   cat >conftest.$ac_ext <<_ACEOF
28197 /* confdefs.h.  */
28198 _ACEOF
28199 cat confdefs.h >>conftest.$ac_ext
28200 cat >>conftest.$ac_ext <<_ACEOF
28201 /* end confdefs.h.  */
28202 #include <stdio.h>
28203
28204 int
28205 main ()
28206 {
28207 if (sizeof ((uint8)))
28208           return 0;
28209   ;
28210   return 0;
28211 }
28212 _ACEOF
28213 rm -f conftest.$ac_objext
28214 if { (ac_try="$ac_compile"
28215 case "(($ac_try" in
28216   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28217   *) ac_try_echo=$ac_try;;
28218 esac
28219 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28220 $as_echo "$ac_try_echo") >&5
28221   (eval "$ac_compile") 2>conftest.er1
28222   ac_status=$?
28223   grep -v '^ *+' conftest.er1 >conftest.err
28224   rm -f conftest.er1
28225   cat conftest.err >&5
28226   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28227   (exit $ac_status); } && {
28228          test -z "$ac_c_werror_flag" ||
28229          test ! -s conftest.err
28230        } && test -s conftest.$ac_objext; then
28231   :
28232 else
28233   $as_echo "$as_me: failed program was:" >&5
28234 sed 's/^/| /' conftest.$ac_ext >&5
28235
28236         ac_cv_type_uint8=yes
28237 fi
28238
28239 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28240 else
28241   $as_echo "$as_me: failed program was:" >&5
28242 sed 's/^/| /' conftest.$ac_ext >&5
28243
28244
28245 fi
28246
28247 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28248 fi
28249 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
28250 $as_echo "$ac_cv_type_uint8" >&6; }
28251 if test "x$ac_cv_type_uint8" = x""yes; then
28252
28253 cat >>confdefs.h <<_ACEOF
28254 #define HAVE_UINT8 1
28255 _ACEOF
28256
28257
28258 fi
28259 { $as_echo "$as_me:$LINENO: checking for int64" >&5
28260 $as_echo_n "checking for int64... " >&6; }
28261 if test "${ac_cv_type_int64+set}" = set; then
28262   $as_echo_n "(cached) " >&6
28263 else
28264   ac_cv_type_int64=no
28265 cat >conftest.$ac_ext <<_ACEOF
28266 /* confdefs.h.  */
28267 _ACEOF
28268 cat confdefs.h >>conftest.$ac_ext
28269 cat >>conftest.$ac_ext <<_ACEOF
28270 /* end confdefs.h.  */
28271 #include <stdio.h>
28272
28273 int
28274 main ()
28275 {
28276 if (sizeof (int64))
28277        return 0;
28278   ;
28279   return 0;
28280 }
28281 _ACEOF
28282 rm -f conftest.$ac_objext
28283 if { (ac_try="$ac_compile"
28284 case "(($ac_try" in
28285   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28286   *) ac_try_echo=$ac_try;;
28287 esac
28288 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28289 $as_echo "$ac_try_echo") >&5
28290   (eval "$ac_compile") 2>conftest.er1
28291   ac_status=$?
28292   grep -v '^ *+' conftest.er1 >conftest.err
28293   rm -f conftest.er1
28294   cat conftest.err >&5
28295   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28296   (exit $ac_status); } && {
28297          test -z "$ac_c_werror_flag" ||
28298          test ! -s conftest.err
28299        } && test -s conftest.$ac_objext; then
28300   cat >conftest.$ac_ext <<_ACEOF
28301 /* confdefs.h.  */
28302 _ACEOF
28303 cat confdefs.h >>conftest.$ac_ext
28304 cat >>conftest.$ac_ext <<_ACEOF
28305 /* end confdefs.h.  */
28306 #include <stdio.h>
28307
28308 int
28309 main ()
28310 {
28311 if (sizeof ((int64)))
28312           return 0;
28313   ;
28314   return 0;
28315 }
28316 _ACEOF
28317 rm -f conftest.$ac_objext
28318 if { (ac_try="$ac_compile"
28319 case "(($ac_try" in
28320   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28321   *) ac_try_echo=$ac_try;;
28322 esac
28323 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28324 $as_echo "$ac_try_echo") >&5
28325   (eval "$ac_compile") 2>conftest.er1
28326   ac_status=$?
28327   grep -v '^ *+' conftest.er1 >conftest.err
28328   rm -f conftest.er1
28329   cat conftest.err >&5
28330   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28331   (exit $ac_status); } && {
28332          test -z "$ac_c_werror_flag" ||
28333          test ! -s conftest.err
28334        } && test -s conftest.$ac_objext; then
28335   :
28336 else
28337   $as_echo "$as_me: failed program was:" >&5
28338 sed 's/^/| /' conftest.$ac_ext >&5
28339
28340         ac_cv_type_int64=yes
28341 fi
28342
28343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28344 else
28345   $as_echo "$as_me: failed program was:" >&5
28346 sed 's/^/| /' conftest.$ac_ext >&5
28347
28348
28349 fi
28350
28351 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28352 fi
28353 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
28354 $as_echo "$ac_cv_type_int64" >&6; }
28355 if test "x$ac_cv_type_int64" = x""yes; then
28356
28357 cat >>confdefs.h <<_ACEOF
28358 #define HAVE_INT64 1
28359 _ACEOF
28360
28361
28362 fi
28363 { $as_echo "$as_me:$LINENO: checking for uint64" >&5
28364 $as_echo_n "checking for uint64... " >&6; }
28365 if test "${ac_cv_type_uint64+set}" = set; then
28366   $as_echo_n "(cached) " >&6
28367 else
28368   ac_cv_type_uint64=no
28369 cat >conftest.$ac_ext <<_ACEOF
28370 /* confdefs.h.  */
28371 _ACEOF
28372 cat confdefs.h >>conftest.$ac_ext
28373 cat >>conftest.$ac_ext <<_ACEOF
28374 /* end confdefs.h.  */
28375 #include <stdio.h>
28376
28377 int
28378 main ()
28379 {
28380 if (sizeof (uint64))
28381        return 0;
28382   ;
28383   return 0;
28384 }
28385 _ACEOF
28386 rm -f conftest.$ac_objext
28387 if { (ac_try="$ac_compile"
28388 case "(($ac_try" in
28389   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28390   *) ac_try_echo=$ac_try;;
28391 esac
28392 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28393 $as_echo "$ac_try_echo") >&5
28394   (eval "$ac_compile") 2>conftest.er1
28395   ac_status=$?
28396   grep -v '^ *+' conftest.er1 >conftest.err
28397   rm -f conftest.er1
28398   cat conftest.err >&5
28399   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28400   (exit $ac_status); } && {
28401          test -z "$ac_c_werror_flag" ||
28402          test ! -s conftest.err
28403        } && test -s conftest.$ac_objext; then
28404   cat >conftest.$ac_ext <<_ACEOF
28405 /* confdefs.h.  */
28406 _ACEOF
28407 cat confdefs.h >>conftest.$ac_ext
28408 cat >>conftest.$ac_ext <<_ACEOF
28409 /* end confdefs.h.  */
28410 #include <stdio.h>
28411
28412 int
28413 main ()
28414 {
28415 if (sizeof ((uint64)))
28416           return 0;
28417   ;
28418   return 0;
28419 }
28420 _ACEOF
28421 rm -f conftest.$ac_objext
28422 if { (ac_try="$ac_compile"
28423 case "(($ac_try" in
28424   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28425   *) ac_try_echo=$ac_try;;
28426 esac
28427 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28428 $as_echo "$ac_try_echo") >&5
28429   (eval "$ac_compile") 2>conftest.er1
28430   ac_status=$?
28431   grep -v '^ *+' conftest.er1 >conftest.err
28432   rm -f conftest.er1
28433   cat conftest.err >&5
28434   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28435   (exit $ac_status); } && {
28436          test -z "$ac_c_werror_flag" ||
28437          test ! -s conftest.err
28438        } && test -s conftest.$ac_objext; then
28439   :
28440 else
28441   $as_echo "$as_me: failed program was:" >&5
28442 sed 's/^/| /' conftest.$ac_ext >&5
28443
28444         ac_cv_type_uint64=yes
28445 fi
28446
28447 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28448 else
28449   $as_echo "$as_me: failed program was:" >&5
28450 sed 's/^/| /' conftest.$ac_ext >&5
28451
28452
28453 fi
28454
28455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28456 fi
28457 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
28458 $as_echo "$ac_cv_type_uint64" >&6; }
28459 if test "x$ac_cv_type_uint64" = x""yes; then
28460
28461 cat >>confdefs.h <<_ACEOF
28462 #define HAVE_UINT64 1
28463 _ACEOF
28464
28465
28466 fi
28467
28468
28469 # We also check for sig_atomic_t, which *should* be defined per ANSI
28470 # C, but is missing on some old platforms.
28471 { $as_echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
28472 $as_echo_n "checking for sig_atomic_t... " >&6; }
28473 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
28474   $as_echo_n "(cached) " >&6
28475 else
28476   ac_cv_type_sig_atomic_t=no
28477 cat >conftest.$ac_ext <<_ACEOF
28478 /* confdefs.h.  */
28479 _ACEOF
28480 cat confdefs.h >>conftest.$ac_ext
28481 cat >>conftest.$ac_ext <<_ACEOF
28482 /* end confdefs.h.  */
28483 #include <signal.h>
28484
28485 int
28486 main ()
28487 {
28488 if (sizeof (sig_atomic_t))
28489        return 0;
28490   ;
28491   return 0;
28492 }
28493 _ACEOF
28494 rm -f conftest.$ac_objext
28495 if { (ac_try="$ac_compile"
28496 case "(($ac_try" in
28497   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28498   *) ac_try_echo=$ac_try;;
28499 esac
28500 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28501 $as_echo "$ac_try_echo") >&5
28502   (eval "$ac_compile") 2>conftest.er1
28503   ac_status=$?
28504   grep -v '^ *+' conftest.er1 >conftest.err
28505   rm -f conftest.er1
28506   cat conftest.err >&5
28507   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28508   (exit $ac_status); } && {
28509          test -z "$ac_c_werror_flag" ||
28510          test ! -s conftest.err
28511        } && test -s conftest.$ac_objext; then
28512   cat >conftest.$ac_ext <<_ACEOF
28513 /* confdefs.h.  */
28514 _ACEOF
28515 cat confdefs.h >>conftest.$ac_ext
28516 cat >>conftest.$ac_ext <<_ACEOF
28517 /* end confdefs.h.  */
28518 #include <signal.h>
28519
28520 int
28521 main ()
28522 {
28523 if (sizeof ((sig_atomic_t)))
28524           return 0;
28525   ;
28526   return 0;
28527 }
28528 _ACEOF
28529 rm -f conftest.$ac_objext
28530 if { (ac_try="$ac_compile"
28531 case "(($ac_try" in
28532   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28533   *) ac_try_echo=$ac_try;;
28534 esac
28535 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28536 $as_echo "$ac_try_echo") >&5
28537   (eval "$ac_compile") 2>conftest.er1
28538   ac_status=$?
28539   grep -v '^ *+' conftest.er1 >conftest.err
28540   rm -f conftest.er1
28541   cat conftest.err >&5
28542   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28543   (exit $ac_status); } && {
28544          test -z "$ac_c_werror_flag" ||
28545          test ! -s conftest.err
28546        } && test -s conftest.$ac_objext; then
28547   :
28548 else
28549   $as_echo "$as_me: failed program was:" >&5
28550 sed 's/^/| /' conftest.$ac_ext >&5
28551
28552         ac_cv_type_sig_atomic_t=yes
28553 fi
28554
28555 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28556 else
28557   $as_echo "$as_me: failed program was:" >&5
28558 sed 's/^/| /' conftest.$ac_ext >&5
28559
28560
28561 fi
28562
28563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28564 fi
28565 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
28566 $as_echo "$ac_cv_type_sig_atomic_t" >&6; }
28567 if test "x$ac_cv_type_sig_atomic_t" = x""yes; then
28568
28569 cat >>confdefs.h <<_ACEOF
28570 #define HAVE_SIG_ATOMIC_T 1
28571 _ACEOF
28572
28573
28574 fi
28575
28576
28577
28578 if test "$PORTNAME" != "win32"
28579 then
28580 { $as_echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
28581 $as_echo_n "checking for POSIX signal interface... " >&6; }
28582 if test "${pgac_cv_func_posix_signals+set}" = set; then
28583   $as_echo_n "(cached) " >&6
28584 else
28585   cat >conftest.$ac_ext <<_ACEOF
28586 /* confdefs.h.  */
28587 _ACEOF
28588 cat confdefs.h >>conftest.$ac_ext
28589 cat >>conftest.$ac_ext <<_ACEOF
28590 /* end confdefs.h.  */
28591 #include <signal.h>
28592
28593 int
28594 main ()
28595 {
28596 struct sigaction act, oact;
28597 sigemptyset(&act.sa_mask);
28598 act.sa_flags = SA_RESTART;
28599 sigaction(0, &act, &oact);
28600   ;
28601   return 0;
28602 }
28603 _ACEOF
28604 rm -f conftest.$ac_objext conftest$ac_exeext
28605 if { (ac_try="$ac_link"
28606 case "(($ac_try" in
28607   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28608   *) ac_try_echo=$ac_try;;
28609 esac
28610 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28611 $as_echo "$ac_try_echo") >&5
28612   (eval "$ac_link") 2>conftest.er1
28613   ac_status=$?
28614   grep -v '^ *+' conftest.er1 >conftest.err
28615   rm -f conftest.er1
28616   cat conftest.err >&5
28617   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28618   (exit $ac_status); } && {
28619          test -z "$ac_c_werror_flag" ||
28620          test ! -s conftest.err
28621        } && test -s conftest$ac_exeext && {
28622          test "$cross_compiling" = yes ||
28623          $as_test_x conftest$ac_exeext
28624        }; then
28625   pgac_cv_func_posix_signals=yes
28626 else
28627   $as_echo "$as_me: failed program was:" >&5
28628 sed 's/^/| /' conftest.$ac_ext >&5
28629
28630         pgac_cv_func_posix_signals=no
28631 fi
28632
28633 rm -rf conftest.dSYM
28634 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28635       conftest$ac_exeext conftest.$ac_ext
28636 fi
28637 { $as_echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
28638 $as_echo "$pgac_cv_func_posix_signals" >&6; }
28639 if test x"$pgac_cv_func_posix_signals" = xyes ; then
28640
28641 cat >>confdefs.h <<\_ACEOF
28642 #define HAVE_POSIX_SIGNALS 1
28643 _ACEOF
28644
28645 fi
28646 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
28647
28648 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
28649   { { $as_echo "$as_me:$LINENO: error:
28650 Thread-safety requires POSIX signals, which are not supported by this
28651 operating system;  use --disable-thread-safety to disable thread safety." >&5
28652 $as_echo "$as_me: error:
28653 Thread-safety requires POSIX signals, which are not supported by this
28654 operating system;  use --disable-thread-safety to disable thread safety." >&2;}
28655    { (exit 1); exit 1; }; }
28656 fi
28657 fi
28658
28659 # SunOS doesn't handle negative byte comparisons properly with +/- return
28660 { $as_echo "$as_me:$LINENO: checking for working memcmp" >&5
28661 $as_echo_n "checking for working memcmp... " >&6; }
28662 if test "${ac_cv_func_memcmp_working+set}" = set; then
28663   $as_echo_n "(cached) " >&6
28664 else
28665   if test "$cross_compiling" = yes; then
28666   ac_cv_func_memcmp_working=no
28667 else
28668   cat >conftest.$ac_ext <<_ACEOF
28669 /* confdefs.h.  */
28670 _ACEOF
28671 cat confdefs.h >>conftest.$ac_ext
28672 cat >>conftest.$ac_ext <<_ACEOF
28673 /* end confdefs.h.  */
28674 $ac_includes_default
28675 int
28676 main ()
28677 {
28678
28679   /* Some versions of memcmp are not 8-bit clean.  */
28680   char c0 = '\100', c1 = '\200', c2 = '\201';
28681   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
28682     return 1;
28683
28684   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
28685      or more and with at least one buffer not starting on a 4-byte boundary.
28686      William Lewis provided this test program.   */
28687   {
28688     char foo[21];
28689     char bar[21];
28690     int i;
28691     for (i = 0; i < 4; i++)
28692       {
28693         char *a = foo + i;
28694         char *b = bar + i;
28695         strcpy (a, "--------01111111");
28696         strcpy (b, "--------10000000");
28697         if (memcmp (a, b, 16) >= 0)
28698           return 1;
28699       }
28700     return 0;
28701   }
28702
28703   ;
28704   return 0;
28705 }
28706 _ACEOF
28707 rm -f conftest$ac_exeext
28708 if { (ac_try="$ac_link"
28709 case "(($ac_try" in
28710   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28711   *) ac_try_echo=$ac_try;;
28712 esac
28713 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28714 $as_echo "$ac_try_echo") >&5
28715   (eval "$ac_link") 2>&5
28716   ac_status=$?
28717   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28718   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
28719   { (case "(($ac_try" in
28720   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28721   *) ac_try_echo=$ac_try;;
28722 esac
28723 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28724 $as_echo "$ac_try_echo") >&5
28725   (eval "$ac_try") 2>&5
28726   ac_status=$?
28727   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28728   (exit $ac_status); }; }; then
28729   ac_cv_func_memcmp_working=yes
28730 else
28731   $as_echo "$as_me: program exited with status $ac_status" >&5
28732 $as_echo "$as_me: failed program was:" >&5
28733 sed 's/^/| /' conftest.$ac_ext >&5
28734
28735 ( exit $ac_status )
28736 ac_cv_func_memcmp_working=no
28737 fi
28738 rm -rf conftest.dSYM
28739 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
28740 fi
28741
28742
28743 fi
28744 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
28745 $as_echo "$ac_cv_func_memcmp_working" >&6; }
28746 test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
28747   *" memcmp.$ac_objext "* ) ;;
28748   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
28749  ;;
28750 esac
28751
28752
28753
28754
28755 # Select semaphore implementation type.
28756 if test "$PORTNAME" != "win32"; then
28757   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
28758
28759 cat >>confdefs.h <<\_ACEOF
28760 #define USE_NAMED_POSIX_SEMAPHORES 1
28761 _ACEOF
28762
28763     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
28764   else
28765     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
28766
28767 cat >>confdefs.h <<\_ACEOF
28768 #define USE_UNNAMED_POSIX_SEMAPHORES 1
28769 _ACEOF
28770
28771       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
28772     else
28773
28774 cat >>confdefs.h <<\_ACEOF
28775 #define USE_SYSV_SEMAPHORES 1
28776 _ACEOF
28777
28778       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
28779     fi
28780   fi
28781 else
28782
28783 cat >>confdefs.h <<\_ACEOF
28784 #define USE_WIN32_SEMAPHORES 1
28785 _ACEOF
28786
28787   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
28788 fi
28789
28790
28791 # Select shared-memory implementation type.
28792 if test "$PORTNAME" != "win32"; then
28793
28794 cat >>confdefs.h <<\_ACEOF
28795 #define USE_SYSV_SHARED_MEMORY 1
28796 _ACEOF
28797
28798   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
28799 else
28800
28801 cat >>confdefs.h <<\_ACEOF
28802 #define USE_WIN32_SHARED_MEMORY 1
28803 _ACEOF
28804
28805   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
28806 fi
28807
28808 # Select latch implementation type.
28809 if test "$PORTNAME" != "win32"; then
28810   LATCH_IMPLEMENTATION="src/backend/port/unix_latch.c"
28811 else
28812   LATCH_IMPLEMENTATION="src/backend/port/win32_latch.c"
28813 fi
28814
28815 # If not set in template file, set bytes to use libc memset()
28816 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
28817   MEMSET_LOOP_LIMIT=1024
28818 fi
28819
28820 cat >>confdefs.h <<_ACEOF
28821 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
28822 _ACEOF
28823
28824
28825
28826 if test "$enable_nls" = yes ; then
28827
28828   { $as_echo "$as_me:$LINENO: checking for library containing bind_textdomain_codeset" >&5
28829 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
28830 if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then
28831   $as_echo_n "(cached) " >&6
28832 else
28833   ac_func_search_save_LIBS=$LIBS
28834 cat >conftest.$ac_ext <<_ACEOF
28835 /* confdefs.h.  */
28836 _ACEOF
28837 cat confdefs.h >>conftest.$ac_ext
28838 cat >>conftest.$ac_ext <<_ACEOF
28839 /* end confdefs.h.  */
28840
28841 /* Override any GCC internal prototype to avoid an error.
28842    Use char because int might match the return type of a GCC
28843    builtin and then its argument prototype would still apply.  */
28844 #ifdef __cplusplus
28845 extern "C"
28846 #endif
28847 char bind_textdomain_codeset ();
28848 int
28849 main ()
28850 {
28851 return bind_textdomain_codeset ();
28852   ;
28853   return 0;
28854 }
28855 _ACEOF
28856 for ac_lib in '' intl; do
28857   if test -z "$ac_lib"; then
28858     ac_res="none required"
28859   else
28860     ac_res=-l$ac_lib
28861     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
28862   fi
28863   rm -f conftest.$ac_objext conftest$ac_exeext
28864 if { (ac_try="$ac_link"
28865 case "(($ac_try" in
28866   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28867   *) ac_try_echo=$ac_try;;
28868 esac
28869 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28870 $as_echo "$ac_try_echo") >&5
28871   (eval "$ac_link") 2>conftest.er1
28872   ac_status=$?
28873   grep -v '^ *+' conftest.er1 >conftest.err
28874   rm -f conftest.er1
28875   cat conftest.err >&5
28876   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28877   (exit $ac_status); } && {
28878          test -z "$ac_c_werror_flag" ||
28879          test ! -s conftest.err
28880        } && test -s conftest$ac_exeext && {
28881          test "$cross_compiling" = yes ||
28882          $as_test_x conftest$ac_exeext
28883        }; then
28884   ac_cv_search_bind_textdomain_codeset=$ac_res
28885 else
28886   $as_echo "$as_me: failed program was:" >&5
28887 sed 's/^/| /' conftest.$ac_ext >&5
28888
28889
28890 fi
28891
28892 rm -rf conftest.dSYM
28893 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28894       conftest$ac_exeext
28895   if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then
28896   break
28897 fi
28898 done
28899 if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then
28900   :
28901 else
28902   ac_cv_search_bind_textdomain_codeset=no
28903 fi
28904 rm conftest.$ac_ext
28905 LIBS=$ac_func_search_save_LIBS
28906 fi
28907 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_bind_textdomain_codeset" >&5
28908 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
28909 ac_res=$ac_cv_search_bind_textdomain_codeset
28910 if test "$ac_res" != no; then
28911   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28912
28913 else
28914   { { $as_echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
28915 $as_echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
28916    { (exit 1); exit 1; }; }
28917 fi
28918
28919   if test "${ac_cv_header_libintl_h+set}" = set; then
28920   { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
28921 $as_echo_n "checking for libintl.h... " >&6; }
28922 if test "${ac_cv_header_libintl_h+set}" = set; then
28923   $as_echo_n "(cached) " >&6
28924 fi
28925 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
28926 $as_echo "$ac_cv_header_libintl_h" >&6; }
28927 else
28928   # Is the header compilable?
28929 { $as_echo "$as_me:$LINENO: checking libintl.h usability" >&5
28930 $as_echo_n "checking libintl.h usability... " >&6; }
28931 cat >conftest.$ac_ext <<_ACEOF
28932 /* confdefs.h.  */
28933 _ACEOF
28934 cat confdefs.h >>conftest.$ac_ext
28935 cat >>conftest.$ac_ext <<_ACEOF
28936 /* end confdefs.h.  */
28937 $ac_includes_default
28938 #include <libintl.h>
28939 _ACEOF
28940 rm -f conftest.$ac_objext
28941 if { (ac_try="$ac_compile"
28942 case "(($ac_try" in
28943   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28944   *) ac_try_echo=$ac_try;;
28945 esac
28946 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28947 $as_echo "$ac_try_echo") >&5
28948   (eval "$ac_compile") 2>conftest.er1
28949   ac_status=$?
28950   grep -v '^ *+' conftest.er1 >conftest.err
28951   rm -f conftest.er1
28952   cat conftest.err >&5
28953   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28954   (exit $ac_status); } && {
28955          test -z "$ac_c_werror_flag" ||
28956          test ! -s conftest.err
28957        } && test -s conftest.$ac_objext; then
28958   ac_header_compiler=yes
28959 else
28960   $as_echo "$as_me: failed program was:" >&5
28961 sed 's/^/| /' conftest.$ac_ext >&5
28962
28963         ac_header_compiler=no
28964 fi
28965
28966 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28967 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
28968 $as_echo "$ac_header_compiler" >&6; }
28969
28970 # Is the header present?
28971 { $as_echo "$as_me:$LINENO: checking libintl.h presence" >&5
28972 $as_echo_n "checking libintl.h presence... " >&6; }
28973 cat >conftest.$ac_ext <<_ACEOF
28974 /* confdefs.h.  */
28975 _ACEOF
28976 cat confdefs.h >>conftest.$ac_ext
28977 cat >>conftest.$ac_ext <<_ACEOF
28978 /* end confdefs.h.  */
28979 #include <libintl.h>
28980 _ACEOF
28981 if { (ac_try="$ac_cpp conftest.$ac_ext"
28982 case "(($ac_try" in
28983   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28984   *) ac_try_echo=$ac_try;;
28985 esac
28986 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28987 $as_echo "$ac_try_echo") >&5
28988   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
28989   ac_status=$?
28990   grep -v '^ *+' conftest.er1 >conftest.err
28991   rm -f conftest.er1
28992   cat conftest.err >&5
28993   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28994   (exit $ac_status); } >/dev/null && {
28995          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
28996          test ! -s conftest.err
28997        }; then
28998   ac_header_preproc=yes
28999 else
29000   $as_echo "$as_me: failed program was:" >&5
29001 sed 's/^/| /' conftest.$ac_ext >&5
29002
29003   ac_header_preproc=no
29004 fi
29005
29006 rm -f conftest.err conftest.$ac_ext
29007 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
29008 $as_echo "$ac_header_preproc" >&6; }
29009
29010 # So?  What about this header?
29011 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
29012   yes:no: )
29013     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
29014 $as_echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
29015     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
29016 $as_echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
29017     ac_header_preproc=yes
29018     ;;
29019   no:yes:* )
29020     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
29021 $as_echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
29022     { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
29023 $as_echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
29024     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
29025 $as_echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
29026     { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
29027 $as_echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
29028     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
29029 $as_echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
29030     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
29031 $as_echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
29032     ( cat <<\_ASBOX
29033 ## ---------------------------------------- ##
29034 ## Report this to pgsql-bugs@postgresql.org ##
29035 ## ---------------------------------------- ##
29036 _ASBOX
29037      ) | sed "s/^/$as_me: WARNING:     /" >&2
29038     ;;
29039 esac
29040 { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
29041 $as_echo_n "checking for libintl.h... " >&6; }
29042 if test "${ac_cv_header_libintl_h+set}" = set; then
29043   $as_echo_n "(cached) " >&6
29044 else
29045   ac_cv_header_libintl_h=$ac_header_preproc
29046 fi
29047 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
29048 $as_echo "$ac_cv_header_libintl_h" >&6; }
29049
29050 fi
29051 if test "x$ac_cv_header_libintl_h" = x""yes; then
29052   :
29053 else
29054   { { $as_echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
29055 $as_echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
29056    { (exit 1); exit 1; }; }
29057 fi
29058
29059
29060   for ac_prog in msgfmt
29061 do
29062   # Extract the first word of "$ac_prog", so it can be a program name with args.
29063 set dummy $ac_prog; ac_word=$2
29064 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29065 $as_echo_n "checking for $ac_word... " >&6; }
29066 if test "${ac_cv_prog_MSGFMT+set}" = set; then
29067   $as_echo_n "(cached) " >&6
29068 else
29069   if test -n "$MSGFMT"; then
29070   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
29071 else
29072 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29073 for as_dir in $PATH
29074 do
29075   IFS=$as_save_IFS
29076   test -z "$as_dir" && as_dir=.
29077   for ac_exec_ext in '' $ac_executable_extensions; do
29078   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29079     ac_cv_prog_MSGFMT="$ac_prog"
29080     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29081     break 2
29082   fi
29083 done
29084 done
29085 IFS=$as_save_IFS
29086
29087 fi
29088 fi
29089 MSGFMT=$ac_cv_prog_MSGFMT
29090 if test -n "$MSGFMT"; then
29091   { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5
29092 $as_echo "$MSGFMT" >&6; }
29093 else
29094   { $as_echo "$as_me:$LINENO: result: no" >&5
29095 $as_echo "no" >&6; }
29096 fi
29097
29098
29099   test -n "$MSGFMT" && break
29100 done
29101
29102   if test -z "$MSGFMT"; then
29103     { { $as_echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
29104 $as_echo "$as_me: error: msgfmt is required for NLS" >&2;}
29105    { (exit 1); exit 1; }; }
29106   fi
29107   for ac_prog in msgmerge
29108 do
29109   # Extract the first word of "$ac_prog", so it can be a program name with args.
29110 set dummy $ac_prog; ac_word=$2
29111 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29112 $as_echo_n "checking for $ac_word... " >&6; }
29113 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
29114   $as_echo_n "(cached) " >&6
29115 else
29116   if test -n "$MSGMERGE"; then
29117   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
29118 else
29119 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29120 for as_dir in $PATH
29121 do
29122   IFS=$as_save_IFS
29123   test -z "$as_dir" && as_dir=.
29124   for ac_exec_ext in '' $ac_executable_extensions; do
29125   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29126     ac_cv_prog_MSGMERGE="$ac_prog"
29127     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29128     break 2
29129   fi
29130 done
29131 done
29132 IFS=$as_save_IFS
29133
29134 fi
29135 fi
29136 MSGMERGE=$ac_cv_prog_MSGMERGE
29137 if test -n "$MSGMERGE"; then
29138   { $as_echo "$as_me:$LINENO: result: $MSGMERGE" >&5
29139 $as_echo "$MSGMERGE" >&6; }
29140 else
29141   { $as_echo "$as_me:$LINENO: result: no" >&5
29142 $as_echo "no" >&6; }
29143 fi
29144
29145
29146   test -n "$MSGMERGE" && break
29147 done
29148
29149   for ac_prog in xgettext
29150 do
29151   # Extract the first word of "$ac_prog", so it can be a program name with args.
29152 set dummy $ac_prog; ac_word=$2
29153 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29154 $as_echo_n "checking for $ac_word... " >&6; }
29155 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
29156   $as_echo_n "(cached) " >&6
29157 else
29158   if test -n "$XGETTEXT"; then
29159   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
29160 else
29161 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29162 for as_dir in $PATH
29163 do
29164   IFS=$as_save_IFS
29165   test -z "$as_dir" && as_dir=.
29166   for ac_exec_ext in '' $ac_executable_extensions; do
29167   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29168     ac_cv_prog_XGETTEXT="$ac_prog"
29169     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29170     break 2
29171   fi
29172 done
29173 done
29174 IFS=$as_save_IFS
29175
29176 fi
29177 fi
29178 XGETTEXT=$ac_cv_prog_XGETTEXT
29179 if test -n "$XGETTEXT"; then
29180   { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5
29181 $as_echo "$XGETTEXT" >&6; }
29182 else
29183   { $as_echo "$as_me:$LINENO: result: no" >&5
29184 $as_echo "no" >&6; }
29185 fi
29186
29187
29188   test -n "$XGETTEXT" && break
29189 done
29190
29191
29192 fi
29193
29194 # Check for Tcl configuration script tclConfig.sh
29195 if test "$with_tcl" = yes; then
29196     for ac_prog in tclsh tcl tclsh8.5 tclsh85 tclsh8.4 tclsh84 tclsh8.3 tclsh83
29197 do
29198   # Extract the first word of "$ac_prog", so it can be a program name with args.
29199 set dummy $ac_prog; ac_word=$2
29200 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29201 $as_echo_n "checking for $ac_word... " >&6; }
29202 if test "${ac_cv_path_TCLSH+set}" = set; then
29203   $as_echo_n "(cached) " >&6
29204 else
29205   case $TCLSH in
29206   [\\/]* | ?:[\\/]*)
29207   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
29208   ;;
29209   *)
29210   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29211 for as_dir in $PATH
29212 do
29213   IFS=$as_save_IFS
29214   test -z "$as_dir" && as_dir=.
29215   for ac_exec_ext in '' $ac_executable_extensions; do
29216   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29217     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
29218     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29219     break 2
29220   fi
29221 done
29222 done
29223 IFS=$as_save_IFS
29224
29225   ;;
29226 esac
29227 fi
29228 TCLSH=$ac_cv_path_TCLSH
29229 if test -n "$TCLSH"; then
29230   { $as_echo "$as_me:$LINENO: result: $TCLSH" >&5
29231 $as_echo "$TCLSH" >&6; }
29232 else
29233   { $as_echo "$as_me:$LINENO: result: no" >&5
29234 $as_echo "no" >&6; }
29235 fi
29236
29237
29238   test -n "$TCLSH" && break
29239 done
29240
29241 if test x"$TCLSH" = x""; then
29242   { { $as_echo "$as_me:$LINENO: error: Tcl shell not found" >&5
29243 $as_echo "$as_me: error: Tcl shell not found" >&2;}
29244    { (exit 1); exit 1; }; }
29245 fi
29246
29247 { $as_echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
29248 $as_echo_n "checking for tclConfig.sh... " >&6; }
29249 # Let user override test
29250 if test -z "$TCL_CONFIG_SH"; then
29251     pgac_test_dirs="$with_tclconfig"
29252
29253     set X $pgac_test_dirs; shift
29254     if test $# -eq 0; then
29255         test -z "$TCLSH" && { { $as_echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
29256 $as_echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
29257    { (exit 1); exit 1; }; }
29258         set X `echo 'puts $auto_path' | $TCLSH`; shift
29259     fi
29260
29261     for pgac_dir do
29262         if test -r "$pgac_dir/tclConfig.sh"; then
29263             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
29264             break
29265         fi
29266     done
29267 fi
29268
29269 if test -z "$TCL_CONFIG_SH"; then
29270     { $as_echo "$as_me:$LINENO: result: no" >&5
29271 $as_echo "no" >&6; }
29272     { { $as_echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
29273 $as_echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
29274    { (exit 1); exit 1; }; }
29275 else
29276     { $as_echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
29277 $as_echo "$TCL_CONFIG_SH" >&6; }
29278 fi
29279
29280
29281
29282     . "$TCL_CONFIG_SH"
29283 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
29284 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
29285 eval TCL_LIBS=\"$TCL_LIBS\"
29286 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
29287 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
29288
29289         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
29290     ac_save_CPPFLAGS=$CPPFLAGS
29291     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
29292     if test "${ac_cv_header_tcl_h+set}" = set; then
29293   { $as_echo "$as_me:$LINENO: checking for tcl.h" >&5
29294 $as_echo_n "checking for tcl.h... " >&6; }
29295 if test "${ac_cv_header_tcl_h+set}" = set; then
29296   $as_echo_n "(cached) " >&6
29297 fi
29298 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
29299 $as_echo "$ac_cv_header_tcl_h" >&6; }
29300 else
29301   # Is the header compilable?
29302 { $as_echo "$as_me:$LINENO: checking tcl.h usability" >&5
29303 $as_echo_n "checking tcl.h usability... " >&6; }
29304 cat >conftest.$ac_ext <<_ACEOF
29305 /* confdefs.h.  */
29306 _ACEOF
29307 cat confdefs.h >>conftest.$ac_ext
29308 cat >>conftest.$ac_ext <<_ACEOF
29309 /* end confdefs.h.  */
29310 $ac_includes_default
29311 #include <tcl.h>
29312 _ACEOF
29313 rm -f conftest.$ac_objext
29314 if { (ac_try="$ac_compile"
29315 case "(($ac_try" in
29316   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29317   *) ac_try_echo=$ac_try;;
29318 esac
29319 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29320 $as_echo "$ac_try_echo") >&5
29321   (eval "$ac_compile") 2>conftest.er1
29322   ac_status=$?
29323   grep -v '^ *+' conftest.er1 >conftest.err
29324   rm -f conftest.er1
29325   cat conftest.err >&5
29326   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29327   (exit $ac_status); } && {
29328          test -z "$ac_c_werror_flag" ||
29329          test ! -s conftest.err
29330        } && test -s conftest.$ac_objext; then
29331   ac_header_compiler=yes
29332 else
29333   $as_echo "$as_me: failed program was:" >&5
29334 sed 's/^/| /' conftest.$ac_ext >&5
29335
29336         ac_header_compiler=no
29337 fi
29338
29339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29340 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
29341 $as_echo "$ac_header_compiler" >&6; }
29342
29343 # Is the header present?
29344 { $as_echo "$as_me:$LINENO: checking tcl.h presence" >&5
29345 $as_echo_n "checking tcl.h presence... " >&6; }
29346 cat >conftest.$ac_ext <<_ACEOF
29347 /* confdefs.h.  */
29348 _ACEOF
29349 cat confdefs.h >>conftest.$ac_ext
29350 cat >>conftest.$ac_ext <<_ACEOF
29351 /* end confdefs.h.  */
29352 #include <tcl.h>
29353 _ACEOF
29354 if { (ac_try="$ac_cpp conftest.$ac_ext"
29355 case "(($ac_try" in
29356   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29357   *) ac_try_echo=$ac_try;;
29358 esac
29359 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29360 $as_echo "$ac_try_echo") >&5
29361   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
29362   ac_status=$?
29363   grep -v '^ *+' conftest.er1 >conftest.err
29364   rm -f conftest.er1
29365   cat conftest.err >&5
29366   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29367   (exit $ac_status); } >/dev/null && {
29368          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
29369          test ! -s conftest.err
29370        }; then
29371   ac_header_preproc=yes
29372 else
29373   $as_echo "$as_me: failed program was:" >&5
29374 sed 's/^/| /' conftest.$ac_ext >&5
29375
29376   ac_header_preproc=no
29377 fi
29378
29379 rm -f conftest.err conftest.$ac_ext
29380 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
29381 $as_echo "$ac_header_preproc" >&6; }
29382
29383 # So?  What about this header?
29384 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
29385   yes:no: )
29386     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
29387 $as_echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
29388     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
29389 $as_echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
29390     ac_header_preproc=yes
29391     ;;
29392   no:yes:* )
29393     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
29394 $as_echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
29395     { $as_echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
29396 $as_echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
29397     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
29398 $as_echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
29399     { $as_echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
29400 $as_echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
29401     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
29402 $as_echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
29403     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
29404 $as_echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
29405     ( cat <<\_ASBOX
29406 ## ---------------------------------------- ##
29407 ## Report this to pgsql-bugs@postgresql.org ##
29408 ## ---------------------------------------- ##
29409 _ASBOX
29410      ) | sed "s/^/$as_me: WARNING:     /" >&2
29411     ;;
29412 esac
29413 { $as_echo "$as_me:$LINENO: checking for tcl.h" >&5
29414 $as_echo_n "checking for tcl.h... " >&6; }
29415 if test "${ac_cv_header_tcl_h+set}" = set; then
29416   $as_echo_n "(cached) " >&6
29417 else
29418   ac_cv_header_tcl_h=$ac_header_preproc
29419 fi
29420 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
29421 $as_echo "$ac_cv_header_tcl_h" >&6; }
29422
29423 fi
29424 if test "x$ac_cv_header_tcl_h" = x""yes; then
29425   :
29426 else
29427   { { $as_echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
29428 $as_echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
29429    { (exit 1); exit 1; }; }
29430 fi
29431
29432
29433     CPPFLAGS=$ac_save_CPPFLAGS
29434 fi
29435
29436 # check for <perl.h>
29437 if test "$with_perl" = yes; then
29438   ac_save_CPPFLAGS=$CPPFLAGS
29439   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
29440   { $as_echo "$as_me:$LINENO: checking for perl.h" >&5
29441 $as_echo_n "checking for perl.h... " >&6; }
29442 if test "${ac_cv_header_perl_h+set}" = set; then
29443   $as_echo_n "(cached) " >&6
29444 else
29445   cat >conftest.$ac_ext <<_ACEOF
29446 /* confdefs.h.  */
29447 _ACEOF
29448 cat confdefs.h >>conftest.$ac_ext
29449 cat >>conftest.$ac_ext <<_ACEOF
29450 /* end confdefs.h.  */
29451 #include <EXTERN.h>
29452
29453 #include <perl.h>
29454 _ACEOF
29455 rm -f conftest.$ac_objext
29456 if { (ac_try="$ac_compile"
29457 case "(($ac_try" in
29458   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29459   *) ac_try_echo=$ac_try;;
29460 esac
29461 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29462 $as_echo "$ac_try_echo") >&5
29463   (eval "$ac_compile") 2>conftest.er1
29464   ac_status=$?
29465   grep -v '^ *+' conftest.er1 >conftest.err
29466   rm -f conftest.er1
29467   cat conftest.err >&5
29468   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29469   (exit $ac_status); } && {
29470          test -z "$ac_c_werror_flag" ||
29471          test ! -s conftest.err
29472        } && test -s conftest.$ac_objext; then
29473   ac_cv_header_perl_h=yes
29474 else
29475   $as_echo "$as_me: failed program was:" >&5
29476 sed 's/^/| /' conftest.$ac_ext >&5
29477
29478         ac_cv_header_perl_h=no
29479 fi
29480
29481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29482 fi
29483 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_perl_h" >&5
29484 $as_echo "$ac_cv_header_perl_h" >&6; }
29485 if test "x$ac_cv_header_perl_h" = x""yes; then
29486   :
29487 else
29488   { { $as_echo "$as_me:$LINENO: error: header file <perl.h> is required for Perl" >&5
29489 $as_echo "$as_me: error: header file <perl.h> is required for Perl" >&2;}
29490    { (exit 1); exit 1; }; }
29491 fi
29492
29493
29494   # While we're at it, check that we can link to libperl.
29495   # On most platforms, if perl.h is there then libperl.so will be too, but at
29496   # this writing Debian packages them separately.  There is no known reason to
29497   # waste cycles on separate probes for the Tcl or Python libraries, though.
29498   pgac_save_LIBS=$LIBS
29499   LIBS="$perl_embed_ldflags"
29500   { $as_echo "$as_me:$LINENO: checking for libperl" >&5
29501 $as_echo_n "checking for libperl... " >&6; }
29502   cat >conftest.$ac_ext <<_ACEOF
29503 /* confdefs.h.  */
29504 _ACEOF
29505 cat confdefs.h >>conftest.$ac_ext
29506 cat >>conftest.$ac_ext <<_ACEOF
29507 /* end confdefs.h.  */
29508
29509 #include <EXTERN.h>
29510 #include <perl.h>
29511
29512 int
29513 main ()
29514 {
29515 perl_alloc();
29516   ;
29517   return 0;
29518 }
29519 _ACEOF
29520 rm -f conftest.$ac_objext conftest$ac_exeext
29521 if { (ac_try="$ac_link"
29522 case "(($ac_try" in
29523   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29524   *) ac_try_echo=$ac_try;;
29525 esac
29526 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29527 $as_echo "$ac_try_echo") >&5
29528   (eval "$ac_link") 2>conftest.er1
29529   ac_status=$?
29530   grep -v '^ *+' conftest.er1 >conftest.err
29531   rm -f conftest.er1
29532   cat conftest.err >&5
29533   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29534   (exit $ac_status); } && {
29535          test -z "$ac_c_werror_flag" ||
29536          test ! -s conftest.err
29537        } && test -s conftest$ac_exeext && {
29538          test "$cross_compiling" = yes ||
29539          $as_test_x conftest$ac_exeext
29540        }; then
29541   { $as_echo "$as_me:$LINENO: result: yes" >&5
29542 $as_echo "yes" >&6; }
29543 else
29544   $as_echo "$as_me: failed program was:" >&5
29545 sed 's/^/| /' conftest.$ac_ext >&5
29546
29547         { $as_echo "$as_me:$LINENO: result: no" >&5
29548 $as_echo "no" >&6; }
29549      { { $as_echo "$as_me:$LINENO: error: libperl library is required for Perl" >&5
29550 $as_echo "$as_me: error: libperl library is required for Perl" >&2;}
29551    { (exit 1); exit 1; }; }
29552 fi
29553
29554 rm -rf conftest.dSYM
29555 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29556       conftest$ac_exeext conftest.$ac_ext
29557   LIBS=$pgac_save_LIBS
29558   CPPFLAGS=$ac_save_CPPFLAGS
29559 fi
29560
29561 # check for <Python.h>
29562 if test "$with_python" = yes; then
29563   ac_save_CPPFLAGS=$CPPFLAGS
29564   CPPFLAGS="$python_includespec $CPPFLAGS"
29565   if test "${ac_cv_header_Python_h+set}" = set; then
29566   { $as_echo "$as_me:$LINENO: checking for Python.h" >&5
29567 $as_echo_n "checking for Python.h... " >&6; }
29568 if test "${ac_cv_header_Python_h+set}" = set; then
29569   $as_echo_n "(cached) " >&6
29570 fi
29571 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_Python_h" >&5
29572 $as_echo "$ac_cv_header_Python_h" >&6; }
29573 else
29574   # Is the header compilable?
29575 { $as_echo "$as_me:$LINENO: checking Python.h usability" >&5
29576 $as_echo_n "checking Python.h usability... " >&6; }
29577 cat >conftest.$ac_ext <<_ACEOF
29578 /* confdefs.h.  */
29579 _ACEOF
29580 cat confdefs.h >>conftest.$ac_ext
29581 cat >>conftest.$ac_ext <<_ACEOF
29582 /* end confdefs.h.  */
29583 $ac_includes_default
29584 #include <Python.h>
29585 _ACEOF
29586 rm -f conftest.$ac_objext
29587 if { (ac_try="$ac_compile"
29588 case "(($ac_try" in
29589   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29590   *) ac_try_echo=$ac_try;;
29591 esac
29592 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29593 $as_echo "$ac_try_echo") >&5
29594   (eval "$ac_compile") 2>conftest.er1
29595   ac_status=$?
29596   grep -v '^ *+' conftest.er1 >conftest.err
29597   rm -f conftest.er1
29598   cat conftest.err >&5
29599   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29600   (exit $ac_status); } && {
29601          test -z "$ac_c_werror_flag" ||
29602          test ! -s conftest.err
29603        } && test -s conftest.$ac_objext; then
29604   ac_header_compiler=yes
29605 else
29606   $as_echo "$as_me: failed program was:" >&5
29607 sed 's/^/| /' conftest.$ac_ext >&5
29608
29609         ac_header_compiler=no
29610 fi
29611
29612 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29613 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
29614 $as_echo "$ac_header_compiler" >&6; }
29615
29616 # Is the header present?
29617 { $as_echo "$as_me:$LINENO: checking Python.h presence" >&5
29618 $as_echo_n "checking Python.h presence... " >&6; }
29619 cat >conftest.$ac_ext <<_ACEOF
29620 /* confdefs.h.  */
29621 _ACEOF
29622 cat confdefs.h >>conftest.$ac_ext
29623 cat >>conftest.$ac_ext <<_ACEOF
29624 /* end confdefs.h.  */
29625 #include <Python.h>
29626 _ACEOF
29627 if { (ac_try="$ac_cpp conftest.$ac_ext"
29628 case "(($ac_try" in
29629   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29630   *) ac_try_echo=$ac_try;;
29631 esac
29632 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29633 $as_echo "$ac_try_echo") >&5
29634   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
29635   ac_status=$?
29636   grep -v '^ *+' conftest.er1 >conftest.err
29637   rm -f conftest.er1
29638   cat conftest.err >&5
29639   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29640   (exit $ac_status); } >/dev/null && {
29641          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
29642          test ! -s conftest.err
29643        }; then
29644   ac_header_preproc=yes
29645 else
29646   $as_echo "$as_me: failed program was:" >&5
29647 sed 's/^/| /' conftest.$ac_ext >&5
29648
29649   ac_header_preproc=no
29650 fi
29651
29652 rm -f conftest.err conftest.$ac_ext
29653 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
29654 $as_echo "$ac_header_preproc" >&6; }
29655
29656 # So?  What about this header?
29657 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
29658   yes:no: )
29659     { $as_echo "$as_me:$LINENO: WARNING: Python.h: accepted by the compiler, rejected by the preprocessor!" >&5
29660 $as_echo "$as_me: WARNING: Python.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
29661     { $as_echo "$as_me:$LINENO: WARNING: Python.h: proceeding with the compiler's result" >&5
29662 $as_echo "$as_me: WARNING: Python.h: proceeding with the compiler's result" >&2;}
29663     ac_header_preproc=yes
29664     ;;
29665   no:yes:* )
29666     { $as_echo "$as_me:$LINENO: WARNING: Python.h: present but cannot be compiled" >&5
29667 $as_echo "$as_me: WARNING: Python.h: present but cannot be compiled" >&2;}
29668     { $as_echo "$as_me:$LINENO: WARNING: Python.h:     check for missing prerequisite headers?" >&5
29669 $as_echo "$as_me: WARNING: Python.h:     check for missing prerequisite headers?" >&2;}
29670     { $as_echo "$as_me:$LINENO: WARNING: Python.h: see the Autoconf documentation" >&5
29671 $as_echo "$as_me: WARNING: Python.h: see the Autoconf documentation" >&2;}
29672     { $as_echo "$as_me:$LINENO: WARNING: Python.h:     section \"Present But Cannot Be Compiled\"" >&5
29673 $as_echo "$as_me: WARNING: Python.h:     section \"Present But Cannot Be Compiled\"" >&2;}
29674     { $as_echo "$as_me:$LINENO: WARNING: Python.h: proceeding with the preprocessor's result" >&5
29675 $as_echo "$as_me: WARNING: Python.h: proceeding with the preprocessor's result" >&2;}
29676     { $as_echo "$as_me:$LINENO: WARNING: Python.h: in the future, the compiler will take precedence" >&5
29677 $as_echo "$as_me: WARNING: Python.h: in the future, the compiler will take precedence" >&2;}
29678     ( cat <<\_ASBOX
29679 ## ---------------------------------------- ##
29680 ## Report this to pgsql-bugs@postgresql.org ##
29681 ## ---------------------------------------- ##
29682 _ASBOX
29683      ) | sed "s/^/$as_me: WARNING:     /" >&2
29684     ;;
29685 esac
29686 { $as_echo "$as_me:$LINENO: checking for Python.h" >&5
29687 $as_echo_n "checking for Python.h... " >&6; }
29688 if test "${ac_cv_header_Python_h+set}" = set; then
29689   $as_echo_n "(cached) " >&6
29690 else
29691   ac_cv_header_Python_h=$ac_header_preproc
29692 fi
29693 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_Python_h" >&5
29694 $as_echo "$ac_cv_header_Python_h" >&6; }
29695
29696 fi
29697 if test "x$ac_cv_header_Python_h" = x""yes; then
29698   :
29699 else
29700   { { $as_echo "$as_me:$LINENO: error: header file <Python.h> is required for Python" >&5
29701 $as_echo "$as_me: error: header file <Python.h> is required for Python" >&2;}
29702    { (exit 1); exit 1; }; }
29703 fi
29704
29705
29706   CPPFLAGS=$ac_save_CPPFLAGS
29707 fi
29708
29709 #
29710 # Check for DocBook and tools
29711 #
29712 for ac_prog in onsgmls nsgmls
29713 do
29714   # Extract the first word of "$ac_prog", so it can be a program name with args.
29715 set dummy $ac_prog; ac_word=$2
29716 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29717 $as_echo_n "checking for $ac_word... " >&6; }
29718 if test "${ac_cv_prog_NSGMLS+set}" = set; then
29719   $as_echo_n "(cached) " >&6
29720 else
29721   if test -n "$NSGMLS"; then
29722   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
29723 else
29724 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29725 for as_dir in $PATH
29726 do
29727   IFS=$as_save_IFS
29728   test -z "$as_dir" && as_dir=.
29729   for ac_exec_ext in '' $ac_executable_extensions; do
29730   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29731     ac_cv_prog_NSGMLS="$ac_prog"
29732     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29733     break 2
29734   fi
29735 done
29736 done
29737 IFS=$as_save_IFS
29738
29739 fi
29740 fi
29741 NSGMLS=$ac_cv_prog_NSGMLS
29742 if test -n "$NSGMLS"; then
29743   { $as_echo "$as_me:$LINENO: result: $NSGMLS" >&5
29744 $as_echo "$NSGMLS" >&6; }
29745 else
29746   { $as_echo "$as_me:$LINENO: result: no" >&5
29747 $as_echo "no" >&6; }
29748 fi
29749
29750
29751   test -n "$NSGMLS" && break
29752 done
29753
29754 for ac_prog in openjade jade
29755 do
29756   # Extract the first word of "$ac_prog", so it can be a program name with args.
29757 set dummy $ac_prog; ac_word=$2
29758 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29759 $as_echo_n "checking for $ac_word... " >&6; }
29760 if test "${ac_cv_prog_JADE+set}" = set; then
29761   $as_echo_n "(cached) " >&6
29762 else
29763   if test -n "$JADE"; then
29764   ac_cv_prog_JADE="$JADE" # Let the user override the test.
29765 else
29766 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29767 for as_dir in $PATH
29768 do
29769   IFS=$as_save_IFS
29770   test -z "$as_dir" && as_dir=.
29771   for ac_exec_ext in '' $ac_executable_extensions; do
29772   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29773     ac_cv_prog_JADE="$ac_prog"
29774     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29775     break 2
29776   fi
29777 done
29778 done
29779 IFS=$as_save_IFS
29780
29781 fi
29782 fi
29783 JADE=$ac_cv_prog_JADE
29784 if test -n "$JADE"; then
29785   { $as_echo "$as_me:$LINENO: result: $JADE" >&5
29786 $as_echo "$JADE" >&6; }
29787 else
29788   { $as_echo "$as_me:$LINENO: result: no" >&5
29789 $as_echo "no" >&6; }
29790 fi
29791
29792
29793   test -n "$JADE" && break
29794 done
29795
29796
29797 { $as_echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
29798 $as_echo_n "checking for DocBook V4.2... " >&6; }
29799 if test "${pgac_cv_check_docbook+set}" = set; then
29800   $as_echo_n "(cached) " >&6
29801 else
29802   cat >conftest.sgml <<EOF
29803 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
29804 <book>
29805  <title>test</title>
29806  <chapter>
29807   <title>random</title>
29808    <sect1>
29809     <title>testsect</title>
29810     <para>text</para>
29811   </sect1>
29812  </chapter>
29813 </book>
29814 EOF
29815
29816 pgac_cv_check_docbook=no
29817
29818 if test -n "$NSGMLS"; then
29819   $NSGMLS -s conftest.sgml 1>&5 2>&1
29820   if test $? -eq 0; then
29821     pgac_cv_check_docbook=yes
29822   fi
29823 fi
29824 rm -f conftest.sgml
29825 fi
29826 { $as_echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
29827 $as_echo "$pgac_cv_check_docbook" >&6; }
29828
29829 have_docbook=$pgac_cv_check_docbook
29830
29831
29832 { $as_echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
29833 $as_echo_n "checking for DocBook stylesheets... " >&6; }
29834 if test "${pgac_cv_path_stylesheets+set}" = set; then
29835   $as_echo_n "(cached) " >&6
29836 else
29837   if test -n "$DOCBOOKSTYLE"; then
29838   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
29839 else
29840   for pgac_prefix in /usr /usr/local /opt /sw; do
29841     for pgac_infix in share lib; do
29842       for pgac_postfix in \
29843         sgml/stylesheets/nwalsh-modular \
29844         sgml/stylesheets/docbook \
29845         sgml/stylesheets/dsssl/docbook \
29846         sgml/docbook-dsssl \
29847         sgml/docbook/dsssl/modular \
29848         sgml/docbook/stylesheet/dsssl/modular \
29849         sgml/docbook/dsssl-stylesheets \
29850         sgml/dsssl/docbook-dsssl-nwalsh
29851       do
29852         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
29853         if test -r "$pgac_candidate/html/docbook.dsl" \
29854            && test -r "$pgac_candidate/print/docbook.dsl"
29855         then
29856           pgac_cv_path_stylesheets=$pgac_candidate
29857           break 3
29858         fi
29859       done
29860     done
29861   done
29862 fi
29863 fi
29864
29865 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
29866
29867 if test -n "$DOCBOOKSTYLE"; then
29868   { $as_echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
29869 $as_echo "$DOCBOOKSTYLE" >&6; }
29870 else
29871   { $as_echo "$as_me:$LINENO: result: no" >&5
29872 $as_echo "no" >&6; }
29873 fi
29874 if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
29875   COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
29876
29877 else
29878   # Extract the first word of "collateindex.pl", so it can be a program name with args.
29879 set dummy collateindex.pl; ac_word=$2
29880 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29881 $as_echo_n "checking for $ac_word... " >&6; }
29882 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
29883   $as_echo_n "(cached) " >&6
29884 else
29885   case $COLLATEINDEX in
29886   [\\/]* | ?:[\\/]*)
29887   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
29888   ;;
29889   *)
29890   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29891 for as_dir in $PATH
29892 do
29893   IFS=$as_save_IFS
29894   test -z "$as_dir" && as_dir=.
29895   for ac_exec_ext in '' $ac_executable_extensions; do
29896   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29897     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
29898     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29899     break 2
29900   fi
29901 done
29902 done
29903 IFS=$as_save_IFS
29904
29905   ;;
29906 esac
29907 fi
29908 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
29909 if test -n "$COLLATEINDEX"; then
29910   { $as_echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
29911 $as_echo "$COLLATEINDEX" >&6; }
29912 else
29913   { $as_echo "$as_me:$LINENO: result: no" >&5
29914 $as_echo "no" >&6; }
29915 fi
29916
29917
29918 fi
29919 for ac_prog in xsltproc
29920 do
29921   # Extract the first word of "$ac_prog", so it can be a program name with args.
29922 set dummy $ac_prog; ac_word=$2
29923 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29924 $as_echo_n "checking for $ac_word... " >&6; }
29925 if test "${ac_cv_prog_XSLTPROC+set}" = set; then
29926   $as_echo_n "(cached) " >&6
29927 else
29928   if test -n "$XSLTPROC"; then
29929   ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
29930 else
29931 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29932 for as_dir in $PATH
29933 do
29934   IFS=$as_save_IFS
29935   test -z "$as_dir" && as_dir=.
29936   for ac_exec_ext in '' $ac_executable_extensions; do
29937   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29938     ac_cv_prog_XSLTPROC="$ac_prog"
29939     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29940     break 2
29941   fi
29942 done
29943 done
29944 IFS=$as_save_IFS
29945
29946 fi
29947 fi
29948 XSLTPROC=$ac_cv_prog_XSLTPROC
29949 if test -n "$XSLTPROC"; then
29950   { $as_echo "$as_me:$LINENO: result: $XSLTPROC" >&5
29951 $as_echo "$XSLTPROC" >&6; }
29952 else
29953   { $as_echo "$as_me:$LINENO: result: no" >&5
29954 $as_echo "no" >&6; }
29955 fi
29956
29957
29958   test -n "$XSLTPROC" && break
29959 done
29960
29961 for ac_prog in osx sgml2xml sx
29962 do
29963   # Extract the first word of "$ac_prog", so it can be a program name with args.
29964 set dummy $ac_prog; ac_word=$2
29965 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29966 $as_echo_n "checking for $ac_word... " >&6; }
29967 if test "${ac_cv_prog_OSX+set}" = set; then
29968   $as_echo_n "(cached) " >&6
29969 else
29970   if test -n "$OSX"; then
29971   ac_cv_prog_OSX="$OSX" # Let the user override the test.
29972 else
29973 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29974 for as_dir in $PATH
29975 do
29976   IFS=$as_save_IFS
29977   test -z "$as_dir" && as_dir=.
29978   for ac_exec_ext in '' $ac_executable_extensions; do
29979   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29980     ac_cv_prog_OSX="$ac_prog"
29981     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29982     break 2
29983   fi
29984 done
29985 done
29986 IFS=$as_save_IFS
29987
29988 fi
29989 fi
29990 OSX=$ac_cv_prog_OSX
29991 if test -n "$OSX"; then
29992   { $as_echo "$as_me:$LINENO: result: $OSX" >&5
29993 $as_echo "$OSX" >&6; }
29994 else
29995   { $as_echo "$as_me:$LINENO: result: no" >&5
29996 $as_echo "no" >&6; }
29997 fi
29998
29999
30000   test -n "$OSX" && break
30001 done
30002
30003
30004 # Thread testing
30005
30006 # We have to run the thread test near the end so we have all our symbols
30007 # defined.  Cross compiling throws a warning.
30008 #
30009 if test "$enable_thread_safety" = yes; then
30010 if test "$PORTNAME" != "win32"
30011 then
30012 { $as_echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
30013 $as_echo_n "checking thread safety of required library functions... " >&6; }
30014
30015 _CFLAGS="$CFLAGS"
30016 _LIBS="$LIBS"
30017 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
30018 LIBS="$LIBS $PTHREAD_LIBS"
30019 if test "$cross_compiling" = yes; then
30020   { $as_echo "$as_me:$LINENO: result: maybe" >&5
30021 $as_echo "maybe" >&6; }
30022   { $as_echo "$as_me:$LINENO: WARNING:
30023 *** Skipping thread test program because of cross-compile build.
30024 *** Run the program in src/test/thread on the target machine.
30025 " >&5
30026 $as_echo "$as_me: WARNING:
30027 *** Skipping thread test program because of cross-compile build.
30028 *** Run the program in src/test/thread on the target machine.
30029 " >&2;}
30030 else
30031   cat >conftest.$ac_ext <<_ACEOF
30032 /* confdefs.h.  */
30033 _ACEOF
30034 cat confdefs.h >>conftest.$ac_ext
30035 cat >>conftest.$ac_ext <<_ACEOF
30036 /* end confdefs.h.  */
30037 #include "$srcdir/src/test/thread/thread_test.c"
30038 _ACEOF
30039 rm -f conftest$ac_exeext
30040 if { (ac_try="$ac_link"
30041 case "(($ac_try" in
30042   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30043   *) ac_try_echo=$ac_try;;
30044 esac
30045 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30046 $as_echo "$ac_try_echo") >&5
30047   (eval "$ac_link") 2>&5
30048   ac_status=$?
30049   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30050   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
30051   { (case "(($ac_try" in
30052   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30053   *) ac_try_echo=$ac_try;;
30054 esac
30055 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30056 $as_echo "$ac_try_echo") >&5
30057   (eval "$ac_try") 2>&5
30058   ac_status=$?
30059   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30060   (exit $ac_status); }; }; then
30061   { $as_echo "$as_me:$LINENO: result: yes" >&5
30062 $as_echo "yes" >&6; }
30063 else
30064   $as_echo "$as_me: program exited with status $ac_status" >&5
30065 $as_echo "$as_me: failed program was:" >&5
30066 sed 's/^/| /' conftest.$ac_ext >&5
30067
30068 ( exit $ac_status )
30069 { $as_echo "$as_me:$LINENO: result: no" >&5
30070 $as_echo "no" >&6; }
30071   { { $as_echo "$as_me:$LINENO: error: thread test program failed
30072 This platform is not thread-safe.  Check the file 'config.log' or compile
30073 and run src/test/thread/thread_test for the exact reason.
30074 Use --disable-thread-safety to disable thread safety." >&5
30075 $as_echo "$as_me: error: thread test program failed
30076 This platform is not thread-safe.  Check the file 'config.log' or compile
30077 and run src/test/thread/thread_test for the exact reason.
30078 Use --disable-thread-safety to disable thread safety." >&2;}
30079    { (exit 1); exit 1; }; }
30080 fi
30081 rm -rf conftest.dSYM
30082 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
30083 fi
30084
30085
30086 CFLAGS="$_CFLAGS"
30087 LIBS="$_LIBS"
30088 else
30089 { $as_echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
30090 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
30091 fi
30092 fi
30093
30094 # If compiler will take -Wl,--as-needed (or various platform-specific
30095 # spellings thereof) then add that to LDFLAGS.  This is much easier than
30096 # trying to filter LIBS to the minimum for each executable.
30097 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
30098 # libreadline; therefore we postpone testing it until we know what library
30099 # dependencies readline has.  The test code will try to link with $LIBS.
30100 if test "$with_readline" = yes; then
30101   link_test_func=readline
30102 else
30103   link_test_func=exit
30104 fi
30105
30106 if test "$PORTNAME" = "darwin"; then
30107   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
30108 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
30109 if test "${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+set}" = set; then
30110   $as_echo_n "(cached) " >&6
30111 else
30112   pgac_save_LDFLAGS=$LDFLAGS
30113 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
30114 if test "$cross_compiling" = yes; then
30115   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
30116 else
30117   cat >conftest.$ac_ext <<_ACEOF
30118 /* confdefs.h.  */
30119 _ACEOF
30120 cat confdefs.h >>conftest.$ac_ext
30121 cat >>conftest.$ac_ext <<_ACEOF
30122 /* end confdefs.h.  */
30123 extern void $link_test_func (); void (*fptr) () = $link_test_func;
30124 int
30125 main ()
30126 {
30127
30128   ;
30129   return 0;
30130 }
30131 _ACEOF
30132 rm -f conftest$ac_exeext
30133 if { (ac_try="$ac_link"
30134 case "(($ac_try" in
30135   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30136   *) ac_try_echo=$ac_try;;
30137 esac
30138 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30139 $as_echo "$ac_try_echo") >&5
30140   (eval "$ac_link") 2>&5
30141   ac_status=$?
30142   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30143   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
30144   { (case "(($ac_try" in
30145   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30146   *) ac_try_echo=$ac_try;;
30147 esac
30148 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30149 $as_echo "$ac_try_echo") >&5
30150   (eval "$ac_try") 2>&5
30151   ac_status=$?
30152   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30153   (exit $ac_status); }; }; then
30154   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
30155 else
30156   $as_echo "$as_me: program exited with status $ac_status" >&5
30157 $as_echo "$as_me: failed program was:" >&5
30158 sed 's/^/| /' conftest.$ac_ext >&5
30159
30160 ( exit $ac_status )
30161 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
30162 fi
30163 rm -rf conftest.dSYM
30164 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
30165 fi
30166
30167
30168 LDFLAGS="$pgac_save_LDFLAGS"
30169 fi
30170 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
30171 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
30172 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
30173   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
30174 fi
30175
30176 elif test "$PORTNAME" = "openbsd"; then
30177   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wl,-Bdynamic" >&5
30178 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
30179 if test "${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+set}" = set; then
30180   $as_echo_n "(cached) " >&6
30181 else
30182   pgac_save_LDFLAGS=$LDFLAGS
30183 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
30184 if test "$cross_compiling" = yes; then
30185   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
30186 else
30187   cat >conftest.$ac_ext <<_ACEOF
30188 /* confdefs.h.  */
30189 _ACEOF
30190 cat confdefs.h >>conftest.$ac_ext
30191 cat >>conftest.$ac_ext <<_ACEOF
30192 /* end confdefs.h.  */
30193 extern void $link_test_func (); void (*fptr) () = $link_test_func;
30194 int
30195 main ()
30196 {
30197
30198   ;
30199   return 0;
30200 }
30201 _ACEOF
30202 rm -f conftest$ac_exeext
30203 if { (ac_try="$ac_link"
30204 case "(($ac_try" in
30205   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30206   *) ac_try_echo=$ac_try;;
30207 esac
30208 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30209 $as_echo "$ac_try_echo") >&5
30210   (eval "$ac_link") 2>&5
30211   ac_status=$?
30212   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30213   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
30214   { (case "(($ac_try" in
30215   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30216   *) ac_try_echo=$ac_try;;
30217 esac
30218 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30219 $as_echo "$ac_try_echo") >&5
30220   (eval "$ac_try") 2>&5
30221   ac_status=$?
30222   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30223   (exit $ac_status); }; }; then
30224   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
30225 else
30226   $as_echo "$as_me: program exited with status $ac_status" >&5
30227 $as_echo "$as_me: failed program was:" >&5
30228 sed 's/^/| /' conftest.$ac_ext >&5
30229
30230 ( exit $ac_status )
30231 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
30232 fi
30233 rm -rf conftest.dSYM
30234 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
30235 fi
30236
30237
30238 LDFLAGS="$pgac_save_LDFLAGS"
30239 fi
30240 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
30241 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
30242 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
30243   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
30244 fi
30245
30246 else
30247   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wl,--as-needed" >&5
30248 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
30249 if test "${pgac_cv_prog_cc_ldflags__Wl___as_needed+set}" = set; then
30250   $as_echo_n "(cached) " >&6
30251 else
30252   pgac_save_LDFLAGS=$LDFLAGS
30253 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
30254 if test "$cross_compiling" = yes; then
30255   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
30256 else
30257   cat >conftest.$ac_ext <<_ACEOF
30258 /* confdefs.h.  */
30259 _ACEOF
30260 cat confdefs.h >>conftest.$ac_ext
30261 cat >>conftest.$ac_ext <<_ACEOF
30262 /* end confdefs.h.  */
30263 extern void $link_test_func (); void (*fptr) () = $link_test_func;
30264 int
30265 main ()
30266 {
30267
30268   ;
30269   return 0;
30270 }
30271 _ACEOF
30272 rm -f conftest$ac_exeext
30273 if { (ac_try="$ac_link"
30274 case "(($ac_try" in
30275   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30276   *) ac_try_echo=$ac_try;;
30277 esac
30278 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30279 $as_echo "$ac_try_echo") >&5
30280   (eval "$ac_link") 2>&5
30281   ac_status=$?
30282   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30283   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
30284   { (case "(($ac_try" in
30285   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30286   *) ac_try_echo=$ac_try;;
30287 esac
30288 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30289 $as_echo "$ac_try_echo") >&5
30290   (eval "$ac_try") 2>&5
30291   ac_status=$?
30292   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30293   (exit $ac_status); }; }; then
30294   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
30295 else
30296   $as_echo "$as_me: program exited with status $ac_status" >&5
30297 $as_echo "$as_me: failed program was:" >&5
30298 sed 's/^/| /' conftest.$ac_ext >&5
30299
30300 ( exit $ac_status )
30301 pgac_cv_prog_cc_ldflags__Wl___as_needed=no
30302 fi
30303 rm -rf conftest.dSYM
30304 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
30305 fi
30306
30307
30308 LDFLAGS="$pgac_save_LDFLAGS"
30309 fi
30310 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
30311 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
30312 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
30313   LDFLAGS="$LDFLAGS -Wl,--as-needed"
30314 fi
30315
30316 fi
30317
30318 # Create compiler version string
30319 if test x"$GCC" = x"yes" ; then
30320   cc_string=`${CC} --version | sed q`
30321   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
30322 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
30323   cc_string=`${CC} -V 2>&1 | sed q`
30324 else
30325   cc_string=$CC
30326 fi
30327
30328
30329 cat >>confdefs.h <<_ACEOF
30330 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
30331 _ACEOF
30332
30333
30334 # Supply a numeric version string for use by 3rd party add-ons
30335 # awk -F is a regex on some platforms, and not on others, so make "." a tab
30336 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
30337 tr '.' '        ' |
30338 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
30339
30340 cat >>confdefs.h <<_ACEOF
30341 #define PG_VERSION_NUM $PG_VERSION_NUM
30342 _ACEOF
30343
30344
30345
30346 # Begin output steps
30347
30348 { $as_echo "$as_me:$LINENO: using compiler=$cc_string" >&5
30349 $as_echo "$as_me: using compiler=$cc_string" >&6;}
30350 { $as_echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
30351 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
30352 { $as_echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
30353 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
30354 { $as_echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
30355 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
30356
30357 # prepare build tree if outside source tree
30358 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
30359 # Note 2: /bin/pwd might be better than shell's built-in at getting
30360 #         a symlink-free name.
30361 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
30362   vpath_build=no
30363 else
30364   vpath_build=yes
30365   if test "$no_create" != yes; then
30366     $as_echo_n "preparing build tree... " >&6
30367     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
30368     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
30369       || { { $as_echo "$as_me:$LINENO: error: failed" >&5
30370 $as_echo "$as_me: error: failed" >&2;}
30371    { (exit 1); exit 1; }; }
30372     { $as_echo "$as_me:$LINENO: result: done" >&5
30373 $as_echo "done" >&6; }
30374   fi
30375 fi
30376
30377
30378
30379 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
30380
30381
30382 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/backend/port/pg_latch.c:${LATCH_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}"
30383
30384
30385 if test "$PORTNAME" = "win32"; then
30386 ac_config_commands="$ac_config_commands check_win32_symlinks"
30387
30388 fi
30389
30390 ac_config_headers="$ac_config_headers src/include/pg_config.h"
30391
30392
30393 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
30394
30395
30396 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
30397
30398
30399 cat >confcache <<\_ACEOF
30400 # This file is a shell script that caches the results of configure
30401 # tests run on this system so they can be shared between configure
30402 # scripts and configure runs, see configure's option --config-cache.
30403 # It is not useful on other systems.  If it contains results you don't
30404 # want to keep, you may remove or edit it.
30405 #
30406 # config.status only pays attention to the cache file if you give it
30407 # the --recheck option to rerun configure.
30408 #
30409 # `ac_cv_env_foo' variables (set or unset) will be overridden when
30410 # loading this file, other *unset* `ac_cv_foo' will be assigned the
30411 # following values.
30412
30413 _ACEOF
30414
30415 # The following way of writing the cache mishandles newlines in values,
30416 # but we know of no workaround that is simple, portable, and efficient.
30417 # So, we kill variables containing newlines.
30418 # Ultrix sh set writes to stderr and can't be redirected directly,
30419 # and sets the high bit in the cache file unless we assign to the vars.
30420 (
30421   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
30422     eval ac_val=\$$ac_var
30423     case $ac_val in #(
30424     *${as_nl}*)
30425       case $ac_var in #(
30426       *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
30427 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
30428       esac
30429       case $ac_var in #(
30430       _ | IFS | as_nl) ;; #(
30431       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
30432       *) $as_unset $ac_var ;;
30433       esac ;;
30434     esac
30435   done
30436
30437   (set) 2>&1 |
30438     case $as_nl`(ac_space=' '; set) 2>&1` in #(
30439     *${as_nl}ac_space=\ *)
30440       # `set' does not quote correctly, so add quotes (double-quote
30441       # substitution turns \\\\ into \\, and sed turns \\ into \).
30442       sed -n \
30443         "s/'/'\\\\''/g;
30444           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
30445       ;; #(
30446     *)
30447       # `set' quotes correctly as required by POSIX, so do not add quotes.
30448       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
30449       ;;
30450     esac |
30451     sort
30452 ) |
30453   sed '
30454      /^ac_cv_env_/b end
30455      t clear
30456      :clear
30457      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
30458      t end
30459      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
30460      :end' >>confcache
30461 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
30462   if test -w "$cache_file"; then
30463     test "x$cache_file" != "x/dev/null" &&
30464       { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
30465 $as_echo "$as_me: updating cache $cache_file" >&6;}
30466     cat confcache >$cache_file
30467   else
30468     { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
30469 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
30470   fi
30471 fi
30472 rm -f confcache
30473
30474 test "x$prefix" = xNONE && prefix=$ac_default_prefix
30475 # Let make expand exec_prefix.
30476 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
30477
30478 DEFS=-DHAVE_CONFIG_H
30479
30480 ac_libobjs=
30481 ac_ltlibobjs=
30482 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
30483   # 1. Remove the extension, and $U if already installed.
30484   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
30485   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
30486   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
30487   #    will be set to the directory where LIBOBJS objects are built.
30488   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
30489   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
30490 done
30491 LIBOBJS=$ac_libobjs
30492
30493 LTLIBOBJS=$ac_ltlibobjs
30494
30495
30496
30497
30498 : ${CONFIG_STATUS=./config.status}
30499 ac_write_fail=0
30500 ac_clean_files_save=$ac_clean_files
30501 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
30502 { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
30503 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
30504 cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30505 #! $SHELL
30506 # Generated by $as_me.
30507 # Run this file to recreate the current configuration.
30508 # Compiler output produced by configure, useful for debugging
30509 # configure, is in config.log if it exists.
30510
30511 debug=false
30512 ac_cs_recheck=false
30513 ac_cs_silent=false
30514 SHELL=\${CONFIG_SHELL-$SHELL}
30515 _ACEOF
30516
30517 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30518 ## --------------------- ##
30519 ## M4sh Initialization.  ##
30520 ## --------------------- ##
30521
30522 # Be more Bourne compatible
30523 DUALCASE=1; export DUALCASE # for MKS sh
30524 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
30525   emulate sh
30526   NULLCMD=:
30527   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
30528   # is contrary to our usage.  Disable this feature.
30529   alias -g '${1+"$@"}'='"$@"'
30530   setopt NO_GLOB_SUBST
30531 else
30532   case `(set -o) 2>/dev/null` in
30533   *posix*) set -o posix ;;
30534 esac
30535
30536 fi
30537
30538
30539
30540
30541 # PATH needs CR
30542 # Avoid depending upon Character Ranges.
30543 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
30544 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
30545 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
30546 as_cr_digits='0123456789'
30547 as_cr_alnum=$as_cr_Letters$as_cr_digits
30548
30549 as_nl='
30550 '
30551 export as_nl
30552 # Printing a long string crashes Solaris 7 /usr/bin/printf.
30553 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
30554 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
30555 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
30556 if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
30557   as_echo='printf %s\n'
30558   as_echo_n='printf %s'
30559 else
30560   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
30561     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
30562     as_echo_n='/usr/ucb/echo -n'
30563   else
30564     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
30565     as_echo_n_body='eval
30566       arg=$1;
30567       case $arg in
30568       *"$as_nl"*)
30569         expr "X$arg" : "X\\(.*\\)$as_nl";
30570         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
30571       esac;
30572       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
30573     '
30574     export as_echo_n_body
30575     as_echo_n='sh -c $as_echo_n_body as_echo'
30576   fi
30577   export as_echo_body
30578   as_echo='sh -c $as_echo_body as_echo'
30579 fi
30580
30581 # The user is always right.
30582 if test "${PATH_SEPARATOR+set}" != set; then
30583   PATH_SEPARATOR=:
30584   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
30585     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
30586       PATH_SEPARATOR=';'
30587   }
30588 fi
30589
30590 # Support unset when possible.
30591 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
30592   as_unset=unset
30593 else
30594   as_unset=false
30595 fi
30596
30597
30598 # IFS
30599 # We need space, tab and new line, in precisely that order.  Quoting is
30600 # there to prevent editors from complaining about space-tab.
30601 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
30602 # splitting by setting IFS to empty value.)
30603 IFS=" ""        $as_nl"
30604
30605 # Find who we are.  Look in the path if we contain no directory separator.
30606 case $0 in
30607   *[\\/]* ) as_myself=$0 ;;
30608   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30609 for as_dir in $PATH
30610 do
30611   IFS=$as_save_IFS
30612   test -z "$as_dir" && as_dir=.
30613   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
30614 done
30615 IFS=$as_save_IFS
30616
30617      ;;
30618 esac
30619 # We did not find ourselves, most probably we were run as `sh COMMAND'
30620 # in which case we are not to be found in the path.
30621 if test "x$as_myself" = x; then
30622   as_myself=$0
30623 fi
30624 if test ! -f "$as_myself"; then
30625   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
30626   { (exit 1); exit 1; }
30627 fi
30628
30629 # Work around bugs in pre-3.0 UWIN ksh.
30630 for as_var in ENV MAIL MAILPATH
30631 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
30632 done
30633 PS1='$ '
30634 PS2='> '
30635 PS4='+ '
30636
30637 # NLS nuisances.
30638 LC_ALL=C
30639 export LC_ALL
30640 LANGUAGE=C
30641 export LANGUAGE
30642
30643 # Required to use basename.
30644 if expr a : '\(a\)' >/dev/null 2>&1 &&
30645    test "X`expr 00001 : '.*\(...\)'`" = X001; then
30646   as_expr=expr
30647 else
30648   as_expr=false
30649 fi
30650
30651 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
30652   as_basename=basename
30653 else
30654   as_basename=false
30655 fi
30656
30657
30658 # Name of the executable.
30659 as_me=`$as_basename -- "$0" ||
30660 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
30661          X"$0" : 'X\(//\)$' \| \
30662          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
30663 $as_echo X/"$0" |
30664     sed '/^.*\/\([^/][^/]*\)\/*$/{
30665             s//\1/
30666             q
30667           }
30668           /^X\/\(\/\/\)$/{
30669             s//\1/
30670             q
30671           }
30672           /^X\/\(\/\).*/{
30673             s//\1/
30674             q
30675           }
30676           s/.*/./; q'`
30677
30678 # CDPATH.
30679 $as_unset CDPATH
30680
30681
30682
30683   as_lineno_1=$LINENO
30684   as_lineno_2=$LINENO
30685   test "x$as_lineno_1" != "x$as_lineno_2" &&
30686   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
30687
30688   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
30689   # uniformly replaced by the line number.  The first 'sed' inserts a
30690   # line-number line after each line using $LINENO; the second 'sed'
30691   # does the real work.  The second script uses 'N' to pair each
30692   # line-number line with the line containing $LINENO, and appends
30693   # trailing '-' during substitution so that $LINENO is not a special
30694   # case at line end.
30695   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
30696   # scripts with optimization help from Paolo Bonzini.  Blame Lee
30697   # E. McMahon (1931-1989) for sed's syntax.  :-)
30698   sed -n '
30699     p
30700     /[$]LINENO/=
30701   ' <$as_myself |
30702     sed '
30703       s/[$]LINENO.*/&-/
30704       t lineno
30705       b
30706       :lineno
30707       N
30708       :loop
30709       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
30710       t loop
30711       s/-\n.*//
30712     ' >$as_me.lineno &&
30713   chmod +x "$as_me.lineno" ||
30714     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
30715    { (exit 1); exit 1; }; }
30716
30717   # Don't try to exec as it changes $[0], causing all sort of problems
30718   # (the dirname of $[0] is not the place where we might find the
30719   # original and so on.  Autoconf is especially sensitive to this).
30720   . "./$as_me.lineno"
30721   # Exit status is that of the last command.
30722   exit
30723 }
30724
30725
30726 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
30727   as_dirname=dirname
30728 else
30729   as_dirname=false
30730 fi
30731
30732 ECHO_C= ECHO_N= ECHO_T=
30733 case `echo -n x` in
30734 -n*)
30735   case `echo 'x\c'` in
30736   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
30737   *)   ECHO_C='\c';;
30738   esac;;
30739 *)
30740   ECHO_N='-n';;
30741 esac
30742 if expr a : '\(a\)' >/dev/null 2>&1 &&
30743    test "X`expr 00001 : '.*\(...\)'`" = X001; then
30744   as_expr=expr
30745 else
30746   as_expr=false
30747 fi
30748
30749 rm -f conf$$ conf$$.exe conf$$.file
30750 if test -d conf$$.dir; then
30751   rm -f conf$$.dir/conf$$.file
30752 else
30753   rm -f conf$$.dir
30754   mkdir conf$$.dir 2>/dev/null
30755 fi
30756 if (echo >conf$$.file) 2>/dev/null; then
30757   if ln -s conf$$.file conf$$ 2>/dev/null; then
30758     as_ln_s='ln -s'
30759     # ... but there are two gotchas:
30760     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
30761     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
30762     # In both cases, we have to default to `cp -p'.
30763     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
30764       as_ln_s='cp -p'
30765   elif ln conf$$.file conf$$ 2>/dev/null; then
30766     as_ln_s=ln
30767   else
30768     as_ln_s='cp -p'
30769   fi
30770 else
30771   as_ln_s='cp -p'
30772 fi
30773 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
30774 rmdir conf$$.dir 2>/dev/null
30775
30776 if mkdir -p . 2>/dev/null; then
30777   as_mkdir_p=:
30778 else
30779   test -d ./-p && rmdir ./-p
30780   as_mkdir_p=false
30781 fi
30782
30783 if test -x / >/dev/null 2>&1; then
30784   as_test_x='test -x'
30785 else
30786   if ls -dL / >/dev/null 2>&1; then
30787     as_ls_L_option=L
30788   else
30789     as_ls_L_option=
30790   fi
30791   as_test_x='
30792     eval sh -c '\''
30793       if test -d "$1"; then
30794         test -d "$1/.";
30795       else
30796         case $1 in
30797         -*)set "./$1";;
30798         esac;
30799         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
30800         ???[sx]*):;;*)false;;esac;fi
30801     '\'' sh
30802   '
30803 fi
30804 as_executable_p=$as_test_x
30805
30806 # Sed expression to map a string onto a valid CPP name.
30807 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
30808
30809 # Sed expression to map a string onto a valid variable name.
30810 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
30811
30812
30813 exec 6>&1
30814
30815 # Save the log message, to keep $[0] and so on meaningful, and to
30816 # report actual input values of CONFIG_FILES etc. instead of their
30817 # values after options handling.
30818 ac_log="
30819 This file was extended by PostgreSQL $as_me 9.4devel, which was
30820 generated by GNU Autoconf 2.63.  Invocation command line was
30821
30822   CONFIG_FILES    = $CONFIG_FILES
30823   CONFIG_HEADERS  = $CONFIG_HEADERS
30824   CONFIG_LINKS    = $CONFIG_LINKS
30825   CONFIG_COMMANDS = $CONFIG_COMMANDS
30826   $ $0 $@
30827
30828 on `(hostname || uname -n) 2>/dev/null | sed 1q`
30829 "
30830
30831 _ACEOF
30832
30833 case $ac_config_files in *"
30834 "*) set x $ac_config_files; shift; ac_config_files=$*;;
30835 esac
30836
30837 case $ac_config_headers in *"
30838 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
30839 esac
30840
30841
30842 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30843 # Files that config.status was made for.
30844 config_files="$ac_config_files"
30845 config_headers="$ac_config_headers"
30846 config_links="$ac_config_links"
30847 config_commands="$ac_config_commands"
30848
30849 _ACEOF
30850
30851 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30852 ac_cs_usage="\
30853 \`$as_me' instantiates files from templates according to the
30854 current configuration.
30855
30856 Usage: $0 [OPTION]... [FILE]...
30857
30858   -h, --help       print this help, then exit
30859   -V, --version    print version number and configuration settings, then exit
30860   -q, --quiet, --silent
30861                    do not print progress messages
30862   -d, --debug      don't remove temporary files
30863       --recheck    update $as_me by reconfiguring in the same conditions
30864       --file=FILE[:TEMPLATE]
30865                    instantiate the configuration file FILE
30866       --header=FILE[:TEMPLATE]
30867                    instantiate the configuration header FILE
30868
30869 Configuration files:
30870 $config_files
30871
30872 Configuration headers:
30873 $config_headers
30874
30875 Configuration links:
30876 $config_links
30877
30878 Configuration commands:
30879 $config_commands
30880
30881 Report bugs to <bug-autoconf@gnu.org>."
30882
30883 _ACEOF
30884 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30885 ac_cs_version="\\
30886 PostgreSQL config.status 9.4devel
30887 configured by $0, generated by GNU Autoconf 2.63,
30888   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
30889
30890 Copyright (C) 2008 Free Software Foundation, Inc.
30891 This config.status script is free software; the Free Software Foundation
30892 gives unlimited permission to copy, distribute and modify it."
30893
30894 ac_pwd='$ac_pwd'
30895 srcdir='$srcdir'
30896 INSTALL='$INSTALL'
30897 MKDIR_P='$MKDIR_P'
30898 AWK='$AWK'
30899 test -n "\$AWK" || AWK=awk
30900 _ACEOF
30901
30902 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30903 # The default lists apply if the user does not specify any file.
30904 ac_need_defaults=:
30905 while test $# != 0
30906 do
30907   case $1 in
30908   --*=*)
30909     ac_option=`expr "X$1" : 'X\([^=]*\)='`
30910     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
30911     ac_shift=:
30912     ;;
30913   *)
30914     ac_option=$1
30915     ac_optarg=$2
30916     ac_shift=shift
30917     ;;
30918   esac
30919
30920   case $ac_option in
30921   # Handling of the options.
30922   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
30923     ac_cs_recheck=: ;;
30924   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
30925     $as_echo "$ac_cs_version"; exit ;;
30926   --debug | --debu | --deb | --de | --d | -d )
30927     debug=: ;;
30928   --file | --fil | --fi | --f )
30929     $ac_shift
30930     case $ac_optarg in
30931     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
30932     esac
30933     CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
30934     ac_need_defaults=false;;
30935   --header | --heade | --head | --hea )
30936     $ac_shift
30937     case $ac_optarg in
30938     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
30939     esac
30940     CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
30941     ac_need_defaults=false;;
30942   --he | --h)
30943     # Conflict between --help and --header
30944     { $as_echo "$as_me: error: ambiguous option: $1
30945 Try \`$0 --help' for more information." >&2
30946    { (exit 1); exit 1; }; };;
30947   --help | --hel | -h )
30948     $as_echo "$ac_cs_usage"; exit ;;
30949   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
30950   | -silent | --silent | --silen | --sile | --sil | --si | --s)
30951     ac_cs_silent=: ;;
30952
30953   # This is an error.
30954   -*) { $as_echo "$as_me: error: unrecognized option: $1
30955 Try \`$0 --help' for more information." >&2
30956    { (exit 1); exit 1; }; } ;;
30957
30958   *) ac_config_targets="$ac_config_targets $1"
30959      ac_need_defaults=false ;;
30960
30961   esac
30962   shift
30963 done
30964
30965 ac_configure_extra_args=
30966
30967 if $ac_cs_silent; then
30968   exec 6>/dev/null
30969   ac_configure_extra_args="$ac_configure_extra_args --silent"
30970 fi
30971
30972 _ACEOF
30973 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30974 if \$ac_cs_recheck; then
30975   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
30976   shift
30977   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
30978   CONFIG_SHELL='$SHELL'
30979   export CONFIG_SHELL
30980   exec "\$@"
30981 fi
30982
30983 _ACEOF
30984 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30985 exec 5>>config.log
30986 {
30987   echo
30988   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
30989 ## Running $as_me. ##
30990 _ASBOX
30991   $as_echo "$ac_log"
30992 } >&5
30993
30994 _ACEOF
30995 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30996 _ACEOF
30997
30998 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30999
31000 # Handling of arguments.
31001 for ac_config_target in $ac_config_targets
31002 do
31003   case $ac_config_target in
31004     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
31005     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
31006     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
31007     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
31008     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
31009     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
31010     "src/backend/port/pg_latch.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_latch.c:${LATCH_IMPLEMENTATION}" ;;
31011     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
31012     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
31013     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
31014     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
31015     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
31016     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
31017     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
31018
31019   *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
31020 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
31021    { (exit 1); exit 1; }; };;
31022   esac
31023 done
31024
31025
31026 # If the user did not use the arguments to specify the items to instantiate,
31027 # then the envvar interface is used.  Set only those that are not.
31028 # We use the long form for the default assignment because of an extremely
31029 # bizarre bug on SunOS 4.1.3.
31030 if $ac_need_defaults; then
31031   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
31032   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
31033   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
31034   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
31035 fi
31036
31037 # Have a temporary directory for convenience.  Make it in the build tree
31038 # simply because there is no reason against having it here, and in addition,
31039 # creating and moving files from /tmp can sometimes cause problems.
31040 # Hook for its removal unless debugging.
31041 # Note that there is a small window in which the directory will not be cleaned:
31042 # after its creation but before its name has been assigned to `$tmp'.
31043 $debug ||
31044 {
31045   tmp=
31046   trap 'exit_status=$?
31047   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
31048 ' 0
31049   trap '{ (exit 1); exit 1; }' 1 2 13 15
31050 }
31051 # Create a (secure) tmp directory for tmp files.
31052
31053 {
31054   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
31055   test -n "$tmp" && test -d "$tmp"
31056 }  ||
31057 {
31058   tmp=./conf$$-$RANDOM
31059   (umask 077 && mkdir "$tmp")
31060 } ||
31061 {
31062    $as_echo "$as_me: cannot create a temporary directory in ." >&2
31063    { (exit 1); exit 1; }
31064 }
31065
31066 # Set up the scripts for CONFIG_FILES section.
31067 # No need to generate them if there are no CONFIG_FILES.
31068 # This happens for instance with `./config.status config.h'.
31069 if test -n "$CONFIG_FILES"; then
31070
31071
31072 ac_cr='\r'
31073 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
31074 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
31075   ac_cs_awk_cr='\\r'
31076 else
31077   ac_cs_awk_cr=$ac_cr
31078 fi
31079
31080 echo 'BEGIN {' >"$tmp/subs1.awk" &&
31081 _ACEOF
31082
31083
31084 {
31085   echo "cat >conf$$subs.awk <<_ACEOF" &&
31086   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
31087   echo "_ACEOF"
31088 } >conf$$subs.sh ||
31089   { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
31090 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
31091    { (exit 1); exit 1; }; }
31092 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
31093 ac_delim='%!_!# '
31094 for ac_last_try in false false false false false :; do
31095   . ./conf$$subs.sh ||
31096     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
31097 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
31098    { (exit 1); exit 1; }; }
31099
31100   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
31101   if test $ac_delim_n = $ac_delim_num; then
31102     break
31103   elif $ac_last_try; then
31104     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
31105 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
31106    { (exit 1); exit 1; }; }
31107   else
31108     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31109   fi
31110 done
31111 rm -f conf$$subs.sh
31112
31113 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31114 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
31115 _ACEOF
31116 sed -n '
31117 h
31118 s/^/S["/; s/!.*/"]=/
31119 p
31120 g
31121 s/^[^!]*!//
31122 :repl
31123 t repl
31124 s/'"$ac_delim"'$//
31125 t delim
31126 :nl
31127 h
31128 s/\(.\{148\}\).*/\1/
31129 t more1
31130 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
31131 p
31132 n
31133 b repl
31134 :more1
31135 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31136 p
31137 g
31138 s/.\{148\}//
31139 t nl
31140 :delim
31141 h
31142 s/\(.\{148\}\).*/\1/
31143 t more2
31144 s/["\\]/\\&/g; s/^/"/; s/$/"/
31145 p
31146 b
31147 :more2
31148 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31149 p
31150 g
31151 s/.\{148\}//
31152 t delim
31153 ' <conf$$subs.awk | sed '
31154 /^[^""]/{
31155   N
31156   s/\n//
31157 }
31158 ' >>$CONFIG_STATUS || ac_write_fail=1
31159 rm -f conf$$subs.awk
31160 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31161 _ACAWK
31162 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
31163   for (key in S) S_is_set[key] = 1
31164   FS = "\a"
31165
31166 }
31167 {
31168   line = $ 0
31169   nfields = split(line, field, "@")
31170   substed = 0
31171   len = length(field[1])
31172   for (i = 2; i < nfields; i++) {
31173     key = field[i]
31174     keylen = length(key)
31175     if (S_is_set[key]) {
31176       value = S[key]
31177       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
31178       len += length(value) + length(field[++i])
31179       substed = 1
31180     } else
31181       len += 1 + keylen
31182   }
31183
31184   print line
31185 }
31186
31187 _ACAWK
31188 _ACEOF
31189 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31190 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
31191   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
31192 else
31193   cat
31194 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
31195   || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
31196 $as_echo "$as_me: error: could not setup config files machinery" >&2;}
31197    { (exit 1); exit 1; }; }
31198 _ACEOF
31199
31200 # VPATH may cause trouble with some makes, so we remove $(srcdir),
31201 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
31202 # trailing colons and then remove the whole line if VPATH becomes empty
31203 # (actually we leave an empty line to preserve line numbers).
31204 if test "x$srcdir" = x.; then
31205   ac_vpsub='/^[  ]*VPATH[        ]*=/{
31206 s/:*\$(srcdir):*/:/
31207 s/:*\${srcdir}:*/:/
31208 s/:*@srcdir@:*/:/
31209 s/^\([^=]*=[     ]*\):*/\1/
31210 s/:*$//
31211 s/^[^=]*=[       ]*$//
31212 }'
31213 fi
31214
31215 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31216 fi # test -n "$CONFIG_FILES"
31217
31218 # Set up the scripts for CONFIG_HEADERS section.
31219 # No need to generate them if there are no CONFIG_HEADERS.
31220 # This happens for instance with `./config.status Makefile'.
31221 if test -n "$CONFIG_HEADERS"; then
31222 cat >"$tmp/defines.awk" <<\_ACAWK ||
31223 BEGIN {
31224 _ACEOF
31225
31226 # Transform confdefs.h into an awk script `defines.awk', embedded as
31227 # here-document in config.status, that substitutes the proper values into
31228 # config.h.in to produce config.h.
31229
31230 # Create a delimiter string that does not exist in confdefs.h, to ease
31231 # handling of long lines.
31232 ac_delim='%!_!# '
31233 for ac_last_try in false false :; do
31234   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
31235   if test -z "$ac_t"; then
31236     break
31237   elif $ac_last_try; then
31238     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
31239 $as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
31240    { (exit 1); exit 1; }; }
31241   else
31242     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31243   fi
31244 done
31245
31246 # For the awk script, D is an array of macro values keyed by name,
31247 # likewise P contains macro parameters if any.  Preserve backslash
31248 # newline sequences.
31249
31250 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
31251 sed -n '
31252 s/.\{148\}/&'"$ac_delim"'/g
31253 t rset
31254 :rset
31255 s/^[     ]*#[    ]*define[       ][      ]*/ /
31256 t def
31257 d
31258 :def
31259 s/\\$//
31260 t bsnl
31261 s/["\\]/\\&/g
31262 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
31263 D["\1"]=" \3"/p
31264 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
31265 d
31266 :bsnl
31267 s/["\\]/\\&/g
31268 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
31269 D["\1"]=" \3\\\\\\n"\\/p
31270 t cont
31271 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
31272 t cont
31273 d
31274 :cont
31275 n
31276 s/.\{148\}/&'"$ac_delim"'/g
31277 t clear
31278 :clear
31279 s/\\$//
31280 t bsnlc
31281 s/["\\]/\\&/g; s/^/"/; s/$/"/p
31282 d
31283 :bsnlc
31284 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
31285 b cont
31286 ' <confdefs.h | sed '
31287 s/'"$ac_delim"'/"\\\
31288 "/g' >>$CONFIG_STATUS || ac_write_fail=1
31289
31290 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31291   for (key in D) D_is_set[key] = 1
31292   FS = "\a"
31293 }
31294 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
31295   line = \$ 0
31296   split(line, arg, " ")
31297   if (arg[1] == "#") {
31298     defundef = arg[2]
31299     mac1 = arg[3]
31300   } else {
31301     defundef = substr(arg[1], 2)
31302     mac1 = arg[2]
31303   }
31304   split(mac1, mac2, "(") #)
31305   macro = mac2[1]
31306   prefix = substr(line, 1, index(line, defundef) - 1)
31307   if (D_is_set[macro]) {
31308     # Preserve the white space surrounding the "#".
31309     print prefix "define", macro P[macro] D[macro]
31310     next
31311   } else {
31312     # Replace #undef with comments.  This is necessary, for example,
31313     # in the case of _POSIX_SOURCE, which is predefined and required
31314     # on some systems where configure will not decide to define it.
31315     if (defundef == "undef") {
31316       print "/*", prefix defundef, macro, "*/"
31317       next
31318     }
31319   }
31320 }
31321 { print }
31322 _ACAWK
31323 _ACEOF
31324 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31325   { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
31326 $as_echo "$as_me: error: could not setup config headers machinery" >&2;}
31327    { (exit 1); exit 1; }; }
31328 fi # test -n "$CONFIG_HEADERS"
31329
31330
31331 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
31332 shift
31333 for ac_tag
31334 do
31335   case $ac_tag in
31336   :[FHLC]) ac_mode=$ac_tag; continue;;
31337   esac
31338   case $ac_mode$ac_tag in
31339   :[FHL]*:*);;
31340   :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
31341 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
31342    { (exit 1); exit 1; }; };;
31343   :[FH]-) ac_tag=-:-;;
31344   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
31345   esac
31346   ac_save_IFS=$IFS
31347   IFS=:
31348   set x $ac_tag
31349   IFS=$ac_save_IFS
31350   shift
31351   ac_file=$1
31352   shift
31353
31354   case $ac_mode in
31355   :L) ac_source=$1;;
31356   :[FH])
31357     ac_file_inputs=
31358     for ac_f
31359     do
31360       case $ac_f in
31361       -) ac_f="$tmp/stdin";;
31362       *) # Look for the file first in the build tree, then in the source tree
31363          # (if the path is not absolute).  The absolute path cannot be DOS-style,
31364          # because $ac_f cannot contain `:'.
31365          test -f "$ac_f" ||
31366            case $ac_f in
31367            [\\/$]*) false;;
31368            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
31369            esac ||
31370            { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
31371 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
31372    { (exit 1); exit 1; }; };;
31373       esac
31374       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
31375       ac_file_inputs="$ac_file_inputs '$ac_f'"
31376     done
31377
31378     # Let's still pretend it is `configure' which instantiates (i.e., don't
31379     # use $as_me), people would be surprised to read:
31380     #    /* config.h.  Generated by config.status.  */
31381     configure_input='Generated from '`
31382           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
31383         `' by configure.'
31384     if test x"$ac_file" != x-; then
31385       configure_input="$ac_file.  $configure_input"
31386       { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
31387 $as_echo "$as_me: creating $ac_file" >&6;}
31388     fi
31389     # Neutralize special characters interpreted by sed in replacement strings.
31390     case $configure_input in #(
31391     *\&* | *\|* | *\\* )
31392        ac_sed_conf_input=`$as_echo "$configure_input" |
31393        sed 's/[\\\\&|]/\\\\&/g'`;; #(
31394     *) ac_sed_conf_input=$configure_input;;
31395     esac
31396
31397     case $ac_tag in
31398     *:-:* | *:-) cat >"$tmp/stdin" \
31399       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
31400 $as_echo "$as_me: error: could not create $ac_file" >&2;}
31401    { (exit 1); exit 1; }; } ;;
31402     esac
31403     ;;
31404   esac
31405
31406   ac_dir=`$as_dirname -- "$ac_file" ||
31407 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31408          X"$ac_file" : 'X\(//\)[^/]' \| \
31409          X"$ac_file" : 'X\(//\)$' \| \
31410          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
31411 $as_echo X"$ac_file" |
31412     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31413             s//\1/
31414             q
31415           }
31416           /^X\(\/\/\)[^/].*/{
31417             s//\1/
31418             q
31419           }
31420           /^X\(\/\/\)$/{
31421             s//\1/
31422             q
31423           }
31424           /^X\(\/\).*/{
31425             s//\1/
31426             q
31427           }
31428           s/.*/./; q'`
31429   { as_dir="$ac_dir"
31430   case $as_dir in #(
31431   -*) as_dir=./$as_dir;;
31432   esac
31433   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
31434     as_dirs=
31435     while :; do
31436       case $as_dir in #(
31437       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
31438       *) as_qdir=$as_dir;;
31439       esac
31440       as_dirs="'$as_qdir' $as_dirs"
31441       as_dir=`$as_dirname -- "$as_dir" ||
31442 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31443          X"$as_dir" : 'X\(//\)[^/]' \| \
31444          X"$as_dir" : 'X\(//\)$' \| \
31445          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
31446 $as_echo X"$as_dir" |
31447     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31448             s//\1/
31449             q
31450           }
31451           /^X\(\/\/\)[^/].*/{
31452             s//\1/
31453             q
31454           }
31455           /^X\(\/\/\)$/{
31456             s//\1/
31457             q
31458           }
31459           /^X\(\/\).*/{
31460             s//\1/
31461             q
31462           }
31463           s/.*/./; q'`
31464       test -d "$as_dir" && break
31465     done
31466     test -z "$as_dirs" || eval "mkdir $as_dirs"
31467   } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
31468 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
31469    { (exit 1); exit 1; }; }; }
31470   ac_builddir=.
31471
31472 case "$ac_dir" in
31473 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
31474 *)
31475   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
31476   # A ".." for each directory in $ac_dir_suffix.
31477   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
31478   case $ac_top_builddir_sub in
31479   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
31480   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
31481   esac ;;
31482 esac
31483 ac_abs_top_builddir=$ac_pwd
31484 ac_abs_builddir=$ac_pwd$ac_dir_suffix
31485 # for backward compatibility:
31486 ac_top_builddir=$ac_top_build_prefix
31487
31488 case $srcdir in
31489   .)  # We are building in place.
31490     ac_srcdir=.
31491     ac_top_srcdir=$ac_top_builddir_sub
31492     ac_abs_top_srcdir=$ac_pwd ;;
31493   [\\/]* | ?:[\\/]* )  # Absolute name.
31494     ac_srcdir=$srcdir$ac_dir_suffix;
31495     ac_top_srcdir=$srcdir
31496     ac_abs_top_srcdir=$srcdir ;;
31497   *) # Relative name.
31498     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
31499     ac_top_srcdir=$ac_top_build_prefix$srcdir
31500     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
31501 esac
31502 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
31503
31504
31505   case $ac_mode in
31506   :F)
31507   #
31508   # CONFIG_FILE
31509   #
31510
31511   case $INSTALL in
31512   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
31513   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
31514   esac
31515   ac_MKDIR_P=$MKDIR_P
31516   case $MKDIR_P in
31517   [\\/$]* | ?:[\\/]* ) ;;
31518   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
31519   esac
31520 _ACEOF
31521
31522 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31523 # If the template does not know about datarootdir, expand it.
31524 # FIXME: This hack should be removed a few years after 2.60.
31525 ac_datarootdir_hack=; ac_datarootdir_seen=
31526
31527 ac_sed_dataroot='
31528 /datarootdir/ {
31529   p
31530   q
31531 }
31532 /@datadir@/p
31533 /@docdir@/p
31534 /@infodir@/p
31535 /@localedir@/p
31536 /@mandir@/p
31537 '
31538 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
31539 *datarootdir*) ac_datarootdir_seen=yes;;
31540 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
31541   { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
31542 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
31543 _ACEOF
31544 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31545   ac_datarootdir_hack='
31546   s&@datadir@&$datadir&g
31547   s&@docdir@&$docdir&g
31548   s&@infodir@&$infodir&g
31549   s&@localedir@&$localedir&g
31550   s&@mandir@&$mandir&g
31551     s&\\\${datarootdir}&$datarootdir&g' ;;
31552 esac
31553 _ACEOF
31554
31555 # Neutralize VPATH when `$srcdir' = `.'.
31556 # Shell code in configure.ac might set extrasub.
31557 # FIXME: do we really want to maintain this feature?
31558 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31559 ac_sed_extra="$ac_vpsub
31560 $extrasub
31561 _ACEOF
31562 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31563 :t
31564 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
31565 s|@configure_input@|$ac_sed_conf_input|;t t
31566 s&@top_builddir@&$ac_top_builddir_sub&;t t
31567 s&@top_build_prefix@&$ac_top_build_prefix&;t t
31568 s&@srcdir@&$ac_srcdir&;t t
31569 s&@abs_srcdir@&$ac_abs_srcdir&;t t
31570 s&@top_srcdir@&$ac_top_srcdir&;t t
31571 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
31572 s&@builddir@&$ac_builddir&;t t
31573 s&@abs_builddir@&$ac_abs_builddir&;t t
31574 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
31575 s&@INSTALL@&$ac_INSTALL&;t t
31576 s&@MKDIR_P@&$ac_MKDIR_P&;t t
31577 $ac_datarootdir_hack
31578 "
31579 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
31580   || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
31581 $as_echo "$as_me: error: could not create $ac_file" >&2;}
31582    { (exit 1); exit 1; }; }
31583
31584 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
31585   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
31586   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
31587   { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
31588 which seems to be undefined.  Please make sure it is defined." >&5
31589 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
31590 which seems to be undefined.  Please make sure it is defined." >&2;}
31591
31592   rm -f "$tmp/stdin"
31593   case $ac_file in
31594   -) cat "$tmp/out" && rm -f "$tmp/out";;
31595   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
31596   esac \
31597   || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
31598 $as_echo "$as_me: error: could not create $ac_file" >&2;}
31599    { (exit 1); exit 1; }; }
31600  ;;
31601   :H)
31602   #
31603   # CONFIG_HEADER
31604   #
31605   if test x"$ac_file" != x-; then
31606     {
31607       $as_echo "/* $configure_input  */" \
31608       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
31609     } >"$tmp/config.h" \
31610       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
31611 $as_echo "$as_me: error: could not create $ac_file" >&2;}
31612    { (exit 1); exit 1; }; }
31613     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
31614       { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
31615 $as_echo "$as_me: $ac_file is unchanged" >&6;}
31616     else
31617       rm -f "$ac_file"
31618       mv "$tmp/config.h" "$ac_file" \
31619         || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
31620 $as_echo "$as_me: error: could not create $ac_file" >&2;}
31621    { (exit 1); exit 1; }; }
31622     fi
31623   else
31624     $as_echo "/* $configure_input  */" \
31625       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
31626       || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
31627 $as_echo "$as_me: error: could not create -" >&2;}
31628    { (exit 1); exit 1; }; }
31629   fi
31630  ;;
31631   :L)
31632   #
31633   # CONFIG_LINK
31634   #
31635
31636   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
31637     :
31638   else
31639     # Prefer the file from the source tree if names are identical.
31640     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
31641       ac_source=$srcdir/$ac_source
31642     fi
31643
31644     { $as_echo "$as_me:$LINENO: linking $ac_source to $ac_file" >&5
31645 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
31646
31647     if test ! -r "$ac_source"; then
31648       { { $as_echo "$as_me:$LINENO: error: $ac_source: file not found" >&5
31649 $as_echo "$as_me: error: $ac_source: file not found" >&2;}
31650    { (exit 1); exit 1; }; }
31651     fi
31652     rm -f "$ac_file"
31653
31654     # Try a relative symlink, then a hard link, then a copy.
31655     case $srcdir in
31656     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
31657         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
31658     esac
31659     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
31660       ln "$ac_source" "$ac_file" 2>/dev/null ||
31661       cp -p "$ac_source" "$ac_file" ||
31662       { { $as_echo "$as_me:$LINENO: error: cannot link or copy $ac_source to $ac_file" >&5
31663 $as_echo "$as_me: error: cannot link or copy $ac_source to $ac_file" >&2;}
31664    { (exit 1); exit 1; }; }
31665   fi
31666  ;;
31667   :C)  { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
31668 $as_echo "$as_me: executing $ac_file commands" >&6;}
31669  ;;
31670   esac
31671
31672
31673   case $ac_file$ac_mode in
31674     "check_win32_symlinks":C)
31675 # Links sometimes fail undetected on Mingw -
31676 # so here we detect it and warn the user
31677 for FILE in $CONFIG_LINKS
31678  do
31679         # test -e works for symlinks in the MinGW console
31680         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:$LINENO: WARNING: *** link for $FILE -- please fix by hand" >&5
31681 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
31682  done
31683  ;;
31684     "src/include/pg_config.h":H)
31685 # Update timestamp for pg_config.h (see Makefile.global)
31686 echo >src/include/stamp-h
31687  ;;
31688     "src/include/pg_config_ext.h":H)
31689 # Update timestamp for pg_config_ext.h (see Makefile.global)
31690 echo >src/include/stamp-ext-h
31691  ;;
31692     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
31693
31694   esac
31695 done # for ac_tag
31696
31697
31698 { (exit 0); exit 0; }
31699 _ACEOF
31700 chmod +x $CONFIG_STATUS
31701 ac_clean_files=$ac_clean_files_save
31702
31703 test $ac_write_fail = 0 ||
31704   { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
31705 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
31706    { (exit 1); exit 1; }; }
31707
31708
31709 # configure is writing to config.log, and then calls config.status.
31710 # config.status does its own redirection, appending to config.log.
31711 # Unfortunately, on DOS this fails, as config.log is still kept open
31712 # by configure, so config.status won't be able to write to it; its
31713 # output is simply discarded.  So we exec the FD to /dev/null,
31714 # effectively closing config.log, so it can be properly (re)opened and
31715 # appended to by config.status.  When coming back to configure, we
31716 # need to make the FD available again.
31717 if test "$no_create" != yes; then
31718   ac_cs_success=:
31719   ac_config_status_args=
31720   test "$silent" = yes &&
31721     ac_config_status_args="$ac_config_status_args --quiet"
31722   exec 5>/dev/null
31723   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
31724   exec 5>>config.log
31725   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31726   # would make configure fail if this is the last instruction.
31727   $ac_cs_success || { (exit 1); exit 1; }
31728 fi
31729 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
31730   { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
31731 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
31732 fi
31733