]> granicus.if.org Git - postgresql/blob - configure
Fix getaddrinfo() in pgport to use proper parameters, as detected by
[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.1devel.
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-2010, 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.1devel'
602 PACKAGE_STRING='PostgreSQL 9.1devel'
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_IPV6
671 LIBOBJS
672 OSSP_UUID_LIBS
673 ZIC
674 python_additional_libs
675 python_libspec
676 python_libdir
677 python_includespec
678 python_configdir
679 python_version
680 python_majorversion
681 PYTHON
682 perl_embed_ldflags
683 perl_useshrplib
684 perl_privlibexp
685 perl_archlibexp
686 PERL
687 FLEXFLAGS
688 FLEX
689 BISONFLAGS
690 BISON
691 MKDIR_P
692 AWK
693 LN_S
694 TAR
695 WINDRES
696 DLLWRAP
697 DLLTOOL
698 AR
699 STRIP_SHARED_LIB
700 STRIP_STATIC_LIB
701 STRIP
702 RANLIB
703 ld_R_works
704 with_gnu_ld
705 LD
706 LDFLAGS_SL
707 LDFLAGS_EX
708 ELF_SYS
709 EGREP
710 GREP
711 with_zlib
712 with_system_tzdata
713 with_libxslt
714 with_libxml
715 XML2_CONFIG
716 with_ossp_uuid
717 with_openssl
718 with_bonjour
719 with_ldap
720 with_pam
721 krb_srvtab
722 with_krb5
723 with_gssapi
724 with_python
725 with_perl
726 with_tcl
727 enable_thread_safety
728 INCLUDES
729 autodepend
730 TAS
731 GCC
732 CPP
733 SUN_STUDIO_CC
734 OBJEXT
735 EXEEXT
736 ac_ct_CC
737 CPPFLAGS
738 LDFLAGS
739 CFLAGS
740 CC
741 enable_dtrace
742 DTRACEFLAGS
743 DTRACE
744 enable_coverage
745 GENHTML
746 LCOV
747 GCOV
748 enable_profiling
749 enable_debug
750 enable_rpath
751 enable_shared
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_shared
814 enable_rpath
815 enable_spinlocks
816 enable_debug
817 enable_profiling
818 enable_coverage
819 enable_dtrace
820 with_blocksize
821 with_segsize
822 with_wal_blocksize
823 with_wal_segsize
824 with_CC
825 enable_depend
826 enable_cassert
827 enable_thread_safety
828 with_tcl
829 with_tclconfig
830 with_perl
831 with_python
832 with_gssapi
833 with_krb5
834 with_krb_srvnam
835 with_pam
836 with_ldap
837 with_bonjour
838 with_openssl
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.1devel 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.1devel:";;
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-shared        do not build shared libraries
1493   --disable-rpath         do not embed shared library search path in
1494                           executables
1495   --disable-spinlocks     do not use spinlocks
1496   --enable-debug          build with debugging symbols (-g)
1497   --enable-profiling      build with profiling enabled
1498   --enable-coverage       build with coverage testing instrumentation
1499   --enable-dtrace         build with DTrace support
1500   --enable-depend         turn on automatic dependency tracking
1501   --enable-cassert        enable assertion checks (for debugging)
1502   --disable-thread-safety disable thread-safety in client libraries
1503   --disable-largefile     omit support for large files
1504   --disable-float4-byval  disable float4 passed by value
1505   --disable-float8-byval  disable float8 passed by value
1506
1507 Optional Packages:
1508   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1509   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1510   --with-template=NAME    override operating system template
1511   --with-includes=DIRS    look for additional header files in DIRS
1512   --with-libraries=DIRS   look for additional libraries in DIRS
1513   --with-libs=DIRS        alternative spelling of --with-libraries
1514   --with-pgport=PORTNUM   set default port number [5432]
1515   --with-blocksize=BLOCKSIZE
1516                           set table block size in kB [8]
1517   --with-segsize=SEGSIZE  set table segment size in GB [1]
1518   --with-wal-blocksize=BLOCKSIZE
1519                           set WAL block size in kB [8]
1520   --with-wal-segsize=SEGSIZE
1521                           set WAL segment size in MB [16]
1522   --with-CC=CMD           set compiler (deprecated)
1523   --with-tcl              build Tcl modules (PL/Tcl)
1524   --with-tclconfig=DIR    tclConfig.sh is in DIR
1525   --with-perl             build Perl modules (PL/Perl)
1526   --with-python           build Python modules (PL/Python)
1527   --with-gssapi           build with GSSAPI support
1528   --with-krb5             build with Kerberos 5 support
1529   --with-krb-srvnam=NAME  default service principal name in Kerberos
1530                           [postgres]
1531   --with-pam              build with PAM support
1532   --with-ldap             build with LDAP support
1533   --with-bonjour          build with Bonjour support
1534   --with-openssl          build with OpenSSL 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        use OSSP UUID library when building
1539                           contrib/uuid-ossp
1540   --with-libxml           build with XML support
1541   --with-libxslt          use XSLT support when building contrib/xml2
1542   --with-system-tzdata=DIR
1543                           use system time zone data in DIR
1544   --without-zlib          do not use Zlib
1545   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1546
1547 Some influential environment variables:
1548   CC          C compiler command
1549   CFLAGS      C compiler flags
1550   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1551               nonstandard directory <lib dir>
1552   LIBS        libraries to pass to the linker, e.g. -l<library>
1553   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1554               you have headers in a nonstandard directory <include dir>
1555   CPP         C preprocessor
1556   LDFLAGS_EX  extra linker flags for linking executables only
1557   LDFLAGS_SL  extra linker flags for linking shared libraries only
1558   DOCBOOKSTYLE
1559               location of DocBook stylesheets
1560
1561 Use these variables to override the choices made by `configure' or to help
1562 it to find libraries and programs with nonstandard names/locations.
1563
1564 Report bugs to <pgsql-bugs@postgresql.org>.
1565 _ACEOF
1566 ac_status=$?
1567 fi
1568
1569 if test "$ac_init_help" = "recursive"; then
1570   # If there are subdirs, report their specific --help.
1571   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1572     test -d "$ac_dir" ||
1573       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1574       continue
1575     ac_builddir=.
1576
1577 case "$ac_dir" in
1578 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1579 *)
1580   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1581   # A ".." for each directory in $ac_dir_suffix.
1582   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1583   case $ac_top_builddir_sub in
1584   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1585   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1586   esac ;;
1587 esac
1588 ac_abs_top_builddir=$ac_pwd
1589 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1590 # for backward compatibility:
1591 ac_top_builddir=$ac_top_build_prefix
1592
1593 case $srcdir in
1594   .)  # We are building in place.
1595     ac_srcdir=.
1596     ac_top_srcdir=$ac_top_builddir_sub
1597     ac_abs_top_srcdir=$ac_pwd ;;
1598   [\\/]* | ?:[\\/]* )  # Absolute name.
1599     ac_srcdir=$srcdir$ac_dir_suffix;
1600     ac_top_srcdir=$srcdir
1601     ac_abs_top_srcdir=$srcdir ;;
1602   *) # Relative name.
1603     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1604     ac_top_srcdir=$ac_top_build_prefix$srcdir
1605     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1606 esac
1607 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1608
1609     cd "$ac_dir" || { ac_status=$?; continue; }
1610     # Check for guested configure.
1611     if test -f "$ac_srcdir/configure.gnu"; then
1612       echo &&
1613       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1614     elif test -f "$ac_srcdir/configure"; then
1615       echo &&
1616       $SHELL "$ac_srcdir/configure" --help=recursive
1617     else
1618       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1619     fi || ac_status=$?
1620     cd "$ac_pwd" || { ac_status=$?; break; }
1621   done
1622 fi
1623
1624 test -n "$ac_init_help" && exit $ac_status
1625 if $ac_init_version; then
1626   cat <<\_ACEOF
1627 PostgreSQL configure 9.1devel
1628 generated by GNU Autoconf 2.63
1629
1630 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1631 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1632 This configure script is free software; the Free Software Foundation
1633 gives unlimited permission to copy, distribute and modify it.
1634
1635 Copyright (c) 1996-2010, PostgreSQL Global Development Group
1636 _ACEOF
1637   exit
1638 fi
1639 cat >config.log <<_ACEOF
1640 This file contains any messages produced by compilers while
1641 running configure, to aid debugging if configure makes a mistake.
1642
1643 It was created by PostgreSQL $as_me 9.1devel, which was
1644 generated by GNU Autoconf 2.63.  Invocation command line was
1645
1646   $ $0 $@
1647
1648 _ACEOF
1649 exec 5>>config.log
1650 {
1651 cat <<_ASUNAME
1652 ## --------- ##
1653 ## Platform. ##
1654 ## --------- ##
1655
1656 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1657 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1658 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1659 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1660 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1661
1662 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1663 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1664
1665 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1666 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1667 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1668 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1669 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1670 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1671 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1672
1673 _ASUNAME
1674
1675 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1676 for as_dir in $PATH
1677 do
1678   IFS=$as_save_IFS
1679   test -z "$as_dir" && as_dir=.
1680   $as_echo "PATH: $as_dir"
1681 done
1682 IFS=$as_save_IFS
1683
1684 } >&5
1685
1686 cat >&5 <<_ACEOF
1687
1688
1689 ## ----------- ##
1690 ## Core tests. ##
1691 ## ----------- ##
1692
1693 _ACEOF
1694
1695
1696 # Keep a trace of the command line.
1697 # Strip out --no-create and --no-recursion so they do not pile up.
1698 # Strip out --silent because we don't want to record it for future runs.
1699 # Also quote any args containing shell meta-characters.
1700 # Make two passes to allow for proper duplicate-argument suppression.
1701 ac_configure_args=
1702 ac_configure_args0=
1703 ac_configure_args1=
1704 ac_must_keep_next=false
1705 for ac_pass in 1 2
1706 do
1707   for ac_arg
1708   do
1709     case $ac_arg in
1710     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1711     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1712     | -silent | --silent | --silen | --sile | --sil)
1713       continue ;;
1714     *\'*)
1715       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1716     esac
1717     case $ac_pass in
1718     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1719     2)
1720       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1721       if test $ac_must_keep_next = true; then
1722         ac_must_keep_next=false # Got value, back to normal.
1723       else
1724         case $ac_arg in
1725           *=* | --config-cache | -C | -disable-* | --disable-* \
1726           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1727           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1728           | -with-* | --with-* | -without-* | --without-* | --x)
1729             case "$ac_configure_args0 " in
1730               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1731             esac
1732             ;;
1733           -* ) ac_must_keep_next=true ;;
1734         esac
1735       fi
1736       ac_configure_args="$ac_configure_args '$ac_arg'"
1737       ;;
1738     esac
1739   done
1740 done
1741 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1742 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1743
1744 # When interrupted or exit'd, cleanup temporary files, and complete
1745 # config.log.  We remove comments because anyway the quotes in there
1746 # would cause problems or look ugly.
1747 # WARNING: Use '\'' to represent an apostrophe within the trap.
1748 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1749 trap 'exit_status=$?
1750   # Save into config.log some information that might help in debugging.
1751   {
1752     echo
1753
1754     cat <<\_ASBOX
1755 ## ---------------- ##
1756 ## Cache variables. ##
1757 ## ---------------- ##
1758 _ASBOX
1759     echo
1760     # The following way of writing the cache mishandles newlines in values,
1761 (
1762   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1763     eval ac_val=\$$ac_var
1764     case $ac_val in #(
1765     *${as_nl}*)
1766       case $ac_var in #(
1767       *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
1768 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1769       esac
1770       case $ac_var in #(
1771       _ | IFS | as_nl) ;; #(
1772       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1773       *) $as_unset $ac_var ;;
1774       esac ;;
1775     esac
1776   done
1777   (set) 2>&1 |
1778     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1779     *${as_nl}ac_space=\ *)
1780       sed -n \
1781         "s/'\''/'\''\\\\'\'''\''/g;
1782           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1783       ;; #(
1784     *)
1785       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1786       ;;
1787     esac |
1788     sort
1789 )
1790     echo
1791
1792     cat <<\_ASBOX
1793 ## ----------------- ##
1794 ## Output variables. ##
1795 ## ----------------- ##
1796 _ASBOX
1797     echo
1798     for ac_var in $ac_subst_vars
1799     do
1800       eval ac_val=\$$ac_var
1801       case $ac_val in
1802       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1803       esac
1804       $as_echo "$ac_var='\''$ac_val'\''"
1805     done | sort
1806     echo
1807
1808     if test -n "$ac_subst_files"; then
1809       cat <<\_ASBOX
1810 ## ------------------- ##
1811 ## File substitutions. ##
1812 ## ------------------- ##
1813 _ASBOX
1814       echo
1815       for ac_var in $ac_subst_files
1816       do
1817         eval ac_val=\$$ac_var
1818         case $ac_val in
1819         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1820         esac
1821         $as_echo "$ac_var='\''$ac_val'\''"
1822       done | sort
1823       echo
1824     fi
1825
1826     if test -s confdefs.h; then
1827       cat <<\_ASBOX
1828 ## ----------- ##
1829 ## confdefs.h. ##
1830 ## ----------- ##
1831 _ASBOX
1832       echo
1833       cat confdefs.h
1834       echo
1835     fi
1836     test "$ac_signal" != 0 &&
1837       $as_echo "$as_me: caught signal $ac_signal"
1838     $as_echo "$as_me: exit $exit_status"
1839   } >&5
1840   rm -f core *.core core.conftest.* &&
1841     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1842     exit $exit_status
1843 ' 0
1844 for ac_signal in 1 2 13 15; do
1845   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1846 done
1847 ac_signal=0
1848
1849 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1850 rm -f -r conftest* confdefs.h
1851
1852 # Predefined preprocessor variables.
1853
1854 cat >>confdefs.h <<_ACEOF
1855 #define PACKAGE_NAME "$PACKAGE_NAME"
1856 _ACEOF
1857
1858
1859 cat >>confdefs.h <<_ACEOF
1860 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1861 _ACEOF
1862
1863
1864 cat >>confdefs.h <<_ACEOF
1865 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1866 _ACEOF
1867
1868
1869 cat >>confdefs.h <<_ACEOF
1870 #define PACKAGE_STRING "$PACKAGE_STRING"
1871 _ACEOF
1872
1873
1874 cat >>confdefs.h <<_ACEOF
1875 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1876 _ACEOF
1877
1878
1879 # Let the site file select an alternate cache file if it wants to.
1880 # Prefer an explicitly selected file to automatically selected ones.
1881 ac_site_file1=NONE
1882 ac_site_file2=NONE
1883 if test -n "$CONFIG_SITE"; then
1884   ac_site_file1=$CONFIG_SITE
1885 elif test "x$prefix" != xNONE; then
1886   ac_site_file1=$prefix/share/config.site
1887   ac_site_file2=$prefix/etc/config.site
1888 else
1889   ac_site_file1=$ac_default_prefix/share/config.site
1890   ac_site_file2=$ac_default_prefix/etc/config.site
1891 fi
1892 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1893 do
1894   test "x$ac_site_file" = xNONE && continue
1895   if test -r "$ac_site_file"; then
1896     { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1897 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
1898     sed 's/^/| /' "$ac_site_file" >&5
1899     . "$ac_site_file"
1900   fi
1901 done
1902
1903 if test -r "$cache_file"; then
1904   # Some versions of bash will fail to source /dev/null (special
1905   # files actually), so we avoid doing that.
1906   if test -f "$cache_file"; then
1907     { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
1908 $as_echo "$as_me: loading cache $cache_file" >&6;}
1909     case $cache_file in
1910       [\\/]* | ?:[\\/]* ) . "$cache_file";;
1911       *)                      . "./$cache_file";;
1912     esac
1913   fi
1914 else
1915   { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
1916 $as_echo "$as_me: creating cache $cache_file" >&6;}
1917   >$cache_file
1918 fi
1919
1920 # Check that the precious variables saved in the cache have kept the same
1921 # value.
1922 ac_cache_corrupted=false
1923 for ac_var in $ac_precious_vars; do
1924   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1925   eval ac_new_set=\$ac_env_${ac_var}_set
1926   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1927   eval ac_new_val=\$ac_env_${ac_var}_value
1928   case $ac_old_set,$ac_new_set in
1929     set,)
1930       { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1931 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1932       ac_cache_corrupted=: ;;
1933     ,set)
1934       { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1935 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1936       ac_cache_corrupted=: ;;
1937     ,);;
1938     *)
1939       if test "x$ac_old_val" != "x$ac_new_val"; then
1940         # differences in whitespace do not lead to failure.
1941         ac_old_val_w=`echo x $ac_old_val`
1942         ac_new_val_w=`echo x $ac_new_val`
1943         if test "$ac_old_val_w" != "$ac_new_val_w"; then
1944           { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1945 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1946           ac_cache_corrupted=:
1947         else
1948           { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1949 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1950           eval $ac_var=\$ac_old_val
1951         fi
1952         { $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
1953 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
1954         { $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
1955 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
1956       fi;;
1957   esac
1958   # Pass precious variables to config.status.
1959   if test "$ac_new_set" = set; then
1960     case $ac_new_val in
1961     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1962     *) ac_arg=$ac_var=$ac_new_val ;;
1963     esac
1964     case " $ac_configure_args " in
1965       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1966       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1967     esac
1968   fi
1969 done
1970 if $ac_cache_corrupted; then
1971   { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1972 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1973   { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1974 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1975   { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1976 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1977    { (exit 1); exit 1; }; }
1978 fi
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
2004 ac_ext=c
2005 ac_cpp='$CPP $CPPFLAGS'
2006 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2007 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2008 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2009
2010
2011
2012
2013
2014
2015 ac_aux_dir=
2016 for ac_dir in config "$srcdir"/config; do
2017   if test -f "$ac_dir/install-sh"; then
2018     ac_aux_dir=$ac_dir
2019     ac_install_sh="$ac_aux_dir/install-sh -c"
2020     break
2021   elif test -f "$ac_dir/install.sh"; then
2022     ac_aux_dir=$ac_dir
2023     ac_install_sh="$ac_aux_dir/install.sh -c"
2024     break
2025   elif test -f "$ac_dir/shtool"; then
2026     ac_aux_dir=$ac_dir
2027     ac_install_sh="$ac_aux_dir/shtool install -c"
2028     break
2029   fi
2030 done
2031 if test -z "$ac_aux_dir"; then
2032   { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5
2033 $as_echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;}
2034    { (exit 1); exit 1; }; }
2035 fi
2036
2037 # These three variables are undocumented and unsupported,
2038 # and are intended to be withdrawn in a future Autoconf release.
2039 # They can cause serious problems if a builder's source tree is in a directory
2040 # whose full name contains unusual characters.
2041 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2042 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2043 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2044
2045
2046
2047 configure_args=$ac_configure_args
2048
2049
2050
2051 cat >>confdefs.h <<_ACEOF
2052 #define PG_VERSION "$PACKAGE_VERSION"
2053 _ACEOF
2054
2055 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
2056
2057
2058 cat >>confdefs.h <<_ACEOF
2059 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2060 _ACEOF
2061
2062
2063 # Make sure we can run config.sub.
2064 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2065   { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2066 $as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
2067    { (exit 1); exit 1; }; }
2068
2069 { $as_echo "$as_me:$LINENO: checking build system type" >&5
2070 $as_echo_n "checking build system type... " >&6; }
2071 if test "${ac_cv_build+set}" = set; then
2072   $as_echo_n "(cached) " >&6
2073 else
2074   ac_build_alias=$build_alias
2075 test "x$ac_build_alias" = x &&
2076   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2077 test "x$ac_build_alias" = x &&
2078   { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2079 $as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2080    { (exit 1); exit 1; }; }
2081 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2082   { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2083 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2084    { (exit 1); exit 1; }; }
2085
2086 fi
2087 { $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2088 $as_echo "$ac_cv_build" >&6; }
2089 case $ac_cv_build in
2090 *-*-*) ;;
2091 *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2092 $as_echo "$as_me: error: invalid value of canonical build" >&2;}
2093    { (exit 1); exit 1; }; };;
2094 esac
2095 build=$ac_cv_build
2096 ac_save_IFS=$IFS; IFS='-'
2097 set x $ac_cv_build
2098 shift
2099 build_cpu=$1
2100 build_vendor=$2
2101 shift; shift
2102 # Remember, the first character of IFS is used to create $*,
2103 # except with old shells:
2104 build_os=$*
2105 IFS=$ac_save_IFS
2106 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2107
2108
2109 { $as_echo "$as_me:$LINENO: checking host system type" >&5
2110 $as_echo_n "checking host system type... " >&6; }
2111 if test "${ac_cv_host+set}" = set; then
2112   $as_echo_n "(cached) " >&6
2113 else
2114   if test "x$host_alias" = x; then
2115   ac_cv_host=$ac_cv_build
2116 else
2117   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2118     { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2119 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2120    { (exit 1); exit 1; }; }
2121 fi
2122
2123 fi
2124 { $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2125 $as_echo "$ac_cv_host" >&6; }
2126 case $ac_cv_host in
2127 *-*-*) ;;
2128 *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2129 $as_echo "$as_me: error: invalid value of canonical host" >&2;}
2130    { (exit 1); exit 1; }; };;
2131 esac
2132 host=$ac_cv_host
2133 ac_save_IFS=$IFS; IFS='-'
2134 set x $ac_cv_host
2135 shift
2136 host_cpu=$1
2137 host_vendor=$2
2138 shift; shift
2139 # Remember, the first character of IFS is used to create $*,
2140 # except with old shells:
2141 host_os=$*
2142 IFS=$ac_save_IFS
2143 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2144
2145
2146
2147 template=
2148 { $as_echo "$as_me:$LINENO: checking which template to use" >&5
2149 $as_echo_n "checking which template to use... " >&6; }
2150
2151
2152
2153
2154 # Check whether --with-template was given.
2155 if test "${with_template+set}" = set; then
2156   withval=$with_template;
2157   case $withval in
2158     yes)
2159       { { $as_echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
2160 $as_echo "$as_me: error: argument required for --with-template option" >&2;}
2161    { (exit 1); exit 1; }; }
2162       ;;
2163     no)
2164       { { $as_echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
2165 $as_echo "$as_me: error: argument required for --with-template option" >&2;}
2166    { (exit 1); exit 1; }; }
2167       ;;
2168     *)
2169
2170   case $withval in
2171     list)   echo; ls "$srcdir/src/template"; exit;;
2172     *)      if test -f "$srcdir/src/template/$with_template" ; then
2173               template=$withval
2174             else
2175               { { $as_echo "$as_me:$LINENO: error: '$withval' is not a valid template name. Use 'list' for a list." >&5
2176 $as_echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a list." >&2;}
2177    { (exit 1); exit 1; }; }
2178             fi;;
2179   esac
2180
2181       ;;
2182   esac
2183
2184 else
2185
2186 # --with-template not given
2187
2188 case $host_os in
2189      aix*) template=aix ;;
2190     bsdi*) template=bsdi ;;
2191   cygwin*) template=cygwin ;;
2192   darwin*) template=darwin ;;
2193     dgux*) template=dgux ;;
2194  freebsd*) template=freebsd ;;
2195     hpux*) template=hpux ;;
2196     irix*) template=irix ;;
2197  linux*|gnu*|k*bsd*-gnu)
2198            template=linux ;;
2199    mingw*) template=win32 ;;
2200   netbsd*) template=netbsd ;;
2201 nextstep*) template=nextstep ;;
2202  openbsd*) template=openbsd ;;
2203      osf*) template=osf ;;
2204      sco*) template=sco ;;
2205  solaris*) template=solaris ;;
2206    sunos*) template=sunos4 ;;
2207  sysv4.2*)
2208         case $host_vendor in
2209           univel) template=univel ;;
2210         esac ;;
2211    sysv4*) template=svr4 ;;
2212    sysv5*) template=unixware ;;
2213   ultrix*) template=ultrix4 ;;
2214 esac
2215
2216   if test x"$template" = x"" ; then
2217     { { $as_echo "$as_me:$LINENO: error:
2218 *******************************************************************
2219 PostgreSQL has apparently not been ported to your platform yet.
2220 To try a manual configuration, look into the src/template directory
2221 for a similar platform and use the '--with-template=' option.
2222
2223 Please also contact <pgsql-bugs@postgresql.org> to see about
2224 rectifying this.  Include the above 'checking host system type...'
2225 line.
2226 *******************************************************************
2227 " >&5
2228 $as_echo "$as_me: error:
2229 *******************************************************************
2230 PostgreSQL has apparently not been ported to your platform yet.
2231 To try a manual configuration, look into the src/template directory
2232 for a similar platform and use the '--with-template=' option.
2233
2234 Please also contact <pgsql-bugs@postgresql.org> to see about
2235 rectifying this.  Include the above 'checking host system type...'
2236 line.
2237 *******************************************************************
2238 " >&2;}
2239    { (exit 1); exit 1; }; }
2240   fi
2241
2242
2243 fi
2244
2245
2246
2247 { $as_echo "$as_me:$LINENO: result: $template" >&5
2248 $as_echo "$template" >&6; }
2249
2250 PORTNAME=$template
2251
2252
2253 # Initialize default assumption that we do not need separate assembly code
2254 # for TAS (test-and-set).  This can be overridden by the template file
2255 # when it's executed.
2256 need_tas=no
2257 tas_file=dummy.s
2258
2259
2260
2261 ##
2262 ## Command line options
2263 ##
2264
2265 #
2266 # Add non-standard directories to the include path
2267 #
2268
2269
2270
2271 # Check whether --with-includes was given.
2272 if test "${with_includes+set}" = set; then
2273   withval=$with_includes;
2274   case $withval in
2275     yes)
2276       { { $as_echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
2277 $as_echo "$as_me: error: argument required for --with-includes option" >&2;}
2278    { (exit 1); exit 1; }; }
2279       ;;
2280     no)
2281       { { $as_echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
2282 $as_echo "$as_me: error: argument required for --with-includes option" >&2;}
2283    { (exit 1); exit 1; }; }
2284       ;;
2285     *)
2286
2287       ;;
2288   esac
2289
2290 fi
2291
2292
2293
2294
2295 #
2296 # Add non-standard directories to the library search path
2297 #
2298
2299
2300
2301 # Check whether --with-libraries was given.
2302 if test "${with_libraries+set}" = set; then
2303   withval=$with_libraries;
2304   case $withval in
2305     yes)
2306       { { $as_echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
2307 $as_echo "$as_me: error: argument required for --with-libraries option" >&2;}
2308    { (exit 1); exit 1; }; }
2309       ;;
2310     no)
2311       { { $as_echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
2312 $as_echo "$as_me: error: argument required for --with-libraries option" >&2;}
2313    { (exit 1); exit 1; }; }
2314       ;;
2315     *)
2316       LIBRARY_DIRS=$withval
2317       ;;
2318   esac
2319
2320 fi
2321
2322
2323
2324
2325
2326
2327 # Check whether --with-libs was given.
2328 if test "${with_libs+set}" = set; then
2329   withval=$with_libs;
2330   case $withval in
2331     yes)
2332       { { $as_echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
2333 $as_echo "$as_me: error: argument required for --with-libs option" >&2;}
2334    { (exit 1); exit 1; }; }
2335       ;;
2336     no)
2337       { { $as_echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
2338 $as_echo "$as_me: error: argument required for --with-libs option" >&2;}
2339    { (exit 1); exit 1; }; }
2340       ;;
2341     *)
2342       LIBRARY_DIRS=$withval
2343       ;;
2344   esac
2345
2346 fi
2347
2348
2349
2350
2351 #
2352 # 64-bit integer date/time storage: enabled by default.
2353 #
2354 { $as_echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time support" >&5
2355 $as_echo_n "checking whether to build with 64-bit integer date/time support... " >&6; }
2356
2357
2358 # Check whether --enable-integer-datetimes was given.
2359 if test "${enable_integer_datetimes+set}" = set; then
2360   enableval=$enable_integer_datetimes;
2361   case $enableval in
2362     yes)
2363
2364 cat >>confdefs.h <<\_ACEOF
2365 #define USE_INTEGER_DATETIMES 1
2366 _ACEOF
2367
2368       ;;
2369     no)
2370       :
2371       ;;
2372     *)
2373       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-integer-datetimes option" >&5
2374 $as_echo "$as_me: error: no argument expected for --enable-integer-datetimes option" >&2;}
2375    { (exit 1); exit 1; }; }
2376       ;;
2377   esac
2378
2379 else
2380   enable_integer_datetimes=yes
2381
2382 cat >>confdefs.h <<\_ACEOF
2383 #define USE_INTEGER_DATETIMES 1
2384 _ACEOF
2385
2386 fi
2387
2388
2389 { $as_echo "$as_me:$LINENO: result: $enable_integer_datetimes" >&5
2390 $as_echo "$enable_integer_datetimes" >&6; }
2391
2392
2393 #
2394 # NLS
2395 #
2396 { $as_echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
2397 $as_echo_n "checking whether NLS is wanted... " >&6; }
2398
2399
2400 # Check whether --enable-nls was given.
2401 if test "${enable_nls+set}" = set; then
2402   enableval=$enable_nls;
2403   case $enableval in
2404     yes)
2405       :
2406       ;;
2407     no)
2408       :
2409       ;;
2410     *)
2411       enable_nls=yes
2412 WANTED_LANGUAGES=$enableval
2413       ;;
2414   esac
2415
2416 else
2417   enable_nls=no
2418 fi
2419
2420
2421
2422 if test "$enable_nls" = yes; then
2423
2424 cat >>confdefs.h <<\_ACEOF
2425 #define ENABLE_NLS 1
2426 _ACEOF
2427
2428 fi
2429
2430 { $as_echo "$as_me:$LINENO: result: $enable_nls" >&5
2431 $as_echo "$enable_nls" >&6; }
2432
2433
2434
2435 #
2436 # Default port number (--with-pgport), default 5432
2437 #
2438 { $as_echo "$as_me:$LINENO: checking for default port number" >&5
2439 $as_echo_n "checking for default port number... " >&6; }
2440
2441
2442
2443 # Check whether --with-pgport was given.
2444 if test "${with_pgport+set}" = set; then
2445   withval=$with_pgport;
2446   case $withval in
2447     yes)
2448       { { $as_echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
2449 $as_echo "$as_me: error: argument required for --with-pgport option" >&2;}
2450    { (exit 1); exit 1; }; }
2451       ;;
2452     no)
2453       { { $as_echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
2454 $as_echo "$as_me: error: argument required for --with-pgport option" >&2;}
2455    { (exit 1); exit 1; }; }
2456       ;;
2457     *)
2458       default_port=$withval
2459       ;;
2460   esac
2461
2462 else
2463   default_port=5432
2464 fi
2465
2466
2467 { $as_echo "$as_me:$LINENO: result: $default_port" >&5
2468 $as_echo "$default_port" >&6; }
2469 # Need both of these because some places want an integer and some a string
2470
2471 cat >>confdefs.h <<_ACEOF
2472 #define DEF_PGPORT ${default_port}
2473 _ACEOF
2474
2475
2476 cat >>confdefs.h <<_ACEOF
2477 #define DEF_PGPORT_STR "${default_port}"
2478 _ACEOF
2479
2480
2481
2482 #
2483 # Option to disable shared libraries
2484 #
2485
2486
2487 # Check whether --enable-shared was given.
2488 if test "${enable_shared+set}" = set; then
2489   enableval=$enable_shared;
2490   case $enableval in
2491     yes)
2492       :
2493       ;;
2494     no)
2495       :
2496       ;;
2497     *)
2498       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-shared option" >&5
2499 $as_echo "$as_me: error: no argument expected for --enable-shared option" >&2;}
2500    { (exit 1); exit 1; }; }
2501       ;;
2502   esac
2503
2504 else
2505   enable_shared=yes
2506
2507 fi
2508
2509
2510
2511
2512 #
2513 # '-rpath'-like feature can be disabled
2514 #
2515
2516
2517 # Check whether --enable-rpath was given.
2518 if test "${enable_rpath+set}" = set; then
2519   enableval=$enable_rpath;
2520   case $enableval in
2521     yes)
2522       :
2523       ;;
2524     no)
2525       :
2526       ;;
2527     *)
2528       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-rpath option" >&5
2529 $as_echo "$as_me: error: no argument expected for --enable-rpath option" >&2;}
2530    { (exit 1); exit 1; }; }
2531       ;;
2532   esac
2533
2534 else
2535   enable_rpath=yes
2536
2537 fi
2538
2539
2540
2541
2542 #
2543 # Spinlocks
2544 #
2545
2546
2547 # Check whether --enable-spinlocks was given.
2548 if test "${enable_spinlocks+set}" = set; then
2549   enableval=$enable_spinlocks;
2550   case $enableval in
2551     yes)
2552       :
2553       ;;
2554     no)
2555       :
2556       ;;
2557     *)
2558       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-spinlocks option" >&5
2559 $as_echo "$as_me: error: no argument expected for --enable-spinlocks option" >&2;}
2560    { (exit 1); exit 1; }; }
2561       ;;
2562   esac
2563
2564 else
2565   enable_spinlocks=yes
2566
2567 fi
2568
2569
2570
2571 #
2572 # --enable-debug adds -g to compiler flags
2573 #
2574
2575
2576 # Check whether --enable-debug was given.
2577 if test "${enable_debug+set}" = set; then
2578   enableval=$enable_debug;
2579   case $enableval in
2580     yes)
2581       :
2582       ;;
2583     no)
2584       :
2585       ;;
2586     *)
2587       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-debug option" >&5
2588 $as_echo "$as_me: error: no argument expected for --enable-debug option" >&2;}
2589    { (exit 1); exit 1; }; }
2590       ;;
2591   esac
2592
2593 else
2594   enable_debug=no
2595
2596 fi
2597
2598
2599
2600
2601 #
2602 # --enable-profiling enables gcc profiling
2603 #
2604
2605
2606 # Check whether --enable-profiling was given.
2607 if test "${enable_profiling+set}" = set; then
2608   enableval=$enable_profiling;
2609   case $enableval in
2610     yes)
2611       :
2612       ;;
2613     no)
2614       :
2615       ;;
2616     *)
2617       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-profiling option" >&5
2618 $as_echo "$as_me: error: no argument expected for --enable-profiling option" >&2;}
2619    { (exit 1); exit 1; }; }
2620       ;;
2621   esac
2622
2623 else
2624   enable_profiling=no
2625
2626 fi
2627
2628
2629
2630
2631 #
2632 # --enable-coverage enables generation of code coverage metrics with gcov
2633 #
2634
2635
2636 # Check whether --enable-coverage was given.
2637 if test "${enable_coverage+set}" = set; then
2638   enableval=$enable_coverage;
2639   case $enableval in
2640     yes)
2641       for ac_prog in gcov
2642 do
2643   # Extract the first word of "$ac_prog", so it can be a program name with args.
2644 set dummy $ac_prog; ac_word=$2
2645 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2646 $as_echo_n "checking for $ac_word... " >&6; }
2647 if test "${ac_cv_prog_GCOV+set}" = set; then
2648   $as_echo_n "(cached) " >&6
2649 else
2650   if test -n "$GCOV"; then
2651   ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
2652 else
2653 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2654 for as_dir in $PATH
2655 do
2656   IFS=$as_save_IFS
2657   test -z "$as_dir" && as_dir=.
2658   for ac_exec_ext in '' $ac_executable_extensions; do
2659   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2660     ac_cv_prog_GCOV="$ac_prog"
2661     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2662     break 2
2663   fi
2664 done
2665 done
2666 IFS=$as_save_IFS
2667
2668 fi
2669 fi
2670 GCOV=$ac_cv_prog_GCOV
2671 if test -n "$GCOV"; then
2672   { $as_echo "$as_me:$LINENO: result: $GCOV" >&5
2673 $as_echo "$GCOV" >&6; }
2674 else
2675   { $as_echo "$as_me:$LINENO: result: no" >&5
2676 $as_echo "no" >&6; }
2677 fi
2678
2679
2680   test -n "$GCOV" && break
2681 done
2682
2683 if test -z "$GCOV"; then
2684   { { $as_echo "$as_me:$LINENO: error: gcov not found" >&5
2685 $as_echo "$as_me: error: gcov not found" >&2;}
2686    { (exit 1); exit 1; }; }
2687 fi
2688 for ac_prog in lcov
2689 do
2690   # Extract the first word of "$ac_prog", so it can be a program name with args.
2691 set dummy $ac_prog; ac_word=$2
2692 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2693 $as_echo_n "checking for $ac_word... " >&6; }
2694 if test "${ac_cv_prog_LCOV+set}" = set; then
2695   $as_echo_n "(cached) " >&6
2696 else
2697   if test -n "$LCOV"; then
2698   ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
2699 else
2700 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2701 for as_dir in $PATH
2702 do
2703   IFS=$as_save_IFS
2704   test -z "$as_dir" && as_dir=.
2705   for ac_exec_ext in '' $ac_executable_extensions; do
2706   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2707     ac_cv_prog_LCOV="$ac_prog"
2708     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2709     break 2
2710   fi
2711 done
2712 done
2713 IFS=$as_save_IFS
2714
2715 fi
2716 fi
2717 LCOV=$ac_cv_prog_LCOV
2718 if test -n "$LCOV"; then
2719   { $as_echo "$as_me:$LINENO: result: $LCOV" >&5
2720 $as_echo "$LCOV" >&6; }
2721 else
2722   { $as_echo "$as_me:$LINENO: result: no" >&5
2723 $as_echo "no" >&6; }
2724 fi
2725
2726
2727   test -n "$LCOV" && break
2728 done
2729
2730 if test -z "$LCOV"; then
2731   { { $as_echo "$as_me:$LINENO: error: lcov not found" >&5
2732 $as_echo "$as_me: error: lcov not found" >&2;}
2733    { (exit 1); exit 1; }; }
2734 fi
2735 for ac_prog in genhtml
2736 do
2737   # Extract the first word of "$ac_prog", so it can be a program name with args.
2738 set dummy $ac_prog; ac_word=$2
2739 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2740 $as_echo_n "checking for $ac_word... " >&6; }
2741 if test "${ac_cv_prog_GENHTML+set}" = set; then
2742   $as_echo_n "(cached) " >&6
2743 else
2744   if test -n "$GENHTML"; then
2745   ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
2746 else
2747 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2748 for as_dir in $PATH
2749 do
2750   IFS=$as_save_IFS
2751   test -z "$as_dir" && as_dir=.
2752   for ac_exec_ext in '' $ac_executable_extensions; do
2753   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2754     ac_cv_prog_GENHTML="$ac_prog"
2755     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2756     break 2
2757   fi
2758 done
2759 done
2760 IFS=$as_save_IFS
2761
2762 fi
2763 fi
2764 GENHTML=$ac_cv_prog_GENHTML
2765 if test -n "$GENHTML"; then
2766   { $as_echo "$as_me:$LINENO: result: $GENHTML" >&5
2767 $as_echo "$GENHTML" >&6; }
2768 else
2769   { $as_echo "$as_me:$LINENO: result: no" >&5
2770 $as_echo "no" >&6; }
2771 fi
2772
2773
2774   test -n "$GENHTML" && break
2775 done
2776
2777 if test -z "$GENHTML"; then
2778   { { $as_echo "$as_me:$LINENO: error: genhtml not found" >&5
2779 $as_echo "$as_me: error: genhtml not found" >&2;}
2780    { (exit 1); exit 1; }; }
2781 fi
2782       ;;
2783     no)
2784       :
2785       ;;
2786     *)
2787       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-coverage option" >&5
2788 $as_echo "$as_me: error: no argument expected for --enable-coverage option" >&2;}
2789    { (exit 1); exit 1; }; }
2790       ;;
2791   esac
2792
2793 else
2794   enable_coverage=no
2795
2796 fi
2797
2798
2799
2800
2801 #
2802 # DTrace
2803 #
2804
2805
2806 # Check whether --enable-dtrace was given.
2807 if test "${enable_dtrace+set}" = set; then
2808   enableval=$enable_dtrace;
2809   case $enableval in
2810     yes)
2811
2812 cat >>confdefs.h <<\_ACEOF
2813 #define ENABLE_DTRACE 1
2814 _ACEOF
2815
2816 for ac_prog in dtrace
2817 do
2818   # Extract the first word of "$ac_prog", so it can be a program name with args.
2819 set dummy $ac_prog; ac_word=$2
2820 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2821 $as_echo_n "checking for $ac_word... " >&6; }
2822 if test "${ac_cv_prog_DTRACE+set}" = set; then
2823   $as_echo_n "(cached) " >&6
2824 else
2825   if test -n "$DTRACE"; then
2826   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
2827 else
2828 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2829 for as_dir in $PATH
2830 do
2831   IFS=$as_save_IFS
2832   test -z "$as_dir" && as_dir=.
2833   for ac_exec_ext in '' $ac_executable_extensions; do
2834   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2835     ac_cv_prog_DTRACE="$ac_prog"
2836     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2837     break 2
2838   fi
2839 done
2840 done
2841 IFS=$as_save_IFS
2842
2843 fi
2844 fi
2845 DTRACE=$ac_cv_prog_DTRACE
2846 if test -n "$DTRACE"; then
2847   { $as_echo "$as_me:$LINENO: result: $DTRACE" >&5
2848 $as_echo "$DTRACE" >&6; }
2849 else
2850   { $as_echo "$as_me:$LINENO: result: no" >&5
2851 $as_echo "no" >&6; }
2852 fi
2853
2854
2855   test -n "$DTRACE" && break
2856 done
2857
2858 if test -z "$DTRACE"; then
2859   { { $as_echo "$as_me:$LINENO: error: dtrace not found" >&5
2860 $as_echo "$as_me: error: dtrace not found" >&2;}
2861    { (exit 1); exit 1; }; }
2862 fi
2863
2864       ;;
2865     no)
2866       :
2867       ;;
2868     *)
2869       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-dtrace option" >&5
2870 $as_echo "$as_me: error: no argument expected for --enable-dtrace option" >&2;}
2871    { (exit 1); exit 1; }; }
2872       ;;
2873   esac
2874
2875 else
2876   enable_dtrace=no
2877
2878 fi
2879
2880
2881
2882
2883 #
2884 # Block size
2885 #
2886 { $as_echo "$as_me:$LINENO: checking for block size" >&5
2887 $as_echo_n "checking for block size... " >&6; }
2888
2889
2890
2891 # Check whether --with-blocksize was given.
2892 if test "${with_blocksize+set}" = set; then
2893   withval=$with_blocksize;
2894   case $withval in
2895     yes)
2896       { { $as_echo "$as_me:$LINENO: error: argument required for --with-blocksize option" >&5
2897 $as_echo "$as_me: error: argument required for --with-blocksize option" >&2;}
2898    { (exit 1); exit 1; }; }
2899       ;;
2900     no)
2901       { { $as_echo "$as_me:$LINENO: error: argument required for --with-blocksize option" >&5
2902 $as_echo "$as_me: error: argument required for --with-blocksize option" >&2;}
2903    { (exit 1); exit 1; }; }
2904       ;;
2905     *)
2906       blocksize=$withval
2907       ;;
2908   esac
2909
2910 else
2911   blocksize=8
2912 fi
2913
2914
2915 case ${blocksize} in
2916   1) BLCKSZ=1024;;
2917   2) BLCKSZ=2048;;
2918   4) BLCKSZ=4096;;
2919   8) BLCKSZ=8192;;
2920  16) BLCKSZ=16384;;
2921  32) BLCKSZ=32768;;
2922   *) { { $as_echo "$as_me:$LINENO: error: Invalid block size. Allowed values are 1,2,4,8,16,32." >&5
2923 $as_echo "$as_me: error: Invalid block size. Allowed values are 1,2,4,8,16,32." >&2;}
2924    { (exit 1); exit 1; }; }
2925 esac
2926 { $as_echo "$as_me:$LINENO: result: ${blocksize}kB" >&5
2927 $as_echo "${blocksize}kB" >&6; }
2928
2929
2930 cat >>confdefs.h <<_ACEOF
2931 #define BLCKSZ ${BLCKSZ}
2932 _ACEOF
2933
2934
2935 #
2936 # Relation segment size
2937 #
2938 { $as_echo "$as_me:$LINENO: checking for segment size" >&5
2939 $as_echo_n "checking for segment size... " >&6; }
2940
2941
2942
2943 # Check whether --with-segsize was given.
2944 if test "${with_segsize+set}" = set; then
2945   withval=$with_segsize;
2946   case $withval in
2947     yes)
2948       { { $as_echo "$as_me:$LINENO: error: argument required for --with-segsize option" >&5
2949 $as_echo "$as_me: error: argument required for --with-segsize option" >&2;}
2950    { (exit 1); exit 1; }; }
2951       ;;
2952     no)
2953       { { $as_echo "$as_me:$LINENO: error: argument required for --with-segsize option" >&5
2954 $as_echo "$as_me: error: argument required for --with-segsize option" >&2;}
2955    { (exit 1); exit 1; }; }
2956       ;;
2957     *)
2958       segsize=$withval
2959       ;;
2960   esac
2961
2962 else
2963   segsize=1
2964 fi
2965
2966
2967 # this expression is set up to avoid unnecessary integer overflow
2968 # blocksize is already guaranteed to be a factor of 1024
2969 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
2970 test $? -eq 0 || exit 1
2971 { $as_echo "$as_me:$LINENO: result: ${segsize}GB" >&5
2972 $as_echo "${segsize}GB" >&6; }
2973
2974
2975 cat >>confdefs.h <<_ACEOF
2976 #define RELSEG_SIZE ${RELSEG_SIZE}
2977 _ACEOF
2978
2979
2980 #
2981 # WAL block size
2982 #
2983 { $as_echo "$as_me:$LINENO: checking for WAL block size" >&5
2984 $as_echo_n "checking for WAL block size... " >&6; }
2985
2986
2987
2988 # Check whether --with-wal-blocksize was given.
2989 if test "${with_wal_blocksize+set}" = set; then
2990   withval=$with_wal_blocksize;
2991   case $withval in
2992     yes)
2993       { { $as_echo "$as_me:$LINENO: error: argument required for --with-wal-blocksize option" >&5
2994 $as_echo "$as_me: error: argument required for --with-wal-blocksize option" >&2;}
2995    { (exit 1); exit 1; }; }
2996       ;;
2997     no)
2998       { { $as_echo "$as_me:$LINENO: error: argument required for --with-wal-blocksize option" >&5
2999 $as_echo "$as_me: error: argument required for --with-wal-blocksize option" >&2;}
3000    { (exit 1); exit 1; }; }
3001       ;;
3002     *)
3003       wal_blocksize=$withval
3004       ;;
3005   esac
3006
3007 else
3008   wal_blocksize=8
3009 fi
3010
3011
3012 case ${wal_blocksize} in
3013   1) XLOG_BLCKSZ=1024;;
3014   2) XLOG_BLCKSZ=2048;;
3015   4) XLOG_BLCKSZ=4096;;
3016   8) XLOG_BLCKSZ=8192;;
3017  16) XLOG_BLCKSZ=16384;;
3018  32) XLOG_BLCKSZ=32768;;
3019  64) XLOG_BLCKSZ=65536;;
3020   *) { { $as_echo "$as_me:$LINENO: error: Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." >&5
3021 $as_echo "$as_me: error: Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." >&2;}
3022    { (exit 1); exit 1; }; }
3023 esac
3024 { $as_echo "$as_me:$LINENO: result: ${wal_blocksize}kB" >&5
3025 $as_echo "${wal_blocksize}kB" >&6; }
3026
3027
3028 cat >>confdefs.h <<_ACEOF
3029 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3030 _ACEOF
3031
3032
3033 #
3034 # WAL segment size
3035 #
3036 { $as_echo "$as_me:$LINENO: checking for WAL segment size" >&5
3037 $as_echo_n "checking for WAL segment size... " >&6; }
3038
3039
3040
3041 # Check whether --with-wal-segsize was given.
3042 if test "${with_wal_segsize+set}" = set; then
3043   withval=$with_wal_segsize;
3044   case $withval in
3045     yes)
3046       { { $as_echo "$as_me:$LINENO: error: argument required for --with-wal-segsize option" >&5
3047 $as_echo "$as_me: error: argument required for --with-wal-segsize option" >&2;}
3048    { (exit 1); exit 1; }; }
3049       ;;
3050     no)
3051       { { $as_echo "$as_me:$LINENO: error: argument required for --with-wal-segsize option" >&5
3052 $as_echo "$as_me: error: argument required for --with-wal-segsize option" >&2;}
3053    { (exit 1); exit 1; }; }
3054       ;;
3055     *)
3056       wal_segsize=$withval
3057       ;;
3058   esac
3059
3060 else
3061   wal_segsize=16
3062 fi
3063
3064
3065 case ${wal_segsize} in
3066   1) ;;
3067   2) ;;
3068   4) ;;
3069   8) ;;
3070  16) ;;
3071  32) ;;
3072  64) ;;
3073   *) { { $as_echo "$as_me:$LINENO: error: Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." >&5
3074 $as_echo "$as_me: error: Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." >&2;}
3075    { (exit 1); exit 1; }; }
3076 esac
3077 { $as_echo "$as_me:$LINENO: result: ${wal_segsize}MB" >&5
3078 $as_echo "${wal_segsize}MB" >&6; }
3079
3080
3081 cat >>confdefs.h <<_ACEOF
3082 #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
3083 _ACEOF
3084
3085
3086 #
3087 # C compiler
3088 #
3089
3090 # For historical reasons you can also use --with-CC to specify the C compiler
3091 # to use, although the standard way to do this is to set the CC environment
3092 # variable.
3093
3094
3095
3096 # Check whether --with-CC was given.
3097 if test "${with_CC+set}" = set; then
3098   withval=$with_CC;
3099   case $withval in
3100     yes)
3101       { { $as_echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
3102 $as_echo "$as_me: error: argument required for --with-CC option" >&2;}
3103    { (exit 1); exit 1; }; }
3104       ;;
3105     no)
3106       { { $as_echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
3107 $as_echo "$as_me: error: argument required for --with-CC option" >&2;}
3108    { (exit 1); exit 1; }; }
3109       ;;
3110     *)
3111       CC=$with_CC
3112       ;;
3113   esac
3114
3115 fi
3116
3117
3118
3119 case $template in
3120   aix) pgac_cc_list="gcc xlc";;
3121  irix) pgac_cc_list="cc";; # no gcc
3122     *) pgac_cc_list="gcc cc";;
3123 esac
3124
3125 ac_ext=c
3126 ac_cpp='$CPP $CPPFLAGS'
3127 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3128 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3129 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3130 if test -n "$ac_tool_prefix"; then
3131   for ac_prog in $pgac_cc_list
3132   do
3133     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3134 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3135 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3136 $as_echo_n "checking for $ac_word... " >&6; }
3137 if test "${ac_cv_prog_CC+set}" = set; then
3138   $as_echo_n "(cached) " >&6
3139 else
3140   if test -n "$CC"; then
3141   ac_cv_prog_CC="$CC" # Let the user override the test.
3142 else
3143 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3144 for as_dir in $PATH
3145 do
3146   IFS=$as_save_IFS
3147   test -z "$as_dir" && as_dir=.
3148   for ac_exec_ext in '' $ac_executable_extensions; do
3149   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3150     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3151     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3152     break 2
3153   fi
3154 done
3155 done
3156 IFS=$as_save_IFS
3157
3158 fi
3159 fi
3160 CC=$ac_cv_prog_CC
3161 if test -n "$CC"; then
3162   { $as_echo "$as_me:$LINENO: result: $CC" >&5
3163 $as_echo "$CC" >&6; }
3164 else
3165   { $as_echo "$as_me:$LINENO: result: no" >&5
3166 $as_echo "no" >&6; }
3167 fi
3168
3169
3170     test -n "$CC" && break
3171   done
3172 fi
3173 if test -z "$CC"; then
3174   ac_ct_CC=$CC
3175   for ac_prog in $pgac_cc_list
3176 do
3177   # Extract the first word of "$ac_prog", so it can be a program name with args.
3178 set dummy $ac_prog; ac_word=$2
3179 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3180 $as_echo_n "checking for $ac_word... " >&6; }
3181 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3182   $as_echo_n "(cached) " >&6
3183 else
3184   if test -n "$ac_ct_CC"; then
3185   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3186 else
3187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3188 for as_dir in $PATH
3189 do
3190   IFS=$as_save_IFS
3191   test -z "$as_dir" && as_dir=.
3192   for ac_exec_ext in '' $ac_executable_extensions; do
3193   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3194     ac_cv_prog_ac_ct_CC="$ac_prog"
3195     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3196     break 2
3197   fi
3198 done
3199 done
3200 IFS=$as_save_IFS
3201
3202 fi
3203 fi
3204 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3205 if test -n "$ac_ct_CC"; then
3206   { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3207 $as_echo "$ac_ct_CC" >&6; }
3208 else
3209   { $as_echo "$as_me:$LINENO: result: no" >&5
3210 $as_echo "no" >&6; }
3211 fi
3212
3213
3214   test -n "$ac_ct_CC" && break
3215 done
3216
3217   if test "x$ac_ct_CC" = x; then
3218     CC=""
3219   else
3220     case $cross_compiling:$ac_tool_warned in
3221 yes:)
3222 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
3223 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3224 ac_tool_warned=yes ;;
3225 esac
3226     CC=$ac_ct_CC
3227   fi
3228 fi
3229
3230
3231 test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3232 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3233 { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3234 See \`config.log' for more details." >&5
3235 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH
3236 See \`config.log' for more details." >&2;}
3237    { (exit 1); exit 1; }; }; }
3238
3239 # Provide some information about the compiler.
3240 $as_echo "$as_me:$LINENO: checking for C compiler version" >&5
3241 set X $ac_compile
3242 ac_compiler=$2
3243 { (ac_try="$ac_compiler --version >&5"
3244 case "(($ac_try" in
3245   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3246   *) ac_try_echo=$ac_try;;
3247 esac
3248 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3249 $as_echo "$ac_try_echo") >&5
3250   (eval "$ac_compiler --version >&5") 2>&5
3251   ac_status=$?
3252   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3253   (exit $ac_status); }
3254 { (ac_try="$ac_compiler -v >&5"
3255 case "(($ac_try" in
3256   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3257   *) ac_try_echo=$ac_try;;
3258 esac
3259 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3260 $as_echo "$ac_try_echo") >&5
3261   (eval "$ac_compiler -v >&5") 2>&5
3262   ac_status=$?
3263   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3264   (exit $ac_status); }
3265 { (ac_try="$ac_compiler -V >&5"
3266 case "(($ac_try" in
3267   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3268   *) ac_try_echo=$ac_try;;
3269 esac
3270 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3271 $as_echo "$ac_try_echo") >&5
3272   (eval "$ac_compiler -V >&5") 2>&5
3273   ac_status=$?
3274   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3275   (exit $ac_status); }
3276
3277 cat >conftest.$ac_ext <<_ACEOF
3278 /* confdefs.h.  */
3279 _ACEOF
3280 cat confdefs.h >>conftest.$ac_ext
3281 cat >>conftest.$ac_ext <<_ACEOF
3282 /* end confdefs.h.  */
3283
3284 int
3285 main ()
3286 {
3287
3288   ;
3289   return 0;
3290 }
3291 _ACEOF
3292 ac_clean_files_save=$ac_clean_files
3293 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3294 # Try to create an executable without -o first, disregard a.out.
3295 # It will help us diagnose broken compilers, and finding out an intuition
3296 # of exeext.
3297 { $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3298 $as_echo_n "checking for C compiler default output file name... " >&6; }
3299 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3300
3301 # The possible output files:
3302 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3303
3304 ac_rmfiles=
3305 for ac_file in $ac_files
3306 do
3307   case $ac_file in
3308     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3309     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3310   esac
3311 done
3312 rm -f $ac_rmfiles
3313
3314 if { (ac_try="$ac_link_default"
3315 case "(($ac_try" in
3316   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3317   *) ac_try_echo=$ac_try;;
3318 esac
3319 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3320 $as_echo "$ac_try_echo") >&5
3321   (eval "$ac_link_default") 2>&5
3322   ac_status=$?
3323   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3324   (exit $ac_status); }; then
3325   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3326 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3327 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3328 # so that the user can short-circuit this test for compilers unknown to
3329 # Autoconf.
3330 for ac_file in $ac_files ''
3331 do
3332   test -f "$ac_file" || continue
3333   case $ac_file in
3334     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3335         ;;
3336     [ab].out )
3337         # We found the default executable, but exeext='' is most
3338         # certainly right.
3339         break;;
3340     *.* )
3341         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3342         then :; else
3343            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3344         fi
3345         # We set ac_cv_exeext here because the later test for it is not
3346         # safe: cross compilers may not add the suffix if given an `-o'
3347         # argument, so we may need to know it at that point already.
3348         # Even if this section looks crufty: it has the advantage of
3349         # actually working.
3350         break;;
3351     * )
3352         break;;
3353   esac
3354 done
3355 test "$ac_cv_exeext" = no && ac_cv_exeext=
3356
3357 else
3358   ac_file=''
3359 fi
3360
3361 { $as_echo "$as_me:$LINENO: result: $ac_file" >&5
3362 $as_echo "$ac_file" >&6; }
3363 if test -z "$ac_file"; then
3364   $as_echo "$as_me: failed program was:" >&5
3365 sed 's/^/| /' conftest.$ac_ext >&5
3366
3367 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3368 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3369 { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
3370 See \`config.log' for more details." >&5
3371 $as_echo "$as_me: error: C compiler cannot create executables
3372 See \`config.log' for more details." >&2;}
3373    { (exit 77); exit 77; }; }; }
3374 fi
3375
3376 ac_exeext=$ac_cv_exeext
3377
3378 # Check that the compiler produces executables we can run.  If not, either
3379 # the compiler is broken, or we cross compile.
3380 { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3381 $as_echo_n "checking whether the C compiler works... " >&6; }
3382 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3383 # If not cross compiling, check that we can run a simple program.
3384 if test "$cross_compiling" != yes; then
3385   if { ac_try='./$ac_file'
3386   { (case "(($ac_try" in
3387   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3388   *) ac_try_echo=$ac_try;;
3389 esac
3390 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3391 $as_echo "$ac_try_echo") >&5
3392   (eval "$ac_try") 2>&5
3393   ac_status=$?
3394   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3395   (exit $ac_status); }; }; then
3396     cross_compiling=no
3397   else
3398     if test "$cross_compiling" = maybe; then
3399         cross_compiling=yes
3400     else
3401         { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3402 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3403 { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
3404 If you meant to cross compile, use \`--host'.
3405 See \`config.log' for more details." >&5
3406 $as_echo "$as_me: error: cannot run C compiled programs.
3407 If you meant to cross compile, use \`--host'.
3408 See \`config.log' for more details." >&2;}
3409    { (exit 1); exit 1; }; }; }
3410     fi
3411   fi
3412 fi
3413 { $as_echo "$as_me:$LINENO: result: yes" >&5
3414 $as_echo "yes" >&6; }
3415
3416 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3417 ac_clean_files=$ac_clean_files_save
3418 # Check that the compiler produces executables we can run.  If not, either
3419 # the compiler is broken, or we cross compile.
3420 { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3421 $as_echo_n "checking whether we are cross compiling... " >&6; }
3422 { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
3423 $as_echo "$cross_compiling" >&6; }
3424
3425 { $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
3426 $as_echo_n "checking for suffix of executables... " >&6; }
3427 if { (ac_try="$ac_link"
3428 case "(($ac_try" in
3429   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3430   *) ac_try_echo=$ac_try;;
3431 esac
3432 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3433 $as_echo "$ac_try_echo") >&5
3434   (eval "$ac_link") 2>&5
3435   ac_status=$?
3436   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3437   (exit $ac_status); }; then
3438   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3439 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3440 # work properly (i.e., refer to `conftest.exe'), while it won't with
3441 # `rm'.
3442 for ac_file in conftest.exe conftest conftest.*; do
3443   test -f "$ac_file" || continue
3444   case $ac_file in
3445     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3446     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3447           break;;
3448     * ) break;;
3449   esac
3450 done
3451 else
3452   { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3453 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3454 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3455 See \`config.log' for more details." >&5
3456 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3457 See \`config.log' for more details." >&2;}
3458    { (exit 1); exit 1; }; }; }
3459 fi
3460
3461 rm -f conftest$ac_cv_exeext
3462 { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3463 $as_echo "$ac_cv_exeext" >&6; }
3464
3465 rm -f conftest.$ac_ext
3466 EXEEXT=$ac_cv_exeext
3467 ac_exeext=$EXEEXT
3468 { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
3469 $as_echo_n "checking for suffix of object files... " >&6; }
3470 if test "${ac_cv_objext+set}" = set; then
3471   $as_echo_n "(cached) " >&6
3472 else
3473   cat >conftest.$ac_ext <<_ACEOF
3474 /* confdefs.h.  */
3475 _ACEOF
3476 cat confdefs.h >>conftest.$ac_ext
3477 cat >>conftest.$ac_ext <<_ACEOF
3478 /* end confdefs.h.  */
3479
3480 int
3481 main ()
3482 {
3483
3484   ;
3485   return 0;
3486 }
3487 _ACEOF
3488 rm -f conftest.o conftest.obj
3489 if { (ac_try="$ac_compile"
3490 case "(($ac_try" in
3491   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3492   *) ac_try_echo=$ac_try;;
3493 esac
3494 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3495 $as_echo "$ac_try_echo") >&5
3496   (eval "$ac_compile") 2>&5
3497   ac_status=$?
3498   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3499   (exit $ac_status); }; then
3500   for ac_file in conftest.o conftest.obj conftest.*; do
3501   test -f "$ac_file" || continue;
3502   case $ac_file in
3503     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3504     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3505        break;;
3506   esac
3507 done
3508 else
3509   $as_echo "$as_me: failed program was:" >&5
3510 sed 's/^/| /' conftest.$ac_ext >&5
3511
3512 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3513 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3514 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3515 See \`config.log' for more details." >&5
3516 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
3517 See \`config.log' for more details." >&2;}
3518    { (exit 1); exit 1; }; }; }
3519 fi
3520
3521 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3522 fi
3523 { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3524 $as_echo "$ac_cv_objext" >&6; }
3525 OBJEXT=$ac_cv_objext
3526 ac_objext=$OBJEXT
3527 { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3528 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3529 if test "${ac_cv_c_compiler_gnu+set}" = set; then
3530   $as_echo_n "(cached) " >&6
3531 else
3532   cat >conftest.$ac_ext <<_ACEOF
3533 /* confdefs.h.  */
3534 _ACEOF
3535 cat confdefs.h >>conftest.$ac_ext
3536 cat >>conftest.$ac_ext <<_ACEOF
3537 /* end confdefs.h.  */
3538
3539 int
3540 main ()
3541 {
3542 #ifndef __GNUC__
3543        choke me
3544 #endif
3545
3546   ;
3547   return 0;
3548 }
3549 _ACEOF
3550 rm -f conftest.$ac_objext
3551 if { (ac_try="$ac_compile"
3552 case "(($ac_try" in
3553   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3554   *) ac_try_echo=$ac_try;;
3555 esac
3556 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3557 $as_echo "$ac_try_echo") >&5
3558   (eval "$ac_compile") 2>conftest.er1
3559   ac_status=$?
3560   grep -v '^ *+' conftest.er1 >conftest.err
3561   rm -f conftest.er1
3562   cat conftest.err >&5
3563   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3564   (exit $ac_status); } && {
3565          test -z "$ac_c_werror_flag" ||
3566          test ! -s conftest.err
3567        } && test -s conftest.$ac_objext; then
3568   ac_compiler_gnu=yes
3569 else
3570   $as_echo "$as_me: failed program was:" >&5
3571 sed 's/^/| /' conftest.$ac_ext >&5
3572
3573         ac_compiler_gnu=no
3574 fi
3575
3576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3577 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3578
3579 fi
3580 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3581 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3582 if test $ac_compiler_gnu = yes; then
3583   GCC=yes
3584 else
3585   GCC=
3586 fi
3587 ac_test_CFLAGS=${CFLAGS+set}
3588 ac_save_CFLAGS=$CFLAGS
3589 { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3590 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3591 if test "${ac_cv_prog_cc_g+set}" = set; then
3592   $as_echo_n "(cached) " >&6
3593 else
3594   ac_save_c_werror_flag=$ac_c_werror_flag
3595    ac_c_werror_flag=yes
3596    ac_cv_prog_cc_g=no
3597    CFLAGS="-g"
3598    cat >conftest.$ac_ext <<_ACEOF
3599 /* confdefs.h.  */
3600 _ACEOF
3601 cat confdefs.h >>conftest.$ac_ext
3602 cat >>conftest.$ac_ext <<_ACEOF
3603 /* end confdefs.h.  */
3604
3605 int
3606 main ()
3607 {
3608
3609   ;
3610   return 0;
3611 }
3612 _ACEOF
3613 rm -f conftest.$ac_objext
3614 if { (ac_try="$ac_compile"
3615 case "(($ac_try" in
3616   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3617   *) ac_try_echo=$ac_try;;
3618 esac
3619 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3620 $as_echo "$ac_try_echo") >&5
3621   (eval "$ac_compile") 2>conftest.er1
3622   ac_status=$?
3623   grep -v '^ *+' conftest.er1 >conftest.err
3624   rm -f conftest.er1
3625   cat conftest.err >&5
3626   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3627   (exit $ac_status); } && {
3628          test -z "$ac_c_werror_flag" ||
3629          test ! -s conftest.err
3630        } && test -s conftest.$ac_objext; then
3631   ac_cv_prog_cc_g=yes
3632 else
3633   $as_echo "$as_me: failed program was:" >&5
3634 sed 's/^/| /' conftest.$ac_ext >&5
3635
3636         CFLAGS=""
3637       cat >conftest.$ac_ext <<_ACEOF
3638 /* confdefs.h.  */
3639 _ACEOF
3640 cat confdefs.h >>conftest.$ac_ext
3641 cat >>conftest.$ac_ext <<_ACEOF
3642 /* end confdefs.h.  */
3643
3644 int
3645 main ()
3646 {
3647
3648   ;
3649   return 0;
3650 }
3651 _ACEOF
3652 rm -f conftest.$ac_objext
3653 if { (ac_try="$ac_compile"
3654 case "(($ac_try" in
3655   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3656   *) ac_try_echo=$ac_try;;
3657 esac
3658 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3659 $as_echo "$ac_try_echo") >&5
3660   (eval "$ac_compile") 2>conftest.er1
3661   ac_status=$?
3662   grep -v '^ *+' conftest.er1 >conftest.err
3663   rm -f conftest.er1
3664   cat conftest.err >&5
3665   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3666   (exit $ac_status); } && {
3667          test -z "$ac_c_werror_flag" ||
3668          test ! -s conftest.err
3669        } && test -s conftest.$ac_objext; then
3670   :
3671 else
3672   $as_echo "$as_me: failed program was:" >&5
3673 sed 's/^/| /' conftest.$ac_ext >&5
3674
3675         ac_c_werror_flag=$ac_save_c_werror_flag
3676          CFLAGS="-g"
3677          cat >conftest.$ac_ext <<_ACEOF
3678 /* confdefs.h.  */
3679 _ACEOF
3680 cat confdefs.h >>conftest.$ac_ext
3681 cat >>conftest.$ac_ext <<_ACEOF
3682 /* end confdefs.h.  */
3683
3684 int
3685 main ()
3686 {
3687
3688   ;
3689   return 0;
3690 }
3691 _ACEOF
3692 rm -f conftest.$ac_objext
3693 if { (ac_try="$ac_compile"
3694 case "(($ac_try" in
3695   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3696   *) ac_try_echo=$ac_try;;
3697 esac
3698 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3699 $as_echo "$ac_try_echo") >&5
3700   (eval "$ac_compile") 2>conftest.er1
3701   ac_status=$?
3702   grep -v '^ *+' conftest.er1 >conftest.err
3703   rm -f conftest.er1
3704   cat conftest.err >&5
3705   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3706   (exit $ac_status); } && {
3707          test -z "$ac_c_werror_flag" ||
3708          test ! -s conftest.err
3709        } && test -s conftest.$ac_objext; then
3710   ac_cv_prog_cc_g=yes
3711 else
3712   $as_echo "$as_me: failed program was:" >&5
3713 sed 's/^/| /' conftest.$ac_ext >&5
3714
3715
3716 fi
3717
3718 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3719 fi
3720
3721 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3722 fi
3723
3724 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3725    ac_c_werror_flag=$ac_save_c_werror_flag
3726 fi
3727 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3728 $as_echo "$ac_cv_prog_cc_g" >&6; }
3729 if test "$ac_test_CFLAGS" = set; then
3730   CFLAGS=$ac_save_CFLAGS
3731 elif test $ac_cv_prog_cc_g = yes; then
3732   if test "$GCC" = yes; then
3733     CFLAGS="-g -O2"
3734   else
3735     CFLAGS="-g"
3736   fi
3737 else
3738   if test "$GCC" = yes; then
3739     CFLAGS="-O2"
3740   else
3741     CFLAGS=
3742   fi
3743 fi
3744 { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3745 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3746 if test "${ac_cv_prog_cc_c89+set}" = set; then
3747   $as_echo_n "(cached) " >&6
3748 else
3749   ac_cv_prog_cc_c89=no
3750 ac_save_CC=$CC
3751 cat >conftest.$ac_ext <<_ACEOF
3752 /* confdefs.h.  */
3753 _ACEOF
3754 cat confdefs.h >>conftest.$ac_ext
3755 cat >>conftest.$ac_ext <<_ACEOF
3756 /* end confdefs.h.  */
3757 #include <stdarg.h>
3758 #include <stdio.h>
3759 #include <sys/types.h>
3760 #include <sys/stat.h>
3761 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3762 struct buf { int x; };
3763 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3764 static char *e (p, i)
3765      char **p;
3766      int i;
3767 {
3768   return p[i];
3769 }
3770 static char *f (char * (*g) (char **, int), char **p, ...)
3771 {
3772   char *s;
3773   va_list v;
3774   va_start (v,p);
3775   s = g (p, va_arg (v,int));
3776   va_end (v);
3777   return s;
3778 }
3779
3780 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3781    function prototypes and stuff, but not '\xHH' hex character constants.
3782    These don't provoke an error unfortunately, instead are silently treated
3783    as 'x'.  The following induces an error, until -std is added to get
3784    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3785    array size at least.  It's necessary to write '\x00'==0 to get something
3786    that's true only with -std.  */
3787 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3788
3789 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3790    inside strings and character constants.  */
3791 #define FOO(x) 'x'
3792 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3793
3794 int test (int i, double x);
3795 struct s1 {int (*f) (int a);};
3796 struct s2 {int (*f) (double a);};
3797 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3798 int argc;
3799 char **argv;
3800 int
3801 main ()
3802 {
3803 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3804   ;
3805   return 0;
3806 }
3807 _ACEOF
3808 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3809         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3810 do
3811   CC="$ac_save_CC $ac_arg"
3812   rm -f conftest.$ac_objext
3813 if { (ac_try="$ac_compile"
3814 case "(($ac_try" in
3815   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3816   *) ac_try_echo=$ac_try;;
3817 esac
3818 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3819 $as_echo "$ac_try_echo") >&5
3820   (eval "$ac_compile") 2>conftest.er1
3821   ac_status=$?
3822   grep -v '^ *+' conftest.er1 >conftest.err
3823   rm -f conftest.er1
3824   cat conftest.err >&5
3825   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3826   (exit $ac_status); } && {
3827          test -z "$ac_c_werror_flag" ||
3828          test ! -s conftest.err
3829        } && test -s conftest.$ac_objext; then
3830   ac_cv_prog_cc_c89=$ac_arg
3831 else
3832   $as_echo "$as_me: failed program was:" >&5
3833 sed 's/^/| /' conftest.$ac_ext >&5
3834
3835
3836 fi
3837
3838 rm -f core conftest.err conftest.$ac_objext
3839   test "x$ac_cv_prog_cc_c89" != "xno" && break
3840 done
3841 rm -f conftest.$ac_ext
3842 CC=$ac_save_CC
3843
3844 fi
3845 # AC_CACHE_VAL
3846 case "x$ac_cv_prog_cc_c89" in
3847   x)
3848     { $as_echo "$as_me:$LINENO: result: none needed" >&5
3849 $as_echo "none needed" >&6; } ;;
3850   xno)
3851     { $as_echo "$as_me:$LINENO: result: unsupported" >&5
3852 $as_echo "unsupported" >&6; } ;;
3853   *)
3854     CC="$CC $ac_cv_prog_cc_c89"
3855     { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3856 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3857 esac
3858
3859
3860 ac_ext=c
3861 ac_cpp='$CPP $CPPFLAGS'
3862 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3863 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3864 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3865
3866
3867 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
3868 # but has idiosyncrasies of its own.  We assume icc will define
3869 # __INTEL_COMPILER regardless of CFLAGS.
3870
3871 cat >conftest.$ac_ext <<_ACEOF
3872 /* confdefs.h.  */
3873 _ACEOF
3874 cat confdefs.h >>conftest.$ac_ext
3875 cat >>conftest.$ac_ext <<_ACEOF
3876 /* end confdefs.h.  */
3877
3878 int
3879 main ()
3880 {
3881 #ifndef __INTEL_COMPILER
3882 choke me
3883 #endif
3884   ;
3885   return 0;
3886 }
3887 _ACEOF
3888 rm -f conftest.$ac_objext
3889 if { (ac_try="$ac_compile"
3890 case "(($ac_try" in
3891   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3892   *) ac_try_echo=$ac_try;;
3893 esac
3894 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3895 $as_echo "$ac_try_echo") >&5
3896   (eval "$ac_compile") 2>conftest.er1
3897   ac_status=$?
3898   grep -v '^ *+' conftest.er1 >conftest.err
3899   rm -f conftest.er1
3900   cat conftest.err >&5
3901   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3902   (exit $ac_status); } && {
3903          test -z "$ac_c_werror_flag" ||
3904          test ! -s conftest.err
3905        } && test -s conftest.$ac_objext; then
3906   ICC=yes
3907 else
3908   $as_echo "$as_me: failed program was:" >&5
3909 sed 's/^/| /' conftest.$ac_ext >&5
3910
3911         ICC=no
3912 fi
3913
3914 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3915
3916 # Check if it's Sun Studio compiler. We assume that
3917 # __SUNPRO_C will be defined for Sun Studio compilers
3918 cat >conftest.$ac_ext <<_ACEOF
3919 /* confdefs.h.  */
3920 _ACEOF
3921 cat confdefs.h >>conftest.$ac_ext
3922 cat >>conftest.$ac_ext <<_ACEOF
3923 /* end confdefs.h.  */
3924
3925 int
3926 main ()
3927 {
3928 #ifndef __SUNPRO_C
3929 choke me
3930 #endif
3931   ;
3932   return 0;
3933 }
3934 _ACEOF
3935 rm -f conftest.$ac_objext
3936 if { (ac_try="$ac_compile"
3937 case "(($ac_try" in
3938   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3939   *) ac_try_echo=$ac_try;;
3940 esac
3941 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3942 $as_echo "$ac_try_echo") >&5
3943   (eval "$ac_compile") 2>conftest.er1
3944   ac_status=$?
3945   grep -v '^ *+' conftest.er1 >conftest.err
3946   rm -f conftest.er1
3947   cat conftest.err >&5
3948   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3949   (exit $ac_status); } && {
3950          test -z "$ac_c_werror_flag" ||
3951          test ! -s conftest.err
3952        } && test -s conftest.$ac_objext; then
3953   SUN_STUDIO_CC=yes
3954 else
3955   $as_echo "$as_me: failed program was:" >&5
3956 sed 's/^/| /' conftest.$ac_ext >&5
3957
3958         SUN_STUDIO_CC=no
3959 fi
3960
3961 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3962
3963
3964
3965 unset CFLAGS
3966
3967 #
3968 # Read the template
3969 #
3970 . "$srcdir/src/template/$template" || exit
3971
3972 # CFLAGS are selected so:
3973 # If the user specifies something in the environment, that is used.
3974 # else:  If the template file set something, that is used.
3975 # else:  If coverage was enabled, don't set anything.
3976 # else:  If the compiler is GCC, then we use -O2.
3977 # else:  If the compiler is something else, then we use -O, unless debugging.
3978
3979 if test "$ac_env_CFLAGS_set" = set; then
3980   CFLAGS=$ac_env_CFLAGS_value
3981 elif test "${CFLAGS+set}" = set; then
3982   : # (keep what template set)
3983 elif test "$enable_coverage" = yes; then
3984   : # no optimization by default
3985 elif test "$GCC" = yes; then
3986   CFLAGS="-O2"
3987 else
3988   # if the user selected debug mode, don't use -O
3989   if test "$enable_debug" != yes; then
3990     CFLAGS="-O"
3991   fi
3992 fi
3993
3994 # Some versions of GCC support some additional useful warning flags.
3995 # Check whether they are supported, and add them to CFLAGS if so.
3996 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
3997 # but has its own.  Also check other compiler-specific flags here.
3998
3999 if test "$GCC" = yes -a "$ICC" = no; then
4000   CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith"
4001   # These work in some but not all gcc versions
4002   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wdeclaration-after-statement" >&5
4003 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
4004 if test "${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+set}" = set; then
4005   $as_echo_n "(cached) " >&6
4006 else
4007   pgac_save_CFLAGS=$CFLAGS
4008 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
4009 cat >conftest.$ac_ext <<_ACEOF
4010 /* confdefs.h.  */
4011 _ACEOF
4012 cat confdefs.h >>conftest.$ac_ext
4013 cat >>conftest.$ac_ext <<_ACEOF
4014 /* end confdefs.h.  */
4015
4016 int
4017 main ()
4018 {
4019
4020   ;
4021   return 0;
4022 }
4023 _ACEOF
4024 rm -f conftest.$ac_objext
4025 if { (ac_try="$ac_compile"
4026 case "(($ac_try" in
4027   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4028   *) ac_try_echo=$ac_try;;
4029 esac
4030 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4031 $as_echo "$ac_try_echo") >&5
4032   (eval "$ac_compile") 2>conftest.er1
4033   ac_status=$?
4034   grep -v '^ *+' conftest.er1 >conftest.err
4035   rm -f conftest.er1
4036   cat conftest.err >&5
4037   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4038   (exit $ac_status); } && {
4039          test -z "$ac_c_werror_flag" ||
4040          test ! -s conftest.err
4041        } && test -s conftest.$ac_objext; then
4042   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4043 else
4044   $as_echo "$as_me: failed program was:" >&5
4045 sed 's/^/| /' conftest.$ac_ext >&5
4046
4047         pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4048 fi
4049
4050 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4051 CFLAGS="$pgac_save_CFLAGS"
4052 fi
4053 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4054 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4055 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4056   CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4057 fi
4058
4059   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wendif-labels" >&5
4060 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4061 if test "${pgac_cv_prog_cc_cflags__Wendif_labels+set}" = set; then
4062   $as_echo_n "(cached) " >&6
4063 else
4064   pgac_save_CFLAGS=$CFLAGS
4065 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4066 cat >conftest.$ac_ext <<_ACEOF
4067 /* confdefs.h.  */
4068 _ACEOF
4069 cat confdefs.h >>conftest.$ac_ext
4070 cat >>conftest.$ac_ext <<_ACEOF
4071 /* end confdefs.h.  */
4072
4073 int
4074 main ()
4075 {
4076
4077   ;
4078   return 0;
4079 }
4080 _ACEOF
4081 rm -f conftest.$ac_objext
4082 if { (ac_try="$ac_compile"
4083 case "(($ac_try" in
4084   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4085   *) ac_try_echo=$ac_try;;
4086 esac
4087 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4088 $as_echo "$ac_try_echo") >&5
4089   (eval "$ac_compile") 2>conftest.er1
4090   ac_status=$?
4091   grep -v '^ *+' conftest.er1 >conftest.err
4092   rm -f conftest.er1
4093   cat conftest.err >&5
4094   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4095   (exit $ac_status); } && {
4096          test -z "$ac_c_werror_flag" ||
4097          test ! -s conftest.err
4098        } && test -s conftest.$ac_objext; then
4099   pgac_cv_prog_cc_cflags__Wendif_labels=yes
4100 else
4101   $as_echo "$as_me: failed program was:" >&5
4102 sed 's/^/| /' conftest.$ac_ext >&5
4103
4104         pgac_cv_prog_cc_cflags__Wendif_labels=no
4105 fi
4106
4107 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4108 CFLAGS="$pgac_save_CFLAGS"
4109 fi
4110 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4111 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4112 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4113   CFLAGS="$CFLAGS -Wendif-labels"
4114 fi
4115
4116   # Disable strict-aliasing rules; needed for gcc 3.3+
4117   { $as_echo "$as_me:$LINENO: checking whether $CC supports -fno-strict-aliasing" >&5
4118 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4119 if test "${pgac_cv_prog_cc_cflags__fno_strict_aliasing+set}" = set; then
4120   $as_echo_n "(cached) " >&6
4121 else
4122   pgac_save_CFLAGS=$CFLAGS
4123 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4124 cat >conftest.$ac_ext <<_ACEOF
4125 /* confdefs.h.  */
4126 _ACEOF
4127 cat confdefs.h >>conftest.$ac_ext
4128 cat >>conftest.$ac_ext <<_ACEOF
4129 /* end confdefs.h.  */
4130
4131 int
4132 main ()
4133 {
4134
4135   ;
4136   return 0;
4137 }
4138 _ACEOF
4139 rm -f conftest.$ac_objext
4140 if { (ac_try="$ac_compile"
4141 case "(($ac_try" in
4142   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4143   *) ac_try_echo=$ac_try;;
4144 esac
4145 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4146 $as_echo "$ac_try_echo") >&5
4147   (eval "$ac_compile") 2>conftest.er1
4148   ac_status=$?
4149   grep -v '^ *+' conftest.er1 >conftest.err
4150   rm -f conftest.er1
4151   cat conftest.err >&5
4152   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4153   (exit $ac_status); } && {
4154          test -z "$ac_c_werror_flag" ||
4155          test ! -s conftest.err
4156        } && test -s conftest.$ac_objext; then
4157   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4158 else
4159   $as_echo "$as_me: failed program was:" >&5
4160 sed 's/^/| /' conftest.$ac_ext >&5
4161
4162         pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4163 fi
4164
4165 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4166 CFLAGS="$pgac_save_CFLAGS"
4167 fi
4168 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4169 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4170 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4171   CFLAGS="$CFLAGS -fno-strict-aliasing"
4172 fi
4173
4174   # Disable optimizations that assume no overflow; needed for gcc 4.3+
4175   { $as_echo "$as_me:$LINENO: checking whether $CC supports -fwrapv" >&5
4176 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4177 if test "${pgac_cv_prog_cc_cflags__fwrapv+set}" = set; then
4178   $as_echo_n "(cached) " >&6
4179 else
4180   pgac_save_CFLAGS=$CFLAGS
4181 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4182 cat >conftest.$ac_ext <<_ACEOF
4183 /* confdefs.h.  */
4184 _ACEOF
4185 cat confdefs.h >>conftest.$ac_ext
4186 cat >>conftest.$ac_ext <<_ACEOF
4187 /* end confdefs.h.  */
4188
4189 int
4190 main ()
4191 {
4192
4193   ;
4194   return 0;
4195 }
4196 _ACEOF
4197 rm -f conftest.$ac_objext
4198 if { (ac_try="$ac_compile"
4199 case "(($ac_try" in
4200   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4201   *) ac_try_echo=$ac_try;;
4202 esac
4203 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4204 $as_echo "$ac_try_echo") >&5
4205   (eval "$ac_compile") 2>conftest.er1
4206   ac_status=$?
4207   grep -v '^ *+' conftest.er1 >conftest.err
4208   rm -f conftest.er1
4209   cat conftest.err >&5
4210   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4211   (exit $ac_status); } && {
4212          test -z "$ac_c_werror_flag" ||
4213          test ! -s conftest.err
4214        } && test -s conftest.$ac_objext; then
4215   pgac_cv_prog_cc_cflags__fwrapv=yes
4216 else
4217   $as_echo "$as_me: failed program was:" >&5
4218 sed 's/^/| /' conftest.$ac_ext >&5
4219
4220         pgac_cv_prog_cc_cflags__fwrapv=no
4221 fi
4222
4223 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4224 CFLAGS="$pgac_save_CFLAGS"
4225 fi
4226 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4227 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4228 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4229   CFLAGS="$CFLAGS -fwrapv"
4230 fi
4231
4232 elif test "$ICC" = yes; then
4233   # Intel's compiler has a bug/misoptimization in checking for
4234   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4235   { $as_echo "$as_me:$LINENO: checking whether $CC supports -mp1" >&5
4236 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4237 if test "${pgac_cv_prog_cc_cflags__mp1+set}" = set; then
4238   $as_echo_n "(cached) " >&6
4239 else
4240   pgac_save_CFLAGS=$CFLAGS
4241 CFLAGS="$pgac_save_CFLAGS -mp1"
4242 cat >conftest.$ac_ext <<_ACEOF
4243 /* confdefs.h.  */
4244 _ACEOF
4245 cat confdefs.h >>conftest.$ac_ext
4246 cat >>conftest.$ac_ext <<_ACEOF
4247 /* end confdefs.h.  */
4248
4249 int
4250 main ()
4251 {
4252
4253   ;
4254   return 0;
4255 }
4256 _ACEOF
4257 rm -f conftest.$ac_objext
4258 if { (ac_try="$ac_compile"
4259 case "(($ac_try" in
4260   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4261   *) ac_try_echo=$ac_try;;
4262 esac
4263 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4264 $as_echo "$ac_try_echo") >&5
4265   (eval "$ac_compile") 2>conftest.er1
4266   ac_status=$?
4267   grep -v '^ *+' conftest.er1 >conftest.err
4268   rm -f conftest.er1
4269   cat conftest.err >&5
4270   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4271   (exit $ac_status); } && {
4272          test -z "$ac_c_werror_flag" ||
4273          test ! -s conftest.err
4274        } && test -s conftest.$ac_objext; then
4275   pgac_cv_prog_cc_cflags__mp1=yes
4276 else
4277   $as_echo "$as_me: failed program was:" >&5
4278 sed 's/^/| /' conftest.$ac_ext >&5
4279
4280         pgac_cv_prog_cc_cflags__mp1=no
4281 fi
4282
4283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4284 CFLAGS="$pgac_save_CFLAGS"
4285 fi
4286 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4287 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4288 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4289   CFLAGS="$CFLAGS -mp1"
4290 fi
4291
4292   # Make sure strict aliasing is off (though this is said to be the default)
4293   { $as_echo "$as_me:$LINENO: checking whether $CC supports -fno-strict-aliasing" >&5
4294 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4295 if test "${pgac_cv_prog_cc_cflags__fno_strict_aliasing+set}" = set; then
4296   $as_echo_n "(cached) " >&6
4297 else
4298   pgac_save_CFLAGS=$CFLAGS
4299 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4300 cat >conftest.$ac_ext <<_ACEOF
4301 /* confdefs.h.  */
4302 _ACEOF
4303 cat confdefs.h >>conftest.$ac_ext
4304 cat >>conftest.$ac_ext <<_ACEOF
4305 /* end confdefs.h.  */
4306
4307 int
4308 main ()
4309 {
4310
4311   ;
4312   return 0;
4313 }
4314 _ACEOF
4315 rm -f conftest.$ac_objext
4316 if { (ac_try="$ac_compile"
4317 case "(($ac_try" in
4318   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4319   *) ac_try_echo=$ac_try;;
4320 esac
4321 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4322 $as_echo "$ac_try_echo") >&5
4323   (eval "$ac_compile") 2>conftest.er1
4324   ac_status=$?
4325   grep -v '^ *+' conftest.er1 >conftest.err
4326   rm -f conftest.er1
4327   cat conftest.err >&5
4328   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4329   (exit $ac_status); } && {
4330          test -z "$ac_c_werror_flag" ||
4331          test ! -s conftest.err
4332        } && test -s conftest.$ac_objext; then
4333   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4334 else
4335   $as_echo "$as_me: failed program was:" >&5
4336 sed 's/^/| /' conftest.$ac_ext >&5
4337
4338         pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4339 fi
4340
4341 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4342 CFLAGS="$pgac_save_CFLAGS"
4343 fi
4344 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4345 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4346 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4347   CFLAGS="$CFLAGS -fno-strict-aliasing"
4348 fi
4349
4350 elif test "$PORTNAME" = "aix"; then
4351   # AIX's xlc has to have strict aliasing turned off too
4352   { $as_echo "$as_me:$LINENO: checking whether $CC supports -qnoansialias" >&5
4353 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4354 if test "${pgac_cv_prog_cc_cflags__qnoansialias+set}" = set; then
4355   $as_echo_n "(cached) " >&6
4356 else
4357   pgac_save_CFLAGS=$CFLAGS
4358 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4359 cat >conftest.$ac_ext <<_ACEOF
4360 /* confdefs.h.  */
4361 _ACEOF
4362 cat confdefs.h >>conftest.$ac_ext
4363 cat >>conftest.$ac_ext <<_ACEOF
4364 /* end confdefs.h.  */
4365
4366 int
4367 main ()
4368 {
4369
4370   ;
4371   return 0;
4372 }
4373 _ACEOF
4374 rm -f conftest.$ac_objext
4375 if { (ac_try="$ac_compile"
4376 case "(($ac_try" in
4377   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4378   *) ac_try_echo=$ac_try;;
4379 esac
4380 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4381 $as_echo "$ac_try_echo") >&5
4382   (eval "$ac_compile") 2>conftest.er1
4383   ac_status=$?
4384   grep -v '^ *+' conftest.er1 >conftest.err
4385   rm -f conftest.er1
4386   cat conftest.err >&5
4387   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4388   (exit $ac_status); } && {
4389          test -z "$ac_c_werror_flag" ||
4390          test ! -s conftest.err
4391        } && test -s conftest.$ac_objext; then
4392   pgac_cv_prog_cc_cflags__qnoansialias=yes
4393 else
4394   $as_echo "$as_me: failed program was:" >&5
4395 sed 's/^/| /' conftest.$ac_ext >&5
4396
4397         pgac_cv_prog_cc_cflags__qnoansialias=no
4398 fi
4399
4400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4401 CFLAGS="$pgac_save_CFLAGS"
4402 fi
4403 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4404 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4405 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4406   CFLAGS="$CFLAGS -qnoansialias"
4407 fi
4408
4409 fi
4410
4411 # supply -g if --enable-debug
4412 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
4413   CFLAGS="$CFLAGS -g"
4414 fi
4415
4416 # enable code coverage if --enable-coverage
4417 if test "$enable_coverage" = yes; then
4418   if test "$GCC" = yes; then
4419     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
4420   else
4421     { { $as_echo "$as_me:$LINENO: error: --enable-coverage is supported only when using GCC" >&5
4422 $as_echo "$as_me: error: --enable-coverage is supported only when using GCC" >&2;}
4423    { (exit 1); exit 1; }; }
4424   fi
4425 fi
4426
4427 # enable profiling if --enable-profiling
4428 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
4429   if test "$GCC" = yes; then
4430
4431 cat >>confdefs.h <<\_ACEOF
4432 #define PROFILE_PID_DIR 1
4433 _ACEOF
4434
4435     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
4436   else
4437     { { $as_echo "$as_me:$LINENO: error: --enable-profiling is supported only when using GCC" >&5
4438 $as_echo "$as_me: error: --enable-profiling is supported only when using GCC" >&2;}
4439    { (exit 1); exit 1; }; }
4440   fi
4441 fi
4442
4443 # We already have this in Makefile.win32, but configure needs it too
4444 if test "$PORTNAME" = "win32"; then
4445   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
4446 fi
4447
4448 # Check if the compiler still works with the template settings
4449 { $as_echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
4450 $as_echo_n "checking whether the C compiler still works... " >&6; }
4451 cat >conftest.$ac_ext <<_ACEOF
4452 /* confdefs.h.  */
4453 _ACEOF
4454 cat confdefs.h >>conftest.$ac_ext
4455 cat >>conftest.$ac_ext <<_ACEOF
4456 /* end confdefs.h.  */
4457
4458 int
4459 main ()
4460 {
4461 return 0;
4462   ;
4463   return 0;
4464 }
4465 _ACEOF
4466 rm -f conftest.$ac_objext conftest$ac_exeext
4467 if { (ac_try="$ac_link"
4468 case "(($ac_try" in
4469   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4470   *) ac_try_echo=$ac_try;;
4471 esac
4472 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4473 $as_echo "$ac_try_echo") >&5
4474   (eval "$ac_link") 2>conftest.er1
4475   ac_status=$?
4476   grep -v '^ *+' conftest.er1 >conftest.err
4477   rm -f conftest.er1
4478   cat conftest.err >&5
4479   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4480   (exit $ac_status); } && {
4481          test -z "$ac_c_werror_flag" ||
4482          test ! -s conftest.err
4483        } && test -s conftest$ac_exeext && {
4484          test "$cross_compiling" = yes ||
4485          $as_test_x conftest$ac_exeext
4486        }; then
4487   { $as_echo "$as_me:$LINENO: result: yes" >&5
4488 $as_echo "yes" >&6; }
4489 else
4490   $as_echo "$as_me: failed program was:" >&5
4491 sed 's/^/| /' conftest.$ac_ext >&5
4492
4493         { $as_echo "$as_me:$LINENO: result: no" >&5
4494 $as_echo "no" >&6; }
4495    { { $as_echo "$as_me:$LINENO: error: cannot proceed" >&5
4496 $as_echo "$as_me: error: cannot proceed" >&2;}
4497    { (exit 1); exit 1; }; }
4498 fi
4499
4500 rm -rf conftest.dSYM
4501 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4502       conftest$ac_exeext conftest.$ac_ext
4503
4504 # Defend against gcc -ffast-math
4505 if test "$GCC" = yes; then
4506 cat >conftest.$ac_ext <<_ACEOF
4507 /* confdefs.h.  */
4508 _ACEOF
4509 cat confdefs.h >>conftest.$ac_ext
4510 cat >>conftest.$ac_ext <<_ACEOF
4511 /* end confdefs.h.  */
4512
4513 int
4514 main ()
4515 {
4516 #ifdef __FAST_MATH__
4517 choke me
4518 #endif
4519   ;
4520   return 0;
4521 }
4522 _ACEOF
4523 rm -f conftest.$ac_objext
4524 if { (ac_try="$ac_compile"
4525 case "(($ac_try" in
4526   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4527   *) ac_try_echo=$ac_try;;
4528 esac
4529 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4530 $as_echo "$ac_try_echo") >&5
4531   (eval "$ac_compile") 2>conftest.er1
4532   ac_status=$?
4533   grep -v '^ *+' conftest.er1 >conftest.err
4534   rm -f conftest.er1
4535   cat conftest.err >&5
4536   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4537   (exit $ac_status); } && {
4538          test -z "$ac_c_werror_flag" ||
4539          test ! -s conftest.err
4540        } && test -s conftest.$ac_objext; then
4541   :
4542 else
4543   $as_echo "$as_me: failed program was:" >&5
4544 sed 's/^/| /' conftest.$ac_ext >&5
4545
4546         { { $as_echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
4547 $as_echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
4548    { (exit 1); exit 1; }; }
4549 fi
4550
4551 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4552 fi
4553
4554 ac_ext=c
4555 ac_cpp='$CPP $CPPFLAGS'
4556 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4557 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4558 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4559 { $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4560 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4561 # On Suns, sometimes $CPP names a directory.
4562 if test -n "$CPP" && test -d "$CPP"; then
4563   CPP=
4564 fi
4565 if test -z "$CPP"; then
4566   if test "${ac_cv_prog_CPP+set}" = set; then
4567   $as_echo_n "(cached) " >&6
4568 else
4569       # Double quotes because CPP needs to be expanded
4570     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4571     do
4572       ac_preproc_ok=false
4573 for ac_c_preproc_warn_flag in '' yes
4574 do
4575   # Use a header file that comes with gcc, so configuring glibc
4576   # with a fresh cross-compiler works.
4577   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4578   # <limits.h> exists even on freestanding compilers.
4579   # On the NeXT, cc -E runs the code through the compiler's parser,
4580   # not just through cpp. "Syntax error" is here to catch this case.
4581   cat >conftest.$ac_ext <<_ACEOF
4582 /* confdefs.h.  */
4583 _ACEOF
4584 cat confdefs.h >>conftest.$ac_ext
4585 cat >>conftest.$ac_ext <<_ACEOF
4586 /* end confdefs.h.  */
4587 #ifdef __STDC__
4588 # include <limits.h>
4589 #else
4590 # include <assert.h>
4591 #endif
4592                      Syntax error
4593 _ACEOF
4594 if { (ac_try="$ac_cpp conftest.$ac_ext"
4595 case "(($ac_try" in
4596   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4597   *) ac_try_echo=$ac_try;;
4598 esac
4599 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4600 $as_echo "$ac_try_echo") >&5
4601   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4602   ac_status=$?
4603   grep -v '^ *+' conftest.er1 >conftest.err
4604   rm -f conftest.er1
4605   cat conftest.err >&5
4606   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4607   (exit $ac_status); } >/dev/null && {
4608          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4609          test ! -s conftest.err
4610        }; then
4611   :
4612 else
4613   $as_echo "$as_me: failed program was:" >&5
4614 sed 's/^/| /' conftest.$ac_ext >&5
4615
4616   # Broken: fails on valid input.
4617 continue
4618 fi
4619
4620 rm -f conftest.err conftest.$ac_ext
4621
4622   # OK, works on sane cases.  Now check whether nonexistent headers
4623   # can be detected and how.
4624   cat >conftest.$ac_ext <<_ACEOF
4625 /* confdefs.h.  */
4626 _ACEOF
4627 cat confdefs.h >>conftest.$ac_ext
4628 cat >>conftest.$ac_ext <<_ACEOF
4629 /* end confdefs.h.  */
4630 #include <ac_nonexistent.h>
4631 _ACEOF
4632 if { (ac_try="$ac_cpp conftest.$ac_ext"
4633 case "(($ac_try" in
4634   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4635   *) ac_try_echo=$ac_try;;
4636 esac
4637 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4638 $as_echo "$ac_try_echo") >&5
4639   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4640   ac_status=$?
4641   grep -v '^ *+' conftest.er1 >conftest.err
4642   rm -f conftest.er1
4643   cat conftest.err >&5
4644   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4645   (exit $ac_status); } >/dev/null && {
4646          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4647          test ! -s conftest.err
4648        }; then
4649   # Broken: success on invalid input.
4650 continue
4651 else
4652   $as_echo "$as_me: failed program was:" >&5
4653 sed 's/^/| /' conftest.$ac_ext >&5
4654
4655   # Passes both tests.
4656 ac_preproc_ok=:
4657 break
4658 fi
4659
4660 rm -f conftest.err conftest.$ac_ext
4661
4662 done
4663 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4664 rm -f conftest.err conftest.$ac_ext
4665 if $ac_preproc_ok; then
4666   break
4667 fi
4668
4669     done
4670     ac_cv_prog_CPP=$CPP
4671
4672 fi
4673   CPP=$ac_cv_prog_CPP
4674 else
4675   ac_cv_prog_CPP=$CPP
4676 fi
4677 { $as_echo "$as_me:$LINENO: result: $CPP" >&5
4678 $as_echo "$CPP" >&6; }
4679 ac_preproc_ok=false
4680 for ac_c_preproc_warn_flag in '' yes
4681 do
4682   # Use a header file that comes with gcc, so configuring glibc
4683   # with a fresh cross-compiler works.
4684   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4685   # <limits.h> exists even on freestanding compilers.
4686   # On the NeXT, cc -E runs the code through the compiler's parser,
4687   # not just through cpp. "Syntax error" is here to catch this case.
4688   cat >conftest.$ac_ext <<_ACEOF
4689 /* confdefs.h.  */
4690 _ACEOF
4691 cat confdefs.h >>conftest.$ac_ext
4692 cat >>conftest.$ac_ext <<_ACEOF
4693 /* end confdefs.h.  */
4694 #ifdef __STDC__
4695 # include <limits.h>
4696 #else
4697 # include <assert.h>
4698 #endif
4699                      Syntax error
4700 _ACEOF
4701 if { (ac_try="$ac_cpp conftest.$ac_ext"
4702 case "(($ac_try" in
4703   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4704   *) ac_try_echo=$ac_try;;
4705 esac
4706 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4707 $as_echo "$ac_try_echo") >&5
4708   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4709   ac_status=$?
4710   grep -v '^ *+' conftest.er1 >conftest.err
4711   rm -f conftest.er1
4712   cat conftest.err >&5
4713   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4714   (exit $ac_status); } >/dev/null && {
4715          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4716          test ! -s conftest.err
4717        }; then
4718   :
4719 else
4720   $as_echo "$as_me: failed program was:" >&5
4721 sed 's/^/| /' conftest.$ac_ext >&5
4722
4723   # Broken: fails on valid input.
4724 continue
4725 fi
4726
4727 rm -f conftest.err conftest.$ac_ext
4728
4729   # OK, works on sane cases.  Now check whether nonexistent headers
4730   # can be detected and how.
4731   cat >conftest.$ac_ext <<_ACEOF
4732 /* confdefs.h.  */
4733 _ACEOF
4734 cat confdefs.h >>conftest.$ac_ext
4735 cat >>conftest.$ac_ext <<_ACEOF
4736 /* end confdefs.h.  */
4737 #include <ac_nonexistent.h>
4738 _ACEOF
4739 if { (ac_try="$ac_cpp conftest.$ac_ext"
4740 case "(($ac_try" in
4741   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4742   *) ac_try_echo=$ac_try;;
4743 esac
4744 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4745 $as_echo "$ac_try_echo") >&5
4746   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4747   ac_status=$?
4748   grep -v '^ *+' conftest.er1 >conftest.err
4749   rm -f conftest.er1
4750   cat conftest.err >&5
4751   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4752   (exit $ac_status); } >/dev/null && {
4753          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4754          test ! -s conftest.err
4755        }; then
4756   # Broken: success on invalid input.
4757 continue
4758 else
4759   $as_echo "$as_me: failed program was:" >&5
4760 sed 's/^/| /' conftest.$ac_ext >&5
4761
4762   # Passes both tests.
4763 ac_preproc_ok=:
4764 break
4765 fi
4766
4767 rm -f conftest.err conftest.$ac_ext
4768
4769 done
4770 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4771 rm -f conftest.err conftest.$ac_ext
4772 if $ac_preproc_ok; then
4773   :
4774 else
4775   { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
4776 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4777 { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4778 See \`config.log' for more details." >&5
4779 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4780 See \`config.log' for more details." >&2;}
4781    { (exit 1); exit 1; }; }; }
4782 fi
4783
4784 ac_ext=c
4785 ac_cpp='$CPP $CPPFLAGS'
4786 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4787 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4788 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4789
4790
4791
4792
4793 #
4794 # Set up TAS assembly code if needed; the template file has now had its
4795 # chance to request this.
4796 #
4797 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
4798
4799
4800 if test "$need_tas" = yes ; then
4801   TAS=tas.o
4802 else
4803   TAS=""
4804 fi
4805
4806
4807
4808 #
4809 # Automatic dependency tracking
4810 #
4811
4812
4813 # Check whether --enable-depend was given.
4814 if test "${enable_depend+set}" = set; then
4815   enableval=$enable_depend;
4816   case $enableval in
4817     yes)
4818       autodepend=yes
4819       ;;
4820     no)
4821       :
4822       ;;
4823     *)
4824       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
4825 $as_echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
4826    { (exit 1); exit 1; }; }
4827       ;;
4828   esac
4829
4830 else
4831   enable_depend=no
4832
4833 fi
4834
4835
4836
4837
4838
4839 #
4840 # Enable assert checks
4841 #
4842
4843
4844 # Check whether --enable-cassert was given.
4845 if test "${enable_cassert+set}" = set; then
4846   enableval=$enable_cassert;
4847   case $enableval in
4848     yes)
4849
4850 cat >>confdefs.h <<\_ACEOF
4851 #define USE_ASSERT_CHECKING 1
4852 _ACEOF
4853
4854       ;;
4855     no)
4856       :
4857       ;;
4858     *)
4859       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
4860 $as_echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
4861    { (exit 1); exit 1; }; }
4862       ;;
4863   esac
4864
4865 else
4866   enable_cassert=no
4867
4868 fi
4869
4870
4871
4872
4873 #
4874 # Include directories
4875 #
4876 ac_save_IFS=$IFS
4877 IFS="${IFS}${PATH_SEPARATOR}"
4878 # SRCH_INC comes from the template file
4879 for dir in $with_includes $SRCH_INC; do
4880   if test -d "$dir"; then
4881     INCLUDES="$INCLUDES -I$dir"
4882   else
4883     { $as_echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
4884 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
4885   fi
4886 done
4887 IFS=$ac_save_IFS
4888
4889
4890
4891 #
4892 # Library directories
4893 #
4894 ac_save_IFS=$IFS
4895 IFS="${IFS}${PATH_SEPARATOR}"
4896 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
4897 for dir in $LIBRARY_DIRS $SRCH_LIB; do
4898   if test -d "$dir"; then
4899     LIBDIRS="$LIBDIRS -L$dir"
4900   else
4901     { $as_echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
4902 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
4903   fi
4904 done
4905 IFS=$ac_save_IFS
4906
4907 #
4908 # Enable thread-safe client libraries
4909 #
4910 { $as_echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
4911 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
4912
4913
4914 # Check whether --enable-thread-safety was given.
4915 if test "${enable_thread_safety+set}" = set; then
4916   enableval=$enable_thread_safety;
4917   case $enableval in
4918     yes)
4919       :
4920       ;;
4921     no)
4922       :
4923       ;;
4924     *)
4925       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
4926 $as_echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
4927    { (exit 1); exit 1; }; }
4928       ;;
4929   esac
4930
4931 else
4932   enable_thread_safety=yes
4933
4934 fi
4935
4936
4937 if test "$enable_thread_safety" = yes; then
4938
4939 cat >>confdefs.h <<\_ACEOF
4940 #define ENABLE_THREAD_SAFETY 1
4941 _ACEOF
4942
4943 fi
4944 { $as_echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
4945 $as_echo "$enable_thread_safety" >&6; }
4946
4947
4948 #
4949 # Optionally build Tcl modules (PL/Tcl)
4950 #
4951 { $as_echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
4952 $as_echo_n "checking whether to build with Tcl... " >&6; }
4953
4954
4955
4956 # Check whether --with-tcl was given.
4957 if test "${with_tcl+set}" = set; then
4958   withval=$with_tcl;
4959   case $withval in
4960     yes)
4961       :
4962       ;;
4963     no)
4964       :
4965       ;;
4966     *)
4967       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
4968 $as_echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
4969    { (exit 1); exit 1; }; }
4970       ;;
4971   esac
4972
4973 else
4974   with_tcl=no
4975
4976 fi
4977
4978
4979 { $as_echo "$as_me:$LINENO: result: $with_tcl" >&5
4980 $as_echo "$with_tcl" >&6; }
4981
4982
4983 # We see if the path to the Tcl/Tk configuration scripts is specified.
4984 # This will override the use of tclsh to find the paths to search.
4985
4986
4987
4988
4989 # Check whether --with-tclconfig was given.
4990 if test "${with_tclconfig+set}" = set; then
4991   withval=$with_tclconfig;
4992   case $withval in
4993     yes)
4994       { { $as_echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
4995 $as_echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
4996    { (exit 1); exit 1; }; }
4997       ;;
4998     no)
4999       { { $as_echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
5000 $as_echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
5001    { (exit 1); exit 1; }; }
5002       ;;
5003     *)
5004
5005       ;;
5006   esac
5007
5008 fi
5009
5010
5011
5012 #
5013 # Optionally build Perl modules (PL/Perl)
5014 #
5015 { $as_echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
5016 $as_echo_n "checking whether to build Perl modules... " >&6; }
5017
5018
5019
5020 # Check whether --with-perl was given.
5021 if test "${with_perl+set}" = set; then
5022   withval=$with_perl;
5023   case $withval in
5024     yes)
5025       :
5026       ;;
5027     no)
5028       :
5029       ;;
5030     *)
5031       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
5032 $as_echo "$as_me: error: no argument expected for --with-perl option" >&2;}
5033    { (exit 1); exit 1; }; }
5034       ;;
5035   esac
5036
5037 else
5038   with_perl=no
5039
5040 fi
5041
5042
5043 { $as_echo "$as_me:$LINENO: result: $with_perl" >&5
5044 $as_echo "$with_perl" >&6; }
5045
5046
5047 #
5048 # Optionally build Python modules (PL/Python)
5049 #
5050 { $as_echo "$as_me:$LINENO: checking whether to build Python modules" >&5
5051 $as_echo_n "checking whether to build Python modules... " >&6; }
5052
5053
5054
5055 # Check whether --with-python was given.
5056 if test "${with_python+set}" = set; then
5057   withval=$with_python;
5058   case $withval in
5059     yes)
5060       :
5061       ;;
5062     no)
5063       :
5064       ;;
5065     *)
5066       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
5067 $as_echo "$as_me: error: no argument expected for --with-python option" >&2;}
5068    { (exit 1); exit 1; }; }
5069       ;;
5070   esac
5071
5072 else
5073   with_python=no
5074
5075 fi
5076
5077
5078 { $as_echo "$as_me:$LINENO: result: $with_python" >&5
5079 $as_echo "$with_python" >&6; }
5080
5081
5082 #
5083 # GSSAPI
5084 #
5085 { $as_echo "$as_me:$LINENO: checking whether to build with GSSAPI support" >&5
5086 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5087
5088
5089
5090 # Check whether --with-gssapi was given.
5091 if test "${with_gssapi+set}" = set; then
5092   withval=$with_gssapi;
5093   case $withval in
5094     yes)
5095
5096
5097 cat >>confdefs.h <<\_ACEOF
5098 #define ENABLE_GSS 1
5099 _ACEOF
5100
5101   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5102
5103       ;;
5104     no)
5105       :
5106       ;;
5107     *)
5108       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-gssapi option" >&5
5109 $as_echo "$as_me: error: no argument expected for --with-gssapi option" >&2;}
5110    { (exit 1); exit 1; }; }
5111       ;;
5112   esac
5113
5114 else
5115   with_gssapi=no
5116
5117 fi
5118
5119
5120 { $as_echo "$as_me:$LINENO: result: $with_gssapi" >&5
5121 $as_echo "$with_gssapi" >&6; }
5122
5123
5124 #
5125 # Kerberos 5
5126 #
5127 { $as_echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
5128 $as_echo_n "checking whether to build with Kerberos 5 support... " >&6; }
5129
5130
5131
5132 # Check whether --with-krb5 was given.
5133 if test "${with_krb5+set}" = set; then
5134   withval=$with_krb5;
5135   case $withval in
5136     yes)
5137
5138
5139 cat >>confdefs.h <<\_ACEOF
5140 #define KRB5 1
5141 _ACEOF
5142
5143   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5144
5145       ;;
5146     no)
5147       :
5148       ;;
5149     *)
5150       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
5151 $as_echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
5152    { (exit 1); exit 1; }; }
5153       ;;
5154   esac
5155
5156 else
5157   with_krb5=no
5158
5159 fi
5160
5161
5162 { $as_echo "$as_me:$LINENO: result: $with_krb5" >&5
5163 $as_echo "$with_krb5" >&6; }
5164
5165
5166
5167
5168
5169
5170 #
5171 # Kerberos configuration parameters
5172 #
5173
5174
5175
5176 # Check whether --with-krb-srvnam was given.
5177 if test "${with_krb_srvnam+set}" = set; then
5178   withval=$with_krb_srvnam;
5179   case $withval in
5180     yes)
5181       { { $as_echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
5182 $as_echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
5183    { (exit 1); exit 1; }; }
5184       ;;
5185     no)
5186       { { $as_echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
5187 $as_echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
5188    { (exit 1); exit 1; }; }
5189       ;;
5190     *)
5191
5192       ;;
5193   esac
5194
5195 else
5196   with_krb_srvnam="postgres"
5197 fi
5198
5199
5200
5201 cat >>confdefs.h <<_ACEOF
5202 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5203 _ACEOF
5204
5205
5206
5207 #
5208 # PAM
5209 #
5210 { $as_echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
5211 $as_echo_n "checking whether to build with PAM support... " >&6; }
5212
5213
5214
5215 # Check whether --with-pam was given.
5216 if test "${with_pam+set}" = set; then
5217   withval=$with_pam;
5218   case $withval in
5219     yes)
5220
5221 cat >>confdefs.h <<\_ACEOF
5222 #define USE_PAM 1
5223 _ACEOF
5224
5225       ;;
5226     no)
5227       :
5228       ;;
5229     *)
5230       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
5231 $as_echo "$as_me: error: no argument expected for --with-pam option" >&2;}
5232    { (exit 1); exit 1; }; }
5233       ;;
5234   esac
5235
5236 else
5237   with_pam=no
5238
5239 fi
5240
5241
5242 { $as_echo "$as_me:$LINENO: result: $with_pam" >&5
5243 $as_echo "$with_pam" >&6; }
5244
5245
5246
5247 #
5248 # LDAP
5249 #
5250 { $as_echo "$as_me:$LINENO: checking whether to build with LDAP support" >&5
5251 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5252
5253
5254
5255 # Check whether --with-ldap was given.
5256 if test "${with_ldap+set}" = set; then
5257   withval=$with_ldap;
5258   case $withval in
5259     yes)
5260
5261 cat >>confdefs.h <<\_ACEOF
5262 #define USE_LDAP 1
5263 _ACEOF
5264
5265       ;;
5266     no)
5267       :
5268       ;;
5269     *)
5270       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-ldap option" >&5
5271 $as_echo "$as_me: error: no argument expected for --with-ldap option" >&2;}
5272    { (exit 1); exit 1; }; }
5273       ;;
5274   esac
5275
5276 else
5277   with_ldap=no
5278
5279 fi
5280
5281
5282 { $as_echo "$as_me:$LINENO: result: $with_ldap" >&5
5283 $as_echo "$with_ldap" >&6; }
5284
5285
5286
5287 #
5288 # Bonjour
5289 #
5290 { $as_echo "$as_me:$LINENO: checking whether to build with Bonjour support" >&5
5291 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5292
5293
5294
5295 # Check whether --with-bonjour was given.
5296 if test "${with_bonjour+set}" = set; then
5297   withval=$with_bonjour;
5298   case $withval in
5299     yes)
5300
5301 cat >>confdefs.h <<\_ACEOF
5302 #define USE_BONJOUR 1
5303 _ACEOF
5304
5305       ;;
5306     no)
5307       :
5308       ;;
5309     *)
5310       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-bonjour option" >&5
5311 $as_echo "$as_me: error: no argument expected for --with-bonjour option" >&2;}
5312    { (exit 1); exit 1; }; }
5313       ;;
5314   esac
5315
5316 else
5317   with_bonjour=no
5318
5319 fi
5320
5321
5322 { $as_echo "$as_me:$LINENO: result: $with_bonjour" >&5
5323 $as_echo "$with_bonjour" >&6; }
5324
5325
5326
5327 #
5328 # OpenSSL
5329 #
5330 { $as_echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
5331 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5332
5333
5334
5335 # Check whether --with-openssl was given.
5336 if test "${with_openssl+set}" = set; then
5337   withval=$with_openssl;
5338   case $withval in
5339     yes)
5340
5341 cat >>confdefs.h <<\_ACEOF
5342 #define USE_SSL 1
5343 _ACEOF
5344
5345       ;;
5346     no)
5347       :
5348       ;;
5349     *)
5350       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
5351 $as_echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
5352    { (exit 1); exit 1; }; }
5353       ;;
5354   esac
5355
5356 else
5357   with_openssl=no
5358
5359 fi
5360
5361
5362 { $as_echo "$as_me:$LINENO: result: $with_openssl" >&5
5363 $as_echo "$with_openssl" >&6; }
5364
5365
5366
5367 #
5368 # Readline
5369 #
5370
5371
5372
5373 # Check whether --with-readline was given.
5374 if test "${with_readline+set}" = set; then
5375   withval=$with_readline;
5376   case $withval in
5377     yes)
5378       :
5379       ;;
5380     no)
5381       :
5382       ;;
5383     *)
5384       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
5385 $as_echo "$as_me: error: no argument expected for --with-readline option" >&2;}
5386    { (exit 1); exit 1; }; }
5387       ;;
5388   esac
5389
5390 else
5391   with_readline=yes
5392
5393 fi
5394
5395
5396 # readline on MinGW has problems with backslashes in psql and other bugs.
5397 # This is particularly a problem with non-US code pages.
5398 # Therefore disable its use until we understand the cause. 2004-07-20
5399 if test "$PORTNAME" = "win32"; then
5400   if test "$with_readline" = yes; then
5401     { $as_echo "$as_me:$LINENO: WARNING: *** Readline does not work on MinGW --- disabling" >&5
5402 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
5403     with_readline=no
5404   fi
5405 fi
5406
5407
5408 #
5409 # Prefer libedit
5410 #
5411
5412
5413
5414 # Check whether --with-libedit-preferred was given.
5415 if test "${with_libedit_preferred+set}" = set; then
5416   withval=$with_libedit_preferred;
5417   case $withval in
5418     yes)
5419       :
5420       ;;
5421     no)
5422       :
5423       ;;
5424     *)
5425       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-libedit-preferred option" >&5
5426 $as_echo "$as_me: error: no argument expected for --with-libedit-preferred option" >&2;}
5427    { (exit 1); exit 1; }; }
5428       ;;
5429   esac
5430
5431 else
5432   with_libedit_preferred=no
5433
5434 fi
5435
5436
5437
5438
5439 #
5440 # OSSP UUID library
5441 #
5442
5443
5444
5445 # Check whether --with-ossp-uuid was given.
5446 if test "${with_ossp_uuid+set}" = set; then
5447   withval=$with_ossp_uuid;
5448   case $withval in
5449     yes)
5450       :
5451       ;;
5452     no)
5453       :
5454       ;;
5455     *)
5456       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-ossp-uuid option" >&5
5457 $as_echo "$as_me: error: no argument expected for --with-ossp-uuid option" >&2;}
5458    { (exit 1); exit 1; }; }
5459       ;;
5460   esac
5461
5462 else
5463   with_ossp_uuid=no
5464
5465 fi
5466
5467
5468
5469
5470
5471 #
5472 # XML
5473 #
5474
5475
5476
5477 # Check whether --with-libxml was given.
5478 if test "${with_libxml+set}" = set; then
5479   withval=$with_libxml;
5480   case $withval in
5481     yes)
5482
5483 cat >>confdefs.h <<\_ACEOF
5484 #define USE_LIBXML 1
5485 _ACEOF
5486
5487       ;;
5488     no)
5489       :
5490       ;;
5491     *)
5492       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-libxml option" >&5
5493 $as_echo "$as_me: error: no argument expected for --with-libxml option" >&2;}
5494    { (exit 1); exit 1; }; }
5495       ;;
5496   esac
5497
5498 else
5499   with_libxml=no
5500
5501 fi
5502
5503
5504
5505 if test "$with_libxml" = yes ; then
5506   for ac_prog in xml2-config
5507 do
5508   # Extract the first word of "$ac_prog", so it can be a program name with args.
5509 set dummy $ac_prog; ac_word=$2
5510 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5511 $as_echo_n "checking for $ac_word... " >&6; }
5512 if test "${ac_cv_prog_XML2_CONFIG+set}" = set; then
5513   $as_echo_n "(cached) " >&6
5514 else
5515   if test -n "$XML2_CONFIG"; then
5516   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
5517 else
5518 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5519 for as_dir in $PATH
5520 do
5521   IFS=$as_save_IFS
5522   test -z "$as_dir" && as_dir=.
5523   for ac_exec_ext in '' $ac_executable_extensions; do
5524   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5525     ac_cv_prog_XML2_CONFIG="$ac_prog"
5526     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5527     break 2
5528   fi
5529 done
5530 done
5531 IFS=$as_save_IFS
5532
5533 fi
5534 fi
5535 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
5536 if test -n "$XML2_CONFIG"; then
5537   { $as_echo "$as_me:$LINENO: result: $XML2_CONFIG" >&5
5538 $as_echo "$XML2_CONFIG" >&6; }
5539 else
5540   { $as_echo "$as_me:$LINENO: result: no" >&5
5541 $as_echo "no" >&6; }
5542 fi
5543
5544
5545   test -n "$XML2_CONFIG" && break
5546 done
5547
5548   if test -n "$XML2_CONFIG"; then
5549     for pgac_option in `$XML2_CONFIG --cflags`; do
5550       case $pgac_option in
5551         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
5552       esac
5553     done
5554     for pgac_option in `$XML2_CONFIG --libs`; do
5555       case $pgac_option in
5556         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5557       esac
5558     done
5559   fi
5560 fi
5561
5562
5563
5564 #
5565 # XSLT
5566 #
5567
5568
5569
5570 # Check whether --with-libxslt was given.
5571 if test "${with_libxslt+set}" = set; then
5572   withval=$with_libxslt;
5573   case $withval in
5574     yes)
5575
5576 cat >>confdefs.h <<\_ACEOF
5577 #define USE_LIBXSLT 1
5578 _ACEOF
5579
5580       ;;
5581     no)
5582       :
5583       ;;
5584     *)
5585       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-libxslt option" >&5
5586 $as_echo "$as_me: error: no argument expected for --with-libxslt option" >&2;}
5587    { (exit 1); exit 1; }; }
5588       ;;
5589   esac
5590
5591 else
5592   with_libxslt=no
5593
5594 fi
5595
5596
5597
5598
5599
5600
5601 #
5602 # tzdata
5603 #
5604
5605
5606
5607 # Check whether --with-system-tzdata was given.
5608 if test "${with_system_tzdata+set}" = set; then
5609   withval=$with_system_tzdata;
5610   case $withval in
5611     yes)
5612       { { $as_echo "$as_me:$LINENO: error: argument required for --with-system-tzdata option" >&5
5613 $as_echo "$as_me: error: argument required for --with-system-tzdata option" >&2;}
5614    { (exit 1); exit 1; }; }
5615       ;;
5616     no)
5617       { { $as_echo "$as_me:$LINENO: error: argument required for --with-system-tzdata option" >&5
5618 $as_echo "$as_me: error: argument required for --with-system-tzdata option" >&2;}
5619    { (exit 1); exit 1; }; }
5620       ;;
5621     *)
5622
5623       ;;
5624   esac
5625
5626 fi
5627
5628
5629
5630
5631 #
5632 # Zlib
5633 #
5634
5635
5636
5637 # Check whether --with-zlib was given.
5638 if test "${with_zlib+set}" = set; then
5639   withval=$with_zlib;
5640   case $withval in
5641     yes)
5642       :
5643       ;;
5644     no)
5645       :
5646       ;;
5647     *)
5648       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
5649 $as_echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
5650    { (exit 1); exit 1; }; }
5651       ;;
5652   esac
5653
5654 else
5655   with_zlib=yes
5656
5657 fi
5658
5659
5660
5661
5662 #
5663 # Elf
5664 #
5665
5666 # Assume system is ELF if it predefines __ELF__ as 1,
5667 # otherwise believe host_os based default.
5668 case $host_os in
5669     freebsd1*|freebsd2*) elf=no;;
5670     freebsd3*|freebsd4*) elf=yes;;
5671 esac
5672
5673
5674 { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
5675 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5676 if test "${ac_cv_path_GREP+set}" = set; then
5677   $as_echo_n "(cached) " >&6
5678 else
5679   if test -z "$GREP"; then
5680   ac_path_GREP_found=false
5681   # Loop through the user's path and test for each of PROGNAME-LIST
5682   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5683 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5684 do
5685   IFS=$as_save_IFS
5686   test -z "$as_dir" && as_dir=.
5687   for ac_prog in grep ggrep; do
5688     for ac_exec_ext in '' $ac_executable_extensions; do
5689       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5690       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5691 # Check for GNU ac_path_GREP and select it if it is found.
5692   # Check for GNU $ac_path_GREP
5693 case `"$ac_path_GREP" --version 2>&1` in
5694 *GNU*)
5695   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5696 *)
5697   ac_count=0
5698   $as_echo_n 0123456789 >"conftest.in"
5699   while :
5700   do
5701     cat "conftest.in" "conftest.in" >"conftest.tmp"
5702     mv "conftest.tmp" "conftest.in"
5703     cp "conftest.in" "conftest.nl"
5704     $as_echo 'GREP' >> "conftest.nl"
5705     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5706     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5707     ac_count=`expr $ac_count + 1`
5708     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5709       # Best one so far, save it but keep looking for a better one
5710       ac_cv_path_GREP="$ac_path_GREP"
5711       ac_path_GREP_max=$ac_count
5712     fi
5713     # 10*(2^10) chars as input seems more than enough
5714     test $ac_count -gt 10 && break
5715   done
5716   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5717 esac
5718
5719       $ac_path_GREP_found && break 3
5720     done
5721   done
5722 done
5723 IFS=$as_save_IFS
5724   if test -z "$ac_cv_path_GREP"; then
5725     { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
5726 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
5727    { (exit 1); exit 1; }; }
5728   fi
5729 else
5730   ac_cv_path_GREP=$GREP
5731 fi
5732
5733 fi
5734 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
5735 $as_echo "$ac_cv_path_GREP" >&6; }
5736  GREP="$ac_cv_path_GREP"
5737
5738
5739 { $as_echo "$as_me:$LINENO: checking for egrep" >&5
5740 $as_echo_n "checking for egrep... " >&6; }
5741 if test "${ac_cv_path_EGREP+set}" = set; then
5742   $as_echo_n "(cached) " >&6
5743 else
5744   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5745    then ac_cv_path_EGREP="$GREP -E"
5746    else
5747      if test -z "$EGREP"; then
5748   ac_path_EGREP_found=false
5749   # Loop through the user's path and test for each of PROGNAME-LIST
5750   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5751 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5752 do
5753   IFS=$as_save_IFS
5754   test -z "$as_dir" && as_dir=.
5755   for ac_prog in egrep; do
5756     for ac_exec_ext in '' $ac_executable_extensions; do
5757       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5758       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5759 # Check for GNU ac_path_EGREP and select it if it is found.
5760   # Check for GNU $ac_path_EGREP
5761 case `"$ac_path_EGREP" --version 2>&1` in
5762 *GNU*)
5763   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5764 *)
5765   ac_count=0
5766   $as_echo_n 0123456789 >"conftest.in"
5767   while :
5768   do
5769     cat "conftest.in" "conftest.in" >"conftest.tmp"
5770     mv "conftest.tmp" "conftest.in"
5771     cp "conftest.in" "conftest.nl"
5772     $as_echo 'EGREP' >> "conftest.nl"
5773     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5774     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5775     ac_count=`expr $ac_count + 1`
5776     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5777       # Best one so far, save it but keep looking for a better one
5778       ac_cv_path_EGREP="$ac_path_EGREP"
5779       ac_path_EGREP_max=$ac_count
5780     fi
5781     # 10*(2^10) chars as input seems more than enough
5782     test $ac_count -gt 10 && break
5783   done
5784   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5785 esac
5786
5787       $ac_path_EGREP_found && break 3
5788     done
5789   done
5790 done
5791 IFS=$as_save_IFS
5792   if test -z "$ac_cv_path_EGREP"; then
5793     { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
5794 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
5795    { (exit 1); exit 1; }; }
5796   fi
5797 else
5798   ac_cv_path_EGREP=$EGREP
5799 fi
5800
5801    fi
5802 fi
5803 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
5804 $as_echo "$ac_cv_path_EGREP" >&6; }
5805  EGREP="$ac_cv_path_EGREP"
5806
5807
5808 cat >conftest.$ac_ext <<_ACEOF
5809 /* confdefs.h.  */
5810 _ACEOF
5811 cat confdefs.h >>conftest.$ac_ext
5812 cat >>conftest.$ac_ext <<_ACEOF
5813 /* end confdefs.h.  */
5814 #if __ELF__
5815   yes
5816 #endif
5817
5818 _ACEOF
5819 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5820   $EGREP "yes" >/dev/null 2>&1; then
5821   ELF_SYS=true
5822 else
5823   if test "X$elf" = "Xyes" ; then
5824   ELF_SYS=true
5825 else
5826   ELF_SYS=
5827 fi
5828 fi
5829 rm -f conftest*
5830
5831
5832
5833 #
5834 # Assignments
5835 #
5836
5837 CPPFLAGS="$CPPFLAGS $INCLUDES"
5838 LDFLAGS="$LDFLAGS $LIBDIRS"
5839
5840
5841
5842
5843
5844 # Check whether --with-gnu-ld was given.
5845 if test "${with_gnu_ld+set}" = set; then
5846   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
5847 else
5848   with_gnu_ld=no
5849 fi
5850
5851 ac_prog=ld
5852 if test "$GCC" = yes; then
5853   # Check if gcc -print-prog-name=ld gives a path.
5854   { $as_echo "$as_me:$LINENO: checking for ld used by GCC" >&5
5855 $as_echo_n "checking for ld used by GCC... " >&6; }
5856   case $host in
5857   *-*-mingw*)
5858     # gcc leaves a trailing carriage return which upsets mingw
5859     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5860   *)
5861     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5862   esac
5863   case "$ac_prog" in
5864     # Accept absolute paths.
5865     [\\/]* | [A-Za-z]:[\\/]*)
5866       re_direlt='/[^/][^/]*/\.\./'
5867       # Canonicalize the path of ld
5868       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
5869       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
5870         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
5871       done
5872       test -z "$LD" && LD="$ac_prog"
5873       ;;
5874   "")
5875     # If it fails, then pretend we aren't using GCC.
5876     ac_prog=ld
5877     ;;
5878   *)
5879     # If it is relative, then search for the first ld in PATH.
5880     with_gnu_ld=unknown
5881     ;;
5882   esac
5883 elif test "$with_gnu_ld" = yes; then
5884   { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
5885 $as_echo_n "checking for GNU ld... " >&6; }
5886 else
5887   { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5
5888 $as_echo_n "checking for non-GNU ld... " >&6; }
5889 fi
5890 if test "${ac_cv_path_LD+set}" = set; then
5891   $as_echo_n "(cached) " >&6
5892 else
5893   if test -z "$LD"; then
5894   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
5895   for ac_dir in $PATH; do
5896     test -z "$ac_dir" && ac_dir=.
5897     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5898       ac_cv_path_LD="$ac_dir/$ac_prog"
5899       # Check to see if the program is GNU ld.  I'd rather use --version,
5900       # but apparently some GNU ld's only accept -v.
5901       # Break only if it was the GNU/non-GNU ld that we prefer.
5902       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
5903         test "$with_gnu_ld" != no && break
5904       else
5905         test "$with_gnu_ld" != yes && break
5906       fi
5907     fi
5908   done
5909   IFS="$ac_save_ifs"
5910 else
5911   ac_cv_path_LD="$LD" # Let the user override the test with a path.
5912 fi
5913 fi
5914
5915 LD="$ac_cv_path_LD"
5916 if test -n "$LD"; then
5917   { $as_echo "$as_me:$LINENO: result: $LD" >&5
5918 $as_echo "$LD" >&6; }
5919 else
5920   { $as_echo "$as_me:$LINENO: result: no" >&5
5921 $as_echo "no" >&6; }
5922 fi
5923 test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
5924 $as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
5925    { (exit 1); exit 1; }; }
5926 { $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
5927 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
5928 if test "${ac_cv_prog_gnu_ld+set}" = set; then
5929   $as_echo_n "(cached) " >&6
5930 else
5931   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
5932 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
5933   ac_cv_prog_gnu_ld=yes
5934 else
5935   ac_cv_prog_gnu_ld=no
5936 fi
5937 fi
5938 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
5939 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
5940 with_gnu_ld=$ac_cv_prog_gnu_ld
5941
5942
5943
5944
5945 case $host_os in sysv5*)
5946   { $as_echo "$as_me:$LINENO: checking whether ld -R works" >&5
5947 $as_echo_n "checking whether ld -R works... " >&6; }
5948 if test "${pgac_cv_prog_ld_R+set}" = set; then
5949   $as_echo_n "(cached) " >&6
5950 else
5951
5952     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
5953     cat >conftest.$ac_ext <<_ACEOF
5954 /* confdefs.h.  */
5955 _ACEOF
5956 cat confdefs.h >>conftest.$ac_ext
5957 cat >>conftest.$ac_ext <<_ACEOF
5958 /* end confdefs.h.  */
5959
5960 int
5961 main ()
5962 {
5963
5964   ;
5965   return 0;
5966 }
5967 _ACEOF
5968 rm -f conftest.$ac_objext conftest$ac_exeext
5969 if { (ac_try="$ac_link"
5970 case "(($ac_try" in
5971   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5972   *) ac_try_echo=$ac_try;;
5973 esac
5974 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5975 $as_echo "$ac_try_echo") >&5
5976   (eval "$ac_link") 2>conftest.er1
5977   ac_status=$?
5978   grep -v '^ *+' conftest.er1 >conftest.err
5979   rm -f conftest.er1
5980   cat conftest.err >&5
5981   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5982   (exit $ac_status); } && {
5983          test -z "$ac_c_werror_flag" ||
5984          test ! -s conftest.err
5985        } && test -s conftest$ac_exeext && {
5986          test "$cross_compiling" = yes ||
5987          $as_test_x conftest$ac_exeext
5988        }; then
5989   pgac_cv_prog_ld_R=yes
5990 else
5991   $as_echo "$as_me: failed program was:" >&5
5992 sed 's/^/| /' conftest.$ac_ext >&5
5993
5994         pgac_cv_prog_ld_R=no
5995 fi
5996
5997 rm -rf conftest.dSYM
5998 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5999       conftest$ac_exeext conftest.$ac_ext
6000     LDFLAGS=$pgac_save_LDFLAGS
6001
6002 fi
6003 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
6004 $as_echo "$pgac_cv_prog_ld_R" >&6; }
6005   ld_R_works=$pgac_cv_prog_ld_R
6006
6007 esac
6008 if test -n "$ac_tool_prefix"; then
6009   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6010 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6011 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6012 $as_echo_n "checking for $ac_word... " >&6; }
6013 if test "${ac_cv_prog_RANLIB+set}" = set; then
6014   $as_echo_n "(cached) " >&6
6015 else
6016   if test -n "$RANLIB"; then
6017   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6018 else
6019 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6020 for as_dir in $PATH
6021 do
6022   IFS=$as_save_IFS
6023   test -z "$as_dir" && as_dir=.
6024   for ac_exec_ext in '' $ac_executable_extensions; do
6025   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6026     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6027     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6028     break 2
6029   fi
6030 done
6031 done
6032 IFS=$as_save_IFS
6033
6034 fi
6035 fi
6036 RANLIB=$ac_cv_prog_RANLIB
6037 if test -n "$RANLIB"; then
6038   { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
6039 $as_echo "$RANLIB" >&6; }
6040 else
6041   { $as_echo "$as_me:$LINENO: result: no" >&5
6042 $as_echo "no" >&6; }
6043 fi
6044
6045
6046 fi
6047 if test -z "$ac_cv_prog_RANLIB"; then
6048   ac_ct_RANLIB=$RANLIB
6049   # Extract the first word of "ranlib", so it can be a program name with args.
6050 set dummy ranlib; ac_word=$2
6051 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6052 $as_echo_n "checking for $ac_word... " >&6; }
6053 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
6054   $as_echo_n "(cached) " >&6
6055 else
6056   if test -n "$ac_ct_RANLIB"; then
6057   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6058 else
6059 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6060 for as_dir in $PATH
6061 do
6062   IFS=$as_save_IFS
6063   test -z "$as_dir" && as_dir=.
6064   for ac_exec_ext in '' $ac_executable_extensions; do
6065   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6066     ac_cv_prog_ac_ct_RANLIB="ranlib"
6067     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6068     break 2
6069   fi
6070 done
6071 done
6072 IFS=$as_save_IFS
6073
6074 fi
6075 fi
6076 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6077 if test -n "$ac_ct_RANLIB"; then
6078   { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
6079 $as_echo "$ac_ct_RANLIB" >&6; }
6080 else
6081   { $as_echo "$as_me:$LINENO: result: no" >&5
6082 $as_echo "no" >&6; }
6083 fi
6084
6085   if test "x$ac_ct_RANLIB" = x; then
6086     RANLIB=":"
6087   else
6088     case $cross_compiling:$ac_tool_warned in
6089 yes:)
6090 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
6091 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6092 ac_tool_warned=yes ;;
6093 esac
6094     RANLIB=$ac_ct_RANLIB
6095   fi
6096 else
6097   RANLIB="$ac_cv_prog_RANLIB"
6098 fi
6099
6100
6101   if test -n "$ac_tool_prefix"; then
6102   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6103 set dummy ${ac_tool_prefix}strip; ac_word=$2
6104 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6105 $as_echo_n "checking for $ac_word... " >&6; }
6106 if test "${ac_cv_prog_STRIP+set}" = set; then
6107   $as_echo_n "(cached) " >&6
6108 else
6109   if test -n "$STRIP"; then
6110   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6111 else
6112 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6113 for as_dir in $PATH
6114 do
6115   IFS=$as_save_IFS
6116   test -z "$as_dir" && as_dir=.
6117   for ac_exec_ext in '' $ac_executable_extensions; do
6118   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6119     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6120     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6121     break 2
6122   fi
6123 done
6124 done
6125 IFS=$as_save_IFS
6126
6127 fi
6128 fi
6129 STRIP=$ac_cv_prog_STRIP
6130 if test -n "$STRIP"; then
6131   { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
6132 $as_echo "$STRIP" >&6; }
6133 else
6134   { $as_echo "$as_me:$LINENO: result: no" >&5
6135 $as_echo "no" >&6; }
6136 fi
6137
6138
6139 fi
6140 if test -z "$ac_cv_prog_STRIP"; then
6141   ac_ct_STRIP=$STRIP
6142   # Extract the first word of "strip", so it can be a program name with args.
6143 set dummy strip; ac_word=$2
6144 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6145 $as_echo_n "checking for $ac_word... " >&6; }
6146 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
6147   $as_echo_n "(cached) " >&6
6148 else
6149   if test -n "$ac_ct_STRIP"; then
6150   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6151 else
6152 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6153 for as_dir in $PATH
6154 do
6155   IFS=$as_save_IFS
6156   test -z "$as_dir" && as_dir=.
6157   for ac_exec_ext in '' $ac_executable_extensions; do
6158   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6159     ac_cv_prog_ac_ct_STRIP="strip"
6160     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6161     break 2
6162   fi
6163 done
6164 done
6165 IFS=$as_save_IFS
6166
6167 fi
6168 fi
6169 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6170 if test -n "$ac_ct_STRIP"; then
6171   { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
6172 $as_echo "$ac_ct_STRIP" >&6; }
6173 else
6174   { $as_echo "$as_me:$LINENO: result: no" >&5
6175 $as_echo "no" >&6; }
6176 fi
6177
6178   if test "x$ac_ct_STRIP" = x; then
6179     STRIP=":"
6180   else
6181     case $cross_compiling:$ac_tool_warned in
6182 yes:)
6183 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
6184 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6185 ac_tool_warned=yes ;;
6186 esac
6187     STRIP=$ac_ct_STRIP
6188   fi
6189 else
6190   STRIP="$ac_cv_prog_STRIP"
6191 fi
6192
6193
6194   { $as_echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
6195 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6196   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6197     STRIP_STATIC_LIB="$STRIP -x"
6198     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6199     { $as_echo "$as_me:$LINENO: result: yes" >&5
6200 $as_echo "yes" >&6; }
6201   else
6202     STRIP_STATIC_LIB=:
6203     STRIP_SHARED_LIB=:
6204     { $as_echo "$as_me:$LINENO: result: no" >&5
6205 $as_echo "no" >&6; }
6206   fi
6207
6208
6209
6210 if test -n "$ac_tool_prefix"; then
6211   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6212 set dummy ${ac_tool_prefix}ar; ac_word=$2
6213 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6214 $as_echo_n "checking for $ac_word... " >&6; }
6215 if test "${ac_cv_prog_AR+set}" = set; then
6216   $as_echo_n "(cached) " >&6
6217 else
6218   if test -n "$AR"; then
6219   ac_cv_prog_AR="$AR" # Let the user override the test.
6220 else
6221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6222 for as_dir in $PATH
6223 do
6224   IFS=$as_save_IFS
6225   test -z "$as_dir" && as_dir=.
6226   for ac_exec_ext in '' $ac_executable_extensions; do
6227   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6228     ac_cv_prog_AR="${ac_tool_prefix}ar"
6229     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6230     break 2
6231   fi
6232 done
6233 done
6234 IFS=$as_save_IFS
6235
6236 fi
6237 fi
6238 AR=$ac_cv_prog_AR
6239 if test -n "$AR"; then
6240   { $as_echo "$as_me:$LINENO: result: $AR" >&5
6241 $as_echo "$AR" >&6; }
6242 else
6243   { $as_echo "$as_me:$LINENO: result: no" >&5
6244 $as_echo "no" >&6; }
6245 fi
6246
6247
6248 fi
6249 if test -z "$ac_cv_prog_AR"; then
6250   ac_ct_AR=$AR
6251   # Extract the first word of "ar", so it can be a program name with args.
6252 set dummy ar; ac_word=$2
6253 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6254 $as_echo_n "checking for $ac_word... " >&6; }
6255 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
6256   $as_echo_n "(cached) " >&6
6257 else
6258   if test -n "$ac_ct_AR"; then
6259   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6260 else
6261 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6262 for as_dir in $PATH
6263 do
6264   IFS=$as_save_IFS
6265   test -z "$as_dir" && as_dir=.
6266   for ac_exec_ext in '' $ac_executable_extensions; do
6267   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6268     ac_cv_prog_ac_ct_AR="ar"
6269     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6270     break 2
6271   fi
6272 done
6273 done
6274 IFS=$as_save_IFS
6275
6276 fi
6277 fi
6278 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6279 if test -n "$ac_ct_AR"; then
6280   { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
6281 $as_echo "$ac_ct_AR" >&6; }
6282 else
6283   { $as_echo "$as_me:$LINENO: result: no" >&5
6284 $as_echo "no" >&6; }
6285 fi
6286
6287   if test "x$ac_ct_AR" = x; then
6288     AR="ar"
6289   else
6290     case $cross_compiling:$ac_tool_warned in
6291 yes:)
6292 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
6293 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6294 ac_tool_warned=yes ;;
6295 esac
6296     AR=$ac_ct_AR
6297   fi
6298 else
6299   AR="$ac_cv_prog_AR"
6300 fi
6301
6302 if test "$PORTNAME" = "win32"; then
6303   if test -n "$ac_tool_prefix"; then
6304   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6305 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6306 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6307 $as_echo_n "checking for $ac_word... " >&6; }
6308 if test "${ac_cv_prog_DLLTOOL+set}" = set; then
6309   $as_echo_n "(cached) " >&6
6310 else
6311   if test -n "$DLLTOOL"; then
6312   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6313 else
6314 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6315 for as_dir in $PATH
6316 do
6317   IFS=$as_save_IFS
6318   test -z "$as_dir" && as_dir=.
6319   for ac_exec_ext in '' $ac_executable_extensions; do
6320   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6321     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6322     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6323     break 2
6324   fi
6325 done
6326 done
6327 IFS=$as_save_IFS
6328
6329 fi
6330 fi
6331 DLLTOOL=$ac_cv_prog_DLLTOOL
6332 if test -n "$DLLTOOL"; then
6333   { $as_echo "$as_me:$LINENO: result: $DLLTOOL" >&5
6334 $as_echo "$DLLTOOL" >&6; }
6335 else
6336   { $as_echo "$as_me:$LINENO: result: no" >&5
6337 $as_echo "no" >&6; }
6338 fi
6339
6340
6341 fi
6342 if test -z "$ac_cv_prog_DLLTOOL"; then
6343   ac_ct_DLLTOOL=$DLLTOOL
6344   # Extract the first word of "dlltool", so it can be a program name with args.
6345 set dummy dlltool; ac_word=$2
6346 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6347 $as_echo_n "checking for $ac_word... " >&6; }
6348 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
6349   $as_echo_n "(cached) " >&6
6350 else
6351   if test -n "$ac_ct_DLLTOOL"; then
6352   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6353 else
6354 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6355 for as_dir in $PATH
6356 do
6357   IFS=$as_save_IFS
6358   test -z "$as_dir" && as_dir=.
6359   for ac_exec_ext in '' $ac_executable_extensions; do
6360   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6361     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6362     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6363     break 2
6364   fi
6365 done
6366 done
6367 IFS=$as_save_IFS
6368
6369 fi
6370 fi
6371 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6372 if test -n "$ac_ct_DLLTOOL"; then
6373   { $as_echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
6374 $as_echo "$ac_ct_DLLTOOL" >&6; }
6375 else
6376   { $as_echo "$as_me:$LINENO: result: no" >&5
6377 $as_echo "no" >&6; }
6378 fi
6379
6380   if test "x$ac_ct_DLLTOOL" = x; then
6381     DLLTOOL="dlltool"
6382   else
6383     case $cross_compiling:$ac_tool_warned in
6384 yes:)
6385 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
6386 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6387 ac_tool_warned=yes ;;
6388 esac
6389     DLLTOOL=$ac_ct_DLLTOOL
6390   fi
6391 else
6392   DLLTOOL="$ac_cv_prog_DLLTOOL"
6393 fi
6394
6395   if test -n "$ac_tool_prefix"; then
6396   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
6397 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
6398 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6399 $as_echo_n "checking for $ac_word... " >&6; }
6400 if test "${ac_cv_prog_DLLWRAP+set}" = set; then
6401   $as_echo_n "(cached) " >&6
6402 else
6403   if test -n "$DLLWRAP"; then
6404   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
6405 else
6406 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6407 for as_dir in $PATH
6408 do
6409   IFS=$as_save_IFS
6410   test -z "$as_dir" && as_dir=.
6411   for ac_exec_ext in '' $ac_executable_extensions; do
6412   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6413     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
6414     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6415     break 2
6416   fi
6417 done
6418 done
6419 IFS=$as_save_IFS
6420
6421 fi
6422 fi
6423 DLLWRAP=$ac_cv_prog_DLLWRAP
6424 if test -n "$DLLWRAP"; then
6425   { $as_echo "$as_me:$LINENO: result: $DLLWRAP" >&5
6426 $as_echo "$DLLWRAP" >&6; }
6427 else
6428   { $as_echo "$as_me:$LINENO: result: no" >&5
6429 $as_echo "no" >&6; }
6430 fi
6431
6432
6433 fi
6434 if test -z "$ac_cv_prog_DLLWRAP"; then
6435   ac_ct_DLLWRAP=$DLLWRAP
6436   # Extract the first word of "dllwrap", so it can be a program name with args.
6437 set dummy dllwrap; ac_word=$2
6438 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6439 $as_echo_n "checking for $ac_word... " >&6; }
6440 if test "${ac_cv_prog_ac_ct_DLLWRAP+set}" = set; then
6441   $as_echo_n "(cached) " >&6
6442 else
6443   if test -n "$ac_ct_DLLWRAP"; then
6444   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
6445 else
6446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6447 for as_dir in $PATH
6448 do
6449   IFS=$as_save_IFS
6450   test -z "$as_dir" && as_dir=.
6451   for ac_exec_ext in '' $ac_executable_extensions; do
6452   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6453     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
6454     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6455     break 2
6456   fi
6457 done
6458 done
6459 IFS=$as_save_IFS
6460
6461 fi
6462 fi
6463 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
6464 if test -n "$ac_ct_DLLWRAP"; then
6465   { $as_echo "$as_me:$LINENO: result: $ac_ct_DLLWRAP" >&5
6466 $as_echo "$ac_ct_DLLWRAP" >&6; }
6467 else
6468   { $as_echo "$as_me:$LINENO: result: no" >&5
6469 $as_echo "no" >&6; }
6470 fi
6471
6472   if test "x$ac_ct_DLLWRAP" = x; then
6473     DLLWRAP="dllwrap"
6474   else
6475     case $cross_compiling:$ac_tool_warned in
6476 yes:)
6477 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
6478 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6479 ac_tool_warned=yes ;;
6480 esac
6481     DLLWRAP=$ac_ct_DLLWRAP
6482   fi
6483 else
6484   DLLWRAP="$ac_cv_prog_DLLWRAP"
6485 fi
6486
6487   if test -n "$ac_tool_prefix"; then
6488   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6489 set dummy ${ac_tool_prefix}windres; ac_word=$2
6490 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6491 $as_echo_n "checking for $ac_word... " >&6; }
6492 if test "${ac_cv_prog_WINDRES+set}" = set; then
6493   $as_echo_n "(cached) " >&6
6494 else
6495   if test -n "$WINDRES"; then
6496   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6497 else
6498 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6499 for as_dir in $PATH
6500 do
6501   IFS=$as_save_IFS
6502   test -z "$as_dir" && as_dir=.
6503   for ac_exec_ext in '' $ac_executable_extensions; do
6504   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6505     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6506     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6507     break 2
6508   fi
6509 done
6510 done
6511 IFS=$as_save_IFS
6512
6513 fi
6514 fi
6515 WINDRES=$ac_cv_prog_WINDRES
6516 if test -n "$WINDRES"; then
6517   { $as_echo "$as_me:$LINENO: result: $WINDRES" >&5
6518 $as_echo "$WINDRES" >&6; }
6519 else
6520   { $as_echo "$as_me:$LINENO: result: no" >&5
6521 $as_echo "no" >&6; }
6522 fi
6523
6524
6525 fi
6526 if test -z "$ac_cv_prog_WINDRES"; then
6527   ac_ct_WINDRES=$WINDRES
6528   # Extract the first word of "windres", so it can be a program name with args.
6529 set dummy windres; ac_word=$2
6530 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6531 $as_echo_n "checking for $ac_word... " >&6; }
6532 if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then
6533   $as_echo_n "(cached) " >&6
6534 else
6535   if test -n "$ac_ct_WINDRES"; then
6536   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6537 else
6538 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6539 for as_dir in $PATH
6540 do
6541   IFS=$as_save_IFS
6542   test -z "$as_dir" && as_dir=.
6543   for ac_exec_ext in '' $ac_executable_extensions; do
6544   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6545     ac_cv_prog_ac_ct_WINDRES="windres"
6546     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6547     break 2
6548   fi
6549 done
6550 done
6551 IFS=$as_save_IFS
6552
6553 fi
6554 fi
6555 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6556 if test -n "$ac_ct_WINDRES"; then
6557   { $as_echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5
6558 $as_echo "$ac_ct_WINDRES" >&6; }
6559 else
6560   { $as_echo "$as_me:$LINENO: result: no" >&5
6561 $as_echo "no" >&6; }
6562 fi
6563
6564   if test "x$ac_ct_WINDRES" = x; then
6565     WINDRES="windres"
6566   else
6567     case $cross_compiling:$ac_tool_warned in
6568 yes:)
6569 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
6570 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6571 ac_tool_warned=yes ;;
6572 esac
6573     WINDRES=$ac_ct_WINDRES
6574   fi
6575 else
6576   WINDRES="$ac_cv_prog_WINDRES"
6577 fi
6578
6579 fi
6580
6581 # Extract the first word of "tar", so it can be a program name with args.
6582 set dummy tar; ac_word=$2
6583 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6584 $as_echo_n "checking for $ac_word... " >&6; }
6585 if test "${ac_cv_path_TAR+set}" = set; then
6586   $as_echo_n "(cached) " >&6
6587 else
6588   case $TAR in
6589   [\\/]* | ?:[\\/]*)
6590   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
6591   ;;
6592   *)
6593   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6594 for as_dir in $PATH
6595 do
6596   IFS=$as_save_IFS
6597   test -z "$as_dir" && as_dir=.
6598   for ac_exec_ext in '' $ac_executable_extensions; do
6599   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6600     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
6601     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6602     break 2
6603   fi
6604 done
6605 done
6606 IFS=$as_save_IFS
6607
6608   ;;
6609 esac
6610 fi
6611 TAR=$ac_cv_path_TAR
6612 if test -n "$TAR"; then
6613   { $as_echo "$as_me:$LINENO: result: $TAR" >&5
6614 $as_echo "$TAR" >&6; }
6615 else
6616   { $as_echo "$as_me:$LINENO: result: no" >&5
6617 $as_echo "no" >&6; }
6618 fi
6619
6620
6621 { $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5
6622 $as_echo_n "checking whether ln -s works... " >&6; }
6623 LN_S=$as_ln_s
6624 if test "$LN_S" = "ln -s"; then
6625   { $as_echo "$as_me:$LINENO: result: yes" >&5
6626 $as_echo "yes" >&6; }
6627 else
6628   { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5
6629 $as_echo "no, using $LN_S" >&6; }
6630 fi
6631
6632 for ac_prog in gawk mawk nawk awk
6633 do
6634   # Extract the first word of "$ac_prog", so it can be a program name with args.
6635 set dummy $ac_prog; ac_word=$2
6636 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6637 $as_echo_n "checking for $ac_word... " >&6; }
6638 if test "${ac_cv_prog_AWK+set}" = set; then
6639   $as_echo_n "(cached) " >&6
6640 else
6641   if test -n "$AWK"; then
6642   ac_cv_prog_AWK="$AWK" # Let the user override the test.
6643 else
6644 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6645 for as_dir in $PATH
6646 do
6647   IFS=$as_save_IFS
6648   test -z "$as_dir" && as_dir=.
6649   for ac_exec_ext in '' $ac_executable_extensions; do
6650   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6651     ac_cv_prog_AWK="$ac_prog"
6652     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6653     break 2
6654   fi
6655 done
6656 done
6657 IFS=$as_save_IFS
6658
6659 fi
6660 fi
6661 AWK=$ac_cv_prog_AWK
6662 if test -n "$AWK"; then
6663   { $as_echo "$as_me:$LINENO: result: $AWK" >&5
6664 $as_echo "$AWK" >&6; }
6665 else
6666   { $as_echo "$as_me:$LINENO: result: no" >&5
6667 $as_echo "no" >&6; }
6668 fi
6669
6670
6671   test -n "$AWK" && break
6672 done
6673
6674 { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
6675 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6676 if test -z "$MKDIR_P"; then
6677   if test "${ac_cv_path_mkdir+set}" = set; then
6678   $as_echo_n "(cached) " >&6
6679 else
6680   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6681 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6682 do
6683   IFS=$as_save_IFS
6684   test -z "$as_dir" && as_dir=.
6685   for ac_prog in mkdir gmkdir; do
6686          for ac_exec_ext in '' $ac_executable_extensions; do
6687            { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
6688            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6689              'mkdir (GNU coreutils) '* | \
6690              'mkdir (coreutils) '* | \
6691              'mkdir (fileutils) '4.1*)
6692                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6693                break 3;;
6694            esac
6695          done
6696        done
6697 done
6698 IFS=$as_save_IFS
6699
6700 fi
6701
6702   if test "${ac_cv_path_mkdir+set}" = set; then
6703     MKDIR_P="$ac_cv_path_mkdir -p"
6704   else
6705     # As a last resort, use the slow shell script.  Don't cache a
6706     # value for MKDIR_P within a source directory, because that will
6707     # break other packages using the cache if that directory is
6708     # removed, or if the value is a relative name.
6709     test -d ./--version && rmdir ./--version
6710     MKDIR_P="$ac_install_sh -d"
6711   fi
6712 fi
6713 { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
6714 $as_echo "$MKDIR_P" >&6; }
6715
6716 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
6717 # a relative path to it in each makefile where it subsitutes it. This clashes
6718 # with our Makefile.global concept. This workaround helps.
6719 case $MKDIR_P in
6720   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
6721 esac
6722
6723 # Let the user override the search
6724 if test -z "$BISON"; then
6725   for ac_prog in bison
6726 do
6727   # Extract the first word of "$ac_prog", so it can be a program name with args.
6728 set dummy $ac_prog; ac_word=$2
6729 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6730 $as_echo_n "checking for $ac_word... " >&6; }
6731 if test "${ac_cv_path_BISON+set}" = set; then
6732   $as_echo_n "(cached) " >&6
6733 else
6734   case $BISON in
6735   [\\/]* | ?:[\\/]*)
6736   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
6737   ;;
6738   *)
6739   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6740 for as_dir in $PATH
6741 do
6742   IFS=$as_save_IFS
6743   test -z "$as_dir" && as_dir=.
6744   for ac_exec_ext in '' $ac_executable_extensions; do
6745   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6746     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
6747     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6748     break 2
6749   fi
6750 done
6751 done
6752 IFS=$as_save_IFS
6753
6754   ;;
6755 esac
6756 fi
6757 BISON=$ac_cv_path_BISON
6758 if test -n "$BISON"; then
6759   { $as_echo "$as_me:$LINENO: result: $BISON" >&5
6760 $as_echo "$BISON" >&6; }
6761 else
6762   { $as_echo "$as_me:$LINENO: result: no" >&5
6763 $as_echo "no" >&6; }
6764 fi
6765
6766
6767   test -n "$BISON" && break
6768 done
6769
6770 fi
6771
6772 if test "$BISON"; then
6773   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
6774   { $as_echo "$as_me:$LINENO: using $pgac_bison_version" >&5
6775 $as_echo "$as_me: using $pgac_bison_version" >&6;}
6776   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
6777   then
6778     { $as_echo "$as_me:$LINENO: WARNING:
6779 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
6780 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
6781 $as_echo "$as_me: WARNING:
6782 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
6783 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
6784     BISON=""
6785   fi
6786 fi
6787
6788 if test -z "$BISON"; then
6789   { $as_echo "$as_me:$LINENO: WARNING:
6790 *** Without Bison you will not be able to build PostgreSQL from Git nor
6791 *** change any of the parser definition files.  You can obtain Bison from
6792 *** a GNU mirror site.  (If you are using the official distribution of
6793 *** PostgreSQL then you do not need to worry about this, because the Bison
6794 *** output is pre-generated.)" >&5
6795 $as_echo "$as_me: WARNING:
6796 *** Without Bison you will not be able to build PostgreSQL from Git nor
6797 *** change any of the parser definition files.  You can obtain Bison from
6798 *** a GNU mirror site.  (If you are using the official distribution of
6799 *** PostgreSQL then you do not need to worry about this, because the Bison
6800 *** output is pre-generated.)" >&2;}
6801 fi
6802 # We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
6803
6804
6805 { $as_echo "$as_me:$LINENO: checking for flex" >&5
6806 $as_echo_n "checking for flex... " >&6; }
6807 if test "${pgac_cv_path_flex+set}" = set; then
6808   $as_echo_n "(cached) " >&6
6809 else
6810   # Let the user override the test
6811 if test -n "$FLEX"; then
6812   pgac_cv_path_flex=$FLEX
6813 else
6814   pgac_save_IFS=$IFS
6815   IFS=$PATH_SEPARATOR
6816   for pgac_dir in $PATH; do
6817     IFS=$pgac_save_IFS
6818     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
6819       pgac_dir=`pwd`
6820     fi
6821     for pgac_prog in flex lex; do
6822       pgac_candidate="$pgac_dir/$pgac_prog"
6823       if test -f "$pgac_candidate" \
6824         && $pgac_candidate --version </dev/null >/dev/null 2>&1
6825       then
6826         echo '%%'  > conftest.l
6827         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
6828           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
6829           if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 = 2 && $2 = 5 && $3 >= 31) exit 0; else exit 1;}'
6830           then
6831             pgac_cv_path_flex=$pgac_candidate
6832             break 2
6833           else
6834             { $as_echo "$as_me:$LINENO: WARNING:
6835 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
6836 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
6837 $as_echo "$as_me: WARNING:
6838 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
6839 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
6840           fi
6841         fi
6842       fi
6843     done
6844   done
6845   rm -f conftest.l lex.yy.c
6846   : ${pgac_cv_path_flex=no}
6847 fi
6848
6849 fi
6850 { $as_echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
6851 $as_echo "$pgac_cv_path_flex" >&6; }
6852 if test x"$pgac_cv_path_flex" = x"no"; then
6853   { $as_echo "$as_me:$LINENO: WARNING:
6854 *** Without Flex you will not be able to build PostgreSQL from Git nor
6855 *** change any of the scanner definition files.  You can obtain Flex from
6856 *** a GNU mirror site.  (If you are using the official distribution of
6857 *** PostgreSQL then you do not need to worry about this because the Flex
6858 *** output is pre-generated.)" >&5
6859 $as_echo "$as_me: WARNING:
6860 *** Without Flex you will not be able to build PostgreSQL from Git nor
6861 *** change any of the scanner definition files.  You can obtain Flex from
6862 *** a GNU mirror site.  (If you are using the official distribution of
6863 *** PostgreSQL then you do not need to worry about this because the Flex
6864 *** output is pre-generated.)" >&2;}
6865
6866   FLEX=
6867 else
6868   FLEX=$pgac_cv_path_flex
6869   pgac_flex_version=`$FLEX --version 2>/dev/null`
6870   { $as_echo "$as_me:$LINENO: using $pgac_flex_version" >&5
6871 $as_echo "$as_me: using $pgac_flex_version" >&6;}
6872 fi
6873
6874
6875
6876
6877
6878 # Let the user override the search
6879 if test -z "$PERL"; then
6880   # Extract the first word of "perl", so it can be a program name with args.
6881 set dummy perl; ac_word=$2
6882 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6883 $as_echo_n "checking for $ac_word... " >&6; }
6884 if test "${ac_cv_path_PERL+set}" = set; then
6885   $as_echo_n "(cached) " >&6
6886 else
6887   case $PERL in
6888   [\\/]* | ?:[\\/]*)
6889   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
6890   ;;
6891   *)
6892   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6893 for as_dir in $PATH
6894 do
6895   IFS=$as_save_IFS
6896   test -z "$as_dir" && as_dir=.
6897   for ac_exec_ext in '' $ac_executable_extensions; do
6898   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6899     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
6900     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6901     break 2
6902   fi
6903 done
6904 done
6905 IFS=$as_save_IFS
6906
6907   ;;
6908 esac
6909 fi
6910 PERL=$ac_cv_path_PERL
6911 if test -n "$PERL"; then
6912   { $as_echo "$as_me:$LINENO: result: $PERL" >&5
6913 $as_echo "$PERL" >&6; }
6914 else
6915   { $as_echo "$as_me:$LINENO: result: no" >&5
6916 $as_echo "no" >&6; }
6917 fi
6918
6919
6920 fi
6921
6922 if test "$PERL"; then
6923   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'`
6924   { $as_echo "$as_me:$LINENO: using perl $pgac_perl_version" >&5
6925 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
6926   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
6927     $AWK '{ if ($1 = 5 && $2 >= 8) exit 1; else exit 0;}'
6928   then
6929     { $as_echo "$as_me:$LINENO: WARNING:
6930 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
6931 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
6932 $as_echo "$as_me: WARNING:
6933 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
6934 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
6935     PERL=""
6936   fi
6937 fi
6938
6939 if test -z "$PERL"; then
6940   { $as_echo "$as_me:$LINENO: WARNING:
6941 *** Without Perl you will not be able to build PostgreSQL from Git.
6942 *** You can obtain Perl from any CPAN mirror site.
6943 *** (If you are using the official distribution of PostgreSQL then you do not
6944 *** need to worry about this, because the Perl output is pre-generated.)" >&5
6945 $as_echo "$as_me: WARNING:
6946 *** Without Perl you will not be able to build PostgreSQL from Git.
6947 *** You can obtain Perl from any CPAN mirror site.
6948 *** (If you are using the official distribution of PostgreSQL then you do not
6949 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
6950 fi
6951
6952 if test "$with_perl" = yes; then
6953   if test -z "$PERL"; then
6954     { { $as_echo "$as_me:$LINENO: error: Perl not found" >&5
6955 $as_echo "$as_me: error: Perl not found" >&2;}
6956    { (exit 1); exit 1; }; }
6957   fi
6958
6959 { $as_echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
6960 $as_echo_n "checking for Perl archlibexp... " >&6; }
6961 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
6962 { $as_echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
6963 $as_echo "$perl_archlibexp" >&6; }
6964 { $as_echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
6965 $as_echo_n "checking for Perl privlibexp... " >&6; }
6966 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
6967 { $as_echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
6968 $as_echo "$perl_privlibexp" >&6; }
6969 { $as_echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
6970 $as_echo_n "checking for Perl useshrplib... " >&6; }
6971 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
6972 { $as_echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
6973 $as_echo "$perl_useshrplib" >&6; }
6974
6975 { $as_echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
6976 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
6977 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
6978 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
6979 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
6980 if test -z "$perl_embed_ldflags" ; then
6981         { $as_echo "$as_me:$LINENO: result: no" >&5
6982 $as_echo "no" >&6; }
6983         { { $as_echo "$as_me:$LINENO: error: could not determine flags for linking embedded Perl.
6984 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
6985 installed." >&5
6986 $as_echo "$as_me: error: could not determine flags for linking embedded Perl.
6987 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
6988 installed." >&2;}
6989    { (exit 1); exit 1; }; }
6990 else
6991         { $as_echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
6992 $as_echo "$perl_embed_ldflags" >&6; }
6993 fi
6994
6995 fi
6996
6997 if test "$with_python" = yes; then
6998   # Extract the first word of "python", so it can be a program name with args.
6999 set dummy python; ac_word=$2
7000 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
7001 $as_echo_n "checking for $ac_word... " >&6; }
7002 if test "${ac_cv_path_PYTHON+set}" = set; then
7003   $as_echo_n "(cached) " >&6
7004 else
7005   case $PYTHON in
7006   [\\/]* | ?:[\\/]*)
7007   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7008   ;;
7009   *)
7010   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7011 for as_dir in $PATH
7012 do
7013   IFS=$as_save_IFS
7014   test -z "$as_dir" && as_dir=.
7015   for ac_exec_ext in '' $ac_executable_extensions; do
7016   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7017     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7018     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7019     break 2
7020   fi
7021 done
7022 done
7023 IFS=$as_save_IFS
7024
7025   ;;
7026 esac
7027 fi
7028 PYTHON=$ac_cv_path_PYTHON
7029 if test -n "$PYTHON"; then
7030   { $as_echo "$as_me:$LINENO: result: $PYTHON" >&5
7031 $as_echo "$PYTHON" >&6; }
7032 else
7033   { $as_echo "$as_me:$LINENO: result: no" >&5
7034 $as_echo "no" >&6; }
7035 fi
7036
7037
7038 if test x"$PYTHON" = x""; then
7039   { { $as_echo "$as_me:$LINENO: error: Python not found" >&5
7040 $as_echo "$as_me: error: Python not found" >&2;}
7041    { (exit 1); exit 1; }; }
7042 fi
7043
7044
7045 { $as_echo "$as_me:$LINENO: checking for Python distutils module" >&5
7046 $as_echo_n "checking for Python distutils module... " >&6; }
7047 if "${PYTHON}" -c 'import distutils' 2>&5
7048 then
7049     { $as_echo "$as_me:$LINENO: result: yes" >&5
7050 $as_echo "yes" >&6; }
7051 else
7052     { $as_echo "$as_me:$LINENO: result: no" >&5
7053 $as_echo "no" >&6; }
7054     { { $as_echo "$as_me:$LINENO: error: distutils module not found" >&5
7055 $as_echo "$as_me: error: distutils module not found" >&2;}
7056    { (exit 1); exit 1; }; }
7057 fi
7058 { $as_echo "$as_me:$LINENO: checking Python configuration directory" >&5
7059 $as_echo_n "checking Python configuration directory... " >&6; }
7060 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7061 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7062 python_configdir=`${PYTHON} -c "from distutils.sysconfig import get_python_lib as f; import os; print(os.path.join(f(plat_specific=1,standard_lib=1),'config'))"`
7063 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print('-I'+distutils.sysconfig.get_python_inc())"`
7064
7065 # This should be enough of a message.
7066 { $as_echo "$as_me:$LINENO: result: $python_configdir" >&5
7067 $as_echo "$python_configdir" >&6; }
7068
7069
7070 { $as_echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
7071 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7072
7073 python_libdir=`${PYTHON} -c "import distutils.sysconfig,string; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7074 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig,string; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7075 python_so=`${PYTHON} -c "import distutils.sysconfig,string; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"`
7076 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
7077
7078 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7079 then
7080         # New way: use the official shared library
7081         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7082         python_libspec="-L${python_libdir} -l${ldlibrary}"
7083 else
7084         # Old way: use libpython from python_configdir
7085         python_libdir="${python_configdir}"
7086         python_libspec="-L${python_libdir} -lpython${python_version}"
7087 fi
7088
7089 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
7090
7091 { $as_echo "$as_me:$LINENO: result: ${python_libspec} ${python_additional_libs}" >&5
7092 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
7093
7094
7095 # threaded python is not supported on bsd's
7096 { $as_echo "$as_me:$LINENO: checking whether Python is compiled with thread support" >&5
7097 $as_echo_n "checking whether Python is compiled with thread support... " >&6; }
7098 pythreads=`${PYTHON} -c "import sys; print(int('thread' in sys.builtin_module_names))"`
7099 if test "$pythreads" = "1"; then
7100   { $as_echo "$as_me:$LINENO: result: yes" >&5
7101 $as_echo "yes" >&6; }
7102   case $host_os in
7103   openbsd*|freebsd*)
7104     { { $as_echo "$as_me:$LINENO: error: threaded Python not supported on this platform" >&5
7105 $as_echo "$as_me: error: threaded Python not supported on this platform" >&2;}
7106    { (exit 1); exit 1; }; }
7107     ;;
7108   esac
7109 else
7110   { $as_echo "$as_me:$LINENO: result: no" >&5
7111 $as_echo "no" >&6; }
7112 fi
7113
7114
7115 fi
7116
7117 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
7118   # Extract the first word of "zic", so it can be a program name with args.
7119 set dummy zic; ac_word=$2
7120 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
7121 $as_echo_n "checking for $ac_word... " >&6; }
7122 if test "${ac_cv_path_ZIC+set}" = set; then
7123   $as_echo_n "(cached) " >&6
7124 else
7125   case $ZIC in
7126   [\\/]* | ?:[\\/]*)
7127   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
7128   ;;
7129   *)
7130   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7131 for as_dir in $PATH
7132 do
7133   IFS=$as_save_IFS
7134   test -z "$as_dir" && as_dir=.
7135   for ac_exec_ext in '' $ac_executable_extensions; do
7136   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7137     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
7138     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7139     break 2
7140   fi
7141 done
7142 done
7143 IFS=$as_save_IFS
7144
7145   ;;
7146 esac
7147 fi
7148 ZIC=$ac_cv_path_ZIC
7149 if test -n "$ZIC"; then
7150   { $as_echo "$as_me:$LINENO: result: $ZIC" >&5
7151 $as_echo "$ZIC" >&6; }
7152 else
7153   { $as_echo "$as_me:$LINENO: result: no" >&5
7154 $as_echo "no" >&6; }
7155 fi
7156
7157
7158   if test -z "$ZIC"; then
7159     { { $as_echo "$as_me:$LINENO: error:
7160 When cross-compiling, either use the option --with-system-tzdata to use
7161 existing time-zone data, or set the environment variable ZIC to a zic
7162 program to use during the build." >&5
7163 $as_echo "$as_me: error:
7164 When cross-compiling, either use the option --with-system-tzdata to use
7165 existing time-zone data, or set the environment variable ZIC to a zic
7166 program to use during the build." >&2;}
7167    { (exit 1); exit 1; }; }
7168   fi
7169 fi
7170
7171
7172 ##
7173 ## Libraries
7174 ##
7175 ## Most libraries are included only if they demonstrably provide a function
7176 ## we need, but libm is an exception: always include it, because there are
7177 ## too many compilers that play cute optimization games that will break
7178 ## probes for standard functions such as pow().
7179 ##
7180
7181
7182 { $as_echo "$as_me:$LINENO: checking for main in -lm" >&5
7183 $as_echo_n "checking for main in -lm... " >&6; }
7184 if test "${ac_cv_lib_m_main+set}" = set; then
7185   $as_echo_n "(cached) " >&6
7186 else
7187   ac_check_lib_save_LIBS=$LIBS
7188 LIBS="-lm  $LIBS"
7189 cat >conftest.$ac_ext <<_ACEOF
7190 /* confdefs.h.  */
7191 _ACEOF
7192 cat confdefs.h >>conftest.$ac_ext
7193 cat >>conftest.$ac_ext <<_ACEOF
7194 /* end confdefs.h.  */
7195
7196
7197 int
7198 main ()
7199 {
7200 return main ();
7201   ;
7202   return 0;
7203 }
7204 _ACEOF
7205 rm -f conftest.$ac_objext conftest$ac_exeext
7206 if { (ac_try="$ac_link"
7207 case "(($ac_try" in
7208   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7209   *) ac_try_echo=$ac_try;;
7210 esac
7211 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7212 $as_echo "$ac_try_echo") >&5
7213   (eval "$ac_link") 2>conftest.er1
7214   ac_status=$?
7215   grep -v '^ *+' conftest.er1 >conftest.err
7216   rm -f conftest.er1
7217   cat conftest.err >&5
7218   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7219   (exit $ac_status); } && {
7220          test -z "$ac_c_werror_flag" ||
7221          test ! -s conftest.err
7222        } && test -s conftest$ac_exeext && {
7223          test "$cross_compiling" = yes ||
7224          $as_test_x conftest$ac_exeext
7225        }; then
7226   ac_cv_lib_m_main=yes
7227 else
7228   $as_echo "$as_me: failed program was:" >&5
7229 sed 's/^/| /' conftest.$ac_ext >&5
7230
7231         ac_cv_lib_m_main=no
7232 fi
7233
7234 rm -rf conftest.dSYM
7235 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7236       conftest$ac_exeext conftest.$ac_ext
7237 LIBS=$ac_check_lib_save_LIBS
7238 fi
7239 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
7240 $as_echo "$ac_cv_lib_m_main" >&6; }
7241 if test "x$ac_cv_lib_m_main" = x""yes; then
7242   cat >>confdefs.h <<_ACEOF
7243 #define HAVE_LIBM 1
7244 _ACEOF
7245
7246   LIBS="-lm $LIBS"
7247
7248 fi
7249
7250 { $as_echo "$as_me:$LINENO: checking for library containing setproctitle" >&5
7251 $as_echo_n "checking for library containing setproctitle... " >&6; }
7252 if test "${ac_cv_search_setproctitle+set}" = set; then
7253   $as_echo_n "(cached) " >&6
7254 else
7255   ac_func_search_save_LIBS=$LIBS
7256 cat >conftest.$ac_ext <<_ACEOF
7257 /* confdefs.h.  */
7258 _ACEOF
7259 cat confdefs.h >>conftest.$ac_ext
7260 cat >>conftest.$ac_ext <<_ACEOF
7261 /* end confdefs.h.  */
7262
7263 /* Override any GCC internal prototype to avoid an error.
7264    Use char because int might match the return type of a GCC
7265    builtin and then its argument prototype would still apply.  */
7266 #ifdef __cplusplus
7267 extern "C"
7268 #endif
7269 char setproctitle ();
7270 int
7271 main ()
7272 {
7273 return setproctitle ();
7274   ;
7275   return 0;
7276 }
7277 _ACEOF
7278 for ac_lib in '' util; do
7279   if test -z "$ac_lib"; then
7280     ac_res="none required"
7281   else
7282     ac_res=-l$ac_lib
7283     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7284   fi
7285   rm -f conftest.$ac_objext conftest$ac_exeext
7286 if { (ac_try="$ac_link"
7287 case "(($ac_try" in
7288   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7289   *) ac_try_echo=$ac_try;;
7290 esac
7291 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7292 $as_echo "$ac_try_echo") >&5
7293   (eval "$ac_link") 2>conftest.er1
7294   ac_status=$?
7295   grep -v '^ *+' conftest.er1 >conftest.err
7296   rm -f conftest.er1
7297   cat conftest.err >&5
7298   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7299   (exit $ac_status); } && {
7300          test -z "$ac_c_werror_flag" ||
7301          test ! -s conftest.err
7302        } && test -s conftest$ac_exeext && {
7303          test "$cross_compiling" = yes ||
7304          $as_test_x conftest$ac_exeext
7305        }; then
7306   ac_cv_search_setproctitle=$ac_res
7307 else
7308   $as_echo "$as_me: failed program was:" >&5
7309 sed 's/^/| /' conftest.$ac_ext >&5
7310
7311
7312 fi
7313
7314 rm -rf conftest.dSYM
7315 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7316       conftest$ac_exeext
7317   if test "${ac_cv_search_setproctitle+set}" = set; then
7318   break
7319 fi
7320 done
7321 if test "${ac_cv_search_setproctitle+set}" = set; then
7322   :
7323 else
7324   ac_cv_search_setproctitle=no
7325 fi
7326 rm conftest.$ac_ext
7327 LIBS=$ac_func_search_save_LIBS
7328 fi
7329 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_setproctitle" >&5
7330 $as_echo "$ac_cv_search_setproctitle" >&6; }
7331 ac_res=$ac_cv_search_setproctitle
7332 if test "$ac_res" != no; then
7333   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7334
7335 fi
7336
7337 { $as_echo "$as_me:$LINENO: checking for library containing dlopen" >&5
7338 $as_echo_n "checking for library containing dlopen... " >&6; }
7339 if test "${ac_cv_search_dlopen+set}" = set; then
7340   $as_echo_n "(cached) " >&6
7341 else
7342   ac_func_search_save_LIBS=$LIBS
7343 cat >conftest.$ac_ext <<_ACEOF
7344 /* confdefs.h.  */
7345 _ACEOF
7346 cat confdefs.h >>conftest.$ac_ext
7347 cat >>conftest.$ac_ext <<_ACEOF
7348 /* end confdefs.h.  */
7349
7350 /* Override any GCC internal prototype to avoid an error.
7351    Use char because int might match the return type of a GCC
7352    builtin and then its argument prototype would still apply.  */
7353 #ifdef __cplusplus
7354 extern "C"
7355 #endif
7356 char dlopen ();
7357 int
7358 main ()
7359 {
7360 return dlopen ();
7361   ;
7362   return 0;
7363 }
7364 _ACEOF
7365 for ac_lib in '' dl; do
7366   if test -z "$ac_lib"; then
7367     ac_res="none required"
7368   else
7369     ac_res=-l$ac_lib
7370     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7371   fi
7372   rm -f conftest.$ac_objext conftest$ac_exeext
7373 if { (ac_try="$ac_link"
7374 case "(($ac_try" in
7375   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7376   *) ac_try_echo=$ac_try;;
7377 esac
7378 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7379 $as_echo "$ac_try_echo") >&5
7380   (eval "$ac_link") 2>conftest.er1
7381   ac_status=$?
7382   grep -v '^ *+' conftest.er1 >conftest.err
7383   rm -f conftest.er1
7384   cat conftest.err >&5
7385   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7386   (exit $ac_status); } && {
7387          test -z "$ac_c_werror_flag" ||
7388          test ! -s conftest.err
7389        } && test -s conftest$ac_exeext && {
7390          test "$cross_compiling" = yes ||
7391          $as_test_x conftest$ac_exeext
7392        }; then
7393   ac_cv_search_dlopen=$ac_res
7394 else
7395   $as_echo "$as_me: failed program was:" >&5
7396 sed 's/^/| /' conftest.$ac_ext >&5
7397
7398
7399 fi
7400
7401 rm -rf conftest.dSYM
7402 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7403       conftest$ac_exeext
7404   if test "${ac_cv_search_dlopen+set}" = set; then
7405   break
7406 fi
7407 done
7408 if test "${ac_cv_search_dlopen+set}" = set; then
7409   :
7410 else
7411   ac_cv_search_dlopen=no
7412 fi
7413 rm conftest.$ac_ext
7414 LIBS=$ac_func_search_save_LIBS
7415 fi
7416 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
7417 $as_echo "$ac_cv_search_dlopen" >&6; }
7418 ac_res=$ac_cv_search_dlopen
7419 if test "$ac_res" != no; then
7420   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7421
7422 fi
7423
7424 { $as_echo "$as_me:$LINENO: checking for library containing socket" >&5
7425 $as_echo_n "checking for library containing socket... " >&6; }
7426 if test "${ac_cv_search_socket+set}" = set; then
7427   $as_echo_n "(cached) " >&6
7428 else
7429   ac_func_search_save_LIBS=$LIBS
7430 cat >conftest.$ac_ext <<_ACEOF
7431 /* confdefs.h.  */
7432 _ACEOF
7433 cat confdefs.h >>conftest.$ac_ext
7434 cat >>conftest.$ac_ext <<_ACEOF
7435 /* end confdefs.h.  */
7436
7437 /* Override any GCC internal prototype to avoid an error.
7438    Use char because int might match the return type of a GCC
7439    builtin and then its argument prototype would still apply.  */
7440 #ifdef __cplusplus
7441 extern "C"
7442 #endif
7443 char socket ();
7444 int
7445 main ()
7446 {
7447 return socket ();
7448   ;
7449   return 0;
7450 }
7451 _ACEOF
7452 for ac_lib in '' socket wsock32; do
7453   if test -z "$ac_lib"; then
7454     ac_res="none required"
7455   else
7456     ac_res=-l$ac_lib
7457     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7458   fi
7459   rm -f conftest.$ac_objext conftest$ac_exeext
7460 if { (ac_try="$ac_link"
7461 case "(($ac_try" in
7462   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7463   *) ac_try_echo=$ac_try;;
7464 esac
7465 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7466 $as_echo "$ac_try_echo") >&5
7467   (eval "$ac_link") 2>conftest.er1
7468   ac_status=$?
7469   grep -v '^ *+' conftest.er1 >conftest.err
7470   rm -f conftest.er1
7471   cat conftest.err >&5
7472   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7473   (exit $ac_status); } && {
7474          test -z "$ac_c_werror_flag" ||
7475          test ! -s conftest.err
7476        } && test -s conftest$ac_exeext && {
7477          test "$cross_compiling" = yes ||
7478          $as_test_x conftest$ac_exeext
7479        }; then
7480   ac_cv_search_socket=$ac_res
7481 else
7482   $as_echo "$as_me: failed program was:" >&5
7483 sed 's/^/| /' conftest.$ac_ext >&5
7484
7485
7486 fi
7487
7488 rm -rf conftest.dSYM
7489 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7490       conftest$ac_exeext
7491   if test "${ac_cv_search_socket+set}" = set; then
7492   break
7493 fi
7494 done
7495 if test "${ac_cv_search_socket+set}" = set; then
7496   :
7497 else
7498   ac_cv_search_socket=no
7499 fi
7500 rm conftest.$ac_ext
7501 LIBS=$ac_func_search_save_LIBS
7502 fi
7503 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
7504 $as_echo "$ac_cv_search_socket" >&6; }
7505 ac_res=$ac_cv_search_socket
7506 if test "$ac_res" != no; then
7507   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7508
7509 fi
7510
7511 { $as_echo "$as_me:$LINENO: checking for library containing shl_load" >&5
7512 $as_echo_n "checking for library containing shl_load... " >&6; }
7513 if test "${ac_cv_search_shl_load+set}" = set; then
7514   $as_echo_n "(cached) " >&6
7515 else
7516   ac_func_search_save_LIBS=$LIBS
7517 cat >conftest.$ac_ext <<_ACEOF
7518 /* confdefs.h.  */
7519 _ACEOF
7520 cat confdefs.h >>conftest.$ac_ext
7521 cat >>conftest.$ac_ext <<_ACEOF
7522 /* end confdefs.h.  */
7523
7524 /* Override any GCC internal prototype to avoid an error.
7525    Use char because int might match the return type of a GCC
7526    builtin and then its argument prototype would still apply.  */
7527 #ifdef __cplusplus
7528 extern "C"
7529 #endif
7530 char shl_load ();
7531 int
7532 main ()
7533 {
7534 return shl_load ();
7535   ;
7536   return 0;
7537 }
7538 _ACEOF
7539 for ac_lib in '' dld; do
7540   if test -z "$ac_lib"; then
7541     ac_res="none required"
7542   else
7543     ac_res=-l$ac_lib
7544     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7545   fi
7546   rm -f conftest.$ac_objext conftest$ac_exeext
7547 if { (ac_try="$ac_link"
7548 case "(($ac_try" in
7549   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7550   *) ac_try_echo=$ac_try;;
7551 esac
7552 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7553 $as_echo "$ac_try_echo") >&5
7554   (eval "$ac_link") 2>conftest.er1
7555   ac_status=$?
7556   grep -v '^ *+' conftest.er1 >conftest.err
7557   rm -f conftest.er1
7558   cat conftest.err >&5
7559   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7560   (exit $ac_status); } && {
7561          test -z "$ac_c_werror_flag" ||
7562          test ! -s conftest.err
7563        } && test -s conftest$ac_exeext && {
7564          test "$cross_compiling" = yes ||
7565          $as_test_x conftest$ac_exeext
7566        }; then
7567   ac_cv_search_shl_load=$ac_res
7568 else
7569   $as_echo "$as_me: failed program was:" >&5
7570 sed 's/^/| /' conftest.$ac_ext >&5
7571
7572
7573 fi
7574
7575 rm -rf conftest.dSYM
7576 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7577       conftest$ac_exeext
7578   if test "${ac_cv_search_shl_load+set}" = set; then
7579   break
7580 fi
7581 done
7582 if test "${ac_cv_search_shl_load+set}" = set; then
7583   :
7584 else
7585   ac_cv_search_shl_load=no
7586 fi
7587 rm conftest.$ac_ext
7588 LIBS=$ac_func_search_save_LIBS
7589 fi
7590 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_shl_load" >&5
7591 $as_echo "$ac_cv_search_shl_load" >&6; }
7592 ac_res=$ac_cv_search_shl_load
7593 if test "$ac_res" != no; then
7594   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7595
7596 fi
7597
7598 # We only use libld in port/dynloader/aix.c
7599 case $host_os in
7600      aix*)
7601         { $as_echo "$as_me:$LINENO: checking for library containing ldopen" >&5
7602 $as_echo_n "checking for library containing ldopen... " >&6; }
7603 if test "${ac_cv_search_ldopen+set}" = set; then
7604   $as_echo_n "(cached) " >&6
7605 else
7606   ac_func_search_save_LIBS=$LIBS
7607 cat >conftest.$ac_ext <<_ACEOF
7608 /* confdefs.h.  */
7609 _ACEOF
7610 cat confdefs.h >>conftest.$ac_ext
7611 cat >>conftest.$ac_ext <<_ACEOF
7612 /* end confdefs.h.  */
7613
7614 /* Override any GCC internal prototype to avoid an error.
7615    Use char because int might match the return type of a GCC
7616    builtin and then its argument prototype would still apply.  */
7617 #ifdef __cplusplus
7618 extern "C"
7619 #endif
7620 char ldopen ();
7621 int
7622 main ()
7623 {
7624 return ldopen ();
7625   ;
7626   return 0;
7627 }
7628 _ACEOF
7629 for ac_lib in '' ld; do
7630   if test -z "$ac_lib"; then
7631     ac_res="none required"
7632   else
7633     ac_res=-l$ac_lib
7634     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7635   fi
7636   rm -f conftest.$ac_objext conftest$ac_exeext
7637 if { (ac_try="$ac_link"
7638 case "(($ac_try" in
7639   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7640   *) ac_try_echo=$ac_try;;
7641 esac
7642 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7643 $as_echo "$ac_try_echo") >&5
7644   (eval "$ac_link") 2>conftest.er1
7645   ac_status=$?
7646   grep -v '^ *+' conftest.er1 >conftest.err
7647   rm -f conftest.er1
7648   cat conftest.err >&5
7649   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7650   (exit $ac_status); } && {
7651          test -z "$ac_c_werror_flag" ||
7652          test ! -s conftest.err
7653        } && test -s conftest$ac_exeext && {
7654          test "$cross_compiling" = yes ||
7655          $as_test_x conftest$ac_exeext
7656        }; then
7657   ac_cv_search_ldopen=$ac_res
7658 else
7659   $as_echo "$as_me: failed program was:" >&5
7660 sed 's/^/| /' conftest.$ac_ext >&5
7661
7662
7663 fi
7664
7665 rm -rf conftest.dSYM
7666 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7667       conftest$ac_exeext
7668   if test "${ac_cv_search_ldopen+set}" = set; then
7669   break
7670 fi
7671 done
7672 if test "${ac_cv_search_ldopen+set}" = set; then
7673   :
7674 else
7675   ac_cv_search_ldopen=no
7676 fi
7677 rm conftest.$ac_ext
7678 LIBS=$ac_func_search_save_LIBS
7679 fi
7680 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_ldopen" >&5
7681 $as_echo "$ac_cv_search_ldopen" >&6; }
7682 ac_res=$ac_cv_search_ldopen
7683 if test "$ac_res" != no; then
7684   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7685
7686 fi
7687
7688         ;;
7689 esac
7690 { $as_echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
7691 $as_echo_n "checking for library containing getopt_long... " >&6; }
7692 if test "${ac_cv_search_getopt_long+set}" = set; then
7693   $as_echo_n "(cached) " >&6
7694 else
7695   ac_func_search_save_LIBS=$LIBS
7696 cat >conftest.$ac_ext <<_ACEOF
7697 /* confdefs.h.  */
7698 _ACEOF
7699 cat confdefs.h >>conftest.$ac_ext
7700 cat >>conftest.$ac_ext <<_ACEOF
7701 /* end confdefs.h.  */
7702
7703 /* Override any GCC internal prototype to avoid an error.
7704    Use char because int might match the return type of a GCC
7705    builtin and then its argument prototype would still apply.  */
7706 #ifdef __cplusplus
7707 extern "C"
7708 #endif
7709 char getopt_long ();
7710 int
7711 main ()
7712 {
7713 return getopt_long ();
7714   ;
7715   return 0;
7716 }
7717 _ACEOF
7718 for ac_lib in '' getopt gnugetopt; do
7719   if test -z "$ac_lib"; then
7720     ac_res="none required"
7721   else
7722     ac_res=-l$ac_lib
7723     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7724   fi
7725   rm -f conftest.$ac_objext conftest$ac_exeext
7726 if { (ac_try="$ac_link"
7727 case "(($ac_try" in
7728   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7729   *) ac_try_echo=$ac_try;;
7730 esac
7731 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7732 $as_echo "$ac_try_echo") >&5
7733   (eval "$ac_link") 2>conftest.er1
7734   ac_status=$?
7735   grep -v '^ *+' conftest.er1 >conftest.err
7736   rm -f conftest.er1
7737   cat conftest.err >&5
7738   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7739   (exit $ac_status); } && {
7740          test -z "$ac_c_werror_flag" ||
7741          test ! -s conftest.err
7742        } && test -s conftest$ac_exeext && {
7743          test "$cross_compiling" = yes ||
7744          $as_test_x conftest$ac_exeext
7745        }; then
7746   ac_cv_search_getopt_long=$ac_res
7747 else
7748   $as_echo "$as_me: failed program was:" >&5
7749 sed 's/^/| /' conftest.$ac_ext >&5
7750
7751
7752 fi
7753
7754 rm -rf conftest.dSYM
7755 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7756       conftest$ac_exeext
7757   if test "${ac_cv_search_getopt_long+set}" = set; then
7758   break
7759 fi
7760 done
7761 if test "${ac_cv_search_getopt_long+set}" = set; then
7762   :
7763 else
7764   ac_cv_search_getopt_long=no
7765 fi
7766 rm conftest.$ac_ext
7767 LIBS=$ac_func_search_save_LIBS
7768 fi
7769 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
7770 $as_echo "$ac_cv_search_getopt_long" >&6; }
7771 ac_res=$ac_cv_search_getopt_long
7772 if test "$ac_res" != no; then
7773   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7774
7775 fi
7776
7777 { $as_echo "$as_me:$LINENO: checking for library containing crypt" >&5
7778 $as_echo_n "checking for library containing crypt... " >&6; }
7779 if test "${ac_cv_search_crypt+set}" = set; then
7780   $as_echo_n "(cached) " >&6
7781 else
7782   ac_func_search_save_LIBS=$LIBS
7783 cat >conftest.$ac_ext <<_ACEOF
7784 /* confdefs.h.  */
7785 _ACEOF
7786 cat confdefs.h >>conftest.$ac_ext
7787 cat >>conftest.$ac_ext <<_ACEOF
7788 /* end confdefs.h.  */
7789
7790 /* Override any GCC internal prototype to avoid an error.
7791    Use char because int might match the return type of a GCC
7792    builtin and then its argument prototype would still apply.  */
7793 #ifdef __cplusplus
7794 extern "C"
7795 #endif
7796 char crypt ();
7797 int
7798 main ()
7799 {
7800 return crypt ();
7801   ;
7802   return 0;
7803 }
7804 _ACEOF
7805 for ac_lib in '' crypt; do
7806   if test -z "$ac_lib"; then
7807     ac_res="none required"
7808   else
7809     ac_res=-l$ac_lib
7810     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7811   fi
7812   rm -f conftest.$ac_objext conftest$ac_exeext
7813 if { (ac_try="$ac_link"
7814 case "(($ac_try" in
7815   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7816   *) ac_try_echo=$ac_try;;
7817 esac
7818 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7819 $as_echo "$ac_try_echo") >&5
7820   (eval "$ac_link") 2>conftest.er1
7821   ac_status=$?
7822   grep -v '^ *+' conftest.er1 >conftest.err
7823   rm -f conftest.er1
7824   cat conftest.err >&5
7825   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7826   (exit $ac_status); } && {
7827          test -z "$ac_c_werror_flag" ||
7828          test ! -s conftest.err
7829        } && test -s conftest$ac_exeext && {
7830          test "$cross_compiling" = yes ||
7831          $as_test_x conftest$ac_exeext
7832        }; then
7833   ac_cv_search_crypt=$ac_res
7834 else
7835   $as_echo "$as_me: failed program was:" >&5
7836 sed 's/^/| /' conftest.$ac_ext >&5
7837
7838
7839 fi
7840
7841 rm -rf conftest.dSYM
7842 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7843       conftest$ac_exeext
7844   if test "${ac_cv_search_crypt+set}" = set; then
7845   break
7846 fi
7847 done
7848 if test "${ac_cv_search_crypt+set}" = set; then
7849   :
7850 else
7851   ac_cv_search_crypt=no
7852 fi
7853 rm conftest.$ac_ext
7854 LIBS=$ac_func_search_save_LIBS
7855 fi
7856 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
7857 $as_echo "$ac_cv_search_crypt" >&6; }
7858 ac_res=$ac_cv_search_crypt
7859 if test "$ac_res" != no; then
7860   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7861
7862 fi
7863
7864 # Solaris:
7865 { $as_echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
7866 $as_echo_n "checking for library containing fdatasync... " >&6; }
7867 if test "${ac_cv_search_fdatasync+set}" = set; then
7868   $as_echo_n "(cached) " >&6
7869 else
7870   ac_func_search_save_LIBS=$LIBS
7871 cat >conftest.$ac_ext <<_ACEOF
7872 /* confdefs.h.  */
7873 _ACEOF
7874 cat confdefs.h >>conftest.$ac_ext
7875 cat >>conftest.$ac_ext <<_ACEOF
7876 /* end confdefs.h.  */
7877
7878 /* Override any GCC internal prototype to avoid an error.
7879    Use char because int might match the return type of a GCC
7880    builtin and then its argument prototype would still apply.  */
7881 #ifdef __cplusplus
7882 extern "C"
7883 #endif
7884 char fdatasync ();
7885 int
7886 main ()
7887 {
7888 return fdatasync ();
7889   ;
7890   return 0;
7891 }
7892 _ACEOF
7893 for ac_lib in '' rt posix4; do
7894   if test -z "$ac_lib"; then
7895     ac_res="none required"
7896   else
7897     ac_res=-l$ac_lib
7898     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7899   fi
7900   rm -f conftest.$ac_objext conftest$ac_exeext
7901 if { (ac_try="$ac_link"
7902 case "(($ac_try" in
7903   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7904   *) ac_try_echo=$ac_try;;
7905 esac
7906 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7907 $as_echo "$ac_try_echo") >&5
7908   (eval "$ac_link") 2>conftest.er1
7909   ac_status=$?
7910   grep -v '^ *+' conftest.er1 >conftest.err
7911   rm -f conftest.er1
7912   cat conftest.err >&5
7913   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7914   (exit $ac_status); } && {
7915          test -z "$ac_c_werror_flag" ||
7916          test ! -s conftest.err
7917        } && test -s conftest$ac_exeext && {
7918          test "$cross_compiling" = yes ||
7919          $as_test_x conftest$ac_exeext
7920        }; then
7921   ac_cv_search_fdatasync=$ac_res
7922 else
7923   $as_echo "$as_me: failed program was:" >&5
7924 sed 's/^/| /' conftest.$ac_ext >&5
7925
7926
7927 fi
7928
7929 rm -rf conftest.dSYM
7930 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7931       conftest$ac_exeext
7932   if test "${ac_cv_search_fdatasync+set}" = set; then
7933   break
7934 fi
7935 done
7936 if test "${ac_cv_search_fdatasync+set}" = set; then
7937   :
7938 else
7939   ac_cv_search_fdatasync=no
7940 fi
7941 rm conftest.$ac_ext
7942 LIBS=$ac_func_search_save_LIBS
7943 fi
7944 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
7945 $as_echo "$ac_cv_search_fdatasync" >&6; }
7946 ac_res=$ac_cv_search_fdatasync
7947 if test "$ac_res" != no; then
7948   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7949
7950 fi
7951
7952 # Required for thread_test.c on Solaris 2.5:
7953 # Other ports use it too (HP-UX) so test unconditionally
7954 { $as_echo "$as_me:$LINENO: checking for library containing gethostbyname_r" >&5
7955 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
7956 if test "${ac_cv_search_gethostbyname_r+set}" = set; then
7957   $as_echo_n "(cached) " >&6
7958 else
7959   ac_func_search_save_LIBS=$LIBS
7960 cat >conftest.$ac_ext <<_ACEOF
7961 /* confdefs.h.  */
7962 _ACEOF
7963 cat confdefs.h >>conftest.$ac_ext
7964 cat >>conftest.$ac_ext <<_ACEOF
7965 /* end confdefs.h.  */
7966
7967 /* Override any GCC internal prototype to avoid an error.
7968    Use char because int might match the return type of a GCC
7969    builtin and then its argument prototype would still apply.  */
7970 #ifdef __cplusplus
7971 extern "C"
7972 #endif
7973 char gethostbyname_r ();
7974 int
7975 main ()
7976 {
7977 return gethostbyname_r ();
7978   ;
7979   return 0;
7980 }
7981 _ACEOF
7982 for ac_lib in '' nsl; do
7983   if test -z "$ac_lib"; then
7984     ac_res="none required"
7985   else
7986     ac_res=-l$ac_lib
7987     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7988   fi
7989   rm -f conftest.$ac_objext conftest$ac_exeext
7990 if { (ac_try="$ac_link"
7991 case "(($ac_try" in
7992   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7993   *) ac_try_echo=$ac_try;;
7994 esac
7995 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7996 $as_echo "$ac_try_echo") >&5
7997   (eval "$ac_link") 2>conftest.er1
7998   ac_status=$?
7999   grep -v '^ *+' conftest.er1 >conftest.err
8000   rm -f conftest.er1
8001   cat conftest.err >&5
8002   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8003   (exit $ac_status); } && {
8004          test -z "$ac_c_werror_flag" ||
8005          test ! -s conftest.err
8006        } && test -s conftest$ac_exeext && {
8007          test "$cross_compiling" = yes ||
8008          $as_test_x conftest$ac_exeext
8009        }; then
8010   ac_cv_search_gethostbyname_r=$ac_res
8011 else
8012   $as_echo "$as_me: failed program was:" >&5
8013 sed 's/^/| /' conftest.$ac_ext >&5
8014
8015
8016 fi
8017
8018 rm -rf conftest.dSYM
8019 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8020       conftest$ac_exeext
8021   if test "${ac_cv_search_gethostbyname_r+set}" = set; then
8022   break
8023 fi
8024 done
8025 if test "${ac_cv_search_gethostbyname_r+set}" = set; then
8026   :
8027 else
8028   ac_cv_search_gethostbyname_r=no
8029 fi
8030 rm conftest.$ac_ext
8031 LIBS=$ac_func_search_save_LIBS
8032 fi
8033 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname_r" >&5
8034 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
8035 ac_res=$ac_cv_search_gethostbyname_r
8036 if test "$ac_res" != no; then
8037   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8038
8039 fi
8040
8041 # Cygwin:
8042 { $as_echo "$as_me:$LINENO: checking for library containing shmget" >&5
8043 $as_echo_n "checking for library containing shmget... " >&6; }
8044 if test "${ac_cv_search_shmget+set}" = set; then
8045   $as_echo_n "(cached) " >&6
8046 else
8047   ac_func_search_save_LIBS=$LIBS
8048 cat >conftest.$ac_ext <<_ACEOF
8049 /* confdefs.h.  */
8050 _ACEOF
8051 cat confdefs.h >>conftest.$ac_ext
8052 cat >>conftest.$ac_ext <<_ACEOF
8053 /* end confdefs.h.  */
8054
8055 /* Override any GCC internal prototype to avoid an error.
8056    Use char because int might match the return type of a GCC
8057    builtin and then its argument prototype would still apply.  */
8058 #ifdef __cplusplus
8059 extern "C"
8060 #endif
8061 char shmget ();
8062 int
8063 main ()
8064 {
8065 return shmget ();
8066   ;
8067   return 0;
8068 }
8069 _ACEOF
8070 for ac_lib in '' cygipc; do
8071   if test -z "$ac_lib"; then
8072     ac_res="none required"
8073   else
8074     ac_res=-l$ac_lib
8075     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8076   fi
8077   rm -f conftest.$ac_objext conftest$ac_exeext
8078 if { (ac_try="$ac_link"
8079 case "(($ac_try" in
8080   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8081   *) ac_try_echo=$ac_try;;
8082 esac
8083 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8084 $as_echo "$ac_try_echo") >&5
8085   (eval "$ac_link") 2>conftest.er1
8086   ac_status=$?
8087   grep -v '^ *+' conftest.er1 >conftest.err
8088   rm -f conftest.er1
8089   cat conftest.err >&5
8090   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8091   (exit $ac_status); } && {
8092          test -z "$ac_c_werror_flag" ||
8093          test ! -s conftest.err
8094        } && test -s conftest$ac_exeext && {
8095          test "$cross_compiling" = yes ||
8096          $as_test_x conftest$ac_exeext
8097        }; then
8098   ac_cv_search_shmget=$ac_res
8099 else
8100   $as_echo "$as_me: failed program was:" >&5
8101 sed 's/^/| /' conftest.$ac_ext >&5
8102
8103
8104 fi
8105
8106 rm -rf conftest.dSYM
8107 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8108       conftest$ac_exeext
8109   if test "${ac_cv_search_shmget+set}" = set; then
8110   break
8111 fi
8112 done
8113 if test "${ac_cv_search_shmget+set}" = set; then
8114   :
8115 else
8116   ac_cv_search_shmget=no
8117 fi
8118 rm conftest.$ac_ext
8119 LIBS=$ac_func_search_save_LIBS
8120 fi
8121 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_shmget" >&5
8122 $as_echo "$ac_cv_search_shmget" >&6; }
8123 ac_res=$ac_cv_search_shmget
8124 if test "$ac_res" != no; then
8125   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8126
8127 fi
8128
8129
8130 if test "$with_readline" = yes; then
8131
8132
8133 { $as_echo "$as_me:$LINENO: checking for library containing readline" >&5
8134 $as_echo_n "checking for library containing readline... " >&6; }
8135 if test "${pgac_cv_check_readline+set}" = set; then
8136   $as_echo_n "(cached) " >&6
8137 else
8138   pgac_cv_check_readline=no
8139 pgac_save_LIBS=$LIBS
8140 if test x"$with_libedit_preferred" != x"yes"
8141 then    READLINE_ORDER="-lreadline -ledit"
8142 else    READLINE_ORDER="-ledit -lreadline"
8143 fi
8144 for pgac_rllib in $READLINE_ORDER ; do
8145   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
8146     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
8147     cat >conftest.$ac_ext <<_ACEOF
8148 /* confdefs.h.  */
8149 _ACEOF
8150 cat confdefs.h >>conftest.$ac_ext
8151 cat >>conftest.$ac_ext <<_ACEOF
8152 /* end confdefs.h.  */
8153
8154 /* Override any GCC internal prototype to avoid an error.
8155    Use char because int might match the return type of a GCC
8156    builtin and then its argument prototype would still apply.  */
8157 #ifdef __cplusplus
8158 extern "C"
8159 #endif
8160 char readline ();
8161 int
8162 main ()
8163 {
8164 return readline ();
8165   ;
8166   return 0;
8167 }
8168 _ACEOF
8169 rm -f conftest.$ac_objext conftest$ac_exeext
8170 if { (ac_try="$ac_link"
8171 case "(($ac_try" in
8172   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8173   *) ac_try_echo=$ac_try;;
8174 esac
8175 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8176 $as_echo "$ac_try_echo") >&5
8177   (eval "$ac_link") 2>conftest.er1
8178   ac_status=$?
8179   grep -v '^ *+' conftest.er1 >conftest.err
8180   rm -f conftest.er1
8181   cat conftest.err >&5
8182   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8183   (exit $ac_status); } && {
8184          test -z "$ac_c_werror_flag" ||
8185          test ! -s conftest.err
8186        } && test -s conftest$ac_exeext && {
8187          test "$cross_compiling" = yes ||
8188          $as_test_x conftest$ac_exeext
8189        }; then
8190
8191       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
8192       # recognize dependent libraries; assume curses is needed if we didn't
8193       # find any dependency.
8194       case $host_os in
8195         netbsd* | openbsd* | irix*)
8196           if test x"$pgac_lib" = x"" ; then
8197             pgac_lib=" -lcurses"
8198           fi ;;
8199       esac
8200
8201       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
8202       break
8203
8204 else
8205   $as_echo "$as_me: failed program was:" >&5
8206 sed 's/^/| /' conftest.$ac_ext >&5
8207
8208
8209 fi
8210
8211 rm -rf conftest.dSYM
8212 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8213       conftest$ac_exeext conftest.$ac_ext
8214   done
8215   if test "$pgac_cv_check_readline" != no ; then
8216     break
8217   fi
8218 done
8219 LIBS=$pgac_save_LIBS
8220
8221 fi
8222 { $as_echo "$as_me:$LINENO: result: $pgac_cv_check_readline" >&5
8223 $as_echo "$pgac_cv_check_readline" >&6; }
8224 if test "$pgac_cv_check_readline" != no ; then
8225   LIBS="$pgac_cv_check_readline $LIBS"
8226
8227 cat >>confdefs.h <<\_ACEOF
8228 #define HAVE_LIBREADLINE 1
8229 _ACEOF
8230
8231 fi
8232
8233
8234   if test x"$pgac_cv_check_readline" = x"no"; then
8235     { { $as_echo "$as_me:$LINENO: error: readline library not found
8236 If you have readline already installed, see config.log for details on the
8237 failure.  It is possible the compiler isn't looking in the proper directory.
8238 Use --without-readline to disable readline support." >&5
8239 $as_echo "$as_me: error: readline library not found
8240 If you have readline already installed, see config.log for details on the
8241 failure.  It is possible the compiler isn't looking in the proper directory.
8242 Use --without-readline to disable readline support." >&2;}
8243    { (exit 1); exit 1; }; }
8244   fi
8245 fi
8246
8247 if test "$with_zlib" = yes; then
8248
8249 { $as_echo "$as_me:$LINENO: checking for inflate in -lz" >&5
8250 $as_echo_n "checking for inflate in -lz... " >&6; }
8251 if test "${ac_cv_lib_z_inflate+set}" = set; then
8252   $as_echo_n "(cached) " >&6
8253 else
8254   ac_check_lib_save_LIBS=$LIBS
8255 LIBS="-lz  $LIBS"
8256 cat >conftest.$ac_ext <<_ACEOF
8257 /* confdefs.h.  */
8258 _ACEOF
8259 cat confdefs.h >>conftest.$ac_ext
8260 cat >>conftest.$ac_ext <<_ACEOF
8261 /* end confdefs.h.  */
8262
8263 /* Override any GCC internal prototype to avoid an error.
8264    Use char because int might match the return type of a GCC
8265    builtin and then its argument prototype would still apply.  */
8266 #ifdef __cplusplus
8267 extern "C"
8268 #endif
8269 char inflate ();
8270 int
8271 main ()
8272 {
8273 return inflate ();
8274   ;
8275   return 0;
8276 }
8277 _ACEOF
8278 rm -f conftest.$ac_objext conftest$ac_exeext
8279 if { (ac_try="$ac_link"
8280 case "(($ac_try" in
8281   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8282   *) ac_try_echo=$ac_try;;
8283 esac
8284 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8285 $as_echo "$ac_try_echo") >&5
8286   (eval "$ac_link") 2>conftest.er1
8287   ac_status=$?
8288   grep -v '^ *+' conftest.er1 >conftest.err
8289   rm -f conftest.er1
8290   cat conftest.err >&5
8291   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8292   (exit $ac_status); } && {
8293          test -z "$ac_c_werror_flag" ||
8294          test ! -s conftest.err
8295        } && test -s conftest$ac_exeext && {
8296          test "$cross_compiling" = yes ||
8297          $as_test_x conftest$ac_exeext
8298        }; then
8299   ac_cv_lib_z_inflate=yes
8300 else
8301   $as_echo "$as_me: failed program was:" >&5
8302 sed 's/^/| /' conftest.$ac_ext >&5
8303
8304         ac_cv_lib_z_inflate=no
8305 fi
8306
8307 rm -rf conftest.dSYM
8308 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8309       conftest$ac_exeext conftest.$ac_ext
8310 LIBS=$ac_check_lib_save_LIBS
8311 fi
8312 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
8313 $as_echo "$ac_cv_lib_z_inflate" >&6; }
8314 if test "x$ac_cv_lib_z_inflate" = x""yes; then
8315   cat >>confdefs.h <<_ACEOF
8316 #define HAVE_LIBZ 1
8317 _ACEOF
8318
8319   LIBS="-lz $LIBS"
8320
8321 else
8322   { { $as_echo "$as_me:$LINENO: error: zlib library not found
8323 If you have zlib already installed, see config.log for details on the
8324 failure.  It is possible the compiler isn't looking in the proper directory.
8325 Use --without-zlib to disable zlib support." >&5
8326 $as_echo "$as_me: error: zlib library not found
8327 If you have zlib already installed, see config.log for details on the
8328 failure.  It is possible the compiler isn't looking in the proper directory.
8329 Use --without-zlib to disable zlib support." >&2;}
8330    { (exit 1); exit 1; }; }
8331 fi
8332
8333 fi
8334
8335 if test "$enable_spinlocks" = yes; then
8336
8337 cat >>confdefs.h <<\_ACEOF
8338 #define HAVE_SPINLOCKS 1
8339 _ACEOF
8340
8341 else
8342   { $as_echo "$as_me:$LINENO: WARNING:
8343 *** Not using spinlocks will cause poor performance." >&5
8344 $as_echo "$as_me: WARNING:
8345 *** Not using spinlocks will cause poor performance." >&2;}
8346 fi
8347
8348 if test "$with_gssapi" = yes ; then
8349   if test "$PORTNAME" != "win32"; then
8350     { $as_echo "$as_me:$LINENO: checking for library containing gss_init_sec_context" >&5
8351 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
8352 if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
8353   $as_echo_n "(cached) " >&6
8354 else
8355   ac_func_search_save_LIBS=$LIBS
8356 cat >conftest.$ac_ext <<_ACEOF
8357 /* confdefs.h.  */
8358 _ACEOF
8359 cat confdefs.h >>conftest.$ac_ext
8360 cat >>conftest.$ac_ext <<_ACEOF
8361 /* end confdefs.h.  */
8362
8363 /* Override any GCC internal prototype to avoid an error.
8364    Use char because int might match the return type of a GCC
8365    builtin and then its argument prototype would still apply.  */
8366 #ifdef __cplusplus
8367 extern "C"
8368 #endif
8369 char gss_init_sec_context ();
8370 int
8371 main ()
8372 {
8373 return gss_init_sec_context ();
8374   ;
8375   return 0;
8376 }
8377 _ACEOF
8378 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
8379   if test -z "$ac_lib"; then
8380     ac_res="none required"
8381   else
8382     ac_res=-l$ac_lib
8383     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8384   fi
8385   rm -f conftest.$ac_objext conftest$ac_exeext
8386 if { (ac_try="$ac_link"
8387 case "(($ac_try" in
8388   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8389   *) ac_try_echo=$ac_try;;
8390 esac
8391 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8392 $as_echo "$ac_try_echo") >&5
8393   (eval "$ac_link") 2>conftest.er1
8394   ac_status=$?
8395   grep -v '^ *+' conftest.er1 >conftest.err
8396   rm -f conftest.er1
8397   cat conftest.err >&5
8398   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8399   (exit $ac_status); } && {
8400          test -z "$ac_c_werror_flag" ||
8401          test ! -s conftest.err
8402        } && test -s conftest$ac_exeext && {
8403          test "$cross_compiling" = yes ||
8404          $as_test_x conftest$ac_exeext
8405        }; then
8406   ac_cv_search_gss_init_sec_context=$ac_res
8407 else
8408   $as_echo "$as_me: failed program was:" >&5
8409 sed 's/^/| /' conftest.$ac_ext >&5
8410
8411
8412 fi
8413
8414 rm -rf conftest.dSYM
8415 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8416       conftest$ac_exeext
8417   if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
8418   break
8419 fi
8420 done
8421 if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
8422   :
8423 else
8424   ac_cv_search_gss_init_sec_context=no
8425 fi
8426 rm conftest.$ac_ext
8427 LIBS=$ac_func_search_save_LIBS
8428 fi
8429 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_gss_init_sec_context" >&5
8430 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
8431 ac_res=$ac_cv_search_gss_init_sec_context
8432 if test "$ac_res" != no; then
8433   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8434
8435 else
8436   { { $as_echo "$as_me:$LINENO: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&5
8437 $as_echo "$as_me: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&2;}
8438    { (exit 1); exit 1; }; }
8439 fi
8440
8441   else
8442     LIBS="$LIBS -lgssapi32"
8443   fi
8444 fi
8445
8446 if test "$with_krb5" = yes ; then
8447   if test "$PORTNAME" != "win32"; then
8448      { $as_echo "$as_me:$LINENO: checking for library containing com_err" >&5
8449 $as_echo_n "checking for library containing com_err... " >&6; }
8450 if test "${ac_cv_search_com_err+set}" = set; then
8451   $as_echo_n "(cached) " >&6
8452 else
8453   ac_func_search_save_LIBS=$LIBS
8454 cat >conftest.$ac_ext <<_ACEOF
8455 /* confdefs.h.  */
8456 _ACEOF
8457 cat confdefs.h >>conftest.$ac_ext
8458 cat >>conftest.$ac_ext <<_ACEOF
8459 /* end confdefs.h.  */
8460
8461 /* Override any GCC internal prototype to avoid an error.
8462    Use char because int might match the return type of a GCC
8463    builtin and then its argument prototype would still apply.  */
8464 #ifdef __cplusplus
8465 extern "C"
8466 #endif
8467 char com_err ();
8468 int
8469 main ()
8470 {
8471 return com_err ();
8472   ;
8473   return 0;
8474 }
8475 _ACEOF
8476 for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' com_err 'com_err -lssl -lcrypto'; do
8477   if test -z "$ac_lib"; then
8478     ac_res="none required"
8479   else
8480     ac_res=-l$ac_lib
8481     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8482   fi
8483   rm -f conftest.$ac_objext conftest$ac_exeext
8484 if { (ac_try="$ac_link"
8485 case "(($ac_try" in
8486   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8487   *) ac_try_echo=$ac_try;;
8488 esac
8489 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8490 $as_echo "$ac_try_echo") >&5
8491   (eval "$ac_link") 2>conftest.er1
8492   ac_status=$?
8493   grep -v '^ *+' conftest.er1 >conftest.err
8494   rm -f conftest.er1
8495   cat conftest.err >&5
8496   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8497   (exit $ac_status); } && {
8498          test -z "$ac_c_werror_flag" ||
8499          test ! -s conftest.err
8500        } && test -s conftest$ac_exeext && {
8501          test "$cross_compiling" = yes ||
8502          $as_test_x conftest$ac_exeext
8503        }; then
8504   ac_cv_search_com_err=$ac_res
8505 else
8506   $as_echo "$as_me: failed program was:" >&5
8507 sed 's/^/| /' conftest.$ac_ext >&5
8508
8509
8510 fi
8511
8512 rm -rf conftest.dSYM
8513 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8514       conftest$ac_exeext
8515   if test "${ac_cv_search_com_err+set}" = set; then
8516   break
8517 fi
8518 done
8519 if test "${ac_cv_search_com_err+set}" = set; then
8520   :
8521 else
8522   ac_cv_search_com_err=no
8523 fi
8524 rm conftest.$ac_ext
8525 LIBS=$ac_func_search_save_LIBS
8526 fi
8527 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
8528 $as_echo "$ac_cv_search_com_err" >&6; }
8529 ac_res=$ac_cv_search_com_err
8530 if test "$ac_res" != no; then
8531   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8532
8533 else
8534   { { $as_echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
8535 $as_echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
8536    { (exit 1); exit 1; }; }
8537 fi
8538
8539      { $as_echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
8540 $as_echo_n "checking for library containing krb5_sendauth... " >&6; }
8541 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
8542   $as_echo_n "(cached) " >&6
8543 else
8544   ac_func_search_save_LIBS=$LIBS
8545 cat >conftest.$ac_ext <<_ACEOF
8546 /* confdefs.h.  */
8547 _ACEOF
8548 cat confdefs.h >>conftest.$ac_ext
8549 cat >>conftest.$ac_ext <<_ACEOF
8550 /* end confdefs.h.  */
8551
8552 /* Override any GCC internal prototype to avoid an error.
8553    Use char because int might match the return type of a GCC
8554    builtin and then its argument prototype would still apply.  */
8555 #ifdef __cplusplus
8556 extern "C"
8557 #endif
8558 char krb5_sendauth ();
8559 int
8560 main ()
8561 {
8562 return krb5_sendauth ();
8563   ;
8564   return 0;
8565 }
8566 _ACEOF
8567 for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'; do
8568   if test -z "$ac_lib"; then
8569     ac_res="none required"
8570   else
8571     ac_res=-l$ac_lib
8572     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8573   fi
8574   rm -f conftest.$ac_objext conftest$ac_exeext
8575 if { (ac_try="$ac_link"
8576 case "(($ac_try" in
8577   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8578   *) ac_try_echo=$ac_try;;
8579 esac
8580 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8581 $as_echo "$ac_try_echo") >&5
8582   (eval "$ac_link") 2>conftest.er1
8583   ac_status=$?
8584   grep -v '^ *+' conftest.er1 >conftest.err
8585   rm -f conftest.er1
8586   cat conftest.err >&5
8587   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8588   (exit $ac_status); } && {
8589          test -z "$ac_c_werror_flag" ||
8590          test ! -s conftest.err
8591        } && test -s conftest$ac_exeext && {
8592          test "$cross_compiling" = yes ||
8593          $as_test_x conftest$ac_exeext
8594        }; then
8595   ac_cv_search_krb5_sendauth=$ac_res
8596 else
8597   $as_echo "$as_me: failed program was:" >&5
8598 sed 's/^/| /' conftest.$ac_ext >&5
8599
8600
8601 fi
8602
8603 rm -rf conftest.dSYM
8604 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8605       conftest$ac_exeext
8606   if test "${ac_cv_search_krb5_sendauth+set}" = set; then
8607   break
8608 fi
8609 done
8610 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
8611   :
8612 else
8613   ac_cv_search_krb5_sendauth=no
8614 fi
8615 rm conftest.$ac_ext
8616 LIBS=$ac_func_search_save_LIBS
8617 fi
8618 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
8619 $as_echo "$ac_cv_search_krb5_sendauth" >&6; }
8620 ac_res=$ac_cv_search_krb5_sendauth
8621 if test "$ac_res" != no; then
8622   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8623
8624 else
8625   { { $as_echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
8626 $as_echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
8627    { (exit 1); exit 1; }; }
8628 fi
8629
8630   else
8631      { $as_echo "$as_me:$LINENO: checking for library containing com_err" >&5
8632 $as_echo_n "checking for library containing com_err... " >&6; }
8633 if test "${ac_cv_search_com_err+set}" = set; then
8634   $as_echo_n "(cached) " >&6
8635 else
8636   ac_func_search_save_LIBS=$LIBS
8637 cat >conftest.$ac_ext <<_ACEOF
8638 /* confdefs.h.  */
8639 _ACEOF
8640 cat confdefs.h >>conftest.$ac_ext
8641 cat >>conftest.$ac_ext <<_ACEOF
8642 /* end confdefs.h.  */
8643
8644 /* Override any GCC internal prototype to avoid an error.
8645    Use char because int might match the return type of a GCC
8646    builtin and then its argument prototype would still apply.  */
8647 #ifdef __cplusplus
8648 extern "C"
8649 #endif
8650 char com_err ();
8651 int
8652 main ()
8653 {
8654 return com_err ();
8655   ;
8656   return 0;
8657 }
8658 _ACEOF
8659 for ac_lib in '' 'comerr32 -lkrb5_32'; do
8660   if test -z "$ac_lib"; then
8661     ac_res="none required"
8662   else
8663     ac_res=-l$ac_lib
8664     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8665   fi
8666   rm -f conftest.$ac_objext conftest$ac_exeext
8667 if { (ac_try="$ac_link"
8668 case "(($ac_try" in
8669   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8670   *) ac_try_echo=$ac_try;;
8671 esac
8672 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8673 $as_echo "$ac_try_echo") >&5
8674   (eval "$ac_link") 2>conftest.er1
8675   ac_status=$?
8676   grep -v '^ *+' conftest.er1 >conftest.err
8677   rm -f conftest.er1
8678   cat conftest.err >&5
8679   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8680   (exit $ac_status); } && {
8681          test -z "$ac_c_werror_flag" ||
8682          test ! -s conftest.err
8683        } && test -s conftest$ac_exeext && {
8684          test "$cross_compiling" = yes ||
8685          $as_test_x conftest$ac_exeext
8686        }; then
8687   ac_cv_search_com_err=$ac_res
8688 else
8689   $as_echo "$as_me: failed program was:" >&5
8690 sed 's/^/| /' conftest.$ac_ext >&5
8691
8692
8693 fi
8694
8695 rm -rf conftest.dSYM
8696 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8697       conftest$ac_exeext
8698   if test "${ac_cv_search_com_err+set}" = set; then
8699   break
8700 fi
8701 done
8702 if test "${ac_cv_search_com_err+set}" = set; then
8703   :
8704 else
8705   ac_cv_search_com_err=no
8706 fi
8707 rm conftest.$ac_ext
8708 LIBS=$ac_func_search_save_LIBS
8709 fi
8710 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
8711 $as_echo "$ac_cv_search_com_err" >&6; }
8712 ac_res=$ac_cv_search_com_err
8713 if test "$ac_res" != no; then
8714   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8715
8716 else
8717   { { $as_echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
8718 $as_echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
8719    { (exit 1); exit 1; }; }
8720 fi
8721
8722   fi
8723 fi
8724
8725 if test "$with_openssl" = yes ; then
8726     if test "$PORTNAME" != "win32"; then
8727
8728 { $as_echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
8729 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
8730 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
8731   $as_echo_n "(cached) " >&6
8732 else
8733   ac_check_lib_save_LIBS=$LIBS
8734 LIBS="-lcrypto  $LIBS"
8735 cat >conftest.$ac_ext <<_ACEOF
8736 /* confdefs.h.  */
8737 _ACEOF
8738 cat confdefs.h >>conftest.$ac_ext
8739 cat >>conftest.$ac_ext <<_ACEOF
8740 /* end confdefs.h.  */
8741
8742 /* Override any GCC internal prototype to avoid an error.
8743    Use char because int might match the return type of a GCC
8744    builtin and then its argument prototype would still apply.  */
8745 #ifdef __cplusplus
8746 extern "C"
8747 #endif
8748 char CRYPTO_new_ex_data ();
8749 int
8750 main ()
8751 {
8752 return CRYPTO_new_ex_data ();
8753   ;
8754   return 0;
8755 }
8756 _ACEOF
8757 rm -f conftest.$ac_objext conftest$ac_exeext
8758 if { (ac_try="$ac_link"
8759 case "(($ac_try" in
8760   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8761   *) ac_try_echo=$ac_try;;
8762 esac
8763 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8764 $as_echo "$ac_try_echo") >&5
8765   (eval "$ac_link") 2>conftest.er1
8766   ac_status=$?
8767   grep -v '^ *+' conftest.er1 >conftest.err
8768   rm -f conftest.er1
8769   cat conftest.err >&5
8770   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8771   (exit $ac_status); } && {
8772          test -z "$ac_c_werror_flag" ||
8773          test ! -s conftest.err
8774        } && test -s conftest$ac_exeext && {
8775          test "$cross_compiling" = yes ||
8776          $as_test_x conftest$ac_exeext
8777        }; then
8778   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
8779 else
8780   $as_echo "$as_me: failed program was:" >&5
8781 sed 's/^/| /' conftest.$ac_ext >&5
8782
8783         ac_cv_lib_crypto_CRYPTO_new_ex_data=no
8784 fi
8785
8786 rm -rf conftest.dSYM
8787 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8788       conftest$ac_exeext conftest.$ac_ext
8789 LIBS=$ac_check_lib_save_LIBS
8790 fi
8791 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
8792 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
8793 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = x""yes; then
8794   cat >>confdefs.h <<_ACEOF
8795 #define HAVE_LIBCRYPTO 1
8796 _ACEOF
8797
8798   LIBS="-lcrypto $LIBS"
8799
8800 else
8801   { { $as_echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
8802 $as_echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
8803    { (exit 1); exit 1; }; }
8804 fi
8805
8806
8807 { $as_echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
8808 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
8809 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
8810   $as_echo_n "(cached) " >&6
8811 else
8812   ac_check_lib_save_LIBS=$LIBS
8813 LIBS="-lssl  $LIBS"
8814 cat >conftest.$ac_ext <<_ACEOF
8815 /* confdefs.h.  */
8816 _ACEOF
8817 cat confdefs.h >>conftest.$ac_ext
8818 cat >>conftest.$ac_ext <<_ACEOF
8819 /* end confdefs.h.  */
8820
8821 /* Override any GCC internal prototype to avoid an error.
8822    Use char because int might match the return type of a GCC
8823    builtin and then its argument prototype would still apply.  */
8824 #ifdef __cplusplus
8825 extern "C"
8826 #endif
8827 char SSL_library_init ();
8828 int
8829 main ()
8830 {
8831 return SSL_library_init ();
8832   ;
8833   return 0;
8834 }
8835 _ACEOF
8836 rm -f conftest.$ac_objext conftest$ac_exeext
8837 if { (ac_try="$ac_link"
8838 case "(($ac_try" in
8839   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8840   *) ac_try_echo=$ac_try;;
8841 esac
8842 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8843 $as_echo "$ac_try_echo") >&5
8844   (eval "$ac_link") 2>conftest.er1
8845   ac_status=$?
8846   grep -v '^ *+' conftest.er1 >conftest.err
8847   rm -f conftest.er1
8848   cat conftest.err >&5
8849   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8850   (exit $ac_status); } && {
8851          test -z "$ac_c_werror_flag" ||
8852          test ! -s conftest.err
8853        } && test -s conftest$ac_exeext && {
8854          test "$cross_compiling" = yes ||
8855          $as_test_x conftest$ac_exeext
8856        }; then
8857   ac_cv_lib_ssl_SSL_library_init=yes
8858 else
8859   $as_echo "$as_me: failed program was:" >&5
8860 sed 's/^/| /' conftest.$ac_ext >&5
8861
8862         ac_cv_lib_ssl_SSL_library_init=no
8863 fi
8864
8865 rm -rf conftest.dSYM
8866 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8867       conftest$ac_exeext conftest.$ac_ext
8868 LIBS=$ac_check_lib_save_LIBS
8869 fi
8870 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
8871 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
8872 if test "x$ac_cv_lib_ssl_SSL_library_init" = x""yes; then
8873   cat >>confdefs.h <<_ACEOF
8874 #define HAVE_LIBSSL 1
8875 _ACEOF
8876
8877   LIBS="-lssl $LIBS"
8878
8879 else
8880   { { $as_echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
8881 $as_echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
8882    { (exit 1); exit 1; }; }
8883 fi
8884
8885   else
8886
8887 { $as_echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -leay32" >&5
8888 $as_echo_n "checking for CRYPTO_new_ex_data in -leay32... " >&6; }
8889 if test "${ac_cv_lib_eay32_CRYPTO_new_ex_data+set}" = set; then
8890   $as_echo_n "(cached) " >&6
8891 else
8892   ac_check_lib_save_LIBS=$LIBS
8893 LIBS="-leay32  $LIBS"
8894 cat >conftest.$ac_ext <<_ACEOF
8895 /* confdefs.h.  */
8896 _ACEOF
8897 cat confdefs.h >>conftest.$ac_ext
8898 cat >>conftest.$ac_ext <<_ACEOF
8899 /* end confdefs.h.  */
8900
8901 /* Override any GCC internal prototype to avoid an error.
8902    Use char because int might match the return type of a GCC
8903    builtin and then its argument prototype would still apply.  */
8904 #ifdef __cplusplus
8905 extern "C"
8906 #endif
8907 char CRYPTO_new_ex_data ();
8908 int
8909 main ()
8910 {
8911 return CRYPTO_new_ex_data ();
8912   ;
8913   return 0;
8914 }
8915 _ACEOF
8916 rm -f conftest.$ac_objext conftest$ac_exeext
8917 if { (ac_try="$ac_link"
8918 case "(($ac_try" in
8919   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8920   *) ac_try_echo=$ac_try;;
8921 esac
8922 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8923 $as_echo "$ac_try_echo") >&5
8924   (eval "$ac_link") 2>conftest.er1
8925   ac_status=$?
8926   grep -v '^ *+' conftest.er1 >conftest.err
8927   rm -f conftest.er1
8928   cat conftest.err >&5
8929   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8930   (exit $ac_status); } && {
8931          test -z "$ac_c_werror_flag" ||
8932          test ! -s conftest.err
8933        } && test -s conftest$ac_exeext && {
8934          test "$cross_compiling" = yes ||
8935          $as_test_x conftest$ac_exeext
8936        }; then
8937   ac_cv_lib_eay32_CRYPTO_new_ex_data=yes
8938 else
8939   $as_echo "$as_me: failed program was:" >&5
8940 sed 's/^/| /' conftest.$ac_ext >&5
8941
8942         ac_cv_lib_eay32_CRYPTO_new_ex_data=no
8943 fi
8944
8945 rm -rf conftest.dSYM
8946 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8947       conftest$ac_exeext conftest.$ac_ext
8948 LIBS=$ac_check_lib_save_LIBS
8949 fi
8950 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_eay32_CRYPTO_new_ex_data" >&5
8951 $as_echo "$ac_cv_lib_eay32_CRYPTO_new_ex_data" >&6; }
8952 if test "x$ac_cv_lib_eay32_CRYPTO_new_ex_data" = x""yes; then
8953   cat >>confdefs.h <<_ACEOF
8954 #define HAVE_LIBEAY32 1
8955 _ACEOF
8956
8957   LIBS="-leay32 $LIBS"
8958
8959 else
8960   { { $as_echo "$as_me:$LINENO: error: library 'eay32' is required for OpenSSL" >&5
8961 $as_echo "$as_me: error: library 'eay32' is required for OpenSSL" >&2;}
8962    { (exit 1); exit 1; }; }
8963 fi
8964
8965
8966 { $as_echo "$as_me:$LINENO: checking for SSL_library_init in -lssleay32" >&5
8967 $as_echo_n "checking for SSL_library_init in -lssleay32... " >&6; }
8968 if test "${ac_cv_lib_ssleay32_SSL_library_init+set}" = set; then
8969   $as_echo_n "(cached) " >&6
8970 else
8971   ac_check_lib_save_LIBS=$LIBS
8972 LIBS="-lssleay32  $LIBS"
8973 cat >conftest.$ac_ext <<_ACEOF
8974 /* confdefs.h.  */
8975 _ACEOF
8976 cat confdefs.h >>conftest.$ac_ext
8977 cat >>conftest.$ac_ext <<_ACEOF
8978 /* end confdefs.h.  */
8979
8980 /* Override any GCC internal prototype to avoid an error.
8981    Use char because int might match the return type of a GCC
8982    builtin and then its argument prototype would still apply.  */
8983 #ifdef __cplusplus
8984 extern "C"
8985 #endif
8986 char SSL_library_init ();
8987 int
8988 main ()
8989 {
8990 return SSL_library_init ();
8991   ;
8992   return 0;
8993 }
8994 _ACEOF
8995 rm -f conftest.$ac_objext conftest$ac_exeext
8996 if { (ac_try="$ac_link"
8997 case "(($ac_try" in
8998   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8999   *) ac_try_echo=$ac_try;;
9000 esac
9001 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9002 $as_echo "$ac_try_echo") >&5
9003   (eval "$ac_link") 2>conftest.er1
9004   ac_status=$?
9005   grep -v '^ *+' conftest.er1 >conftest.err
9006   rm -f conftest.er1
9007   cat conftest.err >&5
9008   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9009   (exit $ac_status); } && {
9010          test -z "$ac_c_werror_flag" ||
9011          test ! -s conftest.err
9012        } && test -s conftest$ac_exeext && {
9013          test "$cross_compiling" = yes ||
9014          $as_test_x conftest$ac_exeext
9015        }; then
9016   ac_cv_lib_ssleay32_SSL_library_init=yes
9017 else
9018   $as_echo "$as_me: failed program was:" >&5
9019 sed 's/^/| /' conftest.$ac_ext >&5
9020
9021         ac_cv_lib_ssleay32_SSL_library_init=no
9022 fi
9023
9024 rm -rf conftest.dSYM
9025 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9026       conftest$ac_exeext conftest.$ac_ext
9027 LIBS=$ac_check_lib_save_LIBS
9028 fi
9029 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ssleay32_SSL_library_init" >&5
9030 $as_echo "$ac_cv_lib_ssleay32_SSL_library_init" >&6; }
9031 if test "x$ac_cv_lib_ssleay32_SSL_library_init" = x""yes; then
9032   cat >>confdefs.h <<_ACEOF
9033 #define HAVE_LIBSSLEAY32 1
9034 _ACEOF
9035
9036   LIBS="-lssleay32 $LIBS"
9037
9038 else
9039   { { $as_echo "$as_me:$LINENO: error: library 'ssleay32' is required for OpenSSL" >&5
9040 $as_echo "$as_me: error: library 'ssleay32' is required for OpenSSL" >&2;}
9041    { (exit 1); exit 1; }; }
9042 fi
9043
9044   fi
9045 fi
9046
9047 if test "$with_pam" = yes ; then
9048
9049 { $as_echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
9050 $as_echo_n "checking for pam_start in -lpam... " >&6; }
9051 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
9052   $as_echo_n "(cached) " >&6
9053 else
9054   ac_check_lib_save_LIBS=$LIBS
9055 LIBS="-lpam  $LIBS"
9056 cat >conftest.$ac_ext <<_ACEOF
9057 /* confdefs.h.  */
9058 _ACEOF
9059 cat confdefs.h >>conftest.$ac_ext
9060 cat >>conftest.$ac_ext <<_ACEOF
9061 /* end confdefs.h.  */
9062
9063 /* Override any GCC internal prototype to avoid an error.
9064    Use char because int might match the return type of a GCC
9065    builtin and then its argument prototype would still apply.  */
9066 #ifdef __cplusplus
9067 extern "C"
9068 #endif
9069 char pam_start ();
9070 int
9071 main ()
9072 {
9073 return pam_start ();
9074   ;
9075   return 0;
9076 }
9077 _ACEOF
9078 rm -f conftest.$ac_objext conftest$ac_exeext
9079 if { (ac_try="$ac_link"
9080 case "(($ac_try" in
9081   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9082   *) ac_try_echo=$ac_try;;
9083 esac
9084 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9085 $as_echo "$ac_try_echo") >&5
9086   (eval "$ac_link") 2>conftest.er1
9087   ac_status=$?
9088   grep -v '^ *+' conftest.er1 >conftest.err
9089   rm -f conftest.er1
9090   cat conftest.err >&5
9091   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9092   (exit $ac_status); } && {
9093          test -z "$ac_c_werror_flag" ||
9094          test ! -s conftest.err
9095        } && test -s conftest$ac_exeext && {
9096          test "$cross_compiling" = yes ||
9097          $as_test_x conftest$ac_exeext
9098        }; then
9099   ac_cv_lib_pam_pam_start=yes
9100 else
9101   $as_echo "$as_me: failed program was:" >&5
9102 sed 's/^/| /' conftest.$ac_ext >&5
9103
9104         ac_cv_lib_pam_pam_start=no
9105 fi
9106
9107 rm -rf conftest.dSYM
9108 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9109       conftest$ac_exeext conftest.$ac_ext
9110 LIBS=$ac_check_lib_save_LIBS
9111 fi
9112 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
9113 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
9114 if test "x$ac_cv_lib_pam_pam_start" = x""yes; then
9115   cat >>confdefs.h <<_ACEOF
9116 #define HAVE_LIBPAM 1
9117 _ACEOF
9118
9119   LIBS="-lpam $LIBS"
9120
9121 else
9122   { { $as_echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
9123 $as_echo "$as_me: error: library 'pam' is required for PAM" >&2;}
9124    { (exit 1); exit 1; }; }
9125 fi
9126
9127 fi
9128
9129 if test "$with_libxml" = yes ; then
9130
9131 { $as_echo "$as_me:$LINENO: checking for xmlSaveToBuffer in -lxml2" >&5
9132 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
9133 if test "${ac_cv_lib_xml2_xmlSaveToBuffer+set}" = set; then
9134   $as_echo_n "(cached) " >&6
9135 else
9136   ac_check_lib_save_LIBS=$LIBS
9137 LIBS="-lxml2  $LIBS"
9138 cat >conftest.$ac_ext <<_ACEOF
9139 /* confdefs.h.  */
9140 _ACEOF
9141 cat confdefs.h >>conftest.$ac_ext
9142 cat >>conftest.$ac_ext <<_ACEOF
9143 /* end confdefs.h.  */
9144
9145 /* Override any GCC internal prototype to avoid an error.
9146    Use char because int might match the return type of a GCC
9147    builtin and then its argument prototype would still apply.  */
9148 #ifdef __cplusplus
9149 extern "C"
9150 #endif
9151 char xmlSaveToBuffer ();
9152 int
9153 main ()
9154 {
9155 return xmlSaveToBuffer ();
9156   ;
9157   return 0;
9158 }
9159 _ACEOF
9160 rm -f conftest.$ac_objext conftest$ac_exeext
9161 if { (ac_try="$ac_link"
9162 case "(($ac_try" in
9163   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9164   *) ac_try_echo=$ac_try;;
9165 esac
9166 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9167 $as_echo "$ac_try_echo") >&5
9168   (eval "$ac_link") 2>conftest.er1
9169   ac_status=$?
9170   grep -v '^ *+' conftest.er1 >conftest.err
9171   rm -f conftest.er1
9172   cat conftest.err >&5
9173   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9174   (exit $ac_status); } && {
9175          test -z "$ac_c_werror_flag" ||
9176          test ! -s conftest.err
9177        } && test -s conftest$ac_exeext && {
9178          test "$cross_compiling" = yes ||
9179          $as_test_x conftest$ac_exeext
9180        }; then
9181   ac_cv_lib_xml2_xmlSaveToBuffer=yes
9182 else
9183   $as_echo "$as_me: failed program was:" >&5
9184 sed 's/^/| /' conftest.$ac_ext >&5
9185
9186         ac_cv_lib_xml2_xmlSaveToBuffer=no
9187 fi
9188
9189 rm -rf conftest.dSYM
9190 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9191       conftest$ac_exeext conftest.$ac_ext
9192 LIBS=$ac_check_lib_save_LIBS
9193 fi
9194 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
9195 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
9196 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = x""yes; then
9197   cat >>confdefs.h <<_ACEOF
9198 #define HAVE_LIBXML2 1
9199 _ACEOF
9200
9201   LIBS="-lxml2 $LIBS"
9202
9203 else
9204   { { $as_echo "$as_me:$LINENO: error: library 'xml2' (version >= 2.6.23) is required for XML support" >&5
9205 $as_echo "$as_me: error: library 'xml2' (version >= 2.6.23) is required for XML support" >&2;}
9206    { (exit 1); exit 1; }; }
9207 fi
9208
9209 fi
9210
9211 if test "$with_libxslt" = yes ; then
9212
9213 { $as_echo "$as_me:$LINENO: checking for xsltCleanupGlobals in -lxslt" >&5
9214 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
9215 if test "${ac_cv_lib_xslt_xsltCleanupGlobals+set}" = set; then
9216   $as_echo_n "(cached) " >&6
9217 else
9218   ac_check_lib_save_LIBS=$LIBS
9219 LIBS="-lxslt  $LIBS"
9220 cat >conftest.$ac_ext <<_ACEOF
9221 /* confdefs.h.  */
9222 _ACEOF
9223 cat confdefs.h >>conftest.$ac_ext
9224 cat >>conftest.$ac_ext <<_ACEOF
9225 /* end confdefs.h.  */
9226
9227 /* Override any GCC internal prototype to avoid an error.
9228    Use char because int might match the return type of a GCC
9229    builtin and then its argument prototype would still apply.  */
9230 #ifdef __cplusplus
9231 extern "C"
9232 #endif
9233 char xsltCleanupGlobals ();
9234 int
9235 main ()
9236 {
9237 return xsltCleanupGlobals ();
9238   ;
9239   return 0;
9240 }
9241 _ACEOF
9242 rm -f conftest.$ac_objext conftest$ac_exeext
9243 if { (ac_try="$ac_link"
9244 case "(($ac_try" in
9245   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9246   *) ac_try_echo=$ac_try;;
9247 esac
9248 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9249 $as_echo "$ac_try_echo") >&5
9250   (eval "$ac_link") 2>conftest.er1
9251   ac_status=$?
9252   grep -v '^ *+' conftest.er1 >conftest.err
9253   rm -f conftest.er1
9254   cat conftest.err >&5
9255   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9256   (exit $ac_status); } && {
9257          test -z "$ac_c_werror_flag" ||
9258          test ! -s conftest.err
9259        } && test -s conftest$ac_exeext && {
9260          test "$cross_compiling" = yes ||
9261          $as_test_x conftest$ac_exeext
9262        }; then
9263   ac_cv_lib_xslt_xsltCleanupGlobals=yes
9264 else
9265   $as_echo "$as_me: failed program was:" >&5
9266 sed 's/^/| /' conftest.$ac_ext >&5
9267
9268         ac_cv_lib_xslt_xsltCleanupGlobals=no
9269 fi
9270
9271 rm -rf conftest.dSYM
9272 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9273       conftest$ac_exeext conftest.$ac_ext
9274 LIBS=$ac_check_lib_save_LIBS
9275 fi
9276 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
9277 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
9278 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = x""yes; then
9279   cat >>confdefs.h <<_ACEOF
9280 #define HAVE_LIBXSLT 1
9281 _ACEOF
9282
9283   LIBS="-lxslt $LIBS"
9284
9285 else
9286   { { $as_echo "$as_me:$LINENO: error: library 'xslt' is required for XSLT support" >&5
9287 $as_echo "$as_me: error: library 'xslt' is required for XSLT support" >&2;}
9288    { (exit 1); exit 1; }; }
9289 fi
9290
9291 fi
9292
9293 # for contrib/uuid-ossp
9294 if test "$with_ossp_uuid" = yes ; then
9295   { $as_echo "$as_me:$LINENO: checking for uuid_export in -lossp-uuid" >&5
9296 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
9297 if test "${ac_cv_lib_ossp_uuid_uuid_export+set}" = set; then
9298   $as_echo_n "(cached) " >&6
9299 else
9300   ac_check_lib_save_LIBS=$LIBS
9301 LIBS="-lossp-uuid  $LIBS"
9302 cat >conftest.$ac_ext <<_ACEOF
9303 /* confdefs.h.  */
9304 _ACEOF
9305 cat confdefs.h >>conftest.$ac_ext
9306 cat >>conftest.$ac_ext <<_ACEOF
9307 /* end confdefs.h.  */
9308
9309 /* Override any GCC internal prototype to avoid an error.
9310    Use char because int might match the return type of a GCC
9311    builtin and then its argument prototype would still apply.  */
9312 #ifdef __cplusplus
9313 extern "C"
9314 #endif
9315 char uuid_export ();
9316 int
9317 main ()
9318 {
9319 return uuid_export ();
9320   ;
9321   return 0;
9322 }
9323 _ACEOF
9324 rm -f conftest.$ac_objext conftest$ac_exeext
9325 if { (ac_try="$ac_link"
9326 case "(($ac_try" in
9327   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9328   *) ac_try_echo=$ac_try;;
9329 esac
9330 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9331 $as_echo "$ac_try_echo") >&5
9332   (eval "$ac_link") 2>conftest.er1
9333   ac_status=$?
9334   grep -v '^ *+' conftest.er1 >conftest.err
9335   rm -f conftest.er1
9336   cat conftest.err >&5
9337   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9338   (exit $ac_status); } && {
9339          test -z "$ac_c_werror_flag" ||
9340          test ! -s conftest.err
9341        } && test -s conftest$ac_exeext && {
9342          test "$cross_compiling" = yes ||
9343          $as_test_x conftest$ac_exeext
9344        }; then
9345   ac_cv_lib_ossp_uuid_uuid_export=yes
9346 else
9347   $as_echo "$as_me: failed program was:" >&5
9348 sed 's/^/| /' conftest.$ac_ext >&5
9349
9350         ac_cv_lib_ossp_uuid_uuid_export=no
9351 fi
9352
9353 rm -rf conftest.dSYM
9354 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9355       conftest$ac_exeext conftest.$ac_ext
9356 LIBS=$ac_check_lib_save_LIBS
9357 fi
9358 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
9359 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
9360 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = x""yes; then
9361   OSSP_UUID_LIBS="-lossp-uuid"
9362 else
9363   { $as_echo "$as_me:$LINENO: checking for uuid_export in -luuid" >&5
9364 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
9365 if test "${ac_cv_lib_uuid_uuid_export+set}" = set; then
9366   $as_echo_n "(cached) " >&6
9367 else
9368   ac_check_lib_save_LIBS=$LIBS
9369 LIBS="-luuid  $LIBS"
9370 cat >conftest.$ac_ext <<_ACEOF
9371 /* confdefs.h.  */
9372 _ACEOF
9373 cat confdefs.h >>conftest.$ac_ext
9374 cat >>conftest.$ac_ext <<_ACEOF
9375 /* end confdefs.h.  */
9376
9377 /* Override any GCC internal prototype to avoid an error.
9378    Use char because int might match the return type of a GCC
9379    builtin and then its argument prototype would still apply.  */
9380 #ifdef __cplusplus
9381 extern "C"
9382 #endif
9383 char uuid_export ();
9384 int
9385 main ()
9386 {
9387 return uuid_export ();
9388   ;
9389   return 0;
9390 }
9391 _ACEOF
9392 rm -f conftest.$ac_objext conftest$ac_exeext
9393 if { (ac_try="$ac_link"
9394 case "(($ac_try" in
9395   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9396   *) ac_try_echo=$ac_try;;
9397 esac
9398 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9399 $as_echo "$ac_try_echo") >&5
9400   (eval "$ac_link") 2>conftest.er1
9401   ac_status=$?
9402   grep -v '^ *+' conftest.er1 >conftest.err
9403   rm -f conftest.er1
9404   cat conftest.err >&5
9405   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9406   (exit $ac_status); } && {
9407          test -z "$ac_c_werror_flag" ||
9408          test ! -s conftest.err
9409        } && test -s conftest$ac_exeext && {
9410          test "$cross_compiling" = yes ||
9411          $as_test_x conftest$ac_exeext
9412        }; then
9413   ac_cv_lib_uuid_uuid_export=yes
9414 else
9415   $as_echo "$as_me: failed program was:" >&5
9416 sed 's/^/| /' conftest.$ac_ext >&5
9417
9418         ac_cv_lib_uuid_uuid_export=no
9419 fi
9420
9421 rm -rf conftest.dSYM
9422 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9423       conftest$ac_exeext conftest.$ac_ext
9424 LIBS=$ac_check_lib_save_LIBS
9425 fi
9426 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_export" >&5
9427 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
9428 if test "x$ac_cv_lib_uuid_uuid_export" = x""yes; then
9429   OSSP_UUID_LIBS="-luuid"
9430 else
9431   { { $as_echo "$as_me:$LINENO: error: library 'ossp-uuid' or 'uuid' is required for OSSP-UUID" >&5
9432 $as_echo "$as_me: error: library 'ossp-uuid' or 'uuid' is required for OSSP-UUID" >&2;}
9433    { (exit 1); exit 1; }; }
9434 fi
9435
9436 fi
9437
9438 fi
9439
9440
9441
9442 ##
9443 ## Header files
9444 ##
9445
9446 { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
9447 $as_echo_n "checking for ANSI C header files... " >&6; }
9448 if test "${ac_cv_header_stdc+set}" = set; then
9449   $as_echo_n "(cached) " >&6
9450 else
9451   cat >conftest.$ac_ext <<_ACEOF
9452 /* confdefs.h.  */
9453 _ACEOF
9454 cat confdefs.h >>conftest.$ac_ext
9455 cat >>conftest.$ac_ext <<_ACEOF
9456 /* end confdefs.h.  */
9457 #include <stdlib.h>
9458 #include <stdarg.h>
9459 #include <string.h>
9460 #include <float.h>
9461
9462 int
9463 main ()
9464 {
9465
9466   ;
9467   return 0;
9468 }
9469 _ACEOF
9470 rm -f conftest.$ac_objext
9471 if { (ac_try="$ac_compile"
9472 case "(($ac_try" in
9473   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9474   *) ac_try_echo=$ac_try;;
9475 esac
9476 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9477 $as_echo "$ac_try_echo") >&5
9478   (eval "$ac_compile") 2>conftest.er1
9479   ac_status=$?
9480   grep -v '^ *+' conftest.er1 >conftest.err
9481   rm -f conftest.er1
9482   cat conftest.err >&5
9483   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9484   (exit $ac_status); } && {
9485          test -z "$ac_c_werror_flag" ||
9486          test ! -s conftest.err
9487        } && test -s conftest.$ac_objext; then
9488   ac_cv_header_stdc=yes
9489 else
9490   $as_echo "$as_me: failed program was:" >&5
9491 sed 's/^/| /' conftest.$ac_ext >&5
9492
9493         ac_cv_header_stdc=no
9494 fi
9495
9496 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9497
9498 if test $ac_cv_header_stdc = yes; then
9499   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9500   cat >conftest.$ac_ext <<_ACEOF
9501 /* confdefs.h.  */
9502 _ACEOF
9503 cat confdefs.h >>conftest.$ac_ext
9504 cat >>conftest.$ac_ext <<_ACEOF
9505 /* end confdefs.h.  */
9506 #include <string.h>
9507
9508 _ACEOF
9509 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9510   $EGREP "memchr" >/dev/null 2>&1; then
9511   :
9512 else
9513   ac_cv_header_stdc=no
9514 fi
9515 rm -f conftest*
9516
9517 fi
9518
9519 if test $ac_cv_header_stdc = yes; then
9520   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9521   cat >conftest.$ac_ext <<_ACEOF
9522 /* confdefs.h.  */
9523 _ACEOF
9524 cat confdefs.h >>conftest.$ac_ext
9525 cat >>conftest.$ac_ext <<_ACEOF
9526 /* end confdefs.h.  */
9527 #include <stdlib.h>
9528
9529 _ACEOF
9530 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9531   $EGREP "free" >/dev/null 2>&1; then
9532   :
9533 else
9534   ac_cv_header_stdc=no
9535 fi
9536 rm -f conftest*
9537
9538 fi
9539
9540 if test $ac_cv_header_stdc = yes; then
9541   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9542   if test "$cross_compiling" = yes; then
9543   :
9544 else
9545   cat >conftest.$ac_ext <<_ACEOF
9546 /* confdefs.h.  */
9547 _ACEOF
9548 cat confdefs.h >>conftest.$ac_ext
9549 cat >>conftest.$ac_ext <<_ACEOF
9550 /* end confdefs.h.  */
9551 #include <ctype.h>
9552 #include <stdlib.h>
9553 #if ((' ' & 0x0FF) == 0x020)
9554 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9555 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9556 #else
9557 # define ISLOWER(c) \
9558                    (('a' <= (c) && (c) <= 'i') \
9559                      || ('j' <= (c) && (c) <= 'r') \
9560                      || ('s' <= (c) && (c) <= 'z'))
9561 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9562 #endif
9563
9564 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9565 int
9566 main ()
9567 {
9568   int i;
9569   for (i = 0; i < 256; i++)
9570     if (XOR (islower (i), ISLOWER (i))
9571         || toupper (i) != TOUPPER (i))
9572       return 2;
9573   return 0;
9574 }
9575 _ACEOF
9576 rm -f conftest$ac_exeext
9577 if { (ac_try="$ac_link"
9578 case "(($ac_try" in
9579   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9580   *) ac_try_echo=$ac_try;;
9581 esac
9582 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9583 $as_echo "$ac_try_echo") >&5
9584   (eval "$ac_link") 2>&5
9585   ac_status=$?
9586   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9587   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9588   { (case "(($ac_try" in
9589   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9590   *) ac_try_echo=$ac_try;;
9591 esac
9592 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9593 $as_echo "$ac_try_echo") >&5
9594   (eval "$ac_try") 2>&5
9595   ac_status=$?
9596   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9597   (exit $ac_status); }; }; then
9598   :
9599 else
9600   $as_echo "$as_me: program exited with status $ac_status" >&5
9601 $as_echo "$as_me: failed program was:" >&5
9602 sed 's/^/| /' conftest.$ac_ext >&5
9603
9604 ( exit $ac_status )
9605 ac_cv_header_stdc=no
9606 fi
9607 rm -rf conftest.dSYM
9608 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9609 fi
9610
9611
9612 fi
9613 fi
9614 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
9615 $as_echo "$ac_cv_header_stdc" >&6; }
9616 if test $ac_cv_header_stdc = yes; then
9617
9618 cat >>confdefs.h <<\_ACEOF
9619 #define STDC_HEADERS 1
9620 _ACEOF
9621
9622 fi
9623
9624 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9635                   inttypes.h stdint.h unistd.h
9636 do
9637 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9638 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
9639 $as_echo_n "checking for $ac_header... " >&6; }
9640 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9641   $as_echo_n "(cached) " >&6
9642 else
9643   cat >conftest.$ac_ext <<_ACEOF
9644 /* confdefs.h.  */
9645 _ACEOF
9646 cat confdefs.h >>conftest.$ac_ext
9647 cat >>conftest.$ac_ext <<_ACEOF
9648 /* end confdefs.h.  */
9649 $ac_includes_default
9650
9651 #include <$ac_header>
9652 _ACEOF
9653 rm -f conftest.$ac_objext
9654 if { (ac_try="$ac_compile"
9655 case "(($ac_try" in
9656   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9657   *) ac_try_echo=$ac_try;;
9658 esac
9659 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9660 $as_echo "$ac_try_echo") >&5
9661   (eval "$ac_compile") 2>conftest.er1
9662   ac_status=$?
9663   grep -v '^ *+' conftest.er1 >conftest.err
9664   rm -f conftest.er1
9665   cat conftest.err >&5
9666   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9667   (exit $ac_status); } && {
9668          test -z "$ac_c_werror_flag" ||
9669          test ! -s conftest.err
9670        } && test -s conftest.$ac_objext; then
9671   eval "$as_ac_Header=yes"
9672 else
9673   $as_echo "$as_me: failed program was:" >&5
9674 sed 's/^/| /' conftest.$ac_ext >&5
9675
9676         eval "$as_ac_Header=no"
9677 fi
9678
9679 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9680 fi
9681 ac_res=`eval 'as_val=${'$as_ac_Header'}
9682                  $as_echo "$as_val"'`
9683                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9684 $as_echo "$ac_res" >&6; }
9685 as_val=`eval 'as_val=${'$as_ac_Header'}
9686                  $as_echo "$as_val"'`
9687    if test "x$as_val" = x""yes; then
9688   cat >>confdefs.h <<_ACEOF
9689 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9690 _ACEOF
9691
9692 fi
9693
9694 done
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727 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/un.h termios.h ucred.h utime.h wchar.h wctype.h kernel/OS.h kernel/image.h SupportDefs.h
9728 do
9729 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9730 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9731   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
9732 $as_echo_n "checking for $ac_header... " >&6; }
9733 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9734   $as_echo_n "(cached) " >&6
9735 fi
9736 ac_res=`eval 'as_val=${'$as_ac_Header'}
9737                  $as_echo "$as_val"'`
9738                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9739 $as_echo "$ac_res" >&6; }
9740 else
9741   # Is the header compilable?
9742 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
9743 $as_echo_n "checking $ac_header usability... " >&6; }
9744 cat >conftest.$ac_ext <<_ACEOF
9745 /* confdefs.h.  */
9746 _ACEOF
9747 cat confdefs.h >>conftest.$ac_ext
9748 cat >>conftest.$ac_ext <<_ACEOF
9749 /* end confdefs.h.  */
9750 $ac_includes_default
9751 #include <$ac_header>
9752 _ACEOF
9753 rm -f conftest.$ac_objext
9754 if { (ac_try="$ac_compile"
9755 case "(($ac_try" in
9756   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9757   *) ac_try_echo=$ac_try;;
9758 esac
9759 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9760 $as_echo "$ac_try_echo") >&5
9761   (eval "$ac_compile") 2>conftest.er1
9762   ac_status=$?
9763   grep -v '^ *+' conftest.er1 >conftest.err
9764   rm -f conftest.er1
9765   cat conftest.err >&5
9766   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9767   (exit $ac_status); } && {
9768          test -z "$ac_c_werror_flag" ||
9769          test ! -s conftest.err
9770        } && test -s conftest.$ac_objext; then
9771   ac_header_compiler=yes
9772 else
9773   $as_echo "$as_me: failed program was:" >&5
9774 sed 's/^/| /' conftest.$ac_ext >&5
9775
9776         ac_header_compiler=no
9777 fi
9778
9779 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9780 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9781 $as_echo "$ac_header_compiler" >&6; }
9782
9783 # Is the header present?
9784 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
9785 $as_echo_n "checking $ac_header presence... " >&6; }
9786 cat >conftest.$ac_ext <<_ACEOF
9787 /* confdefs.h.  */
9788 _ACEOF
9789 cat confdefs.h >>conftest.$ac_ext
9790 cat >>conftest.$ac_ext <<_ACEOF
9791 /* end confdefs.h.  */
9792 #include <$ac_header>
9793 _ACEOF
9794 if { (ac_try="$ac_cpp conftest.$ac_ext"
9795 case "(($ac_try" in
9796   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9797   *) ac_try_echo=$ac_try;;
9798 esac
9799 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9800 $as_echo "$ac_try_echo") >&5
9801   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9802   ac_status=$?
9803   grep -v '^ *+' conftest.er1 >conftest.err
9804   rm -f conftest.er1
9805   cat conftest.err >&5
9806   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9807   (exit $ac_status); } >/dev/null && {
9808          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9809          test ! -s conftest.err
9810        }; then
9811   ac_header_preproc=yes
9812 else
9813   $as_echo "$as_me: failed program was:" >&5
9814 sed 's/^/| /' conftest.$ac_ext >&5
9815
9816   ac_header_preproc=no
9817 fi
9818
9819 rm -f conftest.err conftest.$ac_ext
9820 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9821 $as_echo "$ac_header_preproc" >&6; }
9822
9823 # So?  What about this header?
9824 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9825   yes:no: )
9826     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9827 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9828     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9829 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9830     ac_header_preproc=yes
9831     ;;
9832   no:yes:* )
9833     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9834 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9835     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9836 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9837     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9838 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9839     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9840 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9841     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9842 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9843     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9844 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9845     ( cat <<\_ASBOX
9846 ## ---------------------------------------- ##
9847 ## Report this to pgsql-bugs@postgresql.org ##
9848 ## ---------------------------------------- ##
9849 _ASBOX
9850      ) | sed "s/^/$as_me: WARNING:     /" >&2
9851     ;;
9852 esac
9853 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
9854 $as_echo_n "checking for $ac_header... " >&6; }
9855 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9856   $as_echo_n "(cached) " >&6
9857 else
9858   eval "$as_ac_Header=\$ac_header_preproc"
9859 fi
9860 ac_res=`eval 'as_val=${'$as_ac_Header'}
9861                  $as_echo "$as_val"'`
9862                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9863 $as_echo "$ac_res" >&6; }
9864
9865 fi
9866 as_val=`eval 'as_val=${'$as_ac_Header'}
9867                  $as_echo "$as_val"'`
9868    if test "x$as_val" = x""yes; then
9869   cat >>confdefs.h <<_ACEOF
9870 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9871 _ACEOF
9872
9873 fi
9874
9875 done
9876
9877
9878 # On BSD, cpp test for net/if.h will fail unless sys/socket.h
9879 # is included first.
9880
9881 for ac_header in net/if.h
9882 do
9883 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9884 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
9885 $as_echo_n "checking for $ac_header... " >&6; }
9886 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9887   $as_echo_n "(cached) " >&6
9888 else
9889   cat >conftest.$ac_ext <<_ACEOF
9890 /* confdefs.h.  */
9891 _ACEOF
9892 cat confdefs.h >>conftest.$ac_ext
9893 cat >>conftest.$ac_ext <<_ACEOF
9894 /* end confdefs.h.  */
9895 $ac_includes_default
9896 #ifdef HAVE_SYS_SOCKET_H
9897 #include <sys/socket.h>
9898 #endif
9899
9900
9901 #include <$ac_header>
9902 _ACEOF
9903 rm -f conftest.$ac_objext
9904 if { (ac_try="$ac_compile"
9905 case "(($ac_try" in
9906   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9907   *) ac_try_echo=$ac_try;;
9908 esac
9909 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9910 $as_echo "$ac_try_echo") >&5
9911   (eval "$ac_compile") 2>conftest.er1
9912   ac_status=$?
9913   grep -v '^ *+' conftest.er1 >conftest.err
9914   rm -f conftest.er1
9915   cat conftest.err >&5
9916   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9917   (exit $ac_status); } && {
9918          test -z "$ac_c_werror_flag" ||
9919          test ! -s conftest.err
9920        } && test -s conftest.$ac_objext; then
9921   eval "$as_ac_Header=yes"
9922 else
9923   $as_echo "$as_me: failed program was:" >&5
9924 sed 's/^/| /' conftest.$ac_ext >&5
9925
9926         eval "$as_ac_Header=no"
9927 fi
9928
9929 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9930 fi
9931 ac_res=`eval 'as_val=${'$as_ac_Header'}
9932                  $as_echo "$as_val"'`
9933                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9934 $as_echo "$ac_res" >&6; }
9935 as_val=`eval 'as_val=${'$as_ac_Header'}
9936                  $as_echo "$as_val"'`
9937    if test "x$as_val" = x""yes; then
9938   cat >>confdefs.h <<_ACEOF
9939 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9940 _ACEOF
9941
9942 fi
9943
9944 done
9945
9946
9947 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
9948 # netinet/in.h is included first.
9949
9950 for ac_header in netinet/in.h
9951 do
9952 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9953 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9954   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
9955 $as_echo_n "checking for $ac_header... " >&6; }
9956 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9957   $as_echo_n "(cached) " >&6
9958 fi
9959 ac_res=`eval 'as_val=${'$as_ac_Header'}
9960                  $as_echo "$as_val"'`
9961                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9962 $as_echo "$ac_res" >&6; }
9963 else
9964   # Is the header compilable?
9965 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
9966 $as_echo_n "checking $ac_header usability... " >&6; }
9967 cat >conftest.$ac_ext <<_ACEOF
9968 /* confdefs.h.  */
9969 _ACEOF
9970 cat confdefs.h >>conftest.$ac_ext
9971 cat >>conftest.$ac_ext <<_ACEOF
9972 /* end confdefs.h.  */
9973 $ac_includes_default
9974 #include <$ac_header>
9975 _ACEOF
9976 rm -f conftest.$ac_objext
9977 if { (ac_try="$ac_compile"
9978 case "(($ac_try" in
9979   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9980   *) ac_try_echo=$ac_try;;
9981 esac
9982 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9983 $as_echo "$ac_try_echo") >&5
9984   (eval "$ac_compile") 2>conftest.er1
9985   ac_status=$?
9986   grep -v '^ *+' conftest.er1 >conftest.err
9987   rm -f conftest.er1
9988   cat conftest.err >&5
9989   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9990   (exit $ac_status); } && {
9991          test -z "$ac_c_werror_flag" ||
9992          test ! -s conftest.err
9993        } && test -s conftest.$ac_objext; then
9994   ac_header_compiler=yes
9995 else
9996   $as_echo "$as_me: failed program was:" >&5
9997 sed 's/^/| /' conftest.$ac_ext >&5
9998
9999         ac_header_compiler=no
10000 fi
10001
10002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10003 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10004 $as_echo "$ac_header_compiler" >&6; }
10005
10006 # Is the header present?
10007 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
10008 $as_echo_n "checking $ac_header presence... " >&6; }
10009 cat >conftest.$ac_ext <<_ACEOF
10010 /* confdefs.h.  */
10011 _ACEOF
10012 cat confdefs.h >>conftest.$ac_ext
10013 cat >>conftest.$ac_ext <<_ACEOF
10014 /* end confdefs.h.  */
10015 #include <$ac_header>
10016 _ACEOF
10017 if { (ac_try="$ac_cpp conftest.$ac_ext"
10018 case "(($ac_try" in
10019   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10020   *) ac_try_echo=$ac_try;;
10021 esac
10022 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10023 $as_echo "$ac_try_echo") >&5
10024   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10025   ac_status=$?
10026   grep -v '^ *+' conftest.er1 >conftest.err
10027   rm -f conftest.er1
10028   cat conftest.err >&5
10029   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10030   (exit $ac_status); } >/dev/null && {
10031          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10032          test ! -s conftest.err
10033        }; then
10034   ac_header_preproc=yes
10035 else
10036   $as_echo "$as_me: failed program was:" >&5
10037 sed 's/^/| /' conftest.$ac_ext >&5
10038
10039   ac_header_preproc=no
10040 fi
10041
10042 rm -f conftest.err conftest.$ac_ext
10043 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10044 $as_echo "$ac_header_preproc" >&6; }
10045
10046 # So?  What about this header?
10047 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10048   yes:no: )
10049     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10050 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10051     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10052 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10053     ac_header_preproc=yes
10054     ;;
10055   no:yes:* )
10056     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10057 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10058     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10059 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10060     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10061 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10062     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10063 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10064     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10065 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10066     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10067 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10068     ( cat <<\_ASBOX
10069 ## ---------------------------------------- ##
10070 ## Report this to pgsql-bugs@postgresql.org ##
10071 ## ---------------------------------------- ##
10072 _ASBOX
10073      ) | sed "s/^/$as_me: WARNING:     /" >&2
10074     ;;
10075 esac
10076 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10077 $as_echo_n "checking for $ac_header... " >&6; }
10078 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10079   $as_echo_n "(cached) " >&6
10080 else
10081   eval "$as_ac_Header=\$ac_header_preproc"
10082 fi
10083 ac_res=`eval 'as_val=${'$as_ac_Header'}
10084                  $as_echo "$as_val"'`
10085                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10086 $as_echo "$ac_res" >&6; }
10087
10088 fi
10089 as_val=`eval 'as_val=${'$as_ac_Header'}
10090                  $as_echo "$as_val"'`
10091    if test "x$as_val" = x""yes; then
10092   cat >>confdefs.h <<_ACEOF
10093 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10094 _ACEOF
10095
10096 fi
10097
10098 done
10099
10100
10101 for ac_header in netinet/tcp.h
10102 do
10103 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10104 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10105 $as_echo_n "checking for $ac_header... " >&6; }
10106 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10107   $as_echo_n "(cached) " >&6
10108 else
10109   cat >conftest.$ac_ext <<_ACEOF
10110 /* confdefs.h.  */
10111 _ACEOF
10112 cat confdefs.h >>conftest.$ac_ext
10113 cat >>conftest.$ac_ext <<_ACEOF
10114 /* end confdefs.h.  */
10115 $ac_includes_default
10116 #ifdef HAVE_NETINET_IN_H
10117 #include <netinet/in.h>
10118 #endif
10119
10120
10121 #include <$ac_header>
10122 _ACEOF
10123 rm -f conftest.$ac_objext
10124 if { (ac_try="$ac_compile"
10125 case "(($ac_try" in
10126   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10127   *) ac_try_echo=$ac_try;;
10128 esac
10129 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10130 $as_echo "$ac_try_echo") >&5
10131   (eval "$ac_compile") 2>conftest.er1
10132   ac_status=$?
10133   grep -v '^ *+' conftest.er1 >conftest.err
10134   rm -f conftest.er1
10135   cat conftest.err >&5
10136   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10137   (exit $ac_status); } && {
10138          test -z "$ac_c_werror_flag" ||
10139          test ! -s conftest.err
10140        } && test -s conftest.$ac_objext; then
10141   eval "$as_ac_Header=yes"
10142 else
10143   $as_echo "$as_me: failed program was:" >&5
10144 sed 's/^/| /' conftest.$ac_ext >&5
10145
10146         eval "$as_ac_Header=no"
10147 fi
10148
10149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10150 fi
10151 ac_res=`eval 'as_val=${'$as_ac_Header'}
10152                  $as_echo "$as_val"'`
10153                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10154 $as_echo "$ac_res" >&6; }
10155 as_val=`eval 'as_val=${'$as_ac_Header'}
10156                  $as_echo "$as_val"'`
10157    if test "x$as_val" = x""yes; then
10158   cat >>confdefs.h <<_ACEOF
10159 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10160 _ACEOF
10161
10162 fi
10163
10164 done
10165
10166
10167 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
10168
10169 for ac_header in readline/readline.h
10170 do
10171 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10172 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10173   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10174 $as_echo_n "checking for $ac_header... " >&6; }
10175 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10176   $as_echo_n "(cached) " >&6
10177 fi
10178 ac_res=`eval 'as_val=${'$as_ac_Header'}
10179                  $as_echo "$as_val"'`
10180                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10181 $as_echo "$ac_res" >&6; }
10182 else
10183   # Is the header compilable?
10184 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
10185 $as_echo_n "checking $ac_header usability... " >&6; }
10186 cat >conftest.$ac_ext <<_ACEOF
10187 /* confdefs.h.  */
10188 _ACEOF
10189 cat confdefs.h >>conftest.$ac_ext
10190 cat >>conftest.$ac_ext <<_ACEOF
10191 /* end confdefs.h.  */
10192 $ac_includes_default
10193 #include <$ac_header>
10194 _ACEOF
10195 rm -f conftest.$ac_objext
10196 if { (ac_try="$ac_compile"
10197 case "(($ac_try" in
10198   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10199   *) ac_try_echo=$ac_try;;
10200 esac
10201 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10202 $as_echo "$ac_try_echo") >&5
10203   (eval "$ac_compile") 2>conftest.er1
10204   ac_status=$?
10205   grep -v '^ *+' conftest.er1 >conftest.err
10206   rm -f conftest.er1
10207   cat conftest.err >&5
10208   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10209   (exit $ac_status); } && {
10210          test -z "$ac_c_werror_flag" ||
10211          test ! -s conftest.err
10212        } && test -s conftest.$ac_objext; then
10213   ac_header_compiler=yes
10214 else
10215   $as_echo "$as_me: failed program was:" >&5
10216 sed 's/^/| /' conftest.$ac_ext >&5
10217
10218         ac_header_compiler=no
10219 fi
10220
10221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10222 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10223 $as_echo "$ac_header_compiler" >&6; }
10224
10225 # Is the header present?
10226 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
10227 $as_echo_n "checking $ac_header presence... " >&6; }
10228 cat >conftest.$ac_ext <<_ACEOF
10229 /* confdefs.h.  */
10230 _ACEOF
10231 cat confdefs.h >>conftest.$ac_ext
10232 cat >>conftest.$ac_ext <<_ACEOF
10233 /* end confdefs.h.  */
10234 #include <$ac_header>
10235 _ACEOF
10236 if { (ac_try="$ac_cpp conftest.$ac_ext"
10237 case "(($ac_try" in
10238   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10239   *) ac_try_echo=$ac_try;;
10240 esac
10241 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10242 $as_echo "$ac_try_echo") >&5
10243   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10244   ac_status=$?
10245   grep -v '^ *+' conftest.er1 >conftest.err
10246   rm -f conftest.er1
10247   cat conftest.err >&5
10248   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10249   (exit $ac_status); } >/dev/null && {
10250          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10251          test ! -s conftest.err
10252        }; then
10253   ac_header_preproc=yes
10254 else
10255   $as_echo "$as_me: failed program was:" >&5
10256 sed 's/^/| /' conftest.$ac_ext >&5
10257
10258   ac_header_preproc=no
10259 fi
10260
10261 rm -f conftest.err conftest.$ac_ext
10262 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10263 $as_echo "$ac_header_preproc" >&6; }
10264
10265 # So?  What about this header?
10266 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10267   yes:no: )
10268     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10269 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10270     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10271 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10272     ac_header_preproc=yes
10273     ;;
10274   no:yes:* )
10275     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10276 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10277     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10278 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10279     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10280 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10281     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10282 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10283     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10284 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10285     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10286 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10287     ( cat <<\_ASBOX
10288 ## ---------------------------------------- ##
10289 ## Report this to pgsql-bugs@postgresql.org ##
10290 ## ---------------------------------------- ##
10291 _ASBOX
10292      ) | sed "s/^/$as_me: WARNING:     /" >&2
10293     ;;
10294 esac
10295 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10296 $as_echo_n "checking for $ac_header... " >&6; }
10297 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10298   $as_echo_n "(cached) " >&6
10299 else
10300   eval "$as_ac_Header=\$ac_header_preproc"
10301 fi
10302 ac_res=`eval 'as_val=${'$as_ac_Header'}
10303                  $as_echo "$as_val"'`
10304                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10305 $as_echo "$ac_res" >&6; }
10306
10307 fi
10308 as_val=`eval 'as_val=${'$as_ac_Header'}
10309                  $as_echo "$as_val"'`
10310    if test "x$as_val" = x""yes; then
10311   cat >>confdefs.h <<_ACEOF
10312 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10313 _ACEOF
10314
10315 else
10316
10317 for ac_header in readline.h
10318 do
10319 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10320 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10321   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10322 $as_echo_n "checking for $ac_header... " >&6; }
10323 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10324   $as_echo_n "(cached) " >&6
10325 fi
10326 ac_res=`eval 'as_val=${'$as_ac_Header'}
10327                  $as_echo "$as_val"'`
10328                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10329 $as_echo "$ac_res" >&6; }
10330 else
10331   # Is the header compilable?
10332 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
10333 $as_echo_n "checking $ac_header usability... " >&6; }
10334 cat >conftest.$ac_ext <<_ACEOF
10335 /* confdefs.h.  */
10336 _ACEOF
10337 cat confdefs.h >>conftest.$ac_ext
10338 cat >>conftest.$ac_ext <<_ACEOF
10339 /* end confdefs.h.  */
10340 $ac_includes_default
10341 #include <$ac_header>
10342 _ACEOF
10343 rm -f conftest.$ac_objext
10344 if { (ac_try="$ac_compile"
10345 case "(($ac_try" in
10346   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10347   *) ac_try_echo=$ac_try;;
10348 esac
10349 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10350 $as_echo "$ac_try_echo") >&5
10351   (eval "$ac_compile") 2>conftest.er1
10352   ac_status=$?
10353   grep -v '^ *+' conftest.er1 >conftest.err
10354   rm -f conftest.er1
10355   cat conftest.err >&5
10356   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10357   (exit $ac_status); } && {
10358          test -z "$ac_c_werror_flag" ||
10359          test ! -s conftest.err
10360        } && test -s conftest.$ac_objext; then
10361   ac_header_compiler=yes
10362 else
10363   $as_echo "$as_me: failed program was:" >&5
10364 sed 's/^/| /' conftest.$ac_ext >&5
10365
10366         ac_header_compiler=no
10367 fi
10368
10369 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10370 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10371 $as_echo "$ac_header_compiler" >&6; }
10372
10373 # Is the header present?
10374 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
10375 $as_echo_n "checking $ac_header presence... " >&6; }
10376 cat >conftest.$ac_ext <<_ACEOF
10377 /* confdefs.h.  */
10378 _ACEOF
10379 cat confdefs.h >>conftest.$ac_ext
10380 cat >>conftest.$ac_ext <<_ACEOF
10381 /* end confdefs.h.  */
10382 #include <$ac_header>
10383 _ACEOF
10384 if { (ac_try="$ac_cpp conftest.$ac_ext"
10385 case "(($ac_try" in
10386   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10387   *) ac_try_echo=$ac_try;;
10388 esac
10389 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10390 $as_echo "$ac_try_echo") >&5
10391   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10392   ac_status=$?
10393   grep -v '^ *+' conftest.er1 >conftest.err
10394   rm -f conftest.er1
10395   cat conftest.err >&5
10396   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10397   (exit $ac_status); } >/dev/null && {
10398          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10399          test ! -s conftest.err
10400        }; then
10401   ac_header_preproc=yes
10402 else
10403   $as_echo "$as_me: failed program was:" >&5
10404 sed 's/^/| /' conftest.$ac_ext >&5
10405
10406   ac_header_preproc=no
10407 fi
10408
10409 rm -f conftest.err conftest.$ac_ext
10410 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10411 $as_echo "$ac_header_preproc" >&6; }
10412
10413 # So?  What about this header?
10414 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10415   yes:no: )
10416     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10417 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10418     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10419 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10420     ac_header_preproc=yes
10421     ;;
10422   no:yes:* )
10423     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10424 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10425     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10426 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10427     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10428 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10429     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10430 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10431     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10432 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10433     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10434 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10435     ( cat <<\_ASBOX
10436 ## ---------------------------------------- ##
10437 ## Report this to pgsql-bugs@postgresql.org ##
10438 ## ---------------------------------------- ##
10439 _ASBOX
10440      ) | sed "s/^/$as_me: WARNING:     /" >&2
10441     ;;
10442 esac
10443 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10444 $as_echo_n "checking for $ac_header... " >&6; }
10445 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10446   $as_echo_n "(cached) " >&6
10447 else
10448   eval "$as_ac_Header=\$ac_header_preproc"
10449 fi
10450 ac_res=`eval 'as_val=${'$as_ac_Header'}
10451                  $as_echo "$as_val"'`
10452                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10453 $as_echo "$ac_res" >&6; }
10454
10455 fi
10456 as_val=`eval 'as_val=${'$as_ac_Header'}
10457                  $as_echo "$as_val"'`
10458    if test "x$as_val" = x""yes; then
10459   cat >>confdefs.h <<_ACEOF
10460 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10461 _ACEOF
10462
10463 else
10464   { { $as_echo "$as_me:$LINENO: error: readline header not found
10465 If you have readline already installed, see config.log for details on the
10466 failure.  It is possible the compiler isn't looking in the proper directory.
10467 Use --without-readline to disable readline support." >&5
10468 $as_echo "$as_me: error: readline header not found
10469 If you have readline already installed, see config.log for details on the
10470 failure.  It is possible the compiler isn't looking in the proper directory.
10471 Use --without-readline to disable readline support." >&2;}
10472    { (exit 1); exit 1; }; }
10473 fi
10474
10475 done
10476
10477 fi
10478
10479 done
10480
10481
10482 for ac_header in readline/history.h
10483 do
10484 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10485 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10486   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10487 $as_echo_n "checking for $ac_header... " >&6; }
10488 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10489   $as_echo_n "(cached) " >&6
10490 fi
10491 ac_res=`eval 'as_val=${'$as_ac_Header'}
10492                  $as_echo "$as_val"'`
10493                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10494 $as_echo "$ac_res" >&6; }
10495 else
10496   # Is the header compilable?
10497 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
10498 $as_echo_n "checking $ac_header usability... " >&6; }
10499 cat >conftest.$ac_ext <<_ACEOF
10500 /* confdefs.h.  */
10501 _ACEOF
10502 cat confdefs.h >>conftest.$ac_ext
10503 cat >>conftest.$ac_ext <<_ACEOF
10504 /* end confdefs.h.  */
10505 $ac_includes_default
10506 #include <$ac_header>
10507 _ACEOF
10508 rm -f conftest.$ac_objext
10509 if { (ac_try="$ac_compile"
10510 case "(($ac_try" in
10511   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10512   *) ac_try_echo=$ac_try;;
10513 esac
10514 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10515 $as_echo "$ac_try_echo") >&5
10516   (eval "$ac_compile") 2>conftest.er1
10517   ac_status=$?
10518   grep -v '^ *+' conftest.er1 >conftest.err
10519   rm -f conftest.er1
10520   cat conftest.err >&5
10521   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10522   (exit $ac_status); } && {
10523          test -z "$ac_c_werror_flag" ||
10524          test ! -s conftest.err
10525        } && test -s conftest.$ac_objext; then
10526   ac_header_compiler=yes
10527 else
10528   $as_echo "$as_me: failed program was:" >&5
10529 sed 's/^/| /' conftest.$ac_ext >&5
10530
10531         ac_header_compiler=no
10532 fi
10533
10534 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10535 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10536 $as_echo "$ac_header_compiler" >&6; }
10537
10538 # Is the header present?
10539 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
10540 $as_echo_n "checking $ac_header presence... " >&6; }
10541 cat >conftest.$ac_ext <<_ACEOF
10542 /* confdefs.h.  */
10543 _ACEOF
10544 cat confdefs.h >>conftest.$ac_ext
10545 cat >>conftest.$ac_ext <<_ACEOF
10546 /* end confdefs.h.  */
10547 #include <$ac_header>
10548 _ACEOF
10549 if { (ac_try="$ac_cpp conftest.$ac_ext"
10550 case "(($ac_try" in
10551   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10552   *) ac_try_echo=$ac_try;;
10553 esac
10554 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10555 $as_echo "$ac_try_echo") >&5
10556   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10557   ac_status=$?
10558   grep -v '^ *+' conftest.er1 >conftest.err
10559   rm -f conftest.er1
10560   cat conftest.err >&5
10561   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10562   (exit $ac_status); } >/dev/null && {
10563          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10564          test ! -s conftest.err
10565        }; then
10566   ac_header_preproc=yes
10567 else
10568   $as_echo "$as_me: failed program was:" >&5
10569 sed 's/^/| /' conftest.$ac_ext >&5
10570
10571   ac_header_preproc=no
10572 fi
10573
10574 rm -f conftest.err conftest.$ac_ext
10575 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10576 $as_echo "$ac_header_preproc" >&6; }
10577
10578 # So?  What about this header?
10579 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10580   yes:no: )
10581     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10582 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10583     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10584 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10585     ac_header_preproc=yes
10586     ;;
10587   no:yes:* )
10588     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10589 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10590     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10591 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10592     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10593 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10594     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10595 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10596     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10597 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10598     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10599 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10600     ( cat <<\_ASBOX
10601 ## ---------------------------------------- ##
10602 ## Report this to pgsql-bugs@postgresql.org ##
10603 ## ---------------------------------------- ##
10604 _ASBOX
10605      ) | sed "s/^/$as_me: WARNING:     /" >&2
10606     ;;
10607 esac
10608 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10609 $as_echo_n "checking for $ac_header... " >&6; }
10610 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10611   $as_echo_n "(cached) " >&6
10612 else
10613   eval "$as_ac_Header=\$ac_header_preproc"
10614 fi
10615 ac_res=`eval 'as_val=${'$as_ac_Header'}
10616                  $as_echo "$as_val"'`
10617                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10618 $as_echo "$ac_res" >&6; }
10619
10620 fi
10621 as_val=`eval 'as_val=${'$as_ac_Header'}
10622                  $as_echo "$as_val"'`
10623    if test "x$as_val" = x""yes; then
10624   cat >>confdefs.h <<_ACEOF
10625 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10626 _ACEOF
10627
10628 else
10629
10630 for ac_header in history.h
10631 do
10632 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10633 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10634   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10635 $as_echo_n "checking for $ac_header... " >&6; }
10636 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10637   $as_echo_n "(cached) " >&6
10638 fi
10639 ac_res=`eval 'as_val=${'$as_ac_Header'}
10640                  $as_echo "$as_val"'`
10641                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10642 $as_echo "$ac_res" >&6; }
10643 else
10644   # Is the header compilable?
10645 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
10646 $as_echo_n "checking $ac_header usability... " >&6; }
10647 cat >conftest.$ac_ext <<_ACEOF
10648 /* confdefs.h.  */
10649 _ACEOF
10650 cat confdefs.h >>conftest.$ac_ext
10651 cat >>conftest.$ac_ext <<_ACEOF
10652 /* end confdefs.h.  */
10653 $ac_includes_default
10654 #include <$ac_header>
10655 _ACEOF
10656 rm -f conftest.$ac_objext
10657 if { (ac_try="$ac_compile"
10658 case "(($ac_try" in
10659   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10660   *) ac_try_echo=$ac_try;;
10661 esac
10662 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10663 $as_echo "$ac_try_echo") >&5
10664   (eval "$ac_compile") 2>conftest.er1
10665   ac_status=$?
10666   grep -v '^ *+' conftest.er1 >conftest.err
10667   rm -f conftest.er1
10668   cat conftest.err >&5
10669   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10670   (exit $ac_status); } && {
10671          test -z "$ac_c_werror_flag" ||
10672          test ! -s conftest.err
10673        } && test -s conftest.$ac_objext; then
10674   ac_header_compiler=yes
10675 else
10676   $as_echo "$as_me: failed program was:" >&5
10677 sed 's/^/| /' conftest.$ac_ext >&5
10678
10679         ac_header_compiler=no
10680 fi
10681
10682 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10683 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10684 $as_echo "$ac_header_compiler" >&6; }
10685
10686 # Is the header present?
10687 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
10688 $as_echo_n "checking $ac_header presence... " >&6; }
10689 cat >conftest.$ac_ext <<_ACEOF
10690 /* confdefs.h.  */
10691 _ACEOF
10692 cat confdefs.h >>conftest.$ac_ext
10693 cat >>conftest.$ac_ext <<_ACEOF
10694 /* end confdefs.h.  */
10695 #include <$ac_header>
10696 _ACEOF
10697 if { (ac_try="$ac_cpp conftest.$ac_ext"
10698 case "(($ac_try" in
10699   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10700   *) ac_try_echo=$ac_try;;
10701 esac
10702 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10703 $as_echo "$ac_try_echo") >&5
10704   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10705   ac_status=$?
10706   grep -v '^ *+' conftest.er1 >conftest.err
10707   rm -f conftest.er1
10708   cat conftest.err >&5
10709   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10710   (exit $ac_status); } >/dev/null && {
10711          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10712          test ! -s conftest.err
10713        }; then
10714   ac_header_preproc=yes
10715 else
10716   $as_echo "$as_me: failed program was:" >&5
10717 sed 's/^/| /' conftest.$ac_ext >&5
10718
10719   ac_header_preproc=no
10720 fi
10721
10722 rm -f conftest.err conftest.$ac_ext
10723 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10724 $as_echo "$ac_header_preproc" >&6; }
10725
10726 # So?  What about this header?
10727 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10728   yes:no: )
10729     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10730 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10731     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10732 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10733     ac_header_preproc=yes
10734     ;;
10735   no:yes:* )
10736     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10737 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10738     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10739 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10740     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10741 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10742     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10743 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10744     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10745 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10746     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10747 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10748     ( cat <<\_ASBOX
10749 ## ---------------------------------------- ##
10750 ## Report this to pgsql-bugs@postgresql.org ##
10751 ## ---------------------------------------- ##
10752 _ASBOX
10753      ) | sed "s/^/$as_me: WARNING:     /" >&2
10754     ;;
10755 esac
10756 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10757 $as_echo_n "checking for $ac_header... " >&6; }
10758 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10759   $as_echo_n "(cached) " >&6
10760 else
10761   eval "$as_ac_Header=\$ac_header_preproc"
10762 fi
10763 ac_res=`eval 'as_val=${'$as_ac_Header'}
10764                  $as_echo "$as_val"'`
10765                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10766 $as_echo "$ac_res" >&6; }
10767
10768 fi
10769 as_val=`eval 'as_val=${'$as_ac_Header'}
10770                  $as_echo "$as_val"'`
10771    if test "x$as_val" = x""yes; then
10772   cat >>confdefs.h <<_ACEOF
10773 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10774 _ACEOF
10775
10776 else
10777   { { $as_echo "$as_me:$LINENO: error: history header not found
10778 If you have readline already installed, see config.log for details on the
10779 failure.  It is possible the compiler isn't looking in the proper directory.
10780 Use --without-readline to disable readline support." >&5
10781 $as_echo "$as_me: error: history header not found
10782 If you have readline already installed, see config.log for details on the
10783 failure.  It is possible the compiler isn't looking in the proper directory.
10784 Use --without-readline to disable readline support." >&2;}
10785    { (exit 1); exit 1; }; }
10786 fi
10787
10788 done
10789
10790 fi
10791
10792 done
10793
10794 fi
10795
10796 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
10797 # Some installations of libedit usurp /usr/include/readline/, which seems
10798 # bad practice, since in combined installations readline will have its headers
10799 # there.  We might have to resort to AC_EGREP checks to make sure we found
10800 # the proper header...
10801
10802 for ac_header in editline/readline.h
10803 do
10804 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10805 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10806   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10807 $as_echo_n "checking for $ac_header... " >&6; }
10808 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10809   $as_echo_n "(cached) " >&6
10810 fi
10811 ac_res=`eval 'as_val=${'$as_ac_Header'}
10812                  $as_echo "$as_val"'`
10813                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10814 $as_echo "$ac_res" >&6; }
10815 else
10816   # Is the header compilable?
10817 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
10818 $as_echo_n "checking $ac_header usability... " >&6; }
10819 cat >conftest.$ac_ext <<_ACEOF
10820 /* confdefs.h.  */
10821 _ACEOF
10822 cat confdefs.h >>conftest.$ac_ext
10823 cat >>conftest.$ac_ext <<_ACEOF
10824 /* end confdefs.h.  */
10825 $ac_includes_default
10826 #include <$ac_header>
10827 _ACEOF
10828 rm -f conftest.$ac_objext
10829 if { (ac_try="$ac_compile"
10830 case "(($ac_try" in
10831   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10832   *) ac_try_echo=$ac_try;;
10833 esac
10834 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10835 $as_echo "$ac_try_echo") >&5
10836   (eval "$ac_compile") 2>conftest.er1
10837   ac_status=$?
10838   grep -v '^ *+' conftest.er1 >conftest.err
10839   rm -f conftest.er1
10840   cat conftest.err >&5
10841   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10842   (exit $ac_status); } && {
10843          test -z "$ac_c_werror_flag" ||
10844          test ! -s conftest.err
10845        } && test -s conftest.$ac_objext; then
10846   ac_header_compiler=yes
10847 else
10848   $as_echo "$as_me: failed program was:" >&5
10849 sed 's/^/| /' conftest.$ac_ext >&5
10850
10851         ac_header_compiler=no
10852 fi
10853
10854 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10855 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10856 $as_echo "$ac_header_compiler" >&6; }
10857
10858 # Is the header present?
10859 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
10860 $as_echo_n "checking $ac_header presence... " >&6; }
10861 cat >conftest.$ac_ext <<_ACEOF
10862 /* confdefs.h.  */
10863 _ACEOF
10864 cat confdefs.h >>conftest.$ac_ext
10865 cat >>conftest.$ac_ext <<_ACEOF
10866 /* end confdefs.h.  */
10867 #include <$ac_header>
10868 _ACEOF
10869 if { (ac_try="$ac_cpp conftest.$ac_ext"
10870 case "(($ac_try" in
10871   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10872   *) ac_try_echo=$ac_try;;
10873 esac
10874 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10875 $as_echo "$ac_try_echo") >&5
10876   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10877   ac_status=$?
10878   grep -v '^ *+' conftest.er1 >conftest.err
10879   rm -f conftest.er1
10880   cat conftest.err >&5
10881   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10882   (exit $ac_status); } >/dev/null && {
10883          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10884          test ! -s conftest.err
10885        }; then
10886   ac_header_preproc=yes
10887 else
10888   $as_echo "$as_me: failed program was:" >&5
10889 sed 's/^/| /' conftest.$ac_ext >&5
10890
10891   ac_header_preproc=no
10892 fi
10893
10894 rm -f conftest.err conftest.$ac_ext
10895 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10896 $as_echo "$ac_header_preproc" >&6; }
10897
10898 # So?  What about this header?
10899 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10900   yes:no: )
10901     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10902 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10903     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10904 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10905     ac_header_preproc=yes
10906     ;;
10907   no:yes:* )
10908     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10909 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10910     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10911 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10912     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10913 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10914     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10915 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10916     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10917 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10918     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10919 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10920     ( cat <<\_ASBOX
10921 ## ---------------------------------------- ##
10922 ## Report this to pgsql-bugs@postgresql.org ##
10923 ## ---------------------------------------- ##
10924 _ASBOX
10925      ) | sed "s/^/$as_me: WARNING:     /" >&2
10926     ;;
10927 esac
10928 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10929 $as_echo_n "checking for $ac_header... " >&6; }
10930 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10931   $as_echo_n "(cached) " >&6
10932 else
10933   eval "$as_ac_Header=\$ac_header_preproc"
10934 fi
10935 ac_res=`eval 'as_val=${'$as_ac_Header'}
10936                  $as_echo "$as_val"'`
10937                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10938 $as_echo "$ac_res" >&6; }
10939
10940 fi
10941 as_val=`eval 'as_val=${'$as_ac_Header'}
10942                  $as_echo "$as_val"'`
10943    if test "x$as_val" = x""yes; then
10944   cat >>confdefs.h <<_ACEOF
10945 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10946 _ACEOF
10947
10948 else
10949
10950 for ac_header in readline.h
10951 do
10952 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10953 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10954   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10955 $as_echo_n "checking for $ac_header... " >&6; }
10956 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10957   $as_echo_n "(cached) " >&6
10958 fi
10959 ac_res=`eval 'as_val=${'$as_ac_Header'}
10960                  $as_echo "$as_val"'`
10961                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10962 $as_echo "$ac_res" >&6; }
10963 else
10964   # Is the header compilable?
10965 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
10966 $as_echo_n "checking $ac_header usability... " >&6; }
10967 cat >conftest.$ac_ext <<_ACEOF
10968 /* confdefs.h.  */
10969 _ACEOF
10970 cat confdefs.h >>conftest.$ac_ext
10971 cat >>conftest.$ac_ext <<_ACEOF
10972 /* end confdefs.h.  */
10973 $ac_includes_default
10974 #include <$ac_header>
10975 _ACEOF
10976 rm -f conftest.$ac_objext
10977 if { (ac_try="$ac_compile"
10978 case "(($ac_try" in
10979   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10980   *) ac_try_echo=$ac_try;;
10981 esac
10982 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10983 $as_echo "$ac_try_echo") >&5
10984   (eval "$ac_compile") 2>conftest.er1
10985   ac_status=$?
10986   grep -v '^ *+' conftest.er1 >conftest.err
10987   rm -f conftest.er1
10988   cat conftest.err >&5
10989   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10990   (exit $ac_status); } && {
10991          test -z "$ac_c_werror_flag" ||
10992          test ! -s conftest.err
10993        } && test -s conftest.$ac_objext; then
10994   ac_header_compiler=yes
10995 else
10996   $as_echo "$as_me: failed program was:" >&5
10997 sed 's/^/| /' conftest.$ac_ext >&5
10998
10999         ac_header_compiler=no
11000 fi
11001
11002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11003 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11004 $as_echo "$ac_header_compiler" >&6; }
11005
11006 # Is the header present?
11007 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11008 $as_echo_n "checking $ac_header presence... " >&6; }
11009 cat >conftest.$ac_ext <<_ACEOF
11010 /* confdefs.h.  */
11011 _ACEOF
11012 cat confdefs.h >>conftest.$ac_ext
11013 cat >>conftest.$ac_ext <<_ACEOF
11014 /* end confdefs.h.  */
11015 #include <$ac_header>
11016 _ACEOF
11017 if { (ac_try="$ac_cpp conftest.$ac_ext"
11018 case "(($ac_try" in
11019   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11020   *) ac_try_echo=$ac_try;;
11021 esac
11022 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11023 $as_echo "$ac_try_echo") >&5
11024   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11025   ac_status=$?
11026   grep -v '^ *+' conftest.er1 >conftest.err
11027   rm -f conftest.er1
11028   cat conftest.err >&5
11029   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11030   (exit $ac_status); } >/dev/null && {
11031          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11032          test ! -s conftest.err
11033        }; then
11034   ac_header_preproc=yes
11035 else
11036   $as_echo "$as_me: failed program was:" >&5
11037 sed 's/^/| /' conftest.$ac_ext >&5
11038
11039   ac_header_preproc=no
11040 fi
11041
11042 rm -f conftest.err conftest.$ac_ext
11043 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11044 $as_echo "$ac_header_preproc" >&6; }
11045
11046 # So?  What about this header?
11047 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11048   yes:no: )
11049     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11050 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11051     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11052 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11053     ac_header_preproc=yes
11054     ;;
11055   no:yes:* )
11056     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11057 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11058     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11059 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11060     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11061 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11062     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11063 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11064     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11065 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11066     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11067 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11068     ( cat <<\_ASBOX
11069 ## ---------------------------------------- ##
11070 ## Report this to pgsql-bugs@postgresql.org ##
11071 ## ---------------------------------------- ##
11072 _ASBOX
11073      ) | sed "s/^/$as_me: WARNING:     /" >&2
11074     ;;
11075 esac
11076 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11077 $as_echo_n "checking for $ac_header... " >&6; }
11078 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11079   $as_echo_n "(cached) " >&6
11080 else
11081   eval "$as_ac_Header=\$ac_header_preproc"
11082 fi
11083 ac_res=`eval 'as_val=${'$as_ac_Header'}
11084                  $as_echo "$as_val"'`
11085                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11086 $as_echo "$ac_res" >&6; }
11087
11088 fi
11089 as_val=`eval 'as_val=${'$as_ac_Header'}
11090                  $as_echo "$as_val"'`
11091    if test "x$as_val" = x""yes; then
11092   cat >>confdefs.h <<_ACEOF
11093 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11094 _ACEOF
11095
11096 else
11097
11098 for ac_header in readline/readline.h
11099 do
11100 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11101 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11102   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11103 $as_echo_n "checking for $ac_header... " >&6; }
11104 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11105   $as_echo_n "(cached) " >&6
11106 fi
11107 ac_res=`eval 'as_val=${'$as_ac_Header'}
11108                  $as_echo "$as_val"'`
11109                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11110 $as_echo "$ac_res" >&6; }
11111 else
11112   # Is the header compilable?
11113 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
11114 $as_echo_n "checking $ac_header usability... " >&6; }
11115 cat >conftest.$ac_ext <<_ACEOF
11116 /* confdefs.h.  */
11117 _ACEOF
11118 cat confdefs.h >>conftest.$ac_ext
11119 cat >>conftest.$ac_ext <<_ACEOF
11120 /* end confdefs.h.  */
11121 $ac_includes_default
11122 #include <$ac_header>
11123 _ACEOF
11124 rm -f conftest.$ac_objext
11125 if { (ac_try="$ac_compile"
11126 case "(($ac_try" in
11127   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11128   *) ac_try_echo=$ac_try;;
11129 esac
11130 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11131 $as_echo "$ac_try_echo") >&5
11132   (eval "$ac_compile") 2>conftest.er1
11133   ac_status=$?
11134   grep -v '^ *+' conftest.er1 >conftest.err
11135   rm -f conftest.er1
11136   cat conftest.err >&5
11137   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11138   (exit $ac_status); } && {
11139          test -z "$ac_c_werror_flag" ||
11140          test ! -s conftest.err
11141        } && test -s conftest.$ac_objext; then
11142   ac_header_compiler=yes
11143 else
11144   $as_echo "$as_me: failed program was:" >&5
11145 sed 's/^/| /' conftest.$ac_ext >&5
11146
11147         ac_header_compiler=no
11148 fi
11149
11150 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11151 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11152 $as_echo "$ac_header_compiler" >&6; }
11153
11154 # Is the header present?
11155 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11156 $as_echo_n "checking $ac_header presence... " >&6; }
11157 cat >conftest.$ac_ext <<_ACEOF
11158 /* confdefs.h.  */
11159 _ACEOF
11160 cat confdefs.h >>conftest.$ac_ext
11161 cat >>conftest.$ac_ext <<_ACEOF
11162 /* end confdefs.h.  */
11163 #include <$ac_header>
11164 _ACEOF
11165 if { (ac_try="$ac_cpp conftest.$ac_ext"
11166 case "(($ac_try" in
11167   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11168   *) ac_try_echo=$ac_try;;
11169 esac
11170 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11171 $as_echo "$ac_try_echo") >&5
11172   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11173   ac_status=$?
11174   grep -v '^ *+' conftest.er1 >conftest.err
11175   rm -f conftest.er1
11176   cat conftest.err >&5
11177   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11178   (exit $ac_status); } >/dev/null && {
11179          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11180          test ! -s conftest.err
11181        }; then
11182   ac_header_preproc=yes
11183 else
11184   $as_echo "$as_me: failed program was:" >&5
11185 sed 's/^/| /' conftest.$ac_ext >&5
11186
11187   ac_header_preproc=no
11188 fi
11189
11190 rm -f conftest.err conftest.$ac_ext
11191 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11192 $as_echo "$ac_header_preproc" >&6; }
11193
11194 # So?  What about this header?
11195 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11196   yes:no: )
11197     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11198 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11199     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11200 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11201     ac_header_preproc=yes
11202     ;;
11203   no:yes:* )
11204     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11205 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11206     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11207 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11208     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11209 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11210     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11211 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11212     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11213 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11214     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11215 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11216     ( cat <<\_ASBOX
11217 ## ---------------------------------------- ##
11218 ## Report this to pgsql-bugs@postgresql.org ##
11219 ## ---------------------------------------- ##
11220 _ASBOX
11221      ) | sed "s/^/$as_me: WARNING:     /" >&2
11222     ;;
11223 esac
11224 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11225 $as_echo_n "checking for $ac_header... " >&6; }
11226 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11227   $as_echo_n "(cached) " >&6
11228 else
11229   eval "$as_ac_Header=\$ac_header_preproc"
11230 fi
11231 ac_res=`eval 'as_val=${'$as_ac_Header'}
11232                  $as_echo "$as_val"'`
11233                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11234 $as_echo "$ac_res" >&6; }
11235
11236 fi
11237 as_val=`eval 'as_val=${'$as_ac_Header'}
11238                  $as_echo "$as_val"'`
11239    if test "x$as_val" = x""yes; then
11240   cat >>confdefs.h <<_ACEOF
11241 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11242 _ACEOF
11243
11244 else
11245   { { $as_echo "$as_me:$LINENO: error: readline header not found
11246 If you have libedit already installed, see config.log for details on the
11247 failure.  It is possible the compiler isn't looking in the proper directory.
11248 Use --without-readline to disable libedit support." >&5
11249 $as_echo "$as_me: error: readline header not found
11250 If you have libedit already installed, see config.log for details on the
11251 failure.  It is possible the compiler isn't looking in the proper directory.
11252 Use --without-readline to disable libedit support." >&2;}
11253    { (exit 1); exit 1; }; }
11254 fi
11255
11256 done
11257
11258 fi
11259
11260 done
11261
11262 fi
11263
11264 done
11265
11266 # Note: in a libedit installation, history.h is sometimes a dummy, and may
11267 # not be there at all.  Hence, don't complain if not found.  We must check
11268 # though, since in yet other versions it is an independent header.
11269
11270 for ac_header in editline/history.h
11271 do
11272 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11273 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11274   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11275 $as_echo_n "checking for $ac_header... " >&6; }
11276 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11277   $as_echo_n "(cached) " >&6
11278 fi
11279 ac_res=`eval 'as_val=${'$as_ac_Header'}
11280                  $as_echo "$as_val"'`
11281                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11282 $as_echo "$ac_res" >&6; }
11283 else
11284   # Is the header compilable?
11285 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
11286 $as_echo_n "checking $ac_header usability... " >&6; }
11287 cat >conftest.$ac_ext <<_ACEOF
11288 /* confdefs.h.  */
11289 _ACEOF
11290 cat confdefs.h >>conftest.$ac_ext
11291 cat >>conftest.$ac_ext <<_ACEOF
11292 /* end confdefs.h.  */
11293 $ac_includes_default
11294 #include <$ac_header>
11295 _ACEOF
11296 rm -f conftest.$ac_objext
11297 if { (ac_try="$ac_compile"
11298 case "(($ac_try" in
11299   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11300   *) ac_try_echo=$ac_try;;
11301 esac
11302 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11303 $as_echo "$ac_try_echo") >&5
11304   (eval "$ac_compile") 2>conftest.er1
11305   ac_status=$?
11306   grep -v '^ *+' conftest.er1 >conftest.err
11307   rm -f conftest.er1
11308   cat conftest.err >&5
11309   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11310   (exit $ac_status); } && {
11311          test -z "$ac_c_werror_flag" ||
11312          test ! -s conftest.err
11313        } && test -s conftest.$ac_objext; then
11314   ac_header_compiler=yes
11315 else
11316   $as_echo "$as_me: failed program was:" >&5
11317 sed 's/^/| /' conftest.$ac_ext >&5
11318
11319         ac_header_compiler=no
11320 fi
11321
11322 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11323 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11324 $as_echo "$ac_header_compiler" >&6; }
11325
11326 # Is the header present?
11327 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11328 $as_echo_n "checking $ac_header presence... " >&6; }
11329 cat >conftest.$ac_ext <<_ACEOF
11330 /* confdefs.h.  */
11331 _ACEOF
11332 cat confdefs.h >>conftest.$ac_ext
11333 cat >>conftest.$ac_ext <<_ACEOF
11334 /* end confdefs.h.  */
11335 #include <$ac_header>
11336 _ACEOF
11337 if { (ac_try="$ac_cpp conftest.$ac_ext"
11338 case "(($ac_try" in
11339   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11340   *) ac_try_echo=$ac_try;;
11341 esac
11342 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11343 $as_echo "$ac_try_echo") >&5
11344   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11345   ac_status=$?
11346   grep -v '^ *+' conftest.er1 >conftest.err
11347   rm -f conftest.er1
11348   cat conftest.err >&5
11349   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11350   (exit $ac_status); } >/dev/null && {
11351          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11352          test ! -s conftest.err
11353        }; then
11354   ac_header_preproc=yes
11355 else
11356   $as_echo "$as_me: failed program was:" >&5
11357 sed 's/^/| /' conftest.$ac_ext >&5
11358
11359   ac_header_preproc=no
11360 fi
11361
11362 rm -f conftest.err conftest.$ac_ext
11363 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11364 $as_echo "$ac_header_preproc" >&6; }
11365
11366 # So?  What about this header?
11367 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11368   yes:no: )
11369     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11370 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11371     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11372 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11373     ac_header_preproc=yes
11374     ;;
11375   no:yes:* )
11376     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11377 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11378     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11379 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11380     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11381 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11382     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11383 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11384     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11385 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11386     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11387 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11388     ( cat <<\_ASBOX
11389 ## ---------------------------------------- ##
11390 ## Report this to pgsql-bugs@postgresql.org ##
11391 ## ---------------------------------------- ##
11392 _ASBOX
11393      ) | sed "s/^/$as_me: WARNING:     /" >&2
11394     ;;
11395 esac
11396 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11397 $as_echo_n "checking for $ac_header... " >&6; }
11398 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11399   $as_echo_n "(cached) " >&6
11400 else
11401   eval "$as_ac_Header=\$ac_header_preproc"
11402 fi
11403 ac_res=`eval 'as_val=${'$as_ac_Header'}
11404                  $as_echo "$as_val"'`
11405                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11406 $as_echo "$ac_res" >&6; }
11407
11408 fi
11409 as_val=`eval 'as_val=${'$as_ac_Header'}
11410                  $as_echo "$as_val"'`
11411    if test "x$as_val" = x""yes; then
11412   cat >>confdefs.h <<_ACEOF
11413 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11414 _ACEOF
11415
11416 else
11417
11418 for ac_header in history.h
11419 do
11420 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11421 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11422   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11423 $as_echo_n "checking for $ac_header... " >&6; }
11424 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11425   $as_echo_n "(cached) " >&6
11426 fi
11427 ac_res=`eval 'as_val=${'$as_ac_Header'}
11428                  $as_echo "$as_val"'`
11429                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11430 $as_echo "$ac_res" >&6; }
11431 else
11432   # Is the header compilable?
11433 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
11434 $as_echo_n "checking $ac_header usability... " >&6; }
11435 cat >conftest.$ac_ext <<_ACEOF
11436 /* confdefs.h.  */
11437 _ACEOF
11438 cat confdefs.h >>conftest.$ac_ext
11439 cat >>conftest.$ac_ext <<_ACEOF
11440 /* end confdefs.h.  */
11441 $ac_includes_default
11442 #include <$ac_header>
11443 _ACEOF
11444 rm -f conftest.$ac_objext
11445 if { (ac_try="$ac_compile"
11446 case "(($ac_try" in
11447   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11448   *) ac_try_echo=$ac_try;;
11449 esac
11450 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11451 $as_echo "$ac_try_echo") >&5
11452   (eval "$ac_compile") 2>conftest.er1
11453   ac_status=$?
11454   grep -v '^ *+' conftest.er1 >conftest.err
11455   rm -f conftest.er1
11456   cat conftest.err >&5
11457   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11458   (exit $ac_status); } && {
11459          test -z "$ac_c_werror_flag" ||
11460          test ! -s conftest.err
11461        } && test -s conftest.$ac_objext; then
11462   ac_header_compiler=yes
11463 else
11464   $as_echo "$as_me: failed program was:" >&5
11465 sed 's/^/| /' conftest.$ac_ext >&5
11466
11467         ac_header_compiler=no
11468 fi
11469
11470 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11471 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11472 $as_echo "$ac_header_compiler" >&6; }
11473
11474 # Is the header present?
11475 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11476 $as_echo_n "checking $ac_header presence... " >&6; }
11477 cat >conftest.$ac_ext <<_ACEOF
11478 /* confdefs.h.  */
11479 _ACEOF
11480 cat confdefs.h >>conftest.$ac_ext
11481 cat >>conftest.$ac_ext <<_ACEOF
11482 /* end confdefs.h.  */
11483 #include <$ac_header>
11484 _ACEOF
11485 if { (ac_try="$ac_cpp conftest.$ac_ext"
11486 case "(($ac_try" in
11487   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11488   *) ac_try_echo=$ac_try;;
11489 esac
11490 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11491 $as_echo "$ac_try_echo") >&5
11492   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11493   ac_status=$?
11494   grep -v '^ *+' conftest.er1 >conftest.err
11495   rm -f conftest.er1
11496   cat conftest.err >&5
11497   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11498   (exit $ac_status); } >/dev/null && {
11499          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11500          test ! -s conftest.err
11501        }; then
11502   ac_header_preproc=yes
11503 else
11504   $as_echo "$as_me: failed program was:" >&5
11505 sed 's/^/| /' conftest.$ac_ext >&5
11506
11507   ac_header_preproc=no
11508 fi
11509
11510 rm -f conftest.err conftest.$ac_ext
11511 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11512 $as_echo "$ac_header_preproc" >&6; }
11513
11514 # So?  What about this header?
11515 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11516   yes:no: )
11517     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11518 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11519     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11520 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11521     ac_header_preproc=yes
11522     ;;
11523   no:yes:* )
11524     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11525 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11526     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11527 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11528     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11529 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11530     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11531 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11532     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11533 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11534     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11535 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11536     ( cat <<\_ASBOX
11537 ## ---------------------------------------- ##
11538 ## Report this to pgsql-bugs@postgresql.org ##
11539 ## ---------------------------------------- ##
11540 _ASBOX
11541      ) | sed "s/^/$as_me: WARNING:     /" >&2
11542     ;;
11543 esac
11544 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11545 $as_echo_n "checking for $ac_header... " >&6; }
11546 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11547   $as_echo_n "(cached) " >&6
11548 else
11549   eval "$as_ac_Header=\$ac_header_preproc"
11550 fi
11551 ac_res=`eval 'as_val=${'$as_ac_Header'}
11552                  $as_echo "$as_val"'`
11553                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11554 $as_echo "$ac_res" >&6; }
11555
11556 fi
11557 as_val=`eval 'as_val=${'$as_ac_Header'}
11558                  $as_echo "$as_val"'`
11559    if test "x$as_val" = x""yes; then
11560   cat >>confdefs.h <<_ACEOF
11561 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11562 _ACEOF
11563
11564 else
11565
11566 for ac_header in readline/history.h
11567 do
11568 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11569 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11570   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11571 $as_echo_n "checking for $ac_header... " >&6; }
11572 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11573   $as_echo_n "(cached) " >&6
11574 fi
11575 ac_res=`eval 'as_val=${'$as_ac_Header'}
11576                  $as_echo "$as_val"'`
11577                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11578 $as_echo "$ac_res" >&6; }
11579 else
11580   # Is the header compilable?
11581 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
11582 $as_echo_n "checking $ac_header usability... " >&6; }
11583 cat >conftest.$ac_ext <<_ACEOF
11584 /* confdefs.h.  */
11585 _ACEOF
11586 cat confdefs.h >>conftest.$ac_ext
11587 cat >>conftest.$ac_ext <<_ACEOF
11588 /* end confdefs.h.  */
11589 $ac_includes_default
11590 #include <$ac_header>
11591 _ACEOF
11592 rm -f conftest.$ac_objext
11593 if { (ac_try="$ac_compile"
11594 case "(($ac_try" in
11595   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11596   *) ac_try_echo=$ac_try;;
11597 esac
11598 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11599 $as_echo "$ac_try_echo") >&5
11600   (eval "$ac_compile") 2>conftest.er1
11601   ac_status=$?
11602   grep -v '^ *+' conftest.er1 >conftest.err
11603   rm -f conftest.er1
11604   cat conftest.err >&5
11605   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11606   (exit $ac_status); } && {
11607          test -z "$ac_c_werror_flag" ||
11608          test ! -s conftest.err
11609        } && test -s conftest.$ac_objext; then
11610   ac_header_compiler=yes
11611 else
11612   $as_echo "$as_me: failed program was:" >&5
11613 sed 's/^/| /' conftest.$ac_ext >&5
11614
11615         ac_header_compiler=no
11616 fi
11617
11618 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11619 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11620 $as_echo "$ac_header_compiler" >&6; }
11621
11622 # Is the header present?
11623 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11624 $as_echo_n "checking $ac_header presence... " >&6; }
11625 cat >conftest.$ac_ext <<_ACEOF
11626 /* confdefs.h.  */
11627 _ACEOF
11628 cat confdefs.h >>conftest.$ac_ext
11629 cat >>conftest.$ac_ext <<_ACEOF
11630 /* end confdefs.h.  */
11631 #include <$ac_header>
11632 _ACEOF
11633 if { (ac_try="$ac_cpp conftest.$ac_ext"
11634 case "(($ac_try" in
11635   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11636   *) ac_try_echo=$ac_try;;
11637 esac
11638 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11639 $as_echo "$ac_try_echo") >&5
11640   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11641   ac_status=$?
11642   grep -v '^ *+' conftest.er1 >conftest.err
11643   rm -f conftest.er1
11644   cat conftest.err >&5
11645   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11646   (exit $ac_status); } >/dev/null && {
11647          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11648          test ! -s conftest.err
11649        }; then
11650   ac_header_preproc=yes
11651 else
11652   $as_echo "$as_me: failed program was:" >&5
11653 sed 's/^/| /' conftest.$ac_ext >&5
11654
11655   ac_header_preproc=no
11656 fi
11657
11658 rm -f conftest.err conftest.$ac_ext
11659 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11660 $as_echo "$ac_header_preproc" >&6; }
11661
11662 # So?  What about this header?
11663 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11664   yes:no: )
11665     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11666 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11667     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11668 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11669     ac_header_preproc=yes
11670     ;;
11671   no:yes:* )
11672     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11673 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11674     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11675 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11676     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11677 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11678     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11679 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11680     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11681 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11682     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11683 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11684     ( cat <<\_ASBOX
11685 ## ---------------------------------------- ##
11686 ## Report this to pgsql-bugs@postgresql.org ##
11687 ## ---------------------------------------- ##
11688 _ASBOX
11689      ) | sed "s/^/$as_me: WARNING:     /" >&2
11690     ;;
11691 esac
11692 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11693 $as_echo_n "checking for $ac_header... " >&6; }
11694 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11695   $as_echo_n "(cached) " >&6
11696 else
11697   eval "$as_ac_Header=\$ac_header_preproc"
11698 fi
11699 ac_res=`eval 'as_val=${'$as_ac_Header'}
11700                  $as_echo "$as_val"'`
11701                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11702 $as_echo "$ac_res" >&6; }
11703
11704 fi
11705 as_val=`eval 'as_val=${'$as_ac_Header'}
11706                  $as_echo "$as_val"'`
11707    if test "x$as_val" = x""yes; then
11708   cat >>confdefs.h <<_ACEOF
11709 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11710 _ACEOF
11711
11712 fi
11713
11714 done
11715
11716 fi
11717
11718 done
11719
11720 fi
11721
11722 done
11723
11724 fi
11725
11726 if test "$with_zlib" = yes; then
11727   if test "${ac_cv_header_zlib_h+set}" = set; then
11728   { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
11729 $as_echo_n "checking for zlib.h... " >&6; }
11730 if test "${ac_cv_header_zlib_h+set}" = set; then
11731   $as_echo_n "(cached) " >&6
11732 fi
11733 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
11734 $as_echo "$ac_cv_header_zlib_h" >&6; }
11735 else
11736   # Is the header compilable?
11737 { $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5
11738 $as_echo_n "checking zlib.h usability... " >&6; }
11739 cat >conftest.$ac_ext <<_ACEOF
11740 /* confdefs.h.  */
11741 _ACEOF
11742 cat confdefs.h >>conftest.$ac_ext
11743 cat >>conftest.$ac_ext <<_ACEOF
11744 /* end confdefs.h.  */
11745 $ac_includes_default
11746 #include <zlib.h>
11747 _ACEOF
11748 rm -f conftest.$ac_objext
11749 if { (ac_try="$ac_compile"
11750 case "(($ac_try" in
11751   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11752   *) ac_try_echo=$ac_try;;
11753 esac
11754 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11755 $as_echo "$ac_try_echo") >&5
11756   (eval "$ac_compile") 2>conftest.er1
11757   ac_status=$?
11758   grep -v '^ *+' conftest.er1 >conftest.err
11759   rm -f conftest.er1
11760   cat conftest.err >&5
11761   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11762   (exit $ac_status); } && {
11763          test -z "$ac_c_werror_flag" ||
11764          test ! -s conftest.err
11765        } && test -s conftest.$ac_objext; then
11766   ac_header_compiler=yes
11767 else
11768   $as_echo "$as_me: failed program was:" >&5
11769 sed 's/^/| /' conftest.$ac_ext >&5
11770
11771         ac_header_compiler=no
11772 fi
11773
11774 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11775 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11776 $as_echo "$ac_header_compiler" >&6; }
11777
11778 # Is the header present?
11779 { $as_echo "$as_me:$LINENO: checking zlib.h presence" >&5
11780 $as_echo_n "checking zlib.h presence... " >&6; }
11781 cat >conftest.$ac_ext <<_ACEOF
11782 /* confdefs.h.  */
11783 _ACEOF
11784 cat confdefs.h >>conftest.$ac_ext
11785 cat >>conftest.$ac_ext <<_ACEOF
11786 /* end confdefs.h.  */
11787 #include <zlib.h>
11788 _ACEOF
11789 if { (ac_try="$ac_cpp conftest.$ac_ext"
11790 case "(($ac_try" in
11791   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11792   *) ac_try_echo=$ac_try;;
11793 esac
11794 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11795 $as_echo "$ac_try_echo") >&5
11796   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11797   ac_status=$?
11798   grep -v '^ *+' conftest.er1 >conftest.err
11799   rm -f conftest.er1
11800   cat conftest.err >&5
11801   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11802   (exit $ac_status); } >/dev/null && {
11803          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11804          test ! -s conftest.err
11805        }; then
11806   ac_header_preproc=yes
11807 else
11808   $as_echo "$as_me: failed program was:" >&5
11809 sed 's/^/| /' conftest.$ac_ext >&5
11810
11811   ac_header_preproc=no
11812 fi
11813
11814 rm -f conftest.err conftest.$ac_ext
11815 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11816 $as_echo "$ac_header_preproc" >&6; }
11817
11818 # So?  What about this header?
11819 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11820   yes:no: )
11821     { $as_echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
11822 $as_echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11823     { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
11824 $as_echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
11825     ac_header_preproc=yes
11826     ;;
11827   no:yes:* )
11828     { $as_echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
11829 $as_echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
11830     { $as_echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
11831 $as_echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
11832     { $as_echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
11833 $as_echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
11834     { $as_echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
11835 $as_echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
11836     { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
11837 $as_echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
11838     { $as_echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
11839 $as_echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
11840     ( cat <<\_ASBOX
11841 ## ---------------------------------------- ##
11842 ## Report this to pgsql-bugs@postgresql.org ##
11843 ## ---------------------------------------- ##
11844 _ASBOX
11845      ) | sed "s/^/$as_me: WARNING:     /" >&2
11846     ;;
11847 esac
11848 { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
11849 $as_echo_n "checking for zlib.h... " >&6; }
11850 if test "${ac_cv_header_zlib_h+set}" = set; then
11851   $as_echo_n "(cached) " >&6
11852 else
11853   ac_cv_header_zlib_h=$ac_header_preproc
11854 fi
11855 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
11856 $as_echo "$ac_cv_header_zlib_h" >&6; }
11857
11858 fi
11859 if test "x$ac_cv_header_zlib_h" = x""yes; then
11860   :
11861 else
11862   { { $as_echo "$as_me:$LINENO: error: zlib header not found
11863 If you have zlib already installed, see config.log for details on the
11864 failure.  It is possible the compiler isn't looking in the proper directory.
11865 Use --without-zlib to disable zlib support." >&5
11866 $as_echo "$as_me: error: zlib header not found
11867 If you have zlib already installed, see config.log for details on the
11868 failure.  It is possible the compiler isn't looking in the proper directory.
11869 Use --without-zlib to disable zlib support." >&2;}
11870    { (exit 1); exit 1; }; }
11871 fi
11872
11873
11874 fi
11875
11876 if test "$with_gssapi" = yes ; then
11877
11878 for ac_header in gssapi/gssapi.h
11879 do
11880 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11881 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11882   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11883 $as_echo_n "checking for $ac_header... " >&6; }
11884 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11885   $as_echo_n "(cached) " >&6
11886 fi
11887 ac_res=`eval 'as_val=${'$as_ac_Header'}
11888                  $as_echo "$as_val"'`
11889                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11890 $as_echo "$ac_res" >&6; }
11891 else
11892   # Is the header compilable?
11893 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
11894 $as_echo_n "checking $ac_header usability... " >&6; }
11895 cat >conftest.$ac_ext <<_ACEOF
11896 /* confdefs.h.  */
11897 _ACEOF
11898 cat confdefs.h >>conftest.$ac_ext
11899 cat >>conftest.$ac_ext <<_ACEOF
11900 /* end confdefs.h.  */
11901 $ac_includes_default
11902 #include <$ac_header>
11903 _ACEOF
11904 rm -f conftest.$ac_objext
11905 if { (ac_try="$ac_compile"
11906 case "(($ac_try" in
11907   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11908   *) ac_try_echo=$ac_try;;
11909 esac
11910 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11911 $as_echo "$ac_try_echo") >&5
11912   (eval "$ac_compile") 2>conftest.er1
11913   ac_status=$?
11914   grep -v '^ *+' conftest.er1 >conftest.err
11915   rm -f conftest.er1
11916   cat conftest.err >&5
11917   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11918   (exit $ac_status); } && {
11919          test -z "$ac_c_werror_flag" ||
11920          test ! -s conftest.err
11921        } && test -s conftest.$ac_objext; then
11922   ac_header_compiler=yes
11923 else
11924   $as_echo "$as_me: failed program was:" >&5
11925 sed 's/^/| /' conftest.$ac_ext >&5
11926
11927         ac_header_compiler=no
11928 fi
11929
11930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11931 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11932 $as_echo "$ac_header_compiler" >&6; }
11933
11934 # Is the header present?
11935 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11936 $as_echo_n "checking $ac_header presence... " >&6; }
11937 cat >conftest.$ac_ext <<_ACEOF
11938 /* confdefs.h.  */
11939 _ACEOF
11940 cat confdefs.h >>conftest.$ac_ext
11941 cat >>conftest.$ac_ext <<_ACEOF
11942 /* end confdefs.h.  */
11943 #include <$ac_header>
11944 _ACEOF
11945 if { (ac_try="$ac_cpp conftest.$ac_ext"
11946 case "(($ac_try" in
11947   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11948   *) ac_try_echo=$ac_try;;
11949 esac
11950 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11951 $as_echo "$ac_try_echo") >&5
11952   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11953   ac_status=$?
11954   grep -v '^ *+' conftest.er1 >conftest.err
11955   rm -f conftest.er1
11956   cat conftest.err >&5
11957   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11958   (exit $ac_status); } >/dev/null && {
11959          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11960          test ! -s conftest.err
11961        }; then
11962   ac_header_preproc=yes
11963 else
11964   $as_echo "$as_me: failed program was:" >&5
11965 sed 's/^/| /' conftest.$ac_ext >&5
11966
11967   ac_header_preproc=no
11968 fi
11969
11970 rm -f conftest.err conftest.$ac_ext
11971 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11972 $as_echo "$ac_header_preproc" >&6; }
11973
11974 # So?  What about this header?
11975 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11976   yes:no: )
11977     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11978 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11979     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11980 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11981     ac_header_preproc=yes
11982     ;;
11983   no:yes:* )
11984     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11985 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11986     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11987 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11988     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11989 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11990     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11991 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11992     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11993 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11994     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11995 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11996     ( cat <<\_ASBOX
11997 ## ---------------------------------------- ##
11998 ## Report this to pgsql-bugs@postgresql.org ##
11999 ## ---------------------------------------- ##
12000 _ASBOX
12001      ) | sed "s/^/$as_me: WARNING:     /" >&2
12002     ;;
12003 esac
12004 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12005 $as_echo_n "checking for $ac_header... " >&6; }
12006 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12007   $as_echo_n "(cached) " >&6
12008 else
12009   eval "$as_ac_Header=\$ac_header_preproc"
12010 fi
12011 ac_res=`eval 'as_val=${'$as_ac_Header'}
12012                  $as_echo "$as_val"'`
12013                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12014 $as_echo "$ac_res" >&6; }
12015
12016 fi
12017 as_val=`eval 'as_val=${'$as_ac_Header'}
12018                  $as_echo "$as_val"'`
12019    if test "x$as_val" = x""yes; then
12020   cat >>confdefs.h <<_ACEOF
12021 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12022 _ACEOF
12023
12024 else
12025
12026 for ac_header in gssapi.h
12027 do
12028 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12029 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12030   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12031 $as_echo_n "checking for $ac_header... " >&6; }
12032 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12033   $as_echo_n "(cached) " >&6
12034 fi
12035 ac_res=`eval 'as_val=${'$as_ac_Header'}
12036                  $as_echo "$as_val"'`
12037                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12038 $as_echo "$ac_res" >&6; }
12039 else
12040   # Is the header compilable?
12041 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
12042 $as_echo_n "checking $ac_header usability... " >&6; }
12043 cat >conftest.$ac_ext <<_ACEOF
12044 /* confdefs.h.  */
12045 _ACEOF
12046 cat confdefs.h >>conftest.$ac_ext
12047 cat >>conftest.$ac_ext <<_ACEOF
12048 /* end confdefs.h.  */
12049 $ac_includes_default
12050 #include <$ac_header>
12051 _ACEOF
12052 rm -f conftest.$ac_objext
12053 if { (ac_try="$ac_compile"
12054 case "(($ac_try" in
12055   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12056   *) ac_try_echo=$ac_try;;
12057 esac
12058 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12059 $as_echo "$ac_try_echo") >&5
12060   (eval "$ac_compile") 2>conftest.er1
12061   ac_status=$?
12062   grep -v '^ *+' conftest.er1 >conftest.err
12063   rm -f conftest.er1
12064   cat conftest.err >&5
12065   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12066   (exit $ac_status); } && {
12067          test -z "$ac_c_werror_flag" ||
12068          test ! -s conftest.err
12069        } && test -s conftest.$ac_objext; then
12070   ac_header_compiler=yes
12071 else
12072   $as_echo "$as_me: failed program was:" >&5
12073 sed 's/^/| /' conftest.$ac_ext >&5
12074
12075         ac_header_compiler=no
12076 fi
12077
12078 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12079 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12080 $as_echo "$ac_header_compiler" >&6; }
12081
12082 # Is the header present?
12083 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
12084 $as_echo_n "checking $ac_header presence... " >&6; }
12085 cat >conftest.$ac_ext <<_ACEOF
12086 /* confdefs.h.  */
12087 _ACEOF
12088 cat confdefs.h >>conftest.$ac_ext
12089 cat >>conftest.$ac_ext <<_ACEOF
12090 /* end confdefs.h.  */
12091 #include <$ac_header>
12092 _ACEOF
12093 if { (ac_try="$ac_cpp conftest.$ac_ext"
12094 case "(($ac_try" in
12095   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12096   *) ac_try_echo=$ac_try;;
12097 esac
12098 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12099 $as_echo "$ac_try_echo") >&5
12100   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12101   ac_status=$?
12102   grep -v '^ *+' conftest.er1 >conftest.err
12103   rm -f conftest.er1
12104   cat conftest.err >&5
12105   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12106   (exit $ac_status); } >/dev/null && {
12107          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12108          test ! -s conftest.err
12109        }; then
12110   ac_header_preproc=yes
12111 else
12112   $as_echo "$as_me: failed program was:" >&5
12113 sed 's/^/| /' conftest.$ac_ext >&5
12114
12115   ac_header_preproc=no
12116 fi
12117
12118 rm -f conftest.err conftest.$ac_ext
12119 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12120 $as_echo "$ac_header_preproc" >&6; }
12121
12122 # So?  What about this header?
12123 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12124   yes:no: )
12125     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12126 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12127     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12128 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12129     ac_header_preproc=yes
12130     ;;
12131   no:yes:* )
12132     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12133 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12134     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12135 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12136     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12137 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12138     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12139 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12140     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12141 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12142     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12143 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12144     ( cat <<\_ASBOX
12145 ## ---------------------------------------- ##
12146 ## Report this to pgsql-bugs@postgresql.org ##
12147 ## ---------------------------------------- ##
12148 _ASBOX
12149      ) | sed "s/^/$as_me: WARNING:     /" >&2
12150     ;;
12151 esac
12152 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12153 $as_echo_n "checking for $ac_header... " >&6; }
12154 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12155   $as_echo_n "(cached) " >&6
12156 else
12157   eval "$as_ac_Header=\$ac_header_preproc"
12158 fi
12159 ac_res=`eval 'as_val=${'$as_ac_Header'}
12160                  $as_echo "$as_val"'`
12161                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12162 $as_echo "$ac_res" >&6; }
12163
12164 fi
12165 as_val=`eval 'as_val=${'$as_ac_Header'}
12166                  $as_echo "$as_val"'`
12167    if test "x$as_val" = x""yes; then
12168   cat >>confdefs.h <<_ACEOF
12169 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12170 _ACEOF
12171
12172 else
12173   { { $as_echo "$as_me:$LINENO: error: gssapi.h header file is required for GSSAPI" >&5
12174 $as_echo "$as_me: error: gssapi.h header file is required for GSSAPI" >&2;}
12175    { (exit 1); exit 1; }; }
12176 fi
12177
12178 done
12179
12180 fi
12181
12182 done
12183
12184 fi
12185
12186 if test "$with_krb5" = yes ; then
12187   if test "${ac_cv_header_krb5_h+set}" = set; then
12188   { $as_echo "$as_me:$LINENO: checking for krb5.h" >&5
12189 $as_echo_n "checking for krb5.h... " >&6; }
12190 if test "${ac_cv_header_krb5_h+set}" = set; then
12191   $as_echo_n "(cached) " >&6
12192 fi
12193 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
12194 $as_echo "$ac_cv_header_krb5_h" >&6; }
12195 else
12196   # Is the header compilable?
12197 { $as_echo "$as_me:$LINENO: checking krb5.h usability" >&5
12198 $as_echo_n "checking krb5.h usability... " >&6; }
12199 cat >conftest.$ac_ext <<_ACEOF
12200 /* confdefs.h.  */
12201 _ACEOF
12202 cat confdefs.h >>conftest.$ac_ext
12203 cat >>conftest.$ac_ext <<_ACEOF
12204 /* end confdefs.h.  */
12205 $ac_includes_default
12206 #include <krb5.h>
12207 _ACEOF
12208 rm -f conftest.$ac_objext
12209 if { (ac_try="$ac_compile"
12210 case "(($ac_try" in
12211   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12212   *) ac_try_echo=$ac_try;;
12213 esac
12214 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12215 $as_echo "$ac_try_echo") >&5
12216   (eval "$ac_compile") 2>conftest.er1
12217   ac_status=$?
12218   grep -v '^ *+' conftest.er1 >conftest.err
12219   rm -f conftest.er1
12220   cat conftest.err >&5
12221   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12222   (exit $ac_status); } && {
12223          test -z "$ac_c_werror_flag" ||
12224          test ! -s conftest.err
12225        } && test -s conftest.$ac_objext; then
12226   ac_header_compiler=yes
12227 else
12228   $as_echo "$as_me: failed program was:" >&5
12229 sed 's/^/| /' conftest.$ac_ext >&5
12230
12231         ac_header_compiler=no
12232 fi
12233
12234 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12235 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12236 $as_echo "$ac_header_compiler" >&6; }
12237
12238 # Is the header present?
12239 { $as_echo "$as_me:$LINENO: checking krb5.h presence" >&5
12240 $as_echo_n "checking krb5.h presence... " >&6; }
12241 cat >conftest.$ac_ext <<_ACEOF
12242 /* confdefs.h.  */
12243 _ACEOF
12244 cat confdefs.h >>conftest.$ac_ext
12245 cat >>conftest.$ac_ext <<_ACEOF
12246 /* end confdefs.h.  */
12247 #include <krb5.h>
12248 _ACEOF
12249 if { (ac_try="$ac_cpp conftest.$ac_ext"
12250 case "(($ac_try" in
12251   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12252   *) ac_try_echo=$ac_try;;
12253 esac
12254 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12255 $as_echo "$ac_try_echo") >&5
12256   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12257   ac_status=$?
12258   grep -v '^ *+' conftest.er1 >conftest.err
12259   rm -f conftest.er1
12260   cat conftest.err >&5
12261   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12262   (exit $ac_status); } >/dev/null && {
12263          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12264          test ! -s conftest.err
12265        }; then
12266   ac_header_preproc=yes
12267 else
12268   $as_echo "$as_me: failed program was:" >&5
12269 sed 's/^/| /' conftest.$ac_ext >&5
12270
12271   ac_header_preproc=no
12272 fi
12273
12274 rm -f conftest.err conftest.$ac_ext
12275 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12276 $as_echo "$ac_header_preproc" >&6; }
12277
12278 # So?  What about this header?
12279 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12280   yes:no: )
12281     { $as_echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
12282 $as_echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12283     { $as_echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the compiler's result" >&5
12284 $as_echo "$as_me: WARNING: krb5.h: proceeding with the compiler's result" >&2;}
12285     ac_header_preproc=yes
12286     ;;
12287   no:yes:* )
12288     { $as_echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
12289 $as_echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
12290     { $as_echo "$as_me:$LINENO: WARNING: krb5.h:     check for missing prerequisite headers?" >&5
12291 $as_echo "$as_me: WARNING: krb5.h:     check for missing prerequisite headers?" >&2;}
12292     { $as_echo "$as_me:$LINENO: WARNING: krb5.h: see the Autoconf documentation" >&5
12293 $as_echo "$as_me: WARNING: krb5.h: see the Autoconf documentation" >&2;}
12294     { $as_echo "$as_me:$LINENO: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
12295 $as_echo "$as_me: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
12296     { $as_echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
12297 $as_echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
12298     { $as_echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
12299 $as_echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
12300     ( cat <<\_ASBOX
12301 ## ---------------------------------------- ##
12302 ## Report this to pgsql-bugs@postgresql.org ##
12303 ## ---------------------------------------- ##
12304 _ASBOX
12305      ) | sed "s/^/$as_me: WARNING:     /" >&2
12306     ;;
12307 esac
12308 { $as_echo "$as_me:$LINENO: checking for krb5.h" >&5
12309 $as_echo_n "checking for krb5.h... " >&6; }
12310 if test "${ac_cv_header_krb5_h+set}" = set; then
12311   $as_echo_n "(cached) " >&6
12312 else
12313   ac_cv_header_krb5_h=$ac_header_preproc
12314 fi
12315 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
12316 $as_echo "$ac_cv_header_krb5_h" >&6; }
12317
12318 fi
12319 if test "x$ac_cv_header_krb5_h" = x""yes; then
12320   :
12321 else
12322   { { $as_echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
12323 $as_echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
12324    { (exit 1); exit 1; }; }
12325 fi
12326
12327
12328 fi
12329
12330 if test "$with_openssl" = yes ; then
12331   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
12332   { $as_echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
12333 $as_echo_n "checking for openssl/ssl.h... " >&6; }
12334 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
12335   $as_echo_n "(cached) " >&6
12336 fi
12337 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
12338 $as_echo "$ac_cv_header_openssl_ssl_h" >&6; }
12339 else
12340   # Is the header compilable?
12341 { $as_echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
12342 $as_echo_n "checking openssl/ssl.h usability... " >&6; }
12343 cat >conftest.$ac_ext <<_ACEOF
12344 /* confdefs.h.  */
12345 _ACEOF
12346 cat confdefs.h >>conftest.$ac_ext
12347 cat >>conftest.$ac_ext <<_ACEOF
12348 /* end confdefs.h.  */
12349 $ac_includes_default
12350 #include <openssl/ssl.h>
12351 _ACEOF
12352 rm -f conftest.$ac_objext
12353 if { (ac_try="$ac_compile"
12354 case "(($ac_try" in
12355   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12356   *) ac_try_echo=$ac_try;;
12357 esac
12358 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12359 $as_echo "$ac_try_echo") >&5
12360   (eval "$ac_compile") 2>conftest.er1
12361   ac_status=$?
12362   grep -v '^ *+' conftest.er1 >conftest.err
12363   rm -f conftest.er1
12364   cat conftest.err >&5
12365   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12366   (exit $ac_status); } && {
12367          test -z "$ac_c_werror_flag" ||
12368          test ! -s conftest.err
12369        } && test -s conftest.$ac_objext; then
12370   ac_header_compiler=yes
12371 else
12372   $as_echo "$as_me: failed program was:" >&5
12373 sed 's/^/| /' conftest.$ac_ext >&5
12374
12375         ac_header_compiler=no
12376 fi
12377
12378 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12379 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12380 $as_echo "$ac_header_compiler" >&6; }
12381
12382 # Is the header present?
12383 { $as_echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
12384 $as_echo_n "checking openssl/ssl.h presence... " >&6; }
12385 cat >conftest.$ac_ext <<_ACEOF
12386 /* confdefs.h.  */
12387 _ACEOF
12388 cat confdefs.h >>conftest.$ac_ext
12389 cat >>conftest.$ac_ext <<_ACEOF
12390 /* end confdefs.h.  */
12391 #include <openssl/ssl.h>
12392 _ACEOF
12393 if { (ac_try="$ac_cpp conftest.$ac_ext"
12394 case "(($ac_try" in
12395   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12396   *) ac_try_echo=$ac_try;;
12397 esac
12398 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12399 $as_echo "$ac_try_echo") >&5
12400   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12401   ac_status=$?
12402   grep -v '^ *+' conftest.er1 >conftest.err
12403   rm -f conftest.er1
12404   cat conftest.err >&5
12405   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12406   (exit $ac_status); } >/dev/null && {
12407          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12408          test ! -s conftest.err
12409        }; then
12410   ac_header_preproc=yes
12411 else
12412   $as_echo "$as_me: failed program was:" >&5
12413 sed 's/^/| /' conftest.$ac_ext >&5
12414
12415   ac_header_preproc=no
12416 fi
12417
12418 rm -f conftest.err conftest.$ac_ext
12419 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12420 $as_echo "$ac_header_preproc" >&6; }
12421
12422 # So?  What about this header?
12423 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12424   yes:no: )
12425     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
12426 $as_echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12427     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
12428 $as_echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
12429     ac_header_preproc=yes
12430     ;;
12431   no:yes:* )
12432     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
12433 $as_echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
12434     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
12435 $as_echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
12436     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
12437 $as_echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
12438     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
12439 $as_echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
12440     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
12441 $as_echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
12442     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
12443 $as_echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
12444     ( cat <<\_ASBOX
12445 ## ---------------------------------------- ##
12446 ## Report this to pgsql-bugs@postgresql.org ##
12447 ## ---------------------------------------- ##
12448 _ASBOX
12449      ) | sed "s/^/$as_me: WARNING:     /" >&2
12450     ;;
12451 esac
12452 { $as_echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
12453 $as_echo_n "checking for openssl/ssl.h... " >&6; }
12454 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
12455   $as_echo_n "(cached) " >&6
12456 else
12457   ac_cv_header_openssl_ssl_h=$ac_header_preproc
12458 fi
12459 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
12460 $as_echo "$ac_cv_header_openssl_ssl_h" >&6; }
12461
12462 fi
12463 if test "x$ac_cv_header_openssl_ssl_h" = x""yes; then
12464   :
12465 else
12466   { { $as_echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
12467 $as_echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
12468    { (exit 1); exit 1; }; }
12469 fi
12470
12471
12472   if test "${ac_cv_header_openssl_err_h+set}" = set; then
12473   { $as_echo "$as_me:$LINENO: checking for openssl/err.h" >&5
12474 $as_echo_n "checking for openssl/err.h... " >&6; }
12475 if test "${ac_cv_header_openssl_err_h+set}" = set; then
12476   $as_echo_n "(cached) " >&6
12477 fi
12478 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
12479 $as_echo "$ac_cv_header_openssl_err_h" >&6; }
12480 else
12481   # Is the header compilable?
12482 { $as_echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
12483 $as_echo_n "checking openssl/err.h usability... " >&6; }
12484 cat >conftest.$ac_ext <<_ACEOF
12485 /* confdefs.h.  */
12486 _ACEOF
12487 cat confdefs.h >>conftest.$ac_ext
12488 cat >>conftest.$ac_ext <<_ACEOF
12489 /* end confdefs.h.  */
12490 $ac_includes_default
12491 #include <openssl/err.h>
12492 _ACEOF
12493 rm -f conftest.$ac_objext
12494 if { (ac_try="$ac_compile"
12495 case "(($ac_try" in
12496   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12497   *) ac_try_echo=$ac_try;;
12498 esac
12499 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12500 $as_echo "$ac_try_echo") >&5
12501   (eval "$ac_compile") 2>conftest.er1
12502   ac_status=$?
12503   grep -v '^ *+' conftest.er1 >conftest.err
12504   rm -f conftest.er1
12505   cat conftest.err >&5
12506   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12507   (exit $ac_status); } && {
12508          test -z "$ac_c_werror_flag" ||
12509          test ! -s conftest.err
12510        } && test -s conftest.$ac_objext; then
12511   ac_header_compiler=yes
12512 else
12513   $as_echo "$as_me: failed program was:" >&5
12514 sed 's/^/| /' conftest.$ac_ext >&5
12515
12516         ac_header_compiler=no
12517 fi
12518
12519 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12520 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12521 $as_echo "$ac_header_compiler" >&6; }
12522
12523 # Is the header present?
12524 { $as_echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
12525 $as_echo_n "checking openssl/err.h presence... " >&6; }
12526 cat >conftest.$ac_ext <<_ACEOF
12527 /* confdefs.h.  */
12528 _ACEOF
12529 cat confdefs.h >>conftest.$ac_ext
12530 cat >>conftest.$ac_ext <<_ACEOF
12531 /* end confdefs.h.  */
12532 #include <openssl/err.h>
12533 _ACEOF
12534 if { (ac_try="$ac_cpp conftest.$ac_ext"
12535 case "(($ac_try" in
12536   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12537   *) ac_try_echo=$ac_try;;
12538 esac
12539 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12540 $as_echo "$ac_try_echo") >&5
12541   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12542   ac_status=$?
12543   grep -v '^ *+' conftest.er1 >conftest.err
12544   rm -f conftest.er1
12545   cat conftest.err >&5
12546   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12547   (exit $ac_status); } >/dev/null && {
12548          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12549          test ! -s conftest.err
12550        }; then
12551   ac_header_preproc=yes
12552 else
12553   $as_echo "$as_me: failed program was:" >&5
12554 sed 's/^/| /' conftest.$ac_ext >&5
12555
12556   ac_header_preproc=no
12557 fi
12558
12559 rm -f conftest.err conftest.$ac_ext
12560 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12561 $as_echo "$ac_header_preproc" >&6; }
12562
12563 # So?  What about this header?
12564 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12565   yes:no: )
12566     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
12567 $as_echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12568     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5
12569 $as_echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;}
12570     ac_header_preproc=yes
12571     ;;
12572   no:yes:* )
12573     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
12574 $as_echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
12575     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&5
12576 $as_echo "$as_me: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&2;}
12577     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5
12578 $as_echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;}
12579     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&5
12580 $as_echo "$as_me: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&2;}
12581     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
12582 $as_echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;}
12583     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5
12584 $as_echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;}
12585     ( cat <<\_ASBOX
12586 ## ---------------------------------------- ##
12587 ## Report this to pgsql-bugs@postgresql.org ##
12588 ## ---------------------------------------- ##
12589 _ASBOX
12590      ) | sed "s/^/$as_me: WARNING:     /" >&2
12591     ;;
12592 esac
12593 { $as_echo "$as_me:$LINENO: checking for openssl/err.h" >&5
12594 $as_echo_n "checking for openssl/err.h... " >&6; }
12595 if test "${ac_cv_header_openssl_err_h+set}" = set; then
12596   $as_echo_n "(cached) " >&6
12597 else
12598   ac_cv_header_openssl_err_h=$ac_header_preproc
12599 fi
12600 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
12601 $as_echo "$ac_cv_header_openssl_err_h" >&6; }
12602
12603 fi
12604 if test "x$ac_cv_header_openssl_err_h" = x""yes; then
12605   :
12606 else
12607   { { $as_echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
12608 $as_echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
12609    { (exit 1); exit 1; }; }
12610 fi
12611
12612
12613
12614 for ac_func in ERR_set_mark
12615 do
12616 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12617 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
12618 $as_echo_n "checking for $ac_func... " >&6; }
12619 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
12620   $as_echo_n "(cached) " >&6
12621 else
12622   cat >conftest.$ac_ext <<_ACEOF
12623 /* confdefs.h.  */
12624 _ACEOF
12625 cat confdefs.h >>conftest.$ac_ext
12626 cat >>conftest.$ac_ext <<_ACEOF
12627 /* end confdefs.h.  */
12628 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
12629    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
12630 #define $ac_func innocuous_$ac_func
12631
12632 /* System header to define __stub macros and hopefully few prototypes,
12633     which can conflict with char $ac_func (); below.
12634     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12635     <limits.h> exists even on freestanding compilers.  */
12636
12637 #ifdef __STDC__
12638 # include <limits.h>
12639 #else
12640 # include <assert.h>
12641 #endif
12642
12643 #undef $ac_func
12644
12645 /* Override any GCC internal prototype to avoid an error.
12646    Use char because int might match the return type of a GCC
12647    builtin and then its argument prototype would still apply.  */
12648 #ifdef __cplusplus
12649 extern "C"
12650 #endif
12651 char $ac_func ();
12652 /* The GNU C library defines this for functions which it implements
12653     to always fail with ENOSYS.  Some functions are actually named
12654     something starting with __ and the normal name is an alias.  */
12655 #if defined __stub_$ac_func || defined __stub___$ac_func
12656 choke me
12657 #endif
12658
12659 int
12660 main ()
12661 {
12662 return $ac_func ();
12663   ;
12664   return 0;
12665 }
12666 _ACEOF
12667 rm -f conftest.$ac_objext conftest$ac_exeext
12668 if { (ac_try="$ac_link"
12669 case "(($ac_try" in
12670   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12671   *) ac_try_echo=$ac_try;;
12672 esac
12673 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12674 $as_echo "$ac_try_echo") >&5
12675   (eval "$ac_link") 2>conftest.er1
12676   ac_status=$?
12677   grep -v '^ *+' conftest.er1 >conftest.err
12678   rm -f conftest.er1
12679   cat conftest.err >&5
12680   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12681   (exit $ac_status); } && {
12682          test -z "$ac_c_werror_flag" ||
12683          test ! -s conftest.err
12684        } && test -s conftest$ac_exeext && {
12685          test "$cross_compiling" = yes ||
12686          $as_test_x conftest$ac_exeext
12687        }; then
12688   eval "$as_ac_var=yes"
12689 else
12690   $as_echo "$as_me: failed program was:" >&5
12691 sed 's/^/| /' conftest.$ac_ext >&5
12692
12693         eval "$as_ac_var=no"
12694 fi
12695
12696 rm -rf conftest.dSYM
12697 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12698       conftest$ac_exeext conftest.$ac_ext
12699 fi
12700 ac_res=`eval 'as_val=${'$as_ac_var'}
12701                  $as_echo "$as_val"'`
12702                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12703 $as_echo "$ac_res" >&6; }
12704 as_val=`eval 'as_val=${'$as_ac_var'}
12705                  $as_echo "$as_val"'`
12706    if test "x$as_val" = x""yes; then
12707   cat >>confdefs.h <<_ACEOF
12708 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12709 _ACEOF
12710
12711 fi
12712 done
12713
12714 fi
12715
12716 if test "$with_pam" = yes ; then
12717
12718 for ac_header in security/pam_appl.h
12719 do
12720 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12721 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12722   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12723 $as_echo_n "checking for $ac_header... " >&6; }
12724 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12725   $as_echo_n "(cached) " >&6
12726 fi
12727 ac_res=`eval 'as_val=${'$as_ac_Header'}
12728                  $as_echo "$as_val"'`
12729                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12730 $as_echo "$ac_res" >&6; }
12731 else
12732   # Is the header compilable?
12733 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
12734 $as_echo_n "checking $ac_header usability... " >&6; }
12735 cat >conftest.$ac_ext <<_ACEOF
12736 /* confdefs.h.  */
12737 _ACEOF
12738 cat confdefs.h >>conftest.$ac_ext
12739 cat >>conftest.$ac_ext <<_ACEOF
12740 /* end confdefs.h.  */
12741 $ac_includes_default
12742 #include <$ac_header>
12743 _ACEOF
12744 rm -f conftest.$ac_objext
12745 if { (ac_try="$ac_compile"
12746 case "(($ac_try" in
12747   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12748   *) ac_try_echo=$ac_try;;
12749 esac
12750 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12751 $as_echo "$ac_try_echo") >&5
12752   (eval "$ac_compile") 2>conftest.er1
12753   ac_status=$?
12754   grep -v '^ *+' conftest.er1 >conftest.err
12755   rm -f conftest.er1
12756   cat conftest.err >&5
12757   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12758   (exit $ac_status); } && {
12759          test -z "$ac_c_werror_flag" ||
12760          test ! -s conftest.err
12761        } && test -s conftest.$ac_objext; then
12762   ac_header_compiler=yes
12763 else
12764   $as_echo "$as_me: failed program was:" >&5
12765 sed 's/^/| /' conftest.$ac_ext >&5
12766
12767         ac_header_compiler=no
12768 fi
12769
12770 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12771 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12772 $as_echo "$ac_header_compiler" >&6; }
12773
12774 # Is the header present?
12775 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
12776 $as_echo_n "checking $ac_header presence... " >&6; }
12777 cat >conftest.$ac_ext <<_ACEOF
12778 /* confdefs.h.  */
12779 _ACEOF
12780 cat confdefs.h >>conftest.$ac_ext
12781 cat >>conftest.$ac_ext <<_ACEOF
12782 /* end confdefs.h.  */
12783 #include <$ac_header>
12784 _ACEOF
12785 if { (ac_try="$ac_cpp conftest.$ac_ext"
12786 case "(($ac_try" in
12787   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12788   *) ac_try_echo=$ac_try;;
12789 esac
12790 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12791 $as_echo "$ac_try_echo") >&5
12792   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12793   ac_status=$?
12794   grep -v '^ *+' conftest.er1 >conftest.err
12795   rm -f conftest.er1
12796   cat conftest.err >&5
12797   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12798   (exit $ac_status); } >/dev/null && {
12799          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12800          test ! -s conftest.err
12801        }; then
12802   ac_header_preproc=yes
12803 else
12804   $as_echo "$as_me: failed program was:" >&5
12805 sed 's/^/| /' conftest.$ac_ext >&5
12806
12807   ac_header_preproc=no
12808 fi
12809
12810 rm -f conftest.err conftest.$ac_ext
12811 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12812 $as_echo "$ac_header_preproc" >&6; }
12813
12814 # So?  What about this header?
12815 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12816   yes:no: )
12817     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12818 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12819     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12820 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12821     ac_header_preproc=yes
12822     ;;
12823   no:yes:* )
12824     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12825 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12826     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12827 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12828     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12829 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12830     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12831 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12832     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12833 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12834     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12835 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12836     ( cat <<\_ASBOX
12837 ## ---------------------------------------- ##
12838 ## Report this to pgsql-bugs@postgresql.org ##
12839 ## ---------------------------------------- ##
12840 _ASBOX
12841      ) | sed "s/^/$as_me: WARNING:     /" >&2
12842     ;;
12843 esac
12844 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12845 $as_echo_n "checking for $ac_header... " >&6; }
12846 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12847   $as_echo_n "(cached) " >&6
12848 else
12849   eval "$as_ac_Header=\$ac_header_preproc"
12850 fi
12851 ac_res=`eval 'as_val=${'$as_ac_Header'}
12852                  $as_echo "$as_val"'`
12853                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12854 $as_echo "$ac_res" >&6; }
12855
12856 fi
12857 as_val=`eval 'as_val=${'$as_ac_Header'}
12858                  $as_echo "$as_val"'`
12859    if test "x$as_val" = x""yes; then
12860   cat >>confdefs.h <<_ACEOF
12861 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12862 _ACEOF
12863
12864 else
12865
12866 for ac_header in pam/pam_appl.h
12867 do
12868 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12869 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12870   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12871 $as_echo_n "checking for $ac_header... " >&6; }
12872 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12873   $as_echo_n "(cached) " >&6
12874 fi
12875 ac_res=`eval 'as_val=${'$as_ac_Header'}
12876                  $as_echo "$as_val"'`
12877                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12878 $as_echo "$ac_res" >&6; }
12879 else
12880   # Is the header compilable?
12881 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
12882 $as_echo_n "checking $ac_header usability... " >&6; }
12883 cat >conftest.$ac_ext <<_ACEOF
12884 /* confdefs.h.  */
12885 _ACEOF
12886 cat confdefs.h >>conftest.$ac_ext
12887 cat >>conftest.$ac_ext <<_ACEOF
12888 /* end confdefs.h.  */
12889 $ac_includes_default
12890 #include <$ac_header>
12891 _ACEOF
12892 rm -f conftest.$ac_objext
12893 if { (ac_try="$ac_compile"
12894 case "(($ac_try" in
12895   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12896   *) ac_try_echo=$ac_try;;
12897 esac
12898 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12899 $as_echo "$ac_try_echo") >&5
12900   (eval "$ac_compile") 2>conftest.er1
12901   ac_status=$?
12902   grep -v '^ *+' conftest.er1 >conftest.err
12903   rm -f conftest.er1
12904   cat conftest.err >&5
12905   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12906   (exit $ac_status); } && {
12907          test -z "$ac_c_werror_flag" ||
12908          test ! -s conftest.err
12909        } && test -s conftest.$ac_objext; then
12910   ac_header_compiler=yes
12911 else
12912   $as_echo "$as_me: failed program was:" >&5
12913 sed 's/^/| /' conftest.$ac_ext >&5
12914
12915         ac_header_compiler=no
12916 fi
12917
12918 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12919 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12920 $as_echo "$ac_header_compiler" >&6; }
12921
12922 # Is the header present?
12923 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
12924 $as_echo_n "checking $ac_header presence... " >&6; }
12925 cat >conftest.$ac_ext <<_ACEOF
12926 /* confdefs.h.  */
12927 _ACEOF
12928 cat confdefs.h >>conftest.$ac_ext
12929 cat >>conftest.$ac_ext <<_ACEOF
12930 /* end confdefs.h.  */
12931 #include <$ac_header>
12932 _ACEOF
12933 if { (ac_try="$ac_cpp conftest.$ac_ext"
12934 case "(($ac_try" in
12935   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12936   *) ac_try_echo=$ac_try;;
12937 esac
12938 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12939 $as_echo "$ac_try_echo") >&5
12940   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12941   ac_status=$?
12942   grep -v '^ *+' conftest.er1 >conftest.err
12943   rm -f conftest.er1
12944   cat conftest.err >&5
12945   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12946   (exit $ac_status); } >/dev/null && {
12947          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12948          test ! -s conftest.err
12949        }; then
12950   ac_header_preproc=yes
12951 else
12952   $as_echo "$as_me: failed program was:" >&5
12953 sed 's/^/| /' conftest.$ac_ext >&5
12954
12955   ac_header_preproc=no
12956 fi
12957
12958 rm -f conftest.err conftest.$ac_ext
12959 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12960 $as_echo "$ac_header_preproc" >&6; }
12961
12962 # So?  What about this header?
12963 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12964   yes:no: )
12965     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12966 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12967     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12968 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12969     ac_header_preproc=yes
12970     ;;
12971   no:yes:* )
12972     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12973 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12974     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12975 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12976     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12977 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12978     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12979 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12980     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12981 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12982     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12983 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12984     ( cat <<\_ASBOX
12985 ## ---------------------------------------- ##
12986 ## Report this to pgsql-bugs@postgresql.org ##
12987 ## ---------------------------------------- ##
12988 _ASBOX
12989      ) | sed "s/^/$as_me: WARNING:     /" >&2
12990     ;;
12991 esac
12992 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12993 $as_echo_n "checking for $ac_header... " >&6; }
12994 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12995   $as_echo_n "(cached) " >&6
12996 else
12997   eval "$as_ac_Header=\$ac_header_preproc"
12998 fi
12999 ac_res=`eval 'as_val=${'$as_ac_Header'}
13000                  $as_echo "$as_val"'`
13001                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13002 $as_echo "$ac_res" >&6; }
13003
13004 fi
13005 as_val=`eval 'as_val=${'$as_ac_Header'}
13006                  $as_echo "$as_val"'`
13007    if test "x$as_val" = x""yes; then
13008   cat >>confdefs.h <<_ACEOF
13009 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13010 _ACEOF
13011
13012 else
13013   { { $as_echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
13014 $as_echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
13015    { (exit 1); exit 1; }; }
13016 fi
13017
13018 done
13019
13020 fi
13021
13022 done
13023
13024 fi
13025
13026 if test "$with_libxml" = yes ; then
13027   if test "${ac_cv_header_libxml_parser_h+set}" = set; then
13028   { $as_echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
13029 $as_echo_n "checking for libxml/parser.h... " >&6; }
13030 if test "${ac_cv_header_libxml_parser_h+set}" = set; then
13031   $as_echo_n "(cached) " >&6
13032 fi
13033 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
13034 $as_echo "$ac_cv_header_libxml_parser_h" >&6; }
13035 else
13036   # Is the header compilable?
13037 { $as_echo "$as_me:$LINENO: checking libxml/parser.h usability" >&5
13038 $as_echo_n "checking libxml/parser.h usability... " >&6; }
13039 cat >conftest.$ac_ext <<_ACEOF
13040 /* confdefs.h.  */
13041 _ACEOF
13042 cat confdefs.h >>conftest.$ac_ext
13043 cat >>conftest.$ac_ext <<_ACEOF
13044 /* end confdefs.h.  */
13045 $ac_includes_default
13046 #include <libxml/parser.h>
13047 _ACEOF
13048 rm -f conftest.$ac_objext
13049 if { (ac_try="$ac_compile"
13050 case "(($ac_try" in
13051   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13052   *) ac_try_echo=$ac_try;;
13053 esac
13054 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13055 $as_echo "$ac_try_echo") >&5
13056   (eval "$ac_compile") 2>conftest.er1
13057   ac_status=$?
13058   grep -v '^ *+' conftest.er1 >conftest.err
13059   rm -f conftest.er1
13060   cat conftest.err >&5
13061   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13062   (exit $ac_status); } && {
13063          test -z "$ac_c_werror_flag" ||
13064          test ! -s conftest.err
13065        } && test -s conftest.$ac_objext; then
13066   ac_header_compiler=yes
13067 else
13068   $as_echo "$as_me: failed program was:" >&5
13069 sed 's/^/| /' conftest.$ac_ext >&5
13070
13071         ac_header_compiler=no
13072 fi
13073
13074 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13075 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13076 $as_echo "$ac_header_compiler" >&6; }
13077
13078 # Is the header present?
13079 { $as_echo "$as_me:$LINENO: checking libxml/parser.h presence" >&5
13080 $as_echo_n "checking libxml/parser.h presence... " >&6; }
13081 cat >conftest.$ac_ext <<_ACEOF
13082 /* confdefs.h.  */
13083 _ACEOF
13084 cat confdefs.h >>conftest.$ac_ext
13085 cat >>conftest.$ac_ext <<_ACEOF
13086 /* end confdefs.h.  */
13087 #include <libxml/parser.h>
13088 _ACEOF
13089 if { (ac_try="$ac_cpp conftest.$ac_ext"
13090 case "(($ac_try" in
13091   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13092   *) ac_try_echo=$ac_try;;
13093 esac
13094 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13095 $as_echo "$ac_try_echo") >&5
13096   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13097   ac_status=$?
13098   grep -v '^ *+' conftest.er1 >conftest.err
13099   rm -f conftest.er1
13100   cat conftest.err >&5
13101   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13102   (exit $ac_status); } >/dev/null && {
13103          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13104          test ! -s conftest.err
13105        }; then
13106   ac_header_preproc=yes
13107 else
13108   $as_echo "$as_me: failed program was:" >&5
13109 sed 's/^/| /' conftest.$ac_ext >&5
13110
13111   ac_header_preproc=no
13112 fi
13113
13114 rm -f conftest.err conftest.$ac_ext
13115 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13116 $as_echo "$ac_header_preproc" >&6; }
13117
13118 # So?  What about this header?
13119 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13120   yes:no: )
13121     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&5
13122 $as_echo "$as_me: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13123     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the compiler's result" >&5
13124 $as_echo "$as_me: WARNING: libxml/parser.h: proceeding with the compiler's result" >&2;}
13125     ac_header_preproc=yes
13126     ;;
13127   no:yes:* )
13128     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: present but cannot be compiled" >&5
13129 $as_echo "$as_me: WARNING: libxml/parser.h: present but cannot be compiled" >&2;}
13130     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&5
13131 $as_echo "$as_me: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&2;}
13132     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: see the Autoconf documentation" >&5
13133 $as_echo "$as_me: WARNING: libxml/parser.h: see the Autoconf documentation" >&2;}
13134     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&5
13135 $as_echo "$as_me: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&2;}
13136     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&5
13137 $as_echo "$as_me: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&2;}
13138     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&5
13139 $as_echo "$as_me: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&2;}
13140     ( cat <<\_ASBOX
13141 ## ---------------------------------------- ##
13142 ## Report this to pgsql-bugs@postgresql.org ##
13143 ## ---------------------------------------- ##
13144 _ASBOX
13145      ) | sed "s/^/$as_me: WARNING:     /" >&2
13146     ;;
13147 esac
13148 { $as_echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
13149 $as_echo_n "checking for libxml/parser.h... " >&6; }
13150 if test "${ac_cv_header_libxml_parser_h+set}" = set; then
13151   $as_echo_n "(cached) " >&6
13152 else
13153   ac_cv_header_libxml_parser_h=$ac_header_preproc
13154 fi
13155 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
13156 $as_echo "$ac_cv_header_libxml_parser_h" >&6; }
13157
13158 fi
13159 if test "x$ac_cv_header_libxml_parser_h" = x""yes; then
13160   :
13161 else
13162   { { $as_echo "$as_me:$LINENO: error: header file <libxml/parser.h> is required for XML support" >&5
13163 $as_echo "$as_me: error: header file <libxml/parser.h> is required for XML support" >&2;}
13164    { (exit 1); exit 1; }; }
13165 fi
13166
13167
13168 fi
13169
13170 if test "$with_libxslt" = yes ; then
13171   if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
13172   { $as_echo "$as_me:$LINENO: checking for libxslt/xslt.h" >&5
13173 $as_echo_n "checking for libxslt/xslt.h... " >&6; }
13174 if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
13175   $as_echo_n "(cached) " >&6
13176 fi
13177 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libxslt_xslt_h" >&5
13178 $as_echo "$ac_cv_header_libxslt_xslt_h" >&6; }
13179 else
13180   # Is the header compilable?
13181 { $as_echo "$as_me:$LINENO: checking libxslt/xslt.h usability" >&5
13182 $as_echo_n "checking libxslt/xslt.h usability... " >&6; }
13183 cat >conftest.$ac_ext <<_ACEOF
13184 /* confdefs.h.  */
13185 _ACEOF
13186 cat confdefs.h >>conftest.$ac_ext
13187 cat >>conftest.$ac_ext <<_ACEOF
13188 /* end confdefs.h.  */
13189 $ac_includes_default
13190 #include <libxslt/xslt.h>
13191 _ACEOF
13192 rm -f conftest.$ac_objext
13193 if { (ac_try="$ac_compile"
13194 case "(($ac_try" in
13195   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13196   *) ac_try_echo=$ac_try;;
13197 esac
13198 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13199 $as_echo "$ac_try_echo") >&5
13200   (eval "$ac_compile") 2>conftest.er1
13201   ac_status=$?
13202   grep -v '^ *+' conftest.er1 >conftest.err
13203   rm -f conftest.er1
13204   cat conftest.err >&5
13205   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13206   (exit $ac_status); } && {
13207          test -z "$ac_c_werror_flag" ||
13208          test ! -s conftest.err
13209        } && test -s conftest.$ac_objext; then
13210   ac_header_compiler=yes
13211 else
13212   $as_echo "$as_me: failed program was:" >&5
13213 sed 's/^/| /' conftest.$ac_ext >&5
13214
13215         ac_header_compiler=no
13216 fi
13217
13218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13219 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13220 $as_echo "$ac_header_compiler" >&6; }
13221
13222 # Is the header present?
13223 { $as_echo "$as_me:$LINENO: checking libxslt/xslt.h presence" >&5
13224 $as_echo_n "checking libxslt/xslt.h presence... " >&6; }
13225 cat >conftest.$ac_ext <<_ACEOF
13226 /* confdefs.h.  */
13227 _ACEOF
13228 cat confdefs.h >>conftest.$ac_ext
13229 cat >>conftest.$ac_ext <<_ACEOF
13230 /* end confdefs.h.  */
13231 #include <libxslt/xslt.h>
13232 _ACEOF
13233 if { (ac_try="$ac_cpp conftest.$ac_ext"
13234 case "(($ac_try" in
13235   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13236   *) ac_try_echo=$ac_try;;
13237 esac
13238 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13239 $as_echo "$ac_try_echo") >&5
13240   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13241   ac_status=$?
13242   grep -v '^ *+' conftest.er1 >conftest.err
13243   rm -f conftest.er1
13244   cat conftest.err >&5
13245   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13246   (exit $ac_status); } >/dev/null && {
13247          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13248          test ! -s conftest.err
13249        }; then
13250   ac_header_preproc=yes
13251 else
13252   $as_echo "$as_me: failed program was:" >&5
13253 sed 's/^/| /' conftest.$ac_ext >&5
13254
13255   ac_header_preproc=no
13256 fi
13257
13258 rm -f conftest.err conftest.$ac_ext
13259 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13260 $as_echo "$ac_header_preproc" >&6; }
13261
13262 # So?  What about this header?
13263 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13264   yes:no: )
13265     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: accepted by the compiler, rejected by the preprocessor!" >&5
13266 $as_echo "$as_me: WARNING: libxslt/xslt.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13267     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: proceeding with the compiler's result" >&5
13268 $as_echo "$as_me: WARNING: libxslt/xslt.h: proceeding with the compiler's result" >&2;}
13269     ac_header_preproc=yes
13270     ;;
13271   no:yes:* )
13272     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: present but cannot be compiled" >&5
13273 $as_echo "$as_me: WARNING: libxslt/xslt.h: present but cannot be compiled" >&2;}
13274     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h:     check for missing prerequisite headers?" >&5
13275 $as_echo "$as_me: WARNING: libxslt/xslt.h:     check for missing prerequisite headers?" >&2;}
13276     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: see the Autoconf documentation" >&5
13277 $as_echo "$as_me: WARNING: libxslt/xslt.h: see the Autoconf documentation" >&2;}
13278     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h:     section \"Present But Cannot Be Compiled\"" >&5
13279 $as_echo "$as_me: WARNING: libxslt/xslt.h:     section \"Present But Cannot Be Compiled\"" >&2;}
13280     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: proceeding with the preprocessor's result" >&5
13281 $as_echo "$as_me: WARNING: libxslt/xslt.h: proceeding with the preprocessor's result" >&2;}
13282     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: in the future, the compiler will take precedence" >&5
13283 $as_echo "$as_me: WARNING: libxslt/xslt.h: in the future, the compiler will take precedence" >&2;}
13284     ( cat <<\_ASBOX
13285 ## ---------------------------------------- ##
13286 ## Report this to pgsql-bugs@postgresql.org ##
13287 ## ---------------------------------------- ##
13288 _ASBOX
13289      ) | sed "s/^/$as_me: WARNING:     /" >&2
13290     ;;
13291 esac
13292 { $as_echo "$as_me:$LINENO: checking for libxslt/xslt.h" >&5
13293 $as_echo_n "checking for libxslt/xslt.h... " >&6; }
13294 if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
13295   $as_echo_n "(cached) " >&6
13296 else
13297   ac_cv_header_libxslt_xslt_h=$ac_header_preproc
13298 fi
13299 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libxslt_xslt_h" >&5
13300 $as_echo "$ac_cv_header_libxslt_xslt_h" >&6; }
13301
13302 fi
13303 if test "x$ac_cv_header_libxslt_xslt_h" = x""yes; then
13304   :
13305 else
13306   { { $as_echo "$as_me:$LINENO: error: header file <libxslt/xslt.h> is required for XSLT support" >&5
13307 $as_echo "$as_me: error: header file <libxslt/xslt.h> is required for XSLT support" >&2;}
13308    { (exit 1); exit 1; }; }
13309 fi
13310
13311
13312 fi
13313
13314 if test "$with_ldap" = yes ; then
13315   if test "$PORTNAME" != "win32"; then
13316
13317 for ac_header in ldap.h
13318 do
13319 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13320 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13321   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13322 $as_echo_n "checking for $ac_header... " >&6; }
13323 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13324   $as_echo_n "(cached) " >&6
13325 fi
13326 ac_res=`eval 'as_val=${'$as_ac_Header'}
13327                  $as_echo "$as_val"'`
13328                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13329 $as_echo "$ac_res" >&6; }
13330 else
13331   # Is the header compilable?
13332 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
13333 $as_echo_n "checking $ac_header usability... " >&6; }
13334 cat >conftest.$ac_ext <<_ACEOF
13335 /* confdefs.h.  */
13336 _ACEOF
13337 cat confdefs.h >>conftest.$ac_ext
13338 cat >>conftest.$ac_ext <<_ACEOF
13339 /* end confdefs.h.  */
13340 $ac_includes_default
13341 #include <$ac_header>
13342 _ACEOF
13343 rm -f conftest.$ac_objext
13344 if { (ac_try="$ac_compile"
13345 case "(($ac_try" in
13346   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13347   *) ac_try_echo=$ac_try;;
13348 esac
13349 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13350 $as_echo "$ac_try_echo") >&5
13351   (eval "$ac_compile") 2>conftest.er1
13352   ac_status=$?
13353   grep -v '^ *+' conftest.er1 >conftest.err
13354   rm -f conftest.er1
13355   cat conftest.err >&5
13356   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13357   (exit $ac_status); } && {
13358          test -z "$ac_c_werror_flag" ||
13359          test ! -s conftest.err
13360        } && test -s conftest.$ac_objext; then
13361   ac_header_compiler=yes
13362 else
13363   $as_echo "$as_me: failed program was:" >&5
13364 sed 's/^/| /' conftest.$ac_ext >&5
13365
13366         ac_header_compiler=no
13367 fi
13368
13369 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13370 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13371 $as_echo "$ac_header_compiler" >&6; }
13372
13373 # Is the header present?
13374 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
13375 $as_echo_n "checking $ac_header presence... " >&6; }
13376 cat >conftest.$ac_ext <<_ACEOF
13377 /* confdefs.h.  */
13378 _ACEOF
13379 cat confdefs.h >>conftest.$ac_ext
13380 cat >>conftest.$ac_ext <<_ACEOF
13381 /* end confdefs.h.  */
13382 #include <$ac_header>
13383 _ACEOF
13384 if { (ac_try="$ac_cpp conftest.$ac_ext"
13385 case "(($ac_try" in
13386   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13387   *) ac_try_echo=$ac_try;;
13388 esac
13389 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13390 $as_echo "$ac_try_echo") >&5
13391   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13392   ac_status=$?
13393   grep -v '^ *+' conftest.er1 >conftest.err
13394   rm -f conftest.er1
13395   cat conftest.err >&5
13396   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13397   (exit $ac_status); } >/dev/null && {
13398          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13399          test ! -s conftest.err
13400        }; then
13401   ac_header_preproc=yes
13402 else
13403   $as_echo "$as_me: failed program was:" >&5
13404 sed 's/^/| /' conftest.$ac_ext >&5
13405
13406   ac_header_preproc=no
13407 fi
13408
13409 rm -f conftest.err conftest.$ac_ext
13410 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13411 $as_echo "$ac_header_preproc" >&6; }
13412
13413 # So?  What about this header?
13414 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13415   yes:no: )
13416     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13417 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13418     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13419 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13420     ac_header_preproc=yes
13421     ;;
13422   no:yes:* )
13423     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13424 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13425     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13426 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13427     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13428 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13429     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13430 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13431     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13432 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13433     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13434 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13435     ( cat <<\_ASBOX
13436 ## ---------------------------------------- ##
13437 ## Report this to pgsql-bugs@postgresql.org ##
13438 ## ---------------------------------------- ##
13439 _ASBOX
13440      ) | sed "s/^/$as_me: WARNING:     /" >&2
13441     ;;
13442 esac
13443 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13444 $as_echo_n "checking for $ac_header... " >&6; }
13445 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13446   $as_echo_n "(cached) " >&6
13447 else
13448   eval "$as_ac_Header=\$ac_header_preproc"
13449 fi
13450 ac_res=`eval 'as_val=${'$as_ac_Header'}
13451                  $as_echo "$as_val"'`
13452                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13453 $as_echo "$ac_res" >&6; }
13454
13455 fi
13456 as_val=`eval 'as_val=${'$as_ac_Header'}
13457                  $as_echo "$as_val"'`
13458    if test "x$as_val" = x""yes; then
13459   cat >>confdefs.h <<_ACEOF
13460 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13461 _ACEOF
13462
13463 else
13464   { { $as_echo "$as_me:$LINENO: error: header file <ldap.h> is required for LDAP" >&5
13465 $as_echo "$as_me: error: header file <ldap.h> is required for LDAP" >&2;}
13466    { (exit 1); exit 1; }; }
13467 fi
13468
13469 done
13470
13471   else
13472
13473 for ac_header in winldap.h
13474 do
13475 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13476 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13477 $as_echo_n "checking for $ac_header... " >&6; }
13478 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13479   $as_echo_n "(cached) " >&6
13480 else
13481   cat >conftest.$ac_ext <<_ACEOF
13482 /* confdefs.h.  */
13483 _ACEOF
13484 cat confdefs.h >>conftest.$ac_ext
13485 cat >>conftest.$ac_ext <<_ACEOF
13486 /* end confdefs.h.  */
13487 $ac_includes_default
13488 #include <windows.h>
13489
13490
13491 #include <$ac_header>
13492 _ACEOF
13493 rm -f conftest.$ac_objext
13494 if { (ac_try="$ac_compile"
13495 case "(($ac_try" in
13496   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13497   *) ac_try_echo=$ac_try;;
13498 esac
13499 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13500 $as_echo "$ac_try_echo") >&5
13501   (eval "$ac_compile") 2>conftest.er1
13502   ac_status=$?
13503   grep -v '^ *+' conftest.er1 >conftest.err
13504   rm -f conftest.er1
13505   cat conftest.err >&5
13506   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13507   (exit $ac_status); } && {
13508          test -z "$ac_c_werror_flag" ||
13509          test ! -s conftest.err
13510        } && test -s conftest.$ac_objext; then
13511   eval "$as_ac_Header=yes"
13512 else
13513   $as_echo "$as_me: failed program was:" >&5
13514 sed 's/^/| /' conftest.$ac_ext >&5
13515
13516         eval "$as_ac_Header=no"
13517 fi
13518
13519 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13520 fi
13521 ac_res=`eval 'as_val=${'$as_ac_Header'}
13522                  $as_echo "$as_val"'`
13523                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13524 $as_echo "$ac_res" >&6; }
13525 as_val=`eval 'as_val=${'$as_ac_Header'}
13526                  $as_echo "$as_val"'`
13527    if test "x$as_val" = x""yes; then
13528   cat >>confdefs.h <<_ACEOF
13529 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13530 _ACEOF
13531
13532 else
13533   { { $as_echo "$as_me:$LINENO: error: header file <winldap.h> is required for LDAP" >&5
13534 $as_echo "$as_me: error: header file <winldap.h> is required for LDAP" >&2;}
13535    { (exit 1); exit 1; }; }
13536 fi
13537
13538 done
13539
13540   fi
13541 fi
13542
13543 if test "$with_bonjour" = yes ; then
13544   if test "${ac_cv_header_dns_sd_h+set}" = set; then
13545   { $as_echo "$as_me:$LINENO: checking for dns_sd.h" >&5
13546 $as_echo_n "checking for dns_sd.h... " >&6; }
13547 if test "${ac_cv_header_dns_sd_h+set}" = set; then
13548   $as_echo_n "(cached) " >&6
13549 fi
13550 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_dns_sd_h" >&5
13551 $as_echo "$ac_cv_header_dns_sd_h" >&6; }
13552 else
13553   # Is the header compilable?
13554 { $as_echo "$as_me:$LINENO: checking dns_sd.h usability" >&5
13555 $as_echo_n "checking dns_sd.h usability... " >&6; }
13556 cat >conftest.$ac_ext <<_ACEOF
13557 /* confdefs.h.  */
13558 _ACEOF
13559 cat confdefs.h >>conftest.$ac_ext
13560 cat >>conftest.$ac_ext <<_ACEOF
13561 /* end confdefs.h.  */
13562 $ac_includes_default
13563 #include <dns_sd.h>
13564 _ACEOF
13565 rm -f conftest.$ac_objext
13566 if { (ac_try="$ac_compile"
13567 case "(($ac_try" in
13568   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13569   *) ac_try_echo=$ac_try;;
13570 esac
13571 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13572 $as_echo "$ac_try_echo") >&5
13573   (eval "$ac_compile") 2>conftest.er1
13574   ac_status=$?
13575   grep -v '^ *+' conftest.er1 >conftest.err
13576   rm -f conftest.er1
13577   cat conftest.err >&5
13578   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13579   (exit $ac_status); } && {
13580          test -z "$ac_c_werror_flag" ||
13581          test ! -s conftest.err
13582        } && test -s conftest.$ac_objext; then
13583   ac_header_compiler=yes
13584 else
13585   $as_echo "$as_me: failed program was:" >&5
13586 sed 's/^/| /' conftest.$ac_ext >&5
13587
13588         ac_header_compiler=no
13589 fi
13590
13591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13592 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13593 $as_echo "$ac_header_compiler" >&6; }
13594
13595 # Is the header present?
13596 { $as_echo "$as_me:$LINENO: checking dns_sd.h presence" >&5
13597 $as_echo_n "checking dns_sd.h presence... " >&6; }
13598 cat >conftest.$ac_ext <<_ACEOF
13599 /* confdefs.h.  */
13600 _ACEOF
13601 cat confdefs.h >>conftest.$ac_ext
13602 cat >>conftest.$ac_ext <<_ACEOF
13603 /* end confdefs.h.  */
13604 #include <dns_sd.h>
13605 _ACEOF
13606 if { (ac_try="$ac_cpp conftest.$ac_ext"
13607 case "(($ac_try" in
13608   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13609   *) ac_try_echo=$ac_try;;
13610 esac
13611 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13612 $as_echo "$ac_try_echo") >&5
13613   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13614   ac_status=$?
13615   grep -v '^ *+' conftest.er1 >conftest.err
13616   rm -f conftest.er1
13617   cat conftest.err >&5
13618   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13619   (exit $ac_status); } >/dev/null && {
13620          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13621          test ! -s conftest.err
13622        }; then
13623   ac_header_preproc=yes
13624 else
13625   $as_echo "$as_me: failed program was:" >&5
13626 sed 's/^/| /' conftest.$ac_ext >&5
13627
13628   ac_header_preproc=no
13629 fi
13630
13631 rm -f conftest.err conftest.$ac_ext
13632 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13633 $as_echo "$ac_header_preproc" >&6; }
13634
13635 # So?  What about this header?
13636 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13637   yes:no: )
13638     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h: accepted by the compiler, rejected by the preprocessor!" >&5
13639 $as_echo "$as_me: WARNING: dns_sd.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13640     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h: proceeding with the compiler's result" >&5
13641 $as_echo "$as_me: WARNING: dns_sd.h: proceeding with the compiler's result" >&2;}
13642     ac_header_preproc=yes
13643     ;;
13644   no:yes:* )
13645     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h: present but cannot be compiled" >&5
13646 $as_echo "$as_me: WARNING: dns_sd.h: present but cannot be compiled" >&2;}
13647     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h:     check for missing prerequisite headers?" >&5
13648 $as_echo "$as_me: WARNING: dns_sd.h:     check for missing prerequisite headers?" >&2;}
13649     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h: see the Autoconf documentation" >&5
13650 $as_echo "$as_me: WARNING: dns_sd.h: see the Autoconf documentation" >&2;}
13651     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h:     section \"Present But Cannot Be Compiled\"" >&5
13652 $as_echo "$as_me: WARNING: dns_sd.h:     section \"Present But Cannot Be Compiled\"" >&2;}
13653     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h: proceeding with the preprocessor's result" >&5
13654 $as_echo "$as_me: WARNING: dns_sd.h: proceeding with the preprocessor's result" >&2;}
13655     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h: in the future, the compiler will take precedence" >&5
13656 $as_echo "$as_me: WARNING: dns_sd.h: in the future, the compiler will take precedence" >&2;}
13657     ( cat <<\_ASBOX
13658 ## ---------------------------------------- ##
13659 ## Report this to pgsql-bugs@postgresql.org ##
13660 ## ---------------------------------------- ##
13661 _ASBOX
13662      ) | sed "s/^/$as_me: WARNING:     /" >&2
13663     ;;
13664 esac
13665 { $as_echo "$as_me:$LINENO: checking for dns_sd.h" >&5
13666 $as_echo_n "checking for dns_sd.h... " >&6; }
13667 if test "${ac_cv_header_dns_sd_h+set}" = set; then
13668   $as_echo_n "(cached) " >&6
13669 else
13670   ac_cv_header_dns_sd_h=$ac_header_preproc
13671 fi
13672 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_dns_sd_h" >&5
13673 $as_echo "$ac_cv_header_dns_sd_h" >&6; }
13674
13675 fi
13676 if test "x$ac_cv_header_dns_sd_h" = x""yes; then
13677   :
13678 else
13679   { { $as_echo "$as_me:$LINENO: error: header file <dns_sd.h> is required for Bonjour" >&5
13680 $as_echo "$as_me: error: header file <dns_sd.h> is required for Bonjour" >&2;}
13681    { (exit 1); exit 1; }; }
13682 fi
13683
13684
13685 fi
13686
13687 # for contrib/uuid-ossp
13688 if test "$with_ossp_uuid" = yes ; then
13689
13690 for ac_header in ossp/uuid.h
13691 do
13692 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13693 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13694   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13695 $as_echo_n "checking for $ac_header... " >&6; }
13696 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13697   $as_echo_n "(cached) " >&6
13698 fi
13699 ac_res=`eval 'as_val=${'$as_ac_Header'}
13700                  $as_echo "$as_val"'`
13701                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13702 $as_echo "$ac_res" >&6; }
13703 else
13704   # Is the header compilable?
13705 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
13706 $as_echo_n "checking $ac_header usability... " >&6; }
13707 cat >conftest.$ac_ext <<_ACEOF
13708 /* confdefs.h.  */
13709 _ACEOF
13710 cat confdefs.h >>conftest.$ac_ext
13711 cat >>conftest.$ac_ext <<_ACEOF
13712 /* end confdefs.h.  */
13713 $ac_includes_default
13714 #include <$ac_header>
13715 _ACEOF
13716 rm -f conftest.$ac_objext
13717 if { (ac_try="$ac_compile"
13718 case "(($ac_try" in
13719   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13720   *) ac_try_echo=$ac_try;;
13721 esac
13722 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13723 $as_echo "$ac_try_echo") >&5
13724   (eval "$ac_compile") 2>conftest.er1
13725   ac_status=$?
13726   grep -v '^ *+' conftest.er1 >conftest.err
13727   rm -f conftest.er1
13728   cat conftest.err >&5
13729   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13730   (exit $ac_status); } && {
13731          test -z "$ac_c_werror_flag" ||
13732          test ! -s conftest.err
13733        } && test -s conftest.$ac_objext; then
13734   ac_header_compiler=yes
13735 else
13736   $as_echo "$as_me: failed program was:" >&5
13737 sed 's/^/| /' conftest.$ac_ext >&5
13738
13739         ac_header_compiler=no
13740 fi
13741
13742 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13743 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13744 $as_echo "$ac_header_compiler" >&6; }
13745
13746 # Is the header present?
13747 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
13748 $as_echo_n "checking $ac_header presence... " >&6; }
13749 cat >conftest.$ac_ext <<_ACEOF
13750 /* confdefs.h.  */
13751 _ACEOF
13752 cat confdefs.h >>conftest.$ac_ext
13753 cat >>conftest.$ac_ext <<_ACEOF
13754 /* end confdefs.h.  */
13755 #include <$ac_header>
13756 _ACEOF
13757 if { (ac_try="$ac_cpp conftest.$ac_ext"
13758 case "(($ac_try" in
13759   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13760   *) ac_try_echo=$ac_try;;
13761 esac
13762 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13763 $as_echo "$ac_try_echo") >&5
13764   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13765   ac_status=$?
13766   grep -v '^ *+' conftest.er1 >conftest.err
13767   rm -f conftest.er1
13768   cat conftest.err >&5
13769   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13770   (exit $ac_status); } >/dev/null && {
13771          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13772          test ! -s conftest.err
13773        }; then
13774   ac_header_preproc=yes
13775 else
13776   $as_echo "$as_me: failed program was:" >&5
13777 sed 's/^/| /' conftest.$ac_ext >&5
13778
13779   ac_header_preproc=no
13780 fi
13781
13782 rm -f conftest.err conftest.$ac_ext
13783 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13784 $as_echo "$ac_header_preproc" >&6; }
13785
13786 # So?  What about this header?
13787 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13788   yes:no: )
13789     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13790 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13791     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13792 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13793     ac_header_preproc=yes
13794     ;;
13795   no:yes:* )
13796     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13797 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13798     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13799 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13800     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13801 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13802     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13803 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13804     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13805 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13806     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13807 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13808     ( cat <<\_ASBOX
13809 ## ---------------------------------------- ##
13810 ## Report this to pgsql-bugs@postgresql.org ##
13811 ## ---------------------------------------- ##
13812 _ASBOX
13813      ) | sed "s/^/$as_me: WARNING:     /" >&2
13814     ;;
13815 esac
13816 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13817 $as_echo_n "checking for $ac_header... " >&6; }
13818 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13819   $as_echo_n "(cached) " >&6
13820 else
13821   eval "$as_ac_Header=\$ac_header_preproc"
13822 fi
13823 ac_res=`eval 'as_val=${'$as_ac_Header'}
13824                  $as_echo "$as_val"'`
13825                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13826 $as_echo "$ac_res" >&6; }
13827
13828 fi
13829 as_val=`eval 'as_val=${'$as_ac_Header'}
13830                  $as_echo "$as_val"'`
13831    if test "x$as_val" = x""yes; then
13832   cat >>confdefs.h <<_ACEOF
13833 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13834 _ACEOF
13835
13836 else
13837
13838
13839 for ac_header in uuid.h
13840 do
13841 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13842 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13843   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13844 $as_echo_n "checking for $ac_header... " >&6; }
13845 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13846   $as_echo_n "(cached) " >&6
13847 fi
13848 ac_res=`eval 'as_val=${'$as_ac_Header'}
13849                  $as_echo "$as_val"'`
13850                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13851 $as_echo "$ac_res" >&6; }
13852 else
13853   # Is the header compilable?
13854 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
13855 $as_echo_n "checking $ac_header usability... " >&6; }
13856 cat >conftest.$ac_ext <<_ACEOF
13857 /* confdefs.h.  */
13858 _ACEOF
13859 cat confdefs.h >>conftest.$ac_ext
13860 cat >>conftest.$ac_ext <<_ACEOF
13861 /* end confdefs.h.  */
13862 $ac_includes_default
13863 #include <$ac_header>
13864 _ACEOF
13865 rm -f conftest.$ac_objext
13866 if { (ac_try="$ac_compile"
13867 case "(($ac_try" in
13868   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13869   *) ac_try_echo=$ac_try;;
13870 esac
13871 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13872 $as_echo "$ac_try_echo") >&5
13873   (eval "$ac_compile") 2>conftest.er1
13874   ac_status=$?
13875   grep -v '^ *+' conftest.er1 >conftest.err
13876   rm -f conftest.er1
13877   cat conftest.err >&5
13878   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13879   (exit $ac_status); } && {
13880          test -z "$ac_c_werror_flag" ||
13881          test ! -s conftest.err
13882        } && test -s conftest.$ac_objext; then
13883   ac_header_compiler=yes
13884 else
13885   $as_echo "$as_me: failed program was:" >&5
13886 sed 's/^/| /' conftest.$ac_ext >&5
13887
13888         ac_header_compiler=no
13889 fi
13890
13891 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13892 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13893 $as_echo "$ac_header_compiler" >&6; }
13894
13895 # Is the header present?
13896 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
13897 $as_echo_n "checking $ac_header presence... " >&6; }
13898 cat >conftest.$ac_ext <<_ACEOF
13899 /* confdefs.h.  */
13900 _ACEOF
13901 cat confdefs.h >>conftest.$ac_ext
13902 cat >>conftest.$ac_ext <<_ACEOF
13903 /* end confdefs.h.  */
13904 #include <$ac_header>
13905 _ACEOF
13906 if { (ac_try="$ac_cpp conftest.$ac_ext"
13907 case "(($ac_try" in
13908   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13909   *) ac_try_echo=$ac_try;;
13910 esac
13911 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13912 $as_echo "$ac_try_echo") >&5
13913   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13914   ac_status=$?
13915   grep -v '^ *+' conftest.er1 >conftest.err
13916   rm -f conftest.er1
13917   cat conftest.err >&5
13918   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13919   (exit $ac_status); } >/dev/null && {
13920          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13921          test ! -s conftest.err
13922        }; then
13923   ac_header_preproc=yes
13924 else
13925   $as_echo "$as_me: failed program was:" >&5
13926 sed 's/^/| /' conftest.$ac_ext >&5
13927
13928   ac_header_preproc=no
13929 fi
13930
13931 rm -f conftest.err conftest.$ac_ext
13932 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13933 $as_echo "$ac_header_preproc" >&6; }
13934
13935 # So?  What about this header?
13936 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13937   yes:no: )
13938     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13939 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13940     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13941 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13942     ac_header_preproc=yes
13943     ;;
13944   no:yes:* )
13945     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13946 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13947     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13948 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13949     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13950 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13951     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13952 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13953     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13954 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13955     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13956 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13957     ( cat <<\_ASBOX
13958 ## ---------------------------------------- ##
13959 ## Report this to pgsql-bugs@postgresql.org ##
13960 ## ---------------------------------------- ##
13961 _ASBOX
13962      ) | sed "s/^/$as_me: WARNING:     /" >&2
13963     ;;
13964 esac
13965 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13966 $as_echo_n "checking for $ac_header... " >&6; }
13967 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13968   $as_echo_n "(cached) " >&6
13969 else
13970   eval "$as_ac_Header=\$ac_header_preproc"
13971 fi
13972 ac_res=`eval 'as_val=${'$as_ac_Header'}
13973                  $as_echo "$as_val"'`
13974                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13975 $as_echo "$ac_res" >&6; }
13976
13977 fi
13978 as_val=`eval 'as_val=${'$as_ac_Header'}
13979                  $as_echo "$as_val"'`
13980    if test "x$as_val" = x""yes; then
13981   cat >>confdefs.h <<_ACEOF
13982 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13983 _ACEOF
13984
13985 else
13986   { { $as_echo "$as_me:$LINENO: error: header file <ossp/uuid.h> or <uuid.h> is required for OSSP-UUID" >&5
13987 $as_echo "$as_me: error: header file <ossp/uuid.h> or <uuid.h> is required for OSSP-UUID" >&2;}
13988    { (exit 1); exit 1; }; }
13989 fi
13990
13991 done
13992
13993 fi
13994
13995 done
13996
13997 fi
13998
13999
14000 ##
14001 ## Types, structures, compiler characteristics
14002 ##
14003
14004
14005  { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
14006 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
14007 if test "${ac_cv_c_bigendian+set}" = set; then
14008   $as_echo_n "(cached) " >&6
14009 else
14010   ac_cv_c_bigendian=unknown
14011     # See if we're dealing with a universal compiler.
14012     cat >conftest.$ac_ext <<_ACEOF
14013 /* confdefs.h.  */
14014 _ACEOF
14015 cat confdefs.h >>conftest.$ac_ext
14016 cat >>conftest.$ac_ext <<_ACEOF
14017 /* end confdefs.h.  */
14018 #ifndef __APPLE_CC__
14019                not a universal capable compiler
14020              #endif
14021              typedef int dummy;
14022
14023 _ACEOF
14024 rm -f conftest.$ac_objext
14025 if { (ac_try="$ac_compile"
14026 case "(($ac_try" in
14027   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14028   *) ac_try_echo=$ac_try;;
14029 esac
14030 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14031 $as_echo "$ac_try_echo") >&5
14032   (eval "$ac_compile") 2>conftest.er1
14033   ac_status=$?
14034   grep -v '^ *+' conftest.er1 >conftest.err
14035   rm -f conftest.er1
14036   cat conftest.err >&5
14037   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14038   (exit $ac_status); } && {
14039          test -z "$ac_c_werror_flag" ||
14040          test ! -s conftest.err
14041        } && test -s conftest.$ac_objext; then
14042
14043         # Check for potential -arch flags.  It is not universal unless
14044         # there are some -arch flags.  Note that *ppc* also matches
14045         # ppc64.  This check is also rather less than ideal.
14046         case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in  #(
14047           *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
14048         esac
14049 else
14050   $as_echo "$as_me: failed program was:" >&5
14051 sed 's/^/| /' conftest.$ac_ext >&5
14052
14053
14054 fi
14055
14056 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14057     if test $ac_cv_c_bigendian = unknown; then
14058       # See if sys/param.h defines the BYTE_ORDER macro.
14059       cat >conftest.$ac_ext <<_ACEOF
14060 /* confdefs.h.  */
14061 _ACEOF
14062 cat confdefs.h >>conftest.$ac_ext
14063 cat >>conftest.$ac_ext <<_ACEOF
14064 /* end confdefs.h.  */
14065 #include <sys/types.h>
14066              #include <sys/param.h>
14067
14068 int
14069 main ()
14070 {
14071 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14072                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14073                      && LITTLE_ENDIAN)
14074               bogus endian macros
14075              #endif
14076
14077   ;
14078   return 0;
14079 }
14080 _ACEOF
14081 rm -f conftest.$ac_objext
14082 if { (ac_try="$ac_compile"
14083 case "(($ac_try" in
14084   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14085   *) ac_try_echo=$ac_try;;
14086 esac
14087 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14088 $as_echo "$ac_try_echo") >&5
14089   (eval "$ac_compile") 2>conftest.er1
14090   ac_status=$?
14091   grep -v '^ *+' conftest.er1 >conftest.err
14092   rm -f conftest.er1
14093   cat conftest.err >&5
14094   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14095   (exit $ac_status); } && {
14096          test -z "$ac_c_werror_flag" ||
14097          test ! -s conftest.err
14098        } && test -s conftest.$ac_objext; then
14099   # It does; now see whether it defined to BIG_ENDIAN or not.
14100          cat >conftest.$ac_ext <<_ACEOF
14101 /* confdefs.h.  */
14102 _ACEOF
14103 cat confdefs.h >>conftest.$ac_ext
14104 cat >>conftest.$ac_ext <<_ACEOF
14105 /* end confdefs.h.  */
14106 #include <sys/types.h>
14107                 #include <sys/param.h>
14108
14109 int
14110 main ()
14111 {
14112 #if BYTE_ORDER != BIG_ENDIAN
14113                  not big endian
14114                 #endif
14115
14116   ;
14117   return 0;
14118 }
14119 _ACEOF
14120 rm -f conftest.$ac_objext
14121 if { (ac_try="$ac_compile"
14122 case "(($ac_try" in
14123   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14124   *) ac_try_echo=$ac_try;;
14125 esac
14126 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14127 $as_echo "$ac_try_echo") >&5
14128   (eval "$ac_compile") 2>conftest.er1
14129   ac_status=$?
14130   grep -v '^ *+' conftest.er1 >conftest.err
14131   rm -f conftest.er1
14132   cat conftest.err >&5
14133   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14134   (exit $ac_status); } && {
14135          test -z "$ac_c_werror_flag" ||
14136          test ! -s conftest.err
14137        } && test -s conftest.$ac_objext; then
14138   ac_cv_c_bigendian=yes
14139 else
14140   $as_echo "$as_me: failed program was:" >&5
14141 sed 's/^/| /' conftest.$ac_ext >&5
14142
14143         ac_cv_c_bigendian=no
14144 fi
14145
14146 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14147 else
14148   $as_echo "$as_me: failed program was:" >&5
14149 sed 's/^/| /' conftest.$ac_ext >&5
14150
14151
14152 fi
14153
14154 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14155     fi
14156     if test $ac_cv_c_bigendian = unknown; then
14157       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14158       cat >conftest.$ac_ext <<_ACEOF
14159 /* confdefs.h.  */
14160 _ACEOF
14161 cat confdefs.h >>conftest.$ac_ext
14162 cat >>conftest.$ac_ext <<_ACEOF
14163 /* end confdefs.h.  */
14164 #include <limits.h>
14165
14166 int
14167 main ()
14168 {
14169 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14170               bogus endian macros
14171              #endif
14172
14173   ;
14174   return 0;
14175 }
14176 _ACEOF
14177 rm -f conftest.$ac_objext
14178 if { (ac_try="$ac_compile"
14179 case "(($ac_try" in
14180   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14181   *) ac_try_echo=$ac_try;;
14182 esac
14183 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14184 $as_echo "$ac_try_echo") >&5
14185   (eval "$ac_compile") 2>conftest.er1
14186   ac_status=$?
14187   grep -v '^ *+' conftest.er1 >conftest.err
14188   rm -f conftest.er1
14189   cat conftest.err >&5
14190   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14191   (exit $ac_status); } && {
14192          test -z "$ac_c_werror_flag" ||
14193          test ! -s conftest.err
14194        } && test -s conftest.$ac_objext; then
14195   # It does; now see whether it defined to _BIG_ENDIAN or not.
14196          cat >conftest.$ac_ext <<_ACEOF
14197 /* confdefs.h.  */
14198 _ACEOF
14199 cat confdefs.h >>conftest.$ac_ext
14200 cat >>conftest.$ac_ext <<_ACEOF
14201 /* end confdefs.h.  */
14202 #include <limits.h>
14203
14204 int
14205 main ()
14206 {
14207 #ifndef _BIG_ENDIAN
14208                  not big endian
14209                 #endif
14210
14211   ;
14212   return 0;
14213 }
14214 _ACEOF
14215 rm -f conftest.$ac_objext
14216 if { (ac_try="$ac_compile"
14217 case "(($ac_try" in
14218   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14219   *) ac_try_echo=$ac_try;;
14220 esac
14221 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14222 $as_echo "$ac_try_echo") >&5
14223   (eval "$ac_compile") 2>conftest.er1
14224   ac_status=$?
14225   grep -v '^ *+' conftest.er1 >conftest.err
14226   rm -f conftest.er1
14227   cat conftest.err >&5
14228   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14229   (exit $ac_status); } && {
14230          test -z "$ac_c_werror_flag" ||
14231          test ! -s conftest.err
14232        } && test -s conftest.$ac_objext; then
14233   ac_cv_c_bigendian=yes
14234 else
14235   $as_echo "$as_me: failed program was:" >&5
14236 sed 's/^/| /' conftest.$ac_ext >&5
14237
14238         ac_cv_c_bigendian=no
14239 fi
14240
14241 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14242 else
14243   $as_echo "$as_me: failed program was:" >&5
14244 sed 's/^/| /' conftest.$ac_ext >&5
14245
14246
14247 fi
14248
14249 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14250     fi
14251     if test $ac_cv_c_bigendian = unknown; then
14252       # Compile a test program.
14253       if test "$cross_compiling" = yes; then
14254   # Try to guess by grepping values from an object file.
14255          cat >conftest.$ac_ext <<_ACEOF
14256 /* confdefs.h.  */
14257 _ACEOF
14258 cat confdefs.h >>conftest.$ac_ext
14259 cat >>conftest.$ac_ext <<_ACEOF
14260 /* end confdefs.h.  */
14261 short int ascii_mm[] =
14262                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14263                 short int ascii_ii[] =
14264                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14265                 int use_ascii (int i) {
14266                   return ascii_mm[i] + ascii_ii[i];
14267                 }
14268                 short int ebcdic_ii[] =
14269                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14270                 short int ebcdic_mm[] =
14271                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14272                 int use_ebcdic (int i) {
14273                   return ebcdic_mm[i] + ebcdic_ii[i];
14274                 }
14275                 extern int foo;
14276
14277 int
14278 main ()
14279 {
14280 return use_ascii (foo) == use_ebcdic (foo);
14281   ;
14282   return 0;
14283 }
14284 _ACEOF
14285 rm -f conftest.$ac_objext
14286 if { (ac_try="$ac_compile"
14287 case "(($ac_try" in
14288   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14289   *) ac_try_echo=$ac_try;;
14290 esac
14291 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14292 $as_echo "$ac_try_echo") >&5
14293   (eval "$ac_compile") 2>conftest.er1
14294   ac_status=$?
14295   grep -v '^ *+' conftest.er1 >conftest.err
14296   rm -f conftest.er1
14297   cat conftest.err >&5
14298   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14299   (exit $ac_status); } && {
14300          test -z "$ac_c_werror_flag" ||
14301          test ! -s conftest.err
14302        } && test -s conftest.$ac_objext; then
14303   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14304               ac_cv_c_bigendian=yes
14305             fi
14306             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14307               if test "$ac_cv_c_bigendian" = unknown; then
14308                 ac_cv_c_bigendian=no
14309               else
14310                 # finding both strings is unlikely to happen, but who knows?
14311                 ac_cv_c_bigendian=unknown
14312               fi
14313             fi
14314 else
14315   $as_echo "$as_me: failed program was:" >&5
14316 sed 's/^/| /' conftest.$ac_ext >&5
14317
14318
14319 fi
14320
14321 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14322 else
14323   cat >conftest.$ac_ext <<_ACEOF
14324 /* confdefs.h.  */
14325 _ACEOF
14326 cat confdefs.h >>conftest.$ac_ext
14327 cat >>conftest.$ac_ext <<_ACEOF
14328 /* end confdefs.h.  */
14329 $ac_includes_default
14330 int
14331 main ()
14332 {
14333
14334              /* Are we little or big endian?  From Harbison&Steele.  */
14335              union
14336              {
14337                long int l;
14338                char c[sizeof (long int)];
14339              } u;
14340              u.l = 1;
14341              return u.c[sizeof (long int) - 1] == 1;
14342
14343   ;
14344   return 0;
14345 }
14346 _ACEOF
14347 rm -f conftest$ac_exeext
14348 if { (ac_try="$ac_link"
14349 case "(($ac_try" in
14350   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14351   *) ac_try_echo=$ac_try;;
14352 esac
14353 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14354 $as_echo "$ac_try_echo") >&5
14355   (eval "$ac_link") 2>&5
14356   ac_status=$?
14357   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14358   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14359   { (case "(($ac_try" in
14360   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14361   *) ac_try_echo=$ac_try;;
14362 esac
14363 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14364 $as_echo "$ac_try_echo") >&5
14365   (eval "$ac_try") 2>&5
14366   ac_status=$?
14367   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14368   (exit $ac_status); }; }; then
14369   ac_cv_c_bigendian=no
14370 else
14371   $as_echo "$as_me: program exited with status $ac_status" >&5
14372 $as_echo "$as_me: failed program was:" >&5
14373 sed 's/^/| /' conftest.$ac_ext >&5
14374
14375 ( exit $ac_status )
14376 ac_cv_c_bigendian=yes
14377 fi
14378 rm -rf conftest.dSYM
14379 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14380 fi
14381
14382
14383     fi
14384 fi
14385 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
14386 $as_echo "$ac_cv_c_bigendian" >&6; }
14387  case $ac_cv_c_bigendian in #(
14388    yes)
14389      cat >>confdefs.h <<\_ACEOF
14390 #define WORDS_BIGENDIAN 1
14391 _ACEOF
14392 ;; #(
14393    no)
14394       ;; #(
14395    universal)
14396
14397 cat >>confdefs.h <<\_ACEOF
14398 #define AC_APPLE_UNIVERSAL_BUILD 1
14399 _ACEOF
14400
14401      ;; #(
14402    *)
14403      { { $as_echo "$as_me:$LINENO: error: unknown endianness
14404  presetting ac_cv_c_bigendian=no (or yes) will help" >&5
14405 $as_echo "$as_me: error: unknown endianness
14406  presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
14407    { (exit 1); exit 1; }; } ;;
14408  esac
14409
14410 { $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14411 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
14412 if test "${ac_cv_c_const+set}" = set; then
14413   $as_echo_n "(cached) " >&6
14414 else
14415   cat >conftest.$ac_ext <<_ACEOF
14416 /* confdefs.h.  */
14417 _ACEOF
14418 cat confdefs.h >>conftest.$ac_ext
14419 cat >>conftest.$ac_ext <<_ACEOF
14420 /* end confdefs.h.  */
14421
14422 int
14423 main ()
14424 {
14425 /* FIXME: Include the comments suggested by Paul. */
14426 #ifndef __cplusplus
14427   /* Ultrix mips cc rejects this.  */
14428   typedef int charset[2];
14429   const charset cs;
14430   /* SunOS 4.1.1 cc rejects this.  */
14431   char const *const *pcpcc;
14432   char **ppc;
14433   /* NEC SVR4.0.2 mips cc rejects this.  */
14434   struct point {int x, y;};
14435   static struct point const zero = {0,0};
14436   /* AIX XL C 1.02.0.0 rejects this.
14437      It does not let you subtract one const X* pointer from another in
14438      an arm of an if-expression whose if-part is not a constant
14439      expression */
14440   const char *g = "string";
14441   pcpcc = &g + (g ? g-g : 0);
14442   /* HPUX 7.0 cc rejects these. */
14443   ++pcpcc;
14444   ppc = (char**) pcpcc;
14445   pcpcc = (char const *const *) ppc;
14446   { /* SCO 3.2v4 cc rejects this.  */
14447     char *t;
14448     char const *s = 0 ? (char *) 0 : (char const *) 0;
14449
14450     *t++ = 0;
14451     if (s) return 0;
14452   }
14453   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14454     int x[] = {25, 17};
14455     const int *foo = &x[0];
14456     ++foo;
14457   }
14458   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14459     typedef const int *iptr;
14460     iptr p = 0;
14461     ++p;
14462   }
14463   { /* AIX XL C 1.02.0.0 rejects this saying
14464        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14465     struct s { int j; const int *ap[3]; };
14466     struct s *b; b->j = 5;
14467   }
14468   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14469     const int foo = 10;
14470     if (!foo) return 0;
14471   }
14472   return !cs[0] && !zero.x;
14473 #endif
14474
14475   ;
14476   return 0;
14477 }
14478 _ACEOF
14479 rm -f conftest.$ac_objext
14480 if { (ac_try="$ac_compile"
14481 case "(($ac_try" in
14482   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14483   *) ac_try_echo=$ac_try;;
14484 esac
14485 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14486 $as_echo "$ac_try_echo") >&5
14487   (eval "$ac_compile") 2>conftest.er1
14488   ac_status=$?
14489   grep -v '^ *+' conftest.er1 >conftest.err
14490   rm -f conftest.er1
14491   cat conftest.err >&5
14492   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14493   (exit $ac_status); } && {
14494          test -z "$ac_c_werror_flag" ||
14495          test ! -s conftest.err
14496        } && test -s conftest.$ac_objext; then
14497   ac_cv_c_const=yes
14498 else
14499   $as_echo "$as_me: failed program was:" >&5
14500 sed 's/^/| /' conftest.$ac_ext >&5
14501
14502         ac_cv_c_const=no
14503 fi
14504
14505 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14506 fi
14507 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14508 $as_echo "$ac_cv_c_const" >&6; }
14509 if test $ac_cv_c_const = no; then
14510
14511 cat >>confdefs.h <<\_ACEOF
14512 #define const /**/
14513 _ACEOF
14514
14515 fi
14516
14517 { $as_echo "$as_me:$LINENO: checking for inline" >&5
14518 $as_echo_n "checking for inline... " >&6; }
14519 if test "${ac_cv_c_inline+set}" = set; then
14520   $as_echo_n "(cached) " >&6
14521 else
14522   ac_cv_c_inline=no
14523 for ac_kw in inline __inline__ __inline; do
14524   cat >conftest.$ac_ext <<_ACEOF
14525 /* confdefs.h.  */
14526 _ACEOF
14527 cat confdefs.h >>conftest.$ac_ext
14528 cat >>conftest.$ac_ext <<_ACEOF
14529 /* end confdefs.h.  */
14530 #ifndef __cplusplus
14531 typedef int foo_t;
14532 static $ac_kw foo_t static_foo () {return 0; }
14533 $ac_kw foo_t foo () {return 0; }
14534 #endif
14535
14536 _ACEOF
14537 rm -f conftest.$ac_objext
14538 if { (ac_try="$ac_compile"
14539 case "(($ac_try" in
14540   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14541   *) ac_try_echo=$ac_try;;
14542 esac
14543 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14544 $as_echo "$ac_try_echo") >&5
14545   (eval "$ac_compile") 2>conftest.er1
14546   ac_status=$?
14547   grep -v '^ *+' conftest.er1 >conftest.err
14548   rm -f conftest.er1
14549   cat conftest.err >&5
14550   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14551   (exit $ac_status); } && {
14552          test -z "$ac_c_werror_flag" ||
14553          test ! -s conftest.err
14554        } && test -s conftest.$ac_objext; then
14555   ac_cv_c_inline=$ac_kw
14556 else
14557   $as_echo "$as_me: failed program was:" >&5
14558 sed 's/^/| /' conftest.$ac_ext >&5
14559
14560
14561 fi
14562
14563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14564   test "$ac_cv_c_inline" != no && break
14565 done
14566
14567 fi
14568 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
14569 $as_echo "$ac_cv_c_inline" >&6; }
14570
14571
14572 case $ac_cv_c_inline in
14573   inline | yes) ;;
14574   *)
14575     case $ac_cv_c_inline in
14576       no) ac_val=;;
14577       *) ac_val=$ac_cv_c_inline;;
14578     esac
14579     cat >>confdefs.h <<_ACEOF
14580 #ifndef __cplusplus
14581 #define inline $ac_val
14582 #endif
14583 _ACEOF
14584     ;;
14585 esac
14586
14587 { $as_echo "$as_me:$LINENO: checking for quiet inline (no complaint if unreferenced)" >&5
14588 $as_echo_n "checking for quiet inline (no complaint if unreferenced)... " >&6; }
14589 if test "${pgac_cv_c_inline_quietly+set}" = set; then
14590   $as_echo_n "(cached) " >&6
14591 else
14592   pgac_cv_c_inline_quietly=no
14593   if test "$ac_cv_c_inline" != no; then
14594     pgac_c_inline_save_werror=$ac_c_werror_flag
14595     ac_c_werror_flag=yes
14596     cat >conftest.$ac_ext <<_ACEOF
14597 /* confdefs.h.  */
14598 _ACEOF
14599 cat confdefs.h >>conftest.$ac_ext
14600 cat >>conftest.$ac_ext <<_ACEOF
14601 /* end confdefs.h.  */
14602 static inline int fun () {return 0;}
14603 int
14604 main ()
14605 {
14606
14607   ;
14608   return 0;
14609 }
14610 _ACEOF
14611 rm -f conftest.$ac_objext conftest$ac_exeext
14612 if { (ac_try="$ac_link"
14613 case "(($ac_try" in
14614   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14615   *) ac_try_echo=$ac_try;;
14616 esac
14617 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14618 $as_echo "$ac_try_echo") >&5
14619   (eval "$ac_link") 2>conftest.er1
14620   ac_status=$?
14621   grep -v '^ *+' conftest.er1 >conftest.err
14622   rm -f conftest.er1
14623   cat conftest.err >&5
14624   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14625   (exit $ac_status); } && {
14626          test -z "$ac_c_werror_flag" ||
14627          test ! -s conftest.err
14628        } && test -s conftest$ac_exeext && {
14629          test "$cross_compiling" = yes ||
14630          $as_test_x conftest$ac_exeext
14631        }; then
14632   pgac_cv_c_inline_quietly=yes
14633 else
14634   $as_echo "$as_me: failed program was:" >&5
14635 sed 's/^/| /' conftest.$ac_ext >&5
14636
14637
14638 fi
14639
14640 rm -rf conftest.dSYM
14641 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14642       conftest$ac_exeext conftest.$ac_ext
14643     ac_c_werror_flag=$pgac_c_inline_save_werror
14644   fi
14645 fi
14646 { $as_echo "$as_me:$LINENO: result: $pgac_cv_c_inline_quietly" >&5
14647 $as_echo "$pgac_cv_c_inline_quietly" >&6; }
14648 if test "$pgac_cv_c_inline_quietly" != no; then
14649
14650 cat >>confdefs.h <<_ACEOF
14651 #define USE_INLINE 1
14652 _ACEOF
14653
14654 fi
14655
14656 { $as_echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
14657 $as_echo_n "checking for preprocessor stringizing operator... " >&6; }
14658 if test "${ac_cv_c_stringize+set}" = set; then
14659   $as_echo_n "(cached) " >&6
14660 else
14661   cat >conftest.$ac_ext <<_ACEOF
14662 /* confdefs.h.  */
14663 _ACEOF
14664 cat confdefs.h >>conftest.$ac_ext
14665 cat >>conftest.$ac_ext <<_ACEOF
14666 /* end confdefs.h.  */
14667 #define x(y) #y
14668
14669 char *s = x(teststring);
14670 _ACEOF
14671 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14672   $EGREP "#teststring" >/dev/null 2>&1; then
14673   ac_cv_c_stringize=no
14674 else
14675   ac_cv_c_stringize=yes
14676 fi
14677 rm -f conftest*
14678
14679 fi
14680 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
14681 $as_echo "$ac_cv_c_stringize" >&6; }
14682 if test $ac_cv_c_stringize = yes; then
14683
14684 cat >>confdefs.h <<\_ACEOF
14685 #define HAVE_STRINGIZE 1
14686 _ACEOF
14687
14688 fi
14689
14690 { $as_echo "$as_me:$LINENO: checking for signed types" >&5
14691 $as_echo_n "checking for signed types... " >&6; }
14692 if test "${pgac_cv_c_signed+set}" = set; then
14693   $as_echo_n "(cached) " >&6
14694 else
14695   cat >conftest.$ac_ext <<_ACEOF
14696 /* confdefs.h.  */
14697 _ACEOF
14698 cat confdefs.h >>conftest.$ac_ext
14699 cat >>conftest.$ac_ext <<_ACEOF
14700 /* end confdefs.h.  */
14701
14702 int
14703 main ()
14704 {
14705 signed char c; signed short s; signed int i;
14706   ;
14707   return 0;
14708 }
14709 _ACEOF
14710 rm -f conftest.$ac_objext
14711 if { (ac_try="$ac_compile"
14712 case "(($ac_try" in
14713   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14714   *) ac_try_echo=$ac_try;;
14715 esac
14716 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14717 $as_echo "$ac_try_echo") >&5
14718   (eval "$ac_compile") 2>conftest.er1
14719   ac_status=$?
14720   grep -v '^ *+' conftest.er1 >conftest.err
14721   rm -f conftest.er1
14722   cat conftest.err >&5
14723   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14724   (exit $ac_status); } && {
14725          test -z "$ac_c_werror_flag" ||
14726          test ! -s conftest.err
14727        } && test -s conftest.$ac_objext; then
14728   pgac_cv_c_signed=yes
14729 else
14730   $as_echo "$as_me: failed program was:" >&5
14731 sed 's/^/| /' conftest.$ac_ext >&5
14732
14733         pgac_cv_c_signed=no
14734 fi
14735
14736 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14737 fi
14738 { $as_echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
14739 $as_echo "$pgac_cv_c_signed" >&6; }
14740 if test x"$pgac_cv_c_signed" = xno ; then
14741
14742 cat >>confdefs.h <<\_ACEOF
14743 #define signed /**/
14744 _ACEOF
14745
14746 fi
14747 { $as_echo "$as_me:$LINENO: checking for working volatile" >&5
14748 $as_echo_n "checking for working volatile... " >&6; }
14749 if test "${ac_cv_c_volatile+set}" = set; then
14750   $as_echo_n "(cached) " >&6
14751 else
14752   cat >conftest.$ac_ext <<_ACEOF
14753 /* confdefs.h.  */
14754 _ACEOF
14755 cat confdefs.h >>conftest.$ac_ext
14756 cat >>conftest.$ac_ext <<_ACEOF
14757 /* end confdefs.h.  */
14758
14759 int
14760 main ()
14761 {
14762
14763 volatile int x;
14764 int * volatile y = (int *) 0;
14765 return !x && !y;
14766   ;
14767   return 0;
14768 }
14769 _ACEOF
14770 rm -f conftest.$ac_objext
14771 if { (ac_try="$ac_compile"
14772 case "(($ac_try" in
14773   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14774   *) ac_try_echo=$ac_try;;
14775 esac
14776 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14777 $as_echo "$ac_try_echo") >&5
14778   (eval "$ac_compile") 2>conftest.er1
14779   ac_status=$?
14780   grep -v '^ *+' conftest.er1 >conftest.err
14781   rm -f conftest.er1
14782   cat conftest.err >&5
14783   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14784   (exit $ac_status); } && {
14785          test -z "$ac_c_werror_flag" ||
14786          test ! -s conftest.err
14787        } && test -s conftest.$ac_objext; then
14788   ac_cv_c_volatile=yes
14789 else
14790   $as_echo "$as_me: failed program was:" >&5
14791 sed 's/^/| /' conftest.$ac_ext >&5
14792
14793         ac_cv_c_volatile=no
14794 fi
14795
14796 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14797 fi
14798 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
14799 $as_echo "$ac_cv_c_volatile" >&6; }
14800 if test $ac_cv_c_volatile = no; then
14801
14802 cat >>confdefs.h <<\_ACEOF
14803 #define volatile /**/
14804 _ACEOF
14805
14806 fi
14807
14808 { $as_echo "$as_me:$LINENO: checking for __func__" >&5
14809 $as_echo_n "checking for __func__... " >&6; }
14810 if test "${pgac_cv_funcname_func_support+set}" = set; then
14811   $as_echo_n "(cached) " >&6
14812 else
14813   cat >conftest.$ac_ext <<_ACEOF
14814 /* confdefs.h.  */
14815 _ACEOF
14816 cat confdefs.h >>conftest.$ac_ext
14817 cat >>conftest.$ac_ext <<_ACEOF
14818 /* end confdefs.h.  */
14819 #include <stdio.h>
14820 int
14821 main ()
14822 {
14823 printf("%s\n", __func__);
14824   ;
14825   return 0;
14826 }
14827 _ACEOF
14828 rm -f conftest.$ac_objext
14829 if { (ac_try="$ac_compile"
14830 case "(($ac_try" in
14831   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14832   *) ac_try_echo=$ac_try;;
14833 esac
14834 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14835 $as_echo "$ac_try_echo") >&5
14836   (eval "$ac_compile") 2>conftest.er1
14837   ac_status=$?
14838   grep -v '^ *+' conftest.er1 >conftest.err
14839   rm -f conftest.er1
14840   cat conftest.err >&5
14841   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14842   (exit $ac_status); } && {
14843          test -z "$ac_c_werror_flag" ||
14844          test ! -s conftest.err
14845        } && test -s conftest.$ac_objext; then
14846   pgac_cv_funcname_func_support=yes
14847 else
14848   $as_echo "$as_me: failed program was:" >&5
14849 sed 's/^/| /' conftest.$ac_ext >&5
14850
14851         pgac_cv_funcname_func_support=no
14852 fi
14853
14854 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14855 fi
14856 { $as_echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
14857 $as_echo "$pgac_cv_funcname_func_support" >&6; }
14858 if test x"$pgac_cv_funcname_func_support" = xyes ; then
14859
14860 cat >>confdefs.h <<\_ACEOF
14861 #define HAVE_FUNCNAME__FUNC 1
14862 _ACEOF
14863
14864 else
14865 { $as_echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
14866 $as_echo_n "checking for __FUNCTION__... " >&6; }
14867 if test "${pgac_cv_funcname_function_support+set}" = set; then
14868   $as_echo_n "(cached) " >&6
14869 else
14870   cat >conftest.$ac_ext <<_ACEOF
14871 /* confdefs.h.  */
14872 _ACEOF
14873 cat confdefs.h >>conftest.$ac_ext
14874 cat >>conftest.$ac_ext <<_ACEOF
14875 /* end confdefs.h.  */
14876 #include <stdio.h>
14877 int
14878 main ()
14879 {
14880 printf("%s\n", __FUNCTION__);
14881   ;
14882   return 0;
14883 }
14884 _ACEOF
14885 rm -f conftest.$ac_objext
14886 if { (ac_try="$ac_compile"
14887 case "(($ac_try" in
14888   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14889   *) ac_try_echo=$ac_try;;
14890 esac
14891 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14892 $as_echo "$ac_try_echo") >&5
14893   (eval "$ac_compile") 2>conftest.er1
14894   ac_status=$?
14895   grep -v '^ *+' conftest.er1 >conftest.err
14896   rm -f conftest.er1
14897   cat conftest.err >&5
14898   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14899   (exit $ac_status); } && {
14900          test -z "$ac_c_werror_flag" ||
14901          test ! -s conftest.err
14902        } && test -s conftest.$ac_objext; then
14903   pgac_cv_funcname_function_support=yes
14904 else
14905   $as_echo "$as_me: failed program was:" >&5
14906 sed 's/^/| /' conftest.$ac_ext >&5
14907
14908         pgac_cv_funcname_function_support=no
14909 fi
14910
14911 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14912 fi
14913 { $as_echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
14914 $as_echo "$pgac_cv_funcname_function_support" >&6; }
14915 if test x"$pgac_cv_funcname_function_support" = xyes ; then
14916
14917 cat >>confdefs.h <<\_ACEOF
14918 #define HAVE_FUNCNAME__FUNCTION 1
14919 _ACEOF
14920
14921 fi
14922 fi
14923 { $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14924 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
14925 if test "${ac_cv_struct_tm+set}" = set; then
14926   $as_echo_n "(cached) " >&6
14927 else
14928   cat >conftest.$ac_ext <<_ACEOF
14929 /* confdefs.h.  */
14930 _ACEOF
14931 cat confdefs.h >>conftest.$ac_ext
14932 cat >>conftest.$ac_ext <<_ACEOF
14933 /* end confdefs.h.  */
14934 #include <sys/types.h>
14935 #include <time.h>
14936
14937 int
14938 main ()
14939 {
14940 struct tm tm;
14941                                      int *p = &tm.tm_sec;
14942                                      return !p;
14943   ;
14944   return 0;
14945 }
14946 _ACEOF
14947 rm -f conftest.$ac_objext
14948 if { (ac_try="$ac_compile"
14949 case "(($ac_try" in
14950   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14951   *) ac_try_echo=$ac_try;;
14952 esac
14953 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14954 $as_echo "$ac_try_echo") >&5
14955   (eval "$ac_compile") 2>conftest.er1
14956   ac_status=$?
14957   grep -v '^ *+' conftest.er1 >conftest.err
14958   rm -f conftest.er1
14959   cat conftest.err >&5
14960   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14961   (exit $ac_status); } && {
14962          test -z "$ac_c_werror_flag" ||
14963          test ! -s conftest.err
14964        } && test -s conftest.$ac_objext; then
14965   ac_cv_struct_tm=time.h
14966 else
14967   $as_echo "$as_me: failed program was:" >&5
14968 sed 's/^/| /' conftest.$ac_ext >&5
14969
14970         ac_cv_struct_tm=sys/time.h
14971 fi
14972
14973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14974 fi
14975 { $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14976 $as_echo "$ac_cv_struct_tm" >&6; }
14977 if test $ac_cv_struct_tm = sys/time.h; then
14978
14979 cat >>confdefs.h <<\_ACEOF
14980 #define TM_IN_SYS_TIME 1
14981 _ACEOF
14982
14983 fi
14984
14985 { $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14986 $as_echo_n "checking for struct tm.tm_zone... " >&6; }
14987 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14988   $as_echo_n "(cached) " >&6
14989 else
14990   cat >conftest.$ac_ext <<_ACEOF
14991 /* confdefs.h.  */
14992 _ACEOF
14993 cat confdefs.h >>conftest.$ac_ext
14994 cat >>conftest.$ac_ext <<_ACEOF
14995 /* end confdefs.h.  */
14996 #include <sys/types.h>
14997 #include <$ac_cv_struct_tm>
14998
14999
15000 int
15001 main ()
15002 {
15003 static struct tm ac_aggr;
15004 if (ac_aggr.tm_zone)
15005 return 0;
15006   ;
15007   return 0;
15008 }
15009 _ACEOF
15010 rm -f conftest.$ac_objext
15011 if { (ac_try="$ac_compile"
15012 case "(($ac_try" in
15013   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15014   *) ac_try_echo=$ac_try;;
15015 esac
15016 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15017 $as_echo "$ac_try_echo") >&5
15018   (eval "$ac_compile") 2>conftest.er1
15019   ac_status=$?
15020   grep -v '^ *+' conftest.er1 >conftest.err
15021   rm -f conftest.er1
15022   cat conftest.err >&5
15023   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15024   (exit $ac_status); } && {
15025          test -z "$ac_c_werror_flag" ||
15026          test ! -s conftest.err
15027        } && test -s conftest.$ac_objext; then
15028   ac_cv_member_struct_tm_tm_zone=yes
15029 else
15030   $as_echo "$as_me: failed program was:" >&5
15031 sed 's/^/| /' conftest.$ac_ext >&5
15032
15033         cat >conftest.$ac_ext <<_ACEOF
15034 /* confdefs.h.  */
15035 _ACEOF
15036 cat confdefs.h >>conftest.$ac_ext
15037 cat >>conftest.$ac_ext <<_ACEOF
15038 /* end confdefs.h.  */
15039 #include <sys/types.h>
15040 #include <$ac_cv_struct_tm>
15041
15042
15043 int
15044 main ()
15045 {
15046 static struct tm ac_aggr;
15047 if (sizeof ac_aggr.tm_zone)
15048 return 0;
15049   ;
15050   return 0;
15051 }
15052 _ACEOF
15053 rm -f conftest.$ac_objext
15054 if { (ac_try="$ac_compile"
15055 case "(($ac_try" in
15056   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15057   *) ac_try_echo=$ac_try;;
15058 esac
15059 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15060 $as_echo "$ac_try_echo") >&5
15061   (eval "$ac_compile") 2>conftest.er1
15062   ac_status=$?
15063   grep -v '^ *+' conftest.er1 >conftest.err
15064   rm -f conftest.er1
15065   cat conftest.err >&5
15066   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15067   (exit $ac_status); } && {
15068          test -z "$ac_c_werror_flag" ||
15069          test ! -s conftest.err
15070        } && test -s conftest.$ac_objext; then
15071   ac_cv_member_struct_tm_tm_zone=yes
15072 else
15073   $as_echo "$as_me: failed program was:" >&5
15074 sed 's/^/| /' conftest.$ac_ext >&5
15075
15076         ac_cv_member_struct_tm_tm_zone=no
15077 fi
15078
15079 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15080 fi
15081
15082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15083 fi
15084 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
15085 $as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; }
15086 if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then
15087
15088 cat >>confdefs.h <<_ACEOF
15089 #define HAVE_STRUCT_TM_TM_ZONE 1
15090 _ACEOF
15091
15092
15093 fi
15094
15095 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15096
15097 cat >>confdefs.h <<\_ACEOF
15098 #define HAVE_TM_ZONE 1
15099 _ACEOF
15100
15101 fi
15102 { $as_echo "$as_me:$LINENO: checking for tzname" >&5
15103 $as_echo_n "checking for tzname... " >&6; }
15104 if test "${ac_cv_var_tzname+set}" = set; then
15105   $as_echo_n "(cached) " >&6
15106 else
15107   cat >conftest.$ac_ext <<_ACEOF
15108 /* confdefs.h.  */
15109 _ACEOF
15110 cat confdefs.h >>conftest.$ac_ext
15111 cat >>conftest.$ac_ext <<_ACEOF
15112 /* end confdefs.h.  */
15113 #include <time.h>
15114 #ifndef tzname /* For SGI.  */
15115 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
15116 #endif
15117
15118 int
15119 main ()
15120 {
15121 atoi(*tzname);
15122   ;
15123   return 0;
15124 }
15125 _ACEOF
15126 rm -f conftest.$ac_objext conftest$ac_exeext
15127 if { (ac_try="$ac_link"
15128 case "(($ac_try" in
15129   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15130   *) ac_try_echo=$ac_try;;
15131 esac
15132 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15133 $as_echo "$ac_try_echo") >&5
15134   (eval "$ac_link") 2>conftest.er1
15135   ac_status=$?
15136   grep -v '^ *+' conftest.er1 >conftest.err
15137   rm -f conftest.er1
15138   cat conftest.err >&5
15139   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15140   (exit $ac_status); } && {
15141          test -z "$ac_c_werror_flag" ||
15142          test ! -s conftest.err
15143        } && test -s conftest$ac_exeext && {
15144          test "$cross_compiling" = yes ||
15145          $as_test_x conftest$ac_exeext
15146        }; then
15147   ac_cv_var_tzname=yes
15148 else
15149   $as_echo "$as_me: failed program was:" >&5
15150 sed 's/^/| /' conftest.$ac_ext >&5
15151
15152         ac_cv_var_tzname=no
15153 fi
15154
15155 rm -rf conftest.dSYM
15156 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15157       conftest$ac_exeext conftest.$ac_ext
15158 fi
15159 { $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
15160 $as_echo "$ac_cv_var_tzname" >&6; }
15161 if test $ac_cv_var_tzname = yes; then
15162
15163 cat >>confdefs.h <<\_ACEOF
15164 #define HAVE_TZNAME 1
15165 _ACEOF
15166
15167 fi
15168
15169 { $as_echo "$as_me:$LINENO: checking for union semun" >&5
15170 $as_echo_n "checking for union semun... " >&6; }
15171 if test "${ac_cv_type_union_semun+set}" = set; then
15172   $as_echo_n "(cached) " >&6
15173 else
15174   ac_cv_type_union_semun=no
15175 cat >conftest.$ac_ext <<_ACEOF
15176 /* confdefs.h.  */
15177 _ACEOF
15178 cat confdefs.h >>conftest.$ac_ext
15179 cat >>conftest.$ac_ext <<_ACEOF
15180 /* end confdefs.h.  */
15181 #include <sys/types.h>
15182 #include <sys/ipc.h>
15183 #include <sys/sem.h>
15184
15185 int
15186 main ()
15187 {
15188 if (sizeof (union semun))
15189        return 0;
15190   ;
15191   return 0;
15192 }
15193 _ACEOF
15194 rm -f conftest.$ac_objext
15195 if { (ac_try="$ac_compile"
15196 case "(($ac_try" in
15197   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15198   *) ac_try_echo=$ac_try;;
15199 esac
15200 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15201 $as_echo "$ac_try_echo") >&5
15202   (eval "$ac_compile") 2>conftest.er1
15203   ac_status=$?
15204   grep -v '^ *+' conftest.er1 >conftest.err
15205   rm -f conftest.er1
15206   cat conftest.err >&5
15207   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15208   (exit $ac_status); } && {
15209          test -z "$ac_c_werror_flag" ||
15210          test ! -s conftest.err
15211        } && test -s conftest.$ac_objext; then
15212   cat >conftest.$ac_ext <<_ACEOF
15213 /* confdefs.h.  */
15214 _ACEOF
15215 cat confdefs.h >>conftest.$ac_ext
15216 cat >>conftest.$ac_ext <<_ACEOF
15217 /* end confdefs.h.  */
15218 #include <sys/types.h>
15219 #include <sys/ipc.h>
15220 #include <sys/sem.h>
15221
15222 int
15223 main ()
15224 {
15225 if (sizeof ((union semun)))
15226           return 0;
15227   ;
15228   return 0;
15229 }
15230 _ACEOF
15231 rm -f conftest.$ac_objext
15232 if { (ac_try="$ac_compile"
15233 case "(($ac_try" in
15234   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15235   *) ac_try_echo=$ac_try;;
15236 esac
15237 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15238 $as_echo "$ac_try_echo") >&5
15239   (eval "$ac_compile") 2>conftest.er1
15240   ac_status=$?
15241   grep -v '^ *+' conftest.er1 >conftest.err
15242   rm -f conftest.er1
15243   cat conftest.err >&5
15244   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15245   (exit $ac_status); } && {
15246          test -z "$ac_c_werror_flag" ||
15247          test ! -s conftest.err
15248        } && test -s conftest.$ac_objext; then
15249   :
15250 else
15251   $as_echo "$as_me: failed program was:" >&5
15252 sed 's/^/| /' conftest.$ac_ext >&5
15253
15254         ac_cv_type_union_semun=yes
15255 fi
15256
15257 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15258 else
15259   $as_echo "$as_me: failed program was:" >&5
15260 sed 's/^/| /' conftest.$ac_ext >&5
15261
15262
15263 fi
15264
15265 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15266 fi
15267 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
15268 $as_echo "$ac_cv_type_union_semun" >&6; }
15269 if test "x$ac_cv_type_union_semun" = x""yes; then
15270
15271 cat >>confdefs.h <<_ACEOF
15272 #define HAVE_UNION_SEMUN 1
15273 _ACEOF
15274
15275
15276 fi
15277
15278 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
15279 $as_echo_n "checking for struct sockaddr_un... " >&6; }
15280 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
15281   $as_echo_n "(cached) " >&6
15282 else
15283   ac_cv_type_struct_sockaddr_un=no
15284 cat >conftest.$ac_ext <<_ACEOF
15285 /* confdefs.h.  */
15286 _ACEOF
15287 cat confdefs.h >>conftest.$ac_ext
15288 cat >>conftest.$ac_ext <<_ACEOF
15289 /* end confdefs.h.  */
15290 #include <sys/types.h>
15291 #ifdef HAVE_SYS_UN_H
15292 #include <sys/un.h>
15293 #endif
15294
15295
15296 int
15297 main ()
15298 {
15299 if (sizeof (struct sockaddr_un))
15300        return 0;
15301   ;
15302   return 0;
15303 }
15304 _ACEOF
15305 rm -f conftest.$ac_objext
15306 if { (ac_try="$ac_compile"
15307 case "(($ac_try" in
15308   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15309   *) ac_try_echo=$ac_try;;
15310 esac
15311 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15312 $as_echo "$ac_try_echo") >&5
15313   (eval "$ac_compile") 2>conftest.er1
15314   ac_status=$?
15315   grep -v '^ *+' conftest.er1 >conftest.err
15316   rm -f conftest.er1
15317   cat conftest.err >&5
15318   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15319   (exit $ac_status); } && {
15320          test -z "$ac_c_werror_flag" ||
15321          test ! -s conftest.err
15322        } && test -s conftest.$ac_objext; then
15323   cat >conftest.$ac_ext <<_ACEOF
15324 /* confdefs.h.  */
15325 _ACEOF
15326 cat confdefs.h >>conftest.$ac_ext
15327 cat >>conftest.$ac_ext <<_ACEOF
15328 /* end confdefs.h.  */
15329 #include <sys/types.h>
15330 #ifdef HAVE_SYS_UN_H
15331 #include <sys/un.h>
15332 #endif
15333
15334
15335 int
15336 main ()
15337 {
15338 if (sizeof ((struct sockaddr_un)))
15339           return 0;
15340   ;
15341   return 0;
15342 }
15343 _ACEOF
15344 rm -f conftest.$ac_objext
15345 if { (ac_try="$ac_compile"
15346 case "(($ac_try" in
15347   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15348   *) ac_try_echo=$ac_try;;
15349 esac
15350 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15351 $as_echo "$ac_try_echo") >&5
15352   (eval "$ac_compile") 2>conftest.er1
15353   ac_status=$?
15354   grep -v '^ *+' conftest.er1 >conftest.err
15355   rm -f conftest.er1
15356   cat conftest.err >&5
15357   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15358   (exit $ac_status); } && {
15359          test -z "$ac_c_werror_flag" ||
15360          test ! -s conftest.err
15361        } && test -s conftest.$ac_objext; then
15362   :
15363 else
15364   $as_echo "$as_me: failed program was:" >&5
15365 sed 's/^/| /' conftest.$ac_ext >&5
15366
15367         ac_cv_type_struct_sockaddr_un=yes
15368 fi
15369
15370 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15371 else
15372   $as_echo "$as_me: failed program was:" >&5
15373 sed 's/^/| /' conftest.$ac_ext >&5
15374
15375
15376 fi
15377
15378 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15379 fi
15380 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
15381 $as_echo "$ac_cv_type_struct_sockaddr_un" >&6; }
15382 if test "x$ac_cv_type_struct_sockaddr_un" = x""yes; then
15383
15384 cat >>confdefs.h <<_ACEOF
15385 #define HAVE_STRUCT_SOCKADDR_UN 1
15386 _ACEOF
15387
15388
15389 cat >>confdefs.h <<\_ACEOF
15390 #define HAVE_UNIX_SOCKETS 1
15391 _ACEOF
15392
15393 fi
15394
15395 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
15396 $as_echo_n "checking for struct sockaddr_storage... " >&6; }
15397 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
15398   $as_echo_n "(cached) " >&6
15399 else
15400   ac_cv_type_struct_sockaddr_storage=no
15401 cat >conftest.$ac_ext <<_ACEOF
15402 /* confdefs.h.  */
15403 _ACEOF
15404 cat confdefs.h >>conftest.$ac_ext
15405 cat >>conftest.$ac_ext <<_ACEOF
15406 /* end confdefs.h.  */
15407 #include <sys/types.h>
15408 #ifdef HAVE_SYS_SOCKET_H
15409 #include <sys/socket.h>
15410 #endif
15411
15412
15413 int
15414 main ()
15415 {
15416 if (sizeof (struct sockaddr_storage))
15417        return 0;
15418   ;
15419   return 0;
15420 }
15421 _ACEOF
15422 rm -f conftest.$ac_objext
15423 if { (ac_try="$ac_compile"
15424 case "(($ac_try" in
15425   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15426   *) ac_try_echo=$ac_try;;
15427 esac
15428 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15429 $as_echo "$ac_try_echo") >&5
15430   (eval "$ac_compile") 2>conftest.er1
15431   ac_status=$?
15432   grep -v '^ *+' conftest.er1 >conftest.err
15433   rm -f conftest.er1
15434   cat conftest.err >&5
15435   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15436   (exit $ac_status); } && {
15437          test -z "$ac_c_werror_flag" ||
15438          test ! -s conftest.err
15439        } && test -s conftest.$ac_objext; then
15440   cat >conftest.$ac_ext <<_ACEOF
15441 /* confdefs.h.  */
15442 _ACEOF
15443 cat confdefs.h >>conftest.$ac_ext
15444 cat >>conftest.$ac_ext <<_ACEOF
15445 /* end confdefs.h.  */
15446 #include <sys/types.h>
15447 #ifdef HAVE_SYS_SOCKET_H
15448 #include <sys/socket.h>
15449 #endif
15450
15451
15452 int
15453 main ()
15454 {
15455 if (sizeof ((struct sockaddr_storage)))
15456           return 0;
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   :
15480 else
15481   $as_echo "$as_me: failed program was:" >&5
15482 sed 's/^/| /' conftest.$ac_ext >&5
15483
15484         ac_cv_type_struct_sockaddr_storage=yes
15485 fi
15486
15487 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15488 else
15489   $as_echo "$as_me: failed program was:" >&5
15490 sed 's/^/| /' conftest.$ac_ext >&5
15491
15492
15493 fi
15494
15495 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15496 fi
15497 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
15498 $as_echo "$ac_cv_type_struct_sockaddr_storage" >&6; }
15499 if test "x$ac_cv_type_struct_sockaddr_storage" = x""yes; then
15500
15501 cat >>confdefs.h <<_ACEOF
15502 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
15503 _ACEOF
15504
15505
15506 fi
15507
15508 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
15509 $as_echo_n "checking for struct sockaddr_storage.ss_family... " >&6; }
15510 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
15511   $as_echo_n "(cached) " >&6
15512 else
15513   cat >conftest.$ac_ext <<_ACEOF
15514 /* confdefs.h.  */
15515 _ACEOF
15516 cat confdefs.h >>conftest.$ac_ext
15517 cat >>conftest.$ac_ext <<_ACEOF
15518 /* end confdefs.h.  */
15519 #include <sys/types.h>
15520 #ifdef HAVE_SYS_SOCKET_H
15521 #include <sys/socket.h>
15522 #endif
15523
15524
15525 int
15526 main ()
15527 {
15528 static struct sockaddr_storage ac_aggr;
15529 if (ac_aggr.ss_family)
15530 return 0;
15531   ;
15532   return 0;
15533 }
15534 _ACEOF
15535 rm -f conftest.$ac_objext
15536 if { (ac_try="$ac_compile"
15537 case "(($ac_try" in
15538   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15539   *) ac_try_echo=$ac_try;;
15540 esac
15541 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15542 $as_echo "$ac_try_echo") >&5
15543   (eval "$ac_compile") 2>conftest.er1
15544   ac_status=$?
15545   grep -v '^ *+' conftest.er1 >conftest.err
15546   rm -f conftest.er1
15547   cat conftest.err >&5
15548   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15549   (exit $ac_status); } && {
15550          test -z "$ac_c_werror_flag" ||
15551          test ! -s conftest.err
15552        } && test -s conftest.$ac_objext; then
15553   ac_cv_member_struct_sockaddr_storage_ss_family=yes
15554 else
15555   $as_echo "$as_me: failed program was:" >&5
15556 sed 's/^/| /' conftest.$ac_ext >&5
15557
15558         cat >conftest.$ac_ext <<_ACEOF
15559 /* confdefs.h.  */
15560 _ACEOF
15561 cat confdefs.h >>conftest.$ac_ext
15562 cat >>conftest.$ac_ext <<_ACEOF
15563 /* end confdefs.h.  */
15564 #include <sys/types.h>
15565 #ifdef HAVE_SYS_SOCKET_H
15566 #include <sys/socket.h>
15567 #endif
15568
15569
15570 int
15571 main ()
15572 {
15573 static struct sockaddr_storage ac_aggr;
15574 if (sizeof ac_aggr.ss_family)
15575 return 0;
15576   ;
15577   return 0;
15578 }
15579 _ACEOF
15580 rm -f conftest.$ac_objext
15581 if { (ac_try="$ac_compile"
15582 case "(($ac_try" in
15583   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15584   *) ac_try_echo=$ac_try;;
15585 esac
15586 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15587 $as_echo "$ac_try_echo") >&5
15588   (eval "$ac_compile") 2>conftest.er1
15589   ac_status=$?
15590   grep -v '^ *+' conftest.er1 >conftest.err
15591   rm -f conftest.er1
15592   cat conftest.err >&5
15593   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15594   (exit $ac_status); } && {
15595          test -z "$ac_c_werror_flag" ||
15596          test ! -s conftest.err
15597        } && test -s conftest.$ac_objext; then
15598   ac_cv_member_struct_sockaddr_storage_ss_family=yes
15599 else
15600   $as_echo "$as_me: failed program was:" >&5
15601 sed 's/^/| /' conftest.$ac_ext >&5
15602
15603         ac_cv_member_struct_sockaddr_storage_ss_family=no
15604 fi
15605
15606 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15607 fi
15608
15609 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15610 fi
15611 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
15612 $as_echo "$ac_cv_member_struct_sockaddr_storage_ss_family" >&6; }
15613 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = x""yes; then
15614
15615 cat >>confdefs.h <<_ACEOF
15616 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
15617 _ACEOF
15618
15619
15620 fi
15621 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
15622 $as_echo_n "checking for struct sockaddr_storage.__ss_family... " >&6; }
15623 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
15624   $as_echo_n "(cached) " >&6
15625 else
15626   cat >conftest.$ac_ext <<_ACEOF
15627 /* confdefs.h.  */
15628 _ACEOF
15629 cat confdefs.h >>conftest.$ac_ext
15630 cat >>conftest.$ac_ext <<_ACEOF
15631 /* end confdefs.h.  */
15632 #include <sys/types.h>
15633 #ifdef HAVE_SYS_SOCKET_H
15634 #include <sys/socket.h>
15635 #endif
15636
15637
15638 int
15639 main ()
15640 {
15641 static struct sockaddr_storage ac_aggr;
15642 if (ac_aggr.__ss_family)
15643 return 0;
15644   ;
15645   return 0;
15646 }
15647 _ACEOF
15648 rm -f conftest.$ac_objext
15649 if { (ac_try="$ac_compile"
15650 case "(($ac_try" in
15651   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15652   *) ac_try_echo=$ac_try;;
15653 esac
15654 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15655 $as_echo "$ac_try_echo") >&5
15656   (eval "$ac_compile") 2>conftest.er1
15657   ac_status=$?
15658   grep -v '^ *+' conftest.er1 >conftest.err
15659   rm -f conftest.er1
15660   cat conftest.err >&5
15661   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15662   (exit $ac_status); } && {
15663          test -z "$ac_c_werror_flag" ||
15664          test ! -s conftest.err
15665        } && test -s conftest.$ac_objext; then
15666   ac_cv_member_struct_sockaddr_storage___ss_family=yes
15667 else
15668   $as_echo "$as_me: failed program was:" >&5
15669 sed 's/^/| /' conftest.$ac_ext >&5
15670
15671         cat >conftest.$ac_ext <<_ACEOF
15672 /* confdefs.h.  */
15673 _ACEOF
15674 cat confdefs.h >>conftest.$ac_ext
15675 cat >>conftest.$ac_ext <<_ACEOF
15676 /* end confdefs.h.  */
15677 #include <sys/types.h>
15678 #ifdef HAVE_SYS_SOCKET_H
15679 #include <sys/socket.h>
15680 #endif
15681
15682
15683 int
15684 main ()
15685 {
15686 static struct sockaddr_storage ac_aggr;
15687 if (sizeof ac_aggr.__ss_family)
15688 return 0;
15689   ;
15690   return 0;
15691 }
15692 _ACEOF
15693 rm -f conftest.$ac_objext
15694 if { (ac_try="$ac_compile"
15695 case "(($ac_try" in
15696   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15697   *) ac_try_echo=$ac_try;;
15698 esac
15699 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15700 $as_echo "$ac_try_echo") >&5
15701   (eval "$ac_compile") 2>conftest.er1
15702   ac_status=$?
15703   grep -v '^ *+' conftest.er1 >conftest.err
15704   rm -f conftest.er1
15705   cat conftest.err >&5
15706   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15707   (exit $ac_status); } && {
15708          test -z "$ac_c_werror_flag" ||
15709          test ! -s conftest.err
15710        } && test -s conftest.$ac_objext; then
15711   ac_cv_member_struct_sockaddr_storage___ss_family=yes
15712 else
15713   $as_echo "$as_me: failed program was:" >&5
15714 sed 's/^/| /' conftest.$ac_ext >&5
15715
15716         ac_cv_member_struct_sockaddr_storage___ss_family=no
15717 fi
15718
15719 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15720 fi
15721
15722 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15723 fi
15724 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
15725 $as_echo "$ac_cv_member_struct_sockaddr_storage___ss_family" >&6; }
15726 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = x""yes; then
15727
15728 cat >>confdefs.h <<_ACEOF
15729 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
15730 _ACEOF
15731
15732
15733 fi
15734 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
15735 $as_echo_n "checking for struct sockaddr_storage.ss_len... " >&6; }
15736 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
15737   $as_echo_n "(cached) " >&6
15738 else
15739   cat >conftest.$ac_ext <<_ACEOF
15740 /* confdefs.h.  */
15741 _ACEOF
15742 cat confdefs.h >>conftest.$ac_ext
15743 cat >>conftest.$ac_ext <<_ACEOF
15744 /* end confdefs.h.  */
15745 #include <sys/types.h>
15746 #ifdef HAVE_SYS_SOCKET_H
15747 #include <sys/socket.h>
15748 #endif
15749
15750
15751 int
15752 main ()
15753 {
15754 static struct sockaddr_storage ac_aggr;
15755 if (ac_aggr.ss_len)
15756 return 0;
15757   ;
15758   return 0;
15759 }
15760 _ACEOF
15761 rm -f conftest.$ac_objext
15762 if { (ac_try="$ac_compile"
15763 case "(($ac_try" in
15764   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15765   *) ac_try_echo=$ac_try;;
15766 esac
15767 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15768 $as_echo "$ac_try_echo") >&5
15769   (eval "$ac_compile") 2>conftest.er1
15770   ac_status=$?
15771   grep -v '^ *+' conftest.er1 >conftest.err
15772   rm -f conftest.er1
15773   cat conftest.err >&5
15774   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15775   (exit $ac_status); } && {
15776          test -z "$ac_c_werror_flag" ||
15777          test ! -s conftest.err
15778        } && test -s conftest.$ac_objext; then
15779   ac_cv_member_struct_sockaddr_storage_ss_len=yes
15780 else
15781   $as_echo "$as_me: failed program was:" >&5
15782 sed 's/^/| /' conftest.$ac_ext >&5
15783
15784         cat >conftest.$ac_ext <<_ACEOF
15785 /* confdefs.h.  */
15786 _ACEOF
15787 cat confdefs.h >>conftest.$ac_ext
15788 cat >>conftest.$ac_ext <<_ACEOF
15789 /* end confdefs.h.  */
15790 #include <sys/types.h>
15791 #ifdef HAVE_SYS_SOCKET_H
15792 #include <sys/socket.h>
15793 #endif
15794
15795
15796 int
15797 main ()
15798 {
15799 static struct sockaddr_storage ac_aggr;
15800 if (sizeof ac_aggr.ss_len)
15801 return 0;
15802   ;
15803   return 0;
15804 }
15805 _ACEOF
15806 rm -f conftest.$ac_objext
15807 if { (ac_try="$ac_compile"
15808 case "(($ac_try" in
15809   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15810   *) ac_try_echo=$ac_try;;
15811 esac
15812 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15813 $as_echo "$ac_try_echo") >&5
15814   (eval "$ac_compile") 2>conftest.er1
15815   ac_status=$?
15816   grep -v '^ *+' conftest.er1 >conftest.err
15817   rm -f conftest.er1
15818   cat conftest.err >&5
15819   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15820   (exit $ac_status); } && {
15821          test -z "$ac_c_werror_flag" ||
15822          test ! -s conftest.err
15823        } && test -s conftest.$ac_objext; then
15824   ac_cv_member_struct_sockaddr_storage_ss_len=yes
15825 else
15826   $as_echo "$as_me: failed program was:" >&5
15827 sed 's/^/| /' conftest.$ac_ext >&5
15828
15829         ac_cv_member_struct_sockaddr_storage_ss_len=no
15830 fi
15831
15832 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15833 fi
15834
15835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15836 fi
15837 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
15838 $as_echo "$ac_cv_member_struct_sockaddr_storage_ss_len" >&6; }
15839 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = x""yes; then
15840
15841 cat >>confdefs.h <<_ACEOF
15842 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
15843 _ACEOF
15844
15845
15846 fi
15847 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
15848 $as_echo_n "checking for struct sockaddr_storage.__ss_len... " >&6; }
15849 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
15850   $as_echo_n "(cached) " >&6
15851 else
15852   cat >conftest.$ac_ext <<_ACEOF
15853 /* confdefs.h.  */
15854 _ACEOF
15855 cat confdefs.h >>conftest.$ac_ext
15856 cat >>conftest.$ac_ext <<_ACEOF
15857 /* end confdefs.h.  */
15858 #include <sys/types.h>
15859 #ifdef HAVE_SYS_SOCKET_H
15860 #include <sys/socket.h>
15861 #endif
15862
15863
15864 int
15865 main ()
15866 {
15867 static struct sockaddr_storage ac_aggr;
15868 if (ac_aggr.__ss_len)
15869 return 0;
15870   ;
15871   return 0;
15872 }
15873 _ACEOF
15874 rm -f conftest.$ac_objext
15875 if { (ac_try="$ac_compile"
15876 case "(($ac_try" in
15877   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15878   *) ac_try_echo=$ac_try;;
15879 esac
15880 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15881 $as_echo "$ac_try_echo") >&5
15882   (eval "$ac_compile") 2>conftest.er1
15883   ac_status=$?
15884   grep -v '^ *+' conftest.er1 >conftest.err
15885   rm -f conftest.er1
15886   cat conftest.err >&5
15887   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15888   (exit $ac_status); } && {
15889          test -z "$ac_c_werror_flag" ||
15890          test ! -s conftest.err
15891        } && test -s conftest.$ac_objext; then
15892   ac_cv_member_struct_sockaddr_storage___ss_len=yes
15893 else
15894   $as_echo "$as_me: failed program was:" >&5
15895 sed 's/^/| /' conftest.$ac_ext >&5
15896
15897         cat >conftest.$ac_ext <<_ACEOF
15898 /* confdefs.h.  */
15899 _ACEOF
15900 cat confdefs.h >>conftest.$ac_ext
15901 cat >>conftest.$ac_ext <<_ACEOF
15902 /* end confdefs.h.  */
15903 #include <sys/types.h>
15904 #ifdef HAVE_SYS_SOCKET_H
15905 #include <sys/socket.h>
15906 #endif
15907
15908
15909 int
15910 main ()
15911 {
15912 static struct sockaddr_storage ac_aggr;
15913 if (sizeof ac_aggr.__ss_len)
15914 return 0;
15915   ;
15916   return 0;
15917 }
15918 _ACEOF
15919 rm -f conftest.$ac_objext
15920 if { (ac_try="$ac_compile"
15921 case "(($ac_try" in
15922   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15923   *) ac_try_echo=$ac_try;;
15924 esac
15925 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15926 $as_echo "$ac_try_echo") >&5
15927   (eval "$ac_compile") 2>conftest.er1
15928   ac_status=$?
15929   grep -v '^ *+' conftest.er1 >conftest.err
15930   rm -f conftest.er1
15931   cat conftest.err >&5
15932   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15933   (exit $ac_status); } && {
15934          test -z "$ac_c_werror_flag" ||
15935          test ! -s conftest.err
15936        } && test -s conftest.$ac_objext; then
15937   ac_cv_member_struct_sockaddr_storage___ss_len=yes
15938 else
15939   $as_echo "$as_me: failed program was:" >&5
15940 sed 's/^/| /' conftest.$ac_ext >&5
15941
15942         ac_cv_member_struct_sockaddr_storage___ss_len=no
15943 fi
15944
15945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15946 fi
15947
15948 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15949 fi
15950 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
15951 $as_echo "$ac_cv_member_struct_sockaddr_storage___ss_len" >&6; }
15952 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = x""yes; then
15953
15954 cat >>confdefs.h <<_ACEOF
15955 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
15956 _ACEOF
15957
15958
15959 fi
15960 { $as_echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
15961 $as_echo_n "checking for struct sockaddr.sa_len... " >&6; }
15962 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
15963   $as_echo_n "(cached) " >&6
15964 else
15965   cat >conftest.$ac_ext <<_ACEOF
15966 /* confdefs.h.  */
15967 _ACEOF
15968 cat confdefs.h >>conftest.$ac_ext
15969 cat >>conftest.$ac_ext <<_ACEOF
15970 /* end confdefs.h.  */
15971 #include <sys/types.h>
15972 #ifdef HAVE_SYS_SOCKET_H
15973 #include <sys/socket.h>
15974 #endif
15975
15976
15977 int
15978 main ()
15979 {
15980 static struct sockaddr ac_aggr;
15981 if (ac_aggr.sa_len)
15982 return 0;
15983   ;
15984   return 0;
15985 }
15986 _ACEOF
15987 rm -f conftest.$ac_objext
15988 if { (ac_try="$ac_compile"
15989 case "(($ac_try" in
15990   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15991   *) ac_try_echo=$ac_try;;
15992 esac
15993 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15994 $as_echo "$ac_try_echo") >&5
15995   (eval "$ac_compile") 2>conftest.er1
15996   ac_status=$?
15997   grep -v '^ *+' conftest.er1 >conftest.err
15998   rm -f conftest.er1
15999   cat conftest.err >&5
16000   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16001   (exit $ac_status); } && {
16002          test -z "$ac_c_werror_flag" ||
16003          test ! -s conftest.err
16004        } && test -s conftest.$ac_objext; then
16005   ac_cv_member_struct_sockaddr_sa_len=yes
16006 else
16007   $as_echo "$as_me: failed program was:" >&5
16008 sed 's/^/| /' conftest.$ac_ext >&5
16009
16010         cat >conftest.$ac_ext <<_ACEOF
16011 /* confdefs.h.  */
16012 _ACEOF
16013 cat confdefs.h >>conftest.$ac_ext
16014 cat >>conftest.$ac_ext <<_ACEOF
16015 /* end confdefs.h.  */
16016 #include <sys/types.h>
16017 #ifdef HAVE_SYS_SOCKET_H
16018 #include <sys/socket.h>
16019 #endif
16020
16021
16022 int
16023 main ()
16024 {
16025 static struct sockaddr ac_aggr;
16026 if (sizeof ac_aggr.sa_len)
16027 return 0;
16028   ;
16029   return 0;
16030 }
16031 _ACEOF
16032 rm -f conftest.$ac_objext
16033 if { (ac_try="$ac_compile"
16034 case "(($ac_try" in
16035   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16036   *) ac_try_echo=$ac_try;;
16037 esac
16038 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16039 $as_echo "$ac_try_echo") >&5
16040   (eval "$ac_compile") 2>conftest.er1
16041   ac_status=$?
16042   grep -v '^ *+' conftest.er1 >conftest.err
16043   rm -f conftest.er1
16044   cat conftest.err >&5
16045   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16046   (exit $ac_status); } && {
16047          test -z "$ac_c_werror_flag" ||
16048          test ! -s conftest.err
16049        } && test -s conftest.$ac_objext; then
16050   ac_cv_member_struct_sockaddr_sa_len=yes
16051 else
16052   $as_echo "$as_me: failed program was:" >&5
16053 sed 's/^/| /' conftest.$ac_ext >&5
16054
16055         ac_cv_member_struct_sockaddr_sa_len=no
16056 fi
16057
16058 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16059 fi
16060
16061 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16062 fi
16063 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
16064 $as_echo "$ac_cv_member_struct_sockaddr_sa_len" >&6; }
16065 if test "x$ac_cv_member_struct_sockaddr_sa_len" = x""yes; then
16066
16067 cat >>confdefs.h <<_ACEOF
16068 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
16069 _ACEOF
16070
16071
16072 fi
16073
16074 { $as_echo "$as_me:$LINENO: checking for struct addrinfo" >&5
16075 $as_echo_n "checking for struct addrinfo... " >&6; }
16076 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
16077   $as_echo_n "(cached) " >&6
16078 else
16079   ac_cv_type_struct_addrinfo=no
16080 cat >conftest.$ac_ext <<_ACEOF
16081 /* confdefs.h.  */
16082 _ACEOF
16083 cat confdefs.h >>conftest.$ac_ext
16084 cat >>conftest.$ac_ext <<_ACEOF
16085 /* end confdefs.h.  */
16086 #include <sys/types.h>
16087 #include <sys/socket.h>
16088 #include <netdb.h>
16089
16090
16091 int
16092 main ()
16093 {
16094 if (sizeof (struct addrinfo))
16095        return 0;
16096   ;
16097   return 0;
16098 }
16099 _ACEOF
16100 rm -f conftest.$ac_objext
16101 if { (ac_try="$ac_compile"
16102 case "(($ac_try" in
16103   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16104   *) ac_try_echo=$ac_try;;
16105 esac
16106 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16107 $as_echo "$ac_try_echo") >&5
16108   (eval "$ac_compile") 2>conftest.er1
16109   ac_status=$?
16110   grep -v '^ *+' conftest.er1 >conftest.err
16111   rm -f conftest.er1
16112   cat conftest.err >&5
16113   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16114   (exit $ac_status); } && {
16115          test -z "$ac_c_werror_flag" ||
16116          test ! -s conftest.err
16117        } && test -s conftest.$ac_objext; then
16118   cat >conftest.$ac_ext <<_ACEOF
16119 /* confdefs.h.  */
16120 _ACEOF
16121 cat confdefs.h >>conftest.$ac_ext
16122 cat >>conftest.$ac_ext <<_ACEOF
16123 /* end confdefs.h.  */
16124 #include <sys/types.h>
16125 #include <sys/socket.h>
16126 #include <netdb.h>
16127
16128
16129 int
16130 main ()
16131 {
16132 if (sizeof ((struct addrinfo)))
16133           return 0;
16134   ;
16135   return 0;
16136 }
16137 _ACEOF
16138 rm -f conftest.$ac_objext
16139 if { (ac_try="$ac_compile"
16140 case "(($ac_try" in
16141   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16142   *) ac_try_echo=$ac_try;;
16143 esac
16144 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16145 $as_echo "$ac_try_echo") >&5
16146   (eval "$ac_compile") 2>conftest.er1
16147   ac_status=$?
16148   grep -v '^ *+' conftest.er1 >conftest.err
16149   rm -f conftest.er1
16150   cat conftest.err >&5
16151   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16152   (exit $ac_status); } && {
16153          test -z "$ac_c_werror_flag" ||
16154          test ! -s conftest.err
16155        } && test -s conftest.$ac_objext; then
16156   :
16157 else
16158   $as_echo "$as_me: failed program was:" >&5
16159 sed 's/^/| /' conftest.$ac_ext >&5
16160
16161         ac_cv_type_struct_addrinfo=yes
16162 fi
16163
16164 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16165 else
16166   $as_echo "$as_me: failed program was:" >&5
16167 sed 's/^/| /' conftest.$ac_ext >&5
16168
16169
16170 fi
16171
16172 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16173 fi
16174 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
16175 $as_echo "$ac_cv_type_struct_addrinfo" >&6; }
16176 if test "x$ac_cv_type_struct_addrinfo" = x""yes; then
16177
16178 cat >>confdefs.h <<_ACEOF
16179 #define HAVE_STRUCT_ADDRINFO 1
16180 _ACEOF
16181
16182
16183 fi
16184
16185
16186   { $as_echo "$as_me:$LINENO: checking for intptr_t" >&5
16187 $as_echo_n "checking for intptr_t... " >&6; }
16188 if test "${ac_cv_type_intptr_t+set}" = set; then
16189   $as_echo_n "(cached) " >&6
16190 else
16191   ac_cv_type_intptr_t=no
16192 cat >conftest.$ac_ext <<_ACEOF
16193 /* confdefs.h.  */
16194 _ACEOF
16195 cat confdefs.h >>conftest.$ac_ext
16196 cat >>conftest.$ac_ext <<_ACEOF
16197 /* end confdefs.h.  */
16198 $ac_includes_default
16199 int
16200 main ()
16201 {
16202 if (sizeof (intptr_t))
16203        return 0;
16204   ;
16205   return 0;
16206 }
16207 _ACEOF
16208 rm -f conftest.$ac_objext
16209 if { (ac_try="$ac_compile"
16210 case "(($ac_try" in
16211   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16212   *) ac_try_echo=$ac_try;;
16213 esac
16214 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16215 $as_echo "$ac_try_echo") >&5
16216   (eval "$ac_compile") 2>conftest.er1
16217   ac_status=$?
16218   grep -v '^ *+' conftest.er1 >conftest.err
16219   rm -f conftest.er1
16220   cat conftest.err >&5
16221   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16222   (exit $ac_status); } && {
16223          test -z "$ac_c_werror_flag" ||
16224          test ! -s conftest.err
16225        } && test -s conftest.$ac_objext; then
16226   cat >conftest.$ac_ext <<_ACEOF
16227 /* confdefs.h.  */
16228 _ACEOF
16229 cat confdefs.h >>conftest.$ac_ext
16230 cat >>conftest.$ac_ext <<_ACEOF
16231 /* end confdefs.h.  */
16232 $ac_includes_default
16233 int
16234 main ()
16235 {
16236 if (sizeof ((intptr_t)))
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   :
16261 else
16262   $as_echo "$as_me: failed program was:" >&5
16263 sed 's/^/| /' conftest.$ac_ext >&5
16264
16265         ac_cv_type_intptr_t=yes
16266 fi
16267
16268 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16269 else
16270   $as_echo "$as_me: failed program was:" >&5
16271 sed 's/^/| /' conftest.$ac_ext >&5
16272
16273
16274 fi
16275
16276 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16277 fi
16278 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5
16279 $as_echo "$ac_cv_type_intptr_t" >&6; }
16280 if test "x$ac_cv_type_intptr_t" = x""yes; then
16281
16282 cat >>confdefs.h <<\_ACEOF
16283 #define HAVE_INTPTR_T 1
16284 _ACEOF
16285
16286 else
16287   for ac_type in 'int' 'long int' 'long long int'; do
16288        cat >conftest.$ac_ext <<_ACEOF
16289 /* confdefs.h.  */
16290 _ACEOF
16291 cat confdefs.h >>conftest.$ac_ext
16292 cat >>conftest.$ac_ext <<_ACEOF
16293 /* end confdefs.h.  */
16294 $ac_includes_default
16295 int
16296 main ()
16297 {
16298 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
16299 test_array [0] = 0
16300
16301   ;
16302   return 0;
16303 }
16304 _ACEOF
16305 rm -f conftest.$ac_objext
16306 if { (ac_try="$ac_compile"
16307 case "(($ac_try" in
16308   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16309   *) ac_try_echo=$ac_try;;
16310 esac
16311 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16312 $as_echo "$ac_try_echo") >&5
16313   (eval "$ac_compile") 2>conftest.er1
16314   ac_status=$?
16315   grep -v '^ *+' conftest.er1 >conftest.err
16316   rm -f conftest.er1
16317   cat conftest.err >&5
16318   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16319   (exit $ac_status); } && {
16320          test -z "$ac_c_werror_flag" ||
16321          test ! -s conftest.err
16322        } && test -s conftest.$ac_objext; then
16323
16324 cat >>confdefs.h <<_ACEOF
16325 #define intptr_t $ac_type
16326 _ACEOF
16327
16328           ac_type=
16329 else
16330   $as_echo "$as_me: failed program was:" >&5
16331 sed 's/^/| /' conftest.$ac_ext >&5
16332
16333
16334 fi
16335
16336 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16337        test -z "$ac_type" && break
16338      done
16339 fi
16340
16341
16342
16343   { $as_echo "$as_me:$LINENO: checking for uintptr_t" >&5
16344 $as_echo_n "checking for uintptr_t... " >&6; }
16345 if test "${ac_cv_type_uintptr_t+set}" = set; then
16346   $as_echo_n "(cached) " >&6
16347 else
16348   ac_cv_type_uintptr_t=no
16349 cat >conftest.$ac_ext <<_ACEOF
16350 /* confdefs.h.  */
16351 _ACEOF
16352 cat confdefs.h >>conftest.$ac_ext
16353 cat >>conftest.$ac_ext <<_ACEOF
16354 /* end confdefs.h.  */
16355 $ac_includes_default
16356 int
16357 main ()
16358 {
16359 if (sizeof (uintptr_t))
16360        return 0;
16361   ;
16362   return 0;
16363 }
16364 _ACEOF
16365 rm -f conftest.$ac_objext
16366 if { (ac_try="$ac_compile"
16367 case "(($ac_try" in
16368   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16369   *) ac_try_echo=$ac_try;;
16370 esac
16371 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16372 $as_echo "$ac_try_echo") >&5
16373   (eval "$ac_compile") 2>conftest.er1
16374   ac_status=$?
16375   grep -v '^ *+' conftest.er1 >conftest.err
16376   rm -f conftest.er1
16377   cat conftest.err >&5
16378   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16379   (exit $ac_status); } && {
16380          test -z "$ac_c_werror_flag" ||
16381          test ! -s conftest.err
16382        } && test -s conftest.$ac_objext; then
16383   cat >conftest.$ac_ext <<_ACEOF
16384 /* confdefs.h.  */
16385 _ACEOF
16386 cat confdefs.h >>conftest.$ac_ext
16387 cat >>conftest.$ac_ext <<_ACEOF
16388 /* end confdefs.h.  */
16389 $ac_includes_default
16390 int
16391 main ()
16392 {
16393 if (sizeof ((uintptr_t)))
16394           return 0;
16395   ;
16396   return 0;
16397 }
16398 _ACEOF
16399 rm -f conftest.$ac_objext
16400 if { (ac_try="$ac_compile"
16401 case "(($ac_try" in
16402   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16403   *) ac_try_echo=$ac_try;;
16404 esac
16405 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16406 $as_echo "$ac_try_echo") >&5
16407   (eval "$ac_compile") 2>conftest.er1
16408   ac_status=$?
16409   grep -v '^ *+' conftest.er1 >conftest.err
16410   rm -f conftest.er1
16411   cat conftest.err >&5
16412   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16413   (exit $ac_status); } && {
16414          test -z "$ac_c_werror_flag" ||
16415          test ! -s conftest.err
16416        } && test -s conftest.$ac_objext; then
16417   :
16418 else
16419   $as_echo "$as_me: failed program was:" >&5
16420 sed 's/^/| /' conftest.$ac_ext >&5
16421
16422         ac_cv_type_uintptr_t=yes
16423 fi
16424
16425 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16426 else
16427   $as_echo "$as_me: failed program was:" >&5
16428 sed 's/^/| /' conftest.$ac_ext >&5
16429
16430
16431 fi
16432
16433 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16434 fi
16435 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
16436 $as_echo "$ac_cv_type_uintptr_t" >&6; }
16437 if test "x$ac_cv_type_uintptr_t" = x""yes; then
16438
16439 cat >>confdefs.h <<\_ACEOF
16440 #define HAVE_UINTPTR_T 1
16441 _ACEOF
16442
16443 else
16444   for ac_type in 'unsigned int' 'unsigned long int' \
16445         'unsigned long long int'; do
16446        cat >conftest.$ac_ext <<_ACEOF
16447 /* confdefs.h.  */
16448 _ACEOF
16449 cat confdefs.h >>conftest.$ac_ext
16450 cat >>conftest.$ac_ext <<_ACEOF
16451 /* end confdefs.h.  */
16452 $ac_includes_default
16453 int
16454 main ()
16455 {
16456 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
16457 test_array [0] = 0
16458
16459   ;
16460   return 0;
16461 }
16462 _ACEOF
16463 rm -f conftest.$ac_objext
16464 if { (ac_try="$ac_compile"
16465 case "(($ac_try" in
16466   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16467   *) ac_try_echo=$ac_try;;
16468 esac
16469 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16470 $as_echo "$ac_try_echo") >&5
16471   (eval "$ac_compile") 2>conftest.er1
16472   ac_status=$?
16473   grep -v '^ *+' conftest.er1 >conftest.err
16474   rm -f conftest.er1
16475   cat conftest.err >&5
16476   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16477   (exit $ac_status); } && {
16478          test -z "$ac_c_werror_flag" ||
16479          test ! -s conftest.err
16480        } && test -s conftest.$ac_objext; then
16481
16482 cat >>confdefs.h <<_ACEOF
16483 #define uintptr_t $ac_type
16484 _ACEOF
16485
16486           ac_type=
16487 else
16488   $as_echo "$as_me: failed program was:" >&5
16489 sed 's/^/| /' conftest.$ac_ext >&5
16490
16491
16492 fi
16493
16494 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16495        test -z "$ac_type" && break
16496      done
16497 fi
16498
16499
16500
16501   { $as_echo "$as_me:$LINENO: checking for long long int" >&5
16502 $as_echo_n "checking for long long int... " >&6; }
16503 if test "${ac_cv_type_long_long_int+set}" = set; then
16504   $as_echo_n "(cached) " >&6
16505 else
16506   cat >conftest.$ac_ext <<_ACEOF
16507
16508   /* confdefs.h.  */
16509 _ACEOF
16510 cat confdefs.h >>conftest.$ac_ext
16511 cat >>conftest.$ac_ext <<_ACEOF
16512 /* end confdefs.h.  */
16513 /* For now, do not test the preprocessor; as of 2007 there are too many
16514          implementations with broken preprocessors.  Perhaps this can
16515          be revisited in 2012.  In the meantime, code should not expect
16516          #if to work with literals wider than 32 bits.  */
16517       /* Test literals.  */
16518       long long int ll = 9223372036854775807ll;
16519       long long int nll = -9223372036854775807LL;
16520       unsigned long long int ull = 18446744073709551615ULL;
16521       /* Test constant expressions.   */
16522       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
16523                      ? 1 : -1)];
16524       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
16525                      ? 1 : -1)];
16526       int i = 63;
16527 int
16528 main ()
16529 {
16530 /* Test availability of runtime routines for shift and division.  */
16531       long long int llmax = 9223372036854775807ll;
16532       unsigned long long int ullmax = 18446744073709551615ull;
16533       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
16534               | (llmax / ll) | (llmax % ll)
16535               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
16536               | (ullmax / ull) | (ullmax % ull));
16537   ;
16538   return 0;
16539 }
16540
16541 _ACEOF
16542 rm -f conftest.$ac_objext conftest$ac_exeext
16543 if { (ac_try="$ac_link"
16544 case "(($ac_try" in
16545   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16546   *) ac_try_echo=$ac_try;;
16547 esac
16548 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16549 $as_echo "$ac_try_echo") >&5
16550   (eval "$ac_link") 2>conftest.er1
16551   ac_status=$?
16552   grep -v '^ *+' conftest.er1 >conftest.err
16553   rm -f conftest.er1
16554   cat conftest.err >&5
16555   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16556   (exit $ac_status); } && {
16557          test -z "$ac_c_werror_flag" ||
16558          test ! -s conftest.err
16559        } && test -s conftest$ac_exeext && {
16560          test "$cross_compiling" = yes ||
16561          $as_test_x conftest$ac_exeext
16562        }; then
16563                         if test "$cross_compiling" = yes; then
16564   ac_cv_type_long_long_int=yes
16565 else
16566   cat >conftest.$ac_ext <<_ACEOF
16567 /* confdefs.h.  */
16568 _ACEOF
16569 cat confdefs.h >>conftest.$ac_ext
16570 cat >>conftest.$ac_ext <<_ACEOF
16571 /* end confdefs.h.  */
16572 #include <limits.h>
16573                #ifndef LLONG_MAX
16574                # define HALF \
16575                         (1LL << (sizeof (long long int) * CHAR_BIT - 2))
16576                # define LLONG_MAX (HALF - 1 + HALF)
16577                #endif
16578 int
16579 main ()
16580 {
16581 long long int n = 1;
16582                int i;
16583                for (i = 0; ; i++)
16584                  {
16585                    long long int m = n << i;
16586                    if (m >> i != n)
16587                      return 1;
16588                    if (LLONG_MAX / 2 < m)
16589                      break;
16590                  }
16591                return 0;
16592   ;
16593   return 0;
16594 }
16595 _ACEOF
16596 rm -f conftest$ac_exeext
16597 if { (ac_try="$ac_link"
16598 case "(($ac_try" in
16599   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16600   *) ac_try_echo=$ac_try;;
16601 esac
16602 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16603 $as_echo "$ac_try_echo") >&5
16604   (eval "$ac_link") 2>&5
16605   ac_status=$?
16606   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16607   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16608   { (case "(($ac_try" in
16609   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16610   *) ac_try_echo=$ac_try;;
16611 esac
16612 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16613 $as_echo "$ac_try_echo") >&5
16614   (eval "$ac_try") 2>&5
16615   ac_status=$?
16616   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16617   (exit $ac_status); }; }; then
16618   ac_cv_type_long_long_int=yes
16619 else
16620   $as_echo "$as_me: program exited with status $ac_status" >&5
16621 $as_echo "$as_me: failed program was:" >&5
16622 sed 's/^/| /' conftest.$ac_ext >&5
16623
16624 ( exit $ac_status )
16625 ac_cv_type_long_long_int=no
16626 fi
16627 rm -rf conftest.dSYM
16628 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16629 fi
16630
16631
16632 else
16633   $as_echo "$as_me: failed program was:" >&5
16634 sed 's/^/| /' conftest.$ac_ext >&5
16635
16636         ac_cv_type_long_long_int=no
16637 fi
16638
16639 rm -rf conftest.dSYM
16640 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16641       conftest$ac_exeext conftest.$ac_ext
16642 fi
16643 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
16644 $as_echo "$ac_cv_type_long_long_int" >&6; }
16645   if test $ac_cv_type_long_long_int = yes; then
16646
16647 cat >>confdefs.h <<\_ACEOF
16648 #define HAVE_LONG_LONG_INT 1
16649 _ACEOF
16650
16651   fi
16652
16653
16654 { $as_echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
16655 $as_echo_n "checking for struct cmsgcred... " >&6; }
16656 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
16657   $as_echo_n "(cached) " >&6
16658 else
16659   ac_cv_type_struct_cmsgcred=no
16660 cat >conftest.$ac_ext <<_ACEOF
16661 /* confdefs.h.  */
16662 _ACEOF
16663 cat confdefs.h >>conftest.$ac_ext
16664 cat >>conftest.$ac_ext <<_ACEOF
16665 /* end confdefs.h.  */
16666 #include <sys/param.h>
16667 #include <sys/types.h>
16668 #include <sys/socket.h>
16669 #include <sys/ucred.h>
16670
16671 int
16672 main ()
16673 {
16674 if (sizeof (struct cmsgcred))
16675        return 0;
16676   ;
16677   return 0;
16678 }
16679 _ACEOF
16680 rm -f conftest.$ac_objext
16681 if { (ac_try="$ac_compile"
16682 case "(($ac_try" in
16683   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16684   *) ac_try_echo=$ac_try;;
16685 esac
16686 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16687 $as_echo "$ac_try_echo") >&5
16688   (eval "$ac_compile") 2>conftest.er1
16689   ac_status=$?
16690   grep -v '^ *+' conftest.er1 >conftest.err
16691   rm -f conftest.er1
16692   cat conftest.err >&5
16693   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16694   (exit $ac_status); } && {
16695          test -z "$ac_c_werror_flag" ||
16696          test ! -s conftest.err
16697        } && test -s conftest.$ac_objext; then
16698   cat >conftest.$ac_ext <<_ACEOF
16699 /* confdefs.h.  */
16700 _ACEOF
16701 cat confdefs.h >>conftest.$ac_ext
16702 cat >>conftest.$ac_ext <<_ACEOF
16703 /* end confdefs.h.  */
16704 #include <sys/param.h>
16705 #include <sys/types.h>
16706 #include <sys/socket.h>
16707 #include <sys/ucred.h>
16708
16709 int
16710 main ()
16711 {
16712 if (sizeof ((struct cmsgcred)))
16713           return 0;
16714   ;
16715   return 0;
16716 }
16717 _ACEOF
16718 rm -f conftest.$ac_objext
16719 if { (ac_try="$ac_compile"
16720 case "(($ac_try" in
16721   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16722   *) ac_try_echo=$ac_try;;
16723 esac
16724 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16725 $as_echo "$ac_try_echo") >&5
16726   (eval "$ac_compile") 2>conftest.er1
16727   ac_status=$?
16728   grep -v '^ *+' conftest.er1 >conftest.err
16729   rm -f conftest.er1
16730   cat conftest.err >&5
16731   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16732   (exit $ac_status); } && {
16733          test -z "$ac_c_werror_flag" ||
16734          test ! -s conftest.err
16735        } && test -s conftest.$ac_objext; then
16736   :
16737 else
16738   $as_echo "$as_me: failed program was:" >&5
16739 sed 's/^/| /' conftest.$ac_ext >&5
16740
16741         ac_cv_type_struct_cmsgcred=yes
16742 fi
16743
16744 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16745 else
16746   $as_echo "$as_me: failed program was:" >&5
16747 sed 's/^/| /' conftest.$ac_ext >&5
16748
16749
16750 fi
16751
16752 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16753 fi
16754 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
16755 $as_echo "$ac_cv_type_struct_cmsgcred" >&6; }
16756 if test "x$ac_cv_type_struct_cmsgcred" = x""yes; then
16757
16758 cat >>confdefs.h <<_ACEOF
16759 #define HAVE_STRUCT_CMSGCRED 1
16760 _ACEOF
16761
16762
16763 fi
16764 { $as_echo "$as_me:$LINENO: checking for struct fcred" >&5
16765 $as_echo_n "checking for struct fcred... " >&6; }
16766 if test "${ac_cv_type_struct_fcred+set}" = set; then
16767   $as_echo_n "(cached) " >&6
16768 else
16769   ac_cv_type_struct_fcred=no
16770 cat >conftest.$ac_ext <<_ACEOF
16771 /* confdefs.h.  */
16772 _ACEOF
16773 cat confdefs.h >>conftest.$ac_ext
16774 cat >>conftest.$ac_ext <<_ACEOF
16775 /* end confdefs.h.  */
16776 #include <sys/param.h>
16777 #include <sys/types.h>
16778 #include <sys/socket.h>
16779 #include <sys/ucred.h>
16780
16781 int
16782 main ()
16783 {
16784 if (sizeof (struct fcred))
16785        return 0;
16786   ;
16787   return 0;
16788 }
16789 _ACEOF
16790 rm -f conftest.$ac_objext
16791 if { (ac_try="$ac_compile"
16792 case "(($ac_try" in
16793   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16794   *) ac_try_echo=$ac_try;;
16795 esac
16796 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16797 $as_echo "$ac_try_echo") >&5
16798   (eval "$ac_compile") 2>conftest.er1
16799   ac_status=$?
16800   grep -v '^ *+' conftest.er1 >conftest.err
16801   rm -f conftest.er1
16802   cat conftest.err >&5
16803   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16804   (exit $ac_status); } && {
16805          test -z "$ac_c_werror_flag" ||
16806          test ! -s conftest.err
16807        } && test -s conftest.$ac_objext; then
16808   cat >conftest.$ac_ext <<_ACEOF
16809 /* confdefs.h.  */
16810 _ACEOF
16811 cat confdefs.h >>conftest.$ac_ext
16812 cat >>conftest.$ac_ext <<_ACEOF
16813 /* end confdefs.h.  */
16814 #include <sys/param.h>
16815 #include <sys/types.h>
16816 #include <sys/socket.h>
16817 #include <sys/ucred.h>
16818
16819 int
16820 main ()
16821 {
16822 if (sizeof ((struct fcred)))
16823           return 0;
16824   ;
16825   return 0;
16826 }
16827 _ACEOF
16828 rm -f conftest.$ac_objext
16829 if { (ac_try="$ac_compile"
16830 case "(($ac_try" in
16831   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16832   *) ac_try_echo=$ac_try;;
16833 esac
16834 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16835 $as_echo "$ac_try_echo") >&5
16836   (eval "$ac_compile") 2>conftest.er1
16837   ac_status=$?
16838   grep -v '^ *+' conftest.er1 >conftest.err
16839   rm -f conftest.er1
16840   cat conftest.err >&5
16841   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16842   (exit $ac_status); } && {
16843          test -z "$ac_c_werror_flag" ||
16844          test ! -s conftest.err
16845        } && test -s conftest.$ac_objext; then
16846   :
16847 else
16848   $as_echo "$as_me: failed program was:" >&5
16849 sed 's/^/| /' conftest.$ac_ext >&5
16850
16851         ac_cv_type_struct_fcred=yes
16852 fi
16853
16854 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16855 else
16856   $as_echo "$as_me: failed program was:" >&5
16857 sed 's/^/| /' conftest.$ac_ext >&5
16858
16859
16860 fi
16861
16862 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16863 fi
16864 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
16865 $as_echo "$ac_cv_type_struct_fcred" >&6; }
16866 if test "x$ac_cv_type_struct_fcred" = x""yes; then
16867
16868 cat >>confdefs.h <<_ACEOF
16869 #define HAVE_STRUCT_FCRED 1
16870 _ACEOF
16871
16872
16873 fi
16874 { $as_echo "$as_me:$LINENO: checking for struct sockcred" >&5
16875 $as_echo_n "checking for struct sockcred... " >&6; }
16876 if test "${ac_cv_type_struct_sockcred+set}" = set; then
16877   $as_echo_n "(cached) " >&6
16878 else
16879   ac_cv_type_struct_sockcred=no
16880 cat >conftest.$ac_ext <<_ACEOF
16881 /* confdefs.h.  */
16882 _ACEOF
16883 cat confdefs.h >>conftest.$ac_ext
16884 cat >>conftest.$ac_ext <<_ACEOF
16885 /* end confdefs.h.  */
16886 #include <sys/param.h>
16887 #include <sys/types.h>
16888 #include <sys/socket.h>
16889 #include <sys/ucred.h>
16890
16891 int
16892 main ()
16893 {
16894 if (sizeof (struct sockcred))
16895        return 0;
16896   ;
16897   return 0;
16898 }
16899 _ACEOF
16900 rm -f conftest.$ac_objext
16901 if { (ac_try="$ac_compile"
16902 case "(($ac_try" in
16903   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16904   *) ac_try_echo=$ac_try;;
16905 esac
16906 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16907 $as_echo "$ac_try_echo") >&5
16908   (eval "$ac_compile") 2>conftest.er1
16909   ac_status=$?
16910   grep -v '^ *+' conftest.er1 >conftest.err
16911   rm -f conftest.er1
16912   cat conftest.err >&5
16913   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16914   (exit $ac_status); } && {
16915          test -z "$ac_c_werror_flag" ||
16916          test ! -s conftest.err
16917        } && test -s conftest.$ac_objext; then
16918   cat >conftest.$ac_ext <<_ACEOF
16919 /* confdefs.h.  */
16920 _ACEOF
16921 cat confdefs.h >>conftest.$ac_ext
16922 cat >>conftest.$ac_ext <<_ACEOF
16923 /* end confdefs.h.  */
16924 #include <sys/param.h>
16925 #include <sys/types.h>
16926 #include <sys/socket.h>
16927 #include <sys/ucred.h>
16928
16929 int
16930 main ()
16931 {
16932 if (sizeof ((struct sockcred)))
16933           return 0;
16934   ;
16935   return 0;
16936 }
16937 _ACEOF
16938 rm -f conftest.$ac_objext
16939 if { (ac_try="$ac_compile"
16940 case "(($ac_try" in
16941   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16942   *) ac_try_echo=$ac_try;;
16943 esac
16944 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16945 $as_echo "$ac_try_echo") >&5
16946   (eval "$ac_compile") 2>conftest.er1
16947   ac_status=$?
16948   grep -v '^ *+' conftest.er1 >conftest.err
16949   rm -f conftest.er1
16950   cat conftest.err >&5
16951   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16952   (exit $ac_status); } && {
16953          test -z "$ac_c_werror_flag" ||
16954          test ! -s conftest.err
16955        } && test -s conftest.$ac_objext; then
16956   :
16957 else
16958   $as_echo "$as_me: failed program was:" >&5
16959 sed 's/^/| /' conftest.$ac_ext >&5
16960
16961         ac_cv_type_struct_sockcred=yes
16962 fi
16963
16964 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16965 else
16966   $as_echo "$as_me: failed program was:" >&5
16967 sed 's/^/| /' conftest.$ac_ext >&5
16968
16969
16970 fi
16971
16972 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16973 fi
16974 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
16975 $as_echo "$ac_cv_type_struct_sockcred" >&6; }
16976 if test "x$ac_cv_type_struct_sockcred" = x""yes; then
16977
16978 cat >>confdefs.h <<_ACEOF
16979 #define HAVE_STRUCT_SOCKCRED 1
16980 _ACEOF
16981
16982
16983 fi
16984
16985
16986 { $as_echo "$as_me:$LINENO: checking for struct option" >&5
16987 $as_echo_n "checking for struct option... " >&6; }
16988 if test "${ac_cv_type_struct_option+set}" = set; then
16989   $as_echo_n "(cached) " >&6
16990 else
16991   ac_cv_type_struct_option=no
16992 cat >conftest.$ac_ext <<_ACEOF
16993 /* confdefs.h.  */
16994 _ACEOF
16995 cat confdefs.h >>conftest.$ac_ext
16996 cat >>conftest.$ac_ext <<_ACEOF
16997 /* end confdefs.h.  */
16998 #ifdef HAVE_GETOPT_H
16999 #include <getopt.h>
17000 #endif
17001
17002 int
17003 main ()
17004 {
17005 if (sizeof (struct option))
17006        return 0;
17007   ;
17008   return 0;
17009 }
17010 _ACEOF
17011 rm -f conftest.$ac_objext
17012 if { (ac_try="$ac_compile"
17013 case "(($ac_try" in
17014   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17015   *) ac_try_echo=$ac_try;;
17016 esac
17017 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17018 $as_echo "$ac_try_echo") >&5
17019   (eval "$ac_compile") 2>conftest.er1
17020   ac_status=$?
17021   grep -v '^ *+' conftest.er1 >conftest.err
17022   rm -f conftest.er1
17023   cat conftest.err >&5
17024   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17025   (exit $ac_status); } && {
17026          test -z "$ac_c_werror_flag" ||
17027          test ! -s conftest.err
17028        } && test -s conftest.$ac_objext; then
17029   cat >conftest.$ac_ext <<_ACEOF
17030 /* confdefs.h.  */
17031 _ACEOF
17032 cat confdefs.h >>conftest.$ac_ext
17033 cat >>conftest.$ac_ext <<_ACEOF
17034 /* end confdefs.h.  */
17035 #ifdef HAVE_GETOPT_H
17036 #include <getopt.h>
17037 #endif
17038
17039 int
17040 main ()
17041 {
17042 if (sizeof ((struct option)))
17043           return 0;
17044   ;
17045   return 0;
17046 }
17047 _ACEOF
17048 rm -f conftest.$ac_objext
17049 if { (ac_try="$ac_compile"
17050 case "(($ac_try" in
17051   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17052   *) ac_try_echo=$ac_try;;
17053 esac
17054 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17055 $as_echo "$ac_try_echo") >&5
17056   (eval "$ac_compile") 2>conftest.er1
17057   ac_status=$?
17058   grep -v '^ *+' conftest.er1 >conftest.err
17059   rm -f conftest.er1
17060   cat conftest.err >&5
17061   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17062   (exit $ac_status); } && {
17063          test -z "$ac_c_werror_flag" ||
17064          test ! -s conftest.err
17065        } && test -s conftest.$ac_objext; then
17066   :
17067 else
17068   $as_echo "$as_me: failed program was:" >&5
17069 sed 's/^/| /' conftest.$ac_ext >&5
17070
17071         ac_cv_type_struct_option=yes
17072 fi
17073
17074 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17075 else
17076   $as_echo "$as_me: failed program was:" >&5
17077 sed 's/^/| /' conftest.$ac_ext >&5
17078
17079
17080 fi
17081
17082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17083 fi
17084 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
17085 $as_echo "$ac_cv_type_struct_option" >&6; }
17086 if test "x$ac_cv_type_struct_option" = x""yes; then
17087
17088 cat >>confdefs.h <<_ACEOF
17089 #define HAVE_STRUCT_OPTION 1
17090 _ACEOF
17091
17092
17093 fi
17094
17095
17096 if test "$with_zlib" = yes; then
17097   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
17098   # did not).  While we could work around the lack of z_streamp, it
17099   # seems unwise to encourage people to use such old zlib versions...
17100   { $as_echo "$as_me:$LINENO: checking for z_streamp" >&5
17101 $as_echo_n "checking for z_streamp... " >&6; }
17102 if test "${ac_cv_type_z_streamp+set}" = set; then
17103   $as_echo_n "(cached) " >&6
17104 else
17105   ac_cv_type_z_streamp=no
17106 cat >conftest.$ac_ext <<_ACEOF
17107 /* confdefs.h.  */
17108 _ACEOF
17109 cat confdefs.h >>conftest.$ac_ext
17110 cat >>conftest.$ac_ext <<_ACEOF
17111 /* end confdefs.h.  */
17112 #include <zlib.h>
17113
17114 int
17115 main ()
17116 {
17117 if (sizeof (z_streamp))
17118        return 0;
17119   ;
17120   return 0;
17121 }
17122 _ACEOF
17123 rm -f conftest.$ac_objext
17124 if { (ac_try="$ac_compile"
17125 case "(($ac_try" in
17126   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17127   *) ac_try_echo=$ac_try;;
17128 esac
17129 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17130 $as_echo "$ac_try_echo") >&5
17131   (eval "$ac_compile") 2>conftest.er1
17132   ac_status=$?
17133   grep -v '^ *+' conftest.er1 >conftest.err
17134   rm -f conftest.er1
17135   cat conftest.err >&5
17136   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17137   (exit $ac_status); } && {
17138          test -z "$ac_c_werror_flag" ||
17139          test ! -s conftest.err
17140        } && test -s conftest.$ac_objext; then
17141   cat >conftest.$ac_ext <<_ACEOF
17142 /* confdefs.h.  */
17143 _ACEOF
17144 cat confdefs.h >>conftest.$ac_ext
17145 cat >>conftest.$ac_ext <<_ACEOF
17146 /* end confdefs.h.  */
17147 #include <zlib.h>
17148
17149 int
17150 main ()
17151 {
17152 if (sizeof ((z_streamp)))
17153           return 0;
17154   ;
17155   return 0;
17156 }
17157 _ACEOF
17158 rm -f conftest.$ac_objext
17159 if { (ac_try="$ac_compile"
17160 case "(($ac_try" in
17161   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17162   *) ac_try_echo=$ac_try;;
17163 esac
17164 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17165 $as_echo "$ac_try_echo") >&5
17166   (eval "$ac_compile") 2>conftest.er1
17167   ac_status=$?
17168   grep -v '^ *+' conftest.er1 >conftest.err
17169   rm -f conftest.er1
17170   cat conftest.err >&5
17171   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17172   (exit $ac_status); } && {
17173          test -z "$ac_c_werror_flag" ||
17174          test ! -s conftest.err
17175        } && test -s conftest.$ac_objext; then
17176   :
17177 else
17178   $as_echo "$as_me: failed program was:" >&5
17179 sed 's/^/| /' conftest.$ac_ext >&5
17180
17181         ac_cv_type_z_streamp=yes
17182 fi
17183
17184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17185 else
17186   $as_echo "$as_me: failed program was:" >&5
17187 sed 's/^/| /' conftest.$ac_ext >&5
17188
17189
17190 fi
17191
17192 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17193 fi
17194 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
17195 $as_echo "$ac_cv_type_z_streamp" >&6; }
17196 if test "x$ac_cv_type_z_streamp" = x""yes; then
17197   :
17198 else
17199   { { $as_echo "$as_me:$LINENO: error: zlib version is too old
17200 Use --without-zlib to disable zlib support." >&5
17201 $as_echo "$as_me: error: zlib version is too old
17202 Use --without-zlib to disable zlib support." >&2;}
17203    { (exit 1); exit 1; }; }
17204 fi
17205
17206 fi
17207
17208 if test "$with_krb5" = yes; then
17209 # Check for differences between MIT and Heimdal (KTH) releases
17210   { $as_echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
17211 $as_echo_n "checking for krb5_ticket.enc_part2... " >&6; }
17212 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
17213   $as_echo_n "(cached) " >&6
17214 else
17215   cat >conftest.$ac_ext <<_ACEOF
17216 /* confdefs.h.  */
17217 _ACEOF
17218 cat confdefs.h >>conftest.$ac_ext
17219 cat >>conftest.$ac_ext <<_ACEOF
17220 /* end confdefs.h.  */
17221 #include <krb5.h>
17222
17223 int
17224 main ()
17225 {
17226 static krb5_ticket ac_aggr;
17227 if (ac_aggr.enc_part2)
17228 return 0;
17229   ;
17230   return 0;
17231 }
17232 _ACEOF
17233 rm -f conftest.$ac_objext
17234 if { (ac_try="$ac_compile"
17235 case "(($ac_try" in
17236   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17237   *) ac_try_echo=$ac_try;;
17238 esac
17239 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17240 $as_echo "$ac_try_echo") >&5
17241   (eval "$ac_compile") 2>conftest.er1
17242   ac_status=$?
17243   grep -v '^ *+' conftest.er1 >conftest.err
17244   rm -f conftest.er1
17245   cat conftest.err >&5
17246   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17247   (exit $ac_status); } && {
17248          test -z "$ac_c_werror_flag" ||
17249          test ! -s conftest.err
17250        } && test -s conftest.$ac_objext; then
17251   ac_cv_member_krb5_ticket_enc_part2=yes
17252 else
17253   $as_echo "$as_me: failed program was:" >&5
17254 sed 's/^/| /' conftest.$ac_ext >&5
17255
17256         cat >conftest.$ac_ext <<_ACEOF
17257 /* confdefs.h.  */
17258 _ACEOF
17259 cat confdefs.h >>conftest.$ac_ext
17260 cat >>conftest.$ac_ext <<_ACEOF
17261 /* end confdefs.h.  */
17262 #include <krb5.h>
17263
17264 int
17265 main ()
17266 {
17267 static krb5_ticket ac_aggr;
17268 if (sizeof ac_aggr.enc_part2)
17269 return 0;
17270   ;
17271   return 0;
17272 }
17273 _ACEOF
17274 rm -f conftest.$ac_objext
17275 if { (ac_try="$ac_compile"
17276 case "(($ac_try" in
17277   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17278   *) ac_try_echo=$ac_try;;
17279 esac
17280 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17281 $as_echo "$ac_try_echo") >&5
17282   (eval "$ac_compile") 2>conftest.er1
17283   ac_status=$?
17284   grep -v '^ *+' conftest.er1 >conftest.err
17285   rm -f conftest.er1
17286   cat conftest.err >&5
17287   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17288   (exit $ac_status); } && {
17289          test -z "$ac_c_werror_flag" ||
17290          test ! -s conftest.err
17291        } && test -s conftest.$ac_objext; then
17292   ac_cv_member_krb5_ticket_enc_part2=yes
17293 else
17294   $as_echo "$as_me: failed program was:" >&5
17295 sed 's/^/| /' conftest.$ac_ext >&5
17296
17297         ac_cv_member_krb5_ticket_enc_part2=no
17298 fi
17299
17300 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17301 fi
17302
17303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17304 fi
17305 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
17306 $as_echo "$ac_cv_member_krb5_ticket_enc_part2" >&6; }
17307 if test "x$ac_cv_member_krb5_ticket_enc_part2" = x""yes; then
17308
17309 cat >>confdefs.h <<_ACEOF
17310 #define HAVE_KRB5_TICKET_ENC_PART2 1
17311 _ACEOF
17312
17313
17314 else
17315   { $as_echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
17316 $as_echo_n "checking for krb5_ticket.client... " >&6; }
17317 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
17318   $as_echo_n "(cached) " >&6
17319 else
17320   cat >conftest.$ac_ext <<_ACEOF
17321 /* confdefs.h.  */
17322 _ACEOF
17323 cat confdefs.h >>conftest.$ac_ext
17324 cat >>conftest.$ac_ext <<_ACEOF
17325 /* end confdefs.h.  */
17326 #include <krb5.h>
17327
17328 int
17329 main ()
17330 {
17331 static krb5_ticket ac_aggr;
17332 if (ac_aggr.client)
17333 return 0;
17334   ;
17335   return 0;
17336 }
17337 _ACEOF
17338 rm -f conftest.$ac_objext
17339 if { (ac_try="$ac_compile"
17340 case "(($ac_try" in
17341   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17342   *) ac_try_echo=$ac_try;;
17343 esac
17344 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17345 $as_echo "$ac_try_echo") >&5
17346   (eval "$ac_compile") 2>conftest.er1
17347   ac_status=$?
17348   grep -v '^ *+' conftest.er1 >conftest.err
17349   rm -f conftest.er1
17350   cat conftest.err >&5
17351   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17352   (exit $ac_status); } && {
17353          test -z "$ac_c_werror_flag" ||
17354          test ! -s conftest.err
17355        } && test -s conftest.$ac_objext; then
17356   ac_cv_member_krb5_ticket_client=yes
17357 else
17358   $as_echo "$as_me: failed program was:" >&5
17359 sed 's/^/| /' conftest.$ac_ext >&5
17360
17361         cat >conftest.$ac_ext <<_ACEOF
17362 /* confdefs.h.  */
17363 _ACEOF
17364 cat confdefs.h >>conftest.$ac_ext
17365 cat >>conftest.$ac_ext <<_ACEOF
17366 /* end confdefs.h.  */
17367 #include <krb5.h>
17368
17369 int
17370 main ()
17371 {
17372 static krb5_ticket ac_aggr;
17373 if (sizeof ac_aggr.client)
17374 return 0;
17375   ;
17376   return 0;
17377 }
17378 _ACEOF
17379 rm -f conftest.$ac_objext
17380 if { (ac_try="$ac_compile"
17381 case "(($ac_try" in
17382   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17383   *) ac_try_echo=$ac_try;;
17384 esac
17385 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17386 $as_echo "$ac_try_echo") >&5
17387   (eval "$ac_compile") 2>conftest.er1
17388   ac_status=$?
17389   grep -v '^ *+' conftest.er1 >conftest.err
17390   rm -f conftest.er1
17391   cat conftest.err >&5
17392   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17393   (exit $ac_status); } && {
17394          test -z "$ac_c_werror_flag" ||
17395          test ! -s conftest.err
17396        } && test -s conftest.$ac_objext; then
17397   ac_cv_member_krb5_ticket_client=yes
17398 else
17399   $as_echo "$as_me: failed program was:" >&5
17400 sed 's/^/| /' conftest.$ac_ext >&5
17401
17402         ac_cv_member_krb5_ticket_client=no
17403 fi
17404
17405 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17406 fi
17407
17408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17409 fi
17410 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
17411 $as_echo "$ac_cv_member_krb5_ticket_client" >&6; }
17412 if test "x$ac_cv_member_krb5_ticket_client" = x""yes; then
17413
17414 cat >>confdefs.h <<_ACEOF
17415 #define HAVE_KRB5_TICKET_CLIENT 1
17416 _ACEOF
17417
17418
17419 else
17420   { { $as_echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
17421 $as_echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
17422    { (exit 1); exit 1; }; }
17423 fi
17424
17425 fi
17426
17427   { $as_echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
17428 $as_echo_n "checking for krb5_error.text.data... " >&6; }
17429 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
17430   $as_echo_n "(cached) " >&6
17431 else
17432   cat >conftest.$ac_ext <<_ACEOF
17433 /* confdefs.h.  */
17434 _ACEOF
17435 cat confdefs.h >>conftest.$ac_ext
17436 cat >>conftest.$ac_ext <<_ACEOF
17437 /* end confdefs.h.  */
17438 #include <krb5.h>
17439
17440 int
17441 main ()
17442 {
17443 static krb5_error ac_aggr;
17444 if (ac_aggr.text.data)
17445 return 0;
17446   ;
17447   return 0;
17448 }
17449 _ACEOF
17450 rm -f conftest.$ac_objext
17451 if { (ac_try="$ac_compile"
17452 case "(($ac_try" in
17453   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17454   *) ac_try_echo=$ac_try;;
17455 esac
17456 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17457 $as_echo "$ac_try_echo") >&5
17458   (eval "$ac_compile") 2>conftest.er1
17459   ac_status=$?
17460   grep -v '^ *+' conftest.er1 >conftest.err
17461   rm -f conftest.er1
17462   cat conftest.err >&5
17463   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17464   (exit $ac_status); } && {
17465          test -z "$ac_c_werror_flag" ||
17466          test ! -s conftest.err
17467        } && test -s conftest.$ac_objext; then
17468   ac_cv_member_krb5_error_text_data=yes
17469 else
17470   $as_echo "$as_me: failed program was:" >&5
17471 sed 's/^/| /' conftest.$ac_ext >&5
17472
17473         cat >conftest.$ac_ext <<_ACEOF
17474 /* confdefs.h.  */
17475 _ACEOF
17476 cat confdefs.h >>conftest.$ac_ext
17477 cat >>conftest.$ac_ext <<_ACEOF
17478 /* end confdefs.h.  */
17479 #include <krb5.h>
17480
17481 int
17482 main ()
17483 {
17484 static krb5_error ac_aggr;
17485 if (sizeof ac_aggr.text.data)
17486 return 0;
17487   ;
17488   return 0;
17489 }
17490 _ACEOF
17491 rm -f conftest.$ac_objext
17492 if { (ac_try="$ac_compile"
17493 case "(($ac_try" in
17494   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17495   *) ac_try_echo=$ac_try;;
17496 esac
17497 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17498 $as_echo "$ac_try_echo") >&5
17499   (eval "$ac_compile") 2>conftest.er1
17500   ac_status=$?
17501   grep -v '^ *+' conftest.er1 >conftest.err
17502   rm -f conftest.er1
17503   cat conftest.err >&5
17504   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17505   (exit $ac_status); } && {
17506          test -z "$ac_c_werror_flag" ||
17507          test ! -s conftest.err
17508        } && test -s conftest.$ac_objext; then
17509   ac_cv_member_krb5_error_text_data=yes
17510 else
17511   $as_echo "$as_me: failed program was:" >&5
17512 sed 's/^/| /' conftest.$ac_ext >&5
17513
17514         ac_cv_member_krb5_error_text_data=no
17515 fi
17516
17517 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17518 fi
17519
17520 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17521 fi
17522 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
17523 $as_echo "$ac_cv_member_krb5_error_text_data" >&6; }
17524 if test "x$ac_cv_member_krb5_error_text_data" = x""yes; then
17525
17526 cat >>confdefs.h <<_ACEOF
17527 #define HAVE_KRB5_ERROR_TEXT_DATA 1
17528 _ACEOF
17529
17530
17531 else
17532   { $as_echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
17533 $as_echo_n "checking for krb5_error.e_data... " >&6; }
17534 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
17535   $as_echo_n "(cached) " >&6
17536 else
17537   cat >conftest.$ac_ext <<_ACEOF
17538 /* confdefs.h.  */
17539 _ACEOF
17540 cat confdefs.h >>conftest.$ac_ext
17541 cat >>conftest.$ac_ext <<_ACEOF
17542 /* end confdefs.h.  */
17543 #include <krb5.h>
17544
17545 int
17546 main ()
17547 {
17548 static krb5_error ac_aggr;
17549 if (ac_aggr.e_data)
17550 return 0;
17551   ;
17552   return 0;
17553 }
17554 _ACEOF
17555 rm -f conftest.$ac_objext
17556 if { (ac_try="$ac_compile"
17557 case "(($ac_try" in
17558   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17559   *) ac_try_echo=$ac_try;;
17560 esac
17561 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17562 $as_echo "$ac_try_echo") >&5
17563   (eval "$ac_compile") 2>conftest.er1
17564   ac_status=$?
17565   grep -v '^ *+' conftest.er1 >conftest.err
17566   rm -f conftest.er1
17567   cat conftest.err >&5
17568   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17569   (exit $ac_status); } && {
17570          test -z "$ac_c_werror_flag" ||
17571          test ! -s conftest.err
17572        } && test -s conftest.$ac_objext; then
17573   ac_cv_member_krb5_error_e_data=yes
17574 else
17575   $as_echo "$as_me: failed program was:" >&5
17576 sed 's/^/| /' conftest.$ac_ext >&5
17577
17578         cat >conftest.$ac_ext <<_ACEOF
17579 /* confdefs.h.  */
17580 _ACEOF
17581 cat confdefs.h >>conftest.$ac_ext
17582 cat >>conftest.$ac_ext <<_ACEOF
17583 /* end confdefs.h.  */
17584 #include <krb5.h>
17585
17586 int
17587 main ()
17588 {
17589 static krb5_error ac_aggr;
17590 if (sizeof ac_aggr.e_data)
17591 return 0;
17592   ;
17593   return 0;
17594 }
17595 _ACEOF
17596 rm -f conftest.$ac_objext
17597 if { (ac_try="$ac_compile"
17598 case "(($ac_try" in
17599   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17600   *) ac_try_echo=$ac_try;;
17601 esac
17602 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17603 $as_echo "$ac_try_echo") >&5
17604   (eval "$ac_compile") 2>conftest.er1
17605   ac_status=$?
17606   grep -v '^ *+' conftest.er1 >conftest.err
17607   rm -f conftest.er1
17608   cat conftest.err >&5
17609   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17610   (exit $ac_status); } && {
17611          test -z "$ac_c_werror_flag" ||
17612          test ! -s conftest.err
17613        } && test -s conftest.$ac_objext; then
17614   ac_cv_member_krb5_error_e_data=yes
17615 else
17616   $as_echo "$as_me: failed program was:" >&5
17617 sed 's/^/| /' conftest.$ac_ext >&5
17618
17619         ac_cv_member_krb5_error_e_data=no
17620 fi
17621
17622 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17623 fi
17624
17625 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17626 fi
17627 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
17628 $as_echo "$ac_cv_member_krb5_error_e_data" >&6; }
17629 if test "x$ac_cv_member_krb5_error_e_data" = x""yes; then
17630
17631 cat >>confdefs.h <<_ACEOF
17632 #define HAVE_KRB5_ERROR_E_DATA 1
17633 _ACEOF
17634
17635
17636 else
17637   { { $as_echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
17638 $as_echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
17639    { (exit 1); exit 1; }; }
17640 fi
17641
17642 fi
17643
17644
17645 # Win32 requires headers to be loaded for __stdcall, so can't use
17646 # AC_CHECK_FUNCS here.
17647   { $as_echo "$as_me:$LINENO: checking for krb5_free_unparsed_name" >&5
17648 $as_echo_n "checking for krb5_free_unparsed_name... " >&6; }
17649   cat >conftest.$ac_ext <<_ACEOF
17650 /* confdefs.h.  */
17651 _ACEOF
17652 cat confdefs.h >>conftest.$ac_ext
17653 cat >>conftest.$ac_ext <<_ACEOF
17654 /* end confdefs.h.  */
17655 #include <krb5.h>
17656 int
17657 main ()
17658 {
17659 krb5_free_unparsed_name(NULL,NULL);
17660   ;
17661   return 0;
17662 }
17663 _ACEOF
17664 rm -f conftest.$ac_objext conftest$ac_exeext
17665 if { (ac_try="$ac_link"
17666 case "(($ac_try" in
17667   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17668   *) ac_try_echo=$ac_try;;
17669 esac
17670 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17671 $as_echo "$ac_try_echo") >&5
17672   (eval "$ac_link") 2>conftest.er1
17673   ac_status=$?
17674   grep -v '^ *+' conftest.er1 >conftest.err
17675   rm -f conftest.er1
17676   cat conftest.err >&5
17677   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17678   (exit $ac_status); } && {
17679          test -z "$ac_c_werror_flag" ||
17680          test ! -s conftest.err
17681        } && test -s conftest$ac_exeext && {
17682          test "$cross_compiling" = yes ||
17683          $as_test_x conftest$ac_exeext
17684        }; then
17685
17686 cat >>confdefs.h <<\_ACEOF
17687 #define HAVE_KRB5_FREE_UNPARSED_NAME 1
17688 _ACEOF
17689
17690 { $as_echo "$as_me:$LINENO: result: yes" >&5
17691 $as_echo "yes" >&6; }
17692 else
17693   $as_echo "$as_me: failed program was:" >&5
17694 sed 's/^/| /' conftest.$ac_ext >&5
17695
17696         { $as_echo "$as_me:$LINENO: result: no" >&5
17697 $as_echo "no" >&6; }
17698 fi
17699
17700 rm -rf conftest.dSYM
17701 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17702       conftest$ac_exeext conftest.$ac_ext
17703 fi
17704
17705 # Check largefile support.  You might think this is a system service not a
17706 # compiler characteristic, but you'd be wrong.  We must check this before
17707 # probing existence of related functions such as fseeko, since the largefile
17708 # defines can affect what is generated for that.
17709 # Check whether --enable-largefile was given.
17710 if test "${enable_largefile+set}" = set; then
17711   enableval=$enable_largefile;
17712 fi
17713
17714 if test "$enable_largefile" != no; then
17715
17716   { $as_echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
17717 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
17718 if test "${ac_cv_sys_largefile_CC+set}" = set; then
17719   $as_echo_n "(cached) " >&6
17720 else
17721   ac_cv_sys_largefile_CC=no
17722      if test "$GCC" != yes; then
17723        ac_save_CC=$CC
17724        while :; do
17725          # IRIX 6.2 and later do not support large files by default,
17726          # so use the C compiler's -n32 option if that helps.
17727          cat >conftest.$ac_ext <<_ACEOF
17728 /* confdefs.h.  */
17729 _ACEOF
17730 cat confdefs.h >>conftest.$ac_ext
17731 cat >>conftest.$ac_ext <<_ACEOF
17732 /* end confdefs.h.  */
17733 #include <sys/types.h>
17734  /* Check that off_t can represent 2**63 - 1 correctly.
17735     We can't simply define LARGE_OFF_T to be 9223372036854775807,
17736     since some C++ compilers masquerading as C compilers
17737     incorrectly reject 9223372036854775807.  */
17738 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
17739   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17740                        && LARGE_OFF_T % 2147483647 == 1)
17741                       ? 1 : -1];
17742 int
17743 main ()
17744 {
17745
17746   ;
17747   return 0;
17748 }
17749 _ACEOF
17750          rm -f conftest.$ac_objext
17751 if { (ac_try="$ac_compile"
17752 case "(($ac_try" in
17753   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17754   *) ac_try_echo=$ac_try;;
17755 esac
17756 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17757 $as_echo "$ac_try_echo") >&5
17758   (eval "$ac_compile") 2>conftest.er1
17759   ac_status=$?
17760   grep -v '^ *+' conftest.er1 >conftest.err
17761   rm -f conftest.er1
17762   cat conftest.err >&5
17763   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17764   (exit $ac_status); } && {
17765          test -z "$ac_c_werror_flag" ||
17766          test ! -s conftest.err
17767        } && test -s conftest.$ac_objext; then
17768   break
17769 else
17770   $as_echo "$as_me: failed program was:" >&5
17771 sed 's/^/| /' conftest.$ac_ext >&5
17772
17773
17774 fi
17775
17776 rm -f core conftest.err conftest.$ac_objext
17777          CC="$CC -n32"
17778          rm -f conftest.$ac_objext
17779 if { (ac_try="$ac_compile"
17780 case "(($ac_try" in
17781   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17782   *) ac_try_echo=$ac_try;;
17783 esac
17784 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17785 $as_echo "$ac_try_echo") >&5
17786   (eval "$ac_compile") 2>conftest.er1
17787   ac_status=$?
17788   grep -v '^ *+' conftest.er1 >conftest.err
17789   rm -f conftest.er1
17790   cat conftest.err >&5
17791   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17792   (exit $ac_status); } && {
17793          test -z "$ac_c_werror_flag" ||
17794          test ! -s conftest.err
17795        } && test -s conftest.$ac_objext; then
17796   ac_cv_sys_largefile_CC=' -n32'; break
17797 else
17798   $as_echo "$as_me: failed program was:" >&5
17799 sed 's/^/| /' conftest.$ac_ext >&5
17800
17801
17802 fi
17803
17804 rm -f core conftest.err conftest.$ac_objext
17805          break
17806        done
17807        CC=$ac_save_CC
17808        rm -f conftest.$ac_ext
17809     fi
17810 fi
17811 { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
17812 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
17813   if test "$ac_cv_sys_largefile_CC" != no; then
17814     CC=$CC$ac_cv_sys_largefile_CC
17815   fi
17816
17817   { $as_echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
17818 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
17819 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
17820   $as_echo_n "(cached) " >&6
17821 else
17822   while :; do
17823   cat >conftest.$ac_ext <<_ACEOF
17824 /* confdefs.h.  */
17825 _ACEOF
17826 cat confdefs.h >>conftest.$ac_ext
17827 cat >>conftest.$ac_ext <<_ACEOF
17828 /* end confdefs.h.  */
17829 #include <sys/types.h>
17830  /* Check that off_t can represent 2**63 - 1 correctly.
17831     We can't simply define LARGE_OFF_T to be 9223372036854775807,
17832     since some C++ compilers masquerading as C compilers
17833     incorrectly reject 9223372036854775807.  */
17834 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
17835   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17836                        && LARGE_OFF_T % 2147483647 == 1)
17837                       ? 1 : -1];
17838 int
17839 main ()
17840 {
17841
17842   ;
17843   return 0;
17844 }
17845 _ACEOF
17846 rm -f conftest.$ac_objext
17847 if { (ac_try="$ac_compile"
17848 case "(($ac_try" in
17849   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17850   *) ac_try_echo=$ac_try;;
17851 esac
17852 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17853 $as_echo "$ac_try_echo") >&5
17854   (eval "$ac_compile") 2>conftest.er1
17855   ac_status=$?
17856   grep -v '^ *+' conftest.er1 >conftest.err
17857   rm -f conftest.er1
17858   cat conftest.err >&5
17859   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17860   (exit $ac_status); } && {
17861          test -z "$ac_c_werror_flag" ||
17862          test ! -s conftest.err
17863        } && test -s conftest.$ac_objext; then
17864   ac_cv_sys_file_offset_bits=no; break
17865 else
17866   $as_echo "$as_me: failed program was:" >&5
17867 sed 's/^/| /' conftest.$ac_ext >&5
17868
17869
17870 fi
17871
17872 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17873   cat >conftest.$ac_ext <<_ACEOF
17874 /* confdefs.h.  */
17875 _ACEOF
17876 cat confdefs.h >>conftest.$ac_ext
17877 cat >>conftest.$ac_ext <<_ACEOF
17878 /* end confdefs.h.  */
17879 #define _FILE_OFFSET_BITS 64
17880 #include <sys/types.h>
17881  /* Check that off_t can represent 2**63 - 1 correctly.
17882     We can't simply define LARGE_OFF_T to be 9223372036854775807,
17883     since some C++ compilers masquerading as C compilers
17884     incorrectly reject 9223372036854775807.  */
17885 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
17886   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17887                        && LARGE_OFF_T % 2147483647 == 1)
17888                       ? 1 : -1];
17889 int
17890 main ()
17891 {
17892
17893   ;
17894   return 0;
17895 }
17896 _ACEOF
17897 rm -f conftest.$ac_objext
17898 if { (ac_try="$ac_compile"
17899 case "(($ac_try" in
17900   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17901   *) ac_try_echo=$ac_try;;
17902 esac
17903 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17904 $as_echo "$ac_try_echo") >&5
17905   (eval "$ac_compile") 2>conftest.er1
17906   ac_status=$?
17907   grep -v '^ *+' conftest.er1 >conftest.err
17908   rm -f conftest.er1
17909   cat conftest.err >&5
17910   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17911   (exit $ac_status); } && {
17912          test -z "$ac_c_werror_flag" ||
17913          test ! -s conftest.err
17914        } && test -s conftest.$ac_objext; then
17915   ac_cv_sys_file_offset_bits=64; break
17916 else
17917   $as_echo "$as_me: failed program was:" >&5
17918 sed 's/^/| /' conftest.$ac_ext >&5
17919
17920
17921 fi
17922
17923 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17924   ac_cv_sys_file_offset_bits=unknown
17925   break
17926 done
17927 fi
17928 { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
17929 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
17930 case $ac_cv_sys_file_offset_bits in #(
17931   no | unknown) ;;
17932   *)
17933 cat >>confdefs.h <<_ACEOF
17934 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
17935 _ACEOF
17936 ;;
17937 esac
17938 rm -rf conftest*
17939   if test $ac_cv_sys_file_offset_bits = unknown; then
17940     { $as_echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
17941 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
17942 if test "${ac_cv_sys_large_files+set}" = set; then
17943   $as_echo_n "(cached) " >&6
17944 else
17945   while :; do
17946   cat >conftest.$ac_ext <<_ACEOF
17947 /* confdefs.h.  */
17948 _ACEOF
17949 cat confdefs.h >>conftest.$ac_ext
17950 cat >>conftest.$ac_ext <<_ACEOF
17951 /* end confdefs.h.  */
17952 #include <sys/types.h>
17953  /* Check that off_t can represent 2**63 - 1 correctly.
17954     We can't simply define LARGE_OFF_T to be 9223372036854775807,
17955     since some C++ compilers masquerading as C compilers
17956     incorrectly reject 9223372036854775807.  */
17957 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
17958   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17959                        && LARGE_OFF_T % 2147483647 == 1)
17960                       ? 1 : -1];
17961 int
17962 main ()
17963 {
17964
17965   ;
17966   return 0;
17967 }
17968 _ACEOF
17969 rm -f conftest.$ac_objext
17970 if { (ac_try="$ac_compile"
17971 case "(($ac_try" in
17972   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17973   *) ac_try_echo=$ac_try;;
17974 esac
17975 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17976 $as_echo "$ac_try_echo") >&5
17977   (eval "$ac_compile") 2>conftest.er1
17978   ac_status=$?
17979   grep -v '^ *+' conftest.er1 >conftest.err
17980   rm -f conftest.er1
17981   cat conftest.err >&5
17982   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17983   (exit $ac_status); } && {
17984          test -z "$ac_c_werror_flag" ||
17985          test ! -s conftest.err
17986        } && test -s conftest.$ac_objext; then
17987   ac_cv_sys_large_files=no; break
17988 else
17989   $as_echo "$as_me: failed program was:" >&5
17990 sed 's/^/| /' conftest.$ac_ext >&5
17991
17992
17993 fi
17994
17995 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17996   cat >conftest.$ac_ext <<_ACEOF
17997 /* confdefs.h.  */
17998 _ACEOF
17999 cat confdefs.h >>conftest.$ac_ext
18000 cat >>conftest.$ac_ext <<_ACEOF
18001 /* end confdefs.h.  */
18002 #define _LARGE_FILES 1
18003 #include <sys/types.h>
18004  /* Check that off_t can represent 2**63 - 1 correctly.
18005     We can't simply define LARGE_OFF_T to be 9223372036854775807,
18006     since some C++ compilers masquerading as C compilers
18007     incorrectly reject 9223372036854775807.  */
18008 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
18009   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
18010                        && LARGE_OFF_T % 2147483647 == 1)
18011                       ? 1 : -1];
18012 int
18013 main ()
18014 {
18015
18016   ;
18017   return 0;
18018 }
18019 _ACEOF
18020 rm -f conftest.$ac_objext
18021 if { (ac_try="$ac_compile"
18022 case "(($ac_try" in
18023   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18024   *) ac_try_echo=$ac_try;;
18025 esac
18026 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18027 $as_echo "$ac_try_echo") >&5
18028   (eval "$ac_compile") 2>conftest.er1
18029   ac_status=$?
18030   grep -v '^ *+' conftest.er1 >conftest.err
18031   rm -f conftest.er1
18032   cat conftest.err >&5
18033   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18034   (exit $ac_status); } && {
18035          test -z "$ac_c_werror_flag" ||
18036          test ! -s conftest.err
18037        } && test -s conftest.$ac_objext; then
18038   ac_cv_sys_large_files=1; break
18039 else
18040   $as_echo "$as_me: failed program was:" >&5
18041 sed 's/^/| /' conftest.$ac_ext >&5
18042
18043
18044 fi
18045
18046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18047   ac_cv_sys_large_files=unknown
18048   break
18049 done
18050 fi
18051 { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
18052 $as_echo "$ac_cv_sys_large_files" >&6; }
18053 case $ac_cv_sys_large_files in #(
18054   no | unknown) ;;
18055   *)
18056 cat >>confdefs.h <<_ACEOF
18057 #define _LARGE_FILES $ac_cv_sys_large_files
18058 _ACEOF
18059 ;;
18060 esac
18061 rm -rf conftest*
18062   fi
18063 fi
18064
18065
18066 # Check for largefile support (must be after AC_SYS_LARGEFILE)
18067 # The cast to long int works around a bug in the HP C Compiler
18068 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18069 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18070 # This bug is HP SR number 8606223364.
18071 { $as_echo "$as_me:$LINENO: checking size of off_t" >&5
18072 $as_echo_n "checking size of off_t... " >&6; }
18073 if test "${ac_cv_sizeof_off_t+set}" = set; then
18074   $as_echo_n "(cached) " >&6
18075 else
18076   if test "$cross_compiling" = yes; then
18077   # Depending upon the size, compute the lo and hi bounds.
18078 cat >conftest.$ac_ext <<_ACEOF
18079 /* confdefs.h.  */
18080 _ACEOF
18081 cat confdefs.h >>conftest.$ac_ext
18082 cat >>conftest.$ac_ext <<_ACEOF
18083 /* end confdefs.h.  */
18084 $ac_includes_default
18085 int
18086 main ()
18087 {
18088 static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= 0)];
18089 test_array [0] = 0
18090
18091   ;
18092   return 0;
18093 }
18094 _ACEOF
18095 rm -f conftest.$ac_objext
18096 if { (ac_try="$ac_compile"
18097 case "(($ac_try" in
18098   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18099   *) ac_try_echo=$ac_try;;
18100 esac
18101 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18102 $as_echo "$ac_try_echo") >&5
18103   (eval "$ac_compile") 2>conftest.er1
18104   ac_status=$?
18105   grep -v '^ *+' conftest.er1 >conftest.err
18106   rm -f conftest.er1
18107   cat conftest.err >&5
18108   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18109   (exit $ac_status); } && {
18110          test -z "$ac_c_werror_flag" ||
18111          test ! -s conftest.err
18112        } && test -s conftest.$ac_objext; then
18113   ac_lo=0 ac_mid=0
18114   while :; do
18115     cat >conftest.$ac_ext <<_ACEOF
18116 /* confdefs.h.  */
18117 _ACEOF
18118 cat confdefs.h >>conftest.$ac_ext
18119 cat >>conftest.$ac_ext <<_ACEOF
18120 /* end confdefs.h.  */
18121 $ac_includes_default
18122 int
18123 main ()
18124 {
18125 static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)];
18126 test_array [0] = 0
18127
18128   ;
18129   return 0;
18130 }
18131 _ACEOF
18132 rm -f conftest.$ac_objext
18133 if { (ac_try="$ac_compile"
18134 case "(($ac_try" in
18135   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18136   *) ac_try_echo=$ac_try;;
18137 esac
18138 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18139 $as_echo "$ac_try_echo") >&5
18140   (eval "$ac_compile") 2>conftest.er1
18141   ac_status=$?
18142   grep -v '^ *+' conftest.er1 >conftest.err
18143   rm -f conftest.er1
18144   cat conftest.err >&5
18145   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18146   (exit $ac_status); } && {
18147          test -z "$ac_c_werror_flag" ||
18148          test ! -s conftest.err
18149        } && test -s conftest.$ac_objext; then
18150   ac_hi=$ac_mid; break
18151 else
18152   $as_echo "$as_me: failed program was:" >&5
18153 sed 's/^/| /' conftest.$ac_ext >&5
18154
18155         ac_lo=`expr $ac_mid + 1`
18156                         if test $ac_lo -le $ac_mid; then
18157                           ac_lo= ac_hi=
18158                           break
18159                         fi
18160                         ac_mid=`expr 2 '*' $ac_mid + 1`
18161 fi
18162
18163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18164   done
18165 else
18166   $as_echo "$as_me: failed program was:" >&5
18167 sed 's/^/| /' conftest.$ac_ext >&5
18168
18169         cat >conftest.$ac_ext <<_ACEOF
18170 /* confdefs.h.  */
18171 _ACEOF
18172 cat confdefs.h >>conftest.$ac_ext
18173 cat >>conftest.$ac_ext <<_ACEOF
18174 /* end confdefs.h.  */
18175 $ac_includes_default
18176 int
18177 main ()
18178 {
18179 static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) < 0)];
18180 test_array [0] = 0
18181
18182   ;
18183   return 0;
18184 }
18185 _ACEOF
18186 rm -f conftest.$ac_objext
18187 if { (ac_try="$ac_compile"
18188 case "(($ac_try" in
18189   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18190   *) ac_try_echo=$ac_try;;
18191 esac
18192 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18193 $as_echo "$ac_try_echo") >&5
18194   (eval "$ac_compile") 2>conftest.er1
18195   ac_status=$?
18196   grep -v '^ *+' conftest.er1 >conftest.err
18197   rm -f conftest.er1
18198   cat conftest.err >&5
18199   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18200   (exit $ac_status); } && {
18201          test -z "$ac_c_werror_flag" ||
18202          test ! -s conftest.err
18203        } && test -s conftest.$ac_objext; then
18204   ac_hi=-1 ac_mid=-1
18205   while :; do
18206     cat >conftest.$ac_ext <<_ACEOF
18207 /* confdefs.h.  */
18208 _ACEOF
18209 cat confdefs.h >>conftest.$ac_ext
18210 cat >>conftest.$ac_ext <<_ACEOF
18211 /* end confdefs.h.  */
18212 $ac_includes_default
18213 int
18214 main ()
18215 {
18216 static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= $ac_mid)];
18217 test_array [0] = 0
18218
18219   ;
18220   return 0;
18221 }
18222 _ACEOF
18223 rm -f conftest.$ac_objext
18224 if { (ac_try="$ac_compile"
18225 case "(($ac_try" in
18226   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18227   *) ac_try_echo=$ac_try;;
18228 esac
18229 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18230 $as_echo "$ac_try_echo") >&5
18231   (eval "$ac_compile") 2>conftest.er1
18232   ac_status=$?
18233   grep -v '^ *+' conftest.er1 >conftest.err
18234   rm -f conftest.er1
18235   cat conftest.err >&5
18236   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18237   (exit $ac_status); } && {
18238          test -z "$ac_c_werror_flag" ||
18239          test ! -s conftest.err
18240        } && test -s conftest.$ac_objext; then
18241   ac_lo=$ac_mid; break
18242 else
18243   $as_echo "$as_me: failed program was:" >&5
18244 sed 's/^/| /' conftest.$ac_ext >&5
18245
18246         ac_hi=`expr '(' $ac_mid ')' - 1`
18247                         if test $ac_mid -le $ac_hi; then
18248                           ac_lo= ac_hi=
18249                           break
18250                         fi
18251                         ac_mid=`expr 2 '*' $ac_mid`
18252 fi
18253
18254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18255   done
18256 else
18257   $as_echo "$as_me: failed program was:" >&5
18258 sed 's/^/| /' conftest.$ac_ext >&5
18259
18260         ac_lo= ac_hi=
18261 fi
18262
18263 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18264 fi
18265
18266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18267 # Binary search between lo and hi bounds.
18268 while test "x$ac_lo" != "x$ac_hi"; do
18269   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18270   cat >conftest.$ac_ext <<_ACEOF
18271 /* confdefs.h.  */
18272 _ACEOF
18273 cat confdefs.h >>conftest.$ac_ext
18274 cat >>conftest.$ac_ext <<_ACEOF
18275 /* end confdefs.h.  */
18276 $ac_includes_default
18277 int
18278 main ()
18279 {
18280 static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)];
18281 test_array [0] = 0
18282
18283   ;
18284   return 0;
18285 }
18286 _ACEOF
18287 rm -f conftest.$ac_objext
18288 if { (ac_try="$ac_compile"
18289 case "(($ac_try" in
18290   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18291   *) ac_try_echo=$ac_try;;
18292 esac
18293 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18294 $as_echo "$ac_try_echo") >&5
18295   (eval "$ac_compile") 2>conftest.er1
18296   ac_status=$?
18297   grep -v '^ *+' conftest.er1 >conftest.err
18298   rm -f conftest.er1
18299   cat conftest.err >&5
18300   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18301   (exit $ac_status); } && {
18302          test -z "$ac_c_werror_flag" ||
18303          test ! -s conftest.err
18304        } && test -s conftest.$ac_objext; then
18305   ac_hi=$ac_mid
18306 else
18307   $as_echo "$as_me: failed program was:" >&5
18308 sed 's/^/| /' conftest.$ac_ext >&5
18309
18310         ac_lo=`expr '(' $ac_mid ')' + 1`
18311 fi
18312
18313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18314 done
18315 case $ac_lo in
18316 ?*) ac_cv_sizeof_off_t=$ac_lo;;
18317 '') if test "$ac_cv_type_off_t" = yes; then
18318      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
18319 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18320 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
18321 See \`config.log' for more details." >&5
18322 $as_echo "$as_me: error: cannot compute sizeof (off_t)
18323 See \`config.log' for more details." >&2;}
18324    { (exit 77); exit 77; }; }; }
18325    else
18326      ac_cv_sizeof_off_t=0
18327    fi ;;
18328 esac
18329 else
18330   cat >conftest.$ac_ext <<_ACEOF
18331 /* confdefs.h.  */
18332 _ACEOF
18333 cat confdefs.h >>conftest.$ac_ext
18334 cat >>conftest.$ac_ext <<_ACEOF
18335 /* end confdefs.h.  */
18336 $ac_includes_default
18337 static long int longval () { return (long int) (sizeof (off_t)); }
18338 static unsigned long int ulongval () { return (long int) (sizeof (off_t)); }
18339 #include <stdio.h>
18340 #include <stdlib.h>
18341 int
18342 main ()
18343 {
18344
18345   FILE *f = fopen ("conftest.val", "w");
18346   if (! f)
18347     return 1;
18348   if (((long int) (sizeof (off_t))) < 0)
18349     {
18350       long int i = longval ();
18351       if (i != ((long int) (sizeof (off_t))))
18352         return 1;
18353       fprintf (f, "%ld", i);
18354     }
18355   else
18356     {
18357       unsigned long int i = ulongval ();
18358       if (i != ((long int) (sizeof (off_t))))
18359         return 1;
18360       fprintf (f, "%lu", i);
18361     }
18362   /* Do not output a trailing newline, as this causes \r\n confusion
18363      on some platforms.  */
18364   return ferror (f) || fclose (f) != 0;
18365
18366   ;
18367   return 0;
18368 }
18369 _ACEOF
18370 rm -f conftest$ac_exeext
18371 if { (ac_try="$ac_link"
18372 case "(($ac_try" in
18373   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18374   *) ac_try_echo=$ac_try;;
18375 esac
18376 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18377 $as_echo "$ac_try_echo") >&5
18378   (eval "$ac_link") 2>&5
18379   ac_status=$?
18380   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18381   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18382   { (case "(($ac_try" in
18383   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18384   *) ac_try_echo=$ac_try;;
18385 esac
18386 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18387 $as_echo "$ac_try_echo") >&5
18388   (eval "$ac_try") 2>&5
18389   ac_status=$?
18390   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18391   (exit $ac_status); }; }; then
18392   ac_cv_sizeof_off_t=`cat conftest.val`
18393 else
18394   $as_echo "$as_me: program exited with status $ac_status" >&5
18395 $as_echo "$as_me: failed program was:" >&5
18396 sed 's/^/| /' conftest.$ac_ext >&5
18397
18398 ( exit $ac_status )
18399 if test "$ac_cv_type_off_t" = yes; then
18400      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
18401 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18402 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
18403 See \`config.log' for more details." >&5
18404 $as_echo "$as_me: error: cannot compute sizeof (off_t)
18405 See \`config.log' for more details." >&2;}
18406    { (exit 77); exit 77; }; }; }
18407    else
18408      ac_cv_sizeof_off_t=0
18409    fi
18410 fi
18411 rm -rf conftest.dSYM
18412 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18413 fi
18414 rm -f conftest.val
18415 fi
18416 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
18417 $as_echo "$ac_cv_sizeof_off_t" >&6; }
18418
18419
18420
18421 cat >>confdefs.h <<_ACEOF
18422 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
18423 _ACEOF
18424
18425
18426
18427 # If we don't have largefile support, can't handle segsize >= 2GB.
18428 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
18429    { { $as_echo "$as_me:$LINENO: error: Large file support is not enabled. Segment size cannot be larger than 1GB." >&5
18430 $as_echo "$as_me: error: Large file support is not enabled. Segment size cannot be larger than 1GB." >&2;}
18431    { (exit 1); exit 1; }; }
18432 fi
18433
18434
18435 ##
18436 ## Functions, global variables
18437 ##
18438
18439 { $as_echo "$as_me:$LINENO: checking for int timezone" >&5
18440 $as_echo_n "checking for int timezone... " >&6; }
18441 if test "${pgac_cv_var_int_timezone+set}" = set; then
18442   $as_echo_n "(cached) " >&6
18443 else
18444   cat >conftest.$ac_ext <<_ACEOF
18445 /* confdefs.h.  */
18446 _ACEOF
18447 cat confdefs.h >>conftest.$ac_ext
18448 cat >>conftest.$ac_ext <<_ACEOF
18449 /* end confdefs.h.  */
18450 #include <time.h>
18451 int res;
18452 int
18453 main ()
18454 {
18455 #ifndef __CYGWIN__
18456 res = timezone / 60;
18457 #else
18458 res = _timezone / 60;
18459 #endif
18460   ;
18461   return 0;
18462 }
18463 _ACEOF
18464 rm -f conftest.$ac_objext conftest$ac_exeext
18465 if { (ac_try="$ac_link"
18466 case "(($ac_try" in
18467   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18468   *) ac_try_echo=$ac_try;;
18469 esac
18470 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18471 $as_echo "$ac_try_echo") >&5
18472   (eval "$ac_link") 2>conftest.er1
18473   ac_status=$?
18474   grep -v '^ *+' conftest.er1 >conftest.err
18475   rm -f conftest.er1
18476   cat conftest.err >&5
18477   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18478   (exit $ac_status); } && {
18479          test -z "$ac_c_werror_flag" ||
18480          test ! -s conftest.err
18481        } && test -s conftest$ac_exeext && {
18482          test "$cross_compiling" = yes ||
18483          $as_test_x conftest$ac_exeext
18484        }; then
18485   pgac_cv_var_int_timezone=yes
18486 else
18487   $as_echo "$as_me: failed program was:" >&5
18488 sed 's/^/| /' conftest.$ac_ext >&5
18489
18490         pgac_cv_var_int_timezone=no
18491 fi
18492
18493 rm -rf conftest.dSYM
18494 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18495       conftest$ac_exeext conftest.$ac_ext
18496 fi
18497 { $as_echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
18498 $as_echo "$pgac_cv_var_int_timezone" >&6; }
18499 if test x"$pgac_cv_var_int_timezone" = xyes ; then
18500
18501 cat >>confdefs.h <<\_ACEOF
18502 #define HAVE_INT_TIMEZONE /**/
18503 _ACEOF
18504
18505 fi
18506 { $as_echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
18507 $as_echo_n "checking types of arguments for accept()... " >&6; }
18508  if test "${ac_cv_func_accept_return+set}" = set; then
18509   $as_echo_n "(cached) " >&6
18510 else
18511    if test "${ac_cv_func_accept_arg1+set}" = set; then
18512   $as_echo_n "(cached) " >&6
18513 else
18514     if test "${ac_cv_func_accept_arg2+set}" = set; then
18515   $as_echo_n "(cached) " >&6
18516 else
18517      if test "${ac_cv_func_accept_arg3+set}" = set; then
18518   $as_echo_n "(cached) " >&6
18519 else
18520       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
18521       for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
18522        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
18523         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
18524          cat >conftest.$ac_ext <<_ACEOF
18525 /* confdefs.h.  */
18526 _ACEOF
18527 cat confdefs.h >>conftest.$ac_ext
18528 cat >>conftest.$ac_ext <<_ACEOF
18529 /* end confdefs.h.  */
18530 #ifdef HAVE_SYS_TYPES_H
18531 #include <sys/types.h>
18532 #endif
18533 #ifdef HAVE_SYS_SOCKET_H
18534 #include <sys/socket.h>
18535 #endif
18536 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
18537 int
18538 main ()
18539 {
18540
18541   ;
18542   return 0;
18543 }
18544 _ACEOF
18545 rm -f conftest.$ac_objext
18546 if { (ac_try="$ac_compile"
18547 case "(($ac_try" in
18548   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18549   *) ac_try_echo=$ac_try;;
18550 esac
18551 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18552 $as_echo "$ac_try_echo") >&5
18553   (eval "$ac_compile") 2>conftest.er1
18554   ac_status=$?
18555   grep -v '^ *+' conftest.er1 >conftest.err
18556   rm -f conftest.er1
18557   cat conftest.err >&5
18558   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18559   (exit $ac_status); } && {
18560          test -z "$ac_c_werror_flag" ||
18561          test ! -s conftest.err
18562        } && test -s conftest.$ac_objext; then
18563   ac_not_found=no; break 4
18564 else
18565   $as_echo "$as_me: failed program was:" >&5
18566 sed 's/^/| /' conftest.$ac_ext >&5
18567
18568         ac_not_found=yes
18569 fi
18570
18571 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18572        done
18573       done
18574      done
18575     done
18576     if test "$ac_not_found" = yes; then
18577       { { $as_echo "$as_me:$LINENO: error: could not determine argument types" >&5
18578 $as_echo "$as_me: error: could not determine argument types" >&2;}
18579    { (exit 1); exit 1; }; }
18580     fi
18581     if test "$ac_cv_func_accept_arg3" = "void"; then
18582       ac_cv_func_accept_arg3=int
18583     fi
18584
18585 fi
18586
18587 fi
18588
18589 fi
18590
18591 fi
18592  { $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
18593 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
18594
18595 cat >>confdefs.h <<_ACEOF
18596 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
18597 _ACEOF
18598
18599
18600 cat >>confdefs.h <<_ACEOF
18601 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
18602 _ACEOF
18603
18604
18605 cat >>confdefs.h <<_ACEOF
18606 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
18607 _ACEOF
18608
18609
18610 cat >>confdefs.h <<_ACEOF
18611 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
18612 _ACEOF
18613
18614
18615 { $as_echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
18616 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
18617 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
18618   $as_echo_n "(cached) " >&6
18619 else
18620   cat >conftest.$ac_ext <<_ACEOF
18621 /* confdefs.h.  */
18622 _ACEOF
18623 cat confdefs.h >>conftest.$ac_ext
18624 cat >>conftest.$ac_ext <<_ACEOF
18625 /* end confdefs.h.  */
18626 #include <sys/time.h>
18627 int
18628 main ()
18629 {
18630 struct timeval *tp;
18631 struct timezone *tzp;
18632 gettimeofday(tp,tzp);
18633   ;
18634   return 0;
18635 }
18636 _ACEOF
18637 rm -f conftest.$ac_objext
18638 if { (ac_try="$ac_compile"
18639 case "(($ac_try" in
18640   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18641   *) ac_try_echo=$ac_try;;
18642 esac
18643 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18644 $as_echo "$ac_try_echo") >&5
18645   (eval "$ac_compile") 2>conftest.er1
18646   ac_status=$?
18647   grep -v '^ *+' conftest.er1 >conftest.err
18648   rm -f conftest.er1
18649   cat conftest.err >&5
18650   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18651   (exit $ac_status); } && {
18652          test -z "$ac_c_werror_flag" ||
18653          test ! -s conftest.err
18654        } && test -s conftest.$ac_objext; then
18655   pgac_cv_func_gettimeofday_1arg=no
18656 else
18657   $as_echo "$as_me: failed program was:" >&5
18658 sed 's/^/| /' conftest.$ac_ext >&5
18659
18660         pgac_cv_func_gettimeofday_1arg=yes
18661 fi
18662
18663 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18664 fi
18665 { $as_echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
18666 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
18667 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
18668
18669 cat >>confdefs.h <<\_ACEOF
18670 #define GETTIMEOFDAY_1ARG /**/
18671 _ACEOF
18672
18673 fi
18674
18675
18676
18677
18678
18679
18680
18681
18682
18683
18684
18685
18686
18687
18688
18689
18690
18691
18692
18693
18694
18695
18696
18697
18698
18699
18700 for ac_func in cbrt dlopen fcvt fdatasync getifaddrs getpeereid getpeerucred getrlimit memmove poll pstat readlink scandir setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
18701 do
18702 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18703 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18704 $as_echo_n "checking for $ac_func... " >&6; }
18705 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18706   $as_echo_n "(cached) " >&6
18707 else
18708   cat >conftest.$ac_ext <<_ACEOF
18709 /* confdefs.h.  */
18710 _ACEOF
18711 cat confdefs.h >>conftest.$ac_ext
18712 cat >>conftest.$ac_ext <<_ACEOF
18713 /* end confdefs.h.  */
18714 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18715    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
18716 #define $ac_func innocuous_$ac_func
18717
18718 /* System header to define __stub macros and hopefully few prototypes,
18719     which can conflict with char $ac_func (); below.
18720     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18721     <limits.h> exists even on freestanding compilers.  */
18722
18723 #ifdef __STDC__
18724 # include <limits.h>
18725 #else
18726 # include <assert.h>
18727 #endif
18728
18729 #undef $ac_func
18730
18731 /* Override any GCC internal prototype to avoid an error.
18732    Use char because int might match the return type of a GCC
18733    builtin and then its argument prototype would still apply.  */
18734 #ifdef __cplusplus
18735 extern "C"
18736 #endif
18737 char $ac_func ();
18738 /* The GNU C library defines this for functions which it implements
18739     to always fail with ENOSYS.  Some functions are actually named
18740     something starting with __ and the normal name is an alias.  */
18741 #if defined __stub_$ac_func || defined __stub___$ac_func
18742 choke me
18743 #endif
18744
18745 int
18746 main ()
18747 {
18748 return $ac_func ();
18749   ;
18750   return 0;
18751 }
18752 _ACEOF
18753 rm -f conftest.$ac_objext conftest$ac_exeext
18754 if { (ac_try="$ac_link"
18755 case "(($ac_try" in
18756   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18757   *) ac_try_echo=$ac_try;;
18758 esac
18759 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18760 $as_echo "$ac_try_echo") >&5
18761   (eval "$ac_link") 2>conftest.er1
18762   ac_status=$?
18763   grep -v '^ *+' conftest.er1 >conftest.err
18764   rm -f conftest.er1
18765   cat conftest.err >&5
18766   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18767   (exit $ac_status); } && {
18768          test -z "$ac_c_werror_flag" ||
18769          test ! -s conftest.err
18770        } && test -s conftest$ac_exeext && {
18771          test "$cross_compiling" = yes ||
18772          $as_test_x conftest$ac_exeext
18773        }; then
18774   eval "$as_ac_var=yes"
18775 else
18776   $as_echo "$as_me: failed program was:" >&5
18777 sed 's/^/| /' conftest.$ac_ext >&5
18778
18779         eval "$as_ac_var=no"
18780 fi
18781
18782 rm -rf conftest.dSYM
18783 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18784       conftest$ac_exeext conftest.$ac_ext
18785 fi
18786 ac_res=`eval 'as_val=${'$as_ac_var'}
18787                  $as_echo "$as_val"'`
18788                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18789 $as_echo "$ac_res" >&6; }
18790 as_val=`eval 'as_val=${'$as_ac_var'}
18791                  $as_echo "$as_val"'`
18792    if test "x$as_val" = x""yes; then
18793   cat >>confdefs.h <<_ACEOF
18794 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18795 _ACEOF
18796
18797 fi
18798 done
18799
18800
18801
18802 for ac_func in fseeko
18803 do
18804 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18805 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18806 $as_echo_n "checking for $ac_func... " >&6; }
18807 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18808   $as_echo_n "(cached) " >&6
18809 else
18810   cat >conftest.$ac_ext <<_ACEOF
18811 /* confdefs.h.  */
18812 _ACEOF
18813 cat confdefs.h >>conftest.$ac_ext
18814 cat >>conftest.$ac_ext <<_ACEOF
18815 /* end confdefs.h.  */
18816 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18817    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
18818 #define $ac_func innocuous_$ac_func
18819
18820 /* System header to define __stub macros and hopefully few prototypes,
18821     which can conflict with char $ac_func (); below.
18822     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18823     <limits.h> exists even on freestanding compilers.  */
18824
18825 #ifdef __STDC__
18826 # include <limits.h>
18827 #else
18828 # include <assert.h>
18829 #endif
18830
18831 #undef $ac_func
18832
18833 /* Override any GCC internal prototype to avoid an error.
18834    Use char because int might match the return type of a GCC
18835    builtin and then its argument prototype would still apply.  */
18836 #ifdef __cplusplus
18837 extern "C"
18838 #endif
18839 char $ac_func ();
18840 /* The GNU C library defines this for functions which it implements
18841     to always fail with ENOSYS.  Some functions are actually named
18842     something starting with __ and the normal name is an alias.  */
18843 #if defined __stub_$ac_func || defined __stub___$ac_func
18844 choke me
18845 #endif
18846
18847 int
18848 main ()
18849 {
18850 return $ac_func ();
18851   ;
18852   return 0;
18853 }
18854 _ACEOF
18855 rm -f conftest.$ac_objext conftest$ac_exeext
18856 if { (ac_try="$ac_link"
18857 case "(($ac_try" in
18858   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18859   *) ac_try_echo=$ac_try;;
18860 esac
18861 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18862 $as_echo "$ac_try_echo") >&5
18863   (eval "$ac_link") 2>conftest.er1
18864   ac_status=$?
18865   grep -v '^ *+' conftest.er1 >conftest.err
18866   rm -f conftest.er1
18867   cat conftest.err >&5
18868   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18869   (exit $ac_status); } && {
18870          test -z "$ac_c_werror_flag" ||
18871          test ! -s conftest.err
18872        } && test -s conftest$ac_exeext && {
18873          test "$cross_compiling" = yes ||
18874          $as_test_x conftest$ac_exeext
18875        }; then
18876   eval "$as_ac_var=yes"
18877 else
18878   $as_echo "$as_me: failed program was:" >&5
18879 sed 's/^/| /' conftest.$ac_ext >&5
18880
18881         eval "$as_ac_var=no"
18882 fi
18883
18884 rm -rf conftest.dSYM
18885 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18886       conftest$ac_exeext conftest.$ac_ext
18887 fi
18888 ac_res=`eval 'as_val=${'$as_ac_var'}
18889                  $as_echo "$as_val"'`
18890                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18891 $as_echo "$ac_res" >&6; }
18892 as_val=`eval 'as_val=${'$as_ac_var'}
18893                  $as_echo "$as_val"'`
18894    if test "x$as_val" = x""yes; then
18895   cat >>confdefs.h <<_ACEOF
18896 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18897 _ACEOF
18898
18899 else
18900   case " $LIBOBJS " in
18901   *" $ac_func.$ac_objext "* ) ;;
18902   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18903  ;;
18904 esac
18905
18906 fi
18907 done
18908
18909
18910 case $host_os in
18911         # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
18912         # Mingw uses macros to access Win32 API calls
18913         bsdi*|netbsd*|mingw*)
18914
18915 cat >>confdefs.h <<\_ACEOF
18916 #define HAVE_FSEEKO 1
18917 _ACEOF
18918
18919                 ac_cv_func_fseeko=yes;;
18920         *)
18921                 { $as_echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
18922 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
18923 if test "${ac_cv_sys_largefile_source+set}" = set; then
18924   $as_echo_n "(cached) " >&6
18925 else
18926   while :; do
18927   cat >conftest.$ac_ext <<_ACEOF
18928 /* confdefs.h.  */
18929 _ACEOF
18930 cat confdefs.h >>conftest.$ac_ext
18931 cat >>conftest.$ac_ext <<_ACEOF
18932 /* end confdefs.h.  */
18933 #include <sys/types.h> /* for off_t */
18934      #include <stdio.h>
18935 int
18936 main ()
18937 {
18938 int (*fp) (FILE *, off_t, int) = fseeko;
18939      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
18940   ;
18941   return 0;
18942 }
18943 _ACEOF
18944 rm -f conftest.$ac_objext conftest$ac_exeext
18945 if { (ac_try="$ac_link"
18946 case "(($ac_try" in
18947   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18948   *) ac_try_echo=$ac_try;;
18949 esac
18950 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18951 $as_echo "$ac_try_echo") >&5
18952   (eval "$ac_link") 2>conftest.er1
18953   ac_status=$?
18954   grep -v '^ *+' conftest.er1 >conftest.err
18955   rm -f conftest.er1
18956   cat conftest.err >&5
18957   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18958   (exit $ac_status); } && {
18959          test -z "$ac_c_werror_flag" ||
18960          test ! -s conftest.err
18961        } && test -s conftest$ac_exeext && {
18962          test "$cross_compiling" = yes ||
18963          $as_test_x conftest$ac_exeext
18964        }; then
18965   ac_cv_sys_largefile_source=no; break
18966 else
18967   $as_echo "$as_me: failed program was:" >&5
18968 sed 's/^/| /' conftest.$ac_ext >&5
18969
18970
18971 fi
18972
18973 rm -rf conftest.dSYM
18974 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18975       conftest$ac_exeext conftest.$ac_ext
18976   cat >conftest.$ac_ext <<_ACEOF
18977 /* confdefs.h.  */
18978 _ACEOF
18979 cat confdefs.h >>conftest.$ac_ext
18980 cat >>conftest.$ac_ext <<_ACEOF
18981 /* end confdefs.h.  */
18982 #define _LARGEFILE_SOURCE 1
18983 #include <sys/types.h> /* for off_t */
18984      #include <stdio.h>
18985 int
18986 main ()
18987 {
18988 int (*fp) (FILE *, off_t, int) = fseeko;
18989      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
18990   ;
18991   return 0;
18992 }
18993 _ACEOF
18994 rm -f conftest.$ac_objext conftest$ac_exeext
18995 if { (ac_try="$ac_link"
18996 case "(($ac_try" in
18997   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18998   *) ac_try_echo=$ac_try;;
18999 esac
19000 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19001 $as_echo "$ac_try_echo") >&5
19002   (eval "$ac_link") 2>conftest.er1
19003   ac_status=$?
19004   grep -v '^ *+' conftest.er1 >conftest.err
19005   rm -f conftest.er1
19006   cat conftest.err >&5
19007   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19008   (exit $ac_status); } && {
19009          test -z "$ac_c_werror_flag" ||
19010          test ! -s conftest.err
19011        } && test -s conftest$ac_exeext && {
19012          test "$cross_compiling" = yes ||
19013          $as_test_x conftest$ac_exeext
19014        }; then
19015   ac_cv_sys_largefile_source=1; break
19016 else
19017   $as_echo "$as_me: failed program was:" >&5
19018 sed 's/^/| /' conftest.$ac_ext >&5
19019
19020
19021 fi
19022
19023 rm -rf conftest.dSYM
19024 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19025       conftest$ac_exeext conftest.$ac_ext
19026   ac_cv_sys_largefile_source=unknown
19027   break
19028 done
19029 fi
19030 { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
19031 $as_echo "$ac_cv_sys_largefile_source" >&6; }
19032 case $ac_cv_sys_largefile_source in #(
19033   no | unknown) ;;
19034   *)
19035 cat >>confdefs.h <<_ACEOF
19036 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
19037 _ACEOF
19038 ;;
19039 esac
19040 rm -rf conftest*
19041
19042 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
19043 # in glibc 2.1.3, but that breaks too many other things.
19044 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
19045 if test $ac_cv_sys_largefile_source != unknown; then
19046
19047 cat >>confdefs.h <<\_ACEOF
19048 #define HAVE_FSEEKO 1
19049 _ACEOF
19050
19051 fi
19052 ;;
19053 esac
19054
19055 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
19056 # by calling it, 2009-04-02
19057 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
19058 if test "$PORTNAME" != "solaris"; then
19059
19060 for ac_func in posix_fadvise
19061 do
19062 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19063 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19064 $as_echo_n "checking for $ac_func... " >&6; }
19065 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
19066   $as_echo_n "(cached) " >&6
19067 else
19068   cat >conftest.$ac_ext <<_ACEOF
19069 /* confdefs.h.  */
19070 _ACEOF
19071 cat confdefs.h >>conftest.$ac_ext
19072 cat >>conftest.$ac_ext <<_ACEOF
19073 /* end confdefs.h.  */
19074 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19075    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
19076 #define $ac_func innocuous_$ac_func
19077
19078 /* System header to define __stub macros and hopefully few prototypes,
19079     which can conflict with char $ac_func (); below.
19080     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19081     <limits.h> exists even on freestanding compilers.  */
19082
19083 #ifdef __STDC__
19084 # include <limits.h>
19085 #else
19086 # include <assert.h>
19087 #endif
19088
19089 #undef $ac_func
19090
19091 /* Override any GCC internal prototype to avoid an error.
19092    Use char because int might match the return type of a GCC
19093    builtin and then its argument prototype would still apply.  */
19094 #ifdef __cplusplus
19095 extern "C"
19096 #endif
19097 char $ac_func ();
19098 /* The GNU C library defines this for functions which it implements
19099     to always fail with ENOSYS.  Some functions are actually named
19100     something starting with __ and the normal name is an alias.  */
19101 #if defined __stub_$ac_func || defined __stub___$ac_func
19102 choke me
19103 #endif
19104
19105 int
19106 main ()
19107 {
19108 return $ac_func ();
19109   ;
19110   return 0;
19111 }
19112 _ACEOF
19113 rm -f conftest.$ac_objext conftest$ac_exeext
19114 if { (ac_try="$ac_link"
19115 case "(($ac_try" in
19116   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19117   *) ac_try_echo=$ac_try;;
19118 esac
19119 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19120 $as_echo "$ac_try_echo") >&5
19121   (eval "$ac_link") 2>conftest.er1
19122   ac_status=$?
19123   grep -v '^ *+' conftest.er1 >conftest.err
19124   rm -f conftest.er1
19125   cat conftest.err >&5
19126   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19127   (exit $ac_status); } && {
19128          test -z "$ac_c_werror_flag" ||
19129          test ! -s conftest.err
19130        } && test -s conftest$ac_exeext && {
19131          test "$cross_compiling" = yes ||
19132          $as_test_x conftest$ac_exeext
19133        }; then
19134   eval "$as_ac_var=yes"
19135 else
19136   $as_echo "$as_me: failed program was:" >&5
19137 sed 's/^/| /' conftest.$ac_ext >&5
19138
19139         eval "$as_ac_var=no"
19140 fi
19141
19142 rm -rf conftest.dSYM
19143 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19144       conftest$ac_exeext conftest.$ac_ext
19145 fi
19146 ac_res=`eval 'as_val=${'$as_ac_var'}
19147                  $as_echo "$as_val"'`
19148                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19149 $as_echo "$ac_res" >&6; }
19150 as_val=`eval 'as_val=${'$as_ac_var'}
19151                  $as_echo "$as_val"'`
19152    if test "x$as_val" = x""yes; then
19153   cat >>confdefs.h <<_ACEOF
19154 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19155 _ACEOF
19156
19157 fi
19158 done
19159
19160 { $as_echo "$as_me:$LINENO: checking whether posix_fadvise is declared" >&5
19161 $as_echo_n "checking whether posix_fadvise is declared... " >&6; }
19162 if test "${ac_cv_have_decl_posix_fadvise+set}" = set; then
19163   $as_echo_n "(cached) " >&6
19164 else
19165   cat >conftest.$ac_ext <<_ACEOF
19166 /* confdefs.h.  */
19167 _ACEOF
19168 cat confdefs.h >>conftest.$ac_ext
19169 cat >>conftest.$ac_ext <<_ACEOF
19170 /* end confdefs.h.  */
19171 #include <fcntl.h>
19172
19173 int
19174 main ()
19175 {
19176 #ifndef posix_fadvise
19177   (void) posix_fadvise;
19178 #endif
19179
19180   ;
19181   return 0;
19182 }
19183 _ACEOF
19184 rm -f conftest.$ac_objext
19185 if { (ac_try="$ac_compile"
19186 case "(($ac_try" in
19187   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19188   *) ac_try_echo=$ac_try;;
19189 esac
19190 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19191 $as_echo "$ac_try_echo") >&5
19192   (eval "$ac_compile") 2>conftest.er1
19193   ac_status=$?
19194   grep -v '^ *+' conftest.er1 >conftest.err
19195   rm -f conftest.er1
19196   cat conftest.err >&5
19197   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19198   (exit $ac_status); } && {
19199          test -z "$ac_c_werror_flag" ||
19200          test ! -s conftest.err
19201        } && test -s conftest.$ac_objext; then
19202   ac_cv_have_decl_posix_fadvise=yes
19203 else
19204   $as_echo "$as_me: failed program was:" >&5
19205 sed 's/^/| /' conftest.$ac_ext >&5
19206
19207         ac_cv_have_decl_posix_fadvise=no
19208 fi
19209
19210 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19211 fi
19212 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix_fadvise" >&5
19213 $as_echo "$ac_cv_have_decl_posix_fadvise" >&6; }
19214 if test "x$ac_cv_have_decl_posix_fadvise" = x""yes; then
19215
19216 cat >>confdefs.h <<_ACEOF
19217 #define HAVE_DECL_POSIX_FADVISE 1
19218 _ACEOF
19219
19220
19221 else
19222   cat >>confdefs.h <<_ACEOF
19223 #define HAVE_DECL_POSIX_FADVISE 0
19224 _ACEOF
19225
19226
19227 fi
19228
19229
19230 fi
19231
19232 { $as_echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
19233 $as_echo_n "checking whether fdatasync is declared... " >&6; }
19234 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
19235   $as_echo_n "(cached) " >&6
19236 else
19237   cat >conftest.$ac_ext <<_ACEOF
19238 /* confdefs.h.  */
19239 _ACEOF
19240 cat confdefs.h >>conftest.$ac_ext
19241 cat >>conftest.$ac_ext <<_ACEOF
19242 /* end confdefs.h.  */
19243 #include <unistd.h>
19244
19245 int
19246 main ()
19247 {
19248 #ifndef fdatasync
19249   (void) fdatasync;
19250 #endif
19251
19252   ;
19253   return 0;
19254 }
19255 _ACEOF
19256 rm -f conftest.$ac_objext
19257 if { (ac_try="$ac_compile"
19258 case "(($ac_try" in
19259   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19260   *) ac_try_echo=$ac_try;;
19261 esac
19262 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19263 $as_echo "$ac_try_echo") >&5
19264   (eval "$ac_compile") 2>conftest.er1
19265   ac_status=$?
19266   grep -v '^ *+' conftest.er1 >conftest.err
19267   rm -f conftest.er1
19268   cat conftest.err >&5
19269   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19270   (exit $ac_status); } && {
19271          test -z "$ac_c_werror_flag" ||
19272          test ! -s conftest.err
19273        } && test -s conftest.$ac_objext; then
19274   ac_cv_have_decl_fdatasync=yes
19275 else
19276   $as_echo "$as_me: failed program was:" >&5
19277 sed 's/^/| /' conftest.$ac_ext >&5
19278
19279         ac_cv_have_decl_fdatasync=no
19280 fi
19281
19282 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19283 fi
19284 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
19285 $as_echo "$ac_cv_have_decl_fdatasync" >&6; }
19286 if test "x$ac_cv_have_decl_fdatasync" = x""yes; then
19287
19288 cat >>confdefs.h <<_ACEOF
19289 #define HAVE_DECL_FDATASYNC 1
19290 _ACEOF
19291
19292
19293 else
19294   cat >>confdefs.h <<_ACEOF
19295 #define HAVE_DECL_FDATASYNC 0
19296 _ACEOF
19297
19298
19299 fi
19300
19301
19302 { $as_echo "$as_me:$LINENO: checking whether strlcat is declared" >&5
19303 $as_echo_n "checking whether strlcat is declared... " >&6; }
19304 if test "${ac_cv_have_decl_strlcat+set}" = set; then
19305   $as_echo_n "(cached) " >&6
19306 else
19307   cat >conftest.$ac_ext <<_ACEOF
19308 /* confdefs.h.  */
19309 _ACEOF
19310 cat confdefs.h >>conftest.$ac_ext
19311 cat >>conftest.$ac_ext <<_ACEOF
19312 /* end confdefs.h.  */
19313 $ac_includes_default
19314 int
19315 main ()
19316 {
19317 #ifndef strlcat
19318   (void) strlcat;
19319 #endif
19320
19321   ;
19322   return 0;
19323 }
19324 _ACEOF
19325 rm -f conftest.$ac_objext
19326 if { (ac_try="$ac_compile"
19327 case "(($ac_try" in
19328   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19329   *) ac_try_echo=$ac_try;;
19330 esac
19331 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19332 $as_echo "$ac_try_echo") >&5
19333   (eval "$ac_compile") 2>conftest.er1
19334   ac_status=$?
19335   grep -v '^ *+' conftest.er1 >conftest.err
19336   rm -f conftest.er1
19337   cat conftest.err >&5
19338   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19339   (exit $ac_status); } && {
19340          test -z "$ac_c_werror_flag" ||
19341          test ! -s conftest.err
19342        } && test -s conftest.$ac_objext; then
19343   ac_cv_have_decl_strlcat=yes
19344 else
19345   $as_echo "$as_me: failed program was:" >&5
19346 sed 's/^/| /' conftest.$ac_ext >&5
19347
19348         ac_cv_have_decl_strlcat=no
19349 fi
19350
19351 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19352 fi
19353 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcat" >&5
19354 $as_echo "$ac_cv_have_decl_strlcat" >&6; }
19355 if test "x$ac_cv_have_decl_strlcat" = x""yes; then
19356
19357 cat >>confdefs.h <<_ACEOF
19358 #define HAVE_DECL_STRLCAT 1
19359 _ACEOF
19360
19361
19362 else
19363   cat >>confdefs.h <<_ACEOF
19364 #define HAVE_DECL_STRLCAT 0
19365 _ACEOF
19366
19367
19368 fi
19369 { $as_echo "$as_me:$LINENO: checking whether strlcpy is declared" >&5
19370 $as_echo_n "checking whether strlcpy is declared... " >&6; }
19371 if test "${ac_cv_have_decl_strlcpy+set}" = set; then
19372   $as_echo_n "(cached) " >&6
19373 else
19374   cat >conftest.$ac_ext <<_ACEOF
19375 /* confdefs.h.  */
19376 _ACEOF
19377 cat confdefs.h >>conftest.$ac_ext
19378 cat >>conftest.$ac_ext <<_ACEOF
19379 /* end confdefs.h.  */
19380 $ac_includes_default
19381 int
19382 main ()
19383 {
19384 #ifndef strlcpy
19385   (void) strlcpy;
19386 #endif
19387
19388   ;
19389   return 0;
19390 }
19391 _ACEOF
19392 rm -f conftest.$ac_objext
19393 if { (ac_try="$ac_compile"
19394 case "(($ac_try" in
19395   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19396   *) ac_try_echo=$ac_try;;
19397 esac
19398 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19399 $as_echo "$ac_try_echo") >&5
19400   (eval "$ac_compile") 2>conftest.er1
19401   ac_status=$?
19402   grep -v '^ *+' conftest.er1 >conftest.err
19403   rm -f conftest.er1
19404   cat conftest.err >&5
19405   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19406   (exit $ac_status); } && {
19407          test -z "$ac_c_werror_flag" ||
19408          test ! -s conftest.err
19409        } && test -s conftest.$ac_objext; then
19410   ac_cv_have_decl_strlcpy=yes
19411 else
19412   $as_echo "$as_me: failed program was:" >&5
19413 sed 's/^/| /' conftest.$ac_ext >&5
19414
19415         ac_cv_have_decl_strlcpy=no
19416 fi
19417
19418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19419 fi
19420 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcpy" >&5
19421 $as_echo "$ac_cv_have_decl_strlcpy" >&6; }
19422 if test "x$ac_cv_have_decl_strlcpy" = x""yes; then
19423
19424 cat >>confdefs.h <<_ACEOF
19425 #define HAVE_DECL_STRLCPY 1
19426 _ACEOF
19427
19428
19429 else
19430   cat >>confdefs.h <<_ACEOF
19431 #define HAVE_DECL_STRLCPY 0
19432 _ACEOF
19433
19434
19435 fi
19436
19437
19438 # This is probably only present on Darwin, but may as well check always
19439 { $as_echo "$as_me:$LINENO: checking whether F_FULLFSYNC is declared" >&5
19440 $as_echo_n "checking whether F_FULLFSYNC is declared... " >&6; }
19441 if test "${ac_cv_have_decl_F_FULLFSYNC+set}" = set; then
19442   $as_echo_n "(cached) " >&6
19443 else
19444   cat >conftest.$ac_ext <<_ACEOF
19445 /* confdefs.h.  */
19446 _ACEOF
19447 cat confdefs.h >>conftest.$ac_ext
19448 cat >>conftest.$ac_ext <<_ACEOF
19449 /* end confdefs.h.  */
19450 #include <fcntl.h>
19451
19452 int
19453 main ()
19454 {
19455 #ifndef F_FULLFSYNC
19456   (void) F_FULLFSYNC;
19457 #endif
19458
19459   ;
19460   return 0;
19461 }
19462 _ACEOF
19463 rm -f conftest.$ac_objext
19464 if { (ac_try="$ac_compile"
19465 case "(($ac_try" in
19466   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19467   *) ac_try_echo=$ac_try;;
19468 esac
19469 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19470 $as_echo "$ac_try_echo") >&5
19471   (eval "$ac_compile") 2>conftest.er1
19472   ac_status=$?
19473   grep -v '^ *+' conftest.er1 >conftest.err
19474   rm -f conftest.er1
19475   cat conftest.err >&5
19476   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19477   (exit $ac_status); } && {
19478          test -z "$ac_c_werror_flag" ||
19479          test ! -s conftest.err
19480        } && test -s conftest.$ac_objext; then
19481   ac_cv_have_decl_F_FULLFSYNC=yes
19482 else
19483   $as_echo "$as_me: failed program was:" >&5
19484 sed 's/^/| /' conftest.$ac_ext >&5
19485
19486         ac_cv_have_decl_F_FULLFSYNC=no
19487 fi
19488
19489 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19490 fi
19491 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_FULLFSYNC" >&5
19492 $as_echo "$ac_cv_have_decl_F_FULLFSYNC" >&6; }
19493 if test "x$ac_cv_have_decl_F_FULLFSYNC" = x""yes; then
19494
19495 cat >>confdefs.h <<_ACEOF
19496 #define HAVE_DECL_F_FULLFSYNC 1
19497 _ACEOF
19498
19499
19500 else
19501   cat >>confdefs.h <<_ACEOF
19502 #define HAVE_DECL_F_FULLFSYNC 0
19503 _ACEOF
19504
19505
19506 fi
19507
19508
19509
19510 HAVE_IPV6=no
19511 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
19512 $as_echo_n "checking for struct sockaddr_in6... " >&6; }
19513 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
19514   $as_echo_n "(cached) " >&6
19515 else
19516   ac_cv_type_struct_sockaddr_in6=no
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 $ac_includes_default
19524 #include <netinet/in.h>
19525
19526 int
19527 main ()
19528 {
19529 if (sizeof (struct sockaddr_in6))
19530        return 0;
19531   ;
19532   return 0;
19533 }
19534 _ACEOF
19535 rm -f conftest.$ac_objext
19536 if { (ac_try="$ac_compile"
19537 case "(($ac_try" in
19538   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19539   *) ac_try_echo=$ac_try;;
19540 esac
19541 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19542 $as_echo "$ac_try_echo") >&5
19543   (eval "$ac_compile") 2>conftest.er1
19544   ac_status=$?
19545   grep -v '^ *+' conftest.er1 >conftest.err
19546   rm -f conftest.er1
19547   cat conftest.err >&5
19548   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19549   (exit $ac_status); } && {
19550          test -z "$ac_c_werror_flag" ||
19551          test ! -s conftest.err
19552        } && test -s conftest.$ac_objext; then
19553   cat >conftest.$ac_ext <<_ACEOF
19554 /* confdefs.h.  */
19555 _ACEOF
19556 cat confdefs.h >>conftest.$ac_ext
19557 cat >>conftest.$ac_ext <<_ACEOF
19558 /* end confdefs.h.  */
19559 $ac_includes_default
19560 #include <netinet/in.h>
19561
19562 int
19563 main ()
19564 {
19565 if (sizeof ((struct sockaddr_in6)))
19566           return 0;
19567   ;
19568   return 0;
19569 }
19570 _ACEOF
19571 rm -f conftest.$ac_objext
19572 if { (ac_try="$ac_compile"
19573 case "(($ac_try" in
19574   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19575   *) ac_try_echo=$ac_try;;
19576 esac
19577 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19578 $as_echo "$ac_try_echo") >&5
19579   (eval "$ac_compile") 2>conftest.er1
19580   ac_status=$?
19581   grep -v '^ *+' conftest.er1 >conftest.err
19582   rm -f conftest.er1
19583   cat conftest.err >&5
19584   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19585   (exit $ac_status); } && {
19586          test -z "$ac_c_werror_flag" ||
19587          test ! -s conftest.err
19588        } && test -s conftest.$ac_objext; then
19589   :
19590 else
19591   $as_echo "$as_me: failed program was:" >&5
19592 sed 's/^/| /' conftest.$ac_ext >&5
19593
19594         ac_cv_type_struct_sockaddr_in6=yes
19595 fi
19596
19597 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19598 else
19599   $as_echo "$as_me: failed program was:" >&5
19600 sed 's/^/| /' conftest.$ac_ext >&5
19601
19602
19603 fi
19604
19605 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19606 fi
19607 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
19608 $as_echo "$ac_cv_type_struct_sockaddr_in6" >&6; }
19609 if test "x$ac_cv_type_struct_sockaddr_in6" = x""yes; then
19610
19611 cat >>confdefs.h <<\_ACEOF
19612 #define HAVE_IPV6 1
19613 _ACEOF
19614
19615          HAVE_IPV6=yes
19616 fi
19617
19618
19619
19620 { $as_echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
19621 $as_echo_n "checking for PS_STRINGS... " >&6; }
19622 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
19623   $as_echo_n "(cached) " >&6
19624 else
19625   cat >conftest.$ac_ext <<_ACEOF
19626 /* confdefs.h.  */
19627 _ACEOF
19628 cat confdefs.h >>conftest.$ac_ext
19629 cat >>conftest.$ac_ext <<_ACEOF
19630 /* end confdefs.h.  */
19631 #include <machine/vmparam.h>
19632 #include <sys/exec.h>
19633
19634 int
19635 main ()
19636 {
19637 PS_STRINGS->ps_nargvstr = 1;
19638 PS_STRINGS->ps_argvstr = "foo";
19639   ;
19640   return 0;
19641 }
19642 _ACEOF
19643 rm -f conftest.$ac_objext conftest$ac_exeext
19644 if { (ac_try="$ac_link"
19645 case "(($ac_try" in
19646   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19647   *) ac_try_echo=$ac_try;;
19648 esac
19649 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19650 $as_echo "$ac_try_echo") >&5
19651   (eval "$ac_link") 2>conftest.er1
19652   ac_status=$?
19653   grep -v '^ *+' conftest.er1 >conftest.err
19654   rm -f conftest.er1
19655   cat conftest.err >&5
19656   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19657   (exit $ac_status); } && {
19658          test -z "$ac_c_werror_flag" ||
19659          test ! -s conftest.err
19660        } && test -s conftest$ac_exeext && {
19661          test "$cross_compiling" = yes ||
19662          $as_test_x conftest$ac_exeext
19663        }; then
19664   pgac_cv_var_PS_STRINGS=yes
19665 else
19666   $as_echo "$as_me: failed program was:" >&5
19667 sed 's/^/| /' conftest.$ac_ext >&5
19668
19669         pgac_cv_var_PS_STRINGS=no
19670 fi
19671
19672 rm -rf conftest.dSYM
19673 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19674       conftest$ac_exeext conftest.$ac_ext
19675 fi
19676 { $as_echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
19677 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
19678 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
19679
19680 cat >>confdefs.h <<\_ACEOF
19681 #define HAVE_PS_STRINGS /**/
19682 _ACEOF
19683
19684 fi
19685
19686
19687 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
19688 # is missing.  Yes, there are machines that have only one.  We may
19689 # also decide to use snprintf.c if snprintf() is present but does not
19690 # have all the features we need --- see below.
19691
19692 if test "$PORTNAME" = "win32"; then
19693   # Win32 gets snprintf.c built unconditionally.
19694   #
19695   # To properly translate all NLS languages strings, we must support the
19696   # *printf() %$ format, which allows *printf() arguments to be selected
19697   # by position in the translated string.
19698   #
19699   # libintl versions < 0.13 use the native *printf() functions, and Win32
19700   # *printf() doesn't understand %$, so we must use our /port versions,
19701   # which do understand %$. libintl versions >= 0.13 include their own
19702   # *printf versions on Win32.  The libintl 0.13 release note text is:
19703   #
19704   #   C format strings with positions, as they arise when a translator
19705   #   needs to reorder a sentence, are now supported on all platforms.
19706   #   On those few platforms (NetBSD and Woe32) for which the native
19707   #   printf()/fprintf()/... functions don't support such format
19708   #   strings, replacements are provided through <libintl.h>.
19709   #
19710   # We could use libintl >= 0.13's *printf() if we were sure that we had
19711   # a litint >= 0.13 at runtime, but seeing that there is no clean way
19712   # to guarantee that, it is best to just use our own, so we are sure to
19713   # get %$ support. In include/port.h we disable the *printf() macros
19714   # that might have been defined by libintl.
19715   #
19716   # We do this unconditionally whether NLS is used or not so we are sure
19717   # that all Win32 libraries and binaries behave the same.
19718   pgac_need_repl_snprintf=yes
19719 else
19720   pgac_need_repl_snprintf=no
19721
19722 for ac_func in snprintf
19723 do
19724 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19725 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19726 $as_echo_n "checking for $ac_func... " >&6; }
19727 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
19728   $as_echo_n "(cached) " >&6
19729 else
19730   cat >conftest.$ac_ext <<_ACEOF
19731 /* confdefs.h.  */
19732 _ACEOF
19733 cat confdefs.h >>conftest.$ac_ext
19734 cat >>conftest.$ac_ext <<_ACEOF
19735 /* end confdefs.h.  */
19736 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19737    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
19738 #define $ac_func innocuous_$ac_func
19739
19740 /* System header to define __stub macros and hopefully few prototypes,
19741     which can conflict with char $ac_func (); below.
19742     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19743     <limits.h> exists even on freestanding compilers.  */
19744
19745 #ifdef __STDC__
19746 # include <limits.h>
19747 #else
19748 # include <assert.h>
19749 #endif
19750
19751 #undef $ac_func
19752
19753 /* Override any GCC internal prototype to avoid an error.
19754    Use char because int might match the return type of a GCC
19755    builtin and then its argument prototype would still apply.  */
19756 #ifdef __cplusplus
19757 extern "C"
19758 #endif
19759 char $ac_func ();
19760 /* The GNU C library defines this for functions which it implements
19761     to always fail with ENOSYS.  Some functions are actually named
19762     something starting with __ and the normal name is an alias.  */
19763 #if defined __stub_$ac_func || defined __stub___$ac_func
19764 choke me
19765 #endif
19766
19767 int
19768 main ()
19769 {
19770 return $ac_func ();
19771   ;
19772   return 0;
19773 }
19774 _ACEOF
19775 rm -f conftest.$ac_objext conftest$ac_exeext
19776 if { (ac_try="$ac_link"
19777 case "(($ac_try" in
19778   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19779   *) ac_try_echo=$ac_try;;
19780 esac
19781 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19782 $as_echo "$ac_try_echo") >&5
19783   (eval "$ac_link") 2>conftest.er1
19784   ac_status=$?
19785   grep -v '^ *+' conftest.er1 >conftest.err
19786   rm -f conftest.er1
19787   cat conftest.err >&5
19788   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19789   (exit $ac_status); } && {
19790          test -z "$ac_c_werror_flag" ||
19791          test ! -s conftest.err
19792        } && test -s conftest$ac_exeext && {
19793          test "$cross_compiling" = yes ||
19794          $as_test_x conftest$ac_exeext
19795        }; then
19796   eval "$as_ac_var=yes"
19797 else
19798   $as_echo "$as_me: failed program was:" >&5
19799 sed 's/^/| /' conftest.$ac_ext >&5
19800
19801         eval "$as_ac_var=no"
19802 fi
19803
19804 rm -rf conftest.dSYM
19805 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19806       conftest$ac_exeext conftest.$ac_ext
19807 fi
19808 ac_res=`eval 'as_val=${'$as_ac_var'}
19809                  $as_echo "$as_val"'`
19810                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19811 $as_echo "$ac_res" >&6; }
19812 as_val=`eval 'as_val=${'$as_ac_var'}
19813                  $as_echo "$as_val"'`
19814    if test "x$as_val" = x""yes; then
19815   cat >>confdefs.h <<_ACEOF
19816 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19817 _ACEOF
19818
19819 else
19820   pgac_need_repl_snprintf=yes
19821 fi
19822 done
19823
19824
19825 for ac_func in vsnprintf
19826 do
19827 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19828 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19829 $as_echo_n "checking for $ac_func... " >&6; }
19830 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
19831   $as_echo_n "(cached) " >&6
19832 else
19833   cat >conftest.$ac_ext <<_ACEOF
19834 /* confdefs.h.  */
19835 _ACEOF
19836 cat confdefs.h >>conftest.$ac_ext
19837 cat >>conftest.$ac_ext <<_ACEOF
19838 /* end confdefs.h.  */
19839 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19840    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
19841 #define $ac_func innocuous_$ac_func
19842
19843 /* System header to define __stub macros and hopefully few prototypes,
19844     which can conflict with char $ac_func (); below.
19845     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19846     <limits.h> exists even on freestanding compilers.  */
19847
19848 #ifdef __STDC__
19849 # include <limits.h>
19850 #else
19851 # include <assert.h>
19852 #endif
19853
19854 #undef $ac_func
19855
19856 /* Override any GCC internal prototype to avoid an error.
19857    Use char because int might match the return type of a GCC
19858    builtin and then its argument prototype would still apply.  */
19859 #ifdef __cplusplus
19860 extern "C"
19861 #endif
19862 char $ac_func ();
19863 /* The GNU C library defines this for functions which it implements
19864     to always fail with ENOSYS.  Some functions are actually named
19865     something starting with __ and the normal name is an alias.  */
19866 #if defined __stub_$ac_func || defined __stub___$ac_func
19867 choke me
19868 #endif
19869
19870 int
19871 main ()
19872 {
19873 return $ac_func ();
19874   ;
19875   return 0;
19876 }
19877 _ACEOF
19878 rm -f conftest.$ac_objext conftest$ac_exeext
19879 if { (ac_try="$ac_link"
19880 case "(($ac_try" in
19881   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19882   *) ac_try_echo=$ac_try;;
19883 esac
19884 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19885 $as_echo "$ac_try_echo") >&5
19886   (eval "$ac_link") 2>conftest.er1
19887   ac_status=$?
19888   grep -v '^ *+' conftest.er1 >conftest.err
19889   rm -f conftest.er1
19890   cat conftest.err >&5
19891   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19892   (exit $ac_status); } && {
19893          test -z "$ac_c_werror_flag" ||
19894          test ! -s conftest.err
19895        } && test -s conftest$ac_exeext && {
19896          test "$cross_compiling" = yes ||
19897          $as_test_x conftest$ac_exeext
19898        }; then
19899   eval "$as_ac_var=yes"
19900 else
19901   $as_echo "$as_me: failed program was:" >&5
19902 sed 's/^/| /' conftest.$ac_ext >&5
19903
19904         eval "$as_ac_var=no"
19905 fi
19906
19907 rm -rf conftest.dSYM
19908 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19909       conftest$ac_exeext conftest.$ac_ext
19910 fi
19911 ac_res=`eval 'as_val=${'$as_ac_var'}
19912                  $as_echo "$as_val"'`
19913                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19914 $as_echo "$ac_res" >&6; }
19915 as_val=`eval 'as_val=${'$as_ac_var'}
19916                  $as_echo "$as_val"'`
19917    if test "x$as_val" = x""yes; then
19918   cat >>confdefs.h <<_ACEOF
19919 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19920 _ACEOF
19921
19922 else
19923   pgac_need_repl_snprintf=yes
19924 fi
19925 done
19926
19927 fi
19928
19929
19930 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
19931 # include/c.h will provide declarations.  Note this is a separate test
19932 # from whether the functions exist in the C library --- there are
19933 # systems that have the functions but don't bother to declare them :-(
19934
19935 { $as_echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
19936 $as_echo_n "checking whether snprintf is declared... " >&6; }
19937 if test "${ac_cv_have_decl_snprintf+set}" = set; then
19938   $as_echo_n "(cached) " >&6
19939 else
19940   cat >conftest.$ac_ext <<_ACEOF
19941 /* confdefs.h.  */
19942 _ACEOF
19943 cat confdefs.h >>conftest.$ac_ext
19944 cat >>conftest.$ac_ext <<_ACEOF
19945 /* end confdefs.h.  */
19946 $ac_includes_default
19947 int
19948 main ()
19949 {
19950 #ifndef snprintf
19951   (void) snprintf;
19952 #endif
19953
19954   ;
19955   return 0;
19956 }
19957 _ACEOF
19958 rm -f conftest.$ac_objext
19959 if { (ac_try="$ac_compile"
19960 case "(($ac_try" in
19961   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19962   *) ac_try_echo=$ac_try;;
19963 esac
19964 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19965 $as_echo "$ac_try_echo") >&5
19966   (eval "$ac_compile") 2>conftest.er1
19967   ac_status=$?
19968   grep -v '^ *+' conftest.er1 >conftest.err
19969   rm -f conftest.er1
19970   cat conftest.err >&5
19971   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19972   (exit $ac_status); } && {
19973          test -z "$ac_c_werror_flag" ||
19974          test ! -s conftest.err
19975        } && test -s conftest.$ac_objext; then
19976   ac_cv_have_decl_snprintf=yes
19977 else
19978   $as_echo "$as_me: failed program was:" >&5
19979 sed 's/^/| /' conftest.$ac_ext >&5
19980
19981         ac_cv_have_decl_snprintf=no
19982 fi
19983
19984 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19985 fi
19986 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
19987 $as_echo "$ac_cv_have_decl_snprintf" >&6; }
19988 if test "x$ac_cv_have_decl_snprintf" = x""yes; then
19989
19990 cat >>confdefs.h <<_ACEOF
19991 #define HAVE_DECL_SNPRINTF 1
19992 _ACEOF
19993
19994
19995 else
19996   cat >>confdefs.h <<_ACEOF
19997 #define HAVE_DECL_SNPRINTF 0
19998 _ACEOF
19999
20000
20001 fi
20002 { $as_echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
20003 $as_echo_n "checking whether vsnprintf is declared... " >&6; }
20004 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
20005   $as_echo_n "(cached) " >&6
20006 else
20007   cat >conftest.$ac_ext <<_ACEOF
20008 /* confdefs.h.  */
20009 _ACEOF
20010 cat confdefs.h >>conftest.$ac_ext
20011 cat >>conftest.$ac_ext <<_ACEOF
20012 /* end confdefs.h.  */
20013 $ac_includes_default
20014 int
20015 main ()
20016 {
20017 #ifndef vsnprintf
20018   (void) vsnprintf;
20019 #endif
20020
20021   ;
20022   return 0;
20023 }
20024 _ACEOF
20025 rm -f conftest.$ac_objext
20026 if { (ac_try="$ac_compile"
20027 case "(($ac_try" in
20028   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20029   *) ac_try_echo=$ac_try;;
20030 esac
20031 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20032 $as_echo "$ac_try_echo") >&5
20033   (eval "$ac_compile") 2>conftest.er1
20034   ac_status=$?
20035   grep -v '^ *+' conftest.er1 >conftest.err
20036   rm -f conftest.er1
20037   cat conftest.err >&5
20038   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20039   (exit $ac_status); } && {
20040          test -z "$ac_c_werror_flag" ||
20041          test ! -s conftest.err
20042        } && test -s conftest.$ac_objext; then
20043   ac_cv_have_decl_vsnprintf=yes
20044 else
20045   $as_echo "$as_me: failed program was:" >&5
20046 sed 's/^/| /' conftest.$ac_ext >&5
20047
20048         ac_cv_have_decl_vsnprintf=no
20049 fi
20050
20051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20052 fi
20053 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
20054 $as_echo "$ac_cv_have_decl_vsnprintf" >&6; }
20055 if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then
20056
20057 cat >>confdefs.h <<_ACEOF
20058 #define HAVE_DECL_VSNPRINTF 1
20059 _ACEOF
20060
20061
20062 else
20063   cat >>confdefs.h <<_ACEOF
20064 #define HAVE_DECL_VSNPRINTF 0
20065 _ACEOF
20066
20067
20068 fi
20069
20070
20071
20072
20073 { $as_echo "$as_me:$LINENO: checking for isinf" >&5
20074 $as_echo_n "checking for isinf... " >&6; }
20075 if test "${ac_cv_func_isinf+set}" = set; then
20076   $as_echo_n "(cached) " >&6
20077 else
20078   cat >conftest.$ac_ext <<_ACEOF
20079 /* confdefs.h.  */
20080 _ACEOF
20081 cat confdefs.h >>conftest.$ac_ext
20082 cat >>conftest.$ac_ext <<_ACEOF
20083 /* end confdefs.h.  */
20084
20085 #include <math.h>
20086 double glob_double;
20087
20088 int
20089 main ()
20090 {
20091 return isinf(glob_double) ? 0 : 1;
20092   ;
20093   return 0;
20094 }
20095 _ACEOF
20096 rm -f conftest.$ac_objext conftest$ac_exeext
20097 if { (ac_try="$ac_link"
20098 case "(($ac_try" in
20099   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20100   *) ac_try_echo=$ac_try;;
20101 esac
20102 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20103 $as_echo "$ac_try_echo") >&5
20104   (eval "$ac_link") 2>conftest.er1
20105   ac_status=$?
20106   grep -v '^ *+' conftest.er1 >conftest.err
20107   rm -f conftest.er1
20108   cat conftest.err >&5
20109   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20110   (exit $ac_status); } && {
20111          test -z "$ac_c_werror_flag" ||
20112          test ! -s conftest.err
20113        } && test -s conftest$ac_exeext && {
20114          test "$cross_compiling" = yes ||
20115          $as_test_x conftest$ac_exeext
20116        }; then
20117   ac_cv_func_isinf=yes
20118 else
20119   $as_echo "$as_me: failed program was:" >&5
20120 sed 's/^/| /' conftest.$ac_ext >&5
20121
20122         ac_cv_func_isinf=no
20123 fi
20124
20125 rm -rf conftest.dSYM
20126 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20127       conftest$ac_exeext conftest.$ac_ext
20128 fi
20129 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
20130 $as_echo "$ac_cv_func_isinf" >&6; }
20131
20132 if test $ac_cv_func_isinf = yes ; then
20133
20134 cat >>confdefs.h <<\_ACEOF
20135 #define HAVE_ISINF 1
20136 _ACEOF
20137
20138 else
20139   case " $LIBOBJS " in
20140   *" isinf.$ac_objext "* ) ;;
20141   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
20142  ;;
20143 esac
20144
20145   # Look for a way to implement a substitute for isinf()
20146
20147
20148
20149
20150 for ac_func in fpclass fp_class fp_class_d class
20151 do
20152 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20153 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20154 $as_echo_n "checking for $ac_func... " >&6; }
20155 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20156   $as_echo_n "(cached) " >&6
20157 else
20158   cat >conftest.$ac_ext <<_ACEOF
20159 /* confdefs.h.  */
20160 _ACEOF
20161 cat confdefs.h >>conftest.$ac_ext
20162 cat >>conftest.$ac_ext <<_ACEOF
20163 /* end confdefs.h.  */
20164 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20165    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
20166 #define $ac_func innocuous_$ac_func
20167
20168 /* System header to define __stub macros and hopefully few prototypes,
20169     which can conflict with char $ac_func (); below.
20170     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20171     <limits.h> exists even on freestanding compilers.  */
20172
20173 #ifdef __STDC__
20174 # include <limits.h>
20175 #else
20176 # include <assert.h>
20177 #endif
20178
20179 #undef $ac_func
20180
20181 /* Override any GCC internal prototype to avoid an error.
20182    Use char because int might match the return type of a GCC
20183    builtin and then its argument prototype would still apply.  */
20184 #ifdef __cplusplus
20185 extern "C"
20186 #endif
20187 char $ac_func ();
20188 /* The GNU C library defines this for functions which it implements
20189     to always fail with ENOSYS.  Some functions are actually named
20190     something starting with __ and the normal name is an alias.  */
20191 #if defined __stub_$ac_func || defined __stub___$ac_func
20192 choke me
20193 #endif
20194
20195 int
20196 main ()
20197 {
20198 return $ac_func ();
20199   ;
20200   return 0;
20201 }
20202 _ACEOF
20203 rm -f conftest.$ac_objext conftest$ac_exeext
20204 if { (ac_try="$ac_link"
20205 case "(($ac_try" in
20206   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20207   *) ac_try_echo=$ac_try;;
20208 esac
20209 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20210 $as_echo "$ac_try_echo") >&5
20211   (eval "$ac_link") 2>conftest.er1
20212   ac_status=$?
20213   grep -v '^ *+' conftest.er1 >conftest.err
20214   rm -f conftest.er1
20215   cat conftest.err >&5
20216   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20217   (exit $ac_status); } && {
20218          test -z "$ac_c_werror_flag" ||
20219          test ! -s conftest.err
20220        } && test -s conftest$ac_exeext && {
20221          test "$cross_compiling" = yes ||
20222          $as_test_x conftest$ac_exeext
20223        }; then
20224   eval "$as_ac_var=yes"
20225 else
20226   $as_echo "$as_me: failed program was:" >&5
20227 sed 's/^/| /' conftest.$ac_ext >&5
20228
20229         eval "$as_ac_var=no"
20230 fi
20231
20232 rm -rf conftest.dSYM
20233 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20234       conftest$ac_exeext conftest.$ac_ext
20235 fi
20236 ac_res=`eval 'as_val=${'$as_ac_var'}
20237                  $as_echo "$as_val"'`
20238                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20239 $as_echo "$ac_res" >&6; }
20240 as_val=`eval 'as_val=${'$as_ac_var'}
20241                  $as_echo "$as_val"'`
20242    if test "x$as_val" = x""yes; then
20243   cat >>confdefs.h <<_ACEOF
20244 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20245 _ACEOF
20246  break
20247 fi
20248 done
20249
20250 fi
20251
20252 # Some versions of libedit contain strlcpy(); so disregard that library while
20253 # checking for these standard libc functions.
20254 pgac_save_LIBS="$LIBS"
20255 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
20256
20257
20258
20259
20260
20261
20262
20263
20264
20265
20266
20267
20268
20269
20270
20271 for ac_func in crypt erand48 getopt getrusage inet_aton random rint srandom strdup strerror strlcat strlcpy strtol strtoul
20272 do
20273 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20274 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20275 $as_echo_n "checking for $ac_func... " >&6; }
20276 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20277   $as_echo_n "(cached) " >&6
20278 else
20279   cat >conftest.$ac_ext <<_ACEOF
20280 /* confdefs.h.  */
20281 _ACEOF
20282 cat confdefs.h >>conftest.$ac_ext
20283 cat >>conftest.$ac_ext <<_ACEOF
20284 /* end confdefs.h.  */
20285 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20286    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
20287 #define $ac_func innocuous_$ac_func
20288
20289 /* System header to define __stub macros and hopefully few prototypes,
20290     which can conflict with char $ac_func (); below.
20291     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20292     <limits.h> exists even on freestanding compilers.  */
20293
20294 #ifdef __STDC__
20295 # include <limits.h>
20296 #else
20297 # include <assert.h>
20298 #endif
20299
20300 #undef $ac_func
20301
20302 /* Override any GCC internal prototype to avoid an error.
20303    Use char because int might match the return type of a GCC
20304    builtin and then its argument prototype would still apply.  */
20305 #ifdef __cplusplus
20306 extern "C"
20307 #endif
20308 char $ac_func ();
20309 /* The GNU C library defines this for functions which it implements
20310     to always fail with ENOSYS.  Some functions are actually named
20311     something starting with __ and the normal name is an alias.  */
20312 #if defined __stub_$ac_func || defined __stub___$ac_func
20313 choke me
20314 #endif
20315
20316 int
20317 main ()
20318 {
20319 return $ac_func ();
20320   ;
20321   return 0;
20322 }
20323 _ACEOF
20324 rm -f conftest.$ac_objext conftest$ac_exeext
20325 if { (ac_try="$ac_link"
20326 case "(($ac_try" in
20327   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20328   *) ac_try_echo=$ac_try;;
20329 esac
20330 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20331 $as_echo "$ac_try_echo") >&5
20332   (eval "$ac_link") 2>conftest.er1
20333   ac_status=$?
20334   grep -v '^ *+' conftest.er1 >conftest.err
20335   rm -f conftest.er1
20336   cat conftest.err >&5
20337   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20338   (exit $ac_status); } && {
20339          test -z "$ac_c_werror_flag" ||
20340          test ! -s conftest.err
20341        } && test -s conftest$ac_exeext && {
20342          test "$cross_compiling" = yes ||
20343          $as_test_x conftest$ac_exeext
20344        }; then
20345   eval "$as_ac_var=yes"
20346 else
20347   $as_echo "$as_me: failed program was:" >&5
20348 sed 's/^/| /' conftest.$ac_ext >&5
20349
20350         eval "$as_ac_var=no"
20351 fi
20352
20353 rm -rf conftest.dSYM
20354 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20355       conftest$ac_exeext conftest.$ac_ext
20356 fi
20357 ac_res=`eval 'as_val=${'$as_ac_var'}
20358                  $as_echo "$as_val"'`
20359                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20360 $as_echo "$ac_res" >&6; }
20361 as_val=`eval 'as_val=${'$as_ac_var'}
20362                  $as_echo "$as_val"'`
20363    if test "x$as_val" = x""yes; then
20364   cat >>confdefs.h <<_ACEOF
20365 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20366 _ACEOF
20367
20368 else
20369   case " $LIBOBJS " in
20370   *" $ac_func.$ac_objext "* ) ;;
20371   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20372  ;;
20373 esac
20374
20375 fi
20376 done
20377
20378
20379
20380 case $host_os in
20381
20382         # Windows uses a specialised env handler
20383         mingw*)
20384
20385 cat >>confdefs.h <<\_ACEOF
20386 #define HAVE_UNSETENV 1
20387 _ACEOF
20388
20389                 ac_cv_func_unsetenv=yes;;
20390         *)
20391
20392 for ac_func in unsetenv
20393 do
20394 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20395 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20396 $as_echo_n "checking for $ac_func... " >&6; }
20397 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20398   $as_echo_n "(cached) " >&6
20399 else
20400   cat >conftest.$ac_ext <<_ACEOF
20401 /* confdefs.h.  */
20402 _ACEOF
20403 cat confdefs.h >>conftest.$ac_ext
20404 cat >>conftest.$ac_ext <<_ACEOF
20405 /* end confdefs.h.  */
20406 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20407    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
20408 #define $ac_func innocuous_$ac_func
20409
20410 /* System header to define __stub macros and hopefully few prototypes,
20411     which can conflict with char $ac_func (); below.
20412     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20413     <limits.h> exists even on freestanding compilers.  */
20414
20415 #ifdef __STDC__
20416 # include <limits.h>
20417 #else
20418 # include <assert.h>
20419 #endif
20420
20421 #undef $ac_func
20422
20423 /* Override any GCC internal prototype to avoid an error.
20424    Use char because int might match the return type of a GCC
20425    builtin and then its argument prototype would still apply.  */
20426 #ifdef __cplusplus
20427 extern "C"
20428 #endif
20429 char $ac_func ();
20430 /* The GNU C library defines this for functions which it implements
20431     to always fail with ENOSYS.  Some functions are actually named
20432     something starting with __ and the normal name is an alias.  */
20433 #if defined __stub_$ac_func || defined __stub___$ac_func
20434 choke me
20435 #endif
20436
20437 int
20438 main ()
20439 {
20440 return $ac_func ();
20441   ;
20442   return 0;
20443 }
20444 _ACEOF
20445 rm -f conftest.$ac_objext conftest$ac_exeext
20446 if { (ac_try="$ac_link"
20447 case "(($ac_try" in
20448   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20449   *) ac_try_echo=$ac_try;;
20450 esac
20451 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20452 $as_echo "$ac_try_echo") >&5
20453   (eval "$ac_link") 2>conftest.er1
20454   ac_status=$?
20455   grep -v '^ *+' conftest.er1 >conftest.err
20456   rm -f conftest.er1
20457   cat conftest.err >&5
20458   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20459   (exit $ac_status); } && {
20460          test -z "$ac_c_werror_flag" ||
20461          test ! -s conftest.err
20462        } && test -s conftest$ac_exeext && {
20463          test "$cross_compiling" = yes ||
20464          $as_test_x conftest$ac_exeext
20465        }; then
20466   eval "$as_ac_var=yes"
20467 else
20468   $as_echo "$as_me: failed program was:" >&5
20469 sed 's/^/| /' conftest.$ac_ext >&5
20470
20471         eval "$as_ac_var=no"
20472 fi
20473
20474 rm -rf conftest.dSYM
20475 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20476       conftest$ac_exeext conftest.$ac_ext
20477 fi
20478 ac_res=`eval 'as_val=${'$as_ac_var'}
20479                  $as_echo "$as_val"'`
20480                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20481 $as_echo "$ac_res" >&6; }
20482 as_val=`eval 'as_val=${'$as_ac_var'}
20483                  $as_echo "$as_val"'`
20484    if test "x$as_val" = x""yes; then
20485   cat >>confdefs.h <<_ACEOF
20486 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20487 _ACEOF
20488
20489 else
20490   case " $LIBOBJS " in
20491   *" $ac_func.$ac_objext "* ) ;;
20492   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20493  ;;
20494 esac
20495
20496 fi
20497 done
20498
20499
20500                 ;;
20501 esac
20502
20503
20504 LIBS="$pgac_save_LIBS"
20505
20506 # System's version of getaddrinfo(), if any, may be used only if we found
20507 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
20508 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
20509 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
20510 # because we want to use our own getaddrinfo.c on Windows anyway.)
20511 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
20512
20513 for ac_func in getaddrinfo
20514 do
20515 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20516 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20517 $as_echo_n "checking for $ac_func... " >&6; }
20518 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20519   $as_echo_n "(cached) " >&6
20520 else
20521   cat >conftest.$ac_ext <<_ACEOF
20522 /* confdefs.h.  */
20523 _ACEOF
20524 cat confdefs.h >>conftest.$ac_ext
20525 cat >>conftest.$ac_ext <<_ACEOF
20526 /* end confdefs.h.  */
20527 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20528    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
20529 #define $ac_func innocuous_$ac_func
20530
20531 /* System header to define __stub macros and hopefully few prototypes,
20532     which can conflict with char $ac_func (); below.
20533     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20534     <limits.h> exists even on freestanding compilers.  */
20535
20536 #ifdef __STDC__
20537 # include <limits.h>
20538 #else
20539 # include <assert.h>
20540 #endif
20541
20542 #undef $ac_func
20543
20544 /* Override any GCC internal prototype to avoid an error.
20545    Use char because int might match the return type of a GCC
20546    builtin and then its argument prototype would still apply.  */
20547 #ifdef __cplusplus
20548 extern "C"
20549 #endif
20550 char $ac_func ();
20551 /* The GNU C library defines this for functions which it implements
20552     to always fail with ENOSYS.  Some functions are actually named
20553     something starting with __ and the normal name is an alias.  */
20554 #if defined __stub_$ac_func || defined __stub___$ac_func
20555 choke me
20556 #endif
20557
20558 int
20559 main ()
20560 {
20561 return $ac_func ();
20562   ;
20563   return 0;
20564 }
20565 _ACEOF
20566 rm -f conftest.$ac_objext conftest$ac_exeext
20567 if { (ac_try="$ac_link"
20568 case "(($ac_try" in
20569   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20570   *) ac_try_echo=$ac_try;;
20571 esac
20572 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20573 $as_echo "$ac_try_echo") >&5
20574   (eval "$ac_link") 2>conftest.er1
20575   ac_status=$?
20576   grep -v '^ *+' conftest.er1 >conftest.err
20577   rm -f conftest.er1
20578   cat conftest.err >&5
20579   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20580   (exit $ac_status); } && {
20581          test -z "$ac_c_werror_flag" ||
20582          test ! -s conftest.err
20583        } && test -s conftest$ac_exeext && {
20584          test "$cross_compiling" = yes ||
20585          $as_test_x conftest$ac_exeext
20586        }; then
20587   eval "$as_ac_var=yes"
20588 else
20589   $as_echo "$as_me: failed program was:" >&5
20590 sed 's/^/| /' conftest.$ac_ext >&5
20591
20592         eval "$as_ac_var=no"
20593 fi
20594
20595 rm -rf conftest.dSYM
20596 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20597       conftest$ac_exeext conftest.$ac_ext
20598 fi
20599 ac_res=`eval 'as_val=${'$as_ac_var'}
20600                  $as_echo "$as_val"'`
20601                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20602 $as_echo "$ac_res" >&6; }
20603 as_val=`eval 'as_val=${'$as_ac_var'}
20604                  $as_echo "$as_val"'`
20605    if test "x$as_val" = x""yes; then
20606   cat >>confdefs.h <<_ACEOF
20607 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20608 _ACEOF
20609
20610 else
20611   case " $LIBOBJS " in
20612   *" $ac_func.$ac_objext "* ) ;;
20613   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20614  ;;
20615 esac
20616
20617 fi
20618 done
20619
20620
20621 else
20622   case " $LIBOBJS " in
20623   *" getaddrinfo.$ac_objext "* ) ;;
20624   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
20625  ;;
20626 esac
20627
20628 fi
20629
20630 # Similarly, use system's getopt_long() only if system provides struct option.
20631 if test x"$ac_cv_type_struct_option" = xyes ; then
20632
20633 for ac_func in getopt_long
20634 do
20635 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20636 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20637 $as_echo_n "checking for $ac_func... " >&6; }
20638 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20639   $as_echo_n "(cached) " >&6
20640 else
20641   cat >conftest.$ac_ext <<_ACEOF
20642 /* confdefs.h.  */
20643 _ACEOF
20644 cat confdefs.h >>conftest.$ac_ext
20645 cat >>conftest.$ac_ext <<_ACEOF
20646 /* end confdefs.h.  */
20647 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20648    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
20649 #define $ac_func innocuous_$ac_func
20650
20651 /* System header to define __stub macros and hopefully few prototypes,
20652     which can conflict with char $ac_func (); below.
20653     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20654     <limits.h> exists even on freestanding compilers.  */
20655
20656 #ifdef __STDC__
20657 # include <limits.h>
20658 #else
20659 # include <assert.h>
20660 #endif
20661
20662 #undef $ac_func
20663
20664 /* Override any GCC internal prototype to avoid an error.
20665    Use char because int might match the return type of a GCC
20666    builtin and then its argument prototype would still apply.  */
20667 #ifdef __cplusplus
20668 extern "C"
20669 #endif
20670 char $ac_func ();
20671 /* The GNU C library defines this for functions which it implements
20672     to always fail with ENOSYS.  Some functions are actually named
20673     something starting with __ and the normal name is an alias.  */
20674 #if defined __stub_$ac_func || defined __stub___$ac_func
20675 choke me
20676 #endif
20677
20678 int
20679 main ()
20680 {
20681 return $ac_func ();
20682   ;
20683   return 0;
20684 }
20685 _ACEOF
20686 rm -f conftest.$ac_objext conftest$ac_exeext
20687 if { (ac_try="$ac_link"
20688 case "(($ac_try" in
20689   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20690   *) ac_try_echo=$ac_try;;
20691 esac
20692 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20693 $as_echo "$ac_try_echo") >&5
20694   (eval "$ac_link") 2>conftest.er1
20695   ac_status=$?
20696   grep -v '^ *+' conftest.er1 >conftest.err
20697   rm -f conftest.er1
20698   cat conftest.err >&5
20699   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20700   (exit $ac_status); } && {
20701          test -z "$ac_c_werror_flag" ||
20702          test ! -s conftest.err
20703        } && test -s conftest$ac_exeext && {
20704          test "$cross_compiling" = yes ||
20705          $as_test_x conftest$ac_exeext
20706        }; then
20707   eval "$as_ac_var=yes"
20708 else
20709   $as_echo "$as_me: failed program was:" >&5
20710 sed 's/^/| /' conftest.$ac_ext >&5
20711
20712         eval "$as_ac_var=no"
20713 fi
20714
20715 rm -rf conftest.dSYM
20716 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20717       conftest$ac_exeext conftest.$ac_ext
20718 fi
20719 ac_res=`eval 'as_val=${'$as_ac_var'}
20720                  $as_echo "$as_val"'`
20721                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20722 $as_echo "$ac_res" >&6; }
20723 as_val=`eval 'as_val=${'$as_ac_var'}
20724                  $as_echo "$as_val"'`
20725    if test "x$as_val" = x""yes; then
20726   cat >>confdefs.h <<_ACEOF
20727 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20728 _ACEOF
20729
20730 else
20731   case " $LIBOBJS " in
20732   *" $ac_func.$ac_objext "* ) ;;
20733   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20734  ;;
20735 esac
20736
20737 fi
20738 done
20739
20740
20741 else
20742   case " $LIBOBJS " in
20743   *" getopt_long.$ac_objext "* ) ;;
20744   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
20745  ;;
20746 esac
20747
20748 fi
20749
20750 # Solaris' getopt() doesn't do what we want for long options, so always use
20751 # our version on that platform.
20752 if test "$PORTNAME" = "solaris"; then
20753   case " $LIBOBJS " in
20754   *" getopt.$ac_objext "* ) ;;
20755   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
20756  ;;
20757 esac
20758
20759 fi
20760
20761 # Cygwin's erand48() is broken (always returns zero) in some releases,
20762 # so force use of ours.
20763 if test "$PORTNAME" = "cygwin"; then
20764   case " $LIBOBJS " in
20765   *" erand48.$ac_objext "* ) ;;
20766   *) LIBOBJS="$LIBOBJS erand48.$ac_objext"
20767  ;;
20768 esac
20769
20770 fi
20771
20772 # Win32 support
20773 if test "$PORTNAME" = "win32"; then
20774
20775 for ac_func in gettimeofday
20776 do
20777 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20778 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20779 $as_echo_n "checking for $ac_func... " >&6; }
20780 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20781   $as_echo_n "(cached) " >&6
20782 else
20783   cat >conftest.$ac_ext <<_ACEOF
20784 /* confdefs.h.  */
20785 _ACEOF
20786 cat confdefs.h >>conftest.$ac_ext
20787 cat >>conftest.$ac_ext <<_ACEOF
20788 /* end confdefs.h.  */
20789 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20790    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
20791 #define $ac_func innocuous_$ac_func
20792
20793 /* System header to define __stub macros and hopefully few prototypes,
20794     which can conflict with char $ac_func (); below.
20795     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20796     <limits.h> exists even on freestanding compilers.  */
20797
20798 #ifdef __STDC__
20799 # include <limits.h>
20800 #else
20801 # include <assert.h>
20802 #endif
20803
20804 #undef $ac_func
20805
20806 /* Override any GCC internal prototype to avoid an error.
20807    Use char because int might match the return type of a GCC
20808    builtin and then its argument prototype would still apply.  */
20809 #ifdef __cplusplus
20810 extern "C"
20811 #endif
20812 char $ac_func ();
20813 /* The GNU C library defines this for functions which it implements
20814     to always fail with ENOSYS.  Some functions are actually named
20815     something starting with __ and the normal name is an alias.  */
20816 #if defined __stub_$ac_func || defined __stub___$ac_func
20817 choke me
20818 #endif
20819
20820 int
20821 main ()
20822 {
20823 return $ac_func ();
20824   ;
20825   return 0;
20826 }
20827 _ACEOF
20828 rm -f conftest.$ac_objext conftest$ac_exeext
20829 if { (ac_try="$ac_link"
20830 case "(($ac_try" in
20831   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20832   *) ac_try_echo=$ac_try;;
20833 esac
20834 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20835 $as_echo "$ac_try_echo") >&5
20836   (eval "$ac_link") 2>conftest.er1
20837   ac_status=$?
20838   grep -v '^ *+' conftest.er1 >conftest.err
20839   rm -f conftest.er1
20840   cat conftest.err >&5
20841   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20842   (exit $ac_status); } && {
20843          test -z "$ac_c_werror_flag" ||
20844          test ! -s conftest.err
20845        } && test -s conftest$ac_exeext && {
20846          test "$cross_compiling" = yes ||
20847          $as_test_x conftest$ac_exeext
20848        }; then
20849   eval "$as_ac_var=yes"
20850 else
20851   $as_echo "$as_me: failed program was:" >&5
20852 sed 's/^/| /' conftest.$ac_ext >&5
20853
20854         eval "$as_ac_var=no"
20855 fi
20856
20857 rm -rf conftest.dSYM
20858 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20859       conftest$ac_exeext conftest.$ac_ext
20860 fi
20861 ac_res=`eval 'as_val=${'$as_ac_var'}
20862                  $as_echo "$as_val"'`
20863                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20864 $as_echo "$ac_res" >&6; }
20865 as_val=`eval 'as_val=${'$as_ac_var'}
20866                  $as_echo "$as_val"'`
20867    if test "x$as_val" = x""yes; then
20868   cat >>confdefs.h <<_ACEOF
20869 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20870 _ACEOF
20871
20872 else
20873   case " $LIBOBJS " in
20874   *" $ac_func.$ac_objext "* ) ;;
20875   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20876  ;;
20877 esac
20878
20879 fi
20880 done
20881
20882
20883 case " $LIBOBJS " in
20884   *" kill.$ac_objext "* ) ;;
20885   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
20886  ;;
20887 esac
20888
20889 case " $LIBOBJS " in
20890   *" open.$ac_objext "* ) ;;
20891   *) LIBOBJS="$LIBOBJS open.$ac_objext"
20892  ;;
20893 esac
20894
20895 case " $LIBOBJS " in
20896   *" win32env.$ac_objext "* ) ;;
20897   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
20898  ;;
20899 esac
20900
20901 case " $LIBOBJS " in
20902   *" win32error.$ac_objext "* ) ;;
20903   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
20904  ;;
20905 esac
20906
20907
20908 cat >>confdefs.h <<\_ACEOF
20909 #define HAVE_SYMLINK 1
20910 _ACEOF
20911
20912 fi
20913
20914 if test "$with_readline" = yes; then
20915   { $as_echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
20916 $as_echo_n "checking for rl_completion_append_character... " >&6; }
20917 if test "${pgac_cv_var_rl_completion_append_character+set}" = set; then
20918   $as_echo_n "(cached) " >&6
20919 else
20920   cat >conftest.$ac_ext <<_ACEOF
20921 /* confdefs.h.  */
20922 _ACEOF
20923 cat confdefs.h >>conftest.$ac_ext
20924 cat >>conftest.$ac_ext <<_ACEOF
20925 /* end confdefs.h.  */
20926 #include <stdio.h>
20927 #ifdef HAVE_READLINE_READLINE_H
20928 # include <readline/readline.h>
20929 #elif defined(HAVE_READLINE_H)
20930 # include <readline.h>
20931 #endif
20932
20933 int
20934 main ()
20935 {
20936 rl_completion_append_character = 'x';
20937   ;
20938   return 0;
20939 }
20940 _ACEOF
20941 rm -f conftest.$ac_objext conftest$ac_exeext
20942 if { (ac_try="$ac_link"
20943 case "(($ac_try" in
20944   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20945   *) ac_try_echo=$ac_try;;
20946 esac
20947 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20948 $as_echo "$ac_try_echo") >&5
20949   (eval "$ac_link") 2>conftest.er1
20950   ac_status=$?
20951   grep -v '^ *+' conftest.er1 >conftest.err
20952   rm -f conftest.er1
20953   cat conftest.err >&5
20954   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20955   (exit $ac_status); } && {
20956          test -z "$ac_c_werror_flag" ||
20957          test ! -s conftest.err
20958        } && test -s conftest$ac_exeext && {
20959          test "$cross_compiling" = yes ||
20960          $as_test_x conftest$ac_exeext
20961        }; then
20962   pgac_cv_var_rl_completion_append_character=yes
20963 else
20964   $as_echo "$as_me: failed program was:" >&5
20965 sed 's/^/| /' conftest.$ac_ext >&5
20966
20967         pgac_cv_var_rl_completion_append_character=no
20968 fi
20969
20970 rm -rf conftest.dSYM
20971 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20972       conftest$ac_exeext conftest.$ac_ext
20973 fi
20974 { $as_echo "$as_me:$LINENO: result: $pgac_cv_var_rl_completion_append_character" >&5
20975 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
20976 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
20977
20978 cat >>confdefs.h <<\_ACEOF
20979 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
20980 _ACEOF
20981
20982 fi
20983
20984
20985 for ac_func in rl_completion_matches rl_filename_completion_function
20986 do
20987 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20988 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20989 $as_echo_n "checking for $ac_func... " >&6; }
20990 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20991   $as_echo_n "(cached) " >&6
20992 else
20993   cat >conftest.$ac_ext <<_ACEOF
20994 /* confdefs.h.  */
20995 _ACEOF
20996 cat confdefs.h >>conftest.$ac_ext
20997 cat >>conftest.$ac_ext <<_ACEOF
20998 /* end confdefs.h.  */
20999 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21000    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21001 #define $ac_func innocuous_$ac_func
21002
21003 /* System header to define __stub macros and hopefully few prototypes,
21004     which can conflict with char $ac_func (); below.
21005     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21006     <limits.h> exists even on freestanding compilers.  */
21007
21008 #ifdef __STDC__
21009 # include <limits.h>
21010 #else
21011 # include <assert.h>
21012 #endif
21013
21014 #undef $ac_func
21015
21016 /* Override any GCC internal prototype to avoid an error.
21017    Use char because int might match the return type of a GCC
21018    builtin and then its argument prototype would still apply.  */
21019 #ifdef __cplusplus
21020 extern "C"
21021 #endif
21022 char $ac_func ();
21023 /* The GNU C library defines this for functions which it implements
21024     to always fail with ENOSYS.  Some functions are actually named
21025     something starting with __ and the normal name is an alias.  */
21026 #if defined __stub_$ac_func || defined __stub___$ac_func
21027 choke me
21028 #endif
21029
21030 int
21031 main ()
21032 {
21033 return $ac_func ();
21034   ;
21035   return 0;
21036 }
21037 _ACEOF
21038 rm -f conftest.$ac_objext conftest$ac_exeext
21039 if { (ac_try="$ac_link"
21040 case "(($ac_try" in
21041   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21042   *) ac_try_echo=$ac_try;;
21043 esac
21044 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21045 $as_echo "$ac_try_echo") >&5
21046   (eval "$ac_link") 2>conftest.er1
21047   ac_status=$?
21048   grep -v '^ *+' conftest.er1 >conftest.err
21049   rm -f conftest.er1
21050   cat conftest.err >&5
21051   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21052   (exit $ac_status); } && {
21053          test -z "$ac_c_werror_flag" ||
21054          test ! -s conftest.err
21055        } && test -s conftest$ac_exeext && {
21056          test "$cross_compiling" = yes ||
21057          $as_test_x conftest$ac_exeext
21058        }; then
21059   eval "$as_ac_var=yes"
21060 else
21061   $as_echo "$as_me: failed program was:" >&5
21062 sed 's/^/| /' conftest.$ac_ext >&5
21063
21064         eval "$as_ac_var=no"
21065 fi
21066
21067 rm -rf conftest.dSYM
21068 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21069       conftest$ac_exeext conftest.$ac_ext
21070 fi
21071 ac_res=`eval 'as_val=${'$as_ac_var'}
21072                  $as_echo "$as_val"'`
21073                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21074 $as_echo "$ac_res" >&6; }
21075 as_val=`eval 'as_val=${'$as_ac_var'}
21076                  $as_echo "$as_val"'`
21077    if test "x$as_val" = x""yes; then
21078   cat >>confdefs.h <<_ACEOF
21079 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21080 _ACEOF
21081
21082 fi
21083 done
21084
21085
21086
21087 for ac_func in append_history history_truncate_file
21088 do
21089 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21090 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21091 $as_echo_n "checking for $ac_func... " >&6; }
21092 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21093   $as_echo_n "(cached) " >&6
21094 else
21095   cat >conftest.$ac_ext <<_ACEOF
21096 /* confdefs.h.  */
21097 _ACEOF
21098 cat confdefs.h >>conftest.$ac_ext
21099 cat >>conftest.$ac_ext <<_ACEOF
21100 /* end confdefs.h.  */
21101 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21102    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21103 #define $ac_func innocuous_$ac_func
21104
21105 /* System header to define __stub macros and hopefully few prototypes,
21106     which can conflict with char $ac_func (); below.
21107     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21108     <limits.h> exists even on freestanding compilers.  */
21109
21110 #ifdef __STDC__
21111 # include <limits.h>
21112 #else
21113 # include <assert.h>
21114 #endif
21115
21116 #undef $ac_func
21117
21118 /* Override any GCC internal prototype to avoid an error.
21119    Use char because int might match the return type of a GCC
21120    builtin and then its argument prototype would still apply.  */
21121 #ifdef __cplusplus
21122 extern "C"
21123 #endif
21124 char $ac_func ();
21125 /* The GNU C library defines this for functions which it implements
21126     to always fail with ENOSYS.  Some functions are actually named
21127     something starting with __ and the normal name is an alias.  */
21128 #if defined __stub_$ac_func || defined __stub___$ac_func
21129 choke me
21130 #endif
21131
21132 int
21133 main ()
21134 {
21135 return $ac_func ();
21136   ;
21137   return 0;
21138 }
21139 _ACEOF
21140 rm -f conftest.$ac_objext conftest$ac_exeext
21141 if { (ac_try="$ac_link"
21142 case "(($ac_try" in
21143   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21144   *) ac_try_echo=$ac_try;;
21145 esac
21146 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21147 $as_echo "$ac_try_echo") >&5
21148   (eval "$ac_link") 2>conftest.er1
21149   ac_status=$?
21150   grep -v '^ *+' conftest.er1 >conftest.err
21151   rm -f conftest.er1
21152   cat conftest.err >&5
21153   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21154   (exit $ac_status); } && {
21155          test -z "$ac_c_werror_flag" ||
21156          test ! -s conftest.err
21157        } && test -s conftest$ac_exeext && {
21158          test "$cross_compiling" = yes ||
21159          $as_test_x conftest$ac_exeext
21160        }; then
21161   eval "$as_ac_var=yes"
21162 else
21163   $as_echo "$as_me: failed program was:" >&5
21164 sed 's/^/| /' conftest.$ac_ext >&5
21165
21166         eval "$as_ac_var=no"
21167 fi
21168
21169 rm -rf conftest.dSYM
21170 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21171       conftest$ac_exeext conftest.$ac_ext
21172 fi
21173 ac_res=`eval 'as_val=${'$as_ac_var'}
21174                  $as_echo "$as_val"'`
21175                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21176 $as_echo "$ac_res" >&6; }
21177 as_val=`eval 'as_val=${'$as_ac_var'}
21178                  $as_echo "$as_val"'`
21179    if test "x$as_val" = x""yes; then
21180   cat >>confdefs.h <<_ACEOF
21181 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21182 _ACEOF
21183
21184 fi
21185 done
21186
21187 fi
21188
21189
21190 { $as_echo "$as_me:$LINENO: checking for sigsetjmp" >&5
21191 $as_echo_n "checking for sigsetjmp... " >&6; }
21192 if test "${pgac_cv_func_sigsetjmp+set}" = set; then
21193   $as_echo_n "(cached) " >&6
21194 else
21195   cat >conftest.$ac_ext <<_ACEOF
21196 /* confdefs.h.  */
21197 _ACEOF
21198 cat confdefs.h >>conftest.$ac_ext
21199 cat >>conftest.$ac_ext <<_ACEOF
21200 /* end confdefs.h.  */
21201 #include <setjmp.h>
21202 int
21203 main ()
21204 {
21205 sigjmp_buf x; sigsetjmp(x, 1);
21206   ;
21207   return 0;
21208 }
21209 _ACEOF
21210 rm -f conftest.$ac_objext conftest$ac_exeext
21211 if { (ac_try="$ac_link"
21212 case "(($ac_try" in
21213   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21214   *) ac_try_echo=$ac_try;;
21215 esac
21216 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21217 $as_echo "$ac_try_echo") >&5
21218   (eval "$ac_link") 2>conftest.er1
21219   ac_status=$?
21220   grep -v '^ *+' conftest.er1 >conftest.err
21221   rm -f conftest.er1
21222   cat conftest.err >&5
21223   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21224   (exit $ac_status); } && {
21225          test -z "$ac_c_werror_flag" ||
21226          test ! -s conftest.err
21227        } && test -s conftest$ac_exeext && {
21228          test "$cross_compiling" = yes ||
21229          $as_test_x conftest$ac_exeext
21230        }; then
21231   pgac_cv_func_sigsetjmp=yes
21232 else
21233   $as_echo "$as_me: failed program was:" >&5
21234 sed 's/^/| /' conftest.$ac_ext >&5
21235
21236         pgac_cv_func_sigsetjmp=no
21237 fi
21238
21239 rm -rf conftest.dSYM
21240 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21241       conftest$ac_exeext conftest.$ac_ext
21242 fi
21243 { $as_echo "$as_me:$LINENO: result: $pgac_cv_func_sigsetjmp" >&5
21244 $as_echo "$pgac_cv_func_sigsetjmp" >&6; }
21245 if test x"$pgac_cv_func_sigsetjmp" = x"yes"; then
21246
21247 cat >>confdefs.h <<\_ACEOF
21248 #define HAVE_SIGSETJMP 1
21249 _ACEOF
21250
21251 fi
21252
21253 { $as_echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
21254 $as_echo_n "checking whether sys_siglist is declared... " >&6; }
21255 if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
21256   $as_echo_n "(cached) " >&6
21257 else
21258   cat >conftest.$ac_ext <<_ACEOF
21259 /* confdefs.h.  */
21260 _ACEOF
21261 cat confdefs.h >>conftest.$ac_ext
21262 cat >>conftest.$ac_ext <<_ACEOF
21263 /* end confdefs.h.  */
21264 #include <signal.h>
21265 /* NetBSD declares sys_siglist in unistd.h.  */
21266 #ifdef HAVE_UNISTD_H
21267 # include <unistd.h>
21268 #endif
21269
21270
21271 int
21272 main ()
21273 {
21274 #ifndef sys_siglist
21275   (void) sys_siglist;
21276 #endif
21277
21278   ;
21279   return 0;
21280 }
21281 _ACEOF
21282 rm -f conftest.$ac_objext
21283 if { (ac_try="$ac_compile"
21284 case "(($ac_try" in
21285   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21286   *) ac_try_echo=$ac_try;;
21287 esac
21288 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21289 $as_echo "$ac_try_echo") >&5
21290   (eval "$ac_compile") 2>conftest.er1
21291   ac_status=$?
21292   grep -v '^ *+' conftest.er1 >conftest.err
21293   rm -f conftest.er1
21294   cat conftest.err >&5
21295   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21296   (exit $ac_status); } && {
21297          test -z "$ac_c_werror_flag" ||
21298          test ! -s conftest.err
21299        } && test -s conftest.$ac_objext; then
21300   ac_cv_have_decl_sys_siglist=yes
21301 else
21302   $as_echo "$as_me: failed program was:" >&5
21303 sed 's/^/| /' conftest.$ac_ext >&5
21304
21305         ac_cv_have_decl_sys_siglist=no
21306 fi
21307
21308 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21309 fi
21310 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
21311 $as_echo "$ac_cv_have_decl_sys_siglist" >&6; }
21312 if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then
21313
21314 cat >>confdefs.h <<_ACEOF
21315 #define HAVE_DECL_SYS_SIGLIST 1
21316 _ACEOF
21317
21318
21319 else
21320   cat >>confdefs.h <<_ACEOF
21321 #define HAVE_DECL_SYS_SIGLIST 0
21322 _ACEOF
21323
21324
21325 fi
21326
21327
21328
21329
21330 { $as_echo "$as_me:$LINENO: checking for syslog" >&5
21331 $as_echo_n "checking for syslog... " >&6; }
21332 if test "${ac_cv_func_syslog+set}" = set; then
21333   $as_echo_n "(cached) " >&6
21334 else
21335   cat >conftest.$ac_ext <<_ACEOF
21336 /* confdefs.h.  */
21337 _ACEOF
21338 cat confdefs.h >>conftest.$ac_ext
21339 cat >>conftest.$ac_ext <<_ACEOF
21340 /* end confdefs.h.  */
21341 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
21342    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21343 #define syslog innocuous_syslog
21344
21345 /* System header to define __stub macros and hopefully few prototypes,
21346     which can conflict with char syslog (); below.
21347     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21348     <limits.h> exists even on freestanding compilers.  */
21349
21350 #ifdef __STDC__
21351 # include <limits.h>
21352 #else
21353 # include <assert.h>
21354 #endif
21355
21356 #undef syslog
21357
21358 /* Override any GCC internal prototype to avoid an error.
21359    Use char because int might match the return type of a GCC
21360    builtin and then its argument prototype would still apply.  */
21361 #ifdef __cplusplus
21362 extern "C"
21363 #endif
21364 char syslog ();
21365 /* The GNU C library defines this for functions which it implements
21366     to always fail with ENOSYS.  Some functions are actually named
21367     something starting with __ and the normal name is an alias.  */
21368 #if defined __stub_syslog || defined __stub___syslog
21369 choke me
21370 #endif
21371
21372 int
21373 main ()
21374 {
21375 return syslog ();
21376   ;
21377   return 0;
21378 }
21379 _ACEOF
21380 rm -f conftest.$ac_objext conftest$ac_exeext
21381 if { (ac_try="$ac_link"
21382 case "(($ac_try" in
21383   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21384   *) ac_try_echo=$ac_try;;
21385 esac
21386 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21387 $as_echo "$ac_try_echo") >&5
21388   (eval "$ac_link") 2>conftest.er1
21389   ac_status=$?
21390   grep -v '^ *+' conftest.er1 >conftest.err
21391   rm -f conftest.er1
21392   cat conftest.err >&5
21393   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21394   (exit $ac_status); } && {
21395          test -z "$ac_c_werror_flag" ||
21396          test ! -s conftest.err
21397        } && test -s conftest$ac_exeext && {
21398          test "$cross_compiling" = yes ||
21399          $as_test_x conftest$ac_exeext
21400        }; then
21401   ac_cv_func_syslog=yes
21402 else
21403   $as_echo "$as_me: failed program was:" >&5
21404 sed 's/^/| /' conftest.$ac_ext >&5
21405
21406         ac_cv_func_syslog=no
21407 fi
21408
21409 rm -rf conftest.dSYM
21410 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21411       conftest$ac_exeext conftest.$ac_ext
21412 fi
21413 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
21414 $as_echo "$ac_cv_func_syslog" >&6; }
21415 if test "x$ac_cv_func_syslog" = x""yes; then
21416   if test "${ac_cv_header_syslog_h+set}" = set; then
21417   { $as_echo "$as_me:$LINENO: checking for syslog.h" >&5
21418 $as_echo_n "checking for syslog.h... " >&6; }
21419 if test "${ac_cv_header_syslog_h+set}" = set; then
21420   $as_echo_n "(cached) " >&6
21421 fi
21422 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
21423 $as_echo "$ac_cv_header_syslog_h" >&6; }
21424 else
21425   # Is the header compilable?
21426 { $as_echo "$as_me:$LINENO: checking syslog.h usability" >&5
21427 $as_echo_n "checking syslog.h usability... " >&6; }
21428 cat >conftest.$ac_ext <<_ACEOF
21429 /* confdefs.h.  */
21430 _ACEOF
21431 cat confdefs.h >>conftest.$ac_ext
21432 cat >>conftest.$ac_ext <<_ACEOF
21433 /* end confdefs.h.  */
21434 $ac_includes_default
21435 #include <syslog.h>
21436 _ACEOF
21437 rm -f conftest.$ac_objext
21438 if { (ac_try="$ac_compile"
21439 case "(($ac_try" in
21440   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21441   *) ac_try_echo=$ac_try;;
21442 esac
21443 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21444 $as_echo "$ac_try_echo") >&5
21445   (eval "$ac_compile") 2>conftest.er1
21446   ac_status=$?
21447   grep -v '^ *+' conftest.er1 >conftest.err
21448   rm -f conftest.er1
21449   cat conftest.err >&5
21450   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21451   (exit $ac_status); } && {
21452          test -z "$ac_c_werror_flag" ||
21453          test ! -s conftest.err
21454        } && test -s conftest.$ac_objext; then
21455   ac_header_compiler=yes
21456 else
21457   $as_echo "$as_me: failed program was:" >&5
21458 sed 's/^/| /' conftest.$ac_ext >&5
21459
21460         ac_header_compiler=no
21461 fi
21462
21463 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21464 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21465 $as_echo "$ac_header_compiler" >&6; }
21466
21467 # Is the header present?
21468 { $as_echo "$as_me:$LINENO: checking syslog.h presence" >&5
21469 $as_echo_n "checking syslog.h presence... " >&6; }
21470 cat >conftest.$ac_ext <<_ACEOF
21471 /* confdefs.h.  */
21472 _ACEOF
21473 cat confdefs.h >>conftest.$ac_ext
21474 cat >>conftest.$ac_ext <<_ACEOF
21475 /* end confdefs.h.  */
21476 #include <syslog.h>
21477 _ACEOF
21478 if { (ac_try="$ac_cpp conftest.$ac_ext"
21479 case "(($ac_try" in
21480   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21481   *) ac_try_echo=$ac_try;;
21482 esac
21483 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21484 $as_echo "$ac_try_echo") >&5
21485   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
21486   ac_status=$?
21487   grep -v '^ *+' conftest.er1 >conftest.err
21488   rm -f conftest.er1
21489   cat conftest.err >&5
21490   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21491   (exit $ac_status); } >/dev/null && {
21492          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21493          test ! -s conftest.err
21494        }; then
21495   ac_header_preproc=yes
21496 else
21497   $as_echo "$as_me: failed program was:" >&5
21498 sed 's/^/| /' conftest.$ac_ext >&5
21499
21500   ac_header_preproc=no
21501 fi
21502
21503 rm -f conftest.err conftest.$ac_ext
21504 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21505 $as_echo "$ac_header_preproc" >&6; }
21506
21507 # So?  What about this header?
21508 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21509   yes:no: )
21510     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
21511 $as_echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
21512     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
21513 $as_echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
21514     ac_header_preproc=yes
21515     ;;
21516   no:yes:* )
21517     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
21518 $as_echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
21519     { $as_echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
21520 $as_echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
21521     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
21522 $as_echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
21523     { $as_echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
21524 $as_echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
21525     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
21526 $as_echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
21527     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
21528 $as_echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
21529     ( cat <<\_ASBOX
21530 ## ---------------------------------------- ##
21531 ## Report this to pgsql-bugs@postgresql.org ##
21532 ## ---------------------------------------- ##
21533 _ASBOX
21534      ) | sed "s/^/$as_me: WARNING:     /" >&2
21535     ;;
21536 esac
21537 { $as_echo "$as_me:$LINENO: checking for syslog.h" >&5
21538 $as_echo_n "checking for syslog.h... " >&6; }
21539 if test "${ac_cv_header_syslog_h+set}" = set; then
21540   $as_echo_n "(cached) " >&6
21541 else
21542   ac_cv_header_syslog_h=$ac_header_preproc
21543 fi
21544 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
21545 $as_echo "$ac_cv_header_syslog_h" >&6; }
21546
21547 fi
21548 if test "x$ac_cv_header_syslog_h" = x""yes; then
21549
21550 cat >>confdefs.h <<\_ACEOF
21551 #define HAVE_SYSLOG 1
21552 _ACEOF
21553
21554 fi
21555
21556
21557 fi
21558
21559
21560 { $as_echo "$as_me:$LINENO: checking for opterr" >&5
21561 $as_echo_n "checking for opterr... " >&6; }
21562 if test "${pgac_cv_var_int_opterr+set}" = set; then
21563   $as_echo_n "(cached) " >&6
21564 else
21565   cat >conftest.$ac_ext <<_ACEOF
21566 /* confdefs.h.  */
21567 _ACEOF
21568 cat confdefs.h >>conftest.$ac_ext
21569 cat >>conftest.$ac_ext <<_ACEOF
21570 /* end confdefs.h.  */
21571 #include <unistd.h>
21572 int
21573 main ()
21574 {
21575 extern int opterr; opterr = 1;
21576   ;
21577   return 0;
21578 }
21579 _ACEOF
21580 rm -f conftest.$ac_objext conftest$ac_exeext
21581 if { (ac_try="$ac_link"
21582 case "(($ac_try" in
21583   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21584   *) ac_try_echo=$ac_try;;
21585 esac
21586 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21587 $as_echo "$ac_try_echo") >&5
21588   (eval "$ac_link") 2>conftest.er1
21589   ac_status=$?
21590   grep -v '^ *+' conftest.er1 >conftest.err
21591   rm -f conftest.er1
21592   cat conftest.err >&5
21593   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21594   (exit $ac_status); } && {
21595          test -z "$ac_c_werror_flag" ||
21596          test ! -s conftest.err
21597        } && test -s conftest$ac_exeext && {
21598          test "$cross_compiling" = yes ||
21599          $as_test_x conftest$ac_exeext
21600        }; then
21601   pgac_cv_var_int_opterr=yes
21602 else
21603   $as_echo "$as_me: failed program was:" >&5
21604 sed 's/^/| /' conftest.$ac_ext >&5
21605
21606         pgac_cv_var_int_opterr=no
21607 fi
21608
21609 rm -rf conftest.dSYM
21610 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21611       conftest$ac_exeext conftest.$ac_ext
21612 fi
21613 { $as_echo "$as_me:$LINENO: result: $pgac_cv_var_int_opterr" >&5
21614 $as_echo "$pgac_cv_var_int_opterr" >&6; }
21615 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
21616
21617 cat >>confdefs.h <<\_ACEOF
21618 #define HAVE_INT_OPTERR 1
21619 _ACEOF
21620
21621 fi
21622
21623 { $as_echo "$as_me:$LINENO: checking for optreset" >&5
21624 $as_echo_n "checking for optreset... " >&6; }
21625 if test "${pgac_cv_var_int_optreset+set}" = set; then
21626   $as_echo_n "(cached) " >&6
21627 else
21628   cat >conftest.$ac_ext <<_ACEOF
21629 /* confdefs.h.  */
21630 _ACEOF
21631 cat confdefs.h >>conftest.$ac_ext
21632 cat >>conftest.$ac_ext <<_ACEOF
21633 /* end confdefs.h.  */
21634 #include <unistd.h>
21635 int
21636 main ()
21637 {
21638 extern int optreset; optreset = 1;
21639   ;
21640   return 0;
21641 }
21642 _ACEOF
21643 rm -f conftest.$ac_objext conftest$ac_exeext
21644 if { (ac_try="$ac_link"
21645 case "(($ac_try" in
21646   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21647   *) ac_try_echo=$ac_try;;
21648 esac
21649 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21650 $as_echo "$ac_try_echo") >&5
21651   (eval "$ac_link") 2>conftest.er1
21652   ac_status=$?
21653   grep -v '^ *+' conftest.er1 >conftest.err
21654   rm -f conftest.er1
21655   cat conftest.err >&5
21656   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21657   (exit $ac_status); } && {
21658          test -z "$ac_c_werror_flag" ||
21659          test ! -s conftest.err
21660        } && test -s conftest$ac_exeext && {
21661          test "$cross_compiling" = yes ||
21662          $as_test_x conftest$ac_exeext
21663        }; then
21664   pgac_cv_var_int_optreset=yes
21665 else
21666   $as_echo "$as_me: failed program was:" >&5
21667 sed 's/^/| /' conftest.$ac_ext >&5
21668
21669         pgac_cv_var_int_optreset=no
21670 fi
21671
21672 rm -rf conftest.dSYM
21673 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21674       conftest$ac_exeext conftest.$ac_ext
21675 fi
21676 { $as_echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
21677 $as_echo "$pgac_cv_var_int_optreset" >&6; }
21678 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
21679
21680 cat >>confdefs.h <<\_ACEOF
21681 #define HAVE_INT_OPTRESET 1
21682 _ACEOF
21683
21684 fi
21685
21686
21687
21688 for ac_func in strtoll strtoq
21689 do
21690 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21691 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21692 $as_echo_n "checking for $ac_func... " >&6; }
21693 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21694   $as_echo_n "(cached) " >&6
21695 else
21696   cat >conftest.$ac_ext <<_ACEOF
21697 /* confdefs.h.  */
21698 _ACEOF
21699 cat confdefs.h >>conftest.$ac_ext
21700 cat >>conftest.$ac_ext <<_ACEOF
21701 /* end confdefs.h.  */
21702 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21703    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21704 #define $ac_func innocuous_$ac_func
21705
21706 /* System header to define __stub macros and hopefully few prototypes,
21707     which can conflict with char $ac_func (); below.
21708     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21709     <limits.h> exists even on freestanding compilers.  */
21710
21711 #ifdef __STDC__
21712 # include <limits.h>
21713 #else
21714 # include <assert.h>
21715 #endif
21716
21717 #undef $ac_func
21718
21719 /* Override any GCC internal prototype to avoid an error.
21720    Use char because int might match the return type of a GCC
21721    builtin and then its argument prototype would still apply.  */
21722 #ifdef __cplusplus
21723 extern "C"
21724 #endif
21725 char $ac_func ();
21726 /* The GNU C library defines this for functions which it implements
21727     to always fail with ENOSYS.  Some functions are actually named
21728     something starting with __ and the normal name is an alias.  */
21729 #if defined __stub_$ac_func || defined __stub___$ac_func
21730 choke me
21731 #endif
21732
21733 int
21734 main ()
21735 {
21736 return $ac_func ();
21737   ;
21738   return 0;
21739 }
21740 _ACEOF
21741 rm -f conftest.$ac_objext conftest$ac_exeext
21742 if { (ac_try="$ac_link"
21743 case "(($ac_try" in
21744   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21745   *) ac_try_echo=$ac_try;;
21746 esac
21747 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21748 $as_echo "$ac_try_echo") >&5
21749   (eval "$ac_link") 2>conftest.er1
21750   ac_status=$?
21751   grep -v '^ *+' conftest.er1 >conftest.err
21752   rm -f conftest.er1
21753   cat conftest.err >&5
21754   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21755   (exit $ac_status); } && {
21756          test -z "$ac_c_werror_flag" ||
21757          test ! -s conftest.err
21758        } && test -s conftest$ac_exeext && {
21759          test "$cross_compiling" = yes ||
21760          $as_test_x conftest$ac_exeext
21761        }; then
21762   eval "$as_ac_var=yes"
21763 else
21764   $as_echo "$as_me: failed program was:" >&5
21765 sed 's/^/| /' conftest.$ac_ext >&5
21766
21767         eval "$as_ac_var=no"
21768 fi
21769
21770 rm -rf conftest.dSYM
21771 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21772       conftest$ac_exeext conftest.$ac_ext
21773 fi
21774 ac_res=`eval 'as_val=${'$as_ac_var'}
21775                  $as_echo "$as_val"'`
21776                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21777 $as_echo "$ac_res" >&6; }
21778 as_val=`eval 'as_val=${'$as_ac_var'}
21779                  $as_echo "$as_val"'`
21780    if test "x$as_val" = x""yes; then
21781   cat >>confdefs.h <<_ACEOF
21782 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21783 _ACEOF
21784  break
21785 fi
21786 done
21787
21788
21789
21790 for ac_func in strtoull strtouq
21791 do
21792 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21793 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21794 $as_echo_n "checking for $ac_func... " >&6; }
21795 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21796   $as_echo_n "(cached) " >&6
21797 else
21798   cat >conftest.$ac_ext <<_ACEOF
21799 /* confdefs.h.  */
21800 _ACEOF
21801 cat confdefs.h >>conftest.$ac_ext
21802 cat >>conftest.$ac_ext <<_ACEOF
21803 /* end confdefs.h.  */
21804 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21805    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21806 #define $ac_func innocuous_$ac_func
21807
21808 /* System header to define __stub macros and hopefully few prototypes,
21809     which can conflict with char $ac_func (); below.
21810     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21811     <limits.h> exists even on freestanding compilers.  */
21812
21813 #ifdef __STDC__
21814 # include <limits.h>
21815 #else
21816 # include <assert.h>
21817 #endif
21818
21819 #undef $ac_func
21820
21821 /* Override any GCC internal prototype to avoid an error.
21822    Use char because int might match the return type of a GCC
21823    builtin and then its argument prototype would still apply.  */
21824 #ifdef __cplusplus
21825 extern "C"
21826 #endif
21827 char $ac_func ();
21828 /* The GNU C library defines this for functions which it implements
21829     to always fail with ENOSYS.  Some functions are actually named
21830     something starting with __ and the normal name is an alias.  */
21831 #if defined __stub_$ac_func || defined __stub___$ac_func
21832 choke me
21833 #endif
21834
21835 int
21836 main ()
21837 {
21838 return $ac_func ();
21839   ;
21840   return 0;
21841 }
21842 _ACEOF
21843 rm -f conftest.$ac_objext conftest$ac_exeext
21844 if { (ac_try="$ac_link"
21845 case "(($ac_try" in
21846   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21847   *) ac_try_echo=$ac_try;;
21848 esac
21849 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21850 $as_echo "$ac_try_echo") >&5
21851   (eval "$ac_link") 2>conftest.er1
21852   ac_status=$?
21853   grep -v '^ *+' conftest.er1 >conftest.err
21854   rm -f conftest.er1
21855   cat conftest.err >&5
21856   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21857   (exit $ac_status); } && {
21858          test -z "$ac_c_werror_flag" ||
21859          test ! -s conftest.err
21860        } && test -s conftest$ac_exeext && {
21861          test "$cross_compiling" = yes ||
21862          $as_test_x conftest$ac_exeext
21863        }; then
21864   eval "$as_ac_var=yes"
21865 else
21866   $as_echo "$as_me: failed program was:" >&5
21867 sed 's/^/| /' conftest.$ac_ext >&5
21868
21869         eval "$as_ac_var=no"
21870 fi
21871
21872 rm -rf conftest.dSYM
21873 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21874       conftest$ac_exeext conftest.$ac_ext
21875 fi
21876 ac_res=`eval 'as_val=${'$as_ac_var'}
21877                  $as_echo "$as_val"'`
21878                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21879 $as_echo "$ac_res" >&6; }
21880 as_val=`eval 'as_val=${'$as_ac_var'}
21881                  $as_echo "$as_val"'`
21882    if test "x$as_val" = x""yes; then
21883   cat >>confdefs.h <<_ACEOF
21884 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21885 _ACEOF
21886  break
21887 fi
21888 done
21889
21890
21891 # Check for one of atexit() or on_exit()
21892
21893 for ac_func in atexit
21894 do
21895 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21896 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21897 $as_echo_n "checking for $ac_func... " >&6; }
21898 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21899   $as_echo_n "(cached) " >&6
21900 else
21901   cat >conftest.$ac_ext <<_ACEOF
21902 /* confdefs.h.  */
21903 _ACEOF
21904 cat confdefs.h >>conftest.$ac_ext
21905 cat >>conftest.$ac_ext <<_ACEOF
21906 /* end confdefs.h.  */
21907 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21908    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21909 #define $ac_func innocuous_$ac_func
21910
21911 /* System header to define __stub macros and hopefully few prototypes,
21912     which can conflict with char $ac_func (); below.
21913     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21914     <limits.h> exists even on freestanding compilers.  */
21915
21916 #ifdef __STDC__
21917 # include <limits.h>
21918 #else
21919 # include <assert.h>
21920 #endif
21921
21922 #undef $ac_func
21923
21924 /* Override any GCC internal prototype to avoid an error.
21925    Use char because int might match the return type of a GCC
21926    builtin and then its argument prototype would still apply.  */
21927 #ifdef __cplusplus
21928 extern "C"
21929 #endif
21930 char $ac_func ();
21931 /* The GNU C library defines this for functions which it implements
21932     to always fail with ENOSYS.  Some functions are actually named
21933     something starting with __ and the normal name is an alias.  */
21934 #if defined __stub_$ac_func || defined __stub___$ac_func
21935 choke me
21936 #endif
21937
21938 int
21939 main ()
21940 {
21941 return $ac_func ();
21942   ;
21943   return 0;
21944 }
21945 _ACEOF
21946 rm -f conftest.$ac_objext conftest$ac_exeext
21947 if { (ac_try="$ac_link"
21948 case "(($ac_try" in
21949   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21950   *) ac_try_echo=$ac_try;;
21951 esac
21952 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21953 $as_echo "$ac_try_echo") >&5
21954   (eval "$ac_link") 2>conftest.er1
21955   ac_status=$?
21956   grep -v '^ *+' conftest.er1 >conftest.err
21957   rm -f conftest.er1
21958   cat conftest.err >&5
21959   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21960   (exit $ac_status); } && {
21961          test -z "$ac_c_werror_flag" ||
21962          test ! -s conftest.err
21963        } && test -s conftest$ac_exeext && {
21964          test "$cross_compiling" = yes ||
21965          $as_test_x conftest$ac_exeext
21966        }; then
21967   eval "$as_ac_var=yes"
21968 else
21969   $as_echo "$as_me: failed program was:" >&5
21970 sed 's/^/| /' conftest.$ac_ext >&5
21971
21972         eval "$as_ac_var=no"
21973 fi
21974
21975 rm -rf conftest.dSYM
21976 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21977       conftest$ac_exeext conftest.$ac_ext
21978 fi
21979 ac_res=`eval 'as_val=${'$as_ac_var'}
21980                  $as_echo "$as_val"'`
21981                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21982 $as_echo "$ac_res" >&6; }
21983 as_val=`eval 'as_val=${'$as_ac_var'}
21984                  $as_echo "$as_val"'`
21985    if test "x$as_val" = x""yes; then
21986   cat >>confdefs.h <<_ACEOF
21987 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21988 _ACEOF
21989
21990 else
21991
21992 for ac_func in on_exit
21993 do
21994 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21995 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21996 $as_echo_n "checking for $ac_func... " >&6; }
21997 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21998   $as_echo_n "(cached) " >&6
21999 else
22000   cat >conftest.$ac_ext <<_ACEOF
22001 /* confdefs.h.  */
22002 _ACEOF
22003 cat confdefs.h >>conftest.$ac_ext
22004 cat >>conftest.$ac_ext <<_ACEOF
22005 /* end confdefs.h.  */
22006 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22007    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
22008 #define $ac_func innocuous_$ac_func
22009
22010 /* System header to define __stub macros and hopefully few prototypes,
22011     which can conflict with char $ac_func (); below.
22012     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22013     <limits.h> exists even on freestanding compilers.  */
22014
22015 #ifdef __STDC__
22016 # include <limits.h>
22017 #else
22018 # include <assert.h>
22019 #endif
22020
22021 #undef $ac_func
22022
22023 /* Override any GCC internal prototype to avoid an error.
22024    Use char because int might match the return type of a GCC
22025    builtin and then its argument prototype would still apply.  */
22026 #ifdef __cplusplus
22027 extern "C"
22028 #endif
22029 char $ac_func ();
22030 /* The GNU C library defines this for functions which it implements
22031     to always fail with ENOSYS.  Some functions are actually named
22032     something starting with __ and the normal name is an alias.  */
22033 #if defined __stub_$ac_func || defined __stub___$ac_func
22034 choke me
22035 #endif
22036
22037 int
22038 main ()
22039 {
22040 return $ac_func ();
22041   ;
22042   return 0;
22043 }
22044 _ACEOF
22045 rm -f conftest.$ac_objext conftest$ac_exeext
22046 if { (ac_try="$ac_link"
22047 case "(($ac_try" in
22048   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22049   *) ac_try_echo=$ac_try;;
22050 esac
22051 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22052 $as_echo "$ac_try_echo") >&5
22053   (eval "$ac_link") 2>conftest.er1
22054   ac_status=$?
22055   grep -v '^ *+' conftest.er1 >conftest.err
22056   rm -f conftest.er1
22057   cat conftest.err >&5
22058   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22059   (exit $ac_status); } && {
22060          test -z "$ac_c_werror_flag" ||
22061          test ! -s conftest.err
22062        } && test -s conftest$ac_exeext && {
22063          test "$cross_compiling" = yes ||
22064          $as_test_x conftest$ac_exeext
22065        }; then
22066   eval "$as_ac_var=yes"
22067 else
22068   $as_echo "$as_me: failed program was:" >&5
22069 sed 's/^/| /' conftest.$ac_ext >&5
22070
22071         eval "$as_ac_var=no"
22072 fi
22073
22074 rm -rf conftest.dSYM
22075 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22076       conftest$ac_exeext conftest.$ac_ext
22077 fi
22078 ac_res=`eval 'as_val=${'$as_ac_var'}
22079                  $as_echo "$as_val"'`
22080                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
22081 $as_echo "$ac_res" >&6; }
22082 as_val=`eval 'as_val=${'$as_ac_var'}
22083                  $as_echo "$as_val"'`
22084    if test "x$as_val" = x""yes; then
22085   cat >>confdefs.h <<_ACEOF
22086 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22087 _ACEOF
22088
22089 else
22090   { { $as_echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
22091 $as_echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
22092    { (exit 1); exit 1; }; }
22093 fi
22094 done
22095
22096 fi
22097 done
22098
22099
22100
22101 #
22102 # Pthreads
22103 #
22104 # For each platform, we need to know about any special compile and link
22105 # libraries, and whether the normal C function names are thread-safe.
22106 # See the comment at the top of src/port/thread.c for more information.
22107 # WIN32 doesn't need the pthread tests;  it always uses threads
22108 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
22109
22110
22111
22112 ac_ext=c
22113 ac_cpp='$CPP $CPPFLAGS'
22114 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22115 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22116 ac_compiler_gnu=$ac_cv_c_compiler_gnu
22117
22118 acx_pthread_ok=no
22119
22120 # We used to check for pthread.h first, but this fails if pthread.h
22121 # requires special compiler flags (e.g. on True64 or Sequent).
22122 # It gets checked for in the link test anyway.
22123
22124 # First of all, check if the user has set any of the PTHREAD_LIBS,
22125 # etcetera environment variables, and if threads linking works using
22126 # them:
22127 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
22128         save_CFLAGS="$CFLAGS"
22129         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
22130         save_LIBS="$LIBS"
22131         LIBS="$PTHREAD_LIBS $LIBS"
22132         { $as_echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
22133 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
22134         cat >conftest.$ac_ext <<_ACEOF
22135 /* confdefs.h.  */
22136 _ACEOF
22137 cat confdefs.h >>conftest.$ac_ext
22138 cat >>conftest.$ac_ext <<_ACEOF
22139 /* end confdefs.h.  */
22140
22141 /* Override any GCC internal prototype to avoid an error.
22142    Use char because int might match the return type of a GCC
22143    builtin and then its argument prototype would still apply.  */
22144 #ifdef __cplusplus
22145 extern "C"
22146 #endif
22147 char pthread_join ();
22148 int
22149 main ()
22150 {
22151 return pthread_join ();
22152   ;
22153   return 0;
22154 }
22155 _ACEOF
22156 rm -f conftest.$ac_objext conftest$ac_exeext
22157 if { (ac_try="$ac_link"
22158 case "(($ac_try" in
22159   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22160   *) ac_try_echo=$ac_try;;
22161 esac
22162 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22163 $as_echo "$ac_try_echo") >&5
22164   (eval "$ac_link") 2>conftest.er1
22165   ac_status=$?
22166   grep -v '^ *+' conftest.er1 >conftest.err
22167   rm -f conftest.er1
22168   cat conftest.err >&5
22169   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22170   (exit $ac_status); } && {
22171          test -z "$ac_c_werror_flag" ||
22172          test ! -s conftest.err
22173        } && test -s conftest$ac_exeext && {
22174          test "$cross_compiling" = yes ||
22175          $as_test_x conftest$ac_exeext
22176        }; then
22177   acx_pthread_ok=yes
22178 else
22179   $as_echo "$as_me: failed program was:" >&5
22180 sed 's/^/| /' conftest.$ac_ext >&5
22181
22182
22183 fi
22184
22185 rm -rf conftest.dSYM
22186 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22187       conftest$ac_exeext conftest.$ac_ext
22188         { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
22189 $as_echo "$acx_pthread_ok" >&6; }
22190         if test x"$acx_pthread_ok" = xno; then
22191                 PTHREAD_LIBS=""
22192                 PTHREAD_CFLAGS=""
22193         fi
22194         LIBS="$save_LIBS"
22195         CFLAGS="$save_CFLAGS"
22196 fi
22197
22198 # We must check for the threads library under a number of different
22199 # names; the ordering is very important because some systems
22200 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
22201 # libraries is broken (non-POSIX).
22202
22203 # Create a list of thread flags to try.  Items starting with a "-" are
22204 # C compiler flags, and other items are library names, except for "none"
22205 # which indicates that we try without any flags at all, and "pthread-config"
22206 # which is a program returning the flags for the Pth emulation library.
22207
22208 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
22209
22210 # The ordering *is* (sometimes) important.  Some notes on the
22211 # individual items follow:
22212
22213 # pthreads: AIX (must check this before -lpthread)
22214 # none: in case threads are in libc; should be tried before -Kthread and
22215 #       other compiler flags to prevent continual compiler warnings
22216 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
22217 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
22218 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
22219 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
22220 # -pthreads: Solaris/gcc
22221 # -mthreads: Mingw32/gcc, Lynx/gcc
22222 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
22223 #      doesn't hurt to check since this sometimes defines pthreads too;
22224 #      also defines -D_REENTRANT)
22225 # pthread: Linux, etcetera
22226 # --thread-safe: KAI C++
22227 # pthread-config: use pthread-config program (for GNU Pth library)
22228
22229 case "${host_cpu}-${host_os}" in
22230         *solaris*)
22231
22232         # On Solaris (at least, for some versions), libc contains stubbed
22233         # (non-functional) versions of the pthreads routines, so link-based
22234         # tests will erroneously succeed.  (We need to link with -pthread or
22235         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
22236         # a function called by this macro, so we could check for that, but
22237         # who knows whether they'll stub that too in a future libc.)  So,
22238         # we'll just look for -pthreads and -lpthread first:
22239
22240         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
22241         ;;
22242 esac
22243
22244 if test x"$acx_pthread_ok" = xno; then
22245 for flag in $acx_pthread_flags; do
22246
22247         tryPTHREAD_CFLAGS=""
22248         tryPTHREAD_LIBS=""
22249         case $flag in
22250                 none)
22251                 { $as_echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
22252 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
22253                 ;;
22254
22255                 -*)
22256                 { $as_echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
22257 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
22258                 tryPTHREAD_CFLAGS="$flag"
22259                 ;;
22260
22261                 pthread-config)
22262                 # skip this if we already have flags defined, for PostgreSQL
22263                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
22264                 # Extract the first word of "pthread-config", so it can be a program name with args.
22265 set dummy pthread-config; ac_word=$2
22266 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
22267 $as_echo_n "checking for $ac_word... " >&6; }
22268 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
22269   $as_echo_n "(cached) " >&6
22270 else
22271   if test -n "$acx_pthread_config"; then
22272   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
22273 else
22274 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22275 for as_dir in $PATH
22276 do
22277   IFS=$as_save_IFS
22278   test -z "$as_dir" && as_dir=.
22279   for ac_exec_ext in '' $ac_executable_extensions; do
22280   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22281     ac_cv_prog_acx_pthread_config="yes"
22282     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22283     break 2
22284   fi
22285 done
22286 done
22287 IFS=$as_save_IFS
22288
22289   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
22290 fi
22291 fi
22292 acx_pthread_config=$ac_cv_prog_acx_pthread_config
22293 if test -n "$acx_pthread_config"; then
22294   { $as_echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
22295 $as_echo "$acx_pthread_config" >&6; }
22296 else
22297   { $as_echo "$as_me:$LINENO: result: no" >&5
22298 $as_echo "no" >&6; }
22299 fi
22300
22301
22302                 if test x"$acx_pthread_config" = xno; then continue; fi
22303                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
22304                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
22305                 ;;
22306
22307                 *)
22308                 { $as_echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
22309 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
22310                 tryPTHREAD_LIBS="-l$flag"
22311                 ;;
22312         esac
22313
22314         save_LIBS="$LIBS"
22315         save_CFLAGS="$CFLAGS"
22316         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
22317         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
22318
22319         # Check for various functions.  We must include pthread.h,
22320         # since some functions may be macros.  (On the Sequent, we
22321         # need a special flag -Kthread to make this header compile.)
22322         # We check for pthread_join because it is in -lpthread on IRIX
22323         # while pthread_create is in libc.  We check for pthread_attr_init
22324         # due to DEC craziness with -lpthreads.  We check for
22325         # pthread_cleanup_push because it is one of the few pthread
22326         # functions on Solaris that doesn't have a non-functional libc stub.
22327         # We try pthread_create on general principles.
22328         cat >conftest.$ac_ext <<_ACEOF
22329 /* confdefs.h.  */
22330 _ACEOF
22331 cat confdefs.h >>conftest.$ac_ext
22332 cat >>conftest.$ac_ext <<_ACEOF
22333 /* end confdefs.h.  */
22334 #include <pthread.h>
22335 int
22336 main ()
22337 {
22338 pthread_t th; pthread_join(th, 0);
22339                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
22340                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
22341   ;
22342   return 0;
22343 }
22344 _ACEOF
22345 rm -f conftest.$ac_objext conftest$ac_exeext
22346 if { (ac_try="$ac_link"
22347 case "(($ac_try" in
22348   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22349   *) ac_try_echo=$ac_try;;
22350 esac
22351 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22352 $as_echo "$ac_try_echo") >&5
22353   (eval "$ac_link") 2>conftest.er1
22354   ac_status=$?
22355   grep -v '^ *+' conftest.er1 >conftest.err
22356   rm -f conftest.er1
22357   cat conftest.err >&5
22358   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22359   (exit $ac_status); } && {
22360          test -z "$ac_c_werror_flag" ||
22361          test ! -s conftest.err
22362        } && test -s conftest$ac_exeext && {
22363          test "$cross_compiling" = yes ||
22364          $as_test_x conftest$ac_exeext
22365        }; then
22366   acx_pthread_ok=yes
22367 else
22368   $as_echo "$as_me: failed program was:" >&5
22369 sed 's/^/| /' conftest.$ac_ext >&5
22370
22371         acx_pthread_ok=no
22372 fi
22373
22374 rm -rf conftest.dSYM
22375 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22376       conftest$ac_exeext conftest.$ac_ext
22377
22378         if test "x$acx_pthread_ok" = xyes; then
22379             # Don't use options that are ignored by the compiler.
22380             # We find them by checking stderror.
22381             cat >conftest.$ac_ext <<_ACEOF
22382 int
22383 main (int argc, char **argv)
22384 {
22385   (void) argc;
22386   (void) argv;
22387   return 0;
22388 }
22389 _ACEOF
22390             rm -f conftest.$ac_objext conftest$ac_exeext
22391             if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
22392                 # we continue with more flags because Linux needs -lpthread
22393                 # for libpq builds on PostgreSQL.  The test above only
22394                 # tests for building binaries, not shared libraries.
22395                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
22396                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
22397             else   acx_pthread_ok=no
22398             fi
22399         fi
22400
22401         LIBS="$save_LIBS"
22402         CFLAGS="$save_CFLAGS"
22403
22404         { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
22405 $as_echo "$acx_pthread_ok" >&6; }
22406 done
22407 fi
22408
22409 # Various other checks:
22410 if test "x$acx_pthread_ok" = xyes; then
22411         save_LIBS="$LIBS"
22412         LIBS="$PTHREAD_LIBS $LIBS"
22413         save_CFLAGS="$CFLAGS"
22414         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
22415
22416         # Detect AIX lossage: threads are created detached by default
22417         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
22418         { $as_echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
22419 $as_echo_n "checking for joinable pthread attribute... " >&6; }
22420         cat >conftest.$ac_ext <<_ACEOF
22421 /* confdefs.h.  */
22422 _ACEOF
22423 cat confdefs.h >>conftest.$ac_ext
22424 cat >>conftest.$ac_ext <<_ACEOF
22425 /* end confdefs.h.  */
22426 #include <pthread.h>
22427 int
22428 main ()
22429 {
22430 int attr=PTHREAD_CREATE_JOINABLE;
22431   ;
22432   return 0;
22433 }
22434 _ACEOF
22435 rm -f conftest.$ac_objext conftest$ac_exeext
22436 if { (ac_try="$ac_link"
22437 case "(($ac_try" in
22438   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22439   *) ac_try_echo=$ac_try;;
22440 esac
22441 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22442 $as_echo "$ac_try_echo") >&5
22443   (eval "$ac_link") 2>conftest.er1
22444   ac_status=$?
22445   grep -v '^ *+' conftest.er1 >conftest.err
22446   rm -f conftest.er1
22447   cat conftest.err >&5
22448   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22449   (exit $ac_status); } && {
22450          test -z "$ac_c_werror_flag" ||
22451          test ! -s conftest.err
22452        } && test -s conftest$ac_exeext && {
22453          test "$cross_compiling" = yes ||
22454          $as_test_x conftest$ac_exeext
22455        }; then
22456   ok=PTHREAD_CREATE_JOINABLE
22457 else
22458   $as_echo "$as_me: failed program was:" >&5
22459 sed 's/^/| /' conftest.$ac_ext >&5
22460
22461         ok=unknown
22462 fi
22463
22464 rm -rf conftest.dSYM
22465 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22466       conftest$ac_exeext conftest.$ac_ext
22467         if test x"$ok" = xunknown; then
22468                 cat >conftest.$ac_ext <<_ACEOF
22469 /* confdefs.h.  */
22470 _ACEOF
22471 cat confdefs.h >>conftest.$ac_ext
22472 cat >>conftest.$ac_ext <<_ACEOF
22473 /* end confdefs.h.  */
22474 #include <pthread.h>
22475 int
22476 main ()
22477 {
22478 int attr=PTHREAD_CREATE_UNDETACHED;
22479   ;
22480   return 0;
22481 }
22482 _ACEOF
22483 rm -f conftest.$ac_objext conftest$ac_exeext
22484 if { (ac_try="$ac_link"
22485 case "(($ac_try" in
22486   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22487   *) ac_try_echo=$ac_try;;
22488 esac
22489 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22490 $as_echo "$ac_try_echo") >&5
22491   (eval "$ac_link") 2>conftest.er1
22492   ac_status=$?
22493   grep -v '^ *+' conftest.er1 >conftest.err
22494   rm -f conftest.er1
22495   cat conftest.err >&5
22496   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22497   (exit $ac_status); } && {
22498          test -z "$ac_c_werror_flag" ||
22499          test ! -s conftest.err
22500        } && test -s conftest$ac_exeext && {
22501          test "$cross_compiling" = yes ||
22502          $as_test_x conftest$ac_exeext
22503        }; then
22504   ok=PTHREAD_CREATE_UNDETACHED
22505 else
22506   $as_echo "$as_me: failed program was:" >&5
22507 sed 's/^/| /' conftest.$ac_ext >&5
22508
22509         ok=unknown
22510 fi
22511
22512 rm -rf conftest.dSYM
22513 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22514       conftest$ac_exeext conftest.$ac_ext
22515         fi
22516         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
22517
22518 cat >>confdefs.h <<\_ACEOF
22519 #define PTHREAD_CREATE_JOINABLE $ok
22520 _ACEOF
22521
22522         fi
22523         { $as_echo "$as_me:$LINENO: result: ${ok}" >&5
22524 $as_echo "${ok}" >&6; }
22525         if test x"$ok" = xunknown; then
22526                 { $as_echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
22527 $as_echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
22528         fi
22529
22530         { $as_echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
22531 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
22532         flag=no
22533 # We always add these in PostgreSQL
22534 #       case "${host_cpu}-${host_os}" in
22535 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
22536 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
22537 #       esac
22538         { $as_echo "$as_me:$LINENO: result: ${flag}" >&5
22539 $as_echo "${flag}" >&6; }
22540         if test "x$flag" != xno; then
22541                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
22542         fi
22543
22544         LIBS="$save_LIBS"
22545         CFLAGS="$save_CFLAGS"
22546
22547 # Supporting cc_r would require a special CC in all places that
22548 # use libpq, and that is ugly, so we don't do it.  Users can still
22549 # define their compiler as cc_r to do thread builds of everything.
22550         # More AIX lossage: must compile with cc_r
22551         # Extract the first word of "cc_r", so it can be a program name with args.
22552 set dummy cc_r; ac_word=$2
22553 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
22554 $as_echo_n "checking for $ac_word... " >&6; }
22555 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
22556   $as_echo_n "(cached) " >&6
22557 else
22558   if test -n "$PTHREAD_CC"; then
22559   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
22560 else
22561 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22562 for as_dir in $PATH
22563 do
22564   IFS=$as_save_IFS
22565   test -z "$as_dir" && as_dir=.
22566   for ac_exec_ext in '' $ac_executable_extensions; do
22567   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22568     ac_cv_prog_PTHREAD_CC="cc_r"
22569     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22570     break 2
22571   fi
22572 done
22573 done
22574 IFS=$as_save_IFS
22575
22576   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
22577 fi
22578 fi
22579 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
22580 if test -n "$PTHREAD_CC"; then
22581   { $as_echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
22582 $as_echo "$PTHREAD_CC" >&6; }
22583 else
22584   { $as_echo "$as_me:$LINENO: result: no" >&5
22585 $as_echo "no" >&6; }
22586 fi
22587
22588
22589 else
22590         PTHREAD_CC="$CC"
22591 fi
22592
22593
22594
22595
22596
22597 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
22598 if test x"$acx_pthread_ok" = xyes; then
22599
22600 cat >>confdefs.h <<\_ACEOF
22601 #define HAVE_PTHREAD 1
22602 _ACEOF
22603
22604         :
22605 else
22606         acx_pthread_ok=no
22607
22608 fi
22609 ac_ext=c
22610 ac_cpp='$CPP $CPPFLAGS'
22611 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22612 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22613 ac_compiler_gnu=$ac_cv_c_compiler_gnu
22614
22615         # set thread flags
22616
22617 # Some platforms use these, so just define them.  They can't hurt if they
22618 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
22619 # enables 5-arg getpwuid_r, among other things.
22620 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
22621
22622
22623 # At this point, we don't want to muck with the compiler name for threading.
22624 # Let's see who fails, perhaps AIX.  2004-04-23
22625 if test "$PTHREAD_CC" != "$CC"; then
22626 { { $as_echo "$as_me:$LINENO: error:
22627 PostgreSQL does not support platforms that require a special compiler
22628 for thread safety;  use --disable-thread-safety to disable thread safety." >&5
22629 $as_echo "$as_me: error:
22630 PostgreSQL does not support platforms that require a special compiler
22631 for thread safety;  use --disable-thread-safety to disable thread safety." >&2;}
22632    { (exit 1); exit 1; }; }
22633 fi
22634
22635 # Check for *_r functions
22636 _CFLAGS="$CFLAGS"
22637 _LIBS="$LIBS"
22638 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
22639 LIBS="$LIBS $PTHREAD_LIBS"
22640
22641 if test "$PORTNAME" != "win32"; then
22642 if test "${ac_cv_header_pthread_h+set}" = set; then
22643   { $as_echo "$as_me:$LINENO: checking for pthread.h" >&5
22644 $as_echo_n "checking for pthread.h... " >&6; }
22645 if test "${ac_cv_header_pthread_h+set}" = set; then
22646   $as_echo_n "(cached) " >&6
22647 fi
22648 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
22649 $as_echo "$ac_cv_header_pthread_h" >&6; }
22650 else
22651   # Is the header compilable?
22652 { $as_echo "$as_me:$LINENO: checking pthread.h usability" >&5
22653 $as_echo_n "checking pthread.h usability... " >&6; }
22654 cat >conftest.$ac_ext <<_ACEOF
22655 /* confdefs.h.  */
22656 _ACEOF
22657 cat confdefs.h >>conftest.$ac_ext
22658 cat >>conftest.$ac_ext <<_ACEOF
22659 /* end confdefs.h.  */
22660 $ac_includes_default
22661 #include <pthread.h>
22662 _ACEOF
22663 rm -f conftest.$ac_objext
22664 if { (ac_try="$ac_compile"
22665 case "(($ac_try" in
22666   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22667   *) ac_try_echo=$ac_try;;
22668 esac
22669 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22670 $as_echo "$ac_try_echo") >&5
22671   (eval "$ac_compile") 2>conftest.er1
22672   ac_status=$?
22673   grep -v '^ *+' conftest.er1 >conftest.err
22674   rm -f conftest.er1
22675   cat conftest.err >&5
22676   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22677   (exit $ac_status); } && {
22678          test -z "$ac_c_werror_flag" ||
22679          test ! -s conftest.err
22680        } && test -s conftest.$ac_objext; then
22681   ac_header_compiler=yes
22682 else
22683   $as_echo "$as_me: failed program was:" >&5
22684 sed 's/^/| /' conftest.$ac_ext >&5
22685
22686         ac_header_compiler=no
22687 fi
22688
22689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22690 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22691 $as_echo "$ac_header_compiler" >&6; }
22692
22693 # Is the header present?
22694 { $as_echo "$as_me:$LINENO: checking pthread.h presence" >&5
22695 $as_echo_n "checking pthread.h presence... " >&6; }
22696 cat >conftest.$ac_ext <<_ACEOF
22697 /* confdefs.h.  */
22698 _ACEOF
22699 cat confdefs.h >>conftest.$ac_ext
22700 cat >>conftest.$ac_ext <<_ACEOF
22701 /* end confdefs.h.  */
22702 #include <pthread.h>
22703 _ACEOF
22704 if { (ac_try="$ac_cpp conftest.$ac_ext"
22705 case "(($ac_try" in
22706   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22707   *) ac_try_echo=$ac_try;;
22708 esac
22709 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22710 $as_echo "$ac_try_echo") >&5
22711   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
22712   ac_status=$?
22713   grep -v '^ *+' conftest.er1 >conftest.err
22714   rm -f conftest.er1
22715   cat conftest.err >&5
22716   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22717   (exit $ac_status); } >/dev/null && {
22718          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22719          test ! -s conftest.err
22720        }; then
22721   ac_header_preproc=yes
22722 else
22723   $as_echo "$as_me: failed program was:" >&5
22724 sed 's/^/| /' conftest.$ac_ext >&5
22725
22726   ac_header_preproc=no
22727 fi
22728
22729 rm -f conftest.err conftest.$ac_ext
22730 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22731 $as_echo "$ac_header_preproc" >&6; }
22732
22733 # So?  What about this header?
22734 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22735   yes:no: )
22736     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
22737 $as_echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22738     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
22739 $as_echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
22740     ac_header_preproc=yes
22741     ;;
22742   no:yes:* )
22743     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
22744 $as_echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
22745     { $as_echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
22746 $as_echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
22747     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
22748 $as_echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
22749     { $as_echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
22750 $as_echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22751     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
22752 $as_echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
22753     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
22754 $as_echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
22755     ( cat <<\_ASBOX
22756 ## ---------------------------------------- ##
22757 ## Report this to pgsql-bugs@postgresql.org ##
22758 ## ---------------------------------------- ##
22759 _ASBOX
22760      ) | sed "s/^/$as_me: WARNING:     /" >&2
22761     ;;
22762 esac
22763 { $as_echo "$as_me:$LINENO: checking for pthread.h" >&5
22764 $as_echo_n "checking for pthread.h... " >&6; }
22765 if test "${ac_cv_header_pthread_h+set}" = set; then
22766   $as_echo_n "(cached) " >&6
22767 else
22768   ac_cv_header_pthread_h=$ac_header_preproc
22769 fi
22770 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
22771 $as_echo "$ac_cv_header_pthread_h" >&6; }
22772
22773 fi
22774 if test "x$ac_cv_header_pthread_h" = x""yes; then
22775   :
22776 else
22777   { { $as_echo "$as_me:$LINENO: error:
22778 pthread.h not found;  use --disable-thread-safety to disable thread safety" >&5
22779 $as_echo "$as_me: error:
22780 pthread.h not found;  use --disable-thread-safety to disable thread safety" >&2;}
22781    { (exit 1); exit 1; }; }
22782 fi
22783
22784
22785 fi
22786
22787
22788
22789
22790 for ac_func in strerror_r getpwuid_r gethostbyname_r
22791 do
22792 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22793 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
22794 $as_echo_n "checking for $ac_func... " >&6; }
22795 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
22796   $as_echo_n "(cached) " >&6
22797 else
22798   cat >conftest.$ac_ext <<_ACEOF
22799 /* confdefs.h.  */
22800 _ACEOF
22801 cat confdefs.h >>conftest.$ac_ext
22802 cat >>conftest.$ac_ext <<_ACEOF
22803 /* end confdefs.h.  */
22804 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22805    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
22806 #define $ac_func innocuous_$ac_func
22807
22808 /* System header to define __stub macros and hopefully few prototypes,
22809     which can conflict with char $ac_func (); below.
22810     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22811     <limits.h> exists even on freestanding compilers.  */
22812
22813 #ifdef __STDC__
22814 # include <limits.h>
22815 #else
22816 # include <assert.h>
22817 #endif
22818
22819 #undef $ac_func
22820
22821 /* Override any GCC internal prototype to avoid an error.
22822    Use char because int might match the return type of a GCC
22823    builtin and then its argument prototype would still apply.  */
22824 #ifdef __cplusplus
22825 extern "C"
22826 #endif
22827 char $ac_func ();
22828 /* The GNU C library defines this for functions which it implements
22829     to always fail with ENOSYS.  Some functions are actually named
22830     something starting with __ and the normal name is an alias.  */
22831 #if defined __stub_$ac_func || defined __stub___$ac_func
22832 choke me
22833 #endif
22834
22835 int
22836 main ()
22837 {
22838 return $ac_func ();
22839   ;
22840   return 0;
22841 }
22842 _ACEOF
22843 rm -f conftest.$ac_objext conftest$ac_exeext
22844 if { (ac_try="$ac_link"
22845 case "(($ac_try" in
22846   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22847   *) ac_try_echo=$ac_try;;
22848 esac
22849 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22850 $as_echo "$ac_try_echo") >&5
22851   (eval "$ac_link") 2>conftest.er1
22852   ac_status=$?
22853   grep -v '^ *+' conftest.er1 >conftest.err
22854   rm -f conftest.er1
22855   cat conftest.err >&5
22856   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22857   (exit $ac_status); } && {
22858          test -z "$ac_c_werror_flag" ||
22859          test ! -s conftest.err
22860        } && test -s conftest$ac_exeext && {
22861          test "$cross_compiling" = yes ||
22862          $as_test_x conftest$ac_exeext
22863        }; then
22864   eval "$as_ac_var=yes"
22865 else
22866   $as_echo "$as_me: failed program was:" >&5
22867 sed 's/^/| /' conftest.$ac_ext >&5
22868
22869         eval "$as_ac_var=no"
22870 fi
22871
22872 rm -rf conftest.dSYM
22873 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22874       conftest$ac_exeext conftest.$ac_ext
22875 fi
22876 ac_res=`eval 'as_val=${'$as_ac_var'}
22877                  $as_echo "$as_val"'`
22878                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
22879 $as_echo "$ac_res" >&6; }
22880 as_val=`eval 'as_val=${'$as_ac_var'}
22881                  $as_echo "$as_val"'`
22882    if test "x$as_val" = x""yes; then
22883   cat >>confdefs.h <<_ACEOF
22884 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22885 _ACEOF
22886
22887 fi
22888 done
22889
22890
22891 # Do test here with the proper thread flags
22892 { $as_echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
22893 $as_echo_n "checking whether getpwuid_r takes a fifth argument... " >&6; }
22894 if test "${pgac_cv_func_getpwuid_r_5arg+set}" = set; then
22895   $as_echo_n "(cached) " >&6
22896 else
22897   cat >conftest.$ac_ext <<_ACEOF
22898 /* confdefs.h.  */
22899 _ACEOF
22900 cat confdefs.h >>conftest.$ac_ext
22901 cat >>conftest.$ac_ext <<_ACEOF
22902 /* end confdefs.h.  */
22903 #include <sys/types.h>
22904 #include <pwd.h>
22905 int
22906 main ()
22907 {
22908 uid_t uid;
22909 struct passwd *space;
22910 char *buf;
22911 size_t bufsize;
22912 struct passwd **result;
22913 getpwuid_r(uid, space, buf, bufsize, result);
22914   ;
22915   return 0;
22916 }
22917 _ACEOF
22918 rm -f conftest.$ac_objext
22919 if { (ac_try="$ac_compile"
22920 case "(($ac_try" in
22921   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22922   *) ac_try_echo=$ac_try;;
22923 esac
22924 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22925 $as_echo "$ac_try_echo") >&5
22926   (eval "$ac_compile") 2>conftest.er1
22927   ac_status=$?
22928   grep -v '^ *+' conftest.er1 >conftest.err
22929   rm -f conftest.er1
22930   cat conftest.err >&5
22931   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22932   (exit $ac_status); } && {
22933          test -z "$ac_c_werror_flag" ||
22934          test ! -s conftest.err
22935        } && test -s conftest.$ac_objext; then
22936   pgac_cv_func_getpwuid_r_5arg=yes
22937 else
22938   $as_echo "$as_me: failed program was:" >&5
22939 sed 's/^/| /' conftest.$ac_ext >&5
22940
22941         pgac_cv_func_getpwuid_r_5arg=no
22942 fi
22943
22944 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22945 fi
22946 { $as_echo "$as_me:$LINENO: result: $pgac_cv_func_getpwuid_r_5arg" >&5
22947 $as_echo "$pgac_cv_func_getpwuid_r_5arg" >&6; }
22948 if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
22949
22950 cat >>confdefs.h <<\_ACEOF
22951 #define GETPWUID_R_5ARG /**/
22952 _ACEOF
22953
22954 fi
22955
22956 { $as_echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
22957 $as_echo_n "checking whether strerror_r returns int... " >&6; }
22958 if test "${pgac_cv_func_strerror_r_int+set}" = set; then
22959   $as_echo_n "(cached) " >&6
22960 else
22961   cat >conftest.$ac_ext <<_ACEOF
22962 /* confdefs.h.  */
22963 _ACEOF
22964 cat confdefs.h >>conftest.$ac_ext
22965 cat >>conftest.$ac_ext <<_ACEOF
22966 /* end confdefs.h.  */
22967 #include <string.h>
22968 int
22969 main ()
22970 {
22971 #ifndef _AIX
22972 int strerror_r(int, char *, size_t);
22973 #else
22974 /* Older AIX has 'int' for the third argument so we don't test the args. */
22975 int strerror_r();
22976 #endif
22977   ;
22978   return 0;
22979 }
22980 _ACEOF
22981 rm -f conftest.$ac_objext
22982 if { (ac_try="$ac_compile"
22983 case "(($ac_try" in
22984   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22985   *) ac_try_echo=$ac_try;;
22986 esac
22987 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22988 $as_echo "$ac_try_echo") >&5
22989   (eval "$ac_compile") 2>conftest.er1
22990   ac_status=$?
22991   grep -v '^ *+' conftest.er1 >conftest.err
22992   rm -f conftest.er1
22993   cat conftest.err >&5
22994   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22995   (exit $ac_status); } && {
22996          test -z "$ac_c_werror_flag" ||
22997          test ! -s conftest.err
22998        } && test -s conftest.$ac_objext; then
22999   pgac_cv_func_strerror_r_int=yes
23000 else
23001   $as_echo "$as_me: failed program was:" >&5
23002 sed 's/^/| /' conftest.$ac_ext >&5
23003
23004         pgac_cv_func_strerror_r_int=no
23005 fi
23006
23007 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23008 fi
23009 { $as_echo "$as_me:$LINENO: result: $pgac_cv_func_strerror_r_int" >&5
23010 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
23011 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
23012
23013 cat >>confdefs.h <<\_ACEOF
23014 #define STRERROR_R_INT /**/
23015 _ACEOF
23016
23017 fi
23018
23019
23020 CFLAGS="$_CFLAGS"
23021 LIBS="$_LIBS"
23022
23023 else
23024 # do not use values from template file
23025 PTHREAD_CFLAGS=
23026 PTHREAD_LIBS=
23027 fi
23028
23029
23030
23031
23032
23033 # We can test for libldap_r only after we know PTHREAD_LIBS
23034 if test "$with_ldap" = yes ; then
23035   _LIBS="$LIBS"
23036   if test "$PORTNAME" != "win32"; then
23037
23038 { $as_echo "$as_me:$LINENO: checking for ldap_bind in -lldap" >&5
23039 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
23040 if test "${ac_cv_lib_ldap_ldap_bind+set}" = set; then
23041   $as_echo_n "(cached) " >&6
23042 else
23043   ac_check_lib_save_LIBS=$LIBS
23044 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
23045 cat >conftest.$ac_ext <<_ACEOF
23046 /* confdefs.h.  */
23047 _ACEOF
23048 cat confdefs.h >>conftest.$ac_ext
23049 cat >>conftest.$ac_ext <<_ACEOF
23050 /* end confdefs.h.  */
23051
23052 /* Override any GCC internal prototype to avoid an error.
23053    Use char because int might match the return type of a GCC
23054    builtin and then its argument prototype would still apply.  */
23055 #ifdef __cplusplus
23056 extern "C"
23057 #endif
23058 char ldap_bind ();
23059 int
23060 main ()
23061 {
23062 return ldap_bind ();
23063   ;
23064   return 0;
23065 }
23066 _ACEOF
23067 rm -f conftest.$ac_objext conftest$ac_exeext
23068 if { (ac_try="$ac_link"
23069 case "(($ac_try" in
23070   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23071   *) ac_try_echo=$ac_try;;
23072 esac
23073 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23074 $as_echo "$ac_try_echo") >&5
23075   (eval "$ac_link") 2>conftest.er1
23076   ac_status=$?
23077   grep -v '^ *+' conftest.er1 >conftest.err
23078   rm -f conftest.er1
23079   cat conftest.err >&5
23080   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23081   (exit $ac_status); } && {
23082          test -z "$ac_c_werror_flag" ||
23083          test ! -s conftest.err
23084        } && test -s conftest$ac_exeext && {
23085          test "$cross_compiling" = yes ||
23086          $as_test_x conftest$ac_exeext
23087        }; then
23088   ac_cv_lib_ldap_ldap_bind=yes
23089 else
23090   $as_echo "$as_me: failed program was:" >&5
23091 sed 's/^/| /' conftest.$ac_ext >&5
23092
23093         ac_cv_lib_ldap_ldap_bind=no
23094 fi
23095
23096 rm -rf conftest.dSYM
23097 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23098       conftest$ac_exeext conftest.$ac_ext
23099 LIBS=$ac_check_lib_save_LIBS
23100 fi
23101 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_bind" >&5
23102 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
23103 if test "x$ac_cv_lib_ldap_ldap_bind" = x""yes; then
23104   cat >>confdefs.h <<_ACEOF
23105 #define HAVE_LIBLDAP 1
23106 _ACEOF
23107
23108   LIBS="-lldap $LIBS"
23109
23110 else
23111   { { $as_echo "$as_me:$LINENO: error: library 'ldap' is required for LDAP" >&5
23112 $as_echo "$as_me: error: library 'ldap' is required for LDAP" >&2;}
23113    { (exit 1); exit 1; }; }
23114 fi
23115
23116     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
23117     if test "$enable_thread_safety" = yes; then
23118       # on some platforms ldap_r fails to link without PTHREAD_LIBS
23119
23120 { $as_echo "$as_me:$LINENO: checking for ldap_simple_bind in -lldap_r" >&5
23121 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
23122 if test "${ac_cv_lib_ldap_r_ldap_simple_bind+set}" = set; then
23123   $as_echo_n "(cached) " >&6
23124 else
23125   ac_check_lib_save_LIBS=$LIBS
23126 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
23127 cat >conftest.$ac_ext <<_ACEOF
23128 /* confdefs.h.  */
23129 _ACEOF
23130 cat confdefs.h >>conftest.$ac_ext
23131 cat >>conftest.$ac_ext <<_ACEOF
23132 /* end confdefs.h.  */
23133
23134 /* Override any GCC internal prototype to avoid an error.
23135    Use char because int might match the return type of a GCC
23136    builtin and then its argument prototype would still apply.  */
23137 #ifdef __cplusplus
23138 extern "C"
23139 #endif
23140 char ldap_simple_bind ();
23141 int
23142 main ()
23143 {
23144 return ldap_simple_bind ();
23145   ;
23146   return 0;
23147 }
23148 _ACEOF
23149 rm -f conftest.$ac_objext conftest$ac_exeext
23150 if { (ac_try="$ac_link"
23151 case "(($ac_try" in
23152   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23153   *) ac_try_echo=$ac_try;;
23154 esac
23155 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23156 $as_echo "$ac_try_echo") >&5
23157   (eval "$ac_link") 2>conftest.er1
23158   ac_status=$?
23159   grep -v '^ *+' conftest.er1 >conftest.err
23160   rm -f conftest.er1
23161   cat conftest.err >&5
23162   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23163   (exit $ac_status); } && {
23164          test -z "$ac_c_werror_flag" ||
23165          test ! -s conftest.err
23166        } && test -s conftest$ac_exeext && {
23167          test "$cross_compiling" = yes ||
23168          $as_test_x conftest$ac_exeext
23169        }; then
23170   ac_cv_lib_ldap_r_ldap_simple_bind=yes
23171 else
23172   $as_echo "$as_me: failed program was:" >&5
23173 sed 's/^/| /' conftest.$ac_ext >&5
23174
23175         ac_cv_lib_ldap_r_ldap_simple_bind=no
23176 fi
23177
23178 rm -rf conftest.dSYM
23179 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23180       conftest$ac_exeext conftest.$ac_ext
23181 LIBS=$ac_check_lib_save_LIBS
23182 fi
23183 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
23184 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
23185 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = x""yes; then
23186   cat >>confdefs.h <<_ACEOF
23187 #define HAVE_LIBLDAP_R 1
23188 _ACEOF
23189
23190   LIBS="-lldap_r $LIBS"
23191
23192 else
23193   { { $as_echo "$as_me:$LINENO: error: library 'ldap_r' is required for LDAP" >&5
23194 $as_echo "$as_me: error: library 'ldap_r' is required for LDAP" >&2;}
23195    { (exit 1); exit 1; }; }
23196 fi
23197
23198       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
23199     else
23200       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
23201     fi
23202   else
23203
23204 { $as_echo "$as_me:$LINENO: checking for ldap_bind in -lwldap32" >&5
23205 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
23206 if test "${ac_cv_lib_wldap32_ldap_bind+set}" = set; then
23207   $as_echo_n "(cached) " >&6
23208 else
23209   ac_check_lib_save_LIBS=$LIBS
23210 LIBS="-lwldap32  $LIBS"
23211 cat >conftest.$ac_ext <<_ACEOF
23212 /* confdefs.h.  */
23213 _ACEOF
23214 cat confdefs.h >>conftest.$ac_ext
23215 cat >>conftest.$ac_ext <<_ACEOF
23216 /* end confdefs.h.  */
23217
23218 /* Override any GCC internal prototype to avoid an error.
23219    Use char because int might match the return type of a GCC
23220    builtin and then its argument prototype would still apply.  */
23221 #ifdef __cplusplus
23222 extern "C"
23223 #endif
23224 char ldap_bind ();
23225 int
23226 main ()
23227 {
23228 return ldap_bind ();
23229   ;
23230   return 0;
23231 }
23232 _ACEOF
23233 rm -f conftest.$ac_objext conftest$ac_exeext
23234 if { (ac_try="$ac_link"
23235 case "(($ac_try" in
23236   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23237   *) ac_try_echo=$ac_try;;
23238 esac
23239 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23240 $as_echo "$ac_try_echo") >&5
23241   (eval "$ac_link") 2>conftest.er1
23242   ac_status=$?
23243   grep -v '^ *+' conftest.er1 >conftest.err
23244   rm -f conftest.er1
23245   cat conftest.err >&5
23246   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23247   (exit $ac_status); } && {
23248          test -z "$ac_c_werror_flag" ||
23249          test ! -s conftest.err
23250        } && test -s conftest$ac_exeext && {
23251          test "$cross_compiling" = yes ||
23252          $as_test_x conftest$ac_exeext
23253        }; then
23254   ac_cv_lib_wldap32_ldap_bind=yes
23255 else
23256   $as_echo "$as_me: failed program was:" >&5
23257 sed 's/^/| /' conftest.$ac_ext >&5
23258
23259         ac_cv_lib_wldap32_ldap_bind=no
23260 fi
23261
23262 rm -rf conftest.dSYM
23263 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23264       conftest$ac_exeext conftest.$ac_ext
23265 LIBS=$ac_check_lib_save_LIBS
23266 fi
23267 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_wldap32_ldap_bind" >&5
23268 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
23269 if test "x$ac_cv_lib_wldap32_ldap_bind" = x""yes; then
23270   cat >>confdefs.h <<_ACEOF
23271 #define HAVE_LIBWLDAP32 1
23272 _ACEOF
23273
23274   LIBS="-lwldap32 $LIBS"
23275
23276 else
23277   { { $as_echo "$as_me:$LINENO: error: library 'wldap32' is required for LDAP" >&5
23278 $as_echo "$as_me: error: library 'wldap32' is required for LDAP" >&2;}
23279    { (exit 1); exit 1; }; }
23280 fi
23281
23282     LDAP_LIBS_FE="-lwldap32"
23283     LDAP_LIBS_BE="-lwldap32"
23284   fi
23285   LIBS="$_LIBS"
23286 fi
23287
23288
23289
23290
23291 # This test makes sure that run tests work at all.  Sometimes a shared
23292 # library is found by the linker, but the runtime linker can't find it.
23293 # This check should come after all modifications of compiler or linker
23294 # variables, and before any other run tests.
23295 { $as_echo "$as_me:$LINENO: checking test program" >&5
23296 $as_echo_n "checking test program... " >&6; }
23297 if test "$cross_compiling" = yes; then
23298   { $as_echo "$as_me:$LINENO: result: cross-compiling" >&5
23299 $as_echo "cross-compiling" >&6; }
23300 else
23301   cat >conftest.$ac_ext <<_ACEOF
23302 /* confdefs.h.  */
23303 _ACEOF
23304 cat confdefs.h >>conftest.$ac_ext
23305 cat >>conftest.$ac_ext <<_ACEOF
23306 /* end confdefs.h.  */
23307 int main() { return 0; }
23308 _ACEOF
23309 rm -f conftest$ac_exeext
23310 if { (ac_try="$ac_link"
23311 case "(($ac_try" in
23312   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23313   *) ac_try_echo=$ac_try;;
23314 esac
23315 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23316 $as_echo "$ac_try_echo") >&5
23317   (eval "$ac_link") 2>&5
23318   ac_status=$?
23319   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23320   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23321   { (case "(($ac_try" in
23322   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23323   *) ac_try_echo=$ac_try;;
23324 esac
23325 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23326 $as_echo "$ac_try_echo") >&5
23327   (eval "$ac_try") 2>&5
23328   ac_status=$?
23329   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23330   (exit $ac_status); }; }; then
23331   { $as_echo "$as_me:$LINENO: result: ok" >&5
23332 $as_echo "ok" >&6; }
23333 else
23334   $as_echo "$as_me: program exited with status $ac_status" >&5
23335 $as_echo "$as_me: failed program was:" >&5
23336 sed 's/^/| /' conftest.$ac_ext >&5
23337
23338 ( exit $ac_status )
23339 { $as_echo "$as_me:$LINENO: result: failed" >&5
23340 $as_echo "failed" >&6; }
23341 { { $as_echo "$as_me:$LINENO: error:
23342 Could not execute a simple test program.  This may be a problem
23343 related to locating shared libraries.  Check the file 'config.log'
23344 for the exact reason." >&5
23345 $as_echo "$as_me: error:
23346 Could not execute a simple test program.  This may be a problem
23347 related to locating shared libraries.  Check the file 'config.log'
23348 for the exact reason." >&2;}
23349    { (exit 1); exit 1; }; }
23350 fi
23351 rm -rf conftest.dSYM
23352 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23353 fi
23354
23355
23356
23357 # --------------------
23358 # Run tests below here
23359 # --------------------
23360
23361 # Force use of our snprintf if system's doesn't do arg control
23362 # See comment above at snprintf test for details.
23363 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
23364   { $as_echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
23365 $as_echo_n "checking whether printf supports argument control... " >&6; }
23366 if test "${pgac_cv_printf_arg_control+set}" = set; then
23367   $as_echo_n "(cached) " >&6
23368 else
23369   if test "$cross_compiling" = yes; then
23370   pgac_cv_printf_arg_control=cross
23371 else
23372   cat >conftest.$ac_ext <<_ACEOF
23373 /* confdefs.h.  */
23374 _ACEOF
23375 cat confdefs.h >>conftest.$ac_ext
23376 cat >>conftest.$ac_ext <<_ACEOF
23377 /* end confdefs.h.  */
23378 #include <stdio.h>
23379 #include <string.h>
23380
23381 int main()
23382 {
23383   char buf[100];
23384
23385   /* can it swap arguments? */
23386   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
23387   if (strcmp(buf, "4 3") != 0)
23388     return 1;
23389   return 0;
23390 }
23391 _ACEOF
23392 rm -f conftest$ac_exeext
23393 if { (ac_try="$ac_link"
23394 case "(($ac_try" in
23395   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23396   *) ac_try_echo=$ac_try;;
23397 esac
23398 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23399 $as_echo "$ac_try_echo") >&5
23400   (eval "$ac_link") 2>&5
23401   ac_status=$?
23402   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23403   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23404   { (case "(($ac_try" in
23405   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23406   *) ac_try_echo=$ac_try;;
23407 esac
23408 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23409 $as_echo "$ac_try_echo") >&5
23410   (eval "$ac_try") 2>&5
23411   ac_status=$?
23412   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23413   (exit $ac_status); }; }; then
23414   pgac_cv_printf_arg_control=yes
23415 else
23416   $as_echo "$as_me: program exited with status $ac_status" >&5
23417 $as_echo "$as_me: failed program was:" >&5
23418 sed 's/^/| /' conftest.$ac_ext >&5
23419
23420 ( exit $ac_status )
23421 pgac_cv_printf_arg_control=no
23422 fi
23423 rm -rf conftest.dSYM
23424 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23425 fi
23426
23427
23428
23429 fi
23430 { $as_echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
23431 $as_echo "$pgac_cv_printf_arg_control" >&6; }
23432
23433   if test $pgac_cv_printf_arg_control != yes ; then
23434     pgac_need_repl_snprintf=yes
23435   fi
23436 fi
23437
23438
23439
23440
23441 { $as_echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
23442 $as_echo_n "checking whether long int is 64 bits... " >&6; }
23443 if test "${pgac_cv_type_long_int_64+set}" = set; then
23444   $as_echo_n "(cached) " >&6
23445 else
23446   if test "$cross_compiling" = yes; then
23447   # If cross-compiling, check the size reported by the compiler and
23448 # trust that the arithmetic works.
23449 cat >conftest.$ac_ext <<_ACEOF
23450 /* confdefs.h.  */
23451 _ACEOF
23452 cat confdefs.h >>conftest.$ac_ext
23453 cat >>conftest.$ac_ext <<_ACEOF
23454 /* end confdefs.h.  */
23455
23456 int
23457 main ()
23458 {
23459 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
23460 test_array [0] = 0
23461
23462   ;
23463   return 0;
23464 }
23465 _ACEOF
23466 rm -f conftest.$ac_objext
23467 if { (ac_try="$ac_compile"
23468 case "(($ac_try" in
23469   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23470   *) ac_try_echo=$ac_try;;
23471 esac
23472 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23473 $as_echo "$ac_try_echo") >&5
23474   (eval "$ac_compile") 2>conftest.er1
23475   ac_status=$?
23476   grep -v '^ *+' conftest.er1 >conftest.err
23477   rm -f conftest.er1
23478   cat conftest.err >&5
23479   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23480   (exit $ac_status); } && {
23481          test -z "$ac_c_werror_flag" ||
23482          test ! -s conftest.err
23483        } && test -s conftest.$ac_objext; then
23484   pgac_cv_type_long_int_64=yes
23485 else
23486   $as_echo "$as_me: failed program was:" >&5
23487 sed 's/^/| /' conftest.$ac_ext >&5
23488
23489         pgac_cv_type_long_int_64=no
23490 fi
23491
23492 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23493 else
23494   cat >conftest.$ac_ext <<_ACEOF
23495 /* confdefs.h.  */
23496 _ACEOF
23497 cat confdefs.h >>conftest.$ac_ext
23498 cat >>conftest.$ac_ext <<_ACEOF
23499 /* end confdefs.h.  */
23500 typedef long int ac_int64;
23501
23502 /*
23503  * These are globals to discourage the compiler from folding all the
23504  * arithmetic tests down to compile-time constants.
23505  */
23506 ac_int64 a = 20000001;
23507 ac_int64 b = 40000005;
23508
23509 int does_int64_work()
23510 {
23511   ac_int64 c,d;
23512
23513   if (sizeof(ac_int64) != 8)
23514     return 0;                   /* definitely not the right size */
23515
23516   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
23517   c = a * b;
23518   d = (c + b) / b;
23519   if (d != a+1)
23520     return 0;
23521   return 1;
23522 }
23523 main() {
23524   exit(! does_int64_work());
23525 }
23526 _ACEOF
23527 rm -f conftest$ac_exeext
23528 if { (ac_try="$ac_link"
23529 case "(($ac_try" in
23530   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23531   *) ac_try_echo=$ac_try;;
23532 esac
23533 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23534 $as_echo "$ac_try_echo") >&5
23535   (eval "$ac_link") 2>&5
23536   ac_status=$?
23537   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23538   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23539   { (case "(($ac_try" in
23540   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23541   *) ac_try_echo=$ac_try;;
23542 esac
23543 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23544 $as_echo "$ac_try_echo") >&5
23545   (eval "$ac_try") 2>&5
23546   ac_status=$?
23547   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23548   (exit $ac_status); }; }; then
23549   pgac_cv_type_long_int_64=yes
23550 else
23551   $as_echo "$as_me: program exited with status $ac_status" >&5
23552 $as_echo "$as_me: failed program was:" >&5
23553 sed 's/^/| /' conftest.$ac_ext >&5
23554
23555 ( exit $ac_status )
23556 pgac_cv_type_long_int_64=no
23557 fi
23558 rm -rf conftest.dSYM
23559 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23560 fi
23561
23562
23563 fi
23564 { $as_echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
23565 $as_echo "$pgac_cv_type_long_int_64" >&6; }
23566
23567 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
23568 if test x"$pgac_cv_type_long_int_64" = xyes ; then
23569
23570 cat >>confdefs.h <<\_ACEOF
23571 #define HAVE_LONG_INT_64 1
23572 _ACEOF
23573
23574 fi
23575
23576
23577 if test x"$HAVE_LONG_INT_64" = x"no" ; then
23578   { $as_echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
23579 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
23580 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
23581   $as_echo_n "(cached) " >&6
23582 else
23583   if test "$cross_compiling" = yes; then
23584   # If cross-compiling, check the size reported by the compiler and
23585 # trust that the arithmetic works.
23586 cat >conftest.$ac_ext <<_ACEOF
23587 /* confdefs.h.  */
23588 _ACEOF
23589 cat confdefs.h >>conftest.$ac_ext
23590 cat >>conftest.$ac_ext <<_ACEOF
23591 /* end confdefs.h.  */
23592
23593 int
23594 main ()
23595 {
23596 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
23597 test_array [0] = 0
23598
23599   ;
23600   return 0;
23601 }
23602 _ACEOF
23603 rm -f conftest.$ac_objext
23604 if { (ac_try="$ac_compile"
23605 case "(($ac_try" in
23606   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23607   *) ac_try_echo=$ac_try;;
23608 esac
23609 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23610 $as_echo "$ac_try_echo") >&5
23611   (eval "$ac_compile") 2>conftest.er1
23612   ac_status=$?
23613   grep -v '^ *+' conftest.er1 >conftest.err
23614   rm -f conftest.er1
23615   cat conftest.err >&5
23616   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23617   (exit $ac_status); } && {
23618          test -z "$ac_c_werror_flag" ||
23619          test ! -s conftest.err
23620        } && test -s conftest.$ac_objext; then
23621   pgac_cv_type_long_long_int_64=yes
23622 else
23623   $as_echo "$as_me: failed program was:" >&5
23624 sed 's/^/| /' conftest.$ac_ext >&5
23625
23626         pgac_cv_type_long_long_int_64=no
23627 fi
23628
23629 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23630 else
23631   cat >conftest.$ac_ext <<_ACEOF
23632 /* confdefs.h.  */
23633 _ACEOF
23634 cat confdefs.h >>conftest.$ac_ext
23635 cat >>conftest.$ac_ext <<_ACEOF
23636 /* end confdefs.h.  */
23637 typedef long long int ac_int64;
23638
23639 /*
23640  * These are globals to discourage the compiler from folding all the
23641  * arithmetic tests down to compile-time constants.
23642  */
23643 ac_int64 a = 20000001;
23644 ac_int64 b = 40000005;
23645
23646 int does_int64_work()
23647 {
23648   ac_int64 c,d;
23649
23650   if (sizeof(ac_int64) != 8)
23651     return 0;                   /* definitely not the right size */
23652
23653   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
23654   c = a * b;
23655   d = (c + b) / b;
23656   if (d != a+1)
23657     return 0;
23658   return 1;
23659 }
23660 main() {
23661   exit(! does_int64_work());
23662 }
23663 _ACEOF
23664 rm -f conftest$ac_exeext
23665 if { (ac_try="$ac_link"
23666 case "(($ac_try" in
23667   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23668   *) ac_try_echo=$ac_try;;
23669 esac
23670 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23671 $as_echo "$ac_try_echo") >&5
23672   (eval "$ac_link") 2>&5
23673   ac_status=$?
23674   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23675   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23676   { (case "(($ac_try" in
23677   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23678   *) ac_try_echo=$ac_try;;
23679 esac
23680 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23681 $as_echo "$ac_try_echo") >&5
23682   (eval "$ac_try") 2>&5
23683   ac_status=$?
23684   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23685   (exit $ac_status); }; }; then
23686   pgac_cv_type_long_long_int_64=yes
23687 else
23688   $as_echo "$as_me: program exited with status $ac_status" >&5
23689 $as_echo "$as_me: failed program was:" >&5
23690 sed 's/^/| /' conftest.$ac_ext >&5
23691
23692 ( exit $ac_status )
23693 pgac_cv_type_long_long_int_64=no
23694 fi
23695 rm -rf conftest.dSYM
23696 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23697 fi
23698
23699
23700 fi
23701 { $as_echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
23702 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
23703
23704 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
23705 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
23706
23707 cat >>confdefs.h <<\_ACEOF
23708 #define HAVE_LONG_LONG_INT_64 1
23709 _ACEOF
23710
23711 fi
23712
23713   if test x"$HAVE_LONG_LONG_INT_64" = x"no" ; then
23714     { { $as_echo "$as_me:$LINENO: error: Cannot find a working 64-bit integer type." >&5
23715 $as_echo "$as_me: error: Cannot find a working 64-bit integer type." >&2;}
23716    { (exit 1); exit 1; }; }
23717   fi
23718 fi
23719
23720
23721
23722 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
23723   cat >conftest.$ac_ext <<_ACEOF
23724 /* confdefs.h.  */
23725 _ACEOF
23726 cat confdefs.h >>conftest.$ac_ext
23727 cat >>conftest.$ac_ext <<_ACEOF
23728 /* end confdefs.h.  */
23729
23730 #define INT64CONST(x)  x##LL
23731 long long int foo = INT64CONST(0x1234567890123456);
23732
23733 int
23734 main ()
23735 {
23736
23737   ;
23738   return 0;
23739 }
23740 _ACEOF
23741 rm -f conftest.$ac_objext
23742 if { (ac_try="$ac_compile"
23743 case "(($ac_try" in
23744   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23745   *) ac_try_echo=$ac_try;;
23746 esac
23747 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23748 $as_echo "$ac_try_echo") >&5
23749   (eval "$ac_compile") 2>conftest.er1
23750   ac_status=$?
23751   grep -v '^ *+' conftest.er1 >conftest.err
23752   rm -f conftest.er1
23753   cat conftest.err >&5
23754   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23755   (exit $ac_status); } && {
23756          test -z "$ac_c_werror_flag" ||
23757          test ! -s conftest.err
23758        } && test -s conftest.$ac_objext; then
23759
23760 cat >>confdefs.h <<\_ACEOF
23761 #define HAVE_LL_CONSTANTS 1
23762 _ACEOF
23763
23764 else
23765   $as_echo "$as_me: failed program was:" >&5
23766 sed 's/^/| /' conftest.$ac_ext >&5
23767
23768
23769 fi
23770
23771 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23772 fi
23773
23774
23775 # If we found "long int" is 64 bits, assume snprintf handles it.  If
23776 # we found we need to use "long long int", better check.  We cope with
23777 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
23778 # work, fall back to our own snprintf emulation (which we know uses %lld).
23779
23780 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
23781   if test $pgac_need_repl_snprintf = no; then
23782     { $as_echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
23783 $as_echo_n "checking snprintf format for long long int... " >&6; }
23784 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
23785   $as_echo_n "(cached) " >&6
23786 else
23787   for pgac_format in '%lld' '%qd' '%I64d'; do
23788 if test "$cross_compiling" = yes; then
23789   pgac_cv_snprintf_long_long_int_format=cross; break
23790 else
23791   cat >conftest.$ac_ext <<_ACEOF
23792 /* confdefs.h.  */
23793 _ACEOF
23794 cat confdefs.h >>conftest.$ac_ext
23795 cat >>conftest.$ac_ext <<_ACEOF
23796 /* end confdefs.h.  */
23797 #include <stdio.h>
23798 typedef long long int ac_int64;
23799 #define INT64_FORMAT "$pgac_format"
23800
23801 ac_int64 a = 20000001;
23802 ac_int64 b = 40000005;
23803
23804 int does_int64_snprintf_work()
23805 {
23806   ac_int64 c;
23807   char buf[100];
23808
23809   if (sizeof(ac_int64) != 8)
23810     return 0;                   /* doesn't look like the right size */
23811
23812   c = a * b;
23813   snprintf(buf, 100, INT64_FORMAT, c);
23814   if (strcmp(buf, "800000140000005") != 0)
23815     return 0;                   /* either multiply or snprintf is busted */
23816   return 1;
23817 }
23818 main() {
23819   exit(! does_int64_snprintf_work());
23820 }
23821 _ACEOF
23822 rm -f conftest$ac_exeext
23823 if { (ac_try="$ac_link"
23824 case "(($ac_try" in
23825   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23826   *) ac_try_echo=$ac_try;;
23827 esac
23828 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23829 $as_echo "$ac_try_echo") >&5
23830   (eval "$ac_link") 2>&5
23831   ac_status=$?
23832   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23833   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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_try") 2>&5
23841   ac_status=$?
23842   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23843   (exit $ac_status); }; }; then
23844   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
23845 else
23846   $as_echo "$as_me: program exited with status $ac_status" >&5
23847 $as_echo "$as_me: failed program was:" >&5
23848 sed 's/^/| /' conftest.$ac_ext >&5
23849
23850 fi
23851 rm -rf conftest.dSYM
23852 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23853 fi
23854
23855
23856 done
23857 fi
23858
23859 LONG_LONG_INT_FORMAT=''
23860
23861 case $pgac_cv_snprintf_long_long_int_format in
23862   cross) { $as_echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
23863 $as_echo "cannot test (not on host machine)" >&6; };;
23864   ?*)    { $as_echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
23865 $as_echo "$pgac_cv_snprintf_long_long_int_format" >&6; }
23866          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
23867   *)     { $as_echo "$as_me:$LINENO: result: none" >&5
23868 $as_echo "none" >&6; };;
23869 esac
23870     if test "$LONG_LONG_INT_FORMAT" = ""; then
23871       # Force usage of our own snprintf, since system snprintf is broken
23872       pgac_need_repl_snprintf=yes
23873       LONG_LONG_INT_FORMAT='%lld'
23874     fi
23875   else
23876     # Here if we previously decided we needed to use our own snprintf
23877     LONG_LONG_INT_FORMAT='%lld'
23878   fi
23879   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
23880   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
23881   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
23882 else
23883   # Here if we are not using 'long long int' at all
23884   INT64_FORMAT='"%ld"'
23885   UINT64_FORMAT='"%lu"'
23886 fi
23887
23888
23889 cat >>confdefs.h <<_ACEOF
23890 #define INT64_FORMAT $INT64_FORMAT
23891 _ACEOF
23892
23893
23894
23895 cat >>confdefs.h <<_ACEOF
23896 #define UINT64_FORMAT $UINT64_FORMAT
23897 _ACEOF
23898
23899
23900 # Now we have checked all the reasons to replace snprintf
23901 if test $pgac_need_repl_snprintf = yes; then
23902
23903 cat >>confdefs.h <<\_ACEOF
23904 #define USE_REPL_SNPRINTF 1
23905 _ACEOF
23906
23907   case " $LIBOBJS " in
23908   *" snprintf.$ac_objext "* ) ;;
23909   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
23910  ;;
23911 esac
23912
23913 fi
23914
23915 # Check size of void *, size_t (enables tweaks for > 32bit address space)
23916 # The cast to long int works around a bug in the HP C Compiler
23917 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23918 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23919 # This bug is HP SR number 8606223364.
23920 { $as_echo "$as_me:$LINENO: checking size of void *" >&5
23921 $as_echo_n "checking size of void *... " >&6; }
23922 if test "${ac_cv_sizeof_void_p+set}" = set; then
23923   $as_echo_n "(cached) " >&6
23924 else
23925   if test "$cross_compiling" = yes; then
23926   # Depending upon the size, compute the lo and hi bounds.
23927 cat >conftest.$ac_ext <<_ACEOF
23928 /* confdefs.h.  */
23929 _ACEOF
23930 cat confdefs.h >>conftest.$ac_ext
23931 cat >>conftest.$ac_ext <<_ACEOF
23932 /* end confdefs.h.  */
23933 $ac_includes_default
23934 int
23935 main ()
23936 {
23937 static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= 0)];
23938 test_array [0] = 0
23939
23940   ;
23941   return 0;
23942 }
23943 _ACEOF
23944 rm -f conftest.$ac_objext
23945 if { (ac_try="$ac_compile"
23946 case "(($ac_try" in
23947   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23948   *) ac_try_echo=$ac_try;;
23949 esac
23950 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23951 $as_echo "$ac_try_echo") >&5
23952   (eval "$ac_compile") 2>conftest.er1
23953   ac_status=$?
23954   grep -v '^ *+' conftest.er1 >conftest.err
23955   rm -f conftest.er1
23956   cat conftest.err >&5
23957   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23958   (exit $ac_status); } && {
23959          test -z "$ac_c_werror_flag" ||
23960          test ! -s conftest.err
23961        } && test -s conftest.$ac_objext; then
23962   ac_lo=0 ac_mid=0
23963   while :; do
23964     cat >conftest.$ac_ext <<_ACEOF
23965 /* confdefs.h.  */
23966 _ACEOF
23967 cat confdefs.h >>conftest.$ac_ext
23968 cat >>conftest.$ac_ext <<_ACEOF
23969 /* end confdefs.h.  */
23970 $ac_includes_default
23971 int
23972 main ()
23973 {
23974 static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
23975 test_array [0] = 0
23976
23977   ;
23978   return 0;
23979 }
23980 _ACEOF
23981 rm -f conftest.$ac_objext
23982 if { (ac_try="$ac_compile"
23983 case "(($ac_try" in
23984   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23985   *) ac_try_echo=$ac_try;;
23986 esac
23987 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23988 $as_echo "$ac_try_echo") >&5
23989   (eval "$ac_compile") 2>conftest.er1
23990   ac_status=$?
23991   grep -v '^ *+' conftest.er1 >conftest.err
23992   rm -f conftest.er1
23993   cat conftest.err >&5
23994   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23995   (exit $ac_status); } && {
23996          test -z "$ac_c_werror_flag" ||
23997          test ! -s conftest.err
23998        } && test -s conftest.$ac_objext; then
23999   ac_hi=$ac_mid; break
24000 else
24001   $as_echo "$as_me: failed program was:" >&5
24002 sed 's/^/| /' conftest.$ac_ext >&5
24003
24004         ac_lo=`expr $ac_mid + 1`
24005                         if test $ac_lo -le $ac_mid; then
24006                           ac_lo= ac_hi=
24007                           break
24008                         fi
24009                         ac_mid=`expr 2 '*' $ac_mid + 1`
24010 fi
24011
24012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24013   done
24014 else
24015   $as_echo "$as_me: failed program was:" >&5
24016 sed 's/^/| /' conftest.$ac_ext >&5
24017
24018         cat >conftest.$ac_ext <<_ACEOF
24019 /* confdefs.h.  */
24020 _ACEOF
24021 cat confdefs.h >>conftest.$ac_ext
24022 cat >>conftest.$ac_ext <<_ACEOF
24023 /* end confdefs.h.  */
24024 $ac_includes_default
24025 int
24026 main ()
24027 {
24028 static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)];
24029 test_array [0] = 0
24030
24031   ;
24032   return 0;
24033 }
24034 _ACEOF
24035 rm -f conftest.$ac_objext
24036 if { (ac_try="$ac_compile"
24037 case "(($ac_try" in
24038   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24039   *) ac_try_echo=$ac_try;;
24040 esac
24041 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24042 $as_echo "$ac_try_echo") >&5
24043   (eval "$ac_compile") 2>conftest.er1
24044   ac_status=$?
24045   grep -v '^ *+' conftest.er1 >conftest.err
24046   rm -f conftest.er1
24047   cat conftest.err >&5
24048   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24049   (exit $ac_status); } && {
24050          test -z "$ac_c_werror_flag" ||
24051          test ! -s conftest.err
24052        } && test -s conftest.$ac_objext; then
24053   ac_hi=-1 ac_mid=-1
24054   while :; do
24055     cat >conftest.$ac_ext <<_ACEOF
24056 /* confdefs.h.  */
24057 _ACEOF
24058 cat confdefs.h >>conftest.$ac_ext
24059 cat >>conftest.$ac_ext <<_ACEOF
24060 /* end confdefs.h.  */
24061 $ac_includes_default
24062 int
24063 main ()
24064 {
24065 static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $ac_mid)];
24066 test_array [0] = 0
24067
24068   ;
24069   return 0;
24070 }
24071 _ACEOF
24072 rm -f conftest.$ac_objext
24073 if { (ac_try="$ac_compile"
24074 case "(($ac_try" in
24075   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24076   *) ac_try_echo=$ac_try;;
24077 esac
24078 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24079 $as_echo "$ac_try_echo") >&5
24080   (eval "$ac_compile") 2>conftest.er1
24081   ac_status=$?
24082   grep -v '^ *+' conftest.er1 >conftest.err
24083   rm -f conftest.er1
24084   cat conftest.err >&5
24085   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24086   (exit $ac_status); } && {
24087          test -z "$ac_c_werror_flag" ||
24088          test ! -s conftest.err
24089        } && test -s conftest.$ac_objext; then
24090   ac_lo=$ac_mid; break
24091 else
24092   $as_echo "$as_me: failed program was:" >&5
24093 sed 's/^/| /' conftest.$ac_ext >&5
24094
24095         ac_hi=`expr '(' $ac_mid ')' - 1`
24096                         if test $ac_mid -le $ac_hi; then
24097                           ac_lo= ac_hi=
24098                           break
24099                         fi
24100                         ac_mid=`expr 2 '*' $ac_mid`
24101 fi
24102
24103 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24104   done
24105 else
24106   $as_echo "$as_me: failed program was:" >&5
24107 sed 's/^/| /' conftest.$ac_ext >&5
24108
24109         ac_lo= ac_hi=
24110 fi
24111
24112 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24113 fi
24114
24115 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24116 # Binary search between lo and hi bounds.
24117 while test "x$ac_lo" != "x$ac_hi"; do
24118   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24119   cat >conftest.$ac_ext <<_ACEOF
24120 /* confdefs.h.  */
24121 _ACEOF
24122 cat confdefs.h >>conftest.$ac_ext
24123 cat >>conftest.$ac_ext <<_ACEOF
24124 /* end confdefs.h.  */
24125 $ac_includes_default
24126 int
24127 main ()
24128 {
24129 static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
24130 test_array [0] = 0
24131
24132   ;
24133   return 0;
24134 }
24135 _ACEOF
24136 rm -f conftest.$ac_objext
24137 if { (ac_try="$ac_compile"
24138 case "(($ac_try" in
24139   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24140   *) ac_try_echo=$ac_try;;
24141 esac
24142 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24143 $as_echo "$ac_try_echo") >&5
24144   (eval "$ac_compile") 2>conftest.er1
24145   ac_status=$?
24146   grep -v '^ *+' conftest.er1 >conftest.err
24147   rm -f conftest.er1
24148   cat conftest.err >&5
24149   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24150   (exit $ac_status); } && {
24151          test -z "$ac_c_werror_flag" ||
24152          test ! -s conftest.err
24153        } && test -s conftest.$ac_objext; then
24154   ac_hi=$ac_mid
24155 else
24156   $as_echo "$as_me: failed program was:" >&5
24157 sed 's/^/| /' conftest.$ac_ext >&5
24158
24159         ac_lo=`expr '(' $ac_mid ')' + 1`
24160 fi
24161
24162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24163 done
24164 case $ac_lo in
24165 ?*) ac_cv_sizeof_void_p=$ac_lo;;
24166 '') if test "$ac_cv_type_void_p" = yes; then
24167      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
24168 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24169 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
24170 See \`config.log' for more details." >&5
24171 $as_echo "$as_me: error: cannot compute sizeof (void *)
24172 See \`config.log' for more details." >&2;}
24173    { (exit 77); exit 77; }; }; }
24174    else
24175      ac_cv_sizeof_void_p=0
24176    fi ;;
24177 esac
24178 else
24179   cat >conftest.$ac_ext <<_ACEOF
24180 /* confdefs.h.  */
24181 _ACEOF
24182 cat confdefs.h >>conftest.$ac_ext
24183 cat >>conftest.$ac_ext <<_ACEOF
24184 /* end confdefs.h.  */
24185 $ac_includes_default
24186 static long int longval () { return (long int) (sizeof (void *)); }
24187 static unsigned long int ulongval () { return (long int) (sizeof (void *)); }
24188 #include <stdio.h>
24189 #include <stdlib.h>
24190 int
24191 main ()
24192 {
24193
24194   FILE *f = fopen ("conftest.val", "w");
24195   if (! f)
24196     return 1;
24197   if (((long int) (sizeof (void *))) < 0)
24198     {
24199       long int i = longval ();
24200       if (i != ((long int) (sizeof (void *))))
24201         return 1;
24202       fprintf (f, "%ld", i);
24203     }
24204   else
24205     {
24206       unsigned long int i = ulongval ();
24207       if (i != ((long int) (sizeof (void *))))
24208         return 1;
24209       fprintf (f, "%lu", i);
24210     }
24211   /* Do not output a trailing newline, as this causes \r\n confusion
24212      on some platforms.  */
24213   return ferror (f) || fclose (f) != 0;
24214
24215   ;
24216   return 0;
24217 }
24218 _ACEOF
24219 rm -f conftest$ac_exeext
24220 if { (ac_try="$ac_link"
24221 case "(($ac_try" in
24222   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24223   *) ac_try_echo=$ac_try;;
24224 esac
24225 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24226 $as_echo "$ac_try_echo") >&5
24227   (eval "$ac_link") 2>&5
24228   ac_status=$?
24229   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24230   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24231   { (case "(($ac_try" in
24232   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24233   *) ac_try_echo=$ac_try;;
24234 esac
24235 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24236 $as_echo "$ac_try_echo") >&5
24237   (eval "$ac_try") 2>&5
24238   ac_status=$?
24239   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24240   (exit $ac_status); }; }; then
24241   ac_cv_sizeof_void_p=`cat conftest.val`
24242 else
24243   $as_echo "$as_me: program exited with status $ac_status" >&5
24244 $as_echo "$as_me: failed program was:" >&5
24245 sed 's/^/| /' conftest.$ac_ext >&5
24246
24247 ( exit $ac_status )
24248 if test "$ac_cv_type_void_p" = yes; then
24249      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
24250 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24251 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
24252 See \`config.log' for more details." >&5
24253 $as_echo "$as_me: error: cannot compute sizeof (void *)
24254 See \`config.log' for more details." >&2;}
24255    { (exit 77); exit 77; }; }; }
24256    else
24257      ac_cv_sizeof_void_p=0
24258    fi
24259 fi
24260 rm -rf conftest.dSYM
24261 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24262 fi
24263 rm -f conftest.val
24264 fi
24265 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
24266 $as_echo "$ac_cv_sizeof_void_p" >&6; }
24267
24268
24269
24270 cat >>confdefs.h <<_ACEOF
24271 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
24272 _ACEOF
24273
24274
24275 # The cast to long int works around a bug in the HP C Compiler
24276 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24277 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24278 # This bug is HP SR number 8606223364.
24279 { $as_echo "$as_me:$LINENO: checking size of size_t" >&5
24280 $as_echo_n "checking size of size_t... " >&6; }
24281 if test "${ac_cv_sizeof_size_t+set}" = set; then
24282   $as_echo_n "(cached) " >&6
24283 else
24284   if test "$cross_compiling" = yes; then
24285   # Depending upon the size, compute the lo and hi bounds.
24286 cat >conftest.$ac_ext <<_ACEOF
24287 /* confdefs.h.  */
24288 _ACEOF
24289 cat confdefs.h >>conftest.$ac_ext
24290 cat >>conftest.$ac_ext <<_ACEOF
24291 /* end confdefs.h.  */
24292 $ac_includes_default
24293 int
24294 main ()
24295 {
24296 static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= 0)];
24297 test_array [0] = 0
24298
24299   ;
24300   return 0;
24301 }
24302 _ACEOF
24303 rm -f conftest.$ac_objext
24304 if { (ac_try="$ac_compile"
24305 case "(($ac_try" in
24306   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24307   *) ac_try_echo=$ac_try;;
24308 esac
24309 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24310 $as_echo "$ac_try_echo") >&5
24311   (eval "$ac_compile") 2>conftest.er1
24312   ac_status=$?
24313   grep -v '^ *+' conftest.er1 >conftest.err
24314   rm -f conftest.er1
24315   cat conftest.err >&5
24316   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24317   (exit $ac_status); } && {
24318          test -z "$ac_c_werror_flag" ||
24319          test ! -s conftest.err
24320        } && test -s conftest.$ac_objext; then
24321   ac_lo=0 ac_mid=0
24322   while :; do
24323     cat >conftest.$ac_ext <<_ACEOF
24324 /* confdefs.h.  */
24325 _ACEOF
24326 cat confdefs.h >>conftest.$ac_ext
24327 cat >>conftest.$ac_ext <<_ACEOF
24328 /* end confdefs.h.  */
24329 $ac_includes_default
24330 int
24331 main ()
24332 {
24333 static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
24334 test_array [0] = 0
24335
24336   ;
24337   return 0;
24338 }
24339 _ACEOF
24340 rm -f conftest.$ac_objext
24341 if { (ac_try="$ac_compile"
24342 case "(($ac_try" in
24343   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24344   *) ac_try_echo=$ac_try;;
24345 esac
24346 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24347 $as_echo "$ac_try_echo") >&5
24348   (eval "$ac_compile") 2>conftest.er1
24349   ac_status=$?
24350   grep -v '^ *+' conftest.er1 >conftest.err
24351   rm -f conftest.er1
24352   cat conftest.err >&5
24353   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24354   (exit $ac_status); } && {
24355          test -z "$ac_c_werror_flag" ||
24356          test ! -s conftest.err
24357        } && test -s conftest.$ac_objext; then
24358   ac_hi=$ac_mid; break
24359 else
24360   $as_echo "$as_me: failed program was:" >&5
24361 sed 's/^/| /' conftest.$ac_ext >&5
24362
24363         ac_lo=`expr $ac_mid + 1`
24364                         if test $ac_lo -le $ac_mid; then
24365                           ac_lo= ac_hi=
24366                           break
24367                         fi
24368                         ac_mid=`expr 2 '*' $ac_mid + 1`
24369 fi
24370
24371 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24372   done
24373 else
24374   $as_echo "$as_me: failed program was:" >&5
24375 sed 's/^/| /' conftest.$ac_ext >&5
24376
24377         cat >conftest.$ac_ext <<_ACEOF
24378 /* confdefs.h.  */
24379 _ACEOF
24380 cat confdefs.h >>conftest.$ac_ext
24381 cat >>conftest.$ac_ext <<_ACEOF
24382 /* end confdefs.h.  */
24383 $ac_includes_default
24384 int
24385 main ()
24386 {
24387 static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) < 0)];
24388 test_array [0] = 0
24389
24390   ;
24391   return 0;
24392 }
24393 _ACEOF
24394 rm -f conftest.$ac_objext
24395 if { (ac_try="$ac_compile"
24396 case "(($ac_try" in
24397   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24398   *) ac_try_echo=$ac_try;;
24399 esac
24400 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24401 $as_echo "$ac_try_echo") >&5
24402   (eval "$ac_compile") 2>conftest.er1
24403   ac_status=$?
24404   grep -v '^ *+' conftest.er1 >conftest.err
24405   rm -f conftest.er1
24406   cat conftest.err >&5
24407   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24408   (exit $ac_status); } && {
24409          test -z "$ac_c_werror_flag" ||
24410          test ! -s conftest.err
24411        } && test -s conftest.$ac_objext; then
24412   ac_hi=-1 ac_mid=-1
24413   while :; do
24414     cat >conftest.$ac_ext <<_ACEOF
24415 /* confdefs.h.  */
24416 _ACEOF
24417 cat confdefs.h >>conftest.$ac_ext
24418 cat >>conftest.$ac_ext <<_ACEOF
24419 /* end confdefs.h.  */
24420 $ac_includes_default
24421 int
24422 main ()
24423 {
24424 static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= $ac_mid)];
24425 test_array [0] = 0
24426
24427   ;
24428   return 0;
24429 }
24430 _ACEOF
24431 rm -f conftest.$ac_objext
24432 if { (ac_try="$ac_compile"
24433 case "(($ac_try" in
24434   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24435   *) ac_try_echo=$ac_try;;
24436 esac
24437 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24438 $as_echo "$ac_try_echo") >&5
24439   (eval "$ac_compile") 2>conftest.er1
24440   ac_status=$?
24441   grep -v '^ *+' conftest.er1 >conftest.err
24442   rm -f conftest.er1
24443   cat conftest.err >&5
24444   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24445   (exit $ac_status); } && {
24446          test -z "$ac_c_werror_flag" ||
24447          test ! -s conftest.err
24448        } && test -s conftest.$ac_objext; then
24449   ac_lo=$ac_mid; break
24450 else
24451   $as_echo "$as_me: failed program was:" >&5
24452 sed 's/^/| /' conftest.$ac_ext >&5
24453
24454         ac_hi=`expr '(' $ac_mid ')' - 1`
24455                         if test $ac_mid -le $ac_hi; then
24456                           ac_lo= ac_hi=
24457                           break
24458                         fi
24459                         ac_mid=`expr 2 '*' $ac_mid`
24460 fi
24461
24462 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24463   done
24464 else
24465   $as_echo "$as_me: failed program was:" >&5
24466 sed 's/^/| /' conftest.$ac_ext >&5
24467
24468         ac_lo= ac_hi=
24469 fi
24470
24471 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24472 fi
24473
24474 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24475 # Binary search between lo and hi bounds.
24476 while test "x$ac_lo" != "x$ac_hi"; do
24477   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24478   cat >conftest.$ac_ext <<_ACEOF
24479 /* confdefs.h.  */
24480 _ACEOF
24481 cat confdefs.h >>conftest.$ac_ext
24482 cat >>conftest.$ac_ext <<_ACEOF
24483 /* end confdefs.h.  */
24484 $ac_includes_default
24485 int
24486 main ()
24487 {
24488 static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
24489 test_array [0] = 0
24490
24491   ;
24492   return 0;
24493 }
24494 _ACEOF
24495 rm -f conftest.$ac_objext
24496 if { (ac_try="$ac_compile"
24497 case "(($ac_try" in
24498   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24499   *) ac_try_echo=$ac_try;;
24500 esac
24501 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24502 $as_echo "$ac_try_echo") >&5
24503   (eval "$ac_compile") 2>conftest.er1
24504   ac_status=$?
24505   grep -v '^ *+' conftest.er1 >conftest.err
24506   rm -f conftest.er1
24507   cat conftest.err >&5
24508   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24509   (exit $ac_status); } && {
24510          test -z "$ac_c_werror_flag" ||
24511          test ! -s conftest.err
24512        } && test -s conftest.$ac_objext; then
24513   ac_hi=$ac_mid
24514 else
24515   $as_echo "$as_me: failed program was:" >&5
24516 sed 's/^/| /' conftest.$ac_ext >&5
24517
24518         ac_lo=`expr '(' $ac_mid ')' + 1`
24519 fi
24520
24521 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24522 done
24523 case $ac_lo in
24524 ?*) ac_cv_sizeof_size_t=$ac_lo;;
24525 '') if test "$ac_cv_type_size_t" = yes; then
24526      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
24527 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24528 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
24529 See \`config.log' for more details." >&5
24530 $as_echo "$as_me: error: cannot compute sizeof (size_t)
24531 See \`config.log' for more details." >&2;}
24532    { (exit 77); exit 77; }; }; }
24533    else
24534      ac_cv_sizeof_size_t=0
24535    fi ;;
24536 esac
24537 else
24538   cat >conftest.$ac_ext <<_ACEOF
24539 /* confdefs.h.  */
24540 _ACEOF
24541 cat confdefs.h >>conftest.$ac_ext
24542 cat >>conftest.$ac_ext <<_ACEOF
24543 /* end confdefs.h.  */
24544 $ac_includes_default
24545 static long int longval () { return (long int) (sizeof (size_t)); }
24546 static unsigned long int ulongval () { return (long int) (sizeof (size_t)); }
24547 #include <stdio.h>
24548 #include <stdlib.h>
24549 int
24550 main ()
24551 {
24552
24553   FILE *f = fopen ("conftest.val", "w");
24554   if (! f)
24555     return 1;
24556   if (((long int) (sizeof (size_t))) < 0)
24557     {
24558       long int i = longval ();
24559       if (i != ((long int) (sizeof (size_t))))
24560         return 1;
24561       fprintf (f, "%ld", i);
24562     }
24563   else
24564     {
24565       unsigned long int i = ulongval ();
24566       if (i != ((long int) (sizeof (size_t))))
24567         return 1;
24568       fprintf (f, "%lu", i);
24569     }
24570   /* Do not output a trailing newline, as this causes \r\n confusion
24571      on some platforms.  */
24572   return ferror (f) || fclose (f) != 0;
24573
24574   ;
24575   return 0;
24576 }
24577 _ACEOF
24578 rm -f conftest$ac_exeext
24579 if { (ac_try="$ac_link"
24580 case "(($ac_try" in
24581   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24582   *) ac_try_echo=$ac_try;;
24583 esac
24584 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24585 $as_echo "$ac_try_echo") >&5
24586   (eval "$ac_link") 2>&5
24587   ac_status=$?
24588   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24589   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24590   { (case "(($ac_try" in
24591   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24592   *) ac_try_echo=$ac_try;;
24593 esac
24594 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24595 $as_echo "$ac_try_echo") >&5
24596   (eval "$ac_try") 2>&5
24597   ac_status=$?
24598   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24599   (exit $ac_status); }; }; then
24600   ac_cv_sizeof_size_t=`cat conftest.val`
24601 else
24602   $as_echo "$as_me: program exited with status $ac_status" >&5
24603 $as_echo "$as_me: failed program was:" >&5
24604 sed 's/^/| /' conftest.$ac_ext >&5
24605
24606 ( exit $ac_status )
24607 if test "$ac_cv_type_size_t" = yes; then
24608      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
24609 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24610 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
24611 See \`config.log' for more details." >&5
24612 $as_echo "$as_me: error: cannot compute sizeof (size_t)
24613 See \`config.log' for more details." >&2;}
24614    { (exit 77); exit 77; }; }; }
24615    else
24616      ac_cv_sizeof_size_t=0
24617    fi
24618 fi
24619 rm -rf conftest.dSYM
24620 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24621 fi
24622 rm -f conftest.val
24623 fi
24624 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
24625 $as_echo "$ac_cv_sizeof_size_t" >&6; }
24626
24627
24628
24629 cat >>confdefs.h <<_ACEOF
24630 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
24631 _ACEOF
24632
24633
24634 # The cast to long int works around a bug in the HP C Compiler
24635 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24636 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24637 # This bug is HP SR number 8606223364.
24638 { $as_echo "$as_me:$LINENO: checking size of long" >&5
24639 $as_echo_n "checking size of long... " >&6; }
24640 if test "${ac_cv_sizeof_long+set}" = set; then
24641   $as_echo_n "(cached) " >&6
24642 else
24643   if test "$cross_compiling" = yes; then
24644   # Depending upon the size, compute the lo and hi bounds.
24645 cat >conftest.$ac_ext <<_ACEOF
24646 /* confdefs.h.  */
24647 _ACEOF
24648 cat confdefs.h >>conftest.$ac_ext
24649 cat >>conftest.$ac_ext <<_ACEOF
24650 /* end confdefs.h.  */
24651 $ac_includes_default
24652 int
24653 main ()
24654 {
24655 static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
24656 test_array [0] = 0
24657
24658   ;
24659   return 0;
24660 }
24661 _ACEOF
24662 rm -f conftest.$ac_objext
24663 if { (ac_try="$ac_compile"
24664 case "(($ac_try" in
24665   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24666   *) ac_try_echo=$ac_try;;
24667 esac
24668 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24669 $as_echo "$ac_try_echo") >&5
24670   (eval "$ac_compile") 2>conftest.er1
24671   ac_status=$?
24672   grep -v '^ *+' conftest.er1 >conftest.err
24673   rm -f conftest.er1
24674   cat conftest.err >&5
24675   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24676   (exit $ac_status); } && {
24677          test -z "$ac_c_werror_flag" ||
24678          test ! -s conftest.err
24679        } && test -s conftest.$ac_objext; then
24680   ac_lo=0 ac_mid=0
24681   while :; do
24682     cat >conftest.$ac_ext <<_ACEOF
24683 /* confdefs.h.  */
24684 _ACEOF
24685 cat confdefs.h >>conftest.$ac_ext
24686 cat >>conftest.$ac_ext <<_ACEOF
24687 /* end confdefs.h.  */
24688 $ac_includes_default
24689 int
24690 main ()
24691 {
24692 static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
24693 test_array [0] = 0
24694
24695   ;
24696   return 0;
24697 }
24698 _ACEOF
24699 rm -f conftest.$ac_objext
24700 if { (ac_try="$ac_compile"
24701 case "(($ac_try" in
24702   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24703   *) ac_try_echo=$ac_try;;
24704 esac
24705 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24706 $as_echo "$ac_try_echo") >&5
24707   (eval "$ac_compile") 2>conftest.er1
24708   ac_status=$?
24709   grep -v '^ *+' conftest.er1 >conftest.err
24710   rm -f conftest.er1
24711   cat conftest.err >&5
24712   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24713   (exit $ac_status); } && {
24714          test -z "$ac_c_werror_flag" ||
24715          test ! -s conftest.err
24716        } && test -s conftest.$ac_objext; then
24717   ac_hi=$ac_mid; break
24718 else
24719   $as_echo "$as_me: failed program was:" >&5
24720 sed 's/^/| /' conftest.$ac_ext >&5
24721
24722         ac_lo=`expr $ac_mid + 1`
24723                         if test $ac_lo -le $ac_mid; then
24724                           ac_lo= ac_hi=
24725                           break
24726                         fi
24727                         ac_mid=`expr 2 '*' $ac_mid + 1`
24728 fi
24729
24730 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24731   done
24732 else
24733   $as_echo "$as_me: failed program was:" >&5
24734 sed 's/^/| /' conftest.$ac_ext >&5
24735
24736         cat >conftest.$ac_ext <<_ACEOF
24737 /* confdefs.h.  */
24738 _ACEOF
24739 cat confdefs.h >>conftest.$ac_ext
24740 cat >>conftest.$ac_ext <<_ACEOF
24741 /* end confdefs.h.  */
24742 $ac_includes_default
24743 int
24744 main ()
24745 {
24746 static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
24747 test_array [0] = 0
24748
24749   ;
24750   return 0;
24751 }
24752 _ACEOF
24753 rm -f conftest.$ac_objext
24754 if { (ac_try="$ac_compile"
24755 case "(($ac_try" in
24756   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24757   *) ac_try_echo=$ac_try;;
24758 esac
24759 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24760 $as_echo "$ac_try_echo") >&5
24761   (eval "$ac_compile") 2>conftest.er1
24762   ac_status=$?
24763   grep -v '^ *+' conftest.er1 >conftest.err
24764   rm -f conftest.er1
24765   cat conftest.err >&5
24766   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24767   (exit $ac_status); } && {
24768          test -z "$ac_c_werror_flag" ||
24769          test ! -s conftest.err
24770        } && test -s conftest.$ac_objext; then
24771   ac_hi=-1 ac_mid=-1
24772   while :; do
24773     cat >conftest.$ac_ext <<_ACEOF
24774 /* confdefs.h.  */
24775 _ACEOF
24776 cat confdefs.h >>conftest.$ac_ext
24777 cat >>conftest.$ac_ext <<_ACEOF
24778 /* end confdefs.h.  */
24779 $ac_includes_default
24780 int
24781 main ()
24782 {
24783 static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
24784 test_array [0] = 0
24785
24786   ;
24787   return 0;
24788 }
24789 _ACEOF
24790 rm -f conftest.$ac_objext
24791 if { (ac_try="$ac_compile"
24792 case "(($ac_try" in
24793   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24794   *) ac_try_echo=$ac_try;;
24795 esac
24796 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24797 $as_echo "$ac_try_echo") >&5
24798   (eval "$ac_compile") 2>conftest.er1
24799   ac_status=$?
24800   grep -v '^ *+' conftest.er1 >conftest.err
24801   rm -f conftest.er1
24802   cat conftest.err >&5
24803   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24804   (exit $ac_status); } && {
24805          test -z "$ac_c_werror_flag" ||
24806          test ! -s conftest.err
24807        } && test -s conftest.$ac_objext; then
24808   ac_lo=$ac_mid; break
24809 else
24810   $as_echo "$as_me: failed program was:" >&5
24811 sed 's/^/| /' conftest.$ac_ext >&5
24812
24813         ac_hi=`expr '(' $ac_mid ')' - 1`
24814                         if test $ac_mid -le $ac_hi; then
24815                           ac_lo= ac_hi=
24816                           break
24817                         fi
24818                         ac_mid=`expr 2 '*' $ac_mid`
24819 fi
24820
24821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24822   done
24823 else
24824   $as_echo "$as_me: failed program was:" >&5
24825 sed 's/^/| /' conftest.$ac_ext >&5
24826
24827         ac_lo= ac_hi=
24828 fi
24829
24830 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24831 fi
24832
24833 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24834 # Binary search between lo and hi bounds.
24835 while test "x$ac_lo" != "x$ac_hi"; do
24836   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24837   cat >conftest.$ac_ext <<_ACEOF
24838 /* confdefs.h.  */
24839 _ACEOF
24840 cat confdefs.h >>conftest.$ac_ext
24841 cat >>conftest.$ac_ext <<_ACEOF
24842 /* end confdefs.h.  */
24843 $ac_includes_default
24844 int
24845 main ()
24846 {
24847 static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
24848 test_array [0] = 0
24849
24850   ;
24851   return 0;
24852 }
24853 _ACEOF
24854 rm -f conftest.$ac_objext
24855 if { (ac_try="$ac_compile"
24856 case "(($ac_try" in
24857   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24858   *) ac_try_echo=$ac_try;;
24859 esac
24860 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24861 $as_echo "$ac_try_echo") >&5
24862   (eval "$ac_compile") 2>conftest.er1
24863   ac_status=$?
24864   grep -v '^ *+' conftest.er1 >conftest.err
24865   rm -f conftest.er1
24866   cat conftest.err >&5
24867   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24868   (exit $ac_status); } && {
24869          test -z "$ac_c_werror_flag" ||
24870          test ! -s conftest.err
24871        } && test -s conftest.$ac_objext; then
24872   ac_hi=$ac_mid
24873 else
24874   $as_echo "$as_me: failed program was:" >&5
24875 sed 's/^/| /' conftest.$ac_ext >&5
24876
24877         ac_lo=`expr '(' $ac_mid ')' + 1`
24878 fi
24879
24880 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24881 done
24882 case $ac_lo in
24883 ?*) ac_cv_sizeof_long=$ac_lo;;
24884 '') if test "$ac_cv_type_long" = yes; then
24885      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
24886 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24887 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
24888 See \`config.log' for more details." >&5
24889 $as_echo "$as_me: error: cannot compute sizeof (long)
24890 See \`config.log' for more details." >&2;}
24891    { (exit 77); exit 77; }; }; }
24892    else
24893      ac_cv_sizeof_long=0
24894    fi ;;
24895 esac
24896 else
24897   cat >conftest.$ac_ext <<_ACEOF
24898 /* confdefs.h.  */
24899 _ACEOF
24900 cat confdefs.h >>conftest.$ac_ext
24901 cat >>conftest.$ac_ext <<_ACEOF
24902 /* end confdefs.h.  */
24903 $ac_includes_default
24904 static long int longval () { return (long int) (sizeof (long)); }
24905 static unsigned long int ulongval () { return (long int) (sizeof (long)); }
24906 #include <stdio.h>
24907 #include <stdlib.h>
24908 int
24909 main ()
24910 {
24911
24912   FILE *f = fopen ("conftest.val", "w");
24913   if (! f)
24914     return 1;
24915   if (((long int) (sizeof (long))) < 0)
24916     {
24917       long int i = longval ();
24918       if (i != ((long int) (sizeof (long))))
24919         return 1;
24920       fprintf (f, "%ld", i);
24921     }
24922   else
24923     {
24924       unsigned long int i = ulongval ();
24925       if (i != ((long int) (sizeof (long))))
24926         return 1;
24927       fprintf (f, "%lu", i);
24928     }
24929   /* Do not output a trailing newline, as this causes \r\n confusion
24930      on some platforms.  */
24931   return ferror (f) || fclose (f) != 0;
24932
24933   ;
24934   return 0;
24935 }
24936 _ACEOF
24937 rm -f conftest$ac_exeext
24938 if { (ac_try="$ac_link"
24939 case "(($ac_try" in
24940   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24941   *) ac_try_echo=$ac_try;;
24942 esac
24943 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24944 $as_echo "$ac_try_echo") >&5
24945   (eval "$ac_link") 2>&5
24946   ac_status=$?
24947   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24948   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24949   { (case "(($ac_try" in
24950   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24951   *) ac_try_echo=$ac_try;;
24952 esac
24953 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24954 $as_echo "$ac_try_echo") >&5
24955   (eval "$ac_try") 2>&5
24956   ac_status=$?
24957   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24958   (exit $ac_status); }; }; then
24959   ac_cv_sizeof_long=`cat conftest.val`
24960 else
24961   $as_echo "$as_me: program exited with status $ac_status" >&5
24962 $as_echo "$as_me: failed program was:" >&5
24963 sed 's/^/| /' conftest.$ac_ext >&5
24964
24965 ( exit $ac_status )
24966 if test "$ac_cv_type_long" = yes; then
24967      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
24968 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24969 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
24970 See \`config.log' for more details." >&5
24971 $as_echo "$as_me: error: cannot compute sizeof (long)
24972 See \`config.log' for more details." >&2;}
24973    { (exit 77); exit 77; }; }; }
24974    else
24975      ac_cv_sizeof_long=0
24976    fi
24977 fi
24978 rm -rf conftest.dSYM
24979 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24980 fi
24981 rm -f conftest.val
24982 fi
24983 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
24984 $as_echo "$ac_cv_sizeof_long" >&6; }
24985
24986
24987
24988 cat >>confdefs.h <<_ACEOF
24989 #define SIZEOF_LONG $ac_cv_sizeof_long
24990 _ACEOF
24991
24992
24993
24994 # Decide whether float4 is passed by value: user-selectable, enabled by default
24995 { $as_echo "$as_me:$LINENO: checking whether to build with float4 passed by value" >&5
24996 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
24997
24998
24999 # Check whether --enable-float4-byval was given.
25000 if test "${enable_float4_byval+set}" = set; then
25001   enableval=$enable_float4_byval;
25002   case $enableval in
25003     yes)
25004
25005 cat >>confdefs.h <<\_ACEOF
25006 #define USE_FLOAT4_BYVAL 1
25007 _ACEOF
25008
25009                float4passbyval=true
25010       ;;
25011     no)
25012       float4passbyval=false
25013       ;;
25014     *)
25015       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-float4-byval option" >&5
25016 $as_echo "$as_me: error: no argument expected for --enable-float4-byval option" >&2;}
25017    { (exit 1); exit 1; }; }
25018       ;;
25019   esac
25020
25021 else
25022   enable_float4_byval=yes
25023
25024 cat >>confdefs.h <<\_ACEOF
25025 #define USE_FLOAT4_BYVAL 1
25026 _ACEOF
25027
25028                float4passbyval=true
25029 fi
25030
25031
25032 { $as_echo "$as_me:$LINENO: result: $enable_float4_byval" >&5
25033 $as_echo "$enable_float4_byval" >&6; }
25034
25035 cat >>confdefs.h <<_ACEOF
25036 #define FLOAT4PASSBYVAL $float4passbyval
25037 _ACEOF
25038
25039
25040 # Decide whether float8 is passed by value.
25041 # Note: this setting also controls int8 and related types such as timestamp.
25042 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
25043 # If not, trying to select it is an error.
25044 { $as_echo "$as_me:$LINENO: checking whether to build with float8 passed by value" >&5
25045 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
25046 if test $ac_cv_sizeof_void_p -ge 8 ; then
25047
25048
25049 # Check whether --enable-float8-byval was given.
25050 if test "${enable_float8_byval+set}" = set; then
25051   enableval=$enable_float8_byval;
25052   case $enableval in
25053     yes)
25054       :
25055       ;;
25056     no)
25057       :
25058       ;;
25059     *)
25060       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-float8-byval option" >&5
25061 $as_echo "$as_me: error: no argument expected for --enable-float8-byval option" >&2;}
25062    { (exit 1); exit 1; }; }
25063       ;;
25064   esac
25065
25066 else
25067   enable_float8_byval=yes
25068
25069 fi
25070
25071
25072 else
25073
25074
25075 # Check whether --enable-float8-byval was given.
25076 if test "${enable_float8_byval+set}" = set; then
25077   enableval=$enable_float8_byval;
25078   case $enableval in
25079     yes)
25080       :
25081       ;;
25082     no)
25083       :
25084       ;;
25085     *)
25086       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-float8-byval option" >&5
25087 $as_echo "$as_me: error: no argument expected for --enable-float8-byval option" >&2;}
25088    { (exit 1); exit 1; }; }
25089       ;;
25090   esac
25091
25092 else
25093   enable_float8_byval=no
25094
25095 fi
25096
25097
25098   if test "$enable_float8_byval" = yes ; then
25099     { { $as_echo "$as_me:$LINENO: error: --enable-float8-byval is not supported on 32-bit platforms." >&5
25100 $as_echo "$as_me: error: --enable-float8-byval is not supported on 32-bit platforms." >&2;}
25101    { (exit 1); exit 1; }; }
25102   fi
25103 fi
25104 if test "$enable_float8_byval" = yes ; then
25105
25106 cat >>confdefs.h <<\_ACEOF
25107 #define USE_FLOAT8_BYVAL 1
25108 _ACEOF
25109
25110   float8passbyval=true
25111 else
25112   float8passbyval=false
25113 fi
25114 { $as_echo "$as_me:$LINENO: result: $enable_float8_byval" >&5
25115 $as_echo "$enable_float8_byval" >&6; }
25116
25117 cat >>confdefs.h <<_ACEOF
25118 #define FLOAT8PASSBYVAL $float8passbyval
25119 _ACEOF
25120
25121
25122 # Determine memory alignment requirements for the basic C data types.
25123
25124 # The cast to long int works around a bug in the HP C Compiler,
25125 # see AC_CHECK_SIZEOF for more information.
25126 { $as_echo "$as_me:$LINENO: checking alignment of short" >&5
25127 $as_echo_n "checking alignment of short... " >&6; }
25128 if test "${ac_cv_alignof_short+set}" = set; then
25129   $as_echo_n "(cached) " >&6
25130 else
25131   if test "$cross_compiling" = yes; then
25132   # Depending upon the size, compute the lo and hi bounds.
25133 cat >conftest.$ac_ext <<_ACEOF
25134 /* confdefs.h.  */
25135 _ACEOF
25136 cat confdefs.h >>conftest.$ac_ext
25137 cat >>conftest.$ac_ext <<_ACEOF
25138 /* end confdefs.h.  */
25139 $ac_includes_default
25140 #ifndef offsetof
25141 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
25142 #endif
25143 typedef struct { char x; short y; } ac__type_alignof_;
25144 int
25145 main ()
25146 {
25147 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
25148 test_array [0] = 0
25149
25150   ;
25151   return 0;
25152 }
25153 _ACEOF
25154 rm -f conftest.$ac_objext
25155 if { (ac_try="$ac_compile"
25156 case "(($ac_try" in
25157   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25158   *) ac_try_echo=$ac_try;;
25159 esac
25160 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25161 $as_echo "$ac_try_echo") >&5
25162   (eval "$ac_compile") 2>conftest.er1
25163   ac_status=$?
25164   grep -v '^ *+' conftest.er1 >conftest.err
25165   rm -f conftest.er1
25166   cat conftest.err >&5
25167   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25168   (exit $ac_status); } && {
25169          test -z "$ac_c_werror_flag" ||
25170          test ! -s conftest.err
25171        } && test -s conftest.$ac_objext; then
25172   ac_lo=0 ac_mid=0
25173   while :; do
25174     cat >conftest.$ac_ext <<_ACEOF
25175 /* confdefs.h.  */
25176 _ACEOF
25177 cat confdefs.h >>conftest.$ac_ext
25178 cat >>conftest.$ac_ext <<_ACEOF
25179 /* end confdefs.h.  */
25180 $ac_includes_default
25181 #ifndef offsetof
25182 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
25183 #endif
25184 typedef struct { char x; short y; } ac__type_alignof_;
25185 int
25186 main ()
25187 {
25188 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
25189 test_array [0] = 0
25190
25191   ;
25192   return 0;
25193 }
25194 _ACEOF
25195 rm -f conftest.$ac_objext
25196 if { (ac_try="$ac_compile"
25197 case "(($ac_try" in
25198   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25199   *) ac_try_echo=$ac_try;;
25200 esac
25201 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25202 $as_echo "$ac_try_echo") >&5
25203   (eval "$ac_compile") 2>conftest.er1
25204   ac_status=$?
25205   grep -v '^ *+' conftest.er1 >conftest.err
25206   rm -f conftest.er1
25207   cat conftest.err >&5
25208   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25209   (exit $ac_status); } && {
25210          test -z "$ac_c_werror_flag" ||
25211          test ! -s conftest.err
25212        } && test -s conftest.$ac_objext; then
25213   ac_hi=$ac_mid; break
25214 else
25215   $as_echo "$as_me: failed program was:" >&5
25216 sed 's/^/| /' conftest.$ac_ext >&5
25217
25218         ac_lo=`expr $ac_mid + 1`
25219                         if test $ac_lo -le $ac_mid; then
25220                           ac_lo= ac_hi=
25221                           break
25222                         fi
25223                         ac_mid=`expr 2 '*' $ac_mid + 1`
25224 fi
25225
25226 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25227   done
25228 else
25229   $as_echo "$as_me: failed program was:" >&5
25230 sed 's/^/| /' conftest.$ac_ext >&5
25231
25232         cat >conftest.$ac_ext <<_ACEOF
25233 /* confdefs.h.  */
25234 _ACEOF
25235 cat confdefs.h >>conftest.$ac_ext
25236 cat >>conftest.$ac_ext <<_ACEOF
25237 /* end confdefs.h.  */
25238 $ac_includes_default
25239 #ifndef offsetof
25240 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
25241 #endif
25242 typedef struct { char x; short y; } ac__type_alignof_;
25243 int
25244 main ()
25245 {
25246 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
25247 test_array [0] = 0
25248
25249   ;
25250   return 0;
25251 }
25252 _ACEOF
25253 rm -f conftest.$ac_objext
25254 if { (ac_try="$ac_compile"
25255 case "(($ac_try" in
25256   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25257   *) ac_try_echo=$ac_try;;
25258 esac
25259 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25260 $as_echo "$ac_try_echo") >&5
25261   (eval "$ac_compile") 2>conftest.er1
25262   ac_status=$?
25263   grep -v '^ *+' conftest.er1 >conftest.err
25264   rm -f conftest.er1
25265   cat conftest.err >&5
25266   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25267   (exit $ac_status); } && {
25268          test -z "$ac_c_werror_flag" ||
25269          test ! -s conftest.err
25270        } && test -s conftest.$ac_objext; then
25271   ac_hi=-1 ac_mid=-1
25272   while :; do
25273     cat >conftest.$ac_ext <<_ACEOF
25274 /* confdefs.h.  */
25275 _ACEOF
25276 cat confdefs.h >>conftest.$ac_ext
25277 cat >>conftest.$ac_ext <<_ACEOF
25278 /* end confdefs.h.  */
25279 $ac_includes_default
25280 #ifndef offsetof
25281 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
25282 #endif
25283 typedef struct { char x; short y; } ac__type_alignof_;
25284 int
25285 main ()
25286 {
25287 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
25288 test_array [0] = 0
25289
25290   ;
25291   return 0;
25292 }
25293 _ACEOF
25294 rm -f conftest.$ac_objext
25295 if { (ac_try="$ac_compile"
25296 case "(($ac_try" in
25297   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25298   *) ac_try_echo=$ac_try;;
25299 esac
25300 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25301 $as_echo "$ac_try_echo") >&5
25302   (eval "$ac_compile") 2>conftest.er1
25303   ac_status=$?
25304   grep -v '^ *+' conftest.er1 >conftest.err
25305   rm -f conftest.er1
25306   cat conftest.err >&5
25307   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25308   (exit $ac_status); } && {
25309          test -z "$ac_c_werror_flag" ||
25310          test ! -s conftest.err
25311        } && test -s conftest.$ac_objext; then
25312   ac_lo=$ac_mid; break
25313 else
25314   $as_echo "$as_me: failed program was:" >&5
25315 sed 's/^/| /' conftest.$ac_ext >&5
25316
25317         ac_hi=`expr '(' $ac_mid ')' - 1`
25318                         if test $ac_mid -le $ac_hi; then
25319                           ac_lo= ac_hi=
25320                           break
25321                         fi
25322                         ac_mid=`expr 2 '*' $ac_mid`
25323 fi
25324
25325 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25326   done
25327 else
25328   $as_echo "$as_me: failed program was:" >&5
25329 sed 's/^/| /' conftest.$ac_ext >&5
25330
25331         ac_lo= ac_hi=
25332 fi
25333
25334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25335 fi
25336
25337 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25338 # Binary search between lo and hi bounds.
25339 while test "x$ac_lo" != "x$ac_hi"; do
25340   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25341   cat >conftest.$ac_ext <<_ACEOF
25342 /* confdefs.h.  */
25343 _ACEOF
25344 cat confdefs.h >>conftest.$ac_ext
25345 cat >>conftest.$ac_ext <<_ACEOF
25346 /* end confdefs.h.  */
25347 $ac_includes_default
25348 #ifndef offsetof
25349 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
25350 #endif
25351 typedef struct { char x; short y; } ac__type_alignof_;
25352 int
25353 main ()
25354 {
25355 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
25356 test_array [0] = 0
25357
25358   ;
25359   return 0;
25360 }
25361 _ACEOF
25362 rm -f conftest.$ac_objext
25363 if { (ac_try="$ac_compile"
25364 case "(($ac_try" in
25365   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25366   *) ac_try_echo=$ac_try;;
25367 esac
25368 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25369 $as_echo "$ac_try_echo") >&5
25370   (eval "$ac_compile") 2>conftest.er1
25371   ac_status=$?
25372   grep -v '^ *+' conftest.er1 >conftest.err
25373   rm -f conftest.er1
25374   cat conftest.err >&5
25375   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25376   (exit $ac_status); } && {
25377          test -z "$ac_c_werror_flag" ||
25378          test ! -s conftest.err
25379        } && test -s conftest.$ac_objext; then
25380   ac_hi=$ac_mid
25381 else
25382   $as_echo "$as_me: failed program was:" >&5
25383 sed 's/^/| /' conftest.$ac_ext >&5
25384
25385         ac_lo=`expr '(' $ac_mid ')' + 1`
25386 fi
25387
25388 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25389 done
25390 case $ac_lo in
25391 ?*) ac_cv_alignof_short=$ac_lo;;
25392 '') if test "$ac_cv_type_short" = yes; then
25393      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25394 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25395 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of short
25396 See \`config.log' for more details." >&5
25397 $as_echo "$as_me: error: cannot compute alignment of short
25398 See \`config.log' for more details." >&2;}
25399    { (exit 77); exit 77; }; }; }
25400    else
25401      ac_cv_alignof_short=0
25402    fi ;;
25403 esac
25404 else
25405   cat >conftest.$ac_ext <<_ACEOF
25406 /* confdefs.h.  */
25407 _ACEOF
25408 cat confdefs.h >>conftest.$ac_ext
25409 cat >>conftest.$ac_ext <<_ACEOF
25410 /* end confdefs.h.  */
25411 $ac_includes_default
25412 #ifndef offsetof
25413 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
25414 #endif
25415 typedef struct { char x; short y; } ac__type_alignof_;
25416 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
25417 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
25418 #include <stdio.h>
25419 #include <stdlib.h>
25420 int
25421 main ()
25422 {
25423
25424   FILE *f = fopen ("conftest.val", "w");
25425   if (! f)
25426     return 1;
25427   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
25428     {
25429       long int i = longval ();
25430       if (i != ((long int) offsetof (ac__type_alignof_, y)))
25431         return 1;
25432       fprintf (f, "%ld", i);
25433     }
25434   else
25435     {
25436       unsigned long int i = ulongval ();
25437       if (i != ((long int) offsetof (ac__type_alignof_, y)))
25438         return 1;
25439       fprintf (f, "%lu", i);
25440     }
25441   /* Do not output a trailing newline, as this causes \r\n confusion
25442      on some platforms.  */
25443   return ferror (f) || fclose (f) != 0;
25444
25445   ;
25446   return 0;
25447 }
25448 _ACEOF
25449 rm -f conftest$ac_exeext
25450 if { (ac_try="$ac_link"
25451 case "(($ac_try" in
25452   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25453   *) ac_try_echo=$ac_try;;
25454 esac
25455 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25456 $as_echo "$ac_try_echo") >&5
25457   (eval "$ac_link") 2>&5
25458   ac_status=$?
25459   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25460   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25461   { (case "(($ac_try" in
25462   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25463   *) ac_try_echo=$ac_try;;
25464 esac
25465 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25466 $as_echo "$ac_try_echo") >&5
25467   (eval "$ac_try") 2>&5
25468   ac_status=$?
25469   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25470   (exit $ac_status); }; }; then
25471   ac_cv_alignof_short=`cat conftest.val`
25472 else
25473   $as_echo "$as_me: program exited with status $ac_status" >&5
25474 $as_echo "$as_me: failed program was:" >&5
25475 sed 's/^/| /' conftest.$ac_ext >&5
25476
25477 ( exit $ac_status )
25478 if test "$ac_cv_type_short" = yes; then
25479      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25480 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25481 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of short
25482 See \`config.log' for more details." >&5
25483 $as_echo "$as_me: error: cannot compute alignment of short
25484 See \`config.log' for more details." >&2;}
25485    { (exit 77); exit 77; }; }; }
25486    else
25487      ac_cv_alignof_short=0
25488    fi
25489 fi
25490 rm -rf conftest.dSYM
25491 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25492 fi
25493 rm -f conftest.val
25494 fi
25495 { $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_short" >&5
25496 $as_echo "$ac_cv_alignof_short" >&6; }
25497
25498
25499
25500 cat >>confdefs.h <<_ACEOF
25501 #define ALIGNOF_SHORT $ac_cv_alignof_short
25502 _ACEOF
25503
25504
25505 # The cast to long int works around a bug in the HP C Compiler,
25506 # see AC_CHECK_SIZEOF for more information.
25507 { $as_echo "$as_me:$LINENO: checking alignment of int" >&5
25508 $as_echo_n "checking alignment of int... " >&6; }
25509 if test "${ac_cv_alignof_int+set}" = set; then
25510   $as_echo_n "(cached) " >&6
25511 else
25512   if test "$cross_compiling" = yes; then
25513   # Depending upon the size, compute the lo and hi bounds.
25514 cat >conftest.$ac_ext <<_ACEOF
25515 /* confdefs.h.  */
25516 _ACEOF
25517 cat confdefs.h >>conftest.$ac_ext
25518 cat >>conftest.$ac_ext <<_ACEOF
25519 /* end confdefs.h.  */
25520 $ac_includes_default
25521 #ifndef offsetof
25522 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
25523 #endif
25524 typedef struct { char x; int y; } ac__type_alignof_;
25525 int
25526 main ()
25527 {
25528 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
25529 test_array [0] = 0
25530
25531   ;
25532   return 0;
25533 }
25534 _ACEOF
25535 rm -f conftest.$ac_objext
25536 if { (ac_try="$ac_compile"
25537 case "(($ac_try" in
25538   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25539   *) ac_try_echo=$ac_try;;
25540 esac
25541 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25542 $as_echo "$ac_try_echo") >&5
25543   (eval "$ac_compile") 2>conftest.er1
25544   ac_status=$?
25545   grep -v '^ *+' conftest.er1 >conftest.err
25546   rm -f conftest.er1
25547   cat conftest.err >&5
25548   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25549   (exit $ac_status); } && {
25550          test -z "$ac_c_werror_flag" ||
25551          test ! -s conftest.err
25552        } && test -s conftest.$ac_objext; then
25553   ac_lo=0 ac_mid=0
25554   while :; do
25555     cat >conftest.$ac_ext <<_ACEOF
25556 /* confdefs.h.  */
25557 _ACEOF
25558 cat confdefs.h >>conftest.$ac_ext
25559 cat >>conftest.$ac_ext <<_ACEOF
25560 /* end confdefs.h.  */
25561 $ac_includes_default
25562 #ifndef offsetof
25563 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
25564 #endif
25565 typedef struct { char x; int y; } ac__type_alignof_;
25566 int
25567 main ()
25568 {
25569 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
25570 test_array [0] = 0
25571
25572   ;
25573   return 0;
25574 }
25575 _ACEOF
25576 rm -f conftest.$ac_objext
25577 if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
25585   ac_status=$?
25586   grep -v '^ *+' conftest.er1 >conftest.err
25587   rm -f conftest.er1
25588   cat conftest.err >&5
25589   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25590   (exit $ac_status); } && {
25591          test -z "$ac_c_werror_flag" ||
25592          test ! -s conftest.err
25593        } && test -s conftest.$ac_objext; then
25594   ac_hi=$ac_mid; break
25595 else
25596   $as_echo "$as_me: failed program was:" >&5
25597 sed 's/^/| /' conftest.$ac_ext >&5
25598
25599         ac_lo=`expr $ac_mid + 1`
25600                         if test $ac_lo -le $ac_mid; then
25601                           ac_lo= ac_hi=
25602                           break
25603                         fi
25604                         ac_mid=`expr 2 '*' $ac_mid + 1`
25605 fi
25606
25607 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25608   done
25609 else
25610   $as_echo "$as_me: failed program was:" >&5
25611 sed 's/^/| /' conftest.$ac_ext >&5
25612
25613         cat >conftest.$ac_ext <<_ACEOF
25614 /* confdefs.h.  */
25615 _ACEOF
25616 cat confdefs.h >>conftest.$ac_ext
25617 cat >>conftest.$ac_ext <<_ACEOF
25618 /* end confdefs.h.  */
25619 $ac_includes_default
25620 #ifndef offsetof
25621 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
25622 #endif
25623 typedef struct { char x; int y; } ac__type_alignof_;
25624 int
25625 main ()
25626 {
25627 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
25628 test_array [0] = 0
25629
25630   ;
25631   return 0;
25632 }
25633 _ACEOF
25634 rm -f conftest.$ac_objext
25635 if { (ac_try="$ac_compile"
25636 case "(($ac_try" in
25637   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25638   *) ac_try_echo=$ac_try;;
25639 esac
25640 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25641 $as_echo "$ac_try_echo") >&5
25642   (eval "$ac_compile") 2>conftest.er1
25643   ac_status=$?
25644   grep -v '^ *+' conftest.er1 >conftest.err
25645   rm -f conftest.er1
25646   cat conftest.err >&5
25647   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25648   (exit $ac_status); } && {
25649          test -z "$ac_c_werror_flag" ||
25650          test ! -s conftest.err
25651        } && test -s conftest.$ac_objext; then
25652   ac_hi=-1 ac_mid=-1
25653   while :; do
25654     cat >conftest.$ac_ext <<_ACEOF
25655 /* confdefs.h.  */
25656 _ACEOF
25657 cat confdefs.h >>conftest.$ac_ext
25658 cat >>conftest.$ac_ext <<_ACEOF
25659 /* end confdefs.h.  */
25660 $ac_includes_default
25661 #ifndef offsetof
25662 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
25663 #endif
25664 typedef struct { char x; int y; } ac__type_alignof_;
25665 int
25666 main ()
25667 {
25668 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
25669 test_array [0] = 0
25670
25671   ;
25672   return 0;
25673 }
25674 _ACEOF
25675 rm -f conftest.$ac_objext
25676 if { (ac_try="$ac_compile"
25677 case "(($ac_try" in
25678   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25679   *) ac_try_echo=$ac_try;;
25680 esac
25681 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25682 $as_echo "$ac_try_echo") >&5
25683   (eval "$ac_compile") 2>conftest.er1
25684   ac_status=$?
25685   grep -v '^ *+' conftest.er1 >conftest.err
25686   rm -f conftest.er1
25687   cat conftest.err >&5
25688   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25689   (exit $ac_status); } && {
25690          test -z "$ac_c_werror_flag" ||
25691          test ! -s conftest.err
25692        } && test -s conftest.$ac_objext; then
25693   ac_lo=$ac_mid; break
25694 else
25695   $as_echo "$as_me: failed program was:" >&5
25696 sed 's/^/| /' conftest.$ac_ext >&5
25697
25698         ac_hi=`expr '(' $ac_mid ')' - 1`
25699                         if test $ac_mid -le $ac_hi; then
25700                           ac_lo= ac_hi=
25701                           break
25702                         fi
25703                         ac_mid=`expr 2 '*' $ac_mid`
25704 fi
25705
25706 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25707   done
25708 else
25709   $as_echo "$as_me: failed program was:" >&5
25710 sed 's/^/| /' conftest.$ac_ext >&5
25711
25712         ac_lo= ac_hi=
25713 fi
25714
25715 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25716 fi
25717
25718 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25719 # Binary search between lo and hi bounds.
25720 while test "x$ac_lo" != "x$ac_hi"; do
25721   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25722   cat >conftest.$ac_ext <<_ACEOF
25723 /* confdefs.h.  */
25724 _ACEOF
25725 cat confdefs.h >>conftest.$ac_ext
25726 cat >>conftest.$ac_ext <<_ACEOF
25727 /* end confdefs.h.  */
25728 $ac_includes_default
25729 #ifndef offsetof
25730 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
25731 #endif
25732 typedef struct { char x; int y; } ac__type_alignof_;
25733 int
25734 main ()
25735 {
25736 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
25737 test_array [0] = 0
25738
25739   ;
25740   return 0;
25741 }
25742 _ACEOF
25743 rm -f conftest.$ac_objext
25744 if { (ac_try="$ac_compile"
25745 case "(($ac_try" in
25746   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25747   *) ac_try_echo=$ac_try;;
25748 esac
25749 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25750 $as_echo "$ac_try_echo") >&5
25751   (eval "$ac_compile") 2>conftest.er1
25752   ac_status=$?
25753   grep -v '^ *+' conftest.er1 >conftest.err
25754   rm -f conftest.er1
25755   cat conftest.err >&5
25756   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25757   (exit $ac_status); } && {
25758          test -z "$ac_c_werror_flag" ||
25759          test ! -s conftest.err
25760        } && test -s conftest.$ac_objext; then
25761   ac_hi=$ac_mid
25762 else
25763   $as_echo "$as_me: failed program was:" >&5
25764 sed 's/^/| /' conftest.$ac_ext >&5
25765
25766         ac_lo=`expr '(' $ac_mid ')' + 1`
25767 fi
25768
25769 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25770 done
25771 case $ac_lo in
25772 ?*) ac_cv_alignof_int=$ac_lo;;
25773 '') if test "$ac_cv_type_int" = yes; then
25774      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25775 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25776 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of int
25777 See \`config.log' for more details." >&5
25778 $as_echo "$as_me: error: cannot compute alignment of int
25779 See \`config.log' for more details." >&2;}
25780    { (exit 77); exit 77; }; }; }
25781    else
25782      ac_cv_alignof_int=0
25783    fi ;;
25784 esac
25785 else
25786   cat >conftest.$ac_ext <<_ACEOF
25787 /* confdefs.h.  */
25788 _ACEOF
25789 cat confdefs.h >>conftest.$ac_ext
25790 cat >>conftest.$ac_ext <<_ACEOF
25791 /* end confdefs.h.  */
25792 $ac_includes_default
25793 #ifndef offsetof
25794 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
25795 #endif
25796 typedef struct { char x; int y; } ac__type_alignof_;
25797 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
25798 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
25799 #include <stdio.h>
25800 #include <stdlib.h>
25801 int
25802 main ()
25803 {
25804
25805   FILE *f = fopen ("conftest.val", "w");
25806   if (! f)
25807     return 1;
25808   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
25809     {
25810       long int i = longval ();
25811       if (i != ((long int) offsetof (ac__type_alignof_, y)))
25812         return 1;
25813       fprintf (f, "%ld", i);
25814     }
25815   else
25816     {
25817       unsigned long int i = ulongval ();
25818       if (i != ((long int) offsetof (ac__type_alignof_, y)))
25819         return 1;
25820       fprintf (f, "%lu", i);
25821     }
25822   /* Do not output a trailing newline, as this causes \r\n confusion
25823      on some platforms.  */
25824   return ferror (f) || fclose (f) != 0;
25825
25826   ;
25827   return 0;
25828 }
25829 _ACEOF
25830 rm -f conftest$ac_exeext
25831 if { (ac_try="$ac_link"
25832 case "(($ac_try" in
25833   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25834   *) ac_try_echo=$ac_try;;
25835 esac
25836 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25837 $as_echo "$ac_try_echo") >&5
25838   (eval "$ac_link") 2>&5
25839   ac_status=$?
25840   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25841   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25842   { (case "(($ac_try" in
25843   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25844   *) ac_try_echo=$ac_try;;
25845 esac
25846 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25847 $as_echo "$ac_try_echo") >&5
25848   (eval "$ac_try") 2>&5
25849   ac_status=$?
25850   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25851   (exit $ac_status); }; }; then
25852   ac_cv_alignof_int=`cat conftest.val`
25853 else
25854   $as_echo "$as_me: program exited with status $ac_status" >&5
25855 $as_echo "$as_me: failed program was:" >&5
25856 sed 's/^/| /' conftest.$ac_ext >&5
25857
25858 ( exit $ac_status )
25859 if test "$ac_cv_type_int" = yes; then
25860      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25861 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25862 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of int
25863 See \`config.log' for more details." >&5
25864 $as_echo "$as_me: error: cannot compute alignment of int
25865 See \`config.log' for more details." >&2;}
25866    { (exit 77); exit 77; }; }; }
25867    else
25868      ac_cv_alignof_int=0
25869    fi
25870 fi
25871 rm -rf conftest.dSYM
25872 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25873 fi
25874 rm -f conftest.val
25875 fi
25876 { $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_int" >&5
25877 $as_echo "$ac_cv_alignof_int" >&6; }
25878
25879
25880
25881 cat >>confdefs.h <<_ACEOF
25882 #define ALIGNOF_INT $ac_cv_alignof_int
25883 _ACEOF
25884
25885
25886 # The cast to long int works around a bug in the HP C Compiler,
25887 # see AC_CHECK_SIZEOF for more information.
25888 { $as_echo "$as_me:$LINENO: checking alignment of long" >&5
25889 $as_echo_n "checking alignment of long... " >&6; }
25890 if test "${ac_cv_alignof_long+set}" = set; then
25891   $as_echo_n "(cached) " >&6
25892 else
25893   if test "$cross_compiling" = yes; then
25894   # Depending upon the size, compute the lo and hi bounds.
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 #ifndef offsetof
25903 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
25904 #endif
25905 typedef struct { char x; long y; } ac__type_alignof_;
25906 int
25907 main ()
25908 {
25909 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
25910 test_array [0] = 0
25911
25912   ;
25913   return 0;
25914 }
25915 _ACEOF
25916 rm -f conftest.$ac_objext
25917 if { (ac_try="$ac_compile"
25918 case "(($ac_try" in
25919   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25920   *) ac_try_echo=$ac_try;;
25921 esac
25922 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25923 $as_echo "$ac_try_echo") >&5
25924   (eval "$ac_compile") 2>conftest.er1
25925   ac_status=$?
25926   grep -v '^ *+' conftest.er1 >conftest.err
25927   rm -f conftest.er1
25928   cat conftest.err >&5
25929   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25930   (exit $ac_status); } && {
25931          test -z "$ac_c_werror_flag" ||
25932          test ! -s conftest.err
25933        } && test -s conftest.$ac_objext; then
25934   ac_lo=0 ac_mid=0
25935   while :; do
25936     cat >conftest.$ac_ext <<_ACEOF
25937 /* confdefs.h.  */
25938 _ACEOF
25939 cat confdefs.h >>conftest.$ac_ext
25940 cat >>conftest.$ac_ext <<_ACEOF
25941 /* end confdefs.h.  */
25942 $ac_includes_default
25943 #ifndef offsetof
25944 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
25945 #endif
25946 typedef struct { char x; long y; } ac__type_alignof_;
25947 int
25948 main ()
25949 {
25950 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
25951 test_array [0] = 0
25952
25953   ;
25954   return 0;
25955 }
25956 _ACEOF
25957 rm -f conftest.$ac_objext
25958 if { (ac_try="$ac_compile"
25959 case "(($ac_try" in
25960   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25961   *) ac_try_echo=$ac_try;;
25962 esac
25963 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25964 $as_echo "$ac_try_echo") >&5
25965   (eval "$ac_compile") 2>conftest.er1
25966   ac_status=$?
25967   grep -v '^ *+' conftest.er1 >conftest.err
25968   rm -f conftest.er1
25969   cat conftest.err >&5
25970   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25971   (exit $ac_status); } && {
25972          test -z "$ac_c_werror_flag" ||
25973          test ! -s conftest.err
25974        } && test -s conftest.$ac_objext; then
25975   ac_hi=$ac_mid; break
25976 else
25977   $as_echo "$as_me: failed program was:" >&5
25978 sed 's/^/| /' conftest.$ac_ext >&5
25979
25980         ac_lo=`expr $ac_mid + 1`
25981                         if test $ac_lo -le $ac_mid; then
25982                           ac_lo= ac_hi=
25983                           break
25984                         fi
25985                         ac_mid=`expr 2 '*' $ac_mid + 1`
25986 fi
25987
25988 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25989   done
25990 else
25991   $as_echo "$as_me: failed program was:" >&5
25992 sed 's/^/| /' conftest.$ac_ext >&5
25993
25994         cat >conftest.$ac_ext <<_ACEOF
25995 /* confdefs.h.  */
25996 _ACEOF
25997 cat confdefs.h >>conftest.$ac_ext
25998 cat >>conftest.$ac_ext <<_ACEOF
25999 /* end confdefs.h.  */
26000 $ac_includes_default
26001 #ifndef offsetof
26002 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26003 #endif
26004 typedef struct { char x; long y; } ac__type_alignof_;
26005 int
26006 main ()
26007 {
26008 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
26009 test_array [0] = 0
26010
26011   ;
26012   return 0;
26013 }
26014 _ACEOF
26015 rm -f conftest.$ac_objext
26016 if { (ac_try="$ac_compile"
26017 case "(($ac_try" in
26018   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26019   *) ac_try_echo=$ac_try;;
26020 esac
26021 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26022 $as_echo "$ac_try_echo") >&5
26023   (eval "$ac_compile") 2>conftest.er1
26024   ac_status=$?
26025   grep -v '^ *+' conftest.er1 >conftest.err
26026   rm -f conftest.er1
26027   cat conftest.err >&5
26028   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26029   (exit $ac_status); } && {
26030          test -z "$ac_c_werror_flag" ||
26031          test ! -s conftest.err
26032        } && test -s conftest.$ac_objext; then
26033   ac_hi=-1 ac_mid=-1
26034   while :; do
26035     cat >conftest.$ac_ext <<_ACEOF
26036 /* confdefs.h.  */
26037 _ACEOF
26038 cat confdefs.h >>conftest.$ac_ext
26039 cat >>conftest.$ac_ext <<_ACEOF
26040 /* end confdefs.h.  */
26041 $ac_includes_default
26042 #ifndef offsetof
26043 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26044 #endif
26045 typedef struct { char x; long y; } ac__type_alignof_;
26046 int
26047 main ()
26048 {
26049 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
26050 test_array [0] = 0
26051
26052   ;
26053   return 0;
26054 }
26055 _ACEOF
26056 rm -f conftest.$ac_objext
26057 if { (ac_try="$ac_compile"
26058 case "(($ac_try" in
26059   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26060   *) ac_try_echo=$ac_try;;
26061 esac
26062 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26063 $as_echo "$ac_try_echo") >&5
26064   (eval "$ac_compile") 2>conftest.er1
26065   ac_status=$?
26066   grep -v '^ *+' conftest.er1 >conftest.err
26067   rm -f conftest.er1
26068   cat conftest.err >&5
26069   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26070   (exit $ac_status); } && {
26071          test -z "$ac_c_werror_flag" ||
26072          test ! -s conftest.err
26073        } && test -s conftest.$ac_objext; then
26074   ac_lo=$ac_mid; break
26075 else
26076   $as_echo "$as_me: failed program was:" >&5
26077 sed 's/^/| /' conftest.$ac_ext >&5
26078
26079         ac_hi=`expr '(' $ac_mid ')' - 1`
26080                         if test $ac_mid -le $ac_hi; then
26081                           ac_lo= ac_hi=
26082                           break
26083                         fi
26084                         ac_mid=`expr 2 '*' $ac_mid`
26085 fi
26086
26087 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26088   done
26089 else
26090   $as_echo "$as_me: failed program was:" >&5
26091 sed 's/^/| /' conftest.$ac_ext >&5
26092
26093         ac_lo= ac_hi=
26094 fi
26095
26096 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26097 fi
26098
26099 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26100 # Binary search between lo and hi bounds.
26101 while test "x$ac_lo" != "x$ac_hi"; do
26102   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
26103   cat >conftest.$ac_ext <<_ACEOF
26104 /* confdefs.h.  */
26105 _ACEOF
26106 cat confdefs.h >>conftest.$ac_ext
26107 cat >>conftest.$ac_ext <<_ACEOF
26108 /* end confdefs.h.  */
26109 $ac_includes_default
26110 #ifndef offsetof
26111 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26112 #endif
26113 typedef struct { char x; long y; } ac__type_alignof_;
26114 int
26115 main ()
26116 {
26117 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
26118 test_array [0] = 0
26119
26120   ;
26121   return 0;
26122 }
26123 _ACEOF
26124 rm -f conftest.$ac_objext
26125 if { (ac_try="$ac_compile"
26126 case "(($ac_try" in
26127   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26128   *) ac_try_echo=$ac_try;;
26129 esac
26130 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26131 $as_echo "$ac_try_echo") >&5
26132   (eval "$ac_compile") 2>conftest.er1
26133   ac_status=$?
26134   grep -v '^ *+' conftest.er1 >conftest.err
26135   rm -f conftest.er1
26136   cat conftest.err >&5
26137   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26138   (exit $ac_status); } && {
26139          test -z "$ac_c_werror_flag" ||
26140          test ! -s conftest.err
26141        } && test -s conftest.$ac_objext; then
26142   ac_hi=$ac_mid
26143 else
26144   $as_echo "$as_me: failed program was:" >&5
26145 sed 's/^/| /' conftest.$ac_ext >&5
26146
26147         ac_lo=`expr '(' $ac_mid ')' + 1`
26148 fi
26149
26150 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26151 done
26152 case $ac_lo in
26153 ?*) ac_cv_alignof_long=$ac_lo;;
26154 '') if test "$ac_cv_type_long" = yes; then
26155      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
26156 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26157 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long
26158 See \`config.log' for more details." >&5
26159 $as_echo "$as_me: error: cannot compute alignment of long
26160 See \`config.log' for more details." >&2;}
26161    { (exit 77); exit 77; }; }; }
26162    else
26163      ac_cv_alignof_long=0
26164    fi ;;
26165 esac
26166 else
26167   cat >conftest.$ac_ext <<_ACEOF
26168 /* confdefs.h.  */
26169 _ACEOF
26170 cat confdefs.h >>conftest.$ac_ext
26171 cat >>conftest.$ac_ext <<_ACEOF
26172 /* end confdefs.h.  */
26173 $ac_includes_default
26174 #ifndef offsetof
26175 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26176 #endif
26177 typedef struct { char x; long y; } ac__type_alignof_;
26178 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
26179 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
26180 #include <stdio.h>
26181 #include <stdlib.h>
26182 int
26183 main ()
26184 {
26185
26186   FILE *f = fopen ("conftest.val", "w");
26187   if (! f)
26188     return 1;
26189   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
26190     {
26191       long int i = longval ();
26192       if (i != ((long int) offsetof (ac__type_alignof_, y)))
26193         return 1;
26194       fprintf (f, "%ld", i);
26195     }
26196   else
26197     {
26198       unsigned long int i = ulongval ();
26199       if (i != ((long int) offsetof (ac__type_alignof_, y)))
26200         return 1;
26201       fprintf (f, "%lu", i);
26202     }
26203   /* Do not output a trailing newline, as this causes \r\n confusion
26204      on some platforms.  */
26205   return ferror (f) || fclose (f) != 0;
26206
26207   ;
26208   return 0;
26209 }
26210 _ACEOF
26211 rm -f conftest$ac_exeext
26212 if { (ac_try="$ac_link"
26213 case "(($ac_try" in
26214   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26215   *) ac_try_echo=$ac_try;;
26216 esac
26217 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26218 $as_echo "$ac_try_echo") >&5
26219   (eval "$ac_link") 2>&5
26220   ac_status=$?
26221   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26222   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26223   { (case "(($ac_try" in
26224   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26225   *) ac_try_echo=$ac_try;;
26226 esac
26227 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26228 $as_echo "$ac_try_echo") >&5
26229   (eval "$ac_try") 2>&5
26230   ac_status=$?
26231   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26232   (exit $ac_status); }; }; then
26233   ac_cv_alignof_long=`cat conftest.val`
26234 else
26235   $as_echo "$as_me: program exited with status $ac_status" >&5
26236 $as_echo "$as_me: failed program was:" >&5
26237 sed 's/^/| /' conftest.$ac_ext >&5
26238
26239 ( exit $ac_status )
26240 if test "$ac_cv_type_long" = yes; then
26241      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
26242 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26243 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long
26244 See \`config.log' for more details." >&5
26245 $as_echo "$as_me: error: cannot compute alignment of long
26246 See \`config.log' for more details." >&2;}
26247    { (exit 77); exit 77; }; }; }
26248    else
26249      ac_cv_alignof_long=0
26250    fi
26251 fi
26252 rm -rf conftest.dSYM
26253 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26254 fi
26255 rm -f conftest.val
26256 fi
26257 { $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_long" >&5
26258 $as_echo "$ac_cv_alignof_long" >&6; }
26259
26260
26261
26262 cat >>confdefs.h <<_ACEOF
26263 #define ALIGNOF_LONG $ac_cv_alignof_long
26264 _ACEOF
26265
26266
26267 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
26268   # The cast to long int works around a bug in the HP C Compiler,
26269 # see AC_CHECK_SIZEOF for more information.
26270 { $as_echo "$as_me:$LINENO: checking alignment of long long int" >&5
26271 $as_echo_n "checking alignment of long long int... " >&6; }
26272 if test "${ac_cv_alignof_long_long_int+set}" = set; then
26273   $as_echo_n "(cached) " >&6
26274 else
26275   if test "$cross_compiling" = yes; then
26276   # Depending upon the size, compute the lo and hi bounds.
26277 cat >conftest.$ac_ext <<_ACEOF
26278 /* confdefs.h.  */
26279 _ACEOF
26280 cat confdefs.h >>conftest.$ac_ext
26281 cat >>conftest.$ac_ext <<_ACEOF
26282 /* end confdefs.h.  */
26283 $ac_includes_default
26284 #ifndef offsetof
26285 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26286 #endif
26287 typedef struct { char x; long long int y; } ac__type_alignof_;
26288 int
26289 main ()
26290 {
26291 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
26292 test_array [0] = 0
26293
26294   ;
26295   return 0;
26296 }
26297 _ACEOF
26298 rm -f conftest.$ac_objext
26299 if { (ac_try="$ac_compile"
26300 case "(($ac_try" in
26301   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26302   *) ac_try_echo=$ac_try;;
26303 esac
26304 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26305 $as_echo "$ac_try_echo") >&5
26306   (eval "$ac_compile") 2>conftest.er1
26307   ac_status=$?
26308   grep -v '^ *+' conftest.er1 >conftest.err
26309   rm -f conftest.er1
26310   cat conftest.err >&5
26311   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26312   (exit $ac_status); } && {
26313          test -z "$ac_c_werror_flag" ||
26314          test ! -s conftest.err
26315        } && test -s conftest.$ac_objext; then
26316   ac_lo=0 ac_mid=0
26317   while :; do
26318     cat >conftest.$ac_ext <<_ACEOF
26319 /* confdefs.h.  */
26320 _ACEOF
26321 cat confdefs.h >>conftest.$ac_ext
26322 cat >>conftest.$ac_ext <<_ACEOF
26323 /* end confdefs.h.  */
26324 $ac_includes_default
26325 #ifndef offsetof
26326 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26327 #endif
26328 typedef struct { char x; long long int y; } ac__type_alignof_;
26329 int
26330 main ()
26331 {
26332 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
26333 test_array [0] = 0
26334
26335   ;
26336   return 0;
26337 }
26338 _ACEOF
26339 rm -f conftest.$ac_objext
26340 if { (ac_try="$ac_compile"
26341 case "(($ac_try" in
26342   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26343   *) ac_try_echo=$ac_try;;
26344 esac
26345 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26346 $as_echo "$ac_try_echo") >&5
26347   (eval "$ac_compile") 2>conftest.er1
26348   ac_status=$?
26349   grep -v '^ *+' conftest.er1 >conftest.err
26350   rm -f conftest.er1
26351   cat conftest.err >&5
26352   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26353   (exit $ac_status); } && {
26354          test -z "$ac_c_werror_flag" ||
26355          test ! -s conftest.err
26356        } && test -s conftest.$ac_objext; then
26357   ac_hi=$ac_mid; break
26358 else
26359   $as_echo "$as_me: failed program was:" >&5
26360 sed 's/^/| /' conftest.$ac_ext >&5
26361
26362         ac_lo=`expr $ac_mid + 1`
26363                         if test $ac_lo -le $ac_mid; then
26364                           ac_lo= ac_hi=
26365                           break
26366                         fi
26367                         ac_mid=`expr 2 '*' $ac_mid + 1`
26368 fi
26369
26370 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26371   done
26372 else
26373   $as_echo "$as_me: failed program was:" >&5
26374 sed 's/^/| /' conftest.$ac_ext >&5
26375
26376         cat >conftest.$ac_ext <<_ACEOF
26377 /* confdefs.h.  */
26378 _ACEOF
26379 cat confdefs.h >>conftest.$ac_ext
26380 cat >>conftest.$ac_ext <<_ACEOF
26381 /* end confdefs.h.  */
26382 $ac_includes_default
26383 #ifndef offsetof
26384 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26385 #endif
26386 typedef struct { char x; long long int y; } ac__type_alignof_;
26387 int
26388 main ()
26389 {
26390 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
26391 test_array [0] = 0
26392
26393   ;
26394   return 0;
26395 }
26396 _ACEOF
26397 rm -f conftest.$ac_objext
26398 if { (ac_try="$ac_compile"
26399 case "(($ac_try" in
26400   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26401   *) ac_try_echo=$ac_try;;
26402 esac
26403 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26404 $as_echo "$ac_try_echo") >&5
26405   (eval "$ac_compile") 2>conftest.er1
26406   ac_status=$?
26407   grep -v '^ *+' conftest.er1 >conftest.err
26408   rm -f conftest.er1
26409   cat conftest.err >&5
26410   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26411   (exit $ac_status); } && {
26412          test -z "$ac_c_werror_flag" ||
26413          test ! -s conftest.err
26414        } && test -s conftest.$ac_objext; then
26415   ac_hi=-1 ac_mid=-1
26416   while :; do
26417     cat >conftest.$ac_ext <<_ACEOF
26418 /* confdefs.h.  */
26419 _ACEOF
26420 cat confdefs.h >>conftest.$ac_ext
26421 cat >>conftest.$ac_ext <<_ACEOF
26422 /* end confdefs.h.  */
26423 $ac_includes_default
26424 #ifndef offsetof
26425 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26426 #endif
26427 typedef struct { char x; long long int y; } ac__type_alignof_;
26428 int
26429 main ()
26430 {
26431 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
26432 test_array [0] = 0
26433
26434   ;
26435   return 0;
26436 }
26437 _ACEOF
26438 rm -f conftest.$ac_objext
26439 if { (ac_try="$ac_compile"
26440 case "(($ac_try" in
26441   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26442   *) ac_try_echo=$ac_try;;
26443 esac
26444 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26445 $as_echo "$ac_try_echo") >&5
26446   (eval "$ac_compile") 2>conftest.er1
26447   ac_status=$?
26448   grep -v '^ *+' conftest.er1 >conftest.err
26449   rm -f conftest.er1
26450   cat conftest.err >&5
26451   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26452   (exit $ac_status); } && {
26453          test -z "$ac_c_werror_flag" ||
26454          test ! -s conftest.err
26455        } && test -s conftest.$ac_objext; then
26456   ac_lo=$ac_mid; break
26457 else
26458   $as_echo "$as_me: failed program was:" >&5
26459 sed 's/^/| /' conftest.$ac_ext >&5
26460
26461         ac_hi=`expr '(' $ac_mid ')' - 1`
26462                         if test $ac_mid -le $ac_hi; then
26463                           ac_lo= ac_hi=
26464                           break
26465                         fi
26466                         ac_mid=`expr 2 '*' $ac_mid`
26467 fi
26468
26469 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26470   done
26471 else
26472   $as_echo "$as_me: failed program was:" >&5
26473 sed 's/^/| /' conftest.$ac_ext >&5
26474
26475         ac_lo= ac_hi=
26476 fi
26477
26478 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26479 fi
26480
26481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26482 # Binary search between lo and hi bounds.
26483 while test "x$ac_lo" != "x$ac_hi"; do
26484   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
26485   cat >conftest.$ac_ext <<_ACEOF
26486 /* confdefs.h.  */
26487 _ACEOF
26488 cat confdefs.h >>conftest.$ac_ext
26489 cat >>conftest.$ac_ext <<_ACEOF
26490 /* end confdefs.h.  */
26491 $ac_includes_default
26492 #ifndef offsetof
26493 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26494 #endif
26495 typedef struct { char x; long long int y; } ac__type_alignof_;
26496 int
26497 main ()
26498 {
26499 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
26500 test_array [0] = 0
26501
26502   ;
26503   return 0;
26504 }
26505 _ACEOF
26506 rm -f conftest.$ac_objext
26507 if { (ac_try="$ac_compile"
26508 case "(($ac_try" in
26509   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26510   *) ac_try_echo=$ac_try;;
26511 esac
26512 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26513 $as_echo "$ac_try_echo") >&5
26514   (eval "$ac_compile") 2>conftest.er1
26515   ac_status=$?
26516   grep -v '^ *+' conftest.er1 >conftest.err
26517   rm -f conftest.er1
26518   cat conftest.err >&5
26519   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26520   (exit $ac_status); } && {
26521          test -z "$ac_c_werror_flag" ||
26522          test ! -s conftest.err
26523        } && test -s conftest.$ac_objext; then
26524   ac_hi=$ac_mid
26525 else
26526   $as_echo "$as_me: failed program was:" >&5
26527 sed 's/^/| /' conftest.$ac_ext >&5
26528
26529         ac_lo=`expr '(' $ac_mid ')' + 1`
26530 fi
26531
26532 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26533 done
26534 case $ac_lo in
26535 ?*) ac_cv_alignof_long_long_int=$ac_lo;;
26536 '') if test "$ac_cv_type_long_long_int" = yes; then
26537      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
26538 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26539 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long long int
26540 See \`config.log' for more details." >&5
26541 $as_echo "$as_me: error: cannot compute alignment of long long int
26542 See \`config.log' for more details." >&2;}
26543    { (exit 77); exit 77; }; }; }
26544    else
26545      ac_cv_alignof_long_long_int=0
26546    fi ;;
26547 esac
26548 else
26549   cat >conftest.$ac_ext <<_ACEOF
26550 /* confdefs.h.  */
26551 _ACEOF
26552 cat confdefs.h >>conftest.$ac_ext
26553 cat >>conftest.$ac_ext <<_ACEOF
26554 /* end confdefs.h.  */
26555 $ac_includes_default
26556 #ifndef offsetof
26557 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26558 #endif
26559 typedef struct { char x; long long int y; } ac__type_alignof_;
26560 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
26561 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
26562 #include <stdio.h>
26563 #include <stdlib.h>
26564 int
26565 main ()
26566 {
26567
26568   FILE *f = fopen ("conftest.val", "w");
26569   if (! f)
26570     return 1;
26571   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
26572     {
26573       long int i = longval ();
26574       if (i != ((long int) offsetof (ac__type_alignof_, y)))
26575         return 1;
26576       fprintf (f, "%ld", i);
26577     }
26578   else
26579     {
26580       unsigned long int i = ulongval ();
26581       if (i != ((long int) offsetof (ac__type_alignof_, y)))
26582         return 1;
26583       fprintf (f, "%lu", i);
26584     }
26585   /* Do not output a trailing newline, as this causes \r\n confusion
26586      on some platforms.  */
26587   return ferror (f) || fclose (f) != 0;
26588
26589   ;
26590   return 0;
26591 }
26592 _ACEOF
26593 rm -f conftest$ac_exeext
26594 if { (ac_try="$ac_link"
26595 case "(($ac_try" in
26596   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26597   *) ac_try_echo=$ac_try;;
26598 esac
26599 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26600 $as_echo "$ac_try_echo") >&5
26601   (eval "$ac_link") 2>&5
26602   ac_status=$?
26603   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26604   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26605   { (case "(($ac_try" in
26606   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26607   *) ac_try_echo=$ac_try;;
26608 esac
26609 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26610 $as_echo "$ac_try_echo") >&5
26611   (eval "$ac_try") 2>&5
26612   ac_status=$?
26613   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26614   (exit $ac_status); }; }; then
26615   ac_cv_alignof_long_long_int=`cat conftest.val`
26616 else
26617   $as_echo "$as_me: program exited with status $ac_status" >&5
26618 $as_echo "$as_me: failed program was:" >&5
26619 sed 's/^/| /' conftest.$ac_ext >&5
26620
26621 ( exit $ac_status )
26622 if test "$ac_cv_type_long_long_int" = yes; then
26623      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
26624 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26625 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long long int
26626 See \`config.log' for more details." >&5
26627 $as_echo "$as_me: error: cannot compute alignment of long long int
26628 See \`config.log' for more details." >&2;}
26629    { (exit 77); exit 77; }; }; }
26630    else
26631      ac_cv_alignof_long_long_int=0
26632    fi
26633 fi
26634 rm -rf conftest.dSYM
26635 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26636 fi
26637 rm -f conftest.val
26638 fi
26639 { $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_long_long_int" >&5
26640 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
26641
26642
26643
26644 cat >>confdefs.h <<_ACEOF
26645 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
26646 _ACEOF
26647
26648
26649 fi
26650 # The cast to long int works around a bug in the HP C Compiler,
26651 # see AC_CHECK_SIZEOF for more information.
26652 { $as_echo "$as_me:$LINENO: checking alignment of double" >&5
26653 $as_echo_n "checking alignment of double... " >&6; }
26654 if test "${ac_cv_alignof_double+set}" = set; then
26655   $as_echo_n "(cached) " >&6
26656 else
26657   if test "$cross_compiling" = yes; then
26658   # Depending upon the size, compute the lo and hi bounds.
26659 cat >conftest.$ac_ext <<_ACEOF
26660 /* confdefs.h.  */
26661 _ACEOF
26662 cat confdefs.h >>conftest.$ac_ext
26663 cat >>conftest.$ac_ext <<_ACEOF
26664 /* end confdefs.h.  */
26665 $ac_includes_default
26666 #ifndef offsetof
26667 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26668 #endif
26669 typedef struct { char x; double y; } ac__type_alignof_;
26670 int
26671 main ()
26672 {
26673 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
26674 test_array [0] = 0
26675
26676   ;
26677   return 0;
26678 }
26679 _ACEOF
26680 rm -f conftest.$ac_objext
26681 if { (ac_try="$ac_compile"
26682 case "(($ac_try" in
26683   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26684   *) ac_try_echo=$ac_try;;
26685 esac
26686 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26687 $as_echo "$ac_try_echo") >&5
26688   (eval "$ac_compile") 2>conftest.er1
26689   ac_status=$?
26690   grep -v '^ *+' conftest.er1 >conftest.err
26691   rm -f conftest.er1
26692   cat conftest.err >&5
26693   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26694   (exit $ac_status); } && {
26695          test -z "$ac_c_werror_flag" ||
26696          test ! -s conftest.err
26697        } && test -s conftest.$ac_objext; then
26698   ac_lo=0 ac_mid=0
26699   while :; do
26700     cat >conftest.$ac_ext <<_ACEOF
26701 /* confdefs.h.  */
26702 _ACEOF
26703 cat confdefs.h >>conftest.$ac_ext
26704 cat >>conftest.$ac_ext <<_ACEOF
26705 /* end confdefs.h.  */
26706 $ac_includes_default
26707 #ifndef offsetof
26708 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26709 #endif
26710 typedef struct { char x; double y; } ac__type_alignof_;
26711 int
26712 main ()
26713 {
26714 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
26715 test_array [0] = 0
26716
26717   ;
26718   return 0;
26719 }
26720 _ACEOF
26721 rm -f conftest.$ac_objext
26722 if { (ac_try="$ac_compile"
26723 case "(($ac_try" in
26724   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26725   *) ac_try_echo=$ac_try;;
26726 esac
26727 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26728 $as_echo "$ac_try_echo") >&5
26729   (eval "$ac_compile") 2>conftest.er1
26730   ac_status=$?
26731   grep -v '^ *+' conftest.er1 >conftest.err
26732   rm -f conftest.er1
26733   cat conftest.err >&5
26734   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26735   (exit $ac_status); } && {
26736          test -z "$ac_c_werror_flag" ||
26737          test ! -s conftest.err
26738        } && test -s conftest.$ac_objext; then
26739   ac_hi=$ac_mid; break
26740 else
26741   $as_echo "$as_me: failed program was:" >&5
26742 sed 's/^/| /' conftest.$ac_ext >&5
26743
26744         ac_lo=`expr $ac_mid + 1`
26745                         if test $ac_lo -le $ac_mid; then
26746                           ac_lo= ac_hi=
26747                           break
26748                         fi
26749                         ac_mid=`expr 2 '*' $ac_mid + 1`
26750 fi
26751
26752 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26753   done
26754 else
26755   $as_echo "$as_me: failed program was:" >&5
26756 sed 's/^/| /' conftest.$ac_ext >&5
26757
26758         cat >conftest.$ac_ext <<_ACEOF
26759 /* confdefs.h.  */
26760 _ACEOF
26761 cat confdefs.h >>conftest.$ac_ext
26762 cat >>conftest.$ac_ext <<_ACEOF
26763 /* end confdefs.h.  */
26764 $ac_includes_default
26765 #ifndef offsetof
26766 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26767 #endif
26768 typedef struct { char x; double y; } ac__type_alignof_;
26769 int
26770 main ()
26771 {
26772 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
26773 test_array [0] = 0
26774
26775   ;
26776   return 0;
26777 }
26778 _ACEOF
26779 rm -f conftest.$ac_objext
26780 if { (ac_try="$ac_compile"
26781 case "(($ac_try" in
26782   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26783   *) ac_try_echo=$ac_try;;
26784 esac
26785 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26786 $as_echo "$ac_try_echo") >&5
26787   (eval "$ac_compile") 2>conftest.er1
26788   ac_status=$?
26789   grep -v '^ *+' conftest.er1 >conftest.err
26790   rm -f conftest.er1
26791   cat conftest.err >&5
26792   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26793   (exit $ac_status); } && {
26794          test -z "$ac_c_werror_flag" ||
26795          test ! -s conftest.err
26796        } && test -s conftest.$ac_objext; then
26797   ac_hi=-1 ac_mid=-1
26798   while :; do
26799     cat >conftest.$ac_ext <<_ACEOF
26800 /* confdefs.h.  */
26801 _ACEOF
26802 cat confdefs.h >>conftest.$ac_ext
26803 cat >>conftest.$ac_ext <<_ACEOF
26804 /* end confdefs.h.  */
26805 $ac_includes_default
26806 #ifndef offsetof
26807 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26808 #endif
26809 typedef struct { char x; double y; } ac__type_alignof_;
26810 int
26811 main ()
26812 {
26813 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
26814 test_array [0] = 0
26815
26816   ;
26817   return 0;
26818 }
26819 _ACEOF
26820 rm -f conftest.$ac_objext
26821 if { (ac_try="$ac_compile"
26822 case "(($ac_try" in
26823   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26824   *) ac_try_echo=$ac_try;;
26825 esac
26826 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26827 $as_echo "$ac_try_echo") >&5
26828   (eval "$ac_compile") 2>conftest.er1
26829   ac_status=$?
26830   grep -v '^ *+' conftest.er1 >conftest.err
26831   rm -f conftest.er1
26832   cat conftest.err >&5
26833   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26834   (exit $ac_status); } && {
26835          test -z "$ac_c_werror_flag" ||
26836          test ! -s conftest.err
26837        } && test -s conftest.$ac_objext; then
26838   ac_lo=$ac_mid; break
26839 else
26840   $as_echo "$as_me: failed program was:" >&5
26841 sed 's/^/| /' conftest.$ac_ext >&5
26842
26843         ac_hi=`expr '(' $ac_mid ')' - 1`
26844                         if test $ac_mid -le $ac_hi; then
26845                           ac_lo= ac_hi=
26846                           break
26847                         fi
26848                         ac_mid=`expr 2 '*' $ac_mid`
26849 fi
26850
26851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26852   done
26853 else
26854   $as_echo "$as_me: failed program was:" >&5
26855 sed 's/^/| /' conftest.$ac_ext >&5
26856
26857         ac_lo= ac_hi=
26858 fi
26859
26860 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26861 fi
26862
26863 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26864 # Binary search between lo and hi bounds.
26865 while test "x$ac_lo" != "x$ac_hi"; do
26866   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
26867   cat >conftest.$ac_ext <<_ACEOF
26868 /* confdefs.h.  */
26869 _ACEOF
26870 cat confdefs.h >>conftest.$ac_ext
26871 cat >>conftest.$ac_ext <<_ACEOF
26872 /* end confdefs.h.  */
26873 $ac_includes_default
26874 #ifndef offsetof
26875 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26876 #endif
26877 typedef struct { char x; double y; } ac__type_alignof_;
26878 int
26879 main ()
26880 {
26881 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
26882 test_array [0] = 0
26883
26884   ;
26885   return 0;
26886 }
26887 _ACEOF
26888 rm -f conftest.$ac_objext
26889 if { (ac_try="$ac_compile"
26890 case "(($ac_try" in
26891   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26892   *) ac_try_echo=$ac_try;;
26893 esac
26894 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26895 $as_echo "$ac_try_echo") >&5
26896   (eval "$ac_compile") 2>conftest.er1
26897   ac_status=$?
26898   grep -v '^ *+' conftest.er1 >conftest.err
26899   rm -f conftest.er1
26900   cat conftest.err >&5
26901   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26902   (exit $ac_status); } && {
26903          test -z "$ac_c_werror_flag" ||
26904          test ! -s conftest.err
26905        } && test -s conftest.$ac_objext; then
26906   ac_hi=$ac_mid
26907 else
26908   $as_echo "$as_me: failed program was:" >&5
26909 sed 's/^/| /' conftest.$ac_ext >&5
26910
26911         ac_lo=`expr '(' $ac_mid ')' + 1`
26912 fi
26913
26914 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26915 done
26916 case $ac_lo in
26917 ?*) ac_cv_alignof_double=$ac_lo;;
26918 '') if test "$ac_cv_type_double" = yes; then
26919      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
26920 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26921 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of double
26922 See \`config.log' for more details." >&5
26923 $as_echo "$as_me: error: cannot compute alignment of double
26924 See \`config.log' for more details." >&2;}
26925    { (exit 77); exit 77; }; }; }
26926    else
26927      ac_cv_alignof_double=0
26928    fi ;;
26929 esac
26930 else
26931   cat >conftest.$ac_ext <<_ACEOF
26932 /* confdefs.h.  */
26933 _ACEOF
26934 cat confdefs.h >>conftest.$ac_ext
26935 cat >>conftest.$ac_ext <<_ACEOF
26936 /* end confdefs.h.  */
26937 $ac_includes_default
26938 #ifndef offsetof
26939 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26940 #endif
26941 typedef struct { char x; double y; } ac__type_alignof_;
26942 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
26943 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
26944 #include <stdio.h>
26945 #include <stdlib.h>
26946 int
26947 main ()
26948 {
26949
26950   FILE *f = fopen ("conftest.val", "w");
26951   if (! f)
26952     return 1;
26953   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
26954     {
26955       long int i = longval ();
26956       if (i != ((long int) offsetof (ac__type_alignof_, y)))
26957         return 1;
26958       fprintf (f, "%ld", i);
26959     }
26960   else
26961     {
26962       unsigned long int i = ulongval ();
26963       if (i != ((long int) offsetof (ac__type_alignof_, y)))
26964         return 1;
26965       fprintf (f, "%lu", i);
26966     }
26967   /* Do not output a trailing newline, as this causes \r\n confusion
26968      on some platforms.  */
26969   return ferror (f) || fclose (f) != 0;
26970
26971   ;
26972   return 0;
26973 }
26974 _ACEOF
26975 rm -f conftest$ac_exeext
26976 if { (ac_try="$ac_link"
26977 case "(($ac_try" in
26978   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26979   *) ac_try_echo=$ac_try;;
26980 esac
26981 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26982 $as_echo "$ac_try_echo") >&5
26983   (eval "$ac_link") 2>&5
26984   ac_status=$?
26985   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26986   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26987   { (case "(($ac_try" in
26988   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26989   *) ac_try_echo=$ac_try;;
26990 esac
26991 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26992 $as_echo "$ac_try_echo") >&5
26993   (eval "$ac_try") 2>&5
26994   ac_status=$?
26995   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26996   (exit $ac_status); }; }; then
26997   ac_cv_alignof_double=`cat conftest.val`
26998 else
26999   $as_echo "$as_me: program exited with status $ac_status" >&5
27000 $as_echo "$as_me: failed program was:" >&5
27001 sed 's/^/| /' conftest.$ac_ext >&5
27002
27003 ( exit $ac_status )
27004 if test "$ac_cv_type_double" = yes; then
27005      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
27006 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27007 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of double
27008 See \`config.log' for more details." >&5
27009 $as_echo "$as_me: error: cannot compute alignment of double
27010 See \`config.log' for more details." >&2;}
27011    { (exit 77); exit 77; }; }; }
27012    else
27013      ac_cv_alignof_double=0
27014    fi
27015 fi
27016 rm -rf conftest.dSYM
27017 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27018 fi
27019 rm -f conftest.val
27020 fi
27021 { $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_double" >&5
27022 $as_echo "$ac_cv_alignof_double" >&6; }
27023
27024
27025
27026 cat >>confdefs.h <<_ACEOF
27027 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
27028 _ACEOF
27029
27030
27031
27032 # Compute maximum alignment of any basic type.
27033 # We assume long's alignment is at least as strong as char, short, or int;
27034 # but we must check long long (if it exists) and double.
27035
27036 MAX_ALIGNOF=$ac_cv_alignof_long
27037 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
27038   MAX_ALIGNOF=$ac_cv_alignof_double
27039 fi
27040 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
27041   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
27042 fi
27043
27044 cat >>confdefs.h <<_ACEOF
27045 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
27046 _ACEOF
27047
27048
27049
27050 # Some platforms predefine the types int8, int16, etc.  Only check
27051 # a (hopefully) representative subset.
27052 { $as_echo "$as_me:$LINENO: checking for int8" >&5
27053 $as_echo_n "checking for int8... " >&6; }
27054 if test "${ac_cv_type_int8+set}" = set; then
27055   $as_echo_n "(cached) " >&6
27056 else
27057   ac_cv_type_int8=no
27058 cat >conftest.$ac_ext <<_ACEOF
27059 /* confdefs.h.  */
27060 _ACEOF
27061 cat confdefs.h >>conftest.$ac_ext
27062 cat >>conftest.$ac_ext <<_ACEOF
27063 /* end confdefs.h.  */
27064 #include <stdio.h>
27065 #ifdef HAVE_SUPPORTDEFS_H
27066 #include <SupportDefs.h>
27067 #endif
27068
27069 int
27070 main ()
27071 {
27072 if (sizeof (int8))
27073        return 0;
27074   ;
27075   return 0;
27076 }
27077 _ACEOF
27078 rm -f conftest.$ac_objext
27079 if { (ac_try="$ac_compile"
27080 case "(($ac_try" in
27081   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27082   *) ac_try_echo=$ac_try;;
27083 esac
27084 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27085 $as_echo "$ac_try_echo") >&5
27086   (eval "$ac_compile") 2>conftest.er1
27087   ac_status=$?
27088   grep -v '^ *+' conftest.er1 >conftest.err
27089   rm -f conftest.er1
27090   cat conftest.err >&5
27091   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27092   (exit $ac_status); } && {
27093          test -z "$ac_c_werror_flag" ||
27094          test ! -s conftest.err
27095        } && test -s conftest.$ac_objext; then
27096   cat >conftest.$ac_ext <<_ACEOF
27097 /* confdefs.h.  */
27098 _ACEOF
27099 cat confdefs.h >>conftest.$ac_ext
27100 cat >>conftest.$ac_ext <<_ACEOF
27101 /* end confdefs.h.  */
27102 #include <stdio.h>
27103 #ifdef HAVE_SUPPORTDEFS_H
27104 #include <SupportDefs.h>
27105 #endif
27106
27107 int
27108 main ()
27109 {
27110 if (sizeof ((int8)))
27111           return 0;
27112   ;
27113   return 0;
27114 }
27115 _ACEOF
27116 rm -f conftest.$ac_objext
27117 if { (ac_try="$ac_compile"
27118 case "(($ac_try" in
27119   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27120   *) ac_try_echo=$ac_try;;
27121 esac
27122 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27123 $as_echo "$ac_try_echo") >&5
27124   (eval "$ac_compile") 2>conftest.er1
27125   ac_status=$?
27126   grep -v '^ *+' conftest.er1 >conftest.err
27127   rm -f conftest.er1
27128   cat conftest.err >&5
27129   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27130   (exit $ac_status); } && {
27131          test -z "$ac_c_werror_flag" ||
27132          test ! -s conftest.err
27133        } && test -s conftest.$ac_objext; then
27134   :
27135 else
27136   $as_echo "$as_me: failed program was:" >&5
27137 sed 's/^/| /' conftest.$ac_ext >&5
27138
27139         ac_cv_type_int8=yes
27140 fi
27141
27142 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27143 else
27144   $as_echo "$as_me: failed program was:" >&5
27145 sed 's/^/| /' conftest.$ac_ext >&5
27146
27147
27148 fi
27149
27150 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27151 fi
27152 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
27153 $as_echo "$ac_cv_type_int8" >&6; }
27154 if test "x$ac_cv_type_int8" = x""yes; then
27155
27156 cat >>confdefs.h <<_ACEOF
27157 #define HAVE_INT8 1
27158 _ACEOF
27159
27160
27161 fi
27162 { $as_echo "$as_me:$LINENO: checking for uint8" >&5
27163 $as_echo_n "checking for uint8... " >&6; }
27164 if test "${ac_cv_type_uint8+set}" = set; then
27165   $as_echo_n "(cached) " >&6
27166 else
27167   ac_cv_type_uint8=no
27168 cat >conftest.$ac_ext <<_ACEOF
27169 /* confdefs.h.  */
27170 _ACEOF
27171 cat confdefs.h >>conftest.$ac_ext
27172 cat >>conftest.$ac_ext <<_ACEOF
27173 /* end confdefs.h.  */
27174 #include <stdio.h>
27175 #ifdef HAVE_SUPPORTDEFS_H
27176 #include <SupportDefs.h>
27177 #endif
27178
27179 int
27180 main ()
27181 {
27182 if (sizeof (uint8))
27183        return 0;
27184   ;
27185   return 0;
27186 }
27187 _ACEOF
27188 rm -f conftest.$ac_objext
27189 if { (ac_try="$ac_compile"
27190 case "(($ac_try" in
27191   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27192   *) ac_try_echo=$ac_try;;
27193 esac
27194 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27195 $as_echo "$ac_try_echo") >&5
27196   (eval "$ac_compile") 2>conftest.er1
27197   ac_status=$?
27198   grep -v '^ *+' conftest.er1 >conftest.err
27199   rm -f conftest.er1
27200   cat conftest.err >&5
27201   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27202   (exit $ac_status); } && {
27203          test -z "$ac_c_werror_flag" ||
27204          test ! -s conftest.err
27205        } && test -s conftest.$ac_objext; then
27206   cat >conftest.$ac_ext <<_ACEOF
27207 /* confdefs.h.  */
27208 _ACEOF
27209 cat confdefs.h >>conftest.$ac_ext
27210 cat >>conftest.$ac_ext <<_ACEOF
27211 /* end confdefs.h.  */
27212 #include <stdio.h>
27213 #ifdef HAVE_SUPPORTDEFS_H
27214 #include <SupportDefs.h>
27215 #endif
27216
27217 int
27218 main ()
27219 {
27220 if (sizeof ((uint8)))
27221           return 0;
27222   ;
27223   return 0;
27224 }
27225 _ACEOF
27226 rm -f conftest.$ac_objext
27227 if { (ac_try="$ac_compile"
27228 case "(($ac_try" in
27229   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27230   *) ac_try_echo=$ac_try;;
27231 esac
27232 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27233 $as_echo "$ac_try_echo") >&5
27234   (eval "$ac_compile") 2>conftest.er1
27235   ac_status=$?
27236   grep -v '^ *+' conftest.er1 >conftest.err
27237   rm -f conftest.er1
27238   cat conftest.err >&5
27239   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27240   (exit $ac_status); } && {
27241          test -z "$ac_c_werror_flag" ||
27242          test ! -s conftest.err
27243        } && test -s conftest.$ac_objext; then
27244   :
27245 else
27246   $as_echo "$as_me: failed program was:" >&5
27247 sed 's/^/| /' conftest.$ac_ext >&5
27248
27249         ac_cv_type_uint8=yes
27250 fi
27251
27252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27253 else
27254   $as_echo "$as_me: failed program was:" >&5
27255 sed 's/^/| /' conftest.$ac_ext >&5
27256
27257
27258 fi
27259
27260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27261 fi
27262 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
27263 $as_echo "$ac_cv_type_uint8" >&6; }
27264 if test "x$ac_cv_type_uint8" = x""yes; then
27265
27266 cat >>confdefs.h <<_ACEOF
27267 #define HAVE_UINT8 1
27268 _ACEOF
27269
27270
27271 fi
27272 { $as_echo "$as_me:$LINENO: checking for int64" >&5
27273 $as_echo_n "checking for int64... " >&6; }
27274 if test "${ac_cv_type_int64+set}" = set; then
27275   $as_echo_n "(cached) " >&6
27276 else
27277   ac_cv_type_int64=no
27278 cat >conftest.$ac_ext <<_ACEOF
27279 /* confdefs.h.  */
27280 _ACEOF
27281 cat confdefs.h >>conftest.$ac_ext
27282 cat >>conftest.$ac_ext <<_ACEOF
27283 /* end confdefs.h.  */
27284 #include <stdio.h>
27285 #ifdef HAVE_SUPPORTDEFS_H
27286 #include <SupportDefs.h>
27287 #endif
27288
27289 int
27290 main ()
27291 {
27292 if (sizeof (int64))
27293        return 0;
27294   ;
27295   return 0;
27296 }
27297 _ACEOF
27298 rm -f conftest.$ac_objext
27299 if { (ac_try="$ac_compile"
27300 case "(($ac_try" in
27301   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27302   *) ac_try_echo=$ac_try;;
27303 esac
27304 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27305 $as_echo "$ac_try_echo") >&5
27306   (eval "$ac_compile") 2>conftest.er1
27307   ac_status=$?
27308   grep -v '^ *+' conftest.er1 >conftest.err
27309   rm -f conftest.er1
27310   cat conftest.err >&5
27311   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27312   (exit $ac_status); } && {
27313          test -z "$ac_c_werror_flag" ||
27314          test ! -s conftest.err
27315        } && test -s conftest.$ac_objext; then
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 #include <stdio.h>
27323 #ifdef HAVE_SUPPORTDEFS_H
27324 #include <SupportDefs.h>
27325 #endif
27326
27327 int
27328 main ()
27329 {
27330 if (sizeof ((int64)))
27331           return 0;
27332   ;
27333   return 0;
27334 }
27335 _ACEOF
27336 rm -f conftest.$ac_objext
27337 if { (ac_try="$ac_compile"
27338 case "(($ac_try" in
27339   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27340   *) ac_try_echo=$ac_try;;
27341 esac
27342 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27343 $as_echo "$ac_try_echo") >&5
27344   (eval "$ac_compile") 2>conftest.er1
27345   ac_status=$?
27346   grep -v '^ *+' conftest.er1 >conftest.err
27347   rm -f conftest.er1
27348   cat conftest.err >&5
27349   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27350   (exit $ac_status); } && {
27351          test -z "$ac_c_werror_flag" ||
27352          test ! -s conftest.err
27353        } && test -s conftest.$ac_objext; then
27354   :
27355 else
27356   $as_echo "$as_me: failed program was:" >&5
27357 sed 's/^/| /' conftest.$ac_ext >&5
27358
27359         ac_cv_type_int64=yes
27360 fi
27361
27362 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27363 else
27364   $as_echo "$as_me: failed program was:" >&5
27365 sed 's/^/| /' conftest.$ac_ext >&5
27366
27367
27368 fi
27369
27370 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27371 fi
27372 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
27373 $as_echo "$ac_cv_type_int64" >&6; }
27374 if test "x$ac_cv_type_int64" = x""yes; then
27375
27376 cat >>confdefs.h <<_ACEOF
27377 #define HAVE_INT64 1
27378 _ACEOF
27379
27380
27381 fi
27382 { $as_echo "$as_me:$LINENO: checking for uint64" >&5
27383 $as_echo_n "checking for uint64... " >&6; }
27384 if test "${ac_cv_type_uint64+set}" = set; then
27385   $as_echo_n "(cached) " >&6
27386 else
27387   ac_cv_type_uint64=no
27388 cat >conftest.$ac_ext <<_ACEOF
27389 /* confdefs.h.  */
27390 _ACEOF
27391 cat confdefs.h >>conftest.$ac_ext
27392 cat >>conftest.$ac_ext <<_ACEOF
27393 /* end confdefs.h.  */
27394 #include <stdio.h>
27395 #ifdef HAVE_SUPPORTDEFS_H
27396 #include <SupportDefs.h>
27397 #endif
27398
27399 int
27400 main ()
27401 {
27402 if (sizeof (uint64))
27403        return 0;
27404   ;
27405   return 0;
27406 }
27407 _ACEOF
27408 rm -f conftest.$ac_objext
27409 if { (ac_try="$ac_compile"
27410 case "(($ac_try" in
27411   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27412   *) ac_try_echo=$ac_try;;
27413 esac
27414 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27415 $as_echo "$ac_try_echo") >&5
27416   (eval "$ac_compile") 2>conftest.er1
27417   ac_status=$?
27418   grep -v '^ *+' conftest.er1 >conftest.err
27419   rm -f conftest.er1
27420   cat conftest.err >&5
27421   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27422   (exit $ac_status); } && {
27423          test -z "$ac_c_werror_flag" ||
27424          test ! -s conftest.err
27425        } && test -s conftest.$ac_objext; then
27426   cat >conftest.$ac_ext <<_ACEOF
27427 /* confdefs.h.  */
27428 _ACEOF
27429 cat confdefs.h >>conftest.$ac_ext
27430 cat >>conftest.$ac_ext <<_ACEOF
27431 /* end confdefs.h.  */
27432 #include <stdio.h>
27433 #ifdef HAVE_SUPPORTDEFS_H
27434 #include <SupportDefs.h>
27435 #endif
27436
27437 int
27438 main ()
27439 {
27440 if (sizeof ((uint64)))
27441           return 0;
27442   ;
27443   return 0;
27444 }
27445 _ACEOF
27446 rm -f conftest.$ac_objext
27447 if { (ac_try="$ac_compile"
27448 case "(($ac_try" in
27449   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27450   *) ac_try_echo=$ac_try;;
27451 esac
27452 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27453 $as_echo "$ac_try_echo") >&5
27454   (eval "$ac_compile") 2>conftest.er1
27455   ac_status=$?
27456   grep -v '^ *+' conftest.er1 >conftest.err
27457   rm -f conftest.er1
27458   cat conftest.err >&5
27459   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27460   (exit $ac_status); } && {
27461          test -z "$ac_c_werror_flag" ||
27462          test ! -s conftest.err
27463        } && test -s conftest.$ac_objext; then
27464   :
27465 else
27466   $as_echo "$as_me: failed program was:" >&5
27467 sed 's/^/| /' conftest.$ac_ext >&5
27468
27469         ac_cv_type_uint64=yes
27470 fi
27471
27472 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27473 else
27474   $as_echo "$as_me: failed program was:" >&5
27475 sed 's/^/| /' conftest.$ac_ext >&5
27476
27477
27478 fi
27479
27480 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27481 fi
27482 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
27483 $as_echo "$ac_cv_type_uint64" >&6; }
27484 if test "x$ac_cv_type_uint64" = x""yes; then
27485
27486 cat >>confdefs.h <<_ACEOF
27487 #define HAVE_UINT64 1
27488 _ACEOF
27489
27490
27491 fi
27492
27493
27494 # We also check for sig_atomic_t, which *should* be defined per ANSI
27495 # C, but is missing on some old platforms.
27496 { $as_echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
27497 $as_echo_n "checking for sig_atomic_t... " >&6; }
27498 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
27499   $as_echo_n "(cached) " >&6
27500 else
27501   ac_cv_type_sig_atomic_t=no
27502 cat >conftest.$ac_ext <<_ACEOF
27503 /* confdefs.h.  */
27504 _ACEOF
27505 cat confdefs.h >>conftest.$ac_ext
27506 cat >>conftest.$ac_ext <<_ACEOF
27507 /* end confdefs.h.  */
27508 #include <signal.h>
27509
27510 int
27511 main ()
27512 {
27513 if (sizeof (sig_atomic_t))
27514        return 0;
27515   ;
27516   return 0;
27517 }
27518 _ACEOF
27519 rm -f conftest.$ac_objext
27520 if { (ac_try="$ac_compile"
27521 case "(($ac_try" in
27522   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27523   *) ac_try_echo=$ac_try;;
27524 esac
27525 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27526 $as_echo "$ac_try_echo") >&5
27527   (eval "$ac_compile") 2>conftest.er1
27528   ac_status=$?
27529   grep -v '^ *+' conftest.er1 >conftest.err
27530   rm -f conftest.er1
27531   cat conftest.err >&5
27532   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27533   (exit $ac_status); } && {
27534          test -z "$ac_c_werror_flag" ||
27535          test ! -s conftest.err
27536        } && test -s conftest.$ac_objext; then
27537   cat >conftest.$ac_ext <<_ACEOF
27538 /* confdefs.h.  */
27539 _ACEOF
27540 cat confdefs.h >>conftest.$ac_ext
27541 cat >>conftest.$ac_ext <<_ACEOF
27542 /* end confdefs.h.  */
27543 #include <signal.h>
27544
27545 int
27546 main ()
27547 {
27548 if (sizeof ((sig_atomic_t)))
27549           return 0;
27550   ;
27551   return 0;
27552 }
27553 _ACEOF
27554 rm -f conftest.$ac_objext
27555 if { (ac_try="$ac_compile"
27556 case "(($ac_try" in
27557   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27558   *) ac_try_echo=$ac_try;;
27559 esac
27560 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27561 $as_echo "$ac_try_echo") >&5
27562   (eval "$ac_compile") 2>conftest.er1
27563   ac_status=$?
27564   grep -v '^ *+' conftest.er1 >conftest.err
27565   rm -f conftest.er1
27566   cat conftest.err >&5
27567   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27568   (exit $ac_status); } && {
27569          test -z "$ac_c_werror_flag" ||
27570          test ! -s conftest.err
27571        } && test -s conftest.$ac_objext; then
27572   :
27573 else
27574   $as_echo "$as_me: failed program was:" >&5
27575 sed 's/^/| /' conftest.$ac_ext >&5
27576
27577         ac_cv_type_sig_atomic_t=yes
27578 fi
27579
27580 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27581 else
27582   $as_echo "$as_me: failed program was:" >&5
27583 sed 's/^/| /' conftest.$ac_ext >&5
27584
27585
27586 fi
27587
27588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27589 fi
27590 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
27591 $as_echo "$ac_cv_type_sig_atomic_t" >&6; }
27592 if test "x$ac_cv_type_sig_atomic_t" = x""yes; then
27593
27594 cat >>confdefs.h <<_ACEOF
27595 #define HAVE_SIG_ATOMIC_T 1
27596 _ACEOF
27597
27598
27599 fi
27600
27601
27602
27603 if test "$PORTNAME" != "win32"
27604 then
27605 { $as_echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
27606 $as_echo_n "checking for POSIX signal interface... " >&6; }
27607 if test "${pgac_cv_func_posix_signals+set}" = set; then
27608   $as_echo_n "(cached) " >&6
27609 else
27610   cat >conftest.$ac_ext <<_ACEOF
27611 /* confdefs.h.  */
27612 _ACEOF
27613 cat confdefs.h >>conftest.$ac_ext
27614 cat >>conftest.$ac_ext <<_ACEOF
27615 /* end confdefs.h.  */
27616 #include <signal.h>
27617
27618 int
27619 main ()
27620 {
27621 struct sigaction act, oact;
27622 sigemptyset(&act.sa_mask);
27623 act.sa_flags = SA_RESTART;
27624 sigaction(0, &act, &oact);
27625   ;
27626   return 0;
27627 }
27628 _ACEOF
27629 rm -f conftest.$ac_objext conftest$ac_exeext
27630 if { (ac_try="$ac_link"
27631 case "(($ac_try" in
27632   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27633   *) ac_try_echo=$ac_try;;
27634 esac
27635 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27636 $as_echo "$ac_try_echo") >&5
27637   (eval "$ac_link") 2>conftest.er1
27638   ac_status=$?
27639   grep -v '^ *+' conftest.er1 >conftest.err
27640   rm -f conftest.er1
27641   cat conftest.err >&5
27642   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27643   (exit $ac_status); } && {
27644          test -z "$ac_c_werror_flag" ||
27645          test ! -s conftest.err
27646        } && test -s conftest$ac_exeext && {
27647          test "$cross_compiling" = yes ||
27648          $as_test_x conftest$ac_exeext
27649        }; then
27650   pgac_cv_func_posix_signals=yes
27651 else
27652   $as_echo "$as_me: failed program was:" >&5
27653 sed 's/^/| /' conftest.$ac_ext >&5
27654
27655         pgac_cv_func_posix_signals=no
27656 fi
27657
27658 rm -rf conftest.dSYM
27659 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
27660       conftest$ac_exeext conftest.$ac_ext
27661 fi
27662 { $as_echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
27663 $as_echo "$pgac_cv_func_posix_signals" >&6; }
27664 if test x"$pgac_cv_func_posix_signals" = xyes ; then
27665
27666 cat >>confdefs.h <<\_ACEOF
27667 #define HAVE_POSIX_SIGNALS /**/
27668 _ACEOF
27669
27670 fi
27671 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
27672
27673 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
27674   { { $as_echo "$as_me:$LINENO: error:
27675 Thread-safety requires POSIX signals, which are not supported by this
27676 operating system;  use --disable-thread-safety to disable thread safety." >&5
27677 $as_echo "$as_me: error:
27678 Thread-safety requires POSIX signals, which are not supported by this
27679 operating system;  use --disable-thread-safety to disable thread safety." >&2;}
27680    { (exit 1); exit 1; }; }
27681 fi
27682 fi
27683
27684 # SunOS doesn't handle negative byte comparisons properly with +/- return
27685 { $as_echo "$as_me:$LINENO: checking for working memcmp" >&5
27686 $as_echo_n "checking for working memcmp... " >&6; }
27687 if test "${ac_cv_func_memcmp_working+set}" = set; then
27688   $as_echo_n "(cached) " >&6
27689 else
27690   if test "$cross_compiling" = yes; then
27691   ac_cv_func_memcmp_working=no
27692 else
27693   cat >conftest.$ac_ext <<_ACEOF
27694 /* confdefs.h.  */
27695 _ACEOF
27696 cat confdefs.h >>conftest.$ac_ext
27697 cat >>conftest.$ac_ext <<_ACEOF
27698 /* end confdefs.h.  */
27699 $ac_includes_default
27700 int
27701 main ()
27702 {
27703
27704   /* Some versions of memcmp are not 8-bit clean.  */
27705   char c0 = '\100', c1 = '\200', c2 = '\201';
27706   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
27707     return 1;
27708
27709   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
27710      or more and with at least one buffer not starting on a 4-byte boundary.
27711      William Lewis provided this test program.   */
27712   {
27713     char foo[21];
27714     char bar[21];
27715     int i;
27716     for (i = 0; i < 4; i++)
27717       {
27718         char *a = foo + i;
27719         char *b = bar + i;
27720         strcpy (a, "--------01111111");
27721         strcpy (b, "--------10000000");
27722         if (memcmp (a, b, 16) >= 0)
27723           return 1;
27724       }
27725     return 0;
27726   }
27727
27728   ;
27729   return 0;
27730 }
27731 _ACEOF
27732 rm -f conftest$ac_exeext
27733 if { (ac_try="$ac_link"
27734 case "(($ac_try" in
27735   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27736   *) ac_try_echo=$ac_try;;
27737 esac
27738 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27739 $as_echo "$ac_try_echo") >&5
27740   (eval "$ac_link") 2>&5
27741   ac_status=$?
27742   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27743   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27744   { (case "(($ac_try" in
27745   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27746   *) ac_try_echo=$ac_try;;
27747 esac
27748 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27749 $as_echo "$ac_try_echo") >&5
27750   (eval "$ac_try") 2>&5
27751   ac_status=$?
27752   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27753   (exit $ac_status); }; }; then
27754   ac_cv_func_memcmp_working=yes
27755 else
27756   $as_echo "$as_me: program exited with status $ac_status" >&5
27757 $as_echo "$as_me: failed program was:" >&5
27758 sed 's/^/| /' conftest.$ac_ext >&5
27759
27760 ( exit $ac_status )
27761 ac_cv_func_memcmp_working=no
27762 fi
27763 rm -rf conftest.dSYM
27764 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27765 fi
27766
27767
27768 fi
27769 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
27770 $as_echo "$ac_cv_func_memcmp_working" >&6; }
27771 test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
27772   *" memcmp.$ac_objext "* ) ;;
27773   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
27774  ;;
27775 esac
27776
27777
27778
27779
27780 # Select semaphore implementation type.
27781 if test "$PORTNAME" != "win32"; then
27782   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
27783
27784 cat >>confdefs.h <<\_ACEOF
27785 #define USE_NAMED_POSIX_SEMAPHORES 1
27786 _ACEOF
27787
27788     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
27789   else
27790     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
27791
27792 cat >>confdefs.h <<\_ACEOF
27793 #define USE_UNNAMED_POSIX_SEMAPHORES 1
27794 _ACEOF
27795
27796       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
27797     else
27798
27799 cat >>confdefs.h <<\_ACEOF
27800 #define USE_SYSV_SEMAPHORES 1
27801 _ACEOF
27802
27803       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
27804     fi
27805   fi
27806 else
27807
27808 cat >>confdefs.h <<\_ACEOF
27809 #define USE_WIN32_SEMAPHORES 1
27810 _ACEOF
27811
27812   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
27813 fi
27814
27815
27816 # Select shared-memory implementation type.
27817 if test "$PORTNAME" != "win32"; then
27818
27819 cat >>confdefs.h <<\_ACEOF
27820 #define USE_SYSV_SHARED_MEMORY 1
27821 _ACEOF
27822
27823   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
27824 else
27825
27826 cat >>confdefs.h <<\_ACEOF
27827 #define USE_WIN32_SHARED_MEMORY 1
27828 _ACEOF
27829
27830   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
27831 fi
27832
27833 # Select latch implementation type.
27834 if test "$PORTNAME" != "win32"; then
27835   LATCH_IMPLEMENTATION="src/backend/port/unix_latch.c"
27836 else
27837   LATCH_IMPLEMENTATION="src/backend/port/win32_latch.c"
27838 fi
27839
27840 # If not set in template file, set bytes to use libc memset()
27841 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
27842   MEMSET_LOOP_LIMIT=1024
27843 fi
27844
27845 cat >>confdefs.h <<_ACEOF
27846 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
27847 _ACEOF
27848
27849
27850
27851 if test "$enable_nls" = yes ; then
27852
27853   { $as_echo "$as_me:$LINENO: checking for library containing bind_textdomain_codeset" >&5
27854 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
27855 if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then
27856   $as_echo_n "(cached) " >&6
27857 else
27858   ac_func_search_save_LIBS=$LIBS
27859 cat >conftest.$ac_ext <<_ACEOF
27860 /* confdefs.h.  */
27861 _ACEOF
27862 cat confdefs.h >>conftest.$ac_ext
27863 cat >>conftest.$ac_ext <<_ACEOF
27864 /* end confdefs.h.  */
27865
27866 /* Override any GCC internal prototype to avoid an error.
27867    Use char because int might match the return type of a GCC
27868    builtin and then its argument prototype would still apply.  */
27869 #ifdef __cplusplus
27870 extern "C"
27871 #endif
27872 char bind_textdomain_codeset ();
27873 int
27874 main ()
27875 {
27876 return bind_textdomain_codeset ();
27877   ;
27878   return 0;
27879 }
27880 _ACEOF
27881 for ac_lib in '' intl; do
27882   if test -z "$ac_lib"; then
27883     ac_res="none required"
27884   else
27885     ac_res=-l$ac_lib
27886     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
27887   fi
27888   rm -f conftest.$ac_objext conftest$ac_exeext
27889 if { (ac_try="$ac_link"
27890 case "(($ac_try" in
27891   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27892   *) ac_try_echo=$ac_try;;
27893 esac
27894 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27895 $as_echo "$ac_try_echo") >&5
27896   (eval "$ac_link") 2>conftest.er1
27897   ac_status=$?
27898   grep -v '^ *+' conftest.er1 >conftest.err
27899   rm -f conftest.er1
27900   cat conftest.err >&5
27901   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27902   (exit $ac_status); } && {
27903          test -z "$ac_c_werror_flag" ||
27904          test ! -s conftest.err
27905        } && test -s conftest$ac_exeext && {
27906          test "$cross_compiling" = yes ||
27907          $as_test_x conftest$ac_exeext
27908        }; then
27909   ac_cv_search_bind_textdomain_codeset=$ac_res
27910 else
27911   $as_echo "$as_me: failed program was:" >&5
27912 sed 's/^/| /' conftest.$ac_ext >&5
27913
27914
27915 fi
27916
27917 rm -rf conftest.dSYM
27918 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
27919       conftest$ac_exeext
27920   if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then
27921   break
27922 fi
27923 done
27924 if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then
27925   :
27926 else
27927   ac_cv_search_bind_textdomain_codeset=no
27928 fi
27929 rm conftest.$ac_ext
27930 LIBS=$ac_func_search_save_LIBS
27931 fi
27932 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_bind_textdomain_codeset" >&5
27933 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
27934 ac_res=$ac_cv_search_bind_textdomain_codeset
27935 if test "$ac_res" != no; then
27936   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27937
27938 else
27939   { { $as_echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
27940 $as_echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
27941    { (exit 1); exit 1; }; }
27942 fi
27943
27944   if test "${ac_cv_header_libintl_h+set}" = set; then
27945   { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
27946 $as_echo_n "checking for libintl.h... " >&6; }
27947 if test "${ac_cv_header_libintl_h+set}" = set; then
27948   $as_echo_n "(cached) " >&6
27949 fi
27950 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
27951 $as_echo "$ac_cv_header_libintl_h" >&6; }
27952 else
27953   # Is the header compilable?
27954 { $as_echo "$as_me:$LINENO: checking libintl.h usability" >&5
27955 $as_echo_n "checking libintl.h usability... " >&6; }
27956 cat >conftest.$ac_ext <<_ACEOF
27957 /* confdefs.h.  */
27958 _ACEOF
27959 cat confdefs.h >>conftest.$ac_ext
27960 cat >>conftest.$ac_ext <<_ACEOF
27961 /* end confdefs.h.  */
27962 $ac_includes_default
27963 #include <libintl.h>
27964 _ACEOF
27965 rm -f conftest.$ac_objext
27966 if { (ac_try="$ac_compile"
27967 case "(($ac_try" in
27968   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27969   *) ac_try_echo=$ac_try;;
27970 esac
27971 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27972 $as_echo "$ac_try_echo") >&5
27973   (eval "$ac_compile") 2>conftest.er1
27974   ac_status=$?
27975   grep -v '^ *+' conftest.er1 >conftest.err
27976   rm -f conftest.er1
27977   cat conftest.err >&5
27978   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27979   (exit $ac_status); } && {
27980          test -z "$ac_c_werror_flag" ||
27981          test ! -s conftest.err
27982        } && test -s conftest.$ac_objext; then
27983   ac_header_compiler=yes
27984 else
27985   $as_echo "$as_me: failed program was:" >&5
27986 sed 's/^/| /' conftest.$ac_ext >&5
27987
27988         ac_header_compiler=no
27989 fi
27990
27991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27992 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27993 $as_echo "$ac_header_compiler" >&6; }
27994
27995 # Is the header present?
27996 { $as_echo "$as_me:$LINENO: checking libintl.h presence" >&5
27997 $as_echo_n "checking libintl.h presence... " >&6; }
27998 cat >conftest.$ac_ext <<_ACEOF
27999 /* confdefs.h.  */
28000 _ACEOF
28001 cat confdefs.h >>conftest.$ac_ext
28002 cat >>conftest.$ac_ext <<_ACEOF
28003 /* end confdefs.h.  */
28004 #include <libintl.h>
28005 _ACEOF
28006 if { (ac_try="$ac_cpp conftest.$ac_ext"
28007 case "(($ac_try" in
28008   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28009   *) ac_try_echo=$ac_try;;
28010 esac
28011 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28012 $as_echo "$ac_try_echo") >&5
28013   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
28014   ac_status=$?
28015   grep -v '^ *+' conftest.er1 >conftest.err
28016   rm -f conftest.er1
28017   cat conftest.err >&5
28018   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28019   (exit $ac_status); } >/dev/null && {
28020          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
28021          test ! -s conftest.err
28022        }; then
28023   ac_header_preproc=yes
28024 else
28025   $as_echo "$as_me: failed program was:" >&5
28026 sed 's/^/| /' conftest.$ac_ext >&5
28027
28028   ac_header_preproc=no
28029 fi
28030
28031 rm -f conftest.err conftest.$ac_ext
28032 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
28033 $as_echo "$ac_header_preproc" >&6; }
28034
28035 # So?  What about this header?
28036 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
28037   yes:no: )
28038     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
28039 $as_echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
28040     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
28041 $as_echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
28042     ac_header_preproc=yes
28043     ;;
28044   no:yes:* )
28045     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
28046 $as_echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
28047     { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
28048 $as_echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
28049     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
28050 $as_echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
28051     { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
28052 $as_echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
28053     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
28054 $as_echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
28055     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
28056 $as_echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
28057     ( cat <<\_ASBOX
28058 ## ---------------------------------------- ##
28059 ## Report this to pgsql-bugs@postgresql.org ##
28060 ## ---------------------------------------- ##
28061 _ASBOX
28062      ) | sed "s/^/$as_me: WARNING:     /" >&2
28063     ;;
28064 esac
28065 { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
28066 $as_echo_n "checking for libintl.h... " >&6; }
28067 if test "${ac_cv_header_libintl_h+set}" = set; then
28068   $as_echo_n "(cached) " >&6
28069 else
28070   ac_cv_header_libintl_h=$ac_header_preproc
28071 fi
28072 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
28073 $as_echo "$ac_cv_header_libintl_h" >&6; }
28074
28075 fi
28076 if test "x$ac_cv_header_libintl_h" = x""yes; then
28077   :
28078 else
28079   { { $as_echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
28080 $as_echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
28081    { (exit 1); exit 1; }; }
28082 fi
28083
28084
28085   for ac_prog in msgfmt
28086 do
28087   # Extract the first word of "$ac_prog", so it can be a program name with args.
28088 set dummy $ac_prog; ac_word=$2
28089 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
28090 $as_echo_n "checking for $ac_word... " >&6; }
28091 if test "${ac_cv_prog_MSGFMT+set}" = set; then
28092   $as_echo_n "(cached) " >&6
28093 else
28094   if test -n "$MSGFMT"; then
28095   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
28096 else
28097 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28098 for as_dir in $PATH
28099 do
28100   IFS=$as_save_IFS
28101   test -z "$as_dir" && as_dir=.
28102   for ac_exec_ext in '' $ac_executable_extensions; do
28103   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28104     ac_cv_prog_MSGFMT="$ac_prog"
28105     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
28106     break 2
28107   fi
28108 done
28109 done
28110 IFS=$as_save_IFS
28111
28112 fi
28113 fi
28114 MSGFMT=$ac_cv_prog_MSGFMT
28115 if test -n "$MSGFMT"; then
28116   { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5
28117 $as_echo "$MSGFMT" >&6; }
28118 else
28119   { $as_echo "$as_me:$LINENO: result: no" >&5
28120 $as_echo "no" >&6; }
28121 fi
28122
28123
28124   test -n "$MSGFMT" && break
28125 done
28126
28127   if test -z "$MSGFMT"; then
28128     { { $as_echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
28129 $as_echo "$as_me: error: msgfmt is required for NLS" >&2;}
28130    { (exit 1); exit 1; }; }
28131   fi
28132   for ac_prog in msgmerge
28133 do
28134   # Extract the first word of "$ac_prog", so it can be a program name with args.
28135 set dummy $ac_prog; ac_word=$2
28136 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
28137 $as_echo_n "checking for $ac_word... " >&6; }
28138 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
28139   $as_echo_n "(cached) " >&6
28140 else
28141   if test -n "$MSGMERGE"; then
28142   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
28143 else
28144 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28145 for as_dir in $PATH
28146 do
28147   IFS=$as_save_IFS
28148   test -z "$as_dir" && as_dir=.
28149   for ac_exec_ext in '' $ac_executable_extensions; do
28150   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28151     ac_cv_prog_MSGMERGE="$ac_prog"
28152     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
28153     break 2
28154   fi
28155 done
28156 done
28157 IFS=$as_save_IFS
28158
28159 fi
28160 fi
28161 MSGMERGE=$ac_cv_prog_MSGMERGE
28162 if test -n "$MSGMERGE"; then
28163   { $as_echo "$as_me:$LINENO: result: $MSGMERGE" >&5
28164 $as_echo "$MSGMERGE" >&6; }
28165 else
28166   { $as_echo "$as_me:$LINENO: result: no" >&5
28167 $as_echo "no" >&6; }
28168 fi
28169
28170
28171   test -n "$MSGMERGE" && break
28172 done
28173
28174   for ac_prog in xgettext
28175 do
28176   # Extract the first word of "$ac_prog", so it can be a program name with args.
28177 set dummy $ac_prog; ac_word=$2
28178 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
28179 $as_echo_n "checking for $ac_word... " >&6; }
28180 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
28181   $as_echo_n "(cached) " >&6
28182 else
28183   if test -n "$XGETTEXT"; then
28184   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
28185 else
28186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28187 for as_dir in $PATH
28188 do
28189   IFS=$as_save_IFS
28190   test -z "$as_dir" && as_dir=.
28191   for ac_exec_ext in '' $ac_executable_extensions; do
28192   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28193     ac_cv_prog_XGETTEXT="$ac_prog"
28194     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
28195     break 2
28196   fi
28197 done
28198 done
28199 IFS=$as_save_IFS
28200
28201 fi
28202 fi
28203 XGETTEXT=$ac_cv_prog_XGETTEXT
28204 if test -n "$XGETTEXT"; then
28205   { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5
28206 $as_echo "$XGETTEXT" >&6; }
28207 else
28208   { $as_echo "$as_me:$LINENO: result: no" >&5
28209 $as_echo "no" >&6; }
28210 fi
28211
28212
28213   test -n "$XGETTEXT" && break
28214 done
28215
28216
28217 fi
28218
28219 # Check for Tcl configuration script tclConfig.sh
28220 if test "$with_tcl" = yes; then
28221     for ac_prog in tclsh tcl tclsh8.5 tclsh85 tclsh8.4 tclsh84 tclsh8.3 tclsh83
28222 do
28223   # Extract the first word of "$ac_prog", so it can be a program name with args.
28224 set dummy $ac_prog; ac_word=$2
28225 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
28226 $as_echo_n "checking for $ac_word... " >&6; }
28227 if test "${ac_cv_path_TCLSH+set}" = set; then
28228   $as_echo_n "(cached) " >&6
28229 else
28230   case $TCLSH in
28231   [\\/]* | ?:[\\/]*)
28232   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
28233   ;;
28234   *)
28235   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28236 for as_dir in $PATH
28237 do
28238   IFS=$as_save_IFS
28239   test -z "$as_dir" && as_dir=.
28240   for ac_exec_ext in '' $ac_executable_extensions; do
28241   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28242     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
28243     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
28244     break 2
28245   fi
28246 done
28247 done
28248 IFS=$as_save_IFS
28249
28250   ;;
28251 esac
28252 fi
28253 TCLSH=$ac_cv_path_TCLSH
28254 if test -n "$TCLSH"; then
28255   { $as_echo "$as_me:$LINENO: result: $TCLSH" >&5
28256 $as_echo "$TCLSH" >&6; }
28257 else
28258   { $as_echo "$as_me:$LINENO: result: no" >&5
28259 $as_echo "no" >&6; }
28260 fi
28261
28262
28263   test -n "$TCLSH" && break
28264 done
28265
28266 if test x"$TCLSH" = x""; then
28267   { { $as_echo "$as_me:$LINENO: error: Tcl shell not found" >&5
28268 $as_echo "$as_me: error: Tcl shell not found" >&2;}
28269    { (exit 1); exit 1; }; }
28270 fi
28271
28272 { $as_echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
28273 $as_echo_n "checking for tclConfig.sh... " >&6; }
28274 # Let user override test
28275 if test -z "$TCL_CONFIG_SH"; then
28276     pgac_test_dirs="$with_tclconfig"
28277
28278     set X $pgac_test_dirs; shift
28279     if test $# -eq 0; then
28280         test -z "$TCLSH" && { { $as_echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
28281 $as_echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
28282    { (exit 1); exit 1; }; }
28283         set X `echo 'puts $auto_path' | $TCLSH`; shift
28284     fi
28285
28286     for pgac_dir do
28287         if test -r "$pgac_dir/tclConfig.sh"; then
28288             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
28289             break
28290         fi
28291     done
28292 fi
28293
28294 if test -z "$TCL_CONFIG_SH"; then
28295     { $as_echo "$as_me:$LINENO: result: no" >&5
28296 $as_echo "no" >&6; }
28297     { { $as_echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
28298 $as_echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
28299    { (exit 1); exit 1; }; }
28300 else
28301     { $as_echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
28302 $as_echo "$TCL_CONFIG_SH" >&6; }
28303 fi
28304
28305
28306
28307     . "$TCL_CONFIG_SH"
28308 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
28309 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
28310 eval TCL_LIBS=\"$TCL_LIBS\"
28311 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
28312 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
28313
28314         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
28315     ac_save_CPPFLAGS=$CPPFLAGS
28316     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
28317     if test "${ac_cv_header_tcl_h+set}" = set; then
28318   { $as_echo "$as_me:$LINENO: checking for tcl.h" >&5
28319 $as_echo_n "checking for tcl.h... " >&6; }
28320 if test "${ac_cv_header_tcl_h+set}" = set; then
28321   $as_echo_n "(cached) " >&6
28322 fi
28323 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
28324 $as_echo "$ac_cv_header_tcl_h" >&6; }
28325 else
28326   # Is the header compilable?
28327 { $as_echo "$as_me:$LINENO: checking tcl.h usability" >&5
28328 $as_echo_n "checking tcl.h usability... " >&6; }
28329 cat >conftest.$ac_ext <<_ACEOF
28330 /* confdefs.h.  */
28331 _ACEOF
28332 cat confdefs.h >>conftest.$ac_ext
28333 cat >>conftest.$ac_ext <<_ACEOF
28334 /* end confdefs.h.  */
28335 $ac_includes_default
28336 #include <tcl.h>
28337 _ACEOF
28338 rm -f conftest.$ac_objext
28339 if { (ac_try="$ac_compile"
28340 case "(($ac_try" in
28341   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28342   *) ac_try_echo=$ac_try;;
28343 esac
28344 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28345 $as_echo "$ac_try_echo") >&5
28346   (eval "$ac_compile") 2>conftest.er1
28347   ac_status=$?
28348   grep -v '^ *+' conftest.er1 >conftest.err
28349   rm -f conftest.er1
28350   cat conftest.err >&5
28351   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28352   (exit $ac_status); } && {
28353          test -z "$ac_c_werror_flag" ||
28354          test ! -s conftest.err
28355        } && test -s conftest.$ac_objext; then
28356   ac_header_compiler=yes
28357 else
28358   $as_echo "$as_me: failed program was:" >&5
28359 sed 's/^/| /' conftest.$ac_ext >&5
28360
28361         ac_header_compiler=no
28362 fi
28363
28364 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28365 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
28366 $as_echo "$ac_header_compiler" >&6; }
28367
28368 # Is the header present?
28369 { $as_echo "$as_me:$LINENO: checking tcl.h presence" >&5
28370 $as_echo_n "checking tcl.h presence... " >&6; }
28371 cat >conftest.$ac_ext <<_ACEOF
28372 /* confdefs.h.  */
28373 _ACEOF
28374 cat confdefs.h >>conftest.$ac_ext
28375 cat >>conftest.$ac_ext <<_ACEOF
28376 /* end confdefs.h.  */
28377 #include <tcl.h>
28378 _ACEOF
28379 if { (ac_try="$ac_cpp conftest.$ac_ext"
28380 case "(($ac_try" in
28381   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28382   *) ac_try_echo=$ac_try;;
28383 esac
28384 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28385 $as_echo "$ac_try_echo") >&5
28386   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
28387   ac_status=$?
28388   grep -v '^ *+' conftest.er1 >conftest.err
28389   rm -f conftest.er1
28390   cat conftest.err >&5
28391   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28392   (exit $ac_status); } >/dev/null && {
28393          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
28394          test ! -s conftest.err
28395        }; then
28396   ac_header_preproc=yes
28397 else
28398   $as_echo "$as_me: failed program was:" >&5
28399 sed 's/^/| /' conftest.$ac_ext >&5
28400
28401   ac_header_preproc=no
28402 fi
28403
28404 rm -f conftest.err conftest.$ac_ext
28405 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
28406 $as_echo "$ac_header_preproc" >&6; }
28407
28408 # So?  What about this header?
28409 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
28410   yes:no: )
28411     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
28412 $as_echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
28413     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
28414 $as_echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
28415     ac_header_preproc=yes
28416     ;;
28417   no:yes:* )
28418     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
28419 $as_echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
28420     { $as_echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
28421 $as_echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
28422     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
28423 $as_echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
28424     { $as_echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
28425 $as_echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
28426     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
28427 $as_echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
28428     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
28429 $as_echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
28430     ( cat <<\_ASBOX
28431 ## ---------------------------------------- ##
28432 ## Report this to pgsql-bugs@postgresql.org ##
28433 ## ---------------------------------------- ##
28434 _ASBOX
28435      ) | sed "s/^/$as_me: WARNING:     /" >&2
28436     ;;
28437 esac
28438 { $as_echo "$as_me:$LINENO: checking for tcl.h" >&5
28439 $as_echo_n "checking for tcl.h... " >&6; }
28440 if test "${ac_cv_header_tcl_h+set}" = set; then
28441   $as_echo_n "(cached) " >&6
28442 else
28443   ac_cv_header_tcl_h=$ac_header_preproc
28444 fi
28445 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
28446 $as_echo "$ac_cv_header_tcl_h" >&6; }
28447
28448 fi
28449 if test "x$ac_cv_header_tcl_h" = x""yes; then
28450   :
28451 else
28452   { { $as_echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
28453 $as_echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
28454    { (exit 1); exit 1; }; }
28455 fi
28456
28457
28458     CPPFLAGS=$ac_save_CPPFLAGS
28459 fi
28460
28461 #
28462 # Check for DocBook and tools
28463 #
28464 for ac_prog in onsgmls nsgmls
28465 do
28466   # Extract the first word of "$ac_prog", so it can be a program name with args.
28467 set dummy $ac_prog; ac_word=$2
28468 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
28469 $as_echo_n "checking for $ac_word... " >&6; }
28470 if test "${ac_cv_prog_NSGMLS+set}" = set; then
28471   $as_echo_n "(cached) " >&6
28472 else
28473   if test -n "$NSGMLS"; then
28474   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
28475 else
28476 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28477 for as_dir in $PATH
28478 do
28479   IFS=$as_save_IFS
28480   test -z "$as_dir" && as_dir=.
28481   for ac_exec_ext in '' $ac_executable_extensions; do
28482   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28483     ac_cv_prog_NSGMLS="$ac_prog"
28484     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
28485     break 2
28486   fi
28487 done
28488 done
28489 IFS=$as_save_IFS
28490
28491 fi
28492 fi
28493 NSGMLS=$ac_cv_prog_NSGMLS
28494 if test -n "$NSGMLS"; then
28495   { $as_echo "$as_me:$LINENO: result: $NSGMLS" >&5
28496 $as_echo "$NSGMLS" >&6; }
28497 else
28498   { $as_echo "$as_me:$LINENO: result: no" >&5
28499 $as_echo "no" >&6; }
28500 fi
28501
28502
28503   test -n "$NSGMLS" && break
28504 done
28505
28506 for ac_prog in openjade jade
28507 do
28508   # Extract the first word of "$ac_prog", so it can be a program name with args.
28509 set dummy $ac_prog; ac_word=$2
28510 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
28511 $as_echo_n "checking for $ac_word... " >&6; }
28512 if test "${ac_cv_prog_JADE+set}" = set; then
28513   $as_echo_n "(cached) " >&6
28514 else
28515   if test -n "$JADE"; then
28516   ac_cv_prog_JADE="$JADE" # Let the user override the test.
28517 else
28518 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28519 for as_dir in $PATH
28520 do
28521   IFS=$as_save_IFS
28522   test -z "$as_dir" && as_dir=.
28523   for ac_exec_ext in '' $ac_executable_extensions; do
28524   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28525     ac_cv_prog_JADE="$ac_prog"
28526     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
28527     break 2
28528   fi
28529 done
28530 done
28531 IFS=$as_save_IFS
28532
28533 fi
28534 fi
28535 JADE=$ac_cv_prog_JADE
28536 if test -n "$JADE"; then
28537   { $as_echo "$as_me:$LINENO: result: $JADE" >&5
28538 $as_echo "$JADE" >&6; }
28539 else
28540   { $as_echo "$as_me:$LINENO: result: no" >&5
28541 $as_echo "no" >&6; }
28542 fi
28543
28544
28545   test -n "$JADE" && break
28546 done
28547
28548
28549 { $as_echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
28550 $as_echo_n "checking for DocBook V4.2... " >&6; }
28551 if test "${pgac_cv_check_docbook+set}" = set; then
28552   $as_echo_n "(cached) " >&6
28553 else
28554   cat >conftest.sgml <<EOF
28555 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
28556 <book>
28557  <title>test</title>
28558  <chapter>
28559   <title>random</title>
28560    <sect1>
28561     <title>testsect</title>
28562     <para>text</para>
28563   </sect1>
28564  </chapter>
28565 </book>
28566 EOF
28567
28568 pgac_cv_check_docbook=no
28569
28570 if test -n "$NSGMLS"; then
28571   $NSGMLS -s conftest.sgml 1>&5 2>&1
28572   if test $? -eq 0; then
28573     pgac_cv_check_docbook=yes
28574   fi
28575 fi
28576 rm -f conftest.sgml
28577 fi
28578 { $as_echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
28579 $as_echo "$pgac_cv_check_docbook" >&6; }
28580
28581 have_docbook=$pgac_cv_check_docbook
28582
28583
28584 { $as_echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
28585 $as_echo_n "checking for DocBook stylesheets... " >&6; }
28586 if test "${pgac_cv_path_stylesheets+set}" = set; then
28587   $as_echo_n "(cached) " >&6
28588 else
28589   if test -n "$DOCBOOKSTYLE"; then
28590   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
28591 else
28592   for pgac_prefix in /usr /usr/local /opt /sw; do
28593     for pgac_infix in share lib; do
28594       for pgac_postfix in \
28595         sgml/stylesheets/nwalsh-modular \
28596         sgml/stylesheets/docbook \
28597         sgml/stylesheets/dsssl/docbook \
28598         sgml/docbook-dsssl \
28599         sgml/docbook/dsssl/modular \
28600         sgml/docbook/stylesheet/dsssl/modular \
28601         sgml/docbook/dsssl-stylesheets \
28602         sgml/dsssl/docbook-dsssl-nwalsh
28603       do
28604         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
28605         if test -r "$pgac_candidate/html/docbook.dsl" \
28606            && test -r "$pgac_candidate/print/docbook.dsl"
28607         then
28608           pgac_cv_path_stylesheets=$pgac_candidate
28609           break 3
28610         fi
28611       done
28612     done
28613   done
28614 fi
28615 fi
28616
28617 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
28618
28619 if test -n "$DOCBOOKSTYLE"; then
28620   { $as_echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
28621 $as_echo "$DOCBOOKSTYLE" >&6; }
28622 else
28623   { $as_echo "$as_me:$LINENO: result: no" >&5
28624 $as_echo "no" >&6; }
28625 fi
28626 if test -n "$DOCBOOKSTYLE"; then
28627   for ac_prog in collateindex.pl
28628 do
28629   # Extract the first word of "$ac_prog", so it can be a program name with args.
28630 set dummy $ac_prog; ac_word=$2
28631 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
28632 $as_echo_n "checking for $ac_word... " >&6; }
28633 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
28634   $as_echo_n "(cached) " >&6
28635 else
28636   case $COLLATEINDEX in
28637   [\\/]* | ?:[\\/]*)
28638   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
28639   ;;
28640   *)
28641   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28642 for as_dir in $DOCBOOKSTYLE/bin $PATH
28643 do
28644   IFS=$as_save_IFS
28645   test -z "$as_dir" && as_dir=.
28646   for ac_exec_ext in '' $ac_executable_extensions; do
28647   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28648     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
28649     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
28650     break 2
28651   fi
28652 done
28653 done
28654 IFS=$as_save_IFS
28655
28656   ;;
28657 esac
28658 fi
28659 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
28660 if test -n "$COLLATEINDEX"; then
28661   { $as_echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
28662 $as_echo "$COLLATEINDEX" >&6; }
28663 else
28664   { $as_echo "$as_me:$LINENO: result: no" >&5
28665 $as_echo "no" >&6; }
28666 fi
28667
28668
28669   test -n "$COLLATEINDEX" && break
28670 done
28671
28672 else
28673   for ac_prog in collateindex.pl
28674 do
28675   # Extract the first word of "$ac_prog", so it can be a program name with args.
28676 set dummy $ac_prog; ac_word=$2
28677 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
28678 $as_echo_n "checking for $ac_word... " >&6; }
28679 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
28680   $as_echo_n "(cached) " >&6
28681 else
28682   case $COLLATEINDEX in
28683   [\\/]* | ?:[\\/]*)
28684   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
28685   ;;
28686   *)
28687   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28688 for as_dir in $PATH
28689 do
28690   IFS=$as_save_IFS
28691   test -z "$as_dir" && as_dir=.
28692   for ac_exec_ext in '' $ac_executable_extensions; do
28693   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28694     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
28695     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
28696     break 2
28697   fi
28698 done
28699 done
28700 IFS=$as_save_IFS
28701
28702   ;;
28703 esac
28704 fi
28705 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
28706 if test -n "$COLLATEINDEX"; then
28707   { $as_echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
28708 $as_echo "$COLLATEINDEX" >&6; }
28709 else
28710   { $as_echo "$as_me:$LINENO: result: no" >&5
28711 $as_echo "no" >&6; }
28712 fi
28713
28714
28715   test -n "$COLLATEINDEX" && break
28716 done
28717
28718 fi
28719 for ac_prog in xsltproc
28720 do
28721   # Extract the first word of "$ac_prog", so it can be a program name with args.
28722 set dummy $ac_prog; ac_word=$2
28723 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
28724 $as_echo_n "checking for $ac_word... " >&6; }
28725 if test "${ac_cv_prog_XSLTPROC+set}" = set; then
28726   $as_echo_n "(cached) " >&6
28727 else
28728   if test -n "$XSLTPROC"; then
28729   ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
28730 else
28731 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28732 for as_dir in $PATH
28733 do
28734   IFS=$as_save_IFS
28735   test -z "$as_dir" && as_dir=.
28736   for ac_exec_ext in '' $ac_executable_extensions; do
28737   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28738     ac_cv_prog_XSLTPROC="$ac_prog"
28739     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
28740     break 2
28741   fi
28742 done
28743 done
28744 IFS=$as_save_IFS
28745
28746 fi
28747 fi
28748 XSLTPROC=$ac_cv_prog_XSLTPROC
28749 if test -n "$XSLTPROC"; then
28750   { $as_echo "$as_me:$LINENO: result: $XSLTPROC" >&5
28751 $as_echo "$XSLTPROC" >&6; }
28752 else
28753   { $as_echo "$as_me:$LINENO: result: no" >&5
28754 $as_echo "no" >&6; }
28755 fi
28756
28757
28758   test -n "$XSLTPROC" && break
28759 done
28760
28761 for ac_prog in osx sgml2xml sx
28762 do
28763   # Extract the first word of "$ac_prog", so it can be a program name with args.
28764 set dummy $ac_prog; ac_word=$2
28765 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
28766 $as_echo_n "checking for $ac_word... " >&6; }
28767 if test "${ac_cv_prog_OSX+set}" = set; then
28768   $as_echo_n "(cached) " >&6
28769 else
28770   if test -n "$OSX"; then
28771   ac_cv_prog_OSX="$OSX" # Let the user override the test.
28772 else
28773 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28774 for as_dir in $PATH
28775 do
28776   IFS=$as_save_IFS
28777   test -z "$as_dir" && as_dir=.
28778   for ac_exec_ext in '' $ac_executable_extensions; do
28779   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28780     ac_cv_prog_OSX="$ac_prog"
28781     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
28782     break 2
28783   fi
28784 done
28785 done
28786 IFS=$as_save_IFS
28787
28788 fi
28789 fi
28790 OSX=$ac_cv_prog_OSX
28791 if test -n "$OSX"; then
28792   { $as_echo "$as_me:$LINENO: result: $OSX" >&5
28793 $as_echo "$OSX" >&6; }
28794 else
28795   { $as_echo "$as_me:$LINENO: result: no" >&5
28796 $as_echo "no" >&6; }
28797 fi
28798
28799
28800   test -n "$OSX" && break
28801 done
28802
28803
28804 # Thread testing
28805
28806 # We have to run the thread test near the end so we have all our symbols
28807 # defined.  Cross compiling throws a warning.
28808 #
28809 if test "$enable_thread_safety" = yes; then
28810 if test "$PORTNAME" != "win32"
28811 then
28812 { $as_echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
28813 $as_echo_n "checking thread safety of required library functions... " >&6; }
28814
28815 _CFLAGS="$CFLAGS"
28816 _LIBS="$LIBS"
28817 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
28818 LIBS="$LIBS $PTHREAD_LIBS"
28819 if test "$cross_compiling" = yes; then
28820   { $as_echo "$as_me:$LINENO: result: maybe" >&5
28821 $as_echo "maybe" >&6; }
28822   { $as_echo "$as_me:$LINENO: WARNING:
28823 *** Skipping thread test program because of cross-compile build.
28824 *** Run the program in src/test/thread on the target machine.
28825 " >&5
28826 $as_echo "$as_me: WARNING:
28827 *** Skipping thread test program because of cross-compile build.
28828 *** Run the program in src/test/thread on the target machine.
28829 " >&2;}
28830 else
28831   cat >conftest.$ac_ext <<_ACEOF
28832 /* confdefs.h.  */
28833 _ACEOF
28834 cat confdefs.h >>conftest.$ac_ext
28835 cat >>conftest.$ac_ext <<_ACEOF
28836 /* end confdefs.h.  */
28837 #include "$srcdir/src/test/thread/thread_test.c"
28838 _ACEOF
28839 rm -f conftest$ac_exeext
28840 if { (ac_try="$ac_link"
28841 case "(($ac_try" in
28842   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28843   *) ac_try_echo=$ac_try;;
28844 esac
28845 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28846 $as_echo "$ac_try_echo") >&5
28847   (eval "$ac_link") 2>&5
28848   ac_status=$?
28849   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28850   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
28851   { (case "(($ac_try" in
28852   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28853   *) ac_try_echo=$ac_try;;
28854 esac
28855 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28856 $as_echo "$ac_try_echo") >&5
28857   (eval "$ac_try") 2>&5
28858   ac_status=$?
28859   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28860   (exit $ac_status); }; }; then
28861   { $as_echo "$as_me:$LINENO: result: yes" >&5
28862 $as_echo "yes" >&6; }
28863 else
28864   $as_echo "$as_me: program exited with status $ac_status" >&5
28865 $as_echo "$as_me: failed program was:" >&5
28866 sed 's/^/| /' conftest.$ac_ext >&5
28867
28868 ( exit $ac_status )
28869 { $as_echo "$as_me:$LINENO: result: no" >&5
28870 $as_echo "no" >&6; }
28871   { { $as_echo "$as_me:$LINENO: error: thread test program failed
28872 This platform is not thread-safe.  Check the file 'config.log' or compile
28873 and run src/test/thread/thread_test for the exact reason.
28874 Use --disable-thread-safety to disable thread safety." >&5
28875 $as_echo "$as_me: error: thread test program failed
28876 This platform is not thread-safe.  Check the file 'config.log' or compile
28877 and run src/test/thread/thread_test for the exact reason.
28878 Use --disable-thread-safety to disable thread safety." >&2;}
28879    { (exit 1); exit 1; }; }
28880 fi
28881 rm -rf conftest.dSYM
28882 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
28883 fi
28884
28885
28886 CFLAGS="$_CFLAGS"
28887 LIBS="$_LIBS"
28888 else
28889 { $as_echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
28890 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
28891 fi
28892 fi
28893
28894 # If compiler will take -Wl,--as-needed (or various platform-specific
28895 # spellings thereof) then add that to LDFLAGS.  This is much easier than
28896 # trying to filter LIBS to the minimum for each executable.
28897 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
28898 # libreadline; therefore we postpone testing it until we know what library
28899 # dependencies readline has.  The test code will try to link with $LIBS.
28900 if test "$with_readline" = yes; then
28901   link_test_func=readline
28902 else
28903   link_test_func=exit
28904 fi
28905
28906 if test "$PORTNAME" = "darwin"; then
28907   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
28908 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
28909 if test "${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+set}" = set; then
28910   $as_echo_n "(cached) " >&6
28911 else
28912   pgac_save_LDFLAGS=$LDFLAGS
28913 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
28914 if test "$cross_compiling" = yes; then
28915   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
28916 else
28917   cat >conftest.$ac_ext <<_ACEOF
28918 /* confdefs.h.  */
28919 _ACEOF
28920 cat confdefs.h >>conftest.$ac_ext
28921 cat >>conftest.$ac_ext <<_ACEOF
28922 /* end confdefs.h.  */
28923 extern void $link_test_func (); void (*fptr) () = $link_test_func;
28924 int
28925 main ()
28926 {
28927
28928   ;
28929   return 0;
28930 }
28931 _ACEOF
28932 rm -f conftest$ac_exeext
28933 if { (ac_try="$ac_link"
28934 case "(($ac_try" in
28935   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28936   *) ac_try_echo=$ac_try;;
28937 esac
28938 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28939 $as_echo "$ac_try_echo") >&5
28940   (eval "$ac_link") 2>&5
28941   ac_status=$?
28942   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28943   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
28944   { (case "(($ac_try" in
28945   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28946   *) ac_try_echo=$ac_try;;
28947 esac
28948 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28949 $as_echo "$ac_try_echo") >&5
28950   (eval "$ac_try") 2>&5
28951   ac_status=$?
28952   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28953   (exit $ac_status); }; }; then
28954   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
28955 else
28956   $as_echo "$as_me: program exited with status $ac_status" >&5
28957 $as_echo "$as_me: failed program was:" >&5
28958 sed 's/^/| /' conftest.$ac_ext >&5
28959
28960 ( exit $ac_status )
28961 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
28962 fi
28963 rm -rf conftest.dSYM
28964 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
28965 fi
28966
28967
28968 LDFLAGS="$pgac_save_LDFLAGS"
28969 fi
28970 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
28971 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
28972 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
28973   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
28974 fi
28975
28976 elif test "$PORTNAME" = "openbsd"; then
28977   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wl,-Bdynamic" >&5
28978 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
28979 if test "${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+set}" = set; then
28980   $as_echo_n "(cached) " >&6
28981 else
28982   pgac_save_LDFLAGS=$LDFLAGS
28983 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
28984 if test "$cross_compiling" = yes; then
28985   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
28986 else
28987   cat >conftest.$ac_ext <<_ACEOF
28988 /* confdefs.h.  */
28989 _ACEOF
28990 cat confdefs.h >>conftest.$ac_ext
28991 cat >>conftest.$ac_ext <<_ACEOF
28992 /* end confdefs.h.  */
28993 extern void $link_test_func (); void (*fptr) () = $link_test_func;
28994 int
28995 main ()
28996 {
28997
28998   ;
28999   return 0;
29000 }
29001 _ACEOF
29002 rm -f conftest$ac_exeext
29003 if { (ac_try="$ac_link"
29004 case "(($ac_try" in
29005   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29006   *) ac_try_echo=$ac_try;;
29007 esac
29008 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29009 $as_echo "$ac_try_echo") >&5
29010   (eval "$ac_link") 2>&5
29011   ac_status=$?
29012   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29013   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
29014   { (case "(($ac_try" in
29015   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29016   *) ac_try_echo=$ac_try;;
29017 esac
29018 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29019 $as_echo "$ac_try_echo") >&5
29020   (eval "$ac_try") 2>&5
29021   ac_status=$?
29022   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29023   (exit $ac_status); }; }; then
29024   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
29025 else
29026   $as_echo "$as_me: program exited with status $ac_status" >&5
29027 $as_echo "$as_me: failed program was:" >&5
29028 sed 's/^/| /' conftest.$ac_ext >&5
29029
29030 ( exit $ac_status )
29031 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
29032 fi
29033 rm -rf conftest.dSYM
29034 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
29035 fi
29036
29037
29038 LDFLAGS="$pgac_save_LDFLAGS"
29039 fi
29040 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
29041 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
29042 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
29043   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
29044 fi
29045
29046 else
29047   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wl,--as-needed" >&5
29048 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
29049 if test "${pgac_cv_prog_cc_ldflags__Wl___as_needed+set}" = set; then
29050   $as_echo_n "(cached) " >&6
29051 else
29052   pgac_save_LDFLAGS=$LDFLAGS
29053 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
29054 if test "$cross_compiling" = yes; then
29055   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
29056 else
29057   cat >conftest.$ac_ext <<_ACEOF
29058 /* confdefs.h.  */
29059 _ACEOF
29060 cat confdefs.h >>conftest.$ac_ext
29061 cat >>conftest.$ac_ext <<_ACEOF
29062 /* end confdefs.h.  */
29063 extern void $link_test_func (); void (*fptr) () = $link_test_func;
29064 int
29065 main ()
29066 {
29067
29068   ;
29069   return 0;
29070 }
29071 _ACEOF
29072 rm -f conftest$ac_exeext
29073 if { (ac_try="$ac_link"
29074 case "(($ac_try" in
29075   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29076   *) ac_try_echo=$ac_try;;
29077 esac
29078 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29079 $as_echo "$ac_try_echo") >&5
29080   (eval "$ac_link") 2>&5
29081   ac_status=$?
29082   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29083   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
29084   { (case "(($ac_try" in
29085   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29086   *) ac_try_echo=$ac_try;;
29087 esac
29088 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29089 $as_echo "$ac_try_echo") >&5
29090   (eval "$ac_try") 2>&5
29091   ac_status=$?
29092   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29093   (exit $ac_status); }; }; then
29094   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
29095 else
29096   $as_echo "$as_me: program exited with status $ac_status" >&5
29097 $as_echo "$as_me: failed program was:" >&5
29098 sed 's/^/| /' conftest.$ac_ext >&5
29099
29100 ( exit $ac_status )
29101 pgac_cv_prog_cc_ldflags__Wl___as_needed=no
29102 fi
29103 rm -rf conftest.dSYM
29104 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
29105 fi
29106
29107
29108 LDFLAGS="$pgac_save_LDFLAGS"
29109 fi
29110 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
29111 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
29112 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
29113   LDFLAGS="$LDFLAGS -Wl,--as-needed"
29114 fi
29115
29116 fi
29117
29118
29119 # Begin output steps
29120
29121 { $as_echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
29122 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
29123 { $as_echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
29124 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
29125 { $as_echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
29126 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
29127
29128 # Create compiler version string
29129 if test x"$GCC" = x"yes" ; then
29130   cc_string="GCC `${CC} --version | sed q`"
29131 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
29132   cc_string=`${CC} -V 2>&1 | sed q`
29133 else
29134   cc_string=$CC
29135 fi
29136
29137
29138 cat >>confdefs.h <<_ACEOF
29139 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
29140 _ACEOF
29141
29142
29143 # Supply a numeric version string for use by 3rd party add-ons
29144 # awk -F is a regex on some platforms, and not on others, so make "." a tab
29145 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
29146 tr '.' '        ' |
29147 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
29148
29149 cat >>confdefs.h <<_ACEOF
29150 #define PG_VERSION_NUM $PG_VERSION_NUM
29151 _ACEOF
29152
29153
29154
29155 # prepare build tree if outside source tree
29156 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
29157 # Note 2: /bin/pwd might be better than shell's built-in at getting
29158 #         a symlink-free name.
29159 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
29160   vpath_build=no
29161 else
29162   vpath_build=yes
29163   if test "$no_create" != yes; then
29164     $as_echo_n "preparing build tree... " >&6
29165     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
29166     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
29167       || { { $as_echo "$as_me:$LINENO: error: failed" >&5
29168 $as_echo "$as_me: error: failed" >&2;}
29169    { (exit 1); exit 1; }; }
29170     { $as_echo "$as_me:$LINENO: result: done" >&5
29171 $as_echo "done" >&6; }
29172   fi
29173 fi
29174
29175
29176
29177 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
29178
29179
29180 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}"
29181
29182
29183 if test "$PORTNAME" = "win32"; then
29184 ac_config_commands="$ac_config_commands check_win32_symlinks"
29185
29186 fi
29187
29188 ac_config_headers="$ac_config_headers src/include/pg_config.h"
29189
29190
29191 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
29192
29193
29194 cat >confcache <<\_ACEOF
29195 # This file is a shell script that caches the results of configure
29196 # tests run on this system so they can be shared between configure
29197 # scripts and configure runs, see configure's option --config-cache.
29198 # It is not useful on other systems.  If it contains results you don't
29199 # want to keep, you may remove or edit it.
29200 #
29201 # config.status only pays attention to the cache file if you give it
29202 # the --recheck option to rerun configure.
29203 #
29204 # `ac_cv_env_foo' variables (set or unset) will be overridden when
29205 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29206 # following values.
29207
29208 _ACEOF
29209
29210 # The following way of writing the cache mishandles newlines in values,
29211 # but we know of no workaround that is simple, portable, and efficient.
29212 # So, we kill variables containing newlines.
29213 # Ultrix sh set writes to stderr and can't be redirected directly,
29214 # and sets the high bit in the cache file unless we assign to the vars.
29215 (
29216   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
29217     eval ac_val=\$$ac_var
29218     case $ac_val in #(
29219     *${as_nl}*)
29220       case $ac_var in #(
29221       *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
29222 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
29223       esac
29224       case $ac_var in #(
29225       _ | IFS | as_nl) ;; #(
29226       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
29227       *) $as_unset $ac_var ;;
29228       esac ;;
29229     esac
29230   done
29231
29232   (set) 2>&1 |
29233     case $as_nl`(ac_space=' '; set) 2>&1` in #(
29234     *${as_nl}ac_space=\ *)
29235       # `set' does not quote correctly, so add quotes (double-quote
29236       # substitution turns \\\\ into \\, and sed turns \\ into \).
29237       sed -n \
29238         "s/'/'\\\\''/g;
29239           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29240       ;; #(
29241     *)
29242       # `set' quotes correctly as required by POSIX, so do not add quotes.
29243       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
29244       ;;
29245     esac |
29246     sort
29247 ) |
29248   sed '
29249      /^ac_cv_env_/b end
29250      t clear
29251      :clear
29252      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29253      t end
29254      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29255      :end' >>confcache
29256 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
29257   if test -w "$cache_file"; then
29258     test "x$cache_file" != "x/dev/null" &&
29259       { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
29260 $as_echo "$as_me: updating cache $cache_file" >&6;}
29261     cat confcache >$cache_file
29262   else
29263     { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
29264 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
29265   fi
29266 fi
29267 rm -f confcache
29268
29269 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29270 # Let make expand exec_prefix.
29271 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29272
29273 DEFS=-DHAVE_CONFIG_H
29274
29275 ac_libobjs=
29276 ac_ltlibobjs=
29277 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
29278   # 1. Remove the extension, and $U if already installed.
29279   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
29280   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
29281   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
29282   #    will be set to the directory where LIBOBJS objects are built.
29283   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
29284   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
29285 done
29286 LIBOBJS=$ac_libobjs
29287
29288 LTLIBOBJS=$ac_ltlibobjs
29289
29290
29291
29292
29293 : ${CONFIG_STATUS=./config.status}
29294 ac_write_fail=0
29295 ac_clean_files_save=$ac_clean_files
29296 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29297 { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
29298 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
29299 cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29300 #! $SHELL
29301 # Generated by $as_me.
29302 # Run this file to recreate the current configuration.
29303 # Compiler output produced by configure, useful for debugging
29304 # configure, is in config.log if it exists.
29305
29306 debug=false
29307 ac_cs_recheck=false
29308 ac_cs_silent=false
29309 SHELL=\${CONFIG_SHELL-$SHELL}
29310 _ACEOF
29311
29312 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29313 ## --------------------- ##
29314 ## M4sh Initialization.  ##
29315 ## --------------------- ##
29316
29317 # Be more Bourne compatible
29318 DUALCASE=1; export DUALCASE # for MKS sh
29319 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29320   emulate sh
29321   NULLCMD=:
29322   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29323   # is contrary to our usage.  Disable this feature.
29324   alias -g '${1+"$@"}'='"$@"'
29325   setopt NO_GLOB_SUBST
29326 else
29327   case `(set -o) 2>/dev/null` in
29328   *posix*) set -o posix ;;
29329 esac
29330
29331 fi
29332
29333
29334
29335
29336 # PATH needs CR
29337 # Avoid depending upon Character Ranges.
29338 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
29339 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
29340 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
29341 as_cr_digits='0123456789'
29342 as_cr_alnum=$as_cr_Letters$as_cr_digits
29343
29344 as_nl='
29345 '
29346 export as_nl
29347 # Printing a long string crashes Solaris 7 /usr/bin/printf.
29348 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
29349 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
29350 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
29351 if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
29352   as_echo='printf %s\n'
29353   as_echo_n='printf %s'
29354 else
29355   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
29356     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
29357     as_echo_n='/usr/ucb/echo -n'
29358   else
29359     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
29360     as_echo_n_body='eval
29361       arg=$1;
29362       case $arg in
29363       *"$as_nl"*)
29364         expr "X$arg" : "X\\(.*\\)$as_nl";
29365         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
29366       esac;
29367       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
29368     '
29369     export as_echo_n_body
29370     as_echo_n='sh -c $as_echo_n_body as_echo'
29371   fi
29372   export as_echo_body
29373   as_echo='sh -c $as_echo_body as_echo'
29374 fi
29375
29376 # The user is always right.
29377 if test "${PATH_SEPARATOR+set}" != set; then
29378   PATH_SEPARATOR=:
29379   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
29380     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
29381       PATH_SEPARATOR=';'
29382   }
29383 fi
29384
29385 # Support unset when possible.
29386 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
29387   as_unset=unset
29388 else
29389   as_unset=false
29390 fi
29391
29392
29393 # IFS
29394 # We need space, tab and new line, in precisely that order.  Quoting is
29395 # there to prevent editors from complaining about space-tab.
29396 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
29397 # splitting by setting IFS to empty value.)
29398 IFS=" ""        $as_nl"
29399
29400 # Find who we are.  Look in the path if we contain no directory separator.
29401 case $0 in
29402   *[\\/]* ) as_myself=$0 ;;
29403   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29404 for as_dir in $PATH
29405 do
29406   IFS=$as_save_IFS
29407   test -z "$as_dir" && as_dir=.
29408   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
29409 done
29410 IFS=$as_save_IFS
29411
29412      ;;
29413 esac
29414 # We did not find ourselves, most probably we were run as `sh COMMAND'
29415 # in which case we are not to be found in the path.
29416 if test "x$as_myself" = x; then
29417   as_myself=$0
29418 fi
29419 if test ! -f "$as_myself"; then
29420   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
29421   { (exit 1); exit 1; }
29422 fi
29423
29424 # Work around bugs in pre-3.0 UWIN ksh.
29425 for as_var in ENV MAIL MAILPATH
29426 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
29427 done
29428 PS1='$ '
29429 PS2='> '
29430 PS4='+ '
29431
29432 # NLS nuisances.
29433 LC_ALL=C
29434 export LC_ALL
29435 LANGUAGE=C
29436 export LANGUAGE
29437
29438 # Required to use basename.
29439 if expr a : '\(a\)' >/dev/null 2>&1 &&
29440    test "X`expr 00001 : '.*\(...\)'`" = X001; then
29441   as_expr=expr
29442 else
29443   as_expr=false
29444 fi
29445
29446 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
29447   as_basename=basename
29448 else
29449   as_basename=false
29450 fi
29451
29452
29453 # Name of the executable.
29454 as_me=`$as_basename -- "$0" ||
29455 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
29456          X"$0" : 'X\(//\)$' \| \
29457          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
29458 $as_echo X/"$0" |
29459     sed '/^.*\/\([^/][^/]*\)\/*$/{
29460             s//\1/
29461             q
29462           }
29463           /^X\/\(\/\/\)$/{
29464             s//\1/
29465             q
29466           }
29467           /^X\/\(\/\).*/{
29468             s//\1/
29469             q
29470           }
29471           s/.*/./; q'`
29472
29473 # CDPATH.
29474 $as_unset CDPATH
29475
29476
29477
29478   as_lineno_1=$LINENO
29479   as_lineno_2=$LINENO
29480   test "x$as_lineno_1" != "x$as_lineno_2" &&
29481   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
29482
29483   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
29484   # uniformly replaced by the line number.  The first 'sed' inserts a
29485   # line-number line after each line using $LINENO; the second 'sed'
29486   # does the real work.  The second script uses 'N' to pair each
29487   # line-number line with the line containing $LINENO, and appends
29488   # trailing '-' during substitution so that $LINENO is not a special
29489   # case at line end.
29490   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
29491   # scripts with optimization help from Paolo Bonzini.  Blame Lee
29492   # E. McMahon (1931-1989) for sed's syntax.  :-)
29493   sed -n '
29494     p
29495     /[$]LINENO/=
29496   ' <$as_myself |
29497     sed '
29498       s/[$]LINENO.*/&-/
29499       t lineno
29500       b
29501       :lineno
29502       N
29503       :loop
29504       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
29505       t loop
29506       s/-\n.*//
29507     ' >$as_me.lineno &&
29508   chmod +x "$as_me.lineno" ||
29509     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
29510    { (exit 1); exit 1; }; }
29511
29512   # Don't try to exec as it changes $[0], causing all sort of problems
29513   # (the dirname of $[0] is not the place where we might find the
29514   # original and so on.  Autoconf is especially sensitive to this).
29515   . "./$as_me.lineno"
29516   # Exit status is that of the last command.
29517   exit
29518 }
29519
29520
29521 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
29522   as_dirname=dirname
29523 else
29524   as_dirname=false
29525 fi
29526
29527 ECHO_C= ECHO_N= ECHO_T=
29528 case `echo -n x` in
29529 -n*)
29530   case `echo 'x\c'` in
29531   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
29532   *)   ECHO_C='\c';;
29533   esac;;
29534 *)
29535   ECHO_N='-n';;
29536 esac
29537 if expr a : '\(a\)' >/dev/null 2>&1 &&
29538    test "X`expr 00001 : '.*\(...\)'`" = X001; then
29539   as_expr=expr
29540 else
29541   as_expr=false
29542 fi
29543
29544 rm -f conf$$ conf$$.exe conf$$.file
29545 if test -d conf$$.dir; then
29546   rm -f conf$$.dir/conf$$.file
29547 else
29548   rm -f conf$$.dir
29549   mkdir conf$$.dir 2>/dev/null
29550 fi
29551 if (echo >conf$$.file) 2>/dev/null; then
29552   if ln -s conf$$.file conf$$ 2>/dev/null; then
29553     as_ln_s='ln -s'
29554     # ... but there are two gotchas:
29555     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
29556     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
29557     # In both cases, we have to default to `cp -p'.
29558     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
29559       as_ln_s='cp -p'
29560   elif ln conf$$.file conf$$ 2>/dev/null; then
29561     as_ln_s=ln
29562   else
29563     as_ln_s='cp -p'
29564   fi
29565 else
29566   as_ln_s='cp -p'
29567 fi
29568 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
29569 rmdir conf$$.dir 2>/dev/null
29570
29571 if mkdir -p . 2>/dev/null; then
29572   as_mkdir_p=:
29573 else
29574   test -d ./-p && rmdir ./-p
29575   as_mkdir_p=false
29576 fi
29577
29578 if test -x / >/dev/null 2>&1; then
29579   as_test_x='test -x'
29580 else
29581   if ls -dL / >/dev/null 2>&1; then
29582     as_ls_L_option=L
29583   else
29584     as_ls_L_option=
29585   fi
29586   as_test_x='
29587     eval sh -c '\''
29588       if test -d "$1"; then
29589         test -d "$1/.";
29590       else
29591         case $1 in
29592         -*)set "./$1";;
29593         esac;
29594         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
29595         ???[sx]*):;;*)false;;esac;fi
29596     '\'' sh
29597   '
29598 fi
29599 as_executable_p=$as_test_x
29600
29601 # Sed expression to map a string onto a valid CPP name.
29602 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
29603
29604 # Sed expression to map a string onto a valid variable name.
29605 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
29606
29607
29608 exec 6>&1
29609
29610 # Save the log message, to keep $[0] and so on meaningful, and to
29611 # report actual input values of CONFIG_FILES etc. instead of their
29612 # values after options handling.
29613 ac_log="
29614 This file was extended by PostgreSQL $as_me 9.1devel, which was
29615 generated by GNU Autoconf 2.63.  Invocation command line was
29616
29617   CONFIG_FILES    = $CONFIG_FILES
29618   CONFIG_HEADERS  = $CONFIG_HEADERS
29619   CONFIG_LINKS    = $CONFIG_LINKS
29620   CONFIG_COMMANDS = $CONFIG_COMMANDS
29621   $ $0 $@
29622
29623 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29624 "
29625
29626 _ACEOF
29627
29628 case $ac_config_files in *"
29629 "*) set x $ac_config_files; shift; ac_config_files=$*;;
29630 esac
29631
29632 case $ac_config_headers in *"
29633 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
29634 esac
29635
29636
29637 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29638 # Files that config.status was made for.
29639 config_files="$ac_config_files"
29640 config_headers="$ac_config_headers"
29641 config_links="$ac_config_links"
29642 config_commands="$ac_config_commands"
29643
29644 _ACEOF
29645
29646 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29647 ac_cs_usage="\
29648 \`$as_me' instantiates files from templates according to the
29649 current configuration.
29650
29651 Usage: $0 [OPTION]... [FILE]...
29652
29653   -h, --help       print this help, then exit
29654   -V, --version    print version number and configuration settings, then exit
29655   -q, --quiet, --silent
29656                    do not print progress messages
29657   -d, --debug      don't remove temporary files
29658       --recheck    update $as_me by reconfiguring in the same conditions
29659       --file=FILE[:TEMPLATE]
29660                    instantiate the configuration file FILE
29661       --header=FILE[:TEMPLATE]
29662                    instantiate the configuration header FILE
29663
29664 Configuration files:
29665 $config_files
29666
29667 Configuration headers:
29668 $config_headers
29669
29670 Configuration links:
29671 $config_links
29672
29673 Configuration commands:
29674 $config_commands
29675
29676 Report bugs to <bug-autoconf@gnu.org>."
29677
29678 _ACEOF
29679 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29680 ac_cs_version="\\
29681 PostgreSQL config.status 9.1devel
29682 configured by $0, generated by GNU Autoconf 2.63,
29683   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
29684
29685 Copyright (C) 2008 Free Software Foundation, Inc.
29686 This config.status script is free software; the Free Software Foundation
29687 gives unlimited permission to copy, distribute and modify it."
29688
29689 ac_pwd='$ac_pwd'
29690 srcdir='$srcdir'
29691 MKDIR_P='$MKDIR_P'
29692 AWK='$AWK'
29693 test -n "\$AWK" || AWK=awk
29694 _ACEOF
29695
29696 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29697 # The default lists apply if the user does not specify any file.
29698 ac_need_defaults=:
29699 while test $# != 0
29700 do
29701   case $1 in
29702   --*=*)
29703     ac_option=`expr "X$1" : 'X\([^=]*\)='`
29704     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
29705     ac_shift=:
29706     ;;
29707   *)
29708     ac_option=$1
29709     ac_optarg=$2
29710     ac_shift=shift
29711     ;;
29712   esac
29713
29714   case $ac_option in
29715   # Handling of the options.
29716   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29717     ac_cs_recheck=: ;;
29718   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
29719     $as_echo "$ac_cs_version"; exit ;;
29720   --debug | --debu | --deb | --de | --d | -d )
29721     debug=: ;;
29722   --file | --fil | --fi | --f )
29723     $ac_shift
29724     case $ac_optarg in
29725     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29726     esac
29727     CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
29728     ac_need_defaults=false;;
29729   --header | --heade | --head | --hea )
29730     $ac_shift
29731     case $ac_optarg in
29732     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29733     esac
29734     CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
29735     ac_need_defaults=false;;
29736   --he | --h)
29737     # Conflict between --help and --header
29738     { $as_echo "$as_me: error: ambiguous option: $1
29739 Try \`$0 --help' for more information." >&2
29740    { (exit 1); exit 1; }; };;
29741   --help | --hel | -h )
29742     $as_echo "$ac_cs_usage"; exit ;;
29743   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
29744   | -silent | --silent | --silen | --sile | --sil | --si | --s)
29745     ac_cs_silent=: ;;
29746
29747   # This is an error.
29748   -*) { $as_echo "$as_me: error: unrecognized option: $1
29749 Try \`$0 --help' for more information." >&2
29750    { (exit 1); exit 1; }; } ;;
29751
29752   *) ac_config_targets="$ac_config_targets $1"
29753      ac_need_defaults=false ;;
29754
29755   esac
29756   shift
29757 done
29758
29759 ac_configure_extra_args=
29760
29761 if $ac_cs_silent; then
29762   exec 6>/dev/null
29763   ac_configure_extra_args="$ac_configure_extra_args --silent"
29764 fi
29765
29766 _ACEOF
29767 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29768 if \$ac_cs_recheck; then
29769   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
29770   shift
29771   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
29772   CONFIG_SHELL='$SHELL'
29773   export CONFIG_SHELL
29774   exec "\$@"
29775 fi
29776
29777 _ACEOF
29778 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29779 exec 5>>config.log
29780 {
29781   echo
29782   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
29783 ## Running $as_me. ##
29784 _ASBOX
29785   $as_echo "$ac_log"
29786 } >&5
29787
29788 _ACEOF
29789 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29790 _ACEOF
29791
29792 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29793
29794 # Handling of arguments.
29795 for ac_config_target in $ac_config_targets
29796 do
29797   case $ac_config_target in
29798     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
29799     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
29800     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
29801     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
29802     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
29803     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
29804     "src/backend/port/pg_latch.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_latch.c:${LATCH_IMPLEMENTATION}" ;;
29805     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
29806     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
29807     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
29808     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
29809     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
29810     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
29811
29812   *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
29813 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29814    { (exit 1); exit 1; }; };;
29815   esac
29816 done
29817
29818
29819 # If the user did not use the arguments to specify the items to instantiate,
29820 # then the envvar interface is used.  Set only those that are not.
29821 # We use the long form for the default assignment because of an extremely
29822 # bizarre bug on SunOS 4.1.3.
29823 if $ac_need_defaults; then
29824   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29825   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29826   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
29827   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29828 fi
29829
29830 # Have a temporary directory for convenience.  Make it in the build tree
29831 # simply because there is no reason against having it here, and in addition,
29832 # creating and moving files from /tmp can sometimes cause problems.
29833 # Hook for its removal unless debugging.
29834 # Note that there is a small window in which the directory will not be cleaned:
29835 # after its creation but before its name has been assigned to `$tmp'.
29836 $debug ||
29837 {
29838   tmp=
29839   trap 'exit_status=$?
29840   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
29841 ' 0
29842   trap '{ (exit 1); exit 1; }' 1 2 13 15
29843 }
29844 # Create a (secure) tmp directory for tmp files.
29845
29846 {
29847   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
29848   test -n "$tmp" && test -d "$tmp"
29849 }  ||
29850 {
29851   tmp=./conf$$-$RANDOM
29852   (umask 077 && mkdir "$tmp")
29853 } ||
29854 {
29855    $as_echo "$as_me: cannot create a temporary directory in ." >&2
29856    { (exit 1); exit 1; }
29857 }
29858
29859 # Set up the scripts for CONFIG_FILES section.
29860 # No need to generate them if there are no CONFIG_FILES.
29861 # This happens for instance with `./config.status config.h'.
29862 if test -n "$CONFIG_FILES"; then
29863
29864
29865 ac_cr='\r'
29866 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
29867 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
29868   ac_cs_awk_cr='\\r'
29869 else
29870   ac_cs_awk_cr=$ac_cr
29871 fi
29872
29873 echo 'BEGIN {' >"$tmp/subs1.awk" &&
29874 _ACEOF
29875
29876
29877 {
29878   echo "cat >conf$$subs.awk <<_ACEOF" &&
29879   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
29880   echo "_ACEOF"
29881 } >conf$$subs.sh ||
29882   { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
29883 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
29884    { (exit 1); exit 1; }; }
29885 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
29886 ac_delim='%!_!# '
29887 for ac_last_try in false false false false false :; do
29888   . ./conf$$subs.sh ||
29889     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
29890 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
29891    { (exit 1); exit 1; }; }
29892
29893   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
29894   if test $ac_delim_n = $ac_delim_num; then
29895     break
29896   elif $ac_last_try; then
29897     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
29898 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
29899    { (exit 1); exit 1; }; }
29900   else
29901     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29902   fi
29903 done
29904 rm -f conf$$subs.sh
29905
29906 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29907 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
29908 _ACEOF
29909 sed -n '
29910 h
29911 s/^/S["/; s/!.*/"]=/
29912 p
29913 g
29914 s/^[^!]*!//
29915 :repl
29916 t repl
29917 s/'"$ac_delim"'$//
29918 t delim
29919 :nl
29920 h
29921 s/\(.\{148\}\).*/\1/
29922 t more1
29923 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
29924 p
29925 n
29926 b repl
29927 :more1
29928 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29929 p
29930 g
29931 s/.\{148\}//
29932 t nl
29933 :delim
29934 h
29935 s/\(.\{148\}\).*/\1/
29936 t more2
29937 s/["\\]/\\&/g; s/^/"/; s/$/"/
29938 p
29939 b
29940 :more2
29941 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29942 p
29943 g
29944 s/.\{148\}//
29945 t delim
29946 ' <conf$$subs.awk | sed '
29947 /^[^""]/{
29948   N
29949   s/\n//
29950 }
29951 ' >>$CONFIG_STATUS || ac_write_fail=1
29952 rm -f conf$$subs.awk
29953 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29954 _ACAWK
29955 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
29956   for (key in S) S_is_set[key] = 1
29957   FS = "\a"
29958
29959 }
29960 {
29961   line = $ 0
29962   nfields = split(line, field, "@")
29963   substed = 0
29964   len = length(field[1])
29965   for (i = 2; i < nfields; i++) {
29966     key = field[i]
29967     keylen = length(key)
29968     if (S_is_set[key]) {
29969       value = S[key]
29970       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
29971       len += length(value) + length(field[++i])
29972       substed = 1
29973     } else
29974       len += 1 + keylen
29975   }
29976
29977   print line
29978 }
29979
29980 _ACAWK
29981 _ACEOF
29982 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29983 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
29984   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
29985 else
29986   cat
29987 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
29988   || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
29989 $as_echo "$as_me: error: could not setup config files machinery" >&2;}
29990    { (exit 1); exit 1; }; }
29991 _ACEOF
29992
29993 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29994 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29995 # trailing colons and then remove the whole line if VPATH becomes empty
29996 # (actually we leave an empty line to preserve line numbers).
29997 if test "x$srcdir" = x.; then
29998   ac_vpsub='/^[  ]*VPATH[        ]*=/{
29999 s/:*\$(srcdir):*/:/
30000 s/:*\${srcdir}:*/:/
30001 s/:*@srcdir@:*/:/
30002 s/^\([^=]*=[     ]*\):*/\1/
30003 s/:*$//
30004 s/^[^=]*=[       ]*$//
30005 }'
30006 fi
30007
30008 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30009 fi # test -n "$CONFIG_FILES"
30010
30011 # Set up the scripts for CONFIG_HEADERS section.
30012 # No need to generate them if there are no CONFIG_HEADERS.
30013 # This happens for instance with `./config.status Makefile'.
30014 if test -n "$CONFIG_HEADERS"; then
30015 cat >"$tmp/defines.awk" <<\_ACAWK ||
30016 BEGIN {
30017 _ACEOF
30018
30019 # Transform confdefs.h into an awk script `defines.awk', embedded as
30020 # here-document in config.status, that substitutes the proper values into
30021 # config.h.in to produce config.h.
30022
30023 # Create a delimiter string that does not exist in confdefs.h, to ease
30024 # handling of long lines.
30025 ac_delim='%!_!# '
30026 for ac_last_try in false false :; do
30027   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
30028   if test -z "$ac_t"; then
30029     break
30030   elif $ac_last_try; then
30031     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
30032 $as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
30033    { (exit 1); exit 1; }; }
30034   else
30035     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
30036   fi
30037 done
30038
30039 # For the awk script, D is an array of macro values keyed by name,
30040 # likewise P contains macro parameters if any.  Preserve backslash
30041 # newline sequences.
30042
30043 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
30044 sed -n '
30045 s/.\{148\}/&'"$ac_delim"'/g
30046 t rset
30047 :rset
30048 s/^[     ]*#[    ]*define[       ][      ]*/ /
30049 t def
30050 d
30051 :def
30052 s/\\$//
30053 t bsnl
30054 s/["\\]/\\&/g
30055 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
30056 D["\1"]=" \3"/p
30057 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
30058 d
30059 :bsnl
30060 s/["\\]/\\&/g
30061 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
30062 D["\1"]=" \3\\\\\\n"\\/p
30063 t cont
30064 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
30065 t cont
30066 d
30067 :cont
30068 n
30069 s/.\{148\}/&'"$ac_delim"'/g
30070 t clear
30071 :clear
30072 s/\\$//
30073 t bsnlc
30074 s/["\\]/\\&/g; s/^/"/; s/$/"/p
30075 d
30076 :bsnlc
30077 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
30078 b cont
30079 ' <confdefs.h | sed '
30080 s/'"$ac_delim"'/"\\\
30081 "/g' >>$CONFIG_STATUS || ac_write_fail=1
30082
30083 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30084   for (key in D) D_is_set[key] = 1
30085   FS = "\a"
30086 }
30087 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
30088   line = \$ 0
30089   split(line, arg, " ")
30090   if (arg[1] == "#") {
30091     defundef = arg[2]
30092     mac1 = arg[3]
30093   } else {
30094     defundef = substr(arg[1], 2)
30095     mac1 = arg[2]
30096   }
30097   split(mac1, mac2, "(") #)
30098   macro = mac2[1]
30099   prefix = substr(line, 1, index(line, defundef) - 1)
30100   if (D_is_set[macro]) {
30101     # Preserve the white space surrounding the "#".
30102     print prefix "define", macro P[macro] D[macro]
30103     next
30104   } else {
30105     # Replace #undef with comments.  This is necessary, for example,
30106     # in the case of _POSIX_SOURCE, which is predefined and required
30107     # on some systems where configure will not decide to define it.
30108     if (defundef == "undef") {
30109       print "/*", prefix defundef, macro, "*/"
30110       next
30111     }
30112   }
30113 }
30114 { print }
30115 _ACAWK
30116 _ACEOF
30117 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30118   { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
30119 $as_echo "$as_me: error: could not setup config headers machinery" >&2;}
30120    { (exit 1); exit 1; }; }
30121 fi # test -n "$CONFIG_HEADERS"
30122
30123
30124 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
30125 shift
30126 for ac_tag
30127 do
30128   case $ac_tag in
30129   :[FHLC]) ac_mode=$ac_tag; continue;;
30130   esac
30131   case $ac_mode$ac_tag in
30132   :[FHL]*:*);;
30133   :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
30134 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
30135    { (exit 1); exit 1; }; };;
30136   :[FH]-) ac_tag=-:-;;
30137   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
30138   esac
30139   ac_save_IFS=$IFS
30140   IFS=:
30141   set x $ac_tag
30142   IFS=$ac_save_IFS
30143   shift
30144   ac_file=$1
30145   shift
30146
30147   case $ac_mode in
30148   :L) ac_source=$1;;
30149   :[FH])
30150     ac_file_inputs=
30151     for ac_f
30152     do
30153       case $ac_f in
30154       -) ac_f="$tmp/stdin";;
30155       *) # Look for the file first in the build tree, then in the source tree
30156          # (if the path is not absolute).  The absolute path cannot be DOS-style,
30157          # because $ac_f cannot contain `:'.
30158          test -f "$ac_f" ||
30159            case $ac_f in
30160            [\\/$]*) false;;
30161            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
30162            esac ||
30163            { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
30164 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
30165    { (exit 1); exit 1; }; };;
30166       esac
30167       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
30168       ac_file_inputs="$ac_file_inputs '$ac_f'"
30169     done
30170
30171     # Let's still pretend it is `configure' which instantiates (i.e., don't
30172     # use $as_me), people would be surprised to read:
30173     #    /* config.h.  Generated by config.status.  */
30174     configure_input='Generated from '`
30175           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
30176         `' by configure.'
30177     if test x"$ac_file" != x-; then
30178       configure_input="$ac_file.  $configure_input"
30179       { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
30180 $as_echo "$as_me: creating $ac_file" >&6;}
30181     fi
30182     # Neutralize special characters interpreted by sed in replacement strings.
30183     case $configure_input in #(
30184     *\&* | *\|* | *\\* )
30185        ac_sed_conf_input=`$as_echo "$configure_input" |
30186        sed 's/[\\\\&|]/\\\\&/g'`;; #(
30187     *) ac_sed_conf_input=$configure_input;;
30188     esac
30189
30190     case $ac_tag in
30191     *:-:* | *:-) cat >"$tmp/stdin" \
30192       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
30193 $as_echo "$as_me: error: could not create $ac_file" >&2;}
30194    { (exit 1); exit 1; }; } ;;
30195     esac
30196     ;;
30197   esac
30198
30199   ac_dir=`$as_dirname -- "$ac_file" ||
30200 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30201          X"$ac_file" : 'X\(//\)[^/]' \| \
30202          X"$ac_file" : 'X\(//\)$' \| \
30203          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
30204 $as_echo X"$ac_file" |
30205     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30206             s//\1/
30207             q
30208           }
30209           /^X\(\/\/\)[^/].*/{
30210             s//\1/
30211             q
30212           }
30213           /^X\(\/\/\)$/{
30214             s//\1/
30215             q
30216           }
30217           /^X\(\/\).*/{
30218             s//\1/
30219             q
30220           }
30221           s/.*/./; q'`
30222   { as_dir="$ac_dir"
30223   case $as_dir in #(
30224   -*) as_dir=./$as_dir;;
30225   esac
30226   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
30227     as_dirs=
30228     while :; do
30229       case $as_dir in #(
30230       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
30231       *) as_qdir=$as_dir;;
30232       esac
30233       as_dirs="'$as_qdir' $as_dirs"
30234       as_dir=`$as_dirname -- "$as_dir" ||
30235 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30236          X"$as_dir" : 'X\(//\)[^/]' \| \
30237          X"$as_dir" : 'X\(//\)$' \| \
30238          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
30239 $as_echo X"$as_dir" |
30240     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30241             s//\1/
30242             q
30243           }
30244           /^X\(\/\/\)[^/].*/{
30245             s//\1/
30246             q
30247           }
30248           /^X\(\/\/\)$/{
30249             s//\1/
30250             q
30251           }
30252           /^X\(\/\).*/{
30253             s//\1/
30254             q
30255           }
30256           s/.*/./; q'`
30257       test -d "$as_dir" && break
30258     done
30259     test -z "$as_dirs" || eval "mkdir $as_dirs"
30260   } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
30261 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
30262    { (exit 1); exit 1; }; }; }
30263   ac_builddir=.
30264
30265 case "$ac_dir" in
30266 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
30267 *)
30268   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
30269   # A ".." for each directory in $ac_dir_suffix.
30270   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
30271   case $ac_top_builddir_sub in
30272   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
30273   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
30274   esac ;;
30275 esac
30276 ac_abs_top_builddir=$ac_pwd
30277 ac_abs_builddir=$ac_pwd$ac_dir_suffix
30278 # for backward compatibility:
30279 ac_top_builddir=$ac_top_build_prefix
30280
30281 case $srcdir in
30282   .)  # We are building in place.
30283     ac_srcdir=.
30284     ac_top_srcdir=$ac_top_builddir_sub
30285     ac_abs_top_srcdir=$ac_pwd ;;
30286   [\\/]* | ?:[\\/]* )  # Absolute name.
30287     ac_srcdir=$srcdir$ac_dir_suffix;
30288     ac_top_srcdir=$srcdir
30289     ac_abs_top_srcdir=$srcdir ;;
30290   *) # Relative name.
30291     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
30292     ac_top_srcdir=$ac_top_build_prefix$srcdir
30293     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
30294 esac
30295 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
30296
30297
30298   case $ac_mode in
30299   :F)
30300   #
30301   # CONFIG_FILE
30302   #
30303
30304   ac_MKDIR_P=$MKDIR_P
30305   case $MKDIR_P in
30306   [\\/$]* | ?:[\\/]* ) ;;
30307   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
30308   esac
30309 _ACEOF
30310
30311 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30312 # If the template does not know about datarootdir, expand it.
30313 # FIXME: This hack should be removed a few years after 2.60.
30314 ac_datarootdir_hack=; ac_datarootdir_seen=
30315
30316 ac_sed_dataroot='
30317 /datarootdir/ {
30318   p
30319   q
30320 }
30321 /@datadir@/p
30322 /@docdir@/p
30323 /@infodir@/p
30324 /@localedir@/p
30325 /@mandir@/p
30326 '
30327 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
30328 *datarootdir*) ac_datarootdir_seen=yes;;
30329 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
30330   { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
30331 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
30332 _ACEOF
30333 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30334   ac_datarootdir_hack='
30335   s&@datadir@&$datadir&g
30336   s&@docdir@&$docdir&g
30337   s&@infodir@&$infodir&g
30338   s&@localedir@&$localedir&g
30339   s&@mandir@&$mandir&g
30340     s&\\\${datarootdir}&$datarootdir&g' ;;
30341 esac
30342 _ACEOF
30343
30344 # Neutralize VPATH when `$srcdir' = `.'.
30345 # Shell code in configure.ac might set extrasub.
30346 # FIXME: do we really want to maintain this feature?
30347 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30348 ac_sed_extra="$ac_vpsub
30349 $extrasub
30350 _ACEOF
30351 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30352 :t
30353 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30354 s|@configure_input@|$ac_sed_conf_input|;t t
30355 s&@top_builddir@&$ac_top_builddir_sub&;t t
30356 s&@top_build_prefix@&$ac_top_build_prefix&;t t
30357 s&@srcdir@&$ac_srcdir&;t t
30358 s&@abs_srcdir@&$ac_abs_srcdir&;t t
30359 s&@top_srcdir@&$ac_top_srcdir&;t t
30360 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
30361 s&@builddir@&$ac_builddir&;t t
30362 s&@abs_builddir@&$ac_abs_builddir&;t t
30363 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
30364 s&@MKDIR_P@&$ac_MKDIR_P&;t t
30365 $ac_datarootdir_hack
30366 "
30367 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
30368   || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
30369 $as_echo "$as_me: error: could not create $ac_file" >&2;}
30370    { (exit 1); exit 1; }; }
30371
30372 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
30373   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
30374   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
30375   { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30376 which seems to be undefined.  Please make sure it is defined." >&5
30377 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30378 which seems to be undefined.  Please make sure it is defined." >&2;}
30379
30380   rm -f "$tmp/stdin"
30381   case $ac_file in
30382   -) cat "$tmp/out" && rm -f "$tmp/out";;
30383   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
30384   esac \
30385   || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
30386 $as_echo "$as_me: error: could not create $ac_file" >&2;}
30387    { (exit 1); exit 1; }; }
30388  ;;
30389   :H)
30390   #
30391   # CONFIG_HEADER
30392   #
30393   if test x"$ac_file" != x-; then
30394     {
30395       $as_echo "/* $configure_input  */" \
30396       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
30397     } >"$tmp/config.h" \
30398       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
30399 $as_echo "$as_me: error: could not create $ac_file" >&2;}
30400    { (exit 1); exit 1; }; }
30401     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
30402       { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
30403 $as_echo "$as_me: $ac_file is unchanged" >&6;}
30404     else
30405       rm -f "$ac_file"
30406       mv "$tmp/config.h" "$ac_file" \
30407         || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
30408 $as_echo "$as_me: error: could not create $ac_file" >&2;}
30409    { (exit 1); exit 1; }; }
30410     fi
30411   else
30412     $as_echo "/* $configure_input  */" \
30413       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
30414       || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
30415 $as_echo "$as_me: error: could not create -" >&2;}
30416    { (exit 1); exit 1; }; }
30417   fi
30418  ;;
30419   :L)
30420   #
30421   # CONFIG_LINK
30422   #
30423
30424   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
30425     :
30426   else
30427     # Prefer the file from the source tree if names are identical.
30428     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
30429       ac_source=$srcdir/$ac_source
30430     fi
30431
30432     { $as_echo "$as_me:$LINENO: linking $ac_source to $ac_file" >&5
30433 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
30434
30435     if test ! -r "$ac_source"; then
30436       { { $as_echo "$as_me:$LINENO: error: $ac_source: file not found" >&5
30437 $as_echo "$as_me: error: $ac_source: file not found" >&2;}
30438    { (exit 1); exit 1; }; }
30439     fi
30440     rm -f "$ac_file"
30441
30442     # Try a relative symlink, then a hard link, then a copy.
30443     case $srcdir in
30444     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
30445         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
30446     esac
30447     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
30448       ln "$ac_source" "$ac_file" 2>/dev/null ||
30449       cp -p "$ac_source" "$ac_file" ||
30450       { { $as_echo "$as_me:$LINENO: error: cannot link or copy $ac_source to $ac_file" >&5
30451 $as_echo "$as_me: error: cannot link or copy $ac_source to $ac_file" >&2;}
30452    { (exit 1); exit 1; }; }
30453   fi
30454  ;;
30455   :C)  { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
30456 $as_echo "$as_me: executing $ac_file commands" >&6;}
30457  ;;
30458   esac
30459
30460
30461   case $ac_file$ac_mode in
30462     "check_win32_symlinks":C)
30463 # Links sometimes fail undetected on Mingw -
30464 # so here we detect it and warn the user
30465 for FILE in $CONFIG_LINKS
30466  do
30467         # test -e works for symlinks in the MinGW console
30468         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:$LINENO: WARNING: *** link for $FILE -- please fix by hand" >&5
30469 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
30470  done
30471  ;;
30472     "src/include/pg_config.h":H)
30473 # Update timestamp for pg_config.h (see Makefile.global)
30474 echo >src/include/stamp-h
30475  ;;
30476     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
30477
30478   esac
30479 done # for ac_tag
30480
30481
30482 { (exit 0); exit 0; }
30483 _ACEOF
30484 chmod +x $CONFIG_STATUS
30485 ac_clean_files=$ac_clean_files_save
30486
30487 test $ac_write_fail = 0 ||
30488   { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
30489 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
30490    { (exit 1); exit 1; }; }
30491
30492
30493 # configure is writing to config.log, and then calls config.status.
30494 # config.status does its own redirection, appending to config.log.
30495 # Unfortunately, on DOS this fails, as config.log is still kept open
30496 # by configure, so config.status won't be able to write to it; its
30497 # output is simply discarded.  So we exec the FD to /dev/null,
30498 # effectively closing config.log, so it can be properly (re)opened and
30499 # appended to by config.status.  When coming back to configure, we
30500 # need to make the FD available again.
30501 if test "$no_create" != yes; then
30502   ac_cs_success=:
30503   ac_config_status_args=
30504   test "$silent" = yes &&
30505     ac_config_status_args="$ac_config_status_args --quiet"
30506   exec 5>/dev/null
30507   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
30508   exec 5>>config.log
30509   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30510   # would make configure fail if this is the last instruction.
30511   $ac_cs_success || { (exit 1); exit 1; }
30512 fi
30513 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
30514   { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
30515 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
30516 fi
30517