]> granicus.if.org Git - postgresql/blob - configure
Remove single space on end of a line in xlog.c
[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.3beta1.
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.3beta1'
602 PACKAGE_STRING='PostgreSQL 9.3beta1'
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.3beta1 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.3beta1:";;
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.3beta1
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.3beta1, 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 /**/
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 /**/
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 for ac_func in cbrt dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll pstat readlink setproctitle setsid sigprocmask symlink sync_file_range towlower utime utimes wcstombs wcstombs_l
19699 do
19700 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19701 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19702 $as_echo_n "checking for $ac_func... " >&6; }
19703 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
19704   $as_echo_n "(cached) " >&6
19705 else
19706   cat >conftest.$ac_ext <<_ACEOF
19707 /* confdefs.h.  */
19708 _ACEOF
19709 cat confdefs.h >>conftest.$ac_ext
19710 cat >>conftest.$ac_ext <<_ACEOF
19711 /* end confdefs.h.  */
19712 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19713    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
19714 #define $ac_func innocuous_$ac_func
19715
19716 /* System header to define __stub macros and hopefully few prototypes,
19717     which can conflict with char $ac_func (); below.
19718     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19719     <limits.h> exists even on freestanding compilers.  */
19720
19721 #ifdef __STDC__
19722 # include <limits.h>
19723 #else
19724 # include <assert.h>
19725 #endif
19726
19727 #undef $ac_func
19728
19729 /* Override any GCC internal prototype to avoid an error.
19730    Use char because int might match the return type of a GCC
19731    builtin and then its argument prototype would still apply.  */
19732 #ifdef __cplusplus
19733 extern "C"
19734 #endif
19735 char $ac_func ();
19736 /* The GNU C library defines this for functions which it implements
19737     to always fail with ENOSYS.  Some functions are actually named
19738     something starting with __ and the normal name is an alias.  */
19739 #if defined __stub_$ac_func || defined __stub___$ac_func
19740 choke me
19741 #endif
19742
19743 int
19744 main ()
19745 {
19746 return $ac_func ();
19747   ;
19748   return 0;
19749 }
19750 _ACEOF
19751 rm -f conftest.$ac_objext conftest$ac_exeext
19752 if { (ac_try="$ac_link"
19753 case "(($ac_try" in
19754   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19755   *) ac_try_echo=$ac_try;;
19756 esac
19757 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19758 $as_echo "$ac_try_echo") >&5
19759   (eval "$ac_link") 2>conftest.er1
19760   ac_status=$?
19761   grep -v '^ *+' conftest.er1 >conftest.err
19762   rm -f conftest.er1
19763   cat conftest.err >&5
19764   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19765   (exit $ac_status); } && {
19766          test -z "$ac_c_werror_flag" ||
19767          test ! -s conftest.err
19768        } && test -s conftest$ac_exeext && {
19769          test "$cross_compiling" = yes ||
19770          $as_test_x conftest$ac_exeext
19771        }; then
19772   eval "$as_ac_var=yes"
19773 else
19774   $as_echo "$as_me: failed program was:" >&5
19775 sed 's/^/| /' conftest.$ac_ext >&5
19776
19777         eval "$as_ac_var=no"
19778 fi
19779
19780 rm -rf conftest.dSYM
19781 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19782       conftest$ac_exeext conftest.$ac_ext
19783 fi
19784 ac_res=`eval 'as_val=${'$as_ac_var'}
19785                  $as_echo "$as_val"'`
19786                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19787 $as_echo "$ac_res" >&6; }
19788 as_val=`eval 'as_val=${'$as_ac_var'}
19789                  $as_echo "$as_val"'`
19790    if test "x$as_val" = x""yes; then
19791   cat >>confdefs.h <<_ACEOF
19792 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19793 _ACEOF
19794
19795 fi
19796 done
19797
19798
19799
19800 for ac_func in fseeko
19801 do
19802 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19803 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19804 $as_echo_n "checking for $ac_func... " >&6; }
19805 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
19806   $as_echo_n "(cached) " >&6
19807 else
19808   cat >conftest.$ac_ext <<_ACEOF
19809 /* confdefs.h.  */
19810 _ACEOF
19811 cat confdefs.h >>conftest.$ac_ext
19812 cat >>conftest.$ac_ext <<_ACEOF
19813 /* end confdefs.h.  */
19814 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19815    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
19816 #define $ac_func innocuous_$ac_func
19817
19818 /* System header to define __stub macros and hopefully few prototypes,
19819     which can conflict with char $ac_func (); below.
19820     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19821     <limits.h> exists even on freestanding compilers.  */
19822
19823 #ifdef __STDC__
19824 # include <limits.h>
19825 #else
19826 # include <assert.h>
19827 #endif
19828
19829 #undef $ac_func
19830
19831 /* Override any GCC internal prototype to avoid an error.
19832    Use char because int might match the return type of a GCC
19833    builtin and then its argument prototype would still apply.  */
19834 #ifdef __cplusplus
19835 extern "C"
19836 #endif
19837 char $ac_func ();
19838 /* The GNU C library defines this for functions which it implements
19839     to always fail with ENOSYS.  Some functions are actually named
19840     something starting with __ and the normal name is an alias.  */
19841 #if defined __stub_$ac_func || defined __stub___$ac_func
19842 choke me
19843 #endif
19844
19845 int
19846 main ()
19847 {
19848 return $ac_func ();
19849   ;
19850   return 0;
19851 }
19852 _ACEOF
19853 rm -f conftest.$ac_objext conftest$ac_exeext
19854 if { (ac_try="$ac_link"
19855 case "(($ac_try" in
19856   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19857   *) ac_try_echo=$ac_try;;
19858 esac
19859 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19860 $as_echo "$ac_try_echo") >&5
19861   (eval "$ac_link") 2>conftest.er1
19862   ac_status=$?
19863   grep -v '^ *+' conftest.er1 >conftest.err
19864   rm -f conftest.er1
19865   cat conftest.err >&5
19866   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19867   (exit $ac_status); } && {
19868          test -z "$ac_c_werror_flag" ||
19869          test ! -s conftest.err
19870        } && test -s conftest$ac_exeext && {
19871          test "$cross_compiling" = yes ||
19872          $as_test_x conftest$ac_exeext
19873        }; then
19874   eval "$as_ac_var=yes"
19875 else
19876   $as_echo "$as_me: failed program was:" >&5
19877 sed 's/^/| /' conftest.$ac_ext >&5
19878
19879         eval "$as_ac_var=no"
19880 fi
19881
19882 rm -rf conftest.dSYM
19883 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19884       conftest$ac_exeext conftest.$ac_ext
19885 fi
19886 ac_res=`eval 'as_val=${'$as_ac_var'}
19887                  $as_echo "$as_val"'`
19888                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19889 $as_echo "$ac_res" >&6; }
19890 as_val=`eval 'as_val=${'$as_ac_var'}
19891                  $as_echo "$as_val"'`
19892    if test "x$as_val" = x""yes; then
19893   cat >>confdefs.h <<_ACEOF
19894 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19895 _ACEOF
19896
19897 else
19898   case " $LIBOBJS " in
19899   *" $ac_func.$ac_objext "* ) ;;
19900   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19901  ;;
19902 esac
19903
19904 fi
19905 done
19906
19907
19908 case $host_os in
19909         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
19910         # Mingw uses macros to access Win32 API calls
19911         netbsd*|mingw*)
19912
19913 cat >>confdefs.h <<\_ACEOF
19914 #define HAVE_FSEEKO 1
19915 _ACEOF
19916
19917                 ac_cv_func_fseeko=yes;;
19918         *)
19919                 { $as_echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
19920 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
19921 if test "${ac_cv_sys_largefile_source+set}" = set; then
19922   $as_echo_n "(cached) " >&6
19923 else
19924   while :; do
19925   cat >conftest.$ac_ext <<_ACEOF
19926 /* confdefs.h.  */
19927 _ACEOF
19928 cat confdefs.h >>conftest.$ac_ext
19929 cat >>conftest.$ac_ext <<_ACEOF
19930 /* end confdefs.h.  */
19931 #include <sys/types.h> /* for off_t */
19932      #include <stdio.h>
19933 int
19934 main ()
19935 {
19936 int (*fp) (FILE *, off_t, int) = fseeko;
19937      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
19938   ;
19939   return 0;
19940 }
19941 _ACEOF
19942 rm -f conftest.$ac_objext conftest$ac_exeext
19943 if { (ac_try="$ac_link"
19944 case "(($ac_try" in
19945   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19946   *) ac_try_echo=$ac_try;;
19947 esac
19948 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19949 $as_echo "$ac_try_echo") >&5
19950   (eval "$ac_link") 2>conftest.er1
19951   ac_status=$?
19952   grep -v '^ *+' conftest.er1 >conftest.err
19953   rm -f conftest.er1
19954   cat conftest.err >&5
19955   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19956   (exit $ac_status); } && {
19957          test -z "$ac_c_werror_flag" ||
19958          test ! -s conftest.err
19959        } && test -s conftest$ac_exeext && {
19960          test "$cross_compiling" = yes ||
19961          $as_test_x conftest$ac_exeext
19962        }; then
19963   ac_cv_sys_largefile_source=no; break
19964 else
19965   $as_echo "$as_me: failed program was:" >&5
19966 sed 's/^/| /' conftest.$ac_ext >&5
19967
19968
19969 fi
19970
19971 rm -rf conftest.dSYM
19972 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19973       conftest$ac_exeext conftest.$ac_ext
19974   cat >conftest.$ac_ext <<_ACEOF
19975 /* confdefs.h.  */
19976 _ACEOF
19977 cat confdefs.h >>conftest.$ac_ext
19978 cat >>conftest.$ac_ext <<_ACEOF
19979 /* end confdefs.h.  */
19980 #define _LARGEFILE_SOURCE 1
19981 #include <sys/types.h> /* for off_t */
19982      #include <stdio.h>
19983 int
19984 main ()
19985 {
19986 int (*fp) (FILE *, off_t, int) = fseeko;
19987      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
19988   ;
19989   return 0;
19990 }
19991 _ACEOF
19992 rm -f conftest.$ac_objext conftest$ac_exeext
19993 if { (ac_try="$ac_link"
19994 case "(($ac_try" in
19995   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19996   *) ac_try_echo=$ac_try;;
19997 esac
19998 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19999 $as_echo "$ac_try_echo") >&5
20000   (eval "$ac_link") 2>conftest.er1
20001   ac_status=$?
20002   grep -v '^ *+' conftest.er1 >conftest.err
20003   rm -f conftest.er1
20004   cat conftest.err >&5
20005   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20006   (exit $ac_status); } && {
20007          test -z "$ac_c_werror_flag" ||
20008          test ! -s conftest.err
20009        } && test -s conftest$ac_exeext && {
20010          test "$cross_compiling" = yes ||
20011          $as_test_x conftest$ac_exeext
20012        }; then
20013   ac_cv_sys_largefile_source=1; break
20014 else
20015   $as_echo "$as_me: failed program was:" >&5
20016 sed 's/^/| /' conftest.$ac_ext >&5
20017
20018
20019 fi
20020
20021 rm -rf conftest.dSYM
20022 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20023       conftest$ac_exeext conftest.$ac_ext
20024   ac_cv_sys_largefile_source=unknown
20025   break
20026 done
20027 fi
20028 { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
20029 $as_echo "$ac_cv_sys_largefile_source" >&6; }
20030 case $ac_cv_sys_largefile_source in #(
20031   no | unknown) ;;
20032   *)
20033 cat >>confdefs.h <<_ACEOF
20034 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
20035 _ACEOF
20036 ;;
20037 esac
20038 rm -rf conftest*
20039
20040 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
20041 # in glibc 2.1.3, but that breaks too many other things.
20042 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
20043 if test $ac_cv_sys_largefile_source != unknown; then
20044
20045 cat >>confdefs.h <<\_ACEOF
20046 #define HAVE_FSEEKO 1
20047 _ACEOF
20048
20049 fi
20050 ;;
20051 esac
20052
20053 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
20054 # by calling it, 2009-04-02
20055 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
20056 if test "$PORTNAME" != "solaris"; then
20057
20058 for ac_func in posix_fadvise
20059 do
20060 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20061 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20062 $as_echo_n "checking for $ac_func... " >&6; }
20063 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20064   $as_echo_n "(cached) " >&6
20065 else
20066   cat >conftest.$ac_ext <<_ACEOF
20067 /* confdefs.h.  */
20068 _ACEOF
20069 cat confdefs.h >>conftest.$ac_ext
20070 cat >>conftest.$ac_ext <<_ACEOF
20071 /* end confdefs.h.  */
20072 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20073    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
20074 #define $ac_func innocuous_$ac_func
20075
20076 /* System header to define __stub macros and hopefully few prototypes,
20077     which can conflict with char $ac_func (); below.
20078     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20079     <limits.h> exists even on freestanding compilers.  */
20080
20081 #ifdef __STDC__
20082 # include <limits.h>
20083 #else
20084 # include <assert.h>
20085 #endif
20086
20087 #undef $ac_func
20088
20089 /* Override any GCC internal prototype to avoid an error.
20090    Use char because int might match the return type of a GCC
20091    builtin and then its argument prototype would still apply.  */
20092 #ifdef __cplusplus
20093 extern "C"
20094 #endif
20095 char $ac_func ();
20096 /* The GNU C library defines this for functions which it implements
20097     to always fail with ENOSYS.  Some functions are actually named
20098     something starting with __ and the normal name is an alias.  */
20099 #if defined __stub_$ac_func || defined __stub___$ac_func
20100 choke me
20101 #endif
20102
20103 int
20104 main ()
20105 {
20106 return $ac_func ();
20107   ;
20108   return 0;
20109 }
20110 _ACEOF
20111 rm -f conftest.$ac_objext conftest$ac_exeext
20112 if { (ac_try="$ac_link"
20113 case "(($ac_try" in
20114   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20115   *) ac_try_echo=$ac_try;;
20116 esac
20117 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20118 $as_echo "$ac_try_echo") >&5
20119   (eval "$ac_link") 2>conftest.er1
20120   ac_status=$?
20121   grep -v '^ *+' conftest.er1 >conftest.err
20122   rm -f conftest.er1
20123   cat conftest.err >&5
20124   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20125   (exit $ac_status); } && {
20126          test -z "$ac_c_werror_flag" ||
20127          test ! -s conftest.err
20128        } && test -s conftest$ac_exeext && {
20129          test "$cross_compiling" = yes ||
20130          $as_test_x conftest$ac_exeext
20131        }; then
20132   eval "$as_ac_var=yes"
20133 else
20134   $as_echo "$as_me: failed program was:" >&5
20135 sed 's/^/| /' conftest.$ac_ext >&5
20136
20137         eval "$as_ac_var=no"
20138 fi
20139
20140 rm -rf conftest.dSYM
20141 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20142       conftest$ac_exeext conftest.$ac_ext
20143 fi
20144 ac_res=`eval 'as_val=${'$as_ac_var'}
20145                  $as_echo "$as_val"'`
20146                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20147 $as_echo "$ac_res" >&6; }
20148 as_val=`eval 'as_val=${'$as_ac_var'}
20149                  $as_echo "$as_val"'`
20150    if test "x$as_val" = x""yes; then
20151   cat >>confdefs.h <<_ACEOF
20152 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20153 _ACEOF
20154
20155 fi
20156 done
20157
20158 { $as_echo "$as_me:$LINENO: checking whether posix_fadvise is declared" >&5
20159 $as_echo_n "checking whether posix_fadvise is declared... " >&6; }
20160 if test "${ac_cv_have_decl_posix_fadvise+set}" = set; then
20161   $as_echo_n "(cached) " >&6
20162 else
20163   cat >conftest.$ac_ext <<_ACEOF
20164 /* confdefs.h.  */
20165 _ACEOF
20166 cat confdefs.h >>conftest.$ac_ext
20167 cat >>conftest.$ac_ext <<_ACEOF
20168 /* end confdefs.h.  */
20169 #include <fcntl.h>
20170
20171 int
20172 main ()
20173 {
20174 #ifndef posix_fadvise
20175   (void) posix_fadvise;
20176 #endif
20177
20178   ;
20179   return 0;
20180 }
20181 _ACEOF
20182 rm -f conftest.$ac_objext
20183 if { (ac_try="$ac_compile"
20184 case "(($ac_try" in
20185   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20186   *) ac_try_echo=$ac_try;;
20187 esac
20188 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20189 $as_echo "$ac_try_echo") >&5
20190   (eval "$ac_compile") 2>conftest.er1
20191   ac_status=$?
20192   grep -v '^ *+' conftest.er1 >conftest.err
20193   rm -f conftest.er1
20194   cat conftest.err >&5
20195   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20196   (exit $ac_status); } && {
20197          test -z "$ac_c_werror_flag" ||
20198          test ! -s conftest.err
20199        } && test -s conftest.$ac_objext; then
20200   ac_cv_have_decl_posix_fadvise=yes
20201 else
20202   $as_echo "$as_me: failed program was:" >&5
20203 sed 's/^/| /' conftest.$ac_ext >&5
20204
20205         ac_cv_have_decl_posix_fadvise=no
20206 fi
20207
20208 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20209 fi
20210 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix_fadvise" >&5
20211 $as_echo "$ac_cv_have_decl_posix_fadvise" >&6; }
20212 if test "x$ac_cv_have_decl_posix_fadvise" = x""yes; then
20213
20214 cat >>confdefs.h <<_ACEOF
20215 #define HAVE_DECL_POSIX_FADVISE 1
20216 _ACEOF
20217
20218
20219 else
20220   cat >>confdefs.h <<_ACEOF
20221 #define HAVE_DECL_POSIX_FADVISE 0
20222 _ACEOF
20223
20224
20225 fi
20226
20227
20228 fi
20229
20230 { $as_echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
20231 $as_echo_n "checking whether fdatasync is declared... " >&6; }
20232 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
20233   $as_echo_n "(cached) " >&6
20234 else
20235   cat >conftest.$ac_ext <<_ACEOF
20236 /* confdefs.h.  */
20237 _ACEOF
20238 cat confdefs.h >>conftest.$ac_ext
20239 cat >>conftest.$ac_ext <<_ACEOF
20240 /* end confdefs.h.  */
20241 #include <unistd.h>
20242
20243 int
20244 main ()
20245 {
20246 #ifndef fdatasync
20247   (void) fdatasync;
20248 #endif
20249
20250   ;
20251   return 0;
20252 }
20253 _ACEOF
20254 rm -f conftest.$ac_objext
20255 if { (ac_try="$ac_compile"
20256 case "(($ac_try" in
20257   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20258   *) ac_try_echo=$ac_try;;
20259 esac
20260 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20261 $as_echo "$ac_try_echo") >&5
20262   (eval "$ac_compile") 2>conftest.er1
20263   ac_status=$?
20264   grep -v '^ *+' conftest.er1 >conftest.err
20265   rm -f conftest.er1
20266   cat conftest.err >&5
20267   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20268   (exit $ac_status); } && {
20269          test -z "$ac_c_werror_flag" ||
20270          test ! -s conftest.err
20271        } && test -s conftest.$ac_objext; then
20272   ac_cv_have_decl_fdatasync=yes
20273 else
20274   $as_echo "$as_me: failed program was:" >&5
20275 sed 's/^/| /' conftest.$ac_ext >&5
20276
20277         ac_cv_have_decl_fdatasync=no
20278 fi
20279
20280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20281 fi
20282 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
20283 $as_echo "$ac_cv_have_decl_fdatasync" >&6; }
20284 if test "x$ac_cv_have_decl_fdatasync" = x""yes; then
20285
20286 cat >>confdefs.h <<_ACEOF
20287 #define HAVE_DECL_FDATASYNC 1
20288 _ACEOF
20289
20290
20291 else
20292   cat >>confdefs.h <<_ACEOF
20293 #define HAVE_DECL_FDATASYNC 0
20294 _ACEOF
20295
20296
20297 fi
20298
20299
20300 { $as_echo "$as_me:$LINENO: checking whether strlcat is declared" >&5
20301 $as_echo_n "checking whether strlcat is declared... " >&6; }
20302 if test "${ac_cv_have_decl_strlcat+set}" = set; then
20303   $as_echo_n "(cached) " >&6
20304 else
20305   cat >conftest.$ac_ext <<_ACEOF
20306 /* confdefs.h.  */
20307 _ACEOF
20308 cat confdefs.h >>conftest.$ac_ext
20309 cat >>conftest.$ac_ext <<_ACEOF
20310 /* end confdefs.h.  */
20311 $ac_includes_default
20312 int
20313 main ()
20314 {
20315 #ifndef strlcat
20316   (void) strlcat;
20317 #endif
20318
20319   ;
20320   return 0;
20321 }
20322 _ACEOF
20323 rm -f conftest.$ac_objext
20324 if { (ac_try="$ac_compile"
20325 case "(($ac_try" in
20326   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20327   *) ac_try_echo=$ac_try;;
20328 esac
20329 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20330 $as_echo "$ac_try_echo") >&5
20331   (eval "$ac_compile") 2>conftest.er1
20332   ac_status=$?
20333   grep -v '^ *+' conftest.er1 >conftest.err
20334   rm -f conftest.er1
20335   cat conftest.err >&5
20336   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20337   (exit $ac_status); } && {
20338          test -z "$ac_c_werror_flag" ||
20339          test ! -s conftest.err
20340        } && test -s conftest.$ac_objext; then
20341   ac_cv_have_decl_strlcat=yes
20342 else
20343   $as_echo "$as_me: failed program was:" >&5
20344 sed 's/^/| /' conftest.$ac_ext >&5
20345
20346         ac_cv_have_decl_strlcat=no
20347 fi
20348
20349 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20350 fi
20351 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcat" >&5
20352 $as_echo "$ac_cv_have_decl_strlcat" >&6; }
20353 if test "x$ac_cv_have_decl_strlcat" = x""yes; then
20354
20355 cat >>confdefs.h <<_ACEOF
20356 #define HAVE_DECL_STRLCAT 1
20357 _ACEOF
20358
20359
20360 else
20361   cat >>confdefs.h <<_ACEOF
20362 #define HAVE_DECL_STRLCAT 0
20363 _ACEOF
20364
20365
20366 fi
20367 { $as_echo "$as_me:$LINENO: checking whether strlcpy is declared" >&5
20368 $as_echo_n "checking whether strlcpy is declared... " >&6; }
20369 if test "${ac_cv_have_decl_strlcpy+set}" = set; then
20370   $as_echo_n "(cached) " >&6
20371 else
20372   cat >conftest.$ac_ext <<_ACEOF
20373 /* confdefs.h.  */
20374 _ACEOF
20375 cat confdefs.h >>conftest.$ac_ext
20376 cat >>conftest.$ac_ext <<_ACEOF
20377 /* end confdefs.h.  */
20378 $ac_includes_default
20379 int
20380 main ()
20381 {
20382 #ifndef strlcpy
20383   (void) strlcpy;
20384 #endif
20385
20386   ;
20387   return 0;
20388 }
20389 _ACEOF
20390 rm -f conftest.$ac_objext
20391 if { (ac_try="$ac_compile"
20392 case "(($ac_try" in
20393   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20394   *) ac_try_echo=$ac_try;;
20395 esac
20396 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20397 $as_echo "$ac_try_echo") >&5
20398   (eval "$ac_compile") 2>conftest.er1
20399   ac_status=$?
20400   grep -v '^ *+' conftest.er1 >conftest.err
20401   rm -f conftest.er1
20402   cat conftest.err >&5
20403   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20404   (exit $ac_status); } && {
20405          test -z "$ac_c_werror_flag" ||
20406          test ! -s conftest.err
20407        } && test -s conftest.$ac_objext; then
20408   ac_cv_have_decl_strlcpy=yes
20409 else
20410   $as_echo "$as_me: failed program was:" >&5
20411 sed 's/^/| /' conftest.$ac_ext >&5
20412
20413         ac_cv_have_decl_strlcpy=no
20414 fi
20415
20416 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20417 fi
20418 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcpy" >&5
20419 $as_echo "$ac_cv_have_decl_strlcpy" >&6; }
20420 if test "x$ac_cv_have_decl_strlcpy" = x""yes; then
20421
20422 cat >>confdefs.h <<_ACEOF
20423 #define HAVE_DECL_STRLCPY 1
20424 _ACEOF
20425
20426
20427 else
20428   cat >>confdefs.h <<_ACEOF
20429 #define HAVE_DECL_STRLCPY 0
20430 _ACEOF
20431
20432
20433 fi
20434
20435
20436 # This is probably only present on Darwin, but may as well check always
20437 { $as_echo "$as_me:$LINENO: checking whether F_FULLFSYNC is declared" >&5
20438 $as_echo_n "checking whether F_FULLFSYNC is declared... " >&6; }
20439 if test "${ac_cv_have_decl_F_FULLFSYNC+set}" = set; then
20440   $as_echo_n "(cached) " >&6
20441 else
20442   cat >conftest.$ac_ext <<_ACEOF
20443 /* confdefs.h.  */
20444 _ACEOF
20445 cat confdefs.h >>conftest.$ac_ext
20446 cat >>conftest.$ac_ext <<_ACEOF
20447 /* end confdefs.h.  */
20448 #include <fcntl.h>
20449
20450 int
20451 main ()
20452 {
20453 #ifndef F_FULLFSYNC
20454   (void) F_FULLFSYNC;
20455 #endif
20456
20457   ;
20458   return 0;
20459 }
20460 _ACEOF
20461 rm -f conftest.$ac_objext
20462 if { (ac_try="$ac_compile"
20463 case "(($ac_try" in
20464   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20465   *) ac_try_echo=$ac_try;;
20466 esac
20467 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20468 $as_echo "$ac_try_echo") >&5
20469   (eval "$ac_compile") 2>conftest.er1
20470   ac_status=$?
20471   grep -v '^ *+' conftest.er1 >conftest.err
20472   rm -f conftest.er1
20473   cat conftest.err >&5
20474   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20475   (exit $ac_status); } && {
20476          test -z "$ac_c_werror_flag" ||
20477          test ! -s conftest.err
20478        } && test -s conftest.$ac_objext; then
20479   ac_cv_have_decl_F_FULLFSYNC=yes
20480 else
20481   $as_echo "$as_me: failed program was:" >&5
20482 sed 's/^/| /' conftest.$ac_ext >&5
20483
20484         ac_cv_have_decl_F_FULLFSYNC=no
20485 fi
20486
20487 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20488 fi
20489 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_FULLFSYNC" >&5
20490 $as_echo "$ac_cv_have_decl_F_FULLFSYNC" >&6; }
20491 if test "x$ac_cv_have_decl_F_FULLFSYNC" = x""yes; then
20492
20493 cat >>confdefs.h <<_ACEOF
20494 #define HAVE_DECL_F_FULLFSYNC 1
20495 _ACEOF
20496
20497
20498 else
20499   cat >>confdefs.h <<_ACEOF
20500 #define HAVE_DECL_F_FULLFSYNC 0
20501 _ACEOF
20502
20503
20504 fi
20505
20506
20507
20508 HAVE_IPV6=no
20509 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
20510 $as_echo_n "checking for struct sockaddr_in6... " >&6; }
20511 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
20512   $as_echo_n "(cached) " >&6
20513 else
20514   ac_cv_type_struct_sockaddr_in6=no
20515 cat >conftest.$ac_ext <<_ACEOF
20516 /* confdefs.h.  */
20517 _ACEOF
20518 cat confdefs.h >>conftest.$ac_ext
20519 cat >>conftest.$ac_ext <<_ACEOF
20520 /* end confdefs.h.  */
20521 $ac_includes_default
20522 #include <netinet/in.h>
20523
20524 int
20525 main ()
20526 {
20527 if (sizeof (struct sockaddr_in6))
20528        return 0;
20529   ;
20530   return 0;
20531 }
20532 _ACEOF
20533 rm -f conftest.$ac_objext
20534 if { (ac_try="$ac_compile"
20535 case "(($ac_try" in
20536   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20537   *) ac_try_echo=$ac_try;;
20538 esac
20539 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20540 $as_echo "$ac_try_echo") >&5
20541   (eval "$ac_compile") 2>conftest.er1
20542   ac_status=$?
20543   grep -v '^ *+' conftest.er1 >conftest.err
20544   rm -f conftest.er1
20545   cat conftest.err >&5
20546   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20547   (exit $ac_status); } && {
20548          test -z "$ac_c_werror_flag" ||
20549          test ! -s conftest.err
20550        } && test -s conftest.$ac_objext; then
20551   cat >conftest.$ac_ext <<_ACEOF
20552 /* confdefs.h.  */
20553 _ACEOF
20554 cat confdefs.h >>conftest.$ac_ext
20555 cat >>conftest.$ac_ext <<_ACEOF
20556 /* end confdefs.h.  */
20557 $ac_includes_default
20558 #include <netinet/in.h>
20559
20560 int
20561 main ()
20562 {
20563 if (sizeof ((struct sockaddr_in6)))
20564           return 0;
20565   ;
20566   return 0;
20567 }
20568 _ACEOF
20569 rm -f conftest.$ac_objext
20570 if { (ac_try="$ac_compile"
20571 case "(($ac_try" in
20572   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20573   *) ac_try_echo=$ac_try;;
20574 esac
20575 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20576 $as_echo "$ac_try_echo") >&5
20577   (eval "$ac_compile") 2>conftest.er1
20578   ac_status=$?
20579   grep -v '^ *+' conftest.er1 >conftest.err
20580   rm -f conftest.er1
20581   cat conftest.err >&5
20582   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20583   (exit $ac_status); } && {
20584          test -z "$ac_c_werror_flag" ||
20585          test ! -s conftest.err
20586        } && test -s conftest.$ac_objext; then
20587   :
20588 else
20589   $as_echo "$as_me: failed program was:" >&5
20590 sed 's/^/| /' conftest.$ac_ext >&5
20591
20592         ac_cv_type_struct_sockaddr_in6=yes
20593 fi
20594
20595 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20596 else
20597   $as_echo "$as_me: failed program was:" >&5
20598 sed 's/^/| /' conftest.$ac_ext >&5
20599
20600
20601 fi
20602
20603 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20604 fi
20605 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
20606 $as_echo "$ac_cv_type_struct_sockaddr_in6" >&6; }
20607 if test "x$ac_cv_type_struct_sockaddr_in6" = x""yes; then
20608
20609 cat >>confdefs.h <<\_ACEOF
20610 #define HAVE_IPV6 1
20611 _ACEOF
20612
20613          HAVE_IPV6=yes
20614 fi
20615
20616
20617
20618 { $as_echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
20619 $as_echo_n "checking for PS_STRINGS... " >&6; }
20620 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
20621   $as_echo_n "(cached) " >&6
20622 else
20623   cat >conftest.$ac_ext <<_ACEOF
20624 /* confdefs.h.  */
20625 _ACEOF
20626 cat confdefs.h >>conftest.$ac_ext
20627 cat >>conftest.$ac_ext <<_ACEOF
20628 /* end confdefs.h.  */
20629 #include <machine/vmparam.h>
20630 #include <sys/exec.h>
20631
20632 int
20633 main ()
20634 {
20635 PS_STRINGS->ps_nargvstr = 1;
20636 PS_STRINGS->ps_argvstr = "foo";
20637   ;
20638   return 0;
20639 }
20640 _ACEOF
20641 rm -f conftest.$ac_objext conftest$ac_exeext
20642 if { (ac_try="$ac_link"
20643 case "(($ac_try" in
20644   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20645   *) ac_try_echo=$ac_try;;
20646 esac
20647 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20648 $as_echo "$ac_try_echo") >&5
20649   (eval "$ac_link") 2>conftest.er1
20650   ac_status=$?
20651   grep -v '^ *+' conftest.er1 >conftest.err
20652   rm -f conftest.er1
20653   cat conftest.err >&5
20654   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20655   (exit $ac_status); } && {
20656          test -z "$ac_c_werror_flag" ||
20657          test ! -s conftest.err
20658        } && test -s conftest$ac_exeext && {
20659          test "$cross_compiling" = yes ||
20660          $as_test_x conftest$ac_exeext
20661        }; then
20662   pgac_cv_var_PS_STRINGS=yes
20663 else
20664   $as_echo "$as_me: failed program was:" >&5
20665 sed 's/^/| /' conftest.$ac_ext >&5
20666
20667         pgac_cv_var_PS_STRINGS=no
20668 fi
20669
20670 rm -rf conftest.dSYM
20671 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20672       conftest$ac_exeext conftest.$ac_ext
20673 fi
20674 { $as_echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
20675 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
20676 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
20677
20678 cat >>confdefs.h <<\_ACEOF
20679 #define HAVE_PS_STRINGS /**/
20680 _ACEOF
20681
20682 fi
20683
20684
20685 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
20686 # is missing.  Yes, there are machines that have only one.  We may
20687 # also decide to use snprintf.c if snprintf() is present but does not
20688 # have all the features we need --- see below.
20689
20690 if test "$PORTNAME" = "win32"; then
20691   # Win32 gets snprintf.c built unconditionally.
20692   #
20693   # To properly translate all NLS languages strings, we must support the
20694   # *printf() %$ format, which allows *printf() arguments to be selected
20695   # by position in the translated string.
20696   #
20697   # libintl versions < 0.13 use the native *printf() functions, and Win32
20698   # *printf() doesn't understand %$, so we must use our /port versions,
20699   # which do understand %$. libintl versions >= 0.13 include their own
20700   # *printf versions on Win32.  The libintl 0.13 release note text is:
20701   #
20702   #   C format strings with positions, as they arise when a translator
20703   #   needs to reorder a sentence, are now supported on all platforms.
20704   #   On those few platforms (NetBSD and Woe32) for which the native
20705   #   printf()/fprintf()/... functions don't support such format
20706   #   strings, replacements are provided through <libintl.h>.
20707   #
20708   # We could use libintl >= 0.13's *printf() if we were sure that we had
20709   # a litint >= 0.13 at runtime, but seeing that there is no clean way
20710   # to guarantee that, it is best to just use our own, so we are sure to
20711   # get %$ support. In include/port.h we disable the *printf() macros
20712   # that might have been defined by libintl.
20713   #
20714   # We do this unconditionally whether NLS is used or not so we are sure
20715   # that all Win32 libraries and binaries behave the same.
20716   pgac_need_repl_snprintf=yes
20717 else
20718   pgac_need_repl_snprintf=no
20719
20720 for ac_func in snprintf
20721 do
20722 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20723 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20724 $as_echo_n "checking for $ac_func... " >&6; }
20725 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20726   $as_echo_n "(cached) " >&6
20727 else
20728   cat >conftest.$ac_ext <<_ACEOF
20729 /* confdefs.h.  */
20730 _ACEOF
20731 cat confdefs.h >>conftest.$ac_ext
20732 cat >>conftest.$ac_ext <<_ACEOF
20733 /* end confdefs.h.  */
20734 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20735    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
20736 #define $ac_func innocuous_$ac_func
20737
20738 /* System header to define __stub macros and hopefully few prototypes,
20739     which can conflict with char $ac_func (); below.
20740     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20741     <limits.h> exists even on freestanding compilers.  */
20742
20743 #ifdef __STDC__
20744 # include <limits.h>
20745 #else
20746 # include <assert.h>
20747 #endif
20748
20749 #undef $ac_func
20750
20751 /* Override any GCC internal prototype to avoid an error.
20752    Use char because int might match the return type of a GCC
20753    builtin and then its argument prototype would still apply.  */
20754 #ifdef __cplusplus
20755 extern "C"
20756 #endif
20757 char $ac_func ();
20758 /* The GNU C library defines this for functions which it implements
20759     to always fail with ENOSYS.  Some functions are actually named
20760     something starting with __ and the normal name is an alias.  */
20761 #if defined __stub_$ac_func || defined __stub___$ac_func
20762 choke me
20763 #endif
20764
20765 int
20766 main ()
20767 {
20768 return $ac_func ();
20769   ;
20770   return 0;
20771 }
20772 _ACEOF
20773 rm -f conftest.$ac_objext conftest$ac_exeext
20774 if { (ac_try="$ac_link"
20775 case "(($ac_try" in
20776   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20777   *) ac_try_echo=$ac_try;;
20778 esac
20779 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20780 $as_echo "$ac_try_echo") >&5
20781   (eval "$ac_link") 2>conftest.er1
20782   ac_status=$?
20783   grep -v '^ *+' conftest.er1 >conftest.err
20784   rm -f conftest.er1
20785   cat conftest.err >&5
20786   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20787   (exit $ac_status); } && {
20788          test -z "$ac_c_werror_flag" ||
20789          test ! -s conftest.err
20790        } && test -s conftest$ac_exeext && {
20791          test "$cross_compiling" = yes ||
20792          $as_test_x conftest$ac_exeext
20793        }; then
20794   eval "$as_ac_var=yes"
20795 else
20796   $as_echo "$as_me: failed program was:" >&5
20797 sed 's/^/| /' conftest.$ac_ext >&5
20798
20799         eval "$as_ac_var=no"
20800 fi
20801
20802 rm -rf conftest.dSYM
20803 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20804       conftest$ac_exeext conftest.$ac_ext
20805 fi
20806 ac_res=`eval 'as_val=${'$as_ac_var'}
20807                  $as_echo "$as_val"'`
20808                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20809 $as_echo "$ac_res" >&6; }
20810 as_val=`eval 'as_val=${'$as_ac_var'}
20811                  $as_echo "$as_val"'`
20812    if test "x$as_val" = x""yes; then
20813   cat >>confdefs.h <<_ACEOF
20814 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20815 _ACEOF
20816
20817 else
20818   pgac_need_repl_snprintf=yes
20819 fi
20820 done
20821
20822
20823 for ac_func in vsnprintf
20824 do
20825 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20826 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20827 $as_echo_n "checking for $ac_func... " >&6; }
20828 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20829   $as_echo_n "(cached) " >&6
20830 else
20831   cat >conftest.$ac_ext <<_ACEOF
20832 /* confdefs.h.  */
20833 _ACEOF
20834 cat confdefs.h >>conftest.$ac_ext
20835 cat >>conftest.$ac_ext <<_ACEOF
20836 /* end confdefs.h.  */
20837 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20838    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
20839 #define $ac_func innocuous_$ac_func
20840
20841 /* System header to define __stub macros and hopefully few prototypes,
20842     which can conflict with char $ac_func (); below.
20843     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20844     <limits.h> exists even on freestanding compilers.  */
20845
20846 #ifdef __STDC__
20847 # include <limits.h>
20848 #else
20849 # include <assert.h>
20850 #endif
20851
20852 #undef $ac_func
20853
20854 /* Override any GCC internal prototype to avoid an error.
20855    Use char because int might match the return type of a GCC
20856    builtin and then its argument prototype would still apply.  */
20857 #ifdef __cplusplus
20858 extern "C"
20859 #endif
20860 char $ac_func ();
20861 /* The GNU C library defines this for functions which it implements
20862     to always fail with ENOSYS.  Some functions are actually named
20863     something starting with __ and the normal name is an alias.  */
20864 #if defined __stub_$ac_func || defined __stub___$ac_func
20865 choke me
20866 #endif
20867
20868 int
20869 main ()
20870 {
20871 return $ac_func ();
20872   ;
20873   return 0;
20874 }
20875 _ACEOF
20876 rm -f conftest.$ac_objext conftest$ac_exeext
20877 if { (ac_try="$ac_link"
20878 case "(($ac_try" in
20879   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20880   *) ac_try_echo=$ac_try;;
20881 esac
20882 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20883 $as_echo "$ac_try_echo") >&5
20884   (eval "$ac_link") 2>conftest.er1
20885   ac_status=$?
20886   grep -v '^ *+' conftest.er1 >conftest.err
20887   rm -f conftest.er1
20888   cat conftest.err >&5
20889   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20890   (exit $ac_status); } && {
20891          test -z "$ac_c_werror_flag" ||
20892          test ! -s conftest.err
20893        } && test -s conftest$ac_exeext && {
20894          test "$cross_compiling" = yes ||
20895          $as_test_x conftest$ac_exeext
20896        }; then
20897   eval "$as_ac_var=yes"
20898 else
20899   $as_echo "$as_me: failed program was:" >&5
20900 sed 's/^/| /' conftest.$ac_ext >&5
20901
20902         eval "$as_ac_var=no"
20903 fi
20904
20905 rm -rf conftest.dSYM
20906 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20907       conftest$ac_exeext conftest.$ac_ext
20908 fi
20909 ac_res=`eval 'as_val=${'$as_ac_var'}
20910                  $as_echo "$as_val"'`
20911                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20912 $as_echo "$ac_res" >&6; }
20913 as_val=`eval 'as_val=${'$as_ac_var'}
20914                  $as_echo "$as_val"'`
20915    if test "x$as_val" = x""yes; then
20916   cat >>confdefs.h <<_ACEOF
20917 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20918 _ACEOF
20919
20920 else
20921   pgac_need_repl_snprintf=yes
20922 fi
20923 done
20924
20925 fi
20926
20927
20928 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
20929 # include/c.h will provide declarations.  Note this is a separate test
20930 # from whether the functions exist in the C library --- there are
20931 # systems that have the functions but don't bother to declare them :-(
20932
20933 { $as_echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
20934 $as_echo_n "checking whether snprintf is declared... " >&6; }
20935 if test "${ac_cv_have_decl_snprintf+set}" = set; then
20936   $as_echo_n "(cached) " >&6
20937 else
20938   cat >conftest.$ac_ext <<_ACEOF
20939 /* confdefs.h.  */
20940 _ACEOF
20941 cat confdefs.h >>conftest.$ac_ext
20942 cat >>conftest.$ac_ext <<_ACEOF
20943 /* end confdefs.h.  */
20944 $ac_includes_default
20945 int
20946 main ()
20947 {
20948 #ifndef snprintf
20949   (void) snprintf;
20950 #endif
20951
20952   ;
20953   return 0;
20954 }
20955 _ACEOF
20956 rm -f conftest.$ac_objext
20957 if { (ac_try="$ac_compile"
20958 case "(($ac_try" in
20959   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20960   *) ac_try_echo=$ac_try;;
20961 esac
20962 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20963 $as_echo "$ac_try_echo") >&5
20964   (eval "$ac_compile") 2>conftest.er1
20965   ac_status=$?
20966   grep -v '^ *+' conftest.er1 >conftest.err
20967   rm -f conftest.er1
20968   cat conftest.err >&5
20969   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20970   (exit $ac_status); } && {
20971          test -z "$ac_c_werror_flag" ||
20972          test ! -s conftest.err
20973        } && test -s conftest.$ac_objext; then
20974   ac_cv_have_decl_snprintf=yes
20975 else
20976   $as_echo "$as_me: failed program was:" >&5
20977 sed 's/^/| /' conftest.$ac_ext >&5
20978
20979         ac_cv_have_decl_snprintf=no
20980 fi
20981
20982 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20983 fi
20984 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
20985 $as_echo "$ac_cv_have_decl_snprintf" >&6; }
20986 if test "x$ac_cv_have_decl_snprintf" = x""yes; then
20987
20988 cat >>confdefs.h <<_ACEOF
20989 #define HAVE_DECL_SNPRINTF 1
20990 _ACEOF
20991
20992
20993 else
20994   cat >>confdefs.h <<_ACEOF
20995 #define HAVE_DECL_SNPRINTF 0
20996 _ACEOF
20997
20998
20999 fi
21000 { $as_echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
21001 $as_echo_n "checking whether vsnprintf is declared... " >&6; }
21002 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
21003   $as_echo_n "(cached) " >&6
21004 else
21005   cat >conftest.$ac_ext <<_ACEOF
21006 /* confdefs.h.  */
21007 _ACEOF
21008 cat confdefs.h >>conftest.$ac_ext
21009 cat >>conftest.$ac_ext <<_ACEOF
21010 /* end confdefs.h.  */
21011 $ac_includes_default
21012 int
21013 main ()
21014 {
21015 #ifndef vsnprintf
21016   (void) vsnprintf;
21017 #endif
21018
21019   ;
21020   return 0;
21021 }
21022 _ACEOF
21023 rm -f conftest.$ac_objext
21024 if { (ac_try="$ac_compile"
21025 case "(($ac_try" in
21026   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21027   *) ac_try_echo=$ac_try;;
21028 esac
21029 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21030 $as_echo "$ac_try_echo") >&5
21031   (eval "$ac_compile") 2>conftest.er1
21032   ac_status=$?
21033   grep -v '^ *+' conftest.er1 >conftest.err
21034   rm -f conftest.er1
21035   cat conftest.err >&5
21036   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21037   (exit $ac_status); } && {
21038          test -z "$ac_c_werror_flag" ||
21039          test ! -s conftest.err
21040        } && test -s conftest.$ac_objext; then
21041   ac_cv_have_decl_vsnprintf=yes
21042 else
21043   $as_echo "$as_me: failed program was:" >&5
21044 sed 's/^/| /' conftest.$ac_ext >&5
21045
21046         ac_cv_have_decl_vsnprintf=no
21047 fi
21048
21049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21050 fi
21051 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
21052 $as_echo "$ac_cv_have_decl_vsnprintf" >&6; }
21053 if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then
21054
21055 cat >>confdefs.h <<_ACEOF
21056 #define HAVE_DECL_VSNPRINTF 1
21057 _ACEOF
21058
21059
21060 else
21061   cat >>confdefs.h <<_ACEOF
21062 #define HAVE_DECL_VSNPRINTF 0
21063 _ACEOF
21064
21065
21066 fi
21067
21068
21069
21070
21071 { $as_echo "$as_me:$LINENO: checking for isinf" >&5
21072 $as_echo_n "checking for isinf... " >&6; }
21073 if test "${ac_cv_func_isinf+set}" = set; then
21074   $as_echo_n "(cached) " >&6
21075 else
21076   cat >conftest.$ac_ext <<_ACEOF
21077 /* confdefs.h.  */
21078 _ACEOF
21079 cat confdefs.h >>conftest.$ac_ext
21080 cat >>conftest.$ac_ext <<_ACEOF
21081 /* end confdefs.h.  */
21082
21083 #include <math.h>
21084 double glob_double;
21085
21086 int
21087 main ()
21088 {
21089 return isinf(glob_double) ? 0 : 1;
21090   ;
21091   return 0;
21092 }
21093 _ACEOF
21094 rm -f conftest.$ac_objext conftest$ac_exeext
21095 if { (ac_try="$ac_link"
21096 case "(($ac_try" in
21097   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21098   *) ac_try_echo=$ac_try;;
21099 esac
21100 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21101 $as_echo "$ac_try_echo") >&5
21102   (eval "$ac_link") 2>conftest.er1
21103   ac_status=$?
21104   grep -v '^ *+' conftest.er1 >conftest.err
21105   rm -f conftest.er1
21106   cat conftest.err >&5
21107   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21108   (exit $ac_status); } && {
21109          test -z "$ac_c_werror_flag" ||
21110          test ! -s conftest.err
21111        } && test -s conftest$ac_exeext && {
21112          test "$cross_compiling" = yes ||
21113          $as_test_x conftest$ac_exeext
21114        }; then
21115   ac_cv_func_isinf=yes
21116 else
21117   $as_echo "$as_me: failed program was:" >&5
21118 sed 's/^/| /' conftest.$ac_ext >&5
21119
21120         ac_cv_func_isinf=no
21121 fi
21122
21123 rm -rf conftest.dSYM
21124 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21125       conftest$ac_exeext conftest.$ac_ext
21126 fi
21127 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
21128 $as_echo "$ac_cv_func_isinf" >&6; }
21129
21130 if test $ac_cv_func_isinf = yes ; then
21131
21132 cat >>confdefs.h <<\_ACEOF
21133 #define HAVE_ISINF 1
21134 _ACEOF
21135
21136 else
21137   case " $LIBOBJS " in
21138   *" isinf.$ac_objext "* ) ;;
21139   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
21140  ;;
21141 esac
21142
21143   # Look for a way to implement a substitute for isinf()
21144
21145
21146
21147
21148 for ac_func in fpclass fp_class fp_class_d class
21149 do
21150 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21151 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21152 $as_echo_n "checking for $ac_func... " >&6; }
21153 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21154   $as_echo_n "(cached) " >&6
21155 else
21156   cat >conftest.$ac_ext <<_ACEOF
21157 /* confdefs.h.  */
21158 _ACEOF
21159 cat confdefs.h >>conftest.$ac_ext
21160 cat >>conftest.$ac_ext <<_ACEOF
21161 /* end confdefs.h.  */
21162 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21163    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21164 #define $ac_func innocuous_$ac_func
21165
21166 /* System header to define __stub macros and hopefully few prototypes,
21167     which can conflict with char $ac_func (); below.
21168     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21169     <limits.h> exists even on freestanding compilers.  */
21170
21171 #ifdef __STDC__
21172 # include <limits.h>
21173 #else
21174 # include <assert.h>
21175 #endif
21176
21177 #undef $ac_func
21178
21179 /* Override any GCC internal prototype to avoid an error.
21180    Use char because int might match the return type of a GCC
21181    builtin and then its argument prototype would still apply.  */
21182 #ifdef __cplusplus
21183 extern "C"
21184 #endif
21185 char $ac_func ();
21186 /* The GNU C library defines this for functions which it implements
21187     to always fail with ENOSYS.  Some functions are actually named
21188     something starting with __ and the normal name is an alias.  */
21189 #if defined __stub_$ac_func || defined __stub___$ac_func
21190 choke me
21191 #endif
21192
21193 int
21194 main ()
21195 {
21196 return $ac_func ();
21197   ;
21198   return 0;
21199 }
21200 _ACEOF
21201 rm -f conftest.$ac_objext conftest$ac_exeext
21202 if { (ac_try="$ac_link"
21203 case "(($ac_try" in
21204   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21205   *) ac_try_echo=$ac_try;;
21206 esac
21207 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21208 $as_echo "$ac_try_echo") >&5
21209   (eval "$ac_link") 2>conftest.er1
21210   ac_status=$?
21211   grep -v '^ *+' conftest.er1 >conftest.err
21212   rm -f conftest.er1
21213   cat conftest.err >&5
21214   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21215   (exit $ac_status); } && {
21216          test -z "$ac_c_werror_flag" ||
21217          test ! -s conftest.err
21218        } && test -s conftest$ac_exeext && {
21219          test "$cross_compiling" = yes ||
21220          $as_test_x conftest$ac_exeext
21221        }; then
21222   eval "$as_ac_var=yes"
21223 else
21224   $as_echo "$as_me: failed program was:" >&5
21225 sed 's/^/| /' conftest.$ac_ext >&5
21226
21227         eval "$as_ac_var=no"
21228 fi
21229
21230 rm -rf conftest.dSYM
21231 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21232       conftest$ac_exeext conftest.$ac_ext
21233 fi
21234 ac_res=`eval 'as_val=${'$as_ac_var'}
21235                  $as_echo "$as_val"'`
21236                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21237 $as_echo "$ac_res" >&6; }
21238 as_val=`eval 'as_val=${'$as_ac_var'}
21239                  $as_echo "$as_val"'`
21240    if test "x$as_val" = x""yes; then
21241   cat >>confdefs.h <<_ACEOF
21242 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21243 _ACEOF
21244  break
21245 fi
21246 done
21247
21248 fi
21249
21250
21251
21252
21253
21254
21255
21256
21257
21258
21259
21260
21261 for ac_func in crypt fls getopt getrusage inet_aton random rint srandom strerror strlcat strlcpy
21262 do
21263 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21264 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21265 $as_echo_n "checking for $ac_func... " >&6; }
21266 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21267   $as_echo_n "(cached) " >&6
21268 else
21269   cat >conftest.$ac_ext <<_ACEOF
21270 /* confdefs.h.  */
21271 _ACEOF
21272 cat confdefs.h >>conftest.$ac_ext
21273 cat >>conftest.$ac_ext <<_ACEOF
21274 /* end confdefs.h.  */
21275 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21276    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21277 #define $ac_func innocuous_$ac_func
21278
21279 /* System header to define __stub macros and hopefully few prototypes,
21280     which can conflict with char $ac_func (); below.
21281     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21282     <limits.h> exists even on freestanding compilers.  */
21283
21284 #ifdef __STDC__
21285 # include <limits.h>
21286 #else
21287 # include <assert.h>
21288 #endif
21289
21290 #undef $ac_func
21291
21292 /* Override any GCC internal prototype to avoid an error.
21293    Use char because int might match the return type of a GCC
21294    builtin and then its argument prototype would still apply.  */
21295 #ifdef __cplusplus
21296 extern "C"
21297 #endif
21298 char $ac_func ();
21299 /* The GNU C library defines this for functions which it implements
21300     to always fail with ENOSYS.  Some functions are actually named
21301     something starting with __ and the normal name is an alias.  */
21302 #if defined __stub_$ac_func || defined __stub___$ac_func
21303 choke me
21304 #endif
21305
21306 int
21307 main ()
21308 {
21309 return $ac_func ();
21310   ;
21311   return 0;
21312 }
21313 _ACEOF
21314 rm -f conftest.$ac_objext conftest$ac_exeext
21315 if { (ac_try="$ac_link"
21316 case "(($ac_try" in
21317   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21318   *) ac_try_echo=$ac_try;;
21319 esac
21320 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21321 $as_echo "$ac_try_echo") >&5
21322   (eval "$ac_link") 2>conftest.er1
21323   ac_status=$?
21324   grep -v '^ *+' conftest.er1 >conftest.err
21325   rm -f conftest.er1
21326   cat conftest.err >&5
21327   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21328   (exit $ac_status); } && {
21329          test -z "$ac_c_werror_flag" ||
21330          test ! -s conftest.err
21331        } && test -s conftest$ac_exeext && {
21332          test "$cross_compiling" = yes ||
21333          $as_test_x conftest$ac_exeext
21334        }; then
21335   eval "$as_ac_var=yes"
21336 else
21337   $as_echo "$as_me: failed program was:" >&5
21338 sed 's/^/| /' conftest.$ac_ext >&5
21339
21340         eval "$as_ac_var=no"
21341 fi
21342
21343 rm -rf conftest.dSYM
21344 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21345       conftest$ac_exeext conftest.$ac_ext
21346 fi
21347 ac_res=`eval 'as_val=${'$as_ac_var'}
21348                  $as_echo "$as_val"'`
21349                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21350 $as_echo "$ac_res" >&6; }
21351 as_val=`eval 'as_val=${'$as_ac_var'}
21352                  $as_echo "$as_val"'`
21353    if test "x$as_val" = x""yes; then
21354   cat >>confdefs.h <<_ACEOF
21355 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21356 _ACEOF
21357
21358 else
21359   case " $LIBOBJS " in
21360   *" $ac_func.$ac_objext "* ) ;;
21361   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21362  ;;
21363 esac
21364
21365 fi
21366 done
21367
21368
21369
21370 case $host_os in
21371
21372         # Windows uses a specialised env handler
21373         # and doesn't need a replacement getpeereid because it doesn't use
21374         # Unix sockets.
21375         mingw*)
21376
21377 cat >>confdefs.h <<\_ACEOF
21378 #define HAVE_UNSETENV 1
21379 _ACEOF
21380
21381
21382 cat >>confdefs.h <<\_ACEOF
21383 #define HAVE_GETPEEREID 1
21384 _ACEOF
21385
21386                 ac_cv_func_unsetenv=yes
21387                 ac_cv_func_getpeereid=yes;;
21388         *)
21389
21390
21391 for ac_func in unsetenv getpeereid
21392 do
21393 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21394 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21395 $as_echo_n "checking for $ac_func... " >&6; }
21396 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21397   $as_echo_n "(cached) " >&6
21398 else
21399   cat >conftest.$ac_ext <<_ACEOF
21400 /* confdefs.h.  */
21401 _ACEOF
21402 cat confdefs.h >>conftest.$ac_ext
21403 cat >>conftest.$ac_ext <<_ACEOF
21404 /* end confdefs.h.  */
21405 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21406    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21407 #define $ac_func innocuous_$ac_func
21408
21409 /* System header to define __stub macros and hopefully few prototypes,
21410     which can conflict with char $ac_func (); below.
21411     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21412     <limits.h> exists even on freestanding compilers.  */
21413
21414 #ifdef __STDC__
21415 # include <limits.h>
21416 #else
21417 # include <assert.h>
21418 #endif
21419
21420 #undef $ac_func
21421
21422 /* Override any GCC internal prototype to avoid an error.
21423    Use char because int might match the return type of a GCC
21424    builtin and then its argument prototype would still apply.  */
21425 #ifdef __cplusplus
21426 extern "C"
21427 #endif
21428 char $ac_func ();
21429 /* The GNU C library defines this for functions which it implements
21430     to always fail with ENOSYS.  Some functions are actually named
21431     something starting with __ and the normal name is an alias.  */
21432 #if defined __stub_$ac_func || defined __stub___$ac_func
21433 choke me
21434 #endif
21435
21436 int
21437 main ()
21438 {
21439 return $ac_func ();
21440   ;
21441   return 0;
21442 }
21443 _ACEOF
21444 rm -f conftest.$ac_objext conftest$ac_exeext
21445 if { (ac_try="$ac_link"
21446 case "(($ac_try" in
21447   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21448   *) ac_try_echo=$ac_try;;
21449 esac
21450 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21451 $as_echo "$ac_try_echo") >&5
21452   (eval "$ac_link") 2>conftest.er1
21453   ac_status=$?
21454   grep -v '^ *+' conftest.er1 >conftest.err
21455   rm -f conftest.er1
21456   cat conftest.err >&5
21457   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21458   (exit $ac_status); } && {
21459          test -z "$ac_c_werror_flag" ||
21460          test ! -s conftest.err
21461        } && test -s conftest$ac_exeext && {
21462          test "$cross_compiling" = yes ||
21463          $as_test_x conftest$ac_exeext
21464        }; then
21465   eval "$as_ac_var=yes"
21466 else
21467   $as_echo "$as_me: failed program was:" >&5
21468 sed 's/^/| /' conftest.$ac_ext >&5
21469
21470         eval "$as_ac_var=no"
21471 fi
21472
21473 rm -rf conftest.dSYM
21474 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21475       conftest$ac_exeext conftest.$ac_ext
21476 fi
21477 ac_res=`eval 'as_val=${'$as_ac_var'}
21478                  $as_echo "$as_val"'`
21479                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21480 $as_echo "$ac_res" >&6; }
21481 as_val=`eval 'as_val=${'$as_ac_var'}
21482                  $as_echo "$as_val"'`
21483    if test "x$as_val" = x""yes; then
21484   cat >>confdefs.h <<_ACEOF
21485 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21486 _ACEOF
21487
21488 else
21489   case " $LIBOBJS " in
21490   *" $ac_func.$ac_objext "* ) ;;
21491   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21492  ;;
21493 esac
21494
21495 fi
21496 done
21497
21498
21499                 ;;
21500 esac
21501
21502 # System's version of getaddrinfo(), if any, may be used only if we found
21503 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
21504 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
21505 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
21506 # because we want to use our own getaddrinfo.c on Windows anyway.)
21507 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
21508
21509 for ac_func in getaddrinfo
21510 do
21511 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21512 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21513 $as_echo_n "checking for $ac_func... " >&6; }
21514 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21515   $as_echo_n "(cached) " >&6
21516 else
21517   cat >conftest.$ac_ext <<_ACEOF
21518 /* confdefs.h.  */
21519 _ACEOF
21520 cat confdefs.h >>conftest.$ac_ext
21521 cat >>conftest.$ac_ext <<_ACEOF
21522 /* end confdefs.h.  */
21523 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21524    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21525 #define $ac_func innocuous_$ac_func
21526
21527 /* System header to define __stub macros and hopefully few prototypes,
21528     which can conflict with char $ac_func (); below.
21529     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21530     <limits.h> exists even on freestanding compilers.  */
21531
21532 #ifdef __STDC__
21533 # include <limits.h>
21534 #else
21535 # include <assert.h>
21536 #endif
21537
21538 #undef $ac_func
21539
21540 /* Override any GCC internal prototype to avoid an error.
21541    Use char because int might match the return type of a GCC
21542    builtin and then its argument prototype would still apply.  */
21543 #ifdef __cplusplus
21544 extern "C"
21545 #endif
21546 char $ac_func ();
21547 /* The GNU C library defines this for functions which it implements
21548     to always fail with ENOSYS.  Some functions are actually named
21549     something starting with __ and the normal name is an alias.  */
21550 #if defined __stub_$ac_func || defined __stub___$ac_func
21551 choke me
21552 #endif
21553
21554 int
21555 main ()
21556 {
21557 return $ac_func ();
21558   ;
21559   return 0;
21560 }
21561 _ACEOF
21562 rm -f conftest.$ac_objext conftest$ac_exeext
21563 if { (ac_try="$ac_link"
21564 case "(($ac_try" in
21565   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21566   *) ac_try_echo=$ac_try;;
21567 esac
21568 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21569 $as_echo "$ac_try_echo") >&5
21570   (eval "$ac_link") 2>conftest.er1
21571   ac_status=$?
21572   grep -v '^ *+' conftest.er1 >conftest.err
21573   rm -f conftest.er1
21574   cat conftest.err >&5
21575   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21576   (exit $ac_status); } && {
21577          test -z "$ac_c_werror_flag" ||
21578          test ! -s conftest.err
21579        } && test -s conftest$ac_exeext && {
21580          test "$cross_compiling" = yes ||
21581          $as_test_x conftest$ac_exeext
21582        }; then
21583   eval "$as_ac_var=yes"
21584 else
21585   $as_echo "$as_me: failed program was:" >&5
21586 sed 's/^/| /' conftest.$ac_ext >&5
21587
21588         eval "$as_ac_var=no"
21589 fi
21590
21591 rm -rf conftest.dSYM
21592 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21593       conftest$ac_exeext conftest.$ac_ext
21594 fi
21595 ac_res=`eval 'as_val=${'$as_ac_var'}
21596                  $as_echo "$as_val"'`
21597                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21598 $as_echo "$ac_res" >&6; }
21599 as_val=`eval 'as_val=${'$as_ac_var'}
21600                  $as_echo "$as_val"'`
21601    if test "x$as_val" = x""yes; then
21602   cat >>confdefs.h <<_ACEOF
21603 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21604 _ACEOF
21605
21606 else
21607   case " $LIBOBJS " in
21608   *" $ac_func.$ac_objext "* ) ;;
21609   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21610  ;;
21611 esac
21612
21613 fi
21614 done
21615
21616
21617 else
21618   case " $LIBOBJS " in
21619   *" getaddrinfo.$ac_objext "* ) ;;
21620   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
21621  ;;
21622 esac
21623
21624 fi
21625
21626 # Similarly, use system's getopt_long() only if system provides struct option.
21627 if test x"$ac_cv_type_struct_option" = xyes ; then
21628
21629 for ac_func in getopt_long
21630 do
21631 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21632 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21633 $as_echo_n "checking for $ac_func... " >&6; }
21634 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21635   $as_echo_n "(cached) " >&6
21636 else
21637   cat >conftest.$ac_ext <<_ACEOF
21638 /* confdefs.h.  */
21639 _ACEOF
21640 cat confdefs.h >>conftest.$ac_ext
21641 cat >>conftest.$ac_ext <<_ACEOF
21642 /* end confdefs.h.  */
21643 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21644    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21645 #define $ac_func innocuous_$ac_func
21646
21647 /* System header to define __stub macros and hopefully few prototypes,
21648     which can conflict with char $ac_func (); below.
21649     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21650     <limits.h> exists even on freestanding compilers.  */
21651
21652 #ifdef __STDC__
21653 # include <limits.h>
21654 #else
21655 # include <assert.h>
21656 #endif
21657
21658 #undef $ac_func
21659
21660 /* Override any GCC internal prototype to avoid an error.
21661    Use char because int might match the return type of a GCC
21662    builtin and then its argument prototype would still apply.  */
21663 #ifdef __cplusplus
21664 extern "C"
21665 #endif
21666 char $ac_func ();
21667 /* The GNU C library defines this for functions which it implements
21668     to always fail with ENOSYS.  Some functions are actually named
21669     something starting with __ and the normal name is an alias.  */
21670 #if defined __stub_$ac_func || defined __stub___$ac_func
21671 choke me
21672 #endif
21673
21674 int
21675 main ()
21676 {
21677 return $ac_func ();
21678   ;
21679   return 0;
21680 }
21681 _ACEOF
21682 rm -f conftest.$ac_objext conftest$ac_exeext
21683 if { (ac_try="$ac_link"
21684 case "(($ac_try" in
21685   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21686   *) ac_try_echo=$ac_try;;
21687 esac
21688 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21689 $as_echo "$ac_try_echo") >&5
21690   (eval "$ac_link") 2>conftest.er1
21691   ac_status=$?
21692   grep -v '^ *+' conftest.er1 >conftest.err
21693   rm -f conftest.er1
21694   cat conftest.err >&5
21695   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21696   (exit $ac_status); } && {
21697          test -z "$ac_c_werror_flag" ||
21698          test ! -s conftest.err
21699        } && test -s conftest$ac_exeext && {
21700          test "$cross_compiling" = yes ||
21701          $as_test_x conftest$ac_exeext
21702        }; then
21703   eval "$as_ac_var=yes"
21704 else
21705   $as_echo "$as_me: failed program was:" >&5
21706 sed 's/^/| /' conftest.$ac_ext >&5
21707
21708         eval "$as_ac_var=no"
21709 fi
21710
21711 rm -rf conftest.dSYM
21712 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21713       conftest$ac_exeext conftest.$ac_ext
21714 fi
21715 ac_res=`eval 'as_val=${'$as_ac_var'}
21716                  $as_echo "$as_val"'`
21717                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21718 $as_echo "$ac_res" >&6; }
21719 as_val=`eval 'as_val=${'$as_ac_var'}
21720                  $as_echo "$as_val"'`
21721    if test "x$as_val" = x""yes; then
21722   cat >>confdefs.h <<_ACEOF
21723 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21724 _ACEOF
21725
21726 else
21727   case " $LIBOBJS " in
21728   *" $ac_func.$ac_objext "* ) ;;
21729   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21730  ;;
21731 esac
21732
21733 fi
21734 done
21735
21736
21737 else
21738   case " $LIBOBJS " in
21739   *" getopt_long.$ac_objext "* ) ;;
21740   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
21741  ;;
21742 esac
21743
21744 fi
21745
21746 # Solaris' getopt() doesn't do what we want for long options, so always use
21747 # our version on that platform.
21748 if test "$PORTNAME" = "solaris"; then
21749   case " $LIBOBJS " in
21750   *" getopt.$ac_objext "* ) ;;
21751   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
21752  ;;
21753 esac
21754
21755 fi
21756
21757 # mingw has adopted a GNU-centric interpretation of optind/optreset,
21758 # so always use our version on Windows.
21759 if test "$PORTNAME" = "win32"; then
21760   case " $LIBOBJS " in
21761   *" getopt.$ac_objext "* ) ;;
21762   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
21763  ;;
21764 esac
21765
21766   case " $LIBOBJS " in
21767   *" getopt_long.$ac_objext "* ) ;;
21768   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
21769  ;;
21770 esac
21771
21772 fi
21773
21774 # Win32 support
21775 if test "$PORTNAME" = "win32"; then
21776
21777 for ac_func in gettimeofday
21778 do
21779 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21780 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21781 $as_echo_n "checking for $ac_func... " >&6; }
21782 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21783   $as_echo_n "(cached) " >&6
21784 else
21785   cat >conftest.$ac_ext <<_ACEOF
21786 /* confdefs.h.  */
21787 _ACEOF
21788 cat confdefs.h >>conftest.$ac_ext
21789 cat >>conftest.$ac_ext <<_ACEOF
21790 /* end confdefs.h.  */
21791 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21792    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21793 #define $ac_func innocuous_$ac_func
21794
21795 /* System header to define __stub macros and hopefully few prototypes,
21796     which can conflict with char $ac_func (); below.
21797     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21798     <limits.h> exists even on freestanding compilers.  */
21799
21800 #ifdef __STDC__
21801 # include <limits.h>
21802 #else
21803 # include <assert.h>
21804 #endif
21805
21806 #undef $ac_func
21807
21808 /* Override any GCC internal prototype to avoid an error.
21809    Use char because int might match the return type of a GCC
21810    builtin and then its argument prototype would still apply.  */
21811 #ifdef __cplusplus
21812 extern "C"
21813 #endif
21814 char $ac_func ();
21815 /* The GNU C library defines this for functions which it implements
21816     to always fail with ENOSYS.  Some functions are actually named
21817     something starting with __ and the normal name is an alias.  */
21818 #if defined __stub_$ac_func || defined __stub___$ac_func
21819 choke me
21820 #endif
21821
21822 int
21823 main ()
21824 {
21825 return $ac_func ();
21826   ;
21827   return 0;
21828 }
21829 _ACEOF
21830 rm -f conftest.$ac_objext conftest$ac_exeext
21831 if { (ac_try="$ac_link"
21832 case "(($ac_try" in
21833   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21834   *) ac_try_echo=$ac_try;;
21835 esac
21836 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21837 $as_echo "$ac_try_echo") >&5
21838   (eval "$ac_link") 2>conftest.er1
21839   ac_status=$?
21840   grep -v '^ *+' conftest.er1 >conftest.err
21841   rm -f conftest.er1
21842   cat conftest.err >&5
21843   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21844   (exit $ac_status); } && {
21845          test -z "$ac_c_werror_flag" ||
21846          test ! -s conftest.err
21847        } && test -s conftest$ac_exeext && {
21848          test "$cross_compiling" = yes ||
21849          $as_test_x conftest$ac_exeext
21850        }; then
21851   eval "$as_ac_var=yes"
21852 else
21853   $as_echo "$as_me: failed program was:" >&5
21854 sed 's/^/| /' conftest.$ac_ext >&5
21855
21856         eval "$as_ac_var=no"
21857 fi
21858
21859 rm -rf conftest.dSYM
21860 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21861       conftest$ac_exeext conftest.$ac_ext
21862 fi
21863 ac_res=`eval 'as_val=${'$as_ac_var'}
21864                  $as_echo "$as_val"'`
21865                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21866 $as_echo "$ac_res" >&6; }
21867 as_val=`eval 'as_val=${'$as_ac_var'}
21868                  $as_echo "$as_val"'`
21869    if test "x$as_val" = x""yes; then
21870   cat >>confdefs.h <<_ACEOF
21871 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21872 _ACEOF
21873
21874 else
21875   case " $LIBOBJS " in
21876   *" $ac_func.$ac_objext "* ) ;;
21877   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21878  ;;
21879 esac
21880
21881 fi
21882 done
21883
21884
21885   case " $LIBOBJS " in
21886   *" kill.$ac_objext "* ) ;;
21887   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
21888  ;;
21889 esac
21890
21891   case " $LIBOBJS " in
21892   *" open.$ac_objext "* ) ;;
21893   *) LIBOBJS="$LIBOBJS open.$ac_objext"
21894  ;;
21895 esac
21896
21897   case " $LIBOBJS " in
21898   *" win32env.$ac_objext "* ) ;;
21899   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
21900  ;;
21901 esac
21902
21903   case " $LIBOBJS " in
21904   *" win32error.$ac_objext "* ) ;;
21905   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
21906  ;;
21907 esac
21908
21909   case " $LIBOBJS " in
21910   *" win32setlocale.$ac_objext "* ) ;;
21911   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
21912  ;;
21913 esac
21914
21915
21916 cat >>confdefs.h <<\_ACEOF
21917 #define HAVE_SYMLINK 1
21918 _ACEOF
21919
21920   { $as_echo "$as_me:$LINENO: checking for MINIDUMP_TYPE" >&5
21921 $as_echo_n "checking for MINIDUMP_TYPE... " >&6; }
21922 if test "${ac_cv_type_MINIDUMP_TYPE+set}" = set; then
21923   $as_echo_n "(cached) " >&6
21924 else
21925   ac_cv_type_MINIDUMP_TYPE=no
21926 cat >conftest.$ac_ext <<_ACEOF
21927 /* confdefs.h.  */
21928 _ACEOF
21929 cat confdefs.h >>conftest.$ac_ext
21930 cat >>conftest.$ac_ext <<_ACEOF
21931 /* end confdefs.h.  */
21932
21933 #define WIN32_LEAN_AND_MEAN
21934 #include <windows.h>
21935 #include <string.h>
21936 #include <dbghelp.h>
21937
21938 int
21939 main ()
21940 {
21941 if (sizeof (MINIDUMP_TYPE))
21942        return 0;
21943   ;
21944   return 0;
21945 }
21946 _ACEOF
21947 rm -f conftest.$ac_objext
21948 if { (ac_try="$ac_compile"
21949 case "(($ac_try" in
21950   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21951   *) ac_try_echo=$ac_try;;
21952 esac
21953 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21954 $as_echo "$ac_try_echo") >&5
21955   (eval "$ac_compile") 2>conftest.er1
21956   ac_status=$?
21957   grep -v '^ *+' conftest.er1 >conftest.err
21958   rm -f conftest.er1
21959   cat conftest.err >&5
21960   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21961   (exit $ac_status); } && {
21962          test -z "$ac_c_werror_flag" ||
21963          test ! -s conftest.err
21964        } && test -s conftest.$ac_objext; then
21965   cat >conftest.$ac_ext <<_ACEOF
21966 /* confdefs.h.  */
21967 _ACEOF
21968 cat confdefs.h >>conftest.$ac_ext
21969 cat >>conftest.$ac_ext <<_ACEOF
21970 /* end confdefs.h.  */
21971
21972 #define WIN32_LEAN_AND_MEAN
21973 #include <windows.h>
21974 #include <string.h>
21975 #include <dbghelp.h>
21976
21977 int
21978 main ()
21979 {
21980 if (sizeof ((MINIDUMP_TYPE)))
21981           return 0;
21982   ;
21983   return 0;
21984 }
21985 _ACEOF
21986 rm -f conftest.$ac_objext
21987 if { (ac_try="$ac_compile"
21988 case "(($ac_try" in
21989   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21990   *) ac_try_echo=$ac_try;;
21991 esac
21992 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21993 $as_echo "$ac_try_echo") >&5
21994   (eval "$ac_compile") 2>conftest.er1
21995   ac_status=$?
21996   grep -v '^ *+' conftest.er1 >conftest.err
21997   rm -f conftest.er1
21998   cat conftest.err >&5
21999   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22000   (exit $ac_status); } && {
22001          test -z "$ac_c_werror_flag" ||
22002          test ! -s conftest.err
22003        } && test -s conftest.$ac_objext; then
22004   :
22005 else
22006   $as_echo "$as_me: failed program was:" >&5
22007 sed 's/^/| /' conftest.$ac_ext >&5
22008
22009         ac_cv_type_MINIDUMP_TYPE=yes
22010 fi
22011
22012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22013 else
22014   $as_echo "$as_me: failed program was:" >&5
22015 sed 's/^/| /' conftest.$ac_ext >&5
22016
22017
22018 fi
22019
22020 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22021 fi
22022 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_MINIDUMP_TYPE" >&5
22023 $as_echo "$ac_cv_type_MINIDUMP_TYPE" >&6; }
22024 if test "x$ac_cv_type_MINIDUMP_TYPE" = x""yes; then
22025
22026 cat >>confdefs.h <<_ACEOF
22027 #define HAVE_MINIDUMP_TYPE 1
22028 _ACEOF
22029
22030 pgac_minidump_type=yes
22031 else
22032   pgac_minidump_type=no
22033 fi
22034
22035 fi
22036 if test x"$pgac_minidump_type" = x"yes" ; then
22037   have_win32_dbghelp=yes
22038
22039 else
22040   have_win32_dbghelp=no
22041
22042 fi
22043
22044 { $as_echo "$as_me:$LINENO: checking for sigsetjmp" >&5
22045 $as_echo_n "checking for sigsetjmp... " >&6; }
22046 if test "${pgac_cv_func_sigsetjmp+set}" = set; then
22047   $as_echo_n "(cached) " >&6
22048 else
22049   cat >conftest.$ac_ext <<_ACEOF
22050 /* confdefs.h.  */
22051 _ACEOF
22052 cat confdefs.h >>conftest.$ac_ext
22053 cat >>conftest.$ac_ext <<_ACEOF
22054 /* end confdefs.h.  */
22055 #include <setjmp.h>
22056 int
22057 main ()
22058 {
22059 sigjmp_buf x; sigsetjmp(x, 1);
22060   ;
22061   return 0;
22062 }
22063 _ACEOF
22064 rm -f conftest.$ac_objext conftest$ac_exeext
22065 if { (ac_try="$ac_link"
22066 case "(($ac_try" in
22067   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22068   *) ac_try_echo=$ac_try;;
22069 esac
22070 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22071 $as_echo "$ac_try_echo") >&5
22072   (eval "$ac_link") 2>conftest.er1
22073   ac_status=$?
22074   grep -v '^ *+' conftest.er1 >conftest.err
22075   rm -f conftest.er1
22076   cat conftest.err >&5
22077   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22078   (exit $ac_status); } && {
22079          test -z "$ac_c_werror_flag" ||
22080          test ! -s conftest.err
22081        } && test -s conftest$ac_exeext && {
22082          test "$cross_compiling" = yes ||
22083          $as_test_x conftest$ac_exeext
22084        }; then
22085   pgac_cv_func_sigsetjmp=yes
22086 else
22087   $as_echo "$as_me: failed program was:" >&5
22088 sed 's/^/| /' conftest.$ac_ext >&5
22089
22090         pgac_cv_func_sigsetjmp=no
22091 fi
22092
22093 rm -rf conftest.dSYM
22094 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22095       conftest$ac_exeext conftest.$ac_ext
22096 fi
22097 { $as_echo "$as_me:$LINENO: result: $pgac_cv_func_sigsetjmp" >&5
22098 $as_echo "$pgac_cv_func_sigsetjmp" >&6; }
22099 if test x"$pgac_cv_func_sigsetjmp" = x"yes"; then
22100
22101 cat >>confdefs.h <<\_ACEOF
22102 #define HAVE_SIGSETJMP 1
22103 _ACEOF
22104
22105 fi
22106
22107 { $as_echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
22108 $as_echo_n "checking whether sys_siglist is declared... " >&6; }
22109 if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
22110   $as_echo_n "(cached) " >&6
22111 else
22112   cat >conftest.$ac_ext <<_ACEOF
22113 /* confdefs.h.  */
22114 _ACEOF
22115 cat confdefs.h >>conftest.$ac_ext
22116 cat >>conftest.$ac_ext <<_ACEOF
22117 /* end confdefs.h.  */
22118 #include <signal.h>
22119 /* NetBSD declares sys_siglist in unistd.h.  */
22120 #ifdef HAVE_UNISTD_H
22121 # include <unistd.h>
22122 #endif
22123
22124
22125 int
22126 main ()
22127 {
22128 #ifndef sys_siglist
22129   (void) sys_siglist;
22130 #endif
22131
22132   ;
22133   return 0;
22134 }
22135 _ACEOF
22136 rm -f conftest.$ac_objext
22137 if { (ac_try="$ac_compile"
22138 case "(($ac_try" in
22139   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22140   *) ac_try_echo=$ac_try;;
22141 esac
22142 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22143 $as_echo "$ac_try_echo") >&5
22144   (eval "$ac_compile") 2>conftest.er1
22145   ac_status=$?
22146   grep -v '^ *+' conftest.er1 >conftest.err
22147   rm -f conftest.er1
22148   cat conftest.err >&5
22149   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22150   (exit $ac_status); } && {
22151          test -z "$ac_c_werror_flag" ||
22152          test ! -s conftest.err
22153        } && test -s conftest.$ac_objext; then
22154   ac_cv_have_decl_sys_siglist=yes
22155 else
22156   $as_echo "$as_me: failed program was:" >&5
22157 sed 's/^/| /' conftest.$ac_ext >&5
22158
22159         ac_cv_have_decl_sys_siglist=no
22160 fi
22161
22162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22163 fi
22164 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
22165 $as_echo "$ac_cv_have_decl_sys_siglist" >&6; }
22166 if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then
22167
22168 cat >>confdefs.h <<_ACEOF
22169 #define HAVE_DECL_SYS_SIGLIST 1
22170 _ACEOF
22171
22172
22173 else
22174   cat >>confdefs.h <<_ACEOF
22175 #define HAVE_DECL_SYS_SIGLIST 0
22176 _ACEOF
22177
22178
22179 fi
22180
22181
22182
22183
22184 { $as_echo "$as_me:$LINENO: checking for syslog" >&5
22185 $as_echo_n "checking for syslog... " >&6; }
22186 if test "${ac_cv_func_syslog+set}" = set; then
22187   $as_echo_n "(cached) " >&6
22188 else
22189   cat >conftest.$ac_ext <<_ACEOF
22190 /* confdefs.h.  */
22191 _ACEOF
22192 cat confdefs.h >>conftest.$ac_ext
22193 cat >>conftest.$ac_ext <<_ACEOF
22194 /* end confdefs.h.  */
22195 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
22196    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
22197 #define syslog innocuous_syslog
22198
22199 /* System header to define __stub macros and hopefully few prototypes,
22200     which can conflict with char syslog (); below.
22201     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22202     <limits.h> exists even on freestanding compilers.  */
22203
22204 #ifdef __STDC__
22205 # include <limits.h>
22206 #else
22207 # include <assert.h>
22208 #endif
22209
22210 #undef syslog
22211
22212 /* Override any GCC internal prototype to avoid an error.
22213    Use char because int might match the return type of a GCC
22214    builtin and then its argument prototype would still apply.  */
22215 #ifdef __cplusplus
22216 extern "C"
22217 #endif
22218 char syslog ();
22219 /* The GNU C library defines this for functions which it implements
22220     to always fail with ENOSYS.  Some functions are actually named
22221     something starting with __ and the normal name is an alias.  */
22222 #if defined __stub_syslog || defined __stub___syslog
22223 choke me
22224 #endif
22225
22226 int
22227 main ()
22228 {
22229 return syslog ();
22230   ;
22231   return 0;
22232 }
22233 _ACEOF
22234 rm -f conftest.$ac_objext conftest$ac_exeext
22235 if { (ac_try="$ac_link"
22236 case "(($ac_try" in
22237   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22238   *) ac_try_echo=$ac_try;;
22239 esac
22240 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22241 $as_echo "$ac_try_echo") >&5
22242   (eval "$ac_link") 2>conftest.er1
22243   ac_status=$?
22244   grep -v '^ *+' conftest.er1 >conftest.err
22245   rm -f conftest.er1
22246   cat conftest.err >&5
22247   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22248   (exit $ac_status); } && {
22249          test -z "$ac_c_werror_flag" ||
22250          test ! -s conftest.err
22251        } && test -s conftest$ac_exeext && {
22252          test "$cross_compiling" = yes ||
22253          $as_test_x conftest$ac_exeext
22254        }; then
22255   ac_cv_func_syslog=yes
22256 else
22257   $as_echo "$as_me: failed program was:" >&5
22258 sed 's/^/| /' conftest.$ac_ext >&5
22259
22260         ac_cv_func_syslog=no
22261 fi
22262
22263 rm -rf conftest.dSYM
22264 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22265       conftest$ac_exeext conftest.$ac_ext
22266 fi
22267 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
22268 $as_echo "$ac_cv_func_syslog" >&6; }
22269 if test "x$ac_cv_func_syslog" = x""yes; then
22270   if test "${ac_cv_header_syslog_h+set}" = set; then
22271   { $as_echo "$as_me:$LINENO: checking for syslog.h" >&5
22272 $as_echo_n "checking for syslog.h... " >&6; }
22273 if test "${ac_cv_header_syslog_h+set}" = set; then
22274   $as_echo_n "(cached) " >&6
22275 fi
22276 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
22277 $as_echo "$ac_cv_header_syslog_h" >&6; }
22278 else
22279   # Is the header compilable?
22280 { $as_echo "$as_me:$LINENO: checking syslog.h usability" >&5
22281 $as_echo_n "checking syslog.h usability... " >&6; }
22282 cat >conftest.$ac_ext <<_ACEOF
22283 /* confdefs.h.  */
22284 _ACEOF
22285 cat confdefs.h >>conftest.$ac_ext
22286 cat >>conftest.$ac_ext <<_ACEOF
22287 /* end confdefs.h.  */
22288 $ac_includes_default
22289 #include <syslog.h>
22290 _ACEOF
22291 rm -f conftest.$ac_objext
22292 if { (ac_try="$ac_compile"
22293 case "(($ac_try" in
22294   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22295   *) ac_try_echo=$ac_try;;
22296 esac
22297 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22298 $as_echo "$ac_try_echo") >&5
22299   (eval "$ac_compile") 2>conftest.er1
22300   ac_status=$?
22301   grep -v '^ *+' conftest.er1 >conftest.err
22302   rm -f conftest.er1
22303   cat conftest.err >&5
22304   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22305   (exit $ac_status); } && {
22306          test -z "$ac_c_werror_flag" ||
22307          test ! -s conftest.err
22308        } && test -s conftest.$ac_objext; then
22309   ac_header_compiler=yes
22310 else
22311   $as_echo "$as_me: failed program was:" >&5
22312 sed 's/^/| /' conftest.$ac_ext >&5
22313
22314         ac_header_compiler=no
22315 fi
22316
22317 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22318 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22319 $as_echo "$ac_header_compiler" >&6; }
22320
22321 # Is the header present?
22322 { $as_echo "$as_me:$LINENO: checking syslog.h presence" >&5
22323 $as_echo_n "checking syslog.h presence... " >&6; }
22324 cat >conftest.$ac_ext <<_ACEOF
22325 /* confdefs.h.  */
22326 _ACEOF
22327 cat confdefs.h >>conftest.$ac_ext
22328 cat >>conftest.$ac_ext <<_ACEOF
22329 /* end confdefs.h.  */
22330 #include <syslog.h>
22331 _ACEOF
22332 if { (ac_try="$ac_cpp conftest.$ac_ext"
22333 case "(($ac_try" in
22334   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22335   *) ac_try_echo=$ac_try;;
22336 esac
22337 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22338 $as_echo "$ac_try_echo") >&5
22339   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
22340   ac_status=$?
22341   grep -v '^ *+' conftest.er1 >conftest.err
22342   rm -f conftest.er1
22343   cat conftest.err >&5
22344   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22345   (exit $ac_status); } >/dev/null && {
22346          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22347          test ! -s conftest.err
22348        }; then
22349   ac_header_preproc=yes
22350 else
22351   $as_echo "$as_me: failed program was:" >&5
22352 sed 's/^/| /' conftest.$ac_ext >&5
22353
22354   ac_header_preproc=no
22355 fi
22356
22357 rm -f conftest.err conftest.$ac_ext
22358 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22359 $as_echo "$ac_header_preproc" >&6; }
22360
22361 # So?  What about this header?
22362 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22363   yes:no: )
22364     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
22365 $as_echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22366     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
22367 $as_echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
22368     ac_header_preproc=yes
22369     ;;
22370   no:yes:* )
22371     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
22372 $as_echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
22373     { $as_echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
22374 $as_echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
22375     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
22376 $as_echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
22377     { $as_echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
22378 $as_echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22379     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
22380 $as_echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
22381     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
22382 $as_echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
22383     ( cat <<\_ASBOX
22384 ## ---------------------------------------- ##
22385 ## Report this to pgsql-bugs@postgresql.org ##
22386 ## ---------------------------------------- ##
22387 _ASBOX
22388      ) | sed "s/^/$as_me: WARNING:     /" >&2
22389     ;;
22390 esac
22391 { $as_echo "$as_me:$LINENO: checking for syslog.h" >&5
22392 $as_echo_n "checking for syslog.h... " >&6; }
22393 if test "${ac_cv_header_syslog_h+set}" = set; then
22394   $as_echo_n "(cached) " >&6
22395 else
22396   ac_cv_header_syslog_h=$ac_header_preproc
22397 fi
22398 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
22399 $as_echo "$ac_cv_header_syslog_h" >&6; }
22400
22401 fi
22402 if test "x$ac_cv_header_syslog_h" = x""yes; then
22403
22404 cat >>confdefs.h <<\_ACEOF
22405 #define HAVE_SYSLOG 1
22406 _ACEOF
22407
22408 fi
22409
22410
22411 fi
22412
22413
22414 { $as_echo "$as_me:$LINENO: checking for opterr" >&5
22415 $as_echo_n "checking for opterr... " >&6; }
22416 if test "${pgac_cv_var_int_opterr+set}" = set; then
22417   $as_echo_n "(cached) " >&6
22418 else
22419   cat >conftest.$ac_ext <<_ACEOF
22420 /* confdefs.h.  */
22421 _ACEOF
22422 cat confdefs.h >>conftest.$ac_ext
22423 cat >>conftest.$ac_ext <<_ACEOF
22424 /* end confdefs.h.  */
22425 #include <unistd.h>
22426 int
22427 main ()
22428 {
22429 extern int opterr; opterr = 1;
22430   ;
22431   return 0;
22432 }
22433 _ACEOF
22434 rm -f conftest.$ac_objext conftest$ac_exeext
22435 if { (ac_try="$ac_link"
22436 case "(($ac_try" in
22437   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22438   *) ac_try_echo=$ac_try;;
22439 esac
22440 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22441 $as_echo "$ac_try_echo") >&5
22442   (eval "$ac_link") 2>conftest.er1
22443   ac_status=$?
22444   grep -v '^ *+' conftest.er1 >conftest.err
22445   rm -f conftest.er1
22446   cat conftest.err >&5
22447   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22448   (exit $ac_status); } && {
22449          test -z "$ac_c_werror_flag" ||
22450          test ! -s conftest.err
22451        } && test -s conftest$ac_exeext && {
22452          test "$cross_compiling" = yes ||
22453          $as_test_x conftest$ac_exeext
22454        }; then
22455   pgac_cv_var_int_opterr=yes
22456 else
22457   $as_echo "$as_me: failed program was:" >&5
22458 sed 's/^/| /' conftest.$ac_ext >&5
22459
22460         pgac_cv_var_int_opterr=no
22461 fi
22462
22463 rm -rf conftest.dSYM
22464 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22465       conftest$ac_exeext conftest.$ac_ext
22466 fi
22467 { $as_echo "$as_me:$LINENO: result: $pgac_cv_var_int_opterr" >&5
22468 $as_echo "$pgac_cv_var_int_opterr" >&6; }
22469 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
22470
22471 cat >>confdefs.h <<\_ACEOF
22472 #define HAVE_INT_OPTERR 1
22473 _ACEOF
22474
22475 fi
22476
22477 { $as_echo "$as_me:$LINENO: checking for optreset" >&5
22478 $as_echo_n "checking for optreset... " >&6; }
22479 if test "${pgac_cv_var_int_optreset+set}" = set; then
22480   $as_echo_n "(cached) " >&6
22481 else
22482   cat >conftest.$ac_ext <<_ACEOF
22483 /* confdefs.h.  */
22484 _ACEOF
22485 cat confdefs.h >>conftest.$ac_ext
22486 cat >>conftest.$ac_ext <<_ACEOF
22487 /* end confdefs.h.  */
22488 #include <unistd.h>
22489 int
22490 main ()
22491 {
22492 extern int optreset; optreset = 1;
22493   ;
22494   return 0;
22495 }
22496 _ACEOF
22497 rm -f conftest.$ac_objext conftest$ac_exeext
22498 if { (ac_try="$ac_link"
22499 case "(($ac_try" in
22500   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22501   *) ac_try_echo=$ac_try;;
22502 esac
22503 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22504 $as_echo "$ac_try_echo") >&5
22505   (eval "$ac_link") 2>conftest.er1
22506   ac_status=$?
22507   grep -v '^ *+' conftest.er1 >conftest.err
22508   rm -f conftest.er1
22509   cat conftest.err >&5
22510   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22511   (exit $ac_status); } && {
22512          test -z "$ac_c_werror_flag" ||
22513          test ! -s conftest.err
22514        } && test -s conftest$ac_exeext && {
22515          test "$cross_compiling" = yes ||
22516          $as_test_x conftest$ac_exeext
22517        }; then
22518   pgac_cv_var_int_optreset=yes
22519 else
22520   $as_echo "$as_me: failed program was:" >&5
22521 sed 's/^/| /' conftest.$ac_ext >&5
22522
22523         pgac_cv_var_int_optreset=no
22524 fi
22525
22526 rm -rf conftest.dSYM
22527 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22528       conftest$ac_exeext conftest.$ac_ext
22529 fi
22530 { $as_echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
22531 $as_echo "$pgac_cv_var_int_optreset" >&6; }
22532 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
22533
22534 cat >>confdefs.h <<\_ACEOF
22535 #define HAVE_INT_OPTRESET 1
22536 _ACEOF
22537
22538 fi
22539
22540
22541
22542 for ac_func in strtoll strtoq
22543 do
22544 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22545 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
22546 $as_echo_n "checking for $ac_func... " >&6; }
22547 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
22548   $as_echo_n "(cached) " >&6
22549 else
22550   cat >conftest.$ac_ext <<_ACEOF
22551 /* confdefs.h.  */
22552 _ACEOF
22553 cat confdefs.h >>conftest.$ac_ext
22554 cat >>conftest.$ac_ext <<_ACEOF
22555 /* end confdefs.h.  */
22556 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22557    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
22558 #define $ac_func innocuous_$ac_func
22559
22560 /* System header to define __stub macros and hopefully few prototypes,
22561     which can conflict with char $ac_func (); below.
22562     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22563     <limits.h> exists even on freestanding compilers.  */
22564
22565 #ifdef __STDC__
22566 # include <limits.h>
22567 #else
22568 # include <assert.h>
22569 #endif
22570
22571 #undef $ac_func
22572
22573 /* Override any GCC internal prototype to avoid an error.
22574    Use char because int might match the return type of a GCC
22575    builtin and then its argument prototype would still apply.  */
22576 #ifdef __cplusplus
22577 extern "C"
22578 #endif
22579 char $ac_func ();
22580 /* The GNU C library defines this for functions which it implements
22581     to always fail with ENOSYS.  Some functions are actually named
22582     something starting with __ and the normal name is an alias.  */
22583 #if defined __stub_$ac_func || defined __stub___$ac_func
22584 choke me
22585 #endif
22586
22587 int
22588 main ()
22589 {
22590 return $ac_func ();
22591   ;
22592   return 0;
22593 }
22594 _ACEOF
22595 rm -f conftest.$ac_objext conftest$ac_exeext
22596 if { (ac_try="$ac_link"
22597 case "(($ac_try" in
22598   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22599   *) ac_try_echo=$ac_try;;
22600 esac
22601 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22602 $as_echo "$ac_try_echo") >&5
22603   (eval "$ac_link") 2>conftest.er1
22604   ac_status=$?
22605   grep -v '^ *+' conftest.er1 >conftest.err
22606   rm -f conftest.er1
22607   cat conftest.err >&5
22608   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22609   (exit $ac_status); } && {
22610          test -z "$ac_c_werror_flag" ||
22611          test ! -s conftest.err
22612        } && test -s conftest$ac_exeext && {
22613          test "$cross_compiling" = yes ||
22614          $as_test_x conftest$ac_exeext
22615        }; then
22616   eval "$as_ac_var=yes"
22617 else
22618   $as_echo "$as_me: failed program was:" >&5
22619 sed 's/^/| /' conftest.$ac_ext >&5
22620
22621         eval "$as_ac_var=no"
22622 fi
22623
22624 rm -rf conftest.dSYM
22625 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22626       conftest$ac_exeext conftest.$ac_ext
22627 fi
22628 ac_res=`eval 'as_val=${'$as_ac_var'}
22629                  $as_echo "$as_val"'`
22630                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
22631 $as_echo "$ac_res" >&6; }
22632 as_val=`eval 'as_val=${'$as_ac_var'}
22633                  $as_echo "$as_val"'`
22634    if test "x$as_val" = x""yes; then
22635   cat >>confdefs.h <<_ACEOF
22636 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22637 _ACEOF
22638  break
22639 fi
22640 done
22641
22642
22643
22644 for ac_func in strtoull strtouq
22645 do
22646 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22647 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
22648 $as_echo_n "checking for $ac_func... " >&6; }
22649 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
22650   $as_echo_n "(cached) " >&6
22651 else
22652   cat >conftest.$ac_ext <<_ACEOF
22653 /* confdefs.h.  */
22654 _ACEOF
22655 cat confdefs.h >>conftest.$ac_ext
22656 cat >>conftest.$ac_ext <<_ACEOF
22657 /* end confdefs.h.  */
22658 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22659    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
22660 #define $ac_func innocuous_$ac_func
22661
22662 /* System header to define __stub macros and hopefully few prototypes,
22663     which can conflict with char $ac_func (); below.
22664     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22665     <limits.h> exists even on freestanding compilers.  */
22666
22667 #ifdef __STDC__
22668 # include <limits.h>
22669 #else
22670 # include <assert.h>
22671 #endif
22672
22673 #undef $ac_func
22674
22675 /* Override any GCC internal prototype to avoid an error.
22676    Use char because int might match the return type of a GCC
22677    builtin and then its argument prototype would still apply.  */
22678 #ifdef __cplusplus
22679 extern "C"
22680 #endif
22681 char $ac_func ();
22682 /* The GNU C library defines this for functions which it implements
22683     to always fail with ENOSYS.  Some functions are actually named
22684     something starting with __ and the normal name is an alias.  */
22685 #if defined __stub_$ac_func || defined __stub___$ac_func
22686 choke me
22687 #endif
22688
22689 int
22690 main ()
22691 {
22692 return $ac_func ();
22693   ;
22694   return 0;
22695 }
22696 _ACEOF
22697 rm -f conftest.$ac_objext conftest$ac_exeext
22698 if { (ac_try="$ac_link"
22699 case "(($ac_try" in
22700   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22701   *) ac_try_echo=$ac_try;;
22702 esac
22703 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22704 $as_echo "$ac_try_echo") >&5
22705   (eval "$ac_link") 2>conftest.er1
22706   ac_status=$?
22707   grep -v '^ *+' conftest.er1 >conftest.err
22708   rm -f conftest.er1
22709   cat conftest.err >&5
22710   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22711   (exit $ac_status); } && {
22712          test -z "$ac_c_werror_flag" ||
22713          test ! -s conftest.err
22714        } && test -s conftest$ac_exeext && {
22715          test "$cross_compiling" = yes ||
22716          $as_test_x conftest$ac_exeext
22717        }; then
22718   eval "$as_ac_var=yes"
22719 else
22720   $as_echo "$as_me: failed program was:" >&5
22721 sed 's/^/| /' conftest.$ac_ext >&5
22722
22723         eval "$as_ac_var=no"
22724 fi
22725
22726 rm -rf conftest.dSYM
22727 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22728       conftest$ac_exeext conftest.$ac_ext
22729 fi
22730 ac_res=`eval 'as_val=${'$as_ac_var'}
22731                  $as_echo "$as_val"'`
22732                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
22733 $as_echo "$ac_res" >&6; }
22734 as_val=`eval 'as_val=${'$as_ac_var'}
22735                  $as_echo "$as_val"'`
22736    if test "x$as_val" = x""yes; then
22737   cat >>confdefs.h <<_ACEOF
22738 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22739 _ACEOF
22740  break
22741 fi
22742 done
22743
22744
22745 { $as_echo "$as_me:$LINENO: checking for builtin locking functions" >&5
22746 $as_echo_n "checking for builtin locking functions... " >&6; }
22747 if test "${pgac_cv_gcc_int_atomics+set}" = set; then
22748   $as_echo_n "(cached) " >&6
22749 else
22750   cat >conftest.$ac_ext <<_ACEOF
22751 /* confdefs.h.  */
22752 _ACEOF
22753 cat confdefs.h >>conftest.$ac_ext
22754 cat >>conftest.$ac_ext <<_ACEOF
22755 /* end confdefs.h.  */
22756
22757 int
22758 main ()
22759 {
22760 int lock = 0;
22761    __sync_lock_test_and_set(&lock, 1);
22762    __sync_lock_release(&lock);
22763   ;
22764   return 0;
22765 }
22766 _ACEOF
22767 rm -f conftest.$ac_objext conftest$ac_exeext
22768 if { (ac_try="$ac_link"
22769 case "(($ac_try" in
22770   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22771   *) ac_try_echo=$ac_try;;
22772 esac
22773 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22774 $as_echo "$ac_try_echo") >&5
22775   (eval "$ac_link") 2>conftest.er1
22776   ac_status=$?
22777   grep -v '^ *+' conftest.er1 >conftest.err
22778   rm -f conftest.er1
22779   cat conftest.err >&5
22780   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22781   (exit $ac_status); } && {
22782          test -z "$ac_c_werror_flag" ||
22783          test ! -s conftest.err
22784        } && test -s conftest$ac_exeext && {
22785          test "$cross_compiling" = yes ||
22786          $as_test_x conftest$ac_exeext
22787        }; then
22788   pgac_cv_gcc_int_atomics="yes"
22789 else
22790   $as_echo "$as_me: failed program was:" >&5
22791 sed 's/^/| /' conftest.$ac_ext >&5
22792
22793         pgac_cv_gcc_int_atomics="no"
22794 fi
22795
22796 rm -rf conftest.dSYM
22797 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22798       conftest$ac_exeext conftest.$ac_ext
22799 fi
22800 { $as_echo "$as_me:$LINENO: result: $pgac_cv_gcc_int_atomics" >&5
22801 $as_echo "$pgac_cv_gcc_int_atomics" >&6; }
22802 if test x"$pgac_cv_gcc_int_atomics" = x"yes"; then
22803
22804 cat >>confdefs.h <<\_ACEOF
22805 #define HAVE_GCC_INT_ATOMICS 1
22806 _ACEOF
22807
22808 fi
22809
22810 # Lastly, restore full LIBS list and check for readline/libedit symbols
22811 LIBS="$LIBS_including_readline"
22812
22813 if test "$with_readline" = yes; then
22814   { $as_echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
22815 $as_echo_n "checking for rl_completion_append_character... " >&6; }
22816 if test "${pgac_cv_var_rl_completion_append_character+set}" = set; then
22817   $as_echo_n "(cached) " >&6
22818 else
22819   cat >conftest.$ac_ext <<_ACEOF
22820 /* confdefs.h.  */
22821 _ACEOF
22822 cat confdefs.h >>conftest.$ac_ext
22823 cat >>conftest.$ac_ext <<_ACEOF
22824 /* end confdefs.h.  */
22825 #include <stdio.h>
22826 #ifdef HAVE_READLINE_READLINE_H
22827 # include <readline/readline.h>
22828 #elif defined(HAVE_READLINE_H)
22829 # include <readline.h>
22830 #endif
22831
22832 int
22833 main ()
22834 {
22835 rl_completion_append_character = 'x';
22836   ;
22837   return 0;
22838 }
22839 _ACEOF
22840 rm -f conftest.$ac_objext conftest$ac_exeext
22841 if { (ac_try="$ac_link"
22842 case "(($ac_try" in
22843   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22844   *) ac_try_echo=$ac_try;;
22845 esac
22846 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22847 $as_echo "$ac_try_echo") >&5
22848   (eval "$ac_link") 2>conftest.er1
22849   ac_status=$?
22850   grep -v '^ *+' conftest.er1 >conftest.err
22851   rm -f conftest.er1
22852   cat conftest.err >&5
22853   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22854   (exit $ac_status); } && {
22855          test -z "$ac_c_werror_flag" ||
22856          test ! -s conftest.err
22857        } && test -s conftest$ac_exeext && {
22858          test "$cross_compiling" = yes ||
22859          $as_test_x conftest$ac_exeext
22860        }; then
22861   pgac_cv_var_rl_completion_append_character=yes
22862 else
22863   $as_echo "$as_me: failed program was:" >&5
22864 sed 's/^/| /' conftest.$ac_ext >&5
22865
22866         pgac_cv_var_rl_completion_append_character=no
22867 fi
22868
22869 rm -rf conftest.dSYM
22870 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22871       conftest$ac_exeext conftest.$ac_ext
22872 fi
22873 { $as_echo "$as_me:$LINENO: result: $pgac_cv_var_rl_completion_append_character" >&5
22874 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
22875 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
22876
22877 cat >>confdefs.h <<\_ACEOF
22878 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
22879 _ACEOF
22880
22881 fi
22882
22883
22884 for ac_func in rl_completion_matches rl_filename_completion_function
22885 do
22886 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22887 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
22888 $as_echo_n "checking for $ac_func... " >&6; }
22889 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
22890   $as_echo_n "(cached) " >&6
22891 else
22892   cat >conftest.$ac_ext <<_ACEOF
22893 /* confdefs.h.  */
22894 _ACEOF
22895 cat confdefs.h >>conftest.$ac_ext
22896 cat >>conftest.$ac_ext <<_ACEOF
22897 /* end confdefs.h.  */
22898 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22899    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
22900 #define $ac_func innocuous_$ac_func
22901
22902 /* System header to define __stub macros and hopefully few prototypes,
22903     which can conflict with char $ac_func (); below.
22904     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22905     <limits.h> exists even on freestanding compilers.  */
22906
22907 #ifdef __STDC__
22908 # include <limits.h>
22909 #else
22910 # include <assert.h>
22911 #endif
22912
22913 #undef $ac_func
22914
22915 /* Override any GCC internal prototype to avoid an error.
22916    Use char because int might match the return type of a GCC
22917    builtin and then its argument prototype would still apply.  */
22918 #ifdef __cplusplus
22919 extern "C"
22920 #endif
22921 char $ac_func ();
22922 /* The GNU C library defines this for functions which it implements
22923     to always fail with ENOSYS.  Some functions are actually named
22924     something starting with __ and the normal name is an alias.  */
22925 #if defined __stub_$ac_func || defined __stub___$ac_func
22926 choke me
22927 #endif
22928
22929 int
22930 main ()
22931 {
22932 return $ac_func ();
22933   ;
22934   return 0;
22935 }
22936 _ACEOF
22937 rm -f conftest.$ac_objext conftest$ac_exeext
22938 if { (ac_try="$ac_link"
22939 case "(($ac_try" in
22940   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22941   *) ac_try_echo=$ac_try;;
22942 esac
22943 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22944 $as_echo "$ac_try_echo") >&5
22945   (eval "$ac_link") 2>conftest.er1
22946   ac_status=$?
22947   grep -v '^ *+' conftest.er1 >conftest.err
22948   rm -f conftest.er1
22949   cat conftest.err >&5
22950   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22951   (exit $ac_status); } && {
22952          test -z "$ac_c_werror_flag" ||
22953          test ! -s conftest.err
22954        } && test -s conftest$ac_exeext && {
22955          test "$cross_compiling" = yes ||
22956          $as_test_x conftest$ac_exeext
22957        }; then
22958   eval "$as_ac_var=yes"
22959 else
22960   $as_echo "$as_me: failed program was:" >&5
22961 sed 's/^/| /' conftest.$ac_ext >&5
22962
22963         eval "$as_ac_var=no"
22964 fi
22965
22966 rm -rf conftest.dSYM
22967 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22968       conftest$ac_exeext conftest.$ac_ext
22969 fi
22970 ac_res=`eval 'as_val=${'$as_ac_var'}
22971                  $as_echo "$as_val"'`
22972                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
22973 $as_echo "$ac_res" >&6; }
22974 as_val=`eval 'as_val=${'$as_ac_var'}
22975                  $as_echo "$as_val"'`
22976    if test "x$as_val" = x""yes; then
22977   cat >>confdefs.h <<_ACEOF
22978 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22979 _ACEOF
22980
22981 fi
22982 done
22983
22984
22985
22986 for ac_func in append_history history_truncate_file
22987 do
22988 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22989 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
22990 $as_echo_n "checking for $ac_func... " >&6; }
22991 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
22992   $as_echo_n "(cached) " >&6
22993 else
22994   cat >conftest.$ac_ext <<_ACEOF
22995 /* confdefs.h.  */
22996 _ACEOF
22997 cat confdefs.h >>conftest.$ac_ext
22998 cat >>conftest.$ac_ext <<_ACEOF
22999 /* end confdefs.h.  */
23000 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23001    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
23002 #define $ac_func innocuous_$ac_func
23003
23004 /* System header to define __stub macros and hopefully few prototypes,
23005     which can conflict with char $ac_func (); below.
23006     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23007     <limits.h> exists even on freestanding compilers.  */
23008
23009 #ifdef __STDC__
23010 # include <limits.h>
23011 #else
23012 # include <assert.h>
23013 #endif
23014
23015 #undef $ac_func
23016
23017 /* Override any GCC internal prototype to avoid an error.
23018    Use char because int might match the return type of a GCC
23019    builtin and then its argument prototype would still apply.  */
23020 #ifdef __cplusplus
23021 extern "C"
23022 #endif
23023 char $ac_func ();
23024 /* The GNU C library defines this for functions which it implements
23025     to always fail with ENOSYS.  Some functions are actually named
23026     something starting with __ and the normal name is an alias.  */
23027 #if defined __stub_$ac_func || defined __stub___$ac_func
23028 choke me
23029 #endif
23030
23031 int
23032 main ()
23033 {
23034 return $ac_func ();
23035   ;
23036   return 0;
23037 }
23038 _ACEOF
23039 rm -f conftest.$ac_objext conftest$ac_exeext
23040 if { (ac_try="$ac_link"
23041 case "(($ac_try" in
23042   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23043   *) ac_try_echo=$ac_try;;
23044 esac
23045 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23046 $as_echo "$ac_try_echo") >&5
23047   (eval "$ac_link") 2>conftest.er1
23048   ac_status=$?
23049   grep -v '^ *+' conftest.er1 >conftest.err
23050   rm -f conftest.er1
23051   cat conftest.err >&5
23052   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23053   (exit $ac_status); } && {
23054          test -z "$ac_c_werror_flag" ||
23055          test ! -s conftest.err
23056        } && test -s conftest$ac_exeext && {
23057          test "$cross_compiling" = yes ||
23058          $as_test_x conftest$ac_exeext
23059        }; then
23060   eval "$as_ac_var=yes"
23061 else
23062   $as_echo "$as_me: failed program was:" >&5
23063 sed 's/^/| /' conftest.$ac_ext >&5
23064
23065         eval "$as_ac_var=no"
23066 fi
23067
23068 rm -rf conftest.dSYM
23069 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23070       conftest$ac_exeext conftest.$ac_ext
23071 fi
23072 ac_res=`eval 'as_val=${'$as_ac_var'}
23073                  $as_echo "$as_val"'`
23074                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
23075 $as_echo "$ac_res" >&6; }
23076 as_val=`eval 'as_val=${'$as_ac_var'}
23077                  $as_echo "$as_val"'`
23078    if test "x$as_val" = x""yes; then
23079   cat >>confdefs.h <<_ACEOF
23080 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23081 _ACEOF
23082
23083 fi
23084 done
23085
23086 fi
23087
23088
23089 #
23090 # Pthreads
23091 #
23092 # For each platform, we need to know about any special compile and link
23093 # libraries, and whether the normal C function names are thread-safe.
23094 # See the comment at the top of src/port/thread.c for more information.
23095 # WIN32 doesn't need the pthread tests;  it always uses threads
23096 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
23097
23098
23099
23100 ac_ext=c
23101 ac_cpp='$CPP $CPPFLAGS'
23102 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23103 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23104 ac_compiler_gnu=$ac_cv_c_compiler_gnu
23105
23106 acx_pthread_ok=no
23107
23108 # We used to check for pthread.h first, but this fails if pthread.h
23109 # requires special compiler flags (e.g. on True64 or Sequent).
23110 # It gets checked for in the link test anyway.
23111
23112 # First of all, check if the user has set any of the PTHREAD_LIBS,
23113 # etcetera environment variables, and if threads linking works using
23114 # them:
23115 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
23116         save_CFLAGS="$CFLAGS"
23117         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
23118         save_LIBS="$LIBS"
23119         LIBS="$PTHREAD_LIBS $LIBS"
23120         { $as_echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
23121 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
23122         cat >conftest.$ac_ext <<_ACEOF
23123 /* confdefs.h.  */
23124 _ACEOF
23125 cat confdefs.h >>conftest.$ac_ext
23126 cat >>conftest.$ac_ext <<_ACEOF
23127 /* end confdefs.h.  */
23128
23129 /* Override any GCC internal prototype to avoid an error.
23130    Use char because int might match the return type of a GCC
23131    builtin and then its argument prototype would still apply.  */
23132 #ifdef __cplusplus
23133 extern "C"
23134 #endif
23135 char pthread_join ();
23136 int
23137 main ()
23138 {
23139 return pthread_join ();
23140   ;
23141   return 0;
23142 }
23143 _ACEOF
23144 rm -f conftest.$ac_objext conftest$ac_exeext
23145 if { (ac_try="$ac_link"
23146 case "(($ac_try" in
23147   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23148   *) ac_try_echo=$ac_try;;
23149 esac
23150 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23151 $as_echo "$ac_try_echo") >&5
23152   (eval "$ac_link") 2>conftest.er1
23153   ac_status=$?
23154   grep -v '^ *+' conftest.er1 >conftest.err
23155   rm -f conftest.er1
23156   cat conftest.err >&5
23157   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23158   (exit $ac_status); } && {
23159          test -z "$ac_c_werror_flag" ||
23160          test ! -s conftest.err
23161        } && test -s conftest$ac_exeext && {
23162          test "$cross_compiling" = yes ||
23163          $as_test_x conftest$ac_exeext
23164        }; then
23165   acx_pthread_ok=yes
23166 else
23167   $as_echo "$as_me: failed program was:" >&5
23168 sed 's/^/| /' conftest.$ac_ext >&5
23169
23170
23171 fi
23172
23173 rm -rf conftest.dSYM
23174 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23175       conftest$ac_exeext conftest.$ac_ext
23176         { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
23177 $as_echo "$acx_pthread_ok" >&6; }
23178         if test x"$acx_pthread_ok" = xno; then
23179                 PTHREAD_LIBS=""
23180                 PTHREAD_CFLAGS=""
23181         fi
23182         LIBS="$save_LIBS"
23183         CFLAGS="$save_CFLAGS"
23184 fi
23185
23186 # We must check for the threads library under a number of different
23187 # names; the ordering is very important because some systems
23188 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
23189 # libraries is broken (non-POSIX).
23190
23191 # Create a list of thread flags to try.  Items starting with a "-" are
23192 # C compiler flags, and other items are library names, except for "none"
23193 # which indicates that we try without any flags at all, and "pthread-config"
23194 # which is a program returning the flags for the Pth emulation library.
23195
23196 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
23197
23198 # The ordering *is* (sometimes) important.  Some notes on the
23199 # individual items follow:
23200
23201 # pthreads: AIX (must check this before -lpthread)
23202 # none: in case threads are in libc; should be tried before -Kthread and
23203 #       other compiler flags to prevent continual compiler warnings
23204 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
23205 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
23206 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
23207 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
23208 # -pthreads: Solaris/gcc
23209 # -mthreads: Mingw32/gcc, Lynx/gcc
23210 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
23211 #      doesn't hurt to check since this sometimes defines pthreads too;
23212 #      also defines -D_REENTRANT)
23213 # pthread: Linux, etcetera
23214 # --thread-safe: KAI C++
23215 # pthread-config: use pthread-config program (for GNU Pth library)
23216
23217 case "${host_cpu}-${host_os}" in
23218         *solaris*)
23219
23220         # On Solaris (at least, for some versions), libc contains stubbed
23221         # (non-functional) versions of the pthreads routines, so link-based
23222         # tests will erroneously succeed.  (We need to link with -pthread or
23223         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
23224         # a function called by this macro, so we could check for that, but
23225         # who knows whether they'll stub that too in a future libc.)  So,
23226         # we'll just look for -pthreads and -lpthread first:
23227
23228         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
23229         ;;
23230 esac
23231
23232 if test x"$acx_pthread_ok" = xno; then
23233 for flag in $acx_pthread_flags; do
23234
23235         tryPTHREAD_CFLAGS=""
23236         tryPTHREAD_LIBS=""
23237         case $flag in
23238                 none)
23239                 { $as_echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
23240 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
23241                 ;;
23242
23243                 -*)
23244                 { $as_echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
23245 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
23246                 tryPTHREAD_CFLAGS="$flag"
23247                 ;;
23248
23249                 pthread-config)
23250                 # skip this if we already have flags defined, for PostgreSQL
23251                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
23252                 # Extract the first word of "pthread-config", so it can be a program name with args.
23253 set dummy pthread-config; ac_word=$2
23254 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
23255 $as_echo_n "checking for $ac_word... " >&6; }
23256 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
23257   $as_echo_n "(cached) " >&6
23258 else
23259   if test -n "$acx_pthread_config"; then
23260   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
23261 else
23262 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23263 for as_dir in $PATH
23264 do
23265   IFS=$as_save_IFS
23266   test -z "$as_dir" && as_dir=.
23267   for ac_exec_ext in '' $ac_executable_extensions; do
23268   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23269     ac_cv_prog_acx_pthread_config="yes"
23270     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
23271     break 2
23272   fi
23273 done
23274 done
23275 IFS=$as_save_IFS
23276
23277   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
23278 fi
23279 fi
23280 acx_pthread_config=$ac_cv_prog_acx_pthread_config
23281 if test -n "$acx_pthread_config"; then
23282   { $as_echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
23283 $as_echo "$acx_pthread_config" >&6; }
23284 else
23285   { $as_echo "$as_me:$LINENO: result: no" >&5
23286 $as_echo "no" >&6; }
23287 fi
23288
23289
23290                 if test x"$acx_pthread_config" = xno; then continue; fi
23291                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
23292                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
23293                 ;;
23294
23295                 *)
23296                 { $as_echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
23297 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
23298                 tryPTHREAD_LIBS="-l$flag"
23299                 ;;
23300         esac
23301
23302         save_LIBS="$LIBS"
23303         save_CFLAGS="$CFLAGS"
23304         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
23305         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
23306
23307         # Check for various functions.  We must include pthread.h,
23308         # since some functions may be macros.  (On the Sequent, we
23309         # need a special flag -Kthread to make this header compile.)
23310         # We check for pthread_join because it is in -lpthread on IRIX
23311         # while pthread_create is in libc.  We check for pthread_attr_init
23312         # due to DEC craziness with -lpthreads.  We check for
23313         # pthread_cleanup_push because it is one of the few pthread
23314         # functions on Solaris that doesn't have a non-functional libc stub.
23315         # We try pthread_create on general principles.
23316         cat >conftest.$ac_ext <<_ACEOF
23317 /* confdefs.h.  */
23318 _ACEOF
23319 cat confdefs.h >>conftest.$ac_ext
23320 cat >>conftest.$ac_ext <<_ACEOF
23321 /* end confdefs.h.  */
23322 #include <pthread.h>
23323 int
23324 main ()
23325 {
23326 pthread_t th; pthread_join(th, 0);
23327                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
23328                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
23329   ;
23330   return 0;
23331 }
23332 _ACEOF
23333 rm -f conftest.$ac_objext conftest$ac_exeext
23334 if { (ac_try="$ac_link"
23335 case "(($ac_try" in
23336   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23337   *) ac_try_echo=$ac_try;;
23338 esac
23339 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23340 $as_echo "$ac_try_echo") >&5
23341   (eval "$ac_link") 2>conftest.er1
23342   ac_status=$?
23343   grep -v '^ *+' conftest.er1 >conftest.err
23344   rm -f conftest.er1
23345   cat conftest.err >&5
23346   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23347   (exit $ac_status); } && {
23348          test -z "$ac_c_werror_flag" ||
23349          test ! -s conftest.err
23350        } && test -s conftest$ac_exeext && {
23351          test "$cross_compiling" = yes ||
23352          $as_test_x conftest$ac_exeext
23353        }; then
23354   acx_pthread_ok=yes
23355 else
23356   $as_echo "$as_me: failed program was:" >&5
23357 sed 's/^/| /' conftest.$ac_ext >&5
23358
23359         acx_pthread_ok=no
23360 fi
23361
23362 rm -rf conftest.dSYM
23363 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23364       conftest$ac_exeext conftest.$ac_ext
23365
23366         if test "x$acx_pthread_ok" = xyes; then
23367             # Don't use options that are ignored by the compiler.
23368             # We find them by checking stderror.
23369             cat >conftest.$ac_ext <<_ACEOF
23370 int
23371 main (int argc, char **argv)
23372 {
23373   (void) argc;
23374   (void) argv;
23375   return 0;
23376 }
23377 _ACEOF
23378             rm -f conftest.$ac_objext conftest$ac_exeext
23379             # Check both linking and compiling, because they might tolerate different options.
23380             if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval $ac_compile 2>&1 1>&5)`" = ""; then
23381                 # we continue with more flags because Linux needs -lpthread
23382                 # for libpq builds on PostgreSQL.  The test above only
23383                 # tests for building binaries, not shared libraries.
23384                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
23385                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
23386             else   acx_pthread_ok=no
23387             fi
23388         fi
23389
23390         LIBS="$save_LIBS"
23391         CFLAGS="$save_CFLAGS"
23392
23393         { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
23394 $as_echo "$acx_pthread_ok" >&6; }
23395 done
23396 fi
23397
23398 # Various other checks:
23399 if test "x$acx_pthread_ok" = xyes; then
23400         save_LIBS="$LIBS"
23401         LIBS="$PTHREAD_LIBS $LIBS"
23402         save_CFLAGS="$CFLAGS"
23403         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
23404
23405         # Detect AIX lossage: threads are created detached by default
23406         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
23407         { $as_echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
23408 $as_echo_n "checking for joinable pthread attribute... " >&6; }
23409         cat >conftest.$ac_ext <<_ACEOF
23410 /* confdefs.h.  */
23411 _ACEOF
23412 cat confdefs.h >>conftest.$ac_ext
23413 cat >>conftest.$ac_ext <<_ACEOF
23414 /* end confdefs.h.  */
23415 #include <pthread.h>
23416 int
23417 main ()
23418 {
23419 int attr=PTHREAD_CREATE_JOINABLE;
23420   ;
23421   return 0;
23422 }
23423 _ACEOF
23424 rm -f conftest.$ac_objext conftest$ac_exeext
23425 if { (ac_try="$ac_link"
23426 case "(($ac_try" in
23427   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23428   *) ac_try_echo=$ac_try;;
23429 esac
23430 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23431 $as_echo "$ac_try_echo") >&5
23432   (eval "$ac_link") 2>conftest.er1
23433   ac_status=$?
23434   grep -v '^ *+' conftest.er1 >conftest.err
23435   rm -f conftest.er1
23436   cat conftest.err >&5
23437   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23438   (exit $ac_status); } && {
23439          test -z "$ac_c_werror_flag" ||
23440          test ! -s conftest.err
23441        } && test -s conftest$ac_exeext && {
23442          test "$cross_compiling" = yes ||
23443          $as_test_x conftest$ac_exeext
23444        }; then
23445   ok=PTHREAD_CREATE_JOINABLE
23446 else
23447   $as_echo "$as_me: failed program was:" >&5
23448 sed 's/^/| /' conftest.$ac_ext >&5
23449
23450         ok=unknown
23451 fi
23452
23453 rm -rf conftest.dSYM
23454 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23455       conftest$ac_exeext conftest.$ac_ext
23456         if test x"$ok" = xunknown; then
23457                 cat >conftest.$ac_ext <<_ACEOF
23458 /* confdefs.h.  */
23459 _ACEOF
23460 cat confdefs.h >>conftest.$ac_ext
23461 cat >>conftest.$ac_ext <<_ACEOF
23462 /* end confdefs.h.  */
23463 #include <pthread.h>
23464 int
23465 main ()
23466 {
23467 int attr=PTHREAD_CREATE_UNDETACHED;
23468   ;
23469   return 0;
23470 }
23471 _ACEOF
23472 rm -f conftest.$ac_objext conftest$ac_exeext
23473 if { (ac_try="$ac_link"
23474 case "(($ac_try" in
23475   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23476   *) ac_try_echo=$ac_try;;
23477 esac
23478 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23479 $as_echo "$ac_try_echo") >&5
23480   (eval "$ac_link") 2>conftest.er1
23481   ac_status=$?
23482   grep -v '^ *+' conftest.er1 >conftest.err
23483   rm -f conftest.er1
23484   cat conftest.err >&5
23485   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23486   (exit $ac_status); } && {
23487          test -z "$ac_c_werror_flag" ||
23488          test ! -s conftest.err
23489        } && test -s conftest$ac_exeext && {
23490          test "$cross_compiling" = yes ||
23491          $as_test_x conftest$ac_exeext
23492        }; then
23493   ok=PTHREAD_CREATE_UNDETACHED
23494 else
23495   $as_echo "$as_me: failed program was:" >&5
23496 sed 's/^/| /' conftest.$ac_ext >&5
23497
23498         ok=unknown
23499 fi
23500
23501 rm -rf conftest.dSYM
23502 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23503       conftest$ac_exeext conftest.$ac_ext
23504         fi
23505         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
23506
23507 cat >>confdefs.h <<\_ACEOF
23508 #define PTHREAD_CREATE_JOINABLE $ok
23509 _ACEOF
23510
23511         fi
23512         { $as_echo "$as_me:$LINENO: result: ${ok}" >&5
23513 $as_echo "${ok}" >&6; }
23514         if test x"$ok" = xunknown; then
23515                 { $as_echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
23516 $as_echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
23517         fi
23518
23519         { $as_echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
23520 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
23521         flag=no
23522 # We always add these in PostgreSQL
23523 #       case "${host_cpu}-${host_os}" in
23524 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
23525 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
23526 #       esac
23527         { $as_echo "$as_me:$LINENO: result: ${flag}" >&5
23528 $as_echo "${flag}" >&6; }
23529         if test "x$flag" != xno; then
23530                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
23531         fi
23532
23533         LIBS="$save_LIBS"
23534         CFLAGS="$save_CFLAGS"
23535
23536 # Supporting cc_r would require a special CC in all places that
23537 # use libpq, and that is ugly, so we don't do it.  Users can still
23538 # define their compiler as cc_r to do thread builds of everything.
23539         # More AIX lossage: must compile with cc_r
23540         # Extract the first word of "cc_r", so it can be a program name with args.
23541 set dummy cc_r; ac_word=$2
23542 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
23543 $as_echo_n "checking for $ac_word... " >&6; }
23544 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
23545   $as_echo_n "(cached) " >&6
23546 else
23547   if test -n "$PTHREAD_CC"; then
23548   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
23549 else
23550 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23551 for as_dir in $PATH
23552 do
23553   IFS=$as_save_IFS
23554   test -z "$as_dir" && as_dir=.
23555   for ac_exec_ext in '' $ac_executable_extensions; do
23556   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23557     ac_cv_prog_PTHREAD_CC="cc_r"
23558     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
23559     break 2
23560   fi
23561 done
23562 done
23563 IFS=$as_save_IFS
23564
23565   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
23566 fi
23567 fi
23568 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
23569 if test -n "$PTHREAD_CC"; then
23570   { $as_echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
23571 $as_echo "$PTHREAD_CC" >&6; }
23572 else
23573   { $as_echo "$as_me:$LINENO: result: no" >&5
23574 $as_echo "no" >&6; }
23575 fi
23576
23577
23578 else
23579         PTHREAD_CC="$CC"
23580 fi
23581
23582
23583
23584
23585
23586 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
23587 if test x"$acx_pthread_ok" = xyes; then
23588
23589 cat >>confdefs.h <<\_ACEOF
23590 #define HAVE_PTHREAD 1
23591 _ACEOF
23592
23593         :
23594 else
23595         acx_pthread_ok=no
23596
23597 fi
23598 ac_ext=c
23599 ac_cpp='$CPP $CPPFLAGS'
23600 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23601 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23602 ac_compiler_gnu=$ac_cv_c_compiler_gnu
23603
23604         # set thread flags
23605
23606 # Some platforms use these, so just define them.  They can't hurt if they
23607 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
23608 # enables 5-arg getpwuid_r, among other things.
23609 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
23610
23611
23612 # At this point, we don't want to muck with the compiler name for threading.
23613 # Let's see who fails, perhaps AIX.  2004-04-23
23614 if test "$PTHREAD_CC" != "$CC"; then
23615 { { $as_echo "$as_me:$LINENO: error:
23616 PostgreSQL does not support platforms that require a special compiler
23617 for thread safety;  use --disable-thread-safety to disable thread safety." >&5
23618 $as_echo "$as_me: error:
23619 PostgreSQL does not support platforms that require a special compiler
23620 for thread safety;  use --disable-thread-safety to disable thread safety." >&2;}
23621    { (exit 1); exit 1; }; }
23622 fi
23623
23624 # Check for *_r functions
23625 _CFLAGS="$CFLAGS"
23626 _LIBS="$LIBS"
23627 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
23628 LIBS="$LIBS $PTHREAD_LIBS"
23629
23630 if test "$PORTNAME" != "win32"; then
23631 if test "${ac_cv_header_pthread_h+set}" = set; then
23632   { $as_echo "$as_me:$LINENO: checking for pthread.h" >&5
23633 $as_echo_n "checking for pthread.h... " >&6; }
23634 if test "${ac_cv_header_pthread_h+set}" = set; then
23635   $as_echo_n "(cached) " >&6
23636 fi
23637 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
23638 $as_echo "$ac_cv_header_pthread_h" >&6; }
23639 else
23640   # Is the header compilable?
23641 { $as_echo "$as_me:$LINENO: checking pthread.h usability" >&5
23642 $as_echo_n "checking pthread.h usability... " >&6; }
23643 cat >conftest.$ac_ext <<_ACEOF
23644 /* confdefs.h.  */
23645 _ACEOF
23646 cat confdefs.h >>conftest.$ac_ext
23647 cat >>conftest.$ac_ext <<_ACEOF
23648 /* end confdefs.h.  */
23649 $ac_includes_default
23650 #include <pthread.h>
23651 _ACEOF
23652 rm -f conftest.$ac_objext
23653 if { (ac_try="$ac_compile"
23654 case "(($ac_try" in
23655   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23656   *) ac_try_echo=$ac_try;;
23657 esac
23658 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23659 $as_echo "$ac_try_echo") >&5
23660   (eval "$ac_compile") 2>conftest.er1
23661   ac_status=$?
23662   grep -v '^ *+' conftest.er1 >conftest.err
23663   rm -f conftest.er1
23664   cat conftest.err >&5
23665   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23666   (exit $ac_status); } && {
23667          test -z "$ac_c_werror_flag" ||
23668          test ! -s conftest.err
23669        } && test -s conftest.$ac_objext; then
23670   ac_header_compiler=yes
23671 else
23672   $as_echo "$as_me: failed program was:" >&5
23673 sed 's/^/| /' conftest.$ac_ext >&5
23674
23675         ac_header_compiler=no
23676 fi
23677
23678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23679 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23680 $as_echo "$ac_header_compiler" >&6; }
23681
23682 # Is the header present?
23683 { $as_echo "$as_me:$LINENO: checking pthread.h presence" >&5
23684 $as_echo_n "checking pthread.h presence... " >&6; }
23685 cat >conftest.$ac_ext <<_ACEOF
23686 /* confdefs.h.  */
23687 _ACEOF
23688 cat confdefs.h >>conftest.$ac_ext
23689 cat >>conftest.$ac_ext <<_ACEOF
23690 /* end confdefs.h.  */
23691 #include <pthread.h>
23692 _ACEOF
23693 if { (ac_try="$ac_cpp conftest.$ac_ext"
23694 case "(($ac_try" in
23695   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23696   *) ac_try_echo=$ac_try;;
23697 esac
23698 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23699 $as_echo "$ac_try_echo") >&5
23700   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23701   ac_status=$?
23702   grep -v '^ *+' conftest.er1 >conftest.err
23703   rm -f conftest.er1
23704   cat conftest.err >&5
23705   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23706   (exit $ac_status); } >/dev/null && {
23707          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23708          test ! -s conftest.err
23709        }; then
23710   ac_header_preproc=yes
23711 else
23712   $as_echo "$as_me: failed program was:" >&5
23713 sed 's/^/| /' conftest.$ac_ext >&5
23714
23715   ac_header_preproc=no
23716 fi
23717
23718 rm -f conftest.err conftest.$ac_ext
23719 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23720 $as_echo "$ac_header_preproc" >&6; }
23721
23722 # So?  What about this header?
23723 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23724   yes:no: )
23725     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
23726 $as_echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23727     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
23728 $as_echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
23729     ac_header_preproc=yes
23730     ;;
23731   no:yes:* )
23732     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
23733 $as_echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
23734     { $as_echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
23735 $as_echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
23736     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
23737 $as_echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
23738     { $as_echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
23739 $as_echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
23740     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
23741 $as_echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
23742     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
23743 $as_echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
23744     ( cat <<\_ASBOX
23745 ## ---------------------------------------- ##
23746 ## Report this to pgsql-bugs@postgresql.org ##
23747 ## ---------------------------------------- ##
23748 _ASBOX
23749      ) | sed "s/^/$as_me: WARNING:     /" >&2
23750     ;;
23751 esac
23752 { $as_echo "$as_me:$LINENO: checking for pthread.h" >&5
23753 $as_echo_n "checking for pthread.h... " >&6; }
23754 if test "${ac_cv_header_pthread_h+set}" = set; then
23755   $as_echo_n "(cached) " >&6
23756 else
23757   ac_cv_header_pthread_h=$ac_header_preproc
23758 fi
23759 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
23760 $as_echo "$ac_cv_header_pthread_h" >&6; }
23761
23762 fi
23763 if test "x$ac_cv_header_pthread_h" = x""yes; then
23764   :
23765 else
23766   { { $as_echo "$as_me:$LINENO: error:
23767 pthread.h not found;  use --disable-thread-safety to disable thread safety" >&5
23768 $as_echo "$as_me: error:
23769 pthread.h not found;  use --disable-thread-safety to disable thread safety" >&2;}
23770    { (exit 1); exit 1; }; }
23771 fi
23772
23773
23774 fi
23775
23776
23777
23778
23779 for ac_func in strerror_r getpwuid_r gethostbyname_r
23780 do
23781 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23782 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
23783 $as_echo_n "checking for $ac_func... " >&6; }
23784 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
23785   $as_echo_n "(cached) " >&6
23786 else
23787   cat >conftest.$ac_ext <<_ACEOF
23788 /* confdefs.h.  */
23789 _ACEOF
23790 cat confdefs.h >>conftest.$ac_ext
23791 cat >>conftest.$ac_ext <<_ACEOF
23792 /* end confdefs.h.  */
23793 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23794    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
23795 #define $ac_func innocuous_$ac_func
23796
23797 /* System header to define __stub macros and hopefully few prototypes,
23798     which can conflict with char $ac_func (); below.
23799     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23800     <limits.h> exists even on freestanding compilers.  */
23801
23802 #ifdef __STDC__
23803 # include <limits.h>
23804 #else
23805 # include <assert.h>
23806 #endif
23807
23808 #undef $ac_func
23809
23810 /* Override any GCC internal prototype to avoid an error.
23811    Use char because int might match the return type of a GCC
23812    builtin and then its argument prototype would still apply.  */
23813 #ifdef __cplusplus
23814 extern "C"
23815 #endif
23816 char $ac_func ();
23817 /* The GNU C library defines this for functions which it implements
23818     to always fail with ENOSYS.  Some functions are actually named
23819     something starting with __ and the normal name is an alias.  */
23820 #if defined __stub_$ac_func || defined __stub___$ac_func
23821 choke me
23822 #endif
23823
23824 int
23825 main ()
23826 {
23827 return $ac_func ();
23828   ;
23829   return 0;
23830 }
23831 _ACEOF
23832 rm -f conftest.$ac_objext conftest$ac_exeext
23833 if { (ac_try="$ac_link"
23834 case "(($ac_try" in
23835   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23836   *) ac_try_echo=$ac_try;;
23837 esac
23838 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23839 $as_echo "$ac_try_echo") >&5
23840   (eval "$ac_link") 2>conftest.er1
23841   ac_status=$?
23842   grep -v '^ *+' conftest.er1 >conftest.err
23843   rm -f conftest.er1
23844   cat conftest.err >&5
23845   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23846   (exit $ac_status); } && {
23847          test -z "$ac_c_werror_flag" ||
23848          test ! -s conftest.err
23849        } && test -s conftest$ac_exeext && {
23850          test "$cross_compiling" = yes ||
23851          $as_test_x conftest$ac_exeext
23852        }; then
23853   eval "$as_ac_var=yes"
23854 else
23855   $as_echo "$as_me: failed program was:" >&5
23856 sed 's/^/| /' conftest.$ac_ext >&5
23857
23858         eval "$as_ac_var=no"
23859 fi
23860
23861 rm -rf conftest.dSYM
23862 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23863       conftest$ac_exeext conftest.$ac_ext
23864 fi
23865 ac_res=`eval 'as_val=${'$as_ac_var'}
23866                  $as_echo "$as_val"'`
23867                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
23868 $as_echo "$ac_res" >&6; }
23869 as_val=`eval 'as_val=${'$as_ac_var'}
23870                  $as_echo "$as_val"'`
23871    if test "x$as_val" = x""yes; then
23872   cat >>confdefs.h <<_ACEOF
23873 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23874 _ACEOF
23875
23876 fi
23877 done
23878
23879
23880 # Do test here with the proper thread flags
23881 { $as_echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
23882 $as_echo_n "checking whether getpwuid_r takes a fifth argument... " >&6; }
23883 if test "${pgac_cv_func_getpwuid_r_5arg+set}" = set; then
23884   $as_echo_n "(cached) " >&6
23885 else
23886   cat >conftest.$ac_ext <<_ACEOF
23887 /* confdefs.h.  */
23888 _ACEOF
23889 cat confdefs.h >>conftest.$ac_ext
23890 cat >>conftest.$ac_ext <<_ACEOF
23891 /* end confdefs.h.  */
23892 #include <sys/types.h>
23893 #include <pwd.h>
23894 int
23895 main ()
23896 {
23897 uid_t uid;
23898 struct passwd *space;
23899 char *buf;
23900 size_t bufsize;
23901 struct passwd **result;
23902 getpwuid_r(uid, space, buf, bufsize, result);
23903   ;
23904   return 0;
23905 }
23906 _ACEOF
23907 rm -f conftest.$ac_objext
23908 if { (ac_try="$ac_compile"
23909 case "(($ac_try" in
23910   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23911   *) ac_try_echo=$ac_try;;
23912 esac
23913 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23914 $as_echo "$ac_try_echo") >&5
23915   (eval "$ac_compile") 2>conftest.er1
23916   ac_status=$?
23917   grep -v '^ *+' conftest.er1 >conftest.err
23918   rm -f conftest.er1
23919   cat conftest.err >&5
23920   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23921   (exit $ac_status); } && {
23922          test -z "$ac_c_werror_flag" ||
23923          test ! -s conftest.err
23924        } && test -s conftest.$ac_objext; then
23925   pgac_cv_func_getpwuid_r_5arg=yes
23926 else
23927   $as_echo "$as_me: failed program was:" >&5
23928 sed 's/^/| /' conftest.$ac_ext >&5
23929
23930         pgac_cv_func_getpwuid_r_5arg=no
23931 fi
23932
23933 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23934 fi
23935 { $as_echo "$as_me:$LINENO: result: $pgac_cv_func_getpwuid_r_5arg" >&5
23936 $as_echo "$pgac_cv_func_getpwuid_r_5arg" >&6; }
23937 if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
23938
23939 cat >>confdefs.h <<\_ACEOF
23940 #define GETPWUID_R_5ARG /**/
23941 _ACEOF
23942
23943 fi
23944
23945 { $as_echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
23946 $as_echo_n "checking whether strerror_r returns int... " >&6; }
23947 if test "${pgac_cv_func_strerror_r_int+set}" = set; then
23948   $as_echo_n "(cached) " >&6
23949 else
23950   cat >conftest.$ac_ext <<_ACEOF
23951 /* confdefs.h.  */
23952 _ACEOF
23953 cat confdefs.h >>conftest.$ac_ext
23954 cat >>conftest.$ac_ext <<_ACEOF
23955 /* end confdefs.h.  */
23956 #include <string.h>
23957 int
23958 main ()
23959 {
23960 #ifndef _AIX
23961 int strerror_r(int, char *, size_t);
23962 #else
23963 /* Older AIX has 'int' for the third argument so we don't test the args. */
23964 int strerror_r();
23965 #endif
23966   ;
23967   return 0;
23968 }
23969 _ACEOF
23970 rm -f conftest.$ac_objext
23971 if { (ac_try="$ac_compile"
23972 case "(($ac_try" in
23973   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23974   *) ac_try_echo=$ac_try;;
23975 esac
23976 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23977 $as_echo "$ac_try_echo") >&5
23978   (eval "$ac_compile") 2>conftest.er1
23979   ac_status=$?
23980   grep -v '^ *+' conftest.er1 >conftest.err
23981   rm -f conftest.er1
23982   cat conftest.err >&5
23983   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23984   (exit $ac_status); } && {
23985          test -z "$ac_c_werror_flag" ||
23986          test ! -s conftest.err
23987        } && test -s conftest.$ac_objext; then
23988   pgac_cv_func_strerror_r_int=yes
23989 else
23990   $as_echo "$as_me: failed program was:" >&5
23991 sed 's/^/| /' conftest.$ac_ext >&5
23992
23993         pgac_cv_func_strerror_r_int=no
23994 fi
23995
23996 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23997 fi
23998 { $as_echo "$as_me:$LINENO: result: $pgac_cv_func_strerror_r_int" >&5
23999 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
24000 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
24001
24002 cat >>confdefs.h <<\_ACEOF
24003 #define STRERROR_R_INT /**/
24004 _ACEOF
24005
24006 fi
24007
24008
24009 CFLAGS="$_CFLAGS"
24010 LIBS="$_LIBS"
24011
24012 else
24013 # do not use values from template file
24014 PTHREAD_CFLAGS=
24015 PTHREAD_LIBS=
24016 fi
24017
24018
24019
24020
24021
24022 # We can test for libldap_r only after we know PTHREAD_LIBS
24023 if test "$with_ldap" = yes ; then
24024   _LIBS="$LIBS"
24025   if test "$PORTNAME" != "win32"; then
24026
24027 { $as_echo "$as_me:$LINENO: checking for ldap_bind in -lldap" >&5
24028 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
24029 if test "${ac_cv_lib_ldap_ldap_bind+set}" = set; then
24030   $as_echo_n "(cached) " >&6
24031 else
24032   ac_check_lib_save_LIBS=$LIBS
24033 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
24034 cat >conftest.$ac_ext <<_ACEOF
24035 /* confdefs.h.  */
24036 _ACEOF
24037 cat confdefs.h >>conftest.$ac_ext
24038 cat >>conftest.$ac_ext <<_ACEOF
24039 /* end confdefs.h.  */
24040
24041 /* Override any GCC internal prototype to avoid an error.
24042    Use char because int might match the return type of a GCC
24043    builtin and then its argument prototype would still apply.  */
24044 #ifdef __cplusplus
24045 extern "C"
24046 #endif
24047 char ldap_bind ();
24048 int
24049 main ()
24050 {
24051 return ldap_bind ();
24052   ;
24053   return 0;
24054 }
24055 _ACEOF
24056 rm -f conftest.$ac_objext conftest$ac_exeext
24057 if { (ac_try="$ac_link"
24058 case "(($ac_try" in
24059   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24060   *) ac_try_echo=$ac_try;;
24061 esac
24062 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24063 $as_echo "$ac_try_echo") >&5
24064   (eval "$ac_link") 2>conftest.er1
24065   ac_status=$?
24066   grep -v '^ *+' conftest.er1 >conftest.err
24067   rm -f conftest.er1
24068   cat conftest.err >&5
24069   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24070   (exit $ac_status); } && {
24071          test -z "$ac_c_werror_flag" ||
24072          test ! -s conftest.err
24073        } && test -s conftest$ac_exeext && {
24074          test "$cross_compiling" = yes ||
24075          $as_test_x conftest$ac_exeext
24076        }; then
24077   ac_cv_lib_ldap_ldap_bind=yes
24078 else
24079   $as_echo "$as_me: failed program was:" >&5
24080 sed 's/^/| /' conftest.$ac_ext >&5
24081
24082         ac_cv_lib_ldap_ldap_bind=no
24083 fi
24084
24085 rm -rf conftest.dSYM
24086 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24087       conftest$ac_exeext conftest.$ac_ext
24088 LIBS=$ac_check_lib_save_LIBS
24089 fi
24090 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_bind" >&5
24091 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
24092 if test "x$ac_cv_lib_ldap_ldap_bind" = x""yes; then
24093   cat >>confdefs.h <<_ACEOF
24094 #define HAVE_LIBLDAP 1
24095 _ACEOF
24096
24097   LIBS="-lldap $LIBS"
24098
24099 else
24100   { { $as_echo "$as_me:$LINENO: error: library 'ldap' is required for LDAP" >&5
24101 $as_echo "$as_me: error: library 'ldap' is required for LDAP" >&2;}
24102    { (exit 1); exit 1; }; }
24103 fi
24104
24105     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
24106     if test "$enable_thread_safety" = yes; then
24107       # on some platforms ldap_r fails to link without PTHREAD_LIBS
24108
24109 { $as_echo "$as_me:$LINENO: checking for ldap_simple_bind in -lldap_r" >&5
24110 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
24111 if test "${ac_cv_lib_ldap_r_ldap_simple_bind+set}" = set; then
24112   $as_echo_n "(cached) " >&6
24113 else
24114   ac_check_lib_save_LIBS=$LIBS
24115 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
24116 cat >conftest.$ac_ext <<_ACEOF
24117 /* confdefs.h.  */
24118 _ACEOF
24119 cat confdefs.h >>conftest.$ac_ext
24120 cat >>conftest.$ac_ext <<_ACEOF
24121 /* end confdefs.h.  */
24122
24123 /* Override any GCC internal prototype to avoid an error.
24124    Use char because int might match the return type of a GCC
24125    builtin and then its argument prototype would still apply.  */
24126 #ifdef __cplusplus
24127 extern "C"
24128 #endif
24129 char ldap_simple_bind ();
24130 int
24131 main ()
24132 {
24133 return ldap_simple_bind ();
24134   ;
24135   return 0;
24136 }
24137 _ACEOF
24138 rm -f conftest.$ac_objext conftest$ac_exeext
24139 if { (ac_try="$ac_link"
24140 case "(($ac_try" in
24141   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24142   *) ac_try_echo=$ac_try;;
24143 esac
24144 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24145 $as_echo "$ac_try_echo") >&5
24146   (eval "$ac_link") 2>conftest.er1
24147   ac_status=$?
24148   grep -v '^ *+' conftest.er1 >conftest.err
24149   rm -f conftest.er1
24150   cat conftest.err >&5
24151   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24152   (exit $ac_status); } && {
24153          test -z "$ac_c_werror_flag" ||
24154          test ! -s conftest.err
24155        } && test -s conftest$ac_exeext && {
24156          test "$cross_compiling" = yes ||
24157          $as_test_x conftest$ac_exeext
24158        }; then
24159   ac_cv_lib_ldap_r_ldap_simple_bind=yes
24160 else
24161   $as_echo "$as_me: failed program was:" >&5
24162 sed 's/^/| /' conftest.$ac_ext >&5
24163
24164         ac_cv_lib_ldap_r_ldap_simple_bind=no
24165 fi
24166
24167 rm -rf conftest.dSYM
24168 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24169       conftest$ac_exeext conftest.$ac_ext
24170 LIBS=$ac_check_lib_save_LIBS
24171 fi
24172 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
24173 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
24174 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = x""yes; then
24175   cat >>confdefs.h <<_ACEOF
24176 #define HAVE_LIBLDAP_R 1
24177 _ACEOF
24178
24179   LIBS="-lldap_r $LIBS"
24180
24181 else
24182   { { $as_echo "$as_me:$LINENO: error: library 'ldap_r' is required for LDAP" >&5
24183 $as_echo "$as_me: error: library 'ldap_r' is required for LDAP" >&2;}
24184    { (exit 1); exit 1; }; }
24185 fi
24186
24187       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
24188     else
24189       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
24190     fi
24191   else
24192
24193 { $as_echo "$as_me:$LINENO: checking for ldap_bind in -lwldap32" >&5
24194 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
24195 if test "${ac_cv_lib_wldap32_ldap_bind+set}" = set; then
24196   $as_echo_n "(cached) " >&6
24197 else
24198   ac_check_lib_save_LIBS=$LIBS
24199 LIBS="-lwldap32  $LIBS"
24200 cat >conftest.$ac_ext <<_ACEOF
24201 /* confdefs.h.  */
24202 _ACEOF
24203 cat confdefs.h >>conftest.$ac_ext
24204 cat >>conftest.$ac_ext <<_ACEOF
24205 /* end confdefs.h.  */
24206
24207 /* Override any GCC internal prototype to avoid an error.
24208    Use char because int might match the return type of a GCC
24209    builtin and then its argument prototype would still apply.  */
24210 #ifdef __cplusplus
24211 extern "C"
24212 #endif
24213 char ldap_bind ();
24214 int
24215 main ()
24216 {
24217 return ldap_bind ();
24218   ;
24219   return 0;
24220 }
24221 _ACEOF
24222 rm -f conftest.$ac_objext conftest$ac_exeext
24223 if { (ac_try="$ac_link"
24224 case "(($ac_try" in
24225   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24226   *) ac_try_echo=$ac_try;;
24227 esac
24228 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24229 $as_echo "$ac_try_echo") >&5
24230   (eval "$ac_link") 2>conftest.er1
24231   ac_status=$?
24232   grep -v '^ *+' conftest.er1 >conftest.err
24233   rm -f conftest.er1
24234   cat conftest.err >&5
24235   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24236   (exit $ac_status); } && {
24237          test -z "$ac_c_werror_flag" ||
24238          test ! -s conftest.err
24239        } && test -s conftest$ac_exeext && {
24240          test "$cross_compiling" = yes ||
24241          $as_test_x conftest$ac_exeext
24242        }; then
24243   ac_cv_lib_wldap32_ldap_bind=yes
24244 else
24245   $as_echo "$as_me: failed program was:" >&5
24246 sed 's/^/| /' conftest.$ac_ext >&5
24247
24248         ac_cv_lib_wldap32_ldap_bind=no
24249 fi
24250
24251 rm -rf conftest.dSYM
24252 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24253       conftest$ac_exeext conftest.$ac_ext
24254 LIBS=$ac_check_lib_save_LIBS
24255 fi
24256 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_wldap32_ldap_bind" >&5
24257 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
24258 if test "x$ac_cv_lib_wldap32_ldap_bind" = x""yes; then
24259   cat >>confdefs.h <<_ACEOF
24260 #define HAVE_LIBWLDAP32 1
24261 _ACEOF
24262
24263   LIBS="-lwldap32 $LIBS"
24264
24265 else
24266   { { $as_echo "$as_me:$LINENO: error: library 'wldap32' is required for LDAP" >&5
24267 $as_echo "$as_me: error: library 'wldap32' is required for LDAP" >&2;}
24268    { (exit 1); exit 1; }; }
24269 fi
24270
24271     LDAP_LIBS_FE="-lwldap32"
24272     LDAP_LIBS_BE="-lwldap32"
24273   fi
24274   LIBS="$_LIBS"
24275 fi
24276
24277
24278
24279
24280 # This test makes sure that run tests work at all.  Sometimes a shared
24281 # library is found by the linker, but the runtime linker can't find it.
24282 # This check should come after all modifications of compiler or linker
24283 # variables, and before any other run tests.
24284 { $as_echo "$as_me:$LINENO: checking test program" >&5
24285 $as_echo_n "checking test program... " >&6; }
24286 if test "$cross_compiling" = yes; then
24287   { $as_echo "$as_me:$LINENO: result: cross-compiling" >&5
24288 $as_echo "cross-compiling" >&6; }
24289 else
24290   cat >conftest.$ac_ext <<_ACEOF
24291 /* confdefs.h.  */
24292 _ACEOF
24293 cat confdefs.h >>conftest.$ac_ext
24294 cat >>conftest.$ac_ext <<_ACEOF
24295 /* end confdefs.h.  */
24296 int main() { return 0; }
24297 _ACEOF
24298 rm -f conftest$ac_exeext
24299 if { (ac_try="$ac_link"
24300 case "(($ac_try" in
24301   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24302   *) ac_try_echo=$ac_try;;
24303 esac
24304 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24305 $as_echo "$ac_try_echo") >&5
24306   (eval "$ac_link") 2>&5
24307   ac_status=$?
24308   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24309   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24310   { (case "(($ac_try" in
24311   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24312   *) ac_try_echo=$ac_try;;
24313 esac
24314 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24315 $as_echo "$ac_try_echo") >&5
24316   (eval "$ac_try") 2>&5
24317   ac_status=$?
24318   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24319   (exit $ac_status); }; }; then
24320   { $as_echo "$as_me:$LINENO: result: ok" >&5
24321 $as_echo "ok" >&6; }
24322 else
24323   $as_echo "$as_me: program exited with status $ac_status" >&5
24324 $as_echo "$as_me: failed program was:" >&5
24325 sed 's/^/| /' conftest.$ac_ext >&5
24326
24327 ( exit $ac_status )
24328 { $as_echo "$as_me:$LINENO: result: failed" >&5
24329 $as_echo "failed" >&6; }
24330 { { $as_echo "$as_me:$LINENO: error:
24331 Could not execute a simple test program.  This may be a problem
24332 related to locating shared libraries.  Check the file 'config.log'
24333 for the exact reason." >&5
24334 $as_echo "$as_me: error:
24335 Could not execute a simple test program.  This may be a problem
24336 related to locating shared libraries.  Check the file 'config.log'
24337 for the exact reason." >&2;}
24338    { (exit 1); exit 1; }; }
24339 fi
24340 rm -rf conftest.dSYM
24341 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24342 fi
24343
24344
24345
24346 # --------------------
24347 # Run tests below here
24348 # --------------------
24349
24350 # Force use of our snprintf if system's doesn't do arg control
24351 # See comment above at snprintf test for details.
24352 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
24353   { $as_echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
24354 $as_echo_n "checking whether printf supports argument control... " >&6; }
24355 if test "${pgac_cv_printf_arg_control+set}" = set; then
24356   $as_echo_n "(cached) " >&6
24357 else
24358   if test "$cross_compiling" = yes; then
24359   pgac_cv_printf_arg_control=cross
24360 else
24361   cat >conftest.$ac_ext <<_ACEOF
24362 /* confdefs.h.  */
24363 _ACEOF
24364 cat confdefs.h >>conftest.$ac_ext
24365 cat >>conftest.$ac_ext <<_ACEOF
24366 /* end confdefs.h.  */
24367 #include <stdio.h>
24368 #include <string.h>
24369
24370 int main()
24371 {
24372   char buf[100];
24373
24374   /* can it swap arguments? */
24375   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
24376   if (strcmp(buf, "4 3") != 0)
24377     return 1;
24378   return 0;
24379 }
24380 _ACEOF
24381 rm -f conftest$ac_exeext
24382 if { (ac_try="$ac_link"
24383 case "(($ac_try" in
24384   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24385   *) ac_try_echo=$ac_try;;
24386 esac
24387 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24388 $as_echo "$ac_try_echo") >&5
24389   (eval "$ac_link") 2>&5
24390   ac_status=$?
24391   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24392   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24393   { (case "(($ac_try" in
24394   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24395   *) ac_try_echo=$ac_try;;
24396 esac
24397 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24398 $as_echo "$ac_try_echo") >&5
24399   (eval "$ac_try") 2>&5
24400   ac_status=$?
24401   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24402   (exit $ac_status); }; }; then
24403   pgac_cv_printf_arg_control=yes
24404 else
24405   $as_echo "$as_me: program exited with status $ac_status" >&5
24406 $as_echo "$as_me: failed program was:" >&5
24407 sed 's/^/| /' conftest.$ac_ext >&5
24408
24409 ( exit $ac_status )
24410 pgac_cv_printf_arg_control=no
24411 fi
24412 rm -rf conftest.dSYM
24413 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24414 fi
24415
24416
24417
24418 fi
24419 { $as_echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
24420 $as_echo "$pgac_cv_printf_arg_control" >&6; }
24421
24422   if test $pgac_cv_printf_arg_control != yes ; then
24423     pgac_need_repl_snprintf=yes
24424   fi
24425 fi
24426
24427
24428
24429
24430 { $as_echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
24431 $as_echo_n "checking whether long int is 64 bits... " >&6; }
24432 if test "${pgac_cv_type_long_int_64+set}" = set; then
24433   $as_echo_n "(cached) " >&6
24434 else
24435   if test "$cross_compiling" = yes; then
24436   # If cross-compiling, check the size reported by the compiler and
24437 # trust that the arithmetic works.
24438 cat >conftest.$ac_ext <<_ACEOF
24439 /* confdefs.h.  */
24440 _ACEOF
24441 cat confdefs.h >>conftest.$ac_ext
24442 cat >>conftest.$ac_ext <<_ACEOF
24443 /* end confdefs.h.  */
24444
24445 int
24446 main ()
24447 {
24448 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
24449 test_array [0] = 0
24450
24451   ;
24452   return 0;
24453 }
24454 _ACEOF
24455 rm -f conftest.$ac_objext
24456 if { (ac_try="$ac_compile"
24457 case "(($ac_try" in
24458   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24459   *) ac_try_echo=$ac_try;;
24460 esac
24461 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24462 $as_echo "$ac_try_echo") >&5
24463   (eval "$ac_compile") 2>conftest.er1
24464   ac_status=$?
24465   grep -v '^ *+' conftest.er1 >conftest.err
24466   rm -f conftest.er1
24467   cat conftest.err >&5
24468   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24469   (exit $ac_status); } && {
24470          test -z "$ac_c_werror_flag" ||
24471          test ! -s conftest.err
24472        } && test -s conftest.$ac_objext; then
24473   pgac_cv_type_long_int_64=yes
24474 else
24475   $as_echo "$as_me: failed program was:" >&5
24476 sed 's/^/| /' conftest.$ac_ext >&5
24477
24478         pgac_cv_type_long_int_64=no
24479 fi
24480
24481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24482 else
24483   cat >conftest.$ac_ext <<_ACEOF
24484 /* confdefs.h.  */
24485 _ACEOF
24486 cat confdefs.h >>conftest.$ac_ext
24487 cat >>conftest.$ac_ext <<_ACEOF
24488 /* end confdefs.h.  */
24489 typedef long int ac_int64;
24490
24491 /*
24492  * These are globals to discourage the compiler from folding all the
24493  * arithmetic tests down to compile-time constants.
24494  */
24495 ac_int64 a = 20000001;
24496 ac_int64 b = 40000005;
24497
24498 int does_int64_work()
24499 {
24500   ac_int64 c,d;
24501
24502   if (sizeof(ac_int64) != 8)
24503     return 0;                   /* definitely not the right size */
24504
24505   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
24506   c = a * b;
24507   d = (c + b) / b;
24508   if (d != a+1)
24509     return 0;
24510   return 1;
24511 }
24512 main() {
24513   exit(! does_int64_work());
24514 }
24515 _ACEOF
24516 rm -f conftest$ac_exeext
24517 if { (ac_try="$ac_link"
24518 case "(($ac_try" in
24519   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24520   *) ac_try_echo=$ac_try;;
24521 esac
24522 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24523 $as_echo "$ac_try_echo") >&5
24524   (eval "$ac_link") 2>&5
24525   ac_status=$?
24526   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24527   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24528   { (case "(($ac_try" in
24529   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24530   *) ac_try_echo=$ac_try;;
24531 esac
24532 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24533 $as_echo "$ac_try_echo") >&5
24534   (eval "$ac_try") 2>&5
24535   ac_status=$?
24536   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24537   (exit $ac_status); }; }; then
24538   pgac_cv_type_long_int_64=yes
24539 else
24540   $as_echo "$as_me: program exited with status $ac_status" >&5
24541 $as_echo "$as_me: failed program was:" >&5
24542 sed 's/^/| /' conftest.$ac_ext >&5
24543
24544 ( exit $ac_status )
24545 pgac_cv_type_long_int_64=no
24546 fi
24547 rm -rf conftest.dSYM
24548 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24549 fi
24550
24551
24552 fi
24553 { $as_echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
24554 $as_echo "$pgac_cv_type_long_int_64" >&6; }
24555
24556 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
24557 if test x"$pgac_cv_type_long_int_64" = xyes ; then
24558
24559 cat >>confdefs.h <<\_ACEOF
24560 #define HAVE_LONG_INT_64 1
24561 _ACEOF
24562
24563 fi
24564
24565
24566 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
24567   pg_int64_type="long int"
24568 else
24569   { $as_echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
24570 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
24571 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
24572   $as_echo_n "(cached) " >&6
24573 else
24574   if test "$cross_compiling" = yes; then
24575   # If cross-compiling, check the size reported by the compiler and
24576 # trust that the arithmetic works.
24577 cat >conftest.$ac_ext <<_ACEOF
24578 /* confdefs.h.  */
24579 _ACEOF
24580 cat confdefs.h >>conftest.$ac_ext
24581 cat >>conftest.$ac_ext <<_ACEOF
24582 /* end confdefs.h.  */
24583
24584 int
24585 main ()
24586 {
24587 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
24588 test_array [0] = 0
24589
24590   ;
24591   return 0;
24592 }
24593 _ACEOF
24594 rm -f conftest.$ac_objext
24595 if { (ac_try="$ac_compile"
24596 case "(($ac_try" in
24597   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24598   *) ac_try_echo=$ac_try;;
24599 esac
24600 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24601 $as_echo "$ac_try_echo") >&5
24602   (eval "$ac_compile") 2>conftest.er1
24603   ac_status=$?
24604   grep -v '^ *+' conftest.er1 >conftest.err
24605   rm -f conftest.er1
24606   cat conftest.err >&5
24607   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24608   (exit $ac_status); } && {
24609          test -z "$ac_c_werror_flag" ||
24610          test ! -s conftest.err
24611        } && test -s conftest.$ac_objext; then
24612   pgac_cv_type_long_long_int_64=yes
24613 else
24614   $as_echo "$as_me: failed program was:" >&5
24615 sed 's/^/| /' conftest.$ac_ext >&5
24616
24617         pgac_cv_type_long_long_int_64=no
24618 fi
24619
24620 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24621 else
24622   cat >conftest.$ac_ext <<_ACEOF
24623 /* confdefs.h.  */
24624 _ACEOF
24625 cat confdefs.h >>conftest.$ac_ext
24626 cat >>conftest.$ac_ext <<_ACEOF
24627 /* end confdefs.h.  */
24628 typedef long long int ac_int64;
24629
24630 /*
24631  * These are globals to discourage the compiler from folding all the
24632  * arithmetic tests down to compile-time constants.
24633  */
24634 ac_int64 a = 20000001;
24635 ac_int64 b = 40000005;
24636
24637 int does_int64_work()
24638 {
24639   ac_int64 c,d;
24640
24641   if (sizeof(ac_int64) != 8)
24642     return 0;                   /* definitely not the right size */
24643
24644   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
24645   c = a * b;
24646   d = (c + b) / b;
24647   if (d != a+1)
24648     return 0;
24649   return 1;
24650 }
24651 main() {
24652   exit(! does_int64_work());
24653 }
24654 _ACEOF
24655 rm -f conftest$ac_exeext
24656 if { (ac_try="$ac_link"
24657 case "(($ac_try" in
24658   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24659   *) ac_try_echo=$ac_try;;
24660 esac
24661 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24662 $as_echo "$ac_try_echo") >&5
24663   (eval "$ac_link") 2>&5
24664   ac_status=$?
24665   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24666   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24667   { (case "(($ac_try" in
24668   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24669   *) ac_try_echo=$ac_try;;
24670 esac
24671 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24672 $as_echo "$ac_try_echo") >&5
24673   (eval "$ac_try") 2>&5
24674   ac_status=$?
24675   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24676   (exit $ac_status); }; }; then
24677   pgac_cv_type_long_long_int_64=yes
24678 else
24679   $as_echo "$as_me: program exited with status $ac_status" >&5
24680 $as_echo "$as_me: failed program was:" >&5
24681 sed 's/^/| /' conftest.$ac_ext >&5
24682
24683 ( exit $ac_status )
24684 pgac_cv_type_long_long_int_64=no
24685 fi
24686 rm -rf conftest.dSYM
24687 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24688 fi
24689
24690
24691 fi
24692 { $as_echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
24693 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
24694
24695 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
24696 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
24697
24698 cat >>confdefs.h <<\_ACEOF
24699 #define HAVE_LONG_LONG_INT_64 1
24700 _ACEOF
24701
24702 fi
24703
24704   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
24705     pg_int64_type="long long int"
24706   else
24707     { { $as_echo "$as_me:$LINENO: error: Cannot find a working 64-bit integer type." >&5
24708 $as_echo "$as_me: error: Cannot find a working 64-bit integer type." >&2;}
24709    { (exit 1); exit 1; }; }
24710   fi
24711 fi
24712
24713
24714 cat >>confdefs.h <<_ACEOF
24715 #define PG_INT64_TYPE $pg_int64_type
24716 _ACEOF
24717
24718
24719
24720 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
24721   cat >conftest.$ac_ext <<_ACEOF
24722 /* confdefs.h.  */
24723 _ACEOF
24724 cat confdefs.h >>conftest.$ac_ext
24725 cat >>conftest.$ac_ext <<_ACEOF
24726 /* end confdefs.h.  */
24727
24728 #define INT64CONST(x)  x##LL
24729 long long int foo = INT64CONST(0x1234567890123456);
24730
24731 int
24732 main ()
24733 {
24734
24735   ;
24736   return 0;
24737 }
24738 _ACEOF
24739 rm -f conftest.$ac_objext
24740 if { (ac_try="$ac_compile"
24741 case "(($ac_try" in
24742   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24743   *) ac_try_echo=$ac_try;;
24744 esac
24745 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24746 $as_echo "$ac_try_echo") >&5
24747   (eval "$ac_compile") 2>conftest.er1
24748   ac_status=$?
24749   grep -v '^ *+' conftest.er1 >conftest.err
24750   rm -f conftest.er1
24751   cat conftest.err >&5
24752   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24753   (exit $ac_status); } && {
24754          test -z "$ac_c_werror_flag" ||
24755          test ! -s conftest.err
24756        } && test -s conftest.$ac_objext; then
24757
24758 cat >>confdefs.h <<\_ACEOF
24759 #define HAVE_LL_CONSTANTS 1
24760 _ACEOF
24761
24762 else
24763   $as_echo "$as_me: failed program was:" >&5
24764 sed 's/^/| /' conftest.$ac_ext >&5
24765
24766
24767 fi
24768
24769 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24770 fi
24771
24772
24773 # If we found "long int" is 64 bits, assume snprintf handles it.  If
24774 # we found we need to use "long long int", better check.  We cope with
24775 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
24776 # work, fall back to our own snprintf emulation (which we know uses %lld).
24777
24778 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
24779   if test $pgac_need_repl_snprintf = no; then
24780     { $as_echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
24781 $as_echo_n "checking snprintf format for long long int... " >&6; }
24782 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
24783   $as_echo_n "(cached) " >&6
24784 else
24785   for pgac_format in '%lld' '%qd' '%I64d'; do
24786 if test "$cross_compiling" = yes; then
24787   pgac_cv_snprintf_long_long_int_format=cross; break
24788 else
24789   cat >conftest.$ac_ext <<_ACEOF
24790 /* confdefs.h.  */
24791 _ACEOF
24792 cat confdefs.h >>conftest.$ac_ext
24793 cat >>conftest.$ac_ext <<_ACEOF
24794 /* end confdefs.h.  */
24795 #include <stdio.h>
24796 typedef long long int ac_int64;
24797 #define INT64_FORMAT "$pgac_format"
24798
24799 ac_int64 a = 20000001;
24800 ac_int64 b = 40000005;
24801
24802 int does_int64_snprintf_work()
24803 {
24804   ac_int64 c;
24805   char buf[100];
24806
24807   if (sizeof(ac_int64) != 8)
24808     return 0;                   /* doesn't look like the right size */
24809
24810   c = a * b;
24811   snprintf(buf, 100, INT64_FORMAT, c);
24812   if (strcmp(buf, "800000140000005") != 0)
24813     return 0;                   /* either multiply or snprintf is busted */
24814   return 1;
24815 }
24816 main() {
24817   exit(! does_int64_snprintf_work());
24818 }
24819 _ACEOF
24820 rm -f conftest$ac_exeext
24821 if { (ac_try="$ac_link"
24822 case "(($ac_try" in
24823   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24824   *) ac_try_echo=$ac_try;;
24825 esac
24826 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24827 $as_echo "$ac_try_echo") >&5
24828   (eval "$ac_link") 2>&5
24829   ac_status=$?
24830   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24831   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24832   { (case "(($ac_try" in
24833   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24834   *) ac_try_echo=$ac_try;;
24835 esac
24836 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24837 $as_echo "$ac_try_echo") >&5
24838   (eval "$ac_try") 2>&5
24839   ac_status=$?
24840   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24841   (exit $ac_status); }; }; then
24842   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
24843 else
24844   $as_echo "$as_me: program exited with status $ac_status" >&5
24845 $as_echo "$as_me: failed program was:" >&5
24846 sed 's/^/| /' conftest.$ac_ext >&5
24847
24848 fi
24849 rm -rf conftest.dSYM
24850 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24851 fi
24852
24853
24854 done
24855 fi
24856
24857 LONG_LONG_INT_FORMAT=''
24858
24859 case $pgac_cv_snprintf_long_long_int_format in
24860   cross) { $as_echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
24861 $as_echo "cannot test (not on host machine)" >&6; };;
24862   ?*)    { $as_echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
24863 $as_echo "$pgac_cv_snprintf_long_long_int_format" >&6; }
24864          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
24865   *)     { $as_echo "$as_me:$LINENO: result: none" >&5
24866 $as_echo "none" >&6; };;
24867 esac
24868     if test "$LONG_LONG_INT_FORMAT" = ""; then
24869       # Force usage of our own snprintf, since system snprintf is broken
24870       pgac_need_repl_snprintf=yes
24871       LONG_LONG_INT_FORMAT='%lld'
24872     fi
24873   else
24874     # Here if we previously decided we needed to use our own snprintf
24875     LONG_LONG_INT_FORMAT='%lld'
24876   fi
24877   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
24878   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
24879   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
24880 else
24881   # Here if we are not using 'long long int' at all
24882   INT64_FORMAT='"%ld"'
24883   UINT64_FORMAT='"%lu"'
24884 fi
24885
24886
24887 cat >>confdefs.h <<_ACEOF
24888 #define INT64_FORMAT $INT64_FORMAT
24889 _ACEOF
24890
24891
24892
24893 cat >>confdefs.h <<_ACEOF
24894 #define UINT64_FORMAT $UINT64_FORMAT
24895 _ACEOF
24896
24897
24898 # Now we have checked all the reasons to replace snprintf
24899 if test $pgac_need_repl_snprintf = yes; then
24900
24901 cat >>confdefs.h <<\_ACEOF
24902 #define USE_REPL_SNPRINTF 1
24903 _ACEOF
24904
24905   case " $LIBOBJS " in
24906   *" snprintf.$ac_objext "* ) ;;
24907   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
24908  ;;
24909 esac
24910
24911 fi
24912
24913 # Check size of void *, size_t (enables tweaks for > 32bit address space)
24914 # The cast to long int works around a bug in the HP C Compiler
24915 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24916 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24917 # This bug is HP SR number 8606223364.
24918 { $as_echo "$as_me:$LINENO: checking size of void *" >&5
24919 $as_echo_n "checking size of void *... " >&6; }
24920 if test "${ac_cv_sizeof_void_p+set}" = set; then
24921   $as_echo_n "(cached) " >&6
24922 else
24923   if test "$cross_compiling" = yes; then
24924   # Depending upon the size, compute the lo and hi bounds.
24925 cat >conftest.$ac_ext <<_ACEOF
24926 /* confdefs.h.  */
24927 _ACEOF
24928 cat confdefs.h >>conftest.$ac_ext
24929 cat >>conftest.$ac_ext <<_ACEOF
24930 /* end confdefs.h.  */
24931 $ac_includes_default
24932 int
24933 main ()
24934 {
24935 static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= 0)];
24936 test_array [0] = 0
24937
24938   ;
24939   return 0;
24940 }
24941 _ACEOF
24942 rm -f conftest.$ac_objext
24943 if { (ac_try="$ac_compile"
24944 case "(($ac_try" in
24945   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24946   *) ac_try_echo=$ac_try;;
24947 esac
24948 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24949 $as_echo "$ac_try_echo") >&5
24950   (eval "$ac_compile") 2>conftest.er1
24951   ac_status=$?
24952   grep -v '^ *+' conftest.er1 >conftest.err
24953   rm -f conftest.er1
24954   cat conftest.err >&5
24955   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24956   (exit $ac_status); } && {
24957          test -z "$ac_c_werror_flag" ||
24958          test ! -s conftest.err
24959        } && test -s conftest.$ac_objext; then
24960   ac_lo=0 ac_mid=0
24961   while :; do
24962     cat >conftest.$ac_ext <<_ACEOF
24963 /* confdefs.h.  */
24964 _ACEOF
24965 cat confdefs.h >>conftest.$ac_ext
24966 cat >>conftest.$ac_ext <<_ACEOF
24967 /* end confdefs.h.  */
24968 $ac_includes_default
24969 int
24970 main ()
24971 {
24972 static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
24973 test_array [0] = 0
24974
24975   ;
24976   return 0;
24977 }
24978 _ACEOF
24979 rm -f conftest.$ac_objext
24980 if { (ac_try="$ac_compile"
24981 case "(($ac_try" in
24982   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24983   *) ac_try_echo=$ac_try;;
24984 esac
24985 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24986 $as_echo "$ac_try_echo") >&5
24987   (eval "$ac_compile") 2>conftest.er1
24988   ac_status=$?
24989   grep -v '^ *+' conftest.er1 >conftest.err
24990   rm -f conftest.er1
24991   cat conftest.err >&5
24992   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24993   (exit $ac_status); } && {
24994          test -z "$ac_c_werror_flag" ||
24995          test ! -s conftest.err
24996        } && test -s conftest.$ac_objext; then
24997   ac_hi=$ac_mid; break
24998 else
24999   $as_echo "$as_me: failed program was:" >&5
25000 sed 's/^/| /' conftest.$ac_ext >&5
25001
25002         ac_lo=`expr $ac_mid + 1`
25003                         if test $ac_lo -le $ac_mid; then
25004                           ac_lo= ac_hi=
25005                           break
25006                         fi
25007                         ac_mid=`expr 2 '*' $ac_mid + 1`
25008 fi
25009
25010 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25011   done
25012 else
25013   $as_echo "$as_me: failed program was:" >&5
25014 sed 's/^/| /' conftest.$ac_ext >&5
25015
25016         cat >conftest.$ac_ext <<_ACEOF
25017 /* confdefs.h.  */
25018 _ACEOF
25019 cat confdefs.h >>conftest.$ac_ext
25020 cat >>conftest.$ac_ext <<_ACEOF
25021 /* end confdefs.h.  */
25022 $ac_includes_default
25023 int
25024 main ()
25025 {
25026 static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)];
25027 test_array [0] = 0
25028
25029   ;
25030   return 0;
25031 }
25032 _ACEOF
25033 rm -f conftest.$ac_objext
25034 if { (ac_try="$ac_compile"
25035 case "(($ac_try" in
25036   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25037   *) ac_try_echo=$ac_try;;
25038 esac
25039 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25040 $as_echo "$ac_try_echo") >&5
25041   (eval "$ac_compile") 2>conftest.er1
25042   ac_status=$?
25043   grep -v '^ *+' conftest.er1 >conftest.err
25044   rm -f conftest.er1
25045   cat conftest.err >&5
25046   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25047   (exit $ac_status); } && {
25048          test -z "$ac_c_werror_flag" ||
25049          test ! -s conftest.err
25050        } && test -s conftest.$ac_objext; then
25051   ac_hi=-1 ac_mid=-1
25052   while :; do
25053     cat >conftest.$ac_ext <<_ACEOF
25054 /* confdefs.h.  */
25055 _ACEOF
25056 cat confdefs.h >>conftest.$ac_ext
25057 cat >>conftest.$ac_ext <<_ACEOF
25058 /* end confdefs.h.  */
25059 $ac_includes_default
25060 int
25061 main ()
25062 {
25063 static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $ac_mid)];
25064 test_array [0] = 0
25065
25066   ;
25067   return 0;
25068 }
25069 _ACEOF
25070 rm -f conftest.$ac_objext
25071 if { (ac_try="$ac_compile"
25072 case "(($ac_try" in
25073   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25074   *) ac_try_echo=$ac_try;;
25075 esac
25076 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25077 $as_echo "$ac_try_echo") >&5
25078   (eval "$ac_compile") 2>conftest.er1
25079   ac_status=$?
25080   grep -v '^ *+' conftest.er1 >conftest.err
25081   rm -f conftest.er1
25082   cat conftest.err >&5
25083   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25084   (exit $ac_status); } && {
25085          test -z "$ac_c_werror_flag" ||
25086          test ! -s conftest.err
25087        } && test -s conftest.$ac_objext; then
25088   ac_lo=$ac_mid; break
25089 else
25090   $as_echo "$as_me: failed program was:" >&5
25091 sed 's/^/| /' conftest.$ac_ext >&5
25092
25093         ac_hi=`expr '(' $ac_mid ')' - 1`
25094                         if test $ac_mid -le $ac_hi; then
25095                           ac_lo= ac_hi=
25096                           break
25097                         fi
25098                         ac_mid=`expr 2 '*' $ac_mid`
25099 fi
25100
25101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25102   done
25103 else
25104   $as_echo "$as_me: failed program was:" >&5
25105 sed 's/^/| /' conftest.$ac_ext >&5
25106
25107         ac_lo= ac_hi=
25108 fi
25109
25110 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25111 fi
25112
25113 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25114 # Binary search between lo and hi bounds.
25115 while test "x$ac_lo" != "x$ac_hi"; do
25116   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25117   cat >conftest.$ac_ext <<_ACEOF
25118 /* confdefs.h.  */
25119 _ACEOF
25120 cat confdefs.h >>conftest.$ac_ext
25121 cat >>conftest.$ac_ext <<_ACEOF
25122 /* end confdefs.h.  */
25123 $ac_includes_default
25124 int
25125 main ()
25126 {
25127 static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
25128 test_array [0] = 0
25129
25130   ;
25131   return 0;
25132 }
25133 _ACEOF
25134 rm -f conftest.$ac_objext
25135 if { (ac_try="$ac_compile"
25136 case "(($ac_try" in
25137   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25138   *) ac_try_echo=$ac_try;;
25139 esac
25140 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25141 $as_echo "$ac_try_echo") >&5
25142   (eval "$ac_compile") 2>conftest.er1
25143   ac_status=$?
25144   grep -v '^ *+' conftest.er1 >conftest.err
25145   rm -f conftest.er1
25146   cat conftest.err >&5
25147   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25148   (exit $ac_status); } && {
25149          test -z "$ac_c_werror_flag" ||
25150          test ! -s conftest.err
25151        } && test -s conftest.$ac_objext; then
25152   ac_hi=$ac_mid
25153 else
25154   $as_echo "$as_me: failed program was:" >&5
25155 sed 's/^/| /' conftest.$ac_ext >&5
25156
25157         ac_lo=`expr '(' $ac_mid ')' + 1`
25158 fi
25159
25160 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25161 done
25162 case $ac_lo in
25163 ?*) ac_cv_sizeof_void_p=$ac_lo;;
25164 '') if test "$ac_cv_type_void_p" = yes; then
25165      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25166 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25167 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
25168 See \`config.log' for more details." >&5
25169 $as_echo "$as_me: error: cannot compute sizeof (void *)
25170 See \`config.log' for more details." >&2;}
25171    { (exit 77); exit 77; }; }; }
25172    else
25173      ac_cv_sizeof_void_p=0
25174    fi ;;
25175 esac
25176 else
25177   cat >conftest.$ac_ext <<_ACEOF
25178 /* confdefs.h.  */
25179 _ACEOF
25180 cat confdefs.h >>conftest.$ac_ext
25181 cat >>conftest.$ac_ext <<_ACEOF
25182 /* end confdefs.h.  */
25183 $ac_includes_default
25184 static long int longval () { return (long int) (sizeof (void *)); }
25185 static unsigned long int ulongval () { return (long int) (sizeof (void *)); }
25186 #include <stdio.h>
25187 #include <stdlib.h>
25188 int
25189 main ()
25190 {
25191
25192   FILE *f = fopen ("conftest.val", "w");
25193   if (! f)
25194     return 1;
25195   if (((long int) (sizeof (void *))) < 0)
25196     {
25197       long int i = longval ();
25198       if (i != ((long int) (sizeof (void *))))
25199         return 1;
25200       fprintf (f, "%ld", i);
25201     }
25202   else
25203     {
25204       unsigned long int i = ulongval ();
25205       if (i != ((long int) (sizeof (void *))))
25206         return 1;
25207       fprintf (f, "%lu", i);
25208     }
25209   /* Do not output a trailing newline, as this causes \r\n confusion
25210      on some platforms.  */
25211   return ferror (f) || fclose (f) != 0;
25212
25213   ;
25214   return 0;
25215 }
25216 _ACEOF
25217 rm -f conftest$ac_exeext
25218 if { (ac_try="$ac_link"
25219 case "(($ac_try" in
25220   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25221   *) ac_try_echo=$ac_try;;
25222 esac
25223 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25224 $as_echo "$ac_try_echo") >&5
25225   (eval "$ac_link") 2>&5
25226   ac_status=$?
25227   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25228   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25229   { (case "(($ac_try" in
25230   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25231   *) ac_try_echo=$ac_try;;
25232 esac
25233 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25234 $as_echo "$ac_try_echo") >&5
25235   (eval "$ac_try") 2>&5
25236   ac_status=$?
25237   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25238   (exit $ac_status); }; }; then
25239   ac_cv_sizeof_void_p=`cat conftest.val`
25240 else
25241   $as_echo "$as_me: program exited with status $ac_status" >&5
25242 $as_echo "$as_me: failed program was:" >&5
25243 sed 's/^/| /' conftest.$ac_ext >&5
25244
25245 ( exit $ac_status )
25246 if test "$ac_cv_type_void_p" = yes; then
25247      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25248 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25249 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
25250 See \`config.log' for more details." >&5
25251 $as_echo "$as_me: error: cannot compute sizeof (void *)
25252 See \`config.log' for more details." >&2;}
25253    { (exit 77); exit 77; }; }; }
25254    else
25255      ac_cv_sizeof_void_p=0
25256    fi
25257 fi
25258 rm -rf conftest.dSYM
25259 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25260 fi
25261 rm -f conftest.val
25262 fi
25263 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
25264 $as_echo "$ac_cv_sizeof_void_p" >&6; }
25265
25266
25267
25268 cat >>confdefs.h <<_ACEOF
25269 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
25270 _ACEOF
25271
25272
25273 # The cast to long int works around a bug in the HP C Compiler
25274 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
25275 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
25276 # This bug is HP SR number 8606223364.
25277 { $as_echo "$as_me:$LINENO: checking size of size_t" >&5
25278 $as_echo_n "checking size of size_t... " >&6; }
25279 if test "${ac_cv_sizeof_size_t+set}" = set; then
25280   $as_echo_n "(cached) " >&6
25281 else
25282   if test "$cross_compiling" = yes; then
25283   # Depending upon the size, compute the lo and hi bounds.
25284 cat >conftest.$ac_ext <<_ACEOF
25285 /* confdefs.h.  */
25286 _ACEOF
25287 cat confdefs.h >>conftest.$ac_ext
25288 cat >>conftest.$ac_ext <<_ACEOF
25289 /* end confdefs.h.  */
25290 $ac_includes_default
25291 int
25292 main ()
25293 {
25294 static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= 0)];
25295 test_array [0] = 0
25296
25297   ;
25298   return 0;
25299 }
25300 _ACEOF
25301 rm -f conftest.$ac_objext
25302 if { (ac_try="$ac_compile"
25303 case "(($ac_try" in
25304   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25305   *) ac_try_echo=$ac_try;;
25306 esac
25307 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25308 $as_echo "$ac_try_echo") >&5
25309   (eval "$ac_compile") 2>conftest.er1
25310   ac_status=$?
25311   grep -v '^ *+' conftest.er1 >conftest.err
25312   rm -f conftest.er1
25313   cat conftest.err >&5
25314   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25315   (exit $ac_status); } && {
25316          test -z "$ac_c_werror_flag" ||
25317          test ! -s conftest.err
25318        } && test -s conftest.$ac_objext; then
25319   ac_lo=0 ac_mid=0
25320   while :; do
25321     cat >conftest.$ac_ext <<_ACEOF
25322 /* confdefs.h.  */
25323 _ACEOF
25324 cat confdefs.h >>conftest.$ac_ext
25325 cat >>conftest.$ac_ext <<_ACEOF
25326 /* end confdefs.h.  */
25327 $ac_includes_default
25328 int
25329 main ()
25330 {
25331 static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
25332 test_array [0] = 0
25333
25334   ;
25335   return 0;
25336 }
25337 _ACEOF
25338 rm -f conftest.$ac_objext
25339 if { (ac_try="$ac_compile"
25340 case "(($ac_try" in
25341   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25342   *) ac_try_echo=$ac_try;;
25343 esac
25344 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25345 $as_echo "$ac_try_echo") >&5
25346   (eval "$ac_compile") 2>conftest.er1
25347   ac_status=$?
25348   grep -v '^ *+' conftest.er1 >conftest.err
25349   rm -f conftest.er1
25350   cat conftest.err >&5
25351   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25352   (exit $ac_status); } && {
25353          test -z "$ac_c_werror_flag" ||
25354          test ! -s conftest.err
25355        } && test -s conftest.$ac_objext; then
25356   ac_hi=$ac_mid; break
25357 else
25358   $as_echo "$as_me: failed program was:" >&5
25359 sed 's/^/| /' conftest.$ac_ext >&5
25360
25361         ac_lo=`expr $ac_mid + 1`
25362                         if test $ac_lo -le $ac_mid; then
25363                           ac_lo= ac_hi=
25364                           break
25365                         fi
25366                         ac_mid=`expr 2 '*' $ac_mid + 1`
25367 fi
25368
25369 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25370   done
25371 else
25372   $as_echo "$as_me: failed program was:" >&5
25373 sed 's/^/| /' conftest.$ac_ext >&5
25374
25375         cat >conftest.$ac_ext <<_ACEOF
25376 /* confdefs.h.  */
25377 _ACEOF
25378 cat confdefs.h >>conftest.$ac_ext
25379 cat >>conftest.$ac_ext <<_ACEOF
25380 /* end confdefs.h.  */
25381 $ac_includes_default
25382 int
25383 main ()
25384 {
25385 static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) < 0)];
25386 test_array [0] = 0
25387
25388   ;
25389   return 0;
25390 }
25391 _ACEOF
25392 rm -f conftest.$ac_objext
25393 if { (ac_try="$ac_compile"
25394 case "(($ac_try" in
25395   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25396   *) ac_try_echo=$ac_try;;
25397 esac
25398 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25399 $as_echo "$ac_try_echo") >&5
25400   (eval "$ac_compile") 2>conftest.er1
25401   ac_status=$?
25402   grep -v '^ *+' conftest.er1 >conftest.err
25403   rm -f conftest.er1
25404   cat conftest.err >&5
25405   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25406   (exit $ac_status); } && {
25407          test -z "$ac_c_werror_flag" ||
25408          test ! -s conftest.err
25409        } && test -s conftest.$ac_objext; then
25410   ac_hi=-1 ac_mid=-1
25411   while :; do
25412     cat >conftest.$ac_ext <<_ACEOF
25413 /* confdefs.h.  */
25414 _ACEOF
25415 cat confdefs.h >>conftest.$ac_ext
25416 cat >>conftest.$ac_ext <<_ACEOF
25417 /* end confdefs.h.  */
25418 $ac_includes_default
25419 int
25420 main ()
25421 {
25422 static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= $ac_mid)];
25423 test_array [0] = 0
25424
25425   ;
25426   return 0;
25427 }
25428 _ACEOF
25429 rm -f conftest.$ac_objext
25430 if { (ac_try="$ac_compile"
25431 case "(($ac_try" in
25432   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25433   *) ac_try_echo=$ac_try;;
25434 esac
25435 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25436 $as_echo "$ac_try_echo") >&5
25437   (eval "$ac_compile") 2>conftest.er1
25438   ac_status=$?
25439   grep -v '^ *+' conftest.er1 >conftest.err
25440   rm -f conftest.er1
25441   cat conftest.err >&5
25442   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25443   (exit $ac_status); } && {
25444          test -z "$ac_c_werror_flag" ||
25445          test ! -s conftest.err
25446        } && test -s conftest.$ac_objext; then
25447   ac_lo=$ac_mid; break
25448 else
25449   $as_echo "$as_me: failed program was:" >&5
25450 sed 's/^/| /' conftest.$ac_ext >&5
25451
25452         ac_hi=`expr '(' $ac_mid ')' - 1`
25453                         if test $ac_mid -le $ac_hi; then
25454                           ac_lo= ac_hi=
25455                           break
25456                         fi
25457                         ac_mid=`expr 2 '*' $ac_mid`
25458 fi
25459
25460 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25461   done
25462 else
25463   $as_echo "$as_me: failed program was:" >&5
25464 sed 's/^/| /' conftest.$ac_ext >&5
25465
25466         ac_lo= ac_hi=
25467 fi
25468
25469 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25470 fi
25471
25472 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25473 # Binary search between lo and hi bounds.
25474 while test "x$ac_lo" != "x$ac_hi"; do
25475   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25476   cat >conftest.$ac_ext <<_ACEOF
25477 /* confdefs.h.  */
25478 _ACEOF
25479 cat confdefs.h >>conftest.$ac_ext
25480 cat >>conftest.$ac_ext <<_ACEOF
25481 /* end confdefs.h.  */
25482 $ac_includes_default
25483 int
25484 main ()
25485 {
25486 static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
25487 test_array [0] = 0
25488
25489   ;
25490   return 0;
25491 }
25492 _ACEOF
25493 rm -f conftest.$ac_objext
25494 if { (ac_try="$ac_compile"
25495 case "(($ac_try" in
25496   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25497   *) ac_try_echo=$ac_try;;
25498 esac
25499 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25500 $as_echo "$ac_try_echo") >&5
25501   (eval "$ac_compile") 2>conftest.er1
25502   ac_status=$?
25503   grep -v '^ *+' conftest.er1 >conftest.err
25504   rm -f conftest.er1
25505   cat conftest.err >&5
25506   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25507   (exit $ac_status); } && {
25508          test -z "$ac_c_werror_flag" ||
25509          test ! -s conftest.err
25510        } && test -s conftest.$ac_objext; then
25511   ac_hi=$ac_mid
25512 else
25513   $as_echo "$as_me: failed program was:" >&5
25514 sed 's/^/| /' conftest.$ac_ext >&5
25515
25516         ac_lo=`expr '(' $ac_mid ')' + 1`
25517 fi
25518
25519 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25520 done
25521 case $ac_lo in
25522 ?*) ac_cv_sizeof_size_t=$ac_lo;;
25523 '') if test "$ac_cv_type_size_t" = yes; then
25524      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25525 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25526 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
25527 See \`config.log' for more details." >&5
25528 $as_echo "$as_me: error: cannot compute sizeof (size_t)
25529 See \`config.log' for more details." >&2;}
25530    { (exit 77); exit 77; }; }; }
25531    else
25532      ac_cv_sizeof_size_t=0
25533    fi ;;
25534 esac
25535 else
25536   cat >conftest.$ac_ext <<_ACEOF
25537 /* confdefs.h.  */
25538 _ACEOF
25539 cat confdefs.h >>conftest.$ac_ext
25540 cat >>conftest.$ac_ext <<_ACEOF
25541 /* end confdefs.h.  */
25542 $ac_includes_default
25543 static long int longval () { return (long int) (sizeof (size_t)); }
25544 static unsigned long int ulongval () { return (long int) (sizeof (size_t)); }
25545 #include <stdio.h>
25546 #include <stdlib.h>
25547 int
25548 main ()
25549 {
25550
25551   FILE *f = fopen ("conftest.val", "w");
25552   if (! f)
25553     return 1;
25554   if (((long int) (sizeof (size_t))) < 0)
25555     {
25556       long int i = longval ();
25557       if (i != ((long int) (sizeof (size_t))))
25558         return 1;
25559       fprintf (f, "%ld", i);
25560     }
25561   else
25562     {
25563       unsigned long int i = ulongval ();
25564       if (i != ((long int) (sizeof (size_t))))
25565         return 1;
25566       fprintf (f, "%lu", i);
25567     }
25568   /* Do not output a trailing newline, as this causes \r\n confusion
25569      on some platforms.  */
25570   return ferror (f) || fclose (f) != 0;
25571
25572   ;
25573   return 0;
25574 }
25575 _ACEOF
25576 rm -f conftest$ac_exeext
25577 if { (ac_try="$ac_link"
25578 case "(($ac_try" in
25579   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25580   *) ac_try_echo=$ac_try;;
25581 esac
25582 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25583 $as_echo "$ac_try_echo") >&5
25584   (eval "$ac_link") 2>&5
25585   ac_status=$?
25586   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25587   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25588   { (case "(($ac_try" in
25589   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25590   *) ac_try_echo=$ac_try;;
25591 esac
25592 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25593 $as_echo "$ac_try_echo") >&5
25594   (eval "$ac_try") 2>&5
25595   ac_status=$?
25596   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25597   (exit $ac_status); }; }; then
25598   ac_cv_sizeof_size_t=`cat conftest.val`
25599 else
25600   $as_echo "$as_me: program exited with status $ac_status" >&5
25601 $as_echo "$as_me: failed program was:" >&5
25602 sed 's/^/| /' conftest.$ac_ext >&5
25603
25604 ( exit $ac_status )
25605 if test "$ac_cv_type_size_t" = yes; then
25606      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25607 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25608 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
25609 See \`config.log' for more details." >&5
25610 $as_echo "$as_me: error: cannot compute sizeof (size_t)
25611 See \`config.log' for more details." >&2;}
25612    { (exit 77); exit 77; }; }; }
25613    else
25614      ac_cv_sizeof_size_t=0
25615    fi
25616 fi
25617 rm -rf conftest.dSYM
25618 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25619 fi
25620 rm -f conftest.val
25621 fi
25622 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
25623 $as_echo "$ac_cv_sizeof_size_t" >&6; }
25624
25625
25626
25627 cat >>confdefs.h <<_ACEOF
25628 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
25629 _ACEOF
25630
25631
25632 # The cast to long int works around a bug in the HP C Compiler
25633 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
25634 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
25635 # This bug is HP SR number 8606223364.
25636 { $as_echo "$as_me:$LINENO: checking size of long" >&5
25637 $as_echo_n "checking size of long... " >&6; }
25638 if test "${ac_cv_sizeof_long+set}" = set; then
25639   $as_echo_n "(cached) " >&6
25640 else
25641   if test "$cross_compiling" = yes; then
25642   # Depending upon the size, compute the lo and hi bounds.
25643 cat >conftest.$ac_ext <<_ACEOF
25644 /* confdefs.h.  */
25645 _ACEOF
25646 cat confdefs.h >>conftest.$ac_ext
25647 cat >>conftest.$ac_ext <<_ACEOF
25648 /* end confdefs.h.  */
25649 $ac_includes_default
25650 int
25651 main ()
25652 {
25653 static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
25654 test_array [0] = 0
25655
25656   ;
25657   return 0;
25658 }
25659 _ACEOF
25660 rm -f conftest.$ac_objext
25661 if { (ac_try="$ac_compile"
25662 case "(($ac_try" in
25663   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25664   *) ac_try_echo=$ac_try;;
25665 esac
25666 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25667 $as_echo "$ac_try_echo") >&5
25668   (eval "$ac_compile") 2>conftest.er1
25669   ac_status=$?
25670   grep -v '^ *+' conftest.er1 >conftest.err
25671   rm -f conftest.er1
25672   cat conftest.err >&5
25673   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25674   (exit $ac_status); } && {
25675          test -z "$ac_c_werror_flag" ||
25676          test ! -s conftest.err
25677        } && test -s conftest.$ac_objext; then
25678   ac_lo=0 ac_mid=0
25679   while :; do
25680     cat >conftest.$ac_ext <<_ACEOF
25681 /* confdefs.h.  */
25682 _ACEOF
25683 cat confdefs.h >>conftest.$ac_ext
25684 cat >>conftest.$ac_ext <<_ACEOF
25685 /* end confdefs.h.  */
25686 $ac_includes_default
25687 int
25688 main ()
25689 {
25690 static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
25691 test_array [0] = 0
25692
25693   ;
25694   return 0;
25695 }
25696 _ACEOF
25697 rm -f conftest.$ac_objext
25698 if { (ac_try="$ac_compile"
25699 case "(($ac_try" in
25700   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25701   *) ac_try_echo=$ac_try;;
25702 esac
25703 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25704 $as_echo "$ac_try_echo") >&5
25705   (eval "$ac_compile") 2>conftest.er1
25706   ac_status=$?
25707   grep -v '^ *+' conftest.er1 >conftest.err
25708   rm -f conftest.er1
25709   cat conftest.err >&5
25710   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25711   (exit $ac_status); } && {
25712          test -z "$ac_c_werror_flag" ||
25713          test ! -s conftest.err
25714        } && test -s conftest.$ac_objext; then
25715   ac_hi=$ac_mid; break
25716 else
25717   $as_echo "$as_me: failed program was:" >&5
25718 sed 's/^/| /' conftest.$ac_ext >&5
25719
25720         ac_lo=`expr $ac_mid + 1`
25721                         if test $ac_lo -le $ac_mid; then
25722                           ac_lo= ac_hi=
25723                           break
25724                         fi
25725                         ac_mid=`expr 2 '*' $ac_mid + 1`
25726 fi
25727
25728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25729   done
25730 else
25731   $as_echo "$as_me: failed program was:" >&5
25732 sed 's/^/| /' conftest.$ac_ext >&5
25733
25734         cat >conftest.$ac_ext <<_ACEOF
25735 /* confdefs.h.  */
25736 _ACEOF
25737 cat confdefs.h >>conftest.$ac_ext
25738 cat >>conftest.$ac_ext <<_ACEOF
25739 /* end confdefs.h.  */
25740 $ac_includes_default
25741 int
25742 main ()
25743 {
25744 static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
25745 test_array [0] = 0
25746
25747   ;
25748   return 0;
25749 }
25750 _ACEOF
25751 rm -f conftest.$ac_objext
25752 if { (ac_try="$ac_compile"
25753 case "(($ac_try" in
25754   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25755   *) ac_try_echo=$ac_try;;
25756 esac
25757 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25758 $as_echo "$ac_try_echo") >&5
25759   (eval "$ac_compile") 2>conftest.er1
25760   ac_status=$?
25761   grep -v '^ *+' conftest.er1 >conftest.err
25762   rm -f conftest.er1
25763   cat conftest.err >&5
25764   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25765   (exit $ac_status); } && {
25766          test -z "$ac_c_werror_flag" ||
25767          test ! -s conftest.err
25768        } && test -s conftest.$ac_objext; then
25769   ac_hi=-1 ac_mid=-1
25770   while :; do
25771     cat >conftest.$ac_ext <<_ACEOF
25772 /* confdefs.h.  */
25773 _ACEOF
25774 cat confdefs.h >>conftest.$ac_ext
25775 cat >>conftest.$ac_ext <<_ACEOF
25776 /* end confdefs.h.  */
25777 $ac_includes_default
25778 int
25779 main ()
25780 {
25781 static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
25782 test_array [0] = 0
25783
25784   ;
25785   return 0;
25786 }
25787 _ACEOF
25788 rm -f conftest.$ac_objext
25789 if { (ac_try="$ac_compile"
25790 case "(($ac_try" in
25791   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25792   *) ac_try_echo=$ac_try;;
25793 esac
25794 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25795 $as_echo "$ac_try_echo") >&5
25796   (eval "$ac_compile") 2>conftest.er1
25797   ac_status=$?
25798   grep -v '^ *+' conftest.er1 >conftest.err
25799   rm -f conftest.er1
25800   cat conftest.err >&5
25801   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25802   (exit $ac_status); } && {
25803          test -z "$ac_c_werror_flag" ||
25804          test ! -s conftest.err
25805        } && test -s conftest.$ac_objext; then
25806   ac_lo=$ac_mid; break
25807 else
25808   $as_echo "$as_me: failed program was:" >&5
25809 sed 's/^/| /' conftest.$ac_ext >&5
25810
25811         ac_hi=`expr '(' $ac_mid ')' - 1`
25812                         if test $ac_mid -le $ac_hi; then
25813                           ac_lo= ac_hi=
25814                           break
25815                         fi
25816                         ac_mid=`expr 2 '*' $ac_mid`
25817 fi
25818
25819 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25820   done
25821 else
25822   $as_echo "$as_me: failed program was:" >&5
25823 sed 's/^/| /' conftest.$ac_ext >&5
25824
25825         ac_lo= ac_hi=
25826 fi
25827
25828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25829 fi
25830
25831 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25832 # Binary search between lo and hi bounds.
25833 while test "x$ac_lo" != "x$ac_hi"; do
25834   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25835   cat >conftest.$ac_ext <<_ACEOF
25836 /* confdefs.h.  */
25837 _ACEOF
25838 cat confdefs.h >>conftest.$ac_ext
25839 cat >>conftest.$ac_ext <<_ACEOF
25840 /* end confdefs.h.  */
25841 $ac_includes_default
25842 int
25843 main ()
25844 {
25845 static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
25846 test_array [0] = 0
25847
25848   ;
25849   return 0;
25850 }
25851 _ACEOF
25852 rm -f conftest.$ac_objext
25853 if { (ac_try="$ac_compile"
25854 case "(($ac_try" in
25855   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25856   *) ac_try_echo=$ac_try;;
25857 esac
25858 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25859 $as_echo "$ac_try_echo") >&5
25860   (eval "$ac_compile") 2>conftest.er1
25861   ac_status=$?
25862   grep -v '^ *+' conftest.er1 >conftest.err
25863   rm -f conftest.er1
25864   cat conftest.err >&5
25865   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25866   (exit $ac_status); } && {
25867          test -z "$ac_c_werror_flag" ||
25868          test ! -s conftest.err
25869        } && test -s conftest.$ac_objext; then
25870   ac_hi=$ac_mid
25871 else
25872   $as_echo "$as_me: failed program was:" >&5
25873 sed 's/^/| /' conftest.$ac_ext >&5
25874
25875         ac_lo=`expr '(' $ac_mid ')' + 1`
25876 fi
25877
25878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25879 done
25880 case $ac_lo in
25881 ?*) ac_cv_sizeof_long=$ac_lo;;
25882 '') if test "$ac_cv_type_long" = yes; then
25883      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25884 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25885 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
25886 See \`config.log' for more details." >&5
25887 $as_echo "$as_me: error: cannot compute sizeof (long)
25888 See \`config.log' for more details." >&2;}
25889    { (exit 77); exit 77; }; }; }
25890    else
25891      ac_cv_sizeof_long=0
25892    fi ;;
25893 esac
25894 else
25895   cat >conftest.$ac_ext <<_ACEOF
25896 /* confdefs.h.  */
25897 _ACEOF
25898 cat confdefs.h >>conftest.$ac_ext
25899 cat >>conftest.$ac_ext <<_ACEOF
25900 /* end confdefs.h.  */
25901 $ac_includes_default
25902 static long int longval () { return (long int) (sizeof (long)); }
25903 static unsigned long int ulongval () { return (long int) (sizeof (long)); }
25904 #include <stdio.h>
25905 #include <stdlib.h>
25906 int
25907 main ()
25908 {
25909
25910   FILE *f = fopen ("conftest.val", "w");
25911   if (! f)
25912     return 1;
25913   if (((long int) (sizeof (long))) < 0)
25914     {
25915       long int i = longval ();
25916       if (i != ((long int) (sizeof (long))))
25917         return 1;
25918       fprintf (f, "%ld", i);
25919     }
25920   else
25921     {
25922       unsigned long int i = ulongval ();
25923       if (i != ((long int) (sizeof (long))))
25924         return 1;
25925       fprintf (f, "%lu", i);
25926     }
25927   /* Do not output a trailing newline, as this causes \r\n confusion
25928      on some platforms.  */
25929   return ferror (f) || fclose (f) != 0;
25930
25931   ;
25932   return 0;
25933 }
25934 _ACEOF
25935 rm -f conftest$ac_exeext
25936 if { (ac_try="$ac_link"
25937 case "(($ac_try" in
25938   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25939   *) ac_try_echo=$ac_try;;
25940 esac
25941 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25942 $as_echo "$ac_try_echo") >&5
25943   (eval "$ac_link") 2>&5
25944   ac_status=$?
25945   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25946   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25947   { (case "(($ac_try" in
25948   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25949   *) ac_try_echo=$ac_try;;
25950 esac
25951 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25952 $as_echo "$ac_try_echo") >&5
25953   (eval "$ac_try") 2>&5
25954   ac_status=$?
25955   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25956   (exit $ac_status); }; }; then
25957   ac_cv_sizeof_long=`cat conftest.val`
25958 else
25959   $as_echo "$as_me: program exited with status $ac_status" >&5
25960 $as_echo "$as_me: failed program was:" >&5
25961 sed 's/^/| /' conftest.$ac_ext >&5
25962
25963 ( exit $ac_status )
25964 if test "$ac_cv_type_long" = yes; then
25965      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25966 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25967 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
25968 See \`config.log' for more details." >&5
25969 $as_echo "$as_me: error: cannot compute sizeof (long)
25970 See \`config.log' for more details." >&2;}
25971    { (exit 77); exit 77; }; }; }
25972    else
25973      ac_cv_sizeof_long=0
25974    fi
25975 fi
25976 rm -rf conftest.dSYM
25977 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25978 fi
25979 rm -f conftest.val
25980 fi
25981 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
25982 $as_echo "$ac_cv_sizeof_long" >&6; }
25983
25984
25985
25986 cat >>confdefs.h <<_ACEOF
25987 #define SIZEOF_LONG $ac_cv_sizeof_long
25988 _ACEOF
25989
25990
25991
25992 # Decide whether float4 is passed by value: user-selectable, enabled by default
25993 { $as_echo "$as_me:$LINENO: checking whether to build with float4 passed by value" >&5
25994 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
25995
25996
25997 # Check whether --enable-float4-byval was given.
25998 if test "${enable_float4_byval+set}" = set; then
25999   enableval=$enable_float4_byval;
26000   case $enableval in
26001     yes)
26002
26003 cat >>confdefs.h <<\_ACEOF
26004 #define USE_FLOAT4_BYVAL 1
26005 _ACEOF
26006
26007                float4passbyval=true
26008       ;;
26009     no)
26010       float4passbyval=false
26011       ;;
26012     *)
26013       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-float4-byval option" >&5
26014 $as_echo "$as_me: error: no argument expected for --enable-float4-byval option" >&2;}
26015    { (exit 1); exit 1; }; }
26016       ;;
26017   esac
26018
26019 else
26020   enable_float4_byval=yes
26021
26022 cat >>confdefs.h <<\_ACEOF
26023 #define USE_FLOAT4_BYVAL 1
26024 _ACEOF
26025
26026                float4passbyval=true
26027 fi
26028
26029
26030 { $as_echo "$as_me:$LINENO: result: $enable_float4_byval" >&5
26031 $as_echo "$enable_float4_byval" >&6; }
26032
26033 cat >>confdefs.h <<_ACEOF
26034 #define FLOAT4PASSBYVAL $float4passbyval
26035 _ACEOF
26036
26037
26038 # Decide whether float8 is passed by value.
26039 # Note: this setting also controls int8 and related types such as timestamp.
26040 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
26041 # If not, trying to select it is an error.
26042 { $as_echo "$as_me:$LINENO: checking whether to build with float8 passed by value" >&5
26043 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
26044 if test $ac_cv_sizeof_void_p -ge 8 ; then
26045
26046
26047 # Check whether --enable-float8-byval was given.
26048 if test "${enable_float8_byval+set}" = set; then
26049   enableval=$enable_float8_byval;
26050   case $enableval in
26051     yes)
26052       :
26053       ;;
26054     no)
26055       :
26056       ;;
26057     *)
26058       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-float8-byval option" >&5
26059 $as_echo "$as_me: error: no argument expected for --enable-float8-byval option" >&2;}
26060    { (exit 1); exit 1; }; }
26061       ;;
26062   esac
26063
26064 else
26065   enable_float8_byval=yes
26066
26067 fi
26068
26069
26070 else
26071
26072
26073 # Check whether --enable-float8-byval was given.
26074 if test "${enable_float8_byval+set}" = set; then
26075   enableval=$enable_float8_byval;
26076   case $enableval in
26077     yes)
26078       :
26079       ;;
26080     no)
26081       :
26082       ;;
26083     *)
26084       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-float8-byval option" >&5
26085 $as_echo "$as_me: error: no argument expected for --enable-float8-byval option" >&2;}
26086    { (exit 1); exit 1; }; }
26087       ;;
26088   esac
26089
26090 else
26091   enable_float8_byval=no
26092
26093 fi
26094
26095
26096   if test "$enable_float8_byval" = yes ; then
26097     { { $as_echo "$as_me:$LINENO: error: --enable-float8-byval is not supported on 32-bit platforms." >&5
26098 $as_echo "$as_me: error: --enable-float8-byval is not supported on 32-bit platforms." >&2;}
26099    { (exit 1); exit 1; }; }
26100   fi
26101 fi
26102 if test "$enable_float8_byval" = yes ; then
26103
26104 cat >>confdefs.h <<\_ACEOF
26105 #define USE_FLOAT8_BYVAL 1
26106 _ACEOF
26107
26108   float8passbyval=true
26109 else
26110   float8passbyval=false
26111 fi
26112 { $as_echo "$as_me:$LINENO: result: $enable_float8_byval" >&5
26113 $as_echo "$enable_float8_byval" >&6; }
26114
26115 cat >>confdefs.h <<_ACEOF
26116 #define FLOAT8PASSBYVAL $float8passbyval
26117 _ACEOF
26118
26119
26120 # Determine memory alignment requirements for the basic C data types.
26121
26122 # The cast to long int works around a bug in the HP C Compiler,
26123 # see AC_CHECK_SIZEOF for more information.
26124 { $as_echo "$as_me:$LINENO: checking alignment of short" >&5
26125 $as_echo_n "checking alignment of short... " >&6; }
26126 if test "${ac_cv_alignof_short+set}" = set; then
26127   $as_echo_n "(cached) " >&6
26128 else
26129   if test "$cross_compiling" = yes; then
26130   # Depending upon the size, compute the lo and hi bounds.
26131 cat >conftest.$ac_ext <<_ACEOF
26132 /* confdefs.h.  */
26133 _ACEOF
26134 cat confdefs.h >>conftest.$ac_ext
26135 cat >>conftest.$ac_ext <<_ACEOF
26136 /* end confdefs.h.  */
26137 $ac_includes_default
26138 #ifndef offsetof
26139 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26140 #endif
26141 typedef struct { char x; short y; } ac__type_alignof_;
26142 int
26143 main ()
26144 {
26145 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
26146 test_array [0] = 0
26147
26148   ;
26149   return 0;
26150 }
26151 _ACEOF
26152 rm -f conftest.$ac_objext
26153 if { (ac_try="$ac_compile"
26154 case "(($ac_try" in
26155   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26156   *) ac_try_echo=$ac_try;;
26157 esac
26158 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26159 $as_echo "$ac_try_echo") >&5
26160   (eval "$ac_compile") 2>conftest.er1
26161   ac_status=$?
26162   grep -v '^ *+' conftest.er1 >conftest.err
26163   rm -f conftest.er1
26164   cat conftest.err >&5
26165   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26166   (exit $ac_status); } && {
26167          test -z "$ac_c_werror_flag" ||
26168          test ! -s conftest.err
26169        } && test -s conftest.$ac_objext; then
26170   ac_lo=0 ac_mid=0
26171   while :; do
26172     cat >conftest.$ac_ext <<_ACEOF
26173 /* confdefs.h.  */
26174 _ACEOF
26175 cat confdefs.h >>conftest.$ac_ext
26176 cat >>conftest.$ac_ext <<_ACEOF
26177 /* end confdefs.h.  */
26178 $ac_includes_default
26179 #ifndef offsetof
26180 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26181 #endif
26182 typedef struct { char x; short y; } ac__type_alignof_;
26183 int
26184 main ()
26185 {
26186 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
26187 test_array [0] = 0
26188
26189   ;
26190   return 0;
26191 }
26192 _ACEOF
26193 rm -f conftest.$ac_objext
26194 if { (ac_try="$ac_compile"
26195 case "(($ac_try" in
26196   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26197   *) ac_try_echo=$ac_try;;
26198 esac
26199 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26200 $as_echo "$ac_try_echo") >&5
26201   (eval "$ac_compile") 2>conftest.er1
26202   ac_status=$?
26203   grep -v '^ *+' conftest.er1 >conftest.err
26204   rm -f conftest.er1
26205   cat conftest.err >&5
26206   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26207   (exit $ac_status); } && {
26208          test -z "$ac_c_werror_flag" ||
26209          test ! -s conftest.err
26210        } && test -s conftest.$ac_objext; then
26211   ac_hi=$ac_mid; break
26212 else
26213   $as_echo "$as_me: failed program was:" >&5
26214 sed 's/^/| /' conftest.$ac_ext >&5
26215
26216         ac_lo=`expr $ac_mid + 1`
26217                         if test $ac_lo -le $ac_mid; then
26218                           ac_lo= ac_hi=
26219                           break
26220                         fi
26221                         ac_mid=`expr 2 '*' $ac_mid + 1`
26222 fi
26223
26224 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26225   done
26226 else
26227   $as_echo "$as_me: failed program was:" >&5
26228 sed 's/^/| /' conftest.$ac_ext >&5
26229
26230         cat >conftest.$ac_ext <<_ACEOF
26231 /* confdefs.h.  */
26232 _ACEOF
26233 cat confdefs.h >>conftest.$ac_ext
26234 cat >>conftest.$ac_ext <<_ACEOF
26235 /* end confdefs.h.  */
26236 $ac_includes_default
26237 #ifndef offsetof
26238 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26239 #endif
26240 typedef struct { char x; short y; } ac__type_alignof_;
26241 int
26242 main ()
26243 {
26244 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
26245 test_array [0] = 0
26246
26247   ;
26248   return 0;
26249 }
26250 _ACEOF
26251 rm -f conftest.$ac_objext
26252 if { (ac_try="$ac_compile"
26253 case "(($ac_try" in
26254   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26255   *) ac_try_echo=$ac_try;;
26256 esac
26257 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26258 $as_echo "$ac_try_echo") >&5
26259   (eval "$ac_compile") 2>conftest.er1
26260   ac_status=$?
26261   grep -v '^ *+' conftest.er1 >conftest.err
26262   rm -f conftest.er1
26263   cat conftest.err >&5
26264   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26265   (exit $ac_status); } && {
26266          test -z "$ac_c_werror_flag" ||
26267          test ! -s conftest.err
26268        } && test -s conftest.$ac_objext; then
26269   ac_hi=-1 ac_mid=-1
26270   while :; do
26271     cat >conftest.$ac_ext <<_ACEOF
26272 /* confdefs.h.  */
26273 _ACEOF
26274 cat confdefs.h >>conftest.$ac_ext
26275 cat >>conftest.$ac_ext <<_ACEOF
26276 /* end confdefs.h.  */
26277 $ac_includes_default
26278 #ifndef offsetof
26279 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26280 #endif
26281 typedef struct { char x; short y; } ac__type_alignof_;
26282 int
26283 main ()
26284 {
26285 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
26286 test_array [0] = 0
26287
26288   ;
26289   return 0;
26290 }
26291 _ACEOF
26292 rm -f conftest.$ac_objext
26293 if { (ac_try="$ac_compile"
26294 case "(($ac_try" in
26295   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26296   *) ac_try_echo=$ac_try;;
26297 esac
26298 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26299 $as_echo "$ac_try_echo") >&5
26300   (eval "$ac_compile") 2>conftest.er1
26301   ac_status=$?
26302   grep -v '^ *+' conftest.er1 >conftest.err
26303   rm -f conftest.er1
26304   cat conftest.err >&5
26305   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26306   (exit $ac_status); } && {
26307          test -z "$ac_c_werror_flag" ||
26308          test ! -s conftest.err
26309        } && test -s conftest.$ac_objext; then
26310   ac_lo=$ac_mid; break
26311 else
26312   $as_echo "$as_me: failed program was:" >&5
26313 sed 's/^/| /' conftest.$ac_ext >&5
26314
26315         ac_hi=`expr '(' $ac_mid ')' - 1`
26316                         if test $ac_mid -le $ac_hi; then
26317                           ac_lo= ac_hi=
26318                           break
26319                         fi
26320                         ac_mid=`expr 2 '*' $ac_mid`
26321 fi
26322
26323 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26324   done
26325 else
26326   $as_echo "$as_me: failed program was:" >&5
26327 sed 's/^/| /' conftest.$ac_ext >&5
26328
26329         ac_lo= ac_hi=
26330 fi
26331
26332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26333 fi
26334
26335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26336 # Binary search between lo and hi bounds.
26337 while test "x$ac_lo" != "x$ac_hi"; do
26338   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
26339   cat >conftest.$ac_ext <<_ACEOF
26340 /* confdefs.h.  */
26341 _ACEOF
26342 cat confdefs.h >>conftest.$ac_ext
26343 cat >>conftest.$ac_ext <<_ACEOF
26344 /* end confdefs.h.  */
26345 $ac_includes_default
26346 #ifndef offsetof
26347 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26348 #endif
26349 typedef struct { char x; short y; } ac__type_alignof_;
26350 int
26351 main ()
26352 {
26353 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
26354 test_array [0] = 0
26355
26356   ;
26357   return 0;
26358 }
26359 _ACEOF
26360 rm -f conftest.$ac_objext
26361 if { (ac_try="$ac_compile"
26362 case "(($ac_try" in
26363   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26364   *) ac_try_echo=$ac_try;;
26365 esac
26366 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26367 $as_echo "$ac_try_echo") >&5
26368   (eval "$ac_compile") 2>conftest.er1
26369   ac_status=$?
26370   grep -v '^ *+' conftest.er1 >conftest.err
26371   rm -f conftest.er1
26372   cat conftest.err >&5
26373   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26374   (exit $ac_status); } && {
26375          test -z "$ac_c_werror_flag" ||
26376          test ! -s conftest.err
26377        } && test -s conftest.$ac_objext; then
26378   ac_hi=$ac_mid
26379 else
26380   $as_echo "$as_me: failed program was:" >&5
26381 sed 's/^/| /' conftest.$ac_ext >&5
26382
26383         ac_lo=`expr '(' $ac_mid ')' + 1`
26384 fi
26385
26386 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26387 done
26388 case $ac_lo in
26389 ?*) ac_cv_alignof_short=$ac_lo;;
26390 '') if test "$ac_cv_type_short" = yes; then
26391      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
26392 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26393 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of short
26394 See \`config.log' for more details." >&5
26395 $as_echo "$as_me: error: cannot compute alignment of short
26396 See \`config.log' for more details." >&2;}
26397    { (exit 77); exit 77; }; }; }
26398    else
26399      ac_cv_alignof_short=0
26400    fi ;;
26401 esac
26402 else
26403   cat >conftest.$ac_ext <<_ACEOF
26404 /* confdefs.h.  */
26405 _ACEOF
26406 cat confdefs.h >>conftest.$ac_ext
26407 cat >>conftest.$ac_ext <<_ACEOF
26408 /* end confdefs.h.  */
26409 $ac_includes_default
26410 #ifndef offsetof
26411 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26412 #endif
26413 typedef struct { char x; short y; } ac__type_alignof_;
26414 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
26415 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
26416 #include <stdio.h>
26417 #include <stdlib.h>
26418 int
26419 main ()
26420 {
26421
26422   FILE *f = fopen ("conftest.val", "w");
26423   if (! f)
26424     return 1;
26425   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
26426     {
26427       long int i = longval ();
26428       if (i != ((long int) offsetof (ac__type_alignof_, y)))
26429         return 1;
26430       fprintf (f, "%ld", i);
26431     }
26432   else
26433     {
26434       unsigned long int i = ulongval ();
26435       if (i != ((long int) offsetof (ac__type_alignof_, y)))
26436         return 1;
26437       fprintf (f, "%lu", i);
26438     }
26439   /* Do not output a trailing newline, as this causes \r\n confusion
26440      on some platforms.  */
26441   return ferror (f) || fclose (f) != 0;
26442
26443   ;
26444   return 0;
26445 }
26446 _ACEOF
26447 rm -f conftest$ac_exeext
26448 if { (ac_try="$ac_link"
26449 case "(($ac_try" in
26450   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26451   *) ac_try_echo=$ac_try;;
26452 esac
26453 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26454 $as_echo "$ac_try_echo") >&5
26455   (eval "$ac_link") 2>&5
26456   ac_status=$?
26457   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26458   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26459   { (case "(($ac_try" in
26460   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26461   *) ac_try_echo=$ac_try;;
26462 esac
26463 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26464 $as_echo "$ac_try_echo") >&5
26465   (eval "$ac_try") 2>&5
26466   ac_status=$?
26467   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26468   (exit $ac_status); }; }; then
26469   ac_cv_alignof_short=`cat conftest.val`
26470 else
26471   $as_echo "$as_me: program exited with status $ac_status" >&5
26472 $as_echo "$as_me: failed program was:" >&5
26473 sed 's/^/| /' conftest.$ac_ext >&5
26474
26475 ( exit $ac_status )
26476 if test "$ac_cv_type_short" = yes; then
26477      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
26478 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26479 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of short
26480 See \`config.log' for more details." >&5
26481 $as_echo "$as_me: error: cannot compute alignment of short
26482 See \`config.log' for more details." >&2;}
26483    { (exit 77); exit 77; }; }; }
26484    else
26485      ac_cv_alignof_short=0
26486    fi
26487 fi
26488 rm -rf conftest.dSYM
26489 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26490 fi
26491 rm -f conftest.val
26492 fi
26493 { $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_short" >&5
26494 $as_echo "$ac_cv_alignof_short" >&6; }
26495
26496
26497
26498 cat >>confdefs.h <<_ACEOF
26499 #define ALIGNOF_SHORT $ac_cv_alignof_short
26500 _ACEOF
26501
26502
26503 # The cast to long int works around a bug in the HP C Compiler,
26504 # see AC_CHECK_SIZEOF for more information.
26505 { $as_echo "$as_me:$LINENO: checking alignment of int" >&5
26506 $as_echo_n "checking alignment of int... " >&6; }
26507 if test "${ac_cv_alignof_int+set}" = set; then
26508   $as_echo_n "(cached) " >&6
26509 else
26510   if test "$cross_compiling" = yes; then
26511   # Depending upon the size, compute the lo and hi bounds.
26512 cat >conftest.$ac_ext <<_ACEOF
26513 /* confdefs.h.  */
26514 _ACEOF
26515 cat confdefs.h >>conftest.$ac_ext
26516 cat >>conftest.$ac_ext <<_ACEOF
26517 /* end confdefs.h.  */
26518 $ac_includes_default
26519 #ifndef offsetof
26520 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26521 #endif
26522 typedef struct { char x; int y; } ac__type_alignof_;
26523 int
26524 main ()
26525 {
26526 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
26527 test_array [0] = 0
26528
26529   ;
26530   return 0;
26531 }
26532 _ACEOF
26533 rm -f conftest.$ac_objext
26534 if { (ac_try="$ac_compile"
26535 case "(($ac_try" in
26536   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26537   *) ac_try_echo=$ac_try;;
26538 esac
26539 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26540 $as_echo "$ac_try_echo") >&5
26541   (eval "$ac_compile") 2>conftest.er1
26542   ac_status=$?
26543   grep -v '^ *+' conftest.er1 >conftest.err
26544   rm -f conftest.er1
26545   cat conftest.err >&5
26546   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26547   (exit $ac_status); } && {
26548          test -z "$ac_c_werror_flag" ||
26549          test ! -s conftest.err
26550        } && test -s conftest.$ac_objext; then
26551   ac_lo=0 ac_mid=0
26552   while :; do
26553     cat >conftest.$ac_ext <<_ACEOF
26554 /* confdefs.h.  */
26555 _ACEOF
26556 cat confdefs.h >>conftest.$ac_ext
26557 cat >>conftest.$ac_ext <<_ACEOF
26558 /* end confdefs.h.  */
26559 $ac_includes_default
26560 #ifndef offsetof
26561 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26562 #endif
26563 typedef struct { char x; int y; } ac__type_alignof_;
26564 int
26565 main ()
26566 {
26567 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
26568 test_array [0] = 0
26569
26570   ;
26571   return 0;
26572 }
26573 _ACEOF
26574 rm -f conftest.$ac_objext
26575 if { (ac_try="$ac_compile"
26576 case "(($ac_try" in
26577   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26578   *) ac_try_echo=$ac_try;;
26579 esac
26580 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26581 $as_echo "$ac_try_echo") >&5
26582   (eval "$ac_compile") 2>conftest.er1
26583   ac_status=$?
26584   grep -v '^ *+' conftest.er1 >conftest.err
26585   rm -f conftest.er1
26586   cat conftest.err >&5
26587   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26588   (exit $ac_status); } && {
26589          test -z "$ac_c_werror_flag" ||
26590          test ! -s conftest.err
26591        } && test -s conftest.$ac_objext; then
26592   ac_hi=$ac_mid; break
26593 else
26594   $as_echo "$as_me: failed program was:" >&5
26595 sed 's/^/| /' conftest.$ac_ext >&5
26596
26597         ac_lo=`expr $ac_mid + 1`
26598                         if test $ac_lo -le $ac_mid; then
26599                           ac_lo= ac_hi=
26600                           break
26601                         fi
26602                         ac_mid=`expr 2 '*' $ac_mid + 1`
26603 fi
26604
26605 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26606   done
26607 else
26608   $as_echo "$as_me: failed program was:" >&5
26609 sed 's/^/| /' conftest.$ac_ext >&5
26610
26611         cat >conftest.$ac_ext <<_ACEOF
26612 /* confdefs.h.  */
26613 _ACEOF
26614 cat confdefs.h >>conftest.$ac_ext
26615 cat >>conftest.$ac_ext <<_ACEOF
26616 /* end confdefs.h.  */
26617 $ac_includes_default
26618 #ifndef offsetof
26619 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26620 #endif
26621 typedef struct { char x; int y; } ac__type_alignof_;
26622 int
26623 main ()
26624 {
26625 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
26626 test_array [0] = 0
26627
26628   ;
26629   return 0;
26630 }
26631 _ACEOF
26632 rm -f conftest.$ac_objext
26633 if { (ac_try="$ac_compile"
26634 case "(($ac_try" in
26635   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26636   *) ac_try_echo=$ac_try;;
26637 esac
26638 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26639 $as_echo "$ac_try_echo") >&5
26640   (eval "$ac_compile") 2>conftest.er1
26641   ac_status=$?
26642   grep -v '^ *+' conftest.er1 >conftest.err
26643   rm -f conftest.er1
26644   cat conftest.err >&5
26645   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26646   (exit $ac_status); } && {
26647          test -z "$ac_c_werror_flag" ||
26648          test ! -s conftest.err
26649        } && test -s conftest.$ac_objext; then
26650   ac_hi=-1 ac_mid=-1
26651   while :; do
26652     cat >conftest.$ac_ext <<_ACEOF
26653 /* confdefs.h.  */
26654 _ACEOF
26655 cat confdefs.h >>conftest.$ac_ext
26656 cat >>conftest.$ac_ext <<_ACEOF
26657 /* end confdefs.h.  */
26658 $ac_includes_default
26659 #ifndef offsetof
26660 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26661 #endif
26662 typedef struct { char x; int y; } ac__type_alignof_;
26663 int
26664 main ()
26665 {
26666 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
26667 test_array [0] = 0
26668
26669   ;
26670   return 0;
26671 }
26672 _ACEOF
26673 rm -f conftest.$ac_objext
26674 if { (ac_try="$ac_compile"
26675 case "(($ac_try" in
26676   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26677   *) ac_try_echo=$ac_try;;
26678 esac
26679 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26680 $as_echo "$ac_try_echo") >&5
26681   (eval "$ac_compile") 2>conftest.er1
26682   ac_status=$?
26683   grep -v '^ *+' conftest.er1 >conftest.err
26684   rm -f conftest.er1
26685   cat conftest.err >&5
26686   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26687   (exit $ac_status); } && {
26688          test -z "$ac_c_werror_flag" ||
26689          test ! -s conftest.err
26690        } && test -s conftest.$ac_objext; then
26691   ac_lo=$ac_mid; break
26692 else
26693   $as_echo "$as_me: failed program was:" >&5
26694 sed 's/^/| /' conftest.$ac_ext >&5
26695
26696         ac_hi=`expr '(' $ac_mid ')' - 1`
26697                         if test $ac_mid -le $ac_hi; then
26698                           ac_lo= ac_hi=
26699                           break
26700                         fi
26701                         ac_mid=`expr 2 '*' $ac_mid`
26702 fi
26703
26704 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26705   done
26706 else
26707   $as_echo "$as_me: failed program was:" >&5
26708 sed 's/^/| /' conftest.$ac_ext >&5
26709
26710         ac_lo= ac_hi=
26711 fi
26712
26713 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26714 fi
26715
26716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26717 # Binary search between lo and hi bounds.
26718 while test "x$ac_lo" != "x$ac_hi"; do
26719   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
26720   cat >conftest.$ac_ext <<_ACEOF
26721 /* confdefs.h.  */
26722 _ACEOF
26723 cat confdefs.h >>conftest.$ac_ext
26724 cat >>conftest.$ac_ext <<_ACEOF
26725 /* end confdefs.h.  */
26726 $ac_includes_default
26727 #ifndef offsetof
26728 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26729 #endif
26730 typedef struct { char x; int y; } ac__type_alignof_;
26731 int
26732 main ()
26733 {
26734 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
26735 test_array [0] = 0
26736
26737   ;
26738   return 0;
26739 }
26740 _ACEOF
26741 rm -f conftest.$ac_objext
26742 if { (ac_try="$ac_compile"
26743 case "(($ac_try" in
26744   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26745   *) ac_try_echo=$ac_try;;
26746 esac
26747 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26748 $as_echo "$ac_try_echo") >&5
26749   (eval "$ac_compile") 2>conftest.er1
26750   ac_status=$?
26751   grep -v '^ *+' conftest.er1 >conftest.err
26752   rm -f conftest.er1
26753   cat conftest.err >&5
26754   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26755   (exit $ac_status); } && {
26756          test -z "$ac_c_werror_flag" ||
26757          test ! -s conftest.err
26758        } && test -s conftest.$ac_objext; then
26759   ac_hi=$ac_mid
26760 else
26761   $as_echo "$as_me: failed program was:" >&5
26762 sed 's/^/| /' conftest.$ac_ext >&5
26763
26764         ac_lo=`expr '(' $ac_mid ')' + 1`
26765 fi
26766
26767 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26768 done
26769 case $ac_lo in
26770 ?*) ac_cv_alignof_int=$ac_lo;;
26771 '') if test "$ac_cv_type_int" = yes; then
26772      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
26773 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26774 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of int
26775 See \`config.log' for more details." >&5
26776 $as_echo "$as_me: error: cannot compute alignment of int
26777 See \`config.log' for more details." >&2;}
26778    { (exit 77); exit 77; }; }; }
26779    else
26780      ac_cv_alignof_int=0
26781    fi ;;
26782 esac
26783 else
26784   cat >conftest.$ac_ext <<_ACEOF
26785 /* confdefs.h.  */
26786 _ACEOF
26787 cat confdefs.h >>conftest.$ac_ext
26788 cat >>conftest.$ac_ext <<_ACEOF
26789 /* end confdefs.h.  */
26790 $ac_includes_default
26791 #ifndef offsetof
26792 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26793 #endif
26794 typedef struct { char x; int y; } ac__type_alignof_;
26795 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
26796 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
26797 #include <stdio.h>
26798 #include <stdlib.h>
26799 int
26800 main ()
26801 {
26802
26803   FILE *f = fopen ("conftest.val", "w");
26804   if (! f)
26805     return 1;
26806   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
26807     {
26808       long int i = longval ();
26809       if (i != ((long int) offsetof (ac__type_alignof_, y)))
26810         return 1;
26811       fprintf (f, "%ld", i);
26812     }
26813   else
26814     {
26815       unsigned long int i = ulongval ();
26816       if (i != ((long int) offsetof (ac__type_alignof_, y)))
26817         return 1;
26818       fprintf (f, "%lu", i);
26819     }
26820   /* Do not output a trailing newline, as this causes \r\n confusion
26821      on some platforms.  */
26822   return ferror (f) || fclose (f) != 0;
26823
26824   ;
26825   return 0;
26826 }
26827 _ACEOF
26828 rm -f conftest$ac_exeext
26829 if { (ac_try="$ac_link"
26830 case "(($ac_try" in
26831   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26832   *) ac_try_echo=$ac_try;;
26833 esac
26834 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26835 $as_echo "$ac_try_echo") >&5
26836   (eval "$ac_link") 2>&5
26837   ac_status=$?
26838   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26839   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26840   { (case "(($ac_try" in
26841   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26842   *) ac_try_echo=$ac_try;;
26843 esac
26844 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26845 $as_echo "$ac_try_echo") >&5
26846   (eval "$ac_try") 2>&5
26847   ac_status=$?
26848   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26849   (exit $ac_status); }; }; then
26850   ac_cv_alignof_int=`cat conftest.val`
26851 else
26852   $as_echo "$as_me: program exited with status $ac_status" >&5
26853 $as_echo "$as_me: failed program was:" >&5
26854 sed 's/^/| /' conftest.$ac_ext >&5
26855
26856 ( exit $ac_status )
26857 if test "$ac_cv_type_int" = yes; then
26858      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
26859 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26860 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of int
26861 See \`config.log' for more details." >&5
26862 $as_echo "$as_me: error: cannot compute alignment of int
26863 See \`config.log' for more details." >&2;}
26864    { (exit 77); exit 77; }; }; }
26865    else
26866      ac_cv_alignof_int=0
26867    fi
26868 fi
26869 rm -rf conftest.dSYM
26870 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26871 fi
26872 rm -f conftest.val
26873 fi
26874 { $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_int" >&5
26875 $as_echo "$ac_cv_alignof_int" >&6; }
26876
26877
26878
26879 cat >>confdefs.h <<_ACEOF
26880 #define ALIGNOF_INT $ac_cv_alignof_int
26881 _ACEOF
26882
26883
26884 # The cast to long int works around a bug in the HP C Compiler,
26885 # see AC_CHECK_SIZEOF for more information.
26886 { $as_echo "$as_me:$LINENO: checking alignment of long" >&5
26887 $as_echo_n "checking alignment of long... " >&6; }
26888 if test "${ac_cv_alignof_long+set}" = set; then
26889   $as_echo_n "(cached) " >&6
26890 else
26891   if test "$cross_compiling" = yes; then
26892   # Depending upon the size, compute the lo and hi bounds.
26893 cat >conftest.$ac_ext <<_ACEOF
26894 /* confdefs.h.  */
26895 _ACEOF
26896 cat confdefs.h >>conftest.$ac_ext
26897 cat >>conftest.$ac_ext <<_ACEOF
26898 /* end confdefs.h.  */
26899 $ac_includes_default
26900 #ifndef offsetof
26901 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26902 #endif
26903 typedef struct { char x; long y; } ac__type_alignof_;
26904 int
26905 main ()
26906 {
26907 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
26908 test_array [0] = 0
26909
26910   ;
26911   return 0;
26912 }
26913 _ACEOF
26914 rm -f conftest.$ac_objext
26915 if { (ac_try="$ac_compile"
26916 case "(($ac_try" in
26917   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26918   *) ac_try_echo=$ac_try;;
26919 esac
26920 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26921 $as_echo "$ac_try_echo") >&5
26922   (eval "$ac_compile") 2>conftest.er1
26923   ac_status=$?
26924   grep -v '^ *+' conftest.er1 >conftest.err
26925   rm -f conftest.er1
26926   cat conftest.err >&5
26927   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26928   (exit $ac_status); } && {
26929          test -z "$ac_c_werror_flag" ||
26930          test ! -s conftest.err
26931        } && test -s conftest.$ac_objext; then
26932   ac_lo=0 ac_mid=0
26933   while :; do
26934     cat >conftest.$ac_ext <<_ACEOF
26935 /* confdefs.h.  */
26936 _ACEOF
26937 cat confdefs.h >>conftest.$ac_ext
26938 cat >>conftest.$ac_ext <<_ACEOF
26939 /* end confdefs.h.  */
26940 $ac_includes_default
26941 #ifndef offsetof
26942 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26943 #endif
26944 typedef struct { char x; long y; } ac__type_alignof_;
26945 int
26946 main ()
26947 {
26948 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
26949 test_array [0] = 0
26950
26951   ;
26952   return 0;
26953 }
26954 _ACEOF
26955 rm -f conftest.$ac_objext
26956 if { (ac_try="$ac_compile"
26957 case "(($ac_try" in
26958   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26959   *) ac_try_echo=$ac_try;;
26960 esac
26961 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26962 $as_echo "$ac_try_echo") >&5
26963   (eval "$ac_compile") 2>conftest.er1
26964   ac_status=$?
26965   grep -v '^ *+' conftest.er1 >conftest.err
26966   rm -f conftest.er1
26967   cat conftest.err >&5
26968   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26969   (exit $ac_status); } && {
26970          test -z "$ac_c_werror_flag" ||
26971          test ! -s conftest.err
26972        } && test -s conftest.$ac_objext; then
26973   ac_hi=$ac_mid; break
26974 else
26975   $as_echo "$as_me: failed program was:" >&5
26976 sed 's/^/| /' conftest.$ac_ext >&5
26977
26978         ac_lo=`expr $ac_mid + 1`
26979                         if test $ac_lo -le $ac_mid; then
26980                           ac_lo= ac_hi=
26981                           break
26982                         fi
26983                         ac_mid=`expr 2 '*' $ac_mid + 1`
26984 fi
26985
26986 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26987   done
26988 else
26989   $as_echo "$as_me: failed program was:" >&5
26990 sed 's/^/| /' conftest.$ac_ext >&5
26991
26992         cat >conftest.$ac_ext <<_ACEOF
26993 /* confdefs.h.  */
26994 _ACEOF
26995 cat confdefs.h >>conftest.$ac_ext
26996 cat >>conftest.$ac_ext <<_ACEOF
26997 /* end confdefs.h.  */
26998 $ac_includes_default
26999 #ifndef offsetof
27000 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27001 #endif
27002 typedef struct { char x; long y; } ac__type_alignof_;
27003 int
27004 main ()
27005 {
27006 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
27007 test_array [0] = 0
27008
27009   ;
27010   return 0;
27011 }
27012 _ACEOF
27013 rm -f conftest.$ac_objext
27014 if { (ac_try="$ac_compile"
27015 case "(($ac_try" in
27016   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27017   *) ac_try_echo=$ac_try;;
27018 esac
27019 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27020 $as_echo "$ac_try_echo") >&5
27021   (eval "$ac_compile") 2>conftest.er1
27022   ac_status=$?
27023   grep -v '^ *+' conftest.er1 >conftest.err
27024   rm -f conftest.er1
27025   cat conftest.err >&5
27026   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27027   (exit $ac_status); } && {
27028          test -z "$ac_c_werror_flag" ||
27029          test ! -s conftest.err
27030        } && test -s conftest.$ac_objext; then
27031   ac_hi=-1 ac_mid=-1
27032   while :; do
27033     cat >conftest.$ac_ext <<_ACEOF
27034 /* confdefs.h.  */
27035 _ACEOF
27036 cat confdefs.h >>conftest.$ac_ext
27037 cat >>conftest.$ac_ext <<_ACEOF
27038 /* end confdefs.h.  */
27039 $ac_includes_default
27040 #ifndef offsetof
27041 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27042 #endif
27043 typedef struct { char x; long y; } ac__type_alignof_;
27044 int
27045 main ()
27046 {
27047 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
27048 test_array [0] = 0
27049
27050   ;
27051   return 0;
27052 }
27053 _ACEOF
27054 rm -f conftest.$ac_objext
27055 if { (ac_try="$ac_compile"
27056 case "(($ac_try" in
27057   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27058   *) ac_try_echo=$ac_try;;
27059 esac
27060 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27061 $as_echo "$ac_try_echo") >&5
27062   (eval "$ac_compile") 2>conftest.er1
27063   ac_status=$?
27064   grep -v '^ *+' conftest.er1 >conftest.err
27065   rm -f conftest.er1
27066   cat conftest.err >&5
27067   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27068   (exit $ac_status); } && {
27069          test -z "$ac_c_werror_flag" ||
27070          test ! -s conftest.err
27071        } && test -s conftest.$ac_objext; then
27072   ac_lo=$ac_mid; break
27073 else
27074   $as_echo "$as_me: failed program was:" >&5
27075 sed 's/^/| /' conftest.$ac_ext >&5
27076
27077         ac_hi=`expr '(' $ac_mid ')' - 1`
27078                         if test $ac_mid -le $ac_hi; then
27079                           ac_lo= ac_hi=
27080                           break
27081                         fi
27082                         ac_mid=`expr 2 '*' $ac_mid`
27083 fi
27084
27085 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27086   done
27087 else
27088   $as_echo "$as_me: failed program was:" >&5
27089 sed 's/^/| /' conftest.$ac_ext >&5
27090
27091         ac_lo= ac_hi=
27092 fi
27093
27094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27095 fi
27096
27097 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27098 # Binary search between lo and hi bounds.
27099 while test "x$ac_lo" != "x$ac_hi"; do
27100   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
27101   cat >conftest.$ac_ext <<_ACEOF
27102 /* confdefs.h.  */
27103 _ACEOF
27104 cat confdefs.h >>conftest.$ac_ext
27105 cat >>conftest.$ac_ext <<_ACEOF
27106 /* end confdefs.h.  */
27107 $ac_includes_default
27108 #ifndef offsetof
27109 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27110 #endif
27111 typedef struct { char x; long y; } ac__type_alignof_;
27112 int
27113 main ()
27114 {
27115 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
27116 test_array [0] = 0
27117
27118   ;
27119   return 0;
27120 }
27121 _ACEOF
27122 rm -f conftest.$ac_objext
27123 if { (ac_try="$ac_compile"
27124 case "(($ac_try" in
27125   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27126   *) ac_try_echo=$ac_try;;
27127 esac
27128 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27129 $as_echo "$ac_try_echo") >&5
27130   (eval "$ac_compile") 2>conftest.er1
27131   ac_status=$?
27132   grep -v '^ *+' conftest.er1 >conftest.err
27133   rm -f conftest.er1
27134   cat conftest.err >&5
27135   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27136   (exit $ac_status); } && {
27137          test -z "$ac_c_werror_flag" ||
27138          test ! -s conftest.err
27139        } && test -s conftest.$ac_objext; then
27140   ac_hi=$ac_mid
27141 else
27142   $as_echo "$as_me: failed program was:" >&5
27143 sed 's/^/| /' conftest.$ac_ext >&5
27144
27145         ac_lo=`expr '(' $ac_mid ')' + 1`
27146 fi
27147
27148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27149 done
27150 case $ac_lo in
27151 ?*) ac_cv_alignof_long=$ac_lo;;
27152 '') if test "$ac_cv_type_long" = yes; then
27153      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
27154 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27155 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long
27156 See \`config.log' for more details." >&5
27157 $as_echo "$as_me: error: cannot compute alignment of long
27158 See \`config.log' for more details." >&2;}
27159    { (exit 77); exit 77; }; }; }
27160    else
27161      ac_cv_alignof_long=0
27162    fi ;;
27163 esac
27164 else
27165   cat >conftest.$ac_ext <<_ACEOF
27166 /* confdefs.h.  */
27167 _ACEOF
27168 cat confdefs.h >>conftest.$ac_ext
27169 cat >>conftest.$ac_ext <<_ACEOF
27170 /* end confdefs.h.  */
27171 $ac_includes_default
27172 #ifndef offsetof
27173 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27174 #endif
27175 typedef struct { char x; long y; } ac__type_alignof_;
27176 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
27177 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
27178 #include <stdio.h>
27179 #include <stdlib.h>
27180 int
27181 main ()
27182 {
27183
27184   FILE *f = fopen ("conftest.val", "w");
27185   if (! f)
27186     return 1;
27187   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
27188     {
27189       long int i = longval ();
27190       if (i != ((long int) offsetof (ac__type_alignof_, y)))
27191         return 1;
27192       fprintf (f, "%ld", i);
27193     }
27194   else
27195     {
27196       unsigned long int i = ulongval ();
27197       if (i != ((long int) offsetof (ac__type_alignof_, y)))
27198         return 1;
27199       fprintf (f, "%lu", i);
27200     }
27201   /* Do not output a trailing newline, as this causes \r\n confusion
27202      on some platforms.  */
27203   return ferror (f) || fclose (f) != 0;
27204
27205   ;
27206   return 0;
27207 }
27208 _ACEOF
27209 rm -f conftest$ac_exeext
27210 if { (ac_try="$ac_link"
27211 case "(($ac_try" in
27212   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27213   *) ac_try_echo=$ac_try;;
27214 esac
27215 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27216 $as_echo "$ac_try_echo") >&5
27217   (eval "$ac_link") 2>&5
27218   ac_status=$?
27219   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27220   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27221   { (case "(($ac_try" in
27222   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27223   *) ac_try_echo=$ac_try;;
27224 esac
27225 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27226 $as_echo "$ac_try_echo") >&5
27227   (eval "$ac_try") 2>&5
27228   ac_status=$?
27229   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27230   (exit $ac_status); }; }; then
27231   ac_cv_alignof_long=`cat conftest.val`
27232 else
27233   $as_echo "$as_me: program exited with status $ac_status" >&5
27234 $as_echo "$as_me: failed program was:" >&5
27235 sed 's/^/| /' conftest.$ac_ext >&5
27236
27237 ( exit $ac_status )
27238 if test "$ac_cv_type_long" = yes; then
27239      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
27240 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27241 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long
27242 See \`config.log' for more details." >&5
27243 $as_echo "$as_me: error: cannot compute alignment of long
27244 See \`config.log' for more details." >&2;}
27245    { (exit 77); exit 77; }; }; }
27246    else
27247      ac_cv_alignof_long=0
27248    fi
27249 fi
27250 rm -rf conftest.dSYM
27251 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27252 fi
27253 rm -f conftest.val
27254 fi
27255 { $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_long" >&5
27256 $as_echo "$ac_cv_alignof_long" >&6; }
27257
27258
27259
27260 cat >>confdefs.h <<_ACEOF
27261 #define ALIGNOF_LONG $ac_cv_alignof_long
27262 _ACEOF
27263
27264
27265 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
27266   # The cast to long int works around a bug in the HP C Compiler,
27267 # see AC_CHECK_SIZEOF for more information.
27268 { $as_echo "$as_me:$LINENO: checking alignment of long long int" >&5
27269 $as_echo_n "checking alignment of long long int... " >&6; }
27270 if test "${ac_cv_alignof_long_long_int+set}" = set; then
27271   $as_echo_n "(cached) " >&6
27272 else
27273   if test "$cross_compiling" = yes; then
27274   # Depending upon the size, compute the lo and hi bounds.
27275 cat >conftest.$ac_ext <<_ACEOF
27276 /* confdefs.h.  */
27277 _ACEOF
27278 cat confdefs.h >>conftest.$ac_ext
27279 cat >>conftest.$ac_ext <<_ACEOF
27280 /* end confdefs.h.  */
27281 $ac_includes_default
27282 #ifndef offsetof
27283 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27284 #endif
27285 typedef struct { char x; long long int y; } ac__type_alignof_;
27286 int
27287 main ()
27288 {
27289 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
27290 test_array [0] = 0
27291
27292   ;
27293   return 0;
27294 }
27295 _ACEOF
27296 rm -f conftest.$ac_objext
27297 if { (ac_try="$ac_compile"
27298 case "(($ac_try" in
27299   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27300   *) ac_try_echo=$ac_try;;
27301 esac
27302 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27303 $as_echo "$ac_try_echo") >&5
27304   (eval "$ac_compile") 2>conftest.er1
27305   ac_status=$?
27306   grep -v '^ *+' conftest.er1 >conftest.err
27307   rm -f conftest.er1
27308   cat conftest.err >&5
27309   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27310   (exit $ac_status); } && {
27311          test -z "$ac_c_werror_flag" ||
27312          test ! -s conftest.err
27313        } && test -s conftest.$ac_objext; then
27314   ac_lo=0 ac_mid=0
27315   while :; do
27316     cat >conftest.$ac_ext <<_ACEOF
27317 /* confdefs.h.  */
27318 _ACEOF
27319 cat confdefs.h >>conftest.$ac_ext
27320 cat >>conftest.$ac_ext <<_ACEOF
27321 /* end confdefs.h.  */
27322 $ac_includes_default
27323 #ifndef offsetof
27324 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27325 #endif
27326 typedef struct { char x; long long int y; } ac__type_alignof_;
27327 int
27328 main ()
27329 {
27330 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
27331 test_array [0] = 0
27332
27333   ;
27334   return 0;
27335 }
27336 _ACEOF
27337 rm -f conftest.$ac_objext
27338 if { (ac_try="$ac_compile"
27339 case "(($ac_try" in
27340   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27341   *) ac_try_echo=$ac_try;;
27342 esac
27343 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27344 $as_echo "$ac_try_echo") >&5
27345   (eval "$ac_compile") 2>conftest.er1
27346   ac_status=$?
27347   grep -v '^ *+' conftest.er1 >conftest.err
27348   rm -f conftest.er1
27349   cat conftest.err >&5
27350   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27351   (exit $ac_status); } && {
27352          test -z "$ac_c_werror_flag" ||
27353          test ! -s conftest.err
27354        } && test -s conftest.$ac_objext; then
27355   ac_hi=$ac_mid; break
27356 else
27357   $as_echo "$as_me: failed program was:" >&5
27358 sed 's/^/| /' conftest.$ac_ext >&5
27359
27360         ac_lo=`expr $ac_mid + 1`
27361                         if test $ac_lo -le $ac_mid; then
27362                           ac_lo= ac_hi=
27363                           break
27364                         fi
27365                         ac_mid=`expr 2 '*' $ac_mid + 1`
27366 fi
27367
27368 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27369   done
27370 else
27371   $as_echo "$as_me: failed program was:" >&5
27372 sed 's/^/| /' conftest.$ac_ext >&5
27373
27374         cat >conftest.$ac_ext <<_ACEOF
27375 /* confdefs.h.  */
27376 _ACEOF
27377 cat confdefs.h >>conftest.$ac_ext
27378 cat >>conftest.$ac_ext <<_ACEOF
27379 /* end confdefs.h.  */
27380 $ac_includes_default
27381 #ifndef offsetof
27382 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27383 #endif
27384 typedef struct { char x; long long int y; } ac__type_alignof_;
27385 int
27386 main ()
27387 {
27388 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
27389 test_array [0] = 0
27390
27391   ;
27392   return 0;
27393 }
27394 _ACEOF
27395 rm -f conftest.$ac_objext
27396 if { (ac_try="$ac_compile"
27397 case "(($ac_try" in
27398   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27399   *) ac_try_echo=$ac_try;;
27400 esac
27401 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27402 $as_echo "$ac_try_echo") >&5
27403   (eval "$ac_compile") 2>conftest.er1
27404   ac_status=$?
27405   grep -v '^ *+' conftest.er1 >conftest.err
27406   rm -f conftest.er1
27407   cat conftest.err >&5
27408   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27409   (exit $ac_status); } && {
27410          test -z "$ac_c_werror_flag" ||
27411          test ! -s conftest.err
27412        } && test -s conftest.$ac_objext; then
27413   ac_hi=-1 ac_mid=-1
27414   while :; do
27415     cat >conftest.$ac_ext <<_ACEOF
27416 /* confdefs.h.  */
27417 _ACEOF
27418 cat confdefs.h >>conftest.$ac_ext
27419 cat >>conftest.$ac_ext <<_ACEOF
27420 /* end confdefs.h.  */
27421 $ac_includes_default
27422 #ifndef offsetof
27423 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27424 #endif
27425 typedef struct { char x; long long int y; } ac__type_alignof_;
27426 int
27427 main ()
27428 {
27429 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
27430 test_array [0] = 0
27431
27432   ;
27433   return 0;
27434 }
27435 _ACEOF
27436 rm -f conftest.$ac_objext
27437 if { (ac_try="$ac_compile"
27438 case "(($ac_try" in
27439   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27440   *) ac_try_echo=$ac_try;;
27441 esac
27442 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27443 $as_echo "$ac_try_echo") >&5
27444   (eval "$ac_compile") 2>conftest.er1
27445   ac_status=$?
27446   grep -v '^ *+' conftest.er1 >conftest.err
27447   rm -f conftest.er1
27448   cat conftest.err >&5
27449   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27450   (exit $ac_status); } && {
27451          test -z "$ac_c_werror_flag" ||
27452          test ! -s conftest.err
27453        } && test -s conftest.$ac_objext; then
27454   ac_lo=$ac_mid; break
27455 else
27456   $as_echo "$as_me: failed program was:" >&5
27457 sed 's/^/| /' conftest.$ac_ext >&5
27458
27459         ac_hi=`expr '(' $ac_mid ')' - 1`
27460                         if test $ac_mid -le $ac_hi; then
27461                           ac_lo= ac_hi=
27462                           break
27463                         fi
27464                         ac_mid=`expr 2 '*' $ac_mid`
27465 fi
27466
27467 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27468   done
27469 else
27470   $as_echo "$as_me: failed program was:" >&5
27471 sed 's/^/| /' conftest.$ac_ext >&5
27472
27473         ac_lo= ac_hi=
27474 fi
27475
27476 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27477 fi
27478
27479 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27480 # Binary search between lo and hi bounds.
27481 while test "x$ac_lo" != "x$ac_hi"; do
27482   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
27483   cat >conftest.$ac_ext <<_ACEOF
27484 /* confdefs.h.  */
27485 _ACEOF
27486 cat confdefs.h >>conftest.$ac_ext
27487 cat >>conftest.$ac_ext <<_ACEOF
27488 /* end confdefs.h.  */
27489 $ac_includes_default
27490 #ifndef offsetof
27491 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27492 #endif
27493 typedef struct { char x; long long int y; } ac__type_alignof_;
27494 int
27495 main ()
27496 {
27497 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
27498 test_array [0] = 0
27499
27500   ;
27501   return 0;
27502 }
27503 _ACEOF
27504 rm -f conftest.$ac_objext
27505 if { (ac_try="$ac_compile"
27506 case "(($ac_try" in
27507   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27508   *) ac_try_echo=$ac_try;;
27509 esac
27510 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27511 $as_echo "$ac_try_echo") >&5
27512   (eval "$ac_compile") 2>conftest.er1
27513   ac_status=$?
27514   grep -v '^ *+' conftest.er1 >conftest.err
27515   rm -f conftest.er1
27516   cat conftest.err >&5
27517   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27518   (exit $ac_status); } && {
27519          test -z "$ac_c_werror_flag" ||
27520          test ! -s conftest.err
27521        } && test -s conftest.$ac_objext; then
27522   ac_hi=$ac_mid
27523 else
27524   $as_echo "$as_me: failed program was:" >&5
27525 sed 's/^/| /' conftest.$ac_ext >&5
27526
27527         ac_lo=`expr '(' $ac_mid ')' + 1`
27528 fi
27529
27530 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27531 done
27532 case $ac_lo in
27533 ?*) ac_cv_alignof_long_long_int=$ac_lo;;
27534 '') if test "$ac_cv_type_long_long_int" = yes; then
27535      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
27536 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27537 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long long int
27538 See \`config.log' for more details." >&5
27539 $as_echo "$as_me: error: cannot compute alignment of long long int
27540 See \`config.log' for more details." >&2;}
27541    { (exit 77); exit 77; }; }; }
27542    else
27543      ac_cv_alignof_long_long_int=0
27544    fi ;;
27545 esac
27546 else
27547   cat >conftest.$ac_ext <<_ACEOF
27548 /* confdefs.h.  */
27549 _ACEOF
27550 cat confdefs.h >>conftest.$ac_ext
27551 cat >>conftest.$ac_ext <<_ACEOF
27552 /* end confdefs.h.  */
27553 $ac_includes_default
27554 #ifndef offsetof
27555 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27556 #endif
27557 typedef struct { char x; long long int y; } ac__type_alignof_;
27558 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
27559 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
27560 #include <stdio.h>
27561 #include <stdlib.h>
27562 int
27563 main ()
27564 {
27565
27566   FILE *f = fopen ("conftest.val", "w");
27567   if (! f)
27568     return 1;
27569   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
27570     {
27571       long int i = longval ();
27572       if (i != ((long int) offsetof (ac__type_alignof_, y)))
27573         return 1;
27574       fprintf (f, "%ld", i);
27575     }
27576   else
27577     {
27578       unsigned long int i = ulongval ();
27579       if (i != ((long int) offsetof (ac__type_alignof_, y)))
27580         return 1;
27581       fprintf (f, "%lu", i);
27582     }
27583   /* Do not output a trailing newline, as this causes \r\n confusion
27584      on some platforms.  */
27585   return ferror (f) || fclose (f) != 0;
27586
27587   ;
27588   return 0;
27589 }
27590 _ACEOF
27591 rm -f conftest$ac_exeext
27592 if { (ac_try="$ac_link"
27593 case "(($ac_try" in
27594   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27595   *) ac_try_echo=$ac_try;;
27596 esac
27597 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27598 $as_echo "$ac_try_echo") >&5
27599   (eval "$ac_link") 2>&5
27600   ac_status=$?
27601   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27602   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27603   { (case "(($ac_try" in
27604   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27605   *) ac_try_echo=$ac_try;;
27606 esac
27607 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27608 $as_echo "$ac_try_echo") >&5
27609   (eval "$ac_try") 2>&5
27610   ac_status=$?
27611   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27612   (exit $ac_status); }; }; then
27613   ac_cv_alignof_long_long_int=`cat conftest.val`
27614 else
27615   $as_echo "$as_me: program exited with status $ac_status" >&5
27616 $as_echo "$as_me: failed program was:" >&5
27617 sed 's/^/| /' conftest.$ac_ext >&5
27618
27619 ( exit $ac_status )
27620 if test "$ac_cv_type_long_long_int" = yes; then
27621      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
27622 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27623 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long long int
27624 See \`config.log' for more details." >&5
27625 $as_echo "$as_me: error: cannot compute alignment of long long int
27626 See \`config.log' for more details." >&2;}
27627    { (exit 77); exit 77; }; }; }
27628    else
27629      ac_cv_alignof_long_long_int=0
27630    fi
27631 fi
27632 rm -rf conftest.dSYM
27633 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27634 fi
27635 rm -f conftest.val
27636 fi
27637 { $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_long_long_int" >&5
27638 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
27639
27640
27641
27642 cat >>confdefs.h <<_ACEOF
27643 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
27644 _ACEOF
27645
27646
27647 fi
27648 # The cast to long int works around a bug in the HP C Compiler,
27649 # see AC_CHECK_SIZEOF for more information.
27650 { $as_echo "$as_me:$LINENO: checking alignment of double" >&5
27651 $as_echo_n "checking alignment of double... " >&6; }
27652 if test "${ac_cv_alignof_double+set}" = set; then
27653   $as_echo_n "(cached) " >&6
27654 else
27655   if test "$cross_compiling" = yes; then
27656   # Depending upon the size, compute the lo and hi bounds.
27657 cat >conftest.$ac_ext <<_ACEOF
27658 /* confdefs.h.  */
27659 _ACEOF
27660 cat confdefs.h >>conftest.$ac_ext
27661 cat >>conftest.$ac_ext <<_ACEOF
27662 /* end confdefs.h.  */
27663 $ac_includes_default
27664 #ifndef offsetof
27665 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27666 #endif
27667 typedef struct { char x; double y; } ac__type_alignof_;
27668 int
27669 main ()
27670 {
27671 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
27672 test_array [0] = 0
27673
27674   ;
27675   return 0;
27676 }
27677 _ACEOF
27678 rm -f conftest.$ac_objext
27679 if { (ac_try="$ac_compile"
27680 case "(($ac_try" in
27681   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27682   *) ac_try_echo=$ac_try;;
27683 esac
27684 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27685 $as_echo "$ac_try_echo") >&5
27686   (eval "$ac_compile") 2>conftest.er1
27687   ac_status=$?
27688   grep -v '^ *+' conftest.er1 >conftest.err
27689   rm -f conftest.er1
27690   cat conftest.err >&5
27691   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27692   (exit $ac_status); } && {
27693          test -z "$ac_c_werror_flag" ||
27694          test ! -s conftest.err
27695        } && test -s conftest.$ac_objext; then
27696   ac_lo=0 ac_mid=0
27697   while :; do
27698     cat >conftest.$ac_ext <<_ACEOF
27699 /* confdefs.h.  */
27700 _ACEOF
27701 cat confdefs.h >>conftest.$ac_ext
27702 cat >>conftest.$ac_ext <<_ACEOF
27703 /* end confdefs.h.  */
27704 $ac_includes_default
27705 #ifndef offsetof
27706 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27707 #endif
27708 typedef struct { char x; double y; } ac__type_alignof_;
27709 int
27710 main ()
27711 {
27712 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
27713 test_array [0] = 0
27714
27715   ;
27716   return 0;
27717 }
27718 _ACEOF
27719 rm -f conftest.$ac_objext
27720 if { (ac_try="$ac_compile"
27721 case "(($ac_try" in
27722   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27723   *) ac_try_echo=$ac_try;;
27724 esac
27725 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27726 $as_echo "$ac_try_echo") >&5
27727   (eval "$ac_compile") 2>conftest.er1
27728   ac_status=$?
27729   grep -v '^ *+' conftest.er1 >conftest.err
27730   rm -f conftest.er1
27731   cat conftest.err >&5
27732   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27733   (exit $ac_status); } && {
27734          test -z "$ac_c_werror_flag" ||
27735          test ! -s conftest.err
27736        } && test -s conftest.$ac_objext; then
27737   ac_hi=$ac_mid; break
27738 else
27739   $as_echo "$as_me: failed program was:" >&5
27740 sed 's/^/| /' conftest.$ac_ext >&5
27741
27742         ac_lo=`expr $ac_mid + 1`
27743                         if test $ac_lo -le $ac_mid; then
27744                           ac_lo= ac_hi=
27745                           break
27746                         fi
27747                         ac_mid=`expr 2 '*' $ac_mid + 1`
27748 fi
27749
27750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27751   done
27752 else
27753   $as_echo "$as_me: failed program was:" >&5
27754 sed 's/^/| /' conftest.$ac_ext >&5
27755
27756         cat >conftest.$ac_ext <<_ACEOF
27757 /* confdefs.h.  */
27758 _ACEOF
27759 cat confdefs.h >>conftest.$ac_ext
27760 cat >>conftest.$ac_ext <<_ACEOF
27761 /* end confdefs.h.  */
27762 $ac_includes_default
27763 #ifndef offsetof
27764 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27765 #endif
27766 typedef struct { char x; double y; } ac__type_alignof_;
27767 int
27768 main ()
27769 {
27770 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
27771 test_array [0] = 0
27772
27773   ;
27774   return 0;
27775 }
27776 _ACEOF
27777 rm -f conftest.$ac_objext
27778 if { (ac_try="$ac_compile"
27779 case "(($ac_try" in
27780   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27781   *) ac_try_echo=$ac_try;;
27782 esac
27783 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27784 $as_echo "$ac_try_echo") >&5
27785   (eval "$ac_compile") 2>conftest.er1
27786   ac_status=$?
27787   grep -v '^ *+' conftest.er1 >conftest.err
27788   rm -f conftest.er1
27789   cat conftest.err >&5
27790   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27791   (exit $ac_status); } && {
27792          test -z "$ac_c_werror_flag" ||
27793          test ! -s conftest.err
27794        } && test -s conftest.$ac_objext; then
27795   ac_hi=-1 ac_mid=-1
27796   while :; do
27797     cat >conftest.$ac_ext <<_ACEOF
27798 /* confdefs.h.  */
27799 _ACEOF
27800 cat confdefs.h >>conftest.$ac_ext
27801 cat >>conftest.$ac_ext <<_ACEOF
27802 /* end confdefs.h.  */
27803 $ac_includes_default
27804 #ifndef offsetof
27805 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27806 #endif
27807 typedef struct { char x; double y; } ac__type_alignof_;
27808 int
27809 main ()
27810 {
27811 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
27812 test_array [0] = 0
27813
27814   ;
27815   return 0;
27816 }
27817 _ACEOF
27818 rm -f conftest.$ac_objext
27819 if { (ac_try="$ac_compile"
27820 case "(($ac_try" in
27821   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27822   *) ac_try_echo=$ac_try;;
27823 esac
27824 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27825 $as_echo "$ac_try_echo") >&5
27826   (eval "$ac_compile") 2>conftest.er1
27827   ac_status=$?
27828   grep -v '^ *+' conftest.er1 >conftest.err
27829   rm -f conftest.er1
27830   cat conftest.err >&5
27831   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27832   (exit $ac_status); } && {
27833          test -z "$ac_c_werror_flag" ||
27834          test ! -s conftest.err
27835        } && test -s conftest.$ac_objext; then
27836   ac_lo=$ac_mid; break
27837 else
27838   $as_echo "$as_me: failed program was:" >&5
27839 sed 's/^/| /' conftest.$ac_ext >&5
27840
27841         ac_hi=`expr '(' $ac_mid ')' - 1`
27842                         if test $ac_mid -le $ac_hi; then
27843                           ac_lo= ac_hi=
27844                           break
27845                         fi
27846                         ac_mid=`expr 2 '*' $ac_mid`
27847 fi
27848
27849 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27850   done
27851 else
27852   $as_echo "$as_me: failed program was:" >&5
27853 sed 's/^/| /' conftest.$ac_ext >&5
27854
27855         ac_lo= ac_hi=
27856 fi
27857
27858 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27859 fi
27860
27861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27862 # Binary search between lo and hi bounds.
27863 while test "x$ac_lo" != "x$ac_hi"; do
27864   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
27865   cat >conftest.$ac_ext <<_ACEOF
27866 /* confdefs.h.  */
27867 _ACEOF
27868 cat confdefs.h >>conftest.$ac_ext
27869 cat >>conftest.$ac_ext <<_ACEOF
27870 /* end confdefs.h.  */
27871 $ac_includes_default
27872 #ifndef offsetof
27873 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27874 #endif
27875 typedef struct { char x; double y; } ac__type_alignof_;
27876 int
27877 main ()
27878 {
27879 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
27880 test_array [0] = 0
27881
27882   ;
27883   return 0;
27884 }
27885 _ACEOF
27886 rm -f conftest.$ac_objext
27887 if { (ac_try="$ac_compile"
27888 case "(($ac_try" in
27889   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27890   *) ac_try_echo=$ac_try;;
27891 esac
27892 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27893 $as_echo "$ac_try_echo") >&5
27894   (eval "$ac_compile") 2>conftest.er1
27895   ac_status=$?
27896   grep -v '^ *+' conftest.er1 >conftest.err
27897   rm -f conftest.er1
27898   cat conftest.err >&5
27899   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27900   (exit $ac_status); } && {
27901          test -z "$ac_c_werror_flag" ||
27902          test ! -s conftest.err
27903        } && test -s conftest.$ac_objext; then
27904   ac_hi=$ac_mid
27905 else
27906   $as_echo "$as_me: failed program was:" >&5
27907 sed 's/^/| /' conftest.$ac_ext >&5
27908
27909         ac_lo=`expr '(' $ac_mid ')' + 1`
27910 fi
27911
27912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27913 done
27914 case $ac_lo in
27915 ?*) ac_cv_alignof_double=$ac_lo;;
27916 '') if test "$ac_cv_type_double" = yes; then
27917      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
27918 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27919 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of double
27920 See \`config.log' for more details." >&5
27921 $as_echo "$as_me: error: cannot compute alignment of double
27922 See \`config.log' for more details." >&2;}
27923    { (exit 77); exit 77; }; }; }
27924    else
27925      ac_cv_alignof_double=0
27926    fi ;;
27927 esac
27928 else
27929   cat >conftest.$ac_ext <<_ACEOF
27930 /* confdefs.h.  */
27931 _ACEOF
27932 cat confdefs.h >>conftest.$ac_ext
27933 cat >>conftest.$ac_ext <<_ACEOF
27934 /* end confdefs.h.  */
27935 $ac_includes_default
27936 #ifndef offsetof
27937 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27938 #endif
27939 typedef struct { char x; double y; } ac__type_alignof_;
27940 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
27941 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
27942 #include <stdio.h>
27943 #include <stdlib.h>
27944 int
27945 main ()
27946 {
27947
27948   FILE *f = fopen ("conftest.val", "w");
27949   if (! f)
27950     return 1;
27951   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
27952     {
27953       long int i = longval ();
27954       if (i != ((long int) offsetof (ac__type_alignof_, y)))
27955         return 1;
27956       fprintf (f, "%ld", i);
27957     }
27958   else
27959     {
27960       unsigned long int i = ulongval ();
27961       if (i != ((long int) offsetof (ac__type_alignof_, y)))
27962         return 1;
27963       fprintf (f, "%lu", i);
27964     }
27965   /* Do not output a trailing newline, as this causes \r\n confusion
27966      on some platforms.  */
27967   return ferror (f) || fclose (f) != 0;
27968
27969   ;
27970   return 0;
27971 }
27972 _ACEOF
27973 rm -f conftest$ac_exeext
27974 if { (ac_try="$ac_link"
27975 case "(($ac_try" in
27976   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27977   *) ac_try_echo=$ac_try;;
27978 esac
27979 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27980 $as_echo "$ac_try_echo") >&5
27981   (eval "$ac_link") 2>&5
27982   ac_status=$?
27983   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27984   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27985   { (case "(($ac_try" in
27986   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27987   *) ac_try_echo=$ac_try;;
27988 esac
27989 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27990 $as_echo "$ac_try_echo") >&5
27991   (eval "$ac_try") 2>&5
27992   ac_status=$?
27993   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27994   (exit $ac_status); }; }; then
27995   ac_cv_alignof_double=`cat conftest.val`
27996 else
27997   $as_echo "$as_me: program exited with status $ac_status" >&5
27998 $as_echo "$as_me: failed program was:" >&5
27999 sed 's/^/| /' conftest.$ac_ext >&5
28000
28001 ( exit $ac_status )
28002 if test "$ac_cv_type_double" = yes; then
28003      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
28004 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28005 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of double
28006 See \`config.log' for more details." >&5
28007 $as_echo "$as_me: error: cannot compute alignment of double
28008 See \`config.log' for more details." >&2;}
28009    { (exit 77); exit 77; }; }; }
28010    else
28011      ac_cv_alignof_double=0
28012    fi
28013 fi
28014 rm -rf conftest.dSYM
28015 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
28016 fi
28017 rm -f conftest.val
28018 fi
28019 { $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_double" >&5
28020 $as_echo "$ac_cv_alignof_double" >&6; }
28021
28022
28023
28024 cat >>confdefs.h <<_ACEOF
28025 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
28026 _ACEOF
28027
28028
28029
28030 # Compute maximum alignment of any basic type.
28031 # We assume long's alignment is at least as strong as char, short, or int;
28032 # but we must check long long (if it exists) and double.
28033
28034 MAX_ALIGNOF=$ac_cv_alignof_long
28035 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
28036   MAX_ALIGNOF=$ac_cv_alignof_double
28037 fi
28038 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
28039   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
28040 fi
28041
28042 cat >>confdefs.h <<_ACEOF
28043 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
28044 _ACEOF
28045
28046
28047
28048 # Some platforms predefine the types int8, int16, etc.  Only check
28049 # a (hopefully) representative subset.
28050 { $as_echo "$as_me:$LINENO: checking for int8" >&5
28051 $as_echo_n "checking for int8... " >&6; }
28052 if test "${ac_cv_type_int8+set}" = set; then
28053   $as_echo_n "(cached) " >&6
28054 else
28055   ac_cv_type_int8=no
28056 cat >conftest.$ac_ext <<_ACEOF
28057 /* confdefs.h.  */
28058 _ACEOF
28059 cat confdefs.h >>conftest.$ac_ext
28060 cat >>conftest.$ac_ext <<_ACEOF
28061 /* end confdefs.h.  */
28062 #include <stdio.h>
28063
28064 int
28065 main ()
28066 {
28067 if (sizeof (int8))
28068        return 0;
28069   ;
28070   return 0;
28071 }
28072 _ACEOF
28073 rm -f conftest.$ac_objext
28074 if { (ac_try="$ac_compile"
28075 case "(($ac_try" in
28076   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28077   *) ac_try_echo=$ac_try;;
28078 esac
28079 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28080 $as_echo "$ac_try_echo") >&5
28081   (eval "$ac_compile") 2>conftest.er1
28082   ac_status=$?
28083   grep -v '^ *+' conftest.er1 >conftest.err
28084   rm -f conftest.er1
28085   cat conftest.err >&5
28086   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28087   (exit $ac_status); } && {
28088          test -z "$ac_c_werror_flag" ||
28089          test ! -s conftest.err
28090        } && test -s conftest.$ac_objext; then
28091   cat >conftest.$ac_ext <<_ACEOF
28092 /* confdefs.h.  */
28093 _ACEOF
28094 cat confdefs.h >>conftest.$ac_ext
28095 cat >>conftest.$ac_ext <<_ACEOF
28096 /* end confdefs.h.  */
28097 #include <stdio.h>
28098
28099 int
28100 main ()
28101 {
28102 if (sizeof ((int8)))
28103           return 0;
28104   ;
28105   return 0;
28106 }
28107 _ACEOF
28108 rm -f conftest.$ac_objext
28109 if { (ac_try="$ac_compile"
28110 case "(($ac_try" in
28111   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28112   *) ac_try_echo=$ac_try;;
28113 esac
28114 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28115 $as_echo "$ac_try_echo") >&5
28116   (eval "$ac_compile") 2>conftest.er1
28117   ac_status=$?
28118   grep -v '^ *+' conftest.er1 >conftest.err
28119   rm -f conftest.er1
28120   cat conftest.err >&5
28121   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28122   (exit $ac_status); } && {
28123          test -z "$ac_c_werror_flag" ||
28124          test ! -s conftest.err
28125        } && test -s conftest.$ac_objext; then
28126   :
28127 else
28128   $as_echo "$as_me: failed program was:" >&5
28129 sed 's/^/| /' conftest.$ac_ext >&5
28130
28131         ac_cv_type_int8=yes
28132 fi
28133
28134 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28135 else
28136   $as_echo "$as_me: failed program was:" >&5
28137 sed 's/^/| /' conftest.$ac_ext >&5
28138
28139
28140 fi
28141
28142 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28143 fi
28144 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
28145 $as_echo "$ac_cv_type_int8" >&6; }
28146 if test "x$ac_cv_type_int8" = x""yes; then
28147
28148 cat >>confdefs.h <<_ACEOF
28149 #define HAVE_INT8 1
28150 _ACEOF
28151
28152
28153 fi
28154 { $as_echo "$as_me:$LINENO: checking for uint8" >&5
28155 $as_echo_n "checking for uint8... " >&6; }
28156 if test "${ac_cv_type_uint8+set}" = set; then
28157   $as_echo_n "(cached) " >&6
28158 else
28159   ac_cv_type_uint8=no
28160 cat >conftest.$ac_ext <<_ACEOF
28161 /* confdefs.h.  */
28162 _ACEOF
28163 cat confdefs.h >>conftest.$ac_ext
28164 cat >>conftest.$ac_ext <<_ACEOF
28165 /* end confdefs.h.  */
28166 #include <stdio.h>
28167
28168 int
28169 main ()
28170 {
28171 if (sizeof (uint8))
28172        return 0;
28173   ;
28174   return 0;
28175 }
28176 _ACEOF
28177 rm -f conftest.$ac_objext
28178 if { (ac_try="$ac_compile"
28179 case "(($ac_try" in
28180   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28181   *) ac_try_echo=$ac_try;;
28182 esac
28183 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28184 $as_echo "$ac_try_echo") >&5
28185   (eval "$ac_compile") 2>conftest.er1
28186   ac_status=$?
28187   grep -v '^ *+' conftest.er1 >conftest.err
28188   rm -f conftest.er1
28189   cat conftest.err >&5
28190   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28191   (exit $ac_status); } && {
28192          test -z "$ac_c_werror_flag" ||
28193          test ! -s conftest.err
28194        } && test -s conftest.$ac_objext; then
28195   cat >conftest.$ac_ext <<_ACEOF
28196 /* confdefs.h.  */
28197 _ACEOF
28198 cat confdefs.h >>conftest.$ac_ext
28199 cat >>conftest.$ac_ext <<_ACEOF
28200 /* end confdefs.h.  */
28201 #include <stdio.h>
28202
28203 int
28204 main ()
28205 {
28206 if (sizeof ((uint8)))
28207           return 0;
28208   ;
28209   return 0;
28210 }
28211 _ACEOF
28212 rm -f conftest.$ac_objext
28213 if { (ac_try="$ac_compile"
28214 case "(($ac_try" in
28215   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28216   *) ac_try_echo=$ac_try;;
28217 esac
28218 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28219 $as_echo "$ac_try_echo") >&5
28220   (eval "$ac_compile") 2>conftest.er1
28221   ac_status=$?
28222   grep -v '^ *+' conftest.er1 >conftest.err
28223   rm -f conftest.er1
28224   cat conftest.err >&5
28225   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28226   (exit $ac_status); } && {
28227          test -z "$ac_c_werror_flag" ||
28228          test ! -s conftest.err
28229        } && test -s conftest.$ac_objext; then
28230   :
28231 else
28232   $as_echo "$as_me: failed program was:" >&5
28233 sed 's/^/| /' conftest.$ac_ext >&5
28234
28235         ac_cv_type_uint8=yes
28236 fi
28237
28238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28239 else
28240   $as_echo "$as_me: failed program was:" >&5
28241 sed 's/^/| /' conftest.$ac_ext >&5
28242
28243
28244 fi
28245
28246 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28247 fi
28248 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
28249 $as_echo "$ac_cv_type_uint8" >&6; }
28250 if test "x$ac_cv_type_uint8" = x""yes; then
28251
28252 cat >>confdefs.h <<_ACEOF
28253 #define HAVE_UINT8 1
28254 _ACEOF
28255
28256
28257 fi
28258 { $as_echo "$as_me:$LINENO: checking for int64" >&5
28259 $as_echo_n "checking for int64... " >&6; }
28260 if test "${ac_cv_type_int64+set}" = set; then
28261   $as_echo_n "(cached) " >&6
28262 else
28263   ac_cv_type_int64=no
28264 cat >conftest.$ac_ext <<_ACEOF
28265 /* confdefs.h.  */
28266 _ACEOF
28267 cat confdefs.h >>conftest.$ac_ext
28268 cat >>conftest.$ac_ext <<_ACEOF
28269 /* end confdefs.h.  */
28270 #include <stdio.h>
28271
28272 int
28273 main ()
28274 {
28275 if (sizeof (int64))
28276        return 0;
28277   ;
28278   return 0;
28279 }
28280 _ACEOF
28281 rm -f conftest.$ac_objext
28282 if { (ac_try="$ac_compile"
28283 case "(($ac_try" in
28284   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28285   *) ac_try_echo=$ac_try;;
28286 esac
28287 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28288 $as_echo "$ac_try_echo") >&5
28289   (eval "$ac_compile") 2>conftest.er1
28290   ac_status=$?
28291   grep -v '^ *+' conftest.er1 >conftest.err
28292   rm -f conftest.er1
28293   cat conftest.err >&5
28294   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28295   (exit $ac_status); } && {
28296          test -z "$ac_c_werror_flag" ||
28297          test ! -s conftest.err
28298        } && test -s conftest.$ac_objext; then
28299   cat >conftest.$ac_ext <<_ACEOF
28300 /* confdefs.h.  */
28301 _ACEOF
28302 cat confdefs.h >>conftest.$ac_ext
28303 cat >>conftest.$ac_ext <<_ACEOF
28304 /* end confdefs.h.  */
28305 #include <stdio.h>
28306
28307 int
28308 main ()
28309 {
28310 if (sizeof ((int64)))
28311           return 0;
28312   ;
28313   return 0;
28314 }
28315 _ACEOF
28316 rm -f conftest.$ac_objext
28317 if { (ac_try="$ac_compile"
28318 case "(($ac_try" in
28319   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28320   *) ac_try_echo=$ac_try;;
28321 esac
28322 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28323 $as_echo "$ac_try_echo") >&5
28324   (eval "$ac_compile") 2>conftest.er1
28325   ac_status=$?
28326   grep -v '^ *+' conftest.er1 >conftest.err
28327   rm -f conftest.er1
28328   cat conftest.err >&5
28329   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28330   (exit $ac_status); } && {
28331          test -z "$ac_c_werror_flag" ||
28332          test ! -s conftest.err
28333        } && test -s conftest.$ac_objext; then
28334   :
28335 else
28336   $as_echo "$as_me: failed program was:" >&5
28337 sed 's/^/| /' conftest.$ac_ext >&5
28338
28339         ac_cv_type_int64=yes
28340 fi
28341
28342 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28343 else
28344   $as_echo "$as_me: failed program was:" >&5
28345 sed 's/^/| /' conftest.$ac_ext >&5
28346
28347
28348 fi
28349
28350 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28351 fi
28352 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
28353 $as_echo "$ac_cv_type_int64" >&6; }
28354 if test "x$ac_cv_type_int64" = x""yes; then
28355
28356 cat >>confdefs.h <<_ACEOF
28357 #define HAVE_INT64 1
28358 _ACEOF
28359
28360
28361 fi
28362 { $as_echo "$as_me:$LINENO: checking for uint64" >&5
28363 $as_echo_n "checking for uint64... " >&6; }
28364 if test "${ac_cv_type_uint64+set}" = set; then
28365   $as_echo_n "(cached) " >&6
28366 else
28367   ac_cv_type_uint64=no
28368 cat >conftest.$ac_ext <<_ACEOF
28369 /* confdefs.h.  */
28370 _ACEOF
28371 cat confdefs.h >>conftest.$ac_ext
28372 cat >>conftest.$ac_ext <<_ACEOF
28373 /* end confdefs.h.  */
28374 #include <stdio.h>
28375
28376 int
28377 main ()
28378 {
28379 if (sizeof (uint64))
28380        return 0;
28381   ;
28382   return 0;
28383 }
28384 _ACEOF
28385 rm -f conftest.$ac_objext
28386 if { (ac_try="$ac_compile"
28387 case "(($ac_try" in
28388   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28389   *) ac_try_echo=$ac_try;;
28390 esac
28391 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28392 $as_echo "$ac_try_echo") >&5
28393   (eval "$ac_compile") 2>conftest.er1
28394   ac_status=$?
28395   grep -v '^ *+' conftest.er1 >conftest.err
28396   rm -f conftest.er1
28397   cat conftest.err >&5
28398   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28399   (exit $ac_status); } && {
28400          test -z "$ac_c_werror_flag" ||
28401          test ! -s conftest.err
28402        } && test -s conftest.$ac_objext; then
28403   cat >conftest.$ac_ext <<_ACEOF
28404 /* confdefs.h.  */
28405 _ACEOF
28406 cat confdefs.h >>conftest.$ac_ext
28407 cat >>conftest.$ac_ext <<_ACEOF
28408 /* end confdefs.h.  */
28409 #include <stdio.h>
28410
28411 int
28412 main ()
28413 {
28414 if (sizeof ((uint64)))
28415           return 0;
28416   ;
28417   return 0;
28418 }
28419 _ACEOF
28420 rm -f conftest.$ac_objext
28421 if { (ac_try="$ac_compile"
28422 case "(($ac_try" in
28423   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28424   *) ac_try_echo=$ac_try;;
28425 esac
28426 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28427 $as_echo "$ac_try_echo") >&5
28428   (eval "$ac_compile") 2>conftest.er1
28429   ac_status=$?
28430   grep -v '^ *+' conftest.er1 >conftest.err
28431   rm -f conftest.er1
28432   cat conftest.err >&5
28433   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28434   (exit $ac_status); } && {
28435          test -z "$ac_c_werror_flag" ||
28436          test ! -s conftest.err
28437        } && test -s conftest.$ac_objext; then
28438   :
28439 else
28440   $as_echo "$as_me: failed program was:" >&5
28441 sed 's/^/| /' conftest.$ac_ext >&5
28442
28443         ac_cv_type_uint64=yes
28444 fi
28445
28446 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28447 else
28448   $as_echo "$as_me: failed program was:" >&5
28449 sed 's/^/| /' conftest.$ac_ext >&5
28450
28451
28452 fi
28453
28454 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28455 fi
28456 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
28457 $as_echo "$ac_cv_type_uint64" >&6; }
28458 if test "x$ac_cv_type_uint64" = x""yes; then
28459
28460 cat >>confdefs.h <<_ACEOF
28461 #define HAVE_UINT64 1
28462 _ACEOF
28463
28464
28465 fi
28466
28467
28468 # We also check for sig_atomic_t, which *should* be defined per ANSI
28469 # C, but is missing on some old platforms.
28470 { $as_echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
28471 $as_echo_n "checking for sig_atomic_t... " >&6; }
28472 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
28473   $as_echo_n "(cached) " >&6
28474 else
28475   ac_cv_type_sig_atomic_t=no
28476 cat >conftest.$ac_ext <<_ACEOF
28477 /* confdefs.h.  */
28478 _ACEOF
28479 cat confdefs.h >>conftest.$ac_ext
28480 cat >>conftest.$ac_ext <<_ACEOF
28481 /* end confdefs.h.  */
28482 #include <signal.h>
28483
28484 int
28485 main ()
28486 {
28487 if (sizeof (sig_atomic_t))
28488        return 0;
28489   ;
28490   return 0;
28491 }
28492 _ACEOF
28493 rm -f conftest.$ac_objext
28494 if { (ac_try="$ac_compile"
28495 case "(($ac_try" in
28496   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28497   *) ac_try_echo=$ac_try;;
28498 esac
28499 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28500 $as_echo "$ac_try_echo") >&5
28501   (eval "$ac_compile") 2>conftest.er1
28502   ac_status=$?
28503   grep -v '^ *+' conftest.er1 >conftest.err
28504   rm -f conftest.er1
28505   cat conftest.err >&5
28506   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28507   (exit $ac_status); } && {
28508          test -z "$ac_c_werror_flag" ||
28509          test ! -s conftest.err
28510        } && test -s conftest.$ac_objext; then
28511   cat >conftest.$ac_ext <<_ACEOF
28512 /* confdefs.h.  */
28513 _ACEOF
28514 cat confdefs.h >>conftest.$ac_ext
28515 cat >>conftest.$ac_ext <<_ACEOF
28516 /* end confdefs.h.  */
28517 #include <signal.h>
28518
28519 int
28520 main ()
28521 {
28522 if (sizeof ((sig_atomic_t)))
28523           return 0;
28524   ;
28525   return 0;
28526 }
28527 _ACEOF
28528 rm -f conftest.$ac_objext
28529 if { (ac_try="$ac_compile"
28530 case "(($ac_try" in
28531   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28532   *) ac_try_echo=$ac_try;;
28533 esac
28534 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28535 $as_echo "$ac_try_echo") >&5
28536   (eval "$ac_compile") 2>conftest.er1
28537   ac_status=$?
28538   grep -v '^ *+' conftest.er1 >conftest.err
28539   rm -f conftest.er1
28540   cat conftest.err >&5
28541   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28542   (exit $ac_status); } && {
28543          test -z "$ac_c_werror_flag" ||
28544          test ! -s conftest.err
28545        } && test -s conftest.$ac_objext; then
28546   :
28547 else
28548   $as_echo "$as_me: failed program was:" >&5
28549 sed 's/^/| /' conftest.$ac_ext >&5
28550
28551         ac_cv_type_sig_atomic_t=yes
28552 fi
28553
28554 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28555 else
28556   $as_echo "$as_me: failed program was:" >&5
28557 sed 's/^/| /' conftest.$ac_ext >&5
28558
28559
28560 fi
28561
28562 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28563 fi
28564 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
28565 $as_echo "$ac_cv_type_sig_atomic_t" >&6; }
28566 if test "x$ac_cv_type_sig_atomic_t" = x""yes; then
28567
28568 cat >>confdefs.h <<_ACEOF
28569 #define HAVE_SIG_ATOMIC_T 1
28570 _ACEOF
28571
28572
28573 fi
28574
28575
28576
28577 if test "$PORTNAME" != "win32"
28578 then
28579 { $as_echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
28580 $as_echo_n "checking for POSIX signal interface... " >&6; }
28581 if test "${pgac_cv_func_posix_signals+set}" = set; then
28582   $as_echo_n "(cached) " >&6
28583 else
28584   cat >conftest.$ac_ext <<_ACEOF
28585 /* confdefs.h.  */
28586 _ACEOF
28587 cat confdefs.h >>conftest.$ac_ext
28588 cat >>conftest.$ac_ext <<_ACEOF
28589 /* end confdefs.h.  */
28590 #include <signal.h>
28591
28592 int
28593 main ()
28594 {
28595 struct sigaction act, oact;
28596 sigemptyset(&act.sa_mask);
28597 act.sa_flags = SA_RESTART;
28598 sigaction(0, &act, &oact);
28599   ;
28600   return 0;
28601 }
28602 _ACEOF
28603 rm -f conftest.$ac_objext conftest$ac_exeext
28604 if { (ac_try="$ac_link"
28605 case "(($ac_try" in
28606   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28607   *) ac_try_echo=$ac_try;;
28608 esac
28609 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28610 $as_echo "$ac_try_echo") >&5
28611   (eval "$ac_link") 2>conftest.er1
28612   ac_status=$?
28613   grep -v '^ *+' conftest.er1 >conftest.err
28614   rm -f conftest.er1
28615   cat conftest.err >&5
28616   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28617   (exit $ac_status); } && {
28618          test -z "$ac_c_werror_flag" ||
28619          test ! -s conftest.err
28620        } && test -s conftest$ac_exeext && {
28621          test "$cross_compiling" = yes ||
28622          $as_test_x conftest$ac_exeext
28623        }; then
28624   pgac_cv_func_posix_signals=yes
28625 else
28626   $as_echo "$as_me: failed program was:" >&5
28627 sed 's/^/| /' conftest.$ac_ext >&5
28628
28629         pgac_cv_func_posix_signals=no
28630 fi
28631
28632 rm -rf conftest.dSYM
28633 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28634       conftest$ac_exeext conftest.$ac_ext
28635 fi
28636 { $as_echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
28637 $as_echo "$pgac_cv_func_posix_signals" >&6; }
28638 if test x"$pgac_cv_func_posix_signals" = xyes ; then
28639
28640 cat >>confdefs.h <<\_ACEOF
28641 #define HAVE_POSIX_SIGNALS /**/
28642 _ACEOF
28643
28644 fi
28645 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
28646
28647 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
28648   { { $as_echo "$as_me:$LINENO: error:
28649 Thread-safety requires POSIX signals, which are not supported by this
28650 operating system;  use --disable-thread-safety to disable thread safety." >&5
28651 $as_echo "$as_me: error:
28652 Thread-safety requires POSIX signals, which are not supported by this
28653 operating system;  use --disable-thread-safety to disable thread safety." >&2;}
28654    { (exit 1); exit 1; }; }
28655 fi
28656 fi
28657
28658 # SunOS doesn't handle negative byte comparisons properly with +/- return
28659 { $as_echo "$as_me:$LINENO: checking for working memcmp" >&5
28660 $as_echo_n "checking for working memcmp... " >&6; }
28661 if test "${ac_cv_func_memcmp_working+set}" = set; then
28662   $as_echo_n "(cached) " >&6
28663 else
28664   if test "$cross_compiling" = yes; then
28665   ac_cv_func_memcmp_working=no
28666 else
28667   cat >conftest.$ac_ext <<_ACEOF
28668 /* confdefs.h.  */
28669 _ACEOF
28670 cat confdefs.h >>conftest.$ac_ext
28671 cat >>conftest.$ac_ext <<_ACEOF
28672 /* end confdefs.h.  */
28673 $ac_includes_default
28674 int
28675 main ()
28676 {
28677
28678   /* Some versions of memcmp are not 8-bit clean.  */
28679   char c0 = '\100', c1 = '\200', c2 = '\201';
28680   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
28681     return 1;
28682
28683   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
28684      or more and with at least one buffer not starting on a 4-byte boundary.
28685      William Lewis provided this test program.   */
28686   {
28687     char foo[21];
28688     char bar[21];
28689     int i;
28690     for (i = 0; i < 4; i++)
28691       {
28692         char *a = foo + i;
28693         char *b = bar + i;
28694         strcpy (a, "--------01111111");
28695         strcpy (b, "--------10000000");
28696         if (memcmp (a, b, 16) >= 0)
28697           return 1;
28698       }
28699     return 0;
28700   }
28701
28702   ;
28703   return 0;
28704 }
28705 _ACEOF
28706 rm -f conftest$ac_exeext
28707 if { (ac_try="$ac_link"
28708 case "(($ac_try" in
28709   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28710   *) ac_try_echo=$ac_try;;
28711 esac
28712 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28713 $as_echo "$ac_try_echo") >&5
28714   (eval "$ac_link") 2>&5
28715   ac_status=$?
28716   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28717   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
28718   { (case "(($ac_try" in
28719   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28720   *) ac_try_echo=$ac_try;;
28721 esac
28722 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28723 $as_echo "$ac_try_echo") >&5
28724   (eval "$ac_try") 2>&5
28725   ac_status=$?
28726   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28727   (exit $ac_status); }; }; then
28728   ac_cv_func_memcmp_working=yes
28729 else
28730   $as_echo "$as_me: program exited with status $ac_status" >&5
28731 $as_echo "$as_me: failed program was:" >&5
28732 sed 's/^/| /' conftest.$ac_ext >&5
28733
28734 ( exit $ac_status )
28735 ac_cv_func_memcmp_working=no
28736 fi
28737 rm -rf conftest.dSYM
28738 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
28739 fi
28740
28741
28742 fi
28743 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
28744 $as_echo "$ac_cv_func_memcmp_working" >&6; }
28745 test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
28746   *" memcmp.$ac_objext "* ) ;;
28747   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
28748  ;;
28749 esac
28750
28751
28752
28753
28754 # Select semaphore implementation type.
28755 if test "$PORTNAME" != "win32"; then
28756   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
28757
28758 cat >>confdefs.h <<\_ACEOF
28759 #define USE_NAMED_POSIX_SEMAPHORES 1
28760 _ACEOF
28761
28762     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
28763   else
28764     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
28765
28766 cat >>confdefs.h <<\_ACEOF
28767 #define USE_UNNAMED_POSIX_SEMAPHORES 1
28768 _ACEOF
28769
28770       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
28771     else
28772
28773 cat >>confdefs.h <<\_ACEOF
28774 #define USE_SYSV_SEMAPHORES 1
28775 _ACEOF
28776
28777       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
28778     fi
28779   fi
28780 else
28781
28782 cat >>confdefs.h <<\_ACEOF
28783 #define USE_WIN32_SEMAPHORES 1
28784 _ACEOF
28785
28786   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
28787 fi
28788
28789
28790 # Select shared-memory implementation type.
28791 if test "$PORTNAME" != "win32"; then
28792
28793 cat >>confdefs.h <<\_ACEOF
28794 #define USE_SYSV_SHARED_MEMORY 1
28795 _ACEOF
28796
28797   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
28798 else
28799
28800 cat >>confdefs.h <<\_ACEOF
28801 #define USE_WIN32_SHARED_MEMORY 1
28802 _ACEOF
28803
28804   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
28805 fi
28806
28807 # Select latch implementation type.
28808 if test "$PORTNAME" != "win32"; then
28809   LATCH_IMPLEMENTATION="src/backend/port/unix_latch.c"
28810 else
28811   LATCH_IMPLEMENTATION="src/backend/port/win32_latch.c"
28812 fi
28813
28814 # If not set in template file, set bytes to use libc memset()
28815 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
28816   MEMSET_LOOP_LIMIT=1024
28817 fi
28818
28819 cat >>confdefs.h <<_ACEOF
28820 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
28821 _ACEOF
28822
28823
28824
28825 if test "$enable_nls" = yes ; then
28826
28827   { $as_echo "$as_me:$LINENO: checking for library containing bind_textdomain_codeset" >&5
28828 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
28829 if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then
28830   $as_echo_n "(cached) " >&6
28831 else
28832   ac_func_search_save_LIBS=$LIBS
28833 cat >conftest.$ac_ext <<_ACEOF
28834 /* confdefs.h.  */
28835 _ACEOF
28836 cat confdefs.h >>conftest.$ac_ext
28837 cat >>conftest.$ac_ext <<_ACEOF
28838 /* end confdefs.h.  */
28839
28840 /* Override any GCC internal prototype to avoid an error.
28841    Use char because int might match the return type of a GCC
28842    builtin and then its argument prototype would still apply.  */
28843 #ifdef __cplusplus
28844 extern "C"
28845 #endif
28846 char bind_textdomain_codeset ();
28847 int
28848 main ()
28849 {
28850 return bind_textdomain_codeset ();
28851   ;
28852   return 0;
28853 }
28854 _ACEOF
28855 for ac_lib in '' intl; do
28856   if test -z "$ac_lib"; then
28857     ac_res="none required"
28858   else
28859     ac_res=-l$ac_lib
28860     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
28861   fi
28862   rm -f conftest.$ac_objext conftest$ac_exeext
28863 if { (ac_try="$ac_link"
28864 case "(($ac_try" in
28865   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28866   *) ac_try_echo=$ac_try;;
28867 esac
28868 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28869 $as_echo "$ac_try_echo") >&5
28870   (eval "$ac_link") 2>conftest.er1
28871   ac_status=$?
28872   grep -v '^ *+' conftest.er1 >conftest.err
28873   rm -f conftest.er1
28874   cat conftest.err >&5
28875   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28876   (exit $ac_status); } && {
28877          test -z "$ac_c_werror_flag" ||
28878          test ! -s conftest.err
28879        } && test -s conftest$ac_exeext && {
28880          test "$cross_compiling" = yes ||
28881          $as_test_x conftest$ac_exeext
28882        }; then
28883   ac_cv_search_bind_textdomain_codeset=$ac_res
28884 else
28885   $as_echo "$as_me: failed program was:" >&5
28886 sed 's/^/| /' conftest.$ac_ext >&5
28887
28888
28889 fi
28890
28891 rm -rf conftest.dSYM
28892 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28893       conftest$ac_exeext
28894   if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then
28895   break
28896 fi
28897 done
28898 if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then
28899   :
28900 else
28901   ac_cv_search_bind_textdomain_codeset=no
28902 fi
28903 rm conftest.$ac_ext
28904 LIBS=$ac_func_search_save_LIBS
28905 fi
28906 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_bind_textdomain_codeset" >&5
28907 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
28908 ac_res=$ac_cv_search_bind_textdomain_codeset
28909 if test "$ac_res" != no; then
28910   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28911
28912 else
28913   { { $as_echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
28914 $as_echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
28915    { (exit 1); exit 1; }; }
28916 fi
28917
28918   if test "${ac_cv_header_libintl_h+set}" = set; then
28919   { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
28920 $as_echo_n "checking for libintl.h... " >&6; }
28921 if test "${ac_cv_header_libintl_h+set}" = set; then
28922   $as_echo_n "(cached) " >&6
28923 fi
28924 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
28925 $as_echo "$ac_cv_header_libintl_h" >&6; }
28926 else
28927   # Is the header compilable?
28928 { $as_echo "$as_me:$LINENO: checking libintl.h usability" >&5
28929 $as_echo_n "checking libintl.h usability... " >&6; }
28930 cat >conftest.$ac_ext <<_ACEOF
28931 /* confdefs.h.  */
28932 _ACEOF
28933 cat confdefs.h >>conftest.$ac_ext
28934 cat >>conftest.$ac_ext <<_ACEOF
28935 /* end confdefs.h.  */
28936 $ac_includes_default
28937 #include <libintl.h>
28938 _ACEOF
28939 rm -f conftest.$ac_objext
28940 if { (ac_try="$ac_compile"
28941 case "(($ac_try" in
28942   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28943   *) ac_try_echo=$ac_try;;
28944 esac
28945 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28946 $as_echo "$ac_try_echo") >&5
28947   (eval "$ac_compile") 2>conftest.er1
28948   ac_status=$?
28949   grep -v '^ *+' conftest.er1 >conftest.err
28950   rm -f conftest.er1
28951   cat conftest.err >&5
28952   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28953   (exit $ac_status); } && {
28954          test -z "$ac_c_werror_flag" ||
28955          test ! -s conftest.err
28956        } && test -s conftest.$ac_objext; then
28957   ac_header_compiler=yes
28958 else
28959   $as_echo "$as_me: failed program was:" >&5
28960 sed 's/^/| /' conftest.$ac_ext >&5
28961
28962         ac_header_compiler=no
28963 fi
28964
28965 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28966 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
28967 $as_echo "$ac_header_compiler" >&6; }
28968
28969 # Is the header present?
28970 { $as_echo "$as_me:$LINENO: checking libintl.h presence" >&5
28971 $as_echo_n "checking libintl.h presence... " >&6; }
28972 cat >conftest.$ac_ext <<_ACEOF
28973 /* confdefs.h.  */
28974 _ACEOF
28975 cat confdefs.h >>conftest.$ac_ext
28976 cat >>conftest.$ac_ext <<_ACEOF
28977 /* end confdefs.h.  */
28978 #include <libintl.h>
28979 _ACEOF
28980 if { (ac_try="$ac_cpp conftest.$ac_ext"
28981 case "(($ac_try" in
28982   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28983   *) ac_try_echo=$ac_try;;
28984 esac
28985 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28986 $as_echo "$ac_try_echo") >&5
28987   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
28988   ac_status=$?
28989   grep -v '^ *+' conftest.er1 >conftest.err
28990   rm -f conftest.er1
28991   cat conftest.err >&5
28992   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28993   (exit $ac_status); } >/dev/null && {
28994          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
28995          test ! -s conftest.err
28996        }; then
28997   ac_header_preproc=yes
28998 else
28999   $as_echo "$as_me: failed program was:" >&5
29000 sed 's/^/| /' conftest.$ac_ext >&5
29001
29002   ac_header_preproc=no
29003 fi
29004
29005 rm -f conftest.err conftest.$ac_ext
29006 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
29007 $as_echo "$ac_header_preproc" >&6; }
29008
29009 # So?  What about this header?
29010 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
29011   yes:no: )
29012     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
29013 $as_echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
29014     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
29015 $as_echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
29016     ac_header_preproc=yes
29017     ;;
29018   no:yes:* )
29019     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
29020 $as_echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
29021     { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
29022 $as_echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
29023     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
29024 $as_echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
29025     { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
29026 $as_echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
29027     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
29028 $as_echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
29029     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
29030 $as_echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
29031     ( cat <<\_ASBOX
29032 ## ---------------------------------------- ##
29033 ## Report this to pgsql-bugs@postgresql.org ##
29034 ## ---------------------------------------- ##
29035 _ASBOX
29036      ) | sed "s/^/$as_me: WARNING:     /" >&2
29037     ;;
29038 esac
29039 { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
29040 $as_echo_n "checking for libintl.h... " >&6; }
29041 if test "${ac_cv_header_libintl_h+set}" = set; then
29042   $as_echo_n "(cached) " >&6
29043 else
29044   ac_cv_header_libintl_h=$ac_header_preproc
29045 fi
29046 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
29047 $as_echo "$ac_cv_header_libintl_h" >&6; }
29048
29049 fi
29050 if test "x$ac_cv_header_libintl_h" = x""yes; then
29051   :
29052 else
29053   { { $as_echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
29054 $as_echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
29055    { (exit 1); exit 1; }; }
29056 fi
29057
29058
29059   for ac_prog in msgfmt
29060 do
29061   # Extract the first word of "$ac_prog", so it can be a program name with args.
29062 set dummy $ac_prog; ac_word=$2
29063 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29064 $as_echo_n "checking for $ac_word... " >&6; }
29065 if test "${ac_cv_prog_MSGFMT+set}" = set; then
29066   $as_echo_n "(cached) " >&6
29067 else
29068   if test -n "$MSGFMT"; then
29069   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
29070 else
29071 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29072 for as_dir in $PATH
29073 do
29074   IFS=$as_save_IFS
29075   test -z "$as_dir" && as_dir=.
29076   for ac_exec_ext in '' $ac_executable_extensions; do
29077   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29078     ac_cv_prog_MSGFMT="$ac_prog"
29079     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29080     break 2
29081   fi
29082 done
29083 done
29084 IFS=$as_save_IFS
29085
29086 fi
29087 fi
29088 MSGFMT=$ac_cv_prog_MSGFMT
29089 if test -n "$MSGFMT"; then
29090   { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5
29091 $as_echo "$MSGFMT" >&6; }
29092 else
29093   { $as_echo "$as_me:$LINENO: result: no" >&5
29094 $as_echo "no" >&6; }
29095 fi
29096
29097
29098   test -n "$MSGFMT" && break
29099 done
29100
29101   if test -z "$MSGFMT"; then
29102     { { $as_echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
29103 $as_echo "$as_me: error: msgfmt is required for NLS" >&2;}
29104    { (exit 1); exit 1; }; }
29105   fi
29106   for ac_prog in msgmerge
29107 do
29108   # Extract the first word of "$ac_prog", so it can be a program name with args.
29109 set dummy $ac_prog; ac_word=$2
29110 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29111 $as_echo_n "checking for $ac_word... " >&6; }
29112 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
29113   $as_echo_n "(cached) " >&6
29114 else
29115   if test -n "$MSGMERGE"; then
29116   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
29117 else
29118 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29119 for as_dir in $PATH
29120 do
29121   IFS=$as_save_IFS
29122   test -z "$as_dir" && as_dir=.
29123   for ac_exec_ext in '' $ac_executable_extensions; do
29124   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29125     ac_cv_prog_MSGMERGE="$ac_prog"
29126     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29127     break 2
29128   fi
29129 done
29130 done
29131 IFS=$as_save_IFS
29132
29133 fi
29134 fi
29135 MSGMERGE=$ac_cv_prog_MSGMERGE
29136 if test -n "$MSGMERGE"; then
29137   { $as_echo "$as_me:$LINENO: result: $MSGMERGE" >&5
29138 $as_echo "$MSGMERGE" >&6; }
29139 else
29140   { $as_echo "$as_me:$LINENO: result: no" >&5
29141 $as_echo "no" >&6; }
29142 fi
29143
29144
29145   test -n "$MSGMERGE" && break
29146 done
29147
29148   for ac_prog in xgettext
29149 do
29150   # Extract the first word of "$ac_prog", so it can be a program name with args.
29151 set dummy $ac_prog; ac_word=$2
29152 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29153 $as_echo_n "checking for $ac_word... " >&6; }
29154 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
29155   $as_echo_n "(cached) " >&6
29156 else
29157   if test -n "$XGETTEXT"; then
29158   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
29159 else
29160 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29161 for as_dir in $PATH
29162 do
29163   IFS=$as_save_IFS
29164   test -z "$as_dir" && as_dir=.
29165   for ac_exec_ext in '' $ac_executable_extensions; do
29166   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29167     ac_cv_prog_XGETTEXT="$ac_prog"
29168     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29169     break 2
29170   fi
29171 done
29172 done
29173 IFS=$as_save_IFS
29174
29175 fi
29176 fi
29177 XGETTEXT=$ac_cv_prog_XGETTEXT
29178 if test -n "$XGETTEXT"; then
29179   { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5
29180 $as_echo "$XGETTEXT" >&6; }
29181 else
29182   { $as_echo "$as_me:$LINENO: result: no" >&5
29183 $as_echo "no" >&6; }
29184 fi
29185
29186
29187   test -n "$XGETTEXT" && break
29188 done
29189
29190
29191 fi
29192
29193 # Check for Tcl configuration script tclConfig.sh
29194 if test "$with_tcl" = yes; then
29195     for ac_prog in tclsh tcl tclsh8.5 tclsh85 tclsh8.4 tclsh84 tclsh8.3 tclsh83
29196 do
29197   # Extract the first word of "$ac_prog", so it can be a program name with args.
29198 set dummy $ac_prog; ac_word=$2
29199 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29200 $as_echo_n "checking for $ac_word... " >&6; }
29201 if test "${ac_cv_path_TCLSH+set}" = set; then
29202   $as_echo_n "(cached) " >&6
29203 else
29204   case $TCLSH in
29205   [\\/]* | ?:[\\/]*)
29206   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
29207   ;;
29208   *)
29209   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29210 for as_dir in $PATH
29211 do
29212   IFS=$as_save_IFS
29213   test -z "$as_dir" && as_dir=.
29214   for ac_exec_ext in '' $ac_executable_extensions; do
29215   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29216     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
29217     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29218     break 2
29219   fi
29220 done
29221 done
29222 IFS=$as_save_IFS
29223
29224   ;;
29225 esac
29226 fi
29227 TCLSH=$ac_cv_path_TCLSH
29228 if test -n "$TCLSH"; then
29229   { $as_echo "$as_me:$LINENO: result: $TCLSH" >&5
29230 $as_echo "$TCLSH" >&6; }
29231 else
29232   { $as_echo "$as_me:$LINENO: result: no" >&5
29233 $as_echo "no" >&6; }
29234 fi
29235
29236
29237   test -n "$TCLSH" && break
29238 done
29239
29240 if test x"$TCLSH" = x""; then
29241   { { $as_echo "$as_me:$LINENO: error: Tcl shell not found" >&5
29242 $as_echo "$as_me: error: Tcl shell not found" >&2;}
29243    { (exit 1); exit 1; }; }
29244 fi
29245
29246 { $as_echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
29247 $as_echo_n "checking for tclConfig.sh... " >&6; }
29248 # Let user override test
29249 if test -z "$TCL_CONFIG_SH"; then
29250     pgac_test_dirs="$with_tclconfig"
29251
29252     set X $pgac_test_dirs; shift
29253     if test $# -eq 0; then
29254         test -z "$TCLSH" && { { $as_echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
29255 $as_echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
29256    { (exit 1); exit 1; }; }
29257         set X `echo 'puts $auto_path' | $TCLSH`; shift
29258     fi
29259
29260     for pgac_dir do
29261         if test -r "$pgac_dir/tclConfig.sh"; then
29262             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
29263             break
29264         fi
29265     done
29266 fi
29267
29268 if test -z "$TCL_CONFIG_SH"; then
29269     { $as_echo "$as_me:$LINENO: result: no" >&5
29270 $as_echo "no" >&6; }
29271     { { $as_echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
29272 $as_echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
29273    { (exit 1); exit 1; }; }
29274 else
29275     { $as_echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
29276 $as_echo "$TCL_CONFIG_SH" >&6; }
29277 fi
29278
29279
29280
29281     . "$TCL_CONFIG_SH"
29282 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
29283 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
29284 eval TCL_LIBS=\"$TCL_LIBS\"
29285 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
29286 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
29287
29288         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
29289     ac_save_CPPFLAGS=$CPPFLAGS
29290     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
29291     if test "${ac_cv_header_tcl_h+set}" = set; then
29292   { $as_echo "$as_me:$LINENO: checking for tcl.h" >&5
29293 $as_echo_n "checking for tcl.h... " >&6; }
29294 if test "${ac_cv_header_tcl_h+set}" = set; then
29295   $as_echo_n "(cached) " >&6
29296 fi
29297 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
29298 $as_echo "$ac_cv_header_tcl_h" >&6; }
29299 else
29300   # Is the header compilable?
29301 { $as_echo "$as_me:$LINENO: checking tcl.h usability" >&5
29302 $as_echo_n "checking tcl.h usability... " >&6; }
29303 cat >conftest.$ac_ext <<_ACEOF
29304 /* confdefs.h.  */
29305 _ACEOF
29306 cat confdefs.h >>conftest.$ac_ext
29307 cat >>conftest.$ac_ext <<_ACEOF
29308 /* end confdefs.h.  */
29309 $ac_includes_default
29310 #include <tcl.h>
29311 _ACEOF
29312 rm -f conftest.$ac_objext
29313 if { (ac_try="$ac_compile"
29314 case "(($ac_try" in
29315   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29316   *) ac_try_echo=$ac_try;;
29317 esac
29318 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29319 $as_echo "$ac_try_echo") >&5
29320   (eval "$ac_compile") 2>conftest.er1
29321   ac_status=$?
29322   grep -v '^ *+' conftest.er1 >conftest.err
29323   rm -f conftest.er1
29324   cat conftest.err >&5
29325   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29326   (exit $ac_status); } && {
29327          test -z "$ac_c_werror_flag" ||
29328          test ! -s conftest.err
29329        } && test -s conftest.$ac_objext; then
29330   ac_header_compiler=yes
29331 else
29332   $as_echo "$as_me: failed program was:" >&5
29333 sed 's/^/| /' conftest.$ac_ext >&5
29334
29335         ac_header_compiler=no
29336 fi
29337
29338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29339 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
29340 $as_echo "$ac_header_compiler" >&6; }
29341
29342 # Is the header present?
29343 { $as_echo "$as_me:$LINENO: checking tcl.h presence" >&5
29344 $as_echo_n "checking tcl.h presence... " >&6; }
29345 cat >conftest.$ac_ext <<_ACEOF
29346 /* confdefs.h.  */
29347 _ACEOF
29348 cat confdefs.h >>conftest.$ac_ext
29349 cat >>conftest.$ac_ext <<_ACEOF
29350 /* end confdefs.h.  */
29351 #include <tcl.h>
29352 _ACEOF
29353 if { (ac_try="$ac_cpp conftest.$ac_ext"
29354 case "(($ac_try" in
29355   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29356   *) ac_try_echo=$ac_try;;
29357 esac
29358 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29359 $as_echo "$ac_try_echo") >&5
29360   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
29361   ac_status=$?
29362   grep -v '^ *+' conftest.er1 >conftest.err
29363   rm -f conftest.er1
29364   cat conftest.err >&5
29365   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29366   (exit $ac_status); } >/dev/null && {
29367          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
29368          test ! -s conftest.err
29369        }; then
29370   ac_header_preproc=yes
29371 else
29372   $as_echo "$as_me: failed program was:" >&5
29373 sed 's/^/| /' conftest.$ac_ext >&5
29374
29375   ac_header_preproc=no
29376 fi
29377
29378 rm -f conftest.err conftest.$ac_ext
29379 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
29380 $as_echo "$ac_header_preproc" >&6; }
29381
29382 # So?  What about this header?
29383 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
29384   yes:no: )
29385     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
29386 $as_echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
29387     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
29388 $as_echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
29389     ac_header_preproc=yes
29390     ;;
29391   no:yes:* )
29392     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
29393 $as_echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
29394     { $as_echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
29395 $as_echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
29396     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
29397 $as_echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
29398     { $as_echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
29399 $as_echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
29400     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
29401 $as_echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
29402     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
29403 $as_echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
29404     ( cat <<\_ASBOX
29405 ## ---------------------------------------- ##
29406 ## Report this to pgsql-bugs@postgresql.org ##
29407 ## ---------------------------------------- ##
29408 _ASBOX
29409      ) | sed "s/^/$as_me: WARNING:     /" >&2
29410     ;;
29411 esac
29412 { $as_echo "$as_me:$LINENO: checking for tcl.h" >&5
29413 $as_echo_n "checking for tcl.h... " >&6; }
29414 if test "${ac_cv_header_tcl_h+set}" = set; then
29415   $as_echo_n "(cached) " >&6
29416 else
29417   ac_cv_header_tcl_h=$ac_header_preproc
29418 fi
29419 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
29420 $as_echo "$ac_cv_header_tcl_h" >&6; }
29421
29422 fi
29423 if test "x$ac_cv_header_tcl_h" = x""yes; then
29424   :
29425 else
29426   { { $as_echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
29427 $as_echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
29428    { (exit 1); exit 1; }; }
29429 fi
29430
29431
29432     CPPFLAGS=$ac_save_CPPFLAGS
29433 fi
29434
29435 # check for <perl.h>
29436 if test "$with_perl" = yes; then
29437   ac_save_CPPFLAGS=$CPPFLAGS
29438   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
29439   { $as_echo "$as_me:$LINENO: checking for perl.h" >&5
29440 $as_echo_n "checking for perl.h... " >&6; }
29441 if test "${ac_cv_header_perl_h+set}" = set; then
29442   $as_echo_n "(cached) " >&6
29443 else
29444   cat >conftest.$ac_ext <<_ACEOF
29445 /* confdefs.h.  */
29446 _ACEOF
29447 cat confdefs.h >>conftest.$ac_ext
29448 cat >>conftest.$ac_ext <<_ACEOF
29449 /* end confdefs.h.  */
29450 #include <EXTERN.h>
29451
29452 #include <perl.h>
29453 _ACEOF
29454 rm -f conftest.$ac_objext
29455 if { (ac_try="$ac_compile"
29456 case "(($ac_try" in
29457   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29458   *) ac_try_echo=$ac_try;;
29459 esac
29460 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29461 $as_echo "$ac_try_echo") >&5
29462   (eval "$ac_compile") 2>conftest.er1
29463   ac_status=$?
29464   grep -v '^ *+' conftest.er1 >conftest.err
29465   rm -f conftest.er1
29466   cat conftest.err >&5
29467   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29468   (exit $ac_status); } && {
29469          test -z "$ac_c_werror_flag" ||
29470          test ! -s conftest.err
29471        } && test -s conftest.$ac_objext; then
29472   ac_cv_header_perl_h=yes
29473 else
29474   $as_echo "$as_me: failed program was:" >&5
29475 sed 's/^/| /' conftest.$ac_ext >&5
29476
29477         ac_cv_header_perl_h=no
29478 fi
29479
29480 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29481 fi
29482 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_perl_h" >&5
29483 $as_echo "$ac_cv_header_perl_h" >&6; }
29484 if test "x$ac_cv_header_perl_h" = x""yes; then
29485   :
29486 else
29487   { { $as_echo "$as_me:$LINENO: error: header file <perl.h> is required for Perl" >&5
29488 $as_echo "$as_me: error: header file <perl.h> is required for Perl" >&2;}
29489    { (exit 1); exit 1; }; }
29490 fi
29491
29492
29493   # While we're at it, check that we can link to libperl.
29494   # On most platforms, if perl.h is there then libperl.so will be too, but at
29495   # this writing Debian packages them separately.  There is no known reason to
29496   # waste cycles on separate probes for the Tcl or Python libraries, though.
29497   pgac_save_LIBS=$LIBS
29498   LIBS="$perl_embed_ldflags"
29499   { $as_echo "$as_me:$LINENO: checking for libperl" >&5
29500 $as_echo_n "checking for libperl... " >&6; }
29501   cat >conftest.$ac_ext <<_ACEOF
29502 /* confdefs.h.  */
29503 _ACEOF
29504 cat confdefs.h >>conftest.$ac_ext
29505 cat >>conftest.$ac_ext <<_ACEOF
29506 /* end confdefs.h.  */
29507
29508 #include <EXTERN.h>
29509 #include <perl.h>
29510
29511 int
29512 main ()
29513 {
29514 perl_alloc();
29515   ;
29516   return 0;
29517 }
29518 _ACEOF
29519 rm -f conftest.$ac_objext conftest$ac_exeext
29520 if { (ac_try="$ac_link"
29521 case "(($ac_try" in
29522   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29523   *) ac_try_echo=$ac_try;;
29524 esac
29525 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29526 $as_echo "$ac_try_echo") >&5
29527   (eval "$ac_link") 2>conftest.er1
29528   ac_status=$?
29529   grep -v '^ *+' conftest.er1 >conftest.err
29530   rm -f conftest.er1
29531   cat conftest.err >&5
29532   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29533   (exit $ac_status); } && {
29534          test -z "$ac_c_werror_flag" ||
29535          test ! -s conftest.err
29536        } && test -s conftest$ac_exeext && {
29537          test "$cross_compiling" = yes ||
29538          $as_test_x conftest$ac_exeext
29539        }; then
29540   { $as_echo "$as_me:$LINENO: result: yes" >&5
29541 $as_echo "yes" >&6; }
29542 else
29543   $as_echo "$as_me: failed program was:" >&5
29544 sed 's/^/| /' conftest.$ac_ext >&5
29545
29546         { $as_echo "$as_me:$LINENO: result: no" >&5
29547 $as_echo "no" >&6; }
29548      { { $as_echo "$as_me:$LINENO: error: libperl library is required for Perl" >&5
29549 $as_echo "$as_me: error: libperl library is required for Perl" >&2;}
29550    { (exit 1); exit 1; }; }
29551 fi
29552
29553 rm -rf conftest.dSYM
29554 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29555       conftest$ac_exeext conftest.$ac_ext
29556   LIBS=$pgac_save_LIBS
29557   CPPFLAGS=$ac_save_CPPFLAGS
29558 fi
29559
29560 # check for <Python.h>
29561 if test "$with_python" = yes; then
29562   ac_save_CPPFLAGS=$CPPFLAGS
29563   CPPFLAGS="$python_includespec $CPPFLAGS"
29564   if test "${ac_cv_header_Python_h+set}" = set; then
29565   { $as_echo "$as_me:$LINENO: checking for Python.h" >&5
29566 $as_echo_n "checking for Python.h... " >&6; }
29567 if test "${ac_cv_header_Python_h+set}" = set; then
29568   $as_echo_n "(cached) " >&6
29569 fi
29570 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_Python_h" >&5
29571 $as_echo "$ac_cv_header_Python_h" >&6; }
29572 else
29573   # Is the header compilable?
29574 { $as_echo "$as_me:$LINENO: checking Python.h usability" >&5
29575 $as_echo_n "checking Python.h usability... " >&6; }
29576 cat >conftest.$ac_ext <<_ACEOF
29577 /* confdefs.h.  */
29578 _ACEOF
29579 cat confdefs.h >>conftest.$ac_ext
29580 cat >>conftest.$ac_ext <<_ACEOF
29581 /* end confdefs.h.  */
29582 $ac_includes_default
29583 #include <Python.h>
29584 _ACEOF
29585 rm -f conftest.$ac_objext
29586 if { (ac_try="$ac_compile"
29587 case "(($ac_try" in
29588   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29589   *) ac_try_echo=$ac_try;;
29590 esac
29591 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29592 $as_echo "$ac_try_echo") >&5
29593   (eval "$ac_compile") 2>conftest.er1
29594   ac_status=$?
29595   grep -v '^ *+' conftest.er1 >conftest.err
29596   rm -f conftest.er1
29597   cat conftest.err >&5
29598   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29599   (exit $ac_status); } && {
29600          test -z "$ac_c_werror_flag" ||
29601          test ! -s conftest.err
29602        } && test -s conftest.$ac_objext; then
29603   ac_header_compiler=yes
29604 else
29605   $as_echo "$as_me: failed program was:" >&5
29606 sed 's/^/| /' conftest.$ac_ext >&5
29607
29608         ac_header_compiler=no
29609 fi
29610
29611 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29612 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
29613 $as_echo "$ac_header_compiler" >&6; }
29614
29615 # Is the header present?
29616 { $as_echo "$as_me:$LINENO: checking Python.h presence" >&5
29617 $as_echo_n "checking Python.h presence... " >&6; }
29618 cat >conftest.$ac_ext <<_ACEOF
29619 /* confdefs.h.  */
29620 _ACEOF
29621 cat confdefs.h >>conftest.$ac_ext
29622 cat >>conftest.$ac_ext <<_ACEOF
29623 /* end confdefs.h.  */
29624 #include <Python.h>
29625 _ACEOF
29626 if { (ac_try="$ac_cpp conftest.$ac_ext"
29627 case "(($ac_try" in
29628   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29629   *) ac_try_echo=$ac_try;;
29630 esac
29631 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29632 $as_echo "$ac_try_echo") >&5
29633   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
29634   ac_status=$?
29635   grep -v '^ *+' conftest.er1 >conftest.err
29636   rm -f conftest.er1
29637   cat conftest.err >&5
29638   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29639   (exit $ac_status); } >/dev/null && {
29640          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
29641          test ! -s conftest.err
29642        }; then
29643   ac_header_preproc=yes
29644 else
29645   $as_echo "$as_me: failed program was:" >&5
29646 sed 's/^/| /' conftest.$ac_ext >&5
29647
29648   ac_header_preproc=no
29649 fi
29650
29651 rm -f conftest.err conftest.$ac_ext
29652 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
29653 $as_echo "$ac_header_preproc" >&6; }
29654
29655 # So?  What about this header?
29656 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
29657   yes:no: )
29658     { $as_echo "$as_me:$LINENO: WARNING: Python.h: accepted by the compiler, rejected by the preprocessor!" >&5
29659 $as_echo "$as_me: WARNING: Python.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
29660     { $as_echo "$as_me:$LINENO: WARNING: Python.h: proceeding with the compiler's result" >&5
29661 $as_echo "$as_me: WARNING: Python.h: proceeding with the compiler's result" >&2;}
29662     ac_header_preproc=yes
29663     ;;
29664   no:yes:* )
29665     { $as_echo "$as_me:$LINENO: WARNING: Python.h: present but cannot be compiled" >&5
29666 $as_echo "$as_me: WARNING: Python.h: present but cannot be compiled" >&2;}
29667     { $as_echo "$as_me:$LINENO: WARNING: Python.h:     check for missing prerequisite headers?" >&5
29668 $as_echo "$as_me: WARNING: Python.h:     check for missing prerequisite headers?" >&2;}
29669     { $as_echo "$as_me:$LINENO: WARNING: Python.h: see the Autoconf documentation" >&5
29670 $as_echo "$as_me: WARNING: Python.h: see the Autoconf documentation" >&2;}
29671     { $as_echo "$as_me:$LINENO: WARNING: Python.h:     section \"Present But Cannot Be Compiled\"" >&5
29672 $as_echo "$as_me: WARNING: Python.h:     section \"Present But Cannot Be Compiled\"" >&2;}
29673     { $as_echo "$as_me:$LINENO: WARNING: Python.h: proceeding with the preprocessor's result" >&5
29674 $as_echo "$as_me: WARNING: Python.h: proceeding with the preprocessor's result" >&2;}
29675     { $as_echo "$as_me:$LINENO: WARNING: Python.h: in the future, the compiler will take precedence" >&5
29676 $as_echo "$as_me: WARNING: Python.h: in the future, the compiler will take precedence" >&2;}
29677     ( cat <<\_ASBOX
29678 ## ---------------------------------------- ##
29679 ## Report this to pgsql-bugs@postgresql.org ##
29680 ## ---------------------------------------- ##
29681 _ASBOX
29682      ) | sed "s/^/$as_me: WARNING:     /" >&2
29683     ;;
29684 esac
29685 { $as_echo "$as_me:$LINENO: checking for Python.h" >&5
29686 $as_echo_n "checking for Python.h... " >&6; }
29687 if test "${ac_cv_header_Python_h+set}" = set; then
29688   $as_echo_n "(cached) " >&6
29689 else
29690   ac_cv_header_Python_h=$ac_header_preproc
29691 fi
29692 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_Python_h" >&5
29693 $as_echo "$ac_cv_header_Python_h" >&6; }
29694
29695 fi
29696 if test "x$ac_cv_header_Python_h" = x""yes; then
29697   :
29698 else
29699   { { $as_echo "$as_me:$LINENO: error: header file <Python.h> is required for Python" >&5
29700 $as_echo "$as_me: error: header file <Python.h> is required for Python" >&2;}
29701    { (exit 1); exit 1; }; }
29702 fi
29703
29704
29705   CPPFLAGS=$ac_save_CPPFLAGS
29706 fi
29707
29708 #
29709 # Check for DocBook and tools
29710 #
29711 for ac_prog in onsgmls nsgmls
29712 do
29713   # Extract the first word of "$ac_prog", so it can be a program name with args.
29714 set dummy $ac_prog; ac_word=$2
29715 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29716 $as_echo_n "checking for $ac_word... " >&6; }
29717 if test "${ac_cv_prog_NSGMLS+set}" = set; then
29718   $as_echo_n "(cached) " >&6
29719 else
29720   if test -n "$NSGMLS"; then
29721   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
29722 else
29723 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29724 for as_dir in $PATH
29725 do
29726   IFS=$as_save_IFS
29727   test -z "$as_dir" && as_dir=.
29728   for ac_exec_ext in '' $ac_executable_extensions; do
29729   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29730     ac_cv_prog_NSGMLS="$ac_prog"
29731     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29732     break 2
29733   fi
29734 done
29735 done
29736 IFS=$as_save_IFS
29737
29738 fi
29739 fi
29740 NSGMLS=$ac_cv_prog_NSGMLS
29741 if test -n "$NSGMLS"; then
29742   { $as_echo "$as_me:$LINENO: result: $NSGMLS" >&5
29743 $as_echo "$NSGMLS" >&6; }
29744 else
29745   { $as_echo "$as_me:$LINENO: result: no" >&5
29746 $as_echo "no" >&6; }
29747 fi
29748
29749
29750   test -n "$NSGMLS" && break
29751 done
29752
29753 for ac_prog in openjade jade
29754 do
29755   # Extract the first word of "$ac_prog", so it can be a program name with args.
29756 set dummy $ac_prog; ac_word=$2
29757 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29758 $as_echo_n "checking for $ac_word... " >&6; }
29759 if test "${ac_cv_prog_JADE+set}" = set; then
29760   $as_echo_n "(cached) " >&6
29761 else
29762   if test -n "$JADE"; then
29763   ac_cv_prog_JADE="$JADE" # Let the user override the test.
29764 else
29765 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29766 for as_dir in $PATH
29767 do
29768   IFS=$as_save_IFS
29769   test -z "$as_dir" && as_dir=.
29770   for ac_exec_ext in '' $ac_executable_extensions; do
29771   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29772     ac_cv_prog_JADE="$ac_prog"
29773     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29774     break 2
29775   fi
29776 done
29777 done
29778 IFS=$as_save_IFS
29779
29780 fi
29781 fi
29782 JADE=$ac_cv_prog_JADE
29783 if test -n "$JADE"; then
29784   { $as_echo "$as_me:$LINENO: result: $JADE" >&5
29785 $as_echo "$JADE" >&6; }
29786 else
29787   { $as_echo "$as_me:$LINENO: result: no" >&5
29788 $as_echo "no" >&6; }
29789 fi
29790
29791
29792   test -n "$JADE" && break
29793 done
29794
29795
29796 { $as_echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
29797 $as_echo_n "checking for DocBook V4.2... " >&6; }
29798 if test "${pgac_cv_check_docbook+set}" = set; then
29799   $as_echo_n "(cached) " >&6
29800 else
29801   cat >conftest.sgml <<EOF
29802 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
29803 <book>
29804  <title>test</title>
29805  <chapter>
29806   <title>random</title>
29807    <sect1>
29808     <title>testsect</title>
29809     <para>text</para>
29810   </sect1>
29811  </chapter>
29812 </book>
29813 EOF
29814
29815 pgac_cv_check_docbook=no
29816
29817 if test -n "$NSGMLS"; then
29818   $NSGMLS -s conftest.sgml 1>&5 2>&1
29819   if test $? -eq 0; then
29820     pgac_cv_check_docbook=yes
29821   fi
29822 fi
29823 rm -f conftest.sgml
29824 fi
29825 { $as_echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
29826 $as_echo "$pgac_cv_check_docbook" >&6; }
29827
29828 have_docbook=$pgac_cv_check_docbook
29829
29830
29831 { $as_echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
29832 $as_echo_n "checking for DocBook stylesheets... " >&6; }
29833 if test "${pgac_cv_path_stylesheets+set}" = set; then
29834   $as_echo_n "(cached) " >&6
29835 else
29836   if test -n "$DOCBOOKSTYLE"; then
29837   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
29838 else
29839   for pgac_prefix in /usr /usr/local /opt /sw; do
29840     for pgac_infix in share lib; do
29841       for pgac_postfix in \
29842         sgml/stylesheets/nwalsh-modular \
29843         sgml/stylesheets/docbook \
29844         sgml/stylesheets/dsssl/docbook \
29845         sgml/docbook-dsssl \
29846         sgml/docbook/dsssl/modular \
29847         sgml/docbook/stylesheet/dsssl/modular \
29848         sgml/docbook/dsssl-stylesheets \
29849         sgml/dsssl/docbook-dsssl-nwalsh
29850       do
29851         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
29852         if test -r "$pgac_candidate/html/docbook.dsl" \
29853            && test -r "$pgac_candidate/print/docbook.dsl"
29854         then
29855           pgac_cv_path_stylesheets=$pgac_candidate
29856           break 3
29857         fi
29858       done
29859     done
29860   done
29861 fi
29862 fi
29863
29864 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
29865
29866 if test -n "$DOCBOOKSTYLE"; then
29867   { $as_echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
29868 $as_echo "$DOCBOOKSTYLE" >&6; }
29869 else
29870   { $as_echo "$as_me:$LINENO: result: no" >&5
29871 $as_echo "no" >&6; }
29872 fi
29873 if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
29874   COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
29875
29876 else
29877   # Extract the first word of "collateindex.pl", so it can be a program name with args.
29878 set dummy collateindex.pl; ac_word=$2
29879 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29880 $as_echo_n "checking for $ac_word... " >&6; }
29881 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
29882   $as_echo_n "(cached) " >&6
29883 else
29884   case $COLLATEINDEX in
29885   [\\/]* | ?:[\\/]*)
29886   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
29887   ;;
29888   *)
29889   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29890 for as_dir in $PATH
29891 do
29892   IFS=$as_save_IFS
29893   test -z "$as_dir" && as_dir=.
29894   for ac_exec_ext in '' $ac_executable_extensions; do
29895   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29896     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
29897     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29898     break 2
29899   fi
29900 done
29901 done
29902 IFS=$as_save_IFS
29903
29904   ;;
29905 esac
29906 fi
29907 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
29908 if test -n "$COLLATEINDEX"; then
29909   { $as_echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
29910 $as_echo "$COLLATEINDEX" >&6; }
29911 else
29912   { $as_echo "$as_me:$LINENO: result: no" >&5
29913 $as_echo "no" >&6; }
29914 fi
29915
29916
29917 fi
29918 for ac_prog in xsltproc
29919 do
29920   # Extract the first word of "$ac_prog", so it can be a program name with args.
29921 set dummy $ac_prog; ac_word=$2
29922 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29923 $as_echo_n "checking for $ac_word... " >&6; }
29924 if test "${ac_cv_prog_XSLTPROC+set}" = set; then
29925   $as_echo_n "(cached) " >&6
29926 else
29927   if test -n "$XSLTPROC"; then
29928   ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
29929 else
29930 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29931 for as_dir in $PATH
29932 do
29933   IFS=$as_save_IFS
29934   test -z "$as_dir" && as_dir=.
29935   for ac_exec_ext in '' $ac_executable_extensions; do
29936   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29937     ac_cv_prog_XSLTPROC="$ac_prog"
29938     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29939     break 2
29940   fi
29941 done
29942 done
29943 IFS=$as_save_IFS
29944
29945 fi
29946 fi
29947 XSLTPROC=$ac_cv_prog_XSLTPROC
29948 if test -n "$XSLTPROC"; then
29949   { $as_echo "$as_me:$LINENO: result: $XSLTPROC" >&5
29950 $as_echo "$XSLTPROC" >&6; }
29951 else
29952   { $as_echo "$as_me:$LINENO: result: no" >&5
29953 $as_echo "no" >&6; }
29954 fi
29955
29956
29957   test -n "$XSLTPROC" && break
29958 done
29959
29960 for ac_prog in osx sgml2xml sx
29961 do
29962   # Extract the first word of "$ac_prog", so it can be a program name with args.
29963 set dummy $ac_prog; ac_word=$2
29964 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29965 $as_echo_n "checking for $ac_word... " >&6; }
29966 if test "${ac_cv_prog_OSX+set}" = set; then
29967   $as_echo_n "(cached) " >&6
29968 else
29969   if test -n "$OSX"; then
29970   ac_cv_prog_OSX="$OSX" # Let the user override the test.
29971 else
29972 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29973 for as_dir in $PATH
29974 do
29975   IFS=$as_save_IFS
29976   test -z "$as_dir" && as_dir=.
29977   for ac_exec_ext in '' $ac_executable_extensions; do
29978   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29979     ac_cv_prog_OSX="$ac_prog"
29980     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29981     break 2
29982   fi
29983 done
29984 done
29985 IFS=$as_save_IFS
29986
29987 fi
29988 fi
29989 OSX=$ac_cv_prog_OSX
29990 if test -n "$OSX"; then
29991   { $as_echo "$as_me:$LINENO: result: $OSX" >&5
29992 $as_echo "$OSX" >&6; }
29993 else
29994   { $as_echo "$as_me:$LINENO: result: no" >&5
29995 $as_echo "no" >&6; }
29996 fi
29997
29998
29999   test -n "$OSX" && break
30000 done
30001
30002
30003 # Thread testing
30004
30005 # We have to run the thread test near the end so we have all our symbols
30006 # defined.  Cross compiling throws a warning.
30007 #
30008 if test "$enable_thread_safety" = yes; then
30009 if test "$PORTNAME" != "win32"
30010 then
30011 { $as_echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
30012 $as_echo_n "checking thread safety of required library functions... " >&6; }
30013
30014 _CFLAGS="$CFLAGS"
30015 _LIBS="$LIBS"
30016 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
30017 LIBS="$LIBS $PTHREAD_LIBS"
30018 if test "$cross_compiling" = yes; then
30019   { $as_echo "$as_me:$LINENO: result: maybe" >&5
30020 $as_echo "maybe" >&6; }
30021   { $as_echo "$as_me:$LINENO: WARNING:
30022 *** Skipping thread test program because of cross-compile build.
30023 *** Run the program in src/test/thread on the target machine.
30024 " >&5
30025 $as_echo "$as_me: WARNING:
30026 *** Skipping thread test program because of cross-compile build.
30027 *** Run the program in src/test/thread on the target machine.
30028 " >&2;}
30029 else
30030   cat >conftest.$ac_ext <<_ACEOF
30031 /* confdefs.h.  */
30032 _ACEOF
30033 cat confdefs.h >>conftest.$ac_ext
30034 cat >>conftest.$ac_ext <<_ACEOF
30035 /* end confdefs.h.  */
30036 #include "$srcdir/src/test/thread/thread_test.c"
30037 _ACEOF
30038 rm -f conftest$ac_exeext
30039 if { (ac_try="$ac_link"
30040 case "(($ac_try" in
30041   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30042   *) ac_try_echo=$ac_try;;
30043 esac
30044 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30045 $as_echo "$ac_try_echo") >&5
30046   (eval "$ac_link") 2>&5
30047   ac_status=$?
30048   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30049   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
30050   { (case "(($ac_try" in
30051   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30052   *) ac_try_echo=$ac_try;;
30053 esac
30054 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30055 $as_echo "$ac_try_echo") >&5
30056   (eval "$ac_try") 2>&5
30057   ac_status=$?
30058   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30059   (exit $ac_status); }; }; then
30060   { $as_echo "$as_me:$LINENO: result: yes" >&5
30061 $as_echo "yes" >&6; }
30062 else
30063   $as_echo "$as_me: program exited with status $ac_status" >&5
30064 $as_echo "$as_me: failed program was:" >&5
30065 sed 's/^/| /' conftest.$ac_ext >&5
30066
30067 ( exit $ac_status )
30068 { $as_echo "$as_me:$LINENO: result: no" >&5
30069 $as_echo "no" >&6; }
30070   { { $as_echo "$as_me:$LINENO: error: thread test program failed
30071 This platform is not thread-safe.  Check the file 'config.log' or compile
30072 and run src/test/thread/thread_test for the exact reason.
30073 Use --disable-thread-safety to disable thread safety." >&5
30074 $as_echo "$as_me: error: thread test program failed
30075 This platform is not thread-safe.  Check the file 'config.log' or compile
30076 and run src/test/thread/thread_test for the exact reason.
30077 Use --disable-thread-safety to disable thread safety." >&2;}
30078    { (exit 1); exit 1; }; }
30079 fi
30080 rm -rf conftest.dSYM
30081 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
30082 fi
30083
30084
30085 CFLAGS="$_CFLAGS"
30086 LIBS="$_LIBS"
30087 else
30088 { $as_echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
30089 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
30090 fi
30091 fi
30092
30093 # If compiler will take -Wl,--as-needed (or various platform-specific
30094 # spellings thereof) then add that to LDFLAGS.  This is much easier than
30095 # trying to filter LIBS to the minimum for each executable.
30096 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
30097 # libreadline; therefore we postpone testing it until we know what library
30098 # dependencies readline has.  The test code will try to link with $LIBS.
30099 if test "$with_readline" = yes; then
30100   link_test_func=readline
30101 else
30102   link_test_func=exit
30103 fi
30104
30105 if test "$PORTNAME" = "darwin"; then
30106   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
30107 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
30108 if test "${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+set}" = set; then
30109   $as_echo_n "(cached) " >&6
30110 else
30111   pgac_save_LDFLAGS=$LDFLAGS
30112 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
30113 if test "$cross_compiling" = yes; then
30114   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
30115 else
30116   cat >conftest.$ac_ext <<_ACEOF
30117 /* confdefs.h.  */
30118 _ACEOF
30119 cat confdefs.h >>conftest.$ac_ext
30120 cat >>conftest.$ac_ext <<_ACEOF
30121 /* end confdefs.h.  */
30122 extern void $link_test_func (); void (*fptr) () = $link_test_func;
30123 int
30124 main ()
30125 {
30126
30127   ;
30128   return 0;
30129 }
30130 _ACEOF
30131 rm -f conftest$ac_exeext
30132 if { (ac_try="$ac_link"
30133 case "(($ac_try" in
30134   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30135   *) ac_try_echo=$ac_try;;
30136 esac
30137 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30138 $as_echo "$ac_try_echo") >&5
30139   (eval "$ac_link") 2>&5
30140   ac_status=$?
30141   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30142   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
30143   { (case "(($ac_try" in
30144   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30145   *) ac_try_echo=$ac_try;;
30146 esac
30147 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30148 $as_echo "$ac_try_echo") >&5
30149   (eval "$ac_try") 2>&5
30150   ac_status=$?
30151   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30152   (exit $ac_status); }; }; then
30153   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
30154 else
30155   $as_echo "$as_me: program exited with status $ac_status" >&5
30156 $as_echo "$as_me: failed program was:" >&5
30157 sed 's/^/| /' conftest.$ac_ext >&5
30158
30159 ( exit $ac_status )
30160 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
30161 fi
30162 rm -rf conftest.dSYM
30163 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
30164 fi
30165
30166
30167 LDFLAGS="$pgac_save_LDFLAGS"
30168 fi
30169 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
30170 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
30171 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
30172   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
30173 fi
30174
30175 elif test "$PORTNAME" = "openbsd"; then
30176   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wl,-Bdynamic" >&5
30177 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
30178 if test "${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+set}" = set; then
30179   $as_echo_n "(cached) " >&6
30180 else
30181   pgac_save_LDFLAGS=$LDFLAGS
30182 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
30183 if test "$cross_compiling" = yes; then
30184   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
30185 else
30186   cat >conftest.$ac_ext <<_ACEOF
30187 /* confdefs.h.  */
30188 _ACEOF
30189 cat confdefs.h >>conftest.$ac_ext
30190 cat >>conftest.$ac_ext <<_ACEOF
30191 /* end confdefs.h.  */
30192 extern void $link_test_func (); void (*fptr) () = $link_test_func;
30193 int
30194 main ()
30195 {
30196
30197   ;
30198   return 0;
30199 }
30200 _ACEOF
30201 rm -f conftest$ac_exeext
30202 if { (ac_try="$ac_link"
30203 case "(($ac_try" in
30204   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30205   *) ac_try_echo=$ac_try;;
30206 esac
30207 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30208 $as_echo "$ac_try_echo") >&5
30209   (eval "$ac_link") 2>&5
30210   ac_status=$?
30211   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30212   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
30213   { (case "(($ac_try" in
30214   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30215   *) ac_try_echo=$ac_try;;
30216 esac
30217 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30218 $as_echo "$ac_try_echo") >&5
30219   (eval "$ac_try") 2>&5
30220   ac_status=$?
30221   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30222   (exit $ac_status); }; }; then
30223   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
30224 else
30225   $as_echo "$as_me: program exited with status $ac_status" >&5
30226 $as_echo "$as_me: failed program was:" >&5
30227 sed 's/^/| /' conftest.$ac_ext >&5
30228
30229 ( exit $ac_status )
30230 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
30231 fi
30232 rm -rf conftest.dSYM
30233 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
30234 fi
30235
30236
30237 LDFLAGS="$pgac_save_LDFLAGS"
30238 fi
30239 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
30240 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
30241 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
30242   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
30243 fi
30244
30245 else
30246   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wl,--as-needed" >&5
30247 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
30248 if test "${pgac_cv_prog_cc_ldflags__Wl___as_needed+set}" = set; then
30249   $as_echo_n "(cached) " >&6
30250 else
30251   pgac_save_LDFLAGS=$LDFLAGS
30252 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
30253 if test "$cross_compiling" = yes; then
30254   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
30255 else
30256   cat >conftest.$ac_ext <<_ACEOF
30257 /* confdefs.h.  */
30258 _ACEOF
30259 cat confdefs.h >>conftest.$ac_ext
30260 cat >>conftest.$ac_ext <<_ACEOF
30261 /* end confdefs.h.  */
30262 extern void $link_test_func (); void (*fptr) () = $link_test_func;
30263 int
30264 main ()
30265 {
30266
30267   ;
30268   return 0;
30269 }
30270 _ACEOF
30271 rm -f conftest$ac_exeext
30272 if { (ac_try="$ac_link"
30273 case "(($ac_try" in
30274   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30275   *) ac_try_echo=$ac_try;;
30276 esac
30277 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30278 $as_echo "$ac_try_echo") >&5
30279   (eval "$ac_link") 2>&5
30280   ac_status=$?
30281   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30282   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
30283   { (case "(($ac_try" in
30284   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30285   *) ac_try_echo=$ac_try;;
30286 esac
30287 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30288 $as_echo "$ac_try_echo") >&5
30289   (eval "$ac_try") 2>&5
30290   ac_status=$?
30291   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30292   (exit $ac_status); }; }; then
30293   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
30294 else
30295   $as_echo "$as_me: program exited with status $ac_status" >&5
30296 $as_echo "$as_me: failed program was:" >&5
30297 sed 's/^/| /' conftest.$ac_ext >&5
30298
30299 ( exit $ac_status )
30300 pgac_cv_prog_cc_ldflags__Wl___as_needed=no
30301 fi
30302 rm -rf conftest.dSYM
30303 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
30304 fi
30305
30306
30307 LDFLAGS="$pgac_save_LDFLAGS"
30308 fi
30309 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
30310 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
30311 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
30312   LDFLAGS="$LDFLAGS -Wl,--as-needed"
30313 fi
30314
30315 fi
30316
30317 # Create compiler version string
30318 if test x"$GCC" = x"yes" ; then
30319   cc_string=`${CC} --version | sed q`
30320   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
30321 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
30322   cc_string=`${CC} -V 2>&1 | sed q`
30323 else
30324   cc_string=$CC
30325 fi
30326
30327
30328 cat >>confdefs.h <<_ACEOF
30329 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
30330 _ACEOF
30331
30332
30333 # Supply a numeric version string for use by 3rd party add-ons
30334 # awk -F is a regex on some platforms, and not on others, so make "." a tab
30335 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
30336 tr '.' '        ' |
30337 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
30338
30339 cat >>confdefs.h <<_ACEOF
30340 #define PG_VERSION_NUM $PG_VERSION_NUM
30341 _ACEOF
30342
30343
30344
30345 # Begin output steps
30346
30347 { $as_echo "$as_me:$LINENO: using compiler=$cc_string" >&5
30348 $as_echo "$as_me: using compiler=$cc_string" >&6;}
30349 { $as_echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
30350 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
30351 { $as_echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
30352 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
30353 { $as_echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
30354 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
30355
30356 # prepare build tree if outside source tree
30357 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
30358 # Note 2: /bin/pwd might be better than shell's built-in at getting
30359 #         a symlink-free name.
30360 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
30361   vpath_build=no
30362 else
30363   vpath_build=yes
30364   if test "$no_create" != yes; then
30365     $as_echo_n "preparing build tree... " >&6
30366     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
30367     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
30368       || { { $as_echo "$as_me:$LINENO: error: failed" >&5
30369 $as_echo "$as_me: error: failed" >&2;}
30370    { (exit 1); exit 1; }; }
30371     { $as_echo "$as_me:$LINENO: result: done" >&5
30372 $as_echo "done" >&6; }
30373   fi
30374 fi
30375
30376
30377
30378 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
30379
30380
30381 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}"
30382
30383
30384 if test "$PORTNAME" = "win32"; then
30385 ac_config_commands="$ac_config_commands check_win32_symlinks"
30386
30387 fi
30388
30389 ac_config_headers="$ac_config_headers src/include/pg_config.h"
30390
30391
30392 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
30393
30394
30395 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
30396
30397
30398 cat >confcache <<\_ACEOF
30399 # This file is a shell script that caches the results of configure
30400 # tests run on this system so they can be shared between configure
30401 # scripts and configure runs, see configure's option --config-cache.
30402 # It is not useful on other systems.  If it contains results you don't
30403 # want to keep, you may remove or edit it.
30404 #
30405 # config.status only pays attention to the cache file if you give it
30406 # the --recheck option to rerun configure.
30407 #
30408 # `ac_cv_env_foo' variables (set or unset) will be overridden when
30409 # loading this file, other *unset* `ac_cv_foo' will be assigned the
30410 # following values.
30411
30412 _ACEOF
30413
30414 # The following way of writing the cache mishandles newlines in values,
30415 # but we know of no workaround that is simple, portable, and efficient.
30416 # So, we kill variables containing newlines.
30417 # Ultrix sh set writes to stderr and can't be redirected directly,
30418 # and sets the high bit in the cache file unless we assign to the vars.
30419 (
30420   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
30421     eval ac_val=\$$ac_var
30422     case $ac_val in #(
30423     *${as_nl}*)
30424       case $ac_var in #(
30425       *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
30426 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
30427       esac
30428       case $ac_var in #(
30429       _ | IFS | as_nl) ;; #(
30430       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
30431       *) $as_unset $ac_var ;;
30432       esac ;;
30433     esac
30434   done
30435
30436   (set) 2>&1 |
30437     case $as_nl`(ac_space=' '; set) 2>&1` in #(
30438     *${as_nl}ac_space=\ *)
30439       # `set' does not quote correctly, so add quotes (double-quote
30440       # substitution turns \\\\ into \\, and sed turns \\ into \).
30441       sed -n \
30442         "s/'/'\\\\''/g;
30443           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
30444       ;; #(
30445     *)
30446       # `set' quotes correctly as required by POSIX, so do not add quotes.
30447       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
30448       ;;
30449     esac |
30450     sort
30451 ) |
30452   sed '
30453      /^ac_cv_env_/b end
30454      t clear
30455      :clear
30456      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
30457      t end
30458      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
30459      :end' >>confcache
30460 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
30461   if test -w "$cache_file"; then
30462     test "x$cache_file" != "x/dev/null" &&
30463       { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
30464 $as_echo "$as_me: updating cache $cache_file" >&6;}
30465     cat confcache >$cache_file
30466   else
30467     { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
30468 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
30469   fi
30470 fi
30471 rm -f confcache
30472
30473 test "x$prefix" = xNONE && prefix=$ac_default_prefix
30474 # Let make expand exec_prefix.
30475 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
30476
30477 DEFS=-DHAVE_CONFIG_H
30478
30479 ac_libobjs=
30480 ac_ltlibobjs=
30481 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
30482   # 1. Remove the extension, and $U if already installed.
30483   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
30484   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
30485   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
30486   #    will be set to the directory where LIBOBJS objects are built.
30487   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
30488   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
30489 done
30490 LIBOBJS=$ac_libobjs
30491
30492 LTLIBOBJS=$ac_ltlibobjs
30493
30494
30495
30496
30497 : ${CONFIG_STATUS=./config.status}
30498 ac_write_fail=0
30499 ac_clean_files_save=$ac_clean_files
30500 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
30501 { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
30502 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
30503 cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30504 #! $SHELL
30505 # Generated by $as_me.
30506 # Run this file to recreate the current configuration.
30507 # Compiler output produced by configure, useful for debugging
30508 # configure, is in config.log if it exists.
30509
30510 debug=false
30511 ac_cs_recheck=false
30512 ac_cs_silent=false
30513 SHELL=\${CONFIG_SHELL-$SHELL}
30514 _ACEOF
30515
30516 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30517 ## --------------------- ##
30518 ## M4sh Initialization.  ##
30519 ## --------------------- ##
30520
30521 # Be more Bourne compatible
30522 DUALCASE=1; export DUALCASE # for MKS sh
30523 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
30524   emulate sh
30525   NULLCMD=:
30526   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
30527   # is contrary to our usage.  Disable this feature.
30528   alias -g '${1+"$@"}'='"$@"'
30529   setopt NO_GLOB_SUBST
30530 else
30531   case `(set -o) 2>/dev/null` in
30532   *posix*) set -o posix ;;
30533 esac
30534
30535 fi
30536
30537
30538
30539
30540 # PATH needs CR
30541 # Avoid depending upon Character Ranges.
30542 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
30543 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
30544 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
30545 as_cr_digits='0123456789'
30546 as_cr_alnum=$as_cr_Letters$as_cr_digits
30547
30548 as_nl='
30549 '
30550 export as_nl
30551 # Printing a long string crashes Solaris 7 /usr/bin/printf.
30552 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
30553 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
30554 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
30555 if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
30556   as_echo='printf %s\n'
30557   as_echo_n='printf %s'
30558 else
30559   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
30560     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
30561     as_echo_n='/usr/ucb/echo -n'
30562   else
30563     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
30564     as_echo_n_body='eval
30565       arg=$1;
30566       case $arg in
30567       *"$as_nl"*)
30568         expr "X$arg" : "X\\(.*\\)$as_nl";
30569         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
30570       esac;
30571       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
30572     '
30573     export as_echo_n_body
30574     as_echo_n='sh -c $as_echo_n_body as_echo'
30575   fi
30576   export as_echo_body
30577   as_echo='sh -c $as_echo_body as_echo'
30578 fi
30579
30580 # The user is always right.
30581 if test "${PATH_SEPARATOR+set}" != set; then
30582   PATH_SEPARATOR=:
30583   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
30584     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
30585       PATH_SEPARATOR=';'
30586   }
30587 fi
30588
30589 # Support unset when possible.
30590 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
30591   as_unset=unset
30592 else
30593   as_unset=false
30594 fi
30595
30596
30597 # IFS
30598 # We need space, tab and new line, in precisely that order.  Quoting is
30599 # there to prevent editors from complaining about space-tab.
30600 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
30601 # splitting by setting IFS to empty value.)
30602 IFS=" ""        $as_nl"
30603
30604 # Find who we are.  Look in the path if we contain no directory separator.
30605 case $0 in
30606   *[\\/]* ) as_myself=$0 ;;
30607   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30608 for as_dir in $PATH
30609 do
30610   IFS=$as_save_IFS
30611   test -z "$as_dir" && as_dir=.
30612   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
30613 done
30614 IFS=$as_save_IFS
30615
30616      ;;
30617 esac
30618 # We did not find ourselves, most probably we were run as `sh COMMAND'
30619 # in which case we are not to be found in the path.
30620 if test "x$as_myself" = x; then
30621   as_myself=$0
30622 fi
30623 if test ! -f "$as_myself"; then
30624   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
30625   { (exit 1); exit 1; }
30626 fi
30627
30628 # Work around bugs in pre-3.0 UWIN ksh.
30629 for as_var in ENV MAIL MAILPATH
30630 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
30631 done
30632 PS1='$ '
30633 PS2='> '
30634 PS4='+ '
30635
30636 # NLS nuisances.
30637 LC_ALL=C
30638 export LC_ALL
30639 LANGUAGE=C
30640 export LANGUAGE
30641
30642 # Required to use basename.
30643 if expr a : '\(a\)' >/dev/null 2>&1 &&
30644    test "X`expr 00001 : '.*\(...\)'`" = X001; then
30645   as_expr=expr
30646 else
30647   as_expr=false
30648 fi
30649
30650 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
30651   as_basename=basename
30652 else
30653   as_basename=false
30654 fi
30655
30656
30657 # Name of the executable.
30658 as_me=`$as_basename -- "$0" ||
30659 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
30660          X"$0" : 'X\(//\)$' \| \
30661          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
30662 $as_echo X/"$0" |
30663     sed '/^.*\/\([^/][^/]*\)\/*$/{
30664             s//\1/
30665             q
30666           }
30667           /^X\/\(\/\/\)$/{
30668             s//\1/
30669             q
30670           }
30671           /^X\/\(\/\).*/{
30672             s//\1/
30673             q
30674           }
30675           s/.*/./; q'`
30676
30677 # CDPATH.
30678 $as_unset CDPATH
30679
30680
30681
30682   as_lineno_1=$LINENO
30683   as_lineno_2=$LINENO
30684   test "x$as_lineno_1" != "x$as_lineno_2" &&
30685   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
30686
30687   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
30688   # uniformly replaced by the line number.  The first 'sed' inserts a
30689   # line-number line after each line using $LINENO; the second 'sed'
30690   # does the real work.  The second script uses 'N' to pair each
30691   # line-number line with the line containing $LINENO, and appends
30692   # trailing '-' during substitution so that $LINENO is not a special
30693   # case at line end.
30694   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
30695   # scripts with optimization help from Paolo Bonzini.  Blame Lee
30696   # E. McMahon (1931-1989) for sed's syntax.  :-)
30697   sed -n '
30698     p
30699     /[$]LINENO/=
30700   ' <$as_myself |
30701     sed '
30702       s/[$]LINENO.*/&-/
30703       t lineno
30704       b
30705       :lineno
30706       N
30707       :loop
30708       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
30709       t loop
30710       s/-\n.*//
30711     ' >$as_me.lineno &&
30712   chmod +x "$as_me.lineno" ||
30713     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
30714    { (exit 1); exit 1; }; }
30715
30716   # Don't try to exec as it changes $[0], causing all sort of problems
30717   # (the dirname of $[0] is not the place where we might find the
30718   # original and so on.  Autoconf is especially sensitive to this).
30719   . "./$as_me.lineno"
30720   # Exit status is that of the last command.
30721   exit
30722 }
30723
30724
30725 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
30726   as_dirname=dirname
30727 else
30728   as_dirname=false
30729 fi
30730
30731 ECHO_C= ECHO_N= ECHO_T=
30732 case `echo -n x` in
30733 -n*)
30734   case `echo 'x\c'` in
30735   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
30736   *)   ECHO_C='\c';;
30737   esac;;
30738 *)
30739   ECHO_N='-n';;
30740 esac
30741 if expr a : '\(a\)' >/dev/null 2>&1 &&
30742    test "X`expr 00001 : '.*\(...\)'`" = X001; then
30743   as_expr=expr
30744 else
30745   as_expr=false
30746 fi
30747
30748 rm -f conf$$ conf$$.exe conf$$.file
30749 if test -d conf$$.dir; then
30750   rm -f conf$$.dir/conf$$.file
30751 else
30752   rm -f conf$$.dir
30753   mkdir conf$$.dir 2>/dev/null
30754 fi
30755 if (echo >conf$$.file) 2>/dev/null; then
30756   if ln -s conf$$.file conf$$ 2>/dev/null; then
30757     as_ln_s='ln -s'
30758     # ... but there are two gotchas:
30759     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
30760     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
30761     # In both cases, we have to default to `cp -p'.
30762     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
30763       as_ln_s='cp -p'
30764   elif ln conf$$.file conf$$ 2>/dev/null; then
30765     as_ln_s=ln
30766   else
30767     as_ln_s='cp -p'
30768   fi
30769 else
30770   as_ln_s='cp -p'
30771 fi
30772 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
30773 rmdir conf$$.dir 2>/dev/null
30774
30775 if mkdir -p . 2>/dev/null; then
30776   as_mkdir_p=:
30777 else
30778   test -d ./-p && rmdir ./-p
30779   as_mkdir_p=false
30780 fi
30781
30782 if test -x / >/dev/null 2>&1; then
30783   as_test_x='test -x'
30784 else
30785   if ls -dL / >/dev/null 2>&1; then
30786     as_ls_L_option=L
30787   else
30788     as_ls_L_option=
30789   fi
30790   as_test_x='
30791     eval sh -c '\''
30792       if test -d "$1"; then
30793         test -d "$1/.";
30794       else
30795         case $1 in
30796         -*)set "./$1";;
30797         esac;
30798         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
30799         ???[sx]*):;;*)false;;esac;fi
30800     '\'' sh
30801   '
30802 fi
30803 as_executable_p=$as_test_x
30804
30805 # Sed expression to map a string onto a valid CPP name.
30806 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
30807
30808 # Sed expression to map a string onto a valid variable name.
30809 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
30810
30811
30812 exec 6>&1
30813
30814 # Save the log message, to keep $[0] and so on meaningful, and to
30815 # report actual input values of CONFIG_FILES etc. instead of their
30816 # values after options handling.
30817 ac_log="
30818 This file was extended by PostgreSQL $as_me 9.3beta1, which was
30819 generated by GNU Autoconf 2.63.  Invocation command line was
30820
30821   CONFIG_FILES    = $CONFIG_FILES
30822   CONFIG_HEADERS  = $CONFIG_HEADERS
30823   CONFIG_LINKS    = $CONFIG_LINKS
30824   CONFIG_COMMANDS = $CONFIG_COMMANDS
30825   $ $0 $@
30826
30827 on `(hostname || uname -n) 2>/dev/null | sed 1q`
30828 "
30829
30830 _ACEOF
30831
30832 case $ac_config_files in *"
30833 "*) set x $ac_config_files; shift; ac_config_files=$*;;
30834 esac
30835
30836 case $ac_config_headers in *"
30837 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
30838 esac
30839
30840
30841 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30842 # Files that config.status was made for.
30843 config_files="$ac_config_files"
30844 config_headers="$ac_config_headers"
30845 config_links="$ac_config_links"
30846 config_commands="$ac_config_commands"
30847
30848 _ACEOF
30849
30850 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30851 ac_cs_usage="\
30852 \`$as_me' instantiates files from templates according to the
30853 current configuration.
30854
30855 Usage: $0 [OPTION]... [FILE]...
30856
30857   -h, --help       print this help, then exit
30858   -V, --version    print version number and configuration settings, then exit
30859   -q, --quiet, --silent
30860                    do not print progress messages
30861   -d, --debug      don't remove temporary files
30862       --recheck    update $as_me by reconfiguring in the same conditions
30863       --file=FILE[:TEMPLATE]
30864                    instantiate the configuration file FILE
30865       --header=FILE[:TEMPLATE]
30866                    instantiate the configuration header FILE
30867
30868 Configuration files:
30869 $config_files
30870
30871 Configuration headers:
30872 $config_headers
30873
30874 Configuration links:
30875 $config_links
30876
30877 Configuration commands:
30878 $config_commands
30879
30880 Report bugs to <bug-autoconf@gnu.org>."
30881
30882 _ACEOF
30883 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30884 ac_cs_version="\\
30885 PostgreSQL config.status 9.3beta1
30886 configured by $0, generated by GNU Autoconf 2.63,
30887   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
30888
30889 Copyright (C) 2008 Free Software Foundation, Inc.
30890 This config.status script is free software; the Free Software Foundation
30891 gives unlimited permission to copy, distribute and modify it."
30892
30893 ac_pwd='$ac_pwd'
30894 srcdir='$srcdir'
30895 INSTALL='$INSTALL'
30896 MKDIR_P='$MKDIR_P'
30897 AWK='$AWK'
30898 test -n "\$AWK" || AWK=awk
30899 _ACEOF
30900
30901 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30902 # The default lists apply if the user does not specify any file.
30903 ac_need_defaults=:
30904 while test $# != 0
30905 do
30906   case $1 in
30907   --*=*)
30908     ac_option=`expr "X$1" : 'X\([^=]*\)='`
30909     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
30910     ac_shift=:
30911     ;;
30912   *)
30913     ac_option=$1
30914     ac_optarg=$2
30915     ac_shift=shift
30916     ;;
30917   esac
30918
30919   case $ac_option in
30920   # Handling of the options.
30921   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
30922     ac_cs_recheck=: ;;
30923   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
30924     $as_echo "$ac_cs_version"; exit ;;
30925   --debug | --debu | --deb | --de | --d | -d )
30926     debug=: ;;
30927   --file | --fil | --fi | --f )
30928     $ac_shift
30929     case $ac_optarg in
30930     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
30931     esac
30932     CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
30933     ac_need_defaults=false;;
30934   --header | --heade | --head | --hea )
30935     $ac_shift
30936     case $ac_optarg in
30937     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
30938     esac
30939     CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
30940     ac_need_defaults=false;;
30941   --he | --h)
30942     # Conflict between --help and --header
30943     { $as_echo "$as_me: error: ambiguous option: $1
30944 Try \`$0 --help' for more information." >&2
30945    { (exit 1); exit 1; }; };;
30946   --help | --hel | -h )
30947     $as_echo "$ac_cs_usage"; exit ;;
30948   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
30949   | -silent | --silent | --silen | --sile | --sil | --si | --s)
30950     ac_cs_silent=: ;;
30951
30952   # This is an error.
30953   -*) { $as_echo "$as_me: error: unrecognized option: $1
30954 Try \`$0 --help' for more information." >&2
30955    { (exit 1); exit 1; }; } ;;
30956
30957   *) ac_config_targets="$ac_config_targets $1"
30958      ac_need_defaults=false ;;
30959
30960   esac
30961   shift
30962 done
30963
30964 ac_configure_extra_args=
30965
30966 if $ac_cs_silent; then
30967   exec 6>/dev/null
30968   ac_configure_extra_args="$ac_configure_extra_args --silent"
30969 fi
30970
30971 _ACEOF
30972 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30973 if \$ac_cs_recheck; then
30974   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
30975   shift
30976   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
30977   CONFIG_SHELL='$SHELL'
30978   export CONFIG_SHELL
30979   exec "\$@"
30980 fi
30981
30982 _ACEOF
30983 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30984 exec 5>>config.log
30985 {
30986   echo
30987   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
30988 ## Running $as_me. ##
30989 _ASBOX
30990   $as_echo "$ac_log"
30991 } >&5
30992
30993 _ACEOF
30994 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30995 _ACEOF
30996
30997 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30998
30999 # Handling of arguments.
31000 for ac_config_target in $ac_config_targets
31001 do
31002   case $ac_config_target in
31003     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
31004     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
31005     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
31006     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
31007     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
31008     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
31009     "src/backend/port/pg_latch.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_latch.c:${LATCH_IMPLEMENTATION}" ;;
31010     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
31011     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
31012     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
31013     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
31014     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
31015     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
31016     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
31017
31018   *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
31019 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
31020    { (exit 1); exit 1; }; };;
31021   esac
31022 done
31023
31024
31025 # If the user did not use the arguments to specify the items to instantiate,
31026 # then the envvar interface is used.  Set only those that are not.
31027 # We use the long form for the default assignment because of an extremely
31028 # bizarre bug on SunOS 4.1.3.
31029 if $ac_need_defaults; then
31030   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
31031   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
31032   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
31033   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
31034 fi
31035
31036 # Have a temporary directory for convenience.  Make it in the build tree
31037 # simply because there is no reason against having it here, and in addition,
31038 # creating and moving files from /tmp can sometimes cause problems.
31039 # Hook for its removal unless debugging.
31040 # Note that there is a small window in which the directory will not be cleaned:
31041 # after its creation but before its name has been assigned to `$tmp'.
31042 $debug ||
31043 {
31044   tmp=
31045   trap 'exit_status=$?
31046   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
31047 ' 0
31048   trap '{ (exit 1); exit 1; }' 1 2 13 15
31049 }
31050 # Create a (secure) tmp directory for tmp files.
31051
31052 {
31053   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
31054   test -n "$tmp" && test -d "$tmp"
31055 }  ||
31056 {
31057   tmp=./conf$$-$RANDOM
31058   (umask 077 && mkdir "$tmp")
31059 } ||
31060 {
31061    $as_echo "$as_me: cannot create a temporary directory in ." >&2
31062    { (exit 1); exit 1; }
31063 }
31064
31065 # Set up the scripts for CONFIG_FILES section.
31066 # No need to generate them if there are no CONFIG_FILES.
31067 # This happens for instance with `./config.status config.h'.
31068 if test -n "$CONFIG_FILES"; then
31069
31070
31071 ac_cr='\r'
31072 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
31073 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
31074   ac_cs_awk_cr='\\r'
31075 else
31076   ac_cs_awk_cr=$ac_cr
31077 fi
31078
31079 echo 'BEGIN {' >"$tmp/subs1.awk" &&
31080 _ACEOF
31081
31082
31083 {
31084   echo "cat >conf$$subs.awk <<_ACEOF" &&
31085   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
31086   echo "_ACEOF"
31087 } >conf$$subs.sh ||
31088   { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
31089 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
31090    { (exit 1); exit 1; }; }
31091 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
31092 ac_delim='%!_!# '
31093 for ac_last_try in false false false false false :; do
31094   . ./conf$$subs.sh ||
31095     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
31096 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
31097    { (exit 1); exit 1; }; }
31098
31099   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
31100   if test $ac_delim_n = $ac_delim_num; then
31101     break
31102   elif $ac_last_try; then
31103     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
31104 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
31105    { (exit 1); exit 1; }; }
31106   else
31107     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31108   fi
31109 done
31110 rm -f conf$$subs.sh
31111
31112 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31113 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
31114 _ACEOF
31115 sed -n '
31116 h
31117 s/^/S["/; s/!.*/"]=/
31118 p
31119 g
31120 s/^[^!]*!//
31121 :repl
31122 t repl
31123 s/'"$ac_delim"'$//
31124 t delim
31125 :nl
31126 h
31127 s/\(.\{148\}\).*/\1/
31128 t more1
31129 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
31130 p
31131 n
31132 b repl
31133 :more1
31134 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31135 p
31136 g
31137 s/.\{148\}//
31138 t nl
31139 :delim
31140 h
31141 s/\(.\{148\}\).*/\1/
31142 t more2
31143 s/["\\]/\\&/g; s/^/"/; s/$/"/
31144 p
31145 b
31146 :more2
31147 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31148 p
31149 g
31150 s/.\{148\}//
31151 t delim
31152 ' <conf$$subs.awk | sed '
31153 /^[^""]/{
31154   N
31155   s/\n//
31156 }
31157 ' >>$CONFIG_STATUS || ac_write_fail=1
31158 rm -f conf$$subs.awk
31159 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31160 _ACAWK
31161 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
31162   for (key in S) S_is_set[key] = 1
31163   FS = "\a"
31164
31165 }
31166 {
31167   line = $ 0
31168   nfields = split(line, field, "@")
31169   substed = 0
31170   len = length(field[1])
31171   for (i = 2; i < nfields; i++) {
31172     key = field[i]
31173     keylen = length(key)
31174     if (S_is_set[key]) {
31175       value = S[key]
31176       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
31177       len += length(value) + length(field[++i])
31178       substed = 1
31179     } else
31180       len += 1 + keylen
31181   }
31182
31183   print line
31184 }
31185
31186 _ACAWK
31187 _ACEOF
31188 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31189 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
31190   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
31191 else
31192   cat
31193 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
31194   || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
31195 $as_echo "$as_me: error: could not setup config files machinery" >&2;}
31196    { (exit 1); exit 1; }; }
31197 _ACEOF
31198
31199 # VPATH may cause trouble with some makes, so we remove $(srcdir),
31200 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
31201 # trailing colons and then remove the whole line if VPATH becomes empty
31202 # (actually we leave an empty line to preserve line numbers).
31203 if test "x$srcdir" = x.; then
31204   ac_vpsub='/^[  ]*VPATH[        ]*=/{
31205 s/:*\$(srcdir):*/:/
31206 s/:*\${srcdir}:*/:/
31207 s/:*@srcdir@:*/:/
31208 s/^\([^=]*=[     ]*\):*/\1/
31209 s/:*$//
31210 s/^[^=]*=[       ]*$//
31211 }'
31212 fi
31213
31214 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31215 fi # test -n "$CONFIG_FILES"
31216
31217 # Set up the scripts for CONFIG_HEADERS section.
31218 # No need to generate them if there are no CONFIG_HEADERS.
31219 # This happens for instance with `./config.status Makefile'.
31220 if test -n "$CONFIG_HEADERS"; then
31221 cat >"$tmp/defines.awk" <<\_ACAWK ||
31222 BEGIN {
31223 _ACEOF
31224
31225 # Transform confdefs.h into an awk script `defines.awk', embedded as
31226 # here-document in config.status, that substitutes the proper values into
31227 # config.h.in to produce config.h.
31228
31229 # Create a delimiter string that does not exist in confdefs.h, to ease
31230 # handling of long lines.
31231 ac_delim='%!_!# '
31232 for ac_last_try in false false :; do
31233   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
31234   if test -z "$ac_t"; then
31235     break
31236   elif $ac_last_try; then
31237     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
31238 $as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
31239    { (exit 1); exit 1; }; }
31240   else
31241     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31242   fi
31243 done
31244
31245 # For the awk script, D is an array of macro values keyed by name,
31246 # likewise P contains macro parameters if any.  Preserve backslash
31247 # newline sequences.
31248
31249 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
31250 sed -n '
31251 s/.\{148\}/&'"$ac_delim"'/g
31252 t rset
31253 :rset
31254 s/^[     ]*#[    ]*define[       ][      ]*/ /
31255 t def
31256 d
31257 :def
31258 s/\\$//
31259 t bsnl
31260 s/["\\]/\\&/g
31261 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
31262 D["\1"]=" \3"/p
31263 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
31264 d
31265 :bsnl
31266 s/["\\]/\\&/g
31267 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
31268 D["\1"]=" \3\\\\\\n"\\/p
31269 t cont
31270 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
31271 t cont
31272 d
31273 :cont
31274 n
31275 s/.\{148\}/&'"$ac_delim"'/g
31276 t clear
31277 :clear
31278 s/\\$//
31279 t bsnlc
31280 s/["\\]/\\&/g; s/^/"/; s/$/"/p
31281 d
31282 :bsnlc
31283 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
31284 b cont
31285 ' <confdefs.h | sed '
31286 s/'"$ac_delim"'/"\\\
31287 "/g' >>$CONFIG_STATUS || ac_write_fail=1
31288
31289 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31290   for (key in D) D_is_set[key] = 1
31291   FS = "\a"
31292 }
31293 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
31294   line = \$ 0
31295   split(line, arg, " ")
31296   if (arg[1] == "#") {
31297     defundef = arg[2]
31298     mac1 = arg[3]
31299   } else {
31300     defundef = substr(arg[1], 2)
31301     mac1 = arg[2]
31302   }
31303   split(mac1, mac2, "(") #)
31304   macro = mac2[1]
31305   prefix = substr(line, 1, index(line, defundef) - 1)
31306   if (D_is_set[macro]) {
31307     # Preserve the white space surrounding the "#".
31308     print prefix "define", macro P[macro] D[macro]
31309     next
31310   } else {
31311     # Replace #undef with comments.  This is necessary, for example,
31312     # in the case of _POSIX_SOURCE, which is predefined and required
31313     # on some systems where configure will not decide to define it.
31314     if (defundef == "undef") {
31315       print "/*", prefix defundef, macro, "*/"
31316       next
31317     }
31318   }
31319 }
31320 { print }
31321 _ACAWK
31322 _ACEOF
31323 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31324   { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
31325 $as_echo "$as_me: error: could not setup config headers machinery" >&2;}
31326    { (exit 1); exit 1; }; }
31327 fi # test -n "$CONFIG_HEADERS"
31328
31329
31330 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
31331 shift
31332 for ac_tag
31333 do
31334   case $ac_tag in
31335   :[FHLC]) ac_mode=$ac_tag; continue;;
31336   esac
31337   case $ac_mode$ac_tag in
31338   :[FHL]*:*);;
31339   :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
31340 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
31341    { (exit 1); exit 1; }; };;
31342   :[FH]-) ac_tag=-:-;;
31343   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
31344   esac
31345   ac_save_IFS=$IFS
31346   IFS=:
31347   set x $ac_tag
31348   IFS=$ac_save_IFS
31349   shift
31350   ac_file=$1
31351   shift
31352
31353   case $ac_mode in
31354   :L) ac_source=$1;;
31355   :[FH])
31356     ac_file_inputs=
31357     for ac_f
31358     do
31359       case $ac_f in
31360       -) ac_f="$tmp/stdin";;
31361       *) # Look for the file first in the build tree, then in the source tree
31362          # (if the path is not absolute).  The absolute path cannot be DOS-style,
31363          # because $ac_f cannot contain `:'.
31364          test -f "$ac_f" ||
31365            case $ac_f in
31366            [\\/$]*) false;;
31367            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
31368            esac ||
31369            { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
31370 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
31371    { (exit 1); exit 1; }; };;
31372       esac
31373       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
31374       ac_file_inputs="$ac_file_inputs '$ac_f'"
31375     done
31376
31377     # Let's still pretend it is `configure' which instantiates (i.e., don't
31378     # use $as_me), people would be surprised to read:
31379     #    /* config.h.  Generated by config.status.  */
31380     configure_input='Generated from '`
31381           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
31382         `' by configure.'
31383     if test x"$ac_file" != x-; then
31384       configure_input="$ac_file.  $configure_input"
31385       { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
31386 $as_echo "$as_me: creating $ac_file" >&6;}
31387     fi
31388     # Neutralize special characters interpreted by sed in replacement strings.
31389     case $configure_input in #(
31390     *\&* | *\|* | *\\* )
31391        ac_sed_conf_input=`$as_echo "$configure_input" |
31392        sed 's/[\\\\&|]/\\\\&/g'`;; #(
31393     *) ac_sed_conf_input=$configure_input;;
31394     esac
31395
31396     case $ac_tag in
31397     *:-:* | *:-) cat >"$tmp/stdin" \
31398       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
31399 $as_echo "$as_me: error: could not create $ac_file" >&2;}
31400    { (exit 1); exit 1; }; } ;;
31401     esac
31402     ;;
31403   esac
31404
31405   ac_dir=`$as_dirname -- "$ac_file" ||
31406 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31407          X"$ac_file" : 'X\(//\)[^/]' \| \
31408          X"$ac_file" : 'X\(//\)$' \| \
31409          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
31410 $as_echo X"$ac_file" |
31411     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31412             s//\1/
31413             q
31414           }
31415           /^X\(\/\/\)[^/].*/{
31416             s//\1/
31417             q
31418           }
31419           /^X\(\/\/\)$/{
31420             s//\1/
31421             q
31422           }
31423           /^X\(\/\).*/{
31424             s//\1/
31425             q
31426           }
31427           s/.*/./; q'`
31428   { as_dir="$ac_dir"
31429   case $as_dir in #(
31430   -*) as_dir=./$as_dir;;
31431   esac
31432   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
31433     as_dirs=
31434     while :; do
31435       case $as_dir in #(
31436       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
31437       *) as_qdir=$as_dir;;
31438       esac
31439       as_dirs="'$as_qdir' $as_dirs"
31440       as_dir=`$as_dirname -- "$as_dir" ||
31441 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31442          X"$as_dir" : 'X\(//\)[^/]' \| \
31443          X"$as_dir" : 'X\(//\)$' \| \
31444          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
31445 $as_echo X"$as_dir" |
31446     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31447             s//\1/
31448             q
31449           }
31450           /^X\(\/\/\)[^/].*/{
31451             s//\1/
31452             q
31453           }
31454           /^X\(\/\/\)$/{
31455             s//\1/
31456             q
31457           }
31458           /^X\(\/\).*/{
31459             s//\1/
31460             q
31461           }
31462           s/.*/./; q'`
31463       test -d "$as_dir" && break
31464     done
31465     test -z "$as_dirs" || eval "mkdir $as_dirs"
31466   } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
31467 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
31468    { (exit 1); exit 1; }; }; }
31469   ac_builddir=.
31470
31471 case "$ac_dir" in
31472 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
31473 *)
31474   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
31475   # A ".." for each directory in $ac_dir_suffix.
31476   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
31477   case $ac_top_builddir_sub in
31478   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
31479   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
31480   esac ;;
31481 esac
31482 ac_abs_top_builddir=$ac_pwd
31483 ac_abs_builddir=$ac_pwd$ac_dir_suffix
31484 # for backward compatibility:
31485 ac_top_builddir=$ac_top_build_prefix
31486
31487 case $srcdir in
31488   .)  # We are building in place.
31489     ac_srcdir=.
31490     ac_top_srcdir=$ac_top_builddir_sub
31491     ac_abs_top_srcdir=$ac_pwd ;;
31492   [\\/]* | ?:[\\/]* )  # Absolute name.
31493     ac_srcdir=$srcdir$ac_dir_suffix;
31494     ac_top_srcdir=$srcdir
31495     ac_abs_top_srcdir=$srcdir ;;
31496   *) # Relative name.
31497     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
31498     ac_top_srcdir=$ac_top_build_prefix$srcdir
31499     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
31500 esac
31501 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
31502
31503
31504   case $ac_mode in
31505   :F)
31506   #
31507   # CONFIG_FILE
31508   #
31509
31510   case $INSTALL in
31511   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
31512   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
31513   esac
31514   ac_MKDIR_P=$MKDIR_P
31515   case $MKDIR_P in
31516   [\\/$]* | ?:[\\/]* ) ;;
31517   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
31518   esac
31519 _ACEOF
31520
31521 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31522 # If the template does not know about datarootdir, expand it.
31523 # FIXME: This hack should be removed a few years after 2.60.
31524 ac_datarootdir_hack=; ac_datarootdir_seen=
31525
31526 ac_sed_dataroot='
31527 /datarootdir/ {
31528   p
31529   q
31530 }
31531 /@datadir@/p
31532 /@docdir@/p
31533 /@infodir@/p
31534 /@localedir@/p
31535 /@mandir@/p
31536 '
31537 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
31538 *datarootdir*) ac_datarootdir_seen=yes;;
31539 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
31540   { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
31541 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
31542 _ACEOF
31543 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31544   ac_datarootdir_hack='
31545   s&@datadir@&$datadir&g
31546   s&@docdir@&$docdir&g
31547   s&@infodir@&$infodir&g
31548   s&@localedir@&$localedir&g
31549   s&@mandir@&$mandir&g
31550     s&\\\${datarootdir}&$datarootdir&g' ;;
31551 esac
31552 _ACEOF
31553
31554 # Neutralize VPATH when `$srcdir' = `.'.
31555 # Shell code in configure.ac might set extrasub.
31556 # FIXME: do we really want to maintain this feature?
31557 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31558 ac_sed_extra="$ac_vpsub
31559 $extrasub
31560 _ACEOF
31561 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31562 :t
31563 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
31564 s|@configure_input@|$ac_sed_conf_input|;t t
31565 s&@top_builddir@&$ac_top_builddir_sub&;t t
31566 s&@top_build_prefix@&$ac_top_build_prefix&;t t
31567 s&@srcdir@&$ac_srcdir&;t t
31568 s&@abs_srcdir@&$ac_abs_srcdir&;t t
31569 s&@top_srcdir@&$ac_top_srcdir&;t t
31570 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
31571 s&@builddir@&$ac_builddir&;t t
31572 s&@abs_builddir@&$ac_abs_builddir&;t t
31573 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
31574 s&@INSTALL@&$ac_INSTALL&;t t
31575 s&@MKDIR_P@&$ac_MKDIR_P&;t t
31576 $ac_datarootdir_hack
31577 "
31578 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
31579   || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
31580 $as_echo "$as_me: error: could not create $ac_file" >&2;}
31581    { (exit 1); exit 1; }; }
31582
31583 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
31584   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
31585   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
31586   { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
31587 which seems to be undefined.  Please make sure it is defined." >&5
31588 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
31589 which seems to be undefined.  Please make sure it is defined." >&2;}
31590
31591   rm -f "$tmp/stdin"
31592   case $ac_file in
31593   -) cat "$tmp/out" && rm -f "$tmp/out";;
31594   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
31595   esac \
31596   || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
31597 $as_echo "$as_me: error: could not create $ac_file" >&2;}
31598    { (exit 1); exit 1; }; }
31599  ;;
31600   :H)
31601   #
31602   # CONFIG_HEADER
31603   #
31604   if test x"$ac_file" != x-; then
31605     {
31606       $as_echo "/* $configure_input  */" \
31607       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
31608     } >"$tmp/config.h" \
31609       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
31610 $as_echo "$as_me: error: could not create $ac_file" >&2;}
31611    { (exit 1); exit 1; }; }
31612     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
31613       { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
31614 $as_echo "$as_me: $ac_file is unchanged" >&6;}
31615     else
31616       rm -f "$ac_file"
31617       mv "$tmp/config.h" "$ac_file" \
31618         || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
31619 $as_echo "$as_me: error: could not create $ac_file" >&2;}
31620    { (exit 1); exit 1; }; }
31621     fi
31622   else
31623     $as_echo "/* $configure_input  */" \
31624       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
31625       || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
31626 $as_echo "$as_me: error: could not create -" >&2;}
31627    { (exit 1); exit 1; }; }
31628   fi
31629  ;;
31630   :L)
31631   #
31632   # CONFIG_LINK
31633   #
31634
31635   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
31636     :
31637   else
31638     # Prefer the file from the source tree if names are identical.
31639     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
31640       ac_source=$srcdir/$ac_source
31641     fi
31642
31643     { $as_echo "$as_me:$LINENO: linking $ac_source to $ac_file" >&5
31644 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
31645
31646     if test ! -r "$ac_source"; then
31647       { { $as_echo "$as_me:$LINENO: error: $ac_source: file not found" >&5
31648 $as_echo "$as_me: error: $ac_source: file not found" >&2;}
31649    { (exit 1); exit 1; }; }
31650     fi
31651     rm -f "$ac_file"
31652
31653     # Try a relative symlink, then a hard link, then a copy.
31654     case $srcdir in
31655     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
31656         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
31657     esac
31658     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
31659       ln "$ac_source" "$ac_file" 2>/dev/null ||
31660       cp -p "$ac_source" "$ac_file" ||
31661       { { $as_echo "$as_me:$LINENO: error: cannot link or copy $ac_source to $ac_file" >&5
31662 $as_echo "$as_me: error: cannot link or copy $ac_source to $ac_file" >&2;}
31663    { (exit 1); exit 1; }; }
31664   fi
31665  ;;
31666   :C)  { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
31667 $as_echo "$as_me: executing $ac_file commands" >&6;}
31668  ;;
31669   esac
31670
31671
31672   case $ac_file$ac_mode in
31673     "check_win32_symlinks":C)
31674 # Links sometimes fail undetected on Mingw -
31675 # so here we detect it and warn the user
31676 for FILE in $CONFIG_LINKS
31677  do
31678         # test -e works for symlinks in the MinGW console
31679         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:$LINENO: WARNING: *** link for $FILE -- please fix by hand" >&5
31680 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
31681  done
31682  ;;
31683     "src/include/pg_config.h":H)
31684 # Update timestamp for pg_config.h (see Makefile.global)
31685 echo >src/include/stamp-h
31686  ;;
31687     "src/include/pg_config_ext.h":H)
31688 # Update timestamp for pg_config_ext.h (see Makefile.global)
31689 echo >src/include/stamp-ext-h
31690  ;;
31691     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
31692
31693   esac
31694 done # for ac_tag
31695
31696
31697 { (exit 0); exit 0; }
31698 _ACEOF
31699 chmod +x $CONFIG_STATUS
31700 ac_clean_files=$ac_clean_files_save
31701
31702 test $ac_write_fail = 0 ||
31703   { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
31704 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
31705    { (exit 1); exit 1; }; }
31706
31707
31708 # configure is writing to config.log, and then calls config.status.
31709 # config.status does its own redirection, appending to config.log.
31710 # Unfortunately, on DOS this fails, as config.log is still kept open
31711 # by configure, so config.status won't be able to write to it; its
31712 # output is simply discarded.  So we exec the FD to /dev/null,
31713 # effectively closing config.log, so it can be properly (re)opened and
31714 # appended to by config.status.  When coming back to configure, we
31715 # need to make the FD available again.
31716 if test "$no_create" != yes; then
31717   ac_cs_success=:
31718   ac_config_status_args=
31719   test "$silent" = yes &&
31720     ac_config_status_args="$ac_config_status_args --quiet"
31721   exec 5>/dev/null
31722   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
31723   exec 5>>config.log
31724   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31725   # would make configure fail if this is the last instruction.
31726   $ac_cs_success || { (exit 1); exit 1; }
31727 fi
31728 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
31729   { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
31730 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
31731 fi
31732